| name | execute |
| description | Run the full autonomous execution loop for the active project. After all gates are closed, this single command executes tasks, ships commits, triggers reviews, runs QA, syncs branches, and closes the project — with zero human intervention. The orchestration layer that ties all other skills together. |
execute — Autonomous Execution Loop
You are the Orchestrator running the full delivery pipeline. After all planning documents are CLOSED, this skill loops through every task in the project until completion — invoking the correct persona at each step.
This is the command you run when planning is done and you want hands-off execution.
Autonomy Rules
This skill runs WITHOUT pausing. Specifically:
- Do NOT ask "proceed?" or "continue?" between tasks. Just execute.
- Do NOT wait for permission to invoke sub-skills (/task-next, /ship-it, /wave-review, /qa-run, /sync-branches, /project-close). Invoke them directly.
- When invoking
/task-next, bypass its "present plan and wait for confirmation" step — go straight to implementation.
- When invoking
/ship-it, execute the full pipeline without user confirmation.
- When invoking
/wave-review, execute and act on results automatically (fix RED issues, defer YELLOW).
- When invoking
/qa-run, execute at the appropriate tier without asking which tier.
- When invoking
/sync-branches, proceed through the full promotion without asking "promote these N commits?"
- The ONLY reason to stop is an escalation trigger (see Escalation Protocol below).
Pre-authorized actions during /execute:
- Git commits on the feature branch
- Git pushes to origin
- Branch promotion via /sync-branches (feat → staging → main)
- File creation/modification for implementation
- Tracker and report updates
- Context file generation/deletion
Preconditions (all must be true — STOP if any fail)
- An active project exists in
docs/program-plan.csv with status: executing.
- That project's
tasks.md has status: CLOSED.
- That project's
qa-plan.md has status: CLOSED (Strict/Balanced) OR spec.md is CLOSED (Rapid).
- The tracker has at least one task with
status: planned.
- Current git branch matches the project's feature branch (from program-plan.csv).
If preconditions fail, report what's missing and suggest the correct next step (e.g., "Run /project-plan first" or "Switch to branch feat/X").
Auto-fix: If program-plan.csv shows status: planned but all gates are closed (tasks.md + qa-plan.md both CLOSED), auto-transition to status: executing instead of stopping.
The Loop
┌─────────────────────────────────────────────────────────┐
│ AUTONOMOUS LOOP │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────────┐ │
│ │/task-next │───▶│ implement │───▶│ /ship-it │ │
│ └──────────┘ └──────────┘ └──────┬───────┘ │
│ ▲ │ │
│ │ ▼ │
│ │ ┌──────────────┐ │
│ │ │ cadence check │ │
│ │ └──────┬───────┘ │
│ │ │ │
│ │ ┌────────────────────────┼────────┐ │
│ │ │ │ │ │
│ │ ▼ ▼ ▼ │
│ │ ┌───────────┐ ┌──────────┐ ┌─────┐ │
│ │ │/wave-review│ │/qa-run │ │/sync│ │
│ │ └───────────┘ └──────────┘ └─────┘ │
│ │ │ │ │ │
│ │ └────────────────────────┼────────┘ │
│ │ │ │
│ │ ▼ │
│ │ ┌──────────────┐ │
│ │ │ more tasks? │ │
│ │ └──────┬───────┘ │
│ │ yes │ no │
│ └──────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────┐ │
│ │/project-close│ │
│ └─────────────┘ │
└─────────────────────────────────────────────────────────┘
Execution Protocol
For each iteration:
1. Pick next task
- Read
tracker.csv → find first task with status: planned whose dependencies are all done.
- If no tasks remain → go to Project Completion.
- If all remaining tasks are
blocked → report blockers and STOP (escalate).
2. Execute task (Developer persona)
Invoke /task-next logic (it knows to skip confirmation in execute mode):
- Update tracker: set task status to
in_progress.
- Load task context card (narrow — only cited spec sections).
- Write tests first where applicable.
- Implement following context card guidance.
- Run tests locally.
Do NOT present a plan. Do NOT ask "proceed?". Read the context card, understand the task, execute it.
3. Ship (Developer persona)
- Run full
/ship-it pipeline: /doctor → format → lint → test → build → shadow QA → commit → push → tracker update.
- If
/ship-it fails:
- Fix and retry (up to failure budget of 3 different errors).
- If budget exceeded → STOP and escalate. Report what failed and why.
- On loops: force-regenerate
.claude-task-context.md before retrying.
4. Cadence checks (Orchestrator persona)
After each successful ship, evaluate:
| Condition | Action |
|---|
| Task touched schema/state-machine/API/auth (high-risk) | Run /wave-review |
| 5 consecutive low-risk tasks without review (ceiling) | Run /wave-review |
| Strict mode + 3 tasks since last review | Run /wave-review |
| Phase midpoint (>50% of >6-task phase) | Run /qa-run e2e |
| Phase complete (all phase tasks done) | Run /wave-review → /qa-run full → /sync-branches |
| 5+ commits since last sync (non-phase-boundary) | Run /sync-branches |
5. Handle review/QA results
- Wave review GREEN → continue to next task.
- Wave review YELLOW → log suggestions in decisions.md, continue.
- Wave review RED → fix the issues, re-run wave-review. If still RED after 2 attempts → escalate.
- QA GREEN → continue.
- QA RED → fix failures, re-run QA. If still RED after 2 attempts → escalate.
- Sync failed → analyze CI failure, fix on feature branch, re-sync. If still failing → escalate.
6. Phase transition
When all tasks in a phase are done:
/wave-review (mandatory at phase boundary)
/qa-run full (mandatory — includes Playwright E2E if UI or API routes changed)
/sync-branches (promote to staging/main, watch CI/CD to green)
- Report phase completion and proceed to next phase.
Important: Do NOT skip phase transitions just because tasks were "low risk". The cadence exists to catch integration issues that unit tests miss. E2E tests run against the running app — they prove the feature works holistically, not just that individual functions return correct values.
7. Project completion
When ALL tasks across ALL phases are done:
- Final validation gate (mandatory — no shortcuts):
a. New feature first: Start mock mode, navigate to the changed feature, verify it works visually (loading states, interactions, no console errors, UX feels right). This is the #1 priority — validate what you just built.
b. Feature-specific E2E: Run Playwright specs that cover the new feature. If none exist, write a minimal one or manually verify critical paths.
c. Full regression:
pnpm lint && pnpm test && pnpm build + full Playwright suite. Prove nothing else broke.
d. Zero tolerance: If ANY test fails or ANY console error appears — fix it. Do not ship broken code. No exceptions.
e. If E2E or visual fails → fix on feature branch, re-run until clean.
- Sync to shared branches: Run
/sync-branches (feat → staging → main), watch CI/CD to green on both.
- Run
/project-close (final QA report, coverage audit, retro, update program-plan.csv).
- Report final results.
- Suggest next project from the queue.
"Delivered" means:
- All tasks implemented + tests passing
- E2E/Playwright specs pass (not just unit tests)
- Feature branch merged to staging AND main
- CI/CD green on both shared branches
- qa-report.md updated with evidence
- program-plan.csv marked complete
A project is NOT delivered just because all task cards say "done". The verification layer (E2E, visual, CI/CD) is what separates "implemented" from "delivered".
Progress Reporting
After every 3 tasks, print a brief status update:
--- Progress: <project> [<mode>] ---
Phase <N>: <done>/<total> tasks
Overall: <done>/<total> (<percent>%)
Last 3: <TASK-ID>, <TASK-ID>, <TASK-ID>
Health: <first-pass rate>% first-pass
Next: <TASK-ID> — <title>
---
Escalation Protocol
The loop STOPS (requires human) when:
- Failure budget exceeded — 3 different errors on same task.
- Wave review RED twice — systemic quality issue.
- QA RED twice — tests failing that can't be fixed.
- Sync/CI failure — shared branch broken.
- All remaining tasks blocked — unresolvable dependency.
- Stable Layer amendment needed — spec is wrong.
- Watchdog: 3 tasks in a row required self-correction (systemic issue).
On escalation:
## ESCALATED — Human input needed
Project: <name>
Task: <ID> (or "systemic")
Reason: <specific reason>
Context: <what was happening>
Suggested resolution: <what the human should decide>
The execution loop is paused. Resume with /execute after resolving.
Resuming after escalation
When the user resolves the issue and says "continue" or re-invokes /execute:
- Re-read
tracker.csv to see current state.
- Force-regenerate
.claude-task-context.md.
- Resume the loop from the next
planned task.
What NOT to do
- Do NOT ask "proceed?" between tasks. This is autonomous.
- Do NOT skip /doctor, shadow QA, or any validation step.
- Do NOT push to main/staging directly (only via /sync-branches).
- Do NOT continue past escalation triggers. STOP means STOP.
- Do NOT run forever without progress reporting (every 3 tasks).
- Do NOT modify CLOSED specs without amendment protocol.
- Do NOT run entropy checks mid-phase (only at boundaries).
- Do NOT skip the cadence checks. They prevent drift.