CLAUDE.md

Every lesson in this course builds one system: a stablecoin reserve attestation registry that discovers issuers, reads the PDFs they publish, and refuses to publish a field it could not read. What it is and where this lesson sits.

Tier
2 Beginner
Build position
12
Throughlines
B Instruction packaging · A Context economics · F Determinism wrapping stochasticity
Verdict
existing practice
Commit
162b411
Demo
scripts/terms/demo-08.ts
Runs in
the course repository

A README the harness reads by itself. Term 4 made some instructions resident, meaning they enter every turn; this makes the loading automatic, so nobody has to remember to attach anything. That is the whole mechanical difference and it is a real convenience.

The part that earns a unit is what the file cannot do. A standing instruction is a request. It is read by something that produces text, and text that violates it is exactly as easy to produce as text that honours it. The file has no execution and no veto: it can ask, and that is the end of its powers.

That is not an argument against writing one. It is an argument about where it sits. CLAUDE.md is where you say what should happen. Term 15 is where you make something happen. This unit measures the distance between those instead of asserting it.

The mechanism

src/claudemd.ts parses the bullets out of the file as rules, prices the whole document with term 3's estimator, and multiplies by the turn count. Then it takes a write that violates a rule stated in plain words and asks two questions about it: what did the standing instruction do, and what did the hook do.

standingOutcome is a constant rather than a variable. A standing instruction has exactly one thing it can do to a write in flight, and coding it as a variable would imply otherwise.

The receipt

artifacts/08-claudemd.json, over forty turns:

CLAUDE.md: 5 rules, 260 tokens, read on every turn

40 turns
  standing   10400 tokens  (260 x 40)
  work         290 tokens
  the file is 97.3% of the run

the write:   publishes "custodian", which extraction listed as unreadable
the rule:    R1  Never publish a field the extractor listed as unreadable
CLAUDE.md:   asked  (a standing instruction has no veto)
the hook:    deny  [unread-fields] field(s) published while listed unreadable: custodian

Ten thousand four hundred tokens for a file that fits on a screen, and the file looks small the whole way. Then the same rule, stated as clearly as it can be stated, fails to stop the one write it names, and eleven lines of code in src/hooks.ts stop it.

What the numbers do not say

Writing the test for that share taught me something I had wrong. I expected the standing share to climb as a run got longer, and asserted it. It does not: both sides scale with the turn count, so the share is a fixed ratio of file size to per-turn work and a longer run simply costs more of both.

What actually moves the share is how small a turn is. A standing file dominates a run of short exchanges and barely registers against long ones. The 97.3% above is a fact about a run of terse instructions, not a fact about run length, and quoting it as though the file gets proportionally worse over time would be wrong. The test that got this backwards is still in tests/claudemd.test.ts with its correction written above it.

Break it first

mutation                                  tests                 demo
file charged once, not per turn           3 failed | 8 passed   exit 0
asterisk bullets not read as rules        2 failed | 9 passed   exit 0
the hook allows everything                1 failed | 10 passed  exit 1
a missing rule invented instead of thrown 1 failed | 10 passed  exit 0

The third row is the one this unit rests on. If the hook allows the violating write, there is no gap between asking and enforcing, the comparison has nothing in it, and the demo exits non-zero rather than printing a contrast that is not there. A unit whose central claim cannot fail is a unit making an assertion.

Where it overlaps

Line B is instruction packaging, and this is the rung where a standing instruction stops needing a human to attach it and still cannot bind anything. Term 4 is the rung below, term 14 makes packages trigger on meaning, term 20 stops loading them when nobody needs them. Line A is context economics: this is the largest fixed cost in the repo and it is paid on every turn. Line F is determinism wrapping stochasticity, and this unit is the negative space around it — the demonstration of what the line is for, made by showing what its absence costs.

A personal teaching project, in development. The registry it builds is a teaching artifact and is not an assurance opinion about any issuer. Not affiliated with or endorsed by any employer, or by any vendor whose tools it describes. Where a unit depends on a specific flag or path, it names the version it was verified against. All units.