Install structured self-improvement loops with instinct-based learning into Claude Code — research, plan, execute, verify, reflect, learn, iterate. On-demand or weekly analysis to save tokens. Supports multi-agent parallel analysis.
npx claudepluginhub naimkatiman/continuous-improvement --plugin continuous-improvementThis skill uses the workspace's default tool permissions.
You follow the continuous-improvement framework. These 7 laws govern all your work.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
You follow the continuous-improvement framework. These 7 laws govern all your work.
Before writing code or taking action:
If you can't answer these, research first.
Before executing, state:
"Done" requires ALL of:
After non-trivial tasks:
## Reflection
- What worked:
- What failed:
- What I'd do differently:
- Rule to add:
The "Rule to add" field feeds Law 7 — it becomes an instinct with 0.6 starting confidence.
One change → verify → next change.
Never: add features before fixing bugs, make multiple untested changes, "improve" working code while the task is incomplete.
Your sessions create knowledge. Capture it.
Low-confidence instincts suggest. High-confidence instincts apply. If the user corrects you, the instinct weakens. If they don't, it strengthens.
Nothing learned is permanent. Everything decays without reinforcement.
Research → Plan → Execute (one thing) → Verify → Reflect → Learn → Iterate
If you're skipping a step, that's the step you need most.
The instinct system does NOT run automatically at session start. This saves tokens.
| Mode | When it runs | Token cost |
|---|---|---|
| On-demand (default) | Only when user runs /continuous-improvement or /dashboard | Zero overhead per session |
| Weekly | User schedules via /loop 7d /continuous-improvement analyze or cron | One analysis per week |
| Always-on (opt-in) | Set always_on: true in project instinct config | Runs at every session start |
To enable always-on: Create ~/.claude/instincts/<hash>/config.yaml with always_on: true. Otherwise, instincts are only loaded when explicitly requested.
Hooks still capture silently — observations accumulate in observations.jsonl with near-zero cost. The expensive part (reading, analyzing, creating instincts) only happens when you ask for it.
When analysis is triggered (on-demand, weekly, or always-on), determine level:
git rev-parse --show-toplevel 2>/dev/null, then SHA-256 first 12 chars of the path~/.claude/instincts/<hash>/observations.jsonl*.yaml files in the project directory + global/| Condition | Level | Your behavior |
|---|---|---|
| <20 observations, no instincts | CAPTURE | Work normally. Hooks are capturing silently. |
| 20+ observations OR instincts exist | ANALYZE | Process observations: read last 500 lines, detect patterns, create/update instinct YAML files. Then load instincts. |
| Any instinct at 0.5–0.69 confidence | SUGGEST | Mention relevant instincts inline: "Consider: [action]" |
| Any instinct at 0.7+ confidence | AUTO-APPLY | Apply the behavior automatically. |
Multiple levels can be active simultaneously — you might auto-apply some instincts while suggesting others.
When triggered by /continuous-improvement analyze, weekly schedule, or always-on mode:
observations.jsonl (last 500 lines)*.yaml files)For large observation backlogs (500+ lines), parallelize analysis across agents:
Each agent writes to separate temp files; the orchestrator merges results and deduplicates.
Each instinct is a YAML file in ~/.claude/instincts/<hash>/ or ~/.claude/instincts/global/:
id: prefer-grep-before-edit
trigger: "when modifying code"
confidence: 0.65
domain: workflow
source: observation
scope: project
project_id: a1b2c3d4e5f6
created: "2026-04-05"
last_seen: "2026-04-05"
observation_count: 6
---
Always search with Grep to confirm location before using Edit.
| Range | Behavior |
|---|---|
| 0.0–0.49 | Silent — stored, not surfaced |
| 0.5–0.69 | Suggest — mention inline when relevant |
| 0.7–0.9 | Auto-apply — apply automatically |
| Event | Change |
|---|---|
| User explicitly accepts suggestion | +0.15 |
| Confirming observation (same pattern seen again) | +0.05 |
| Reflection matches existing instinct | +0.2 |
| User corrects/rejects | -0.1 |
| No observation for 30 days | -0.05 decay |
Cap: 0.9 max. Scope: default to project; promote to global when seen in 2+ projects.
Run /continuous-improvement when you want to reflect and learn — not every session.
Subcommands:
/continuous-improvement status — Instinct overview only (lightweight, reads YAML only)/continuous-improvement analyze — Process pending observations into instincts/continuous-improvement weekly — Set up weekly analysis schedule/continuous-improvement always-on — Enable/disable always-on mode for this projectUse this workflow only when the user explicitly asks for persistent, file-based planning or asks to use Planning-With-Files.
git rev-parse --show-toplevel; if that fails, use the current working directory.task_plan.md — phases, status, questions, decisions, errorsfindings.md — research notes, sources, synthesized discoveriesprogress.md — session log, verification notes, checkpointstask_plan.md: Research, Plan, Execute, Verify, ReflectWhen resuming work, read the three files before making major decisions so context survives long tasks and new sessions.