Modular Architecture
TRF keeps a stable core schema and layers optional extensions so industries can add detail without fragmenting the format. Everything—schemas, relationships, validation rules, tooling—is driven by declarative metadata so extensions behave consistently.
Core Schema
The core defines four universal artifact types:
{
"core_artifact_types": {
"requirement": {
"description": "Functional and non-functional system requirements",
"required_fields": ["id", "type", "title", "content", "created"],
"optional_fields": ["priority", "status", "assignee", "tags"]
},
"test": {
"description": "Verification and validation procedures and results",
"required_fields": ["id", "type", "title", "status", "created"],
"optional_fields": ["procedure", "results", "coverage", "environment"]
},
"design": {
"description": "Architectural and detailed design artifacts",
"required_fields": ["id", "type", "title", "created"],
"optional_fields": ["methodology", "diagrams", "constraints", "rationale"]
},
"component": {
"description": "Implementation units and deliverable components",
"required_fields": ["id", "type", "title", "created"],
"optional_fields": ["version", "dependencies", "interface", "location"]
}
}
}
Domain Extension Catalog
Extensions add specialized artifact types, standards metadata, and validators while reusing the same serialization rules.
{
"domain_extensions": {
"automotive": {
"artifact_count": 12,
"types": ["hazard", "safety_goal", "safety_requirement", "safety_mechanism"],
"standards": ["ISO26262", "UN-R155", "UN-R156", "ISO21434"],
"schema_version": "2.0.0"
},
"aerospace": {
"artifact_count": 8,
"types": ["certification_plan", "design_standard", "verification_procedure"],
"standards": ["DO-178C", "DO-254", "ARP4754A"],
"schema_version": "2.0.0"
},
"medical": {
"artifact_count": 6,
"types": ["risk_analysis", "safety_classification", "clinical_evaluation"],
"standards": ["IEC62304", "ISO14971", "FDA21CFR820"],
"schema_version": "2.0.0"
},
"ai_ml": {
"artifact_count": 10,
"types": ["dataset", "model", "experiment", "odd"],
"standards": ["IEEE2857", "ISO23053", "NIST_AI_RMF"],
"schema_version": "2.0.0"
}
}
}
Composition Rules
Artifact inheritance
Extensions derive from core types and add properties and constraints:
{
"safety_requirement": {
"extends": "requirement",
"domain": "automotive",
"additional_properties": {
"asil_level": {
"type": "string",
"enum": ["QM", "A", "B", "C", "D"]
},
"safety_goal_id": {
"type": "string",
"pattern": "^sg:[A-Z0-9_-]+$"
},
"hazard_ids": {
"type": "array",
"items": {"type": "string", "pattern": "^hazard:[A-Z0-9_-]+$"}
}
},
"required": ["asil_level", "safety_goal_id"]
}
}
Relationship extensions
Domains can introduce link types that complement the core graph:
{
"automotive_relationships": {
"mitigates": {
"description": "Safety mechanism mitigates identified hazard",
"valid_from": ["safety_mechanism"],
"valid_to": ["hazard"]
},
"allocates_to": {
"description": "Safety requirement allocated to system component",
"valid_from": ["safety_requirement"],
"valid_to": ["component"]
},
"derives_from_hazard": {
"description": "Safety requirement derived from hazard analysis",
"valid_from": ["safety_requirement"],
"valid_to": ["hazard"]
}
}
}
Validation rules
Semantic constraints are packaged with extensions:
{
"automotive_validation_rules": {
"asil_decomposition": {
"description": "ASIL D requirements must decompose to lower ASIL levels",
"rule": "safety_requirement.asil_level == 'D' implies exists derived safety_requirement with asil_level in ['A','B','C']"
},
"safety_mechanism_coverage": {
"description": "All hazards must have associated safety mechanisms",
"rule": "for all hazard h: exists safety_mechanism m where m mitigates h"
}
}
}
Extensibility Mechanisms
Custom artifact types
Organizations can define bespoke types while reusing core behavior:
{
"custom_types": {
"quantum_algorithm": {
"extends": "component",
"domain": "quantum_computing",
"properties": {
"qubit_count": {"type": "integer", "minimum": 1},
"gate_complexity": {"type": "number", "minimum": 0},
"error_rate": {"type": "number", "minimum": 0, "maximum": 1},
"coherence_time": {"type": "number", "minimum": 0}
},
"required": ["qubit_count", "gate_complexity"]
}
}
}
Profile configuration
Profiles bundle core types, extensions, validation packs, and coverage targets:
{
"profiles": {
"automotive_safety": {
"core_types": ["requirement", "test", "design", "component"],
"extensions": ["automotive"],
"validation_rules": ["automotive_validation_rules"],
"required_coverage": {
"requirement_to_test": 0.95,
"safety_requirement_to_mechanism": 1.0
}
},
"ml_development": {
"core_types": ["requirement", "test", "design", "component"],
"extensions": ["ai_ml"],
"validation_rules": ["ml_validation_rules"],
"required_artifacts": ["dataset", "model", "experiment"]
}
}
}
Schema version management
Extension metadata tracks compatibility and migration guidance:
{
"schema_evolution": {
"version": "2.1.0",
"backward_compatible_with": ["2.0.x"],
"breaking_changes": [],
"new_features": ["cybersecurity_extension", "enhanced_ml_metrics"],
"deprecated_features": [],
"migration_guide": "https://trf-spec.org/migration/v2.0-to-v2.1"
}
}
Tool Integration
Schema files drive tooling generation so new extensions appear automatically in CLIs and validators:
def generate_cli_commands(schema_extensions):
for domain in schema_extensions:
for artifact_type in domain.artifact_types:
create_command(f"create-{artifact_type}")
create_validator(f"validate-{artifact_type}")
create_query_filter(f"filter-{artifact_type}")
# tw create-hazard --asil-level D --description "Loss of steering"
# tw validate-safety-requirement --check-asil-decomposition
# tw query --type safety_mechanism --asil-level D
Extension management commands keep local tooling aligned:
tw extensions --list
tw extensions --install automotive@2.0.0
tw extensions --check-compatibility ai_ml@1.5.0 automotive@2.0.0
tw extensions --update-all
This modular approach lets TRF welcome new domains without compromising interoperability, validation rigor, or tool support.