Requirement Hierarchy
Real systems have requirements that decompose. “The AMR shall operate safely in shared spaces” is the system-level statement; underneath it sit a dozen subsystem requirements, and underneath each of those, the testable component statements. Roboticks models this as a tree via theparent_id field, and rolls coverage up the tree automatically.
The tree
Each requirement points at its parent withparent_id. The root nodes have parent_id unset. A requirement can have any number of children; it has at most one parent.
Declaring hierarchy in inline YAML
Declaring hierarchy in ReqIF
ReqIF imports use the<SPEC-HIERARCHY> element. Polarion, Jama, codeBeamer, and DOORS all emit it; Roboticks reads it directly without any extra mapping. See ReqIF for the field tables.
Constraints
Coverage rollup
The coverage state of a parent is computed from its descendants:
In short: a parent is only as healthy as its weakest descendant. This is what the auditor expects — “the safety subsystem is verified” must mean every requirement inside the safety subsystem is verified, not just three of five.
In the example above,
SUB-010 rolls up to partial because REQ-015 has no confirming test. Once a confirming test is added, SUB-010 becomes confirmed.
Verification methods other than test
Real audits accept four verification methods —test, inspection, analysis, demonstration. Roboticks confirms test; the others are recorded for the audit trail and excluded from the rollup denominator. So if a leaf requirement has verification_method: inspection, its parent’s rollup ignores it. This is the auditor-friendly behaviour: don’t penalise the test-coverage signal for requirements that were never going to be test-verified.
The matrix view
The traceability matrix (see Matrix) supports two display modes:- Flat — one row per requirement, indented by depth. Best for filtering and sorting.
- Tree — collapsible groups. Best for exploring decomposition.
partial is a hint to expand and find the weak descendant.
Walking the tree from the SDK
descendants() is a generator that walks the tree breadth-first. Use it in custom dashboards or release scripts that need to assert “every descendant of SYS-001 is confirmed before we ship”.
Aggregated coverage across projects
A single Roboticks project can host multiple top-level (root) requirements — e.g. one root per subsystem owned by a different team. The rollup is computed per root. The dashboard summary shows the count of confirmed / partial / gap per root, plus an aggregated percentage across all roots. For multi-project rollups (across organisational scope), use the org-level Compliance dashboard — see Compliance overview.Editing the tree
Three kinds of edit:- Add a child — appears under the parent immediately. Rollup recomputes on the next coverage update.
- Change a
parent_id— the requirement moves in the tree. Both the old and new parents get a rollup recomputation. The audit trail records both ends of the move. - Delete a node with children — rejected. Re-parent the children first, then delete. This prevents accidental orphan-trees.
Next
Snapshotting
What the tree looks like at release time.
Coverage
The state machine in detail.
Matrix
Flat vs tree display modes.
Multi-repo projects
Rollup across many repos in one project.