archibate/dotfiles-opencode/tdd-workflow
Claude Code and agent skill by archibate/dotfiles-opencode
- community
Checking that the SKILL.md file is still in the repository.
Use this skill for developing software in TDD (Test-Driven Design).
Install
npx vskill@latest install archibate/dotfiles-opencode/tdd-workflowSKILL.md
The same SKILL.md was published earlier as archibate/dotfiles-opencode/tdd-workflow.
TDD Workflow
Overview
A strict 7-step TDD cycle that produces high-quality, well-tested code. Each step must be verified and confirmed before proceeding. Status is only updated after real verification
- never hallucinated.
Core principle: RED (failing test) -> GREEN (minimal implementation) -> REFACTOR.
Step 0 - Check Existing Progress
At the start of each session, before doing anything else:
- List
tdd-summary/to check for existing step reports (e.g.step-1.md,step-2.md). - If reports exist, read them to understand prior context, then resume from the next step.
Step 1 - Understand Intent
- Explore the codebase for relevant context.
- Derive functional requirements from the available information (user prompt + codebase).
- If any requirement is ambiguous, document the assumption explicitly in
step-1.mdunder
an "Assumptions" section rather than asking for clarification.
Write tdd-summary/step-1.md:
Step 2 - Write Scenario Docs
For each functional requirement, create a scenario document at docs/scenario/<name>.md:
Invariant: Count of FR = count of scenario documents. Verify before continuing.
Write tdd-summary/step-2.md:
Step 3 - Write Failing Test (RED)
For each scenario document:
- Write tests at
tests/scenario/test_<name>.py(or equivalent). - Each scenario must have at least 2 test cases. Add edge cases if missing.
- All acceptance criteria from the scenario document must be covered.
- Tests must not be empty or dummy.
- Update scenario status: check
- [x] Write solid test according to document.
After writing, run each test and verify it fails:
- Expected failure (e.g. feature not found, endpoint missing) - this is correct.
- Update scenario status: check
- [x] Run test and watch it failing. - Unexpected failure (e.g. import error, missing dependency) - fix the environment first.
- Test passes - the feature is not implemented yet; there is no reason it should pass. Fix the test.
Invariant: Count of scenario documents = count of test files. Verify before continuing.
Write tdd-summary/step-3.md:
Step 4 - Implement to Make Tests Pass (GREEN)
For each failing test:
- Write the minimal production code necessary to make the test pass. Nothing more.
- Do not introduce changes unrelated to the current functional requirement.
- Update scenario status: check
- [x] Implement to make test pass. - Run the test. If it fails, fix the implementation and retry.
- After confirming it passes, update scenario status: check
- [x] Run test and confirm it passed.
Write tdd-summary/step-4.md:
Step 5 - Refactor for Maintainability
For each scenario where tests now pass:
- Improve readability, structure, and maintainability without changing external behavior.
- Update scenario status: check
- [x] Refactor implementation without breaking test. - Run the tests again after refactoring.
- If tests fail: fix the refactoring. If impossible, rollback to the pre-refactor version.
- After confirming tests still pass, update scenario status: check
- [x] Run test and confirm still passing after refactor.
Write tdd-summary/step-5.md:
Step 6 - Regression Test
Run the complete test suite (all tests, not just those added in this session):
- If regression occurs in unrelated tests:
- Analyze the failure and understand its impact on existing functionality.
- Fix the implementation to restore all passing tests.
- Re-run the complete suite until everything passes.
NEVER modify existing tests that are unrelated to the current functional requirements.
Write tdd-summary/step-6.md:
Step 7 - Final Review
Verify that every scenario document has all status checkboxes checked.
Review:
- Every FR has a corresponding scenario document and test file.
- All tests pass and code is clean.
Write tdd-summary/step-7.md:
Finally, archive the summary folder:
TDD workflow complete.
Iron Rules
- Do not skip steps. Each step must be verified before the next begins.
- Do not edit tests during implementation or refactor steps, unless the test itself was
obviously written incorrectly in Step 3.
- Do not hallucinate status. Only check a status checkbox after real, confirmed verification.
- Keep counts equal. FR count = scenario doc count = test file count at all times.
- Step gates: If running interactively, present each step report and wait for confirmation
before continuing. If running as a delegated subagent, proceed automatically through all steps.
- If changes are requested at any step, loop back to the appropriate step and adjust all
downstream artifacts accordingly.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/tdd-workflow/SKILL.md
Popularity
- Repository stars
- 56
- Repository forks
- 11
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 8 months ago.
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/archibate/dotfiles-opencode/tdd-workflow)