Codeuteronomy
What is not committed did not happen
Work of lasting value lands in the repository, tracked and re-runnable. A solution that lives only in a scratch file or a shell command evaporates with the session and gets paid for twice.
An agent solves problems in a context about to disappear. The command that finally worked, the config that finally loaded: if it lives only in a temp directory or the agent's working memory, it's gone when the session ends or the context compacts. The next session starts from zero and re-derives it, burning the time and tokens again. The knowledge existed. It just wasn't kept anywhere that survives.
The test for where work belongs: will this run more than once? For a script, a config, a fix worth keeping, the answer is almost always yes, and then it goes in the repo as you write it, not into a scratchpad you'll clean up later. Durable agent knowledge belongs there too; CLAUDE.md and .claude/ outlive the chat. The same test kills a subtler failure, the fix that “works” only because of an env var you typed inline and the next machine won't have. Committed work is the only work that compounds.
How to practice it
Does this run twice?
Then it's a tracked repo file, not a scratch note.
Freeze the working invocation the instant it works,
into a committed script rather than your scrollback.
Keep config in code.
An env var typed on the command line is missing next run; put it in a committed launcher, an .env/.envrc, or settings.
Put durable agent knowledge in the repo:
CLAUDE.md, .claude/ rules and skills. Tracked files survive context compaction; a chat doesn't.
Scratch is for one-shot probes only.
Delete deliberately.