06 — Collaboration and memory
Commandments VI and X: how the user and the agent work together, where the boundary runs, and how nothing is lost between sessions.
Rules
- Plan → sketch → scale. Show 3 examples, gather feedback, then make 10, then 100 — never the reverse.
- Speak the user’s native language and record it (and their technical level) in
CLAUDE.mdonce (→ 07). Code and Commit — A saved, labelled point in the project’s history — a confirmation of a specific batch of changes. Small, described commits make a history you can return to any working state from. more in the glossary → messages stay English; names a tool prints stay English in any language (→ 17). - Look at the target before deleting or overwriting. If it contradicts the description or you didn’t create it — report, don’t delete.
- Consent is per action. “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 → X” is not “deploy whenever”. Anything published may stay cached or indexed after deletion.
- Memory holds only what 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 → can’t — who the user is, their feedback with the why, constraints not visible in code. Use the agent’s built-in memory; never copy repo facts into it.
The permission map
The whole boundary in one place — approved once on Day 0, read every session:
| ✅ Free — just do it | ⏸️ Ask, wait for a “yes” | ⛔ Never — whoever asks |
|---|---|---|
| Read/grep anything in the repo | Deploy to Environment (dev / prod) — Separate places where the app runs: “dev” for safe tests, “prod” for real users. Dev is a playground, prod is where real users are — the rules for each are completely different. more in the glossary →, in any form (→ 05) | Invent legal/identity data — tax ID, address, company name (→ 09) |
| Run tests, linters, builds | 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 →/publish to a remote | Declare a practice the code doesn’t implement (→ 09) |
| Commit locally, often, small | 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 → or DB 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 → on prod (→ 04) | Commit secrets (→ 08) |
| Create/delete your own 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 → | Send mail/messages to real people | Delete a Backup — A copy of your data saved earlier, which you return to when something goes wrong. It’s the only way to undo a change to data — code comes back from git, data only from a backup. more in the glossary → that is somebody’s Rollback — Reverting a change to the previous, working state — “Ctrl+Z” for a deployment. When a new version breaks production, a rollback restores the previous one in seconds instead of fixing in a panic. more in the glossary → (→ 04) |
| Run any script in Dry-run — A “dry” run — the script shows what it WOULD do but changes nothing. You see the effects before executing; a data change happens only after deliberate confirmation. more in the glossary → | Delete/overwrite what you didn’t create | Weaken a test or 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 → to make it green (→ 03) |
| Write/update docs, AI_README — A map file in every code directory: what’s here, what it’s for and what to watch out for — written for search. The assistant finds the right file with one search instead of reading the whole directory. more in the glossary →, plans | Add a paid service or dependency (→ 14) | Report “it works” without proof (→ 00 III) |
| Refactor inside the agreed scope | Change scheduler/cron or server config (→ 14) | Sweep another session’s uncommitted work into a commit (→ 05) |
| Long jobs in the background, locally | Touch real user data (→ 00 VII) | Deploy a migration with no backup taken (→ 00 V) |
The left column is deliberately wide — that is what makes autopilot safe instead of rubber-stamped. A yes in the middle column is spent on that one action. The right column doesn’t move: “the user asked” is not an argument there — say why, offer the honest alternative.
Close a unit of work with a summary
A scannable summary, not prose — ideally a widget matched to the user’s level: what changed · proof (test counts, HTTP codes, numbers) · the commit (hash, message) · next actions in order (docs → plans → deploy, the deploy still behind its explicit “yes”).
Handoff when the context runs out
A long session gets summarized, and the summary drops the why and the half-finished state in the tree.
- Land work in commits, not in the conversation — a commit survives compaction, a half-done edit becomes an orphan.
- Write a decision where it lives the moment it’s made (
CLAUDE.md, ADR (decision record) — A short note: what we chose, why, and which alternatives we rejected (Architecture Decision Record). Six months later nobody has to guess whether a decision was deliberate and whether it’s safe to change. more in the glossary →,docs/plans/,AI_README). - Leave
git statusreadable — it is the handoff to the next session. - When the ceiling nears, finish the current unit before opening the next.
Test: could the next session pick this up from the repo alone, without this conversation?
Anti-patterns
- 🚫 Scaling before review.
- 🚫 Deleting or overwriting without looking at the target.
- 🚫 Treating one-time consent as standing.
- 🚫 Memory as a dump of repo facts.
- 🚫 Ending a change with a wall of prose instead of status + commit + next steps.