WEEK 9Wednesday and Friday

Requirements Traceability

Week 9 · Forward, backward, and what a change will touch

WEEK 9Wednesday and Friday

Why does this class exist?

Key point

The agent does not remember why it wrote the code. The matrix has to.

git blame says you wrote it. You do not remember. Neither does the agent: that was a different session.

WEEK 9Wednesday and Friday

It paid, and teams skipped it anyway

Measured

With traceability: about 24% faster, and about 50% more correct solutions.

Skipped

In six open-source projects, about 40% of commits did not even name their issue.

Key point

When the cost of a discarded practice collapses, bring it back.

Mäder and Egyed, Empirical Software Engineering, 2015; Rath et al., ICSE 2018.

WEEK 9Wednesday and Friday

The honesty rule

The agent

Does the upkeep.

A tool

Checks it: do the IDs resolve, does every row name a test?

You

Keep the meaning: what should trace to what.

Pitfall

An agent that judges its own links gives you confident, false assurance.

WEEK 9Wednesday and Friday

The spine, with two state columns

flowchart LR
  UC["Use case"] --> D["Design"] --> C["Code"] --> T["Test"]

Build

❌ Not started · 📐 Designed · 🟡 In progress · ✅ Built

Verify

✅ Verified · 🟡 Partial · 🔎 None

Key point

Built and tested are two facts. Keep them in two cells.

WEEK 9Wednesday and Friday

The reminder, traced

Row Design Code Tests Build Verify
UC-NOT-remind-non-submitters design/not.md RemindNonSubmittersDialog.vue, ReminderController.sendReminders ReminderIntegrationTest, reminders.spec.cy.js ✅ Built ✅ Verified
FR-NOT-weekly-reminder design/not.md WeeklyReminderScheduler WeeklyReminderSchedulerTest ✅ Built ✅ Verified
Key point

An instructor starts one reminder; a timer starts the other. Two requirements, two rows.

Project Pulse, docs/traceability.md on main, cells trimmed.

WEEK 9Wednesday and Friday

Forward and backward

Forward: is it built and tested?

Start at UC-EVA-submit-evaluation. Its row names SubmitTeamsEvaluations.vue, EvaluationService.addPeerEvaluation, and the tests. ✅ Built, ✅ Verified.

Backward: why does this code exist?

Start at WeeklyReminderScheduler. It traces to FR-NOT-weekly-reminder, a row of its own: no use case owns a timer.

Ask the room

ExportService.java appears in no row of your matrix. What could it be, and who decides?

WEEK 9Wednesday and Friday

No test, not traced

Key point

A row reads ✅ Verified only when you can name a test that exercises the main flow and every extension, and it passes.

Verify: ✅ Verified. Tests: EvaluationServiceTest. The test: assertTrue(true).

WEEK 9Wednesday and Friday

Three ways they drift apart

Shape What you see Repair
Specification right, code behind A rule is written; the code does not enforce it Conform the code
Code right, specification stale The document describes behavior the system no longer has Amend the document
Neither says anything The code made a decision no document records Decide it, then write it down
WEEK 9Wednesday and Friday

Specification right, code behind

FR-NOT-weekly-reminder, amended 2026-10-03

Remind only the students who still owe something (BR-submission-owed).

WeeklyReminderScheduler.sendWeeklyReminders

Kept emailing every student in the section, and its tests checked that it did.

Key point

For three weeks the row read 📐 Designed, not ✅ Built. The gap was traced, not hidden.

WEEK 9Wednesday and Friday

Neither says anything

peerEvaluationAverage.setAverageTotalScore(
    evaluations.stream().mapToDouble(PeerEvaluation::getTotalScore)
               .average().orElse(0.0));
Ask the room

A student nobody evaluated, and a student rated zero by everyone. What does the weekly report show for each?

WEEK 9Wednesday and Friday

The drift no tool can find

The reminder

The rule and the code disagreed. A test written from the rule fails; a reviewer reading both sees it.

The 0.0 average

No rule exists. Nothing can fail, because only the code ever spoke.

The agent

Hand an agent an under-specified use case and it always picks something, in seconds, in code that looks exactly like a decision you made.

WEEK 9Wednesday and Friday

"What will I have in December?"

UC Build Verify Release
UC-NOT-remind-non-submitters ✅ Built ✅ Verified v1.6.0
UC-AI-critique ❌ Not started v1.8.0
UC-AI-draft-skeleton ❌ Not started Later
  • Yours: v0.1.0 slice, v0.2.0 Checkpoint 3, v1.0.0 December, Spring, Out.
  • Order: risk first, then what the client needs, then dependencies.
  • An empty cell is work nobody planned.
WEEK 9Wednesday and Friday

Forecast, then talk to the client

Key point

Hours still needed = remaining v1.0.0 estimate midpoints × your ratio.

Forecast: 6 rows left in v1.0.0, 38 to 60 h at ratio 1.4; about 70 h available.
Pitfall

Doesn't fit? Move rows out of v1.0.0 with your client at the next meeting. Change the scope, not the estimate.

WEEK 9Wednesday and Friday

For your team

  • Every week: the row changes in the pull request that changes its state.
  • Checkpoint 2, week 11 (by Fri Nov 6): every row has a Release value, set by pull request.
  • Checkpoint 3: one forecast line under your calibration table.
  • Assignment 3, Fri Nov 6: the agent's use case gets its row, and its Verify cell names its tests.
WEEK 9Wednesday and Friday

If this requirement changes, what else has to?

Key point

Impact analysis: answer it before anyone edits code. The matrix turns it from a memory test into a lookup.

Ask the room

The client wants two weeks, not one, to finish a peer evaluation. What does that touch?

Trace: business rule to everything that cites it

BR-evaluation-submission-window is the changed node. Start there.

WEEK 9Wednesday and Friday

Step 1: read the matrix

UC-EVA-submit-evaluation

✅ Built. The row names the code and the tests that pin the window.

UC-NOT-remind-non-submitters

✅ Built since October 25. The change lands in code and tests.

Key point

Two weeks earlier it was a design edit. A change caught at design is cheap.

WEEK 9Wednesday and Friday

Step 2: search the docs for `BR-evaluation-submission-window`

  • BR-active-weeks: "each active week is evaluated during the following calendar week".
  • BR-evaluation-editable-until-close: editable while the window is open.
  • Extension 1b's message: "its one-week window", and "cannot be made up".
Key point

The index records which requirements cite a rule, not which rules lean on each other. A search finds those.

WEEK 9Wednesday and Friday

Step 3: hand the agent the list

Your list is the scope

Every ID and file from steps 1 and 2, in the issue.

The agent finds the reach

WeekKeys.previousWeek, shared by the window, the reminder, and the scheduled job, and getPreviousWeek() in the frontend's utils/week.

The agent

The IDs steer the agent before the change. The matrix checks what came back after it.

WEEK 9Wednesday and Friday

The list is the review's checklist

A file outside the list

Either an edge the matrix lacks (add it) or the agent wandered (send it back).

A file on the list, untouched

Needs a reason.

WEEK 9Wednesday and Friday

The questions nobody answered

Ask the room

Two weeks means two weeks open at once. Which does the form open on? Which one is the reminder about?

Pitfall

Tell the agent "make it two weeks" and it answers all of these silently. That is the third drift shape, on purpose.

WEEK 9Wednesday and Friday

The length of the list is the change's size

BR-evaluation-submission-window

Cited by 2 use cases. A small change.

BR-role-based-access

Cited by 41. A project-wide change.

"It's a one-line change." 41 use cases cite that line.

WEEK 9Wednesday and Friday

Your turn, in pairs

  • Open Project Pulse's docs/traceability.md: list what the two-week change touches.
  • Search docs/ for BR-evaluation-submission-window: what does it add?
  • Write the questions for the client.
WEEK 9Wednesday and Friday

Leave with this

  • Keep the spine; Build and Verify in two cells.
  • Forward finds what is missing; backward finds what nobody asked for.
  • Classify a drift before repairing it.
  • Before a change: the impact list is the agent's scope, the review's checklist, and the client's questions.
  • Checkpoint 2: a change since your slice carries its impact list.

Requirements Traceability

→ space PgDn
Next step or slide
← PgUp
Back
↓ S
Skip to the next slide
O
Overview of all slides
N
Speaker notes
B
Black the screen
Ctrl+P
Print / PDF handout, one slide per page