Skip to main content

Configuration

TRF projects use a lightweight configuration file (trf.yaml) to describe which files become artifacts, which extensions to load, and which validation rules to enforce. You can check this file into source control so every team member produces identical TWPack archives.

Project configuration file

Create a trf.yaml in the repository root:

profile: automotive_safety
extensions:
- ai_ml

sources:
- path: requirements
kind: requirement
- path: tests
kind: test
format: junit
- path: design
kind: design
- path: models
kind: model

links:
infer:
- from: requirement
to: test
strategy: filename_match
options:
strip_suffixes: [".md", "_test.json"]
- from: requirement
to: design
strategy: front_matter
options:
key: implements

output: out/traceability.twpack

Key sections:

  • profile chooses the default artifact set and validation packs.
  • extensions enables additional domain schemas.
  • sources map folders or files to artifact kinds.
  • links declare inference strategies (filename match, metadata fields, explicit CSV, etc.).
  • output defines the build destination.

Run the build:

tw build --config trf.yaml

Inline overrides

CLI flags override config values for quick experiments:

tw build --config trf.yaml --profile minimal --output out/smoke.twpack

Common overrides:

  • --profile – switch to a lighter profile for fast smoke tests.
  • --extension – enable an extra extension without editing the file (--extension ai_ml).
  • --source – add an ad hoc mapping (--source docs/specs requirement).

Environment-specific values

Use environment variables to adjust paths in CI/CD pipelines without touching the file:

export TRF_OUTPUT=out/$CI_COMMIT_SHA.twpack
tw build --config trf.yaml --output "$TRF_OUTPUT"

You can reference environment variables inside YAML by using ${VAR_NAME} placeholders.

Validation settings

Add validation policies to enforce coverage and required artifacts:

validation:
require_artifacts:
- kind: requirement
tag: safety
- kind: test
coverage_targets:
- from: requirement
to: test
minimum: 0.95
fail_on_warning: true

The CLI reports unmet targets as build failures, making traceability gaps visible in CI.

Sharing configurations

  • Commit trf.yaml (and any companion files) to the repository.
  • Document profile and extension choices in README.md or in the manifest description.
  • Use branch-specific configs for experimental domains (e.g., trf.ai.yaml).

Next, explore automation patterns in Creating Links or review available profiles in Profiles.