SPEC / AI AGENT DISCIPLINE / REV 3.10.0

A seatbelt for Claude Code

continuous-improvement is a behavioral standard for AI coding agents. Seven laws, enforced at the tool boundary by runtime hooks, so the agent researches before it edits, verifies before it reports done, and keeps what worked.

install npx continuous-improvement install

No Node setup, zero runtime dependencies. Read the quickstart

01 · The seven laws

Discipline, written as clauses.

Each law has one check to pass and one red flag that means stop. The runtime holds you to them, so you do not have to remember.

01

Research Before Executing

CheckDid I search for existing solutions before writing anything new?
Red flagI'll just quickly...
02

Plan Is Sacred

CheckDid I state WILL, WILL NOT, and VERIFY before touching code?
Red flagLet me also add...
03

One Thing at a Time

CheckAm I finishing the current change before starting the next one?
Red flagWhile I'm here...
04

Verify Before Reporting

CheckDid I check the actual output, not the output I assumed?
Red flagThis should work...
05

Reflect After Sessions

CheckDid I note what worked and what failed before moving on?
Red flagI'll remember...
06

Iterate One Change

CheckAm I changing one thing at a time and verifying each step?
Red flagAnd also...
07

Learn From Every Session

CheckDid I capture this lesson as an instinct the next session can use?
Red flagNext time I'll...
The loop / one pass, every change
Research Plan Execute Verify Reflect Learn Iterate

Execute moves one thing at a time. A failure never carries forward into the next task: it loops back to research.

02 · Enforcement

Enforced at the boundary, not suggested in a doc.

Hooks sit between the agent and your files. They block the action, not just warn about it.

Hook · PreToolUse

Gateguard

Blocks Edit, Write, and destructive Bash until the agent presents a fact-list investigation. No mutating a file before naming what imports it.

Ladder · pre-done

Verification Loop

A per-project ladder of checks. Nothing is marked done until the rungs pass on the actual output.

Hook · Stop

Goal-Drift Gate

Fires a goal check when the agent tries to stop, and refuses a "Done" that has drifted from the stated goal.

Memory · cross-session

Mulahazah Instinct Engine

Captures what worked and what failed as instincts. The same mistake does not return next session.

Put a seatbelt on your agent.

Install in under a minute. Two slash commands inside Claude Code, no setup.

install npx continuous-improvement install