When a requirement's meaning changes, req tells you which parts of your design need a second look, and only those.
Live demo (135 requirements from a public Sphinx-Needs project, put through req) · What drift looks like (one of req's own requirements, edited three ways)
A schematic replay, not a recording: the left panel is a generic baseline, not a named tool, and every word of req's output is its committed req satisfy output, read from edits.json and the three satisfy.txt files under docs/architecture/drift/; the parts and their status words come from the committed overlays (each edit's overlay.json and overview-overlay.json).
- Three edits, three verdicts
- What SUSPECT means
- Which drift req catches
- Try it in three commands
- How it works
- Where to look next
- The depth
- Using it
The same requirement, REQ-0010 (the false-split bound, linked from src/bench.rs, drawn in the Evidence box), edited three ways, each on a throw-away copy of the corpus and never on req's own claims. The words are the ones req satisfy printed, from edits.json and each edit's committed output:
| edit, on a copy | req satisfy says |
what that means | the Evidence box | full output |
|---|---|---|---|---|
re-word: at most 0.30 becomes no more than 0.30 |
HOLDS |
same meaning fingerprint (req compare: identical), so no alarm |
HOLDS · 4 claims | satisfy.txt |
loosen: at most 0.30 becomes at most 0.40 |
HOLDS (weakened), numeric_loosening |
what met the stronger requirement meets the weaker one, so the link is not re-opened | HOLDS (weakened) · 1 of 4 claims | satisfy.txt |
tighten: at most 0.30 becomes at most 0.20 |
SUSPECT, numeric_tightening |
the design may no longer meet it; a human re-checks it, then runs the req satisfy --record command req prints |
SUSPECT · 1 of 4 claims | satisfy.txt |
A tool that flags every edit would raise the alarm three times; req raises it once, because it judges the direction of the change (ADR 0040). A re-wording keeps its meaning fingerprint and raises none; an admitted loosening is reported by name and does not re-open the link.
Note
The re-wording and the loosening raised nothing, because req judges the direction of a change, not the fact of it. A loosening is still reported, by name, as HOLDS (weakened); it just does not re-open the link.
SUSPECT means the part was recorded against a claim whose meaning has since tightened or changed in another direction. It does not mean the part is wrong; it means a person must re-check it and re-record the link.
"Requirement drift" names two different things, and req is built for the first:
- The requirement moves. Its text is edited, and the obligation gets stronger, weaker or different. A diff shows that
the text changed; req says which way the meaning moved (
req diff,req compare), so a quiet weakening is never reported as no change. - The code drifts from a requirement that did not move. req does not judge code: there is no model in its core,
and a person decides (ADR 0004). It reaches this kind in two narrow ways only:
- Linked tests. A claim names the tests that prove it, and
req gaterequires them to pass in the JUnit report. Code that stops satisfying the claim shows up as far as those tests catch it, and no further. - SUSPECT links. When a claim tightens,
req satisfymarks the design elements linked to it SUSPECT. That does not say the code is wrong; it says which code now needs judging, so a reviewer, human or automated, re-checks those links instead of everything.
- Linked tests. A claim names the tests that prove it, and
Who it is for. Teams that already keep requirements traceable, such as automotive and other safety work, already pay
for claims, links, baselines and decision logs in heavier tools; req is a way to do that work in git. If your
requirements are prose in an issue tracker and you need none of that evidence, adopting a claim corpus costs more than
the first kind of drift is worth to you. The smallest adoption, req diff on pull requests and nothing else, opens
docs/adopting.md.
git clone https://github.com/autox-my/req.git && cd req
cargo build --release # from source, today's `main`; or install the prebuilt `v0.6.0` (see Install)
python3 tools/demo/try_drift.pyThe script copies the repository's corpus to a temporary directory, applies the tightening edit from edits.json there, runs req satisfy there, prints its lines and deletes the copy. It never edits your checkout. The line to look for:
[SUSPECT] src/bench.rs -> REQ-0010: numeric_tightening since it was recorded — UNVERIFIABLE until a human re-records it (`req satisfy --record src/bench.rs REQ-0010`)
This is a demonstration, not the adopter's loop: to use req on your own requirements, start at docs/adopting.md.
A person links a part of the design to a requirement (a req-satisfies: REQ-0010 line in the source file) and records, with req satisfy --record, the statement it was judged against; req never records a link on its own. When the requirement is edited, req derives the meaning of the recorded and the current statement under the same rules and classifies the change. The same meaning holds; a loosening that has been measured to be safe holds (weakened); every other direction is suspect until a human re-records it (ADR 0040). The diagram's red frame is the same verdict drawn on the architecture (ADR 0052).
The architecture page draws twelve parts of req and labels each with the worst
state of the requirements its code was recorded against (req satisfy, ADR 0040), and how many claims are in it. It is drawn by
hand from the source, and the status on every part is computed, never typed. 28 of req's 40 claims are linked to a part, and
all 28 claim–part pairs hold (29 on the detailed page, which splits the gate from its test-report reader); the claims × parts matrix lists them and the 12 claims no
part reaches. Every part, with every arrow, is the detailed page
(its matrix). How they are made and what the gate checks of them:
ADR 0052.
The coverage explorer follows one claim across its source, the design that satisfies it and
the tests that verify it, and filters to the claims with a gap; tools/explorer/build.py generates it and the gate checks it
(ADR 0054).
The drift overview is that architecture diagram after the tightening edit above: made on a throw-away
copy of the corpus, never on req's own claims, by python3 tools/graph/build_architecture.py --drift docs/architecture/drift from
edits.json, and checked by the gate. Each directory under docs/architecture/drift/ holds
that edit's overlay.json, matrix.md and satisfy.txt; the real state, every link holding, is the architecture page.
req is a git-native requirements engine that tells you when a requirement's meaning changed, and in which direction.
Requirements are decisions, not documents. In req the unit of work is a claim: one
claim per file in git, written in a small, reviewable format. A claim's identity is its
claim_id — not its path and not its history, and not its wording. Its meaning fingerprint is
a content address over its canonical meaning: a deterministic pipeline parses the statement,
normalises it against a subject registry, and hashes the result — every time the claim is loaded,
so a claim file stores what its author wrote and nothing derived (since req.claim/2, ADR 0022). A rewording
that the canonicalizer's rules cover keeps its address; an edit to a bound, an actor, or a modality gets a
new one, however similar the prose. What the fingerprint is for is drift and direction: between two
revisions, which requirements changed in meaning, and whether each change loosened or tightened the
obligation. It does not collapse independent paraphrase (see the probe under Status), so it is not a
duplicate finder. Two claims that do share an address are candidates for one requirement; req never merges
them, and a human ratifies.
The spec, the traceability matrix, and the audit packet are compiled views over a signed baseline. Nobody edits them by hand; they are regenerated, and their freshness is verified against what was signed.
Deterministic canonicalization yields zero false merges on the corpora that measured it: the seed parity corpus with its adversarial traps, and the external families (
external-v1toexternal-v4, other projects' real requirements prose, pinned by commit). At rules v9 no not-equivalent pair in those corpora shares an address.
A false merge silently deletes a requirement. A false split is noise. That asymmetry shapes everything: the gate is zero false merges, it runs on every commit, and it has never been relaxed to let a change land.
The bet is bounded to what was measured, and the bound matters. The equivalent pairs of the external corpora are generated by the transforms Tier-1 itself implements, so a 0% false-split rate there is expected and is not evidence that independent paraphrase does not collapse differently; their not-equivalent pairs are a handful of mutation classes. Measuring independent, human-written paraphrase is still open, and until it is done the bet is neither validated nor refuted. The address that carries it is a meaning fingerprint, not the claim's identity (ADR 0020, accepted).
The commands, and the question each answers
| command | the question it answers |
|---|---|
req init |
start a corpus here — a starter claim whose pins hold, its registry, and the authoring README |
req canon |
what each claim's statement derives, and whether each of its pins holds |
req bench |
does the fingerprint hold — zero false merges over the corpora; exit non-zero and the build is red |
req selftest |
does this installed binary, on this machine, derive what the project's reference build derives — known answers compiled in; reads no corpus |
req diff |
what changed in meaning between two revisions — each claim's class and flags, and an opt-in exit 1 for a pull request |
req pin |
is a corpus kept in another repository exactly the commit this repository pinned, and how has it moved since |
req select |
which claims apply in a variant — selectors, not branches — with UNKNOWN as a first-class answer |
req render, req trace |
the compiled spec view, and the traceability matrix with every edge named |
req impact, req gate |
what a change touches, nearest first, and the release policies |
req baseline, req audit |
the canonical manifest a human signs, drift verification, and the audit packet |
req decision |
the decision log and its hash chain — TAMPERED is a finding, a truncated history is unanswerable |
req propose <a> <b> |
one pair put to an external provider: its answer is an unratified proposal, never an edit — UNVERIFIABLE with no provider |
Tri-state is a discipline here, not a garnish: PASS, FAIL and UNVERIFIABLE are kept apart, because "we could not tell" is a different answer from both "it passed" and "it is broken".
The corpus root is resolved at runtime (ADR 0012), so req manages any repository's
claims; how it is chosen, and every command's exit contract, are on req --help and
req <command> --help — the one home of those rules, readable with no corpus. req init is
the one command that resolves no root: it creates one.
- Drift and direction. A content address over canonical meaning: an edit that changes an
obligation gets a new address (the claim keeps its
claim_id), with the direction of the change classified, so a weakening is never reported as no change.req diffputs that on a pull request: between two revisions, each claim added, removed, weakened, tightened or reshaped, as a description for a human to read, never a verdict. - Variability as selectors. A variant is a query over one model of claims, not a branch or a fork: variants compose, applicability is computed per context, and a claim a context cannot decide is surfaced rather than dropped.
Git-native storage is table stakes, not the moat.
- Tier-1 is built and measured.
RULES_V 9, 40 dogfood claims — req's own requirements, written in req's own format — and nine corpora gated on every commit: the seed parity corpus, four external corpora and four direction gold sets, the last eight built from real requirements prose from other projects, pinned by commit (the pairs direction-v4 adds from PURE by their Zenodo record and its sha-256). Zero false merges on all of them. - Tier-2 is measured and deliberately conservative. Four providers evaluated against a
human-labelled sample; one has a usable confidence ordering at a measured floor; the honest
default is
NoProvideruntil a provider survives held-out validation on a grown, blind-labelled corpus. The funnel and its instruments are research, kept out of the core inexperiments/tier2/(ADR 0021); the protocol isexperiments/tier2/docs/tier2-sample-protocol.md. The core keeps only the single-pairreq proposeseam. - Paraphrase probe (run once, 2026-11-03).
experiments/paraphrase/measures how often independently worded text for one obligation fails to share a Tier-1 address. Across three model families, none of 272 judge-confirmed restatements of 60 real statements shares an address with its original (0 of 180 one-element alterations collapse). Model-authored, blind to Tier-1, judge-filtered, not human: a lower bound on how far real writers diverge, and it neither validates nor refutes the bet. Tier-1 is a drift and direction fingerprint, not a paraphrase collapser; that is Tier-2's job. Read its README first.
req is not on crates.io (publish = false): you pin a commit, and the commit is the provenance. A release also carries a
semantic version and is tagged v<VERSION> (ADR 0055); the version names it, the commit proves it. The newest prebuilt
release is v0.6.0 (rev 161c336, Linux x86_64 and macOS arm64, Apple silicon only), the first that reads
req.claim/4; v0.5.0 (rev ddcd056) was the first versioned one.
Earlier releases, other machines, and building from source
Four earlier releases are tagged rev-<REV>: rev-ec87808, rev-6b74f51 and rev-aeaf987 predate req.claim/3, and rev-3294a46 is
the first that reads it. A release is not today's main, so a command added since is not in it. There is no Intel Mac build and no native Windows build (on Windows, run the Linux tarball under
WSL2: docs/adopting.md, Windows). For any other rev, or any other machine, the install is a build from source
at a rev you choose:
cargo install --git https://github.com/autox-my/req.git --rev <REV> --locked reqdocs/adopting.md (Install req) explains the pin, the prebuilt-binary path,
and the air-gapped route. req is early, maintained by one person, and its claims are bounded as
stated under Status.
cargo install cargo-nextest --version 0.9.149 --locked # the JUnit report the release gate reads
cargo build --release
cargo run -q -- bench # the gate: zero false merges, or the build is red
./scripts/check.sh # fmt, clippy, nextest + its report, canon + Baseline verification, every corpusThe test run is cargo nextest run --profile ci; it replaces cargo test (one run, one truth) and
its report is what req gate --test-report reads. The gate's detail is in AGENTS.md.
Changes go through a feature branch and a pull request (see CONTRIBUTING.md). CI runs the same gate that
runs locally; there is no automated review, a human reads every pull request. The
agent-facing instructions are in AGENTS.md, the glossary in CONTEXT.md, the design of
record in docs/design.md, and the decisions in docs/adr/.
How it works: docs/how-it-works.md (diagrams, for engineers) and docs/overview.html (read it rendered; one page for
non-developers, generated from the real tool by tools/overview/build.py, never hand-edited).
Importing the requirements you already have
Existing requirements need not be retyped: tools/adopt.py (markdown lists), tools/needs_import.py
(a Sphinx-Needs needs.json) and tools/reqif_import.py (a ReqIF file, as DOORS, Polarion and Eclipse ProR
export) draft claims from them, copy-and-adjust scripts whose drafts are proposals for a human to ratify
(docs/adopting.md). The ReqIF reader has been run on three small public sample files only; its yield on a real
specification is unmeasured.
Adopting req in a project — as a human or as an agent — starts at docs/adopting.md (its
"For an agent" section is the five-minute path): the CI snippet is examples/github-workflows/req.yml,
and examples/agents-snippet.md is a block to paste into a project's own AGENTS.md.
tools/quickstart.sh rehearses the path offline and prints QUICKSTART <n>s; the page is
rehearsed by the script, not asserted by it.
Apache-2.0; see LICENSE. Test and benchmark data taken from other projects keeps its own
licence and is listed in NOTICE.


