Skip to content
arula

Stage 420 minutesPairs301 · Tooled judgment

Define the defect specs

Run workbench define to turn newly identified code defects and test gaps into bounded, auditable defects/*.md files. Route policy gaps to an accountable human instead of inventing requirements.

You will produce

defects/1.md and defects/2.md

We will demonstrate

From a new defect to an auditable repair requirement

Done when

Every defect file traces its repair requirement to evidence and names its non-goal and owner.

Sibling repository../payments-validation-fixture836a75dThe preparation guide explains how to verify a newer revision before using it.

Orient

Why this stage exists

The gap register says what needs fixing; a defect spec makes each repair precise, owned and reviewable.

Audit is a quality requirement for each defect file, not a separate CLI command.

Start from

What you start from

Work from these inputs only. Anything not on this list is either a later stage’s concern or a decision you do not own.

Eval YAML
The code, test and specification gaps from Stage 3.
Evidence ledger
The evidence and limits supporting each gap.
Requirement owner
The person accountable for the missing refund policy.
Demonstrate

Write new defect specs, then audit them

One worked pass, so the shape of the work is visible before you do it on your own.

  1. Run workbench define on the eval YAML.
  2. Write defects/1.md for the provider-request logging defect.
  3. Write defects/2.md for the missing timeout/retry test.
  4. Audit both files back to evidence, scope, acceptance criteria and a non-goal.

What this turns onA defect spec makes an observed problem repairable. It must not manufacture the unresolved refund-idempotency policy.

Practice

Do the work

  1. Define the logging repair: logs may contain refundId and attempt, never providerRequest.
  2. Define the timeout/retry test repair: a provider timeout must exercise and assert the retry path.
  3. Write the idempotency question and payments-product owner into the unresolved policy record.
  4. Audit every defect file before handing it to plan.
Output

You produce

Artifact

Defect specs

  • Defect file
  • New defect or test gap
  • Repair requirement
  • Acceptance criterion
  • Evidence citation
  • Non-goal and owner
Pressure-test

Challenge your own result

Can the learner specify idempotency because the test gap is obvious?

Show how this resolves

No. They can specify the question and owner. Only the accountable human can decide whether repeated refunds must be idempotent.

Gate

Ready to continue when

Readiness gate
  • Every repair instruction traces to evidence.
  • Every policy gap has an owner and remains unresolved until that owner decides.

What transfersGood validation produces a sharper requirement, not just a longer defect list.