sequenzia/agent-alchemy/create-tdd-tasks
Claude Code and agent skill by sequenzia/agent-alchemy
- community
Checking that the SKILL.md file is still in the repository.
Transform SDD tasks into test-first TDD task pairs. Reads existing tasks from /create-tasks and generates paired test tasks with RED-GREEN dependencies. Use when user says "create tdd tasks", "add tdd pairs", "convert to tdd", or wants to apply test-first ordering to SDD tasks.
Install
npx vskill@latest install sequenzia/agent-alchemy/create-tdd-tasksSKILL.md
The same SKILL.md was published earlier as sequenzia/agent-alchemy/create-tdd-tasks.
Create TDD Tasks Skill
Transform existing SDD implementation tasks into test-first TDD task pairs. For each implementation task, this skill creates a paired test task that must complete first, enforcing test-first development at the pipeline level.
This skill bridges the SDD pipeline (/create-tasks) and TDD execution (/execute-tdd-tasks), converting a standard task list into one where every implementation task is preceded by a failing-test-writing task.
CRITICAL: Complete ALL 8 phases. The workflow is not complete until Phase 8: Report is finished. After completing each phase, immediately proceed to the next phase without waiting for user prompts.
Core Principles
- Test-first at the pipeline level -- Every implementation task gets a paired test task that blocks it. Tests are written before implementation begins.
- Preserve existing dependencies -- TDD pairs are inserted into the existing SDD dependency chain without breaking any original relationships.
- Merge mode awareness -- Re-running this skill on a task list that already has TDD pairs detects and skips existing pairs instead of creating duplicates.
- Criteria-to-tests conversion -- Acceptance criteria from SDD tasks are converted into test descriptions for the paired test task.
- Minimal metadata additions -- Only
tdd_mode,tdd_phase, andpaired_task_idare added. All existing metadata is preserved.
Critical Rules
AskUserQuestion is MANDATORY
IMPORTANT: You MUST use the AskUserQuestion tool for ALL questions to the user. Never ask questions through regular text output.
- Preview confirmation -> AskUserQuestion
- Anomaly resolution -> AskUserQuestion
- Error recovery options -> AskUserQuestion
Text output should only be used for:
- Presenting TDD pair previews and summaries
- Reporting completion status
- Displaying dependency chain visualizations
NEVER do this (asking via text output):
ALWAYS do this (using AskUserQuestion tool):
Plan Mode Behavior
CRITICAL: This skill transforms tasks, NOT creates an implementation plan. When invoked during Claude Code's plan mode:
- DO NOT create a plan for how to implement TDD
- DO NOT defer task transformation to an "execution phase"
- DO proceed with the full TDD task generation workflow immediately
- DO create test tasks using TaskCreate as normal
The TDD task pairs are planning artifacts themselves -- generating them IS the planning activity.
Soft Dependency on sdd-tools
This skill is part of the tdd-tools plugin and works with agents in the same plugin (tdd-executor, test-writer). It bridges the SDD pipeline (/create-tasks from sdd-tools) and TDD execution (/execute-tdd-tasks). The sdd-tools plugin is expected to be installed since TDD tasks are generated from SDD tasks created by /create-tasks.
Phase 1: Validate & Load References
Goal: Verify prerequisites and load reference materials.
Step 1: Parse Arguments
Check $ARGUMENTS for optional --task-group filter:
- If
--task-group <group>is present, extract the group name for filtering - If no arguments provided, process all tasks
Step 3: Load Reference Files
Read the TDD decomposition and dependency reference files:
references/tdd-decomposition-patterns.md-- Task pairing rules, naming conventions, metadata, merge mode detectionreferences/tdd-dependency-rules.md-- Dependency insertion algorithm, circular dependency detection and breaking
Phase 2: Read Existing Tasks
Goal: Load the current task list and identify tasks to transform.
Step 1: Get All Tasks
Use TaskList to retrieve all current tasks.
Step 2: Apply Group Filter
If --task-group was specified:
- Filter to only tasks where
metadata.task_groupmatches the specified group - Tasks outside the group are not modified
If no --task-group specified:
- Process all tasks regardless of group
Step 3: Validate Task List
Handle empty/missing states:
Empty task list (no tasks at all):
No tasks matching --task-group filter:
Step 4: Classify Tasks
For each task, determine if it should receive a TDD pair:
Eligible for TDD pairing:
- Implementation tasks (subjects like "Create X", "Implement X", "Build X", "Add X")
- Business logic tasks
- API/endpoint tasks
- Data model tasks
- UI/frontend tasks
Skip (no TDD pair created):
- Tasks already marked with
tdd_mode: truein metadata - Test tasks (subjects like "Add tests for X", "Write tests for X", or tasks with
testintask_uid) - Configuration/setup tasks (subjects like "Configure X", "Set up X")
- Documentation tasks (subjects like "Document X", "Write docs for X")
Record the classification for each task: eligible, skipped (with reason).
Phase 3: Detect Existing TDD Pairs (Merge Mode)
Goal: Identify tasks that already have TDD pairs to avoid duplication.
Detection Algorithm
For each eligible task, check if it already has a TDD pair using these 4 signals (any match means paired):
- Metadata check: Task has
tdd_mode: truein metadata - Paired task check: Task has
paired_task_idin metadata, and the paired task exists in the task list - UID check: A task exists with
task_uidequal to this task'stask_uid+:red - Subject check: A task with subject
"Write tests for {this task's subject}"exists in the sametask_group
Merge Behavior
For tasks with existing TDD pairs:
| Existing Pair Status | Action | |
|---|---|---|
| Both tasks pending | Skip -- pair already exists | |
| Test completed, impl pending | Skip -- pair progressing normally | |
| Test completed, impl completed | Skip -- pair fully done | |
| Test completed, impl in_progress | Skip -- pair in progress | |
| Test pending, impl completed | Flag as anomaly -- impl completed without tests | |
| Only impl exists, test missing | Treat as unpaired -- create the test task | |
| Only test exists, impl missing | Flag as orphan -- ask user |
Report Merge Status
If any existing pairs detected:
If anomalies exist, use AskUserQuestion to resolve each one:
Phase 4: Generate Test Tasks
Goal: Create test task definitions for each eligible unpaired implementation task.
For each eligible task that needs a TDD pair, generate a paired test task.
Step 1: Determine Test Task Subject
Follow the naming convention:
Examples:
- "Create User data model" -> "Write tests for Create User data model"
- "Implement POST /auth/login endpoint" -> "Write tests for Implement POST /auth/login endpoint"
Step 2: Infer Test File Path
Determine the test file path based on the implementation task context:
- If implementation task references source files, derive test file path from project conventions
- Common patterns:
src/foo.ts->tests/foo.test.ts,src/foo.py->tests/test_foo.py - If no source files referenced, use the task subject to infer a path
Step 3: Detect Test Framework
Determine the test framework using project detection:
- Check for config files:
jest.config.*,vitest.config.*,pytest.ini,pyproject.toml,setup.cfg - Check existing test files for import patterns
- Check
package.jsonfor test dependencies - Default to the most common framework for the detected language
Step 4: Convert Acceptance Criteria to Test Descriptions
If the implementation task HAS acceptance criteria (**Acceptance Criteria:** section):
Convert each criterion into a test description:
If the implementation task LACKS acceptance criteria:
Generate basic test descriptions from the subject and description:
- Parse the subject for intent ("Create X" -> test X exists and has expected structure)
- Extract testable statements from description ("should...", "must...", "returns...", "validates...")
- Generate minimal test descriptions:
Step 5: Build Test Task Definition
Assemble the complete test task:
Step 6: Plan Implementation Task Updates
For each original implementation task, plan the metadata update:
Phase 5: Set Dependencies
Goal: Insert TDD pairs into the existing dependency chain.
Apply the insertion algorithm from tdd-dependency-rules.md:
For Each TDD Pair
Given implementation task #N with existing dependencies blockedBy: [A, B, ...]:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 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 repositoryCheckingclaude/tdd-tools/skills/create-tdd-tasks/SKILL.md
Popularity
- Repository stars
- 42
- Repository forks
- 7
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. 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/sequenzia/agent-alchemy/create-tdd-tasks)