tdd
Test-Driven Development
Philosophy
Core principle: Tests should verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't.
Good tests are integration-style: they exercise real code paths through public APIs. They describe what the system does, not how it does it. A good test reads like a specification - "user can checkout with valid cart" tells you exactly what capability exists. These tests survive refactors because they don't care about internal structure.
Bad tests are coupled to implementation. They mock internal collaborators, test private methods, or verify through external means (like querying a database directly instead of using the interface). The warning sign: your test breaks when you refactor, but behavior hasn't changed. If you rename an internal function and tests fail, those tests were testing implementation, not behavior.
See tests.md for examples, mocking.md for mocking guidelines, and gate.md for the pre-commit gate that prevents decorative tests from landing.
Anti-Pattern: Horizontal Slices
DO NOT write all tests first, then all implementation. This is "horizontal slicing" - treating RED as "write all tests" and GREEN as "write all code."
This produces crap tests:
More from ishakantony/skills
discuss
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. DO NOT EVER USE THIS SKILL UNLESS THE USER EXPLICITLY ASKS YOU TO.
19prd-to-issues
Break a PRD into independently-workable issues and write each as a local markdown file in issues/. Use when the user wants to turn a PRD into a list of concrete tasks.
15write-a-prd
Generate a PRD from the client brief and write it as a local markdown file in issues/. Use when the user wants to turn a client request into a structured PRD.
14tackle-issues
Autonomously work through AFK issues from the local issues/ directory in a loop, spawning a subagent per task. Use when user types /tackle-issues or asks to "work the backlog", "burn down issues", "tackle AFK tasks", or run an AFK issue queue. Skips HITL issues. Each task is implemented via TDD in a subagent so the main context stays clean.
13commit
Stage changes, draft conventional commit messages, and commit with user confirmation. Use when user types /commit, asks to commit changes, or mentions creating a git commit.
10write-a-skill
Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.
9