Should a traceability link attach to a whole requirement, one acceptance criterion, or one scenario?
answer
- Cheap to write is not cheap to read
- Three candidate units, one per row
- Partly verified must look different
- Match the grain to the promise
basics
~20 sAttach it at the acceptance-criterion grain in most products. A whole-requirement link is quick to write and too coarse to answer anything useful a year later; a per-scenario link answers precisely but multiplies rows faster than any team keeps them current.
solid answer
~50 sThree grains are available: one link per requirement, one per acceptance criterion, one per scenario. Cost moves from **writing** to **reading** as the grain gets coarser. A whole-requirement link takes seconds to create and then cannot distinguish a partly verified requirement from a fully verified one, which is the state most real requirements are in. A per-scenario link answers exactly which situation is exercised, but the row count tracks the checks rather than the promises and churns on every rename. The acceptance criterion is usually right because it is the grain at which somebody would argue about whether the promise is kept: coarse enough that rows stay proportional to promises, fine enough that a failure names something a reader outside the team understands. Mixing grains deliberately is fine, going finer only where a wrong boundary is expensive.
code
pseudocode · 13 lines# one link per requirement
REQ-14 -> [CASE-101, CASE-102, CASE-103, CASE-104]
# one link per acceptance criterion
REQ-14/AC-1 -> [CASE-101, CASE-102]
REQ-14/AC-2 -> [CASE-103]
REQ-14/AC-3 -> [CASE-104]
# one link per scenario
REQ-14/AC-1/at-threshold -> CASE-101
REQ-14/AC-1/one-unit-below -> CASE-102
REQ-14/AC-2/charge-shown -> CASE-103
REQ-14/AC-3/recalc-on-removal -> CASE-104go deeper
Know that a traceability link can attach at different grains, and that a requirement with one linked check is not the same as a requirement whose every promise is checked. Be able to name the three candidate grains.
Explain what each grain makes cheap and expensive, and be ready to argue that cost moves from writing to reading as the grain coarsens. Name the read a coarse link cannot answer.
Show how you would mix grains on purpose: criterion grain by default, finer only where a wrong boundary is expensive. Be ready to say what a failing link at your chosen grain tells a reader.
Own the grain decision across teams whose requirements are written to different standards, and be ready to defend spending on rewriting requirements into testable statements rather than on more rows.
## Three candidate units A traceability link joins two things, and the interesting choice is the grain of the requirement side. Three units are in common use, and they are not interchangeable. 1. **One link per requirement.** The whole requirement points at a bag of cases. Fast to create, and it is what teams reach for when the record is introduced late. 2. **One link per acceptance criterion.** Each testable statement beneath the requirement points at the checks that verify that statement specifically. 3. **One link per scenario.** Each concrete situation, including the boundary and error variants, gets its own row pointing at the single check that exercises it. ## What each unit makes cheap and expensive | Unit | Cheap | Expensive | |---|---|---| | Whole requirement | Creating links; a small record; almost no upkeep | Saying which promise a failure actually breaks; every failing check implicates the entire requirement | | Acceptance criterion | Reading a failure as a broken promise; naming an unverified statement precisely | Requires criteria that are genuinely written as separate testable statements | | Individual scenario | Knowing exactly which situation is exercised, including boundaries | Row count; churn on every rename; the grain nobody keeps current by hand | The pattern is that cost moves from writing to reading as the unit gets coarser. A whole-requirement link is written in seconds and interrogated forever; a per-scenario link is written a hundred times and answers instantly. ## The year-later read The honest way to choose is to imagine the question somebody asks twelve months on, when the authors have moved and the record is all that is left. - *"We are changing the free-delivery rule. What was promised about it and what checks that promise?"* At requirement grain, the answer is a list of forty cases, most of which have nothing to do with delivery pricing. At criterion grain, it is three rows and the answer is legible in a minute. - *"This check has been failing for a week. What is broken from a user's point of view?"* At requirement grain, the answer is "something in ordering". At criterion grain, it is the sentence the criterion column already holds. - *"Which promises about this feature have never been checked at all?"* At requirement grain this cannot be answered, because a requirement with one linked case looks exactly like a requirement with all of its statements verified. That last one is the decisive argument, and it is why the criterion is the usual answer: a link at requirement grain cannot distinguish partly verified from fully verified, and partly verified is the normal state of real work. ## Choosing, and mixing on purpose The unit should match the unit the promise is made in. If the requirements are written as prose paragraphs with no separable criteria, criterion-grain linking is not available until somebody rewrites them, and pretending otherwise produces invented criteria that nobody accepts. If the requirements already carry numbered acceptance criteria, linking at any coarser grain is throwing away structure that already exists. Mixing grains deliberately is legitimate and is often the right answer. A sensible arrangement: - **Criterion grain by default**, for everything a user or an integrator was promised. - **Scenario grain only where the boundaries carry the risk**: a pricing rule, a permission decision, a state machine with an expensive wrong transition. The extra rows buy something specific there. - **Requirement grain for material that is not really a promise**, such as an internal refactor tracked as a requirement for scheduling reasons only. A useful discipline when writing the link: state, in one sentence, what a failure of this exact link would tell a reader. If the sentence is "something in this area is wrong", the grain is too coarse. If the sentence duplicates the check's own name word for word, the grain is too fine and the row is carrying no information the check did not already carry. ## The practical rule Link at the grain at which somebody would be willing to argue about whether the promise is kept. That is nearly always the acceptance criterion: coarse enough that the row count stays proportional to the promises rather than to the checks, fine enough that a failure names something a person outside the team can understand. Go finer only where the cost of a wrong boundary is high enough to justify the rows, and never go coarser to make the record smaller, because the size the record saves is exactly the information a reader came for.
- What forces you down to whole-requirement grain even when you would rather not?Requirements written as prose paragraphs with no separable statements. Criterion-grain linking is simply unavailable until somebody rewrites them, and inventing criteria after the fact produces statements nobody accepted and nobody will defend. The honest move is to link coarsely, say so, and push the criteria upstream on the next requirement rather than manufacturing structure the promise never had.
- When is per-scenario grain worth the extra rows?Where the boundaries themselves carry the risk: a pricing rule, a permission decision, a state machine whose wrong transition is expensive. There the extra rows buy something specific, because knowing that the at-limit situation is exercised is materially different from knowing the rule is checked somewhere. Everywhere else the rows track the checks rather than the promises and stop being read.
saying these in an interview costs you the question
- Picks the grain by what is fastest to create
- Treats one linked check as a verified requirement
- Assumes finer grain is always more rigorous
- Invents acceptance criteria nobody agreed to
- Uses one grain everywhere regardless of risk