The practice card: every lever, its rule, its proof
TL;DR. This is the book's working knowledge compressed to a card: twenty-five rules across input, caching, output, memory, orchestration, and measurement, and, because a rule you cannot test is a slogan, every rule ships with the experiment that would falsify it on your machine, usually in under ten minutes with tools this book already built. Nothing here is new; every row cites the chapter that earned it. Print the one-page version at the end and keep it where you can see it.
Contents
- How to use the card
- Input: what enters the window
- Caching: what you pay again
- Output: what the model writes
- Memory: what survives the session
- Orchestration and sessions
- Measurement: how you know
- The one-page card
- Further reading
- Takeaways
Chapter 16 sequenced the levers into a workflow and Chapter 22 ranked them by measured leverage. This chapter is the third and final compression: the rules alone, each with its proof. The difference from every other best-practices list you have read is the third column. A practice card without falsifiers turns into folklore within a quarter; this one is designed to be re-verified whenever you doubt a row.
How to use the card
Each row is rule, why (with the chapter that measured it), proof. The proofs lean on
four instruments, all free and already on your disk: the /context and /usage panels
(Chapter 21), the transcript scripts (usage_ledger.py,
cache_autopsy.py, session_audit.py), headless runs (claude -p --output-format json,
which returns the answer, the session id, and total_cost_usd), and the A/B protocol of
Chapter 27: fresh sessions, one variable, judge on realized
numbers. When a proof contradicts a rule on your workload, the proof wins; update the card,
not the workload.
Input: what enters the window
| Rule | Why | Prove it |
|---|---|---|
| Read symbols, not files | A one-method question needs 18 tokens, not 118 (Ch 5, Ch 38) | Ask the same code question via language-server tools and via whole-file reads in two fresh sessions; compare Messages growth in /context |
| Retrieve past the knee, and stop | Chunks past the relevance knee are the best-looking wrong context you can buy (Ch 31, Ch 33) | Sweep k with retrieval_lab.py; accuracy flattens while tokens climb |
| Reference bodies out of the prefix, pointer in | Always-loaded wins only above a 97% consult rate (Ch 40) | /context before and after moving the body behind a pointer; static_facts_cost.py for your sizes |
| Compress tool output selectively, judge the net | 3% alone, plus a turn penalty when the agent re-reads what compression dropped (Ch 20, Ch 27) | The Ch 27 A/B: same task, tool off/on, ledger delta vs rtk gain's headline |
| Bound the history | On long sessions, compaction is the single biggest lever, 66% alone (Ch 22) | /clear between tasks for a week; compare cost per task in ccusage |
Caching: what you pay again
| Rule | Why | Prove it |
|---|---|---|
| The prefix is a contract: append, never edit upstream | One mid-session CLAUDE.md edit re-buys the whole conversation above the spine (Ch 24, Ch 44 call 5) | Ch 44 proof 3: edit CLAUDE.md mid-session, watch cache_autopsy.py flag the invalidation |
| Tool schemas sit above everything: change MCP servers between tasks, not during | Invalidation cascades from the top of the prompt (Ch 24) | Toggle an MCP server mid-session; the autopsy shows the read column crash to near zero |
| Respect the TTL; a stale giant session is a purchase | Five walkaway lapses re-bought 2.06M tokens for ~$19.61 vs $1.03 warm (Ch 44) | Ch 44 proof 2: two calls, a 70-minute wait, a third call; the lapse line appears |
Returning tomorrow: /clear + summary beats re-warming | Re-warming a 751k relic cost $7.51 in one line of the autopsy (Ch 44) | Compare next-turn cost after /clear+recap vs --resume on a day-old deep session |
| Fleet sharing is free: subagents and parallel sessions ride the trunk | Call 0 of a "fresh" session already read 15,853 tokens (Ch 43, Ch 44) | Autopsy any new session's call 0; then a subagent's transcript, same shape |
Output: what the model writes
| Rule | Why | Prove it |
|---|---|---|
| Output is priced at 5x input: order the shape you need | Verbose narration was 8% of the lab bill on its own (Ch 4, Ch 22) | Same task, "explain fully" vs "one line per change"; output_tokens in the ledger |
| Schemas beat prose you will parse anyway | Constrained decoding is a logit mask, not a request (Ch 37) | claude -p --json-schema: the answer lands in .structured_output, no parser, no retries |
| Match effort to the task | Mechanical edits do not need maximum reasoning (Ch 4) | A/B a refactor at two effort settings; diff quality and output_tokens |
Memory: what survives the session
| Rule | Why | Prove it |
|---|---|---|
| Persistent is not loaded: pick the rung per body of facts | The loading rule, not the storing, is the bill (Ch 40) | /context audit: every resident token should earn its rent on most turns |
| Update in place; never let two versions coexist | Replay with both versions serves the stale one (Ch 9, Ch 42) | The staleness probe: plant a fact, change it, quiz a fresh session |
| Probe recall on a schedule, not on faith | Commercial assistants drop ~30% across sustained interactions (Ch 42) | probes.tsv + the Recipe 1 loop, monthly and after any memory change |
| Compaction is a behavior contract: focus it, then verify by type | Details and procedures die first; constraints that get dropped get violated (Ch 42) | Plant typed facts, /compact with and without focus, tally survival by type |
Code facts to the language server, decisions to memory, rules to CLAUDE.md | Each store holds only what nothing else can recompute (Ch 40) | Grep your CLAUDE.md for any fact find_symbol or git log could answer; move it out |
Orchestration and sessions
| Rule | Why | Prove it |
|---|---|---|
| Delegate verbose work to subagents | The largest cumulative jump in the lab (79%): raw output stays out of the main window (Ch 13, Ch 22) | Same task with and without delegation; main-window Messages size in /context |
| One task per session | Stale context is re-sent every turn and pollutes attention (Ch 11, Ch 33) | Cost per task across a mixed session vs /clear-separated sessions |
| Benchmark from a bare floor | CLAUDE.md, hooks, and MCP schemas contaminate A/Bs (Ch 42) | claude -p --bare vs plain claude -p, same prompt; compare call 0 write size |
| Resume for continuity, memory for knowledge | Replay decays with distance and TTL; memory does not (Ch 42) | The two-probe pair: --resume quiz vs fresh-session quiz |
Measurement: how you know
| Rule | Why | Prove it |
|---|---|---|
| One variable, fresh sessions, realized numbers | Two tools toggled together tell you nothing about either (Ch 27) | The bench protocol, verbatim |
| Evidence order: transcript, gauges, vendor claims | The per-command ratio, the realized share, and the net effect shrink in that order (Ch 20, Ch 44) | Reproduce any claim as a shape in cache_autopsy.py within ten minutes, or shelve it |
| Grade with a model that did not write the answer | Self-enhancement bias is documented, not hypothetical (Ch 42) | Re-grade one eval with the generator as judge; watch the scores drift up |
| Re-baseline on every model swap | Vendor guidance says it plainly: run your evals, re-measure cost and latency (Ch 42) | Hold probes.tsv constant, change --model, diff the scorecard and total_cost_usd |
The one-page card
+----------------------------------------------------------------------+
| CONTEXT ENGINEERING: THE PRACTICE CARD |
| |
| INPUT symbols not files | retrieve to the knee | pointers not |
| bodies | compress selectively, judge net | bound history |
| CACHE append, never edit upstream | MCP changes between tasks |
| | mind the TTL | /clear+recap beats re-warming a relic |
| | the fleet shares the trunk |
| OUTPUT it costs 5x: order the shape | schemas not prose | match |
| effort to the task |
| MEMORY loaded != persistent: pick the rung | update in place |
| | probe recall monthly | focus compaction, verify by |
| type | code->LSP, decisions->memory, rules->CLAUDE.md |
| SESSIONS delegate verbose work | one task per session | --bare |
| for benchmarks | resume=replay, memory=knowledge |
| MEASURE one variable, fresh sessions | transcript > gauges > |
| claims | independent judge | re-baseline on model swaps |
| |
| Every rule is falsifiable on your machine. When a proof |
| contradicts a row on your workload, the proof wins. |
+----------------------------------------------------------------------+
Remember. The card is a snapshot of measurements, not commandments. Prices, TTLs, window sizes, and model behavior all drift; the proofs are the durable part. A year from now, re-run the proofs and rewrite the rules that lost.
Further reading
- Chapter 16 and Chapter 22: the workflow and the leverage ranking behind the ordering here.
- Chapter 30: every gauge referenced in the proof column, in one place.
- Chapter 44: the proof-session pattern this card generalizes.
Takeaways
- Twenty-five rules, six families, and no row without a falsifier: input (read less, bound
history), caching (append-only prefixes, TTL discipline, fleet sharing), output (5x, order
the shape), memory (rungs, update-in-place, typed compaction probes), sessions (delegate,
isolate,
--bare), measurement (one variable, independent judge, transcript first). - The proofs run on four free instruments: the panels, the transcript scripts, headless JSON runs, and the A/B protocol.
- When proof and rule disagree on your workload, the proof wins; the card is maintained by re-running it, not by believing it.
👉 The card compresses what this book measured; one part remains for what it assumed. Every chapter counted tokens, priced output above input, and trusted the window to hold a million of them, and each of those facts has machinery underneath: a tokenizer, a two-phase forward pass, and a stretched positional encoding. Continue to The tokenizer.