What problem does it solve?
Prevents regressions and runtime failures caused by service boundary changes by enforcing a test-first, contract-first development discipline that combines end-to-end, consumer-driven contract (Pact) checks, and RED-GREEN-REFACTOR unit testing. It helps teams detect proto/API contract breaks, missing required headers, and auth changes early in CI rather than in production.
Core Features & Use Cases
- Pact CDCT / E2E First: Detects service-boundary changes and requires consumer-side Pact tests before provider changes merge.
- Phase-driven TDD: Guides developers through Phase 0 (contract check), Phase 1 (write failing tests), Phase 2 (minimal implementation), and Phase 3 (refactor and contract regression).
- Multi-language support: Provides language-specific test and contract commands for Go, Python, Rust, and TypeScript and prescribes locations for contract tests and provider verification.
- Operational safety playbook: Prescriptive steps for provider-tightening changes (enumerate consumers, audit pacts/, run pact-check.sh, runtime smoke tests) to avoid large-scale outages.
- Use Case: When adding a required header or changing a proto, use this workflow to add consumer Pact tests first, regenerate pacts, and verify providers to prevent 401/TLS cascades.
Quick Start
Use the tdd-workflow to plan a contract-first TDD run for "add X-Service-Token requirement" by creating a consumer Pact test, regenerating pacts, and running provider verification before implementing code changes.