Traceability
awa’s traceability system connects every artifact — from requirements to tests — through explicit IDs and code markers. Nothing is implied; every link is stated.
The Traceability Chain
Section titled “The Traceability Chain”REQ-{CODE}-*.md └── {CODE}-1: Requirement title └── {CODE}-1_AC-1: Acceptance criterion │ ▼DESIGN-{CODE}-*.md └── {CODE}-ComponentName ├── IMPLEMENTS: {CODE}-1_AC-1 └── {CODE}_P-1: Correctness property │ ▼Source code └── // @awa-component: {CODE}-ComponentName └── // @awa-impl: {CODE}-1_AC-1 │ ▼Tests ├── // @awa-test: {CODE}_P-1 ← verifies property └── // @awa-test: {CODE}-1_AC-1 ← verifies acceptance criterionEvery link is explicit. Nothing is implied.
Requirement IDs
Section titled “Requirement IDs”| Format | Meaning | Example |
|---|---|---|
{CODE}-{n} | Requirement | DIFF-1 |
{CODE}-{n}.{p} | Subrequirement | DIFF-1.1 |
{CODE}-{n}_AC-{m} | Acceptance criterion | DIFF-1_AC-1 |
{CODE}_P-{n} | Correctness property | DIFF_P-2 |
{CODE} is a short uppercase identifier for the feature area (e.g., DIFF, GEN, CFG).
Code Markers
Section titled “Code Markers”Place these markers as comments in your source code and tests.
| Marker | Links to | Example |
|---|---|---|
@awa-component | Design component | // @awa-component: DIFF-Parser |
@awa-impl | Acceptance criterion | // @awa-impl: DIFF-1.1_AC-1 |
@awa-test | Property or AC | // @awa-test: DIFF_P-2 |
Example: Source File
Section titled “Example: Source File”// @awa-component: DIFF-DiffEngine// @awa-impl: DIFF-1_AC-1export function computeDiff(a: string, b: string): string { return createTwoFilesPatch('a', 'b', a, b);}Example: Test File
Section titled “Example: Test File”// @awa-test: DIFF-1_AC-1test('produces unified diff for modified files', () => { const result = computeDiff('hello', 'world'); expect(result).toContain('---'); expect(result).toContain('+++');});How to Read a Trace
Section titled “How to Read a Trace”Starting from a Test
Section titled “Starting from a Test”// @awa-test: DIFF-1_AC-1test('produces unified diff for modified files', () => { ... });DIFF-1_AC-1is defined inREQ-DIFF-*.mdunder requirementDIFF-1DESIGN-DIFF-*.mdhas a component thatIMPLEMENTS: DIFF-1_AC-1- Source code is marked
@awa-impl: DIFF-1_AC-1
Starting from a Requirement
Section titled “Starting from a Requirement”- Find
DIFF-1inREQ-DIFF-*.md— read what must be built - Find the design component in
DESIGN-DIFF-*.mdthatIMPLEMENTS: DIFF-1_AC-1 - Search source code for
@awa-impl: DIFF-1_AC-1— find the implementation - Search tests for
@awa-test: DIFF-1_AC-1— find the verification
Benefits
Section titled “Benefits”- Auditability — any stakeholder can trace a line of code back to the requirement that motivated it
- AI context — the AI agent can see the full chain and understand why code exists
- Gap detection — missing
@awa-implor@awa-testmarkers indicate gaps in coverage - Change impact — when a requirement changes, find all affected code and tests by searching for the ID
Validation
Section titled “Validation”Use the awa validate-alignment skill (in AI agent mode) to check that all acceptance criteria are covered by @awa-impl and @awa-test markers.