16 coding agents REV 3.28.0

Aim high. Stay in control.

Two pillars and one working loop for the coding agent you already use. Research, plan, implement, review, contemplate, relearn and learn, iterate.

  • Ambition. You have big goals.The be-ambitious skill tells the agent to work on the goal behind the task, with a target and a check set before it starts. It is guidance the agent reads. No hook checks that it was followed. What it tells the agent
  • Discipline. You control the AI.With the hooks installed, hooks/gateguard.mjs refuses destructive commands and blind edits (an edit of an existing file the session has not read) before they run. bin/observe.mjs logs each tool call that runs, on your machine. Stricter gates are switches you set. What you control
npx continuous-improvement install --target <agent> --hooks

Run it in your project's git repository. It installs the hooks for that agent, and writes or prints the MCP server step. <agent> is the agent's id: every id is in the agent table. Add --dry-run to list every write first.

/plugin marketplace add naimkatiman/continuous-improvement/plugin install continuous-improvement@continuous-improvement

Claude Code installs it as a plugin. Run both inside Claude Code, then restart it once.

Seven steps. Each one says what backs it.

One working loop, in the order the work happens. Each step restates one of the 7 Laws, the rules in the core skill (continuous-improvement) that every agent in the agent table gets. The mark beside it says what code backs it, and where it says None there is no code.

  1. ResearchRefuses by default

    Law 1, Research Before Executing · hooks/gateguard.mjs: an edit with no read

    What it is given, and what backs it
    The agent is given
    The rule: find what exists, the constraints and what can break before acting. Skills recall, reconcile, grill-me, roast. The ci_recall MCP tool searches the log when called.
    A hook
    hooks/gateguard.mjs denies an edit of an existing file when the session's log shows no read of it. It checks that one thing. Switch: CI_GATEGUARD_FILE_GATE=off.
    Default
    On after install
    Switch
    CI_GATEGUARD_FILE_GATE=off
  2. PlanOff until you switch it on

    Law 2, Plan Is Sacred · hooks/goal-drift-stop.mjs: Claude Code only

    What it is given, and what backs it
    The agent is given
    The rule: state what you will build, what you will not, how you will verify, and the fallback. be-ambitious tells the agent to set the goal and a target first. ci_plan_init writes task_plan.md, and ci_goal_check scores recent calls against its ## Goal.
    A hook
    hooks/goal-drift-stop.mjs with CI_GOAL_DRIFT_GATE=block sends a drifted wrap-up back. Shown to work on Claude Code only: it reads the reply from a Claude Code transcript. No hook requires a plan before the first edit.
    Default
    Warns only: a debug-log line, and the turn ends
    Switch
    CI_GOAL_DRIFT_GATE=block
  3. ImplementRefuses by default

    Law 3, One Thing at a Time · hooks/gateguard.mjs: destructive commands

    What it is given, and what backs it
    The agent is given
    The rule: finish and verify one task before the next. Skills tdd-workflow, ship, worktree-safety.
    A hook
    hooks/gateguard.mjs denies destructive commands on every matching call, with no switch. With CI_HOOKPACK_GATE=block, hooks/hook-pack.mjs denies a push to main, master or release/* and a commit staging more than 15 files. No hook checks "one thing at a time" itself.
    Default
    On after install
    Switch
    None
  4. ReviewOff until you switch it on

    Law 4, Verify Before Reporting · hooks/typecheck-stop.mjs: TypeScript only

    What it is given, and what backs it
    The agent is given
    The rule: done means the code ran and the result was checked. Skills verification-loop, simplicity-review, audit.
    A hook
    hooks/typecheck-stop.mjs with CI_TYPECHECK_GATE=block holds the turn open on a failing typecheck. TypeScript only, on the 12 agents with a Stop gate (a hook that runs when the agent ends its turn and can send it back). No hook runs tests, lint or a build. After the run, the transcript linter flags a code change with no test or build command.
    Default
    Off
    Switch
    CI_TYPECHECK_GATE=block
  5. ContemplateNone

    Law 5, Reflect After Every Session · a written rule, no hook

    What it is given, and what backs it
    The agent is given
    The reflection block: what worked, what failed, what to do differently, the rule to add, the next three moves. The ci_reflect MCP tool returns the template and stores nothing.
    A hook
    A written rule.
    Default
    No hook
    Switch
    None
  6. Relearn and learnRecords and loads

    Law 7, Learn From Every Session · bin/observe.mjs, hooks/session.mjs

    What it is given, and what backs it
    The agent is given
    Lessons you or the agent save with ci_create_instinct and strengthen or weaken with ci_reinforce. Skill skill-distillation.
    A hook
    bin/observe.mjs logs each tool call that runs. hooks/session.mjs prints up to 10 saved lessons at session start (CI_INSTINCT_LOAD=off stops it): by hook on 11 agents, through a rules file you rewrite on 4, not at all on 1. Nothing saves, applies or fades a lesson for you.
    Default
    On after install
    Switch
    CI_INSTINCT_LOAD=off
  7. IterateNone

    Law 6, Iterate Means One Thing · a written rule, no hook

    What it is given, and what backs it
    The agent is given
    The rule: one change, verify, next change. The three next moves from step 5 start the next pass.
    A hook
    Nothing in the session. After a run, the transcript linter flags more than 8 files edited.
    Default
    No hook
    Switch
    None
  • Refuses by default: a hook answers deny before the call runs Research, Implement
  • Off until you switch it on: the hook ships and refuses nothing until you set the variable Plan, Review
  • Records and loads: a hook writes a log row or prints saved lessons, and cannot refuse anything Relearn and learn
  • None: text the agent is given, and nothing checks it during the session Contemplate, Iterate

Reach, from the agent table: the skills go to all 16 agents, the core skill with these rules among them. Codex CLI, Gemini CLI, Cursor and GitHub Copilot CLI also load the rules as a rules file in every session. 12 have a Stop gate: the 10 full-tier agents, Grok CLI and Goose. Saved lessons load by hook on 11, through a rules file you rewrite on 4 (Grok CLI, Auggie, Junie CLI and Goose), and not on Cline.

Step 6 is the self-improvement step. The model does not change. What changes is what the next session starts with: a searchable log of what ran, and the lessons you kept. The law numbers are the package's own, so step 6 is Law 7 and step 7 is Law 6.

Pillar one. You have big goals.

be-ambitious is a bundled skill. One task goes in. It is guidance, and this is what it tells the agent to do.

  1. Climb. Write the ladder from the task you typed to the goal behind it, then work at the highest rung its data, its access and a check can reach.
  2. Go deeper. Use the instruments a professional in the field would use, starting from raw data.
  3. Bring other fields in. Name the fields with something to say about the task. Give each one activity and one output. One of them attacks the result.
  4. Set the bar before the work. A numeric target, a baseline, and a check that can fail and that the agent does not grade itself on.
  5. Report against it. What you asked for, what was delivered, baseline to result against the target, and what broke.

The skill carries its own rules, and they are text too. What you asked for is the floor, delivered in the form you asked for. A small task is answered directly, with none of this. Anything outward-facing or hard to reverse waits for your yes.

What it is
A skill: guidance the agent reads. No benchmark is claimed for it.
Where
A skill on every agent in the agent table. Ask for it by name. On Claude Code it is also the /be-ambitious command.
What backs it
No hook. No code checks that the agent followed it, and the skill cannot widen what the agent may run.
What holds the goal
You put the goal in task_plan.md under ## Goal. The ci_goal_check MCP tool scores recent tool calls against it: keyword overlap, not meaning.

The method restates Felix Rieseberg's essay How to be more ambitious (13 October 2026). The essay coaches people who prompt models. The skill has the agent apply it to its own work.

Pillar two. You control the AI.

The AI does not control you. That is the goal. Here is what you control today, in four parts.

  • Refusedhooks/gateguard.mjs denies destructive commands and blind edits before they run. On after install.
  • Loggedbin/observe.mjs writes one redacted row per tool call that runs, on your own disk.
  • SwitchesStricter gates wait for a variable you set: pushes to main, guardrail config, a failing typecheck. Every switch
  • Where it runsOn your machine, as Node processes. No model call, no network call. Each agent has its own condition: the agent table.

Replay a call captured from hooks/gateguard.mjs

One force push, refused in each agent's own format.

hooks/gateguard.mjs

git push --force origin main, sent by six agents to one hook file. Each agent's PreToolUse payload from fixtures/agent-matrix on stdin, one temp HOME.

The command in each agent's tool call

$ git push --force origin main
  • Denied: how each agent got it
  • Claude Code "permissionDecision":"deny"
  • Codex CLI "permissionDecision":"deny"
  • Gemini CLI "decision":"deny"
  • Cursor "permission":"deny"
  • GitHub Copilot CLI "permissionDecision":"deny"
  • Kiro CLI exit 2, reason on stderr
  • Allowed
  • git status all 6: exit 0, no output

Every reason names the rule that matched: Matched rule: git-push-force

Each agent's payload and reply, as captured

Claude Code

payload  {"session_id":"claude-session","transcript_path":"~/transcript.jsonl","cwd":"~/project","permission_mode":"default","hook_event_name":"PreToolUse","tool_name":"Bash","tool_use_id":"toolu_1","tool_input":{"command":"git push --force origin main"}}

$ node hooks/gateguard.mjs
{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"Destructive command requested: git push --force origin main\n\n  1. List ALL files/data this command will modify or delete\n  2. Write a one-line rollback procedure\n  3. Quote the user's current instruction verbatim\n\nMatched rule: git-push-force\nDestructive Bash gates EVERY call — clearance is not cached."}}
(stderr empty, exit 0)

Codex CLI

payload  {"session_id":"codex-session","transcript_path":null,"cwd":"~/project","hook_event_name":"PreToolUse","model":"gpt-5.5","permission_mode":"default","turn_id":"turn-1","tool_name":"Bash","tool_use_id":"call_1","tool_input":{"command":"git push --force origin main"}}

$ node hooks/gateguard.mjs --agent codex
{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"Destructive command requested: git push --force origin main\n\n  1. List ALL files/data this command will modify or delete\n  2. Write a one-line rollback procedure\n  3. Quote the user's current instruction verbatim\n\nMatched rule: git-push-force\nDestructive Bash gates EVERY call — clearance is not cached."}}
(stderr empty, exit 0)

Gemini CLI

payload  {"session_id":"gemini-session","transcript_path":"~/gemini-session.json","cwd":"~/project","hook_event_name":"BeforeTool","timestamp":"2026-11-21T11:08:00.000Z","tool_name":"run_shell_command","tool_input":{"command":"git push --force origin main","description":"run","dir_path":"."}}

$ node hooks/gateguard.mjs --agent gemini
{"decision":"deny","reason":"Destructive command requested: git push --force origin main\n\n  1. List ALL files/data this command will modify or delete\n  2. Write a one-line rollback procedure\n  3. Quote the user's current instruction verbatim\n\nMatched rule: git-push-force\nDestructive Bash gates EVERY call — clearance is not cached."}
(stderr empty, exit 0)

Cursor

payload  {"conversation_id":"cursor-conv","generation_id":"gen-1","model":"claude-opus-4-7-thinking-max","hook_event_name":"preToolUse","cursor_version":"3.20.17","workspace_roots":["~/project"],"user_email":"user@example.invalid","transcript_path":"~/cursor-transcript.jsonl","tool_name":"Shell","tool_input":{"command":"git push --force origin main","cwd":"~/project"},"tool_use_id":"abc123","cwd":"~/project","agent_message":"Running a command"}

$ node hooks/gateguard.mjs --agent cursor
{"permission":"deny","user_message":"Destructive command requested: git push --force origin main\n\n  1. List ALL files/data this command will modify or delete\n  2. Write a one-line rollback procedure\n  3. Quote the user's current instruction verbatim\n\nMatched rule: git-push-force\nDestructive Bash gates EVERY call — clearance is not cached.","agent_message":"Destructive command requested: git push --force origin main\n\n  1. List ALL files/data this command will modify or delete\n  2. Write a one-line rollback procedure\n  3. Quote the user's current instruction verbatim\n\nMatched rule: git-push-force\nDestructive Bash gates EVERY call — clearance is not cached."}
(stderr empty, exit 0)

GitHub Copilot CLI

payload  {"sessionId":"copilot-session","timestamp":1763712000000,"cwd":"~/project","toolName":"bash","toolArgs":"{\"command\":\"git push --force origin main\"}"}

$ node hooks/gateguard.mjs --agent copilot
{"permissionDecision":"deny","permissionDecisionReason":"Destructive command requested: git push --force origin main\n\n  1. List ALL files/data this command will modify or delete\n  2. Write a one-line rollback procedure\n  3. Quote the user's current instruction verbatim\n\nMatched rule: git-push-force\nDestructive Bash gates EVERY call — clearance is not cached."}
(stderr empty, exit 0)

Kiro CLI

payload  {"hook_event_name":"PreToolUse","cwd":"~/project","session_id":"kiro-session","tool_name":"execute_bash","tool_input":{"command":"git push --force origin main"}}

$ node hooks/gateguard.mjs --agent kiro
(stdout empty)
stderr: Destructive command requested: git push --force origin main

  1. List ALL files/data this command will modify or delete
  2. Write a one-line rollback procedure
  3. Quote the user's current instruction verbatim

Matched rule: git-push-force
Destructive Bash gates EVERY call — clearance is not cached.
(exit 2)

It is not a sandbox. The deny matches command text against a fixed rule list, and a write through shell redirection passes: what it cannot do. One command per agent turns the hooks off: turn it off.

16 agents. One hook file.

Each agent sends its tool call to the same file, hooks/gateguard.mjs, and the answer comes back in the format that agent reads.

Blocks means the call stops when the hook runs and answers deny. An agent that fails open on a hook crash or timeout, or has hooks switched off, lets it through.

Fullblocks, loads lessons at session start, has a Stop gate
Claude Code
Codex CLI
Gemini CLI
Qwen Code
Cursor
GitHub Copilot CLI
Devin Local
Kiro CLI
Factory Droid
Amp
Partialblocks; session lessons or the Stop gate are missing
Grok CLI
Auggie
Junie CLI
Cline
Goose
OpenCode
When each one blocks, its install command and what it cannot do
AgentTierInstallCannot
Claude Code full. Blocks: yes, in every permission mode. /plugin marketplace add naimkatiman/continuous-improvement
then /plugin install continuous-improvement@continuous-improvement
Nothing is lost. The npm installer wires no guard for Claude Code, so use the plugin.
Codex CLI full. Blocks: yes, after you trust each hook in /hooks. npx continuous-improvement install --target codex --hooks Hooks stay off until trusted. Hosted tools bypass hooks. No Skill tool, so companion-preference is not wired.
Gemini CLI full. Blocks: yes, in a trusted folder. npx continuous-improvement install --target gemini --hooks No CLI command lists the hooks it loaded from settings.json; only /hooks panel inside a session does.
Qwen Code full. Blocks: yes, once you approve the project hooks or trust the folder. npx continuous-improvement install --target qwen --hooks $ARGUMENTS is not substituted in commands. The prompt hook also fires on tool results.
Cursor full. Blocks: yes (3.x). npx continuous-improvement install --target cursor --hooks Cloud agents run no session hooks. 2.5.26 has no prompt context. Stray output from a hook stops every tool call on 3.x. The Cursor CLI is not covered.
GitHub Copilot CLI full. Blocks: yes. npx continuous-improvement install --target copilot --hooks Prompt hook output is dropped, so the prompt hooks are not wired. A hook that times out fails open. The cloud agent reads only .github/hooks, and disableAllHooks turns every hook off. A read through view does not clear the blind-edit gate, so read the file through the shell first.
Grok CLI partial. Blocks: yes, in a trusted folder. npx continuous-improvement install --target grok --hooks No session or prompt context, so lessons need the rules file.
Devin Local full. Blocks: yes, outside Restricted Mode. npx continuous-improvement install --target devin --hooks Restricted Mode runs no hooks. Hooks it imports from ~/.claude can fire twice. Plugin hooks fail open. A read through read may not clear the blind-edit gate (its path key is undocumented), so read the file through the shell first.
Kiro CLI full. Blocks: yes (exit 2). npx continuous-improvement install --target kiro --hooks CLI sessions on the V2 harness read agent-profile hooks, not this file. A hook crash exits 1, which Kiro CLI allows.
Factory Droid full. Blocks: yes. npx continuous-improvement install --target droid --hooks Context printed at PreToolUse is ignored. SubagentStop cannot send a turn back.
Auggie partial. Blocks: yes. npx continuous-improvement install --target auggie --hooks Only the tool-call hooks act. Session, Stop and prompt hooks run in the background, so only the guards and the log are wired. A read through view does not clear the blind-edit gate, and one through read only when it names the file as path, so read the file through the shell first.
Junie CLI partial. Blocks: yes, on the Early Access build. npx continuous-improvement install --target junie --hooks --scope user Stable builds run no hooks. SessionStart context is ignored. The documented tool event names no session; if a real one has none, every edit of an existing file needs the clear command the deny prints.
Cline partial. Blocks: yes, while Enable Hooks is on. npx continuous-improvement install --target cline --hooks No Stop gate and no session lessons. A hook error fails open.
Goose partial. Blocks: yes. npx continuous-improvement install --target goose --hooks Post-tool, session and prompt hooks only observe. Hook commands run through sh -c, unverified on Windows.
OpenCode partial. Blocks: yes, through a local plugin file. npx continuous-improvement install --target opencode --hooks 1.x has no Stop gate (2.x continues a turn through experimental.idle). A deny reaches the model as a failed tool call and the turn goes on. OPENCODE_PURE turns plugins off.
Amp full. Blocks: yes, through a local plugin file. npx continuous-improvement install --target amp --hooks The plugin API is experimental. Plugins do not load in Puck or Spaces, and amp -x needs --plugin-ready-timeout.

Full: blocks, lessons through a session hook, and a Stop gate. Partial: blocks, with one of the other two missing. An agent installed with --hooks runs the hooks from a stable copy at <instincts root>/runtime/<version>/ (CI_INSTINCTS_HOME when set, else ~/.claude/instincts). Without --hooks, --target writes only a rules file. Each agent's follow-up step and sources, and the agents where nothing is blocked: docs/AGENT-SUPPORT.md.

Claude Code ships the hooks. Not the rules.

A line-by-line comparison with one agent's built-in hooks. On Claude Code this installs as a plugin: the rule content, tested, plus a log. Where Claude Code already does the job, it says so.

  • Auto mode classifiera deny that holds in every mode
  • Deny rules and hooks13 scripts to fill them
  • Auto memorylessons at session start, not enforced
  • Transcriptsa searchable, redacted log
  • /goal and /verifyyour typecheck at turn end
  • Subagents, worktreesgit state as an exit code
  • Read before edittwo overlapping checks
  • Plan mode, /rewindnothing added
Compare line by line, with the Claude Code docs
CapabilityClaude Code, by itselfThis plugin adds
Auto mode classifier Blocks force pushes, git reset --hard, git checkout -- ., git restore ., git clean -fd, git stash drop, deploys and migrations by default. It allows “pushing to any branch of the repository you're working in, including the default branch”. Docs: permission modes A hook deny for the same class of commands that holds in every mode, bypass included (Exhibit A). An opt-in refusal of pushes to main, master and release/* (Exhibit B).
Deny rules and hooks “Deny rules block in every mode, including bypassPermissions”, and so does a hook deny. Both are empty until you write the rule or the script. Docs: permission modes, hooks The scripts: 13 of them on 14 hook registrations, each listed in Hooks with its default and its switch.
Auto memory and CLAUDE.md On by default in local sessions. The first 200 lines or 25KB of MEMORY.md load in every conversation and your corrections are saved. The docs call this “context, not enforced configuration”. Docs: memory Nothing that enforces. A second, smaller note channel: up to 10 lessons you recorded, printed at session start (Exhibit F).
Transcripts, resume, fork Every session is kept in full and can be resumed or forked. No search command over past tool calls is documented. Docs: how Claude Code works A local log with one redacted row per tool call (Exhibit D), and a ranked search over it (Exhibit E).
/goal and /verify /goal runs a fresh-model completion check after every turn. /verify observes the running app. Neither runs your typecheck, tests and lint as a pass or fail. Docs: goal, commands A hook at turn end that runs your typecheck and hands the failing lines back to the model (Exhibit C). Opt-in, TypeScript only.
Plan mode, checkpoints, /rewind Plan mode blocks edits until you approve the plan. Checkpoints undo file edits, within a session and across resumed ones. Docs: permission modes, how Claude Code works Nothing. Use them.
Subagents, worktrees, /code-review Per-agent tool and permission scoping, isolated worktrees with cleanup, a local bug-focused review and a multi-agent cloud review. Docs: subagents, worktrees, review Nothing that enforces. One command, ci-reconcile, reports git state with an exit code, for sessions that share a checkout (Exhibit G).
Read before edit, writes outside the project The Edit tool checks that a file was read first. The setting permissions.blockWritesOutsideWorkingDirectories (v2.1.314 and later) makes the file tools refuse paths outside the working directories. Docs: tools reference, permission modes Two overlapping hook checks: a deny on a blind edit of an existing file (on by default) and a wrong-repository write lock (off by default). If the native checks serve you, these add little.

14 hooks. Four are on.

Counted on Claude Code, where the plugin registers all 14. The rest warn on stderr, which the model never sees, or wait for a switch. Pick a pylon.

  • denies by default
  • on, never denies
  • warns: reaches nobody
  • off until switched

What it does, its default and switch

Every registration, its default, switch and cost

These are the Claude Code plugin's registrations. --hooks wires the same scripts for another agent, on the events that agent has.

14 hook registrations, 13 scripts. On by default: the destructive-command deny, the blind-edit check, the local log, and the lesson load, which is silent when there are no lessons. Three rules only warn, and a warning is a stderr line with exit 0, which the model never sees. Seven checks wait for a switch: six registrations and the wrong-repository lock in row 01. A shell call means the Bash, PowerShell or Monitor tool. Row numbers follow the order in hooks.json.

HookWhat it doesDefaultSwitchCost
01PreToolUse hooks/gateguard.mjs Four rules in one script. (a) Denies destructive shell commands. (b) Denies an unquoted git @{u} ref and prints the quoted command to run. (c) Denies an Edit or Write of an existing file unless this session's log shows a read of it, or a shell or search call whose command or output names the file. (d) Wrong-repository write lock. (a) (b) (c) deny (d) off (a) and (b): none. (c): CI_GATEGUARD_FILE_GATE=off, or strict for a fact list on every first edit. (d): CI_GATEGUARD_TARGET_LOCK=block. CI_GATEGUARD_EXCLUDE skips (c) and (d) for matching path fragments. 1 process per edit or shell call. A deny reason to the model: about 300 characters for (a), two lines for (c).
02PreToolUse hooks/companion-preference.mjs Acts only when a Skill call names tdd-workflow, verification-loop, context-budget or ralph bare or with a ci: prefix: logs one row and allows the call. A plugin-namespaced name is not matched. logs, allows Not an environment variable: the key continuous_improvement.companion_preference in ~/.claude/settings.json. The value strict-companions denies. 1 process per Skill call. Writes companion-preference.jsonl.
03PreToolUse hooks/hook-pack.mjs Flags git push to main, master or release/*, and git commit with more than 15 staged files (Exhibit B). warn only CI_HOOKPACK_GATE=block, warn or off. 1 process per shell call, plus git on push and commit commands.
04PreToolUse hooks/config-guard.mjs Flags a call that would change a file that wires the guardrails (.claude/settings.json, .mcp.json, hooks.json, the hooks and plugin directories) or run a mutating claude plugin, claude mcp or claude config command. warn only CI_CONFIG_GUARD=block, warn or off. CI_CONFIG_GUARD_ALLOW=true lets one call through. 1 process per edit or shell call.
05PostToolUse bin/observe.mjs Appends one redacted row per tool call to the local log (Exhibit D). on, logs None. 1 process per tool call. Writes observations.jsonl, rotated at 10,000 rows, and project.json.
06UserPromptSubmit hooks/route-prompt.mjs Tests the prompt against 5 patterns and suggests a skill on the first match. off CI_ROUTE_PROMPT=1 turns it on. CI_ROUTE_PROMPT_DISABLE=1 forces it off. 1 process per prompt. On: a short reminder on a match. Writes route-prompt.jsonl, one row per prompt with no prompt text.
07UserPromptSubmit hooks/recall-briefing.mjs Once per session, on the first prompt of 12 or more characters that matches the log, injects the top 3 search hits. off CI_RECALL_BRIEFING=1. 1 process per prompt. On: one reminder per session (533 characters in our capture).
08SessionStart hooks/session.mjs Prints this repository's and the global recorded lessons at confidence 0.5 or higher into context (Exhibit F), and a status line to stderr. on, silent with no lessons CI_INSTINCT_LOAD=off. 1 process per session start, resume, /clear and compaction. At most 10 lessons and 1,500 characters.
09SessionEnd hooks/session.mjs Prints one reminder line to stderr. stderr only None. 1 process per session end.
10Stop hooks/three-section-close.mjs Sends back any reply of 600 or more characters that lacks three fixed headings. It checks headings, not evidence: a house style. It reads the reply from a Claude Code transcript, so it works on Claude Code only. off CI_THREE_SECTION_CLOSE=1 turns it on. CI_THREE_SECTION_CLOSE_DISABLED=1 forces it off. 1 process per turn end. On: a 359-character block reason and a rewritten reply. Writes one row per turn end with a reply to ~/.claude/hook-telemetry/.
11Stop hooks/goal-drift-stop.mjs Scores the last 30 logged tool calls for the repository against keywords from ## Goal in task_plan.md. Without a goal file it warns of nothing and only records no-goal in its state file. In block mode it reads the reply from a Claude Code transcript, so the block is shown to work on Claude Code only. warn only CI_GOAL_DRIFT_GATE=block, warn or off. 1 process per turn end. Rewrites goal-drift-state.json at every turn end unless off.
12Stop hooks/workflow-distill.mjs After a Workflow run followed by a passing verify, suggests the ci_distill_from_workflow tool. The suggestion goes to stderr even when on. off CI_WORKFLOW_DISTILL_NUDGE=on. 1 process per turn end.
13Stop hooks/typecheck-stop.mjs Runs the project typecheck when a TypeScript file changed and returns the failing lines (Exhibit C). off CI_TYPECHECK_GATE=block, warn or off. 1 process per turn end. On: your typecheck's run time, with a 25 second cap.
14Stop hooks/query-cost-nudge.mjs When .sql, .prisma, migrations/, db/, schema.* or drizzle paths changed, adds a query-cost reminder once per session. off CI_QUERY_COST_NUDGE=on. 1 process per turn end. On: one reminder per session and a marker file.

How the switches read.

Every switch but one is an environment variable, set in the shell your agent starts from or, on Claude Code, in a settings file's env block. Where a CI_* switch has an older CLAUDE_* name, such as CLAUDE_TYPECHECK_GATE or CLAUDE_CI_HOOKPACK_GATE, either name works. When both are set, the older name wins. The captures on this page use the older names. Values are read without case, and an unknown value falls back to the default. One exception: CI_THREE_SECTION_CLOSE_DISABLED must be exactly 1.

Also in the bundle, not hooks.

  • An MCP server, registered by the plugin and local to your machine: 19 tools for search, lessons, goal checks and planning files.
  • 29 skills, 30 commands, 3 agents. Prose the model reads on request. Only the hooks, the MCP server and the command-line tools execute.
  • ci-reconcile: git ground truth as a command with an exit code (Exhibit G).
  • A GitHub Action, naimkatiman/continuous-improvement@v3: lints an agent transcript in CI and outputs a score from 0 to 100.

Seven real runs.

Captured output, not mock-ups, each tagged with its step of the loop. Fake credentials, a scratch repository named acme-api.

One refusal in full.

Step 3, Implement · PreToolUse · hooks/gateguard.mjs

What the model received, 298 characters, for rm -rf build/ dist/

Destructive command requested: rm -rf build/ dist/

  1. List ALL files/data this command will modify or delete
  2. Write a one-line rollback procedure
  3. Quote the user's current instruction verbatim

Matched rule: rm-recursive-force
Destructive Bash gates EVERY call — clearance is not cached.
Raw output, fourteen more commands, default, switch and cost

Captured on 2026-11-20 and 2026-11-21 (UTC) on Windows 11 with Node v24.12.0, with a scratch home directory, a scratch repository named acme-api and fake credentials. Each $ line is the equivalent shell command, with paths relative to the plugin bundle. The lines under it are the output as printed. Notes such as (stderr empty, exit 0) are the capture's own. In a session the denied command does not run, and the model has no way to clear the deny. If you mean the command, you run it yourself.

payload  {"hook_event_name":"PreToolUse","session_id":"docs-capture","tool_name":"Bash","tool_input":{"command":"rm -rf build/ dist/"}}

$ HOME=home USERPROFILE=home CLAUDE_PROJECT_DIR=acme-api node hooks/gateguard.mjs < payload.json
{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"Destructive command requested: rm -rf build/ dist/\n\n  1. List ALL files/data this command will modify or delete\n  2. Write a one-line rollback procedure\n  3. Quote the user's current instruction verbatim\n\nMatched rule: rm-recursive-force\nDestructive Bash gates EVERY call — clearance is not cached."}}
(stderr empty, exit 0)

Fourteen more commands through the same hook. The last two are calls it gets wrong, one in each direction.

  • Denied
  • git push -f origin feature/x deny git-push-force
  • git push --force-with-lease origin feature/x deny git-push-force
  • git reset --hard HEAD~1 deny git-reset-hard
  • git -C ../other clean -fdx deny git-clean-force
  • git stash drop deny git-stash-drop
  • git branch -D old-feature deny git-branch-force-delete
  • find . -name '*.log' -delete deny find-delete
  • psql -c "DROP TABLE orders" deny substring:drop table
  • Remove-Item .\build -Recurse -Force deny powershell-remove-item
  • Allowed
  • rm -f notes.txt allow
  • git commit -m "remove the rm -rf call from cleanup" allow
  • Remove-Item .\notes.txt -Force allow
  • Calls it gets wrong
  • cat > notes.md <<'EOF', then a body line that mentions git reset --hard deny substring:git reset --hard The body is data, but the fallback list still reads it.
  • echo "export const TAX = 0.2;" > src/price.ts allow A file write through shell redirection is not gated by any rule here.
Claude Code
In auto mode the classifier blocks force pushes, git reset --hard and git clean -fd. Deny rules and hook denies hold in every mode, bypassPermissions included, but Claude Code ships no rule content for either.
This adds
The rule content, as a hook deny: recursive deletes, discarding git commands, forced pushes, find -delete, SQL drops, PowerShell and cmd deletes, read through bash -c, pwsh -c and git -C. The reason names the rule.
Default
On, every call. Nothing is cached and the model cannot clear it.
Switch
None. To stop it, turn the hooks off.
Cost
One Node process per shell or edit call. About 300 characters to the model on a deny.

A push to main, refused.

Step 3, Implement · PreToolUse · hooks/hook-pack.mjs

Off until you set one variable. By default the same call only writes a stderr line, which the model never sees.

Tool call: Bash, git push origin main. Switch set

$ HOME=home USERPROFILE=home CLAUDE_PROJECT_DIR=acme-api CLAUDE_CI_HOOKPACK_GATE=block node hooks/hook-pack.mjs < payload.json
{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"Direct push to protected branch \"main\" — open a feature branch + PR instead."}}
(stderr empty, exit 0)
Same call with default settings, then default, switch and cost
$ HOME=home USERPROFILE=home CLAUDE_PROJECT_DIR=acme-api node hooks/hook-pack.mjs < payload.json
(stdout empty)
stderr: [hook-pack] Direct push to protected branch "main" — open a feature branch + PR instead.
(exit 0)

The config guard also defaults to warn: CI_CONFIG_GUARD=block refuses a change to the files that wire the guardrails (settings, MCP config, hooks and installed plugins). The wrong-repository lock defaults to off: CI_GATEGUARD_TARGET_LOCK=block refuses a file-tool write whose absolute path is outside the session's repository.

Claude Code
The auto mode classifier allows a push to any branch of the repository you are working in, the default branch included.
This adds
A refusal of git push to main, master or release/*, and of git commit with more than 15 staged files.
Default
Warn: a stderr line with exit 0. It reaches nobody. Treat it as off.
Switch
CI_HOOKPACK_GATE=block
Cost
One Node process per shell call, plus git on push and commit commands.

A turn that could not end.

Step 4, Review · Stop · hooks/typecheck-stop.mjs

One changed file assigns a string to a number. The hook ran the typecheck and handed the compiler's line back to the model.

$ HOME=home USERPROFILE=home CLAUDE_PROJECT_DIR=acme-api CLAUDE_TYPECHECK_GATE=block node hooks/typecheck-stop.mjs < payload.json
{"decision":"block","reason":"Typecheck FAILED on changed TS files — fix before ending the turn:\nsrc/price.ts(2,9): error TS2322: Type 'string' is not assignable to type 'number'."}
stderr: (node:54464) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.
(Use `node --trace-deprecation ...` to show where the warning was created)
(exit 0, 1785 ms)
Notes, default, switch and cost

The stderr lines are a Node 24 warning about how the hook starts npm. With the switch unset, the same fixture printed nothing and exited 0. The gate is TypeScript only, needs tsconfig.json at the project root, and blocks again at every turn end until the error is fixed.

Claude Code
/goal judges the transcript with a fresh model after each turn. It runs no commands.
This adds
At turn end, if the working tree has an uncommitted TypeScript change, it runs your typecheck script (or the project's own tsc --noEmit) and returns the last 15 lines of output as the reason the turn cannot end.
Default
Off.
Switch
CI_TYPECHECK_GATE=block
Cost
Off: one Node process per turn end that exits at once. On: your typecheck's run time, capped at 25 seconds.

A token that never reached the log.

Step 6, Relearn and learn · PostToolUse · bin/observe.mjs

And, in the same run, a password that did. Every credential here is fake.

The command in the tool call

curl -s -H "Authorization: Bearer sk-FAKE0000000000000000000000DOCS" https://api.example.com/v1/orders && API_TOKEN=FAKEtoken1234567890 npm run deploy
The row written to the log, the miss, default, switch and cost
$ HOME=home USERPROFILE=home CLAUDE_PROJECT_DIR=acme-api node bin/observe.mjs < payload.json
(stdout empty, stderr empty, exit 0)
$ tail -1 home/.claude/instincts/67c11d834ccf/observations.jsonl
{"ts":"2026-11-20T16:03:10Z","event":"tool_complete","session":"docs-capture","tool":"Bash","input_summary":"curl -s -H \"Authorization: Bearer <redacted>\" https://api.example.com/v1/orders && API_TOKEN=<redacted> npm run deploy","output_summary":"{\"stdout\":\"{\\\"ok\\\":true,\\\"password\\\":\\\"<redacted>\\\"}\\ndeployed build 4f1c\",\"stderr\":\"\",\"interrupted\":false}","project_id":"67c11d834ccf","project_name":"acme-api"}

Same run, a shape the patterns do not know. One field of the stored row

"input_summary":"mysql -u admin -pFAKEpass99 -h db.example.com orders -e \"select 1\""
Claude Code
Keeps full transcripts, and auto memory keeps notes. Neither is a per-repository log of tool calls.
This adds
One row per tool call in a local file: time, tool, the first 500 characters of input and 200 of output, with known secret shapes redacted before the row is written.
Default
On.
Switch
None in the source. To stop it, turn the hooks off.
Cost
One Node process per tool call. One file per repository, rotated at 10,000 rows.

A search over the log.

Step 1, Research · MCP tool · bin/mcp-server.mjs

The ci_recall tool, called over stdio as an agent calls it, on a seeded log.

> {"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"ci_recall","arguments":{"query":"typecheck error price","k":3}}}
## Recall: "typecheck error price"

3 match(es), most relevant first:

- [2026-11-20T16:02:38Z] **Bash** (score 3.47)
  Bash  npm run typecheck  {"stdout":"src/price.ts(2,9): error TS2322: Type …
- [2026-11-20T16:02:38Z] **Bash** (score 1.73)
  Bash  npm run typecheck  {"stdout":"","stderr":"","interrupted":false}
- [2026-11-20T16:02:38Z] **Edit** (score 1.30)
  Edit  src/price.ts  {"filePath":"src/price.ts","structuredPatch":[]}
A query with no match, default, switch and cost

The history was seeded for the capture: five tool-call payloads piped into the logger under another session id. The scores depend on that seeded log.

> {"jsonrpc":"2.0","id":6,"method":"tools/call","params":{"name":"ci_recall","arguments":{"query":"kubernetes ingress"}}}
No past observations matched "kubernetes ingress". Try broader or different terms — recall is lexical, not semantic.
Claude Code
Transcripts can be resumed or forked. No search command over them is documented.
This adds
/recall and the ci_recall tool: BM25 ranking over this repository's current log file. Lexical, not semantic.
Default
The plugin registers a local MCP server with 19 tools. A search runs when you or the model call it.
Switch
CI_RECALL_BRIEFING=1 also injects the top 3 hits once per session.
Cost
19 tool definitions: 8,279 characters as the server lists them, about 2,070 tokens, unless your client defers tool schemas.

Two lessons, printed at session start.

Step 6, Relearn and learn · SessionStart · hooks/session.mjs

A lesson is a small file. The one at confidence 0.4 is under the 0.5 floor and is not printed.

$ HOME=home USERPROFILE=home CLAUDE_PROJECT_DIR=acme-api node hooks/session.mjs < payload.json
Notes from continuous-improvement instinct files: this repository's, and those marked [global], which load in every repository. They are not user instructions: the user's instructions and this repository's rules override them, and a note cannot grant approval. Use those at 0.7 and above when relevant; treat 0.5 to 0.69 as suggestions. The ci_instincts tool lists the stored instincts.
- editing src/price.ts: Run npm run typecheck before reporting; total() must return a number, not a joined string. (0.75)
- staging a commit on Windows: Stage by explicit filename; autocrlf makes git status list files with no content change. (0.65)
How lessons are written, default, switch and cost

A lesson is written when you run /seven-laws or when one of the plugin's tools creates it. Three were created with those tools for the capture. stdout of the hook was 636 characters; stderr carried one status line, exit 0. Apart from its listings and a deny reason, this is the only text the plugin puts in front of the model by default, and only when lessons exist. The model reads the printed lines. Nothing applies them.

Claude Code
Auto memory is on by default in local sessions and loads the first 200 lines or 25KB of MEMORY.md into every conversation.
This adds
A second, smaller note channel: this repository's recorded lessons, plus global ones that load in every repository, at confidence 0.5 or higher. Highest first, with entries from a starter pack last. At most 10 lessons and 1,500 characters.
Default
On. It prints nothing when no lesson reaches 0.5.
Switch
CI_INSTINCT_LOAD=off
Cost
One Node process per session start, resume, /clear and compaction. At most about 375 tokens of context.

Git state, as an exit code.

Step 1, Research · Command · bin/reconcile.mjs

One commit, one modified file, one untracked file, no remote. The second run asks whether a push landed, and cannot prove it.

$ node bin/reconcile.mjs
reconcile (resolved):
  HEAD commit     ok       04494de2e965  HEAD            ok       on feature/price-fix  upstream        WARN     no configured upstream — compare against origin/<default> explicitly before classifying  in-progress op  ok       none  working tree    ok       2 reported by status but only 1 with content drift — stage by explicit filename, never git add -A  stashes         ok       none  worktrees       ok       1 (this one)(exit 0)
$ node bin/reconcile.mjs --verify-push feature/price-fix
push feature/price-fix: unverified — git ls-remote exited 128; absence of the ref is unproven
(exit 1)
Default, switch and cost
Claude Code
Isolates work in worktrees and cleans them up. Ownership between sessions started separately in one checkout is not covered.
This adds
ci-reconcile: branch, upstream, in-progress operation, working tree, stashes and worktrees in one report. Exit 0 clear, 1 blocker, 2 not a repository.
Default
On demand. It is a command, not a hook.
Switch
None. The /reconcile command has the model run the copy in the plugin bundle. From a terminal, run npx -p continuous-improvement ci-reconcile.
Cost
One process when you run it. Every probe is a git call with no shell, and only --verify-push contacts the remote.

It costs Node processes, not tokens.

No model call, no network call, zero runtime dependencies. Each block is one Node process, counted on Claude Code. On another agent, each hook its install wired is one Node process per call.

  • 1Session start, and session end
  • 2Each prompt (both exit at once when off)
  • 1Read, Grep, Glob, any MCP tool
  • 2Skill
  • 3Edit, Write
  • 4Bash, PowerShell, Monitor
  • 5Each turn end (all exit at once when off)
0model calls
~375tokens at session start, at most
Context added by default, itemised
  • Session start: nothing when the repository has no lesson at 0.5 or above. Otherwise a header and up to 10 lines, 1,500 characters at most, about 375 tokens (Exhibit F).
  • Skill and command listing: 42 names with descriptions. claude plugin details projected the always-on cost at about 4,500 tokens on Claude Code v2.1.325 with 41 of them, MCP tools not counted, and counts agents/README.md as a fourth agent.
  • MCP tool definitions: 19 tools, 8,279 characters (about 2,070 tokens), unless your client defers tool schemas.
  • Agent listing: 3 agents, 574 characters.
  • A denied call: the deny reason. About 300 characters for a destructive command, two lines for a blind edit.
  • Everything else: nothing until you switch it on.

The counts are Claude Code's, where the plugin registers all 14. One start per matching registration. A call denied before it runs starts one fewer, because there is nothing to log. The Skill and Monitor rows are derived from the hook matchers, not observed. No millisecond figure is given: none was measured. Each start costs your machine's Node startup time plus the hook's own work. Token figures are characters divided by four. No tokenizer was run.

Nothing leaves your machine.

The hooks, the logger and the MCP server contain no network code. The log stays in ~/.claude/instincts/, for every agent.

One exception you start yourself: ci-reconcile --verify-push asks your git remote for the branch tip.

Every file the plugin writes

What they write stays on your machine: under ~/.claude/instincts/ and ~/.claude/hook-telemetry/, plus three planning files in your project root when you ask for them.

PathHoldsWritten
…/observations.jsonlThe tool-call log. One row per call: time, tool, the first 500 characters of input and 200 of output, redacted by pattern. Rotated at 10,000 rows, and the 10 newest archives are kept.After every tool call that completes
…/project.jsonThe directory name and the project root path.With the log
…/<id>.yaml
~/.claude/instincts/global/<id>.yaml
A lesson: trigger, confidence, dates, body. The global directory holds lessons for every repository. Drafts from the distill tools go to …/drafts/.When a lesson is recorded
…/companion-preference.jsonlOne row per matching Skill call.On a Skill call for one of four skills
…/goal-drift-state.jsonThe last drift status, score and action.At every turn end, unless the drift gate is off
…/sessions/<session-id>/gateguard-session.jsonFiles cleared through the file gate, with times, including files the log showed were read.When the file gate records a clearance
…/route-prompt.jsonl
…/recall-briefing-session.json
…/workflow-distill-state.json
…/query-cost-nudge/
State for four hooks that are off by default. route-prompt.jsonl holds one row per prompt, with no prompt text.By those hooks
~/.claude/hook-telemetry/<hash>.jsonlOne row per turn end with a reply: time, action (skipped, passed or blocked), reply length, missing headings and run time. No reply text.By the three-section close hook, which is off by default
task_plan.md
findings.md
progress.md
Planning files in the project root. Nothing else is written inside your repository.Only when you run /planning-with-files or the ci_plan_init tool

… stands for ~/.claude/instincts/<project-hash>/, one directory per repository. The hash is the first 12 hex characters of the SHA-256 of the project root path.

The log holds command text, never your prompts. Known secret shapes are redacted before a row is written. A secret in an unknown shape is not, so review the log before sharing it. Uninstalling the plugin leaves both directories in place. The separate npm installer makes one throttled read of registry.npmjs.org to check for a newer version, and CI_UPDATE_CHECK=off skips it.

What it cannot do.

22 known gaps, each from a run, the source or the docs. The amber call just slid past the gate.

  • Shell redirection is not gated.

    echo "…" > src/price.ts through the Bash tool passes every rule here, the wrong-repository lock included.

  • It refuses some harmless commands.

    A heredoc body that mentions git reset --hard is denied, though the body is data. The deny names the rule, so you can see why.

All 22 known gaps
  • It is not a sandbox.

    The deny in hooks/gateguard.mjs matches command text against a fixed rule list. Nothing isolates the agent from your files or your network.

  • be-ambitious is guidance.

    It is a skill: text the agent reads. No hook checks that the agent followed it, and no benchmark is claimed for it.

  • Contemplate and Iterate have no hook.

    Both are written rules. Nothing in a session checks a reflection or holds the work to one change at a time.

  • The goal-drift block is shown on one agent.

    hooks/goal-drift-stop.mjs reads the reply from a Claude Code transcript, so its block is shown to work on Claude Code only.

  • No hook runs tests, lint or a build.

    The one check at turn end is the typecheck gate, and it is off until you switch it on.

  • A hook that fails can let the call through.

    An agent that fails open on a hook crash or timeout runs the call. The agent table names which ones do.

  • Redaction is by pattern.

    A secret in a shape the patterns do not know is written to the log as typed. Rows written by earlier versions are not rewritten.

  • A warning reaches nobody.

    The push gate, the config guard and goal drift default to warn: a stderr line with exit 0, which the model never sees.

  • Refused, not cleared.

    A destructive command has no clearance route. If you mean it, you run it.

  • A hook that is off still starts.

    The prompt and turn-end registrations are unconditional. Each one reads its switch and exits.

  • The log has gaps.

    Only calls that reach PostToolUse are logged, so failed and denied calls are missing. Search is lexical and skips rotated archives.

  • Commit size counts staged files.

    git commit -am with 16 modified files and none staged passed in block mode. The same 16 files staged were refused.

  • The config guard scans commands.

    python -c "open('.claude/settings.json','w').write('{}')" passed in block mode.

  • The typecheck gate is TypeScript only.

    It needs tsconfig.json at the project root and a typecheck script or the project's own TypeScript, else it allows silently. It allows the turn after 25 seconds.

  • The blind-edit check trusts the log.

    A listing that prints a file's name counts as a look, and with no log for the project yet every edit is allowed.

  • Lessons are notes.

    Confidence is a number on a file. ci_reinforce raises it by 0.15 or lowers it by 0.1, up to 0.9. No code applies a lesson.

  • The skills are prose.

    The project's own audit marked 10 of the 28 skills for retirement, 4 to merge and 14 to slim.

  • Two commands need a clone.

    /harvest and /companion-preference run node bin/… from the repository root, which neither install sets up.

  • No Node, no hooks.

    Every registration calls node. Without it on your PATH the registrations fail and no rule runs.

  • Not tested on macOS.

    CI runs Linux. The captures on this page ran on Windows 11. No dated eval compares sessions with and without the plugin, so this page does not say it improves results.

Who should skip it
  • you only run one-off prompts: no edits, no shell commands, nothing for a hook to refuse or log.
  • you already maintain your own deny rules and hooks. This is rule content, and you have yours.
  • a Node process start on every tool call is a cost you will not pay.
  • you wanted the model to get better at the work. Nothing here changes the model.
  • you need macOS support that someone has tested.

Five steps to try it. One line to turn it off.

  1. Install for your agent and do what it prints (Codex: trust each hook in /hooks). On Claude Code, restart once.
  2. Ask the agent to use the be-ambitious skill on a task you already have. On Claude Code: /be-ambitious <task>
  3. Ask the agent to delete a folder that does not exist. hooks/gateguard.mjs answers deny, and the reason names the rule. rm -rf ./no-such-dir → rm-recursive-force
  4. Work a few minutes, then have it search what ran with the ci_recall tool. On Claude Code: /recall typecheck
  5. In a TypeScript repository, on an agent in the full tier, start it with CI_TYPECHECK_GATE=block
EnabledOff switch, any agent installed with npxnpx continuous-improvement install --uninstall --target <agent>Off switch, Claude Codeclaude plugin disable continuous-improvement@continuous-improvement
Verify, remove, update, and other install paths

Node 18 or newer is the only requirement (CI runs 18, 20 and 22). The hooks need Node 18 or newer on your PATH. The directory in step 3 does not exist, so a broken install deletes nothing. A turn that leaves a type error in a changed file is sent back.

On any agent, npx -p continuous-improvement ci doctor --agent <agent> shows what the agent loaded, using only its own listing commands. On Claude Code, run /verify-install. It confirms the commands loaded, probes the guard hook with an unquoted git rev-parse @{u}, which the hook refuses in every file-gate mode, and reads the log for a row. A wired install ends with ✓ wired — commands, gateguard, observe all confirmed.

One rule
Its switch in Hooks.
Claude Code: everything, kept installed
claude plugin disable continuous-improvement@continuous-improvement
Claude Code: remove
/plugin uninstall continuous-improvement@continuous-improvement Then delete ~/.claude/instincts/ and ~/.claude/hook-telemetry/ yourself.
Claude Code: update
claude plugin marketplace update continuous-improvement Then claude plugin update continuous-improvement@continuous-improvement. The new version loads in your next session.
Claude Code through npm
npx continuous-improvement install Installs the logger, 2 skills and 14 commands into ~/.claude. With --mode expert it also registers the session hook and writes an MCP server entry into ~/.claude/settings.json. Whether current Claude Code loads a server from that file was not verified. It installs none of the guard hooks, so /verify-install reports the missing guard on this path. Do not run both paths against the same ~/.claude.
Any other agent: install
npx continuous-improvement install --target codex --hooks Installs the hooks for that agent, and writes or prints the MCP server step. Without --hooks, --target writes a rules file only. Every agent, its tier and what it cannot do: Agents.
Any other agent: remove
npx continuous-improvement install --uninstall --target codex Run it in the same project: it removes what --hooks recorded. A vendor mcp add has its own undo.

The claude plugin commands are from the plugin CLI reference. They were not run against a live install here. The switch above only dims the gate in this picture.

Why it exists.

Before a session starts: is this the task, or the goal behind it?

Before a session says done: was it checked, or hoped?

The wise one is the one who takes account of himself and works for what comes after death. The weak one is the one who follows his own desires and then merely wishes upon Allah.

Jami` at-Tirmidhi 2459, narrated by Shaddad ibn Aws. Tirmidhi graded it hasan; later scholars disputed the chain. Full sourcing in docs/philosophy.md.
The loop is the method, the hooks are the part that executes

As models improve, planning etiquette and reminders to verify merge into the model. A hook that refuses before a call runs (hooks/gateguard.mjs), a check that runs before the turn ends where the agent has a Stop gate, and a record of what was run do not. The loop is the method. The hooks and the log are the part that executes. This page says which is which.

An open paper ledger with ruled columns. One group of tally marks is orange among black ones.
A ledger settles by outcome, not by intention.

Colophon

This repository's own checks

The test line is a stated count, not a capture: CI compares it with the real run and fails when they differ. Three numbers above are pinned by a check: the version in four places (verify:landing-version), the skill count (verify:skill-count) and the test count in two (verify:test-count).

checks     20 invariants + typecheck
tests      PASS  5021/5021
ci         Node 18, 20, 22 on Linux