tdd-pattern — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited tdd-pattern (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
The strict TDD workflow paired teammates run for standard and architectural complexity features in agile-team-v2. This skill captures the rules that only apply to red and green, so they can be removed from the global agile-project skill (which every agent loads).
If you are reading this and you are not red or green: stop. You don't need this skill. The high-level "Red/Green pattern — ABSOLUTE RULE" stub in the agile-project skill is enough for context.
In v2 there are no TASK.md, TASK-red.md, or TASK-green.md files. Both red and green find their work via the inline marker TODO(impl-<slug>, ac-<NNN>) in the production code, looked up via grep. There is no private spec for either side; isolation is preserved by discipline, audited by check.sh and by the reviewer's pass DoD post-mortem.
// AC: <description> comment immediately above the scaffolded body that the architect inlined.pm_test_territories carries a // SCENARIO: marker placed by the PM): that scenario line.## Relevant decisions.# User journey for context (when // AC: or // SCENARIO: on its own is too short)..architecture/CONVENTIONS.md — pm_test_territories glob, marker format.What red does not read:
SPRINT.md.If red believes information needed to write a test exists only in green's head, the contract is incomplete — raise a dispute (decision A — architect revises) instead of trying to read green-side material.
// AC: description on the scaffolded body.# User journey for context..architecture/CONVENTIONS.md.What green does not read:
If green believes red's intent cannot be inferred from the committed tests, the test code is too sparse — raise a dispute against red, not a private peek.
Red → green: red commits failing tests under Task: <slug>-T<NNN>-red. Nothing else. No teammate message can leak design intent that was not first committed.
Green → reviewer/e2e: green commits the implementation under Task: <slug>-T<NNN>-green. Red's tests now pass.
If anything beyond these two commits crosses between red and green during the live phase, the discipline is broken. The reviewer flags it at pass DoD.
The pattern applies to production-code feature work at standard or architectural complexity. It does not apply to mechanical maintenance, where there is a unique correct answer and no design decision worth a paired pass.
| In scope (the rule applies) | Out of scope (rule does not apply) |
|---|---|
complexity: standard features | Rename a local symbol with no API change |
complexity: architectural features | gofmt, goimports, linter auto-fixes |
| Bug fixes that change observable behaviour | Dependency bump with no API impact |
| New exported APIs, signatures, types | Comment / log message / error string fixes |
Behaviour changes covered by // AC: markers | Regenerating mocks after an interface change already decided |
complexity: mechanical features (mono-agent task — no red/green pair) |
When in doubt, classify upward (standard over mechanical). Under-classification is corrected by an in-flight upgrade dispute (type G); over-classification only wastes one cheap pair.
If the sprint-planner mistakenly assigns you to a mechanical task that should have been a mono-agent assignment, raise a dispute (escalation E or F) rather than running through the full red/green ceremony for plumbing.
If the same Claude instance must be both red and green for the same task — typical when agent teams aren't enabled and you're working solo — the discipline is not enforced by the runtime, only by your own resets.
The rule:
Task: <slug>-T<NNN>-red./clear or open a new conversation. The session reset is what purges // AC:-side context, your own internal test design rationale, and any partial implementation thoughts you may have had during red.// AC: description, the scaffolded signature, the test files committed in step 1, and any source files referenced. It must not consult any in-memory recollection of "why I wrote the test that way."check.sh audits at sprint review: for every task where red and green were the same assistant, git log must show at least one commit between the red and green work — i.e., the Task: <slug>-T<NNN>-red commit is mandatory before any Task: <slug>-T<NNN>-green. A task whose red and green files appear in a single combined commit is treated as an isolation violation and blocks the sprint REVIEW.
This rule does not prohibit a single assistant from doing red and green on the same task. It just makes the boundary explicit, observable, and machine-checkable.
In v2 every red/green/e2e task corresponds to one TODO(impl-<slug>, ac-<NNN>) (red/green) or TODO(impl-<slug>, scenario-<NNN>) (e2e — out of scope for this skill) marker in the code. The agent locates its work via grep.
# Given your assignment in SPRINT.md:
# - [ ] red — TODO(impl-auth-login, ac-001)
grep -rn "TODO(impl-auth-login, ac-001)" .The match points at:
// AC: description immediately above and panic("not implemented: ...") below.*_test.go skeleton in pm_test_territories carrying the matching // SCENARIO: marker placed by the PM (with t.Skip("not implemented") to be replaced).For non-business tests (adapter, repository, parser, helper), the test file is in the same package as the production code; you create a fresh func TestXxx(t *testing.T) (or table entry) that exercises the AC.
For business tests: locate the scaffolded test skeleton (already present, scaffolded by the architect, with // SCENARIO: line already added by the PM) and replace only the t.Skip("not implemented") line with your assertions. Keep // SCENARIO: and // TODO(impl-...) comments intact above — the reviewer's pass 2 needs them.
# Given your assignment in SPRINT.md:
# - [ ] green — TODO(impl-auth-login, ac-001)
grep -rn "TODO(impl-auth-login, ac-001)" .The match points at the same scaffolded production body with // AC: and panic("not implemented: ..."). Your job is to replace the panic with the implementation that makes red's committed tests pass.
To find red's committed tests for the same marker:
grep -rn "TODO(impl-auth-login, ac-001)" -- '*_test.go'Or by package convention (sibling test file in the same directory).
The committed tests are your contract. Read them with go-surgeon symbol; do not look at any uncommitted state.
.disputes/SPRINT_00X/<TASK_ID>.md.RETRO.md helpers_added:.Red:
red: assertions for <feature-slug>/<short-name>
Feature: <feature-slug>
Task: <feature-slug>-T<NNN>-redGreen:
green: implement <feature-slug>/<short-name>
Feature: <feature-slug>
Task: <feature-slug>-T<NNN>-green
[Authored-By: green] <-- only if .decisions/ touched (R2 tactical DECISION)The full commit format spec lives in the agile-project skill. The above is the daily case.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.