Instinct System
One learning system, three tiers. Every signal Claude receives during work — an observed pattern, a user correction, a surprising discovery — routes to exactly one store.
Core Principles
-
Three tiers, one routing decision — Instincts are unconfirmed hypotheses (
.claude/instincts.md). Corrections are user-confirmed rules (MEMORY.md). Discoveries are insights that explain the world (.claude/learning-log.md). Rules prescribe behavior; insights describe it; instincts are rules-in-waiting. Never mix the tiers — a hypothesis in MEMORY.md pollutes permanent knowledge, and a confirmed rule left as an instinct gets forgotten. -
Instincts are hypotheses, not rules — An instinct starts as a guess from a single observation and has no authority until confirmed. "One handler uses
sealed" is an instinct at 0.3; "all 12 handlers usesealed" is a rule at 0.9. Confidence (0.3–0.9) drives behavior: note at 0.3, mention at 0.5, follow at 0.7, promote at 0.9. -
A user correction is a confirmed instinct at full confidence — When the user corrects you, skip the confirmation cycle entirely. Generalize the lesson, capture it immediately in MEMORY.md with the "why", and confirm what was captured. A correction costs the user 30 seconds today and saves hours across all future sessions — losing one is the most expensive mistake this system can make.
-
Project-scoped, never global — What holds in one codebase may be wrong in another. Instincts live per-project; transfers between projects go through export/import with confidence decay, never at full confidence.
-
Review at session start, prune periodically — Read MEMORY.md and load instincts at 0.7+ before writing any code; scan recent log entries for the working area. Knowledge captured but never reviewed is wasted effort. Audit all three stores when they bloat — stale instincts, duplicate rules, and unreviewed logs defeat the purpose.
Patterns
Tier Routing
Instinct Lifecycle (Observe-Hypothesize-Confirm)
Instinct Storage Format
.claude/instincts.md, grouped by category with structured metadata:
Category header [0.7] = average confidence. Standard categories: Code Style, Architecture, Naming, Testing, Data Access, API Design, Configuration, Performance, Tooling.
Confidence Adjustment Rules
No ad-hoc scoring. Follow this track precisely:
Acting on Instincts by Confidence
Never silently apply an instinct below 0.7.
Correction Capture Flow (Tier 2)
When the user corrects your output ("no, use X instead", "we don't do it that way", "always/never do X", "remember this"):
MEMORY.md format — same categories as instincts, one actionable rule per line:
Discovery Logging (Tier 3)
Log organic findings to .claude/learning-log.md the moment they occur — a 2-line entry written immediately beats a paragraph reconstructed later. Entry format:
Log when (and only when) you hit one of these triggers:
Those six trigger names are also the category vocabulary — use them verbatim in entries. Routine changes with nothing surprising do not get logged.
Session-Start Loading
Modes
Three operations on the instinct store, invoked by name or trigger phrase.
Status ("show instincts", "what have you learned", "list instincts")
- Read
.claude/instincts.md; parse each entry's metadata. - Sort by confidence descending, group by category, render as a table: instinct | confidence | category | status (new / stable / reinforced / decaying / promotion candidate).
- Summarize health: total count, average confidence, recently reinforced vs decaying entries, any conflicting instincts.
Export ("export instincts", "share instincts")
- Read
.claude/instincts.md; filter to confidence > 0.7 (threshold configurable). - Strip project-specific context (file paths, line numbers) while preserving the pattern itself.
- Write to
.claude/instincts-export.mdwith portable metadata. - Report what was exported and what was skipped (below threshold), with the output path.
Import ("import instincts", "load instincts from")
- Read the export file (user-provided path or
.claude/instincts-export.md) and the current.claude/instincts.md. - Merge each imported instinct:
- No local match — add with confidence decayed by 0.2 (0.9 → 0.7); never import above 0.7. Mark
source: imported from [project]. - Matching instinct exists — keep the higher confidence, mark reinforced.
- Conflicting instinct exists — present both to the user for resolution; do not auto-overwrite local evidence.
- No local match — add with confidence decayed by 0.2 (0.9 → 0.7); never import above 0.7. Mark
- Write the merged result and report imported / merged / conflicts. Every project must confirm imported patterns locally.
Anti-patterns
Over-Eager Pattern Recognition
Fixing Without Capturing
Logging Everything
Write-Only Stores
Decision Guide
Related
convention-learner— detects codebase conventions in bulk; feed its findings in as instinctswrap-up— end-of-session ritual; routes session learnings into the correct tier of this system


