| name | execute-task |
| description | Execute 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 the TaskMaster next -> in-progress -> done lifecycle with CDD GREEN / RED / BLUE verification and the plugin's triple-verification rule. Autonomous by design — no user prompts inside the loop. |
| user-invocable | true |
| allowed-tools | ["Read","Write","Edit","Bash","Skill","Agent","ToolSearch","mcp__atlas-engine","mcp__plugin_prd_go","mcp__plugin_prd-taskmaster_go","mcp__plugin_atlas-go_go"] |
execute-task
The execution loop. Three sources converge:
- Plan (HOW) —
docs/superpowers/plans/*.md produced by GENERATE
- TaskMaster (WHAT) —
.taskmaster/tasks/tasks.json with
dependencies and complexity scores
- CDD (PROOF) — acceptance cards per task, evidence-gated
execute-task is the single skill that runs the full build from "tasks are
ready" to SHIP_CHECK_OK. It is autonomous — no AskUserQuestion inside the
loop. Any gap that would require user input is surfaced through the recon
escalation ladder (step 11) or the inbox (steps 4 and 8), never via a modal
prompt.
Entry
This skill is invoked either:
- Directly by the user once HANDOFF has completed and a task-execution
mode (A/B/C) has been dispatched, or
- By the
prd-taskmaster orchestrator when current_phase is EXECUTE.
On entry, confirm that:
.atlas-ai/state/pipeline.json exists and records phase: EXECUTE
.taskmaster/tasks/tasks.json exists with at least one ready task
.atlas-ai/customizations/system-prompt-template.md is present (may be
empty — absence is a setup bug, empty is fine)
If any of the above are missing, report the gap and halt. Do NOT attempt to
bootstrap the missing artifact from inside this loop — that is the
orchestrator's job.
Cycle (per iteration)
Each pass through this cycle moves exactly one TaskMaster task from pending
to done. Do the 13 steps in order. Do not skip.
Task-start SHA — at the very beginning of each iteration (before step 2),
capture the current git HEAD:
task_start_sha=$(git rev-parse HEAD)
Record $task_start_sha in the execute-log row for this iteration. It is the
oracle of truth for every reachability sweep in step 9b below: "what modules
did THIS task add?" is diff $task_start_sha..HEAD. The oracle flow already
issues per-task start commits; this surfaces the same value in the loop prose.
-
Heartbeat check: verify the execute-task heartbeat timer is running.
If missing, register one via CronCreate("execute-task-heartbeat", "* * * * *", "echo heartbeat").
Abort the iteration if the timer cannot be created — a missing heartbeat
means a missing stuck-session detector, and that is load-bearing.
-
Inbox reconciliation: read .atlas-ai/state/pipeline.json,
.taskmaster/tasks/tasks.json, and the current TodoWrite list.
Diff them. If the three are stale by more than 5 tasks (i.e. TodoWrite
says 10 done but tasks.json says 3 done), report the diff and halt — do
not paper over bookkeeping drift by silently reconciling.
-
Pick next task: run backend op next with the plugin's project-root
pointer. Use exactly this invocation:
python3 script.py next-task
Parse the JSON result.
- If no ready tasks and all tasks are
done, run .atlas-ai/ship-check.py,
emit SHIP_CHECK_OK on success, exit the loop.
- If no ready tasks but pending tasks exist, the dependency graph is
deadlocked — report and halt.
-
Load plan step: search for the matching task ID in this priority
order, halting only after all three fail:
docs/superpowers/plans/*.md (the superpowers GENERATE default output)
.taskmaster/docs/plan.md (the prd-taskmaster HANDOFF default output,
whose path is also recorded in
pipeline.json:phase_evidence.HANDOFF.plan_file_path)
- Any custom path declared in
pipeline.json:phase_evidence.HANDOFF.plan_file_path (in case
a future handoff variant writes elsewhere)
If none of the three contains the matching task ID, the task was
invented downstream of the plan — mark the task blocked, inbox the
parent orchestrator with message_type="blocker", and continue to the
next iteration.
(Codified 2026-06-04 — yesterday's ai-human-tasker run had its plan at
.taskmaster/docs/plan.md only, while this step previously read
docs/superpowers/plans/*.md exclusively. The controller silently
improvised; a cold-start successor would have hit the blocked path on
every task.)
-
Generate CDD card: convert the task's subtasks field into a
testing_plan. Each subtask becomes a verifiable check with a concrete
evidence path (file, command output, or test name). Write the card to
. A task without subtasks is treated as a
single RED card.
Termination
The termination sequence is strict — three steps, in order, no shortcuts:
- Run
.atlas-ai/ship-check.py. If it does NOT exit 0, halt. Do NOT
emit any completion signal. Investigate the gate failure, fix, retry.
- MANDATORY: invoke
Skill(skill: "sync") to refresh the memory
bank (session-context/CLAUDE-*.md, MEMORY.md, capability inventory).
This MUST happen BEFORE the SHIP_CHECK_OK token is printed.
Orchestrators tail-watch the token; if the memory bank is stale when
they react, successor sessions inherit a wrong picture of the world.
(Codified 2026-06-04 — yesterday's ai-human-tasker run shipped 15.6k
LOC while session-context/CLAUDE-activeContext.md still said
"Scaffold complete. No application code yet".)
- Print
SHIP_CHECK_OK to stdout. This is the ONLY place in your
output where the token may appear — emit it nowhere else, to avoid
false-positive matches by log-watchers.
The ship-check script is deterministic. Its gates are documented at the
top of ${CLAUDE_PLUGIN_ROOT}/skel/ship-check.py (copied to .atlas-ai/ship-check.py at setup):
- Gate 1:
pipeline.json current_phase == "EXECUTE"
- Gate 2: every
master.tasks[].status == "done"
- Gate 3: every task has a CDD card (
task-<id>.json or combined variant)
- Gate 4: plan file exists at
.taskmaster/docs/plan.md OR docs/superpowers/plans/*.md
- Gate 5 (HARD): no non-zero
Exit status N line in any evidence file
Gate 5 is the convergent must-do from the 2026-06-04 audit — a "PASS"
label on a non-zero-exit test is structurally impossible after this
script runs. There is no override path for Gate 5; it is the unfakable
oracle.
Do not emit SHIP_CHECK_OK on a mere "DONE" keyword in a subagent reply.
Do not emit on "all tasks marked done" without the explicit ship-check.
Do not emit before /sync has been called.
Red flags
These are the most common pressure points where the loop silently degrades
from "verified" to "performative". If you catch yourself thinking any of
them, stop and repair the gap.
- "Close enough, mark it done" -> NO. Evidence OR nothing.
- "Let me skip the doubt step this time" -> NO. Triple verification is non-negotiable.
- "I'll retry with same model+prompt" (BLOCKED) -> NO. Escalate.
- "The task says done, don't check evidence files" -> NO. Task status must reflect evidence.
Observability
Every iteration appends a structured row to
.atlas-ai/state/execute-log.jsonl. Field types are strict — text
narrative in a typed field is a logging bug, not compliance. The schema:
iteration (integer, or "FINAL" for the terminal marker)
timestamp (ISO 8601 string)
task_id (string)
complexity (integer or human label)
tier (string: "fast" | "standard" | "capable")
subagent_status (string: "DONE" | "DONE_WITH_CONCERNS" | "NEEDS_CONTEXT" | "BLOCKED")
retry_count (integer)
triple_verify (string: "PASS" / "FAIL" plus free-text rationale)
stepback_triggered (boolean, REQUIRED — true iff /stepback was
invoked this iteration). Putting narrative-text in this field is a
violation; use stepback_narrative instead.
stepback_narrative (string, nullable — explanation when
stepback_triggered: true; null otherwise)
ladder_rung (string, nullable — which rung was reached if escalated)
gamify (string — atlas-gamify one-line score)
The stepback fields were split (2026-06-04) after a FINAL iteration entry
wrote a paragraph of narrative into the boolean stepback field and was
treated as compliance with the stepback_mandatory rule. Boolean trigger
- nullable narrative is the correct schema.
This log is the dogfood artifact — debrief tools consume it, the
orchestrator greps it, and future runs read it for retrospective analysis.
Composition
- Orchestrator handoff: this skill is invoked post-HANDOFF. It does
not call
/handoff — that direction is one-way.
- Plan editing: if the plan is unsound, the ladder escalates to
pivot, which inboxes the plan author. This skill does not mutate the
plan in place.
- Ship-check:
.atlas-ai/ship-check.py is the terminal gate. This
skill calls it; it does not reimplement the checks.
Non-exits
This skill uses no explicit process termination. A halt condition reports
the reason in the structured log and returns control to the caller (the
user or the orchestrator). Never kill the shell — the caller owns the
session lifecycle.