Software Requirements: Document Relationships¶
Introduced in requirements baseline v1.2 (GAP-17, ADR-0021).
| ID | Requirement | Trace |
|---|---|---|
| REQ-REL-001 | The system shall support typed, directional relationships between documents (and, where relevant, versions) from a defined set: derived-from, translation-of, supersedes/superseded-by, references, related-to. (vocabulary extended by REQ-REL-005: user-managed references/satisfies/verifies and system-managed instantiated-from; ADR-0049) |
STR-001, STR-009; ADR-0021, ADR-0049 |
| REQ-REL-002 | Existing version-level provenance (derived-from, instantiated-from) and content translation (translation-of) shall be expressed through this relationship model; provenance relations are system-maintained and read-only through the API. (refined for template-instantiation provenance; ADR-0049) |
STR-004, STR-024; ADR-0021, ADR-0002, ADR-0020, ADR-0049 |
| REQ-REL-003 | Relationships shall be scope-keyed and subject to RLS; a user may relate only documents they are authorized to see. | STR-003; ADR-0021, ADR-0009 |
| REQ-REL-004 | Creating, changing, or removing a relationship shall be audited. | STR-009; ADR-0021, REQ-AUD-001 |
| REQ-REL-005 | The system shall provide create/remove operations for the user-managed relationship vocabulary references, satisfies, verifies as directional document→document edges; system-managed relationships (derived-from, instantiated-from) shall be read-only through the API. Adding or removing an edge shall require EDIT_DRAFT in the source document's scope; self-edges and duplicate (source, target, type) edges shall be rejected; cross-scope edges are allowed only where both ends are visible to the actor (REQ-REL-003). Both directions (outgoing and incoming) shall be presented to authorized users, and every mutation shall be audited (RELATION_ADDED/RELATION_REMOVED on the source document; REQ-REL-004). (the EDIT_DRAFT gate is now joined by a server-enforced source-must-have-a-DRAFT state gate — REQ-REL-008, ADR-0081.) |
STR-001, STR-009; ADR-0049, ADR-0021, ADR-0081, REQ-AUD-001 |
| REQ-REL-007 | The relationship model shall extend to typed TRACE LINKS whose endpoints are keyed trace items (of any type) or documents, stored alongside the document relations (trace_link), RLS-scoped and cross-scope capable: item→item and item→document edges from the vocabulary verifies, satisfies, derives-from, references (requirements), plus mitigates (risk-control → risk) and implemented-by (risk-control → a requirement item OR a document), plus validates (validation-case item OR document → user-need, REQ-VAL-002) and complies-with (requirement OR design-element item OR document → regulatory-ref, REQ-GSP-001); verifies may originate from a document-level source or an item, and satisfies gains design-element as a source type-agnostically (REQ-VAL-003). Wildcard/glob links shall NOT be supported — imported convention links are expanded to explicit edges marked convention-derived. SUSPECT semantics: when a new RELEASED version of a defining document changes a linked item's content hash (or removes its key), every inbound link shall be flagged SUSPECT; clearing a suspect flag shall be a deliberate, audited RE-ATTESTATION that is state-independent (available on a released corpus, never draft-gated). A self-edge and a duplicate (source, target, type) edge shall be rejected, and every mutation audited. |
STR-001, STR-009, STR-027; ADR-0077, ADR-0078, ADR-0079, ADR-0084, ADR-0021 |
| REQ-REL-008 | User-initiated trace-structure mutations — trace-link create/delete and user-edge relation add/remove — shall be REFUSED unless the SOURCE document currently has a version in state DRAFT (released trace evidence must not erode in place; the vehicle on a released document is a revision). The refusal shall be server-enforced (not UI-only) and shaped as the life-cycle wrong-state rejection — HTTP 409 CONFLICT — naming the rule and remedy. System-managed provenance edges (derived-from, instantiated-from) shall be exempt by construction (they never traverse the user path) and clearSuspect shall be deliberately exempt (a state-independent re-attestation, REQ-REL-007). The importer and demo seed shall satisfy the rule by SEQUENCE — create documents, author links while DRAFT, then release — never by a persona exception. |
STR-009, STR-027; ADR-0081, ADR-0080, ADR-0049 |
| REQ-REL-006 | On SUBMIT, the system shall scan the frozen version body for doc: links (REQ-DOC-025) and synchronize a system-maintained references relation flagged fromText for each resolvable, visible target — creating and removing these edges each round so they mirror the frozen body; manually created relationships shall never be altered by this synchronization. The synchronization shall be audited like other relationship changes, and fromText edges shall participate in the References view, traceability matrix, and completeness evaluation. |
STR-001, STR-009; ADR-0051, ADR-0049 |