skills/reflexion/SKILL.md
Invoked by develop when iteration feedback requires a retry, not directly by users. Prevents repeating the same mistakes across attempts. Also relevant when: 'why did this fail again', 'same error twice', 'what should I do differently', 'keep making the same mistake'.
npx skillsauth add axiomantic/spellbook reflexionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
<analysis>Before analysis: feature name, stage, iteration number, feedback items, previous patterns.</analysis>
<reflection>After analysis: root causes identified, reflections stored, patterns checked, retry guidance generated.</reflection>
| Input | Required | Description |
|-------|----------|-------------|
| feature_name | Yes | Feature that received ITERATE verdict |
| feedback | Yes | List of feedback items from roundtable |
| stage | Yes | Stage where iteration occurred |
| iteration_number | Yes | Current iteration count |
| Output | Type | Description |
|--------|------|-------------|
| reflection_record | Database | Stored in forged.db reflections table |
| root_cause_analysis | Inline | What went wrong and why |
| retry_guidance | Inline | Specific guidance for next attempt |
Dispatch subagent with command: reflexion-analyze
The subagent executes the complete analysis pipeline:
| Pattern | Threshold | Alert | |---------|-----------|-------| | Same failure, same feature | 2 iterations | "Root cause not addressed" | | Same failure, different features | 3 features | "Systemic pattern" | | Same validator, different failures | 3 failures | "Validator focus area needs attention" |
Trigger: forge_iteration_return with ITERATE verdict
Flow: Roundtable ITERATE -> forge_iteration_return -> reflexion skill -> analyze + store + check patterns + generate guidance -> return to develop orchestrator -> re-select and re-invoke skill
After 3 iterations on same stage with same root cause: mark ESCALATED, report attempts made, recommend human intervention.
If ANY unchecked: complete before returning.
<FINAL_EMPHASIS> Failure is information. The roundtable said ITERATE because something was wrong. Your job is to understand WHY, not just WHAT. Store the lesson. Check for patterns. Guide the retry. The same mistake twice is repetition, not learning. </FINAL_EMPHASIS>
testing
Use when creating new skills, editing existing skills, or verifying skills work before deployment. Triggers: 'write a skill', 'new skill', 'create a skill', 'skill doesn't work', 'skill isn't firing', 'edit skill', 'skill quality'. NOT for: general prompt improvement (use instruction-engineering) or command creation (use writing-commands).
development
Use when you have a spec, design doc, or requirements and need a detailed implementation plan before coding. Triggers: 'write a plan', 'create implementation plan', 'plan this out', 'break this down into steps', 'convert design to tasks', 'implementation order'. Also invoked by develop during planning. NOT for: reviewing existing plans (use reviewing-impl-plans).
testing
Use when creating new commands, editing existing commands, or reviewing command quality. Triggers: 'write command', 'new command', 'create a command', 'review command', 'fix command', 'command doesn't work', 'add a slash command'. NOT for: skill creation (use writing-skills).
development
Use when about to claim discovery during debugging. Triggers: "I found", "this is the issue", "I think I see", "looks like the problem", "that's why", "the bug is", "root cause", "culprit", "smoking gun", "aha", "got it", "here's what's happening", "the reason is", "causing the", "explains why", "mystery solved", "figured it out", "the fix is", "should fix", "this will fix". Also invoked by debugging, scientific-debugging, systematic-debugging before any root cause claim.