testing-tdd
Guides agents through Red-Green-Refactor with runner-captured evidence. Use when running /cc-tdd-cycle, writing tests before implementation, or Global TDD required is yes.
- License 许可
- MIT
- 最近更新
- 2026-10-31
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- testing-tdd
- description
- Guides agents through Red-Green-Refactor with runner-captured evidence. Use when running /cc-tdd-cycle, writing tests before implementation, or Global TDD required is yes.
03 SKILL.md 正文
Test-Driven Development
Overview
Red (failing test) → Green (minimal code) → Refactor. Evidence comes from
npx cc-codeconductor tdd capture, not handmade JSON.
When to Use
/cc-tdd-cycle, new behavior, bug fixes, TDD-required OpenSpec items
NOT for docs-only changes or when the Task Card forbids tests.
Process
- Write the failing test that encodes one acceptance criterion. Run the suite.
It MUST fail (
suiteFails === true). - Implement the minimum that turns it green. Do not expand scope.
- Refactor only with a green suite.
- Capture evidence via the verification runner (
openspec doneon test/implement when TDD is required). - Cover happy path, edge, and error for each behavior.
Pyramid default: many unit, fewer integration, rare E2E.
Common Rationalizations
| Rationalization | Reality |
|---|---|
| I'll add tests later | Later means never. Red first. |
| This is too small to test | If it can break, it needs a failing test first. |
| I'll write the evidence JSON | Handmade TDD JSON is rejected. |
Red Flags
- Tests that assert implementation details instead of behavior
- Green without a recorded red
- Skipping error cases
Verification
- [ ] Suite failed before implement
- [ ] Suite passed after implement
- [ ] Runner evidence exists (not handmade)
- [ ] Optional:
npx cc-codeconductor scorecard suite-run --suite workflow-gates
04 同仓库更多 Skills
workflow-orchestration-patterns
Design durable workflows with Temporal for distributed systems. Covers workflow vs activity separation, saga patterns, state management, and determinism constraints. Use when building long-running processes, distributed transactions, or microservice orchestration.
web-design-engineering
Design, implement, and review web interface layout, component states, feedback, and motion within the current CodeConductor workflow. Use for concrete web UI work or requested UI audits, not backend-only tasks or native mobile apps.
using-cc-skills
Maps incoming work to the CodeConductor slash command and workflow skill. Use when starting a session or deciding which /cc-* command applies.
testing-strategy
Provides expert knowledge of the testing pyramid, test design principles, MockK patterns, and integration testing conventions for Spring Boot + Kotlin projects.
tdd-mutation-tester
Performs simple mutation testing to verify test coverage and assertions.
tailwind-responsive-auditor
Audits Tailwind CSS usage ensuring mobile-first responsive utilities and clean classes.