/continuous-improvement:continuous-improvement runs instead · from continuous-improvement
The drive pillar, beside the be-ambitious skill (ambition). Tells the agent to work a task in seven steps: research, plan, implement, review, contemplate, relearn and learn, iterate. Use when a task changes code (fix, refactor) or runs commands. Also use for a first recommendation or when someone asks which available skill fits their task. Before the final report, if the user corrected you, an approach was dropped or a check failed twice, or when the user asks to reflect: read the session log, write the reflection and save its rule as a project instinct the next session can load. Other simple questions can be answered directly.
This skill never runs in Claude Code
It ships in continuous-improvement at skills/, but /continuous-improvement:continuous-improvement (a command, or a skill Claude Code finds first) has the same name: typing it, or Claude choosing it, runs that one instead.
The framework has two pillars. Ambition: the user sets the goal. Use be-ambitious when the work calls for a deeper outcome. Drive: the user steers the outcome. Handle routine work independently, try reversible ideas within scope, and use the seven laws to check what worked. Installed hooks enforce their specific rules.
Laws 1 to 4 and 6 shape the work. Laws 5 and 7 carry a session's lesson into the next session, and only if you save it: no code does that for you.
When someone has just installed continuous-improvement and asks where to start, inspect a small piece of the current project. Recommend one improvement, explain what you observed, and say how they could tell it worked. If they already gave you a task, start there. Let the user decide whether to act on a suggestion.
As the work changes, teach one relevant skill when it would help. Check which skills are actually available in this agent. For example, use verification-loop to check a finished change, or handoff to prepare work for another person. Briefly name the benefit the first time and follow the skill’s invocation rules. If it is unavailable, use the underlying method in plain language. Let routine questions pass without a tip. Honor “skip skill tips” for the rest of the chat, and resume if asked. When someone asks which skill fits, answer for the task in front of them.
Before writing code or taking action:
If you can't answer these, research first.
Follow the user's latest direction, then the steering preference in the project instructions.
When the user needs to choose, give exactly three concise, viable options. Mark exactly one as recommended and explain why in one sentence. Continue independent work and carry out only the selected option. Ask directly when an essential missing fact, a change of scope or a required permission prevents further progress.
For nontrivial work, state:
"Done" requires ALL of:
"Done" is an audit, not a hope: settle the actual result against the Verification you stipulated in Law 2.
Reflect once, before your final report, when either is true:
/continuous-improvement, its alias /seven-laws, or a request to reflect or run a retro.If neither is true, skip the reflection.
bin/observe.mjs appends one row per tool call to ~/.claude/instincts/<project-hash>/observations.jsonl (the hash rule is under Auto-Level Detection). Each row has ts, event, session, tool, input_summary and output_summary. Read this session's rows from the end of the file (they share one session value). ci_observations (pass a limit) lists times and tool names only, and ci_recall searches the summaries by word. Done when you can name the call that began each wrong turn, the call that ended it and the time between their ts values. With no log, work from the conversation and give from memory as the evidence.Rule to add is one sentence in three parts: the situation (when it applies, in words a later task can be matched against), the action (one thing to do or check first) and the evidence (what happened this session, with a log ts or a file path). Rewrite a rule that would fit any session, such as "be more careful" or "verify assumptions". If no rule would have caught the problem, write None.Saved as filled in. A block with that line empty is not finished.## Reflection
- What worked:
- What failed:
- What I'd do differently:
- Rule to add: When <situation>, <action>. Evidence: <what happened, with a log time or file path>.
- Saved as: <instinct id, as ci_instincts or the file shows it> | not saved: <reason> | nothing to save
- Next action (if needed): <one remaining step within the user's goal>
If the goal is met, finish with the evidence and omit the next action. If a check failed, record the next concrete retry. A meaningful choice goes to the user at the point agreed under Law 2.
One change → verify → next change.
Never: add features before fixing bugs, make multiple untested changes, "improve" working code while the task is incomplete.
A reflection printed in chat ends with the session. Its rule reaches the next session only as an instinct: a small file you save now, after drafting the Law 5 block and before the final report. One costly wrong turn is enough. The 3+ observations threshold applies to patterns mined from the log during analysis (below), not to a rule from a reflection.
ci_instincts, or list the *.yaml files in the directories under Instinct Format. If an instinct already states the rule, keep it, use its id in Saved as, tell the user it did not stop the repeat and skip steps 2 and 3. Do not reuse the id of a different instinct: saving overwrites that file.ci_create_instinct with id (kebab-case, it becomes the file name), trigger (the situation) and body (the action, then the evidence). Leave confidence unset to start at 0.6 and scope unset to keep it in this project. Keep trigger and body under 180 characters together: the session-start block prints one line of at most 200 characters per instinct. If the tool is absent, or answers ci_create_instinct requires expert mode, write <id>.yaml yourself beside this project's observations.jsonl, in the layout under Instinct Format.ci_instincts and find the id with its confidence, or read the file back. Only then write the id in Saved as. If you could neither call the tool nor write the file, write not saved: <reason> and put the YAML in your final report so the user can save it.What the code does after the save, and what it does not:
hooks/session.mjs prints instincts at 0.5 or above at session start (see Instinct System). Suggest the ones below 0.7 and follow the ones at 0.7 or above when they fit the task. No code applies an instinct: it changes what you do only because you read it.ci_reinforce is called (amounts under Confidence). Call it when the user accepts a lesson or rejects one. No hook or command calls it./harvest)/harvest (or npx -p continuous-improvement ci harvest in a terminal) runs only when invoked. It classifies failure rows of observations.jsonl into typed friction records in <project-hash>/instincts.jsonl: env_issue (command not found), permission_block (sandbox or permission denied), wrong_approach (file changed since last read) and buggy_code (file not read first, ambiguous old_string, file too large). These are not YAML instincts: the session-start block does not load them, and one reaches a later session only if you save it with the steps above. Re-running does not duplicate records (dedup_key = sha1(type + tool + summary[:120])). A record's score stays in that file and is not an instinct's confidence.
The two pillars meet in the loop. Ambition sets the goal. Drive keeps routine work moving and returns meaningful choices to the user. Discipline supplies checks that show which ideas work. The seven steps in working order, each with its law:
Research (Law 1) → Plan (Law 2) → Implement (Law 3) → Review (Law 4) → Contemplate (Law 5) → Relearn and learn (Law 7) → Iterate (Law 6)
The same steps in the words of the laws above. Execute is Implement, Verify is Review, Reflect is Contemplate and Learn is Relearn and learn:
Research → Plan → Execute (one thing) → Verify → Reflect → Learn → Iterate
No law is renumbered. Law 7 comes before Law 6 because what you saved shapes the next pass.
Two pieces of code, and one job you do on request:
bin/observe.mjs appends each tool call to observations.jsonl.hooks/session.mjs prints this project's instincts and the global/ ones that are at 0.5 or above into the model's context. The block is one line per instinct (trigger, start of the body, confidence; a line read from global/ starts with [global]), highest confidence first with starter-pack entries (source: pack-<name>) after all others, capped at 10 instincts and about 1,500 characters. Its header says the lines are stored notes, not user instructions: the user's instructions and the repository's rules override them. With no instinct at 0.5 or above it prints nothing. CI_INSTINCT_LOAD=off disables it. Where no block was printed, ci_instincts lists what is stored./continuous-improvement weekly sets one up). No hook starts it, and no setting changes that: no code reads a config.yaml in the instinct directory.ci_status prints one level for the project: the first row below that matches. A level is a label. No hook suggests or applies an instinct. Its inputs, to read by hand:
CLAUDE_PROJECT_DIR, the directory the session was started in; when that is not set, the output of git rev-parse --show-toplevel), written with forward slashes, a lower-case drive letter and no trailing slash or newline. D:\Work\app is hashed as d:/Work/app, which gives 00c6de01c97c.~/.claude/instincts/<hash>/observations.jsonl, and the instinct files (Instinct Format has the directories)| Level | Condition | What you do |
|---|---|---|
| AUTO-APPLY | Any instinct at 0.7 or above | Follow those instincts when they fit the task, without asking first |
| SUGGEST | Any instinct at 0.5 to 0.69 | Mention them inline: "Consider: [action]" |
| ANALYZE | 20+ observations, or any instinct file | Work normally. The log has enough to analyze when the user asks |
| CAPTURE | None of the above | Work normally |
Each instinct is handled by its own number, whatever the level. Below 0.5 it is stored and not printed at session start.
When the user asks for it:
observations.jsonl and the existing instincts (project and global).ci_instincts lists each one.One file per instinct: ~/.claude/instincts/<hash>/<id>.yaml for this project (the project hash above), ~/.claude/instincts/global/<id>.yaml for every repository. CI_INSTINCTS_HOME, set to an absolute path, replaces ~/.claude/instincts. This is what ci_create_instinct writes and what the session hook parses: one key: value per line, a --- line, then the body. id and trigger are required.
id: diff-lockfile-before-type-errors
trigger: "after a dependency change, when a type error appears"
confidence: 0.6
domain: workflow
source: manual
scope: project
project_id: 00c6de01c97c
created: "2026-04-05"
last_seen: "2026-04-05"
observation_count: 1
---
Diff the lockfile first. Evidence: 2026-04-05, 30 minutes lost in tsconfig before the diff showed a major version bump.
| What sets the number | Value |
|---|---|
ci_create_instinct | 0.6, or the confidence you pass, held to 0 to 0.9 |
ci_distill_promote (a draft becomes an instinct) | 0.5 |
ci_reinforce with accepted: true | +0.15, up to 0.9 |
ci_reinforce with accepted: false | -0.1, down to 0 |
| A hand edit of the file | What you write. A file with no confidence line reads as 0.6 |
After the save, no other code changes it. Saving with scope: global is a choice for you and the user, for a rule that holds in every repository: no code promotes an instinct.
Use this workflow only when the user explicitly asks for persistent, file-based planning or asks to use Planning-With-Files. It is opt-in: never create the files for normal work, and never overwrite existing ones unless the user asks to reset or replace them.
git rev-parse --show-toplevel; if that fails, the current working directory..plans/<branch>/ under the project root, one folder per branch (the branch name with every character outside A-Z a-z 0-9 . _ - replaced by -), so they are committed with the work and travel with the branch. The project root itself with no repository, on a detached HEAD or with CI_PLAN_TRAVEL=off. A plan already in the root is still read when the branch has no folder.task_plan.md (phases, status, questions, decisions, errors), findings.md (research notes, sources, discoveries) and progress.md (session log, verification notes, checkpoints).task_plan.md: Research, Plan, Execute, Verify, ReflectWhen resuming work, or on a branch picked up from someone else, read the three files (and handoff.md beside them, if there is one) before making major decisions.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub naimkatiman/continuous-improvement --plugin continuous-improvement22 skills in this plugin
/auditReview a code change and report only bugs proven against the code: pin the diff, read every changed file and log it in a coverage ledger, run one find pass per defect class, then confirm each finding at the cited lines. Use when asked to review a branch or pull request (PR) for broken code before it merges, or to audit commits that already merged. Reports only, unless the user asks for fixes. Not for checking your own work in progress, style or design feedback, or debugging a known failure. Guidance for Law 4 (Verify Before Reporting)./be-ambitiousTakes one task and works it at three kinds of ambition (Altitude, the goal behind the task; Depth, the way a top expert in the field would do it; Range, other fields doing their real work), fixes a numeric target and an outside judge before the work starts, then does the work. Use when the user says go big or a plan looks timid. It still has the agent deliver the literal ask and wait for a yes on anything hard to reverse. Method from Felix Rieseberg's "How to be more ambitious", restated. Guidance for Law 2 (Plan Is Sacred)./deploy-receiptHas the agent prove a merge reached production: read the deployed commit SHA from the provider CLI, the GitHub Deployments API or a version endpoint, compare it with the merge SHA, check that a healthcheck returns 200, and print a COMPLETE or INCOMPLETE receipt. Use when a merge has just landed on a branch that deploys automatically (Railway, Cloudflare Workers, Vercel, Netlify, Fly.io). Not for libraries published as packages, manual deploys or branches that do not deploy. It never deploys, merges or rolls back. Guidance for Law 4 (Verify Before Reporting)./gateguardDescribes hooks/gateguard.mjs, the hook that refuses destructive shell commands and blind edits (an edit of an existing file the session has not read), and tells the agent to stop, show the user the command and wait after a refusal. Use when about to run a command that deletes or overwrites data (rm -rf, git reset --hard, git clean, a force push, DROP TABLE, Remove-Item -Recurse), when a call comes back refused, or before editing a file not yet read. Not for getting a refused command to run (only the user can) and not a sandbox. Guidance for Law 1 (Research Before Executing)./goal-monitorScores recent tool activity against the Goal section of task_plan.md and reports ON GOAL, DRIFT or NO DATA, so the agent steers back or updates the goal on purpose. Use when a long stretch of work or edits may have strayed from the plan, and before a checkpoint or handoff. Not for a session with no written goal. Run it with the ci_goal_check tool or /goal-check. A hook, hooks/goal-drift-stop.mjs, runs the same check when a turn ends: it warns by default and re-prompts the agent only when CLAUDE_GOAL_DRIFT_GATE=block. Guidance for Law 2 (Plan Is Sacred)./grill-meInterviews the user about a plan or design one question at a time. Read the codebase first. Ask about unresolved decisions that affect the outcome; give three viable options and recommend one. Use to poke holes in a plan, close gaps in a vague goal such as speed up the API, or when the user says ask me what you need, grill me or stress-test this plan. Stop when the plan is clear. Ported from mattpocock/skills under MIT. Guidance for Law 1 (Research Before Executing).