Autopilot SPARC build. 5-stage pipeline: Spec → Pseudocode → Architecture → Refinement (TDD per task) → Completion. Senior escalation tier, strategy flag, dependency-aware task graph, phase checkpoint commits, telemetry.
Orchestrates .autopilot/spec.md through a 5-stage SPARC pipeline:
Specification → Pseudocode → Architecture → Refinement → Completion
/build — default (balanced strategy)
/build --strategy conservative — extra verification, security scan, slower
/build --strategy aggressive — skip redundant checks, fastest path
/build with swarm — parallel task dispatch (independent tasks only)
Parse the --strategy flag from the invocation arguments. Write to .autopilot/strategy.
If no flag: default to balanced.
Spec must exist — read .autopilot/spec.md. If missing, stop:
No spec found. Run /plan first to write .autopilot/spec.md.
Check for in-progress build — read .autopilot/progress.json if it exists.
BUILDING or PAUSED, show current task list and ask:
Found an in-progress build (task N of M — STATUS).
Resume from task N, or start fresh?
COMPLETE, show summary and stop:
Build already complete. Run /verify to check, or /plan for a new spec.
progress.json, this is a new build — proceed.Compaction recovery — if any task shows IN_PROGRESS in progress.json at start:
TaskList to check if any corresponding subagents are still running.IN_PROGRESS but has no running subagent: reset to PENDING, re-dispatch.Write .autopilot/strategy with the parsed strategy value.
Create progress.json:
{
"project": "{spec title slug}",
"status": "BUILDING",
"strategy": "balanced",
"branch": "current git branch",
"tasks": [
{ "id": 1, "description": "Task 1 name from spec", "status": "PENDING", "depends_on": [] },
{ "id": 2, "description": "Task 2 name from spec", "status": "PENDING", "depends_on": [1] }
],
"tests": { "total": 0, "passing": 0, "failing": 0 },
"updated_at": "ISO-8601"
}
Parse depends_on from spec task annotations:
- [ ] **Task 2** [depends:1] — integration tests
If no annotation, depends_on: [].
Write .autopilot/mode = build.
Write .autopilot/build.log with: [timestamp] BUILD_START: N tasks, strategy={strategy}.
Create .autopilot/telemetry.jsonl (empty) if it doesn't exist.
Register tasks in Claude Code task manager — call TaskCreate for every task immediately.
Immediately after all TaskCreate calls, write .autopilot/task-ids.json with the returned IDs:
{
"1": "{id returned by TaskCreate for task 1}",
"2": "{id returned by TaskCreate for task 2}",
"...": "..."
}
This file is the only source of truth for task panel IDs that survives compaction. All TaskUpdate calls must read from this file, not from in-memory state.
Run this phase once before the task loop, only if the docs don't already exist.
.autopilot/pseudocode.md exists)subagent_type: pseudocode-writer