plugins/dp-cto/skills/tdd/SKILL.md
Use when you want to write tests first, enforce test-driven development, or add test coverage — 'write tests for this', 'TDD this feature', 'add test coverage'. Strict RED-GREEN-REFACTOR discipline.
npx skillsauth add raisedadead/dotplugins tddInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Read ${CLAUDE_PLUGIN_ROOT}/shared/cto-boundaries.md
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
Wrote code before the test? Delete it. Not "set aside." Not "use as reference." Delete. Implement fresh from the failing test.
Collect from the user:
If the user's description is vague, ask clarifying questions before dispatch. One question per message.
Dispatch tester via the Agent tool with subagent_type: "dp-cto:tester".
The agent prompt must include:
The tester agent follows strict RED-GREEN-REFACTOR discipline: write one failing test, verify RED, write minimal code to pass, verify GREEN, refactor. The agent definition enforces this cycle.
On agent completion, extract the structured receipt from <!-- RECEIPT:START/END --> markers. Validate:
tests_written — list of tests createdtests_watched_fail — every test must have been watched failing (RED verified)tests_passing — all tests green after implementationverification — command, exit code, and output previewIf tests_watched_fail is empty or does not match tests_written, reject the receipt. A test never seen failing is a test you do not trust.
Present the tester's results to the user: tests written, RED/GREEN verification evidence, and any unresolved issues from the receipt.
Read ${CLAUDE_SKILL_DIR}/references/test-examples.md before proceeding.
Read ${CLAUDE_SKILL_DIR}/references/implementation-examples.md before proceeding.
Read ${CLAUDE_SKILL_DIR}/references/anti-rationalization.md before proceeding.
Read ${CLAUDE_SKILL_DIR}/references/red-flags.md before proceeding.
Read ${CLAUDE_SKILL_DIR}/references/good-tests.md before proceeding.
Read ${CLAUDE_SKILL_DIR}/references/verification-checklist.md before proceeding.
development
Use when the user shares a URL, names a resource from SOURCES.md, shares operational feedback, says 'adopt', 'learn from', 'what can we steal from', 'compare with', 'self-develop', or 'how do we get better'.
tools
Use when you need to set up or rebuild the dp-lsp Docker image after installing the plugin — 'set up LSP', 'build the image', 'install language servers'.
testing
Use when starting major work that needs formal design review — cross-team changes, architectural decisions, or complex features where requirements need discovery before implementation.
tools
Use when dp-engine binary is missing or needs reinstallation -- called by plan skill on first use, not directly by user.