协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
tdd【开发与工程】Test-first cycle and red-step evidence rule for skills that implement behavior a test can assert. Binds when the verification skill resolves a test command; defines what the red run must quote and when the cycle is skipped with a reason.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Reference skill read by /plan Step 5, /work Phase 3 and skills/work/orchestrator.md, and /hypothesis-debugging Step 7; /ship names it where it hands the build to /work. It is never invoked and runs nothing itself: the consumer resolves the test command per skills/verification/SKILL.md, follows the cycle here, and quotes the evidence.
The cycle binds to a change when both hold:
skills/verification/SKILL.md and the value is not none.When either fails, the outcome is skipped: <reason>, and the reason names which one: test command none (<verification's reason>) or no testable behavior (<what the change is>). A skipped cycle is a recorded fact, not an error, and it never blocks the consumer.
The user's own project instructions win. A project whose CLAUDE.md says not to use TDD settles it.
The red run is not an attempt. A consumer with a fix-attempt budget counts only runs made after the implementation exists; the red run precedes the implementation, is expected to fail, and spends nothing.
red: <command> -> exit <code>: <failing test> -- <first error line>
skipped: <reason>
Green has no line of its own: it is the pass: line skills/verification/SKILL.md defines, reported where the consumer already reports it. A consumer that receives neither a red: nor a skipped: line records skipped: no red evidence. The three skipped reasons are test command none (...), no testable behavior (...), and no red evidence.
TDD | line to any subagent return contract that already carries a TESTS | line, with the two forms above, and treat a missing line as skipped: no red evidence.### Subagent restatement below into the subagent prompt verbatim. It is the only text from this file that is copied anywhere, and tests/skills/test-tdd-contract.sh compares the copies to it.Write the test for the behavior before the implementation and run the test command you were given exactly as written, then report the red step by quoting that run's exit code, the new test's name, and its first error line -- a test that was never seen failing, or a red line naming a test you did not write in this task, is not red evidence; when no test can be written, report skipped with the reason.