| name | blueprint:bad-pattern |
| description | Document an anti-pattern to avoid (any subject — code, schema, UI, infra) |
| argument-hint | [description] - [correct approach] |
| allowed-tools | ["Glob","Grep","Read","Write","Edit","EnterPlanMode","ExitPlanMode"] |
Document Anti-Pattern
COMMAND: Document something to avoid and the correct alternative. Anti-patterns are tree-agnostic — file all entries in patterns/bad/anti-patterns.md regardless of subject (code, database model, UI, infra).
Execute
- Parse argument for anti-pattern and correct approach
- Create patterns/bad/ if needed
- Add entry to patterns/bad/anti-patterns.md
- Report what was documented
Input Handling
| Input | Action |
|---|
/bad-pattern any type - use unknown | Document with both bad and good |
/bad-pattern inline SQL | Ask for correct approach |
/bad-pattern modal traps focus on close - return focus to trigger | UI anti-pattern, same file |
/bad-pattern | Ask what to document |
Anti-Pattern Template
Add to patterns/bad/anti-patterns.md:
## [Category]: [Description]
**Severity:** Critical | High | Medium | Low
### Don't Do This
```[language]
[bad code]
Problems:
Do This Instead
[good code]
Why: [Explanation]
## Severity Guide
- **Critical**: Security, data loss, accessibility violations (WCAG failures), destructive actions without confirmation
- **High**: Performance, maintenance burden, broken interaction patterns
- **Medium**: Code smell, inconsistent visual language
- **Low**: Style preference
## Output
Anti-pattern documented in patterns/bad/anti-patterns.md
If details missing, use TBD markers.