@giamme/forge 0.12.0 → 0.13.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 +77 -0
- package/README.md +1 -1
- package/SKILL.md +31 -12
- package/VERSION +1 -1
- package/docs/add-ons.md +11 -6
- package/docs/artifacts.md +18 -6
- package/docs/commands.md +189 -17
- package/docs/decomposed-runs.md +13 -5
- package/docs/forge-ui.md +34 -4
- package/docs/memory.md +2 -1
- package/docs/models.md +4 -2
- package/docs/reviews.md +81 -19
- package/docs/troubleshooting.md +3 -1
- package/forge +17 -1
- package/package.json +1 -1
- package/references/dataset.md +40 -14
- package/references/decision-models.md +759 -0
- package/references/decompose.md +197 -28
- package/references/harnesses.md +10 -3
- package/references/planning.md +8 -0
- package/references/solo.md +13 -3
- package/references/ui.md +11 -0
- package/scripts/forge-artifact.sh +30 -4
- package/scripts/forge-config.py +238 -29
- package/scripts/forge-contract.py +127 -58
- package/scripts/forge-control.py +40 -9
- package/scripts/forge-decide.py +6 -0
- package/scripts/forge-dispatch.sh +47 -15
- package/scripts/forge-fail-first.py +2 -2
- package/scripts/forge-gate-addressed.sh +40 -0
- package/scripts/forge-gate-message.sh +64 -0
- package/scripts/forge-issues.py +368 -36
- package/scripts/forge-jev-options.sh +269 -42
- package/scripts/forge-lib-attribute.sh +447 -0
- package/scripts/forge-lib-gates.sh +32 -0
- package/scripts/forge-lib-plans.sh +17 -6
- package/scripts/forge-lib-review.sh +24 -19
- package/scripts/forge-lib-task.sh +219 -39
- package/scripts/forge-lib-verify.sh +45 -8
- package/scripts/forge-memory.sh +3 -3
- package/scripts/forge-parallel-options.sh +44 -5
- package/scripts/forge-parallel.sh +503 -304
- package/scripts/forge-plan-check.py +35 -1
- package/scripts/forge-pre-review.py +437 -0
- package/scripts/forge-prompt.py +25 -5
- package/scripts/forge-route.py +2 -2
- package/scripts/forge-runtime.py +55 -1
- package/scripts/forge-schedule.py +70 -9
- package/scripts/forge-shadow.py +2 -2
- package/scripts/forge-solo.sh +41 -10
- package/scripts/forge-submodules.py +389 -0
- package/scripts/forge-sweep.py +542 -0
- package/scripts/forge_dataset/cli.py +12 -6
- package/scripts/forge_dataset/export.py +55 -45
- package/scripts/forge_dataset/forecast.py +4 -1
- package/scripts/forge_dataset/harvest.py +33 -5
- package/scripts/{forge_jev/outcome.py → forge_dataset/states.py} +21 -7
- package/scripts/forge_decide/__init__.py +141 -0
- package/scripts/forge_decide/budget.py +149 -0
- package/scripts/forge_decide/cache.py +66 -0
- package/scripts/forge_decide/cli.py +953 -0
- package/scripts/forge_decide/doctor.py +221 -0
- package/scripts/forge_decide/label_addressed.py +75 -0
- package/scripts/forge_decide/label_attribution.py +62 -0
- package/scripts/forge_decide/label_coverage.py +81 -0
- package/scripts/forge_decide/label_message.py +38 -0
- package/scripts/forge_decide/label_prompt.py +139 -0
- package/scripts/forge_decide/labels.py +328 -0
- package/scripts/forge_decide/metrics.py +125 -0
- package/scripts/forge_decide/migrate.py +226 -0
- package/scripts/forge_decide/providers.py +292 -0
- package/scripts/forge_decide/replay.py +350 -0
- package/scripts/forge_decide/report.py +382 -0
- package/scripts/forge_decide/resolve.py +397 -0
- package/scripts/forge_decide/sites.py +377 -0
- package/scripts/forge_jev/__init__.py +202 -104
- package/scripts/forge_jev/addressed.py +171 -0
- package/scripts/forge_jev/attribution.py +198 -0
- package/scripts/forge_jev/cli.py +460 -382
- package/scripts/forge_jev/client.py +155 -77
- package/scripts/forge_jev/coupling.py +19 -87
- package/scripts/forge_jev/coverage.py +303 -0
- package/scripts/forge_jev/findings.py +219 -0
- package/scripts/forge_jev/gates.py +225 -27
- package/scripts/forge_jev/memory.py +65 -4
- package/scripts/forge_jev/message.py +134 -0
- package/scripts/forge_jev/plan_gates.py +294 -0
- package/scripts/forge_jev/questions.py +173 -313
- package/scripts/forge_jev/verify.py +130 -104
- package/ui/README.md +41 -10
- package/ui/docs/api.md +212 -44
- package/ui/forge_ui/checks.py +331 -0
- package/ui/forge_ui/control.py +60 -11
- package/ui/forge_ui/export.py +8 -3
- package/ui/forge_ui/models.py +1 -0
- package/ui/forge_ui/reader.py +436 -26
- package/ui/forge_ui/server.py +13 -0
- package/ui/forge_ui/static/app.js +15 -8
- package/ui/forge_ui/static/checksview.js +449 -0
- package/ui/forge_ui/static/controls.js +20 -13
- package/ui/forge_ui/static/convo.js +11 -2
- package/ui/forge_ui/static/findingsview.js +6 -4
- package/ui/forge_ui/static/index.html +1 -0
- package/ui/forge_ui/static/panel.js +105 -17
- package/ui/forge_ui/static/runmodel.js +40 -2
- package/ui/forge_ui/static/scene3d.js +2 -15
- package/ui/forge_ui/static/settings.js +336 -41
- package/ui/forge_ui/static/style.css +72 -7
- package/ui/forge_ui/transcripts.py +225 -54
- package/references/jev.md +0 -865
- package/scripts/forge_jev/backtest.py +0 -322
- package/scripts/forge_jev/corpus.py +0 -156
- package/scripts/forge_jev/features.py +0 -24
- package/scripts/forge_jev/predict.py +0 -204
- package/scripts/forge_jev/review.py +0 -73
- package/scripts/forge_jev/routing.py +0 -271
- package/scripts/forge_jev/subset.py +0 -123
package/docs/commands.md
CHANGED
|
@@ -16,13 +16,14 @@ harness (`/forge`); this command installs forge and drives its optional tools.
|
|
|
16
16
|
| `forge version [--check]` | the installed version, and whether a newer release is out |
|
|
17
17
|
| `forge fractal …` | opt-in Fractal execution; see [the command group](fractal.md#forge-fractal-command-group) |
|
|
18
18
|
| `forge runs [--repo DIR \| --all] [--limit N] [--json]` | this repo's recent runs, newest first: run id, kind, age, task states, verification and final review, goal, and the run dir. Read-only; the same summaries forge-ui shows |
|
|
19
|
-
| `forge control show\|set\|pin\|unpin\|drain\|resume\|stop\|retry\|add PLAN_DIR …` | change a live plan: `set` takes `qa-threshold`, `timeout`, `escalate-after`, `escalate-effort` (`on`/`off`), `verify-retries`, `infra-backoff` (a backoff shape; `none` drops it), `retry-budget`, `infra-retries` or `max-parallel` (1-64) (the last three only while a scheduler runs; `--task ID` for `qa-threshold` and `retry-budget`, 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]` and `add PLAN_DIR TASK` (a row appended to `tasks.tsv`) queue a request the scheduler applies or refuses. `show` (`--json` for JSON) also says whether the run is drained or stopping and lists its infrastructure pauses. 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) |
|
|
20
|
-
| `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, Jev, the repo's `.forge/verify`, `setup` and `verify-subset`, dataset, `FORGE_*` variables with secrets hidden); `set
|
|
19
|
+
| `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), `pre-review-tests` (`on`/`off`), `pre-review-parallel` (1-64), `retry-budget`, `infra-retries` or `max-parallel` (1-64) (the last three only while a scheduler runs; `--task ID` for `qa-threshold` and `retry-budget`, 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]` and `add PLAN_DIR TASK` (a row appended to `tasks.tsv`) queue a request the scheduler applies or refuses. `show` (`--json` for JSON) also says whether the run is drained or stopping and lists its infrastructure pauses. 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) |
|
|
20
|
+
| `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 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`). 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 |
|
|
21
21
|
| `forge runs rm RUN_DIR [--dry-run] [--yes] [--no-archive] [--worktrees] [--branches] [--json]` | delete a run directory but keep what it taught the dataset; see [below](#forge-runs-rm) |
|
|
22
22
|
| `forge issues RUN [--apply] …` | file the review findings a run left open as GitHub issues; see [below](#forge-issues) |
|
|
23
23
|
| `forge ui open\|status\|stop` | forge-ui, the run viewer; see [the command group](forge-ui.md#forge-ui-command-group) |
|
|
24
24
|
| `forge dataset …` | every run's inputs and outcomes; see [run dataset](dataset.md) |
|
|
25
|
-
| `forge
|
|
25
|
+
| `forge decide …` | decision-model gates, providers, budgets and the privacy floor; see [below](#forge-decide) |
|
|
26
|
+
| `forge jev …` | deprecated alias of the old decision-model commands, kept for one release; see [below](#forge-decide) |
|
|
26
27
|
| `forge --help` | list the commands; `forge <command> --help` shows each one's options |
|
|
27
28
|
|
|
28
29
|
### `forge runs rm`
|
|
@@ -52,7 +53,7 @@ deletion or the run directory was kept (the same command finishes the job).
|
|
|
52
53
|
|
|
53
54
|
`forge issues <plan dir, task dir, review dir, known_issues.md or qa.last>` drafts one GitHub
|
|
54
55
|
issue per finding the run left open (`--group task|run` for fewer) and files them only with
|
|
55
|
-
`--apply`. The findings are the CONFIRMED ones
|
|
56
|
+
`--apply`. The findings are the CONFIRMED ones the threshold tolerated (origin
|
|
56
57
|
`tolerated`), the CONFIRMED ones a person accepted with `accept` (origin `accepted`, with
|
|
57
58
|
their own issue text: a person accepted the work over the reviewer's verdict), PLAUSIBLE
|
|
58
59
|
ones with `--include-plausible`, and what the whole-run review left open. A whole-run
|
|
@@ -64,7 +65,7 @@ the size of a `--only` selection).
|
|
|
64
65
|
|
|
65
66
|
| Flag | Does |
|
|
66
67
|
|---|---|
|
|
67
|
-
| `--json` | machine-readable output; `findings` lists each one with its fingerprint, severity, origin (`tolerated`, `accepted`, `review` or `plausible`), task, `review`, `filed` state and `dismissed` mark. 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 |
|
|
68
|
+
| `--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 and `dismissed` mark. 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 |
|
|
68
69
|
| `--offline` | never run `gh`: no filed state, commit publication judged from local refs |
|
|
69
70
|
| `--only FP` | keep only these 12-hex fingerprints (repeatable or comma-separated) |
|
|
70
71
|
| `--all-runs` | read `RUN` as a repository (or a plan dir naming one) and collect every run in its registry; the newest plan wins for a finding in several |
|
|
@@ -76,6 +77,50 @@ repository lock from the issue lookup to the last `gh issue create`, and each di
|
|
|
76
77
|
around its write. A busy lock is retried for 10 s, then exit 3. Exit 0 ok, 2 usage or a `gh` or
|
|
77
78
|
dismissal-store error, 3 busy.
|
|
78
79
|
|
|
80
|
+
### `forge decide`
|
|
81
|
+
|
|
82
|
+
Per-gate decision models. The setup — precedence, what each gate does, budgets, the privacy
|
|
83
|
+
floor and migration — is in [Decision models](../references/decision-models.md#setup). How a
|
|
84
|
+
gate is measured before it turns on (labels, `report`, `replay`, the promotion rule and the
|
|
85
|
+
request cache) is in [Measuring a gate](../references/decision-models.md#measuring-a-gate).
|
|
86
|
+
|
|
87
|
+
| Command | Does |
|
|
88
|
+
|---|---|
|
|
89
|
+
| `status [--repo DIR] [--json]` | each gate's effective mode and which level set it, providers (`present` or `missing` key), caps and today's spend, privacy floor. A gate that is `on` without a passing replay is shown as `forced`. Never writes |
|
|
90
|
+
| `gate GATE off\|shadow\|on [--force] [--provider P] [--model M] [--profile NAME \| --repo DIR]` | set one gate. Gates: `drift`, `forward`, `prompt`, `coverage`, `retry-addressed`, `dwarf-message`, `attribution`, `findings`, `memory-curate`, `memory-slice`, `memory-stale`, `verify-discover` (what each does when `on`: [Gates and modes](../references/decision-models.md#gates-and-modes)). With no `--provider`, a gate uses the legacy transport (`jev.json`'s endpoint with `TYPESAFE_API_KEY` or `jev.json`'s key, or Cloudflare for a site `jev.json` maps there); name a provider to choose where requests go. Without `--repo`, writes the user file and migrates `jev.json` first. `--profile` writes that profile in the user file. `on` needs a passing replay for the provider and model it resolves to, else it is refused (exit 3). `--force` turns it on anyway, and it shows as forced (see [measuring a gate](../references/decision-models.md#promotion)) |
|
|
91
|
+
| `provider add jev\|clef --name N [--url U] [--account-id A] [--model M] [--context N] [--price X] [--deadline S] [--local] [--key-stdin \| --key-env VAR]` | add a hosted or local provider. A key is never an argument: one line on stdin or a terminal prompt is written to `keys/<N>.key` mode `0600`, or `--key-env VAR` stores the variable name and reads it at request time |
|
|
92
|
+
| `provider list [--json]` | configured providers |
|
|
93
|
+
| `provider rm N` | remove a provider no gate uses, and the `keys/<N>.key` it wrote |
|
|
94
|
+
| `budget [--run tokens=N,usd=X] [--daily tokens=N,usd=X] [--repo DIR]` | show the caps and today's spend, or set them. `--daily` is user-level; a repo file takes only `--run`. `none` clears a cap |
|
|
95
|
+
| `privacy never-send\|allow --repo DIR` | set or remove that repo's privacy floor. `never-send` turns every gate off for that repo and beats every other level |
|
|
96
|
+
| `doctor [--live] [--json] [--repo DIR]` | stale settings. Exit 1 on a problem. `--live` probes each provider unless the privacy floor is on |
|
|
97
|
+
| `migrate [--force] [--json]` | copy `jev.json` into the user `decide.json`, once. `--force` replaces that file from `jev.json` again |
|
|
98
|
+
| `report [--runs N] [--run DIR]... [--site S] [--all] [--json]` | per site, over the newest N runs of this repo (default 10; `--run` names directories, `--all` reads every repo): calls, cache hits, errors, skips, tokens, cost, and how often the gate fired and was right on the free labels. Read-only, asks no model. See [measuring a gate](../references/decision-models.md#forge-decide-report) |
|
|
99
|
+
| `replay --site S --provider P --model M [--runs N] [--send] [--workers 3] [--seed 7] [--margin 0.02] [--json]` | re-asks the site's labelled requests on provider P and model M. Without `--send` it is a dry run that sends nothing; with it, it asks the unanswered requests, judges the answers on the newer half of the runs, and records the result that `gate on` reads. Charged to no budget. See [measuring a gate](../references/decision-models.md#forge-decide-replay) |
|
|
100
|
+
|
|
101
|
+
`--repo` defaults to `FORGE_DECIDE_REPO`, else the git top level. Exit 0 ok, 2 usage, 1 a
|
|
102
|
+
failed doctor check or a config file that cannot be read, 3 a refused `gate on`.
|
|
103
|
+
`forge config set` writes the same user-level gate fields as `decide.gate.<gate>`, `decide.gate.<gate>.provider` and
|
|
104
|
+
`decide.gate.<gate>.model`.
|
|
105
|
+
|
|
106
|
+
A write to the user file migrates `jev.json` first: `gate` without `--repo`, `provider add`,
|
|
107
|
+
`provider rm`, and `budget` when `--run` or `--daily` changes the user file. `provider list`,
|
|
108
|
+
a bare `budget`, `status` and `doctor` do not.
|
|
109
|
+
|
|
110
|
+
`forge jev` is the deprecated alias, kept for one release. `setup`, `sites`, `enable`,
|
|
111
|
+
`disable`, `status` and `doctor` print the `forge decide` command and then run the old one.
|
|
112
|
+
|
|
113
|
+
Run flags, on `forge-solo.sh` and `forge-parallel.sh plan`, are frozen in `jev-selection.json`.
|
|
114
|
+
A re-plan replaces the file. Solo again on the same run dir keeps it. When the file exists,
|
|
115
|
+
`run` and `retry` keep it and say so when flags are passed again. A plan with no selection
|
|
116
|
+
file takes the flags on `run` or `retry` and freezes them then.
|
|
117
|
+
|
|
118
|
+
| Flag | Does |
|
|
119
|
+
|---|---|
|
|
120
|
+
| `--gate NAME=MODE[,NAME=MODE...]` | set those gates `off`, `shadow` or `on` for this run. Repeatable; a later one wins for the same gate |
|
|
121
|
+
| `--no-gates` | every gate off: no decision-model request |
|
|
122
|
+
| `--decide-budget tokens=N[,usd=X]` | cap this run's decision-model tokens, and optionally USD. Does not change the daily cap |
|
|
123
|
+
|
|
79
124
|
## The `/forge` slash command
|
|
80
125
|
|
|
81
126
|
```
|
|
@@ -83,7 +128,9 @@ dismissal-store error, 3 busy.
|
|
|
83
128
|
[--qa <alias>[:<effort>[:<harness>]]]
|
|
84
129
|
[--planner <alias>[:<effort>[:<harness>]]]
|
|
85
130
|
[--yolo-dwarf] [--yolo-qa] [--repo <dir>] [--native-review]
|
|
86
|
-
[--no-memory] [--
|
|
131
|
+
[--no-memory] [--gate NAME=MODE[,...]] [--no-gates]
|
|
132
|
+
[--decide-budget tokens=N[,usd=X]]
|
|
133
|
+
[--timeout <seconds>] [--ui | --no-ui] [--fractal | --no-fractal]
|
|
87
134
|
[--fractal-auto-decompose] [--fractal-planner <spec>]
|
|
88
135
|
[--fractal-depth <n>] [--fractal-children <n>] [--fractal-nodes <n>]
|
|
89
136
|
[--fractal-iterations <n>] [--fractal-concurrency <n>] [--fractal-deadline <s>]
|
|
@@ -95,9 +142,12 @@ dismissal-store error, 3 busy.
|
|
|
95
142
|
| Flag | Default | Meaning |
|
|
96
143
|
|---|---|---|
|
|
97
144
|
| `--dwarf <spec>` | *asks* | the model that implements the change |
|
|
98
|
-
| `--qa <spec>` | `opus` at `
|
|
145
|
+
| `--qa <spec>` | `opus` at `high` | the model that reviews the dwarf's diff |
|
|
99
146
|
| `--planner <spec>` | orchestrator plans | dispatch planning to a model; one dispatch per run, effort defaults to `xhigh` |
|
|
100
147
|
| `--no-memory` | memory on | write and inject nothing in `.forge/` |
|
|
148
|
+
| `--gate NAME=MODE` | the configured gates | set decision-model gates for this run (`off`, `shadow` or `on`); repeatable, a later one wins. Frozen in `jev-selection.json`. See [`forge decide`](#forge-decide) |
|
|
149
|
+
| `--no-gates` | gates as configured | every decision-model gate off for this run |
|
|
150
|
+
| `--decide-budget tokens=N[,usd=X]` | the configured cap | cap this run's decision-model spend |
|
|
101
151
|
| `--timeout <s>` | `2700` (45m) | kill any single dispatch that runs longer. `0` disables |
|
|
102
152
|
| `--yolo-dwarf` | off | drop the dwarf's sandbox and approval gates |
|
|
103
153
|
| `--yolo-qa` | off | drop the reviewer's sandbox |
|
|
@@ -221,8 +271,8 @@ failure. On `8`, `<run-dir>/<role>.infra` holds `class=`, `retry_after=`, `detai
|
|
|
221
271
|
and disables the watchdog), then the optional fifth `timeout` column of the model's
|
|
222
272
|
[registry](models.md#model-registry) row, then the built-in `2700` (45 min). A value that was *not*
|
|
223
273
|
explicit is scaled by the resolved (post-clamp) effort: up to `high` ×1, `xhigh` ×4/3,
|
|
224
|
-
`max`/`ultra`/`ultracode` ×2.
|
|
225
|
-
|
|
274
|
+
`max`/`ultra`/`ultracode` ×2. The planner defaults to `xhigh`, so its built-in limit is 3600 s;
|
|
275
|
+
QA defaults to `high` and dwarves to `medium`, and both keep 2700 s. `<role>.resolved` records `timeout=` and
|
|
226
276
|
`timeout_source=` (`explicit`, `env`, `registry` or `default`, plus `+effort-scaled`).
|
|
227
277
|
`forge-parallel.sh run`/`retry --timeout S` sets it for a decomposed run (kept in the plan).
|
|
228
278
|
`FORGE_REGISTRY` points the dispatcher at an alternative registry file.
|
|
@@ -241,6 +291,10 @@ is started in its own session, and after it exits any process still alive in tha
|
|
|
241
291
|
listed in `<role>.orphans` and stopped, so a backgrounded measurement cannot outlive the
|
|
242
292
|
dispatch. The timeout watchdog and the exit trap signal the whole session too.
|
|
243
293
|
|
|
294
|
+
**Log clock.** Beside the log, `<role>.clock` records when it grew (one `<epoch> <bytes>` line for
|
|
295
|
+
each second it did), so forge-ui can time the commands of a harness that logs no times (codex,
|
|
296
|
+
grok). It never changes a dispatch's outcome; `FORGE_LOG_CLOCK=off` turns it off.
|
|
297
|
+
|
|
244
298
|
```bash
|
|
245
299
|
# what would this actually run?
|
|
246
300
|
bash scripts/forge-dispatch.sh dwarf sol:ultra --prompt-file /tmp/p --dry-run
|
|
@@ -260,11 +314,14 @@ capture, the QA dispatch, and the ledger writes.
|
|
|
260
314
|
forge-solo.sh <run-dir> --repo <dir> --dwarf <spec> [--qa <spec>]
|
|
261
315
|
[--approach <file>] [--yolo-dwarf] [--yolo-qa]
|
|
262
316
|
[--native-review] [--no-memory] [--timeout <s>] [--dry-run] [--ui | --no-ui]
|
|
263
|
-
[--
|
|
317
|
+
[--gate NAME=MODE[,...]] [--no-gates] [--decide-budget tokens=N[,usd=X]]
|
|
318
|
+
[--fail-first] [--qa-threshold P0|P1|P2|P3|none]
|
|
264
319
|
[--fractal | --no-fractal] [--fractal-<limit> <n>]
|
|
265
320
|
[--dwarf-low <pool>] [--dwarf-medium <pool>] [--dwarf-high <pool>] [--retry]
|
|
266
321
|
```
|
|
267
322
|
|
|
323
|
+
`--qa-threshold` sets the blocking level for this run: `P0`..`P3`, or `none` (P3); the default is `P2`. The gate's decision is in `qa.gate` and the tolerated findings are in `known_issues.md`. See [the verdict rule](reviews.md#verdicts-and-failure).
|
|
324
|
+
|
|
268
325
|
You write two files into the run directory; forge does the rest:
|
|
269
326
|
|
|
270
327
|
| You write | Is |
|
|
@@ -329,23 +386,31 @@ Bash 3.2 entrypoints use a Python standard-library coordinator to schedule eligi
|
|
|
329
386
|
|
|
330
387
|
```
|
|
331
388
|
forge-parallel.sh plan <plan-dir> --repo <dir> [routing flags] [--planner <spec>] [--no-memory]
|
|
389
|
+
[--gate NAME=MODE[,...]] [--no-gates] [--decide-budget tokens=N[,usd=X]]
|
|
332
390
|
[--decompose-level L] [--shadow-qa <spec>[,..]|none] [--shadow-rate R]
|
|
333
391
|
[--reviewer-session | --no-reviewer-session]
|
|
392
|
+
[--implementer-session | --no-implementer-session]
|
|
334
393
|
[--explore E] [--ui | --no-ui] [--fail-first | --no-fail-first]
|
|
394
|
+
[--pre-review-tests | --no-pre-review-tests] [--pre-review-parallel N]
|
|
395
|
+
[--qa-threshold P0|P1|P2|P3|none|default]
|
|
335
396
|
forge-parallel.sh run <plan-dir> [--max-parallel N] [--yolo-dwarf] [--yolo-qa] [--dry-run]
|
|
336
397
|
[--verify <cmd> | --verify-lane 'name[opts]=cmd' ...]
|
|
337
398
|
[--verify-parallel N] [--setup <cmd>] [--timeout S]
|
|
338
399
|
[--retry-failed N] [--infra-retries M] [--infra-backoff SHAPE]
|
|
339
400
|
[--infra-fallback | --no-infra-fallback]
|
|
340
|
-
[--qa-threshold P0|P1|P2|P3|none] [--verify-retries N]
|
|
401
|
+
[--qa-threshold P0|P1|P2|P3|none|default] [--verify-retries N]
|
|
341
402
|
[--escalate-after N] [--escalate-effort | --no-escalate-effort]
|
|
403
|
+
[--sweep P0|P1|P2|P3 [--sweep-plausible] [--sweep-max N]]
|
|
404
|
+
[--sweep-ahead | --no-sweep-ahead] [--attribute | --no-attribute]
|
|
342
405
|
[--fractal | --no-fractal] [--fractal-<limit> <n>]
|
|
343
|
-
forge-parallel.sh retry <plan-dir> <task-id> [--dwarf <spec>] [--
|
|
344
|
-
[--
|
|
406
|
+
forge-parallel.sh retry <plan-dir> <task-id> [--dwarf <spec>] [--answer <text> | --answer-file <file>]
|
|
407
|
+
[--timeout S]
|
|
408
|
+
[--qa-threshold P0|P1|P2|P3|none|default] [--verify-retries N]
|
|
345
409
|
[--verify <cmd> | --verify-lane 'name[opts]=cmd' ...] [--verify-parallel N]
|
|
346
410
|
[--escalate-after N] [--escalate-effort | --no-escalate-effort]
|
|
347
411
|
forge-parallel.sh accept <plan-dir> <task-id> --reason "<why>" --approved
|
|
348
|
-
forge-parallel.sh review <plan-dir> [--qa <spec>] [--yolo-qa] [--qa-threshold
|
|
412
|
+
forge-parallel.sh review <plan-dir> [--qa <spec>] [--yolo-qa] [--qa-threshold P0|P1|P2|P3|none|default]
|
|
413
|
+
forge-parallel.sh attribute <plan-dir> [--force]
|
|
349
414
|
forge-parallel.sh integrate <plan-dir> --approved [--final-review <qa-spec>] [--verify-retries N]
|
|
350
415
|
[--verify-parallel N]
|
|
351
416
|
forge-parallel.sh split <plan-dir> <new-plan-dir> --tasks <id,id> [--dry-run]
|
|
@@ -356,7 +421,8 @@ forge-parallel.sh combine <new-plan-dir> <plan-dir> <plan-dir>... [--verify <c
|
|
|
356
421
|
|---|---|
|
|
357
422
|
| `plan` | validate `tasks.tsv`, resolve difficulty → concrete dwarf/qa specs, compute waves, render the approval table |
|
|
358
423
|
| `run` | schedule ready tasks; per task: worktree → dwarf → diff → QA → status; merge passing tasks onto the integration branch |
|
|
359
|
-
| `retry` | re-run **one** failed task in the worktree it already has, with its reviewer's findings in the prompt |
|
|
424
|
+
| `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's question and run it |
|
|
425
|
+
| `attribute` | after a failed combined verification, search the merge order for **a merge that breaks it**; merges, revises and accepts nothing. See below |
|
|
360
426
|
| `integrate` | **never automatic** — merge the integration branch into your branch |
|
|
361
427
|
| `accept` | **only on your explicit instruction** — merge a `FAIL`/`UNKNOWN` task's reviewed work anyway, recording why |
|
|
362
428
|
| `review` | **opt-in, spends QA quota** — one reviewer reads the whole combined result; read-only |
|
|
@@ -364,27 +430,133 @@ forge-parallel.sh combine <new-plan-dir> <plan-dir> <plan-dir>... [--verify <c
|
|
|
364
430
|
|
|
365
431
|
| Flag | Subcommands | Remembered in the plan | Means |
|
|
366
432
|
|---|---|---|---|
|
|
433
|
+
| `--gate NAME=MODE[,NAME=MODE...]` | plan | `jev-selection.json` | set decision-model gates for this run; repeatable, a later one wins. When the file exists, `run` and `retry` keep it; with no file they apply the flags passed then and freeze them |
|
|
434
|
+
| `--no-gates` | plan | `jev-selection.json` | every decision-model gate off |
|
|
435
|
+
| `--decide-budget tokens=N[,usd=X]` | plan | `jev-selection.json` | cap this run's decision-model spend |
|
|
436
|
+
| `--answer TEXT` / `--answer-file F` | retry | no — this retry only | the user's answer to a `NEEDS_INPUT` task's question (`tasks/<id>/needs_input.md`), written to `answer.md`; on any other status `retry` exits `2` |
|
|
367
437
|
| `--timeout S` | run, retry | `timeout` | per-dispatch timeout in seconds (`0` disables); wins over `FORGE_TIMEOUT` |
|
|
368
438
|
| `--retry-failed N` | run | no — this run only | re-queue a task the reviewer rejected up to `N` more times inside the run |
|
|
369
439
|
| `--infra-retries M` | run | no — this run only | wait out up to `M` infrastructure stops per paused scope (a model, a harness, or everything) instead of ending the run |
|
|
370
440
|
| `--infra-backoff SHAPE` | run | `infra_backoff` | the waits between those stops when the provider gave no retry-after: `exp:B[,C]`, `linear:S,T[,C]` or `list:a,b,...` in seconds (default `exp:60`) |
|
|
371
441
|
| `--infra-fallback` | run | `infra_fallback` | a dwarf stopped by a rate limit moves to the next healthy model of its tier pool instead of waiting (off by default; `--no-infra-fallback` turns it off) |
|
|
372
|
-
| `--qa-threshold
|
|
442
|
+
| `--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) |
|
|
373
443
|
| `--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) |
|
|
374
444
|
| `--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) |
|
|
375
445
|
| `--verify-parallel N` | run, retry, integrate | `verify_parallel` | lanes run at once, 1 to 32 (default `3`) |
|
|
376
446
|
| `--escalate-after N` | run, retry | `escalate_after` | failed attempts on one model before the next goes a tier up (default `3`, `0` = off) |
|
|
447
|
+
| `--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) |
|
|
448
|
+
| `--pre-review-parallel N` | plan | `pre_review_parallel` | how many of those checks run at once across tasks, 1 to 64 (default `2`) |
|
|
449
|
+
| `--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) |
|
|
450
|
+
| `--sweep-plausible` | run | no — this run only | the sweep also takes PLAUSIBLE findings of passed tasks |
|
|
451
|
+
| `--sweep-max N` | run | no — this run only | at most `N` fix tasks (default `5`) |
|
|
452
|
+
| `--sweep-ahead` | run | `sweep_ahead` | a task is also told the open findings in files it owns, to fix on its way (off by default; `--no-sweep-ahead` turns it off) |
|
|
453
|
+
| `--attribute` | run | `attribute_on` | when the run's combined verification fails, search the merge order for a merge that breaks it, right after the failure is reported (off by default; `--no-attribute` turns it off). Without it the summary says how to run `attribute` later |
|
|
377
454
|
| `--escalate-effort` | run, retry | `escalate_effort` | at the top tier, retry the same model once more at its next accepted effort before stopping (off by default; `--no-escalate-effort` turns it off) |
|
|
378
455
|
|
|
379
456
|
**Exit codes:** `0` ok · `2` usage or validation · `3` precondition (not a git repo, …) ·
|
|
380
|
-
`
|
|
457
|
+
`4` **`plan` only: the plan gates sent work back** (see below) ·
|
|
458
|
+
`5` some task failed QA, the combined verification failed, or a task is still waiting for an
|
|
459
|
+
answer · `6` integration conflict ·
|
|
381
460
|
`8` **paused on an infrastructure failure** (quota, auth, rate limit, network): no attempt was
|
|
382
461
|
spent and nothing was judged — fix the cause and run the same command again ·
|
|
383
462
|
`130` **interrupted or stopped** (a signal, or `forge control stop`): the running tasks are
|
|
384
463
|
`INTERRUPTED` and verification was skipped or stopped; the summary prints the `retry` for each.
|
|
385
464
|
|
|
465
|
+
**`plan` and the plan-time gates.** With the `prompt` or `coverage` gate `on`, `plan` may send work
|
|
466
|
+
back and exits `4` before it validates the tasks or prints the table. It writes `plan.sendback.md`,
|
|
467
|
+
listing the task prompts a reviewer could not judge, and the requirements of `request.md` (the first
|
|
468
|
+
30 with at least four words) that no task's `## Acceptance criteria` covers. Rewrite what the file
|
|
469
|
+
lists (a prompt, a task's criteria, or a new task), then run `plan` again. An item goes back at most
|
|
470
|
+
once, keyed by its task id (prompts) or its requirement (coverage). What is still flagged from that
|
|
471
|
+
list is printed in a `decision-model gates:` block under the table and is not sent back again. An
|
|
472
|
+
item the first list did not name, such as a new task whose prompt is flagged, is sent back in its
|
|
473
|
+
own round, so the second `plan` can exit `4` again; no item goes back twice. `drift`
|
|
474
|
+
and `forward`, when `on`, act without exiting: they add a predicted file to a task's `files`, or
|
|
475
|
+
make a task depend on a later one, and the block says what they added. In `shadow` they change
|
|
476
|
+
`tasks.tsv` and `waves.tsv` not at all, and their predictions go to `plan-gates.json` as `would_add`.
|
|
477
|
+
|
|
478
|
+
**`attribute`** answers the question a failed combined verification leaves open: every task passed
|
|
479
|
+
its own review, so which merge broke the whole? It verifies *prefixes* of the merge order in a
|
|
480
|
+
scratch worktree (`<worktree root>/_attribute`, detached at the prefix commit, after the plan's
|
|
481
|
+
setup command): prefix 0 is the integration base, prefix `n` the tip. The tip is known to fail
|
|
482
|
+
from the run itself; the search verifies the base and then halves the interval until it has a
|
|
483
|
+
merge `k` whose prefix `k − 1` verified PASS and whose prefix `k` verified FAIL. Verification is an
|
|
484
|
+
arbitrary command, so failure need not be monotonic over the merges: this is *a* merge that breaks
|
|
485
|
+
verification, not necessarily the earliest. Each step runs the verification the run used, frozen:
|
|
486
|
+
the lanes in `verification.lanes.d/` or the command in `verification.command`, never a config
|
|
487
|
+
changed since and never discovery. A run that recorded neither is inconclusive unless `--force`,
|
|
488
|
+
which uses today's source. On this repo one verification takes about 10 minutes, so a search of
|
|
489
|
+
`n` merges costs `1 + ⌈log₂ n⌉` of them.
|
|
490
|
+
|
|
491
|
+
It takes the plan lock like `retry`, so a second `attribute`, or one started while a run holds the
|
|
492
|
+
plan, is refused. It refuses (exit `2`) a plan whose `verification.status` is not `FAIL` and one
|
|
493
|
+
whose `verification.commit` is not `accepted.integration`, the commit being searched; `--force`
|
|
494
|
+
skips both checks and verifies the tip itself (a passing tip is inconclusive). A step that ends
|
|
495
|
+
`UNVERIFIED`, is interrupted or whose setup fails ends the search inconclusive with no culprit.
|
|
496
|
+
|
|
497
|
+
With the `attribution` gate `on` (see [`forge decide`](#forge-decide)), the search first asks the
|
|
498
|
+
decision model which merged task most likely broke the run, from the end of the failing log and
|
|
499
|
+
each merge's diff. It verifies that task's boundary first, prefix `k − 1` then prefix `k`: a
|
|
500
|
+
pass-then-fail pair settles it (`outcome: "confirmed"`), and otherwise the answer narrows the bounds
|
|
501
|
+
and the binary search goes on (`"refuted"`). In `shadow` the ranking is recorded and the binary
|
|
502
|
+
search alone decides. The gate only chooses which boundary to verify first; it never decides the
|
|
503
|
+
result.
|
|
504
|
+
|
|
505
|
+
It writes `attribution.json` (`culprit`, `base_fails`, `inconclusive`, `merges`, `steps` of
|
|
506
|
+
`{prefix, commit, status, seconds, source}`, `verification_runs`, `gate`), each step's output in
|
|
507
|
+
`attribute/<prefix>-<sha>/`, the failing log's last 200 lines in `tasks/<culprit>/verification.md`,
|
|
508
|
+
and an `attribution` event in the [run dataset](dataset.md). It prints one line,
|
|
509
|
+
`integration failure: merge <id> breaks verification (prefix k−1 passes, k fails; M verification
|
|
510
|
+
runs)`, or the variant `the base already fails verification` or `attribution inconclusive — <reason>`.
|
|
511
|
+
When the gate's first guess is the merge that was confirmed, the line ends `(the decision model's first guess)`.
|
|
512
|
+
Exit `0` when the search finished, culprit or not, `1` when a step could not run at all.
|
|
513
|
+
|
|
514
|
+
**`NEEDS_INPUT`** is a task status that is not a failure: the implementer ended with a question
|
|
515
|
+
only the user can answer, kept in `tasks/<id>/needs_input.md`. The run summary lists it under
|
|
516
|
+
`waiting for your answer:` with the first line of the question and the command to answer it, and
|
|
517
|
+
the retry hint does not count it as failed. Its dependents end `BLOCKED`, and neither a later
|
|
518
|
+
`run`, `--retry-failed` nor `forge control retry` resumes it. Only
|
|
519
|
+
`retry <plan> <id> --answer "<text>"` (or `--answer-file F`) does: the question and the answer
|
|
520
|
+
join the findings of the next attempt, a normal new attempt. Without an answer, or with one older
|
|
521
|
+
than the question, `retry` exits `2` and changes nothing; if escalation refuses the retry, the
|
|
522
|
+
question and the answer stay for the same `--answer` to be tried again. A run that ends with such a
|
|
523
|
+
task unmerged exits `5`, as it does for a task that failed. Only the `dwarf-message` gate, when `on`,
|
|
524
|
+
sets this status.
|
|
525
|
+
|
|
386
526
|
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).
|
|
387
527
|
|
|
528
|
+
## `scripts/forge-jev.py`
|
|
529
|
+
|
|
530
|
+
The verbs the decision-model gates run. A person turns gates on with `forge decide`; the shell
|
|
531
|
+
calls these verbs, one per gate question. The `forge jev` verbs `setup`, `sites`, `enable`,
|
|
532
|
+
`disable`, `status` and `doctor` are the old names of `forge decide` commands and are not listed.
|
|
533
|
+
|
|
534
|
+
```
|
|
535
|
+
forge-jev.py score-plan --plan P --repo R [--json] prompt adequacy and drift, per task
|
|
536
|
+
forge-jev.py coupling --plan P --repo R [--json] forward dependencies, per warned pair
|
|
537
|
+
forge-jev.py coverage --plan P --repo R [--json] requirements no task covers
|
|
538
|
+
forge-jev.py retry-addressed --plan P --task T --attempt N --repo R
|
|
539
|
+
forge-jev.py dwarf-message --plan P --task T --attempt N --repo R
|
|
540
|
+
forge-jev.py attribution --plan P --repo R --log L the merged tasks, most likely culprit first
|
|
541
|
+
forge-jev.py findings --repo R --input F [--run-dir D]
|
|
542
|
+
forge-jev.py verify-discover --repo R [--json] [--run-dir D]
|
|
543
|
+
forge-jev.py memory-curate --repo R --category C --text T [--json] [--run-dir D]
|
|
544
|
+
forge-jev.py memory-slice --task T --lines F [--keep N] [--run-dir D]
|
|
545
|
+
forge-jev.py memory-stale --text T --anchor A [--run-dir D]
|
|
546
|
+
```
|
|
547
|
+
|
|
548
|
+
The verbs `coverage`, `retry-addressed`, `dwarf-message`, `attribution` and `findings` check their
|
|
549
|
+
paths first: `--plan`, `--repo` and `--run-dir` must be directories, and `--log` and `--input`
|
|
550
|
+
files, for the verbs that take them, else the verb exits `2`. Exit `3` is no opinion: the gate is
|
|
551
|
+
off or in `shadow`, there is nothing to ask, or the model did not answer. A failed request is never a verdict. The rows the
|
|
552
|
+
shell reads, one per item:
|
|
553
|
+
|
|
554
|
+
- `coverage`: `r<i>`, the probability, and the requirement, for each uncovered requirement at or above `coverage_warn`.
|
|
555
|
+
- `retry-addressed`: `u<i>`, the probability, and the finding, for each finding at or above `untouched_warn`.
|
|
556
|
+
- `dwarf-message`: the first of `question`, `blocked`, `unfinished` that fires, as `<which>` and its probability; otherwise `ok` and the highest probability.
|
|
557
|
+
- `attribution`: `<id>` and its probability, highest first, `none` included.
|
|
558
|
+
- `findings`: a JSON list in input order, `[{"fp", "duplicate_of", "dup_p", "concrete"}]`. `--input` is a JSON object `{"findings": [...], "candidates": [...]}`; `--run-dir` is the plan the findings came from, for the dataset and the request cache.
|
|
559
|
+
|
|
388
560
|
## `scripts/forge-verify.py`
|
|
389
561
|
|
|
390
562
|
The verification lane runner `run`, `retry` and `integrate` use when lanes are declared. You can
|
package/docs/decomposed-runs.md
CHANGED
|
@@ -48,7 +48,13 @@ exist yet. Naming a dwarf per task would mean guessing how the goal will split.
|
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
`--qa`, `--qa-high`, `--qa-medium`, `--qa-low` mirror it exactly. QA has no tier rules by
|
|
51
|
-
default and falls back to `opus
|
|
51
|
+
default and falls back to `opus` (at `high`). Sizing the reviewer to the task's risk costs less
|
|
52
|
+
for the same verdicts: the SWE-bench Pro benchmark (#89) saw no false PASS from Sonnet reviewers,
|
|
53
|
+
at about a seventh of an `opus:xhigh` review's cost. A set to start from:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
--qa-low sonnet:medium --qa-medium sonnet:high --qa-high opus:high
|
|
57
|
+
```
|
|
52
58
|
|
|
53
59
|
Resolution order per task: **explicit column value → the tier's rule → plain `--dwarf` →
|
|
54
60
|
`UNASSIGNED`**. An `UNASSIGNED` task makes `plan` exit `2` and `run` refuse outright. forge
|
|
@@ -100,7 +106,9 @@ that baseline, and QA sees only baseline membership recorded for that task.
|
|
|
100
106
|
|
|
101
107
|
Every dispatch is a **clean slate** — forge never passes `--continue`, `--resume`, or
|
|
102
108
|
`codex exec resume`, except the opt-in `plan --reviewer-session` experiment (it continues
|
|
103
|
-
a reviewer's session across rounds on claude, openclaude and codex)
|
|
109
|
+
a reviewer's session across rounds on claude, openclaude and codex) and the opt-in
|
|
110
|
+
`plan --implementer-session` (a retry continues its implementer's session on claude and
|
|
111
|
+
openclaude when the work is as the review left it). One task's confused
|
|
104
112
|
turn can't poison another, and each task's context stays small.
|
|
105
113
|
|
|
106
114
|
Clean slates alone would leave every dwarf blind to the wider run, so a short `capsule.md` is
|
|
@@ -222,7 +230,7 @@ belong to that pool. See [recovery](../references/fractal.md#limits-and-lifecycl
|
|
|
222
230
|
|
|
223
231
|
```bash
|
|
224
232
|
forge control show <plan-dir> [--json] # every control, per-task overrides, pins, recent changes
|
|
225
|
-
forge control set <plan-dir> qa-threshold P2 # also --task <id>; P0-P3, none, or inherit (task only)
|
|
233
|
+
forge control set <plan-dir> qa-threshold P2 # also --task <id>; P0-P3, none (P3), default (plan only; P2) or inherit (task only)
|
|
226
234
|
forge control set <plan-dir> retry-budget 3 [--task <id>] # automatic retries; live scheduler only
|
|
227
235
|
forge control set <plan-dir> infra-retries 2 # infrastructure waits per scope; live scheduler only
|
|
228
236
|
forge control set <plan-dir> max-parallel 2 # tasks at once, 1-64; live scheduler only
|
|
@@ -257,8 +265,8 @@ Each change is validated, written under `control.lock`, and says when it applies
|
|
|
257
265
|
|
|
258
266
|
- **The QA threshold is read once per attempt**, at the start of the task's next attempt; the
|
|
259
267
|
attempt already running keeps the one it began with, so a verdict is never judged by a bar that
|
|
260
|
-
moved under it. A
|
|
261
|
-
the override. A plan-level `
|
|
268
|
+
moved under it. A `none` (P3) exempts that task from a looser plan threshold; `inherit` drops
|
|
269
|
+
the override. A plan-level `default` removes the setting, so the threshold is P2 again.
|
|
262
270
|
- **Budgets stay "per invocation".** `run --retry-failed N` and `--infra-retries M` still apply
|
|
263
271
|
only to the invocation that was given them and are not remembered; the next `run` starts
|
|
264
272
|
from its own flags. A rule that came back from an old file would silently spend money nobody
|
package/docs/forge-ui.md
CHANGED
|
@@ -69,6 +69,33 @@ view the verification has rows of its own after the tasks, one per lane with a b
|
|
|
69
69
|
reruns marked (a single command's runs sit back to back, dashed, because only their durations
|
|
70
70
|
are known), and its finish node counts the lanes and reruns.
|
|
71
71
|
|
|
72
|
+
The task table's *Now* column, and *Now* at the top of a task's inspector, say where each task
|
|
73
|
+
is. A running task names the dwarf or reviewer at work, the command it is running (and whether
|
|
74
|
+
it is a test, type check, lint or build) and for how long, and flags *quiet N min* once its log
|
|
75
|
+
has said nothing for five minutes. A task that is not running says why: the tasks it waits on, a
|
|
76
|
+
running task it shares files with, no free slot, a drain or stop, an infrastructure pause with
|
|
77
|
+
its countdown, or the retry policy's stop with the split it proposes. The run's inspector says
|
|
78
|
+
what the scheduler is doing and how many tasks wait on what.
|
|
79
|
+
|
|
80
|
+
Under each attempt's dwarf and reviewer are the checks they ran, read from their logs: each
|
|
81
|
+
test, type check, lint or build with its exit, its time and the counts it printed, a failed
|
|
82
|
+
one's last lines, and a link to that command in the conversation. Each attempt then says which
|
|
83
|
+
of the commands its brief's `## Acceptance criteria` names ran, ran another way, or never ran.
|
|
84
|
+
When a failed command met an environment problem (Docker down or out of address pools, a port in
|
|
85
|
+
use, the sandbox's EPERM, a refused local service, no network, a full disk, a missing command)
|
|
86
|
+
the attempt says so, and when more than one task met the same one, a banner in the run's header
|
|
87
|
+
lists them. codex and grok log no times, so forge keeps a small clock beside each agent's log
|
|
88
|
+
(`<role>.clock`, off with `FORGE_LOG_CLOCK=off`); runs from before it show their checks without
|
|
89
|
+
times.
|
|
90
|
+
|
|
91
|
+
A run with a [finding sweep](reviews.md#fixing-them-in-the-run-the-finding-sweep-opt-in) shows its fix
|
|
92
|
+
tasks like any other. A fix task's inspector lists the findings it took, each with a lamp for what
|
|
93
|
+
its review said (fixed, not fixed, not reported), and links each to the task it came from. That task
|
|
94
|
+
shows which of its findings the sweep took and where they stand. The run's *Finish* says how many
|
|
95
|
+
the sweep fixed and lists what it left for `forge issues`, with each reason.
|
|
96
|
+
|
|
97
|
+
A review the reviewer passed but forge failed, because it listed a blocking CONFIRMED finding, shows a red `forge: FAIL (reviewer said PASS)` chip in the *Review findings* section.
|
|
98
|
+
|
|
72
99
|
### Controls
|
|
73
100
|
|
|
74
101
|
forge-ui reads everything, and it changes things only by calling forge's own commands: it
|
|
@@ -77,14 +104,16 @@ locks, the audit log) whichever way you change something, and a change from the
|
|
|
77
104
|
indistinguishable from the same command typed in a terminal, except that `control.log` says
|
|
78
105
|
`ui` instead of `cli`. Every change asks you to confirm and says when it takes effect.
|
|
79
106
|
|
|
80
|
-
- **Run controls** (a plan's inspector): the QA threshold
|
|
107
|
+
- **Run controls** (a plan's inspector): the QA threshold (shown with its source, `P2 (default)`
|
|
108
|
+
or `P1 (set)`); it accepts `P0`–`P3`, *Default* (drop the setting; P2) and *None* (P3, nothing
|
|
109
|
+
tolerated), the per-attempt timeout, how many
|
|
81
110
|
failures before escalating, the effort step, verification retries, the infrastructure backoff,
|
|
82
111
|
and, while a scheduler is live, the retry and infrastructure-retry budgets and max parallel.
|
|
83
112
|
A live run also gets **Drain** (start nothing new; *Resume* ends it), **Stop** (finish what
|
|
84
113
|
runs, then end the run) and **Stop now** (interrupt the running tasks), and one line per
|
|
85
114
|
infrastructure pause: the model or harness it holds, the class, its tasks, and a countdown to
|
|
86
115
|
its next try, or *budget used up*. A task has its own panel for a threshold override
|
|
87
|
-
(
|
|
116
|
+
(*Inherit*, or a level; *None* means P3 for that task), its own retry budget, a
|
|
88
117
|
**model pin**: the model its next full retry uses, once, and, on a live run, **Retry now**
|
|
89
118
|
for a task that stopped or failed, on the policy's choice or a model you name. A retry is
|
|
90
119
|
queued; the panel says *queued*, then *applied* or *refused* with the scheduler's reason.
|
|
@@ -93,8 +122,9 @@ indistinguishable from the same command typed in a terminal, except that `contro
|
|
|
93
122
|
says why.
|
|
94
123
|
- **Open findings:** the review findings a run left open (tolerated by `--qa-threshold`,
|
|
95
124
|
PLAUSIBLE, or left by the whole-run review), for this run or every run of its repository.
|
|
96
|
-
Findings of an outdated review carry an "outdated review" marker,
|
|
97
|
-
accepted have origin `accepted
|
|
125
|
+
Findings of an outdated review carry an "outdated review" marker, findings a person
|
|
126
|
+
accepted have origin `accepted`, and findings the run's finding sweep fixed are *swept*: listed,
|
|
127
|
+
never filed. Select some and file them as GitHub issues, or dismiss the
|
|
98
128
|
ones that need no work (and take that back). It runs `forge issues`, so a finding is never
|
|
99
129
|
filed twice.
|
|
100
130
|
- **Delete a run:** a dialog that first shows a dry run, then deletes the run directory
|
package/docs/memory.md
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
What forge learns about a repository, where it keeps it, what each role is told, and what forge has spent there.
|
|
6
6
|
|
|
7
7
|
Every forge dispatch is a clean slate — the opt-in `plan --reviewer-session` experiment,
|
|
8
|
-
which continues a reviewer's session across rounds,
|
|
8
|
+
which continues a reviewer's session across rounds, and `plan --implementer-session`, which
|
|
9
|
+
continues an implementer's on a retry, are the exceptions — so without help the
|
|
9
10
|
tenth run in a repo rediscovers what the first one learned. forge keeps that in the repo,
|
|
10
11
|
in two files:
|
|
11
12
|
|
package/docs/models.md
CHANGED
|
@@ -26,8 +26,10 @@ the wrong provider.
|
|
|
26
26
|
- `--dwarf` missing → forge **asks**. Every dispatch spends real quota on your account, so
|
|
27
27
|
picking for you isn't its call.
|
|
28
28
|
- `--qa` missing → `opus`, which runs locally through `claude` and adds no cost surprise.
|
|
29
|
-
- effort missing → dwarf builds at `medium`, qa reviews at `xhigh`. A
|
|
30
|
-
*less* than the implementer tends to wave things through, which wastes the
|
|
29
|
+
- effort missing → dwarf builds at `medium`, qa reviews at `high`, a planner plans at `xhigh`. A
|
|
30
|
+
reviewer thinking *less* than the implementer tends to wave things through, which wastes the
|
|
31
|
+
stage entirely; `xhigh` reviews cost about twice as much as `high` ones for the same verdicts in
|
|
32
|
+
the SWE-bench Pro benchmark (#89), so `high` is the default and `xhigh` is yours to ask for.
|
|
31
33
|
|
|
32
34
|
## Effort, ceilings and clamping
|
|
33
35
|
|