From forgeplan
Run the full autonomous ForgePlan pipeline from build through certification.
How this skill is triggered — by the user, by Claude, or both
Slash command
/forgeplan:deep-buildThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run the complete ForgePlan pipeline autonomously: build all → design pass (frontend) → verify-runnable → review → integrate → sweep → (runtime verify, Sprint 8) → cross-model (tier-aware) → certified.
Run the complete ForgePlan pipeline autonomously: build all → design pass (frontend) → verify-runnable → review → integrate → sweep → (runtime verify, Sprint 8) → cross-model (tier-aware) → certified.
State mutation rule: Do not hand-edit .forgeplan/state.json in deep-build. Use
node "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" ... for operation state changes.
For node-level work, do not invoke Skill(forgeplan:build) or Skill(forgeplan:review).
Those are command skills with disable-model-invocation: true. Read the skill files and execute
their workflows inline instead:
${CLAUDE_PLUGIN_ROOT}/skills/build/SKILL.md${CLAUDE_PLUGIN_ROOT}/skills/review/SKILL.md.forgeplan/manifest.yaml exists with nodes definedpending or later (deep-build handles speccing pending nodes in Phase 2)active_node must be null)sweep_state must be null)Read .forgeplan/state.json and verify prerequisites
Set sweep_state with the deterministic helper:
node "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" set-sweep-state "{\"operation\":\"deep-building\",\"started_at\":\"[ISO timestamp]\",\"current_phase\":\"build-all\",\"pass_number\":1,\"current_model\":\"claude\",\"fixing_node\":null,\"consecutive_clean_passes\":0,\"max_passes\":10,\"needs_manual_attention\":[],\"failed_agents\":[],\"blocked_decisions\":[],\"findings\":{\"pending\":[],\"resolved\":[]},\"modified_files_by_pass\":{},\"agent_convergence\":{},\"integration_results\":{\"last_run\":null,\"passed\":false,\"failures\":[]}}"
Note: current_phase starts as "build-all", NOT "claude-sweep". This is critical — next-node.js allows normal recommendations during the "build-all" phase but blocks them during sweep phases.
This is a sequential loop using existing commands:
node "${CLAUDE_PLUGIN_ROOT}/scripts/next-node.js" to get the recommended node"recommendation":
file_scope, exactly as /forgeplan:build requires. Persist that list to nodes.[node-id].pre_build_files in state. Do not use Bash/Node ad hoc file enumeration here; active deep-build enforcement blocks non-whitelisted shell commands during build-all.Skill(forgeplan:builder) or treat forgeplan:builder as a public skill. builder is an internal agent only.forgeplan:reviewer or dispatch internal reviewer agents directly.active_node or node status before running the inline build or review workflows. Those workflows own the node-level state transitions."pending": execute the single-node autonomous spec workflow inline (read ${CLAUDE_PLUGIN_ROOT}/skills/spec/SKILL.md and follow its Autonomous Mode for the specific node). Do not use Skill(forgeplan:spec) — spec has disable-model-invocation: true. Generate a complete spec with filled-in acceptance criteria and test fields, verify the spec file exists and has non-empty test fields for each AC, then read ${CLAUDE_PLUGIN_ROOT}/skills/build/SKILL.md and execute the single-node build workflow inline."specced": verify the spec has non-empty acceptance criteria test fields (skeleton specs from discover have empty fields). If test fields are empty, re-run the single-node autonomous spec workflow inline to complete them. Then read ${CLAUDE_PLUGIN_ROOT}/skills/build/SKILL.md and execute the single-node build workflow inline."built": node was built but not yet reviewed. Read ${CLAUDE_PLUGIN_ROOT}/skills/review/SKILL.md and execute review inline.${CLAUDE_PLUGIN_ROOT}/skills/review/SKILL.md and execute review inline. Do not start the reviewer by hand.next-node.js surfaces built-but-unreviewed work and there are multiple eligible "built" nodes waiting, do not review them strictly one-by-one on MEDIUM/LARGE by default. Instead:
"built" nodes in dependency orderactive_node or mark multiple nodes as "reviewing" before dispatchcomplete-review state transitions in topological order, using:
"reviewed" for APPROVE"reviewed-with-findings" when advisory review completed but findings remain deferredSMALLmulti_agent_review.enabled is trueenforcement.mode is strictstate-transition.js complete-build as the terminal node-state transition for that build. Do not add a follow-up set-node-status "[node-id]" "built" after it succeeds.main.py, app.py, route registries, or top-level navigation registries). If a node needs that wiring, record it as an integration follow-up and continue. Cross-node/root wiring belongs to the owning root node or the integration phase, not the node builder."built" in state.json with a warning flag: set nodes.[id].bounce_exhausted: true and nodes.[id].unverified_acs to the list of acceptance criteria that were not verified as passing.sweep_state.findings.pending with all required fields: id: "B[N]" (sequential), source_model: "stop-hook", node: "[node-id]", category: "code-quality", severity: "HIGH", confidence: 95, description: "Unverified AC from bounce exhaustion: [AC text]", pass_found: 0. Note: confidence MUST be included (95 = high confidence these are real issues) or the sweep's <75 filter will silently drop them."complete": all nodes done, proceed to Phase 2b (design pass) then Phase 3 (verify-runnable)"phase_complete": all current-phase nodes done but future phases remain. Proceed to Phase 2b (design pass) then Phase 3 (verify-runnable). Phase Advancement after Phase 8 handles incrementing build_phase and looping back."stuck": auto-recover stuck nodes based on their current status, then re-run next-node.js. Do NOT invoke interactive /forgeplan:recover — deep-build must stay autonomous.
"building" → run:
node "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" set-node-status "[node-id]" "specced"
then read ${CLAUDE_PLUGIN_ROOT}/skills/build/SKILL.md and rebuild from scratch inline"reviewing" → run:
node "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" set-node-status "[node-id]" "built"
then read ${CLAUDE_PLUGIN_ROOT}/skills/review/SKILL.md and re-review inline"review-fixing" → run:
node "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" set-node-status "[node-id]" "built"
then read ${CLAUDE_PLUGIN_ROOT}/skills/review/SKILL.md and re-review after the fix attempt"revising" → if previous_status is set, run:
node "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" restore-previous-status "[node-id]"
otherwise run:
node "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" set-node-status "[node-id]" "reviewed"
then re-revise"sweeping" → if previous_status is set, run:
node "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" restore-previous-status "[node-id]"
otherwise run:
node "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" set-node-status "[node-id]" "reviewed"
"blocked" or "error": halt deep-build with error message, preserve sweep_state for recovery:
Deep build halted: [message from next-node.js]
Run /forgeplan:recover to resume or abort.
"rebuild_needed": for each listed node, read ${CLAUDE_PLUGIN_ROOT}/skills/build/SKILL.md and execute the single-node build workflow inline, then read ${CLAUDE_PLUGIN_ROOT}/skills/review/SKILL.md and execute the single-node review workflow inline (same build+review pattern as the recommendation branch — no unreviewed nodes in the autonomous pipeline), then re-run next-node.js"sweep_active": a sweep is still active from an interrupted run. Run:
node "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" clear-sweep-state
node "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" clear-active-node
then re-run next-node.js. This resets the stale sweep so the build loop can proceed."complete" or "phase_complete".All existing enforcement (PreToolUse, PostToolUse, Builder agent, Stop hook) applies exactly as in manual builds. The deep-build orchestrator just drives the loop.
Important: For each build and review, use fresh Agent subagents. Do not accumulate context across node builds.
Phase transition: After all nodes are built and reviewed:
node "${CLAUDE_PLUGIN_ROOT}/scripts/compile-wiki.js" to compile the knowledge base from specs + source. NOTE: This is the ONLY compile-wiki invocation on the deep-build path — sweep skips Phase 1 when invoked from deep-build (sweep.md line 26), so sweep's Phase 1 step 7 compile does NOT run here.sweep_state.current_phase from "build-all" to "design-pass" with:
node "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" set-sweep-phase "design-pass"
Skip this phase if: no frontend nodes exist in the manifest (all nodes have type other than frontend), OR complexity_tier is SMALL and config does not explicitly enable design pass. If skipping, run:
node "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" set-sweep-phase "verify-runnable"
and proceed directly to Phase 3.
sweep_state.current_phase should already be "design-pass" from the Phase 2 transition. Do not hand-edit state.json here..forgeplan/skills-registry.yaml. If missing or stale, run node "${CLAUDE_PLUGIN_ROOT}/scripts/skill-registry.js" refresh first.design-pass registry assignments. frontend-design is mandatory, but do not stop there — if the registry assigns additional design/frontend skills to design-pass, include them as READ NOW / REFERENCE inputs in the agent prompt instead of hardcoding only one skill.node "${CLAUDE_PLUGIN_ROOT}/scripts/compose-design-context.js"
Include that composed brief in the design-pass prompt. If it surfaces project design docs, registry-assigned design skills, or auto-selected inspiration profiles, treat those as required context and read the exact references it names. If it reports no explicit design context, note that explicitly and continue.type: "frontend" or nodes whose file_scope contains frontend files such as .tsx, .jsx, .vue, .svelte)agents/design-pass.md for the system promptdesign-pass registry skill metadata from .forgeplan/skills-registry.yamlcompose-design-context.jsfile_scope)node "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" start-sweep-fix "[node-id]" "[previous-status]"
before any Write/Edit to source files.node "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" restore-previous-status "[node-id]"
sweep_state.needs_manual_attention with reason "design quality — user review recommended."Frontend design pass complete. Here's what was built:
- [N] pages: [list page names from frontend nodes]
- Palette: [detected primary colors from the code]
- Layout: [detected layout pattern]
Would you like to adjust anything? (e.g., 'darker', 'more minimal',
'use green accent instead', 'add sidebar')
Or press enter to continue to verification.
node "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" set-sweep-phase "verify-runnable"
then proceed to Phase 3.Re-anchor: Re-read .forgeplan/manifest.yaml and .forgeplan/state.json from disk before proceeding. Long build sessions may have lost context through compaction — re-reading ensures you have the current state of all nodes, file_scopes, and shared models.
Before proceeding to integration, verify the project can actually run:
node "${CLAUDE_PLUGIN_ROOT}/scripts/verify-runnable.js"
If it returns status: "pass": run
node "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" set-sweep-phase "integrate"
and proceed to Phase 4 (integration check).
Do not reinitialize or recreate sweep_state here. Phase 3 is already inside the active deep-build operation; this is a phase transition only.
If it returns status: "warnings": treat this as pass-with-warnings. Record the warnings in the deep-build report and proceed to Phase 4.
If it returns status: "environment_error": attempt environment-focused remediation (missing .env, port conflicts, missing local setup), retry once, then either proceed with a warning or halt if the project still cannot be verified.
If it returns status: "fail": do not try to edit files directly from sweep-analysis mode. Route the failures into node-scoped fixes first:
steps from the verify-runnable.js JSON.
name, not step.node "${CLAUDE_PLUGIN_ROOT}/scripts/summarize-verify-runnable.js" --stdin
and pipe the JSON into it, or save the JSON to a temp file and pass the file path.frontend/**, typecheck:node*, test:node*, server:node* -> frontend-app-shellplacementops/modules/<name>/** -> <name>-moduleplacementops/core/**, alembic/**, main.py, requirements.txt, pyproject.toml, Pipfile, poetry.lock, Dockerfile, docker-compose.yml, alembic.ini, or generic install:python dependency failures -> core-infrastructuresweep_state.needs_manual_attention and continue with the mapped failures only.active_node at a time during remediation. Do not apply fixes for multiple node groups in parallel..forgeplan/state.json to capture the node's current status (typically reviewed or reviewed-with-findings)node "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" start-sweep-fix "[node-id]" "[previous-status]"
Write/Edit changes. If a rename/delete is genuinely unavoidable, treat it as a managed code change within the active node's scope and keep the sweep state active throughout; do not fall out to unmanaged shell mutation.node "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" restore-previous-status "[node-id]"
node "${CLAUDE_PLUGIN_ROOT}/scripts/verify-runnable.js"
set-sweep-phase "verify-runnable" between node-scoped fixes or before this rerun. The Phase 3 remediation loop is already in the verify-runnable stage; just rerun the gate.sweep_state for recovery.The verify-runnable gate must pass before proceeding to Phase 4. This catches fundamental project health issues (missing packages, syntax errors, broken configs) before investing time in integration checks and sweeps.
Re-anchor: Re-read .forgeplan/manifest.yaml and .forgeplan/state.json from disk.
Run:
node "${CLAUDE_PLUGIN_ROOT}/scripts/integrate-check.js"
Map result to sweep_state.integration_results:
passed = (verdict === "PASS" || verdict === "PASS_WITH_WARNINGS")
failures = interfaces.filter(i => i.status === "FAIL")
If verdict === "INCOMPLETE": log warning, treat as pass with warning (same as sweep Phase 5). Note: integrate-check.js exits non-zero for INCOMPLETE, so check the verdict in JSON output rather than relying on exit code alone.
If integration fails and failures.length > 0, add each failure as a finding in sweep_state.findings.pending and proceed to fix cycle.
If integration returns PASS_WITH_WARNINGS:
node "${CLAUDE_PLUGIN_ROOT}/scripts/summarize-integrate-check.js" --stdin
informational-one-way-dependency, treat them as non-blocking informational context and continueRe-anchor: Re-read .forgeplan/manifest.yaml and .forgeplan/state.json from disk. Also re-read all node specs from .forgeplan/specs/ — the review phase may have triggered revisions.
Before any sweep bootstrap reads, transition the operation into the sweep phase:
node "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" set-sweep-phase "claude-sweep"
Treat that transition as the source of truth. Do not inspect .forgeplan/state.json with ad hoc python -c, node -e, or shell snippets just to confirm the phase.
Before dispatching sweep agents, assemble deterministic sweep context with:
node "${CLAUDE_PLUGIN_ROOT}/scripts/prepare-sweep-context.js"
Use that helper output to read the exact sweep-agent prompt files and existing wiki/report artifacts. Do not search heuristically for sweep setup context or enumerate .forgeplan/wiki/nodes/ ad hoc when the helper already provides the exact paths.
If you need a timestamp for sweep artifacts during this phase, use:
node "${CLAUDE_PLUGIN_ROOT}/scripts/iso-now.js"
Do not call date, python -c, or node -e just to generate timestamps during active deep-build sweep orchestration.
Do not invoke Skill(forgeplan:sweep) or try to delegate this phase through the command skill. sweep has disable-model-invocation: true.
Read ${CLAUDE_PLUGIN_ROOT}/skills/sweep/SKILL.md and execute the sweep workflow inline:
sweep_state with load-sweep-findings.jsprepare-sweep-context.js instead of inspecting state with node -e / python -cThis phase should follow the sweep skill logic directly, not attempt Skill(forgeplan:sweep) first.
Do not start node-scoped fixes directly from claude-sweep. Phase 5 must finish the sweep-agent pass, write the sweep report, load findings into sweep_state.findings.pending, and transition to claude-fix before any start-sweep-fix call is valid.
After Claude sweep fixes, re-integrate (Phase 4 logic).
Re-anchor: Re-read .forgeplan/manifest.yaml for complexity_tier and node specs.
Update the phase before proceeding:
node "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" set-sweep-phase "runtime-verify"
Tier gate: Read complexity_tier (with config.yaml tier_override check):
node "${CLAUDE_PLUGIN_ROOT}/scripts/runtime-verify.js" --tier [TIER]
Check the result:
If status: "pass" or status: "skip": Log level reached and endpoints tested. If the result contains any LOW/advisory findings (e.g., "public endpoint — verify intentional", "no endpoint contracts"), include them in the deep-build report under "Runtime Advisories" so the user sees them in the final output. These are informational, not blocking. Proceed to Phase 7.
If status: "fail": Runtime verification found issues.
id: "R[N]" (sequential), source_model: "runtime-verify", pass_found: sweep_state.pass_numbersweep_state.needs_manual_attention as advisory (not actionable by fix agents). These appear in the report under "Runtime Advisories."file field AND severity is HIGH or MEDIUM: add to sweep_state.findings.pending for the normal fix cycle (fix agent can target the file)file field AND severity is HIGH or MEDIUM: add to sweep_state.needs_manual_attention instead (runtime findings without file anchors can't be auto-fixed). Include the endpoint details so the deep-build report surfaces them.pending (with file anchors): dispatch fix agents, re-run runtime-verify.js, repeat up to 3 timesneeds_manual_attention: log them in the deep-build report under "Runtime Issues Requiring Manual Review" with the endpoint details. Do NOT attempt automated fixes.If status: "environment_error": Log the error. Do NOT add as code findings. Attempt auto-fix:
This phase sits between sweep (Phase 5) and cross-model (Phase 7) because runtime issues should be fixed before spending cross-model tokens.
Re-anchor: Re-read .forgeplan/manifest.yaml and .forgeplan/state.json from disk. The sweep may have modified specs (Category A fixes) and code across multiple nodes.
Tier-aware execution: Before running cross-model verification, read complexity_tier from .forgeplan/manifest.yaml. Also check .forgeplan/config.yaml for complexity.tier_override — if set and non-empty, use the override instead:
consecutive_clean_passes to 2 and proceed directly to Phase 8.If cross-model is skipped (SMALL tier or unconfigured MEDIUM tier), note it in the final report.
Before running the bridge, enforce the tier/config requirement with:
node "${CLAUDE_PLUGIN_ROOT}/scripts/deep-build-cross-model-gate.js"
status: "ready": proceed normally.status: "skipped": this is acceptable only for SMALL tier or optional MEDIUM-tier skip.status: "degraded_allowed": the user has explicitly chosen to allow a LARGE-tier skip via review.allow_large_tier_skip: true in .forgeplan/config.yaml. Continue, but treat the result as degraded certification in Phase 8.status: "prompt_required": do not silently continue. Prompt the user:
LARGE-tier deep-build normally requires cross-model verification, but no alternate model is configured.
Choose one:
1. Run /forgeplan:configure now to set up Codex/Gemini/OpenAI cross-model review
2. Intentionally continue without cross-model as degraded certification
(set `review.allow_large_tier_skip: true` in .forgeplan/config.yaml, then resume)
3. Abort this deep-build for now
Preserve sweep_state and wait for the user's decision.This phase follows the exact same logic as sweep Phase 6 (Task 9). All status handling, phase transitions, and error paths apply identically. The deep-build orchestrator executes this inline rather than delegating to /forgeplan:sweep.
Set the phase with:
node "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" set-sweep-phase "cross-check"
Run cross-model bridge:
node "${CLAUDE_PLUGIN_ROOT}/scripts/cross-model-bridge.js" ".forgeplan/sweeps/sweep-[latest].md"
Check the result status field — handle ALL statuses exactly as sweep Phase 6:
If status: "skipped": This is only acceptable when the cross-model gate above reported SMALL-tier skip or optional MEDIUM-tier skip. Log warning ("no alternate model configured"), set consecutive_clean_passes to 2, proceed to Phase 8 (finalize). Note in report that cross-model was not performed.
If status: "error": Reset consecutive_clean_passes to 0. Do NOT increment pass_number. Track consecutive error count. On second consecutive error: set halted_from_phase to "cross-check", set current_phase to "halted", present error to user. Otherwise: retry immediately.
If status: "findings":
X prefix. Set pass_found on each./forgeplan:sweep Phase 6:
kind: "advisory-refactor" must not override explicit constraints or passing deterministic checkskind: "spec-conflict" goes to needs_manual_attention, not the automatic fix looppending, "project" → needs_manual_attentionconsecutive_clean_passes to 0sweep_state.pass_numbernode "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" set-sweep-phase "cross-fix"
node "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.js" set-sweep-phase "integrate"
If status: "clean":
consecutive_clean_passespass_numberconsecutive_clean_passes >= 2: proceed to Phase 8consecutive_clean_passes == 1: loop back to step 1If pass_number >= max_passes: set halted_from_phase to current_phase, set current_phase to "halted", report unresolved findings
Re-anchor: Final re-read of .forgeplan/manifest.yaml and .forgeplan/state.json from disk before generating the report.
Run final integration check
(Sprint 9, MEDIUM/LARGE only) Run node "${CLAUDE_PLUGIN_ROOT}/scripts/compile-wiki.js" to update the wiki with sweep findings. This is needed because sweep's Phase 7 compile-wiki is skipped when called from deep-build (sweep.md line 26). Without this step, the wiki would only reflect pre-sweep state.
Before writing the report, gather project/finalization state with:
node "${CLAUDE_PLUGIN_ROOT}/scripts/deep-build-finalize-context.js"
and also gather project status with:
node "${CLAUDE_PLUGIN_ROOT}/scripts/status-report.js"
and gather the deterministic verification/readiness contract with:
node "${CLAUDE_PLUGIN_ROOT}/scripts/deep-build-verification-contract.js"
Use ForgePlan artifacts as the source of truth:
.forgeplan/state.json.forgeplan/manifest.yamlintegrate-check.js outputverify-runnable.json, runtime-verify.json, and cross-model-check.json artifacts when presentDo not use ad hoc shell inspection for finalization context:
node -epython -ccat ... | python3 -c ...git log / git-history inspection to infer run timing or report fieldsFinalization should be driven by ForgePlan artifacts, not repo archaeology.
Builder models, node completion counts, cross-model configuration state, and latest sweep/cross-check artifacts should come from deep-build-finalize-context.js, not from model recall.
Readiness language must come from deep-build-verification-contract.js, not from model inference.
Generate deep-build report at .forgeplan/deep-build-report.md:
The report must capture pipeline decisions, not just outcomes. Whenever a phase is skipped, downgraded, or uses a default, record the reason. This includes at minimum:
state.json selected_builder_model fields when available)Report accuracy requirements:
Build Models table must match the actual selected_builder_model and selected_builder_model_reason values from state.deep-build-finalize-context.js.manifest_node_summary and manifest_node_ids as the source of truth for project nodes.state.nodes entries that are not present in the manifest. If extra_state_nodes is non-empty, mention them only as stale-state anomalies or omit them; do not fold them into "Nodes: [N] built and reviewed".built (not reviewed), the report must say so explicitly instead of claiming all nodes are reviewed.deep-build-finalize-context.js.integration.warnings as the source of truth for warning classification. If actionable_count > 0, do not describe final integration warnings as "all informational".actionable_count > 0, do not collapse them into "static-analysis limitations" or equivalent blanket language. You may say the warnings are structural/actionable and were pressure-tested by sweep agents, but they are still actionable warning classes.review.allow_large_tier_skip: true, the report must say that explicitly and present the run as degraded certification, not full certification.deep-build-finalize-context.js.runtime as the source of truth for runtime verification status. Mirror the raw artifact status and error_type first. If you add a harness/workspace explanation, label it as an interpretation or likely cause rather than a deterministic fact.deep-build-finalize-context.js.runtime.workspace_relative is present, prefer that concrete workspace evidence over generic claims about project layout. Do not claim a specific unsupported runtime string or root-cause unless it is directly supported by the artifact fields/message.deep-build-finalize-context.js.sweep.reporting_guidance as the source of truth for closure wording. If must_avoid_sweep_clean_language is true, do not say "sweep-clean", "all resolved", or equivalent. Say the node-scoped findings were addressed and then enumerate deferred/manual items separately.deep-build-verification-contract.js says full certification is allowed.deep-build-verification-contract.js reports manual-testing-ready, the report must explicitly say the project is ready only for targeted manual testing and is not fully certified.# Deep Build Report
## Summary
- Project: [project name]
- Tier: [complexity tier]
- Nodes: [N] built and reviewed
- Total passes: [N]
- Wall-clock time: [duration]
- Final integration: [PASS/FAIL]
- Cross-model consecutive clean passes: [N]
- Readiness: [full-certification / degraded-certification / manual-testing-ready / not-ready]
## Pipeline Decisions
- Research: [baseline prior-art only / stack-specific topics also run / no research artifacts found] — [reason]
- Plan artifact: [combined SMALL design+plan / separate implementation plan / missing] — [reason]
- Skills: [enabled / disabled] — [reason]
- Wiki: [compiled / skipped] — [reason]
- Design pass: [ran / skipped] — [reason]
- Runtime verification: [ran / skipped] — [reason]
- Cross-model: [ran / skipped] — [reason]
## Build Models
| Node | Model | Source |
|------|-------|--------|
| data-store | sonnet | tier-default |
| cli | opus | models.builder_override.cli |
## Verification Coverage
- verify-runnable: [pass / warnings / fail / missing]
- integrate-check: [PASS / PASS_WITH_WARNINGS / FAIL / missing]
- runtime verification: [pass / skip / fail / missing]
- cross-model verification: [clean / findings / skipped / missing]
- Allowed claim level: [full certification / degraded certification / targeted manual testing only / not ready]
- Caveats: [blockers or gaps from deep-build-verification-contract.js]
## Findings Timeline
| Pass | Model | Found | Resolved | Category |
|------|-------|-------|----------|----------|
| 1 | claude | 5 | 5 | types(2), imports(2), errors(1) |
| 2 | codex | 2 | 2 | security(1), api(1) |
| 3 | codex | 0 | 0 | — (clean) |
| 4 | codex | 0 | 0 | — (clean, certified) |
## All Findings
[For each finding: ID, source model, node, category, description, resolution]
## Runtime Advisories
[LOW-severity findings from Phase B: public endpoint notices, missing contract warnings]
## Issues Requiring Manual Review
[Items from sweep_state.needs_manual_attention: project-level findings, user-skipped decisions, unresolvable items]
## Capability Usage
- Research artifacts: [list files from `.forgeplan/research/`, or "none found"]
- Plan artifact: [.forgeplan/plans/implementation-plan.md exists?]
- Skills registry: [.forgeplan/skills-registry.yaml exists?]
- Design docs: [list `DESIGN.md`, `docs/DESIGN.md`, `.forgeplan/wiki/design.md`, configured `design-profile:*` entries, or "none found"]
- Wiki files: [list key files, or "skipped for SMALL"]
## Integration Results
[Final integration check output]
sweep_state.current_phase at "integrate" and sweep_state.operation at "deep-building" until promotion completes (do NOT clear sweep_state yet — crash recovery needs the breadcrumb, and integrate is already a valid resumable phase). Before changing build_phase, write sweep_state.phase_advancement = { from_build_phase: [N], to_build_phase: [N+1], checkpoint: "pre_increment", promoted_nodes: [list], backup_dir: ".forgeplan/phase-advance-backup/" } and persist backups of the manifest and promoted-node specs in that backup directory. If NOT advancing (build_phase >= max_phase or single-phase): clear sweep_state to null.=== Phase [N] Certified ===
All phase [N] nodes are built and reviewed with no pending node-scoped findings.
Starting phase advancement to phase [N+1]...
If no advancement is pending, present:
=== Deep Build Complete ===
[If full certification] All [N] nodes built, reviewed, and cross-model certified.
[If degraded LARGE-tier skip] All [N] nodes built and reviewed, but cross-model verification was intentionally skipped (degraded certification).
[If manual-testing-ready only] Deterministic runnable/integration gates passed, so the project is ready for targeted manual testing, but this run is not fully certified.
[If no deferred/manual node-scoped items] [total] findings found and fixed across [passes] passes.
[If deferred/manual items remain] [total] findings identified across [passes] passes; see report for deferred/manual items.
[If full certification] Cross-model certified clean on [N] consecutive passes.
[If degraded LARGE-tier skip] Cross-model certification was not performed.
[If manual-testing-ready only] Report: this run proved runnable/manual-testing readiness only.
Report: .forgeplan/deep-build-report.md
Next:
→ /forgeplan:status Full project overview
→ /forgeplan:measure Verify quality metrics
→ /forgeplan:revise [node] Make changes
→ /forgeplan:guide Get guidance anytime
Do not attempt git add, git commit, or git tag during an active deep-build or sweep. Those operations are outside the live control-plane loop and may be blocked by active-operation guards.
If the user wants checkpoint commits, suggest them only after the deep-build has finished or after the user has explicitly exited the active sweep/deep-build session.
After Phase 8 certification completes:
build_phase >= max_phase (all phases complete): skip Phase Advancement entirely — the Phase 8 report is the final output. Maximum phase advancement cycles: max_phase (safety bound).build_phase nodes are reviewed and sweep-cleanAll phase [N] nodes are certified. Advance to phase [N+1]?
This will: run cross-phase integration, increment build_phase, promote next-phase specs.
[Y to advance / N to stay on current phase]
For autonomous deep-build (--autonomous): auto-advance without prompt unless cross-phase review finds CRITICALs.integrate-check.js (spec-to-spec) AND verify-cross-phase.js (implementation-to-spec). Check exit codes AND parse JSON output: exit code 1 = hard FAIL (halt immediately). Exit code 0 with warned > 0 in either script's JSON = WARNs present — the LLM deep-check in integrate.md step 4 must run before proceeding. Only advance when both scripts exit 0 AND the LLM deep-check resolves all WARNs.build_phase in manifest, set build_phase_started_at in state, and update sweep_state.phase_advancement.checkpoint to "post_increment".sweep_state.phase_advancement.checkpoint to "promoting_specs".spec_type: "interface-only" or generated_from: "phase-promotion") and re-run spec generation to promote to full prescriptive specs. Do not invoke Skill(forgeplan:spec) here. The promoted spec must set spec_type: "prescriptive" and include all 14 fields. If any promoted node's spec generation fails: halt with error, preserve sweep_state (still has current_phase: "integrate" plus phase_advancement checkpoint state), and present: "Phase advancement failed during spec promotion for [node-id]. Run /forgeplan:recover to resume."sweep_state.phase_advancement.checkpoint to "promotion_complete". Do NOT delete backups or clear sweep_state yet.sweep_state with fresh operation: "deep-building", current_phase: "build-all". After Phase 2 successfully initializes sweep_state, delete .forgeplan/phase-advance-backup/. A crash between step 7 and Phase 2 init is safe: checkpoint: "promotion_complete" tells recovery that spec promotion succeeded and the next action is to start the build loop (not re-run promotion).node "${CLAUDE_PLUGIN_ROOT}/scripts/worktree-manager.js" cleanupnpx claudepluginhub cspergel/forgedev --plugin forgeplanCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.