reflect
Write a structured agent reflection for a goal packet. Trigger on: a goal's P3 Close phase, the user invoking `/reflect <goal-slug>`, or when you notice a TODO worth codifying. Produces a schema-valid
Files1
View on GitHubSKILL.md.claude/skills/reflect/SKILL.md
GitHubReflect
Use this skill to capture a durable, information-rich reflection on a goal
packet's execution. Reflections compound into reusable knowledge; the research
(goals/agent-reflection-loop/research/reflection-frontier-report.md) shows that
specific, structured reflections grounded in real tooling/CI signals far
outperform terse free-text advice.
When to run
- Automatic (P3 Close): the agent closing a goal packet writes one before
running
goals set-status <slug> completed-retainedin the final PR. That is the canonical completed status; legacycompleteis migration input, not a live lifecycle value. Packets withreflectionRequired: trueare gated, and a committed closeout also keeps the packet in the reflection gate. A missing or invalid required reflection blocks closeout. - On demand:
/reflect <goal-slug>— reflect on any packet now. - TODO codification: when you spot something that should become a standard,
skill, lint rule, or issue, capture it as a
codification-todofinding.
How to write one
- Resolve the goal slug. Read the packet's
SPEC.md,PLAN.md,README.md,history/, and the real execution evidence (PRs, CI runs, review threads, commits). Ground claims in that evidence — not unaided self-critique. - Copy
goals/_template/history/reflections/_TEMPLATE.mdtogoals/<slug>/history/reflections/<YYYY-MM-DD>-<agent>.md(today's date;<agent>lowercase, e.g.claude,codex). - Fill the YAML frontmatter — it is the machine-validated block
(
ReflectionFrontmatter):goal,agent,date(YYYY-MM-DD)trigger:closeout|on-demand|todo-codifyconfidence(overall):high|medium|lowfindings[]: each{ category, confidence, instruction, explanation }wherecategory∈tooling-friction|implementation-improvement|goal-critique|prompt-critique|codification-todo. Makeinstructionconcrete (what to change) andexplanationevidence-backed (why).todos[]: items worth codifying.
- Fill the body rubric: Summary, Tooling experience (worked / didn't / frustrating / wished existed), Implementation improvement opportunities, Goal & prompt critique (would you revise the GOAL/prompt to be clearer, easier, more efficient?), TODOs worth codifying, and Lessons (confidence-tiered: HIGH critical / MEDIUM best-practice / LOW consideration).
- Update packet
README.md(latest evidence) andops/manifest.jsonstatus.
Verify
bun run beep lint reflection-artifacts # blocking_findings=0
git diff --check -- goals/<slug>
Related skills
yeet— commit/push/PR after the reflection is written.quality-review-fix-loop— late-initiative closure + reviewer/fixer loop.