test_driven_agent
Installation
SKILL.md
Test Driven Agent Protocol
1. The Red-Green-Refactor Cycle
- Red: Write a test that fails (demonstrating the bug or missing feature).
- Agent Note: If fixing a bug, YOU MUST reproduce it with a test first.
- Green: Write the minimal code to pass the test.
- Refactor: Clean up the code while ensuring tests still pass.
2. Test Coverage Requirements
- Happy Path: The "standard" usage case.
- Sad Path: Error states, network failures, invalid inputs.
- Edge Cases: Empty lists, max values, concurrent actions.
3. Self-Healing Mandate
If a test fails after your changes:
- DO NOT delete the test.
- DO NOT comment out the assertion.
- DO NOT change the test expectation to match the buggy result (unless the spec changed).
- DO: Fix the implementation logic until the test passes.
4. Integration vs Unit
- Unit: Mock external dependencies (Supabase, API). Fast, isolated.
- Integration: Test the hook or service with realistic (mocked) data flows.
5. Verification Checklist
- Did I write a test case for this requirement?
- Did I run
npm test <filename>? - Did I check specifically for regression in related headers/components?
Related skills
More from cityfish91159/maihouses
agentic_architecture
Enforces high-level architectural thinking, separation of concerns, and scalability checks before coding.
19code-review-excellence
程式碼審查最佳實踐指南。當進行 PR review、代碼審查或用戶提到「review」、「審查」時使用。
19nasa_typescript_safety
Adapts NASA's "Power of 10" safety rules for high-reliability TypeScript code.
18frontend_mastery
Advanced React patterns, performance optimization, and state management rules.
18code-simplifier
|
18type-checker
執行 TypeScript 類型檢查並修復類型錯誤。當遇到類型錯誤、需要類型定義、或用戶提到「type」、「類型」時使用。
18