Use Sphinx-Needs
You need rich requirements documents, diagrams, dashboards, variant builds and a mature extension ecosystem. The need graph is the product.
evaluation
They are not the same kind of tool. Sphinx-Needs is an authoring and publishing suite for needs in Sphinx; req is a claim model that asks what a requirement means, what changed, and in which direction. The demo uses Sphinx-Needs as the source and req as the analysis layer. This comparison is bounded to one real corpus, not a benchmark.
req 0.1.0 rev-3294a46, rules_v 9; Sphinx-Needs 8.3; the demo export at 3c602bf.
| Dimension | Sphinx-Needs | req |
|---|---|---|
| Unit | A need: a typed object in a Sphinx document, with fields, content and typed links. | A claim: one obligation per file, stable claim_id, content-addressed meaning fingerprint. |
| Source of truth | The RST/Markdown documents plus configuration. The HTML and needs.json are builds. | The claims. Spec, matrix, audit packet and views are compiled projections over a signed Baseline. |
| Variants | Build-time data file, templated fields, :variant: roles, .. if:: blocks: one document per variant. | Query-time applicability predicates: one model, tri-state selection, no fork. |
| Traceability | Typed links, backlinks, needflow/needtable/needlist, filters, services. | Claim relations (trace, impact) plus design elements (req-satisfies) and JUnit evidence. |
| Architecture / design / code | Need types, codelinks, one-line needs in source, components/interfaces, PlantUML. | Design elements are files that declare req-satisfies; code is a design element; relations stay claim-to-claim. |
| Change | Document diff, versioned builds; no meaning fingerprint and no direction of a requirement change. | req diff/req compare: tightened, weakened, reshaped, not-judged; pins and Baseline drift. |
| Evidence | Schema validation, constraints, test-reports integration, warnings. | Tri-state gate policies over claims, links, design satisfaction and JUnit; UNVERIFIABLE blocks. |
| Output | Rich HTML documentation, diagrams, dashboards, PDF, ecosystem. | Markdown/JSON views and a CLI; no document renderer by design. |
| Maturity | Mature 8.x, broad extension ecosystem, used in industry. | Early 0.1.0, two maintainers, bounded claims; Tier-2 is research. |
The same export through both: Sphinx-Needs built the documents; req imported the result.
needs 362 = drafted 135 + skipped 8 + not selected 219
links 220 relations · 58 design/code links · 16 test links
canon 135 claims · 96 structured · 39 unstructured
gate UNVERIFIABLE (no Baseline, 121 unlinked)
FAIL with both JUnit reports (4 passed, 9 failed)
The importer refused to guess eight needs: three reStructuredText directives, two
variant-templated requirements with :variant: roles, two empty imported needs and
one multi-paragraph software requirement. That is a limit of “one plain paragraph”, not a
claim that the prose is wrong.
The two variant requirements are the clearest model difference: in Sphinx-Needs each is a
separate build; in req they are two claims selected by steering_side.
You need rich requirements documents, diagrams, dashboards, variant builds and a mature extension ecosystem. The need graph is the product.
You need to know whether a requirement's meaning moved, in which direction, whether the evidence still holds, and which variant a claim applies to — across a signed Baseline.
Author and publish with Sphinx-Needs; export its needs.json and let req draft
claims, carry the typed links and test evidence, and gate the release. That is this demo.
req core answers questions and emits views: req render is Markdown; req trace,
req satisfy and req audit have JSON forms. It does not build HTML, PDF,
diagrams or a UI. The graph pages in this demo are an optional layer: req's
tools/graph/trace_to_archify.py and arch_overlay.py turn the JSON into
archify input, and archify renders the page. The
demo's site generator is demo code, not req.
That is a product boundary, not a missing dependency. A headless engine can sit behind Sphinx-Needs, a docs site, a CI job or another requirements tool; a renderer is a separate layer with its own users. req would only need its own renderer if it wants to be the place people read and review requirements — today it is the place that decides what changed and whether the evidence still holds.
The claim is not “req understands every requirement.” It is narrower and falsifiable: on the corpora that measured it, deterministic Tier-1 canonicalization produces zero false merges — no two not-equivalent obligations share an address. A false merge silently deletes a requirement, so it is a hard failure; a false split is noise.
The bound matters. The external corpora are other projects' real prose, pinned by commit, but
their equivalent pairs are generated by transforms Tier-1 itself implements. A 0%
false-split rate there is expected; it is not evidence that independent human paraphrase
collapses. The paraphrase probe (0 of 272 judge-confirmed restatements sharing an address) is a
model-authored lower bound, not validation. Tier-2 is research and the honest default is
NoProvider.
What would widen the bet: a blind, human-labelled paraphrase corpus across domains and writers; more not-equivalent mutation classes and adversarial traps; a larger human-labelled direction gold set; and held-out Tier-2 validation with a confidence ordering before any provider becomes a default.
Not today, and “replace” is the wrong frame for the current release. It can replace the engine underneath a tool — the part that decides meaning, drift, applicability and evidence — while the authoring and publishing layer stays elsewhere. For a repository tool to be displaced, all of this would have to exist:
The realistic path is a composition: Sphinx-Needs or another repository keeps authoring and rendering; req becomes the CI/assurance layer that answers “did this meaning move, in which direction, and can we still prove it?” That is a useful category of its own, not a lesser version of a requirements database.
0.1.0, no built-in renderer, and the
false-merge bet is measured only on bounded corpora. It is not a Sphinx-Needs replacement.