Help us improve
Share bugs, ideas, or general feedback.
From clarc
Explains agent evolution system: captures session instincts, promotes high-confidence ones to agent overlays via approval workflow, enables rollback, and drives continuous-learning flywheel.
npx claudepluginhub marvinrichter/clarc --plugin clarcHow this skill is triggered — by the user, by Claude, or both
Slash command
/clarc:agent-evolution-patternsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Agent evolution closes the continuous-learning feedback loop: validated instincts flow
Evolves existing agent definitions by refining persona/skills/tools in-place or creating advanced variants, assessing best practices, updating metadata, and syncing registry. Use for outdated skills, feedback gaps, tool changes, or scope sharpening.
Observes Claude Code sessions via hooks to create atomic instincts with confidence scores, evolves them into skills/commands/agents, adds project-scoped storage to isolate per-repo learnings.
Observes Claude Code sessions via hooks to create atomic project-scoped instincts with confidence scores, evolving them into skills, commands, or agents.
Share bugs, ideas, or general feedback.
Agent evolution closes the continuous-learning feedback loop: validated instincts flow from sessions into agent instructions, making agents smarter over time without touching the versioned agent files in the repo.
Use this skill when:
Without agent evolution:
Session → /learn-eval → instinct captured → instinct sits unused
Next session: same agent makes the same mistake again
With agent evolution:
Session → /learn-eval → instinct captured → /agent-evolution → overlay written
Next session: agent applies the instinct automatically
continuous-learning-v2
└── instincts/*.md (confidence scored, domain tagged)
|
| /agent-evolution (user-approved promotion)
v
~/.clarc/agent-instincts/
typescript-reviewer.md ← overlay with learned bullets
tdd-guide.md
code-reviewer.md
|
| session-start.js (automatic injection)
v
Claude session context
└── "When invoking typescript-reviewer, apply these instincts: ..."
## Learned Instincts (auto-generated — do not edit manually)
<!-- Last updated: 2026-03-10 by /agent-evolution -->
- Always flag direct DOM manipulation in React code (confidence: 0.85, learned: 2026-02-15)
- Check for missing useCallback on event handlers passed to memoized children (confidence: 0.78, learned: 2026-02-20)
Rules:
/agent-evolution to add, /instinct-outcome to remove~/.clarc/agent-instincts/ (user-local, not in the repo)| Domain | Target Agents |
|---|---|
typescript | typescript-reviewer, code-reviewer |
python | python-reviewer, code-reviewer |
golang | go-reviewer, code-reviewer |
rust | rust-reviewer, code-reviewer |
java | java-reviewer, code-reviewer |
ruby | ruby-reviewer, code-reviewer |
swift | swift-reviewer, code-reviewer |
testing | tdd-guide, e2e-runner |
security | security-reviewer, devsecops-reviewer |
architecture | architect, planner |
documentation | doc-updater |
performance | performance-analyst |
git | (applied globally via MEMORY.md, not per-agent) |
| (unknown) | code-reviewer (catch-all) |
/agent-evolution
Output:
Found 3 instincts ready for agent promotion (threshold: 0.75):
1. "Always flag direct DOM manipulation in React code"
Confidence: 0.85 | Domain: typescript | Learned: 2026-02-15
→ Proposed for: typescript-reviewer, code-reviewer
[A]pply / [S]kip / [E]dit before applying
2. "Check useCallback on event handlers passed to memo children"
Confidence: 0.78 | Domain: typescript | Learned: 2026-02-20
→ Proposed for: typescript-reviewer
[A]pply / [S]kip / [E]dit before applying
/agent-instincts typescript-reviewer
Output:
Overlay for typescript-reviewer:
- Always flag direct DOM manipulation in React code (confidence: 0.85, learned: 2026-02-15)
- Check for missing useCallback on event handlers passed to memoized children (confidence: 0.78, learned: 2026-02-20)
At session start, session-start.js reads all overlay files and outputs them to Claude:
--- Agent Learned Instincts ---
When invoking these agents, apply the following learned instincts:
### typescript-reviewer
## Learned Instincts (auto-generated — do not edit manually)
<!-- Last updated: 2026-03-10 by /agent-evolution -->
- Always flag direct DOM manipulation in React code (confidence: 0.85, learned: 2026-02-15)
---
Log: [SessionStart] Agent instinct overlays loaded: typescript-reviewer (2 instincts), tdd-guide (1 instinct)
If an instinct makes an agent worse:
1. /instinct-outcome <id> bad --reason "Made typescript-reviewer too aggressive"
→ Confidence drops below 0.75 promotion threshold
2. /agent-evolution
→ Low-confidence instinct appears as removal candidate
3. User confirms removal
→ Instinct removed from overlay file
Or remove directly without going through the promotion flow:
node scripts/agent-evolution.js remove typescript-reviewer "Always flag direct DOM"
| Threshold | Effect |
|---|---|
| 0.9 | Only near-certain patterns (very conservative) |
| 0.75 | Default — good balance |
| 0.6 | More candidates, higher noise risk |
| 0.5 | Exploratory — review carefully before applying |
/agent-evolution so metadata is tracked/agent-instincts)git domain instinct to agents — git instincts apply globally via MEMORY.mdnode scripts/agent-evolution.js list [--threshold 0.75]
node scripts/agent-evolution.js apply <agent> "<text>" --confidence 0.80 --learned YYYY-MM-DD
node scripts/agent-evolution.js show [<agent>]
node scripts/agent-evolution.js remove <agent> "<prefix>"
/agent-evolution — interactive promotion workflow/agent-instincts <name> — show current overlay content/instinct-outcome <id> bad — roll back a promoted instinct/evolve — cluster instincts into new skills/commands/agents (different from agent overlays)/instinct-status — view all captured instincts with confidence scores