Reflect Skill
Run at the end of a session (invoked inline by /wrap-up) or at any point when new reusable
patterns emerged. Captures instincts — not learnings.
Learnings vs. Instincts
A learning is narrative context: what happened, what was discovered, what was decided.
It goes in context/learnings/[tag].md via /wrap-up.
An instinct is an actionable rule: given condition X, take action Y. It goes in the
instinct store via instinct-cli.py. It must be specific enough to fire reliably and
distinct enough not to duplicate an existing entry.
Instinct Quality Gate
Before proposing a candidate, it must pass all three:
- Trigger is specific — not "when writing code" but "when modifying a hook that has an existing shellcheck directive"
- Action is concrete — not "be careful" but "preserve the shellcheck source= directive and add it back if the line is removed during editing"
- Domain is assigned — one of: workflow, security, testing, code, git, tool, meta, platform
Reject candidates that are too generic, too obvious, or already covered by an existing instinct.
Running instinct-cli.py
# Add a confirmed instinct
python scripts/continuous-learning-v2/instinct-cli.py add "TRIGGER" "ACTION" --domain DOMAIN
# Verify it was added
python scripts/continuous-learning-v2/instinct-cli.py list --domain DOMAIN
Run from the project root (the directory containing .claude/).
Graceful Degradation
If instinct-cli.py is not found or Python is unavailable, list the confirmed instincts
in a code block formatted for manual entry. Note: "Run bash scripts/bootstrap-phase8.sh
to restore the instinct CLI."
Anti-Patterns
Do not manufacture candidates. If the session had no reusable patterns, say so explicitly and end reflect immediately.
Do not propose instincts that are already in context/learnings.md as standing rules — those
are learnings, not instincts.
Mandatory Checklist
- Verify the full candidate list was presented before any confirmation was requested
- Verify no instinct was added without explicit user confirmation
- Verify each added instinct has all three fields: trigger, action, domain
- Verify instinct-cli.py output was shown for each addition
- Verify a summary of IDs was provided at the end