mnthe/hardworker-marketplace/tdd-workflow
Claude Code and agent skill by mnthe/hardworker-marketplace
- community
Checking that the SKILL.md file is still in the repository.
Test-Driven Development (TDD) workflow for ultrawork tasks with approach: "tdd". Enforces RED-GREEN-REFACTOR cycle with gate hooks and evidence requirements. Required knowledge for worker agents implementing TDD tasks.
Install
npx vskill@latest install mnthe/hardworker-marketplace/tdd-workflowSKILL.md
The same SKILL.md was published earlier as mnthe/hardworker-marketplace/tdd-workflow.
TDD Workflow
Test-Driven Development (TDD) workflow for tasks marked with approach: "tdd".
CRITICAL: TDD tasks MUST follow this exact sequence. Gate hooks will block out-of-order operations.
Scoped vs Full Test Execution
During TDD phases (RED/GREEN/REFACTOR):
- Run scoped tests only (specific test file or pattern)
- Fast feedback loop for the feature being developed
- Full test suite is deferred to VERIFY task
During VERIFICATION phase:
- Verifier runs full test suite (
npm testwithout scope) - Ensures no regressions across entire codebase
- PASS/FAIL determination based on complete test coverage
Why scoped execution?
- Speed: Test only what changed, not entire suite
- Focus: TDD cycle targets specific behavior
- Separation: Task implementation vs system verification
Using test_scope from Task
When task has test_scope field, use it for scoped execution:
Example task.json:
If test_scope is not set, use the test file path you created.
TDD Phase 1: RED - Write Failing Test
- Create test file FIRST (before any implementation code)
- Write test for expected behavior
- Run test and VERIFY IT FAILS
Evidence Required:
- Test file path created
- Scoped test execution output showing failure
- Exit code 1 (expected)
- Evidence includes full test command with scope
TDD Phase 2: GREEN - Minimal Implementation
- Write MINIMAL code to make the test pass
- Do NOT add extra functionality beyond what test requires
- Run test and VERIFY IT PASSES
Evidence Required:
- Implementation file path
- Scoped test execution output showing pass
- Exit code 0
- Evidence includes full test command with scope
TDD Phase 3: REFACTOR (Optional)
- Improve code quality (naming, structure, performance)
- Run scoped tests again to ensure they still pass
- Record any refactoring done
TDD Evidence Chain
A complete TDD task MUST have this evidence sequence:
Evidence format MUST include:
- Full test command with scope (e.g.,
npm test -- tests/feature.test.ts) - Exit code in parentheses
- Phase prefix (TDD-RED, TDD-GREEN, TDD-REFACTOR)
Verification will FAIL if:
- Implementation evidence appears before TDD-RED evidence
- Missing TDD-RED or TDD-GREEN evidence
- Test never failed (suggests code-first, not test-first)
- Evidence missing test scope or exit code
Gate Enforcement
The gate-enforcement.js hook blocks out-of-order TDD operations:
During EXECUTION phase (TDD tasks only):
- ✅ Allow: Test files first (
*.test.*,*.spec.*,__tests__/*) - ❌ Block: Implementation files before TDD-RED evidence
Detection Logic:
- Hook reads task file to check
approach: "tdd" - Searches evidence array for "TDD-RED" prefix
- If TDD task + no RED evidence → blocks Write/Edit on non-test files
Error Message:
TDD Task Completion
After all phases complete:
Quick Reference
| Phase | Action | Evidence Prefix | Exit Code | |
|---|---|---|---|---|
| RED | Write test, verify failure | TDD-RED: ... | 1 (fail) | |
| GREEN | Write minimal impl, verify pass | TDD-GREEN: ... | 0 (pass) | |
| REFACTOR | Improve code, tests still pass | TDD-REFACTOR: ... | 0 (pass) |
Example Evidence Sequence
Note: Full test suite (npm test without scope) is run only during VERIFICATION phase by the verifier agent.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/ultrawork/skills/tdd-workflow/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mnthe/hardworker-marketplace/tdd-workflow)