test-driven-development
Intent
- 用于测试先行实现:当要实现功能或修复一个已清楚的问题,并且可以先写 failing test 再写生产代码时使用。Prefer
systematic-debuggingwhen 根因仍未知,Preferverification-before-completionfor 最终验收与完成声明。
Default operating pattern
- Capture the actual engineering goal and the next decision that matters.
- Inspect the current code, tests, branch state, or CI context before acting.
- Take the smallest next action that reduces uncertainty or advances delivery.
- Collect fresh evidence before claiming progress.
- Summarize status, risks, and the next recommended step.
Pack fit
- Included in:
engineering-workflow,release-quality - Keep examples generic, privacy-safe, and portable across hosts.
Boundary
- Do not force TDD when the behavior cannot yet be specified meaningfully.