test-driven-development
Use a red-green-refactor TDD cycle for a requested feature, bug fix, refactor, or test change; gate each stage on a local test result.
- License 许可
- MIT
- 最近更新
- 2026-10-02
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- test-driven-development
- description
- Use a red-green-refactor TDD cycle for a requested feature, bug fix, refactor, or test change; gate each stage on a local test result.
- compatibility
- Requires Python 3.11+ and the project's existing test runner.
02 资源文件 3
- 参考文档references/testing-anti-patterns.md431 B
- 脚本scripts/run_tdd_cycle.py2.6 KB
- 参考文档VERIFICATION.md257 B
03 SKILL.md 正文
Test-Driven Development
Write one behavior test first, run it, and require a genuine failure (FAIL_CORRECT) before implementation. Then implement the smallest change, run the target and full suite (ALL_PASS), refactor only under green, and run the full suite again. A passing red test or a test-runner error stops the cycle.
Run the portable verifier from this directory:
python scripts/run_tdd_cycle.py --test-path <path> --stage red|green|refactor
The helper detects pytest, npm test, Vitest, or Jest from the current project. It emits one JSON result and never invokes a shell command through eval. Do not invent a test path or claim completion without all three stage results.
04 同仓库更多 Skills
sample
Fixture skill.
sample
A minimal fixture skill used only to exercise the verifier.
sample
A minimal fixture skill used only to exercise the verifier.
sample
A minimal fixture skill used only to exercise the verifier.
sample
A minimal fixture skill used only to exercise the verifier.
sample
A minimal fixture skill used only to exercise the verifier.