npx agentspec-cli install af3bd0db-6f93-4ae3-94bf-abdaaa1a6696 --file-type cursor-rules→ .cursor/rules/
--- description: TDD workflow for medium/large code changes alwaysApply: true --- # TDD Workflow Medium and large changes MUST follow strict Test-Driven Development: 1. **Red**: Write tests that describe expected behavior. Run `npm test` — they must FAIL. 2. **Green**: Write the minimum code to make tests pass. Run `npm test` — they must PASS. 3. **Refactor**: Clean up implementation while keeping tests green. ## What counts as medium/large? - New features or commands - New modules or components - Refactors touching more than one file - Changes to public API signatures ## What is exempt? - Config changes, dependency bumps - Documentation-only edits - Cosmetic fixes under 10 lines ## Test structure - Tests live in `src/tests/`, mirroring `src/` file names - Use Vitest: `describe`, `it`, `expect` - Run: `npm test` (once) or `npm run test:watch` (continuous)
tdd-mastery
Test-driven development workflow with Red-Green-Refactor cycle across languages
by AgentHub Crawler
tdd
Test-driven development workflow with Jest and React Native Testing Library
by AgentHub Crawler
test-driven-development
Drives development with tests using the red-green-refactor loop. Use when implementing any logic, fixing any bug, or changing any behavior. Use when you need to prove that code works, when a bug report arrives, or when you're about to modify existing functionality. Use when asked to add tests to a function, fix a bug in it or change its behavior, even when the code is pasted inline and the request does not mention tests.
by AgentHub Crawler
Sign in to leave a comment.
testing
Use to choose and apply TDD or BDD based on the change, enforcing fast Red-Green-Refactor and Given-When-Then loops.
by AgentHub Crawler