Contract First Tests

Generate unit tests for an interface or service by delegating to implementation-blind sub-agents that derive black-box tests from the documented contract, with a clarifying-question and assumption-ledger loop that resolves spec ambiguity instead of guessing. Use when writing or expanding unit tests for C#/.NET interfaces, services, or DI seams (xUnit), when you want tests that do not share assumptions with the implementation, or when adding a test suite after introducing interfaces. Covers the sub-agent briefing, the question/answer loop, integration (build, run, serialize global-state tests for xUnit parallelism), and the common failure modes of LLM-written tests (tautological, vacuous, hallucinated APIs).

BlakeHastings 2073021 3 files · 21.9 KB Updated

File contents

BlakeHastings/claude-code-artifacts/tree/main/contract-first-tests commit 2073021dd4

Frequently asked questions

npx skillmds@latest add blakehastings/contract-first-tests