Inline reflection skill. Evaluates a completed session or phase, logs failure patterns to AGENT_LEARNINGS.md, and extracts rules when the 3-strike threshold is reached. Use after any phase that produced failures, or at the end of a multi-phase pipeline run. Invoke inline with /reflect in any prompt.
Use this skill to close the feedback loop after completing a task. It reads accumulated failure signals, updates the persistent learning file, and extracts actionable rules when patterns repeat.
Read .github/AGENT_LEARNINGS.md in full.
For each failure that occurred during this session:
Determine the mid-level category using dot-notation:
lint:unused-vars · lint:import-order · lint:no-explicit-anytest:mock-resolution · test:async-act · test:next-image-propse2e:port-not-ready · e2e:selector-stalemcp:context7-unavailable · mcp:figma-screenshot-timeoutfigma:token-mismatch · pipeline:phase-skip · docs:stale-mermaidWrite the Error Signature as a short, canonical expression of the error (not a full stack trace). Examples:
"Received true for a non-boolean attribute fill""Cannot find module '@/components/foo'""context7 resolve-library-id returned no results"Update the Failure Log table:
Count, update Last SeenCount: 1, Status: openAfter logging:
Count ≥ 3 and Status: open.reflective.agent.md Phase 4).reflective.agent.md Phase 5).After completing, report:
### Reflect Summary
- Failures logged: N
- Rules extracted: N (IDs: L00N, …)
- Resolved rules purged: N
- Regressions detected: N (categories that broke an existing rule)
If nothing changed: No failures to log. AGENT_LEARNINGS.md unchanged.