$npx -y skills add anombyte93/prd-taskmaster --skill execute-taskExecute the next TaskMaster task using the implementation plan with CDD verification. Picks the next ready task, matches it to the plan step, implements via a dispatched subagent, verifies subtasks with evidence, marks the task done, and loops until every task is complete. Wraps
| 1 | # execute-task |
| 2 | |
| 3 | The execution loop. Three sources converge: |
| 4 | |
| 5 | - **Plan** (HOW) — `docs/superpowers/plans/*.md` produced by GENERATE |
| 6 | - **TaskMaster** (WHAT) — `.taskmaster/tasks/tasks.json` with |
| 7 | dependencies and complexity scores |
| 8 | - **CDD** (PROOF) — acceptance cards per task, evidence-gated |
| 9 | |
| 10 | execute-task is the single skill that runs the full build from "tasks are |
| 11 | ready" to SHIP_CHECK_OK. It is autonomous — no AskUserQuestion inside the |
| 12 | loop. Any gap that would require user input is surfaced through the recon |
| 13 | escalation ladder (step 11) or the inbox (steps 4 and 8), never via a modal |
| 14 | prompt. |
| 15 | |
| 16 | ## Entry |
| 17 | |
| 18 | This skill is invoked either: |
| 19 | |
| 20 | 1. Directly by the user once HANDOFF has completed and a task-execution |
| 21 | mode (A/B/C) has been dispatched, **or** |
| 22 | 2. By the `prd-taskmaster` orchestrator when `current_phase` is `EXECUTE`. |
| 23 | |
| 24 | On entry, confirm that: |
| 25 | |
| 26 | - `.atlas-ai/state/pipeline.json` exists and records `phase: EXECUTE` |
| 27 | - `.taskmaster/tasks/tasks.json` exists with at least one ready task |
| 28 | - `.atlas-ai/customizations/system-prompt-template.md` is present (may be |
| 29 | empty — absence is a setup bug, empty is fine) |
| 30 | |
| 31 | If any of the above are missing, report the gap and halt. Do NOT attempt to |
| 32 | bootstrap the missing artifact from inside this loop — that is the |
| 33 | orchestrator's job. |
| 34 | |
| 35 | ## Cycle (per iteration) |
| 36 | |
| 37 | Each pass through this cycle moves exactly one TaskMaster task from `pending` |
| 38 | to `done`. Do the 13 steps in order. Do not skip. |
| 39 | |
| 40 | > **Task-start SHA** — at the very beginning of each iteration (before step 2), |
| 41 | > capture the current git HEAD: |
| 42 | > |
| 43 | > ```bash |
| 44 | > task_start_sha=$(git rev-parse HEAD) |
| 45 | > ``` |
| 46 | > |
| 47 | > Record `$task_start_sha` in the execute-log row for this iteration. It is the |
| 48 | > oracle of truth for every reachability sweep in step 9b below: "what modules |
| 49 | > did THIS task add?" is `diff $task_start_sha..HEAD`. The oracle flow already |
| 50 | > issues per-task start commits; this surfaces the same value in the loop prose. |
| 51 | |
| 52 | 1. **Heartbeat check**: verify the execute-task heartbeat timer is running. |
| 53 | If missing, register one via `CronCreate("execute-task-heartbeat", "* * * * *", "echo heartbeat")`. |
| 54 | Abort the iteration if the timer cannot be created — a missing heartbeat |
| 55 | means a missing stuck-session detector, and that is load-bearing. |
| 56 | |
| 57 | 2. **Inbox reconciliation**: read `.atlas-ai/state/pipeline.json`, |
| 58 | `.taskmaster/tasks/tasks.json`, and the current TodoWrite list. |
| 59 | Diff them. If the three are stale by more than 5 tasks (i.e. TodoWrite |
| 60 | says 10 done but tasks.json says 3 done), report the diff and halt — do |
| 61 | not paper over bookkeeping drift by silently reconciling. |
| 62 | |
| 63 | 3. **Pick next task**: run backend op `next` with the plugin's project-root |
| 64 | pointer. Use exactly this invocation: |
| 65 | |
| 66 | ```bash |
| 67 | python3 script.py next-task |
| 68 | ``` |
| 69 | |
| 70 | Parse the JSON result. |
| 71 | - If no ready tasks and all tasks are `done`, run `.atlas-ai/ship-check.py`, |
| 72 | emit SHIP_CHECK_OK on success, exit the loop. |
| 73 | - If no ready tasks but pending tasks exist, the dependency graph is |
| 74 | deadlocked — report and halt. |
| 75 | |
| 76 | 4. **Load plan step**: search for the matching task ID in this priority |
| 77 | order, halting only after all three fail: |
| 78 | |
| 79 | 1. `docs/superpowers/plans/*.md` (the superpowers GENERATE default output) |
| 80 | 2. `.taskmaster/docs/plan.md` (the prd-taskmaster HANDOFF default output, |
| 81 | whose path is also recorded in |
| 82 | `pipeline.json:phase_evidence.HANDOFF.plan_file_path`) |
| 83 | 3. Any custom path declared in |
| 84 | `pipeline.json:phase_evidence.HANDOFF.plan_file_path` (in case |
| 85 | a future handoff variant writes elsewhere) |
| 86 | |
| 87 | If none of the three contains the matching task ID, the task was |
| 88 | invented downstream of the plan — mark the task `blocked`, inbox the |
| 89 | parent orchestrator with `message_type="blocker"`, and continue to the |
| 90 | next iteration. |
| 91 | |
| 92 | (Codified 2026-06-04 — yesterday's ai-human-tasker run had its plan at |
| 93 | `.taskmaster/docs/plan.md` only, while this step previously read |
| 94 | `docs/superpowers/plans/*.md` exclusively. The controller silently |
| 95 | improvised; a cold-start successor would have hit the `blocked` path on |
| 96 | every task.) |
| 97 | |
| 98 | 5. **Generate CDD card**: convert the task's `subtasks` field into a |
| 99 | `testing_plan`. Each subtask becomes a verifiable check with a concrete |
| 100 | evidence |