Skip to content

forge.config.json Reference

forge.config.json lives at the project root and is created by forge-init or forge-bootstrap. All keys are optional; the defaults below apply when a key is absent.

KeyTypeDefaultMeaning
specsDirstring./specsRoot directory for feature spec documents.
docsDirstring./docs/architectureRoot directory for generated architecture docs.
backlogDirstring or nullnullIf null, backlog lives at <specsDir>/<feature>/backlog.json; when set, at <backlogDir>/<feature>/backlog.json.
gitCommitAfterStagebooleantrueAuto-commit after each stage completes.
commitPrefixstringforgeConventional-commit prefix; commits look like forge(<feature>): <action>.
branchPerFeaturebooleantrueOffer an isolated git branch when a feature/epic starts on the default branch. Gated only on the project using git (independent of gitCommitAfterStage); when false, forge never prompts and works on the current branch.
branchPrefixstringforge/Prefix for the Branch Setup name — forge/ yields forge/{feature} or forge/{epic}. Ignored when branchPerFeature is false.
stackstring or nullnullProject stack id; set during Stage 2 (tech spec).
typeCheckCommandstring or nullnullType-check command (e.g. bun run typecheck, mypy .); resolved in Stage 2.
testCommandstring or nullnullTest command (e.g. bun test, pytest); resolved in Stage 2.
loopIterationMultipliernumber1.5Multiplier applied to the pending-item count to compute loop iterations (e.g. 10 items × 1.5 = 15).
autoInvokeNextStagebooleantrueNavigator auto-invokes the next stage via the Skill tool after you confirm; false keeps copy-paste. Ignored on non-Claude hosts (always print). Navigator-only.
contextWindowTokensinteger or nullnullContext window used by the navigator’s context-usage check. null infers from the session model, falls back to 200000, and auto-bumps to 1000000 once usage exceeds 200000. Set explicitly (e.g. 1000000) for accurate readings below 200k. Navigator-only.
contextWarnThresholdnumber0.7Fraction of the window (0–1) past which the navigator strengthens its clean-session recommendation and adds mid-stage compaction advice. Secondary signal only: a clean session is recommended at every stage boundary on its own merits — this modulates how emphatically, not whether. Navigator-only.
autoVerifybooleanfalseAuto-run forge-verify after a stage completes, with no prompt. Runs in a fresh clean-room subagent, so it never needs a /clear and costs the session only a digest. See Auto-verify below. Navigator-only.
autoVerifyStagesobject{}Per-stage overrides for autoVerify, e.g. {"forge-1-prd": false}. Effective value = autoVerifyStages[stage] if present, else autoVerify. Keys are limited to the five verify-capable stages (forge-1-prdforge-5-loop); an unknown key is a config error, not a silent no-op. Navigator-only.
autoFixbooleanfalseChain forge-fix after an auto-verify that finds issues — honored only when autoVerify is on for the stage and preconditions hold. Mutates artifacts, so it stays off by default. See Auto-verify. Navigator-only.
workspacesarray(absent)Monorepo members; each has name, path, stack, and optional typeCheckCommand/testCommand.
loopRunnerobject(absent → rauf defaults)Configures the Stage-5 loop runner. See below.

The Stage-5 loop runner is configured, not hardcoded. When the loopRunner block is absent, Feature Forge defaults to rauf. The most useful sub-keys:

Sub-keyDefaultMeaning
nameraufLoop runner identifier.
binraufExecutable used to invoke the runner.
defaultAgent""Empty string means use the runner’s own default agent.
minRunnerVersion0.6.0Minimum runner version required.
stateDir.raufDirectory for runner state.
logFilerauf.logLoop log file.
preconditionFile.rauf.jsonPrecondition / config file checked before the loop runs.

All of the runner command keys are templates with {bin}, {backlogDir}, {specsDir}, and {iterations} substituted at call time; most users never need to set these. See Stage 5 for usage.

autoInvokeNextStage, contextWindowTokens, and contextWarnThreshold configure how the forge navigator drives you between stages and warns you about a filling context window:

  • The navigator recommends /clear and a re-run before the next stage at every stage boundary on its own merits. It also measures the current session’s token usage against the context window; past contextWarnThreshold (default 70%) that measurement strengthens the recommendation — a secondary signal, never the gate.
  • The window is inferred from the session model, falling back to 200k, and auto-bumps to 1M once usage exceeds 200k (usage above 200k proves a 1M-beta window is active).
  • A 1M window can’t be detected until usage crosses 200k, so on a 1M-context model set contextWindowTokens to 1000000 for accurate readings below 200k too.

See Sessions & monitoring for the full picture.

autoVerify, autoVerifyStages, and autoFix let the forge navigator run the verification gate for you. Verification is uniquely safe to automate: forge-verify delegates to the read-only forge-verifier subagent, which runs in a fresh window that inherits none of your session’s context. A /clear before it is pointless, and it is rarely a step worth skipping — so enabling autoVerify is the recommended default for hands-off runs.

  • autoVerify: true — after each stage completes, the navigator dispatches the fresh subagent, which returns only a compact findings digest to your session. No prompt, no paste.
  • autoVerifyStages — opt individual stages in or out, e.g. {"forge-3-specs": true, "forge-1-prd": false}. The effective value for a stage is its override if present, otherwise the global autoVerify.
  • Freshness — a verify is considered fresh only while the stage artifact’s version matches what was verified. Revise an artifact and it is re-verified; leave it unchanged and it is not re-run. An explicitly skipped verify is respected and never auto-run.
  • Clean-room guarantee — auto-verify runs unattended only when the fresh subagent can be dispatched. If it can’t (partial install, or a non-Claude host), it never runs inline in your session — it degrades to the manual verify gate, so a stage is never marked verified on false assurance.
  • autoFix: true — chains forge-fix after an auto-verify that finds issues, but only when autoVerify is on for that stage and the findings have zero unresolved decisions, the working tree is clean, and a mandatory re-verify passes. Any miss falls back to a digest + prompt. Because it mutates artifacts without a human read, it’s a power-user opt-in; leaving it off keeps fixing human-gated.

See Verify & Fix → Auto-verify for the operator’s view.

A minimal config:

{
"specsDir": "./specs",
"docsDir": "./docs/architecture",
"gitCommitAfterStage": true,
"commitPrefix": "forge",
"loopIterationMultiplier": 1.5
}