Skip to main content

trace

Summary

Optional section to record explicit trace links across the document, to other RQML documents, and to external systems.

Where it appears

  • rqml > trace

Content model

  • edge (0..n) → from (1), to (1), notes (0..1)

Each endpoint (from / to) contains a locator with one of:

  • local — reference by ID within this document
  • doc — reference by ID in another RQML document
  • external — reference by URI to any external artifact

Attributes

edge

NameTypeRequiredDescription
idIdTypeyesEdge identifier.
typeTraceTypeyesRelation type (see below).
confidenceConfidenceTypenoCertainty level (0.0–1.0).
statusStatusTypenoLifecycle state (draft, review, approved, deprecated).
createdByxs:stringnoWho created this trace (person, role, or tool).
createdAtxs:dateTimenoWhen this trace was created (ISO 8601).
tagsxs:NMTOKENSnoSpace-separated category tags for filtering.

Locator types

local

NameTypeRequiredDescription
idIdTypeyesTarget element ID within this document (keyref-validated).
kindxs:tokennoHint for tooling/renderers (e.g., "req", "goal").
titlexs:stringnoDisplay hint for tooling/renderers.

doc

NameTypeRequiredDescription
urixs:anyURIyesURI of the other RQML document.
idIdTypeyesTarget element ID within that document.
docIdIdTypenoDocument identifier of the other RQML document.
versionxs:tokennoPin to a specific version for immutability.
gitxs:tokennoPin to a Git ref (commit, tag, branch).
kindxs:tokennoHint for tooling/renderers.
titlexs:stringnoDisplay hint for tooling/renderers.

external

NameTypeRequiredDescription
urixs:anyURIyesURI of the external artifact.
kindxs:tokennoHint for tooling/renderers.
titlexs:stringnoDisplay hint for tooling/renderers.

TraceType values

ValueCategoryDescription
refinesDecompositionSource refines/decomposes target.
satisfiesCoverageSource satisfies/fulfills target.
dependsOnDependencySource depends on target.
conflictsWithConflictSource conflicts with target.
threatensRiskSource threatens target (for obstacles/risks).
mitigatesRiskSource mitigates target (for risks).
verifiedByVerificationSource is verified by target.
coversCoverageSource covers target (for test coverage).
implementsImplementationSource implements target (for code traceability).
supersedesLifecycleSource replaces target (for deprecation/versioning).
consumesInterfaceContractSource consumes interface provided by target.
providesInterfaceContractSource provides interface consumed by target.
conformsToContractSource conforms to standard/specification target.
deprecatesChange managementSource deprecates target.
breaksChange managementSource breaks backward compatibility with target.

Example (minimal — local references)

<trace>
<edge id="TR-1" type="satisfies">
<from><locator><local id="REQ-1"/></locator></from>
<to><locator><local id="GOAL-1"/></locator></to>
</edge>
</trace>

Example (typical)

<trace>
<edge id="TR-001" type="satisfies" confidence="0.9">
<from><locator><local id="REQ-AUTH-001"/></locator></from>
<to><locator><local id="GOAL-AVAIL"/></locator></to>
<notes>Primary requirement fulfilling availability goal for payments.</notes>
</edge>
<edge id="TR-002" type="verifiedBy">
<from><locator><local id="TC-AUTH-001"/></locator></from>
<to><locator><local id="REQ-AUTH-001"/></locator></to>
</edge>
</trace>

Example (cross-document references)

<trace>
<!-- Requirement in this document satisfies a goal in another RQML document -->
<edge id="TR-010" type="satisfies">
<from><locator><local id="REQ-AUTH-001"/></locator></from>
<to>
<locator>
<doc uri="goals.rqml" docId="DOC-GOALS" id="GOAL-SECURITY" version="2.0"/>
</locator>
</to>
</edge>

<!-- Pinned to a specific Git commit for immutability -->
<edge id="TR-011" type="conformsTo">
<from><locator><local id="REQ-API-001"/></locator></from>
<to>
<locator>
<doc uri="contracts/api-spec.rqml" id="IR-REST-001" git="a1b2c3d"/>
</locator>
</to>
</edge>
</trace>

Example (external references)

<trace>
<!-- Requirement implements a Jira story -->
<edge id="TR-020" type="implements">
<from><locator><local id="REQ-AUTH-001"/></locator></from>
<to><locator><external uri="jira:PROJ-1234" kind="issue" title="Login flow"/></locator></to>
</edge>

<!-- Code file implements a requirement -->
<edge id="TR-021" type="implements">
<from><locator><external uri="file:src/auth/login.ts#L42-L87"/></locator></from>
<to><locator><local id="REQ-AUTH-001"/></locator></to>
</edge>

<!-- Requirement satisfies a regulation -->
<edge id="TR-022" type="satisfies">
<from><locator><local id="REQ-GDPR-001"/></locator></from>
<to><locator><external uri="urn:gdpr:article:17" kind="regulation"/></locator></to>
</edge>
</trace>

Example (lifecycle metadata)

<trace>
<edge id="TR-030" type="satisfies"
status="approved" createdBy="jane.doe" createdAt="2025-03-15T10:30:00Z">
<from><locator><local id="REQ-AUTH-001"/></locator></from>
<to><locator><local id="GOAL-SECURITY"/></locator></to>
</edge>

<edge id="TR-031" type="satisfies"
status="draft" createdBy="import-jira" createdAt="2025-03-20T08:00:00Z">
<from><locator><local id="REQ-API-001"/></locator></from>
<to><locator><local id="GOAL-PERF"/></locator></to>
</edge>
</trace>

Example (category tags)

<trace>
<edge id="TR-040" type="satisfies" tags="safety">
<from><locator><local id="REQ-BRAKE-001"/></locator></from>
<to><locator><local id="GOAL-SAFETY"/></locator></to>
</edge>

<edge id="TR-041" type="satisfies" tags="security compliance">
<from><locator><local id="REQ-AUTH-001"/></locator></from>
<to><locator><local id="GOAL-SECURITY"/></locator></to>
</edge>
</trace>

Example (deprecation with supersedes)

<trace>
<!-- New requirement supersedes deprecated one -->
<edge id="TR-050" type="supersedes">
<from><locator><local id="REQ-AUTH-002"/></locator></from>
<to><locator><local id="REQ-AUTH-001"/></locator></to>
<notes>OAuth replaces password auth per security audit 2025-Q1.</notes>
</edge>
</trace>

Example (contract semantics — new in 2.1.0)

<trace>
<!-- Service consumes an interface defined elsewhere -->
<edge id="TR-060" type="consumesInterface">
<from><locator><local id="REQ-CHECKOUT-001"/></locator></from>
<to><locator><local id="API-PAYMENTS"/></locator></to>
</edge>

<!-- Service provides an interface for consumers -->
<edge id="TR-061" type="providesInterface">
<from><locator><local id="REQ-API-001"/></locator></from>
<to><locator><local id="EP-CREATE-PAYMENT"/></locator></to>
</edge>

<!-- Requirement conforms to an external standard -->
<edge id="TR-062" type="conformsTo">
<from><locator><local id="REQ-CRYPTO-001"/></locator></from>
<to><locator><external uri="urn:nist:fips:140-3" kind="standard"/></locator></to>
</edge>
</trace>

Example (change management — new in 2.1.0)

<trace>
<!-- New API version deprecates old one -->
<edge id="TR-070" type="deprecates">
<from><locator><local id="REQ-API-V2"/></locator></from>
<to><locator><local id="REQ-API-V1"/></locator></to>
<notes>v2 deprecates v1; v1 sunset date 2026-06-01.</notes>
</edge>

<!-- Breaking change: new auth flow breaks old client integration -->
<edge id="TR-071" type="breaks">
<from><locator><local id="REQ-AUTH-003"/></locator></from>
<to><locator><local id="REQ-AUTH-001"/></locator></to>
<notes>PKCE-only flow removes implicit grant; clients must migrate.</notes>
</edge>
</trace>

URI conventions for external references

SystemPatternExample
Jirajira:{issue-key}jira:PROJ-1234
GitHub Issuegithub:{owner}/{repo}/issues/{num}github:acme/api/issues/42
GitHub PRgithub:{owner}/{repo}/pull/{num}github:acme/api/pull/99
Git commitgit:{sha}git:a1b2c3d4e5f6
File + linesfile:{path}#L{start}-L{end}file:src/auth.ts#L42-L87
Confluenceconfluence:{page-id}confluence:12345678
Regulationurn:{standard}:{clause}urn:gdpr:article:17

Notes / LLM hints

  • Use local locators for same-document references (keyref-validated); use doc for cross-RQML-document references; use external for non-RQML systems.
  • Pick the most specific relation type; use notes for rationale when it is not obvious.
  • Use status=approved to filter for reliable traces in impact analysis.
  • Use supersedes when deprecating requirements; mark old requirement as status="deprecated".
  • Use deprecates and breaks to record change-management semantics explicitly.
  • Use consumesInterface / providesInterface / conformsTo for cross-project and contract-based traceability.
  • Common tags: safety, security, compliance, performance, accessibility.
  • The doc locator supports version and git attributes for pinning cross-document references to immutable snapshots.