Rzemiosło · The Craft
What is The CraftLevelsGet startedChapters Search Download PLEN
Rules of chapter 16
Level 3 · Codex Chapter deep-dive

In the core the rules are short and hard. Here is what stands behind them: the why, examples and stories from real projects. Rule quotes come straight from the core.

16 — Driving Claude

The rest of the doctrine is about building; chapter 16 is about driving the assistant. How the tool’s specific features work is described by its own documentation — and that changes faster than any doctrine. So the chapter only sets the project’s policy: when a feature is mandatory and where its limits are. The difference between a slow, “click-through” session and a fast one sits largely here. Below is what stands behind the rules.

The plan first, then the files

Plan mode — A mode where the assistant first reads and presents a plan but changes no files — execution comes only after your approval. For wide or hard-to-undo work: you review the decision, not the diff. A good plan also says how you’ll check it worked. more in the glossary → is required ↗

Plan mode is a state in which the assistant reads, researches and comes back with a plan — without changing a single file. You approve, redirect or reject the plan at the cost of reading it, not of reverting changes. It’s Commandment X (“plan → iterate → review”) with a mechanical guarantee, instead of a promise the assistant may forget three steps later.

Three situations make it mandatory: when the shape of the work is open (which approach, which tables, which records), when the blast radius is wide (a Migration (database) — A controlled change to the database layout — adding a column, a table or moving data — step by step. Like a renovation to plan: rebuilding data in a set order so nothing “collapses”. more in the glossary →, a rename across the whole project, anything touching URLs and redirects), and when the change is hard to undo. For a small, bounded fix, planning is ceremony — then you skip it.

A good plan is an artefact for review: it lists the files, names the trade-off and says how the result will be verified. A “plan” that can’t say how you’d know it worked isn’t a plan yet (03). Without plan mode on a wide change you review a finished Diff — A list of the differences between two versions: what was added and removed, line by line. Reviewing the diff before merging is the last chance to see what’s really going to production. more in the glossary → instead of a decision — and by then it’s too late to change direction cheaply.

Autopilot within set guardrails

Autopilot is the default — inside the permission map ↗

Manually confirming every safe edit is slow — and worse, it teaches rubber-stamping: after the fiftieth “yes”, the fifty-first, the one that really matters, also goes through unread. So the default is autonomous work, and you stay the architect of decisions, not a clicker of confirmations.

That’s only safe thanks to guardrails set once: the permission map (06) and the policies in CLAUDE.md. Everything in the left column (“allowed”) the assistant does freely, committing often; the middle and right columns still stop it — a Deploy — Releasing a new version of the app “live”, where real people use it. It’s the moment a change reaches real people — which is why it happens only on an explicit “deploy”. more in the glossary →, a Push / pull — Push sends your commits to the remote repository; pull fetches changes from there into your copy. A push is an “outward” action — in The Craft it needs explicit consent, like a deploy. more in the glossary →, a Database swap — Replacing the whole production database with a new version, carrying over user accounts and data. The hardest operation in The Craft — it has its own runbook and needs explicit consent. more in the glossary →, deleting things it didn’t create. Autopilot doesn’t mean no oversight of dangerous operations; it means oversight is focused where it matters. You review plans and results, not every keystroke.

A model matched to the stakes

Model by stakes: ↗

Choosing a model is a cost/quality dial, not a setting picked once and for all. A cheaper, faster model handles bounded, mechanical work very well: renames, simple edits, searching. The strongest model is kept for the hard 10%: architecture, nasty bugs spread over many files, design with a real trade-off.

The dial works both ways: don’t pay the top rate to check the Repository (repo) — A store of the whole project’s code together with its full history of changes — who changed what and when. The repo is the project’s memory: code, documentation and change history in one place. more in the glossary → status, but never economise on an operation that can lose data — the cost of a mistake in a migration far exceeds the price difference. When the cheaper model starts going in circles — escalate; when the strong one is wasted on routine — step down. Judge by results, not habit.

Long tasks in the background

Long work in the background; anything that must outlive the session — detached ↗

A dev server, a build, the full test suite, a Scraping — Automatically gathering data from websites with a program instead of copying by hand. Powerful for acquiring data, but it needs manners: respect others’ rules (robots.txt), don’t overload the server. more in the glossary → — long operations go into the background so the conversation can carry on, and the result arrives when the task finishes. Blocking the session waiting on a task that could have run in the background is pure waste.

The second half of the rule Guard — A test that enforces a project rule (e.g. “every module is in the AI_README”) and stops the commit when it’s broken. A rule without a guard is only a wish — a long session will break it in good faith. more in the glossary → against the opposite mistake: a task started “in the session’s background” dies with the session. Something that has to run for hours or days (a nightly import, a long scrape) must be detached from the conversation — and resumable too, with checkpoints, so an interruption halfway doesn’t mean starting from zero (14, 15). A background task that can’t be resumed simply fails out of sight.

Many agents at once — when it pays off

Fan out to subagents ↗

Work that splits into independent pieces — a broad search across many files, a review from several angles, parallel independent edits, a big file-by-file migration — can be spread across several helper agents in parallel. What comes back to the main conversation is the conclusion, not raw file dumps, so the main context stays clean.

Proven patterns: several parallel readers → a synthesis; find → adversarially verify each finding (a separate agent tries to disprove it); migrate each file in isolation. But it costs: each agent uses its own budget. You reach for it when breadth, parallelism or independent verification genuinely help — twelve agents for a one-line fix is waste, and a single agent for perfectly parallel work is lost time.

Every session in its own tree

One concurrent session = one git worktree — A separate working copy of the same repository, so a second parallel session works in its own folder and doesn’t clash with the first. Two sessions in one folder overwrite each other’s work; a separate working tree prevents it. more in the glossary →. ↗

Two sessions in one repository folder share one git Index (database) — A lookup in the database that makes searching instant instead of scanning everything in order. The first move for slow queries — like an index at the back of a book instead of reading 400 pages. more in the glossary → and one working tree. They stage files for each other, sweep in half-finished edits, and the symptoms look like a haunting: a Branch — A separate working version of the project where you change something on the side, without touching what already works. On a branch you experiment safely; only what’s been checked reaches the main version. more in the glossary → nobody switched to, someone else’s files in git status, edits that “disappear”. A separate git worktree — a second working copy of the same repository, created from the remote branch — gives each session its own desk. The cost is one directory; the alternative is two writers fighting over one index (05).

Skill or hook

Repeated procedures become skills; “always do X after Y” becomes a Hook — Automation in the tool’s configuration that always fires on a specific event (e.g. after a file edit). Anything that must happen “always after something” shouldn’t depend on the assistant remembering. more in the glossary → ↗

A procedure you repeat turns into a skill — a recipe the assistant follows the same way every time (02). But a rule like “always do X after Y” shouldn’t depend on the assistant remembering it: saved as a hook in the tool’s configuration, it runs automatically, every time, regardless of what’s in the conversation’s context.

For a new project the order is simple: first the guardrails in CLAUDE.md (so autopilot is safe), then the first skills (/run, /run-tests), and from then on autopilot and background work as the default way of working (07).