notes

Counted claims: a number in the prose is a claim, and a gate can keep it

The name counted-claims.md, and the phrase "counted claim" it introduces, are provisional. A lane ships a provisional name and says so; naming is an architect's (AGENTS.md). The evidence this page has no room for is in counted-claims/.

DECISIONS §39 says a name is a claim, made before a reader sees a line of code. So is a number, and a number is the kind of claim a machine can check. That difference is the whole of this convention: names need a person, counts do not.

The evidence

Three claimed counts were tested against the tree on 2026-08-14. All three were wrong, and two of them disagreed with each other as well as with the tree.

the claim where it lived the tree, that day
"the 23 #!/bin/sh scripts" script/lint, .github/workflows/ci.yml 36
"107 harnesses across 19 crates" notes/verification.md 110 across 19
"112 Kani proof harnesses" CLAUDE.md 110

Every one of them had been right when it was written. That is the finding rather than a detail: each number is a snapshot of whenever somebody last counted, and nobody re-derives one. The 23 had drifted by thirteen and sat in two files, neither of which knew about the other.

Two days later, when this convention was built, the harness count had moved again, to 119 across 21. It moves whenever anyone lands a proof, which is what makes a hand-maintained number hopeless and a derived one free.

The convention

Put an HTML comment after the number, naming the count it vouches for:

**119 harnesses** <!--count:kani-harnesses--> across 21 crates <!--count:harness-crates-->

script/lint finds every marker, re-derives that count from the tree, and fails on a mismatch, naming both values and the file and line. The marker is plain HTML-comment syntax, so it is invisible in rendered markdown and legal as ordinary text inside a YAML or shell # comment, which is why the same spelling works in .github/workflows/ci.yml as in a note.

The number a marker vouches for is the last integer on the line before it, commas allowed, so 1,303 commits <!--count:...--> works. Last rather than first, so that a line carrying two counts binds each marker to the number just in front of it. notes/unsafe-obligations.md is the live case and it writes crates before harnesses, the opposite order to everywhere else, which is exactly why the rule is positional rather than clever.

A marker inside a fenced block or a backtick span is ignored. The block above is an example of the convention, not an assertion about the tree, and so is the one in the roadmap; a marker written as inline code is being named rather than used. Fenced blocks only, though: an indented code block is not recognized (see BUGS).

The registry

The other half lives in script/lint, one entry per name. Each entry carries the question it answers, in the prose's own words, and a derivation.

name the question it answers derived from
kani-harnesses how many Kani proof harnesses the tree carries, which is what script/verify proves #[kani::proof…] alone on its line, in any workspace package
harness-crates how many workspace packages carry at least one Kani proof harness distinct packages among those files
sh-scripts how many #!/bin/sh scripts there are under script/ and helpers/, which is the set shellcheck gates files whose first line is exactly #!/bin/sh
system_calls how many system call numbers the ABI defines, which is the whole width of the trap pub const SYSTEM_CALL_*: u64 in nifeos/moho_abi/src/lib.rs
rights-bits how many named single-bit rights a capability can carry pub const NAME: u64 = 1 << N in nifeos/moho_abi/src/rights.rs
loom-harnesses how many loom harnesses the tree carries, which is what script/interleaving-check runs loom::model( calls in crates//*.rs
loom-crates how many crates carry at least one loom harness distinct crate directories among those files

The last four arrived with the 2026-08-17 documentation sweep, whose lens was the ABI. system_calls exists because the ABI crate's own front page, the kernel's system call module, an Error variant's description and two notes all said the surface was three calls; SYS_CAPABILITY_DELETE had landed three weeks earlier and moved none of them. rights-bits exists because ENUMERATE made the rights four and notes/capability-lifecycle.md still said three the next day. The loom-* pair is the one this note asked for by name: it cited notes/interleaving.md as the claim a marker could never reach, and measuring it in order to mark it found it wrong in both halves.

The question is not decoration, it is the entry's most important field. "How many #!/bin/sh scripts" has at least three defensible answers: ls script/ gives 37, the shellcheck glob script/* helpers/*.sh gives 40, and "files that literally begin #!/bin/sh" gives 40 today and could give fewer tomorrow. A gate that answers a subtly different question than a human would is worse than no gate, because it fails a document that is right, and the way it gets fixed is by somebody deleting the marker.

EXAMPLES

Adding a new marked count

The worked example, the tree's harness count from nothing to gated, is in adding-a-count.md. In short:

  1. Decide the question, and write it as a sentence. If you cannot write it without an "or", you have two counts.
  2. Write the derivation and check it against the real shapes, not the ones you expect. The harness grep found 123 where the answer was 119: two hits are in the vendored RedoxFS, which this suite has never proved, and two are doc comments in helpers/kani-lint-shim/.
  3. Add the registry entry to the ==> counted claims block in script/lint, with a docstring saying what shape it assumes.
  4. Mark the sites: the marker after the number, on the same line.
  5. Run the gate. It prints one line on success, and on failure names the file, the line and both values, with the question the derivation answers.

What it found on its first runs

Two things, recorded in first-runs.md. The harness-crates derivation disagreed with script/verify's hand-kept table by one: multicast_dns_protocol had never been added, so its three harnesses were never proved. And documenting the check overflowed the markdown renderer's line buffer.

What this is not

It is a ratchet, not a sweep. An unmarked number stays unchecked. The population grows as people touch numbers, not in one pass, and there is deliberately no attempt at tree-wide markup.

The posture is script/names --check's, which is the closest relative in the tree. That gate insists a name carry a provenance state and never that the state be ratified, because a gate demanding ratification would block every unrelated merge behind a review queue. The same restraint here. Insist a marked number be right; never insist that every number be marked.

Two neighboring classes were measured and deliberately excluded, so nobody builds them here by mistake:

Three relations, and equality is the wrong one for anything that moves

**124 harnesses** <!--count:kani-harnesses-->                  a census: must EQUAL the tree
**over 100 harnesses** <!--count-at-least:kani-harnesses-->    a floor: fires when the count DROPS
**at most 60** <!--count-at-most:unsafe-density-outside-arch--> a ceiling: fires when it RISES

Why the second exists, measured 2026-08-17. kani-harnesses was marked at four claim sites and the count moved three times in one day. So every lane that added a harness had to edit four files, one of them README.md, which nearly every other lane touches as well. The convention had manufactured a merge hotspot that the tree itself did not have, and it did it to the file with the most traffic in the repository.

Reading what each site actually claimed split them cleanly, and that is the reusable part:

Site What it claims Relation
notes/verification.md the canonical census, with its own history equality
notes/unsafe-obligations.md "exactly five Kani items, any (287), proof (124)" equality
README.md coverage and scale, in a table row about script/verify floor
notes/fuzzing.md comparative context for a different technique floor

For a monotonically growing quantity, a floor is the true claim and an exact equality is a maintenance tax that buys nothing. "Over 100 harnesses" is what those two sentences were really asserting. The exact figure was incidental to the point they were making, and it cost a four-file edit every time somebody proved something new.

The ratchet is intact, which is the only test that matters. A floor that goes false still fails the build, and going false means harnesses were deleted, which is precisely the event worth catching and the one an equality check was drowning in noise. Rounded to 100 it will not move for months, and when it does, moving it is a deliberate act rather than bookkeeping.

The ceiling, which is the floor read upside down

The floor suits a quantity where more is better. Unsafe is the other way up: the bad event is an upward drift no single commit looks responsible for, and only a ceiling says "and it should not grow". A ceiling is written above the tree, with headroom measured rather than guessed, unless the population is small and consequential enough that every addition deserves the stop. Choosing the quantity matters as much as the relation: a count of unsafe blocks would fire on almost every lane, while a density holds a trend that is already falling. An auto-fix that rewrote marked numbers was refused, because it biases every disagreement toward "fix the number" when the real bugs are where the derivation is wrong. the-ceiling.md has the measurements, the agents-md-lines ceiling that became a two-way ratchet and was retired on 2026-10-06, and the refusal in full.

BUGS