Files
dotfiles/.config/opencode/skills/test-driven-development/SKILL.md
alex wiesner cb208a73c4 changes
2026-03-13 13:28:20 +00:00

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

  1. Red: add or identify a test that fails for the target behavior.
  2. Green: implement the minimal code change to make the test pass.
  3. Refactor: improve structure while keeping tests green.
  4. 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.