reqdemo

evaluation

req vs Sphinx-Needs

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.

At a glance

req 0.1.0 rev-3294a46, rules_v 9; Sphinx-Needs 8.3; the demo export at 3c602bf.

DimensionSphinx-Needsreq
UnitA 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 truthThe 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.
VariantsBuild-time data file, templated fields, :variant: roles, .. if:: blocks: one document per variant.Query-time applicability predicates: one model, tri-state selection, no fork.
TraceabilityTyped links, backlinks, needflow/needtable/needlist, filters, services.Claim relations (trace, impact) plus design elements (req-satisfies) and JUnit evidence.
Architecture / design / codeNeed 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.
ChangeDocument 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.
EvidenceSchema validation, constraints, test-reports integration, warnings.Tri-state gate policies over claims, links, design satisfaction and JUnit; UNVERIFIABLE blocks.
OutputRich HTML documentation, diagrams, dashboards, PDF, ecosystem.Markdown/JSON views and a CLI; no document renderer by design.
MaturityMature 8.x, broad extension ecosystem, used in industry.Early 0.1.0, two maintainers, bounded claims; Tier-2 is research.

What this corpus measured

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.

Where each fits

Use Sphinx-Needs

You need rich requirements documents, diagrams, dashboards, variant builds and a mature extension ecosystem. The need graph is the product.

Use req

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.

Use both

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.

What “no renderer” means

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.

What “bounded bet” means

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.

Could req replace another requirements tool?

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.

The honest limits on both sides

  • req is early. Two maintainers, 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.
  • Import is lossy by design. One plain paragraph per claim; statuses, tags, ASIL and typed links not selected are not carried. The report names every skip.
  • Variants do not template prose. Two meanings are two claims; a context key the predicate does not mention is UNKNOWN, not a default. That is deliberate.
  • Sphinx-Needs does not give you direction. It can tell you a document changed; it does not tell you a requirement was weakened by a larger bound, and it has no signed meaning fingerprint to compare against.
  • Different questions. “What does the document say?” versus “did this obligation change, and can we still prove it?” A project can need both answers.