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 and mocking.md for mocking guidelines.
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 bad tests:
- Tests written in bulk test imagined behavior, not actual behavior
More from yldgio/vibe-grimoire
pre-mortem
>-
13create-prd
Create a PRD through user interview, codebase exploration, and module design, then submit as a GitHub issue, Azure DevOps work item, or local file. Use when the user wants to create or write a PRD, create a product requirements document, design a new feature, or capture requirements.
11setup-repo
>-
11prd-slice
Break a PRD into independently-deliverable work items (vertical slices / tracer bullets) and create them in Azure DevOps, GitHub Issues, or Jira. Use when a user wants to convert a PRD into implementation tickets, decompose a product spec into trackable slices, create work items from requirements, or break down a PRD for any issue tracker — even if they don't say "vertical slice" or "tracer bullet".
11plan-from-prd
Turn a PRD into a multi-phase, local Markdown implementation plan using tracer-bullet vertical slices, saved to ./plans/. Use when the user wants to create an implementation plan from a PRD, plan phases from a PRD, break a PRD into development phases, or mentions "tracer bullets" or "implementation phases". For creating tracker work items (GitHub Issues, Azure DevOps, Jira) use the prd-slice skill instead.
11adr
Create an Architectural Decision Record (ADR) to formally document a significant technical or architectural choice. Use whenever a user says "write an ADR", "document this decision", "record why we chose X", "capture this architecture choice", "explain why we went with Y", "document the trade-offs", "write up this tech decision", or makes any significant architectural choice that future teammates will need to understand. Also use proactively when you observe a meaningful decision being made during a session — even if the user hasn't explicitly asked for an ADR. ADRs prevent teams from re-debating settled choices and preserve context that would otherwise become tribal knowledge lost to future maintainers.
7