| name | backlog-to-rules |
| description | Implement accumulated improvements from improvements-backlog into AI rules and skills. Use when backlog has 5+ items, weekly rule update cycle, 2+ high priority improvements exist, before important releases, when same error repeated 3+ times, when user says implement improvements/process backlog/update rules from errors. |
| allowed-tools | Read, Write, Bash, Grep, Glob |
| model | sonnet |
| user-invocable | true |
Backlog to Rules
Turn accumulated error experience into concrete rules that prevent repetition. Every error that reaches production twice is a missing rule.
When to Run
| Condition | Priority |
|---|
| 5+ improvements in backlog | Mandatory |
| Week since last implementation | Recommended |
| 2+ High priority improvements | Mandatory |
| Before important release | Recommended |
| Same error repeated 3+ times | Immediate |
Process (7 Phases)
Phase 1: Analyze
- Open
.cursor/data/improvements-backlog.md
- Group improvements by target files
- Collect statistics (total, high/medium/low priority)
- Identify error patterns (merge similar ones)
Phase 2: Research
For each target file:
- Read current structure
- Determine where to add each improvement (existing or new section)
- Check for conflicts with existing rules
Phase 3: Plan
- List changes by file
- Define success criteria
- For complex cases — full plan (see
references/templates.md)
Phase 4: Implement
Implementation rules:
- Add new sections — do NOT replace existing ones because existing rules were validated by real errors
- Each rule with a concrete code/command example
- Each rule with WHY (real error case) because rules without reasoning get ignored
- Preserve file format (tables, code blocks)
- After each file — re-read entirely, verify structure
Phase 5: Verify
- All existing sections preserved
- New sections supplement, not replace
- Format matches file style
- Cross-file references intact
- Cross-check: every file opened and verified
Phase 6: Update Backlog
- Update statuses: Backlog -> Done
- Move to "Implemented" section in brief format
- Update header statistics
Phase 7: Summary
Report: how many implemented, which files updated, which patterns prevented, confidence.
Quick Version (1-2 improvements)
- Open backlog, find improvement
- Open target instruction file
- Add section at end of corresponding area
- Include WHY with real error case
- Update backlog status to Done
Quality Framework
| Element | What to include |
|---|
| Input | What triggers the rule |
| Output | What should be done |
| Success Metrics | How to measure success |
| Guardrails | What is forbidden, boundaries |
| WHY | Real error case |
References