بنقرة واحدة
build
Executes an implementation plan — writes code and tests, runs quality review, and ships a pull request.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Executes an implementation plan — writes code and tests, runs quality review, and ships a pull request.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Turns high-level brainstorming and ideas into well-structured, actionable implementation plans.
Reviews an externally-authored implementation plan for quality, VGV conventions, and scope. Plans created by /plan are already reviewed during creation.
Applies a minimal, targeted fix for emergency bugs — enforces review and testing without brainstorm or planning phases.
Runs quality review agents on demand — reviews code against VGV standards for architecture, tests, and simplicity, then writes one consolidated, numbered report.
Explores requirements and approaches through collaborative dialogue before planning implementation.
Stage, commit, push, and open a pull request following project conventions and the Conventional Commits spec. Accepts optional skip-checks argument to bypass validation when called from /build.
| name | build |
| user-invocable | true |
| description | Executes an implementation plan — writes code and tests, runs quality review, and ships a pull request. |
| when_to_use | Use when user says "build this", "implement the plan", "start coding", "execute the plan", or "ship it". |
| effort | high |
| argument-hint | plan file path |
| allowed-tools | Bash(rm -rf docs/reviews/) |
| compatibility | Designed for Claude Code (or similar products with agent support) |
Take a plan from docs/plan/ and turn it into shipped code: implement features, write tests, and validate quality.
Copy this checklist and track your progress:
Build Progress:
- [ ] Phase 0: Load plan and confirm scope (or resume a phased build)
- [ ] Phase 1: Read context for the current implementation phase
- [ ] Phase 2: Loop implementation phases (implement → validate → commit or hand off → checkpoint → clear)
- [ ] Phase 3: Run review agents (5 in parallel), consolidate into one report
- [ ] Phase 4: Drive to green, cleanup, and ship
<plan_path>$ARGUMENTS</plan_path>
ls docs/plan/
| Plan path | Plans in docs/plan/ | Action |
|---|---|---|
| Provided | — | Read the file. If missing, suggest running /plan |
| Empty | One | Read it, announce "Found plan: [title]", proceed |
| Empty | Multiple | AskUserQuestion: list each with summary, ask which to use |
| Empty | None | Tell user to run /plan first |
Do not proceed without a plan.
After loading the plan: parse title, type, the success-criteria block, tasks, file paths, and the ## Implementation Phases section if present.
Commit autonomy: decide once how this build commits, and carry the choice through the whole run. Honor a saved preference if one exists (Claude memory or the user's personal settings); otherwise use AskUserQuestion:
Offer to save the choice to Claude memory (a personal preference) so future builds skip this question. Save it as the user's own preference — never write it to the project's CLAUDE.md, since committing this is a per-developer choice, not a repo convention.
Resuming a phased build: if the plan has an ## Implementation Phases section with at least one phase already marked **Status:** Done, this is a resumed build. Announce "Resuming at Phase N: [name]" — the first phase whose status is not Done — and go straight to Phase 1 for that phase. Skip the scope-confirmation question below.
Otherwise, summarize scope to the user, then use AskUserQuestion to confirm:
Do not proceed until the user selects "Start building."
Do not run codebase-review-agent here. The plan was already informed by codebase context from /brainstorm and /plan.
Instead, use the plan itself as your guide:
## Implementation Phases section, read every file listed in the plan's tasks. Reading only the current phase's files keeps context focused so each phase fits in one window.Determine the unit of work:
## Implementation Phases section → build one phase at a time with the phase loop below. Each phase carries the fields defined in the implementation phases block — Status, Scope, Files touched, Acceptance criteria, and Validation — and is sized to fit a single context window, so /build executes one phase per window.Pick the current phase — the first whose **Status:** is not Done (a plan with no phases has one implicit phase: the whole plan). Run these steps for it:
Write code following VGV conventions, limited to this phase's Scope and Files touched. Build layers in dependency order (Data → Domain → Presentation). Use the project's state management tool, naming patterns, linter, and formatter. Respect layer boundaries — presentation never imports data directly.
Tests are non-negotiable. Write them alongside each implementation unit:
Every new state management unit, repository, UI component, and data model must have a test file.
Run the phase's Validation steps, then follow the validation and fix procedure. Everything must pass before you record the phase.
Set this phase's **Status:** to Done in the plan file — this marker lets a build resume the right phase after a context clear (the plan is a local artifact, so it survives /clear).
Then handle the phase's changes per the commit autonomy chosen in Phase 0:
Auto-commit message format:
<type>: <phase name>
<one-line summary of what the phase delivered>
<type> matches the plan's type (feat, fix, refactor, …). One commit per phase keeps the branch history clean and each phase independently reviewable. A single-phase plan produces one implementation commit here.
Brief progress update to the user: phase completed, phases remaining.
<NEXT_SKILL> = build, <DOC_PATH> = this plan's path, and <NEXT_ACTION> = "the next phase". Then stop.**Status:** markers record which phases remain./build on this plan again to continue with the next phase (it resumes from the **Status:** markers).Once the final phase is committed, follow the surgical-diff gate before moving to review: diff the whole branch against its merge-base, remove untraceable churn, delete only self-created orphans, and collect a "Noticed (not changed):" note for pre-existing dead code. Commit any cleanup it produces. Running it here keeps the review phase focused on the diff that belongs, not churn that would be reverted anyway.
Once the final phase is committed and the surgical-diff gate has run, review the whole branch. Run 5 review agents in parallel — they review the full branch diff, so this runs once after the last phase, not per phase.
Run pwd and let <PWD> be the result — subagents may change directories, making relative paths unreliable.
Each agent prompt must include the review agent instructions with <RAW_DIR> set to <PWD>/docs/reviews/raw and <name> set to the agent's report name below (a bare stem — the agent writes <RAW_DIR>/<name>.md). Substitute <PWD> with the absolute path.
The 5 agents and their report names (<name>):
| Agent | Report name |
|---|---|
| @vgv-review-agent | vgv-review |
| @architecture-review-agent | architecture-review |
| @test-quality-review-agent | test-quality-review |
| @code-simplicity-review-agent | code-simplicity-review |
| @pr-readiness-review-agent | pr-readiness-review |
If an agent fails, note it, continue with the rest, and record the failure in the report header.
Follow the review consolidation procedure: deduplicate the agents' structured findings, order them deterministically, assign stable FINDING-NN ids, and write one consolidated file to <PWD>/docs/reviews/review.md using the report template. Print the aligned chat summary (same ids, order, and titles as the file). Then act: auto-fix minor issues, fix Critical findings by id, present Important findings to the user, and note any still-deferred findings in the PR description.
The plan's success-criteria block is the ship gate. Parse it, then handle these cases before looping:
| Case | Action |
|---|---|
Block present with a VERIFICATION COMMAND | Gate set = the non-manual verify: commands; authoritative command = the VERIFICATION COMMAND. |
Block present, VERIFICATION COMMAND missing but non-manual verify: lines exist | Synthesize the authoritative command by joining those verify: commands with &&. |
Only verify: manual criteria, no runnable command | Skip the loop; go straight to the manual-criteria checklist. Never treat an empty runnable set as green. |
No success-criteria block (plan predates it) | Fall back to the detected project suite (formatter, linter, test runner) as the gate, and warn the user the plan has no machine-checkable criteria. Never treat an absent block as green. |
Then follow the drive to green procedure with that gate set and authoritative command. It loops until every gate is green by real output, delegates to a matching installed verification skill when one exists, runs the authoritative command as the final check, and escalates only on un-runnable or self-contradictory criteria. Do not proceed to cleanup until the authoritative gate is green and any manual criteria are confirmed.
Remove the review reports — their findings have already been addressed or recorded:
rm -rf docs/reviews/
Handle the outstanding changes — the drive-to-green loop, the surgical-diff gate, and the Phase 3 review fixes — per the commit autonomy chosen in Phase 0:
<type>: address review findings
<one-line summary of the fixes>
<type> matches the plan's type (feat, fix, refactor, etc.). Either way, review findings
are fixed in place during Phase 3 and the report is deleted at Cleanup, so any commit does not
cite FINDING-NN ids (there would be no report left to map them to).
Whatever commits this build produced are local. Pushing and opening a PR is outward-facing, so gate it on the user's preference — separately from the commit-autonomy choice:
/create-pr.To push, call /create-pr skip-checks — it pushes and opens the PR. Validation already ran above. The PR body uses the PR template.
Use AskUserQuestion to present options:
docs/reviews/review.md) and per-agent raw reports (docs/reviews/raw/) are deleted after Phase 4. If the build is interrupted, stale reports may remain — delete docs/reviews/ manually before the next run.