Learn from Mistakes
You made a mistake. Good - this is an opportunity to prevent it from happening again.
Process
- Analyze the Mistake
Identify:
-
What went wrong: The specific action or omission
-
Why it happened: The reasoning or assumption that led to the mistake
-
Correct behavior: What should have been done instead
- Formulate the Lesson
Create a concise entry for AGENTS.md:
-
Common Mistake: Brief description of the anti-pattern (what NOT to do)
-
Correct Behavior: Clear instruction of what TO do instead
The lesson should be:
-
Actionable (tells you exactly what to do)
-
Specific (not vague platitudes)
-
Generalizable (applies beyond this one instance)
- Find the Right Section
Read AGENTS.md and identify which section the lesson belongs in:
-
General: Cross-cutting concerns, workflow issues, process mistakes
-
TypeScript: Language-specific patterns
-
Database: Migration and schema issues
-
Orchestration Model: Agent/skill workflow issues
-
Or create a new section if none fits
- Update AGENTS.md
Add a new row to the appropriate table:
| <Common Mistake> | <Correct Behavior> |
- Confirm the Update
Read back the updated section to verify the entry is clear and correctly formatted.
Example
If the mistake was "Ignored reviewer feedback about missing integration test":
| Ignoring review findings marked "Should fix" or "NEEDS USER DECISION" | Address ALL review findings before proceeding. If flagged as "NEEDS USER DECISION", ask the user. Never skip items marked "Should fix (Important)" |
Arguments
$ARGUMENTS