Execute tasks from a track's implementation plan following TDD workflow
Add this skill
npx mdskills install sickn33/conductor-implementComprehensive TDD implementation workflow with phase gating, error handling, and progress tracking
1---2name: conductor-implement3description: Execute tasks from a track's implementation plan following TDD workflow4metadata:5 argument-hint: "[track-id] [--task X.Y] [--phase N]"6---78# Implement Track910Execute tasks from a track's implementation plan, following the workflow rules defined in `conductor/workflow.md`.1112## Use this skill when1314- Working on implement track tasks or workflows15- Needing guidance, best practices, or checklists for implement track1617## Do not use this skill when1819- The task is unrelated to implement track20- You need a different domain or tool outside this scope2122## Instructions2324- Clarify goals, constraints, and required inputs.25- Apply relevant best practices and validate outcomes.26- Provide actionable steps and verification.27- If detailed examples are required, open `resources/implementation-playbook.md`.2829## Pre-flight Checks30311. Verify Conductor is initialized:32 - Check `conductor/product.md` exists33 - Check `conductor/workflow.md` exists34 - Check `conductor/tracks.md` exists35 - If missing: Display error and suggest running `/conductor:setup` first36372. Load workflow configuration:38 - Read `conductor/workflow.md`39 - Parse TDD strictness level40 - Parse commit strategy41 - Parse verification checkpoint rules4243## Track Selection4445### If argument provided:4647- Validate track exists: `conductor/tracks/{argument}/plan.md`48- If not found: Search for partial matches, suggest corrections4950### If no argument:51521. Read `conductor/tracks.md`532. Parse for incomplete tracks (status `[ ]` or `[~]`)543. Display selection menu:5556 ```57 Select a track to implement:5859 In Progress:60 1. [~] auth_20250115 - User Authentication (Phase 2, Task 3)6162 Pending:63 2. [ ] nav-fix_20250114 - Navigation Bug Fix64 3. [ ] dashboard_20250113 - Dashboard Feature6566 Enter number or track ID:67 ```6869## Context Loading7071Load all relevant context for implementation:72731. Track documents:74 - `conductor/tracks/{trackId}/spec.md` - Requirements75 - `conductor/tracks/{trackId}/plan.md` - Task list76 - `conductor/tracks/{trackId}/metadata.json` - Progress state77782. Project context:79 - `conductor/product.md` - Product understanding80 - `conductor/tech-stack.md` - Technical constraints81 - `conductor/workflow.md` - Process rules82833. Code style (if exists):84 - `conductor/code_styleguides/{language}.md`8586## Track Status Update8788Update track to in-progress:89901. In `conductor/tracks.md`:91 - Change `[ ]` to `[~]` for this track92932. In `conductor/tracks/{trackId}/metadata.json`:94 - Set `status: "in_progress"`95 - Update `updated` timestamp9697## Task Execution Loop9899For each incomplete task in plan.md (marked with `[ ]`):100101### 1. Task Identification102103Parse plan.md to find next incomplete task:104105- Look for lines matching `- [ ] Task X.Y: {description}`106- Track current phase from structure107108### 2. Task Start109110Mark task as in-progress:111112- Update plan.md: Change `[ ]` to `[~]` for current task113- Announce: "Starting Task X.Y: {description}"114115### 3. TDD Workflow (if TDD enabled in workflow.md)116117**Red Phase - Write Failing Test:**118119```120Following TDD workflow for Task X.Y...121122Step 1: Writing failing test123```124125- Create test file if needed126- Write test(s) for the task functionality127- Run tests to confirm they fail128- If tests pass unexpectedly: HALT, investigate129130**Green Phase - Implement:**131132```133Step 2: Implementing minimal code to pass test134```135136- Write minimum code to make test pass137- Run tests to confirm they pass138- If tests fail: Debug and fix139140**Refactor Phase:**141142```143Step 3: Refactoring while keeping tests green144```145146- Clean up code147- Run tests to ensure still passing148149### 4. Non-TDD Workflow (if TDD not strict)150151- Implement the task directly152- Run any existing tests153- Manual verification as needed154155### 5. Task Completion156157**Commit changes** (following commit strategy from workflow.md):158159```bash160git add -A161git commit -m "{commit_prefix}: {task description} ({trackId})"162```163164**Update plan.md:**165166- Change `[~]` to `[x]` for completed task167- Commit plan update:168169```bash170git add conductor/tracks/{trackId}/plan.md171git commit -m "chore: mark task X.Y complete ({trackId})"172```173174**Update metadata.json:**175176- Increment `tasks.completed`177- Update `updated` timestamp178179### 6. Phase Completion Check180181After each task, check if phase is complete:182183- Parse plan.md for phase structure184- If all tasks in current phase are `[x]`:185186**Run phase verification:**187188```189Phase {N} complete. Running verification...190```191192- Execute verification tasks listed for the phase193- Run full test suite: `npm test` / `pytest` / etc.194195**Report and wait for approval:**196197```198Phase {N} Verification Results:199- All phase tasks: Complete200- Tests: {passing/failing}201- Verification: {pass/fail}202203Approve to continue to Phase {N+1}?2041. Yes, continue2052. No, there are issues to fix2063. Pause implementation207```208209**CRITICAL: Wait for explicit user approval before proceeding to next phase.**210211## Error Handling During Implementation212213### On Tool Failure214215```216ERROR: {tool} failed with: {error message}217218Options:2191. Retry the operation2202. Skip this task and continue2213. Pause implementation2224. Revert current task changes223```224225- HALT and present options226- Do NOT automatically continue227228### On Test Failure229230```231TESTS FAILING after Task X.Y232233Failed tests:234- {test name}: {failure reason}235236Options:2371. Attempt to fix2382. Rollback task changes2393. Pause for manual intervention240```241242### On Git Failure243244```245GIT ERROR: {error message}246247This may indicate:248- Uncommitted changes from outside Conductor249- Merge conflicts250- Permission issues251252Options:2531. Show git status2542. Attempt to resolve2553. Pause for manual intervention256```257258## Track Completion259260When all phases and tasks are complete:261262### 1. Final Verification263264```265All tasks complete. Running final verification...266```267268- Run full test suite269- Check all acceptance criteria from spec.md270- Generate verification report271272### 2. Update Track Status273274In `conductor/tracks.md`:275276- Change `[~]` to `[x]` for this track277- Update the "Updated" column278279In `conductor/tracks/{trackId}/metadata.json`:280281- Set `status: "complete"`282- Set `phases.completed` to total283- Set `tasks.completed` to total284- Update `updated` timestamp285286In `conductor/tracks/{trackId}/plan.md`:287288- Update header status to `[x] Complete`289290### 3. Documentation Sync Offer291292```293Track complete! Would you like to sync documentation?294295This will update:296- conductor/product.md (if new features added)297- conductor/tech-stack.md (if new dependencies added)298- README.md (if applicable)2993001. Yes, sync documentation3012. No, skip302```303304### 4. Cleanup Offer305306```307Track {trackId} is complete.308309Cleanup options:3101. Archive - Move to conductor/tracks/_archive/3112. Delete - Remove track directory3123. Keep - Leave as-is313```314315### 5. Completion Summary316317```318Track Complete: {track title}319320Summary:321- Track ID: {trackId}322- Phases completed: {N}/{N}323- Tasks completed: {M}/{M}324- Commits created: {count}325- Tests: All passing326327Next steps:328- Run /conductor:status to see project progress329- Run /conductor:new-track for next feature330```331332## Progress Tracking333334Maintain progress in `metadata.json` throughout:335336```json337{338 "id": "auth_20250115",339 "title": "User Authentication",340 "type": "feature",341 "status": "in_progress",342 "created": "2025-01-15T10:00:00Z",343 "updated": "2025-01-15T14:30:00Z",344 "current_phase": 2,345 "current_task": "2.3",346 "phases": {347 "total": 3,348 "completed": 1349 },350 "tasks": {351 "total": 12,352 "completed": 7353 },354 "commits": [355 "abc1234: feat: add login form (auth_20250115)",356 "def5678: feat: add password validation (auth_20250115)"357 ]358}359```360361## Resumption362363If implementation is paused and resumed:3643651. Load `metadata.json` for current state3662. Find current task from `current_task` field3673. Check if task is `[~]` in plan.md3684. Ask user:369370 ```371 Resuming track: {title}372373 Last task in progress: Task {X.Y}: {description}374375 Options:376 1. Continue from where we left off377 2. Restart current task378 3. Show progress summary first379 ```380381## Critical Rules3823831. **NEVER skip verification checkpoints** - Always wait for user approval between phases3842. **STOP on any failure** - Do not attempt to continue past errors3853. **Follow workflow.md strictly** - TDD, commit strategy, and verification rules are mandatory3864. **Keep plan.md updated** - Task status must reflect actual progress3875. **Commit frequently** - Each task completion should be committed3886. **Track all commits** - Record commit hashes in metadata.json for potential revert389
Full transparency — inspect the skill content before installing.