Closed-loop traceability between specification and source
The SRA CLI becomes a full platform client: generate a specification from an existing codebase, trace every requirement to the files that implement it, and publish the result back — correctly, in any supported document format.
Until this release the CLI moved in one direction. A specification was authored on the platform, pulled down, and checked against the working tree. Teams with an existing system had no entry point, and teams working in anything other than IEEE 830 found that publishing results back quietly damaged their document.
Release 4.2.0 closes that loop. The CLI now generates specifications from source, verifies requirements against it, and writes results back through a format-independent contract that every document type understands.
Specifications from an existing codebase
sra reverse documents a system that was built before it was specified. It reads
the working tree through git ls-files, so .gitignore is honoured and nothing
untracked leaks into the request, then reduces the repository to a bounded
structural digest — dependency manifests, module layout, HTTP interface, data
entities and exported symbols. That digest runs through the same multi-agent
pipeline the web application uses, and each generated requirement group is matched
back against the files that produced it.
Those matches are recorded as proposed, never verified. Promotion to verified
requires sra check, which confirms the link independently. Heuristic evidence is
labelled as such, so a reverse-engineered specification never overstates what it
knows.
Generation is server-side by design. reverse builds the digest locally and posts
it to the platform; it never calls a model itself, because under bring-your-own-key
the provider credential lives on the platform, not on the developer's machine.
Run sra reverse --dry-run to inspect the digest locally before any of it leaves
the machine.
Traceability that survives a change of format
Previously sync extracted requirements without regard to document format, and
push wrote all of them back as IEEE 830's systemFeatures. On a Volere, ISO 29148
or Agile PRD document that injected a section the format does not define, flattened
structured user stories into prose, and rendered nowhere in the workspace.
Two changes fix this permanently:
syncnow records the originating section of every requirement group, read from the platform's own format registry rather than inferred.pushwrites content back only into feature-shaped sections. For every other format it publishes tometadata.cliTraceability— a format-independent traceability record — and leaves the document structure untouched.
That record is rendered in the analysis workspace for every format, not only IEEE 830, by a new traceability panel. It is the supported contract between the CLI and the web application; future traceability data belongs in it rather than in new document keys.
Verification you can put in a pipeline
sra check gains three modes that make it useful as a gate rather than a report:
| Flag | Behaviour |
|---|---|
--deep | Confirms linked files still carry the requirement's own identifiers, catching links that rotted as code moved |
--suggest | Proposes candidate files for requirement groups that have no link yet |
--strict | Exits non-zero on any unverified requirement, for use in CI |
Five new commands
sra analyze starts a run from a file or standard input. sra status --watch,
sra list, sra projects and sra formats cover the read paths that previously
required the web interface. analyze, reverse and status --watch consume the
platform's live progress channel — the same stream the web workspace uses — and
fall back to polling automatically when it is unavailable.
Every read-only command accepts --json, with the payload on standard output and
nothing else: the banner is suppressed, configuration loading is quieted, and human
output is routed away. The CLI is scriptable without parsing decorated text.