sequenzia/agent-alchemy/execute-tdd-tasks
Claude Code and agent skill by sequenzia/agent-alchemy
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Execute TDD task pairs autonomously with RED-GREEN-REFACTOR verification. Orchestrates wave-based execution with strategic parallelism, routing TDD tasks to tdd-executor agents and non-TDD tasks to standard task-executor. Use when user says "execute tdd tasks", "run tdd tasks", "start tdd execution", or wants to execute TDD-paired tasks from create-tdd-tasks.
Install
npx vskill@latest install sequenzia/agent-alchemy/execute-tdd-tasksSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as sequenzia/agent-alchemy/execute-tdd-tasks.
Execute TDD Tasks Skill
This skill orchestrates autonomous execution of TDD task pairs generated by /create-tdd-tasks. It is the TDD counterpart to the standard execute-tasks skill, reusing its session management, wave infrastructure, and execution context sharing while adding TDD-specific agent routing, RED-GREEN-REFACTOR verification, and per-task compliance reporting.
The key difference from standard execute-tasks: this skill routes TDD tasks to the tdd-executor agent (from tdd-tools) which runs a 6-phase TDD workflow, while routing non-TDD tasks to the standard task-executor agent. It verifies TDD compliance (RED verified, GREEN verified, refactored) per task pair and reports aggregate results.
CRITICAL: Complete ALL 9 steps. The workflow is not complete until Step 9: Update CLAUDE.md is evaluated. After completing each step, immediately proceed to the next step without waiting for user prompts (except Step 4 which requires user confirmation).
Plugin Context
This skill is part of the tdd-tools plugin and uses agents from the same plugin:
- tdd-executor agent (Opus) -- 6-phase TDD workflow per task
- test-writer agent (Sonnet) -- parallel test generation (used by tdd-executor internally)
For non-TDD tasks, this skill routes to the task-executor agent from sdd-tools (soft cross-plugin dependency). Since TDD tasks are always generated from SDD tasks via /create-tasks, the sdd-tools plugin is expected to be installed when this skill runs.
Core Principles
1. TDD Compliance First
Every TDD task pair must complete the RED-GREEN-REFACTOR cycle:
- RED: Tests are written and verified to fail before any implementation exists
- GREEN: Implementation is written that makes all tests pass with zero regressions
- REFACTOR: Code is cleaned up while keeping all tests green
2. Strategic Parallelism
Maximize execution throughput without violating TDD sequencing:
- PARALLEL: Multiple test-writing tasks (RED phase) run simultaneously across features
- SEQUENTIAL: Within a single TDD pair, RED must complete before GREEN can start (enforced by dependencies)
3. Reuse execute-tasks Infrastructure
Session management, wave execution, context sharing, and progress tracking all reuse the same patterns from execute-tasks. See references/tdd-execution-workflow.md for TDD-specific extensions.
4. Honest TDD Reporting
Report per-task compliance with the full RED-GREEN-REFACTOR cycle:
red_verified: Whether tests failed as expected before implementationgreen_verified: Whether all tests pass after implementationrefactored: Whether code was cleaned up while maintaining green testscoverage_delta: Change in test coverage percentage (if measurable)
Orchestration Workflow
This skill orchestrates TDD task execution through a 9-step loop that mirrors the standard execute-tasks orchestration with TDD-specific extensions. See references/tdd-execution-workflow.md for the full TDD wave execution details and references/tdd-verification-patterns.md for TDD phase verification rules.
Step 1: Load References
Read the TDD-specific reference files:
Parse arguments from the invocation:
--task-group <group>-- Filter tasks to a specific group--max-parallel <n>-- Override max concurrent agents per wave--retries <n>-- Override retry attempts per task (default: 3)
Step 2: Load and Classify Tasks
Use TaskList to retrieve all tasks. If --task-group was provided, filter to tasks where metadata.task_group matches.
Classify each task by type:
| Detection | Type | Agent | Source | |
|---|---|---|---|---|
metadata.tdd_mode == true AND metadata.tdd_phase == "red" | TDD test task | tdd-executor | tdd-tools (same plugin) | |
metadata.tdd_mode == true AND metadata.tdd_phase == "green" | TDD implementation task | tdd-executor | tdd-tools (same plugin) | |
No tdd_mode metadata or tdd_mode == false | Non-TDD task | task-executor | sdd-tools (cross-plugin, soft dependency) |
Count and report:
- Total tasks (pending + in_progress + completed)
- TDD pairs identified (test + implementation tasks)
- Non-TDD tasks
- Already completed tasks
Handle edge cases:
- No tasks found: Report "No tasks found for group '{group}'. Use
/create-tdd-tasksto generate TDD task pairs from your SDD tasks." and stop. - All completed: Report a summary of completed tasks including TDD compliance and stop.
- No unblocked tasks: Report which tasks exist and what's blocking them.
Step 3: Build Execution Plan
Resolve max_parallel using precedence:
--max-parallelCLI argument (highest priority)max_parallelin.claude/agent-alchemy.local.md- Default: 5
Resolve retries using precedence:
--retriesCLI argument (highest priority)- Default: 3
Read .claude/agent-alchemy.local.md if it exists, for TDD-specific settings:
tdd.strictness--strict,normal(default), orrelaxedtdd.coverage-threshold-- Minimum coverage target (default: 80)
Build the dependency graph from all pending tasks (TDD and non-TDD):
- Collect all pending tasks and their
blockedByrelationships - Run topological sort to assign dependency levels
- Assign tasks to waves by dependency level (Wave 1 = no dependencies, Wave 2 = depends only on Wave 1, etc.)
- Sort within waves by priority: critical > high > medium > low > unprioritized
- Break ties by "unblocks most others"
- Cap each wave at
max_paralleltasks
Annotate waves with TDD phase labels:
The dependency structure from create-tdd-tasks naturally produces alternating test/implementation waves:
Detect circular dependencies: If tasks remain unassigned after topological sorting, they form a cycle. Report the cycle and attempt to break at the weakest link.
Validate TDD pair cross-references: For each TDD task, verify its paired_task_id references a valid task. Log warnings for orphaned pairs.
Step 4: Present Execution Plan and Confirm
Display the TDD execution plan:
Use AskUserQuestion to confirm:
If the user selects "Cancel", report "Execution cancelled. No tasks were modified." and stop.
Step 5: Initialize Execution Directory
Generate a task_execution_id using three-tier resolution:
- IF
--task-groupwas provided:{task_group}-tdd-{YYYYMMDD}-{HHMMSS} - ELSE IF all open tasks share the same
metadata.task_group:{task_group}-tdd-{YYYYMMDD}-{HHMMSS} - ELSE:
tdd-session-{YYYYMMDD}-{HHMMSS}
Clean stale live session: Follow the same procedure as execute-tasks:
- Check if
.claude/sessions/__live_session__/contains leftover files - If found, archive to
.claude/sessions/interrupted-{YYYYMMDD}-{HHMMSS}/ - Reset any
in_progresstasks from the interrupted session topending
Concurrency guard: Check for .claude/sessions/__live_session__/.lock. Follow the same lock protocol as execute-tasks.
Create session files in `.claude/sessions/__live_session__/`:
- `execution_plan.md` -- Save the TDD execution plan from Step 5
- `execution_context.md` -- Initialize with TDD-extended template:
```markdown # Execution Context
## Project Patterns <!-- Discovered coding patterns, conventions, tech stack details -->
## Key Decisions <!-- Architecture decisions, approach choices made during execution -->
## Known Issues <!-- Problems encountered, workarounds applied, things to watch out for -->
## File Map <!-- Important files discovered and their purposes -->
## TDD Compliance
| Task Pair | Test Task | Impl Task | RED | GREEN | Refactored | Coverage Delta |
|---|
## Task History <!-- Brief log of task outcomes with relevant context --> ```
- `task_log.md` -- Initialize with standard table headers:
```markdown # Task Execution Log
| Task ID | Subject | Type | Status | Attempts | Duration | Token Usage |
|---|
```
- `tasks/` -- Empty subdirectory for archiving completed task files
- `progress.md` -- Initialize with status template:
```markdown # Execution Progress (TDD Mode) Status: Initializing Wave: 0 of {total_waves} Max Parallel: {max_parallel} TDD Strictness: {strictness} Updated: {ISO 8601 timestamp}
## Active Tasks
## Completed This Session ```
- `execution_pointer.md` at
$HOME/.claude/tasks/{CLAUDE_CODE_TASK_LIST_ID}/execution_pointer.md-- Absolute path to.claude/sessions/__live_session__/
Step 6: Initialize Execution Context
Read .claude/sessions/__live_session__/execution_context.md (created in Step 6).
If a prior execution session's context exists, look in .claude/sessions/ for the most recent timestamped subfolder and merge relevant learnings (Project Patterns, Key Decisions, Known Issues, File Map) into the new execution context.
Context compaction: If Task History has 10+ entries from merged sessions, compact older entries into a summary paragraph and keep the 5 most recent in full.
Step 7: Execute Loop
Execute tasks in waves with TDD-aware agent routing. No user interaction between waves.
8a: Initialize Wave
- Identify all unblocked tasks (pending status, all dependencies completed)
- Sort by priority (critical > high > medium > low > unprioritized)
- Take up to
max_paralleltasks for this wave - If no unblocked tasks remain, exit the loop
8b: Snapshot Execution Context
Read .claude/sessions/__live_session__/execution_context.md and hold as baseline for this wave. All agents read from the same snapshot.
8c: Launch Wave Agents
- Mark all wave tasks as
in_progressviaTaskUpdate - Record
wave_start_time - Update
progress.mdwith active tasks - Launch all wave agents simultaneously using parallel Task tool calls in a single message turn with
run_in_background: true.
This is the start of the file. Read the full SKILL.md on GitHub.
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 repositoryCheckingclaude/tdd-tools/skills/execute-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.
Extension points
configConfiguration overrides
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/execute-tdd-tasks)