A seatbelt for Claude Code

Research first. Edit safely. Verify before done. Remember what worked. The 7 Laws of AI Agent Discipline โ€” runtime hooks, enforcement skills, and project memory.

โšก Zero runtime deps ๐Ÿ”’ MIT License
npx continuous-improvement install

The 7 Laws

Runtime discipline that stops agents from editing before understanding.

1

Pre-flight before every flight

Investigate the codebase, read the spec, and list facts before touching a single file.

2

One concern per change

Each commit addresses exactly one thing. No drive-by refactors mixed with bug fixes.

3

Plan before execution

Write the plan, get alignment, then code. Never code your way to understanding.

4

Verify before "done"

Run tests, typecheck, and lint before declaring completion. Proof beats promise.

5

Reflect after every session

What worked? What failed? Capture lessons so the next agent starts smarter.

6

Iterate, never batch

One change โ†’ verify โ†’ next. Never carry a failure forward into the next task.

7

Remember what worked

Store instincts, patterns, and decisions in project memory. Yesterday's lesson is today's shortcut.

What You Get

Three layers of enforcement that physically block bad behavior.

๐Ÿšง Gateguard Hook

A PreToolUse hook that blocks Edit / Write / Bash until the agent presents a fact-list investigation. No more editing before reading.

โœ… Verification Loop

Six-phase verification ladder โ€” typecheck, test, build, lint, e2e, healthcheck โ€” before any task is marked done.

๐Ÿง  Mulahazah Engine

Instinct packs capture lessons across sessions. The same mistake never repeats twice.

๐Ÿค– Ralph Loop

Autonomous agent execution that converts PRDs to executable JSON and runs until all stories pass.

๐Ÿ“‹ /ship Command

Fan-out to code-reviewer + security-auditor + test-engineer in parallel, then synthesize a go/no-go decision.

โš™๏ธ CI Linter

GitHub Action that lints agent transcripts for discipline violations before merge.

Ready to enforce discipline?

Install in 30 seconds. No Node setup required โ€” just two slash commands inside Claude Code.