test-driven-development
Consult before implementing an observable behavior change when a meaningful automated test seam exists; use proportional red-green evidence.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Consult before implementing an observable behavior change when a meaningful automated test seam exists; use proportional red-green evidence.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Consult after receiving review feedback and before implementation when the feedback needs evidence-based evaluation.
Consult before delegating implementation when an approved plan benefits from worker context isolation and durable coordination.
Consult before attempting a fix when root cause or behavior is unclear, failures repeat, components interact, or guessing would be unsafe.
Consult directly matching task playbooks before substantial design, debugging, implementation, review, or completion work without forcing full workflow execution.
Consult before making a substantive completion claim; require current trustworthy evidence and semantic acceptance.
Consult when multi-round implementation, context compaction, or worker handoff requires a durable execution contract.
| name | test-driven-development |
| description | Consult before implementing an observable behavior change when a meaningful automated test seam exists; use proportional red-green evidence. |
TDD obtains discriminating evidence: a test should demonstrate that it detects the missing or broken behavior, not merely pass against current implementation. Red-green is the preferred foundation for behavior changes with a meaningful automated test seam; it is not a reason to discard useful existing code or mistake literal ordering for correctness.
For a meaningful automated seam:
Unit tests, compilation, linting, and type checks are support signals. Pair them with semantic behavior evidence appropriate to the task: rendered visual and interaction checks for frontend work, restart/readback for persistence, actual arguments and resulting state for APIs or automation, and representative consumer artifacts for compatibility work.
Record the scenario, counterfactual or red evidence where available, the green result, and the semantic readback that supports the completion claim. If the test cannot prove the user-relevant behavior by itself, state what readback closes that gap.