vs-build-it
Use when the user says build-it, implement this plan, take it from here, or wants autonomous plan-to-code execution.
- License 许可
- MIT
- 所属仓库
- vltansky/vs
- 最近更新
- 2026-11-06
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- vs-build-it
- description
- Use when the user says build-it, implement this plan, take it from here, or wants autonomous plan-to-code execution.
02 资源文件 41
- 参考文档agents/openai.yaml140 B
- 参考文档references/handoff.md3.6 KB
- 许可证test/baselines/LICENSE.ponytail1.0 KB
- 参考文档test/baselines/ponytail-full.md6.5 KB
- 参考文档test/baselines/ponytail-full.source.json266 B
- 脚本test/before-after.static.eval.ts2.0 KB
- 脚本test/build-it-risk-order.static.eval.ts1.4 KB
- 脚本test/build-it.eval.ts13.5 KB
- 参考文档test/fixtures/minimum-solution/native-controls/package.json101 B
- 其他test/fixtures/minimum-solution/native-controls/src/PreferencesForm.jsx456 B
- 参考文档test/fixtures/minimum-solution/native-date/package.json97 B
- 其他test/fixtures/minimum-solution/native-date/src/ProfileForm.jsx169 B
- 参考文档test/fixtures/minimum-solution/reuse-helper/package.json144 B
- 脚本test/fixtures/minimum-solution/reuse-helper/src/id.js94 B
- 脚本test/fixtures/minimum-solution/reuse-helper/src/orders.js82 B
- 脚本test/fixtures/minimum-solution/reuse-helper/src/orders.test.js366 B
- 参考文档test/fixtures/minimum-solution/url-search/package.json142 B
- 脚本test/fixtures/minimum-solution/url-search/src/filters.js79 B
- 脚本test/fixtures/minimum-solution/url-search/src/filters.test.js322 B
- 参考文档test/fixtures/real-world-minimum/native-dialog/package.json99 B
- 其他test/fixtures/real-world-minimum/native-dialog/src/RemoveFilter.jsx154 B
- 参考文档test/fixtures/real-world-minimum/private-handoff/package.json147 B
- 脚本test/fixtures/real-world-minimum/private-handoff/src/handoff.js217 B
- 脚本test/fixtures/real-world-minimum/private-handoff/src/handoff.test.js567 B
- 参考文档test/fixtures/real-world-minimum/reuse-queue/package.json143 B
- 脚本test/fixtures/real-world-minimum/reuse-queue/src/queue.js365 B
- 脚本test/fixtures/real-world-minimum/reuse-queue/src/reminders.js181 B
- 脚本test/fixtures/real-world-minimum/reuse-queue/src/reminders.test.js534 B
- 参考文档test/fixtures/ts-project-with-bug/package.json262 B
- 脚本test/fixtures/ts-project-with-bug/src/index.ts32 B
- 脚本test/fixtures/ts-project-with-bug/src/slugify.test.ts289 B
- 脚本test/fixtures/ts-project-with-bug/src/slugify.ts198 B
- 参考文档test/fixtures/ts-project-with-bug/tsconfig.json227 B
- 其他test/fixtures/ts-project/.gitkeep—
- 参考文档test/fixtures/ts-project/package.json262 B
- 脚本test/fixtures/ts-project/src/index.ts32 B
- 参考文档test/fixtures/ts-project/tsconfig.json227 B
- 脚本test/minimum-solution.eval.ts12.5 KB
- 脚本test/real-world-minimum.eval.ts6.0 KB
- 脚本test/workflow-safeguards.eval.ts5.7 KB
- 脚本test/workflow-safeguards.static.eval.ts1.4 KB
03 SKILL.md 正文
Build It
Work within the user's stated plan or requested outcome; stop for strategic blockers, product-intent changes, unrelated refactors, or explicit safety boundaries.
Build-it takes a plan (or generates one if needed) and runs seven phases within that scope:
- Roast — load and follow the pushback skill to stress-test the plan
- Fix — apply pushback findings to the plan; record durable decisions as ADRs before any code
- Execute — create branch and implement with TDD; escalate to debugging on evidence
- Review — review the integrated diff once, with depth proportional to risk
- QA — browser-test only changed user-visible browser behavior
- Cleanup — remove temporary artifacts and verify everything still passes
- Handoff — present results, suggest
/vs-ship-it
Resolve tactical implementation decisions locally; do not expand scope beyond what is directly required for the stated outcome.
Building Block Composition
Build-it is a workflow. It composes building blocks instead of inventing one-off behavior:
vs-pushbackstress-tests the plan in Phase 1.vs-ponytailchooses the first complete solution rung during planning, implementation, review, and cleanup.vs-decide-for-meowns the no-questions decision ladder for tactical uncertainty.vs-tddguides implementation;vs-debug-modeis loaded only after evidence shows that ordinary red/green feedback is insufficient.vs-roast-codeandvs-deslopclean and review risky or substantial diffs in Phase 4; small diffs stay in the parent.vs-qatests affected user-visible browser behavior in Phase 5.vs-verifyproduces the final evidence-backed completion status.vs-before-aftertranslates a functional diff into the concise behavioral comparison used in the handoff.vs-evalonly when the plan is a vs skill PathGrade contract; skip for product code.
This list is routing metadata, not a preload list. Read a sibling SKILL.md
only when its phase gate fires: pushback in Phase 1, TDD/debugging in Phase 3,
roast-code/deslop in Phase 4, QA in Phase 5, and verify/brief/HTMDX in Phase 7.
Do not load phase-heavy skills during Phase 0 merely because they appear above,
and pass disk-backed evidence paths instead of pasting their full contents into
worker briefs.
Communication
Build-it is autonomous, not silent. Follow
../vs-internal-shared/references/communication.md.
Visual progress checkpoint: inherit that communication contract. Pointer only; do not
restate the map.
For the final explanation and review artifact, also follow
../vs-internal-shared/references/explanation-surfaces.md.
Apply
../vs-internal-shared/references/bounded-collaboration.md
to the run. An approved Goal Contract supplies the bounded work contract; infer
missing fields for direct requests without printing a second contract. Treat
phase boundaries, repeated failures, scope or authority expansion, and an
unproven next delivery gate as evidence events. Continue safe in-scope work
without asking; checkpoint only when the next action changes.
Emit one line at each phase boundary so the user can see the run moving:
[3/7] The first working slice is committed; 4 of 6 steps are done and tests still pass.
Emit at phase start and phase end only — not per file edit or per tool call. Keep the detail out of chat; it belongs in the run report.
Write progress and handoffs in plain language. State what changed for the user
and what proves it before phase names, scores, or internal statuses. Use the
shared first-pass comprehension rules so the user never has to invoke
/vs-tldr just to understand a build update.
Progress emissions stay one line and skip sections. When a phase boundary
carries something the user must clear, format the message per
../vs-internal-shared/references/output-style.md:
state the blocker's cause first, then put every required step in Your action.
Non-trivial runs write one portable HTMDX report to
~/.vs/$PROJECT_ID/build-it/YYYY-MM-DD-<slug>.html via
/vs-show-me (../vs-show-me/SKILL.md), and the handoff links it. The
visual report follows the problem-first recipe in the shared explanation
contract: concrete problem, real before-and-after examples, one-sentence
proposal, a few rules, and the next review action. It is not an audit dump.
Write the complete machine audit to a Markdown sidecar beside it as
YYYY-MM-DD-<slug>-audit.md. The sidecar carries commits, decision log,
claim-to-proof evidence, guardrails, gaps, and diff metadata. Chat gets the
summary and visual report path, not the sidecar or a wall of Markdown.
Skip the report only for trivial runs — a single documentation or comment change with no observable behavior, no captured evidence, and no durable decision.
Codex Goal Integration
When the user explicitly requests a Codex goal and goal tools are available, use it as the run-level progress contract for build-it:
- Load
../vs-internal-shared/references/codex-goal.mdduring Phase 0. - Load
../vs-internal-shared/references/subagents.mdbefore delegating any work. - Ensure vague intent is shaped into a Codex-goal-ready objective before calling
create_goal. - Keep goal state as bookkeeping only; the run record still needs commits, guardrails, decision log, review findings, and the explicit next step.
Decision Principles
These apply the shared vs-decide-for-me contract to every question that would normally go to the user. A decision recorded in an ADR read during Phase 0 outranks all of them:
Load and follow ../vs-ponytail/SKILL.md in
composed mode during planning, implementation, review, and cleanup. Retain each
meaningful Ponytail decision in the run record; mention it in chat only when it
materially avoided or removed machinery.
- Outcome completeness — ship the smallest complete observable outcome. Do not implement every capability in a plan when a narrower vertical slice satisfies the stated goal; defer non-blocking depth explicitly.
- Pragmatic — if two options fix the same thing, pick the simpler one. 5 seconds choosing, not 5 minutes.
- DRY — duplicates existing functionality? Reject. Reuse what exists.
- Explicit over clever — 10-line obvious fix > 200-line abstraction.
- Bias toward action — move forward. Flag concerns in the decision log but don't block.
- Match the codebase — follow existing patterns, naming, and structure. Don't introduce new conventions.
Circuit Breaker
Build-it runs fully autonomous with one exception:
If the roast phase produces a NOT_READY verdict (score below 60) with unresolved high-severity issues, stop and present the findings to the user. The plan needs human judgment before execution — build-it is not the right tool for a fundamentally broken plan.
For READY or READY_WITH_RISKS verdicts: continue autonomously.
Score-Critical Guidance
These are the behaviors evals punish hardest; prioritize them during autonomous runs.
- Commit as you go. Every real implementation run should add at least one descriptive commit; multi-step work usually produces multiple commits. For a tiny single-bug TDD fix, one self-contained green commit is fine after the red failure is proven.
- Auto-generated plans choose concrete destination files. Name target files up front; for new utilities, prefer a dedicated module and export from a barrel secondarily.
- Use the Phase 7 handoff shell. Lead with the plain-language outcome, required user action, strongest evidence, material gaps, and an explicit next step. Put the full machine audit in its sidecar, not in the visual report.
- Make red/green evidence explicit. When you claim TDD, name the failing test command (red) and the passing re-run (green) in the handoff or decision log — do not rely on commit order alone.
- Make atomic commits visible. If commit quality matters to the work, list the commit hashes and messages in the audit sidecar. Mention the commit count in chat only when it helps the user choose the next action.
Phase 0: Setup
Step 0: Initialize Codex goal
Load and follow ../vs-internal-shared/references/codex-goal.md
when the user asks build-it to use a Codex goal.
Step 1: Read context
- Read CLAUDE.md for project-specific commands (test, build, lint).
- Read the plan file the user pointed to (or the most recent plan in conversation).
- Reconcile that plan with later accepted decisions in the current conversation. When a newer user decision conflicts with the plan, update the durable plan before any implementation or worker brief uses it. Do not leave a governing decision only in the conversation. If it changes a recorded repo-level decision, keep implementation blocked until Phase 2 records the superseding ADR.
- Resolve and read the applicable repository context docs before interpreting the
plan: root
CONTEXT-MAP.mdfirst when present, then the mapped or rootCONTEXT.mddescribed by../vs-internal-shared/references/context-docs.md. Existing glossary terms are binding vocabulary for the implementation. - Do not create or update
CONTEXT.mdduring build-it. If code exposes a terminology conflict, log it, keep the handoffUNPROVENwhere it matters, and route the unresolved term back through shape-it. - If the plan is a shape-it spec, read its Goal Contract and Execution Strategy first. The Goal Contract defines done; the Execution Strategy's workstreams, waves, write scopes, and effort assignments govern Step 3 and Phase 3 delegation. Do not re-derive an execution topology the spec already provides.
- Read every ADR the plan names, plus any ADR in the repo's decision directory that covers a surface this work touches. A recorded decision is binding: it outranks the decision principles below, and an implementation that contradicts one is a blocker to surface, not a tactical call to make. If the work requires changing a recorded decision, say so and supersede it per Phase 2 Step 5.
- Run
git statusandgit diffto understand the current state. - Note the project's test command, build command, and lint command from CLAUDE.md. If not found, search for them in package.json, Makefile, or equivalent. If still not found, note "unknown" — do not guess.
Step 1a: Auto-generate plan if missing
If no plan was provided, inspect the relevant code and produce a concise plan in the parent. Delegate planning only when the task is non-trivial and has a distinct exploration lane that benefits from fresh context. Use one planning subagent, give it exact paths and the expected plan shape, then verify its plan against the code before adopting it.
For an unplanned request whose primary outcome is architecture, refactoring,
module consolidation, or a new seam, first load and follow
../vs-architect/SKILL.md in composed mode over the
narrow affected area. Use a single strong candidate as evidence for the
auto-generated plan only when it matches the user's stated direction and does
not conflict with an ADR. If several viable candidates remain, an ADR must be
reopened, or the choice changes the product/system boundary, stop and route the
decision through /vs-shape-it instead of choosing tactically.
Skip architect when build-it received an approved shape-it spec or another
formed plan with architecture evidence. That artifact is the source of truth;
do not reopen it during execution. Do not run architect after implementation:
Phase 5 /vs-roast-code owns diff-scoped architecture review, and verification
owns proof of the implemented behavior.
Log whether the plan was produced inline or delegated and why.
This replaces the need for the user to run /vs-shape-it or write a plan manually.
The roast phase (Phase 1) still stress-tests whatever plan comes out, so a weak
auto-generated plan gets caught by the circuit breaker.
Step 1b: Validate guardrails
Dry-run each guardrail command to confirm it works before starting execution:
# Test each detected command — we only care if it runs without "not found" errors
[test command] 2>&1 | head -5
[typecheck command] --noEmit 2>&1 | head -5
[lint command] 2>&1 | head -5
If any command fails due to missing dependencies: install them now.
Common fixes: bun install, npm install, pip install -r requirements.txt.
If installation is blocked by sandbox network limits but a declared guardrail is failing only because dev-only ambient types are missing (for example bun-types), prefer the smallest local compatibility fix in a dedicated support location (types/, test-only file move, or equivalent) rather than leaving the guardrail unverified. Do not change product/runtime behavior just to satisfy the guardrail.
If such a support-only guardrail fix is needed, treat it as a dedicated prep step before the real implementation loop:
- commit it separately as a chore/support change before the failing test commit
- keep it out of the product diff summary and decision rationale for the actual feature/vs-bugfix
- in the final handoff, report it under support/guardrail prep, not as part of the product behavior change Do not proceed to Step 2 until all guardrail commands execute without "command not found" or "module not found" errors.
Step 1c: Capture the baseline before implementation
Determine whether the requested change has a meaningful user-visible output. Capture the baseline now; do not reconstruct the before state after editing. Store captures in a scoped temporary directory outside the repository so they survive through Phase 7 without becoming product changes. Record the artifact paths with the comparison metadata.
- UI behavior: capture a before image from an existing reachable preview, Storybook story, browser test, or other real render surface. Record the route, state, viewport, and fixture so the after image uses the same route, state, viewport, and fixture. Do not substitute a prose description for an image.
- Text output: run the exact CLI, formatter, report, generated text, or other representative surface and save its output. Record the command and input so the after capture uses the same command and representative input.
- No meaningful comparison: for internal refactors, tests, documentation,
or changes without observable output, record
No meaningful comparisonand do not manufacture a before-and-after section.
Use existing render/test infrastructure. When no surface is already reachable,
follow ../vs-internal-shared/references/preview.md
and start one — an agent-owned preview is an available capture mechanism, not a
forbidden dev server. Record its command, PID, and port; Phase 6 stops it.
If the baseline still cannot be captured — missing credentials, unavailable fixture, or a preview that fails to start — record the exact blocker; for UI work, do not downgrade to a text comparison.
Step 1d: Order delivery by risk and user dependency
Before extracting implementation steps, classify the work in this order:
- User or external dependency: access, credentials, ownership, authorization, or a strategic decision required to prove the outcome. Ask or request it before broad edits; do not spend a milestone building around an unresolved dependency.
- Plan-invalidating assumption: run the cheapest safe probe that can prove the current approach wrong or reorder it.
- Deployable vertical slice: identify the smallest end-to-end behavior that reaches the real integration boundary, produces observable evidence, and advances the requested outcome beyond the confirmed baseline. Do not relabel re-verification of existing working behavior as the new delivery.
- Deepening work: reliability, scale, abstractions, additional providers, dashboards, and optional capabilities follow only when required by the goal or after the first slice works.
Risk-first sequencing retires uncertainty; it is not permission to start with the largest defensive backend. Record the chosen vertical slice and deferred work in the decision log. If the smallest new value requires user access, surface that dependency instead of substituting easier lower-value work.
Before selecting any Ponytail rung below repository reuse, inventory sibling modules in the affected path and inspect their likely exports/helpers. A search only for the requested symbol is insufficient evidence that the repository has nothing reusable.
For every meaningful solution-size choice, record:
Ponytail decision:
- Chosen rung: <rung>
- Avoided: <dependency, file, abstraction, branch, or configuration>
- Complete because: <observable requirement or proof>
- Deferred: <unrequested capability, or none>
Step 2: Create branch
If not already on a feature branch, create one:
# Detect git user prefix from git config or CLAUDE.md conventions
GIT_USER=$(git config user.name 2>/dev/null | tr '[:upper:]' '[:lower:]' | tr ' ' '-')
Derive a branch name from the plan topic: {user-prefix}/{plan-topic}.
Use the branch prefix convention from CLAUDE.md if one exists.
git checkout -b <branch-name>
If already on a feature branch (not main/master/develop), stay on it.
Step 3: Extract plan steps
Break the plan into discrete implementation steps. Each step should be:
- A single logical change (one file or a few tightly coupled files)
- Independently committable
- Ordered by Step 1d; resolve code dependencies within the chosen vertical slice
List the steps and move on. Do not ask for confirmation.
Order steps using Step 1d before ordinary code dependencies. A foundation comes first only when it is the cheapest proof or is necessary for the smallest vertical slice. Prefer one end-to-end slice over separate contract-only, backend-only, and frontend-only milestones that delay observable behavior.
Step 1e: Require rollout compatibility proof
When the plan changes a contract between independently deployed producers and consumers — including a proto, API, queue payload, event, or persisted schema — add a mixed-version rollout matrix to the plan before roasting or implementing it. Cover every applicable direction and recovery boundary:
- old producer with new consumer;
- new producer with old consumer;
- in-flight work across the deploy, duplicate delivery or replay, a crash between claim/publish/persist boundaries, and lease expiry or takeover;
- malformed, mismatched, or downgraded messages failing closed, plus rollback.
Each row names the public seam and its deterministic test or written argument. The change cannot be called complete until every applicable matrix row is proven against the final implementation. An untestable row remains an explicit rollout gap and blocks a rollout-safety claim.
Phase 1: Roast the Plan
Load and follow the sibling skill at ../vs-pushback/SKILL.md. If the host
cannot resolve it, tell the user to type /vs-pushback and stop. Do not replace
the gated workflow with an inline adversarial review.
Auto-decision overrides for pushback
Vs-pushback is interactive by design. In build-it mode, every interactive point is auto-resolved:
- Step 0.5 (Idea Sharpening): Skip — build-it assumes the plan is already shaped.
- Step 1 (Initial Assessment): Run the assessment. Do not wait for user acknowledgment.
- Step 2 (Premise Challenge): Run it. Auto-decide: accept premises that are supported by evidence in the codebase or plan. Challenge premises that contradict what you found in pre-scan. For each challenged premise, apply decision principle #1 (outcome completeness) — pick the smallest interpretation that still delivers the observable outcome.
- Step 3 (Dimension Grilling): For each question pushback would ask the user:
- Apply the 6 decision principles to pick an answer.
- Log the question, your answer, and which principle drove it.
- Do not wait for user input. Do not present options.
- Step 4 (Outside Voice): Skip — the roast findings are sufficient for build-it. Subagent overhead is not worth it when the fix phase follows immediately.
- Step 5 (Report): Produce the report. Do not persist to disk — the findings feed directly into Phase 2.
Circuit breaker check
After the roast completes, check the verdict:
- NOT_READY (score < 60, unresolved high-severity): Stop. Present findings to the user. Explain what needs human judgment. Do not proceed to Phase 2.
- READY or READY_WITH_RISKS: Continue autonomously.
Phase 2: Fix the Plan
Take every finding from Phase 1 and apply it to the plan:
- High severity — must be addressed. Modify the plan to resolve each one.
- Medium severity — address if the fix is clear and under ~5 lines of plan change. Otherwise note it as a known risk and continue.
- Low severity — note in the decision log, do not modify the plan.
- Unresolved items — apply decision principles to pick a resolution. Log it.
After fixing, re-extract plan steps if the structure changed (new steps, removed steps, reordered dependencies).
Write the updated plan back to the plan file (or note the changes in the decision log if there is no plan file on disk).
Step 5: Record durable decisions before implementing them
The record precedes the implementation it governs, per Record repo-level decisions before implementation. This is the last point at which the plan is final and no code exists, so resolve the ADR question here rather than at the end of the run.
- The plan names an ADR (a shaped Goal Contract
ADR:line, or a record read in Phase 0): nothing to write. It is already binding; carry it into the worker briefs whose scope it constrains. - Build-it generated the plan itself (Step 1a) and that plan settles a
durable, repo-level decision — one expensive to reverse, that future readers
will ask "why did we do it this way" about: write the ADR now and commit it
before the first implementation commit. Follow the repo's ADR convention;
absent one, use
adr/at the repo root with a slug-only filename (lowercase, dash-separated, no numeric prefix) and run/vs-setup-adrto bootstrap scaffolding if none exists. Record context, decision, alternatives considered, and rationale. Commit it separately:docs: add ADR for [decision]. - Pushback overturned a recorded decision in Phase 1: do not edit the merged ADR. Write a new one that names the ADR it supersedes, and commit it first.
- Neither applies: note "no repo-level decision" in the decision log in one clause and move on. Tactical implementation choices are not ADR material.
Emit a short transition summary:
The plan is safe enough to build. I fixed [X] blocking issues and kept [Z] risks visible; implementation now has [N] steps.
Phase 3: Execute
Implement the fixed plan. Execute directly unless independent steps make delegation materially faster or safer. Follow the shared subagent breadth and depth budgets, including the checkpoint and stop-and-return rules.
Step 0: Load TDD; escalate to debugging only on evidence
Load sibling skill ../vs-tdd/SKILL.md when the host can resolve it. Workers
follow TDD discipline: reproduce or specify behavior with a failing test, then
implement the minimum green change.
Load ../vs-debug-mode/SKILL.md only after a reproduction or guardrail fails in
an unexplained way, two focused fix attempts fail, or runtime state cannot be
observed through existing tests and logs. Add temporary instrumentation only at
the boundary needed to distinguish the active hypotheses; do not instrument
every modified function preemptively. Mark any temporary code with
build-it-debug so Phase 6 can remove it.
Step 1: Build dependency graph
Group plan steps into layers based on dependencies:
Layer 0: [steps with no dependencies — can all run in parallel]
Layer 1: [steps that depend on Layer 0]
Layer 2: [steps that depend on Layer 1]
...
If all steps are independent (no shared files, no import dependencies between them), they are all Layer 0, but the selected shared effort budget still applies.
If the plan is small (3 or fewer steps) or all steps touch the same files: skip parallelism, execute sequentially on the current branch.
Step 2: Execute layers
For a layer with genuinely independent work, launch at most two subagents. Batch additional independent steps or execute them in the parent. Each child gets:
- The overall plan context (one-liner summary, not the full plan)
- Its specific step(s) to implement
- Codebase conventions from CLAUDE.md
- The guardrail commands detected in Phase 0
- These worker instructions:
Implement the assigned step using TDD:
1. Write a failing test that defines the expected behavior.
Match existing test patterns in the project. Run it — verify it fails.
(If no test infrastructure exists for this area, skip to step 2 and note it.)
2. Write the minimum implementation to make the test pass.
3. Run guardrails: [type check command], [test command], [lint command]
4. If guardrails fail: read the error. Check build-it-debug logs for context.
Fix and re-run. Max 2 retries. If still failing after retries, use the
debug skill's hypothesis approach: generate 3 hypotheses, investigate each.
5. Commit with a descriptive message (not "build-it step N").
Stage specific files only; avoid `git add .` or `git add -A`.
For a tiny single-bug TDD fix, after proving the red failure you may keep the
regression test uncommitted until the fix is ready, then make one self-contained
green commit that includes both the test and the minimal implementation.
[EASY TO MISS: "I ran the tests and they passed" without showing the
command output is not evidence. Include the actual exit code or output.]
6. Report: list files changed, tests written, guardrail results (pass/fail),
and any issues you could not resolve.
Parallel workers require disjoint write scopes. Before spawning, list each worker's owned paths (from the Execution Strategy when present); if two lanes intersect, run them sequentially or keep the shared files in the parent. A worker commits only inside its owned paths.
Brief each worker with curated context — objective, owned paths, evidence paths, guardrail commands, constraints, and expected return shape. Do not fork the full parent transcript for a scoped lane. Match reasoning effort (and model, when the host supports choosing one) to the lane: low for mechanical inventory, higher for ambiguous integration; take assignments from the Execution Strategy when present.
Every brief names a first milestone that retires a delivery risk or advances the smallest vertical slice before broad edits — for a fix lane, reproduce and report before editing. A worker that returns without evidence or changes has failed; re-scope the brief before re-spawning. After spawning, confirm each thread or subagent actually started; do not wait on an ID the host cannot resolve.
If delegation adds coordination cost, the host does not support subagents, or steps share files or dependencies, execute sequentially in the parent with the same guardrail gate after each step.
Layer transitions: Wait for all subagents in a layer to complete before starting the next layer. If a subagent in Layer N fails, assess whether Layer N+1 steps depend on it — if yes, execute those sequentially yourself with the fix. If no, continue the next layer in parallel.
Step 3: Integrate once
Do not spend child budget reviewing partial layers. Inspect the integrated diff and run the final review once in Phase 4, after dependency and merge issues are visible together.
Step 3b: Supersede a decision execution invalidated
Phase 2 Step 5 already recorded the decisions this run was planned around. This step covers only the case that could not run earlier: execution proved a recorded decision wrong or unworkable.
Never edit a merged ADR. Write a new ADR that names the one it supersedes,
records what execution revealed, and states the replacement decision. Commit it
separately (docs: supersede [decision] ADR), note it in the decision log, and
reference it in the Phase 7 handoff.
If execution merely surfaced a tactical implementation choice, log it and move on — ADRs are for repo-level decisions, not session notes.
Step 4: Final validation
After all layers complete, run the full validation suite:
- Type check
- Full test suite
- Build
Fix any integration issues introduced by combining parallel work.
Phase 4: Review
Measure the integrated diff. A small, low-risk diff (at most 5 changed files and 300 changed lines, with no auth, security, persistence, migration, concurrency, payment, or public-API change) stays in the parent: inspect every changed file, search for reuse, run deterministic checks, and review correctness, security, error handling, and unnecessary complexity.
For larger or high-risk diffs, load ../vs-roast-code/SKILL.md and follow its
bounded methodology within the remaining workflow child budget. Keep roast and deslop scoped to the branch diff. Phase 4 always follows
../vs-deslop/SKILL.md and runs node skills/vs-deslop/scripts/run-anti-slop.mjs
on in-scope named TS/JS files; do not skip that file pass. Do not report
CLEAN without that named-file runner.
Run one final Ponytail pass in every review path, including small diffs that stay in the parent. Compare the integrated diff with the recorded solution rung: check whether an existing helper, standard/native capability, or already installed dependency can replace new machinery, and whether a whole file, dependency, wrapper, mode, branch, abstraction, or configuration entry can be removed while preserving the complete outcome. Apply only evidenced deletions; do not create simplification work to fill the pass.
Auto-decision override for Pass 2
The skill normally waits for the user to pick which sins to fix. In build-it mode, auto-select option b) Critical + serious and apply immediately. Do not wait.
Test verification before applying fixes
Before applying review findings, stress the implementation with focused edge case tests. Use one fresh subagent only when the remaining child budget permits and independent context is valuable; otherwise do this in the parent. Provide:
"Write tests that try to break this implementation. Cover edge cases, boundary conditions, and assumptions the code makes. Run the tests. Report which pass and which fail."
If the subagent finds failing tests: fix each failure, re-run the full test suite, commit test + fix atomically.
Applying review fixes
Merge findings from all review sources and deduplicate. For each finding that claims a bug: write a failing test first to confirm it's real. If you can't write a failing test, note it in the decision log instead of applying a speculative fix.
Then for each validated finding:
- Apply the fix.
- Re-run guardrails (tsc, tests, lint). If the fix breaks something, revert it. Execution code takes priority over review polish.
- Commit review fixes separately:
refactor: [description of cleanup]
Phase 5: QA (conditional — affected browser behavior only)
Detect if this is a web app:
# Check for web indicators
HAS_WEB=false
[ -f "next.config.js" ] || [ -f "next.config.ts" ] || [ -f "next.config.mjs" ] && HAS_WEB=true
[ -f "vite.config.ts" ] || [ -f "vite.config.js" ] && HAS_WEB=true
[ -f "angular.json" ] && HAS_WEB=true
grep -q '"start"' package.json 2>/dev/null && grep -qE '"(react|vue|svelte|next|nuxt|angular)"' package.json 2>/dev/null && HAS_WEB=true
echo "HAS_WEB=$HAS_WEB"
If not a web app, or the diff changes only server, build, test, documentation, or internal library code with no user-visible browser behavior: skip Phase 5.
If the diff changes routes, rendered components, interaction handlers, browser
state, styles, accessibility behavior, or another user-visible browser contract,
load sibling skill ../vs-qa/SKILL.md when the host can resolve it.
If the QA skill resolves: read it and follow its methodology in diff-aware mode — only test pages affected by the branch diff, not the full app.
For a UI comparison captured in Phase 0, save the after image during QA using the recorded route, state, viewport, and fixture. A screenshot of a different state is validation evidence, but it is not a before-and-after comparison.
If not found: skip the QA methodology. When a before image was already captured,
use the same capture mechanism for the after image even when vs-qa is
unavailable; this completes the comparison but is not a substitute for browser
QA. Do not attempt exploratory browser testing without the QA skill.
Resolve a surface through
../vs-internal-shared/references/preview.md:
prefer a deployed preview, then an already-running local surface, then an
agent-owned ephemeral preview started from the project's own command. Starting
one is expected, not a last resort.
"No browser path" is not an acceptable QA outcome by itself. Mark QA as not run only with the exact missing prerequisite — a credential, an unavailable fixture, or a preview that failed to start — and carry that blocker into the Phase 7 verdict. Never ask the user to eyeball, click through, or screenshot the result in order to establish that the change works; that is this phase's job.
Auto-decision overrides for QA
- Tier: Standard (critical + high + medium).
- Clean working tree check: skip — build-it already committed everything.
- Fix loop: follow it. Auto-decide all triage. Commit each fix atomically. If a fix causes regression, revert and mark as deferred.
- WTF self-regulation: honor it. If WTF > 20%, stop fixing and log remaining issues for the handoff.
- Re-run guardrails after QA fixes (tsc, tests, lint). QA fixes must not break what the execution phase built.
Phase 6: Cleanup
Stop every process this run started. For each preview recorded in Phase 0 or
Phase 5, run its stop command and verify the port is free, per
../vs-internal-shared/references/preview.md.
Build-it leaves nothing running. If a process cannot be stopped, report the PID
and the kill command in the handoff.
If no temporary instrumentation or artifacts were added in Phase 3, skip to
Phase 7. Otherwise remove everything marked build-it-debug.
# Find all build-it-debug regions
grep -rn "build-it-debug" --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" --include="*.py" .
Remove every #region build-it-debug / #endregion build-it-debug block and the
code between them. Verify no functional code was accidentally wrapped in a debug region.
After removal:
- Run the full guardrail suite (tsc, tests, lint, build). The code must pass without the debug logs — they were observability only.
- If anything breaks after removing debug logs, something depended on a side effect of the logging (rare but possible). Investigate and fix.
- Commit:
chore: remove build-it debug instrumentation
Phase 7: Handoff
Load and run ../vs-verify/SKILL.md when available and include its
## Verification Result in the handoff. If unavailable, record the final
guardrail commands and results manually.
The handoff verdict inherits the verification status, but the first sentence
translates it into the user's outcome. Describe the work as complete only for
PASS or SKIPPED_TRIVIAL. For WARN, FAIL, or BLOCKED, state exactly
what was not proven in plain language before the literal status, and do not
describe the outcome as fixed or working. When the work fixes a reported bug,
completion additionally requires the original reproduction to pass — local
guardrails alone do not earn "fixed".
One further verdict applies independently of verification status: when the
Goal Contract's Evidence plan named a surface and no evidence from that surface
was captured, say in the first sentence that the result is not yet proven. Name
the surface and exact blocker before the optional UNPROVEN label, and do not
describe the outcome as working. Implemented and proven are different claims.
For text output captured in Phase 0, rerun the same command and representative
input after final validation and retain the exact after output. For UI output,
use the paired images captured before implementation and during QA. Pass the
comparison evidence to vs-before-after; if a required capture was blocked,
pass the blocker instead of inventing evidence.
Use the required shell in references/handoff.md. Its
chat response stays compact; the machine audit sidecar carries the full audit
ledger, decision log, commits, guardrails, and minimal diff stat. The visual
report explains the change with the problem-first recipe. If the user asked
build-it to also ship, load and
follow ../vs-ship-it/SKILL.md; if the host cannot resolve it, say to type
/vs-ship-it and stop — do not hand-roll a PR flow in its place. Load
../vs-before-after/SKILL.md only when the diff has a supported functional
change or meaningful before-and-after evidence.
This is a phase boundary: once the Build It handoff is sent, implementation is complete. Route requested shipping, CI watching, review fixes, and production verification through their owning workflow with the compact handoff above; do not keep an implementation transcript alive for sustained monitoring. A continuation in the same task is allowed only for one concrete authorized next step, not idle waiting or a new unscoped workstream.
Important Rules
- Avoid routine user questions during Phases 1-6. Exceptions are the circuit
breaker (
NOT_READYverdict in Phase 1) and user-provided access, approval, ownership, or strategic input required to prove the requested outcome. Surface those dependencies before broad implementation. - Log every decision. No silent auto-decisions. The decision log is how the user audits what happened while they were away. [EASY TO MISS: an empty decision log at handoff means decisions were made silently — go back and reconstruct them.]
- TDD by default. Every implementation step writes the failing test first. Skip only if no test infrastructure exists for that area — and note it in the log.
- Debug instrumentation is temporary. When added, remove it at Phase 6.
- Run known guardrails. If a project has no test/lint/build commands, note it and continue; if a guardrail exists, run it.
- Atomic commits. Prefer one commit per logical step.
- Recover non-destructively. When git state goes wrong (failed merge,
mis-staged files), prefer
git stash --include-untrackedand scopedgit restoreovergit reset --hardorgit clean— stashes are recoverable and destructive commands trip harness guards mid-recovery. - Respect foreign work. If the tree contains uncommitted changes you did not make (a parallel session, another agent), stage only your own paths and say so in the log; never sweep them with broad staging.
- Match the codebase. Build-it follows existing patterns, not its own preferences. If the codebase uses callbacks, don't switch to async/await. If it uses classes, don't switch to functions. Read before writing.
- Do not expand scope. Implement exactly what the plan says. If you notice something that should be done but isn't in the plan, log it in the handoff — do not implement it. [EASY TO MISS: "cleaning up" adjacent code or adding "helpful" extras IS scope expansion, even when it feels like good practice.]
Before the final handoff, apply
Phase Boundaries. Keep
Next below as the semantic route; report a session action only when required
by that contract.
Workflow
Direct: emit Next only. Composed: return to caller.
Prev: /vs-shape-it | /vs-pushback | /vs-rfc-research
Next: /vs-ship-it
Relevant: /vs-bugfix | /vs-decide-for-me
04 同仓库更多 Skills
vs-write
Use when asked to write, rewrite, edit, tighten, simplify, or polish prose for clarity, or to put text in STE, ASD-STE100, or controlled language. Produces plain, direct, accessible copy without losing substance or precision.
vs-fake-verify
暂无简介
vs-fake-verify
暂无简介
vs-verify
Use when asked to verify, prove it works, check completion, or before claiming done. Produces evidence-backed PASS/WARN/FAIL status.
vs-fake-verify
暂无简介
vs-verify
Use when asked to verify, prove it works, check completion, or before claiming done. Produces evidence-backed PASS/WARN/FAIL status.