1.1 KiB
1.1 KiB
name, description, permalink
| name | description | permalink |
|---|---|---|
| test-driven-development | Apply red-green-refactor by default for code changes, with narrowly defined exceptions and explicit alternate verification | opencode-config/skills/test-driven-development/skill |
Test-Driven Development
Use this skill for all code changes unless a narrow exception applies.
Default Cycle
- Red: add or identify a test that fails for the target behavior.
- Green: implement the minimal code change to make the test pass.
- Refactor: improve structure while keeping tests green.
- Re-run focused and relevant regression tests.
Narrow Exceptions
Allowed exceptions only:
- docs-only changes
- config-only changes
- pure refactors with provably unchanged behavior
- repos without a reliable automated test harness
When using an exception, state:
- why TDD was not practical
- what alternative verification was used
Role Expectations
- Planner: specify tasks and verification that preserve red-green-refactor intent.
- Builder/Coder: follow TDD during implementation or explicitly invoke a valid exception.
- Tester/Reviewer: verify that TDD evidence (or justified exception) is present.