build
Use when an approved plan exists and needs execution, or when a hotfix/one-sentence scope needs direct TDD implementation — dispatches subagents per task, validates, reports
What this skill does
# /build
Execute plan tasks via subagents, validate, report.
**Announce:** "Starting /build — executing plan with subagent dispatch."
## Prerequisites
- Plan approved by `/review` (Step 4), OR one-sentence scope / hotfix (no plan)
- Working in a linked worktree (not primary)
## With Plan
### 1. Load
Read `ai-workspace/plans/<name>.md`. Extract tasks into ordered batches:
- Tasks under the same step or marked parallel = one batch
- Tasks with dependencies on prior tasks = separate sequential batch
- Note file paths, test expectations, and acceptance criteria per task
### 2. Execute Batches
Batches run sequentially. Tasks within a batch dispatch in parallel via subagents.
**Agent selection per task:**
| Plan structure | Agent | Notes |
|---|---|---|
| Separate "write test" + "implement" tasks | `test-writer` (RED) then `implementer` (GREEN) | Sequential within the pair |
| Combined task ("implement X with tests") | `implementer` | Handles TDD internally |
| Docs-only task | `doc-writer` | |
**Parallel safety:** only dispatch tasks in parallel when they touch different files.
**Subagent prompt — provide each agent:**
```
You are implementing Task N: [task name]
## Task Description
[FULL TEXT from plan — paste it, don't make the subagent read the file]
## Context
[Where this fits, what earlier batches produced, architectural decisions]
## Working Directory
[Absolute path to worktree]
## Project Conventions
- TDD: write failing test first, make it pass, refactor
- Commit after task completes (conventional commits) AND ensure your work is on disk before reporting DONE — the inter-batch step commits a batch boundary, but your task-level commits make recovery from inter-batch failures cleaner
- TypeScript strict, ESM, Biome, Vitest, Pino logger, no barrel exports
- Self-review before reporting back
## Report: DONE | DONE_WITH_CONCERNS | BLOCKED | NEEDS_CONTEXT
```
**Handle responses:**
| Status | Action |
|---|---|
| DONE | Mark task complete |
| DONE_WITH_CONCERNS | Read concerns — if correctness/scope, address before continuing |
| NEEDS_CONTEXT | Provide missing context, re-dispatch |
| BLOCKED | Assess: more context? more capable model? break smaller? escalate to human? |
| Task touches protected file | Stop immediately — never dispatch |
Never retry BLOCKED without changing something.
**Inter-batch check** — after each batch, verify no regressions AND commit the batch's output before starting the next batch:
```bash
pnpm typecheck && pnpm test
git -C "$WORKTREE" add -A
git -C "$WORKTREE" commit -m "<type>(<scope>): batch N — <summary>"
```
Per-task commits inside a batch are best-effort; **batch-boundary commits are mandatory** (per `/task` invariant `REQUIRE batch.commit BEFORE batch.next`). A batch that finishes verify but doesn't commit can lose all its work if the next batch fails or the session ends. The wip-checkpoint Stop hook (ADR-008) captures dirty state at session end as a backstop, but inter-batch commits keep the recovery shape clean — per-batch granularity in branch history rather than a single dirty-state blob on the side ref.
### 3. Validate (Hard Gate)
After ALL batches complete:
```bash
pnpm validate
```
Read the output. Never claim success without evidence. If it fails:
1. Diagnose the failure
2. Fix (dispatch subagent or fix directly for small issues)
3. Re-run `pnpm validate`
4. Max 3 fix-validate cycles. If still failing, stop and report.
Step 6 (`/review`) CANNOT begin until validate passes.
### 4. Report
```
Build complete.
Tasks: <completed>/<total>
Validate: PASS
Next step: /review (Step 6)
```
Include any DONE_WITH_CONCERNS notes. Update `.branch-context.md` with decisions made during build.
## Without Plan (Hotfix / One-Sentence Scope)
Implement directly — no subagent orchestration for small scope.
1. **TDD**: write failing test (RED), implement fix (GREEN), refactor
2. **Minimal change**: fix the defect, nothing else (hotfixes)
3. **Root cause**: document in commit message body (hotfixes)
4. **Validate**: `pnpm validate` — same hard gate, same 3-attempt max
## Codex / Cursor Fallback
No subagent dispatch. Execute tasks sequentially in main session. Same validation gate applies.
## Integration
| Relation | Skill |
|---|---|
| Called by | `/task` (Step 5) |
| Depends on | `/blueprint` (Step 3) + `/review` plan approval (Step 4) |
| Followed by | `/review` build review (Step 6) |
Related in Productivity
gitea-workflow
IncludedOrchestrate agile development workflows for Gitea repositories using the tea CLI. Use when working with Gitea-hosted repos and asking to 'run the workflow', 'continue working', 'what's next', 'complete the task cycle', 'start my day', 'end the sprint', 'implement the next task', or wanting guided step-by-step development assistance. Keywords: workflow, orchestrate, agile, task cycle, sprint, daily, implement, review, PR, standup, retrospective, gitea, tea.
microsoft-graph-gateway
IncludedRoute Microsoft Graph work in this workspace. Use when users want to read or write Outlook mail, calendar events, contacts, OneDrive or SharePoint files, Teams, Planner, To Do, users, groups, directory data, or arbitrary Microsoft Graph endpoints from VS Code. Prefer WorkIQ for common read scenarios. Use Microsoft Graph for write actions and gap-read scenarios that need exact Graph properties, filters, permissions, or endpoints.
copilotkit
IncludedUse when building with CopilotKit — setup, development, integrations, debugging, upgrading, or contributing. Routes to the appropriate specialized skill based on the task.
wordly-wisdom
IncludedProvides calibrated decision analysis using Charlie Munger-style multiple mental models, inversion, incentive mapping, circle-of-competence checks, misjudgment audits, second-order effects, and forecast updates. Use when the user asks for an oracle take, a hard call, a decision memo, a premortem, an outside view, a red-team, a sanity-check, what am I missing, think this through, or wants a strategy, hire, investment, plan, product, partnership, or major life choice analysed. Avoid for simple factual lookups or time-sensitive legal, medical, or market questions without fresh evidence.
swain-session
IncludedSession management and project status dashboard. Owns the full session lifecycle (start/work/close/resume), focus lane, bookmarks, worktree detection, and tab naming. Also serves as the project status dashboard — shows active epics, progress, actionable next steps, blocked items, tasks, GitHub issues, and recommendations. Worktree creation is deferred to swain-do task dispatch (SPEC-195). Triggers on: 'session', 'status', 'what's next', 'dashboard', 'overview', 'where are we', 'what should I work on', 'show me priorities', 'bookmark', 'focus on', 'session info'.
gandi
IncludedComprehensive Gandi domain registrar integration for domain and DNS management. Register and manage domains, create/update/delete DNS records (A, AAAA, CNAME, MX, TXT, SRV, and more), configure email forwarding and aliases, check SSL certificate status, create DNS snapshots for safe rollback, bulk update zone files, and monitor domain expiration. Supports multi-domain management, zone file import/export, and automated DNS backups. Includes both read-only and destructive operations with safety controls.