build

A project-management command that chooses an approved feature, writes acceptance tests, builds until the tests pass, and records the result.

In plain words
What is it for?
Use it to select work whose dependencies are ready, prioritize technical debt, run tests, commit changes according to project rules, track quality, and record learnings.
Why use it?
It structures feature work into fresh sessions and checks the existing project before new changes are made.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/dormstern/forge/build
Clone the repo
git clone --depth 1 https://github.com/dormstern/forge
Per session 58 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 883 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00058 $0.00883
Opus 5 $0.00029 $0.00441
Sonnet 5 $0.00012 $0.00177
Haiku 4.5 $0.00006 $0.00088

Measured yesterday against content hash 50ae82a1547d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

build scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/build.md · 61 lines

How it starts

The opening of the file, as written. The whole thing — 61 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/forge:build — Ralph Loop (PM mode)

Execution mode: direct. This command has explicit steps below — execute them in order. Do not enter plan mode, do not write a plan file, do not call ExitPlanMode. The framework already did the planning; you just run the steps.

You execute the SHAPE-approved plan, feature by feature. Fresh context per feature — never carry context across feature boundaries.

Pre-conditions

  • releases.json.current_cycle.approved_plan exists. If not, instruct the user to run /forge:shape first.
  • Optional: /forge:build <feature-id> to build a specific feature. Default is wave-aware selection.

Behavior

Startup Protocol

  1. Run the project's full test suite. Must be green. If not, fix the green-on-master invariant before building anything new.
  2. Verify architecture.md is current (post-last-build).
  3. Confirm clean working tree.
  4. Read progress.md top sections (Cross-Cutting Patterns, Active Gotchas) for ~1k tokens of context.

Ralph Loop (per feature)

  1. SELECT the next feature: current wave first, all hard depends_on met, debt before dependent new features, removal features last in wave.
  2. Mark status="building" in features.json. Print: --- CONTEXT BOUNDARY -- starting feature: {id} ---
  3. Dispatch test-writer to produce 3–7 acceptance tests. For API features (if contract_mode = "full"), contract-compliance tests come first.
  4. Dispatch builder with fresh context: only the test file, the relevant architecture.md section (~500 tokens), and progress.md top sections. Max 3 resets.
  5. EVALUATE:
    • If tests pass: commit per autonomy tier (T1 auto, T2 checkpoint before commit, T3 checkpoint before tests AND before commit). Set status="done". Calculate quality_score (rubric below). Append learnings to progress.md.
    • If failed after 3 resets: set status="blocked", log the blocker, append learnings, continue with the next feature.
  6. Drift check every 5 features. Dispatch drift-detector. If recommendation is DISCUSS / PIVOT / CONTRACT_HALT, PAUSE and notify the user. Do not advance.

Read the full file on GitHub · 61 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 61 lines · 58 tokens per session scan A 50ae82a1547d

Subscribe to this mod's changes

build is a command published in the GitHub repository dormstern/forge (6 stars, last pushed 3mo ago), licensed MIT. It adds 58 tokens to every session and 883 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.