Skip to content

A hardcoded count in the always-loaded file is a failure

The always-loaded instruction file must not contain sentences like "14 agents", "97 apps" or "63 skills". Counts written into prose are stale within days and a worker reads them as fact. The rule is: write the command that computes the number, never the number. doctor fails on a digit sequence next to the words that usually carry such counts.

guaranteed Deterministic and blocking. Implemented, and a behavioural test proves it.

What it means

The always-loaded instruction file must not contain sentences like "14 agents", "97 apps" or "63 skills". Counts written into prose are stale within days and a worker reads them as fact. The rule is: write the command that computes the number, never the number. doctor fails on a digit sequence next to the words that usually carry such counts.

How it works

lib/doctor.sh greps the always-loaded projection for a number followed by agents, files, apps, commands, skills or rules. Any match is a failing finding with a reproduce command. The rule is deliberately narrow and lexical so it cannot be argued with.

How to see it

printf '\nThis repository has 12 agents.\n' >> AGENTS.md
majordomus doctor
# FAIL projection  AGENTS.md — content differs from its own stamp (hand-edited?)
# FAIL counts      AGENTS.md — hardcoded count in always-loaded context  [reproduce: grep -nE '[0-9]+ (agents|files|apps|commands|skills|rules)' AGENTS.md]

The generated file is a bootstrap, so the count has to be introduced by hand or through a repository override of the adapter under its providers section; either way the check reads the file on disk and reports the count on its own line, beside the stamp mismatch.

What it does not cover

Counts phrased without those nouns pass. The check catches the common lie, not every lie.

Why it exists

In the source environment five authority files gave five different application counts, three agent counts and five pillar counts, some contradicting each other fifteen lines apart in the same file. A validator existed to catch it and still found fifteen discrepancies after a cleanup.

Detail rendered from docs/claims/no-counts-in-context.md.

Provenance

defined in
read it on this site · docs/DESIGN.md
implemented in
lib/doctor.sh · majordomus doctor
proved by
test/cases/03_update.sh
claim id
no-counts-in-context

Verify it yourself

The test runs in a disposable temporary repository and asserts the behaviour, not a string in the source.

from a clone of the repository
bash test/run.sh 03_update

Where this claim is used

responsibilities it covers

Related claims same implementation

The moments this answers