Use when extracting reusable patterns from sessions into instincts with confidence scoring for cross-session learning
From superpowers-eccnpx claudepluginhub aman-2709/superpowers-ecc --plugin superpowers-eccThis skill uses the workspace's default tool permissions.
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
A learning system that turns Claude Code sessions into reusable knowledge through atomic "instincts" -- small learned behaviors with confidence scoring.
An instinct is a small, atomic learned behavior stored as JSON:
{
"id": "prefer-functional-style",
"trigger": "when writing new functions",
"action": "Use functional patterns over classes when appropriate",
"confidence": 0.7,
"domain": "code-style",
"evidence": [
"Observed 5 instances of functional pattern preference",
"User corrected class-based approach to functional on 2026-01-15"
],
"created_at": "2026-03-22T10:00:00Z",
"updated_at": "2026-03-22T12:00:00Z"
}
Properties:
Session Activity
|
| SessionStart / Stop hooks capture session boundaries
| via session-start.js and session-end.js
v
+---------------------------------------------+
| ~/.claude/superpowers-ecc/sessions/ |
| <session-id>.json (session summary) |
| index.json (session registry) |
+---------------------------------------------+
|
| /learn command analyzes session patterns
v
+---------------------------------------------+
| PATTERN DETECTION |
| * User corrections -> instinct |
| * Error resolutions -> instinct |
| * Repeated workflows -> instinct |
+---------------------------------------------+
|
| Creates/updates via state/store.js
v
+---------------------------------------------+
| ~/.claude/superpowers-ecc/instincts/ |
| <instinct-id>.json (individual instincts) |
| index.json (registry + scores) |
+---------------------------------------------+
|
| /evolve clusters related instincts
v
+---------------------------------------------+
| Evolved artifacts (skills/commands/agents) |
+---------------------------------------------+
All state lives under ~/.claude/superpowers-ecc/ as JSON files managed by state/store.js:
~/.claude/superpowers-ecc/
+-- instincts/
| +-- <instinct-id>.json # Individual instinct files
| +-- index.json # Registry with confidence scores
+-- sessions/
| +-- <session-id>.json # Session summaries
| +-- index.json # Session history
+-- config.json # Global configuration
Store API (from state/store.js):
store.read('instincts/<id>.json') -- read an instinctstore.write('instincts/<id>.json', data) -- write an instinct (atomic)store.list('instincts') -- list all instinct filesstore.delete('instincts/<id>.json') -- remove an instinctstore.generateId() -- create a UUID for new instincts| Command | Description |
|---|---|
/instinct-status | Show all instincts grouped by domain with confidence scores |
/evolve | Cluster related instincts into skills, commands, or agents |
/instinct-export | Export instincts to a portable JSON file |
/instinct-import <file> | Import instincts from an exported file |
/learn | Analyze the current or recent session and extract instincts |
/learn-eval | Evaluate what the system has learned; review instinct quality |
/instinct-statusRead all instinct files from ~/.claude/superpowers-ecc/instincts/. Display grouped by domain, sorted by confidence. Show:
/learnAnalyze the current session (or a specified session from sessions/) for patterns:
For each pattern found:
store.write('instincts/<id>.json', instinct)instincts/index.json with the new entry/evolveCluster related instincts and propose evolution:
/learn-evalReview the quality of learned instincts:
/instinct-exportExport instincts to a JSON file:
{
"exported_at": "2026-03-22T12:00:00Z",
"instincts": [ ... ]
}
Filterable by domain or minimum confidence threshold.
/instinct-import <file>Import instincts from an exported file:
Confidence evolves over time:
| Score | Meaning | Behavior |
|---|---|---|
| 0.3 | Tentative | Suggested but not enforced |
| 0.5 | Moderate | Applied when relevant |
| 0.7 | Strong | Auto-approved for application |
| 0.9 | Near-certain | Core behavior |
Confidence increases when:
Confidence decreases when:
Use domain tags to categorize instincts:
| Domain | Examples |
|---|---|
code-style | "Use functional style", "Prefer const over let" |
testing | "Write tests first", "Use table-driven tests" |
git | "Conventional commits", "Small focused commits" |
debugging | "Grep before Edit", "Read before Write" |
workflow | "Always handle errors", "Validate user input" |
security | "Sanitize SQL", "Never commit secrets" |
tooling | "Use ripgrep over grep", "Prefer Edit over Write" |
Instincts are the atomic unit. They evolve into larger structures:
Instincts (atomic behaviors)
|
| cluster by domain + relatedness
v
Clusters (3+ related instincts)
|
| evolve into one of:
v
+-- Skills (SKILL.md -- process documentation)
+-- Commands (slash commands -- automated workflows)
+-- Agents (agent definitions -- specialized assistants)
The /evolve command guides this process. Only instincts with confidence >= 0.5 are candidates for evolution.
Session data is captured at session boundaries (not per-tool-use):
session-start.js (SessionStart hook) -- records session start time and contextsession-end.js (Stop hook) -- records session summary, duration, and key actionsSession files are stored in ~/.claude/superpowers-ecc/sessions/ and serve as the raw material for the /learn command.
Instinct-based learning: teaching Claude your patterns, one session at a time.