PATTERN Cited by 1 source
TDD layer over SCM baseline¶
Definition¶
The TDD layer over SCM baseline pattern is an opt-in test-first
discipline that layers on top of a mandatory SCM workflow. It fires
between two SCM states (e.g., feature-claimed and pr-ready),
calls down into the SCM substrate for branch operations, but does not
call up. The dependency is one-way: SCM is mandatory regardless of
whether TDD is adopted.
The layer decomposes the test-first workflow into per-role agents with schema-validated artifact contracts between them, ensuring that tests come first and cannot be deleted or weakened by the implementing agent.
Mechanics¶
- Spec-author turns a requester narrative into a structured feature artifact
- Architect-reviewer maps NFRs to architectural decisions (
architecture.json) - Test-strategist produces test list with per-AC scenarios (
test-list.json) - Scrum-master orchestrates build cycles on experiment branches (using SCM branch primitives)
- Driver + Navigator execute RED-GREEN-REFACTOR in paired inner loop
Each role has documented inputs/outputs validated against a schema. Missing or malformed artifacts are treated as failed gates. The test-list is produced before implementation begins — the implementing agent cannot modify it.
Why it matters for agents¶
Kent Beck (2026 Pragmatic Engineer interview): agents delete tests to make them pass. The TDD layer prevents this by separating test authoring (test-strategist) from implementation (driver) with a gate between them.
Anti-pattern¶
Allowing the implementing agent to both write and delete tests. Without separation of concerns between test-authoring and implementation, the green bar is trivially achievable by reducing test coverage.
Seen in¶
- systems/lakebase-app-dev-kit — ships as an executable second state machine with per-role CLIs and artifact validators (Source: sources/2026-06-12-databricks-enabling-evolutionary-database-development-database-branchin-part3)