Imported from xingzhuangtang/Zero_Nine (
adapters/opencode/.opencode/skills/zero-nine-tdd-cycle/SKILL.md). Install upstream withnpx skills add xingzhuangtang/Zero_Nine --skill zero-nine-tdd-cycle. Copyright stays with the author.
TDD Cycle Skill
When to Use
- Task mode is
tdd_cycleorimplementation - Implementation requires test coverage
- Working on features with clear acceptance criteria
Procedure
- Read task contract - Load acceptance criteria and deliverables
- Write failing test first:
- Based on acceptance criteria
- Run test to confirm it fails
- Implement minimum code - Write just enough to pass the test
- Run verification:
- Execute tests
- Check all acceptance criteria met
- Refactor - Clean up while keeping tests green
- Record evidence - Save test output, code diff, metrics
Evidence Artifacts
test-output.txt- Test execution resultscode.diff- Changes madecoverage.txt- Code coverage report (if applicable)
Pitfalls
- Don't write tests after implementation
- Don't implement more than needed for current test
- Don't skip refactoring step
- Don't proceed with failing tests
Verification
- All tests pass (
cargo test --all-targetsor equivalent) - Code coverage >= 80% for new code
- Evidence artifacts saved to task directory
