Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction

claims checks whether what your documentation says about your code is actually true. It decides by executing against the artifact the prose describes — running the command, resolving the symbol, walking the git history — never by matching words that happen to sit near a claim.

The failure it is built for

Most doc-integrity tooling watches for drift: a document and the code it describes agreed once, then diverged, and the tool’s job is to notice the divergence. That model has a blind spot, and it is the more common failure. Prose is very often wrong the day it is written — a flag that was renamed before the sentence naming it was typed, a default copied from a sibling project, a “runs in under a second” nobody ever timed. Nothing diverged, because the two were never together. A drift detector has nothing to compare.

So claims does not ask whether the code changed since the prose was written. It asks whether the prose is true now, and it finds out the only way that answer is available: by going and looking.

What it does with an answer

Thirteen checks run over a commit’s own diff. Most of what they report is advisory: surfaced alongside the commit and never failing the run, because the check ranks, samples or suspects rather than decides. A finding that names a claim the tool has actually disproved — a link with no target, a cited symbol the repository no longer declares, a command whose real output differs from the block beneath it — is a gate, and blocks the commit it is attached to, because it is both certain and cheapest to fix while you are still holding the context.

One advisory check hands off rather than deciding at all: it works out which architecture-or-intent claims a diff has put in doubt and surfaces each as a candidate for an agent to judge against the cited code.

Where it runs

claims gates commits as a git pre-commit hook, so a commit is checked whoever makes it. As a Claude Code plugin it adds a skill that runs the same checks on demand mid-task, and a reminder when a project that uses claims has no hook installed. The checks also run as a plain CLI for a CI step.

Next

Installation has the commands, for a plugin install, a git pre-commit hook and the CLI alike.

Installing claims in a consuming project

claims is a Claude Code plugin installed straight from this repository’s git URL. There is no central marketplace listing to go through, because the repository carries its own: a .claude-plugin/marketplace.json that names itself as a marketplace called claims, listing a single plugin, also called claims, whose source is the repository root. A consuming project registers the git URL as a marketplace and installs from it.

Install

From inside the consuming project:

claude plugin marketplace add https://github.com/or1can/claims.git --scope project
claude plugin install claims@claims --scope project

The first command registers this repository as a marketplace named claims, the name its own listing declares. The second installs the plugin that listing holds, also named claims, hence claims@claims. That single install gives the project the check-claims skill, the judgment-agent subagent the skill invokes, and a reminder when the commit gate is not installed.

The commit gate itself is a git pre-commit hook, installed separately as the next section describes, so it gates every commit, not only those Claude Code makes. It gates a commit only in a repository with a claims.toml at its root, and an empty one is enough. Create it to turn the gate on:

touch claims.toml

Without it the hook does nothing, so a repository that has not adopted claims is not gated.

When a Claude Code session starts in a repository with a root claims.toml, or moves into one, and no installed hook there runs claims, the plugin says so: the agent is told the gate is not active, and a one-line message tells you the same. Not every host shows that message, Zed among them, so the agent is also asked to tell you once; in a terminal you may hear it twice. It counts the hook as installed when claims appears in a file in the repository’s git hooks directory, core.hooksPath included, or when that directory holds a pre-commit hook and claims appears in .pre-commit-config.yaml, lefthook’s configuration under any of the names lefthook reads, or .husky/pre-commit. A configuration committed without pre-commit install or its equivalent having been run is not a hook, so a fresh clone is reminded. After a change of directory the reminder comes with your next prompt, and each repository is mentioned once per session after the session starts. A repository with [hook] enabled = false is not reminded, and nor is a clone where you have chosen not to install the hook and said so in its claims.local.toml, as Silencing the reminder in one clone describes. The reminder never blocks anything.

--scope project writes both declarations into the project’s own .claude/settings.json, so the dependency is explicit and travels with the repository, and a second developer cloning it is offered the same install. Both commands default to user scope, this machine’s global config, when the flag is omitted. That is fine for a quick personal try.

Whichever scope is used, the marketplace registry itself is machine-wide and keyed by name, and the CLI has no way to register a marketplace under a name its listing does not declare. A later claude plugin marketplace add of a different source also named claims, from any project at any scope, replaces the source for each project on that machine. A checkout of this repository registered as a directory marketplace for its own development is the common way to hit that.

Verify with:

claude plugin details claims@claims
claims 0.16.0
  Description: Checks documentation and agent-instruction claims against the code they describe.
  Source: claims@claims

Component inventory
  Skills (1)  check-claims
  Agents (0)
  Hooks (3)  SessionStart, UserPromptSubmit, CwdChanged  (harness-only — no model context cost)
  MCP servers (0)
  LSP servers (0)

Projected token cost
  Always-on:   ~96 tok   added to every session

Per-component (rounded)
  component     always-on  on-invoke
  check-claims       ~100      ~3.6k

  On-invoke cost is paid each time a skill or agent fires.
  Token counts are estimates and may differ from actual usage.

Captured from claude plugin details claims@claims in a throwaway project, as the next command after the install commands above.

The three hooks are the reminder described above. The inventory counts no agent, though the plugin manifest declares one. The judgment-agent subagent loads all the same, as claims:judgment-agent, and the check-claims skill invokes it once per candidate.

Pinned at install, explicit update. The install records the commit it resolved, and the plugin keeps running that commit until the project updates it. That is deliberate for a plugin that gates commits: an upstream change to this repository does not start deciding a project’s commits differently until someone chose to pull it in. To update:

claude plugin update claims@claims --scope project
Checking for updates for plugin "claims@claims" at project scope…
✔ claims is already at the latest version (0.16.0).

Captured from the same throwaway project, straight after the install, so there was nothing newer to fetch. The shorter claude plugin update claims finds the same project-scoped install.

The git pre-commit hook

The commit gate is a git pre-commit hook, so git runs it on every commit to the repository, whether Claude Code, a person in a terminal or any other tool makes it, and in whichever repository the commit lands. For each commit:

  • no root claims.toml, or [hook] enabled = false in it: nothing runs, and the commit goes ahead;
  • a check switched off with its own enabled = false is left out;
  • a gate finding, a claims.toml that does not parse, or no check registered at all: the findings or the reason are printed, and the commit is blocked;
  • an unmarked finding from a check listed under [hook] fail_on_unmarked: the findings are printed, and the commit is blocked;
  • any other advisory findings: they are printed, and the commit goes ahead.

An error inside claims itself prints a warning and lets the commit go ahead, so a broken install does not block every commit.

The hook is a Python package with no third-party dependency, and needs Python 3.11 or later. Its command is claims-pre-commit, which takes no arguments and runs in the repository git calls it from. Each release is tagged v<version> in this repository, and every setup below pins one.

pre-commit and uvx each run the hook in an environment of their own, put first on PATH, and a command granted in claims.local.toml runs exactly as written, with that PATH. A bare python3 in a granted command is then the hook’s own Python, without the project’s dependencies. A command that needs the project’s environment names it, as executable-claims describes, and then runs the same under any hook and on the command line.

pre-commit

With pre-commit, add the hook to the project’s .pre-commit-config.yaml:

repos:
  - repo: https://github.com/or1can/claims
    rev: <tag>
    hooks:
      - id: claims

Then pre-commit install, as for any other hook. pre-commit builds its own environment for the hook, so nothing else needs installing. The hook is verbose, so its advisory findings are shown on a commit it lets through; pre-commit hides a passing hook’s output otherwise.

lefthook, husky, or a plain git hook

The other setups run the command through uvx, which fetches the tagged release into a cached environment of its own. With lefthook, in lefthook.yml:

pre-commit:
  commands:
    claims:
      run: uvx --from git+https://github.com/or1can/claims@<tag> claims-pre-commit

With husky, in .husky/pre-commit:

uvx --from git+https://github.com/or1can/claims@<tag> claims-pre-commit

As a plain git hook, in .git/hooks/pre-commit, made executable:

#!/bin/sh
exec uvx --from git+https://github.com/or1can/claims@<tag> claims-pre-commit

pip install git+https://github.com/or1can/claims@<tag> installs the same claims-pre-commit command, for a setup that calls it from an existing environment instead.

Skipping the hook

git commit --no-verify skips every git pre-commit hook, this one included. To stop Claude Code from using it, add a deny rule to the project’s .claude/settings.json:

{
  "permissions": {
    "deny": ["Bash(git commit *--no-verify*)"]
  }
}

The rule matches the flag anywhere after git commit. It does not match the short form -n, or a commit made any way other than a plain git commit command, so it stops the obvious route rather than every one.

The command line

The same checks are also a plain command line, python3 -m claims.cli, for a CI step or a one-off run:

python3 -m claims.cli --repo-root <path> --diff-range <range>

--repo-root defaults to the current directory and --diff-range to HEAD, the working tree against the last commit. The command prints each finding, then a summary line of the form N checked, M finding(s), G gate failure(s), and exits with the code below. When checked marks kept findings quiet, the summary line adds , Q quiet while checked (then , P of them partly when partial marks kept some of them quiet), and when the range added checked marks it adds , A mark(s) added in range. Findings that cite the same line with the same message and the same severity print as one line, with every mode that reported them in its parentheses; M still counts each one. The commit hook prints its findings the same way.

The exit code is:

  • 0 when no finding is a gate finding, advisory findings included, apart from the case 3 names;
  • 1 on a gate finding, or when no check at all is registered, which is reported as a failure and not as a clean pass;
  • 2 when claims.toml exists and does not parse, or an option is misused;
  • 3 under --fail-on-unmarked, when no finding is a gate finding but an advisory finding no checked mark keeps quiet is in scope, as Checked marks describes.

The commit hook and the CLI differ in two respects. The hook runs only in a repository with a root claims.toml, and the CLI runs anywhere, with every check on its defaults where the file is missing. The hook also honours the switches that take a check, or the gate as a whole, out of the commit-time decision, and the CLI ignores both, so a check silenced at commit time is still reported here. Those switches are on Configuring claims.

The CLI runs from a checkout of this repository, pointed at with PYTHONPATH:

# a CI job step, e.g. GitHub Actions
- uses: actions/checkout@v7
  with:
    repository: or1can/claims
    ref: <tag>
    path: claims
- run: PYTHONPATH=claims python3 -m claims.cli --repo-root .

What differs from the full Claude Code experience. Outside Claude Code, through either the git hook or the CLI, each mechanical check runs as it does at commit time, with the same gate and advisory split. What needs a model to interpret what the mechanical half sets up does not happen here:

  • judgment-agent’s candidates stay candidates. The check computes which claims cite a subject the diff added or removed and reports each as an advisory finding. The verdict on each is a separate step, the claims:judgment-agent subagent, which the check-claims skill invokes and neither the git hook nor the CLI does. Run this way, the candidate lines are printed and left, to read against the cited code yourself; see judgment-agent.
  • The skill’s on-demand claims.toml review does not run. Whether a project’s own configuration is doing anything, a stale exclude glob matching no file, say, is reasoned prose the check-claims skill produces on request. It is not a finding, was not part of the CLI’s output to begin with, and nothing here replaces it.

claims.toml

At the consuming project’s repository root, and required for the commit hook: without it the hook runs no check. An empty file opts in with each check on its own defaults, so there is nothing more to configure to get started. The check-claims skill and the CLI run with or without it. Each top-level table is a single check’s own configuration section, named for the check.

A check’s own keys are documented with that check. The settings no single check owns, switching the commit gate off, silencing a check at commit time, and the git-ignored claims.local.toml that governs what a check may execute, are on Configuring claims.

Next

Tutorial: documenting a release has you commit a wrong doc in a practice project, have the real commit hook refuse it, fix it, and have the push refused on the advisory finding nobody has marked as read, then mark it checked and push again.

Tutorial: documenting a release

In this tutorial you document how to cut a release of a small practice project, make a mistake in the doc, watch the real commit hook refuse the commit, fix it, watch the push hook refuse the push, then check the claim, mark it checked and push again. You type every command yourself, and every block of output on this page is what those same commands print.

Setting up

First you build the practice project, Acme, inside your clone of this repository. You need git and uv and nothing else; the first run fetches hatchling, which this repository builds with, so it needs a network connection.

Run, from the root of your clone:

uv run -q scripts/tutorial.py setup

Captured from a clone of this repository:

$ uv run -q scripts/tutorial.py setup
Acme is ready: cd .tutorial/acme

Then cd .tutorial/acme. Every later command on this page runs there. .tutorial/ is gitignored, so Acme never shows up in your clone’s own git status, and running setup again deletes Acme and builds it afresh from the start, which is the way back from any mistake.

Acme starts with one doc, RELEASING.md:

# Releasing Acme

Current version:

<!-- verify: cat VERSION -->

1.0.0

The <!-- verify: cat VERSION --> marker says the block beneath it is what cat VERSION prints, and executable-claims runs the command and compares on every commit. VERSION holds 1.0.0, so it passes quietly. A command runs only if this machine has granted it, in a claims.local.toml that git does not track; setup copies one granting cat VERSION into Acme, and Acme’s .gitignore keeps it untracked. A fresh clone of a real project has no grants until you write your own.

claims.toml turns the commit hook on, and names the one file claim-words reads:

[claim-words]
files = ["RELEASING.md"]

scripts/release.sh is how Acme is released:

#!/bin/sh
# Tags the current commit with the version in VERSION, then pushes the
# branch and the tag together.
set -e
version=$(cat VERSION)
git tag -a "v$version" -m "Acme $version"
git push --follow-tags

Setup installs two hooks. pre-commit runs on every git commit:

#!/bin/sh
exec uv run -q python -m claims.pre_commit

pre-push runs on every git push:

#!/bin/sh
exec uv run -q python -m claims.cli --fail-on-unmarked --diff-range origin/main...HEAD

Both run the claims in your clone, through uv, so the tutorial needs no release installed. They are not the hook Installation tells a real project to install, which pins a tagged release; don’t copy them into one.

Setup leaves your own git configuration alone. It creates Acme with -b main, so its branch is main whatever your init.defaultBranch says, pushes Acme’s first commit to a bare remote, origin, beside it in .tutorial/, and sets two options of its own with git config:

  • core.hooksPath points git at the two hooks above, where they sit in your clone.
  • commit.gpgsign=false, so that a global setting to sign every commit doesn’t stop a practice commit to ask for a key.

Committing a wrong doc

Now you add two lines to RELEASING.md and try to commit them. Make your copy match this.

RELEASING.md now reads:

# Releasing Acme

Current version:

<!-- verify: cat VERSION -->

1.0.0


To cut a release, run `scripts/deploy.sh`.

Every release is tagged before it is pushed.

Run:

git add RELEASING.md
git diff --cached
git commit -m "Document releasing"

Captured from a fresh .tutorial/acme after the steps above:

$ git add RELEASING.md

$ git diff --cached
diff --git a/RELEASING.md b/RELEASING.md
index 6513644..8c61af9 100644
--- a/RELEASING.md
+++ b/RELEASING.md
@@ -6,3 +6,7 @@ Current version:

1.0.0

+
+To cut a release, run `scripts/deploy.sh`.
+
+Every release is tagged before it is pushed.

$ git commit -m "Document releasing"
[GATE] RELEASING.md:10 (check-file-refs) `scripts/deploy.sh` does not resolve to a tracked file
[advisory] RELEASING.md:12 (claim-words-totalising) Every release is tagged before it is pushed.
[exit 1]

The commit hashes and git’s own messages you see will differ from this page, as your identity, dates and git version differ. The claims lines, the ones starting [GATE] and [advisory], should match.

The commit is refused by the first of them, a gate finding from check-file-refs. A gate finding is a claim claims has proved false, and it blocks the commit until the doc is fixed. The second line is an advisory finding from claim-words: “Every release” is a sweeping claim that may well be true, so it is printed for someone to check, and it blocks nothing.

Fixing it

Now you correct the script’s name to the one Acme has, and commit again.

RELEASING.md now reads:

# Releasing Acme

Current version:

<!-- verify: cat VERSION -->

1.0.0


To cut a release, run `scripts/release.sh`.

Every release is tagged before it is pushed.

Run:

git diff
git add RELEASING.md
git commit -m "Document releasing"

Captured from a fresh .tutorial/acme after the steps above:

$ git diff
diff --git a/RELEASING.md b/RELEASING.md
index 8c61af9..1c732d0 100644
--- a/RELEASING.md
+++ b/RELEASING.md
@@ -7,6 +7,6 @@ Current version:
 1.0.0

-To cut a release, run scripts/deploy.sh. +To cut a release, run scripts/release.sh.

Every release is tagged before it is pushed.

$ git add RELEASING.md

$ git commit -m “Document releasing” [advisory] RELEASING.md:12 (claim-words-totalising) Every release is tagged before it is pushed. [main a5a1fdd] Document releasing 1 file changed, 4 insertions(+)


`git diff`, without `--cached`, compares your copy with what you staged
in the last step, so it shows only the correction. The `git add` before
the refused commit staged the rest, and nothing has been committed
since.

With `scripts/release.sh` <!-- example --> tracked,
[check-file-refs](checks/check-file-refs.md) has nothing to report, and
the commit lands. The [claim-words](checks/claim-words.md) advisory
finding prints again, because the sentence is unchanged, and this time
it is the only finding, so nothing stops the commit. That is the
difference between the two severities, which
[Concepts](concepts.md#gate-versus-advisory) sets out in full.

## Pushing

Now you push the commit to Acme's remote.

Run:

```sh
git push

Captured from a fresh .tutorial/acme after the steps above:

$ git push
[advisory] RELEASING.md:12 (claim-words-totalising) Every release is tagged before it is pushed.
13 checked, 1 finding(s), 0 gate failure(s), 1 unmarked
failing: 1 unmarked advisory finding(s); fix or mark each
error: failed to push some refs to '../remote.git'
[exit 1]

The push is refused. The pre-push hook runs claims with --fail-on-unmarked, over origin/main...HEAD, the commits the push would send, and that switch fails the run on an unmarked finding: an advisory finding, from a check whose findings can be marked, that no checked mark keeps quiet. The claim-words finding the commit let through is one.

The summary line counts, in order, the checks that ran, the findings they reported, how many of those are gate findings, and, because of --fail-on-unmarked, how many are unmarked. The failing: line after it is printed only when unmarked findings fail the run.

claims itself exits 3 on a run that fails this way, as the command line lists. git reports any refusing pre-push hook as its own failure, so the exit code you see from git push is 1.

Marking the claim checked

Now you read the script the sentence is about, and, finding the sentence true, record a checked mark that says so.

Run:

cat scripts/release.sh
echo 'RELEASING.md:12 claim-words-totalising scripts/release.sh runs git tag before git push' | uv run -q python -m claims.cli mark-checked --diff-range origin/main
cat claims.checked.toml
git add claims.checked.toml
git commit -m "Mark the release claim checked"

Captured from a fresh .tutorial/acme after the steps above:

$ cat scripts/release.sh
#!/bin/sh
# Tags the current commit with the version in VERSION, then pushes the
# branch and the tag together.
set -e
version=$(cat VERSION)
git tag -a "v$version" -m "Acme $version"
git push --follow-tags

$ echo 'RELEASING.md:12 claim-words-totalising scripts/release.sh runs git tag before git push' | uv run -q python -m claims.cli mark-checked --diff-range origin/main
marked 1 finding(s) in claims.checked.toml

$ cat claims.checked.toml
[[mark]]
file = "RELEASING.md"
mode = "claim-words-totalising"
unit = "b498eb80b8408ec9"
copies = 1
note = "scripts/release.sh runs git tag before git push"
subjects = {}

$ git add claims.checked.toml

$ git commit -m "Mark the release claim checked"
[main eb29022] Mark the release claim checked
 1 file changed, 7 insertions(+)
 create mode 100644 claims.checked.toml

scripts/release.sh runs git tag before git push --follow-tags, so a release cut with it is tagged before it is pushed, and the note in the entry piped to mark-checked records that. An entry is the finding’s citation and mode, as the finding line printed them, then what you verified; mark-checked refuses an entry without a note.

mark-checked runs the checks itself and marks only a finding of that run. By default it runs over HEAD, the changes not yet committed, and the sentence was committed when you fixed the doc, so claim-words, which reads only what a diff added, would find nothing there to mark. --diff-range origin/main compares with the remote’s tip instead, so the run covers the commits not yet pushed, where the push found the finding.

The mark is written to claims.checked.toml, which the cat shows. Its unit is a fingerprint of the marked sentence, not something to read or write by hand: the mark follows the sentence rather than its line, and stops applying once a word of it changes, as Units sets out. subjects is empty because the sentence names no file: a mark also stops applying when a file its sentence names changes, so this one does not expire if scripts/release.sh does. The file is committed like any other, and the commit hook has nothing to say about it.

Pushing again

Now you push again.

Run:

git push

Captured from a fresh .tutorial/acme after the steps above:

$ git push
13 checked, 0 finding(s), 0 gate failure(s), 1 quiet while checked, 0 unmarked, 1 mark(s) added in range
To ../remote.git
   4946f30..eb29022  main -> main

The push lands. The claim-words finding is still there, but the mark keeps it quiet, so the summary line counts it as 1 quiet while checked rather than printing it, and 0 unmarked lets the push through. 1 mark(s) added in range says the push carries a new mark, which is the thing for a reviewer to read, as What a run shows explains.

Going further

Next

Concepts defines the vocabulary the rest of the site uses: gate versus advisory, mode, candidate versus verdict, and what makes a claim live or dated.

Concepts

The words a check page uses without stopping to define them. Each is defined here by what claims does with it, not by what a check’s source calls it.

Checks and findings

A check is one question claims asks of the repository: does this command still produce this output, does this link have a target, does this cited name still exist. Every check runs on every invocation, each independently of the rest, and each reports zero or more findings.

A finding is one thing a check found, printed on one line: the severity in brackets, where the finding applies as file:line, the mode in parentheses, and then the message. Every entry point prints the same line, whether the run came from the commit hook, the on-demand skill, or the plain CLI.

Gate versus advisory

A gate finding blocks the commit it is attached to. Through the hook, the git commit is stopped, with every finding of the run printed as the reason; through the CLI, the run exits non-zero. A check is a gate when what it reports is a claim it has actually disproved: a link with no target, a cited symbol the repository no longer declares, a bare path mention that resolves to no tracked file, a command whose real output no longer matches the block beneath it.

An advisory finding is surfaced alongside the commit and never fails the run. A check is advisory when it ranks, samples, or suspects rather than decides: a churn-ranked section, a totalising word, a doc comment that might be spliced. An advisory check can be certain of what it saw and still be advisory, because what it saw is a place to look rather than a claim proved false.

There is one exception, and a run has to ask for it. With --fail-on-unmarked, the CLI fails on an advisory finding that no checked mark keeps quiet, so a CI run can require that each one is read. The commit hook does the same for the checks a project lists under [hook] fail_on_unmarked. The finding itself stays advisory either way. ADR 0012 records why CI covers every markable check and the hook only the listed ones.

Severity belongs to the check, not to the individual finding, and a check that departs from its own severity for one kind of finding says so. A command that times out is reported advisory by an otherwise gate check, because a timeout is no answer rather than a wrong one; a grant file that has been committed is reported as a gate by an otherwise advisory check, because that is a compromise indicator whatever the check’s own severity. Each check states its own severity and its own exceptions.

One gate finding belongs to no check at all: a top-level claims.toml table naming no check is reported under the fixed mode config. Configuring claims covers it.

Mode

The mode is the label in parentheses on a finding line. It names the matching strategy that fired. For a check with one strategy it is the check’s own name, so (check-links) and (stale-claims) read as the check. A check with more than one strategy names the strategy instead, prefixed with the check’s name: (restatement-ngram) and (restatement-whole-line) are the same check’s two ways of matching, and a consumer can count or filter by either without parsing the message.

Diff-scoped and whole-tree

Every check runs against a diff range, and each decides for itself how much of the range matters. A diff-scoped check reads only what the diff added or removed: claim-words sweeps added lines, restatement starts from removed ones, judgment-agent computes what the diff touched, and stale-claims ranks only the sections naming a file the diff changed. A whole-tree check ignores the diff’s content and sweeps every tracked file of the kinds it reads, because what it looks for can be false today regardless of when it was written: a marker’s command, a link, a citation. A whole-tree check therefore reports a pre-existing defect on a commit that never touched it. That is the intended behaviour, and the reason a first run in a project with a history often has more to say than a later one.

Live and dated claims

A live claim is meant to be re-verified against the tree as it stands. A sentence in a specification saying “every check does X” is one: it is wrong the day a check stops doing X, whenever it was written.

A dated claim was true at its writing and is not meant to be re-read against today’s tree. A changelog entry is one, and so is the count in a decision record’s motivation: both describe the tree on the day they were written, and are correct about that day forever.

The distinction is per claim, not per file. A decision record’s consequences are live while its motivation is dated, and a to-do list makes live claims in wording that is temporal by nature.

Designated files

claims does not guess where a project’s live claims are. A project designates files, by listing them under a check’s files key, and a check that reads only designated files reads nothing until the project has. The default is the empty set, so such a check is inert in a project that has not opted in, and finds nothing rather than sweeping everything and hoping.

Designation is per file, so it approximates a per-claim property at file granularity: a file carrying both kinds of claim is designated on which kind predominates.

The retired-quote exemption

Prose often quotes a sentence in order to say what was wrong with it: “we used to say every check gates; that was false.” Read literally, the quoted sentence is still a claim, and a sweep for totalising words would flag it every time. The retired-quote exemption is the rule that a sentence marked as retired is skipped.

A sentence is marked by how it is written: as a Markdown blockquote, wrapped whole in italics, or opening with the fixed lead-in “Previously said:”. An unmarked quotation still fires, on the reasoning that an unmarked quotation is indistinguishable from the claim still being made.

Which of those markers count is decided per check, not once for the whole tool. A blockquote means retirement in a changelog and a callout in a reference page, so whether it counts depends on which prose a check reads. Each check that has an exemption states its own set. The reasoning is in ADR 0003.

Candidate, subject, verdict

A subject is the code a claim names: a file by path, a symbol in backticks, a script beside a flag. Resolving the subject is the first thing most checks do. A claim that names no subject at all is out of their reach, because there is nothing to execute against; a sweep of designated files for the words such a claim is made of is as far as a check can go with it.

A candidate is a claim a check has put in doubt without deciding it. A section whose subjects have churned since it was written is a candidate; a citation of a name the diff added or removed is a candidate. A candidate list is ranked, never filtered: nothing in it is dropped as probably fine, because a list that can collapse to “nothing to review” is a verdict in disguise.

A verdict is a decision that a claim is true or false, with the evidence that decided it. A gate finding is a mechanical verdict on a claim narrow enough to test. For an architecture-or-intent claim no check can test, the only verdict comes from the judgment-agent subagent, which reads the cited code one candidate at a time and answers with what it read. No check produces that verdict, and no part of claims treats it as a gate.

Next

Configuring claims covers the settings that belong to no single check: switching the hook off, the unrecognized-table gate, and the local grant file that governs what may run.

Configuring claims

The settings that belong to no single check. A key that belongs to one check is documented with that check: its page lists every key it reads with its shape and default. This page is everything else.

Two files

claims.toml, at the repository root, is committed, and its presence is what opts a repository in to the commit hook. Without it the hook does nothing: no check runs and a commit goes through unremarked. An empty file opts in with every check on its own defaults. The check-claims skill and the CLI are asked for explicitly, so they run anywhere, a missing file meaning every check on its defaults; see ADR 0006 for why only the hook asks. Each top-level table is one check’s own section, named for the check, except [hook] and [subjects], which lists append-only files and navigation pages:

[check-links]
exclude = ["docs/legacy/*.md"]

[stale-claims]
enabled = false

A key whose value is a list accepts a bare string as a one-element list, so exclude = "CHANGELOG.md" and exclude = ["CHANGELOG.md"] mean the same thing. That holds for every list-valued key of every check.

One check, check-citations, reads nothing from claims.toml. A section named for it is accepted, and the only key that does anything in it is enabled, which is read by the commit hook rather than by the check and so applies to every check alike — see Silencing one check at commit time.

claims.local.toml, beside it, is git-ignored and per-machine. It holds the one kind of setting that must never arrive by pull request: the grants that let a check execute a command, described in the grant file section below. It also holds one per-person choice, silencing the reminder in one clone.

Switching the commit hook off

The commit gate is the git pre-commit hook, alongside the on-demand check-claims skill. To keep the skill and drop the gate, without uninstalling the hook:

[hook]
enabled = false

With that set, the hook runs no check and git commit is never gated, and the plugin no longer reminds you that the hook is missing. The skill and the plain CLI are unaffected, and keep reporting every finding on demand.

enabled takes true or false, and leaving it out is true. Anything else, such as "false" or 0, makes claims.toml invalid, as does a top-level hook that is not a table, such as hook = false: the hook blocks every commit with the reason until it is fixed, and the plugin keeps reminding you if the hook is missing.

A key other than enabled and fail_on_unmarked in [hook] is a gate finding under the mode config, naming the key. The skill and the CLI report it even while the hook is switched off, so enable = false is caught rather than silently leaving the hook on.

Silencing one check at commit time

To keep the commit gate but take one check out of it, set enabled = false inside that check’s own section:

[stale-claims]
enabled = false

Only the commit-time decision changes. The check still runs, and the skill and the CLI still show its findings; the hook drops them before deciding whether to let the commit through. A gate check silenced this way no longer blocks a commit, so silencing one is a decision to stop enforcing what it enforces, not a way to quieten it.

enabled takes true or false, and leaving it out is true. Anything else, such as "false" or 0, makes claims.toml invalid: unless the whole hook is switched off, it blocks every commit with the reason, naming the check, until it is fixed.

Neither switch reads the other: the whole-gate toggle and a check’s own key are independent, and a project can set both.

Blocking a commit on unmarked findings

An advisory finding never blocks a commit on its own. To make the commit gate block on unmarked findings from some checks, list them:

[hook]
fail_on_unmarked = ["claim-words", "temporal-words", "restatement"]

The commit is then blocked while an advisory finding from a listed check has no checked mark keeping it quiet, or while an orphaned mark is left whose own mode belongs to a listed check. An orphaned mark for any other check, or for a mode that cannot be marked, does not block. A blocked commit prints the findings, then a closing line starting failing: that counts them and says to fix or mark each one.

fail_on_unmarked is a list of checks whose findings can be marked, and a bare string is a one-element list. Leaving it out, or an empty list, blocks nothing. Any other name, or a value that is not a string or a list of strings, makes claims.toml invalid: unless the whole hook is switched off, it blocks every commit with the reason until it is fixed. A listed check that is also silenced at commit time blocks nothing.

The list suits checks whose findings come from the commit’s own text, which the commit that brings them in can settle. A check like stale-claims, which ranks other sections by churn and whose marks expire as the files they name move, is better left to CI.

Append-only files

Some files only ever grow. A changelog gains an entry on almost every pull request, and the entries already there stay as they shipped. When such a file is something a claim names, its growth is not its content changing, so it does not make stale-claims rank the claim’s section as moved or expire a checked mark on the claim. Changing or removing a line still does both. CHANGELOG.md, in any directory, is append-only without being listed, and [subjects] adds to it:

[subjects]
append_only = ["RELEASES.md", "notes/*.md"]

append_only is a list of globs matched against repo-relative paths, and a bare string is a one-element list. A value that is not a string or a list of strings, or a top-level subjects that is not a table, makes claims.toml invalid: the hook blocks every commit with the reason and the CLI exits with it, until it is fixed. A key other than append_only and navigation in [subjects] is a gate finding under the mode config, naming the key.

Append-only is a property of the file, not of one check: stale-claims and checked marks both read it. It says nothing about how a line in the file is judged, which is what a check’s own historical key is for, so a project can list a changelog in both. ADR 0011 has why the two are kept apart.

A page linked from many sections is often linked to point the reader at it, not to claim anything about all of it. Named whole, such a page is a subject of every section linking it: an edit anywhere in it expires every checked mark on those sections and makes stale-claims rank each of them as moved.

The precise fix is in the prose. A link with an anchor, [exit codes](hub.md#exit-codes), names only that section of the page, so only an edit inside it counts. Where a page’s links cannot all be anchored, [subjects] lists it as a navigation page:

[subjects]
navigation = ["docs/hub.md", "docs/reference/*.md"]

A navigation page named without an anchor is no subject at all: a checked mark does not record it, an edit to it expires no mark, and stale-claims neither counts its history nor names it in a finding. A link with an anchor into it still names that section, as it does into any page, and one whose anchor names none of its headings names the whole page, so is no subject either. A mark recorded before the page was listed keeps its entry for it, and that entry is no longer compared, so the mark need not be written again. A sentence that does claim something about the whole page loses the page as a subject, which is the trade listing it makes.

navigation takes the same shape as append_only, a list of globs or a bare string, is invalid the same way, and is empty by default. A page can be listed in both. ADR 0013 has why the list is explicit rather than every page.

The unrecognized-table gate

hook and subjects are the two top-level tables that are not a check’s name. Any other table naming no registered check is itself a gate finding, reported under the mode config and naming the table. A table that differs from a real check’s name only by underscores for hyphens, [executable_claims] for [executable-claims], is named as the likely intent in the finding.

This exists because a mistyped section is otherwise a silent no-op: its keys configure nothing, which looks exactly like a working opt-out until the day the check it was meant to reach fires anyway. The gate is checked against the checks actually registered in the installed copy, so a section for a check that exists upstream but not in the installed version is reported the same way, and the fix there is moving the hook’s pinned release forward rather than editing the table.

The gate reads claims.local.toml too, and reports a mistyped table there against that file, with the same suggestion. Any registered check’s name is accepted there, and so is nudge, but hook is not: the commit hook reads its switch from claims.toml only. nudge is accepted in claims.local.toml alone, and is a finding in claims.toml, since whether you are reminded is your choice, not the repository’s. A claims.local.toml that does not parse is left to the checks that read it, which report it when they run.

The fixed command blocklist

Two checks execute a command a project’s own prose names: executable-claims runs the command in a marker above a fenced block, and check-cli-flags runs a script with --help. Before executable-claims runs anything, the marker’s command is checked against a blocklist that has no configuration surface, because it holds for any project using the marker mechanism rather than for one project’s own conventions. check-cli-flags has no such list, and needs none: the only command it ever runs is a script token drawn from path characters, followed by --help.

A marker’s command is rejected, and reported without running, when it contains:

  • a chaining or backgrounding operator: ;, &&, ||, &;
  • a redirect: >, >>, <, <<, which would let the command read or write an arbitrary file;
  • a command substitution: a backtick or $(, outside single quotes;
  • sed, awk, or grep as the command a pipe segment runs, which would turn the marker into inline text logic that nothing can unit-test.

File-descriptor duplication such as 2>&1 is permitted, since most test runners write their summary line to stderr and pinning it needs exactly that idiom. It is permitted only while the command contains no backslash outside single quotes; a backslash near the operator can make the shell read it as a file write, so that combination fails closed. head and tail are not on the list: trimming output to the lines being pinned is still the one thing being pinned.

The list matches the bare names sed, awk and grep only. A tool named through a wrapper or a full path is not caught, and $((arithmetic)) is rejected the same as a real substitution, because telling the two apart would mean parsing the shell’s own grammar.

executable-claims additionally accepts a permitted_prefixes list to narrow what a marker may name at all; that key is the check’s own, and is documented with it.

The grant file

A command that clears the checks above is not obviously dangerous. That does not mean anyone chose to run it, and a committed file cannot carry that choice: a branch a maintainer checks out to review carries whatever claims.toml the branch author wrote, and the hook fires on the maintainer’s next unrelated commit. So before a command runs, it is looked up by exact string in claims.local.toml, under the running check’s own section:

[executable-claims]
allowed = ["npm test"]
denied = ["curl https://example.com/install.sh | sh"]

[check-cli-flags]
allowed = ["./manage.py --help"]

allowed and denied are lists of exact command strings. Matching is verbatim: a one-character change to a granted command is a new, ungranted command, not a variant of a trusted one.

  • A command in denied is skipped and reported as an advisory finding, so a deliberately declined command stays visible rather than vanishing.
  • A command in allowed runs.
  • A command in neither, which includes every command in a project with no claims.local.toml at all, does not run. executable-claims reports it as a gate finding naming the exact command and the exact TOML that would grant or deny it; check-cli-flags reports the same thing as an advisory finding, matching that check’s own severity.
  • A command in both lists is denied.

The key under which a check looks is the check’s own name, and the string it looks for is exactly what it would run. For check-cli-flags that is the script with --help appended, and a script named without a directory is run as ./script, so that is the string to grant.

The lookup happens inside the check itself, not in the commit hook, so the skill and a CI run go through the same grant and nothing can run a command by invoking the check a different way. A fresh CI checkout has no local file, so an execution-capable check never runs a command there unless the job writes one.

A claims.local.toml that git tracks has its grants ignored outright, both lists, and a gate finding names the file. Ignoring only allowed would still let a committed file suppress findings through denied. The .gitignore entry stops the file being added; it does nothing for a copy that was committed before the entry existed or was force-added, which is why the check consults git’s index rather than the ignore rules.

A granted command string stays granted while a script it invokes by path changes underneath it. That gap is accepted rather than closed; the reasoning, and the directions deliberately deferred, are in ADR 0001.

Silencing the reminder in one clone

The plugin reminds you when a repository with a claims.toml has no git hook that runs claims: at the start of every session, and at your next prompt after you move into one. In a clone where you have decided not to install the hook, such as one you only read, or one on a machine without uvx, put this in that clone’s claims.local.toml:

[nudge]
enabled = false

The plugin then says nothing about the missing hook in that clone. Other clones, yours or anyone else’s, are reminded as before, and nothing else changes: the commit gate never reads [nudge], so whether commits are checked is still decided by the git hook and claims.toml alone.

Only enabled = false silences the reminder. Leaving enabled out, or setting it to true, keeps it; so does anything that is not a boolean, such as "false" or 0, a top-level nudge that is not a table, or a claims.local.toml that does not parse.

In someone else’s repository, the .gitignore may not name claims.local.toml. Add it to .git/info/exclude instead, which git reads like a .gitignore but never commits:

echo claims.local.toml >> .git/info/exclude

That keeps the file out of git status and out of an accidental commit. A claims.local.toml that git does track is a gate finding, as the grant file section above describes, so a mistake is caught, but it should not be how you find out.

Recording what was read

A third file, claims.checked.toml, also committed at the repository root, records advisory findings someone has read and found true, so they stay quiet until what they were read against changes. Checked marks covers the file, the command that writes it, and when a mark stops applying.

Next

Each check’s own section of claims.toml is documented with the check. Checked marks comes next, then the check pages, gate checks first. The Concepts page is where to look up a word a check’s description uses without defining it.

Checked marks

A record that someone read an advisory finding and found it true. A marked finding stays quiet on later runs until something it was read against changes, and then it is reported again without anyone lifting the mark. Marks live in claims.checked.toml at the repository root, beside claims.toml, and are committed with the project, so its history shows what was checked and by whom.

Marks are for prose that was read. Prose that should never be read at all is what a check’s exclude key is for.

The file

claims.checked.toml holds one [[mark]] table per mark:

KeyShapeWhat it records
filestringThe file the finding cites.
modestringThe finding’s mode. A mark on one mode of a sentence leaves the sentence’s other modes reported.
unitstringA hash of the finding’s unit, described below.
copiespositive integerHow many copies of the unit the file held when it was marked.
subjectstable of path to hashA content hash of each file, or page.md#anchor section, the unit names; for an append-only file, its git blob id.
notenon-empty stringWhat the reader verified. Required.
bystring, optionalWho read it: the reader, never the approver. Nothing acts on this key; it is a record.
approved_bystring, optionalWho approved a pending mark, written by approve-marks --by or fold-approvals --by. Nothing acts on this key; it is a record.
extent"full" or "partial", optionalHow much of the unit was read. Written only for a partial mark; an entry without it is full.
review"pending", optionalThat no person has reviewed the reading yet. Written only for a pending mark; an entry without it is reviewed.

A missing file means no marks. A file that does not parse, an entry missing a required key or holding one of the wrong shape, an entry with an empty note, an entry whose extent is neither "full" nor "partial", an entry whose review is anything but "pending", an entry whose file or a subject is an absolute path or climbs out with .., an entry with the file, mode and unit of an earlier one, as a conflict resolved by keeping both sides leaves, or an entry written other than as a [[mark]] table is invalid. A path that reaches outside the repository through a symlink, or names anything but a regular file, is never read. An invalid file is reported as one gate finding, cited at claims.checked.toml:0, so it blocks a commit the way an invalid claims.toml does, and no mark applies until it is fixed.

The file is written by mark-checked, below. Editing or removing an entry by hand is allowed, and deleting an entry is how a mark is lifted early.

Units

A mark is keyed by its finding’s unit, never by a line number, so it follows the text when lines above it move. Each markable check has one kind of unit:

CheckUnit
claim-words, temporal-wordsThe sentence the finding quotes.
judgment-agentThe sentence holding the cited line; where two sentences share that line, the one holding the cited name. A line inside a fenced code block, which no sentence holds, is its own unit.
stale-claimsThe section’s heading. A heading repeated in one file is a separate unit each time, told apart by its order, as a repeated heading’s anchor is, so inserting an identical heading above existing ones can move a mark onto another section of the same name, where only a subject change expires it. A file with no heading is one section, whose unit is the file itself: its mark expires only with its subjects.
restatementThe surviving line, together with the retracted words the finding quotes.
spliced-docsThe run of /// doc-comment lines holding the cited line.

Findings from any other check, and gate findings, cannot be marked. Checking a gate finding does not fix what it reports.

A unit is hashed as its words, the way restatement reads text: case, punctuation, inline markup and a link’s destination are dropped. So rewrapping a paragraph, or changing a word’s emphasis, keeps a mark, and changing, adding or dropping one word loses it.

When a mark stops applying

A mark keeps a finding quiet only while everything it was read against is unchanged. It stops applying when any of these happens:

  • No unit in the file hashes to the mark’s unit: the wording changed.
  • A recorded subject’s content differs from its recorded hash, or its file is gone. An append-only file only growing is not a difference. A subject whose file is already gone when the mark is written is not recorded.
  • The unit now names a subject the mark did not record, such as a bare `store` once a store.py exists to resolve it to.

Subjects are found the way stale-claims finds them, from the paths and backticked file names the unit’s text holds, and are read as they are on disk. No commit is recorded, so a rebase, a squash, or the order in which fixes land after a reading does not matter: a mark applies while what it was read against is byte-identical, or for an append-only file, below, has only grown. Edit a subject and then put it back exactly as it was, and the mark applies again.

An append-only file, which CHANGELOG.md is by default, is recorded as its git blob id: the id staging the file would give it, with the line-ending conversion and filters staging applies, so a clone that checks it out with \r\n records the same id as one that does not. Growing does not count as its content differing. While the file matches the recorded blob the mark applies. Otherwise the recorded blob is read from git’s object store, and the mark applies while every one of its lines is still in the file, in the same order: lines added anywhere keep the mark, and a line changed or removed expires it. A subject naming one section of such a file is compared the same way over that section’s lines. The recorded blob counts only while it is the file’s content in a commit HEAD reaches, or is staged for the file in the index; anywhere else it expires the mark, even if git’s object store still holds it. That is what happens to one recorded against content that was never staged or committed, that was only ever in another clone, or that is no longer in HEAD’s history because a rebase or amend rewrote the commit holding it, so a mark that would expire in CI expires in your clone too. A mark recorded before a file was append-only holds that file’s content hash, and goes on expiring on any change to it until it is marked again.

A navigation page named without an anchor is not recorded, and an edit to it expires no mark. A link with an anchor into one records that section, as into any page. A mark recorded before the page was listed keeps its entry for the whole page, and that entry is no longer compared.

A unit that names no subject expires only on its wording. Its mark says that the sentence was read, not that it is still true: a claim about behaviour the sentence never cites by path or name can go false under it while the mark holds.

A mark quiets at most copies findings. When the file holds more copies of the unit than the mark recorded, as many findings as there are extra copies stay reported, because which copy is the new one cannot be told. Marking the new copy records the larger count and quiets them all.

Writing marks

mark-checked records a batch of marks:

python3 -m claims.cli mark-checked [--repo-root R] [--diff-range RANGE] [--by NAME] [--partial] [--pending] [--prune] [FILE|-]

It reads entries one per line from FILE, or from standard input when the argument is - or left out. Each entry is a finding’s citation and mode, as a finding line prints them, then a note saying what was verified:

docs/guide.md:3 claim-words-totalising src/cache.py has one reader, get, and nothing else reads the store

The checks run once for the whole batch, over --diff-range (default HEAD, the same meaning as a normal run), and every entry must name an advisory finding of that run. An entry marks every finding of its mode at its citation: two sentences sharing a line print at one citation, and one note covers both. An audit that read findings over a wide range marks them over the same range, where a diff-scoped check still reports them; on HEAD alone it would not.

If any entry names no such finding, names a gate finding or a mode that cannot be marked, or has no note, the command prints each bad entry and writes nothing. Blank lines are skipped. An entry for a finding that already has a mark replaces it, so re-marking after a reading refreshes the recorded subjects and copies. Every other entry in the file is kept as written, comments included. Each write puts the entries in order of file, then mode, then unit, so branches that mark findings in different files edit different parts of the file, and git merges them without a conflict unless their new entries land next to each other. A comment directly above an entry moves with it. The order only matters when the file is written: a file edited out of order by hand reads the same, and the next write sorts it. Exit codes are 0 once the marks are written, 1 for a batch with a bad entry or, without --prune, no entries, and 2 when claims.toml or claims.checked.toml is invalid or FILE can’t be read.

--prune also removes every orphan, and only those, in the same write as the batch’s new marks, so a reworded sentence’s old mark goes and its new one is recorded in one call. With --prune, entries are optional: with none, the command only prunes, and it does not wait for entries when standard input is a terminal. It reports how many marks it pruned, 0 included, and exits 0 even when it pruned and marked nothing. A bad entry still fails the batch, and then nothing is pruned either. A pruned mark needs no note, since removing an orphan quiets nothing. A comment directly above a pruned entry, with no blank line between, goes with it. A comment above an entry that stays is kept, even where the entry before it is pruned or replaced.

--partial writes each of the batch’s marks as a partial mark, and --pending as a pending mark; the two combine.

There is no form that marks findings without a note each. Whoever reads the finding writes the mark, and that can be an agent, once it has read the finding against what it cites. The plugin ships one agent for that reading, the reading agent, which reports what it read and leaves the marking to the session that called it.

Partial marks

A section can be long enough that a reader checks only part of it, or reads only what the branch changed. mark-checked --partial records that, as extent = "partial" on each of the batch’s marks, so a narrow reading is never mistaken for a full one. Only a stale-claims section or a spliced-docs doc comment can be partly read: a sentence or a line is read whole or not at all, so a --partial entry for any other mode is a bad entry.

A partial mark keeps its finding quiet, counts as marked under --fail-on-unmarked, and expires, exactly as a full mark does. The summary line counts the findings it keeps quiet separately.

A partial entry for a finding whose full mark is still current, with its unit and every recorded subject as they were, is a bad entry, and the batch writes nothing: a partial reading can’t replace a current full one. Once that full mark has expired, the partial entry replaces it like any re-mark. A full entry always replaces a partial mark.

Pending marks

Where agents write marks, a person may want to review each one later without holding the agent up. mark-checked --pending records each of the batch’s marks with review = "pending": written, and not yet reviewed. A pending mark keeps its finding quiet, counts as marked under --fail-on-unmarked and the commit hook, and expires, exactly as any other mark does. The summary line counts the findings it keeps quiet, and the pending marks a range added, separately. A plain mark-checked over a pending entry replaces it as a reviewed mark, recording the subjects afresh.

The review cycle has two more commands. Neither runs any check.

python3 -m claims.cli pending-marks [--repo-root R] [--at REV [--own]]

pending-marks prints each pending entry as <file>:<line> <mode> <note>, followed by (by <by>) when the entry names its reader, so the reader is in view when a person reviews the mark, then N pending mark(s), and exits 1 while any exist, 0 when none do, so CI can fail a pull request until its marks are reviewed. The line is where the first copy of the mark’s unit starts in <file>, or 0 when the unit is gone; expired and orphaned pending marks are listed too. Without --at it reads the working tree. With --at REV it reads claims.checked.toml, and each marked file, as committed at REV, and a commit without the file has no pending marks. Adding --own lists only the pending entries REV wrote itself: those its first parent lacks, or holds with any key different. An entry REV inherited unchanged is left out.

python3 -m claims.cli approve-marks [--repo-root R] [--by NAME] REV

approve-marks approves the marks a reviewer read at commit REV: it removes review from every entry that is pending in the working tree and was pending at REV with every other key identical. Each approved entry is rewritten as mark-checked writes it; every other entry keeps its text and comments. It prints approved <entry> for each, each <entry> as pending-marks prints it, and left pending <entry>: <why> for each pending entry it left: changed since REV when the entry at REV differs, including one that was reviewed there and is pending now, or not in REV. A closing line gives both counts. It exits 0 even when it approved nothing; commit the file afterwards. Re-running mark-checked is no substitute, since it records the subjects as they are now, which the reviewer may not have read.

With --by NAME, each approved entry gets approved_by = "NAME", replacing any approved_by it had. Its by is left as it was, so the entry names its reader and its approver apart. Which entries are approved is decided before that, so an entry whose by differs from its entry at REV is still left pending. claims puts no format on NAME and records it as given, the same as mark-checked --by. An entry approved before approved_by existed may hold its approver’s name in by, where the reader’s name used to be; nothing rewrites it.

So the cycle is: an agent marks with --pending in the commit that brings the findings in; a person reads the marks pending-marks --at <commit> lists and runs approve-marks <commit>, then commits the result. Both commands exit 2 for a REV git can’t resolve to a commit, or a claims.checked.toml invalid at REV or in the working tree.

What approve-marks guarantees is the entry’s content: each approved entry is exactly the one the reviewer read at REV, compared when the command runs. Nothing records REV afterwards, so it can’t later prove which commit was read, or that a person rather than an agent ran it. That rests on the project’s own process, and a forge rule such as a required pull request review is set up outside claims.

Because the approval holds for content, a rebase, amend or squash that leaves each approved entry with every key identical needs no re-approval. Only a pending entry approve-marks would leave pending, changed since REV or not in REV, needs reading again.

How the approval shows in history is up to the project. It can be a commit of its own, or folded into the commit that wrote the marks.

Folding approvals into their commits

The ideal is to approve at commit time: a person working with an agent interactively reads the marks the agent’s commit raised, and approves them before the commit is made, so no approval is ever pending in history. Marks written while nobody could approve, by an agent working alone for instance, reach the branch pending. fold-approvals approves them afterwards inside the commits that wrote them, so each mark is approved as written in its commit and read against that commit’s tree. A mark written in one commit and re-marked in a later one is two approvals, one per commit.

python3 -m claims.cli fold-approvals [--repo-root R] BASE --by NAME [--approve REV ...] [--apply]

BASE is the commit the branch is folded onto, such as the branch it will merge into, which has to be up to date already: the command never fetches. Without --apply, it changes nothing. For each commit in BASE..HEAD it prints the commit, then that commit’s own pending marks as pending-marks --at <commit> --own lists them, then each fixup! commit that targets it, with that fixup’s own pending marks under it. A fixup! targets the commit git rebase --autosquash would fold it into: the first earlier commit whose subject it names, or the one it names by hash, or the first earlier commit whose subject starts with what it names. Last comes the plan: which commits it would approve, and which fixups it would fold. Read the marks it lists, against each commit’s own tree, before naming that commit.

Name each commit whose marks were read with --approve. Naming a commit covers it and the fixups listed under it. With --apply, the command runs one rebase of BASE..HEAD, folding every fixup into its commit. After each named commit and its fixups, it approves that group’s own pending marks against the commit as originally committed, then against each fixup in turn, writing NAME as each approved entry’s approved_by, as approve-marks REV --by NAME does, and amends claims.checked.toml into the rewritten commit, without running its commit hooks. A commit not named still has its fixups folded, and none of its marks is approved; an entry it wrote stays pending in every later commit too, even a named one.

During that rebase only, claims.checked.toml merges entry by entry rather than line by line, so a later commit that re-marks an entry an earlier step approved doesn’t stop the rebase: where both sides changed one entry, the commit being replayed wins, and its own reading is pending again until its own step approves it. A merge or rebase run any other way merges the file line by line, as git always does.

Afterwards, the new tip’s tree has to equal the old tip’s, except that claims.checked.toml may only have lost review = "pending" lines and had approved_by lines replaced or added, each in an entry it approves. Any other difference, or a rebase that stops, puts the branch back at the old tip and exits 1. On success it prints each named commit as rewritten, with left pending <entry> under it for each of its own entries still pending, then the old tip’s SHA and the git push --force-with-lease=<branch>:<old sha> that publishes the result. It never pushes.

It refuses, exiting 1 with nothing changed, when the working tree has uncommitted changes, a rebase is in progress, HEAD is detached, claims.checked.toml holds a pending entry at BASE, the range holds a merge commit or a squash! or amend! commit, a fixup! in the range targets no commit before it in the range, nothing in the range is pending, an --approve names a commit outside the range or a fixup, or the repository’s own .gitattributes gives claims.checked.toml a merge attribute, which would override the fold’s. A --by holding a line break exits 2. A preview, with or without --approve, exits 0, and a BASE git can’t resolve to a commit exits 2. Neither the commit hook nor CI runs the command.

A correction found after a commit is made belongs in that commit too: a mark for a finding raised there and noticed later, or a rejected mark’s fix with the deletion or re-mark it implies, is a fixup! commit for the commit it belongs to, which the fold then folds in and approves with it. Because the fold rewrites the branch, publishing it needs a force-push with a lease, so it is run where someone can approve that.

Orphans

A mark whose unit no longer exists anywhere in its file, or whose file is gone, is reported as an advisory finding, with the mode checked-mark, citing the mark’s line in claims.checked.toml, so a stale entry is seen and removed rather than left behind: by hand, or with mark-checked --prune. So is a mark for a mode that can’t be marked. A mark whose unit still exists but which no finding of the current run matched is not an orphan: a diff-scoped check reports nothing about a sentence the diff left alone. Nor is an expired mark whose unit is still in its file, or one whose file holds fewer copies of its unit than it recorded but at least one: --prune keeps both.

A restatement-ngram mark orphaned by a change that rewords its line and keeps the quoted words leaves a finding behind as well as the orphan: the same words reported on the reworded line, a new unit to mark in that commit. The finding comes from the mark as committed, so it stays when --prune removes the orphan (restatement).

What a run shows

A quieted finding is not printed. The summary line counts it, ending , Q quiet while checked after the gate failure count, so a quiet run is never mistaken for a clean pass. The count is left off when nothing was quieted. When partial marks kept some of those findings quiet, it continues , P of them partly, as in 12 quiet while checked, 4 of them partly; the clause is left off when P is zero. When pending marks kept some quiet, it continues , K of them pending after that. The commit hook prints the same count as the last line of its message, including on a commit where marks quieted every finding. A mark only ever quiets an advisory finding, so gate findings are unchanged. Only a run failing on unmarked findings exits or blocks differently for a mark, since quieting a finding is then what lets it pass.

The CLI’s summary line also ends , A mark(s) added in range when the range added entries to claims.checked.toml. An entry counts when its file, mode and unit are on the range’s new side and not its old one, so re-marking a finding that already has an entry adds nothing. When some of those entries are pending, , K of them pending follows. A batch of new marks is the thing for a reviewer to read: the count is the only sign that marks were written without a reading. The CLI reads the range from git, so a claims.checked.toml git does not track yet adds nothing.

Failing a run on unmarked findings

An unmarked finding is an advisory finding, from a check whose findings can be marked, that no mark keeps quiet. A CLI run can be told to fail on them:

python3 -m claims.cli --fail-on-unmarked
python3 -m claims.cli --fail-on-unmarked=restatement,judgment-agent

On its own, the flag covers every check in the table under Units. With a list, it covers only the named checks, and a name that is not one of them is a usage error, exit 2, naming it. With the flag, an orphaned mark fails the run too, whatever checks the flag names, since deleting its entry resolves it. An advisory finding from a check that cannot be marked never fails the run, and gate findings behave as they do without the flag.

With the flag, the summary line ends , U unmarked, counting the unmarked findings and orphans in scope. The exit code is 1 on a gate finding, otherwise 3 when U is above zero, and otherwise 0. A run that exits 3 closes with one more line after the summary, starting failing:, which gives the count again and says to fix or mark each one.

The commit hook applies a version of the flag only for the checks a project lists under [hook] fail_on_unmarked, and there an orphaned mark blocks only when its own check is listed. Otherwise local commits stay advisory, and the cost of reading lands where a project asks for it. A project passes the flag in CI, over the pull request’s whole range from its merge base, so that the pull request resolves every finding it brings in. On GitHub Actions, with the project’s history fetched and claims checked out beside it as the command line describes:

- uses: actions/checkout@v7
  with:
    fetch-depth: 0
- uses: actions/checkout@v7
  with:
    repository: or1can/claims
    ref: <tag>
    path: claims
- run: |
    base=$(git merge-base "origin/${{ github.base_ref }}" HEAD)
    PYTHONPATH=claims python3 -m claims.cli --repo-root . --diff-range "$base" --fail-on-unmarked

A pull request that fails this way is fixed by changing the prose, or by running mark-checked over the same range once each finding has been read. A dependency bot cannot read a finding, so on a bot’s pull request a person or an agent reads the findings and marks them on its behalf.

Example

The example is the claim-words configuration with a guide that makes two totalising claims, one of which has been read and is marked from a batch of one entry:

examples/checked-marks/claims.toml:

[claim-words]
files = ["docs/*.md"]

examples/checked-marks/docs/guide.md:

# Guide

Every read goes through `get` in src/cache.py.

Only one writer runs at a time.

examples/checked-marks/marks.txt:

docs/guide.md:3 claim-words-totalising src/cache.py has one reader, get, and nothing else reads the store

The capture shows the entry mark-checked writes, then the findings once it applies:

# python3 scripts/capture.py: checked-marks, `claim-words` run against a throwaway git repository seeded from examples/checked-marks, marked from its marks.txt
# claims.checked.toml as mark-checked wrote it:
[[mark]]
file = "docs/guide.md"
mode = "claim-words-totalising"
unit = "75ba9b923fa77a8d"
copies = 1
note = "src/cache.py has one reader, get, and nothing else reads the store"
subjects = { "src/cache.py" = "55967961246bba4c" }
# the findings with those marks applied:
[advisory] docs/guide.md:5 (claim-words-totalising, claim-words-counts) Only one writer runs at a time.
1 quiet while checked

The marked sentence names the example’s cache module by path, so its mark recorded that file’s content hash. The unmarked sentence is still reported. An edit to the cache module would bring the marked sentence back, as would changing a word of it.

Next

The reading agent is the plugin’s subagent for reading a finding before it is marked.

The reading agent

A checked mark says a finding was read against what it names and found true. The reading agent, claims:reading-agent, is the plugin’s subagent for that reading. It takes one markable finding, reads it in full against every subject it names, and reports a verdict for each claim in it with the evidence behind each verdict. It never writes a mark and never edits a file. The session that called it reads its report and decides what to mark.

It reads findings from every markable mode except judgment-agent’s: stale-claims, spliced-docs, claim-words, temporal-words and restatement. A judgment-agent candidate goes to its own subagent, as its page describes.

What it is given

One finding: its file:line, its mode and message as the run printed them, the subjects it names, and its root, the directory holding the tree the finding was raised in: the project itself, or, for a range ending at a commit, a git worktree the session makes at it. The finding’s unit is what it reads first: a stale-claims section from its heading to the next heading, a whole spliced-docs doc comment, a claim-words or temporal-words sentence, or a restatement line. A mark covers that unit, so the agent reads all of it, never only the cited line.

What it reads

The unit, and then every subject it names, each opened in full with the file-reading tool. A search hit locates a subject; it is not a reading of it, however short the file. A claim with a totalising word, “every” or “never”, is true only once every site it covers has been read. The agent has three tools, Read, Glob and Grep, and no shell: nothing it does can change the working tree, and nothing it can’t read settles a claim.

What it reports

One JSON object, with:

  • each claim in the unit, quoted, with a verdict of true, false or not checked, the file:line it actually read as evidence, and a sentence of reasoning;
  • what it read in full, and, apart from that, what it only searched for;
  • a draft note for the mark, saying what was verified and naming any claim that is false or wasn’t checked.

false covers prose that doesn’t finish as well as prose the subject contradicts: a sentence that trails off says nothing true, whatever its subject holds. not checked is for what reading alone can’t settle, such as a command’s output; it names what would settle it.

A claim that isn’t about the tree as it stands, such as a decision record’s account of a state not yet delivered or a changelog entry’s of one since passed, is not checked too, saying which it is: the tree can’t settle it.

What the session does with it

The check-claims skill hands each markable finding to the reading agent before marking it, and marks only after reading the agent’s evidence:

  • Every claim true: a full mark, with --by "claims:reading-agent (<model>)", so the mark names its reader and the model that read it.
  • Any claim false: no mark. The prose is fixed.
  • A claim not checked, in a stale-claims section or a spliced-docs doc comment: a partial mark, whose note names the claim left unchecked, as long as at least one claim is true. In any other mode, no mark: the session reads that claim’s subject itself, or leaves the finding unmarked. A full mark always means every claim was checked.

The skill marks with --pending, so a person reviews each reading before it stands, and pending-marks prints the by of each mark beside it. Approving records the approver in approved_by and leaves by as it is (decisions/0018-the-reader-and-the-approver-are-recorded-apart.md says why), so the reader stays on record after approval.

A session that can start no subagent reads the finding itself, to the same rule, and its marks name the session and its model in by instead. claims puts no format on by; <agent name> (<model>) is the skill’s convention, not something a check enforces.

When a mark expires, because its unit or a subject changed, the finding is read again in full, as if it had never been marked.

The model

The agent runs on sonnet. Its golden fixtures, under tests/fixtures/reading_agent_golden/, are three stale-claims sections about one small cache module: one true throughout, one with a sentence left unfinished among true ones, and one claiming the cache evicts its oldest entry when the code evicts its newest. Each fixture passes only when every claim gets the expected verdict, the agent opened the section and the module with the file-reading tool, and no claim comes from outside the section. python3 scripts/run_reading_agent_golden.py --model <model> runs them against the real model, one API call each.

Sonnet passes all three on every run. Haiku, over two runs, gives the right verdict on every claim, both false ones included, but in three of its six fixture runs it also reports the sentence under the next heading as one of the section’s claims, which fails that fixture. A reader that doesn’t keep to the unit can’t be trusted on a mark covering that unit, so sonnet stays the default.

Next

The check pages follow, gate checks first, and executable-claims opens them.

executable-claims

A verify marker directly above a fenced block names a command, and the block beneath it is a claim about what that command prints. The check runs the command and compares what it printed, and how it exited, with the block. A block the command no longer reproduces is a gate finding: the claim “this command prints this” has been disproved, and the commit is refused until the block and the command agree again. Before any command runs, though, it has to be one this machine’s owner has chosen to run, which is where the rest of this page spends most of its time.

What it checks

A marker is an HTML comment alone on its own line, and it is live when the next non-blank line opens a fenced block. The shape, with placeholders for the command and the block:

<!-- verify: the command -->
```
what the command prints
```

The command runs through the shell, from the repository root, so a pipe works. Its standard output and standard error are joined, standard output first, and compared with the block after both sides have had trailing whitespace removed, leading and trailing blank lines dropped, and the block’s common indentation stripped. A line in the block opening with a $ prompt is dropped before comparing, so a block may show the command being typed above its output. A non-zero exit is a finding on its own, whatever was printed.

A marker inside a fenced block is not live. It is shown as text, the way the example above is, and nothing runs for it. A marker whose next non-blank line is not a fence is malformed and is a finding, because a marker with nothing to pin is a claim that has silently stopped being checked. So is a fence that opens and never closes, reported at the line that opened it, since everything after it would otherwise read as inside the block.

The check is whole-tree: every tracked .md file on every run, with a CLAUDE.md that is a symlink to AGENTS.md read once rather than twice. A run in which no command was checked and nothing else was reported is itself a gate finding, “no verify markers found in repo”, because a mechanism that has silently stopped checking looks exactly like one with nothing to check. That finding is withheld only when exclude is the reason nothing was swept.

Two departures from gate severity. A command that exceeds its timeout is reported advisory, because a timeout is no answer rather than a wrong one. A command listed under denied in the grant file is skipped and reported advisory, so a marker somebody deliberately declined stays visible instead of vanishing.

Before a command runs

A marker’s command passes three tests in order, and fails closed at the first it does not pass. A command that fails any of them never runs, and is reported as a gate finding naming the reason.

  1. The fixed blocklist, which has no configuration and is the same for every project. Configuring claims lists it.
  2. permitted_prefixes, if the project set one. The command must start with one of the listed strings. This is the check’s own key and is covered under Configuration below.
  3. The local grant. The command, as an exact string, must appear under allowed in claims.local.toml, a file that is git-ignored and per-machine by design. The grant file on the Configuring page is the whole account of that mechanism, shared with the other check that executes what prose names; this page does not repeat it.

The first two tests decide whether a command is obviously unfit to run. Only the third decides whether anyone chose to run it, which is why it lives in a file no pull request can change; the grant file section linked above says why committed configuration cannot carry that choice, and ADR 0001 records what was considered and set aside.

The environment a command runs in

A command runs exactly as written, with whatever PATH the run was started with. Through a git hook installed by pre-commit, or run through uvx, the first python3 on that PATH is the hook’s own, which has claims and nothing else. A command that needs the project’s dependencies names the environment they live in:

uv run -q python scripts/report.py
.venv/bin/python scripts/report.py
poetry run python scripts/report.py

Then it runs against the dependencies the project declares, wherever the check runs. -q matters with uv run: a hook environment can set VIRTUAL_ENV, and uv then warns on stderr that it is ignoring it, and stderr is compared along with stdout. ADR 0008 records why claims does not adjust PATH itself.

Why it exists

A block showing a command’s output is the most concrete claim documentation makes, and the most copied. It is pasted from a terminal once, edited by hand when a flag is renamed, and trusted by every reader after that because it looks like evidence. Nothing about the prose around it says whether it was ever true. Running the command is the only test there is, and running it on every commit puts the drift in front of the person whose change caused it.

Example

The example is one file with four markers, beside the per-machine state the last of them needs. The first marker is well-formed and names a command nothing on this machine has been asked to run. The second pipes through grep. The third is followed by prose rather than a fence. The fourth names a command this machine has granted, whose block is out of date.

examples/executable-claims/README.md:

# Widget

Check the installed version:

<!-- verify: ./widget --version -->
```
widget 2.1.0
```

Count the plugins that are switched on:

<!-- verify: ./widget plugins | grep -c enabled -->
```
3
```

Print the resolved configuration:

<!-- verify: ./widget config -->
The block that should follow this marker was lost in an edit, so the
marker has nothing to pin.

Print what is running:

<!-- verify: ./widget status -->
```
widget 2.1.0, 3 plugins enabled
```

A granted marker needs two things a repository cannot commit: the grant, and the program the command names. Both sit under the example’s own local/, and scripts/capture.py writes them into the working tree of the throwaway repository it builds without ever staging them — which is the state they have on a real machine, and what makes the last finding below a command that really ran rather than an illustration of one. A committed grant file is exactly the trust boundary the mechanism exists not to rely on, and the check ignores the grants in any claims.local.toml that git tracks.

examples/executable-claims/local/claims.local.toml:

# Per-machine and never committed: a claims.local.toml git tracks has its
# grants ignored outright. Granting the command is what lets the marker
# below it be checked at all, rather than reported as undecided.
[executable-claims]
allowed = ["./widget status"]

examples/executable-claims/local/widget:

#!/bin/sh
# The program the documentation above is about, built rather than
# committed — and moved on since the block pinning it was pasted. Only
# `./widget status` is granted, so that is all it is ever asked for.
echo "widget 2.2.0, 4 plugins enabled"

Run against a fresh repository holding all of that, the check reports:

# python3 scripts/capture.py: executable-claims, run against a throwaway git repository seeded from examples/executable-claims
[GATE] README.md:5 (executable-claims) `./widget --version` has no local grant in claims.local.toml — under `[executable-claims]`, add "./widget --version" to an existing `allowed` list or start one with `allowed = ["./widget --version"]`, or the same into `denied` to skip it and record that choice
[GATE] README.md:12 (executable-claims) `./widget plugins | grep -c enabled` pipes through `grep` — text-processing logic must live in a testable script, not a marker
[GATE] README.md:19 (executable-claims) verify marker is not above a fenced block
[GATE] README.md:25 (executable-claims) output of `./widget status` no longer matches the documented block

The first finding is the ungranted state, and it is the one every reader meets first: a marker’s command with no grant on this machine, which is what a fresh clone, a colleague’s checkout and a CI runner all have. It gives the exact TOML that would grant or deny the command. Nothing ran to produce it.

The second finding is the blocklist, reached before the grant is even consulted. The third is the malformed marker. Neither depends on any local state either, which is why the first three lines are what this example reports on a machine that has granted nothing.

The fourth is the drift the check exists for. ./widget status is granted, so it ran; the program prints a version and a plugin count the block beneath the marker no longer states, and the claim that block makes is disproved. A granted command reports one of two things when the block is wrong: this, or that the command exited non-zero, naming the code. Both name the marker’s file and line. A marker whose command and block agree reports nothing, which is the state a granted, correct example sits in.

Configuration

[executable-claims]
exclude = ["docs/generated/*.md"]
timeout = 60
permitted_prefixes = ["npm test", "./scripts/"]
KeyShapeDefaultReach for this when
excludelist of glob strings; a bare string is a one-element list[], nothing excludedA file’s markers should not be swept at all: a generated file, a page of examples of the marker syntax that a longer outer fence does not already cover, or a directory of inputs written to be broken, like this site’s own examples. An excluded file is skipped whole.
timeoutnumber of seconds, integer or float; true and false are rejected rather than read as 1 and 030A legitimate command is a slow integration or cold-build step that keeps reporting an advisory timeout at the default. There is no per-marker override, so this is set for the project.
permitted_prefixeslist of literal string prefixes; a bare string is a one-element list[], no restriction beyond the blocklistThe project wants a narrower rule than the blocklist gives, such as “a marker may only run our own test suites or a script under our own scripts directory”.

A prefix is matched literally, with no glob expansion and no word boundary after it. "npm test" also permits npm test-anything-else; a project wanting the boundary includes it in the prefix, as "npm test ". An empty list means the check has no way to know the project’s conventions and applies only the blocklist.

The grant lists, allowed and denied, are not keys of this section. They live under the same table name in claims.local.toml, and are documented once, on the Configuring claims page.

enabled, which takes this check out of the commit gate while leaving it in the on-demand skill and the CLI, is shared by every check and covered on Configuring claims.

Retirement markers

None. The retired-quote exemption is a rule about sentences a sweep reads, and this check reads no sentences: a marker is either live, alone on its line above a fence, or it is not a marker. A marker quoted to show the syntax is put inside a fenced block, and one that must not run on this machine is recorded under denied in the grant file, which keeps it visible as an advisory finding rather than hiding it.

Next

check-citations, the check that holds a backticked name to the symbols the repository has actually declared.

check-citations

A backticked name in tracked Markdown, or in a comment in a tracked Swift file, that names a symbol the repository once declared and no longer does. The check reads every declaration any commit ever added, subtracts the ones still present, and reports a citation of anything left. That is a gate finding: a rename either left a citation behind or it did not, and there is nothing for a person to weigh.

What it checks

A citation is a backticked identifier. A dotted name cites its last component, and trailing call parentheses are ignored, so Room.loadWidget and loadWidget() both cite loadWidget. The same dead name cited twice on one line is reported once, at that line.

A declaration is a Swift declaration: a line introducing a function, variable, constant, type, protocol, actor, type alias, enum case or initialiser, with any access and modifier keywords in front of it. The set of names ever declared comes from the full commit history of every .swift file any commit touched, whether or not it is still tracked, including a declaration that only ever existed in a merge commit’s own conflict resolution. The set declared now comes from the tracked .swift files as they stand, plus the name of any directory ending in Tests, other than one named exactly that, since a test target is cited in prose like a symbol and declared nowhere. A name in the first set and not the second is gone, and a citation of it is a finding.

Only Swift declarations are read. A name a Python, Rust or TypeScript file once declared is outside what the check can see, and a citation of it is never reported, which is a gap rather than a false positive. In a project whose history holds no Swift file the check finds nothing.

Citations are read from every tracked .md file, whole, and from the comment portion of every line of every tracked .swift file. The check is whole-tree: a citation left behind by a rename is reported on the next commit, whatever that commit touched.

Reading full history is what makes the check honest, so a checkout that cannot provide it is a finding of its own rather than a silent pass. A shallow clone produces one gate finding saying the check cannot run here and how to fetch the history it needs, and so does any other failure to read the repository. The history walk is cached in the repository’s own git directory, keyed by the commit it was taken at, so a second run on the same history reads the cache and a run after new commits walks only those.

Marking a historical reference

A citation that is meant to name the old symbol, in a changelog entry or a comment explaining a rename, is exempted by a was: marker: in Markdown, an HTML comment containing was: name; in Swift, a comment that is the marker and nothing else, // was: name. The marker covers citations of that name on its own line and on the next line, and no further. A wider scope silences real dead citations along with the one it is meant to cover. The word was: in ordinary prose is not a marker, so a sentence such as “the old name was: loadWidget” still fires.

Why it exists

A rename is the edit most likely to leave prose behind. The compiler finds every call site; nothing finds the sentence in a design note, the comment two functions down, or the migration guide that still tells a reader to look for the old name. The citation was true when it was written and became false at the rename, and only history can show that it was ever true. A check that compared prose with the current tree alone would have to treat every unknown name as suspect, which is unusable; comparing it with everything the tree has ever declared is what makes a certain, gate finding possible.

Example

The example is history, because no static tree can be missing a symbol it once had. The capture builds it as two commits and a pending edit. The first commit declares loadWidget:

examples/check-citations/history/01-declares/Sources/Room.swift:

struct Room {
    func loadWidget() -> Widget {
        Widget(contentsOf: path)
    }
}

The second replaces it with loadGadget, and leaves a comment citing the name it removed:

examples/check-citations/history/02-renames/Sources/Room.swift:

struct Room {
    // Replaces `loadWidget`, which read the whole file into memory.
    func loadGadget() -> Gadget {
        Gadget(streaming: path)
    }
}

The pending edit adds a note that cites the old name twice, once as a live recommendation and once under a was: marker:

examples/check-citations/docs/NOTES.md:

# Notes

A `Room` reads its contents with `loadGadget`, or with `loadWidget` if
you need the whole file in memory at once.

<!-- was: loadWidget -->
`loadWidget` was retired because it read the whole file into memory.

Run with that note staged on top of the two commits, the check reports:

# python3 scripts/capture.py: check-citations, run against a throwaway git repository seeded from examples/check-citations
[GATE] Sources/Room.swift:2 (check-citations) `loadWidget` no longer exists: // Replaces `loadWidget`, which read the whole file into memory.
[GATE] docs/NOTES.md:3 (check-citations) `loadWidget` no longer exists: A `Room` reads its contents with `loadGadget`, or with `loadWidget` if

The first finding is the comment the rename left behind: loadWidget was declared in the first commit and is declared nowhere now, so the citation in the second commit’s own comment is dead the moment it lands. The second is the note’s recommendation to call a function that does not exist. The note’s last line cites the same name and is not reported, because the was: marker on the line above it says the reference is deliberately to the past. Room and loadGadget are cited on the same line as the second finding and resolve, so they produce nothing. Widget and Gadget were never declared by any commit and are outside the check’s knowledge altogether.

The fix is one of two edits: retarget the citation to the name the repository has now, or mark it was: if the sentence is genuinely about the past.

Configuration

None. The check reads no key from claims.toml, and there is no exclude: every tracked .md and .swift file is read, and the only way to keep a citation from being checked is the was: marker on the line above it. A [check-citations] table is accepted, and enabled below is the only key that does anything in it.

enabled, which takes a check out of the commit gate while leaving it in the on-demand skill and the CLI, is read by the commit hook rather than by the check, so it applies here as it does everywhere; see Configuring claims.

Retirement markers

None. A citation inside a blockquote, an italicised sentence or a paragraph opening “Previously said:” is checked like any other. The retired-quote exemption skips a sentence quoted in order to retire it; this check’s unit is a name rather than a sentence, and it has its own marker for the one case that needs one, a name cited in order to say it is gone.

Next

check-links, which holds a Markdown link to the file and heading it names.

check-links

Every internal Markdown link in every tracked .md file resolves: the file or directory it names is tracked by git, and where it names a heading anchor in a Markdown page, a heading in that page has that anchor. A link that fails either test is a gate finding. The claim “this page exists, with this section” has been disproved, and the commit is refused until it holds again.

What it checks

Every link destination without a scheme is in scope: another .md file, with or without a #anchor; a bare #anchor into the file it appears in; a source file, a script, or an image (![alt](img.png)); and a directory ([scripts](scripts/)). A destination with a scheme (https://, mailto:) is out of scope and never reported. So is a link inside a fenced code block or an inline code span, which is example syntax rather than a link.

The destination is resolved against the directory of the page it appears in, and what it names must be tracked by git. A file that is on disk but never added, or is git-ignored, is missing from every other clone, so a link to it is a finding like a link to nothing. A directory counts when git tracks at least one file under it. A link to a symlink, such as a CLAUDE.md pointing at AGENTS.md, is followed, provided it stays inside the repository, and so is a link through a symlinked directory. A link to a file deliberately kept out of git is what known_untracked, below, is for.

An anchor is checked only on a Markdown page. On any other target it names a line or a viewer position, as in claims/cli.py#L10, and only the path is checked.

A destination starting with ~ or / is out of scope too, much as check-file-refs sets aside a host path. Such a destination is not relative to the page, so resolving it against the page’s directory could only report it as broken for the wrong reason. A leading ~ names a home directory. A leading / may name a place on the host or, as GitHub reads it, the repository root, and nothing in the link says which, so neither is checked: write a link relative to the page if you want it held to this check.

An anchor matches a heading under GitHub’s rule, as it applies to ASCII: the heading text is lowercased, every character outside the ASCII letters and digits, spaces, hyphens and underscores is dropped, and each space becomes a hyphen. A non-ASCII letter is dropped too, where GitHub keeps it, so ## Café is reached by #caf. ## Upgrading an install is reached by #upgrading-an-install, and ## claims.toml by #claimstoml. Two headings with the same text produce the same anchor, and a link to it is satisfied by either.

The check is whole-tree. It reads every tracked .md file on every run, not only the files the commit touched, so a link broken by a rename elsewhere is reported on the next commit whatever that commit was about.

Why it exists

A relative link is the narrowest claim a document makes about its own tree: this file, this heading, right here. It is also the claim most often made false by an edit somewhere else. A page is renamed, a heading is reworded, and a sentence three directories away that nobody opened now points at nothing. Reporting it as a gate on the very next commit puts the finding in front of the person who made the change while they still hold the context to fix it.

Example

The example is two files. The first links to the second three times, to a page that does not exist, to its own title, to a directory and to a script, and also carries an external URL and link syntax written as code.

examples/check-links/README.md:

# Widget

Read the [setup guide](docs/setup.md) first, then the
[configuration reference](docs/configuration.md).

Jump straight to [installing](docs/setup.md#installing) or to
[upgrading](docs/setup.md#upgrading-an-existing-install), or back to the
[top of this page](#widget).

Every page lives in [the docs directory](docs/), and the
[install script](scripts/install.sh) does the work.

The [issue tracker](https://example.com/widget/issues) is external, so this
check does not read it, and neither does it read `[text](path)` written
as code.

examples/check-links/docs/setup.md:

# Setup

## Installing

Run the installer.

## Upgrading

Re-run the installer over the existing install, then read
[Installing](#installing) again.

Run against a fresh repository holding those two files, the check reports:

# python3 scripts/capture.py: check-links, run against a throwaway git repository seeded from examples/check-links
[GATE] README.md:4 (check-links) broken link: docs/configuration.md
[GATE] README.md:7 (check-links) broken anchor: docs/setup.md#upgrading-an-existing-install (docs/setup.md has no heading with that slug)
[GATE] README.md:11 (check-links) broken link: scripts/install.sh

The first finding is a missing file: nothing in the example is named configuration.md. The second is a file that exists with a heading that does not: the setup page’s heading is ## Upgrading, whose anchor is #upgrading, and no rule maps the longer anchor onto it. The third is a script that does not exist, held to the same test as a page. The link to #installing resolves, as do the bare #widget link to the page’s own title, the setup page’s own #installing, and the docs/ directory, which holds the setup page. The external URL and the code span produce nothing, because neither is a link this check reads.

Every finding names the file and line of the link, so the fix is either to retarget the link or to restore what it named.

Configuration

[check-links]
exclude = ["docs/legacy/*.md"]
known_untracked = [".claude/settings.local.json"]
historical = ["CHANGELOG.md", "RELEASES.md", "decisions/*.md"]
KeyShapeDefaultReach for this when
excludelist of glob strings; a bare string is a one-element list[], nothing excludedA file’s links should not be validated at all: a tutorial whose example deliberately links to a heading that does not exist yet, or a directory of inputs written to be broken, like this site’s own examples. An excluded file is skipped whole, live parts included.
known_untrackedlist of glob strings; a bare string is a one-element list[], every target must be trackedA link names a file that is real but deliberately never added to git, such as a git-ignored per-machine settings file, and should not gate like a link to nothing. A match must still exist on disk inside the repository, and a Markdown page reached this way still has its anchor checked.
historicallist of glob strings; a bare string is a one-element list[], every link resolves against the working treeA file is an append-only record, such as a changelog or a set of decision records, whose shipped entries your own rules forbid editing, and you still want to rename or restructure the pages it links to.

A historical file’s links get one more chance. A link that fails against the working tree is re-resolved against the tree at the commit that wrote its line, as git blame attributes it, and against the tree just before that commit, and passes if it held in either: for a Markdown page, that the page and its heading were in that tree; for anything else, that a file or directory was at that path. The tree just before is what lets a line recording a removal land in the same commit as the removal, where the page it names is already gone. known_untracked plays no part in that second lookup, since a file never added to git is in no commit’s tree. The record’s shipped entries stay what they were without leaving a stub heading behind at every old destination. A link that held nowhere is still a finding, and its message says where it was tested: not in the working tree, nor at the commit where the line was written or just before it, named by its short hash.

Three consequences follow, and all three are the same rule read consistently rather than special cases:

  • An uncommitted line resolves against the working tree like any other file, and failing that against HEAD, the tree just before it. A changelog’s unreleased section, being written now, stays gated on every link that holds in neither, and a finding there names HEAD.
  • A line a later commit touched is attributed to that commit and must hold as of it. Deliberately retargeting an old link, should your rules allow one, is checked against the tree it was retargeted in.
  • A line older than the commit that first added claims.toml is skipped when it fails. It was written before anything gated it, may have been broken then, and the append-only rule means nothing can fix it now. A project with no tracked claims.toml has no cutoff, and every line is checked.

The working-tree check always runs first and history is consulted only on a failure, so a project whose records all still resolve pays nothing for listing them. The reasoning behind the mechanism, and the alternatives it was chosen over, are in ADR 0002.

enabled, which takes this check out of the commit gate while leaving it in the on-demand skill and the CLI, is shared by every check and covered on Configuring claims.

Retirement markers

None. A link is checked wherever it appears, including inside a blockquote, an italicised sentence, or a paragraph opening “Previously said:”. The retired-quote exemption exists for a sentence quoted in order to retire it, and a link is a pointer rather than a sentence: quoting an old claim does not need the page it pointed at to stay put. A record that must keep old links intact is what historical is for.

Next

check-file-refs, which holds a bare path mention in prose to the same standard this check holds a link.

check-file-refs

A bare mention of a path in prose, “run scripts/build.py first”, that resolves to no tracked file. The mention is not written as a Markdown link; it is a path-shaped run of text with a recognised extension, and the sentence around it asserts that the file exists. When it does not, that is a gate finding, and the commit is refused until the mention names a file the repository has.

What it checks

A candidate is a run of text shaped like a relative path: at least one directory segment, a slash, and a final segment with an extension, where the extension is in the recognised set. The default set covers the common source, script, data and documentation extensions; the configuration below lists it, and a project adds to it rather than replacing it. Text that is path-shaped but ends in something outside the set, such as the .0 of api/v2.0, is not a candidate and is never reported. Neither is a bare filename with no slash, so “see README” is not checked.

Four kinds of path-shaped text are set aside before resolution:

  • the destination of a real Markdown link, which is check-links’ to validate, so one broken reference does not produce two findings under two names;
  • a URL, which is not a path however path-shaped its tail;
  • a mention starting with / or ~/, which names a place on the host rather than in the repository;
  • a mention starting with ../, which the check does not resolve either way.

A mention inside a fenced code block is not read, and nor is a fence’s own opening line, so an example path in a code sample is never a candidate. A fence that is opened and never closed silences the rest of its file here; that fence is reported by executable-claims over the same sweep.

A candidate is resolved twice before it is reported: first against the repository root, then, if that fails, against the directory of the file that cites it. A page citing a sibling as references/setup.md resolves either way. This trades some precision for recall: a genuinely broken root-relative mention passes if a same-named file happens to sit beside the citing page.

A mention that names a real file the project deliberately never tracks, such as a git-ignored per-machine settings file, is indistinguishable from a typo by tracking alone. The known_untracked key names such paths by glob; a candidate matching one is exempt from having to be tracked but must still exist on disk inside the repository, so a typo under an exempted pattern is still caught, and a symlink out of the repository is refused rather than followed. It applies to both forms: a pattern is matched against the root-relative path and against the path taken from the citing file’s directory, and either one passing is enough.

The check is whole-tree, over every tracked .md file on every run.

Marking a mention as an example

A path that is not meant to exist, a template such as decisions/NNNN-slug.md or a hypothetical plugins/extra.toml , is exempted by writing the HTML comment example immediately after it. Only backticks and plain spaces or tabs may sit between the mention and the marker; the marker’s own spelling is matched without regard to case or internal spacing. The marker binds to one mention. It is not a configuration entry, because a list in claims.toml has no structural link to the prose it exempts and goes stale the day that prose changes.

A marker that does not immediately follow a live candidate has no effect, and the check says so with an advisory finding at that line. That is the one place this gate check reports advisory: an inert marker is not a false claim, but it is a mechanism that has silently stopped working, which is worth a line.

Why it exists

A link is checked by check-links. A path in backticks with no link syntax around it makes the same claim, that this file is here, and is at least as common, in a README’s directory tour, a changelog’s “moved to”, an agent instruction file’s “read x/y.md first”. Nothing read it. A citation-ranking check drops a path it cannot resolve as noise, which is right for ranking and wrong for a claim. Without this check, the bare mention is the one shape of file reference that can be false forever without a finding.

Example

The example is a Markdown file and one script. The file names the script that exists and one that does not, and also carries the shapes the check sets aside: a Markdown link, a URL, a host path, a version-number lookalike, a marked hypothetical path, and a marker following nothing.

examples/check-file-refs/README.md:

# Widget

Build it with `scripts/build.py`, then deploy it with `scripts/deploy.py`.
The [release notes](docs/RELEASES.md) list what each version changed, and
the installer is at https://example.com/widget/install.sh.

Defaults are read from /etc/widget/config.toml. The endpoints are listed under
api/v2.0 of the reference. A plugin adds its own settings in a file such
as `plugins/extra.toml` <!-- example --> beside the main one.

Per-machine overrides live in the home directory. <!-- example -->

examples/check-file-refs/scripts/build.py:

print("building")

Run against a fresh repository holding those two files, the check reports:

# python3 scripts/capture.py: check-file-refs, run against a throwaway git repository seeded from examples/check-file-refs
[GATE] README.md:3 (check-file-refs) `scripts/deploy.py` does not resolve to a tracked file
[advisory] README.md:11 (check-file-refs) `<!-- example -->` doesn't immediately follow a path-shaped mention — has no effect

The gate finding is the deploy script, named on the first line of prose and present nowhere in the tree. The build script, named on the same line, resolves and produces nothing. The release notes are a Markdown link, which this check leaves to check-links; the installer is a URL; the defaults file starts with /; and the endpoint reference ends in .0, so none of those four is a candidate. The plugin settings file is a candidate, and would be a finding, but carries an example marker and is exempted. The advisory finding is the last line’s marker, which follows a sentence rather than a path and so exempts nothing.

The fix for the gate finding is either to add the file the sentence promises, retarget the sentence to a file that exists, or mark the mention as an example if it was never meant to exist.

Configuration

[check-file-refs]
exclude = ["docs/legacy/*.md"]
extensions = [".proto"]
known_untracked = [".claude/settings.local.json", "*.local.toml"]
historical = ["CHANGELOG.md", "decisions/*.md"]
KeyShapeDefaultReach for this when
excludelist of glob strings; a bare string is a one-element list[], nothing excludedA file’s bare path mentions should not be validated at all: prior-art notes discussing another project’s tree, decision records quoting a layout that no longer exists, or a directory of inputs written to be broken, like this site’s own examples. An excluded file is skipped whole.
extensionslist of extension strings, each with its leading dot; a bare string is a one-element listthe built-in set: .py, .rs, .go, .js, .ts, .rb, .java, .c, .h, .cpp, .swift, .sh, .md, .txt, .yml, .yaml, .json, .tomlThe project’s prose names a file type outside that set, such as .proto, and a bare mention of one should be held to the same standard. Entries are added to the built-in set, never substituted for it.
known_untrackedlist of glob strings; a bare string is a one-element list[], every candidate must be trackedA correctly cited file is real but deliberately never added to git, such as a git-ignored per-machine settings file, and should not gate identically to a typo. A match must still exist on disk inside the repository.
historicallist of glob strings; a bare string is a one-element list[], every mention resolves against the working treeA file is an append-only record, such as a changelog or a set of decision records, whose shipped entries your own rules forbid editing, and you still want to rename or move the files it names.

A historical file’s mentions get one more chance. A mention that fails against the working tree is looked up again in the tree at the commit that wrote its line, as git blame attributes it, and in the tree just before that commit, and passes if a file was in either, taken from either the repository root or the citing file’s directory, as in the working tree. A shipped entry that named a file before it moved stays as written, and the move does not have to leave the old path behind. A line recording a removal can land in the same commit as the removal, since the file was there just before it. A mention found nowhere is still a finding, and its message names where it looked: not in the working tree, nor at the commit where the line was written or just before it, given by its short hash. known_untracked plays no part in that second lookup, since a file never added to git is in no commit’s tree.

The same rule, read consistently, settles three edge cases:

  • An uncommitted line is checked against the working tree, and failing that against HEAD, the tree just before it. A changelog’s unreleased section is being written now, and is gated on every mention found in neither; a finding there names HEAD.
  • A line a later commit touched belongs to that commit, and the mention has to have resolved there. Retargeting an old path, if your rules allow it, is checked against the tree it was retargeted in.
  • A line older than the commit that first added claims.toml is skipped when it fails. Nothing gated it when it was written, so it may have been wrong then, and the append-only rule leaves no way to fix it now. With no tracked claims.toml there is no such commit, and every line is checked.

History is read only for a mention that has already failed against the working tree, so records whose mentions all still resolve cost nothing extra. check-links takes the same key for links, and ADR 0002 has the reasoning, including which other checks it does and does not reach.

enabled, which takes this check out of the commit gate while leaving it in the on-demand skill and the CLI, is shared by every check and covered on Configuring claims.

Retirement markers

None. A path mention is checked wherever it appears, including inside a blockquote, an italicised sentence, or a paragraph opening “Previously said:”. The retired-quote exemption exists for a sentence quoted in order to retire it, and a path is a pointer rather than a sentence: a changelog entry saying a file moved is making a claim about where it is now, and if the sentence is genuinely about a file that is gone, the example marker says so for that one mention. A record whose old mentions must stay intact is what historical is for.

Next

That is the last of the gate checks. The advisory checks follow, and check-config-defaults opens them: a stated default value, held to the line of code that sets it.

check-config-defaults

A sentence that states a setting’s default value, “TIMEOUT defaults to 30”, beside code in which the default is something else. The check reads the line of code the project has mapped the setting to and looks for the stated value in it. A value the line does not contain is an advisory finding: the sentence and the code disagree, and someone should look, but which of the two is wrong is not the check’s to say. A setting the project has not mapped is never looked at, and a project maps nothing until it writes the mapping, so the state every project starts in is one where this check reads every claim and verifies none.

What it checks

A claim is one line of tracked Markdown holding, in order: a backticked setting name, one of four fixed phrases, and a backticked value. The phrases are defaults to, default is, defaulting to and default:, matched without regard to case. Both backtick spans are required. “STATION_NAME defaults to the AI Radio station” states a default and is not a claim, because the value is prose rather than an exact string; a statement split across two lines is not a claim either. The phrase list has no configuration surface, because widening it would trade away the precision that makes the comparison honest: a claim that states its value exactly is the only kind a substring test can be trusted with.

Whether a claim is checked at all depends on the mapping, which is the check’s own section of claims.toml: each key is a setting name, and its value names where the real default lives, as a file and a line or a file and a short inclusive range of lines. A claim naming a setting with no entry is out of scope and produces nothing, not a finding. With an empty section, or no section, nothing is in scope. The configuration below shows the shape, and the example shows one at work.

Comparison is a substring test. The claimed value, with only its own surrounding quote characters stripped, must appear somewhere in the raw text of the mapped lines. The code side is not normalised at all: a claim of ai_radio matches a line reading STATION_NAME = "ai_radio" because the bare characters are there inside the quotes, not because either side was parsed. A mapped file that does not exist, or a range beyond the end of it, is reported as not containing the value, with the message saying that nothing was found there rather than quoting a line; it does not say which of the two it was.

The substring test cuts both ways, and the check accepts that rather than parse code. A claimed 30 passes against a line reading TIMEOUT = 300; a claimed value equal to the setting’s own name passes unconditionally, since the mapped line always contains it. A mapping entry also stays where it was written: when the default moves to another line and the entry is not updated, the check compares against whatever now sits at the old line and quotes it in the finding, which is the one signal that the mapping has gone stale.

A mapping entry not shaped path:line or path:start-end, with 1-based lines and a start no greater than its end, is a configuration error, reported as a crash of the check rather than skipped.

The check is whole-tree, over every line of every tracked .md file on every run, except lines inside a fenced code block: a block showing the claim syntax is an example rather than a claim. It runs no command; the mapped lines are read as text.

Why it exists

A stated default is the most precise claim documentation makes about configuration, and the one most quietly falsified: a timeout is doubled in the code and the sentence quoting the old value stays, still exact, still confident. No other check reads a value. A citation check asks whether TIMEOUT exists, not what it is set to. The price of verifying the value is that the project says where each default lives, which is also why nothing here has to guess at a project’s structure.

Example

The example is a Markdown file, a source file, and the claims.toml that connects them. The Markdown makes two claims the mapping covers, one true and one false, one claim it does not cover, and one statement that is not a claim at all.

examples/check-config-defaults/README.md:

# Widget

`STATION_NAME` defaults to `"ai_radio"`, and `TIMEOUT` defaults to `30`
seconds. `LOG_LEVEL` defaults to `info`, and the retry count defaults to
three.

examples/check-config-defaults/src/config.py:

STATION_NAME = "ai_radio"
TIMEOUT = 60
LOG_LEVEL = "info"
RETRIES = 3

examples/check-config-defaults/claims.toml:

[check-config-defaults]
STATION_NAME = "src/config.py:1"
TIMEOUT = "src/config.py:2"

Run against a fresh repository holding those three files, the check reports:

# python3 scripts/capture.py: check-config-defaults, run against a throwaway git repository seeded from examples/check-config-defaults
[advisory] README.md:3 (check-config-defaults) `TIMEOUT` claims default `30`, but src/config.py:2 does not contain it — found: 'TIMEOUT = 60'

The finding is the timeout: the claim says 30, the mapped line says 60, and the message quotes the line so the disagreement is visible without opening the file. The station name is a claim too, and passes: its value is quoted in the prose, the quotes are stripped, and ai_radio sits inside the mapped line. The log level is a claim the check reads and has no mapping for, so it is out of scope even though the source file plainly states it. The retry count is stated without a backticked value and is never a claim.

Without the claims.toml, the same run reports nothing. That is why the mapping is shown here rather than described: a project that has not written one has the check installed and inert.

The fix for the finding is to correct whichever side is wrong, the sentence or the code, or to move the mapping entry if the default has moved.

Configuration

[check-config-defaults]
STATION_NAME = "src/config.py:42"
TIMEOUT = "src/settings.py:40-45"
KeyShapeDefaultReach for this when
any setting name"path:line" or "path:start-end", 1-based and inclusive, with the start no greater than the end; anything else is a configuration errorno entries: every claim is out of scopeThe project’s prose states a default in the checkable shape, a backticked name and a backticked value around one of the fixed phrases, and the project wants it held to the line of code that sets it. One entry per setting; a setting with no entry is never checked, however often it is claimed.

There is no exclude. The mapping is the only scope the check has: a claim about a mapped setting is checked wherever it appears, and a claim about anything else is checked nowhere.

enabled, which takes this check out of the commit gate while leaving it in the on-demand skill and the CLI, is shared by every check and covered on Configuring claims.

Retirement markers

None. A claim inside a blockquote, an italicised sentence, a paragraph opening “Previously said:” or a fenced code block is read like any other line. The retired-quote exemption skips a sentence quoted in order to retire it; this check has no exemption of its own, and a sentence about a mapped setting’s former default is kept out of its reach by stating the old value as prose rather than as a backticked string.

Next

check-env-vars, which holds a backticked environment variable name to the files a project says define its environment.

check-env-vars

A backticked name shaped like an environment variable, DATABASE_URL, that appears nowhere in the files the project has said define its environment. The check searches those files for the name as a whole word, and a name none of them contains is an advisory finding: the prose names something the project does not appear to have, and someone should look. Until a project has named those files, though, there is nothing to search, and the check reports nothing at all. That inert state is the default, and it is the first thing to know about this check.

What it checks

A candidate is a backticked token in tracked Markdown shaped ALL_CAPS_WITH_UNDERSCORES: an uppercase letter first, then uppercase letters and digits in segments joined by single underscores, with at least one underscore. The underscore is what keeps a protocol acronym in backticks, HTTP or TLS, and an emphasised word such as NOTE, from being read as a variable. A name that is not backticked is never a candidate, however it is shaped. A candidate inside a fenced code block is not read either, since a block showing a variable being exported is an example rather than a claim.

The scope is the set of files a candidate is checked against: the tracked file named exactly .env.example at the repository root, if there is one, plus whatever the project lists under definition_files. The files are read as plain text, whatever language they are in, and a candidate passes when it appears in any of them as a whole word.

With no scope, the check is inert. No tracked .env.example and no definition_files means there are zero files to search, and the check produces nothing rather than searching the whole tree, because a bare token matched against every source file would collide with any local variable, class attribute or unrelated constant that happens to share the name. A project that installs claims and does nothing else has this check running and reporting nothing, and stays that way until it tracks an example environment file or names its definition files. A scope that exists but is empty, a tracked .env.example with nothing in it, is a scope, and every candidate is then a finding.

Verification is existence, not value or use. The name has to appear somewhere in the scope as text; nothing here understands what reading an environment variable looks like in any language, and a variable consumed only through a build tool’s own configuration, or assembled from parts at runtime, is unfound through no fault of the claim.

Detection is shape-only, and the noise runs both ways. A backticked constant, enum value or regular-expression name that was never an environment variable is a candidate exactly as a real one is, and is reported if the scope does not mention it. The exclude key keeps a directory of historical or illustrative prose out of the sweep for that reason.

The check is whole-tree, over every tracked .md file on every run, and runs no command.

Why it exists

An environment variable is named in prose far more often than it is declared anywhere: a README’s setup section, a deployment note, an agent instruction file. It is a naming convention rather than a declaration a compiler sees, so a rename in the code leaves every mention behind and nothing reports it. A citation check reads Swift declarations and cannot see a name that was never declared in a language at all. Searching the files a project says define its environment is the narrowest test that can be honest about it.

Example

The example is a Markdown file and an example environment file. The environment file defines two names. The Markdown names both, names a third the file does not define, and carries the shapes the check sets aside: an unbackticked name, two backticked acronyms, and a name inside a fenced block.

examples/check-env-vars/.env.example:

DATABASE_URL=postgres://localhost/widget
STATION_NAME=ai_radio

examples/check-env-vars/README.md:

# Widget

Point `DATABASE_URL` at the database and set `STATION_NAME` to the
station's identifier. Responses are cached for `CACHE_TTL_SECONDS` seconds,
and retries are bounded by MAX_RETRIES. The server speaks plain `HTTP`
behind a `TLS` terminator.

```sh
export SECRET_KEY=change-me
```

Run against a fresh repository holding those two files, the check reports:

# python3 scripts/capture.py: check-env-vars, run against a throwaway git repository seeded from examples/check-env-vars
[advisory] README.md:4 (check-env-vars) `CACHE_TTL_SECONDS` is not defined or used anywhere in the configured scope

The finding is the cache lifetime, backticked in the prose and absent from the environment file. The database URL and the station name are candidates too, and pass, because the file defines both. The retry bound is not backticked and is never a candidate; HTTP and TLS are backticked and have no underscore; and the secret key is inside a fenced block, where nothing is read.

The same two files with the environment file untracked, or absent, report nothing, because the scope is then empty. That is the state a project with no scope is in, and a capture of it would be blank.

The fix for the finding is to add the variable to the environment file, or to list under definition_files the file that really does define it, or to correct the sentence if the name is wrong.

Configuration

[check-env-vars]
definition_files = ["src/*.py", "deploy/*.tf"]
exclude = ["docs/legacy/*.md"]
KeyShapeDefaultReach for this when
definition_fileslist of glob strings; a bare string is a one-element list[]: the scope is .env.example alone, if tracked, and otherwise nothingThe names the prose uses are defined somewhere other than, or as well as, .env.example: the source that reads them, an infrastructure variable file, a container manifest. Entries are added to the built-in default, never substituted for it. Do not point this at the Markdown being swept: a mention that is also its own definition passes unconditionally, and the check is silently switched off for that file.
excludelist of glob strings; a bare string is a one-element list[], nothing excludedA file’s backticked names should not be checked at all: prior-art notes, decision records naming another project’s environment, or a directory of inputs written to be broken, like this site’s own examples. An excluded file is skipped whole.

definition_files names files to search, not prose to sweep. The key is deliberately not called files, the name some checks use for the prose they read, because here that name would mean the opposite thing.

enabled, which takes this check out of the commit gate while leaving it in the on-demand skill and the CLI, is shared by every check and covered on Configuring claims.

Retirement markers

None. A candidate inside a blockquote, an italicised sentence or a paragraph opening “Previously said:” is checked like any other. The retired-quote exemption skips a sentence quoted in order to retire it; this check’s unit is a name rather than a sentence, and a name that is genuinely about the past is kept out of the sweep by writing it without backticks, inside a fenced block, or in a file listed under exclude.

Next

check-cli-flags, which asks a script whether it really accepts the flag a sentence says it does.

check-cli-flags

A sentence naming a script and, in the same breath, a flag it accepts. The check runs the script with --help and looks for the flag in what it printed. A flag the help text does not mention is an advisory finding: the prose promises an option the script does not advertise, and someone should look. Before anything runs, though, the script has to be one this machine’s owner has chosen to run, and in a fresh checkout none is, so the state a reader meets first is the check asking for that choice.

What it checks

A claim is one line of tracked Markdown carrying, in backticks, both a script and a flag. The two may share one span, as a full invocation, or sit in two spans on the same line:

Build it with `scripts/build.py --release`.
The `manage.py` script accepts `--verbose`.

A script is a path-shaped token ending in a recognised script extension: .py, .sh, .rb, .js, .ts or .pl. A flag is a --word or a single-letter -x. A bare command name with no extension is never a script, so a sentence about npm, docker or git is not a claim: without an extension there is no way to tell a tool’s name from any other backticked word, and guessing wrong would mean running an arbitrary word as a command. A flag with no script on its line is not a claim either, since nothing says which of a project’s entry points it belongs to. A claim inside a fenced code block is not read.

For each claim the check builds one command: the script, followed by the help flag.

A script named without a directory, manage.py, is run as ./manage.py , so the lookup is pinned to the repository root rather than to whatever same-named binary the path might hold. The command is then looked up, as an exact string, in claims.local.toml, and this is where a fresh checkout stops. The grant mechanism is shared with executable-claims and documented once, on the grant file section of the Configuring page; this page does not repeat it. The one difference is severity: a command with no grant is an advisory finding here, matching the rest of the check, where executable-claims reports the same state as a gate. A claims.local.toml that git tracks is the exception in the other direction, the one gate finding this otherwise advisory check produces, because a committed grant file is a compromise indicator whatever the check’s own severity.

A granted command runs from the repository root, under a timeout, and the outcome is one of three. A clean exit whose combined output mentions the flag as a whole token, not as a prefix or substring of a longer one, is a pass, so --norm does not pass on the strength of --normalize. A clean exit whose output does not mention it is the finding this check exists for. A non-zero exit or a timeout is inconclusive, reported as “could not be verified” rather than as false, because no answer is not a wrong one. A script whose help text itself exits non-zero is therefore inconclusive on every run, and the way to stop it re-asking is a denied entry, which keeps it visible as an advisory finding. Each distinct command runs once per invocation, however many claims name it.

The script runs through its own shebang, with whatever PATH the check was started with. Through a git hook installed by pre-commit, or run through uvx, #!/usr/bin/env python3 finds the hook’s own Python, which has none of the project’s dependencies, so a script that imports them exits non-zero and reads as inconclusive. A script that needs an environment names it in its shebang: #!/usr/bin/env -S uv run -q python for the project’s own, or #!/usr/bin/env -S uv run --script with its dependencies declared inline. ADR 0008 records why claims does not adjust PATH itself.

Verification is only as complete as the help text. A framework that truncates its help, or lists a flag only under a subcommand, leaves a real flag unfound through no fault of the claim, and --help is the only introspection the check knows.

The check is whole-tree, over every tracked .md file on every run.

Why it exists

A flag is documented once and renamed in the parser. The sentence that named it keeps reading like a fact, and a reader who copies it gets an error from the script rather than from anything that read the sentence. A citation check sees declarations, and a flag is not one. Asking the script itself is the only test there is, and asking through --help is the one question nearly every command-line framework answers the same way, which is what lets the check stay this narrow.

Example

The example is a Markdown file and two scripts. The file makes one claim in each shape, names a bare command that is never a claim, and shows an invocation inside a fenced block. The build script accepts the flag its claim names; the management script does not accept the one its claim names.

examples/check-cli-flags/README.md:

# Widget

Build it with `scripts/build.py --release`, and run it with
`manage.py`, which accepts `--verbose` for a running commentary. A
development dependency is added with `npm install --save-dev`.

```sh
scripts/build.py --jobs 4
```

examples/check-cli-flags/scripts/build.py:

#!/usr/bin/env python3
import argparse

parser = argparse.ArgumentParser(description="Build the widget.")
parser.add_argument("--release", action="store_true", help="optimise the build")
parser.parse_args()

examples/check-cli-flags/manage.py:

#!/usr/bin/env python3
import argparse

parser = argparse.ArgumentParser(description="Manage a running widget.")
parser.add_argument("--quiet", action="store_true", help="print nothing but errors")
parser.parse_args()

Run against a fresh repository holding those three files, with no claims.local.toml beside them, the check reports:

# python3 scripts/capture.py: check-cli-flags, run against a throwaway git repository seeded from examples/check-cli-flags
[advisory] README.md:3 (check-cli-flags) `scripts/build.py --help` has no local grant in claims.local.toml — under `[check-cli-flags]`, add "scripts/build.py --help" to an existing `allowed` list or start one with `allowed = ["scripts/build.py --help"]`, or the same into `denied` to skip it and record that choice
[advisory] README.md:4 (check-cli-flags) `./manage.py --help` has no local grant in claims.local.toml — under `[check-cli-flags]`, add "./manage.py --help" to an existing `allowed` list or start one with `allowed = ["./manage.py --help"]`, or the same into `denied` to skip it and record that choice

This is the ungranted state, the one every fresh clone, colleague’s checkout and CI runner is in, and each finding gives the exact TOML that would grant or deny its command. Nothing ran to produce them, which is also why the capture is identical on any machine; a grant is per-machine and no repository can commit one, for the reasons the grant file section gives. The second finding shows the ./ the check adds to a script named without a directory, and that string, not the bare name, is what a grant has to list. The package manager line is never a claim, and the fenced invocation is not read.

Once both commands are granted, the build script’s claim reports nothing, because its help text lists the flag, and the management script’s claim reports that the script does not appear to support the flag: the command succeeded and never mentioned it.

Configuration

[check-cli-flags]
exclude = ["docs/legacy/*.md"]
timeout = 15
KeyShapeDefaultReach for this when
excludelist of glob strings; a bare string is a one-element list[], nothing excludedA file’s script-and-flag claims should not be checked at all: prior-art notes naming scripts from another layout, or a directory of inputs written to be broken, like this site’s own examples. An excluded file is skipped whole.
timeoutnumber of seconds, integer or float; true and false are rejected rather than read as 1 and 010A script’s help text is slow to appear, a cold build or a heavyweight interpreter, and keeps reporting an inconclusive timeout at the default. There is no per-script override, so this is set for the project.

The grant lists, allowed and denied, are not keys of this section. They live under the same table name in claims.local.toml, and are documented once, on the Configuring claims page.

enabled, which takes this check out of the commit gate while leaving it in the on-demand skill and the CLI, is shared by every check and covered on Configuring claims.

Retirement markers

None. A claim inside a blockquote, an italicised sentence or a paragraph opening “Previously said:” is checked like any other. The retired-quote exemption skips a sentence quoted in order to retire it; this check’s unit is a script and a flag rather than a sentence, and a claim that must not run on this machine is recorded under denied in the grant file, which keeps it visible as an advisory finding rather than hiding it.

Next

stale-claims, which ranks prose sections by how much the code they name has changed since the section was last edited.

stale-claims

A section of tracked Markdown that names a file, beside a history in which that file has changed since the section was last edited. The check finds the code each section names, counts the commits each of those files has seen since the section’s own last touch, and ranks the sections by the largest share of any named file’s history that falls after that point. The output is a ranked list of candidates, never a verdict: a section high on the list names code that has moved a great deal since the section was written, and someone should read the two together, but nothing here has found the section false. A busy file makes an accurate sentence look suspicious, and a sentence can be wrong about a file that has not changed at all.

What it checks

A section is a heading and everything below it to the next heading, at any level, or the whole file when it has no heading. A line inside a fenced code block is never a heading, so a # comment in a shell example stays part of the section it sits in. In a file with headings, lines above the first belong to no section and are not ranked. The section is the unit because a claim about a file is rarely one sentence, and the heading is what the finding names.

A subject is a tracked file the section names, in one of two shapes. An explicit relative path, a directory and a file name with an extension, counts when a tracked file has exactly that path, or the diff range deleted or renamed away a file at that path, read from the repository root or, failing that, from the directory of the file that cites it: .github/workflows/ci.yml names that file, and so does ./.github/workflows/ci.yml. A path starting with ../ is read from the citing file’s directory only. A path starting with / or ~/ names no subject, because it points outside the repository. A backticked bare name, with or without an extension, counts when exactly one tracked file outside exclude has that stem: cache.py and cache both name the one file whose name without its extension is cache. A written extension must match that file’s own, letter case included, so cache.yaml names nothing when the one file with that stem is cache.py. A stem that two such files share names no single file and is dropped rather than guessed at. The repository’s own claims.toml is never named this way: claims names the tool, and a page about the configuration format does not go stale because the project tuned its own configuration. Neither shape takes a space, so a file whose path contains one is never a subject. A section naming no subject is not ranked.

The bare form is ambiguous in a way the path form is not, because a word such as cache or config is as often ordinary prose or a configuration key as it is a module. The module_reference_scope key narrows where a bare name counts as a subject; by default it counts everywhere.

The stem lookup does not distinguish written code from generated output. In a project that commits a terminal capture of its doctor subcommand as docs/captures/doctor.ansi, and has no other file with that stem, a section mentioning doctor in backticks names the capture, and every regeneration of the capture counts against it. Listing the generated tree under exclude keeps a bare name from reaching it:

[stale-claims]
exclude = ["docs/captures/*"]

A section that cites the capture by its path, in prose or in a link, still names it, because a path is a deliberate choice of file where a bare name is a guess. Since only Markdown files are ranked, excluding a tree of non-Markdown output removes nothing from the ranking itself.

The section’s last touch is the newest commit git blame attributes to any of its lines, by committer time. For each subject, the check reads the file’s full commit history and counts the commits strictly after that time. The section’s score is the largest fraction, across its subjects, of that subject’s history that lies after the touch, so a claim older than most of a quiet file’s life outranks one older than a sliver of a busy file’s. The finding names up to three subjects, most changed first, each with its commit count and its share of history. Sections are reported in descending score, and a section none of whose subjects has changed since its last touch is not reported.

A section is ranked only when the diff range changes one of its subjects: adds, modifies or deletes it, or renames it, counted by both its old and its new path. A section whose subjects the range leaves alone is not reported, however stale its score would be, and an edit to the section itself is not a change to a subject. The score is the same whichever range brings a section in, since it is read from the whole history of each subject, not from the range.

When the range reaches the working tree, as the commit hook’s does, the uncommitted change counts as one more commit after the section’s last touch to each subject it changes: in the count, and in the subject’s history. A run before committing therefore reports each section with the score a run over that commit will give it once it is made. A range ending at a commit, A..B or A...B, leaves the working tree out, and so leaves the uncommitted change out of the score too. The uncommitted change counts on the same tests as a commit: for a subject scoped to one section, only when it touches that section’s lines, and for an append-only subject, only when it removes a line. A section with uncommitted edits of its own has the uncommitted change as its last touch, so the same-commit rule below applies to it before the commit is made, and it scores zero for every subject.

A path to a Markdown file followed directly by # and an anchor, in a link such as [text](page.md#anchor) or bare in prose, names one section of that file rather than the whole of it, when the anchor is the slug of one of its headings. That section runs from the heading to the next heading of the same or a higher level, so its subsections belong to it, and its history is only the commits that touched the lines it spans in the latest commit. An anchor that matches no heading, or one on a file that is not Markdown, names the whole file. The finding names such a subject with its anchor, and a section linking the same file with and without an anchor, or with two anchors, keeps each as its own subject.

A navigation page named without an anchor is not a subject of the section: its history is not counted and the finding does not name it. A link with an anchor into one names its section as above.

An append-only subject, which CHANGELOG.md is by default, does not count a commit whose diff for the file removes no lines, wherever the lines it adds are: such a commit is left out of both the commits after the section’s last touch and the file’s history. A commit that changes or removes a line counts, cutting a release by renaming its heading included. The commit that created the file removed nothing either, so it is no part of that history. For a subject scoped to one section, a commit is left out on the same test over the whole file’s diff.

The same test decides whether such a subject brings its section into the range: it does only when a commit in the range, or the uncommitted change, removes a line from the file. Growth alone brings nothing in, a newly created file included, while a deletion, a rename, a binary change or a rewritten line still does, even a line added earlier in the same range. A merge in the range is not tested itself, only the commits it brings in, so bringing a branch up to date with a base that rewrote the file brings nothing in. A section is still ranked when another of its subjects changed, with the same score.

A section and its subject changed in the same commit score zero for that subject, because the commit that touched both is the section’s own last touch and not a change after it. Two separate commits that share a committer timestamp to the second fall into the same gap. A rewrite of a claim to match a change to its subject, landed together, is therefore invisible here, and nothing else in the check compensates for it.

A subject scoped to one section does not see a change beside it. An edit to the paragraph just above the linked heading is not counted, even when it changes what the linked section means. A renamed heading is not lost the same way: the anchor then names no heading, check-links reports the link as broken, and fixing that link brings a reader back to the section that holds it.

The check is diff-scoped: it reads every tracked .md file on every run, and reports only the sections the range brings in. It runs no command. A file named CHANGELOG.md, in any letter case and any directory, is skipped, because a changelog entry describes a release as it shipped and its subjects moving afterwards is expected.

Why it exists

Most prose about code is true when written and stops being true later, and nothing reports the moment it stops. A rename is caught by a citation check; a default that moved is caught by a defaults check; but a paragraph that describes how a module works has no single fact to test, and the only signal that it might have rotted is that the module kept changing while the paragraph did not. That signal is weak, which is why the check ranks rather than decides, and it is still the one signal available for a claim no narrower check can reach.

Example

The example is history alone, because a section can only be older than its subject’s changes once those changes have been committed after it. The capture commits three steps an hour apart. The first writes the design note and the three files it names:

examples/stale-claims/history/01-writes/docs/design.md:

# Caching

Reads go through `cache.py`, which keeps one entry per path and evicts
nothing until the process exits.

# Storage

Entries are written by src/store.py as one file per key, named for the
key's hash.

# Logging

Every write is logged through `log.py` at debug level.

examples/stale-claims/history/01-writes/src/cache.py:

entries = {}


def get(path):
    return entries.setdefault(path, open(path).read())

examples/stale-claims/history/01-writes/src/store.py:

import hashlib


def put(key, value):
    open(hashlib.sha1(key).hexdigest(), "w").write(value)

examples/stale-claims/history/01-writes/src/log.py:

import logging


def debug(message):
    logging.getLogger("store").debug(message)

The second step changes the cache to evict:

examples/stale-claims/history/02-evicts/src/cache.py:

LIMIT = 64
entries = {}


def get(path):
    if len(entries) >= LIMIT:
        entries.pop(next(iter(entries)))
    return entries.setdefault(path, open(path).read())

The third rewrites the cache again and changes the store’s layout on disk:

examples/stale-claims/history/03-rewrites/src/cache.py:

from functools import lru_cache


@lru_cache(maxsize=64)
def get(path):
    return open(path).read()

examples/stale-claims/history/03-rewrites/src/store.py:

import hashlib
import os


def put(key, value):
    name = hashlib.sha1(key).hexdigest()
    os.makedirs(name[:2], exist_ok=True)
    open(os.path.join(name[:2], name[2:]), "w").write(value)

The design note is never edited after the first step. Run against that repository over the range HEAD~1, the third step’s own change, the check reports:

# python3 scripts/capture.py: stale-claims, run against a throwaway git repository seeded from examples/stale-claims over the diff range HEAD~1
[advisory] docs/design.md:1 (stale-claims) 'Caching' names code 67% changed since last touched — cache.py 2 commits (67% of its history)
[advisory] docs/design.md:6 (stale-claims) 'Storage' names code 50% changed since last touched — store.py 1 commit (50% of its history)

The Caching section is first because its subject changed most: of the three commits in the cache file’s history, two came after the section was written. The Storage section names its subject as a path rather than a bare name, and ranks second, with one of the store file’s two commits after the section. The Logging section names a file that has not changed since the section was written and is outside the range, and is not reported at all. The capture is the same on every run because the commits carry fixed timestamps; the score depends on commit times, not on the clock.

Both findings are candidates. The Caching section is in fact false now, since the cache evicts, and the Storage section is still true, since entries are still one file per key. The check cannot tell those apart, and does not claim to. The fix for a candidate is to read the section against the code and either correct it or leave it, and a section that is read and left alone comes back on any range that changes one of its subjects again, until its lines are next touched.

Auditing the whole tree

A section whose subjects nothing touches is never ranked at commit time, so a stale claim about a quiet file stays silent until a range reaches it. To rank every section whose subjects have changed at all, run the command line over a wide range: since a release tag,

python3 -m claims.cli --diff-range v1.0.0..HEAD

or since the first commit:

python3 -m claims.cli --diff-range "$(git rev-list --max-parents=0 HEAD)..HEAD"

Every check runs over that range, so the other diff-scoped checks report on everything the range changed too.

Configuration

[stale-claims]
module_reference_scope = ["decisions/*.md", "AGENTS.md"]
exclude = ["docs/legacy/*.md"]
exclude_sections = ["decisions/*.md#context"]
KeyShapeDefaultReach for this when
module_reference_scopelist of glob strings; a bare string is a one-element listabsent: a bare backticked name counts as a subject in every fileCommon file stems double as ordinary words or configuration keys in the tree, so a bare cache or config in a tutorial names a module the sentence is not about. With the key set, a bare name counts only in a matching file; a name with its file’s extension, and an explicit path, count everywhere regardless.
excludelist of glob strings; a bare string is a one-element list[]: nothing excluded beyond the built-in CHANGELOG.mdA file’s sections should not be ranked at all: prior-art notes about another project, or a directory of inputs written to be broken, like this site’s own examples. An excluded file is skipped whole, and a bare backticked name never resolves to it, so a stem it shares with one other file names that other file. An explicit path to it still counts as a subject.
exclude_sectionslist of <path glob>#<slug> strings; a bare string is a one-element list[]: every section of a ranked file is rankedOne kind of section can’t go stale, though the rest of its file can: an architecture decision record’s Context describes the world before the decision, and stays true of that world however far the code moves. A section is skipped when its file matches the glob, matched as exclude matches, and its heading’s slug equals the slug exactly, under the slug rule an anchored link uses; the headings nested under it are skipped with it. The slug takes no glob. An entry with no slug after its #, or with one no heading could have, such as Context or prior art for context or prior-art, is reported as invalid configuration. A skipped section still counts as a subject when another section links to it.

enabled, which takes this check out of the commit gate while leaving it in the on-demand skill and the CLI, is shared by every check and covered on Configuring claims. Which files are append-only is set once for the project, under [subjects] rather than this check’s own section, and is covered there too, in Append-only files, as are the pages that are no subject when named whole, in Navigation pages.

Retirement markers

None. A section is ranked by the age of its lines and the history of its subjects, and a blockquote, an italicised sentence or a paragraph opening “Previously said:” inside it is read like any other line. The retired-quote exemption skips a sentence quoted in order to retire it; this check’s unit is a section rather than a sentence, and a section that is deliberately about the past belongs in a file listed under exclude.

Next

restatement, which finds a sentence a diff retracted that is still asserted, word for word, somewhere else.

restatement

A sentence a diff removed that is still asserted, word for word, somewhere else in the tree. The check reads the removed lines of the diff, subtracts anything the same file’s diff also added, and searches every tracked file it reads for the words that remain. A surviving copy is an advisory finding: the diff retracted something in one place, and the same thing is still said in another, and someone should look. It is advisory because the same sentence can legitimately live in two places on purpose, a summary and the page it summarises, and the check cannot tell a retraction from an edit to one copy of two.

What it checks

The diff is read file by file, and only the removed lines of a file whose extension is in scope count. The built-in scope is .md, .swift, .py, .sh and .yml, and extensions adds to it. Before a removed line is searched for, the words the same file’s diff added are subtracted: a reflowed paragraph removes and re-adds most of itself, and a thing still said in the same file is not a thing retracted. The subtraction is per file, so an unrelated addition elsewhere in the diff cannot cancel a genuine retraction.

In a source file only the comment text is read, on every side: the removed lines, the added lines subtracted from them, and the lines searched for survivors. Code contributes no words, so a line of code deleted from one file and still present in another is not a finding. Four extensions are read this way:

  • .py: # comments and docstrings. A docstring is a triple-quoted string, """ or ''' with an optional r, u or b prefix in either case, whose opening quotes begin a line after indentation; a string assigned or passed on the same line, x = """..., is code.
  • .sh: # comments.
  • .rs and .swift: every comment, //, ///, //! and /* */, not only doc comments. A block comment nested inside another is read to the outer one’s close.

A comment that trails code on the same line counts, its comment part only. A #, // or /* opens a comment only at the start of a line or after whitespace, so ${x#y}, $# and http:// are code, and a shebang on the first line is not a comment. In a .py file a string on one line is code, so "a # b" holds no comment and '"""' opens no docstring; a docstring is not ended by an escaped \""". In the other three, strings are not recognised, so a comment marker inside one, "a // b", is read as the start of a comment. Each line is classified in the context of its whole file, the old version for a removed line and the new one for an added or surviving line, so a line deep inside a docstring or a block comment is comment text even when its opening is lines away. Every other extension in scope, .md and .yml included, is read whole, line by line.

Comment text and prose are compared with each other in both directions: a sentence retracted from a Markdown page and still present in a docstring is found, and so is the reverse.

Each line is reduced to its words before anything is compared: link syntax is replaced by its text, inline markup characters become spaces, letters are lowercased, and every other character becomes a space too. A sentence that survives with different emphasis or a re-pointed link is the same sentence.

Two modes search for what remains, and each finding names the one that fired:

  • restatement-ngram takes every run of six consecutive words the diff removed and did not add back, and reports a line anywhere in scope that still contains one. A line with several matching runs is reported once, quoting the one with the most characters.
  • restatement-whole-line takes every removed line of at least ten words whose whole word sequence does not reappear in the file’s added words, in order, across line breaks, and reports a line anywhere in scope that reduces to exactly the same words. In a source file the line is its comment part alone, still of at least ten words.

Six is the run length because eight missed a real restatement that differed from the retracted sentence by one word. Neither length is configurable.

The check is verbatim only. A file that restates the removed fact in different words shares too few consecutive words for the first mode and does not match line for line for the second, and is not found. That is by design and not a gap to close: telling a paraphrase from a different claim is a judgment, and the mechanical half of this tool does not make judgments.

A survivor is reported only while the removed text exists in at most duplication_threshold other files, one by default. A sentence in two places, the edited file and one survivor, is exactly the case the check exists for and is reported; a banner or licence line in three or more is text duplicated on purpose, where removing one copy says nothing about the others, and every copy of it is suppressed. The count is taken over the files that still hold the text, so a line present in two survivors is over the default threshold whichever of them is read first.

A line the diff itself added is never a survivor, in any file. Because the subtraction is per file, a sentence moved from one file to another counts as removed from the first, and its new copy would otherwise be reported as the survivor of its own removal; whoever wrote that line in this change meant it. A run of six words is set aside only when every word of it is on an added line: a run that starts on an untouched line can be a real survivor wrapping onto a line the diff edited, so moved text rewrapped to start at the end of an untouched line is reported there. An old last line with no newline that the diff only gave one, by appending after it, is not an added line. Added lines are set aside before the threshold counts files, so a moved copy neither pushes an untouched survivor over the threshold nor is reported in its place: a sentence moved from one page to another, with an untouched copy in a third, is reported at the third. A line the diff did not add is still a survivor, even in a file the diff otherwise changed.

The check is diff-scoped: with nothing removed there is nothing to search for, and a survivor left behind by an earlier commit is not reported on a later one. The survivor sweep itself is whole-tree over every tracked file in scope, so a copy in a file the diff never touched is found. It reads each file as it is on disk, so a --diff-range that does not end at the checked-out files can misplace or miss a survivor. The check runs no command.

One survivor comes from a mark rather than the diff. When a change rewords a line that held a marked restatement-ngram survivor and keeps the quoted run, the change both removes and re-adds the run in that file, so the diff alone retracts nothing. The mark committed at HEAD still records the earlier retraction, so a run whose range reaches the working tree, the commit hook’s included, searches for that run again and reports it on the reworded line, with the line and message a range over both commits reports. Marking it in the commit that rewords the line quiets both. The old mark is reported as an orphan too, and pruning it does not lose the finding, since the mark is read as committed. A rewording that drops one of the quoted run’s words raises nothing here, even where a shorter run the earlier commit also retracted survives: a range over both commits reports that run, and only there.

Why it exists

A fact that lives in two files is corrected in one. The edit that retracts a sentence is the one moment when the author knows it was wrong, and the check uses that moment: the removed line is the search term, and the search finds the copy the author did not remember. A whole-tree duplicate finder would report every deliberate pair on every commit; starting from what the diff retracted is what makes the finding worth reading.

Example

The example is a committed step and a pending edit. The step holds three pages that share a banner line, two of which also share a sentence about eviction, and a third that says the same thing in other words:

examples/restatement/history/01-states/docs/overview.md:

# Overview

This page is part of the AI Radio operator handbook and is maintained by hand.

The cache keeps one entry per path and never evicts an entry on its own.

examples/restatement/history/01-states/docs/setup.md:

# Setup

This page is part of the AI Radio operator handbook and is maintained by hand.

There is nothing to configure.

The cache keeps one entry per path and never evicts an entry on its own.

examples/restatement/history/01-states/docs/faq.md:

# FAQ

This page is part of the AI Radio operator handbook and is maintained by hand.

Nothing is ever evicted from the cache; an entry stays until restart.

The pending edit rewrites the overview, removing the banner and the sentence and saying the opposite of the sentence:

examples/restatement/docs/overview.md:

# Overview

Entries are evicted once the cache passes its size limit, oldest first.

Run with that edit staged, the check reports:

# python3 scripts/capture.py: restatement, run against a throwaway git repository seeded from examples/restatement
[advisory] docs/setup.md:7 (restatement-ngram) still says: ...entry per path and never evicts...
[advisory] docs/setup.md:7 (restatement-whole-line) still says: the cache keeps one entry per path and never evicts an entry on its own

Both findings are the one surviving copy of the retracted sentence, in the setup page, once from each mode: the first quotes one six-word run the two lines share, the second quotes the whole line as words. The FAQ says the same thing and is not reported, because it says it in different words; that is the verbatim limit, and a reader who wants the FAQ found has to search for it. The banner was removed too, and survives in both the setup page and the FAQ, which is one file more than the default threshold allows, so neither copy is reported.

Without the edit, the same three pages report nothing: the check starts from what a diff removed, and a duplicate that no diff has touched is not a retraction.

The fix for a finding is to retract the surviving copy too, or to leave it if the two really are meant to differ; and where a line is shared on purpose across many files, to raise duplication_threshold rather than dismiss the finding each time.

Configuration

[restatement]
exclude = ["examples/*"]
historical = ["CHANGELOG.md", "RELEASES.md"]
extensions = [".rs"]
duplication_threshold = 3
KeyShapeDefaultReach for this when
excludelist of glob strings; a bare string is a one-element list[]: nothing excludedA file is expected to keep retracted prose on purpose, such as a directory of inputs written to be broken, like this site’s own examples. An excluded file contributes no removed lines from its own diff, and is dropped from the survivor sweep entirely, so it neither counts toward another file’s duplication nor is reported for it.
historicallist of glob strings; a bare string is a one-element list[]: every file is swept for survivorsA file is an append-only record, a changelog or release notes, whose shipped entries your own rules forbid editing, so a survivor in one is never something to fix. A line in it that the diff did not add is never a survivor and never counts toward duplication_threshold, and nor is a run of six words starting on one. A line the diff did add is read as in any file: a run that starts on it and wraps onto a shipped line is still reported there. Its own diff is still read: a line removed from it, such as an edit to an [Unreleased] section, is searched for elsewhere like any other retraction, which exclude would stop.
extensionslist of dotted suffixes; a bare string is a one-element listthe built-in set alone: .md, .swift, .py, .sh, .ymlThe project has prose or source in a language the built-in set does not cover, .rs for a Rust project, and wants its retractions and its survivors read too. Entries are added to the built-in set, never substituted for it. .py, .sh, .rs and .swift are read as comment text only, as described above; any other extension, built-in or added, is read whole, code included.
duplication_thresholdinteger; a boolean or a non-integer is a configuration error1Text is duplicated on purpose across more files than the default tolerates, a shared licence header or a generated banner, and each copy is reported every time one of the others changes. 0 reports nothing at all, since every survivor is in at least one file; the lowest useful value is the default.

enabled, which takes this check out of the commit gate while leaving it in the on-demand skill and the CLI, is shared by every check and covered on Configuring claims.

Retirement markers

None. A surviving copy inside a blockquote, an italicised sentence or a paragraph opening “Previously said:” is reported like any other line, because the words are compared after markup is stripped and a blockquote marker is markup. The retired-quote exemption skips a sentence quoted in order to retire it; here a retired quotation of the removed sentence is a survivor in the plain sense, and a file that keeps such quotations on purpose belongs under exclude.

Next

spliced-docs, which reads Swift and Rust doc comments for one that an insertion has pushed onto the wrong declaration.

spliced-docs

A doc comment that has ended up above the wrong declaration. Inserting a declaration between an existing comment and the declaration it was written for is a routine edit, and the compiler and the documentation renderer are both content with the result: the comment now documents the newcomer, and the declaration it described is bare. The check looks for a comment that reads as two documents run together and names the declaration that lost its own. That is an advisory finding, because a break in a comment is common and only some breaks are splices. The check reads Swift and Rust, and nothing else.

What it checks

Every tracked .swift and .rs file is read; no Markdown is, and no comment other than a /// line is searched for breaks. The unit is a run: one contiguous block of /// lines, together with the attributes and the declaration beneath it.

A break is a place inside a run where one line ends a sentence and the next reads as a fresh summary, with no blank /// between them. A line reads as a summary when it opens the way a summary line does: with “The”, “A” or “An”; with a third-person verb such as “Loads” or “Returns”; or, in Swift, with one of a few further openers such as “Whether”. That reading comes from the house style both languages’ conventions share, a one-line summary, a blank ///, then detail, so a second summary with no blank line before it is where one document ends and another begins.

A break alone is far too noisy to report; an ordinary second sentence trips it constantly. What distinguishes a splice is that the stranded half, the lines above the break, names in backticks a declaration that the comment is plainly not attached to. Two readings of “not attached” are available, each a mode of the check, and a finding names the mode that fired:

  • undocumented, on by default: the stranded half names a declaration in the same file that has no /// run of its own. That is the shape an insertion leaves behind, and the finding is reported under the mode spliced-docs-undocumented. In Rust, “names” also covers a parameter of the undocumented function when the parameter sits on a line of its own, and a name documented once on a trait and bare on every implementation is not counted as undocumented. A Rust impl declares the type it implements, never the trait, in both modes: an undocumented impl fmt::Display for Text is a bare Text, documented when struct Text is. An item declared inside a function body, however deeply nested, is never counted as undocumented either: rustdoc does not render it. It still counts as declared for unknown. A function’s body opens at the first { after its name that is not inside the signature’s own parentheses or square brackets and does not follow a <, so [u8; { N }] and Foo<{ N + 1 }> stay in the signature. A const block after a comma in generic arguments, Foo<A, { N }>, is still read as the body, and an item inside the real body is then counted as undocumented.
  • unknown, opt-in: the stranded half names something no tracked Swift or Rust file declares at all, reported under spliced-docs-unknown. On a codebase with dense, cross-referencing doc comments this fires on ordinary technical prose, a configuration field, a domain term, a parameter, far more often than on a splice, which is why it is off until a project has looked at its own noise level and chosen it.

A comment whose declaration is documented and whose stranded half names nothing bare is not reported, whatever its breaks. A documented declaration is one whose /// run sits above it with only attributes and blank lines between, and, in Rust, plain comments too: a line opening with // and no third / or !, or with four or more slashes, and a /* */ block comment, nested or not, over one line or several. In Rust a /** */ block doc above a declaration documents it as well, but it is never searched for breaks; /**/ and /*** are plain comments, as rustc reads them, and so is a doc comment written inside another block comment. A //! line or a /*! */ comment between a doc and its declaration detaches the doc. An attribute counts whole however many lines it spans, through the line where its brackets close: ] for Rust’s #[...], ) for Swift’s @name(...).

The check is whole-tree, and has no exclude: a splice can predate the commit being checked by years, and every tracked Swift and Rust file is read on every run.

Why it exists

A splice is invisible to everything that normally catches a documentation error. The compiler does not read the comment; the renderer attaches it to the nearest declaration and renders it there, under the wrong heading; a reviewer sees a diff adding a documented declaration, and a comment that still reads well. The text is true of a declaration it is no longer attached to, and the one it was written for shows as undocumented. That is the one trace the edit leaves, and it is what the check reads.

Example

The example is one Swift file and one Rust file, each with the same splice. In each, a comment was written for a function, and a property or struct was later inserted between the comment and the function with a summary line of its own.

examples/spliced-docs/Sources/Room.swift:

struct Room {
    /// Whether `canRestoreInPlace` is allowed: false while a plugin holds
    /// a veto over the restore.
    /// The plugin that vetoed the last restore, if any.
    var restoreBlocker: Plugin?

    func canRestoreInPlace() -> Bool {
        restoreBlocker == nil
    }
}

examples/spliced-docs/src/project.rs:

#![allow(unused)]
fn main() {
/// Loads the project at `path`, which is what `load_project` reads from
/// disk before anything else runs.
/// The manifest a project is read from.
pub struct Manifest {
    path: PathBuf,
}

pub fn load_project(path: &Path) -> Project {
    Project::from(Manifest { path: path.to_owned() })
}
}

Run against a fresh repository holding those two files, with no claims.toml, the check reports:

# python3 scripts/capture.py: spliced-docs, run against a throwaway git repository seeded from examples/spliced-docs
[advisory] src/project.rs:3 (spliced-docs-undocumented) stranded doc comment names `load_project`, undocumented in this file
[advisory] Sources/Room.swift:4 (spliced-docs-undocumented) stranded doc comment names `canRestoreInPlace`, undocumented in this file

In the Swift file, the run above the property is two documents: a sentence about whether an in-place restore is allowed, then a summary of the plugin that vetoed one. The break is the line where the second summary begins with no blank /// before it. The stranded half names canRestoreInPlace, which is declared further down with no comment of its own, and that is the evidence. The property is documented, by the run as it stands, so the finding is about the function and not about it.

The Rust file is the same shape. The stranded half names load_project, which is bare, so the finding names it. The stranded half also names path, and the finding does not, because path is a field of the documented struct rather than a bare declaration. Run with unknown mode on as well, the same break produces a second finding naming path, since no Rust file declares an item by that name: that is the noise the mode is opt-in for.

The fix is to move the stranded half back above the declaration it describes. Where a break is genuinely one document with two summaries, a blank /// line between them is read as summary-then-detail and is not a break.

Configuration

[spliced-docs]
modes = ["undocumented", "unknown"]
KeyShapeDefaultReach for this when
modeslist naming one or both of "undocumented" and "unknown"; a bare string is a one-element list; any other name is a configuration error["undocumented"]The project has checked what unknown reports on its own tree and found the noise acceptable, or wants unknown alone. Naming only unknown switches the default mode off.

There is no exclude. Every tracked Swift and Rust file is read, and a project that needs one of them left alone takes the check out of the commit gate instead.

enabled, which takes this check out of the commit gate while leaving it in the on-demand skill and the CLI, is shared by every check and covered on Configuring claims.

Retirement markers

None. The check reads no Markdown, so it never meets a blockquote, an italicised sentence or a paragraph opening “Previously said:”, and the retired-quote exemption has nothing here to apply to. A doc comment is either attached to its declaration or it is not. A second summary that is deliberate is kept from being read as a break by a blank /// line before it.

Next

claim-words, which sweeps the sentences a diff adds to a project’s designated record files for the words a claim is made of.

claim-words

A sentence added to a file the project has designated for its live claims, that asserts something over a whole set, counts something in the tree, or reaches for code it is not itself showing. The check reads the sentences a diff added to those files and reports each one that is shaped like a claim: “every”, “never”, “three backends”, “without evict this would grow”. It cannot tell whether the claim is true, only that the sentence is making one, so every finding is advisory. And it reads nothing until the project has said which files count: with no files key the check is installed and inert, and that is the state every project starts in.

What it checks

A designated file is one matching a glob under this check’s files key. The check is diff-scoped: it reads only a designated file the diff touched, and only a sentence at least one of whose lines the diff added. A sentence already in the file, and a sentence in a file the project has not designated, are never read, however they are shaped.

A sentence the diff only rewrapped counts as already in the file: one whose words are exactly those of a whole sentence the diff removed from the same file, as when an edit to one word reflows the rest of its paragraph onto new lines. The comparison ignores case, punctuation, inline markup and a link’s destination. A sentence with even one word changed, added or dropped is read, and so is a sentence moved in from another file, which is new to this one.

A sentence is found by joining a paragraph’s lines and splitting at a full stop, question mark or exclamation mark, so a sentence wrapped across lines is read whole and reported at its first line. A mark does not end a sentence when it ends e.g., i.e., vs., etc. or cf. (in any case), when the next word starts with a lowercase letter, or when it sits inside square brackets, such as a link’s text, or an inline code span. A table row is a paragraph of its own: a sentence never runs from one row into the next, or into the line before the table, so editing one row reports that row alone and quotes nothing else. The row of dashes under a table’s header is never read. A fenced code block is set aside first: it holds code, captured output or an example, not a claim, and a sentence never runs through one.

Three modes classify a sentence, and a sentence matching more than one is reported once per mode:

  • claim-words-totalising: the sentence contains a word or phrase that asserts over a set and is wrong the moment one member disagrees. The fixed list is every, only, never, always, exactly, none of, the one, unchanged, cannot, can never, no other, nothing else, each of, all three and all four, matched without regard to case, as whole words. A word inside a hyphenated token such as --always-verify is not a match.
  • claim-words-counts: the sentence counts something with a digit or a spelled-out number, of any size, directly before the noun it counts, and that noun is not a unit of measurement. “three backends” is a count of the tree and a claim; “three seconds”, “twelve megabytes” and “two percent” measure the world and are not. The unit list covers sizes in bytes, durations from milliseconds to centuries, percentages, dollars and degrees. Three more shapes are not counts:
    • one before that, of, with, in, is, at, as, who, which, another, or or and is a pronoun: “a prerequisite is one that fails first”. “one check runs” and “one fails” are still counts, and “one of the three modes” is still reported for “three modes”.
    • A digit in a version number: “0.16 it” and “v0.11.0 published”.
    • A digit straight after a label (rule, step, item, line, exit, code, issue, ticket, version, section, phase or pr, in any case) or after #: “rule 3 decides”, “#12 fixes”.
  • claim-words-about-elsewhere: the sentence holds a backticked citation and one of would, otherwise, without, instead of, rather than, which means or which is why. On its own each of those is ordinary English; beside a citation it asserts something about the cited code that the sentence is not showing.

No mode reads what an inline code span or a link’s (destination) holds: every in backticks, or in the path a link points to, is part of a name, not prose. A link’s text is read, and a code span’s backticks still count as the citation claim-words-about-elsewhere needs. A finding quotes the sentence as written.

The word lists are fixed and have no configuration surface.

The check runs no command and reads no code. A finding says that a sentence needs a reader; the subagent described on judgment-agent is the part of claims that can read the code a sentence is about, and a totalising sentence that cites its subject in backticks is the shape most worth handing to it.

Why it exists

A specification, a glossary or an agent instruction file is where a project writes down what is true of the whole tree, and the sentences there are the ones that go wrong quietly: “every check gates” was true when the third check landed and false when the fourth did. No mechanical check can verify a sentence like that, and the alternative to a sweep for the words such sentences are made of is to never look at them at all. The sweep is confined to designated files because the same words in a tutorial are asides, and a check that reported every “always” in a README would be dismissed on its first run.

Example

The example is a committed specification, a claims.toml that designates it, and a pending edit that extends it. The specification as committed already holds a totalising sentence:

examples/claim-words/history/01-records/spec.md:

# Cache specification

Every request reads through the same cache.

examples/claim-words/claims.toml:

[claim-words]
files = ["spec.md"]

The edit adds a section with one sentence in each shape the check reports, one count that measures the world, the same retired sentence under each of the three markers, and the same sentence quoted with no marker. It also adds a README, which the configuration does not designate:

examples/claim-words/spec.md:

# Cache specification

Every request reads through the same cache.

## Backends

Every read goes through the cache, and nothing else touches the store.

Each of the three backends keeps its own copy.

Without `evict`, the cache would grow until restart.

The first full sweep took three seconds.

> Every backend shares a single lock.

*Every backend shares a single lock.*

Previously said: every backend shares a single lock.

We used to say "every backend shares a single lock".

examples/claim-words/README.md:

# Cache

Every page here is written by hand.

Run with that edit staged, the check reports:

# python3 scripts/capture.py: claim-words, run against a throwaway git repository seeded from examples/claim-words
[advisory] spec.md:7 (claim-words-totalising) Every read goes through the cache, and nothing else touches the store.
[advisory] spec.md:9 (claim-words-totalising, claim-words-counts) Each of the three backends keeps its own copy.
[advisory] spec.md:11 (claim-words-about-elsewhere) Without `evict`, the cache would grow until restart.
[advisory] spec.md:21 (claim-words-totalising) We used to say "every backend shares a single lock".

The first three findings are the three modes: the sentence asserting over every read, the sentence about the backends, and the sentence saying what would happen without a cited function. The backends sentence both asserts over a set and counts it, so it is reported under two modes and printed once. The sweep that took three seconds is a count of time and is not reported. The three marked copies of the retired sentence, the blockquote, the italics and the “Previously said:” lead-in, are skipped; the unmarked quotation of the same sentence is the fourth finding, because an unmarked quotation cannot be told from the claim still being made. The specification’s original sentence, “Every request reads through the same cache”, was not added by this edit and is not read. The README’s “every” is in a file the configuration does not name, and is not read either.

Without the claims.toml, the same edit reports nothing. That is why the file is shown rather than described: a project that has not written one has this check installed and inert.

Each finding is a sentence to reread. The fix, where one is needed, is to narrow the sentence to what is actually true, or to retire it under one of the three markers if it is being quoted to say it was wrong.

Configuration

[claim-words]
files = ["spec.md", "CONTEXT.md", "AGENTS.md"]
KeyShapeDefaultReach for this when
fileslist of glob strings; a bare string is a one-element list[]: nothing is sweptAlways, since the check reads nothing until this names a file. List every file whose sentences are claims you would want re-verified against the tree as it stands: a specification, a glossary, an agent instruction file, a README, a documentation site’s own prose pages. In practice a changelog and a decision record fail that test — a changelog entry is dated at writing, and while a decision record’s consequences are live, its motivation and counts are frozen at the decision’s date and outnumber them. Designation is per file, so a file carrying both kinds is included on which kind predominates. A file not listed is never read, whatever it says.

There is no exclude. files is the only scope the check has, and a file outside it is already excluded.

enabled, which takes this check out of the commit gate while leaving it in the on-demand skill and the CLI, is shared by every check and covered on Configuring claims.

Retirement markers

All three. A sentence is skipped when any line it spans is a Markdown blockquote, > followed by a space or the end of the line; when the whole sentence is wrapped in *asterisks* or _underscores_; or when it opens with the lead-in “Previously said:”, in any case. Any one of the three suppresses the sentence, and nothing else does.

That is this check’s own set, not a shared one. The retired-quote exemption is decided per check against the prose that check reads, and this check honours the blockquote because narrowing an existing check’s exemptions would break a project already relying on it. A > with no space after it is not a blockquote and not a marker. The reasoning for keeping the sets separate is in ADR 0003, and for keeping this one whole in ADR 0005.

Next

temporal-words, the same sweep over the opposite file set, for sentences dated by a version number or a history word.

temporal-words

A sentence added to a file the project has designated as reference prose, that frames what the software does as a point in its own version history. A page describing a binary says what it does; “since 0.21.0”, “there is no output mode yet” and “it used to read JSON” say when, and a reader holding some other build has no way to check them. The check reads the sentences a diff added to those files and reports each one carrying a version number or a history word. It cannot tell whether the sentence is true, only that it is dated, so every finding is advisory. And it reads nothing until the project has said which files count: with no files key the check is installed and inert, and that is the state every project starts in.

What it checks

A designated file is one matching a glob under this check’s files key. The check is diff-scoped: it reads only a designated file the diff touched, and only a sentence at least one of whose lines the diff added. A sentence already in the file, and a sentence in a file the project has not designated, are never read, however they are shaped.

A sentence the diff only rewrapped counts as already in the file: one whose words are exactly those of a whole sentence the diff removed from the same file, as when an edit to one word reflows the rest of its paragraph onto new lines. The comparison ignores case, punctuation, inline markup and a link’s destination. A sentence with even one word changed, added or dropped is read, and so is a sentence moved in from another file, which is new to this one.

A sentence is found by joining a paragraph’s lines and splitting at a full stop, question mark or exclamation mark, so a sentence wrapped across lines is read whole and reported at its first line. A mark does not end a sentence when it ends e.g., i.e., vs., etc. or cf. (in any case), when the next word starts with a lowercase letter, or when it sits inside square brackets, such as a link’s text, or an inline code span. A table row is a paragraph of its own: a sentence never runs from one row into the next, or into the line before the table, so editing one row reports that row alone and quotes nothing else. The row of dashes under a table’s header is never read. Two things are set aside before any of that. A fenced code block is skipped whole, delimiter lines included, so the block’s own content never joins a sentence and never breaks one. Inside a sentence, an inline code span is masked: the backticks stay, the text between them is not matched against. `alpine:3.18.2` and `ref = "1.2.3"` are syntax a page is showing, not a claim it is making.

Three modes classify a sentence. A sentence matching more than one is reported once per mode and printed once, with each mode it matched in the parentheses:

  • temporal-words-version: the sentence carries a version number of exactly three dot-separated components, 0.3.0. A number of two components is not matched: in prose it is another project’s version, not this one’s. A hyphen may precede it, so pre-0.9.0 is a match; a letter, a digit or a dot may not, so v1.2.3 and a four-component 99.1.2.3 are not. The full stop ending the sentence does not count as a fourth component.
  • temporal-words-phrase: the sentence contains one of yet, not yet, used to, before this existed, currently, today, this first version, previously, historically and until now, matched without regard to case, as whole words. A word inside a hyphenated token such as --today-only is not a match. The word alone is the finding; nothing else about the sentence matters.
  • temporal-words-cited: the sentence contains now, and also contains a backticked citation. On its own “now” is ordinary English and usually about the reader’s own session or a tutorial’s own sequence; beside a citation it is a claim that the cited thing changed.

no longer is deliberately not in any of the lists. It reads like the others, and in the corpus these lists were measured against it was always another tool’s status — “Earthly is no longer maintained” — never a claim about the project’s own past.

The three lists are fixed and have no configuration surface.

A finding is a sentence to reread, not a defect. A directory “that doesn’t exist yet”, a tutorial step with “four tasks in the file now”, and a statement about the reader’s own project all read the same to this check as a rotted “not yet” does. That is the trade it is built on: a false positive is visible and dismissed in a second, where a “yet” that went false three releases ago is invisible forever.

Why it exists

Reference prose has no version picker. A reader on a documentation site gets whatever is published, and cannot line “since 0.21.0” up against the build they installed — so a version number in a reference page is a fact the reader is unable to use and the writer is unlikely to revisit. A “yet” is worse: it is true when written, silently false the day the thing lands, and nothing about the sentence changes to say so. Both belong in a changelog, which is read as a record of a moment and is never expected to describe the present.

This is a check of its own rather than a fourth mode of claim-words. The two read sentences the same way and report the same way, but they want different file sets: a to-do list makes live claims worth holding to account, and its temporal wording is exactly correct, since it exists to say what is not done yet. One files key cannot mean both.

Example

The example is a committed reference page, a claims.toml that designates the directory it sits in, and a pending edit that extends it.

examples/temporal-words/history/01-documents/docs/reference.md:

# Reference

`widget` reads a configuration file at startup.

examples/temporal-words/claims.toml:

[temporal-words]
files = ["docs/*.md"]

The edit adds a section with one sentence in each shape the check reports, alongside the shapes it declines: a two-component version, a version inside a code span, a version inside a fenced block, and the same dated sentence under each of the two retirement markers. It also adds a changelog, which the configuration does not designate:

examples/temporal-words/docs/reference.md:

# Reference

`widget` reads a configuration file at startup.

## Behaviour

Native TOML configuration arrived in 0.3.0.

There is no `--output` mode yet.

`widget` now reads its own configuration.

Requires Docker 20.10 or later.

The image is pinned to `alpine:3.18.2`.

```toml
version = "1.2.3"

Status. From 0.9.0 the reader is native.

The reader used to be external.

Previously said: there is no reader yet.


`examples/temporal-words/CHANGELOG.md`:

```markdown
# Changelog

## 0.3.0

- Added: `widget` now reads native TOML, which it previously could not.

Run with that edit staged, the check reports:

# python3 scripts/capture.py: temporal-words, run against a throwaway git repository seeded from examples/temporal-words
[advisory] docs/reference.md:7 (temporal-words-version) Native TOML configuration arrived in 0.3.0.
[advisory] docs/reference.md:9 (temporal-words-phrase) There is no `--output` mode yet.
[advisory] docs/reference.md:11 (temporal-words-cited) `widget` now reads its own configuration.
[advisory] docs/reference.md:21 (temporal-words-version) From 0.9.0 the reader is native.

The first three findings are the three modes, one each: the release the TOML reader arrived in, the output mode that does not exist yet, and the citation that reads differently now. The Docker version is two components and is another project’s; the pinned image and the fenced version line are syntax the page is showing. The fourth finding is the callout, which this check does not treat as a retirement marker — the italicised sentence and the “Previously said:” lead-in below it are the two that do suppress. The changelog’s own “now” and “previously” are in a file the configuration does not name, and are the wording that file is for.

Without the claims.toml, the same edit reports nothing. That is why the file is shown rather than described: a project that has not written one has this check installed and inert.

The fix, where one is needed, is to write the sentence in the present tense and move the date to the changelog: “reads native TOML” rather than “reads native TOML since 0.3.0”, and a sentence deleted rather than a “yet” left behind.

Configuration

[temporal-words]
files = ["docs/*.md", "README.md"]
KeyShapeDefaultReach for this when
fileslist of glob strings; a bare string is a one-element list[]: nothing is sweptAlways, since the check reads nothing until this names a file. List the pages that describe what the software does now: a documentation site’s own source, a README, a manual. Leave out the changelog, the release notes and anything else whose claims are dated: true at their writing and not meant to be re-read against today’s tree. A file not listed is never read, whatever it says.

There is no exclude. files is the only scope the check has, and a file outside it is already excluded.

A glob here is matched against the whole path with * spanning /, so a pattern like docs/*.md reaches every page below docs/ as well as the ones directly in it. Name the pages individually where that is not what you meant.

enabled, which takes this check out of the commit gate while leaving it in the on-demand skill and the CLI, is shared by every check and covered on Configuring claims.

Retirement markers

Two of the three. A sentence is skipped when the whole sentence is wrapped in *asterisks* or _underscores_, or when it opens with the lead-in “Previously said:”, in any case. A Markdown blockquote does not skip it, and that is the one place this check differs from claim-words.

The retired-quote exemption is decided per check against the prose that check reads. In a file of dated claims, such as a changelog, a > means “here is what we used to say”. In the reference prose this check reads, a > is a callout: the claim the author wants read first, and a live one. The reasoning and the measurement behind dropping it are in ADR 0003.

Next

judgment-agent, which works out which claims a diff has put in doubt and hands each to a subagent that reads the code.

judgment-agent

Two things share this name, and the split between them is the whole point. The check is deterministic: it works out which names in tracked Swift and Rust the diff added or removed, finds every backticked citation of one of them in tracked Markdown, and reports each as a candidate, ranked and never filtered. The subagent is the judge: it takes one candidate, reads the code the claim cites, and returns a verdict with the evidence that decided it. The check never decides anything, and the subagent never runs on its own. Both are advisory; nothing either produces blocks a commit.

What the check computes

A subject is a name a tracked .swift or .rs file declares. In Swift that is a line introducing a function, variable, constant, type, protocol, actor, type alias, enum case or initialiser, with any access and modifier keywords in front of it; in Rust, a line introducing a function, struct, enum, trait, type alias, module or impl block, with any visibility, async, unsafe or const in front. Nothing in any other language is a subject.

A Rust impl block declares the type it implements, never a trait: the type after for when there is one, otherwise the type after impl, by the last segment of its path and without generic arguments. So impl PartialEq<str> for Text and impl fmt::Display for Text both declare Text, and impl<T: Clone> Wrapper<T> declares Wrapper. Only the impl line up to its first { is read for the for, so one on a later line is not seen: the block is read as declaring its trait, and as an inherent block. Otherwise a function directly inside an impl … for … block is not a subject: it implements a name the trait declares. A function inside an inherent impl Wrapper<T> block still is.

Test code is not a subject either. A Rust file named *_tests.rs or under a directory named tests, a Swift file named *Tests.swift or under a directory named Tests, and every line of a Rust #[cfg(test)] module, from its mod line through its closing brace, are left out of both sides of the diff. A test helper added or removed is not in the delta, and a name declared both in test code and outside it cites the declaration outside.

The subject index is built twice, once at the base of the diff range and once at its head. For the range HEAD, which is what the commit hook and the CLI use by default, the base is the last commit and the head is the working tree, so the index at the head reads each tracked file as it sits on disk, whether or not the change to it is staged. A range A..B is split at the dots into two revisions; A...B is split the same way, without resolving a merge base.

The delta is the symmetric difference of the two indexes: a name in the base index and not the head was removed by the diff, a name in the head and not the base was added. A rename is one removed name and one added name, not a pair, because nothing here guesses that the two are the same thing. A name declared in the diff but present on both sides, because its body changed and its name did not, is not in the delta.

A Rust name the base already had as a member is not added either. A struct field or an enum variant is not a subject, but when the head declares an item with a name the base tree held as a field, on a line directly inside a struct body, or as a variant, opening a line directly inside an enum body, the name was already there, and its citations are not candidates. A trait’s method signatures are already subjects, with or without a default body. This applies only to the added half: a removed item is still removed when a field or variant of its name remains, and a candidate still cites the item declaration, never the member. Swift needs no such rule, since its properties and enum cases are subjects already.

A candidate is a backticked citation, in any tracked .md file, whose name is in the delta. A dotted citation names its last component, so Store.fetchRecord cites fetchRecord, and trailing call parentheses are ignored. The match is exact membership in a set the code derived; the check never searches prose for the words of a claim. Citations are read whole-tree, so a claim in a file the diff never touched is a candidate when the diff touched its subject, which is the case that scoping by changed files would miss.

Each candidate’s message names the cited subject, whether the diff removed or added it, the file and line where it is or was declared, and the evidence that it changed: the commits in the range that touched the declaring file, or, when the head of the range is the working tree and the change is not yet committed, that fact stated as such. Removed subjects are listed before added ones, since a citation of a name that no longer exists is the more urgent read, and within each group the candidates with more commits behind them come first.

The list is ranked and never filtered. No score drops a candidate as probably fine, because a list that can shrink to nothing is a verdict in disguise, and producing a verdict is the subagent’s job. Two imprecisions are accepted in the direction of showing more: a name declared in more than one file cites the declaration in whichever file sorts first, and the commits shown are every commit that touched the declaring file in range rather than only those that touched the declaring line.

With no name added or removed, the check reports nothing. The check runs no command.

What the subagent decides

Each candidate’s message already carries everything the subagent needs: the citation’s file:line, the subject’s name, which way it changed, and where it is declared. The check-claims skill invokes the judgment-agent subagent once per candidate, never batched, and passes it the finding’s citation and message verbatim. An agent running the skill with no means of starting a subagent judges nothing itself: it lists each candidate’s citation and message verbatim under a heading saying they are not judged, and marks none of them as checked, for whoever invoked it to dispatch the subagent on each.

The subagent locates the subject by its exact name, opens every site it touches with the file-reading tool rather than stopping at a search hit, or runs the command the claim implies, and answers with one JSON object: the candidate’s own file:line, a verdict of confirmed, refuted or inconclusive, the code it actually read or the command it actually ran as evidence, and one or two sentences of reasoning. Evidence is mandatory in every verdict, including an inconclusive one, and a verdict whose evidence is the claim’s own wording, or its own file and line, is a failure of the subagent rather than an answer. A totalising claim is confirmed only if every site it names was read.

The subagent judges and stops. Fixing the claim, editing a file or running anything that changes the tree belongs to whoever invoked it. Its verdict is advisory whatever it says; no part of claims treats a refuted verdict as a gate. After a refuted verdict, the skill can be asked to search the whole tree for every other citation of the same subject and hand each to the subagent in turn, since the check’s own list only ever holds citations of what this diff touched; that step is on demand, never automatic.

Without an agent

Through the plain CLI, a git pre-commit hook or a CI step, the check runs exactly as it does anywhere else, and the candidate lines it prints are the whole of its output. Nothing resolves them: there is no subagent to invoke, so a candidate is printed and left, and reading the cited code against the claim is the reader’s own job. The check’s half is not lessened by this, and the subagent’s half does not exist there.

Why it exists

A claim about architecture or intent, “every read goes through the store”, has no single fact a mechanical check can test, and the check that comes closest is the one that reads the code. What can be computed is which such claims a diff has put in doubt, and computing it well turns on two things a simpler approach gets wrong. Scoping the search to the files the diff changed misses the claim that lives elsewhere. And counting commits since the claim was last touched, the way stale-claims does, reads zero when the claim and its subject were changed together, because that commit is the claim’s own last touch; the before-and-after set membership computed here sees that change regardless.

Example

The example is a committed step and a pending edit. The step declares a store with one method and a design page that cites it:

examples/judgment-agent/history/01-declares/Sources/Store.swift:

struct Store {
    func fetchRecord(key: String) -> Record? {
        cache[key] ?? disk.read(key)
    }
}

examples/judgment-agent/history/01-declares/docs/ARCHITECTURE.md:

# Architecture

Every read goes through `Store.fetchRecord`, which checks the cache
before touching disk.

A `Store` owns one cache and one disk handle.

The pending edit renames the method and drops the disk read, and adds a changelog entry citing both the old name and the new. The design page is not touched:

examples/judgment-agent/Sources/Store.swift:

struct Store {
    func readRecord(key: String) -> Record? {
        cache[key]
    }
}

examples/judgment-agent/CHANGELOG.md:

# Changelog

- `readRecord` replaces `fetchRecord`, and no longer reads disk on a miss.

Run with that edit staged, the check reports:

# python3 scripts/capture.py: judgment-agent, run against a throwaway git repository seeded from examples/judgment-agent
[advisory] CHANGELOG.md:3 (judgment-agent-removed) cites `fetchRecord`, removed by this diff — declared at Sources/Store.swift:2 (uncommitted working-tree change)
[advisory] docs/ARCHITECTURE.md:3 (judgment-agent-removed) cites `fetchRecord`, removed by this diff — declared at Sources/Store.swift:2 (uncommitted working-tree change)
[advisory] CHANGELOG.md:3 (judgment-agent-added) cites `readRecord`, added by this diff — declared at Sources/Store.swift:2 (uncommitted working-tree change)

The delta is two names: the old method, removed, and the new one, added. The struct is declared on both sides and is not in the delta, so the design page’s second sentence, which cites only Store, is not a candidate. The two citations of the removed name come first, the changelog’s and then the design page’s, and the changelog’s citation of the added name last. Each carries the declaration site on its own side of the diff, and each says the change is uncommitted, because it is; a run over a range that spans the commit once it has landed, main..feature, names the commit instead.

None of those three lines is a verdict. The changelog’s two citations are about the rename itself; the design page’s sentence names a method that no longer exists and describes a disk read that no longer happens, and only a reading of the new method body shows the second. That reading is the subagent’s to make, and its verdict for that candidate rests on the method’s own lines rather than on the sentence. Through the CLI alone, the three lines above are the entire output, and the design page’s sentence stays as it is until someone reads it.

The fix for a refuted claim is to correct the sentence; the fix for a confirmed one is nothing. A candidate is never itself something to fix.

Configuration

[judgment-agent]
historical = ["CHANGELOG.md", "RELEASES.md"]
KeyShapeDefaultReach for this when
historicallist of glob strings; a bare string is a one-element list[]: every citation is readA file is an append-only record, a changelog or release notes, whose shipped entries your own rules forbid editing, so a candidate citing a name a shipped entry mentions is never something to fix. A citation on a line in it that the diff did not add is not a candidate. One on a line the diff did add, an entry in an [Unreleased] section, is a candidate as before. Citations are read from the files on disk and added lines from the diff, so with a --diff-range that does not end at the checked-out files a line can be taken for added or shipped wrongly.

There is no exclude: every tracked .swift and .rs file outside test code is a source of subjects and every tracked .md file is a source of citations.

enabled, which takes a check out of the commit gate while leaving it in the on-demand skill and the CLI, is read by the commit hook rather than by the check, so it applies here as it does everywhere; see Configuring claims.

Retirement markers

None. A citation inside a blockquote, an italicised sentence or a paragraph opening “Previously said:” is a candidate like any other, and so is one under the was: marker that check-citations honours: a sentence written to say a name is gone still cites it, and whether the sentence is right is the subagent’s question. The retired-quote exemption skips a sentence quoted in order to retire it; this check’s unit is a citation, and a candidate list is not narrowed by anything, by design.

Next

This is the last page. The settings shared across checks are on Configuring claims, and the words this page used without defining are on Concepts.