Skip to main content

Data Model

The TRF data model is intentionally simple: artifacts describe evidence, links express relationships, and auxiliary files capture provenance, signatures, and attachments. This section formalizes those structures.

Artifact structure

{
"id": "req:ACC-001",
"kind": "requirement",
"version": "2.1.0",
"status": "approved",
"created_at": "2024-01-15T10:00:00Z",
"created_by": {
"name": "Jane Smith",
"email": "jane.smith@example.com"
},
"fields": {
"title": "Maintain safe distance",
"acceptance_criteria": ["Activation within 200ms"],
"priority": "high",
"asil": "D"
},
"attachments": [
{
"path": "attachments/requirements/acc.pdf",
"hash": "sha256:..."
}
]
}
  • id – Namespaced identifier (prefix + semantic name).
  • kind – Core type or extension type; drives schema validation.
  • fields – Arbitrary JSON following the schema definition for the kind.
  • attachments – Optional list referencing files within the package.
{
"id": "link:REQ-VER-001",
"from": "req:ACC-001",
"to": "test:TC-ACC-001",
"relation": "verified_by",
"confidence": 1.0,
"rationale": "Regression suite covers all acceptance criteria",
"fields": {
"review_id": "CR-4821"
}
}
  • relation values come from core or extension-defined vocabularies.
  • confidence (0–1) captures certainty; defaults to 1 when omitted.
  • fields holds extra metadata (review IDs, evidence URLs, change tickets).

Manifest

{
"twpack_version": "2.0.0",
"schema_version": "2.0.0",
"name": "ACC safety case",
"description": "Quarterly release evidence",
"profile": "automotive_safety",
"extensions": ["automotive", "cybersecurity"],
"artifact_count": 642,
"link_count": 1584,
"generated_at": "2024-03-31T18:22:00Z",
"generator": {
"name": "tw-cli",
"version": "2.1.0"
}
}

The manifest also hosts optional statistics (coverage metrics, domain summaries) and references to external schemas.

Signatures

{
"package_signature": {
"algorithm": "RSA-SHA256",
"timestamp": "2024-03-31T18:25:00Z",
"signer": "build-system@example.com",
"certificate": "..."
},
"artifact_signatures": [
{
"artifact_id": "req:ACC-001",
"hash": "sha256:...",
"signer": "requirements-lead@example.com",
"timestamp": "2024-03-30T09:10:00Z"
}
]
}

Signatures are optional but recommended in multi-organization workflows.

Attachments

  • Stored under attachments/ with any directory structure.
  • Lines in attachments.jsonl (optional) can record MIME type, size, or additional metadata.
  • Artifacts reference attachments using relative paths and hashes.

Schema inheritance

  • Core schemas define fields for requirement, test, design, component.
  • Extension schemas extend core definitions using allOf inheritance rules (JSON Schema Draft 2020-12).
  • Custom schemas can be placed in schemas/custom/ and referenced through configuration.

Referencing multiple packages

  • Artifact IDs may include pack prefixes (supplierA:req:ACC-001) when merging supplier evidence.
  • Links can reference external packs via external_to fields or by embedding supplier packs (embedded_packs in the manifest).

For practical examples, examine the sample packs in the TRF repository or continue to Architecture Overview and Framework Versioning.