Migration
Use this checklist to migrate projects from TRF v1.x packages to the v2.0 format.
1. Update tooling
- Upgrade the CLI:
brew upgrade trf-clior rerun the installer script. - Install the latest schemas and profiles from the TRF repository (
schemas/v2). - Update CI pipelines to use the new CLI Docker image or npm package.
2. Convert manifests
tw migrate manifest old/manifest.json --output new/manifest.json
Changes in v2:
twpack_versionreplacesformat_version.extensionsnow lists domain identifiers (automotive,ai_ml) instead of package paths.statisticsincludes link counts and optional coverage metrics.
3. Normalize artifacts
tw migrate artifacts old/artifacts.jsonl --output new/artifacts.jsonl --profile minimal
- v2 requires
kind(v1 usedtype). - IDs must follow the namespace convention (
req:,test:). Add prefixes where missing. - Move custom fields into the
fieldsobject; top-level custom keys are deprecated.
4. Update links
tw migrate links old/links.jsonl --output new/links.jsonl
relationreplacestype.- Add
confidence(default1.0) andrationalefor future traceability reviews. - Ensure
from/toreference updated IDs after artifact migration.
5. Rebuild packages
tw build out/new.twpack \
--source new/artifacts.jsonl requirement \
--source new/links.jsonl link \
--profile automotive_safety
- Attachments from v1 can be reused; ensure hashes are recalculated automatically during build.
- Sign the package if you previously relied on external signing workflows.
6. Validate
tw validate out/new.twpack --full
trf-validator out/new.twpack --strict
Resolve any schema or coverage failures before promoting the new package.
7. Archive old packages
- Retain the original v1 packs for audit history.
- Tag repository releases noting the last v1 package and the first v2 package.
- Communicate the migration timeline to suppliers and customers; provide them with updated profiles and schemas.
Need help automating the transformation? Check the migration scripts in the TRF repository (tools/migration-scripts/) or open a discussion in the project community.