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:
.dwf/rules/
  architecture.yml
  conventions.yml
  security.yml
  testing.yml
  workflow.yml

Rule Format

scope: conventions

rules:
  - id: named-exports
    severity: error
    content: |
      Always use named exports. Never use default exports.
      This applies to all files: components, utilities, hooks, and types.

  - id: no-barrel-files
    severity: warning
    content: |
      Avoid barrel files (index.ts re-exports).
      Import directly from the source file.

Fields

FieldTypeRequiredDescription
idstringYesUnique identifier (kebab-case)
severityenumNoerror | warning | info (default: error)
contentstringYesThe rule in natural language (multiline YAML)
tagsstring[]NoTags for filtering
enabledbooleanNoDefault: true. Disable without deleting

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:
ScopePurpose
architectureProject structure, patterns, module organization
conventionsNaming, formatting, code style
securityAuth, RLS, secrets, input validation
testingTest strategy, naming, coverage
workflowGit, CI/CD, PR process, deployment