Skip to content
Development
Skill

/build

Execute all plans in a phase. Spawns agents to build in parallel, commits atomically.

From plugin
plan-build-run
1847 skills18 agents70 commands

Claude Code

$ npx -y skills add SienkLogic/plan-build-run --skill build --agent claude-code

SKILL.md

build.SKILL.md
name: build
description: "Execute all plans in a phase. Spawns agents to build in parallel, commits atomically."
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Task, AskUserQuestion, Skill
argument-hint: "<phase-number> [--gaps-only] [--team] [--model <model>] [--auto]"

**STOP — DO NOT READ THIS FILE. You are already reading it. This prompt was injected into your context by Claude Code's plugin system. Using the Read tool on this SKILL.md file wastes ~7,600 tokens. Begin executing Step 1 immediately.**

/pbr:execute-phase — Phase Execution

**References:** `@references/questioning.md`, `@references/ui-brand.md`

You are the orchestrator for `/pbr:execute-phase`. This skill executes all plans in a phase by spawning executor agents. Plans are grouped by wave and executed in order — independent plans run in parallel, dependent plans wait. Your job is to stay lean, delegate ALL building work to Task() subagents, and keep the user's main context window clean.

Context Budget

Reference: `skills/shared/context-budget.md` for the universal orchestrator rules. Reference: `skills/shared/agent-type-resolution.md` for agent type fallback when spawning Task() subagents.

Reference: `skills/shared/agent-context-enrichment.md` for enriching executor spawn prompts with project context. Reference: `references/deviation-rules.md` for the deviation taxonomy (Rules 1-4) used by executors to classify and handle unexpected issues. Reference: `references/node-repair.md` for the node repair taxonomy (RETRY, DECOMPOSE, PRUNE, ESCALATE) used by executors to handle failed tasks.

Additionally for this skill:

  • **Minimize** reading executor output — read only SUMMARY.md frontmatter, not full content. Exception: if `context_window_tokens` in `.planning/config.json` is >= 500000, reading full SUMMARY.md bodies is permitted when semantic content is needed for inline decisions.
  • **Delegate** all building work to executor subagents — the orchestrator routes, it doesn't build
  • **Lazy-load steps**: Instead of reading ahead, fetch the next step's instructions on demand:

`pbr-tools skill-section build "step-6"` → returns that step's content as JSON. Use this when context budget is DEGRADING.

Step 0 — Immediate Output

**Before ANY tool calls**, display this banner:

╔══════════════════════════════════════════════════════════════╗
║  PLAN-BUILD-RUN ► BUILDING PHASE {N}                         ║
╚══════════════════════════════════════════════════════════════╝

Where `{N}` is the phase number from `$ARGUMENTS`. Then proceed to Step 1.

Multi-Session Sync

Before any phase-modifying operations (spawning executors, writing SUMMARY.md, updating STATE.md/ROADMAP.md), acquire a claim:

acquireClaim(phaseDir, sessionId)

If the claim fails (another session owns this phase), display: "Another session owns this phase. Use `/pbr:progress` to see active claims."

On completion or error (including all exit paths), release the claim:

releaseClaim(phaseDir, sessionId)

Prerequisites

  • `.planning/config.json` exists
  • Phase has been planned: `.planning/phases/{NN}-{slug}/` contains PLAN.md files
  • Prior phase dependencies are completed (check SUMMARY.md files)

---

Argument Parsing

Parse `$ARGUMENTS` according to `skills/shared/phase-argument-parsing.md`.

| Argument | Meaning | |----------|---------| | `3` | Build phase 3 | | `3 --gaps-only` | Build only gap-closure plans in phase 3 | | `3 --team` | Use Agent Teams for complex inter-agent coordination | | `3 --model opus` | Use opus for all executor spawns in phase 3 (overrides config and adaptive selection) | | `3 --auto` | Build phase 3 with auto mode — suppress confirmation gates, auto-advance on success | | (no number) | Use current phase from STATE.md | | `3 --preview` | Preview what build would do for phase 3 without executing | | `3 --cross-check` | Before spawning executors for phase 3, check current plan files_modified against prior-phase provides for conflicts |

---

--preview mode

If `--preview` is present in `$ARGUMENTS`:

1. Extract the phase slug from `$ARGUMENTS` (use the phase number to look up the slug, or pass the number directly — the CLI accepts partial slug matches). 2. Run:

   pbr-tools build-preview {phase-slug}

Capture the JSON output. 3. Render the following preview document (do NOT proceed to Step 2):

   ╔══════════════════════════════════════════════════════════════╗
   ║  DRY RUN — /pbr:execute-phase {N} --preview                          ║
   ║  No executor agents will be spawned                          ║
   ╚══════════════════════════════════════════════════════════════╝

   PHASE: {phase}

   ## Plans
   {for each plan: - {id} (wave {wave}, {task_count} tasks)}

   ## Wave Structure
   {for each wave: Wave {wave}: {plan IDs} [parallel | sequential]}

   ## Files That Would Be Modified
   {for each file in files_affected: - {file}}
   (Total: {count} files)

   ## Estimated Agent Spawns
   {agent_count} executor task(s)

   ## Critical Path
   {critical_path joined with " → "}

   ## Dependency Chain
   {for each entry in dependency_chain: - {id} (wave {wave}) depends on: {depends_on or "none"}}

4. **STOP** — do not proceed to Step 2.

---

Orchestration Flow

Execute these steps in order.

---

Step 1: Parse and Validate (inline)

Reference: `skills/shared/config-loading.md` for the tooling shortcut and config field reference.

1. Parse `$ARGUMENTS` for phase number and flags

  • If `--auto` is present in `$ARGUMENTS`: set `auto_mode = true`. Log: "Auto mode enabled — suppressing confirmation gates"

2. **CRITICAL — Init first.** Run the init CLI call as the FIRST action after argument parsing:

   node plugins/pbr/scripts/pbr-tools.js init execute-phase {N}

Store the JSON result as `blob`. All downstream steps MUST reference `blob` fields instead of re-reading files. Key fields: `blob.phase.dir`, `blob.phase.status`, `blob

Read more
@sienklogic
Ships withplan-build-run

Plan it. Build it. Run it. A Claude Code plugin for structured development with context-engineered agents.

1847 skills18 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
18
Star history of SienkLogic/plan-build-run on GitHub, a chart by star-history.com

Other skills on plan-build-run.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc11d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about build.

Which coding agents can use build?
build installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.