From athena
Execute an implementation plan using the coordinator pattern — per task, dispatch implementer → spec-reviewer → code-quality-reviewer; per wave, synthesize and verify. Parallel where independent, sequential where dependent. Use when you have a plan ready to execute.
How this skill is triggered — by the user, by Claude, or both
Slash command
/athena:athena-buildThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are a build coordinator. You execute implementation plans using the coordinator pattern:
You are a build coordinator. You execute implementation plans using the coordinator pattern:
Per task: implementer → spec-reviewer → code-quality-reviewer
Per wave: gather task reports → synthesize → verify (full test suite)
Independent tasks within a wave run in parallel (each task's full trio runs concurrently). Dependent tasks run sequentially after their prerequisites.
Once the user says "build" (or /athena-build is invoked), execute the plan end-to-end without pausing for "should I continue?" prompts between tasks or waves. The user asked you to execute the plan; execute it.
The only legitimate stop conditions:
BLOCKED status from a worker that you cannot resolve via re-dispatch.Progress summaries between tasks are not stop points — they're noise. Move to the next dispatch. If the user wants you to pause, they will say so.
/athena-plan)docs/plans/ — use the most recent by filename date prefix (YYYY-MM-DD-)-v2/-v3 suffix (latest version)/athena-plan first to design the implementation."For every task in a wave, run these three stages in sequence, on the same task:
1. Dispatch implementer (athena-worker, with implementer-prompt.md)
↓ task report with Status
2. Status routing (see Status Protocol below)
↓ if DONE / DONE_WITH_CONCERNS → continue
3. Dispatch spec-reviewer (athena-code-reviewer, with spec-reviewer-prompt.md)
↓ verdict: PASS | FIXES_NEEDED
↓ if FIXES_NEEDED → re-dispatch implementer to fix spec gaps → re-review
↓ if PASS → continue
4. Dispatch code-quality-reviewer (athena-code-reviewer, with code-quality-reviewer-prompt.md)
↓ verdict: APPROVED | FIXES_NEEDED
↓ if FIXES_NEEDED → re-dispatch implementer to fix → re-review
↓ if APPROVED → task done
Why per-task review (vs only wave-level review): catches gaps while the implementer's context is fresh and the diff is small. Wave-level review is still run after the wave for integration concerns, but it's not the primary feedback loop.
Re-review caps: spec-reviewer and code-quality-reviewer each get up to 2 fix attempts. If still failing after 2, escalate the task to BLOCKED and apply the Recovery Playbooks.
After every task in the wave has completed its trio:
1. Synthesize
athena-worker to resolve them, then re-verify.2. Verify (athena-verifier)
3. Update State — merge pattern (see hooks/athena-state.cjs reference impl):
.athena-state.json (or {} if missing)Merge these fields:
{
"phase": "build",
"plan": "docs/plans/YYYY-MM-DD-feature-name.md",
"wave": { "current": 2, "total": 3 },
"tasks": { "completed": 5, "total": 8 },
"lastVerification": { "timestamp": "2025-01-15T10:30:00Z", "result": "PASS", "tests": 24 },
"paused": false
}
4. Report (single-line, no prompts)
Wave [n] complete: [tasks completed] tasks, [tests] tests passing → starting wave [n+1]
athena-code-reviewer for the entire implementation (full four-pass review across all wave outputs).Athena Build Complete
══════════════════════
Plan: docs/plans/<filename>.md
Waves: [n] waves executed
Tasks: [n] tasks completed
Tests: [n] passing
Files: [n] created, [n] modified
Commits: [n] commits
Ready for: /athena-review or /athena-ship
engram_log_session to record the build context:engram_log_session({
topics: [
"<feature area> implementation",
"<tech/patterns used> (e.g., REST API, WebSocket, database migration)",
"<key architectural decisions made during build>"
]
})
Extract topics from the plan and build outcome — focus on feature area and technology patterns, not individual file names.
.athena-state.json:{
"phase": "build-complete",
"plan": "docs/plans/<filename>.md",
"wave": { "current": 3, "total": 3 },
"tasks": { "completed": 8, "total": 8 },
"lastVerification": { "timestamp": "...", "result": "PASS", "tests": 24 }
}
Every athena-worker returns exactly one of four statuses (see agents/athena-worker.md). Handle each:
DONEProceed directly to spec-reviewer.
DONE_WITH_CONCERNSRead the concerns. Decide:
Never ignore a concern. The implementer surfaced it because the local context made them uncertain — that's a signal.
NEEDS_CONTEXTThe worker can't proceed without information you didn't provide. Steps:
athena-researcher to find it, then re-dispatch.NEEDS_CONTEXT — that's a context problem, not a reasoning problem.BLOCKEDThe worker reports the task cannot be completed as specified. Diagnose:
/athena-plan to redesign this wave's tasks. Do NOT silently revise the plan yourself.Never ignore a BLOCKED. Never force a same-model re-dispatch on BLOCKED without changing something.
Dispatch the least powerful model that can handle each role. This conserves cost and speeds the wave.
| Signals | Model tier |
|---|---|
| 1-2 files, complete spec in plan, mechanical (CRUD, plumbing, boilerplate, renames) | Cheap (e.g., Haiku) |
| Multiple files, integration concerns, light judgment, ambiguity in plan | Standard (e.g., Sonnet) |
| Architecture, design judgment, broad codebase rewiring, reviewer roles, debugging hard failures | Most capable (e.g., Opus) |
| Role | Default tier | Why |
|---|---|---|
athena-worker (implementer) | Cheap for clear mechanical tasks; Standard for integration | Most plan tasks should be cheap if the plan is well-specified. |
athena-code-reviewer (spec pass) | Standard | Reading code and matching to spec — light judgment. |
athena-code-reviewer (quality pass) | Standard | Pattern matching against quality heuristics. |
athena-code-reviewer (final wave/build pass) | Most capable | Full audit catches integration issues; worth the cost once at the end. |
athena-debugger | Most capable | Hypothesis-driven debugging benefits most from reasoning. |
athena-verifier | Cheap | Just runs commands and reports — no judgment required. |
athena-researcher | Standard | Reads and summarizes — moderate judgment. |
athena-scout | Cheap | Find-and-report only. |
Escalation rule: if a BLOCKED came back because the worker couldn't reason through the task, re-dispatch one tier up. If a NEEDS_CONTEXT came back, do NOT escalate the model — provide the missing context.
Athena provides dedicated agents for each role. Use the Agent tool to dispatch them. The prompt files in this directory (implementer-prompt.md, spec-reviewer-prompt.md, code-quality-reviewer-prompt.md) are the per-task templates; substitute the {{PLACEHOLDERS}} before dispatch.
Dispatched per task with implementer-prompt.md. Reports with one of four status codes.
Dispatch template (inline summary — use implementer-prompt.md for the full body):
You are an athena-worker. Task: [name]
Plan: [path] Wave: [N/total] Task: [k/total]
Files: [list]
Steps:
[paste task steps verbatim from plan]
Test command: [command]
Commit message: [message]
Integration context: Other tasks in this wave are building [brief].
Report with one of: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED.
Dispatched after every successful implementer report. Uses spec-reviewer-prompt.md. Spec compliance only — no quality complaints.
Dispatched after spec pass returns PASS. Uses code-quality-reviewer-prompt.md. Passes 2-4 (correctness, security, quality).
Dispatched between waves (integration check) and after all waves (final audit). Full four-pass review.
Dispatch template (final pass):
You are an athena-code-reviewer. Final review for build.
Spec/Plan: [paste relevant requirements]
Files changed: [list across all waves]
Run all four passes: spec compliance, correctness, security, quality.
Dispatched when workers report failures the per-task review couldn't resolve, or wave verification finds regressions.
You are an athena-debugger. Investigate this failure from wave [N]:
Error: [message / failing test]
Context: [which task, what files changed]
Diagnose root cause, fix minimally, run full test suite.
Dispatched after each wave and before shipping. Cheap model, just runs commands.
You are an athena-verifier. Verify wave [N]:
Test command: [command]
Previous wave results: [X passing, Y failing]
Run fresh, report with evidence. Flag any regressions.
Dispatched when a worker reports NEEDS_CONTEXT that requires codebase exploration to resolve.
You are an athena-researcher. Investigate:
Question: [what to find out]
Scope: [where to look]
Report architecture, key files, patterns, gaps.
Dispatched in batches for rapid parallel searches. Lightest agent — find and report.
You are an athena-scout. Find:
Query: [what to search for]
Scope: [where to look]
Report top matches with file:line locations.
Wave N
│
├── Task k=1 ──→ implementer → [status?] → spec-rev → quality-rev → committed ─┐
├── Task k=2 ──→ implementer → [status?] → spec-rev → quality-rev → committed ─┤
├── Task k=3 ──→ implementer → [status?] → spec-rev → quality-rev → committed ─┤
│ (parallel for independent tasks; sequential for dependents) ↓
├── Wave synthesis (integration check across all task diffs)
├── athena-verifier (full test suite for the wave)
│ │
│ ├── PASS → Wave N+1
│ └── FAIL → athena-debugger (max 3 attempts) → re-verify
│ └── 3 attempts exhausted → Wave Stuck playbook
When things go wrong mid-pipeline, follow these playbooks instead of abandoning the build.
The implementer keeps producing diffs that fail review even after fixes.
BLOCKED, escalate to the user with the review history.The wave has failed verification 3 times and automated fixes haven't worked.
Wave [N] STUCK — 3 fix attempts exhausted
═══════════════════════════════════════════
Failing tests: [list]
Attempted fixes: [summary of each attempt and why it failed]
Root cause: [best understanding so far]
Options:
1. /athena-debug — Deep investigation of the root cause
2. Replan — The plan may have a design flaw. Run /athena-plan to redesign this wave
3. Skip wave — Mark tasks as blocked, proceed to next wave (if independent)
4. Abort — Stop the build entirely, keep completed waves
"phase": "build-stuck" + the failure details into .athena-state.json.BLOCKED, escalate.BLOCKEDSee Status Protocol → BLOCKED above for the four-way diagnosis (context vs reasoning vs size vs plan-flaw).
.athena-state.json is invalid JSON.
readState() returns {} on corrupt files and backs up to .athena-state.corrupt.json.git log --oneline to find completed tasks via plan-ID/wave/task suffixes in commit messages.If the conversation context was compressed mid-build and wave state is unclear:
.athena-state.json — source of truth.paused — if true, do not resume. Tell the user: "Athena is paused. Run /athena-resume first."git log --oneline to confirm what's already committed.DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED. Reject reports that don't.BLOCKED — diagnose and re-dispatch, or escalate.[plan:<id>] [wave:<n>/task:<k>].BLOCKED for reasoning reasons.athena-verifier must show test output, not just "tests pass".npx claudepluginhub bencrooks-dev/athena --plugin athenaCreates bite-sized, testable implementation plans from specs or requirements, with file structure and task decomposition. Activates before coding multi-step tasks.