@giamme/forge 0.21.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +81 -0
- package/README.md +25 -15
- package/SKILL.md +137 -216
- package/VERSION +1 -1
- package/bin/forge.js +104 -0
- package/docs/README.md +2 -3
- package/docs/add-ons.md +5 -3
- package/docs/artifacts.md +17 -2
- package/docs/commands.md +85 -63
- package/docs/decomposed-runs.md +195 -21
- package/docs/development.md +12 -10
- package/docs/forge-ui.md +33 -4
- package/docs/install.md +127 -6
- package/docs/memory.md +6 -1
- package/docs/models.md +36 -10
- package/docs/reviews.md +50 -29
- package/docs/safety.md +27 -2
- package/docs/troubleshooting.md +8 -11
- package/forge +29 -4
- package/forge.cmd +56 -0
- package/package.json +6 -3
- package/references/dataset.md +10 -9
- package/references/decompose-integration.md +337 -0
- package/references/decompose-opt-in.md +527 -0
- package/references/decompose-recovery.md +569 -0
- package/references/decompose-review.md +256 -0
- package/references/decompose.md +99 -1606
- package/references/findings.md +68 -0
- package/references/harnesses.md +7 -12
- package/references/memory.md +13 -2
- package/references/planning.md +48 -18
- package/references/ripwire.md +38 -13
- package/references/runtime.md +22 -33
- package/references/setup.md +90 -0
- package/references/solo.md +13 -42
- package/references/ui.md +12 -5
- package/registry.tsv +40 -22
- package/scripts/forge-artifact.sh +148 -13
- package/scripts/forge-compare.py +5 -15
- package/scripts/forge-config.py +14 -1
- package/scripts/forge-contract.py +216 -53
- package/scripts/forge-control.py +781 -51
- package/scripts/forge-dispatch.sh +202 -42
- package/scripts/forge-du.py +13 -3
- package/scripts/forge-guard.py +137 -6
- package/scripts/forge-handoff.py +221 -39
- package/scripts/forge-install-ripwire.sh +100 -24
- package/scripts/forge-install.sh +100 -41
- package/scripts/forge-issues.py +6 -4
- package/scripts/forge-jev-options.sh +3 -5
- package/scripts/forge-lib-adopt.sh +169 -5
- package/scripts/forge-lib-attribute.sh +10 -3
- package/scripts/forge-lib-decompose.sh +454 -0
- package/scripts/forge-lib-env.sh +179 -0
- package/scripts/forge-lib-group.sh +9 -6
- package/scripts/forge-lib-plans.sh +38 -21
- package/scripts/forge-lib-review.sh +28 -8
- package/scripts/forge-lib-task.sh +263 -69
- package/scripts/forge-lib-verify.sh +59 -10
- package/scripts/forge-memory.sh +83 -4
- package/scripts/forge-metrics.sh +10 -3
- package/scripts/forge-parallel-options.sh +23 -4
- package/scripts/forge-parallel.sh +602 -217
- package/scripts/forge-plan-check.py +71 -8
- package/scripts/forge-planner.py +303 -17
- package/scripts/forge-pr.py +9 -1
- package/scripts/forge-prompt.py +2 -2
- package/scripts/forge-review-links.py +248 -0
- package/scripts/forge-ripwire.py +234 -16
- package/scripts/forge-route.py +19 -27
- package/scripts/forge-runs-rm.py +92 -21
- package/scripts/forge-runs.py +46 -5
- package/scripts/forge-runtime.py +39 -14
- package/scripts/forge-schedule.py +141 -33
- package/scripts/forge-setup-stale.py +236 -0
- package/scripts/forge-setup.py +804 -0
- package/scripts/forge-shadow.py +2 -20
- package/scripts/forge-solo-lock.py +46 -0
- package/scripts/forge-solo.sh +39 -58
- package/scripts/forge-sweep.py +3 -2
- package/scripts/forge-ui.py +8 -1
- package/scripts/forge-update.sh +8 -3
- package/scripts/forge-verify.py +17 -1
- package/scripts/forge-version.py +13 -1
- package/scripts/forge-watch.py +7 -2
- package/scripts/forge-win.sh +156 -0
- package/scripts/forge_brief/__init__.py +6 -1
- package/scripts/forge_brief/proposals.py +6 -1
- package/scripts/forge_dataset/__init__.py +1 -1
- package/scripts/forge_dataset/capture.py +0 -34
- package/scripts/forge_dataset/checks.py +0 -1
- package/scripts/forge_dataset/cli.py +5 -1
- package/scripts/forge_dataset/export.py +28 -6
- package/scripts/forge_dataset/facts.py +1 -2
- package/scripts/forge_dataset/forecast.py +1 -1
- package/scripts/forge_dataset/harvest.py +107 -7
- package/scripts/forge_dataset/importer.py +3 -2
- package/scripts/forge_dataset/pairs.py +3 -3
- package/scripts/forge_dataset/reviewers.py +4 -3
- package/scripts/forge_dataset/routing.py +6 -3
- package/scripts/forge_dataset/tiers.py +1 -1
- package/scripts/forge_decide/__init__.py +1 -1
- package/scripts/forge_decide/budget.py +12 -7
- package/scripts/forge_decide/profiles.py +11 -14
- package/scripts/forge_decide/replay.py +9 -4
- package/scripts/forge_decompose.py +987 -0
- package/scripts/forge_flock.py +17 -2
- package/scripts/forge_groups/review.py +6 -1
- package/scripts/forge_jev/__init__.py +1 -1
- package/scripts/forge_jev/cli.py +10 -1
- package/scripts/forge_jev/gates.py +10 -1
- package/scripts/forge_jev/verify.py +10 -2
- package/scripts/forge_legacy.py +86 -0
- package/scripts/forge_memory_home.py +57 -0
- package/scripts/forge_models.py +151 -0
- package/scripts/forge_posix.py +17 -0
- package/scripts/forge_prefs.py +138 -0
- package/scripts/forge_proc.py +108 -0
- package/scripts/forge_registry.py +2 -2
- package/scripts/forge_side/__init__.py +23 -4
- package/scripts/forge_storage.py +28 -15
- package/ui/README.md +22 -10
- package/ui/docs/api.md +121 -99
- package/ui/forge_ui/control.py +53 -16
- package/ui/forge_ui/export.py +0 -10
- package/ui/forge_ui/models.py +15 -2
- package/ui/forge_ui/projects.py +4 -1
- package/ui/forge_ui/reader.py +462 -60
- package/ui/forge_ui/server.py +0 -10
- package/ui/forge_ui/static/app.js +28 -9
- package/ui/forge_ui/static/checksview.js +12 -3
- package/ui/forge_ui/static/controls.js +147 -11
- package/ui/forge_ui/static/convo.js +5 -2
- package/ui/forge_ui/static/diffview.js +4 -5
- package/ui/forge_ui/static/panel.js +180 -77
- package/ui/forge_ui/static/projectsview.js +16 -2
- package/ui/forge_ui/static/runmodel.js +18 -4
- package/ui/forge_ui/static/scene3d.js +52 -31
- package/ui/forge_ui/static/settings.js +1 -1
- package/ui/forge_ui/static/storageview.js +2 -2
- package/ui/forge_ui/static/style.css +23 -6
- package/ui/forge_ui/static/worktreesview.js +8 -4
- package/ui/forge_ui/transcripts.py +6 -0
- package/ui/forge_ui/worktrees.py +13 -1
- package/docs/fractal.md +0 -181
- package/references/fractal-dashboard.md +0 -21
- package/references/fractal.md +0 -307
- package/scripts/forge-fractal-dispatch.sh +0 -4
- package/scripts/forge-fractal-options.sh +0 -54
- package/scripts/forge-fractal.py +0 -6
- package/scripts/forge-install-fractal.sh +0 -4
- package/scripts/forge_fractal/__init__.py +0 -88
- package/scripts/forge_fractal/bridge.py +0 -46
- package/scripts/forge_fractal/cli.py +0 -224
- package/scripts/forge_fractal/dashboard.css +0 -138
- package/scripts/forge_fractal/dashboard.html +0 -41
- package/scripts/forge_fractal/dashboard.js +0 -687
- package/scripts/forge_fractal/decomposition.py +0 -262
- package/scripts/forge_fractal/execution.py +0 -659
- package/scripts/forge_fractal/inspection.py +0 -261
- package/scripts/forge_fractal/install.py +0 -158
- package/scripts/forge_fractal/invocation.py +0 -95
- package/scripts/forge_fractal/pipeline.py +0 -125
- package/scripts/forge_fractal/selection.py +0 -180
- package/ui/forge_ui/fractal.py +0 -582
package/bin/forge.js
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const { spawn } = require('child_process');
|
|
7
|
+
|
|
8
|
+
const root = path.resolve(__dirname, '..');
|
|
9
|
+
const forgeScript = path.join(root, 'forge');
|
|
10
|
+
|
|
11
|
+
function isWindowsBashStub(candidate) {
|
|
12
|
+
const low = candidate.replace(/\//g, '\\').toLowerCase();
|
|
13
|
+
return low.includes('\\system32\\bash.exe') || low.includes('\\syswow64\\bash.exe') || low.includes('\\windowsapps\\');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function findBash() {
|
|
17
|
+
if (process.platform !== 'win32') {
|
|
18
|
+
return fs.existsSync('/bin/bash') ? '/bin/bash' : 'bash';
|
|
19
|
+
}
|
|
20
|
+
for (const key of ['FORGE_BASH', 'BASH']) {
|
|
21
|
+
const val = (process.env[key] || '').trim();
|
|
22
|
+
if (val && fs.existsSync(val) && !isWindowsBashStub(val)) {
|
|
23
|
+
return val;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const candidates = [];
|
|
27
|
+
for (const dir of (process.env.PATH || '').split(path.delimiter)) {
|
|
28
|
+
if (!dir) continue;
|
|
29
|
+
const p = path.join(dir, 'bash.exe');
|
|
30
|
+
if (fs.existsSync(p) && !isWindowsBashStub(p)) {
|
|
31
|
+
candidates.push(p);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
for (const envRoot of [process.env.ProgramFiles, process.env['ProgramFiles(x86)'], process.env.LocalAppData]) {
|
|
35
|
+
if (!envRoot) continue;
|
|
36
|
+
candidates.push(path.join(envRoot, 'Git', 'bin', 'bash.exe'));
|
|
37
|
+
candidates.push(path.join(envRoot, 'Git', 'usr', 'bin', 'bash.exe'));
|
|
38
|
+
candidates.push(path.join(envRoot, 'Programs', 'Git', 'bin', 'bash.exe'));
|
|
39
|
+
}
|
|
40
|
+
candidates.push('C:\\Program Files\\Git\\bin\\bash.exe', 'C:\\Program Files (x86)\\Git\\bin\\bash.exe');
|
|
41
|
+
for (const c of candidates) {
|
|
42
|
+
if (fs.existsSync(c)) {
|
|
43
|
+
return c;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
console.error('forge: Git Bash (bash.exe) not found. Install Git for Windows or set FORGE_BASH.');
|
|
47
|
+
process.exit(127);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const bash = findBash();
|
|
51
|
+
const child = spawn(bash, [forgeScript, ...process.argv.slice(2)], {
|
|
52
|
+
stdio: 'inherit',
|
|
53
|
+
windowsHide: false,
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
const handlers = new Map();
|
|
57
|
+
function listen(sig, fn) {
|
|
58
|
+
try {
|
|
59
|
+
process.on(sig, fn);
|
|
60
|
+
handlers.set(sig, fn);
|
|
61
|
+
} catch (_err) {
|
|
62
|
+
// Signal not supported on this platform.
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// Ctrl-C already reaches bash: the terminal sends it to the whole foreground process group, and a
|
|
66
|
+
// Windows console to every process attached to it. Passing it on would deliver it twice on macOS
|
|
67
|
+
// and Linux, and on Windows child.kill() always ends the process at once, before forge can clean
|
|
68
|
+
// up. So node only stays alive through it and leaves it to bash.
|
|
69
|
+
listen('SIGINT', () => {});
|
|
70
|
+
// SIGTERM and SIGHUP can reach node alone (a kill of its pid), so they are passed on.
|
|
71
|
+
for (const sig of ['SIGTERM', 'SIGHUP']) {
|
|
72
|
+
listen(sig, () => {
|
|
73
|
+
try {
|
|
74
|
+
child.kill(sig);
|
|
75
|
+
} catch (_err) {
|
|
76
|
+
// Child may already have exited.
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function cleanupSignals() {
|
|
82
|
+
for (const [sig, fn] of handlers.entries()) {
|
|
83
|
+
process.removeListener(sig, fn);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
child.on('error', (err) => {
|
|
88
|
+
cleanupSignals();
|
|
89
|
+
console.error(`forge: failed to launch ${bash}: ${err.message}`);
|
|
90
|
+
process.exit(127);
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
child.on('exit', (code, signal) => {
|
|
94
|
+
cleanupSignals();
|
|
95
|
+
if (signal) {
|
|
96
|
+
try {
|
|
97
|
+
process.kill(process.pid, signal);
|
|
98
|
+
return;
|
|
99
|
+
} catch (_err) {
|
|
100
|
+
process.exit(128);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
process.exit(code == null ? 1 : code);
|
|
104
|
+
});
|
package/docs/README.md
CHANGED
|
@@ -9,9 +9,8 @@ The README is the short overview. These pages hold the rest, one topic each.
|
|
|
9
9
|
| [Install and update](install.md) | npm or a git checkout, the doctor, what the installer does per CLI, updating |
|
|
10
10
|
| [Command reference](commands.md) | every `/forge` flag with examples, the `forge` command, the runner scripts and their exit codes |
|
|
11
11
|
| [Models, efforts and harnesses](models.md) | the `alias:effort:harness` spec, effort ladders and clamping, yolo mode, the model registry |
|
|
12
|
-
| [Decomposed runs](decomposed-runs.md) | decompose levels and difficulty, routing, waves, capsules, planning, resuming, split and combine, `tasks.tsv` |
|
|
12
|
+
| [Decomposed runs](decomposed-runs.md) | decompose levels and difficulty, routing, waves, capsules, planning, splitting a task into subtasks, resuming, split and combine, `tasks.tsv` |
|
|
13
13
|
| [Reviews, retries and recovery](reviews.md) | verdicts, retries, infrastructure stops, severity thresholds, accepting, whole-run and shadow reviews, guards, verification, fail-first |
|
|
14
|
-
| [Fractal execution](fractal.md) | the optional nested-execution backend: install, run, inspect, bounds and recovery |
|
|
15
14
|
| [Project memory](memory.md) | `.forge/memory.md` and the ledger, what each role is told, whether to commit it, spend |
|
|
16
15
|
| [forge-ui](forge-ui.md) | the run viewer: commands, the shared server, environment variables, privacy |
|
|
17
16
|
| [Run dataset](dataset.md) | every run's inputs and outcomes, kept for training decision models |
|
|
@@ -23,5 +22,5 @@ The README is the short overview. These pages hold the rest, one topic each.
|
|
|
23
22
|
| [Contributing](../CONTRIBUTING.md) | setting up, running the tests, the rules reviewers check, pull requests |
|
|
24
23
|
|
|
25
24
|
Deeper material that the skill itself reads lives in [`references/`](../references/): the
|
|
26
|
-
per-harness details, the decomposition
|
|
25
|
+
per-harness details, the decomposition contract, memory internals, Jev and the
|
|
27
26
|
dataset schema.
|
package/docs/add-ons.md
CHANGED
|
@@ -6,9 +6,11 @@ Two optional add-ons: Ripwire adds repository evidence to every prompt, and Jev
|
|
|
6
6
|
|
|
7
7
|
## Ripwire context
|
|
8
8
|
|
|
9
|
-
Forge automatically adds optional Ripwire 0.
|
|
10
|
-
and QA prompts across all six harnesses. Setup and interactive runners offer
|
|
11
|
-
|
|
9
|
+
Forge automatically adds optional Ripwire repository evidence (Ripwire 0.6 or later) to
|
|
10
|
+
planner, dwarf, and QA prompts across all six harnesses. Setup and interactive runners offer
|
|
11
|
+
to install the latest release; headless runs continue when it is missing. After a run, forge
|
|
12
|
+
tells you once a day when a newer Ripwire is out and, on a terminal, offers to update it
|
|
13
|
+
(`forge ripwire update`; `forge ripwire status` shows installed vs latest). Use `--no-ripwire`
|
|
12
14
|
or `FORGE_RIPWIRE=off` to disable it. Decomposed plans preserve opt-out across resumes
|
|
13
15
|
and retries. See [installation, controls and attempt artifacts](../references/ripwire.md).
|
|
14
16
|
|
package/docs/artifacts.md
CHANGED
|
@@ -120,7 +120,7 @@ A decomposed run adds:
|
|
|
120
120
|
retry_budget, infra_budget only while a scheduler runs: its live budgets (a number each)
|
|
121
121
|
after absolute path of the plan this one follows (`plan --after`)
|
|
122
122
|
integration.base commit the integration branch started from
|
|
123
|
-
verification.{status,exit,log,command,fingerprint} the combined verification; status PASS, FAIL or INTERRUPTED (a signal stopped it)
|
|
123
|
+
verification.{status,exit,log,command,fingerprint} the combined verification; status PASS, FAIL, STALE (a merge moved accepted.integration past verification.commit), UNVERIFIED or INTERRUPTED (a signal stopped it)
|
|
124
124
|
verification.{flaky,retry.log} only when a failing command passed on rerun (lanes: flaky alone, per lane)
|
|
125
125
|
verification.commit the integration commit that was verified
|
|
126
126
|
verification.runs.tsv one row per run of the verify command or of a lane (below)
|
|
@@ -131,6 +131,18 @@ A decomposed run adds:
|
|
|
131
131
|
verification.coverage.txt suites the verify command does not run (advisory)
|
|
132
132
|
verify_cmd, verify.d/ the plan's --verify command, or its --verify-lane lanes (one file per lane)
|
|
133
133
|
verify_parallel lanes run at once (--verify-parallel; default 3)
|
|
134
|
+
decomposition.json the split decisions of this plan's tasks: nodes (decision atomic|split|bounded, reason, by, at, limits_used); a root plan also holds limits (depth, children, nodes) and frozen
|
|
135
|
+
auto_split, split_planner present while run --auto-split is on; the planner it asks (--split-planner)
|
|
136
|
+
later.json, chain.json the stages a planner proposed after this plan; the stage this plan is, the first and the previous plan (written by next)
|
|
137
|
+
tree.slots/ root plan only: one lock file per task the whole tree may run at once (--max-parallel)
|
|
138
|
+
tasks/<id>/sub/ the subtasks of a split task: a plan dir of its own (tasks.tsv, run_id <run>--<id>, tasks/...), plus parent.json (task, run_id, start keep|fresh, by, at, reason)
|
|
139
|
+
tasks/<id>/sub.merged commit of the subtasks' work, once it is on the task's branch
|
|
140
|
+
tasks/<id>/sub.waiting the subtasks the task waits for, one per line (the task is BLOCKED and spent no attempt)
|
|
141
|
+
tasks/<id>/sub.kept --decide split=fresh: the commit of the earlier work, kept on refs/forge/kept/<run>/<id>
|
|
142
|
+
tasks/<id>/sub.out output of the subtasks' run
|
|
143
|
+
tasks/<id>/split.prompt, split/ the question asked of a planner about this task, and that dispatch (planner.prompt, planner.out, planner.last)
|
|
144
|
+
tasks/<id>/split.reason, split.refused why the planner kept the task whole; why proposed subtasks were refused
|
|
145
|
+
tasks/<id>/decisions.tsv also holds `retry=1 split` or `retry=1 split=fresh`: the decision to split
|
|
134
146
|
```
|
|
135
147
|
|
|
136
148
|
`verification.runs.tsv` is tab-separated, one row per run: `n`, `kind` (`initial` or `rerun`; runs
|
|
@@ -148,10 +160,13 @@ with worktrees and branches at:
|
|
|
148
160
|
<repo>/../.forge-worktrees/<run-id>/_group-<gid> group-review candidate; kept for the merge
|
|
149
161
|
forge/<run-id>/<task-id> task branch
|
|
150
162
|
forge/<run-id>-integration integration branch
|
|
163
|
+
<repo>/../.forge-worktrees/<run-id>--<task-id>/<subtask-id> a subtask's worktree (its run id is <run-id>--<task-id>)
|
|
164
|
+
forge/<run-id>--<task-id>/<subtask-id> a subtask's branch
|
|
165
|
+
forge/<run-id>--<task-id>-integration the subtasks' integration branch, merged into forge/<run-id>/<task-id>
|
|
151
166
|
```
|
|
152
167
|
|
|
153
168
|
A group review's files are what each outcome writes. The rules are in
|
|
154
|
-
[Groups and group review](../references/decompose.md#groups-and-group-review-opt-in).
|
|
169
|
+
[Groups and group review](../references/decompose-opt-in.md#groups-and-group-review-opt-in).
|
|
155
170
|
|
|
156
171
|
`control.log` lines look like
|
|
157
172
|
`{"at": 1761200000.5, "actor": "ui", "action": "set", "task": null, "key": "qa-threshold", "value": "P2", "previous": "P1"}`
|
package/docs/commands.md
CHANGED
|
@@ -12,12 +12,14 @@ harness (`/forge`); this command installs forge and drives its optional tools.
|
|
|
12
12
|
| Command | Does |
|
|
13
13
|
|---|---|
|
|
14
14
|
| `forge install [--dry-run]` | link forge into each agent harness on this machine; see [install](install.md) |
|
|
15
|
+
| `forge setup [--defaults \| --from FILE]` / `forge setup show [--json]` / `forge setup export` / `forge setup set KEY VALUE` | what a first run needs, asked once and saved as defaults: models (the default profile), review threshold and shadow review, `--sweep`, `--file-issues` and `--reviewer-session` defaults, brief, summaries and retro with their models, forge-ui (ask, always or never; read-only or with controls), this repository's memory (commit, local or off), decision models, storage, the update check and Ripwire. On a terminal only (`--defaults` and `--from` never prompt; without a terminal plain `forge setup` exits 2). `show` lists every answer, where it is stored and the command that changes it; `export` prints them as JSON for `--from` on another machine. Never calls a model; nothing is downloaded or sent unless an answer says so. See [setup](../references/setup.md) |
|
|
16
|
+
| `forge ripwire status [--check]` / `install` / `update [--version TAG]` | the optional Ripwire context engine: the installed and latest release (`--check` asks GitHub now), install the latest release, or replace the copy forge installed in `~/.local/bin`; see [Ripwire](../references/ripwire.md) |
|
|
15
17
|
| `forge update` | fast-forward a git checkout and refresh every harness installation; on an npm install it names the npm command instead. See [updating](install.md#updating-all-harness-installations) |
|
|
16
18
|
| `forge version [--check]` | the installed version, and whether a newer release is out |
|
|
17
|
-
| `forge
|
|
18
|
-
| `forge runs
|
|
19
|
-
| `forge handoff [show] [RUN_DIR \| --repo DIR] [--json]` / `note RUN_DIR TEXT [--actor A] [--json]` / `claim RUN_DIR --harness H [--session S] [--take-over] [--json]` / `resume RUN_DIR [--take-over] [--harness H] [--session S] [--json]` | the run for the next session. `show` is the default (`forge handoff` and `forge handoff RUN_DIR`); it writes nothing. `--repo DIR`, or no argument inside a checkout, reports that repo's newest registered plan that is live or still has a task not `MERGED`. The report has the run, its option files and `run.flags.json`, scheduler liveness, task states, what needs a person, the last `control.log` changes, tasks left `RUNNING`, notes newest first, the driver and the next commands. `note` appends one line to `handoff.notes.jsonl` (`--actor` defaults to `cli`; whitespace collapses; empty text, text over 2000 characters and text that is not UTF-8 are refused). `claim` requires `--harness H` (`[a-z0-9._-]{1,40}`) and writes `handoff.driver.json` (`harness`, `session`, `since`, `last_seen`); `--session S` is an id with no whitespace, at most 200 characters. A different driver last seen under 12 hours ago is refused unless `--take-over` (one `control.log` line, action `take-over`, actor `cli`, and a dataset `control` event). `resume` claims (`--harness` defaults to `unknown`), follows a live scheduler and starts nothing,
|
|
20
|
-
| `forge control show\|set\|pin\|unpin\|drain\|resume\|stop\|retry\|add PLAN_DIR …` | change a live plan: `set` takes `qa-threshold` (`P0`..`P3`, `none` or `default` for the plan, `inherit` per task), `timeout`, `escalate-after`, `escalate-effort` (`on`/`off`), `verify-retries`, `infra-backoff` (a backoff shape; `none` drops it), `infra-fallback` (`on`/`off`), `max-attempts` (a non-negative integer, `0` = no cap, and only with `--confirm`), `converge-window` (a non-negative integer), `pre-review-tests` (`on`/`off`), `pre-review-parallel` (1-64), `summaries` (`on`/`off`; on a finished run it also starts `forge summarize`), `retry-budget`, `infra-retries` or `max-parallel` (1-64) (the last three only while a scheduler runs; `--task ID` for `qa-threshold`, `retry-budget` and `summaries`, value `inherit` drops the override); `pin PLAN_DIR TASK SPEC` sets the model the task's next full retry uses once, `unpin` drops it. While a scheduler runs: `drain` starts nothing new until `resume` (a run with nothing left to start ends as usual); `stop [--now]` ends the run once the running tasks finish (`--now` interrupts them; `run` exits 130 without verifying, unless every task had merged by then: it then verifies and exits 0 as usual); `retry PLAN_DIR TASK [--dwarf SPEC]` queues a retry, including a `STALE` task (its `prompt.md` or `approach.md` changed during the attempt: it is re-dispatched with the new text on the same implementer, and `--dwarf` is refused). `retry PLAN_DIR TASK --answer TEXT` (or `--answer-file F`, `-` for stdin) answers a `NEEDS_INPUT` task: 1 to 8000 characters after stripping, no NUL, and not combined with `--dwarf` or `--decide`. On a live run it is queued and the scheduler writes `tasks/<id>/answer.md` and resumes the task; with no live run it prepares the task through `forge-parallel.sh retry --answer-file --no-dispatch` for the next `run` (`forge-parallel.sh retry --answer` itself is unchanged). `--json` prints `{"queued": true, "request"}` when queued and `{"queued": false, "prepared": true}` when prepared. `control.log` records the value `answer` and `answer_chars`, never the text (`--actor` `ui` or `cli`, default `cli`). A `NEEDS_DECISION` task instead needs `--decide retry=N` or `--decide
|
|
19
|
+
| `forge runs [--repo DIR \| --all] [--limit N] [--json]` | this repo's recent runs, newest first: run id, kind, age, task states, `N subtasks in M split task(s)` when tasks were split, verification and final review, goal, `after <run>` when the plan was chained, and the run dir. Read-only; the same summaries forge-ui shows. A split task's sub-plan is part of its run and is not listed by itself |
|
|
20
|
+
| `forge runs tree RUN_DIR [--json]` | a plan's tasks and, under each split task, its subtasks through every level: status, title, the decision (`split into N`, kept whole, `bounded`) and its reason, the limits of the run, and each sub-plan's directory. Read-only. See [Splitting a task into subtasks](decomposed-runs.md#splitting-a-task-into-subtasks) |
|
|
21
|
+
| `forge handoff [show] [RUN_DIR \| --repo DIR] [--json]` / `note RUN_DIR TEXT [--actor A] [--json]` / `claim RUN_DIR --harness H [--session S] [--take-over] [--json]` / `resume RUN_DIR [--take-over] [--harness H] [--session S] [--json]` | the run for the next session. `show` is the default (`forge handoff` and `forge handoff RUN_DIR`); it writes nothing. `--repo DIR`, or no argument inside a checkout, reports that repo's newest registered plan that is live or still has a task not `MERGED`. The report has the run, its option files and `run.flags.json`, scheduler liveness, task states, what needs a person, the last `control.log` changes, tasks left `RUNNING`, notes newest first, the driver and the next commands. `note` appends one line to `handoff.notes.jsonl` (`--actor` defaults to `cli`; whitespace collapses; empty text, text over 2000 characters and text that is not UTF-8 are refused). `claim` requires `--harness H` (`[a-z0-9._-]{1,40}`) and writes `handoff.driver.json` (`harness`, `session`, `since`, `last_seen`); `--session S` is an id with no whitespace, at most 200 characters. A different driver last seen under 12 hours ago is refused unless `--take-over` (one `control.log` line, action `take-over`, actor `cli`, and a dataset `control` event). `resume` claims (`--harness` defaults to `unknown`), follows a live scheduler and starts nothing, restarts nothing for a plan made with Fractal (removed in forge 0.23) and says so, and otherwise saves each stale `RUNNING` task's diff, resets that worktree, marks it `INTERRUPTED` without counting the attempt twice, prepares every `INTERRUPTED` task, does the same for the subtasks of each split task in their own plan, and restarts `run` detached from `run.flags.json`. `show` lists subtasks under their task (`subtasks` in `--json`), and what needs you names a subtask by path with the plan dir to answer it in. Exit 0 ok, 2 usage or not a run dir, 3 no run to report or another driver holds the run; a restart that cannot be launched exits 1. See [from another session](decomposed-runs.md#from-another-session-or-harness) |
|
|
22
|
+
| `forge control show\|set\|pin\|unpin\|models\|drain\|resume\|stop\|retry\|add PLAN_DIR …` | change a live plan: `set` takes `qa-threshold` (`P0`..`P3`, `none` or `default` for the plan, `inherit` per task), `timeout`, `escalate-after`, `escalate-effort` (`on`/`off`), `verify-retries`, `infra-backoff` (a backoff shape; `none` drops it), `infra-fallback` (`on`/`off`), `max-attempts` (a non-negative integer, `0` = no cap, and only with `--confirm`), `converge-window` (a non-negative integer), `pre-review-tests` (`on`/`off`), `pre-review-parallel` (1-64), `summaries` (`on`/`off`; on a finished run it also starts `forge summarize`; refused while the plan has no summaries model, naming the command that sets one), `summaries-model` (a spec the doctor accepts, or `default` to drop the plan's own: before planning that follows `forge config set summaries.model`, once planned it leaves none, so it is refused while summaries are on), `brief-model` (the same for brief change proposals, refused as `default` while brief is on and nothing would be left), `retry-budget`, `infra-retries` or `max-parallel` (1-64) (the last three only while a scheduler runs; `--task ID` for `qa-threshold`, `retry-budget` and `summaries`, value `inherit` drops the override); `pin PLAN_DIR TASK SPEC` sets the model the task's next full retry uses once (and prints the model id the spec runs), `unpin` drops it. `models PLAN_DIR TIER [--dwarf SPECS] [--qa SPECS]` sets the implementer and/or reviewer of every `low`, `medium` or `high` task that has not started yet (one spec, or a comma-separated pool handed out in task order, as `plan` does; started tasks and a scripted task's implementer are kept; no live run needed). While a scheduler runs: `drain` starts nothing new until `resume` (a run with nothing left to start ends as usual); `stop [--now]` ends the run once the running tasks finish (`--now` interrupts them; `run` exits 130 without verifying, unless every task had merged by then: it then verifies and exits 0 as usual); `retry PLAN_DIR TASK [--dwarf SPEC]` queues a retry, including a `STALE` task (its `prompt.md` or `approach.md` changed during the attempt: it is re-dispatched with the new text on the same implementer, and `--dwarf` is refused). `retry PLAN_DIR TASK --answer TEXT` (or `--answer-file F`, `-` for stdin) answers a `NEEDS_INPUT` task: 1 to 8000 characters after stripping, no NUL, and not combined with `--dwarf` or `--decide`. On a live run it is queued and the scheduler writes `tasks/<id>/answer.md` and resumes the task; with no live run it prepares the task through `forge-parallel.sh retry --answer-file --no-dispatch` for the next `run` (`forge-parallel.sh retry --answer` itself is unchanged). `--json` prints `{"queued": true, "request"}` when queued and `{"queued": false, "prepared": true}` when prepared. `control.log` records the value `answer` and `answer_chars`, never the text (`--actor` `ui` or `cli`, default `cli`). A `NEEDS_DECISION` task instead needs `--decide retry=N`, `--decide threshold=Pn` or `--decide files+=PATH[,PATH]` (paths no task declares, added to its `files`; logged as `files-added`, refused with nothing queued when another task declares one), or `--dwarf SPEC`, each with `--reason TEXT --approved`; a decision's `control.log` entry has `brief_changed` (whether the brief differs from what the last attempt was given, `null` when none recorded it); `add PLAN_DIR TASK` (a row appended to `tasks.tsv`) queues a request the scheduler applies or refuses. `steer PLAN_DIR TASK TEXT` (or `--file F`, `-` for stdin; 1 to 8000 characters, at most 20 waiting) queues a message for the task's next implementer attempt, live run or not: it starts nothing, goes into that attempt's implementer and reviewer prompts, and is logged as `steer` without its text (`--json` prints `{"queued": true, "waiting", "live", "chars"}`); a MERGED task refuses it. `show` (`--json` for JSON) also says whether the run is drained or stopping, prints an `INFRA` task's cause, and, while a scheduler is live, lists each infrastructure pause with its reset and "needs you". The text table lists each task's attempts against its cap (`9/8`, or `9/-` when there is no cap). Every change and every request's outcome is logged in `control.log`. Exit 2 invalid input, 3 refused. See [live controls](decomposed-runs.md#changing-a-run-while-it-works) |
|
|
21
23
|
| `forge config show [--repo DIR] [--json]` / `forge config set <key> <value> [--repo DIR] [--json]` / `forge config unset <key> [--repo DIR] [--json]` | one view of every config source (registry, the legacy Jev file, decide, the user `features`, the repo's `.forge/verify`, `setup` and `verify-subset`, dataset, `FORGE_*` variables with secrets hidden); `set` / `unset` edit `repo.verify`, `repo.setup`, `repo.verify-subset` (must contain `{files}` or `{changed}`; `--repo` required) and `decide.gate.<gate>`, `decide.gate.<gate>.provider`, `decide.gate.<gate>.model` (`off`, `shadow` or `on`; those write the user level and do not need `--repo`). They also set the user feature keys: `retro` (`off` or `on`), `brief` (`off`, `advisory`, `gated` or `strict`), `brief.scope` (`task`, `wave` or `plan`), `brief.model` (a spec), `summaries` (`off` or `on`), `summaries.model` (a spec), `storage.compact` (`auto`, the default, or `off`) and `storage.warn-gb` (gigabytes, `20` by default, or `off`; see [forge du](#forge-du)). Those write the user file and ignore `--repo`; `unset` removes one key. A bad value exits 2 and writes nothing. A model spec is checked for its form when it is set; whether it resolves is checked when `plan` uses it. Unset of a `decide.gate.*` key is refused: set the mode to `off`. `-` as a value reads stdin for the per-repo files. Exit 2 on invalid input |
|
|
22
24
|
| `forge config profile list\|show\|create\|edit\|set\|unset\|rm\|use` | named bundles of routing, policy, gates and budget in `decide.json`; see [below](#forge-config-profile) |
|
|
23
25
|
| `forge watch [RUN_DIR \| --repo DIR \| --all] [--interval S] [--settle S] [--until-done] [--no-notify] [--exec CMD]` | follow runs live: a line for every task status change, and a desktop notification, `--exec CMD` and the repo's `.forge/on-finish` when a run finishes or fails, a task fails or a final review gives its verdict; see [below](#forge-watch). Read-only |
|
|
@@ -25,16 +27,16 @@ harness (`/forge`); this command installs forge and drives its optional tools.
|
|
|
25
27
|
| `forge runs compact [RUN_DIR … \| --repo DIR \| --all] [--logs] [--older-than DAYS] [--dry-run] [--json]` | keep every run and take back what it holds for nothing: leftover review snapshots and, with `--logs`, gzipped log copies; see [below](#forge-runs-compact) |
|
|
26
28
|
| `forge du [--repo DIR \| --all] [--top N] [--json]` | what forge takes on disk (run dirs, worktree folders, its data home) and the command that takes each part back; see [below](#forge-du). Read-only |
|
|
27
29
|
| `forge worktrees rm PATH… [--branches] [--dry-run] [--json] [--actor {cli,ui}]` | remove `failed` and `finished` worktrees, and leftover folders, by forge-ui's rules (never `--force`; `--branches` is `git branch -d` on a finished worktree's merged branch). Exit 0 when no row failed, 4 when one did, 2 usage. See [below](#forge-worktrees-rm) |
|
|
28
|
-
| `forge runs rerun RUN_DIR --dwarf SPEC [--qa SPEC] [--to DIR] [--max-parallel N] [--dry-run] [--run --yes]` | set up the same plan again with another implementer, from the same starting commit; spends nothing unless `--run --yes`; never merges. See [below](#forge-runs-rerun-and-compare) |
|
|
30
|
+
| `forge runs rerun RUN_DIR --dwarf SPEC [--qa SPEC] [--to DIR] [--max-parallel N] [--dry-run] [--run --yes]` | set up the same plan again with another implementer, from the same starting commit; spends nothing unless `--run --yes`; never merges. See [below](#forge-runs-rerun-and-forge-runs-compare) |
|
|
29
31
|
| `forge runs compare RUN_A RUN_B [--json] [--no-record]` | two runs of one plan, side by side, per task; records the pair in the dataset |
|
|
30
32
|
| `forge memory show\|learnings\|prune\|spend\|forget\|add\|edit REPO …` | a repository's project memory. `learnings REPO --json` lists every learning with what forge does with it (`in_memory`, `waiting`, `stale`, `capped`, `muted`); a learning a person wrote has `manual: true` (the field is absent otherwise). `forget REPO KEY…` (`KEY` is `category:key`; `--dry-run`, `--json`, `--actor ui\|cli`) drops those ledger rows and rebuilds `memory.md`; a missing key is not an error. `add REPO --category verify\|trap\|finding --text T [--path P]…` appends one person row (kept at once). `edit REPO KEY --text T` replaces that learning and keeps its paths; a missing key is an error. `--json` on forget prints `{ok, dry_run, keys: [{key, rows, found}], memory_lines_removed}`; on add and edit `{ok, key, memory_lines_added, memory_lines_removed}`. Exit 0 ok, 2 usage. See [below](#forge-memory-forget) and [project memory](memory.md) |
|
|
31
33
|
| `forge issues RUN [--apply] …` | file the review findings a run left open as GitHub issues; see [below](#forge-issues) |
|
|
32
34
|
| `forge findings show\|fix\|dismiss\|reopen\|to-file\|dup\|tag\|note\|edit\|triage\|triage-status\|proposals\|apply\|reject REPO …` | every review finding of a repository and what happened to it. `REPO` is a checkout, a linked worktree, or a plan or solo run dir. `triage` is read-only and needs `--spec`. `--actor` is `cli` (default), `ui` or `triage`; `--json` is machine-readable. Exit 0 ok, 2 usage, 3 refused, 1 error. See [below](#forge-findings) |
|
|
33
35
|
| `forge pr [RUN_DIR \| --repo DIR] [--texts] [--paths] [--out FILE] [--create [--base B] [--head B]]` | a draft pull-request description for a finished run, on stdout; `--create` opens it as a draft PR with `gh`; see [below](#forge-pr) |
|
|
34
|
-
| `forge retro note\|report\|issues PLAN …` | retro notes on what got in a run's way (`plan --retro`): `note` records one by hand (`--type`, `--fixable-by`, `--summary`, and `--command`, `--exit`, `--error`, `--blocking`, `--tried` as needed), `report` writes `retro.md`, and `issues` drafts GitHub issues for forge's own repository and posts only with `--apply --approve HASH`. `record` is forge's own call after a dispatch. Exit 2 usage, 3 refused. See [retro notes](../references/decompose.md#retro-notes-opt-in) |
|
|
35
|
-
| `forge brief write\|show\|answer\|stale\|propose\|proposals\|apply\|reject PLAN …` | each task's open questions, asked before it starts (`plan --brief`), and the diff a wider answer waits on. `write` asks the missing ones (`--task ID`, `--jobs N`; `--force` redoes a task that already has `brief.json`). `show` lists them (`--task`, `--json`), parked questions by group and tasks marked `affected by <pid>`. `answer PLAN TASK QID TEXT` records an answer (`--file F`, `--actor`). A task answer goes into the prompt before the task starts and is late after. A parked `wave` or `plan` question is answerable only when `--brief-scope` is at least that wide; the answer is stored and the command prints `forge brief propose`. `stale PLAN TASK` flags dependents' open questions after a merge. `propose PLAN TASK QID` (`--actor`) turns that parked answer into `proposals/<pid>/`, one read-only dispatch. `proposals PLAN` (`--json`) lists every proposal with its state, scope, group, summary, diff and, while `proposed`, the apply line. `apply PLAN PID --approve HASH` (`--actor`, `--no-regenerate`) writes that diff. `--no-regenerate` marks affected tasks and does not regenerate their questions. `reject PLAN PID` (`--reason TEXT`, `--actor`) marks it `rejected` and touches no plan file. Exit 2 usage or an unknown task, question or proposal; 3 when PLAN is not a plan dir, when brief is off (`write`, `show`, `propose`), or when a proposal is refused (`propose`, `apply`, `reject`). See [brief mode](../references/decompose.md#brief-mode-opt-in) |
|
|
36
|
+
| `forge retro note\|report\|issues PLAN …` | retro notes on what got in a run's way (`plan --retro`): `note` records one by hand (`--type`, `--fixable-by`, `--summary`, and `--command`, `--exit`, `--error`, `--blocking`, `--tried` as needed), `report` writes `retro.md`, and `issues` drafts GitHub issues for forge's own repository and posts only with `--apply --approve HASH`. `record` is forge's own call after a dispatch. Exit 2 usage, 3 refused. See [retro notes](../references/decompose-opt-in.md#retro-notes-opt-in) |
|
|
37
|
+
| `forge brief write\|show\|answer\|stale\|propose\|proposals\|apply\|reject PLAN …` | each task's open questions, asked before it starts (`plan --brief`), and the diff a wider answer waits on. `write` asks the missing ones (`--task ID`, `--jobs N`; `--force` redoes a task that already has `brief.json`). `show` lists them (`--task`, `--json`), parked questions by group and tasks marked `affected by <pid>`. `answer PLAN TASK QID TEXT` records an answer (`--file F`, `--actor`). A task answer goes into the prompt before the task starts and is late after. A parked `wave` or `plan` question is answerable only when `--brief-scope` is at least that wide; the answer is stored and the command prints `forge brief propose`. `stale PLAN TASK` flags dependents' open questions after a merge. `propose PLAN TASK QID` (`--actor`) turns that parked answer into `proposals/<pid>/`, one read-only dispatch. `proposals PLAN` (`--json`) lists every proposal with its state, scope, group, summary, diff and, while `proposed`, the apply line. `apply PLAN PID --approve HASH` (`--actor`, `--no-regenerate`) writes that diff. `--no-regenerate` marks affected tasks and does not regenerate their questions. `reject PLAN PID` (`--reason TEXT`, `--actor`) marks it `rejected` and touches no plan file. Exit 2 usage or an unknown task, question or proposal; 3 when PLAN is not a plan dir, when brief is off (`write`, `show`, `propose`), or when a proposal is refused (`propose`, `apply`, `reject`). See [brief mode](../references/decompose-opt-in.md#brief-mode-opt-in) |
|
|
36
38
|
| `forge group show\|retry\|set PLAN …` | a plan's task groups (`plan --groups`, and `plan --group-review`). `show PLAN [--group GID] [--json]` is read-only: every group, and for a `review=group` group its round, status, implicated tasks and, when `NEEDS_DECISION`, the first line of `decision.md`. Exit 3 when there is no `groups.tsv`; exit 2 for an unknown group. `retry PLAN GID [--tasks a,b] [--reason TEXT]` answers an ambiguous `NEEDS_DECISION` (`--tasks` is required; those members become `FAIL`, and so does any member with its own blocking finding) or rearms `UNKNOWN`, `INFRA`, `TIMEOUT`, `INTERRUPTED` or `ERROR` to `INTERRUPTED` so the next run reviews again, with no member attempt spent. An oversized group is refused: split `groups.tsv` and run `plan` again. `set PLAN GID [--title T] [--goal G] [--reason TEXT]` rewrites a group's title or goal (one line each, at most 500 characters, empty for none) and freezes the groups again, logged as `group-set`; refused (exit 3) when the groups or a member's deps or files changed since `plan`. `--reason` is at most 2000 characters, logged in `control.log` with `actor` `cli`. Exit 0 ok, 2 usage or an unknown group or task (including `retry` with no `groups.tsv`), 3 refused (a state this command does not retry, or the control lock busy). A settle that fails returns that command's exit code. See [group review](reviews.md#group-review-opt-in) |
|
|
37
|
-
| `forge summarize PLAN [--task ID] [--force] [--json]` | a generated summary per task (`plan --summaries on`), in `tasks/<id>/summary.json`, rewritten only when its facts change. Exit 2 usage, 3 when PLAN is not a directory. See [task summaries](../references/decompose.md#task-summaries-opt-in) |
|
|
39
|
+
| `forge summarize PLAN [--task ID] [--force] [--json]` | a generated summary per task (`plan --summaries on`), in `tasks/<id>/summary.json`, rewritten only when its facts change. Exit 2 usage, 3 when PLAN is not a directory. See [task summaries](../references/decompose-opt-in.md#task-summaries-opt-in) |
|
|
38
40
|
| `forge ui open\|status\|stop` | forge-ui, the run viewer; see [the command group](forge-ui.md#forge-ui-command-group) |
|
|
39
41
|
| `forge dataset …` | every run's inputs and outcomes; see [run dataset](dataset.md) |
|
|
40
42
|
| `forge decide …` | decision-model gates, providers, budgets and the privacy floor; see [below](#forge-decide) |
|
|
@@ -336,7 +338,7 @@ dataset has history, and the command that starts it. `--run --yes` starts it (`-
|
|
|
336
338
|
refused, so the cost is read first); `--dry-run` creates nothing at all. It never merges: the
|
|
337
339
|
rerun only writes its own `forge/<new id>…` branches and worktrees, and your branch, the original
|
|
338
340
|
run and its branches are not touched. A plan that has a task still `RUNNING`, a solo run (no task
|
|
339
|
-
table), a plan that never started, and a Fractal
|
|
341
|
+
table), a plan that never started, and a plan made with Fractal (removed in forge 0.23) are refused, and a rerun that fails to
|
|
340
342
|
set up is removed again. Exit 0 ok, 2 bad input, 3 refused.
|
|
341
343
|
|
|
342
344
|
`forge runs compare <run-dir-A> <run-dir-B>` sets two runs of one repository side by side per
|
|
@@ -363,7 +365,7 @@ the size of a `--only` selection).
|
|
|
363
365
|
|
|
364
366
|
| Flag | Does |
|
|
365
367
|
|---|---|
|
|
366
|
-
| `--json` | machine-readable output; `findings` lists each one with its fingerprint, severity, origin (`tolerated`, `accepted`, `review` or `plausible`), task, `review`, `swept` (`{task, finding}` when the run's finding sweep fixed it; such a finding is never drafted), `filed` state, `dismissed` mark, `record` (the finding-record entry, or null) and `status` (`open`, `to-file`, `filed`, `fixed`, `dismissed`, `duplicate` or `swept`). A whole-run finding's `review` is `{name, outdated, merged_since}` (`outdated` is null when the review has no verdict or the plan has no accepted integration commit; `merged_since` is empty unless the review is outdated). Every other finding has `review` null |
|
|
368
|
+
| `--json` | machine-readable output; `findings` lists each one with its fingerprint, severity, origin (`tolerated`, `accepted`, `review` or `plausible`), task, `review`, `swept` (`{task, finding}` when the run's finding sweep fixed it; such a finding is never drafted), `filed` state, `dismissed` mark, `record` (the finding-record entry, or null) and `status` (`open`, `to-file`, `filed`, `fixed`, `dismissed`, `duplicate` or `swept`). A whole-run finding's `review` is `{name, outdated, merged_since}` (`outdated` is null when the review has no verdict or the plan has no accepted integration commit; `merged_since` is empty unless the review is outdated). Every other finding has `review` null. `online` is true when GitHub was asked for the filed state: false under `--offline`, and for a repository with no GitHub remote |
|
|
367
369
|
| `--offline` | never run `gh`: no filed state, commit publication judged from local refs |
|
|
368
370
|
| `--only FP` | keep only these 12-hex fingerprints (repeatable or comma-separated) |
|
|
369
371
|
| `--all-runs` | read `RUN` as a repository (or a plan dir naming one) and collect every run of that repository: the main checkout, linked worktrees, and checkouts that are gone. The newest plan wins for a finding present in several |
|
|
@@ -493,7 +495,7 @@ a digit.
|
|
|
493
495
|
| `use --none` | clear `default_profile` at this level |
|
|
494
496
|
|
|
495
497
|
`set` and `unset` accept `routing.dwarf.<tier>`, `routing.qa.<tier>` (`tier` is `any`,
|
|
496
|
-
`low`, `medium` or `high`), `routing.planner`,
|
|
498
|
+
`low`, `medium` or `high`), `routing.planner`,
|
|
497
499
|
`routing.final_reviewer`, `routing.escalate_after`, `routing.escalate_effort`,
|
|
498
500
|
`policy.qa_threshold`, `policy.retry_failed`, `policy.infra_retries`,
|
|
499
501
|
`policy.verify_retries`, `policy.timeout`, `policy.explore`, `policy.shadow_rate`,
|
|
@@ -538,11 +540,10 @@ file takes the flags on `run` or `retry` and freezes them then.
|
|
|
538
540
|
[--yolo-dwarf] [--yolo-qa] [--repo <dir>] [--native-review]
|
|
539
541
|
[--no-memory] [--gate NAME=MODE[,...]] [--no-gates]
|
|
540
542
|
[--decide-budget tokens=N[,usd=X]]
|
|
541
|
-
[--timeout <seconds>] [--ui | --no-ui]
|
|
542
|
-
[--fractal-auto-decompose] [--fractal-planner <spec>]
|
|
543
|
-
[--fractal-depth <n>] [--fractal-children <n>] [--fractal-nodes <n>]
|
|
544
|
-
[--fractal-iterations <n>] [--fractal-concurrency <n>] [--fractal-deadline <s>]
|
|
543
|
+
[--timeout <seconds>] [--ui | --no-ui]
|
|
545
544
|
[--decompose-level low|medium|high] [--collapse-chains]
|
|
545
|
+
[--split-depth <n>] [--split-children <n>] [--split-nodes <n>]
|
|
546
|
+
[--auto-split [--split-planner <spec>]]
|
|
546
547
|
[--plan auto|always|never] [--max-parallel <n>]
|
|
547
548
|
[--dwarf-high <spec>] [--dwarf-medium <spec>] [--dwarf-low <spec>]
|
|
548
549
|
[--qa-high <spec>] [--qa-medium <spec>] [--qa-low <spec>]
|
|
@@ -571,25 +572,19 @@ file takes the flags on `run` or `retry` and freezes them then.
|
|
|
571
572
|
| `--max-parallel <n>` | `3` | concurrent task pipelines |
|
|
572
573
|
| `--dwarf-high/-medium/-low` | — | per-difficulty routing; comma-list pools models |
|
|
573
574
|
| `--qa-high/-medium/-low` | — | same, for reviewers |
|
|
574
|
-
| `--
|
|
575
|
-
| `--
|
|
576
|
-
| `--
|
|
577
|
-
| `--
|
|
578
|
-
| `--
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
task boundary. Pools and Fractal limits are frozen for an existing run.
|
|
588
|
-
|
|
589
|
-
Before an interactive run, forge asks **“Use Fractal for this run? [y/N]”** once.
|
|
590
|
-
Pass `--fractal` or `--no-fractal` to answer explicitly; unattended runs default off.
|
|
591
|
-
It also asks **“Open forge-ui to watch this run? [y/N]”** (`--ui` / `--no-ui`); on a yes,
|
|
592
|
-
the [forge-ui](forge-ui.md) page opens as soon as the run exists. Resume and retry never ask.
|
|
575
|
+
| `--split-depth <n>` | `2` | decomposed runs: levels of subtasks a task may be split into; `0` turns splitting off. See [Splitting a task into subtasks](decomposed-runs.md#splitting-a-task-into-subtasks) |
|
|
576
|
+
| `--split-children <n>` | `6` | most subtasks one split may make |
|
|
577
|
+
| `--split-nodes <n>` | `24` | most subtasks in the whole run, over every level |
|
|
578
|
+
| `--auto-split` | off | a task that stops for a decision on `split` is split by the planner within those limits, without waiting for you |
|
|
579
|
+
| `--split-planner <spec>` | the run's planner | the model `--auto-split` asks |
|
|
580
|
+
|
|
581
|
+
`--fractal`, `--no-fractal` and every `--fractal-…` flag were removed with Fractal in forge
|
|
582
|
+
0.23, as was `forge fractal`: each exits 2 with one line that says so. A task is split into
|
|
583
|
+
subtasks by forge itself now.
|
|
584
|
+
|
|
585
|
+
Before an interactive run, forge asks **“Open forge-ui to watch this run? [y/N]”** (`--ui` /
|
|
586
|
+
`--no-ui`); on a yes, the [forge-ui](forge-ui.md) page opens as soon as the run exists. Resume
|
|
587
|
+
and retry never ask.
|
|
593
588
|
|
|
594
589
|
For what `--native-review` trades away, see [native review](reviews.md#native-review).
|
|
595
590
|
|
|
@@ -724,10 +719,19 @@ not always the end: a background task that completes wakes the session for anoth
|
|
|
724
719
|
turn under way is never ended by the grace, however long it is silent. The grace is long
|
|
725
720
|
because that wake-up can come many minutes later. `<role>.resolved` records `result_grace=`.
|
|
726
721
|
|
|
722
|
+
**Live steering (#252).** forge-parallel dispatches an implementer with `--steer <plan> <task>
|
|
723
|
+
<attempt>`. On claude and openclaude (not on Windows, and not with `FORGE_LIVE_STEER=off`) it then
|
|
724
|
+
runs with `--input-format stream-json --replay-user-messages`, its stdin fed by `forge-control.py
|
|
725
|
+
_steer-feed`: the prompt first, then each `forge control steer --now` message. A CLI whose help lacks
|
|
726
|
+
those flags runs as before, with a note. The feeder stops at the model's final result; unsent
|
|
727
|
+
messages go back to the task's queue. Its input stays open, so the CLI never exits by itself: with
|
|
728
|
+
no background task open, forge ends it after `FORGE_LIVE_GRACE` seconds of silence (default 10) and
|
|
729
|
+
the result stands (`ended_by=live`). `<role>.resolved` records `steer=live`.
|
|
730
|
+
|
|
727
731
|
On `3` or `4`, forge shows you the actual error rather than substituting a different model —
|
|
728
732
|
quietly swapping backends hides the fact that the one you picked is broken.
|
|
729
733
|
|
|
730
|
-
**Process hygiene.** Unless `FORGE_ORPHAN_GUARD=off
|
|
734
|
+
**Process hygiene.** Unless `FORGE_ORPHAN_GUARD=off`, the harness
|
|
731
735
|
is started in its own session, and after it exits any process still alive in that session is
|
|
732
736
|
listed in `<role>.orphans` and stopped, so a backgrounded measurement cannot outlive the
|
|
733
737
|
dispatch. The timeout watchdog and the exit trap signal the whole session too. A tool that leaves
|
|
@@ -763,8 +767,7 @@ forge-solo.sh <run-dir> --repo <dir> --dwarf <spec> [--qa <spec>]
|
|
|
763
767
|
[--gate NAME=MODE[,...]] [--no-gates] [--decide-budget tokens=N[,usd=X]]
|
|
764
768
|
[--fail-first] [--qa-threshold P0|P1|P2|P3|none]
|
|
765
769
|
[--fast dwarf|qa|none] [--profile NAME | --no-profile]
|
|
766
|
-
[--
|
|
767
|
-
[--dwarf-low <pool>] [--dwarf-medium <pool>] [--dwarf-high <pool>] [--retry]
|
|
770
|
+
[--retry]
|
|
768
771
|
```
|
|
769
772
|
|
|
770
773
|
`--profile` and `--fast` are the same flags as on `plan`, with two solo limits: `--fast`
|
|
@@ -787,11 +790,10 @@ You write two files into the run directory; forge does the rest:
|
|
|
787
790
|
| `changes.diff` | exactly what the reviewer read |
|
|
788
791
|
| `verdict` | `PASS`, `FAIL`, `UNKNOWN` or `NOCHANGES` |
|
|
789
792
|
| `<role>.{input,log,resolved,cmd}` | the prompt, the transcript, the resolution, the command |
|
|
790
|
-
| `fractal-selection.json` | persisted backend choice; enabled runs include their managed run ID |
|
|
791
793
|
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
794
|
+
A solo run has one implementer: `--dwarf-low`, `--dwarf-medium` and `--dwarf-high`, which only
|
|
795
|
+
routed Fractal's child tasks, were removed with it in forge 0.23 and exit 2. A solo directory an
|
|
796
|
+
earlier forge ran under Fractal (`fractal-selection.json` says so) can be read but not run again.
|
|
795
797
|
|
|
796
798
|
```bash
|
|
797
799
|
RUN="$(mktemp -d /tmp/forge-XXXXXX)"
|
|
@@ -844,6 +846,7 @@ forge-parallel.sh plan <plan-dir> --repo <dir> [--after <plan-dir>] [routin
|
|
|
844
846
|
[--implementer-session | --no-implementer-session]
|
|
845
847
|
[--explore E] [--ui | --no-ui] [--fail-first | --no-fail-first]
|
|
846
848
|
[--pre-review-tests | --no-pre-review-tests] [--pre-review-parallel N]
|
|
849
|
+
[--setup-before-verify | --no-setup-before-verify]
|
|
847
850
|
[--qa-threshold P0|P1|P2|P3|none|default]
|
|
848
851
|
[--profile NAME | --no-profile] [--fast ROLES] [--collapse-chains]
|
|
849
852
|
[--groups waves|FILE] [--group-review]
|
|
@@ -852,34 +855,40 @@ forge-parallel.sh plan <plan-dir> --repo <dir> [--after <plan-dir>] [routin
|
|
|
852
855
|
[--converge-window N] [--no-infra-fallback]
|
|
853
856
|
[--retro | --no-retro] [--brief advisory|gated|strict|off] [--brief-scope task|wave|plan]
|
|
854
857
|
[--brief-model SPEC] [--summaries on|off] [--summaries-model SPEC]
|
|
858
|
+
[--split-depth N] [--split-children N] [--split-nodes N]
|
|
855
859
|
forge-parallel.sh auto <plan-dir> --repo <dir> --goal-file <file> [--planner <spec>]
|
|
856
860
|
[--decompose-level L] [--plan auto|always|never]
|
|
857
861
|
[--one-task-difficulty low|medium|high]
|
|
858
862
|
[--no-collapse] [--approved] [plan flags...] [-- run flags...]
|
|
859
863
|
forge-parallel.sh run <plan-dir> [--max-parallel N] [--yolo-dwarf] [--yolo-qa] [--dry-run]
|
|
860
864
|
[--verify <cmd> | --verify-lane 'name[opts]=cmd' ...]
|
|
861
|
-
[--verify-parallel N] [--setup <cmd>] [--timeout S]
|
|
865
|
+
[--verify-parallel N] [--setup <cmd>] [--setup-before-verify | --no-setup-before-verify] [--timeout S]
|
|
862
866
|
[--retry-failed N] [--infra-retries M] [--infra-backoff SHAPE]
|
|
863
867
|
[--infra-fallback | --no-infra-fallback]
|
|
864
868
|
[--qa-threshold P0|P1|P2|P3|none|default] [--verify-retries N]
|
|
865
869
|
[--escalate-after N] [--escalate-effort | --no-escalate-effort]
|
|
866
870
|
[--sweep P0|P1|P2|P3 [--sweep-plausible] [--sweep-max N]]
|
|
867
871
|
[--sweep-ahead | --no-sweep-ahead] [--attribute | --no-attribute]
|
|
868
|
-
[--
|
|
872
|
+
[--auto-split [--split-planner <spec>] | --no-auto-split]
|
|
869
873
|
forge-parallel.sh retry <plan-dir> <task-id> [--dwarf <spec>] [--answer <text> | --answer-file <file>]
|
|
870
874
|
[--decide retry=N|threshold=Pn] [--reason "<why>" --approved]
|
|
875
|
+
[--decide split|split=fresh (--subtasks <file> | --planner <spec>)
|
|
876
|
+
--reason "<why>" --approved] [--no-dispatch]
|
|
871
877
|
[--timeout S]
|
|
872
878
|
[--qa-threshold P0|P1|P2|P3|none|default] [--verify-retries N]
|
|
873
879
|
[--verify <cmd> | --verify-lane 'name[opts]=cmd' ...] [--verify-parallel N]
|
|
874
880
|
[--escalate-after N] [--escalate-effort | --no-escalate-effort]
|
|
875
881
|
forge-parallel.sh accept <plan-dir> <task-id> --reason "<why>" --approved
|
|
876
882
|
forge-parallel.sh adopt <plan-dir> <commit|a..b> | --head --reason "<why>" [--qa <spec>] [--yolo-qa] [--approved]
|
|
883
|
+
[--resubmit <adopt-dir>] [--decide resubmit]
|
|
877
884
|
forge-parallel.sh review <plan-dir> [--qa <spec>] [--yolo-qa] [--qa-threshold P0|P1|P2|P3|none|default]
|
|
878
885
|
forge-parallel.sh attribute <plan-dir> [--force]
|
|
886
|
+
forge-parallel.sh verify <plan-dir> [--verify-retries N] [--verify-parallel N] [--setup-before-verify | --no-setup-before-verify]
|
|
879
887
|
forge-parallel.sh integrate <plan-dir> --approved [--final-review <qa-spec>] [--verify-retries N]
|
|
880
|
-
[--verify-parallel N]
|
|
888
|
+
[--verify-parallel N] [--setup-before-verify | --no-setup-before-verify]
|
|
881
889
|
forge-parallel.sh split <plan-dir> <new-plan-dir> --tasks <id,id> [--dry-run]
|
|
882
890
|
forge-parallel.sh combine <new-plan-dir> <plan-dir> <plan-dir>... [--verify <cmd>] [--dry-run]
|
|
891
|
+
forge-parallel.sh next <plan-dir> [<new-plan-dir>] [--planner <spec>] [plan flags...]
|
|
883
892
|
```
|
|
884
893
|
|
|
885
894
|
| Subcommand | Does |
|
|
@@ -889,10 +898,18 @@ forge-parallel.sh combine <new-plan-dir> <plan-dir> <plan-dir>... [--verify <c
|
|
|
889
898
|
| `run` | schedule ready tasks; per task: worktree → dwarf → diff → QA → status; merge passing tasks onto the integration branch |
|
|
890
899
|
| `retry` | re-run **one** failed task in the worktree it already has, with its reviewer's findings in the prompt; with `--answer` or `--answer-file`, answer a `NEEDS_INPUT` task and run it; with `--decide` or `--dwarf` plus `--reason` and `--approved`, decide a `NEEDS_DECISION` task and run it |
|
|
891
900
|
| `attribute` | after a failed combined verification, search the merge order for **a merge that breaks it**; merges, revises and accepts nothing. See below |
|
|
901
|
+
| `adopt` | review a range made outside forge on its own and bring it into the integration branch. A range that extends a refused one (or `--resubmit <adopt-dir>`) is reviewed as the next submission: the reviewer gets the previous findings, the commits and diff since, and settles each finding and its siblings first. After `--escalate-after` refusals (3 by default) the work waits for a decision: `--decide resubmit`, `--approved`, or adopt it in parts |
|
|
902
|
+
| `verify` | run the plan's verification of its integration branch again, and nothing else: after a lane was fixed, or to tell a flaky failure from a real one. Dispatches no model; refuses a branch that moved outside the run (adopt it first) |
|
|
892
903
|
| `integrate` | **never automatic** — merge the integration branch into your branch |
|
|
893
904
|
| `accept` | **only on your explicit instruction** — merge a `FAIL`/`UNKNOWN` task's reviewed work anyway, recording why |
|
|
894
905
|
| `review` | **opt-in, spends QA quota** — one reviewer reads the whole combined result; read-only |
|
|
895
906
|
| `split` / `combine` | move tasks into a plan of their own / join fully merged plans into one |
|
|
907
|
+
| `next` | plan the next stage of a goal larger than one plan, once `<plan-dir>` has merged: the new plan starts from its integration branch with its pools, options and limits, and stops at its table. See [A goal larger than one plan](decomposed-runs.md#a-goal-larger-than-one-plan) |
|
|
908
|
+
|
|
909
|
+
A `<plan-dir>` may be the sub-plan of a split task (`<plan-dir>/tasks/<id>/sub`): `retry`,
|
|
910
|
+
`accept` and `forge control` work on a subtask there as on any task. `run` on the plan above
|
|
911
|
+
runs it; `integrate`, `split`, `combine` and `next` refuse a sub-plan (exit 3), and `split` refuses
|
|
912
|
+
to move a task that has subtasks.
|
|
896
913
|
|
|
897
914
|
A `tasks.tsv` row whose `dwarf` column is `script` runs the executable `tasks/<id>/run`. `plan` exits 2 when that file is missing or not executable, does not route the row, skips its implementer doctor, shows it in the table and counts no implementer dispatch. The `qa` column is still a model. See [Scripted tasks](../references/decompose.md#scripted-tasks).
|
|
898
915
|
|
|
@@ -911,13 +928,18 @@ A `tasks.tsv` row whose `dwarf` column is `script` runs the executable `tasks/<i
|
|
|
911
928
|
| `--converge-window N` | plan | `converge_window` | reviews the non-converging signal looks at (default `4` when the file is absent; below `2` it never fires). Changing it later is `forge control set converge-window N` |
|
|
912
929
|
| `--max-attempts N` | plan | `max_attempts` | attempts a task may spend across runs before it stops for a decision (default `8` when the file is absent; `0` means no cap). Changing it later is `forge control set max-attempts N --confirm` |
|
|
913
930
|
| `--retry-per-model N` / `--no-retry-per-model` | plan | `retry_per_model` | a task may fail `N` times (1 to 99) on each model the retry policy gives it, then it moves one rung up and the count starts again. With `escalate_effort` on, the same `N` applies to each effort of that model. Replaces `--escalate-after` for this plan: when `escalate_after` is also present, `run` says so and follows `retry_per_model`. `--no-retry-per-model` removes the file; a re-plan with neither keeps it. Automatic retries still need `--retry-failed` above 0. See [a budget per model](reviews.md#a-budget-per-model---retry-per-model-n) |
|
|
931
|
+
| `--decide split` / `--decide split=fresh` | retry | `tasks/<id>/sub`, `decomposition.json`, `decisions.tsv` | split a task that has not passed and is not running (`FAIL`, `UNKNOWN`, `INTERRUPTED`, `NEEDS_DECISION`, or not started yet) into subtasks, with `--subtasks FILE` (a `forge-plan` block or its JSON: `reason` and `tasks`) or `--planner SPEC` (one read-only planner dispatch about this task). `split` keeps the task's work and the subtasks build on it; `split=fresh` starts from the task's base and keeps the earlier work on `refs/forge/kept/<run>/<id>`. Needs `--reason` and `--approved`. Exit 2 when the task was not split: the answer kept it whole, a limit bounded it, or the subtasks were refused. See [Splitting a task into subtasks](decomposed-runs.md#splitting-a-task-into-subtasks) |
|
|
932
|
+
| `--split-depth N` / `--split-children N` / `--split-nodes N` | plan | `decomposition.json` (`limits`) | the limits of every split: levels of subtasks (default `2`, `0` = no splitting), subtasks per split (`6`), subtasks in the whole run (`24`). Shown under the task table. The first `run` freezes them; a `plan` that would change one after that exits 2 |
|
|
933
|
+
| `--auto-split` / `--no-auto-split` | run | `auto_split` | a task that stops for a decision with `split` among its reasons is split by the planner within the limits, once per task, and the run goes on with its subtasks. Off by default: the task waits for your `retry --decide split` |
|
|
934
|
+
| `--split-planner SPEC` | run | `split_planner` | the model `--auto-split` asks; default the planner the plan was made with. With neither, `--auto-split` exits 2: forge does not pick a model |
|
|
914
935
|
| `--decide retry=N` / `--decide threshold=Pn` | retry | no — this retry only | resume a `NEEDS_DECISION` task: `N` more attempts (`N` from 1 to 20) or this task's blocking threshold (`P0`..`P3`) and then one retry. Needs `--reason` and `--approved`. Refused on any other status |
|
|
915
936
|
| `--qa-threshold P0\|P1\|P2\|P3\|none\|default` | plan, run, retry, review | `qa_threshold` | the least severe CONFIRMED finding that still blocks (default `P2`); milder ones become known issues; `none` means P3, `default` removes the setting. Solo takes `P0`..`P3` or `none`. See [the verdict rule](reviews.md#verdicts-and-failure) |
|
|
916
937
|
| `--verify-retries N` | run, retry, integrate | `verify_retries` | reruns of a failed verify command, or of each failed lane (default `1`, `0` = strict single run); with `.forge/verify-subset`, a failed command's failing test files run alone first and confirm a regression without a full rerun |
|
|
917
|
-
| `--verify-lane 'name[opts]=cmd'` | run, retry | `verify.d/<name>` | one verification lane; repeatable. Options as in a lane file, comma-separated (`group=g`, `first`, `retries=n`, `reports=dir`, `baseline=file`). The first one of an invocation replaces the plan's earlier lanes and `--verify`; see [verification lanes](../references/decompose.md#execution-checks-and-integration-verification) |
|
|
938
|
+
| `--verify-lane 'name[opts]=cmd'` | run, retry | `verify.d/<name>` | one verification lane; repeatable. Options as in a lane file, comma-separated (`group=g`, `first`, `retries=n`, `reports=dir`, `baseline=file`). The first one of an invocation replaces the plan's earlier lanes and `--verify`; see [verification lanes](../references/decompose-integration.md#execution-checks-and-integration-verification) |
|
|
918
939
|
| `--verify-parallel N` | run, retry, integrate | `verify_parallel` | lanes run at once, 1 to 32 (default `3`) |
|
|
940
|
+
| `--setup-before-verify` | plan, run, retry, integrate, verify | `setup_before_verify` | re-run worktree setup in the integration checkout before verification whenever commits (or `.forge/setup-inputs` entries, when present) changed since setup (off by default; `--no-setup-before-verify` turns it off). Without it, a failed verify after a lockfile or `.forge/setup-inputs` merge warns about stale setup |
|
|
919
941
|
| `--escalate-after N` | run, retry | `escalate_after` | failed attempts on one model before the next goes a tier up (default `3`, `0` = off). When `retry_per_model` is set, that count is the trigger instead |
|
|
920
|
-
| `--pre-review-tests` | plan | `pre_review_tests` | before each review, run only the tests the attempt affects; a red attempt goes back to its implementer unreviewed (off by default; `--no-pre-review-tests` turns it off). See [pre-review tests](../references/decompose.md#pre-review-tests-opt-in) |
|
|
942
|
+
| `--pre-review-tests` | plan | `pre_review_tests` | before each review, run only the tests the attempt affects; a red attempt goes back to its implementer unreviewed (off by default; `--no-pre-review-tests` turns it off). See [pre-review tests](../references/decompose-review.md#pre-review-tests-opt-in) |
|
|
921
943
|
| `--pre-review-parallel N` | plan | `pre_review_parallel` | how many of those checks run at once across tasks, 1 to 64 (default `2`) |
|
|
922
944
|
| `--sweep Pn` | run | no — this run only | once every task has merged, fix the open findings at `Pn` or worse in a few extra tasks, one per file, each with a narrow review; the plan goes to `sweep/plan.md`. Once per plan; what it does not fix stays for `forge issues`. See [the finding sweep](reviews.md#fixing-them-in-the-run-the-finding-sweep-opt-in) |
|
|
923
945
|
| `--sweep-plausible` | run | no — this run only | the sweep also takes PLAUSIBLE findings of passed tasks |
|
|
@@ -929,16 +951,16 @@ A `tasks.tsv` row whose `dwarf` column is `script` runs the executable `tasks/<i
|
|
|
929
951
|
| `--no-profile` | plan | removes `profile.json` | no profile. `routed.json` stays |
|
|
930
952
|
| `--fast ROLES` | plan | `fast` | which of `dwarf`, `qa`, `planner`, `review` ask for the fast tier (`all` or `none`). Omitted on a re-plan, the file stays; `none` removes it. See [below](#the-fast-tier) |
|
|
931
953
|
| `--collapse-chains` | plan | no — this call only | merge a chain into one task named `combined`, after validation and before routing. A one-task or branching plan is unchanged. An already collapsed plan is not an error. See [below](#collapse-chains) |
|
|
932
|
-
| `--after DIR` | plan | `after`, `integration.base` | start from plan DIR's integration branch. DIR is a plan of the same repo whose tasks are all `MERGED`, whose integration tip equals `accepted.integration`, and whose scheduler is not live. Otherwise exit 2, and the plan directory and branches stay as they were. Creates `forge/<run>-integration` at that tip. A later `plan` without the flag keeps it. `run` exits 3 if DIR moved before this plan has merged a task. See [Chained plans](../references/decompose.md#chained-plans) |
|
|
933
|
-
| `--groups waves\|FILE` | plan | `groups.tsv`, `groups.frozen` | opt-in. `waves` writes one group per computed wave of at least two tasks; `FILE` copies that `groups.tsv`. An existing `groups.tsv` and no flag is kept. Then validated, its group QA resolved, and frozen. `run` refuses when the file or a member's deps or files changed. See [Groups and group review](../references/decompose.md#groups-and-group-review-opt-in) |
|
|
954
|
+
| `--after DIR` | plan | `after`, `integration.base` | start from plan DIR's integration branch. DIR is a plan of the same repo whose tasks are all `MERGED`, whose integration tip equals `accepted.integration`, and whose scheduler is not live. Otherwise exit 2, and the plan directory and branches stay as they were. Creates `forge/<run>-integration` at that tip. A later `plan` without the flag keeps it. `run` exits 3 if DIR moved before this plan has merged a task. See [Chained plans](../references/decompose-integration.md#chained-plans) |
|
|
955
|
+
| `--groups waves\|FILE` | plan | `groups.tsv`, `groups.frozen` | opt-in. `waves` writes one group per computed wave of at least two tasks; `FILE` copies that `groups.tsv`. An existing `groups.tsv` and no flag is kept. Then validated, its group QA resolved, and frozen. `run` refuses when the file or a member's deps or files changed. See [Groups and group review](../references/decompose-opt-in.md#groups-and-group-review-opt-in) |
|
|
934
956
|
| `--group-review` | plan | the `review` column | with `--groups waves` only: those groups are `review=group` (one QA review for the group). High-difficulty tasks stay out. Without `waves`, `plan` exits 2 |
|
|
935
957
|
| `--group-max-tasks N` | plan | `group_max_tasks`, only when given | most members of a review group (default 6). A positive integer. Deriving waves needs at least 2 |
|
|
936
958
|
| `--group-max-diff-kb N` | plan | `group_max_diff_kb`, only when given | largest combined diff a group review will read, in KB (default 256). Over it, the group stops for a decision and nothing is truncated |
|
|
937
|
-
| `--retro` / `--no-retro` | plan | `retro_mode` | agents record what got in their way, as retro notes. Off by default. Without either flag the plan keeps its earlier choice; a first plan takes the user setting (`forge config set retro on`). See [retro notes](../references/decompose.md#retro-notes-opt-in) |
|
|
938
|
-
| `--brief advisory\|gated\|strict\|off` | plan | `brief` | one read-only dispatch per task writes its open questions before the task starts. `advisory` lets the run go on, `gated` holds a task with an unanswered must-answer question, and `strict` makes `run` exit `3` while any question is open. `off` turns it off. On needs `--brief-model` (or `forge config set brief.model`), else exit `2`. See [brief mode](../references/decompose.md#brief-mode-opt-in) |
|
|
939
|
-
| `--brief-scope task\|wave\|plan` | plan | `brief_scope` | which parked questions can be answered. Default `task`: a task answer goes into that task's prompt, and a `wave` or `plan` question stays in `brief.parked.json` until a proposal is approved. `wave` also answers wave questions; the proposal may change the prompt, approach and files of unstarted members of that question's group, which must be in `groups.tsv`. `plan` answers wave and plan questions; a plan proposal may also add, remove and split tasks and change deps. See [brief mode](../references/decompose.md#brief-mode-opt-in). Only with brief on |
|
|
959
|
+
| `--retro` / `--no-retro` | plan | `retro_mode` | agents record what got in their way, as retro notes. Off by default. Without either flag the plan keeps its earlier choice; a first plan takes the user setting (`forge config set retro on`). See [retro notes](../references/decompose-opt-in.md#retro-notes-opt-in) |
|
|
960
|
+
| `--brief advisory\|gated\|strict\|off` | plan | `brief` | one read-only dispatch per task writes its open questions before the task starts. `advisory` lets the run go on, `gated` holds a task with an unanswered must-answer question, and `strict` makes `run` exit `3` while any question is open. `off` turns it off. On needs `--brief-model` (or `forge config set brief.model`), else exit `2`. See [brief mode](../references/decompose-opt-in.md#brief-mode-opt-in) |
|
|
961
|
+
| `--brief-scope task\|wave\|plan` | plan | `brief_scope` | which parked questions can be answered. Default `task`: a task answer goes into that task's prompt, and a `wave` or `plan` question stays in `brief.parked.json` until a proposal is approved. `wave` also answers wave questions; the proposal may change the prompt, approach and files of unstarted members of that question's group, which must be in `groups.tsv`. `plan` answers wave and plan questions; a plan proposal may also add, remove and split tasks and change deps. See [brief mode](../references/decompose-opt-in.md#brief-mode-opt-in). Only with brief on |
|
|
940
962
|
| `--brief-model SPEC` | plan | `brief_model` | the model that writes the questions. Required with brief on; forge never picks one |
|
|
941
|
-
| `--summaries on\|off` | plan | `summaries` | a generated summary per task in `tasks/<id>/summary.json`, rewritten only when its facts change. Off by default. See [task summaries](../references/decompose.md#task-summaries-opt-in) |
|
|
963
|
+
| `--summaries on\|off` | plan | `summaries` | a generated summary per task in `tasks/<id>/summary.json`, rewritten only when its facts change. Off by default. See [task summaries](../references/decompose-opt-in.md#task-summaries-opt-in) |
|
|
942
964
|
| `--summaries-model SPEC` | plan | `summaries_model` | the model that writes the summaries. Required with summaries on; forge never picks one |
|
|
943
965
|
|
|
944
966
|
**Exit codes:** `0` ok · `2` usage or validation · `3` precondition (not a git repo, …), and `run` on a strict brief plan with open questions (nothing starts) ·
|
|
@@ -988,9 +1010,9 @@ select `balanced` by itself. `--no-profile` removes `profile.json`. `routed.json
|
|
|
988
1010
|
so a later profile can still tell a model routing wrote from one written by hand.
|
|
989
1011
|
|
|
990
1012
|
`run` and `retry` read three things from the frozen file when this invocation did not pass
|
|
991
|
-
the flag: `policy.retry_failed
|
|
992
|
-
|
|
993
|
-
|
|
1013
|
+
the flag: `policy.retry_failed` and `policy.infra_retries`. A flag of the
|
|
1014
|
+
invocation wins, and those two retry budgets are not written back. (`routing.fractal_planner`,
|
|
1015
|
+
in a profile saved before forge 0.23, is still accepted and never applied or shown.) `run`, `retry`,
|
|
994
1016
|
`integrate`, `accept`, `review`, `split` and `attribute` export the frozen gates and
|
|
995
1017
|
budget. `integrate` with no `--final-review`, when the profile names
|
|
996
1018
|
`routing.final_reviewer`, reviews the whole run: the spec already in `final_qa` if that
|
|
@@ -999,9 +1021,7 @@ The other routing and policy keys were copied into plan files when the profile w
|
|
|
999
1021
|
|
|
1000
1022
|
Solo freezes the same file in the solo run dir. From a profile it takes the dwarf and the
|
|
1001
1023
|
qa at the medium tier, else the `any` tier, plus the QA threshold, the timeout and the
|
|
1002
|
-
fast roles (`dwarf` and `qa` only) that no flag gave.
|
|
1003
|
-
`routing.fractal_planner`, apply only when Fractal is on (the planner only with
|
|
1004
|
-
`--fractal-auto-decompose` and no `--fractal-planner`). It prints the profile line before
|
|
1024
|
+
fast roles (`dwarf` and `qa` only) that no flag gave. It prints the profile line before
|
|
1005
1025
|
it takes the run lock. It writes `profile.json` only under that lock, not on `--dry-run`,
|
|
1006
1026
|
and only when this call chose a new profile. With neither flag, a later run of the same
|
|
1007
1027
|
directory keeps the frozen copy. `--no-profile` removes it.
|
|
@@ -1028,7 +1048,7 @@ stays at standard speed, exits 0, and forge prints `forge: claude ran at standar
|
|
|
1028
1048
|
Codex can do the same when the tier is unsupported (EU data residency for GPT-6 models,
|
|
1029
1049
|
for example): it continues at the default tier, exits 0, and forge prints one note. The
|
|
1030
1050
|
note never changes the exit. openclaude, opencode, antigravity and grok are refused,
|
|
1031
|
-
exit 3, before anything runs.
|
|
1051
|
+
exit 3, before anything runs. A whole-run review still asks.
|
|
1032
1052
|
`auto` forwards `--fast` to `plan`, and the planner dispatch uses the tier when `planner`
|
|
1033
1053
|
is a fast role. The per-harness command lines are in
|
|
1034
1054
|
[the fast service tier](../references/harnesses.md#fast-service-tier).
|
|
@@ -1040,7 +1060,9 @@ is a fast role. The per-harness command lines are in
|
|
|
1040
1060
|
tasks, every wave holding one — becomes one task. Routing then fills that task's `-`
|
|
1041
1061
|
columns. A plan whose shape is `one` or `branches` is not changed (`not collapsed: SHAPE`).
|
|
1042
1062
|
A plan that already has `tasks.precollapse.tsv` or `collapsed.json` is not an error. Any
|
|
1043
|
-
other collapse failure stops `plan`.
|
|
1063
|
+
other collapse failure stops `plan`. Review groups that name the chain's tasks are rewritten to
|
|
1064
|
+
name `combined`, and a group of only those tasks is dropped; the original `groups.tsv` is kept
|
|
1065
|
+
as `groups.precollapse.tsv`.
|
|
1044
1066
|
|
|
1045
1067
|
The merged task is always id `combined`, deps `-`. Difficulty is the highest of the parts
|
|
1046
1068
|
(`low` < `medium` < `high`). Files are the union. Dwarf and qa are the value every part
|
|
@@ -1195,15 +1217,15 @@ task has spent its attempt cap (`plan --max-attempts N`, default 8 across runs;
|
|
|
1195
1217
|
`forge control set max-attempts N --confirm` changes it, and `0` means no cap). The reasons and
|
|
1196
1218
|
the `retry` and `accept` commands are in `tasks/<id>/decision.md`. The run summary lists them under
|
|
1197
1219
|
`waiting for your decision:`. Neither a later `run`, `--retry-failed`, a retry budget nor a pin
|
|
1198
|
-
resumes that same task. Only `retry <plan> <id> --decide retry=N
|
|
1199
|
-
`--dwarf <spec>`, or `--decide` and `--dwarf` together, each with `--reason "…" --approved`, or
|
|
1220
|
+
resumes that same task. Only `retry <plan> <id> --decide retry=N`, `--decide threshold=Pn` or, for
|
|
1221
|
+
reason `plan` with a path no task declares, `--decide files+=<path>[,<path>]`, or `--dwarf <spec>`, or `--decide` and `--dwarf` together, each with `--reason "…" --approved`, or
|
|
1200
1222
|
`accept`, does. To resume several at once, add `--no-dispatch` to each `retry`, which records the
|
|
1201
1223
|
decision and starts nothing, then `run` the plan. Replacing it is a hand
|
|
1202
1224
|
edit of `tasks.tsv` before the next `run`, as the summary says (`forge control add` queues a new
|
|
1203
1225
|
row but does not replace the stopped one). A live scheduler takes the same flags as `forge control retry`, and
|
|
1204
1226
|
`forge control accept <plan> <id> --reason "…" --approved` for `accept`. A run that ends with such a
|
|
1205
1227
|
task still in `tasks.tsv` and unmerged exits `5`. See
|
|
1206
|
-
[when reviews don't converge](../references/decompose.md#when-reviews-dont-converge).
|
|
1228
|
+
[when reviews don't converge](../references/decompose-recovery.md#when-reviews-dont-converge).
|
|
1207
1229
|
|
|
1208
1230
|
The full plan → run → integrate walkthrough is in [decomposed runs](decomposed-runs.md#plan-run-integrate). `retry`, `accept` and `review` are covered in [reviews, retries and recovery](reviews.md); resuming, `split`/`combine`, scope drift and `tasks.tsv` in [decomposed runs](decomposed-runs.md).
|
|
1209
1231
|
|