tools/sage-claude-plugin/skills/reflect/SKILL.md
Cycle review, Learnings with prevention rules, Next-cycle seeds
npx skillsauth add xoai/sage reflectInstall 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.
Look back. Extract learnings. Seed the next cycle.
Scan .sage/work/ for recently completed initiatives
(status: completed in frontmatter). Scan .sage/docs/ for
research and analysis artifacts. Read .sage/decisions.md
for the full decision trail.
If no completed work exists: "Sage: No completed initiatives found. /reflect works best after a deliver cycle. Describe what you want to reflect on, or type / for other commands."
Sage → reflect workflow. Looking back at what was done.
[1] Full initiative — review the entire cycle for [initiative name] [2] Recent work — reflect on the last few decisions [3] Specific topic — describe what you want to reflect on
Pick 1-3, type / for commands, or describe what you need.
For full initiative review, gather and present:
Sage: Cycle review for [initiative name].
Timeline: [Date] — Brief approved: [summary] [Date] — Spec approved: [key decisions] [Date] — Plan: [N] tasks planned [Date] — Build complete: [what was shipped]
Decisions made: [count from decisions.md] Approaches tried: [count from scratch.md if exists] Learnings stored: [count from self-learning entries]
Key artifacts: .sage/work/[initiative]/brief.md .sage/work/[initiative]/spec.md .sage/docs/[related research/analysis]
Ask the user for real-world feedback. This is the human input Sage cannot generate — the signal from reality.
Sage: Now I need your perspective on how this went.
[1] What worked well? (What should we do again?) [2] What didn't work? (What caused friction or rework?) [3] What surprised you? (What was unexpected?) [4] What feedback have you received? (From users, team, stakeholders)
Share any or all — or describe your overall assessment.
Pick 1-4, type / for commands, or describe what you need.
Listen to the user's responses. Ask follow-up questions if the feedback is vague — specifics make better prevention rules.
Based on the cycle review + user feedback, identify learnings in three categories:
Reinforce — what went well and should become standard practice. Prevent — what went wrong and should be avoided next time. Improve — what could be better with a specific change.
For each learning, write a WHEN/CHECK/BECAUSE prevention rule:
WHEN: [situation that triggers this learning]
CHECK: [observable condition to verify]
BECAUSE: [what happens if you don't — the consequence]
Learnings quality check (before presenting):
🔒 LEARNINGS CHECKPOINT (Zone 2):
Sage: Learnings extracted from [initiative/topic].
Reinforce:
Prevent:
Improve:
[A] Approve — store learnings [R] Revise [N] New session
Pick A/R/N, or tell me what to change.
On approval:
Store each learning via sage_memory_store with tags:
self-learning, reflect, [initiative-slug], and
category tag (reinforce, prevent, or improve).
Update conventions.md if any learning revealed a project pattern that should become a convention. Announce what was added.
Save reflection report to .sage/docs/reflect-[slug].md
with the full cycle review, user feedback, and learnings.
Append to decisions.md:
### YYYY-MM-DD — Reflection: [initiative/topic]
[Summary of key learnings and what changes going forward.]
The most powerful step — connect learnings to future work.
Sage: Reflection complete. [N] learnings stored.
Seeds for next cycle: [Specific recommendation based on learnings, e.g., "Start with payment edge case research next time — this area took 3x longer than expected."]
Report: .sage/docs/reflect-[slug].md
Next steps: /research — start the next initiative (learnings loaded via Rule 0) /build — spec → plan → implement → verify /design — brief → spec → copy
Type a command, or describe what you want to do next.
Good reflection output:
self-learning + reflect tags so Rule 0
memory search finds them in future cycles.tools
Captures agent mistakes, corrections, and discovered gotchas so they are not repeated. Use when: (1) a command or operation fails unexpectedly, (2) the user corrects the agent, (3) the agent discovers non-obvious behavior through debugging, (4) an API or tool behaves differently than expected, (5) a better approach is found for a recurring task. Also searches past learnings before starting tasks to avoid known pitfalls. Activate alongside the sage-memory skill — they share the same MCP backend but serve different purposes (sage-memory = codebase knowledge, sage-self-learning = agent mistakes and gotchas).
development
Typed knowledge graph stored in sage-memory. Use when creating or querying structured entities (Person, Project, Task, Event, Document), linking related objects, checking dependencies, planning multi-step actions as graph transformations, or when skills need to share structured state. Trigger on "remember that X is Y", "what do I know about", "link X to Y", "show dependencies", "what blocks X", entity CRUD, cross-skill data access, or any request involving structured relationships between things.
tools
Integrates sage-memory into Sage workflows. Teaches the agent when to remember (store findings during work), when to recall (search memory at session start and task start), and how to learn (structured knowledge capture via sage learn). Use when the user mentions memory, remember, recall, learn, capture knowledge, onboard to codebase, or when starting any session where sage-memory MCP tools are available.
tools
Captures agent mistakes, corrections, and discovered gotchas so they are not repeated. Use when: (1) a command or operation fails unexpectedly, (2) the user corrects the agent, (3) the agent discovers non-obvious behavior through debugging, (4) an API or tool behaves differently than expected, (5) a better approach is found for a recurring task. Also searches past learnings before starting tasks to avoid known pitfalls. Activate alongside the sage-memory skill — they share the same MCP backend but serve different purposes (sage-memory = codebase knowledge, sage-self-learning = agent mistakes and gotchas).