Skip to main content
Rules are the core of dev-workflows. Each rule is a piece of guidance for AI editors, written in natural language and stored in YAML.

File Structure

Rules live in .dwf/rules/, organized by scope:

Rule Format

Fields

Severity Behavior

  • error and warning rules are included in compiled output
  • info rules are internal documentation only — they are omitted from output
  • Rules with enabled: false are always omitted

Scopes

The five built-in scopes organize rules by concern:

Custom Scopes

Beyond the five built-in scopes, you can define your own using the kind:name pattern:
Custom scopes follow the same rules as built-in ones. Create a new YAML file in .dwf/rules/ with your custom scope:
Custom scopes appear after built-in scopes in compiled output, sorted alphabetically. The scope name is used as-is for the heading (e.g., ## team:payments). Format: lowercase alphanumeric, hyphens allowed in name. Examples: team:frontend, agent:reviewer, pipeline:ci.