Development
tdd
Use red-green-refactor when the user explicitly asks for test-driven development or the project specifies it for the current change.
chipfighter · Static checks on file
Installation
Read the source and dependencies before running a command. Copying does not install or execute anything.
npx skills add chipfighter/coding-discipline --skill tddAbout this skill
name: tdd description: Use red-green-refactor when the user explicitly asks for test-driven development or the project specifies it for the current change. disable-model-invocation: true license: MIT
- Add or adapt the smallest test that expresses the expected behavior. Run it against the baseline and establish that it fails for the intended reason. For a regression, use the actual failing scenario when practical.
- Make the smallest implementation change that satisfies the behavior. Rerun the test and the relevant existing checks.
- Refactor if it improves the result, then rerun the relevant checks on the final change.
If implementation already exists, preserve it and use a safe baseline or an isolated comparison to check that the test distinguishes the behavior. When the baseline cannot be run, report what was verified.