Manage requirements and traceability¶
For engineers who keep requirements, specifications and tests as text next to their code, and want them typed, linked and checked.
After a short start, the route follows the five steps of engineering along the V-model: define, implement, verify, iterate and prove.
Get started¶
What is ubCode? explains what ubCode is and where you use it.
Installation gets you the VS Code extension or the
ubcCLI, which also serves any other editor.Quickstart scaffolds a project that already has needs in it.
Key concepts introduces the needs model: types, fields and links.
Needs tutorial builds a traced model step by step.
Define¶
Requirements, specifications and tests as typed needs, linked along the V-model.
Writing needs and Need views give the syntax of needs and their views, in reStructuredText and MyST; the essentials tour shows them at a glance.
Schema validation makes your ontology enforceable.
Variant builds keeps one model for several product variants, and
ubc diffshows how the needs of two variants differ.Templates: generating content from data generates needs from a JSON or TOML data file.
Implement¶
The code that realises the requirements, traced back to them.
Tracing source code with Codelinks traces markers in your source code comments into the same graph.
Finding code that traces to no need finds the functions and methods that trace to no need, so each is traced (by a marker in the code, or from the need’s own fields), justified or removed; it lists only the code a change touches with
--changed-since, exports the result to a coverage service as an lcov tracefile, and the editor marks the untraced ones in the source files (See it in the editor).
Verify¶
Test results traced to what they verify, and every pull request checked.
Test reports: the directives turns JUnit-style XML test reports into needs in the same graph.
Linting on the command line runs
ubc check, which reports the project-wide diagnostics the editor shows.Using ubc in CI/CD runs
ubcin CI to gate every pull request.
Iterate¶
A change absorbed without breaking the links: see what it affects before you merge it.
Diff & impact analysis compares two states of a project, such as two Git branches, and with
--impactfollows the links from each changed need to the needs it may affect. For a project that writes[codelinks_coverage]it also lists the needs whose traced code changed (Code changes since linked).
Prove¶
The evidence for a release or an audit, built from the same sources.
Writing reports renders a self-contained HTML report from your own template, to attach to a release or archive for an audit.
Building a static HTML site and Building a PDF build a site and one PDF from the same sources; Publish documentation is the whole route.
Next steps¶
Upgrade path: once you have a typed graph, let AI agents work on it with Engineer with AI agents.
For your team: ubCode for teams covers licensing, offline use and support.
Use it at work. ubCode is free for open-source projects, and a private project needs a commercial license. Request a free enterprise trial to evaluate it on your own private project.