File Structure
Rules live in.dwf/rules/, organized by scope:
Rule Format
Fields
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier (kebab-case) |
severity | enum | No | error | warning | info (default: error) |
content | string | Yes | The rule in natural language (multiline YAML) |
tags | string[] | No | Tags for filtering |
enabled | boolean | No | Default: 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: falseare always omitted
Scopes
The five built-in scopes organize rules by concern:| Scope | Purpose |
|---|---|
architecture | Project structure, patterns, module organization |
conventions | Naming, formatting, code style |
security | Auth, RLS, secrets, input validation |
testing | Test strategy, naming, coverage |
workflow | Git, CI/CD, PR process, deployment |