Skip to content

More candidates than the policy cap, or a candidate older than the policy age, is an advisory doctor finding that names them; both numbers are declared once in the policy

The review queue is measured. doctor prints WARN knowledge and exits 0 when more records under candidates/ carry status: candidate than knowledge.candidates_max_files, when a candidate has waited longer than knowledge.candidate_max_age_minutes, or when a candidate is present on disk and not tracked by version control. Each finding names the paths. Both numbers are declared once in .ai/repo/policy.yaml and read by every surface, and a policy that declares neither is reported at the rule's own class, naming the missing key.

declared statusdeclared status: guaranteed Declared deterministic and blocking, implemented, and naming the behavioural test that is to prove it. Whether a recorded run supports it is the evidence verdict, shown beside it.

recorded evidencerecorded evidence: not run Declared guaranteed, and not supported by a recorded run: the test is named, and no passing run of the current inputs is recorded. how evidence is recorded

knowledge.candidates_max_files and knowledge.candidate_max_age_minutes are read with mj_pol_req and a missing key is reported at the rule's class. Review age is the age of the queue entry — the oldest knowledge.derived line naming the file, then the commit that added it, then the record's date — never the evidence day alone. A candidate version control does not track is named too, with the git add remedy after fix:, because a record git does not hold is discovered by nothing. The rule is dispatched from doctor only, so a full review queue never turns watch red.

What it means

The review queue is measured. doctor prints WARN knowledge and exits 0 when more records under candidates/ carry status: candidate than knowledge.candidates_max_files, when a candidate has waited longer than knowledge.candidate_max_age_minutes, or when a candidate is present on disk and not tracked by version control. Each finding names the paths. Both numbers are declared once in .ai/repo/policy.yaml and read by every surface, and a policy that declares neither is reported at the rule's own class, naming the missing key.

How it works

mj_validate_knowledge_accumulation in lib/knowledge.sh reads both keys with mj_pol_req, counts the files whose status is candidate (a superseded record stays in the directory and counts toward neither), and measures each candidate's review age from the oldest knowledge.derived line whose paths names the file, falling back to the commit that added the file and only then to the record's date; the finding says which source it used. Untracked files are read from git status --porcelain over the directory, and the remedy git add .ai/repo/knowledge/candidates && majordomus derive follows fix:. The rule majordomus.candidates-reviewed is advisory and dispatched from doctor only, because under watch an advisory finding is drift and exits 11, and a full review queue must not turn watch red in a hook.

How to see it

majordomus doctor | grep -E 'knowledge'                 # OK knowledge ... or WARN knowledge candidates ... over cap
majordomus knowledge candidates                         # the queue the cap is measured over
git status --porcelain .ai/repo/knowledge/candidates    # the untracked ones a WARN names
git add .ai/repo/knowledge/candidates && majordomus derive
majordomus watch; echo "exit $?"                        # unaffected by this rule

What it does not cover

It empties nothing. Whether a candidate deserves promotion is a person's judgement, and a machine that emptied the queue would be making it. It does not measure curated/, which is authored content, and it does not count superseded records, which are the rejections a person already made.

Why it exists

The deriver writes a candidate at every episode boundary that produced evidence, and nothing removes one except a person. Left alone, the directory grows, and project.accumulation-is-measured says that anything which grows on its own is measured and reported before it is a problem. The age is the queue entry's and not the evidence's because a record's date is the evidence day, kept deterministic, and a candidate derived today from last month's decision has been waiting one day. .ai/repo/adrs/0091-knowledge-is-derived-at-the-episode-boundary-and-a-person-promotes-it.md records both.

Detail rendered from docs/claims/candidates-reviewed-not-accumulated.md.

From the statement to the proof

  1. 1 · the public statement

    More candidates than the policy cap, or a candidate older than the policy age, is an advisory doctor finding that names them; both numbers are declared once in the policy

    Made on Doctor.

  2. 2 · the canonical claim

    candidates-reviewed-not-accumulateddeclared status: guaranteed in docs/CLAIMS.yaml

    Defined in read it on this site · docs/KNOWLEDGE.md

  3. 3 · the implementation

    lib/knowledge.sh · majordomus knowledge

  4. 4 · the test and the scenarios

    Test: test/cases/711_candidates_are_reviewed_not_accumulated.sh

  5. 5 · the recorded runs

    recorded evidence: not run how evidence is recorded

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 711_candidates_are_reviewed_not_accumulated

Where this claim is used

responsibilities it covers

Related claims same implementation

Searches the titles and descriptions of every page this site publishes.