From aide
Extracts candidate instinct patterns from session events and proposes them as durable memories. Two-pass: gather candidates, judge intent, rewrite proposals.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aide:reflectThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Extract candidate **instincts** — patterns repeatedly observed in this session
Extract candidate instincts — patterns repeatedly observed in this session that might be worth promoting to durable memories.
You propose, the user approves. Nothing this skill does writes a memory or marks anything superseded without an explicit yes from the user.
Detectors emit proposals into a holding bucket (they're never auto-promoted to memories). When this skill runs, your job is to make those proposals reviewable — to add the judgement that mechanical matching can't:
[DRAFT — rewrite…]
placeholder, never the finished memory.Then stop and ask. Surface each proposal to the user with your
recommendation. Wait for explicit approval before running
aide reflect accept|reject. The CLI is the write surface; your role is
to make the user's approval decision as well-informed as possible, not to
make it for them.
Concretely: do not chain "list proposals → accept proposals" in the same turn. List, summarise, recommend, wait, then act on user instruction.
The detector emits an observation ("cat was run 5 times in 1 minute").
That's a structural signal, not a useful memory. A useful memory captures:
The agent reviewing the proposal does this synthesis by reading the evidence snapshot. The detector can't — it only knows the count.
Bad memory (the raw template): "In this project, cat is run repeatedly.
Cache its output."
Good memory (after agent synthesis): "When investigating the aide
README for plugin/config questions, the file is stable per commit and the
config table sits around lines 11-25 — inject the slice via Read with
offset/limit instead of re-cat-ing the whole file."
The proposal's content field literally starts with [DRAFT — rewrite with concrete context before accepting] to make this obvious. If you accept
without rewriting, you've stored noise.
AIDE_REFLECT=1 env or reflect.enabled=true in
.aide/config/aide.json) runs aide reflect run automatically at session
end. Deterministic-only: marker matching for convergence, pure counting
for repetition. No supersession beyond structural instinct_key:* matches.All commands below default to the current session — aide finds it by
checking, in order: an explicit --session=<id> flag, the AIDE_SESSION_ID
env var (set by OpenCode automatically; not by Claude Code), then the
session of the most recent observe event. Pass --session=<id> to target
a specific session, or run ./.aide/bin/aide reflect current-session to
see what would be resolved.
./.aide/bin/aide reflect candidates
Returns JSON like:
{
"session_id": "abc123",
"guidance": "For each prompt, judge whether it was correcting...",
"asks": ["intent"],
"prompts": [
{
"id": "01JF...A",
"timestamp": "...",
"text": "no don't add async — it should stay sync",
"preceding_edit": "Edit src/api/users.ts",
"following_edit": "Edit src/api/users.ts",
"file_path": "src/api/users.ts"
}
]
}
If prompts is empty, skip to step 4 (deterministic run only).
For each prompt, judge its intent using the surrounding edit context:
corrective — the user was redirecting the assistant's last actionpositive — the user was affirming the assistant's last action ("perfect", "ship it", "lgtm")neutral — neither corrective nor affirming (e.g. a new task, a question)Build a JSON array:
[
{"id": "01JF...A", "intent": "corrective", "confidence": 0.95},
{"id": "01JF...B", "intent": "neutral"}
]
./.aide/bin/aide reflect run --llm \
--classifications-json='[{"id":"01JF...A","intent":"corrective"}]'
Returns a JSON summary: {"proposals_written": N, "shapes": {...}}.
The --llm flag puts the runner in LLM mode, which runs the RequiresLLM
detectors (convergence, friction) in addition to repetition. The Stop hook
never passes it, so those detectors only ever surface in this reviewed pass.
If step 1 returned no candidates, still run with --llm (not bare) so
friction and the marker-based convergence pass fire — only the LLM-graded
convergence intent is skipped:
./.aide/bin/aide reflect run --llm
mcp__plugin_aide_aide__instinct_proposals_list { "status": "open" }
Summarise each new proposal's summary field for the user. Don't act on
anything yet — let them decide.
This is where your judgement matters most. The structural auto-supersession
(same instinct_key:* tag) only catches instinct-on-instinct dedup. The
interesting case is when a new instinct contradicts a manually-set
memory the user wrote earlier — e.g. a "documentation standard: always run
rustdoc" memory being superseded by a new "rustdoc runs repeatedly, cache
it" instinct.
Mechanical matching can't catch that. You can. Process:
mcp__plugin_aide_aide__memory_search { "query": "<subject>" }--supersedes=Y?"For each proposal:
mcp__plugin_aide_aide__instinct_inspect.[DRAFT — …] template
text from the proposal; write a useful instinct from scratch.Proposal
01JF…(repetition,rustdoc× 7 in 5 min). Reading the evidence: 6 of the 7 calls wererustdoc --no-depschecking the same public crate while iterating on a doctest. I'd accept with this rewritten content and supersede memory01JD…("always run rustdoc") because the new guidance refines, not contradicts, that one:"When iterating on a single doctest,
cargo test --doc <module>re-runs only that doctest in ~1s; reserverustdoc --no-depsfor final pre-commit verification across all crates."Command:
aide reflect accept 01JF… --supersedes=01JD… \ --content="When iterating on a single doctest…"
Then wait. The user might say:
--content= and re-present--supersedesIf the evidence doesn't support a meaningful rewrite — e.g. the events are a test trigger, a one-off, a data artifact — recommend reject. A proposal with no useful synthesis is noise; promoting it pollutes the memory store.
Only after the user has chosen — writes are CLI-only per aide convention:
# Accept with rewritten content (the default — see step 7):
./.aide/bin/aide reflect accept <proposal-id> --content="<your synthesised memory>"
# Accept with rewritten content AND supersession:
./.aide/bin/aide reflect accept <proposal-id> \
--content="<your synthesis>" \
--supersedes=<mem-id1>,<mem-id2>
# Accept verbatim (the [DRAFT…] template lands as the memory — almost
# never what you want, included only for completeness):
./.aide/bin/aide reflect accept <proposal-id>
# Reject (with reason for the audit trail):
./.aide/bin/aide reflect reject <proposal-id> --reason="not useful"
Supersession unions two sources:
instinct_key:* tag (cheap dedup; same Bash command for repetition,
same file path for convergence).--supersedes) — IDs from step 6. Works for any
memory including manually-set ones with no instinct tags.Each superseded record gets superseded + superseded_by:<new-id> tags;
the new memory gets supersedes:<csv> pointing back. Superseded records
stay in the bucket for audit but are filtered out of default queries.
mcp__plugin_aide_aide__instinct_inspect { "id": "<ulid>" }
The evidence.snapshot array contains the observe events that triggered the
pattern.
export AIDE_REFLECT=1 # also: true, on, yes — any truthy value
When unset or set to a falsy value (0, false, off, no), the Stop hook
is a no-op. This skill still works regardless — it's manually invoked, not
gated by the env var.
Edit A → user corrective marker → Edit B on the same
file → optional positive signal. Marker-based by default, upgrades to
LLM-classified when intent labels are provided via step 3.Error field; the lesson worth keeping is usually the
fix, which you supply by reading the evidence. RequiresLLM — never
auto-fires in the Stop hook.Detectors declare a RequiresLLM capability — two tiers:
RequiresLLM=false: repetition) runs automatically
in the Stop hook. Must be high-precision; nothing reviews it before it lands
as a proposal.RequiresLLM=true: convergence, friction) runs only in this
reviewed pass, when the skill passes --llm (step 3/4). Higher recall is
fine — you judge each proposal before anything is promoted.npx claudepluginhub jmylchreest/aide --plugin aideCaptures high/medium/low confidence patterns from conversations to prevent repeating mistakes and preserve successes. Invoke proactively after corrections, praise, edge cases, or skill-heavy sessions.
Three-tier learning system that captures instincts (hypotheses), user corrections (permanent rules), and discoveries (insights) per project. Routes signals to the right store, manages confidence scoring, and supports export/import between projects.
Captures high/medium/low confidence learnings from conversations via triggers like corrections, praise, edge cases. Improves skills by preventing mistakes and preserving successes. Invoke proactively after 'no/wrong', 'perfect', or session ends.