/desplega:tdd-planningfrom desplega
Creates TDD implementation plans with strict Red-Green-Commit/Rollback cycles. Activates for test-critical or safety-critical features or when explicitly invoked.
Ships in desplega. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are creating implementation plans that follow a strict Test-Driven Development approach. Every implementation step follows the TDD cycle: RED → GREEN → COMMIT/ROLLBACK.
This skill enforces a disciplined TDD workflow:
No implementation code is written without a failing test first. This is non-negotiable.
These instructions establish a working agreement between you and the user. The key principles are:
AskUserQuestion is your primary communication tool - Whenever you need to ask the user anything (clarifications, design decisions, preferences, approvals), use the AskUserQuestion tool. Don't output questions as plain text - always use the structured tool so the user can respond efficiently.
Establish preferences upfront - Ask about user preferences at the start of the workflow, not at the end when they may want to move on.
Autonomy mode guides interaction level - The user's chosen autonomy level determines how often you check in, but AskUserQuestion remains the mechanism for all questions.
Before starting planning (unless autonomy is Autopilot), establish these preferences:
Commit Granularity - Use AskUserQuestion with:
| Question | Options |
|---|---|
| "How granular should commits be?" | 1. Commit after each GREEN (Recommended for strict TDD), 2. Commit after each feature/phase completes, 3. I'll handle commits manually |
Rollback Strategy - Use AskUserQuestion with:
| Question | Options |
|---|---|
| "When a test can't be made green after reasonable effort, what's the rollback strategy?" | 1. git checkout . to last commit (Recommended), 2. git stash changes for later analysis, 3. Keep failing code, ask for guidance |
File Review Preference - Check if the file-review plugin is available (look for file-review:file-review in available commands).
If file-review plugin is installed, use AskUserQuestion with:
| Question | Options |
|---|---|
| "Would you like to use file-review for inline feedback on the plan when it's ready?" | 1. Yes, open file-review when plan is ready (Recommended), 2. No, just show me the plan |
Store these preferences and act on them during implementation.
This skill activates when:
**REQUIRED SUB-SKILL:** Use desplega:tdd-planningAt the start of planning, adapt your interaction level based on the autonomy mode:
| Mode | Behavior |
|---|---|
| Autopilot | Research independently, create complete TDD plan, present for final review only |
| Critical (Default) | Get buy-in at major decision points, validate test strategy |
| Verbose | Check in at each step, confirm test approach before each cycle |
The autonomy mode is passed by the invoking command. If not specified, default to Critical.
Read all mentioned files immediately and FULLY:
Analyze test infrastructure:
__tests__/, tests/, etc.)npm test, make test, pytest, etc.)Spawn initial research tasks:
Present understanding and questions (if not Autopilot):
First, present your findings as text:
Based on the research of the codebase, I understand we need to [summary].
Test Infrastructure:
- Framework: [testing framework]
- Test location: [where tests live]
- Test command: `[command]`
- Existing patterns: [relevant patterns found]
Then, if there are questions, use AskUserQuestion.
Identify testable units:
Design test progression:
Present test strategy (if not Autopilot):
Use AskUserQuestion to validate approach:
| Question | Options |
|---|---|
| "I propose starting with [simplest test case] and progressing to [more complex cases]. Does this test progression make sense?" | 1. Yes, proceed, 2. Let's discuss the order, 3. Add more test cases |
Create TDD cycle outline:
Each feature/phase is broken into TDD cycles:
## Feature: [Name]
### Cycle 1: [Simplest behavior]
- RED: Test for [specific behavior]
- GREEN: Implement [minimal code]
- COMMIT: "[descriptive message]"
### Cycle 2: [Next behavior]
...
Get feedback on structure before writing details (unless Autopilot)
Before proceeding, exit plan mode to write the plan file.
Write the plan to thoughts/<username|shared>/plans/YYYY-MM-DD-tdd-description.md.
Path selection: Use the user's name (e.g., thoughts/taras/plans/) if known from context. Fall back to thoughts/shared/plans/ when unclear.
CRITICAL: Every TDD cycle MUST include exact test code to write and expected failure message. See template for exact format.
QA Specs (optional): Features that change user-facing behavior SHOULD include an optional ### QA Spec (optional): section at the Feature level (after the feature header, before the first TDD cycle). Unlike regular plans where QA specs attach per-phase, TDD plans attach them per-feature since the RED/GREEN cycle itself serves as the per-cycle verification. See the template for the format.
Template: Read and follow the template at cc-plugin/base/skills/tdd-planning/template.md
Present draft plan location:
I've created the TDD implementation plan at:
`thoughts/<username|shared>/plans/YYYY-MM-DD-tdd-description.md`
Please review it.
Iterate based on feedback (if not Autopilot)
Offer structured review:
/review on this TDD plan for completeness and gap analysis?"desplega:reviewing skill on the plan documentLearning Capture:
OPTIONAL SUB-SKILL: If significant insights, patterns, gotchas, or decisions emerged during this workflow, consider using desplega:learning to capture them via /learning capture. Focus on learnings that would help someone else in a future session.
Workflow handoff: After the plan is finalized (and optionally reviewed), use AskUserQuestion with:
| Question | Options |
|---|---|
| "The TDD plan is ready. What's the next step?" | 1. Implement this plan (→ /implement-plan), 2. Run a review first (→ /review), 3. Done for now (park the plan) |
Based on the answer:
/implement-plan command with the plan file pathdesplega:reviewing skill on the plan documentstatus to ready or parked as appropriateFinalize the plan - DO NOT START implementation
If the file-review plugin is available and the user selected "Yes" during User Preferences setup:
/file-review:file-review <path>Every implementation step MUST follow the TDD cycle. Plans without proper TDD cycles are incomplete.
### Cycle N: [Behavior being implemented]
#### RED Phase
**Test to write:**
```[language]
// Exact test code goes here
Expected failure:
[Expected error message or failure output]
Verify RED: [test command] should fail with the above message
Implementation approach: [Brief description of minimal code needed]
Files to modify:
path/to/file.ext: [what to add/change]Verify GREEN: [test command] should now pass
If GREEN:
"[descriptive message following conventional commits]"git add -A && git commit -m "[message]"If STUCK (can't reach GREEN after reasonable effort):
git checkout . (or git stash based on preference)
### Validation Checklist
Before finalizing any TDD plan, verify:
- [ ] Every implementation step has RED → GREEN → COMMIT/ROLLBACK structure
- [ ] RED phase includes exact test code to write
- [ ] RED phase includes expected failure message
- [ ] GREEN phase describes minimal implementation
- [ ] Each cycle is small enough to complete in one sitting
- [ ] Cycles build on each other progressively
- [ ] Rollback strategy is clear for each cycle
## Important Guidelines
1. **Tests First, Always**: Never describe implementation without the test that drives it
2. **Minimal GREEN**: Only write enough code to pass the test, nothing more
3. **Small Cycles**: If a cycle seems big, break it into smaller cycles
4. **Progressive Complexity**: Start simple, add complexity through new tests
5. **Clear Rollback Points**: Every commit is a safe point to return to
6. **No Speculative Code**: Don't add code "because we'll need it later"
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub desplega-ai/ai-toolbox --plugin desplega26 skills in this plugin
/ask-userConventions for asking the user questions during a workflow via the AskUserQuestion tool. Other skills reference this to keep prompts consistent and structured./babysit-prKeep a GitHub PR moving until it is clean on its head commit. Each round fixes CI failures, handles review findings, rebases when needed, re-triggers the reviewers, and then waits in the background for the next event. Use when the user says "babysit the PR", "watch the PR until it's approved", "keep going until approved", "monitor the PR", or invokes /babysit-pr. Merges only when the user asks for it./brainstormingInteractive exploration of ideas through Socratic Q&A. Produces progressive documents that serve as lightweight pre-PRDs feeding into research./code-reviewingTwo-axis code review of a diff — Standards (is the code well built?) and Spec (does it actually solve the stated problem?) — run as parallel sub-agents and reported separately, never merged. Use when reviewing implementation output (a phase, a wave, a branch, a PR), when the user says "review the code", "review the diff", "review this phase", or when another desplega skill (implementing, v-implementing, verifying, delegate-work) calls for a per-phase or final code review. For reviewing DOCUMENTS (plans, research, brainstorms), use desplega:reviewing instead./commsRe-express something so it lands — re-explain your last reply in plain casual language, show the current topic visually (diagram, code-shape sketch, HTML artifact), do both at once, or rewrite artifact text into unambiguous ASD-STE100 English. Use when the user runs /desplega:comms, types /bro, says 'say it simpler', 'bro what', 'I don't follow', 'show me', 'draw this', 'visualize', 'disambiguate this', or 'STE100 rewrite'. Not for creative or marketing copy./delegate-workExecutor routing policy for ALL delegated work — pick the right model for every sub-agent and the right Codex variant for every implementation slice. Use whenever you are about to spawn a sub-agent/Task (research, review, QA, UI, search), whenever a desplega skill (implement-plan, v-implement, run-phase, run-step, research) is choosing executors for phases/steps, or when the user says "implement with codex", "delegate this", "which model should do this", or similar. Supersedes codex-implement (its worktree/exec mechanics live here).Other plugins' skills for the same job