| name | sdlc-learn |
| description | Use on a weekly cadence, or after a rough project, to turn logged failures into durable improvements. Reads the agent-run log, clusters recurring agent failures, encodes each into an AGENTS.md rule or checklist, and updates the KPI tracker so the trend is visible. This is the compounding self-improvement step that makes you measurably better at directing agents over time. Make sure to use this whenever you say "weekly review", "retro", "what did we learn", "update my rules", or "let's improve the loop". Final step of the SDLC loop - it feeds the next cycle. |
sdlc-learn - turn failures into rules, and watch the trend
The last beat of the SDLC loop, and the one that makes the whole thing compound. Everything upstream produces signal (logged runs, review scores); this step converts that signal into durable improvements so the same mistake doesn't recur. Without it, you repeat failures at high speed.
Why this matters
AI amplifies your engineering culture - it multiplies both strengths and weaknesses. Left alone, a recurring agent failure gets amplified every session. Encoded as a rule, it's fixed once and inherited forever. The compounding comes from this loop running regularly, not from any single clever fix.
Procedure
- Read the run log. Open the agent-run log (KPI tracker tab) for the period. Look at the rows where first-pass success was N or correction rounds were high.
- Cluster the failures. Group them into recurring patterns, not one-offs. Examples: "agent hallucinates imports", "I under-specify acceptance criteria", "skips error handling on external calls", "over-engineers when a simpler path existed".
- Pick 1-3 to encode. Don't try to fix everything; take the highest-frequency or highest-cost patterns.
- Write each as a rule. Add a line to the relevant AGENTS.md / rule file. Explain the why, not a heavy-handed MUST - the model follows reasoning better than commands. Tie it to the loop step it belongs to (e.g., a planning miss -> strengthen
sdlc-plan use).
- Update the KPIs. Log this month's numbers in the tracker (first-pass success, correction rounds, eval coverage, etc.). Note whether last cycle's rules moved the trend - that's how you know the loop is working.
Output
- 1-3 new AGENTS.md rules, each with its reasoning.
- Updated KPI tracker row for the period, with a one-line read on the trend.
Gate
New rules are live in the rule file before the next coding cycle, so the loop closes. If a pattern keeps recurring despite a rule, the rule isn't landing - reframe it (better reasoning, or move it to a skill/checklist) rather than shouting it louder.
References
Load these as needed: