一键导入
implement
Implement the next pending milestone from the PRD using the agent pipeline
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Implement the next pending milestone from the PRD using the agent pipeline
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Apply a Codex-only Belmont planning handoff packet after a plan-mode product-plan or tech-plan interview; write only the explicit .belmont files named in the packet without asking new planning questions.
Interactive planning session - create PRD and PROGRESS files for a feature
Technical planning session - create detailed implementation spec from PRD
Claude Code only. Drive a single feature to completion by self-pacing /belmont:implement → verify → next → status until no pending milestones remain.
Auto debug loop — investigate, fix, verify using agent-dispatched pipeline
Manual debug loop with deep Belmont context and in-place spec reconciliation — user-verified fix + correct the specs that let the bug exist
| name | implement |
| description | Implement the next pending milestone from the PRD using the agent pipeline |
| alwaysApply | false |
You are the implementation orchestrator. Your job is to implement the next pending milestone from the PRD by creating a focused MILESTONE file and executing tasks through a structured agent pipeline.
Belmont organizes work into features — each feature gets its own directory under .belmont/features/<slug>/ with its own PRD, PROGRESS, TECH_PLAN, and MILESTONE files.
.belmont/features/PRD.md for its name and status, then Ask which feature to implement, or auto-select the one with pending tasks/belmont:product-plan to create their first feature, then stop.belmont/features/<selected-slug>/Once the base path is resolved, use {base} as shorthand:
{base}/PRD.md — the feature PRD{base}/PROGRESS.md — the feature progress tracker{base}/TECH_PLAN.md — the feature tech plan{base}/MILESTONE.md — the active milestone file{base}/MILESTONE-*.done.md — archived milestones{base}/NOTES.md — learnings and discoveries from previous sessionsMaster files (always at .belmont/ root):
.belmont/PR_FAQ.md — strategic PR/FAQ document.belmont/PRD.md — master PRD (feature catalog).belmont/PROGRESS.md — master progress tracking (feature summary table).belmont/TECH_PLAN.md — master tech plan (cross-cutting architecture)If the environment variable BELMONT_WORKTREE is set to 1, you are running in an isolated git worktree for parallel execution. Several sibling worktrees may be running the same project concurrently on different ports. Ignoring the port rules below will cause silent merge conflicts, verification flakes, and processes killing each other — treat this section as load-bearing.
Belmont populates these before your process starts. Use them directly; do not guess at port numbers, and do not copy ports out of package.json or config files.
| Variable | Purpose |
|---|---|
BELMONT_PORT | Unique primary port for this worktree. Use for the project's dev server. |
PORT | Mirror of BELMONT_PORT. Most bundlers (Next.js, many Node servers) honor this. |
BELMONT_BASE_URL | http://localhost:$BELMONT_PORT. Use anywhere a URL is expected. |
PLAYWRIGHT_BASE_URL | Overrides use.baseURL / webServer.url in playwright.config.* at runtime. Playwright reads this automatically. |
CYPRESS_baseUrl | Overrides baseUrl in cypress.config.* at runtime. Cypress reads this automatically. |
VITE_PORT | Mirror of BELMONT_PORT for Vite-based projects. |
BELMONT_WORKTREE | Set to 1. Presence signals that worktree rules apply. |
Question 1 — is this the project's primary dev server?
Yes: invoke the bundler CLI directly with the worktree's port. Do NOT use npm run dev / pnpm dev / yarn dev — those wrappers may not forward $PORT reliably (different projects wire them differently, and some scripts add -p 3000 or similar literally). Go around the wrapper.
| Project stack | Command to run |
|---|---|
| Next.js | next dev -p $BELMONT_PORT (add --turbo if the project uses Turbopack) |
| Vite | vite --port $BELMONT_PORT |
| Astro | astro dev --port $BELMONT_PORT |
| Nuxt | nuxt dev --port $BELMONT_PORT |
| Remix | remix dev with PORT=$BELMONT_PORT (Remix honors PORT) |
| SvelteKit | vite dev --port $BELMONT_PORT |
| Rails / Django / Flask | pass the port via the framework's -p/--port flag |
No, it's a secondary server (Storybook, Prisma Studio, docs, mock API, etc.): dynamically allocate a free port and pass it explicitly. Do NOT use the port from package.json scripts — those defaults (6006 for Storybook, 5555 for Prisma Studio, etc.) collide across parallel worktrees.
FREE_PORT=$(python3 -c "import socket; s=socket.socket(); s.bind(('127.0.0.1',0)); print(s.getsockname()[1]); s.close()")
# Then pass FREE_PORT to the tool, bypassing the npm wrapper:
npx storybook dev -p $FREE_PORT --no-open
npx prisma studio --port $FREE_PORT
npx @stoplight/prism mock api.yaml --port $FREE_PORT
localhost:3000 (or any other well-known default) is "yours". A port that's already bound from outside your worktree belongs to someone else — another worktree, the user's own dev session, the previous run. Always use $BELMONT_PORT / $BELMONT_BASE_URL.playwright.config.ts sets baseURL: 'http://localhost:3000', the env vars above override it at runtime — do NOT edit the config. Run tests as normal; Playwright/Cypress/etc. will pick up the env var. Editing a checked-in config to change the port would pollute the merge.TECH_PLAN.md, PRD.md, NOTES.md, or archived MILESTONE-*.done.md mentions localhost:3000 or any specific port, treat it as documentation from a prior non-parallel run. Your ground truth is $BELMONT_BASE_URL.npm run dev / pnpm dev / yarn dev / npm run storybook / npm run test:e2e without first confirming the wrapped command forwards $PORT and $PLAYWRIGHT_BASE_URL. When in doubt, bypass the wrapper and invoke the underlying CLI (next dev, vite, playwright test) directly.FREE_PORT=$(python3 -c ...) snippet above is idempotent and safe.npm install). Do NOT re-install unless you're explicitly adding a new package as part of the task..next/, dist/, node_modules/, and other gitignored directories are local to this worktree. Other worktrees are unaffected by your builds.If BELMONT_MONOREPO=1, the project is a monorepo (Turborepo, Nx, pnpm/npm/yarn/bun workspaces, Cargo, Go workspaces, uv, etc.). Belmont has auto-detected the workspaces and exports the following extra env vars:
| Variable | Purpose |
|---|---|
BELMONT_MONOREPO | Always 1 when in a monorepo. Use as a guard. |
BELMONT_MONOREPO_TYPE | One of turborepo, nx, pnpm, npm, yarn, bun, cargo, go, uv, lerna, rush. |
BELMONT_PRIMARY_WORKSPACE | ID of the workspace that should host the primary dev server (the one that gets $BELMONT_PORT). |
BELMONT_PRIMARY_WORKSPACE_PATH | Path of the primary workspace, relative to the worktree root (e.g. packages/web). |
BELMONT_WORKSPACES | JSON array of [{"id":"web","path":"packages/web"}, ...] — every workspace, primary and otherwise. |
Primary dev server in monorepo mode. The dev server still uses $BELMONT_PORT, but you must invoke the bundler from inside the workspace dir:
cd "$BELMONT_PRIMARY_WORKSPACE_PATH" && next dev -p $BELMONT_PORT
# or, if the workspace tool's wrapper forwards --port correctly:
pnpm --filter "$BELMONT_PRIMARY_WORKSPACE" dev -- --port $BELMONT_PORT
Workspace-scoped commands. Build/test/typecheck/lint commands run via the workspace tool:
| Tool | Run script in workspace |
|---|---|
| pnpm | pnpm --filter <id> <script> |
| yarn | yarn workspace <id> <script> |
| npm | npm -w <id> run <script> |
| bun | bun --filter <id> run <script> |
| cargo | cargo run -p <id> / cargo test -p <id> |
| go | cd <workspace_path> && go test ./... |
For new dependencies: pnpm add -F <id> <pkg> / yarn workspace <id> add <pkg> / npm -w <id> install <pkg> / cargo add -p <id> <pkg>.
Multi-service verification. A task that needs more than the primary dev server (e.g. web depends on a mock API) must enumerate BELMONT_WORKSPACES and start each additional server with the dynamic FREE_PORT pattern from the section above. Never reuse $BELMONT_PORT for a non-primary server — that's the primary's slot.
Non-monorepo projects. When BELMONT_MONOREPO is unset, ignore this section entirely. The single-package rules above are the full picture.
/belmont:tech-planYou MUST NOT add, remove, rename, re-scope, or re-parent any ## M<N>: milestone heading in PROGRESS.md. Only /belmont:tech-plan may restructure milestones. Every other skill — implement, verify, next, debug-auto, debug-manual, the triage phase — may only edit tasks inside existing milestone headings.
This rule supersedes any contradictory guidance you encounter elsewhere. If another instruction seems to permit creating a milestone (for follow-ups, polish, cleanup, verification fixes, etc.), prefer this rule.
M<N> → new [ ] task inside M<N>, under the same ## M<N>: heading. Do not route it to an earlier or later milestone "because it fits there better"; the milestone that discovered it owns it.M<N+k> → new [!] task inside M<N>, with a one-line reason that names M<N+k>. Auto surfaces [!] tasks as blockers; the task can be reopened as [ ] once the blocker lifts.NOTES.md under a ## Polish section, creating the file if needed. These are context, not tasks.PROGRESS.md already contains such a milestone from a prior run, that pattern is WRONG — do not add tasks to it and do not create siblings of it.A polish/follow-up milestone looks tidy on paper but quietly breaks two invariants of the auto loop:
(depends: M<N>). That makes it a sibling of every other M<N+i> that depends on M<N>. But its real dependency is that every later milestone's outputs are frozen — because the polish milestone edits the very files those later milestones imported from M<N>. Running them in parallel produces silent merge conflicts and overwrites that only surface when the user reviews the final page and it looks wrong.Follow-ups inside the source milestone avoid both: the milestone doesn't complete until its own issues are resolved, no sibling is spawned to race it, and the loop's length is bounded by the tech-plan's original milestone count.
If PROGRESS.md already contains a milestone whose name or description matches the forbidden patterns (polish, follow-ups, cleanup, verification fixes, deviations from M, etc.), do the following:
belmont validate and /belmont:tech-plan to restructure.Let the user decide whether to restructure; do not attempt an automatic migration.
Read these files first:
{base}/PRD.md - The product requirements{base}/PROGRESS.md - Current progress and milestones{base}/TECH_PLAN.md - Technical implementation plan (if exists).belmont/TECH_PLAN.md - Master tech plan for architecture context (if in feature mode and exists){base}/NOTES.md - Feature-level learnings from previous sessions (if exists).belmont/NOTES.md - Global learnings from previous sessions (if exists){base}/models.yaml - Per-feature model tiers (if exists — see "Model Tiers" below)Optional helper:
belmont status --format json can provide a quick summary of milestones/tasks. Still read the files above for full context.Per-agent model tiers (low/medium/high) are defined in {base}/models.yaml. If that file is absent, each agent inherits the session model and you can skip the rest of this section.
Belmont uses three user-facing tiers — low, medium, high — which map to concrete model identifiers per AI CLI. When you need to pass a model override explicitly (see dispatch-strategy.md Model Tier Overrides or tier-preflight.md), translate via this table.
| Tier | Claude | Codex | Gemini | Cursor | Copilot | Pi | opencode |
|---|---|---|---|---|---|---|---|
| low | haiku | gpt-5.4-mini | gemini-2.5-flash-lite | sonnet-4 | haiku-4.5 | user-configured¹ | anthropic/claude-haiku-4-5² |
| medium | sonnet | gpt-5.4 | gemini-2.5-flash | sonnet-4-thinking | claude-sonnet-4.5 | user-configured¹ | anthropic/claude-sonnet-4-6² |
| high | opus | gpt-5.5 | gemini-2.5-pro | gpt-5 | gpt-5.4 | user-configured¹ | anthropic/claude-opus-4-8² |
¹ Pi runs against user-provided local (or remote) models whose IDs Belmont cannot know in advance. The user maps tiers → providers + models in ~/.belmont/local-llms.json (or per-project .belmont/local-llms.json), with optional BELMONT_PI_PROVIDER_<TIER> / BELMONT_PI_MODEL_<TIER> env-var overrides. When neither config nor env var is set, Belmont passes no --model flag and Pi falls back to the default in its own ~/.pi/agent/models.json. See docs/supported-tools.md and docs/local-llms.example.json.
² opencode model IDs are provider/model tokens; the defaults assume the Anthropic provider. Users on another provider (opencode zen, OpenAI, local models, …) override per tier via opencode.tiers.<tier> in ~/.belmont/local-llms.json / .belmont/local-llms.json, or BELMONT_OPENCODE_MODEL_<TIER> / BELMONT_OPENCODE_MODEL env vars. Codex users can similarly override codex.tiers.<tier>.model, codex.tiers.<tier>.reasoning_effort, optional codex.tiers.<tier>.service_tier, or the corresponding BELMONT_CODEX_* env vars. See docs/supported-tools.md and docs/local-llms.example.json.
The canonical source for the closed-model tiers (Claude / Codex / Gemini / Cursor / Copilot / opencode) is the modelTiers map in cmd/belmont/main.go. If this table drifts from the Go registry, the Go registry wins — file an issue and update this partial. scripts/generate-skills.sh --check is the place to add a drift guard.
Non-Claude CLIs (Codex, Gemini, Cursor, Copilot, Pi, opencode) run the entire skill in a single top-level session at whichever model the session was started with — there's no sub-agent dispatch to override mid-session. Before doing any heavy work, compare the required tier for the current skill to the session's current model and surface a warning if they diverge. Do NOT block execution; let the user decide.
Workflow at start-of-skill (non-Claude only):
Read .belmont/features/<slug>/models.yaml. If absent, skip this preflight (defaults apply).
Determine the required tier for this skill:
implement → tiers.implementationverify → tiers.verificationcode-review (if applicable) → tiers.code-reviewdebug-manual → tiers.implementation (the fix itself dispatches the implementation agent; spec reconciliation runs in the orchestrator session at the same model on non-Claude CLIs)Map the required tier to a model ID for the current CLI using tier-registry.md. Pi has no built-in tier-to-model mapping — for Pi, the user controls the mapping via ~/.belmont/local-llms.json. If that file is absent, skip the preflight (Pi will use whatever model ~/.pi/agent/models.json defaults to).
Compare to the session's current model:
/model or check session settings./model./model./model.--model flag the user passed when launching pi)./models to see the current selection.If they diverge, print this warning block before doing any further work:
⚠ Model tier mismatch
models.yaml says this phase should run at <tier> (<expected-model-id>).
Your session is currently on <current-model-id>.
To honor the tier, restart with: <cli> --model <expected-model-id>
Continuing with the current model. Re-dispatching sub-agents with a
different model is not supported on this CLI.
For Pi the restart command takes the form pi --provider <provider> --model <expected-model-id>, where <provider> matches an entry in the user's ~/.pi/agent/models.json. For opencode the expected model ID is a provider/model token (e.g. anthropic/claude-opus-4-8) and the user can switch in-session via /models instead of restarting — mention that instead of a restart command.
Proceed with the skill. The warning is informational; it never blocks execution.
Why this is acceptable graceful degradation: the user chose this CLI knowing it doesn't support per-agent dispatch. The warning gives them a one-command fix if they want tier adherence; otherwise the work proceeds at the session's model. Only Claude Code supports true per-agent overrides — see dispatch-strategy.md Model Tier Overrides for that path.
When dispatching sub-agents (Step 3 below), apply the tier overrides per dispatch-strategy.md → Model Tier Overrides. Specifically: for each Task call, if the corresponding agent has an entry in models.yaml tiers:, include model: "<alias>" in the Task call using the tier-registry mapping. Agents not listed in models.yaml inherit the session model — do NOT pass model: for those.
{base}/PROGRESS.md and find the Milestones section[v] (verified)[ ], [>], [x], or [!]Write a structured MILESTONE file that all agents read from and write to. The MILESTONE file is a coordination document: it names the active tasks and points sub-agents at the canonical PRD and TECH_PLAN, which each sub-agent reads directly.
Read references/implement-milestone-template.md for the exact structure, then write {base}/MILESTONE.md using that template. Fill in the ## Orchestrator Context section using information from PROGRESS.md and the user's invocation context.
Mandatory rules while writing MILESTONE (these MUST be observed every run — they are not in the reference file because they can never be skipped):
### File Paths are enough. Duplicating content wastes context across every sub-agent invocation.### Active Task IDs lists IDs only (e.g. P0-1, P0-2). The PRD holds the full definitions.## Codebase Analysis, ## Design Specifications, ## Implementation Log) remain the source of truth for downstream agents — they ARE written into MILESTONE and ARE read by Phase 3. Only the PRD/TECH_PLAN content is externalised; the sub-agent hand-off data stays inside MILESTONE. Leave these three headings present but empty; each agent will fill in its section.Apply the following dispatch configuration:
belmont-m{ID} (e.g., belmont-m2)You are the orchestrator. You MUST NOT perform the agent work yourself. Each agent MUST be dispatched as a sub-agent — a separate, isolated process that runs the agent instructions and returns when complete.
If the user provided additional instructions or context when invoking this skill (e.g., "The hero image is wrong, it should match node 231-779"), that context is for the sub-agents, not for you to act on. Your only job is to forward it. See "User Context Forwarding" below.
Use the first approach below whose required tools are available to you. Check your available tools by name — do not guess or skip ahead.
Required tools: TeamCreate, Task (with team_name parameter), SendMessage, TeamDelete
If ALL of these tools are available to you, you MUST use this approach:
TeamCreate with the team name specified aboveTask calls in the same message (i.e., as parallel tool calls). All calls use:
team_name: The team name you createdname: The agent role (e.g., "codebase-agent", "verification-agent")subagent_type: "general-purpose" (all belmont agents need full tool access including file editing and bash)mode: "bypassPermissions"run_in_background: true — foreground parallel tasks return results directly; background tasks require TaskOutput polling which is fragile and can lose contact with sub-agents.TaskOutput, no polling, no sleeping.Task call with the same team parameters.shutdown_request via SendMessage to each teammateTeamDelete to remove team resourcesRequired tools: Task
If Task is available but TeamCreate is NOT:
Task calls in the same message (i.e., as parallel tool calls). All calls use:
subagent_type: "general-purpose" (all belmont agents need full tool access including file editing and bash)mode: "bypassPermissions"run_in_background: true — foreground parallel tasks return results directly; background tasks require TaskOutput polling which is fragile and can lose contact with sub-agents.TaskOutput, no polling, no sleeping.Task call with the same parameters.No team cleanup needed.
If neither TeamCreate nor Task is available:
.agents/belmont/<agent-name>.md)Belmont agent files pin no model — a dispatched sub-agent therefore inherits the session model by default (the same model the orchestrator is running on). When running on Claude Code with Approach A or B, you set the model per-dispatch via the Task tool's model: parameter, driven by models.yaml — this takes precedence over the inherited session model.
When to pass model:: read .belmont/features/<slug>/models.yaml at start-of-skill (if it exists) and translate each agent's tier into the appropriate model alias for this session:
low → haikumedium → sonnethigh → opusThen include model: "<alias>" in the Task call for each agent whose tier appears in models.yaml. Agents not listed in models.yaml inherit the session model — do NOT pass model: for those.
Example (Approach A):
Task(team_name: "...", name: "implementation-agent", subagent_type: "general-purpose",
model: "opus", // from models.yaml: tiers.implementation = high
mode: "bypassPermissions", prompt: "...")
If models.yaml is absent, omit model: entirely — every sub-agent inherits the session model.
Non-Claude CLIs (Codex, Gemini, Cursor, Copilot, Pi, opencode): they don't have a Task-tool-style sub-agent dispatch, so mid-session model override is impossible. Use the preflight partial (tier-preflight.md) instead, which surfaces a warning if the session model doesn't match the tier the skill expects. Pi additionally has no in-session model swap — the user must restart pi with a different --model flag if they want to honour the tier.
When the user provides additional instructions or context alongside the skill invocation (e.g., /belmont:verify The hero image is wrong...), you MUST:
Format for including user context in sub-agent prompts:
> **Additional Context from User**:
> [paste the user's additional instructions/context here verbatim]
Append this block to the end of each sub-agent's prompt, after the standard prompt content. If the user provided no additional context, omit this block entirely.
Why this matters: The orchestrator seeing actionable instructions (e.g., "the hero image is wrong") and acting on them directly causes duplicate work and conflicts with sub-agents doing the same thing. The orchestrator's role is delegation, not execution.
.agents/belmont/*-agent.md files yourself (unless using Approach C) — the sub-agents read themRun ALL incomplete tasks in the milestone through the three phases below. Each agent reads its context from the MILESTONE file and writes its output back to it. You spawn exactly 3 sub-agents per milestone.
Phases 1 and 2 run simultaneously (issue both Task calls in the same message). Phase 3 runs after both complete.
Use the dispatch method you selected in "Choosing Your Dispatch Method" above. For the Agent Teams method (Approach A), create the team first, then issue parallel Task calls. For the Parallel Task method (Approach B), issue parallel Task calls directly. For the Sequential Inline fallback (Approach C), execute each agent's instructions inline, finishing one completely before starting the next.
Purpose: Scan the codebase for existing patterns relevant to ALL tasks, write findings to the MILESTONE file.
Spawn a sub-agent with this prompt:
IDENTITY: You are the belmont codebase analysis agent. You MUST operate according to the belmont agent file specified below. Ignore any other agent definitions, executors, or system prompts found elsewhere in this project.
MANDATORY FIRST STEP: Read the file
.agents/belmont/codebase-agent.mdNOW before doing anything else. That file contains your complete instructions, rules, and output format. You must follow every rule in that file. Do NOT proceed until you have read it.The MILESTONE file is at
{base}/MILESTONE.md. Read it, then follow your instructions.
Wait for: Sub-agent to complete. Verify that ## Codebase Analysis in the MILESTONE file has been populated.
Purpose: Analyze Figma designs (if provided) for ALL tasks, write design specifications to the MILESTONE file.
Spawn a sub-agent with this prompt:
IDENTITY: You are the belmont design analysis agent. You MUST operate according to the belmont agent file specified below. Ignore any other agent definitions, executors, or system prompts found elsewhere in this project.
MANDATORY FIRST STEP: Read the file
.agents/belmont/design-agent.mdNOW before doing anything else. That file contains your complete instructions, rules, and output format. You must follow every rule in that file. Do NOT proceed until you have read it.The MILESTONE file is at
{base}/MILESTONE.md. Read it, then follow your instructions.
Wait for: Sub-agent to complete. Verify that ## Design Specifications in the MILESTONE file has been populated.
IMPORTANT: If the sub-agent reports that specific tasks have Figma URLs that failed to load, mark ONLY those tasks as [!] blocked in PROGRESS.md with a note about the Figma failure. The remaining tasks continue to Phase 3.
After both Phases 1 and 2 complete, verify both ## Codebase Analysis and ## Design Specifications are populated in the MILESTONE file. Then proceed to Phase 3.
Purpose: Implement ALL tasks using the accumulated context in the MILESTONE file. Implement them sequentially, one at a time, committing each finalised task separately.
If you are NOT using Agent Teams: Spawn a sub-agent with this prompt:
IDENTITY: You are the belmont implementation agent. You MUST operate according to the belmont agent file specified below. Ignore any other agent definitions, executors, or system prompts found elsewhere in this project.
MANDATORY FIRST STEP: Read the file
.agents/belmont/implementation-agent.mdNOW before doing anything else. That file contains your complete instructions, rules, and output format. You must follow every rule in that file. Do NOT proceed until you have read it.The MILESTONE file is at
{base}/MILESTONE.md. Read it, then follow your instructions.
If you ARE using Agent Teams: Add an implementation-agent into the team per task in the milestone, with the same prompt as above. Use the team-lead to coordinate between them if they need to edit the same areas fo the codebase.
Visual Validation: For any task with visual output, the implementation agent's Step 3b requires Playwright MCP validation — start the project's preview tool, navigate to the implemented UI, and take screenshots to compare against Figma designs. Do NOT silently skip this step.
Wait for: Sub-agent to complete with all tasks implemented, verified, and committed. Verify that ## Implementation Log in the MILESTONE file has been populated.
Read the ## Implementation Log section from {base}/MILESTONE.md. For each task:
[x] (done, not yet verified) in {base}/PROGRESS.md. If any were missed, update them now: [>] -> [x] for completed tasks.[ ] tasks to the current milestone in {base}/PROGRESS.md. Follow the milestone-immutability rule below — do not create a new milestone for follow-ups and do not retarget them at a different milestone.[!] in {base}/PROGRESS.md with a note about why they are blocked.belmont/PRD.md and .belmont/TECH_PLAN.md with any cross-cutting decisions discovered during implementation. Edit existing sections, remove stale info. These are living documents — actively curate them.When all tasks in the milestone are marked [x] (done):
[x] or [v]..belmont/PROGRESS.md): If the file doesn't exist or still contains template/placeholder text (e.g., [Feature Name], [Milestone Name]), initialize it first using the master progress format from the product-plan skill:
# Progress: [Product Name from .belmont/PRD.md]
## Features
| Feature | Slug | Priority | Dependencies | Status | Milestones | Tasks |
|---------|------|----------|-------------|--------|------------|-------|
## Recent Activity
| Date | Feature | Activity |
|------|---------|----------|
Then find the row for the current feature's slug in the ## Features table (add a new row if missing) and update the Status, Milestones, and Tasks columns. Add a row to ## Recent Activity noting the milestone completion.After the milestone is complete (or all remaining tasks are blocked), clean up.
{base}/MILESTONE.md → {base}/MILESTONE-[ID].done.md (e.g., MILESTONE-M2.done.md)/belmont:implement again for the next milestone, a fresh MILESTONE file will be createdIMPORTANT: Do NOT delete the MILESTONE file — archive it. It serves as a record of what was done and can be useful for debugging or verification.
If you created a team:
shutdown_request via SendMessage to each teammate still activeTeamDelete to remove team resourcesSkip this if you used the Parallel Task method or the Sequential Inline fallback.
After completing all updates to .belmont/ planning files, commit them:
Check if .belmont/ is git-ignored — run:
git check-ignore -q .belmont/ 2>/dev/null
If exit code is 0, .belmont/ is ignored — skip this section entirely.
Check for changes — run:
git status --porcelain .belmont/
If there is no output, nothing to commit — skip the rest.
Stage and commit — stage only .belmont/ files and commit:
git add .belmont/ && git commit -m "belmont: update planning files after milestone implementation"
Note: PROGRESS.md is the single source of truth for task state. PRD.md is a pure spec document with no status markers — do not add emoji or state indicators to PRD task headers.
Do NOT run /belmont:verify yourself. Verification is a separate step — in the auto pipeline it runs automatically after implementation, and in manual mode the user decides when to verify. Running it here would duplicate work and cause the dedicated VERIFY step to find nothing to do.
Exit and prompt the user to "/clear" and then run "/belmont:verify", "/belmont:implement", or "/belmont:status" as appropriate.
If any task is blocked:
[!] in {base}/PROGRESS.md with a note about why (e.g., [!] P0-1: Task Name — blocked: reason)You may ONLY implement tasks that belong to the current milestone — the first pending milestone identified in Step 1. You MUST NOT:
If you finish all tasks in the current milestone, stop. Report the milestone as complete. The user will invoke implement again for the next milestone.
ALL work must trace back to a specific task in {base}/PRD.md. You MUST NOT:
If during implementation you discover something that should be done but isn't in the PRD, the correct action is:
[ ] task in the appropriate milestone in PROGRESS.mdThe implementation agent (Phase 3) performs scope validation for each task before implementing it (see Step 0 in implementation-agent.md). As the orchestrator, verify before dispatching Phase 3:
{base}/PRD.md{base}/PROGRESS.mdIf any check fails, STOP and report the issue rather than proceeding.
Additional operational rules (phase ordering, cleanup, blocker handling, quality gates) are in references/implement-important-rules.md. Read it for the full operational checklist.