@giamme/forge 0.18.0 → 0.20.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 +49 -0
- package/README.md +1 -0
- package/SKILL.md +19 -2
- package/VERSION +1 -1
- package/docs/artifacts.md +25 -1
- package/docs/commands.md +217 -18
- package/docs/decomposed-runs.md +114 -1
- package/docs/development.md +2 -1
- package/docs/forge-ui.md +138 -18
- package/docs/memory.md +25 -4
- package/docs/models.md +8 -0
- package/docs/reviews.md +122 -0
- package/forge +26 -3
- package/package.json +2 -1
- package/references/dataset.md +20 -1
- package/references/decompose.md +641 -41
- package/references/harnesses.md +18 -3
- package/references/memory.md +30 -5
- package/references/planning.md +43 -14
- package/references/ui.md +53 -6
- package/registry.tsv +8 -3
- package/scripts/forge-brief.py +88 -3
- package/scripts/forge-compare.py +4 -3
- package/scripts/forge-contract.py +202 -27
- package/scripts/forge-control.py +117 -5
- package/scripts/forge-dispatch.sh +34 -5
- package/scripts/forge-findings.py +675 -0
- package/scripts/forge-group.py +496 -0
- package/scripts/forge-groups.py +89 -0
- package/scripts/forge-handoff.py +1128 -0
- package/scripts/forge-issues.py +228 -97
- package/scripts/forge-lib-group.sh +641 -0
- package/scripts/forge-lib-plans.sh +339 -3
- package/scripts/forge-lib-task.sh +197 -4
- package/scripts/forge-memory.sh +711 -17
- package/scripts/forge-parallel.sh +721 -38
- package/scripts/forge-planner.py +104 -8
- package/scripts/forge-route.py +190 -12
- package/scripts/forge-runs.py +9 -5
- package/scripts/forge-schedule.py +417 -52
- package/scripts/forge-solo.sh +2 -0
- package/scripts/forge-sweep.py +199 -44
- package/scripts/forge-worktrees.py +243 -0
- package/scripts/forge_brief/__init__.py +294 -50
- package/scripts/forge_brief/answers.py +58 -11
- package/scripts/forge_brief/proposals.py +1630 -0
- package/scripts/forge_dataset/efforts.py +4 -3
- package/scripts/forge_dataset/export.py +24 -12
- package/scripts/forge_dataset/facts.py +5 -3
- package/scripts/forge_dataset/forecast.py +8 -18
- package/scripts/forge_dataset/harvest.py +204 -9
- package/scripts/forge_dataset/history.py +11 -6
- package/scripts/forge_dataset/importer.py +65 -1
- package/scripts/forge_dataset/names.py +66 -0
- package/scripts/forge_dataset/reviewers.py +5 -2
- package/scripts/forge_dataset/risk.py +6 -3
- package/scripts/forge_dataset/routing.py +6 -1
- package/scripts/forge_findings/__init__.py +17 -0
- package/scripts/forge_findings/apply.py +441 -0
- package/scripts/forge_findings/status.py +43 -0
- package/scripts/forge_findings/store.py +583 -0
- package/scripts/forge_findings/tags.py +53 -0
- package/scripts/forge_findings/triage.py +603 -0
- package/scripts/forge_groups/__init__.py +308 -0
- package/scripts/forge_groups/attribute.py +289 -0
- package/scripts/forge_groups/review.py +286 -0
- package/scripts/forge_identity.py +327 -0
- package/scripts/forge_memory_list.py +7 -3
- package/scripts/forge_owner.py +152 -0
- package/scripts/forge_side/__init__.py +228 -38
- package/ui/docs/api.md +303 -29
- package/ui/forge_ui/control.py +1018 -6
- package/ui/forge_ui/executions.py +8 -1
- package/ui/forge_ui/export.py +31 -4
- package/ui/forge_ui/groups.py +264 -0
- package/ui/forge_ui/models.py +70 -8
- package/ui/forge_ui/projects.py +209 -22
- package/ui/forge_ui/reader.py +262 -19
- package/ui/forge_ui/server.py +4 -0
- package/ui/forge_ui/static/app.js +93 -13
- package/ui/forge_ui/static/briefview.js +350 -47
- package/ui/forge_ui/static/diffview.js +86 -1
- package/ui/forge_ui/static/findingsactions.js +201 -0
- package/ui/forge_ui/static/groupsview.js +332 -0
- package/ui/forge_ui/static/index.html +3 -0
- package/ui/forge_ui/static/panel.js +127 -7
- package/ui/forge_ui/static/projectsview.js +764 -30
- package/ui/forge_ui/static/runmodel.js +14 -3
- package/ui/forge_ui/static/storageview.js +91 -10
- package/ui/forge_ui/static/style.css +138 -5
- package/ui/forge_ui/static/triageview.js +423 -0
- package/ui/forge_ui/static/worktreesview.js +233 -12
- package/ui/forge_ui/storage.py +14 -0
package/docs/decomposed-runs.md
CHANGED
|
@@ -102,6 +102,34 @@ as prerequisites merge and capacity becomes available, while excluding overlappi
|
|
|
102
102
|
paths. Merges are serialized. Each task pins the integration commit at dispatch; retries keep
|
|
103
103
|
that baseline, and QA sees only baseline membership recorded for that task.
|
|
104
104
|
|
|
105
|
+
## Groups in the approval table
|
|
106
|
+
|
|
107
|
+
When the plan has `groups.tsv`, the table adds a `groups:` block after the waves. One line
|
|
108
|
+
per group: id, `review=task` or `review=group`, the QA spec as `qa=<spec>` or `-`, the
|
|
109
|
+
members, and the goal (or `(no goal)`).
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
groups:
|
|
113
|
+
g1 review=group qa=opus:medium a, b, c — Every command can write JSON and TSV
|
|
114
|
+
g2 review=group qa=sonnet d, e — (no goal)
|
|
115
|
+
w3 review=task - f, g — (no goal)
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
A `review=task` group is a name only. It does not change the estimate. When any group has
|
|
119
|
+
`review=group`, the estimate counts one review for the group instead of one per member, and
|
|
120
|
+
prints both lines. Seven tasks and two review groups covering five members look like this:
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
tasks: 7 waves: 1 estimated dispatches: 11 (7 dwarf + 4 qa)
|
|
124
|
+
reviews: 4 (2 groups replace 5 task reviews)
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
The reviews line is `reviews: N (G groups replace M task reviews)`. The word stays `groups`
|
|
128
|
+
when there is one. The count is tasks, minus members of review groups, plus the number of
|
|
129
|
+
those groups. What the run then does is in
|
|
130
|
+
[Groups and group review](../references/decompose.md#groups-and-group-review-opt-in). The
|
|
131
|
+
tradeoff is in [group review](reviews.md#group-review-opt-in).
|
|
132
|
+
|
|
105
133
|
## Fresh session per task, plus a capsule
|
|
106
134
|
|
|
107
135
|
Every dispatch is a **clean slate** — forge never passes `--continue`, `--resume`, or
|
|
@@ -199,6 +227,21 @@ For Fractal execution, pass tier pools to `plan` and backend/limit flags to `run
|
|
|
199
227
|
`--max-parallel` limits task pipelines; the shared `--fractal-concurrency` limit includes
|
|
200
228
|
all their child invocations and QA. See [decomposed Fractal execution](../references/decompose.md#fractal-within-decomposed-tasks).
|
|
201
229
|
|
|
230
|
+
A plan can start from a finished plan's integration branch. `A` and `B` are plan directories:
|
|
231
|
+
|
|
232
|
+
```
|
|
233
|
+
plan B --after A
|
|
234
|
+
run B
|
|
235
|
+
integrate B --approved
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
`plan` exits 2 unless `A` is a plan of the same repo, every task is `MERGED`, the integration
|
|
239
|
+
branch tip is `A`'s `accepted.integration`, and `A`'s scheduler is not live. It writes `after`
|
|
240
|
+
and `integration.base`, and creates `B`'s integration branch at that tip. `run` exits 3 if `A`
|
|
241
|
+
moved and `B` has not yet merged a task. `integrate` prints `this brings plans` and the run
|
|
242
|
+
ids, oldest first. `forge runs` shows `after <run>` on `B`. See
|
|
243
|
+
[Chained plans](../references/decompose.md#chained-plans).
|
|
244
|
+
|
|
202
245
|
## Resuming an interrupted run
|
|
203
246
|
|
|
204
247
|
Ctrl-C (or a SIGTERM) on `run` stops the running tasks' process groups, waiting up to
|
|
@@ -224,6 +267,65 @@ and pipeline checkpoints. A task/subtree selector resumes only that execution sc
|
|
|
224
267
|
Explicit `retry` retains the backend and frozen pools; a replacement dwarf must already
|
|
225
268
|
belong to that pool. See [recovery](../references/fractal.md#limits-and-lifecycle).
|
|
226
269
|
|
|
270
|
+
### From another session or harness
|
|
271
|
+
|
|
272
|
+
Start with `forge handoff`. With no argument inside a checkout, or with `--repo DIR`, it
|
|
273
|
+
reports that repository's newest registered plan that is live or still has a task not
|
|
274
|
+
`MERGED` (run-dir mtime; a plan is one with `tasks.tsv`). `forge handoff [show] RUN_DIR
|
|
275
|
+
[--json]` reports the run you name and writes nothing: id, kind, the first five non-empty
|
|
276
|
+
lines of `request.md`, the plan dir, repo, worktree root and integration branch, plus the
|
|
277
|
+
recorded base and accepted commits; the option files and `run.flags.json`; whether the
|
|
278
|
+
scheduler is live; each task; what needs a person (a `NEEDS_INPUT` question verbatim, the
|
|
279
|
+
first line of a `NEEDS_DECISION`'s `decision.md`, an `INFRA` cause and hint); the last
|
|
280
|
+
`control.log` changes; tasks left `RUNNING` with no live scheduler; session notes, newest
|
|
281
|
+
first; the driver; and the exact next commands. A path that is not a run dir exits 2. No
|
|
282
|
+
matching run exits 3.
|
|
283
|
+
|
|
284
|
+
`forge handoff resume RUN_DIR` carries a decomposed run on. It claims the run first; a
|
|
285
|
+
refused claim exits 3 and changes nothing else. A live scheduler is followed and nothing is
|
|
286
|
+
started — leave that run to `forge control show`, and do not start `run` beside it. A
|
|
287
|
+
Fractal plan is not restarted here; resume names `forge fractal resume`. Otherwise each
|
|
288
|
+
task still `RUNNING` is recovered, and only when its worktree is exactly `<wt_root>/<id>`
|
|
289
|
+
on `forge/<run_id>/<id>` and any leftover `dwarf.harness` or `qa.harness` has been stopped:
|
|
290
|
+
the uncommitted work, untracked files included, is saved to
|
|
291
|
+
`tasks/<id>/interrupted-<epoch>.diff`, and only then is the worktree reset and cleaned, the
|
|
292
|
+
status set to `INTERRUPTED`, and the attempt counter rewound when `attempts.tsv` has no row
|
|
293
|
+
for that attempt, so the attempt is not counted twice. A guard that fails leaves that
|
|
294
|
+
worktree untouched. Every `INTERRUPTED` task, including one that was already interrupted,
|
|
295
|
+
is prepared with `retry --no-dispatch`. `run` then starts again, detached, from
|
|
296
|
+
`run.flags.json`. Output goes to `resume-<epoch>.log`; the exit code is written to
|
|
297
|
+
`resume-<epoch>.done` when the run ends. A launch that fails exits 1.
|
|
298
|
+
|
|
299
|
+
`run` writes `run.flags.json` at each real start. A dry run and a `retry` do not, and a
|
|
300
|
+
split or rerun does not copy it. The fields are `retry_failed`, `infra_retries`, `sweep`,
|
|
301
|
+
`sweep_max`, `sweep_plausible`, `sweep_ahead`, `max_parallel`, `timeout`, `verify`,
|
|
302
|
+
`fractal`, `argv` and `at`. `retry_failed` and `infra_retries` are the budgets the
|
|
303
|
+
scheduler removes when it stops (`retry_budget`, `infra_budget`, and each task's
|
|
304
|
+
`retry_budget`), so resume can pass them again. Resume rebuilds the `run` command from
|
|
305
|
+
those fields; it does not replay `argv` as typed. A run from before 0.19 has no file:
|
|
306
|
+
resume still saves and prepares, then prints the `run` command to finish by hand and
|
|
307
|
+
starts nothing. An unreadable file does the same, and says the file cannot be read.
|
|
308
|
+
|
|
309
|
+
`forge handoff note RUN_DIR TEXT [--actor A]` appends one JSON line to
|
|
310
|
+
`handoff.notes.jsonl` (`at`, `actor`, `text`): a decision the user made, or a hand fix
|
|
311
|
+
under way, that is not in the plan. Whitespace collapses to single spaces. Empty text,
|
|
312
|
+
text over 2000 characters, and text that is not UTF-8 are refused. `--actor` defaults to
|
|
313
|
+
`cli`.
|
|
314
|
+
|
|
315
|
+
`forge handoff claim RUN_DIR --harness H [--session S]` writes `handoff.driver.json`
|
|
316
|
+
(`harness`, `session`, `since`, `last_seen`). `--harness` matches `[a-z0-9._-]{1,40}`.
|
|
317
|
+
`--session` is an id with no whitespace, at most 200 characters. `resume` claims the same
|
|
318
|
+
way, and its `--harness` defaults to `unknown`. The same harness and session keep `since`
|
|
319
|
+
and refresh `last_seen`. A different driver last seen under 12 hours ago is refused
|
|
320
|
+
(exit 3) unless `--take-over`. One last seen 12 hours ago or earlier is replaced without that flag.
|
|
321
|
+
Replacing a driver appends one `control.log` line (`action` `take-over`, `actor` `cli`,
|
|
322
|
+
`key` `driver`) and a dataset `control` event. When `control.log` is not a regular file
|
|
323
|
+
the replacement is refused before the driver file changes. Take over only when asked.
|
|
324
|
+
|
|
325
|
+
Running `run` again, and an explicit `retry` for a failed or interrupted task, stays
|
|
326
|
+
the way to finish by hand. That is also the command resume prints when
|
|
327
|
+
`run.flags.json` is missing.
|
|
328
|
+
|
|
227
329
|
## Changing a run while it works
|
|
228
330
|
|
|
229
331
|
`forge control` changes a plan's knobs without stopping it (forge-ui calls the same command):
|
|
@@ -269,6 +371,11 @@ waiting on it start in the same run. `control.log` records who asked (`--actor`)
|
|
|
269
371
|
A forge command the plan lock refuses says which command holds it (pid and since when), and on a
|
|
270
372
|
live run which `forge control` command to use instead.
|
|
271
373
|
|
|
374
|
+
Editing a task's `prompt.md` or `approach.md` while a run is going is allowed. An attempt
|
|
375
|
+
already running is not reviewed against the new text: it is marked `STALE` and re-dispatched
|
|
376
|
+
with the new requirements, and the attempt is not spent. `control.log` records `prompt-changed`
|
|
377
|
+
with actor `scheduler`. See [failures that are the plan's](reviews.md#failures-that-are-the-plans).
|
|
378
|
+
|
|
272
379
|
Each change is validated, written under `control.lock`, and says when it applies:
|
|
273
380
|
|
|
274
381
|
- **The QA threshold is read once per attempt**, at the start of the task's next attempt; the
|
|
@@ -363,7 +470,7 @@ docs - low README.md - - Document the auth flow
|
|
|
363
470
|
| `deps` | comma-list of task ids that must land first, or `-` |
|
|
364
471
|
| `difficulty` | `low` \| `medium` \| `high` |
|
|
365
472
|
| `files` | expected touch set, comma-separated — **drives disjointness** |
|
|
366
|
-
| `dwarf` / `qa` | `-` to resolve from the routing rules; an explicit spec always wins |
|
|
473
|
+
| `dwarf` / `qa` | `-` to resolve from the routing rules; an explicit spec always wins. `script` in `dwarf` runs `tasks/<id>/run` |
|
|
367
474
|
| `title` | one line, shown in the approval table and the capsule |
|
|
368
475
|
|
|
369
476
|
Each task also needs `tasks/<id>/prompt.md`, written the same way a single-task forge goal is.
|
|
@@ -375,3 +482,9 @@ understated `files` is how two dwarves end up in the same file.
|
|
|
375
482
|
`plan` writes resolved specs back into the `dwarf`/`qa` columns, so `run` never consults the
|
|
376
483
|
routing rules — and an explicit value survives a re-plan, which is what makes a gate override
|
|
377
484
|
durable. (`UNASSIGNED` is treated as a leftover marker and re-resolved.)
|
|
485
|
+
|
|
486
|
+
A `dwarf` value of `script` runs the executable `tasks/<id>/run` and is not given a model.
|
|
487
|
+
`plan` exits 2 when that file is missing or not executable, shows the row, and counts no
|
|
488
|
+
implementer dispatch. A non-zero exit or a timeout is `FAIL` with no review and no escalation.
|
|
489
|
+
A retry runs the command again from the base, so the way to change the diff is to edit `run`.
|
|
490
|
+
See [Scripted tasks](../references/decompose.md#scripted-tasks).
|
package/docs/development.md
CHANGED
|
@@ -44,6 +44,7 @@ forge/
|
|
|
44
44
|
│ ├── forge-pr.py `forge pr`: a draft PR description for a finished run (reads with forge-ui's reader)
|
|
45
45
|
│ └── forge-install.sh install into every harness that needs it (opencode and grok find it themselves)
|
|
46
46
|
├── ui/ forge-ui: read-only local run viewer (`forge_ui` package, tests, API contract)
|
|
47
|
+
├── site/ the website and plain-language docs, published by GitHub Pages (see site/README.md)
|
|
47
48
|
└── references/
|
|
48
49
|
├── ui.md forge-ui: commands, env vars, shared server, state, privacy
|
|
49
50
|
├── harnesses.md per-harness invocation, ladders, failure modes
|
|
@@ -56,7 +57,7 @@ forge/
|
|
|
56
57
|
## Offline checks
|
|
57
58
|
|
|
58
59
|
Run `bash tests/check.sh` for offline regression checks. See [tests](../tests/README.md) for skill
|
|
59
|
-
invocation scenarios and verification limits.
|
|
60
|
+
invocation scenarios and verification limits. Two CI workflows, neither of which runs the tests: one builds and publishes the website ([site/README.md](../site/README.md)), and `.github/workflows/npm-publish.yml` publishes the package to npm when a GitHub Release is published (npm trusted publishing, no token).
|
|
60
61
|
|
|
61
62
|
## Runtime efficiency and measurement
|
|
62
63
|
|
package/docs/forge-ui.md
CHANGED
|
@@ -80,17 +80,46 @@ running task it shares files with, no free slot, a drain or stop, an infrastruct
|
|
|
80
80
|
its countdown, or the retry policy's stop with the split it proposes. The run's inspector says
|
|
81
81
|
what the scheduler is doing and how many tasks wait on what.
|
|
82
82
|
|
|
83
|
+
A run with `groups.tsv` shows a Groups block after the task table. Each row is the group's title
|
|
84
|
+
and goal, "one review" or "per-task review", its reviewer and its members. A review group's
|
|
85
|
+
title opens `#/runs/<key>/group/<gid>`, and that row also shows the status, the round and who
|
|
86
|
+
the last review implicated. The group page shows a decision only while the group is
|
|
87
|
+
`NEEDS_DECISION`: the first line of `decision.md`, and a `forge group retry` command to copy.
|
|
88
|
+
The page does not run it. Below that are the findings, with ambiguous ones marked, the rounds,
|
|
89
|
+
known issues, the review text and a link to its transcript. A task at `IMPLEMENTED` reads
|
|
90
|
+
"awaiting group review" in the Status column and in its inspector. The lamp class stays
|
|
91
|
+
`IMPLEMENTED`. The task table adds a Group column while the run has groups, and the inspector
|
|
92
|
+
shows a `group <id>` chip. See [the forge-ui reference](../references/ui.md).
|
|
93
|
+
|
|
83
94
|
A task's inspector opens on its header: its title and goal, its links (`#N` and GitHub issue and pull
|
|
84
95
|
request URLs; `#N` links to the repo's GitHub origin when there is one), and the Prompt, Approach and
|
|
85
96
|
Acceptance criteria buttons. Then comes its attempt trail, one line per attempt with the reason it ran
|
|
86
97
|
(for example *after review findings* or *escalated to a stronger model*). Then its Summary: the
|
|
87
98
|
generated summary, the model and time it was made, its sources, and an *Out of date* mark once the
|
|
88
|
-
task has changed since. Then its Questions: the brief questions, each with an answer box
|
|
89
|
-
|
|
90
|
-
|
|
99
|
+
task has changed since. Then its Questions: the brief questions, each with an answer box. When a
|
|
100
|
+
question belongs to a group, or one is plan-scoped, the list is split: each group's title and
|
|
101
|
+
goal, then a Plan heading, then No group for a question with no group. A list with neither stays
|
|
102
|
+
flat. Parked questions stay behind a collapsed *Parked (wider scope)* block, grouped
|
|
103
|
+
the same way. An answered parked `wave` or `plan` question has *Propose a change*. A solo run has
|
|
104
|
+
the header and the trail only. Above a plan's task table sit its open brief questions, flagged
|
|
105
|
+
first and then by projected start, in those same groups, and under them the proposals. Each
|
|
106
|
+
proposal shows its state, scope, group, summary, diff and hash. One in state `proposed` has
|
|
107
|
+
*Approve* and *Reject*; the reject reason is optional. A task an approved proposal marked carries
|
|
108
|
+
an affected badge beside its status and in its inspector: `affected by <pid>`, or `flagged:
|
|
109
|
+
already started` when the task had already started. The marker's reason (`changed`, `added` or
|
|
110
|
+
`dependent`) is the badge's tooltip. The summaries switch sits with that list.
|
|
91
111
|
A run with a retro report or notes shows a Retro section in its run details: the note counts on one line,
|
|
92
112
|
then the report, collapsed.
|
|
93
113
|
|
|
114
|
+
A task that stopped `NEEDS_INPUT` opens *Waiting for you*: the question from `tasks/<id>/needs_input.md`,
|
|
115
|
+
and a `forge-parallel.sh retry … --answer` command to copy. On a plan, when the server can write, an
|
|
116
|
+
answer field sits under that command. *Send answer* runs
|
|
117
|
+
[`forge control retry PLAN ID --answer-file -`](commands.md#the-forge-command) (`--actor ui`) and does
|
|
118
|
+
not ask first: it is not a destructive change. While a scheduler is live the page says the answer is
|
|
119
|
+
queued and the scheduler resumes the task; with no live run it says the answer is prepared for the
|
|
120
|
+
next `run`. A solo run shows the question and the command only. Under `--read-only` the field is
|
|
121
|
+
absent and the copy button stays.
|
|
122
|
+
|
|
94
123
|
Under each attempt's dwarf and reviewer are the checks they ran, read from their logs: each
|
|
95
124
|
test, type check, lint or build with its exit, its time and the counts it printed, a failed
|
|
96
125
|
one's last lines, and a link to that command in the conversation. Each attempt then says which
|
|
@@ -115,8 +144,15 @@ A review the reviewer passed but forge failed, because it listed a blocking CONF
|
|
|
115
144
|
forge-ui reads everything, and it changes things only by calling forge's own commands: it
|
|
116
145
|
never writes a run file, a repo or a config itself. That keeps one set of rules (validation,
|
|
117
146
|
locks, the audit log) whichever way you change something, and a change from the page is
|
|
118
|
-
indistinguishable from the same command typed in a terminal, except that
|
|
119
|
-
`ui` instead of `cli
|
|
147
|
+
indistinguishable from the same command typed in a terminal, except that the page passes
|
|
148
|
+
`--actor ui` (`control.log` says `ui` instead of `cli` for a control change). A destructive change
|
|
149
|
+
shows a dry run and then asks: removing worktrees, forgetting memories, compacting disk and deleting
|
|
150
|
+
a run. A finding action (mark fixed, dismiss, reopen, mark to file, duplicate, tag, note or edit),
|
|
151
|
+
adding or editing a learning, starting a triage, and approving a triage proposal each ask you to
|
|
152
|
+
confirm first, with no dry run. A brief answer, a brief proposal, approving or rejecting a brief
|
|
153
|
+
proposal, rejecting a triage proposal, and *Send answer* on a task that is waiting go out when you
|
|
154
|
+
press the button, with no dry run. The HTTP shapes are in
|
|
155
|
+
[the API](../ui/docs/api.md); this page describes what you do.
|
|
120
156
|
|
|
121
157
|
- **Run controls** (a plan's inspector): the QA threshold (shown with its source, `P2 (default)`
|
|
122
158
|
or `P1 (set)`); it accepts `P0`–`P3`, *Default* (drop the setting; P2) and *None* (P3, nothing
|
|
@@ -133,23 +169,98 @@ indistinguishable from the same command typed in a terminal, except that `contro
|
|
|
133
169
|
queued; the panel says *queued*, then *applied* or *refused* with the scheduler's reason.
|
|
134
170
|
Each is `forge control`; see [decomposed runs](decomposed-runs.md#changing-a-run-while-it-works).
|
|
135
171
|
A control that cannot apply (a budget with no live scheduler, a merged task) is disabled and
|
|
136
|
-
says why.
|
|
172
|
+
says why. A task waiting `NEEDS_INPUT` is not *Retry now*: its answer field is described above
|
|
173
|
+
and runs `forge control retry --answer`.
|
|
137
174
|
- **Projects (`#/projects`):** one page per repository with its runs, every finding forge's reviews
|
|
138
175
|
wrote about it (each attempt, final reviews, shadow reviews behind a toggle), and every memory forge
|
|
139
|
-
keeps for it, whichever run or checkout they came from.
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
176
|
+
keeps for it, whichever run or checkout they came from. Repeats across rounds are one row with a count.
|
|
177
|
+
The status column is the one [`forge findings`](commands.md#forge-findings) prints. The record wins
|
|
178
|
+
when it says `duplicate`, `dismissed`, `fixed`, `filed` or `to-file`. Otherwise a filed issue GitHub
|
|
179
|
+
has closed is `fixed` and one still open is `filed`; unless the record reopened the finding, a swept
|
|
180
|
+
one is `swept` and an old dismissal is `dismissed`. A shadow review is `shadow`, an unlabelled one
|
|
181
|
+
(`UNSTATED`) is `unlabelled`, and a finding a later review of the same task got past is `superseded`
|
|
182
|
+
(that does not say it was fixed). Anything else is `open`. The open count, on the project list and
|
|
183
|
+
in the Findings filter named `open`, counts only `open` and `to-file`, so `shadow`, `unlabelled`,
|
|
184
|
+
`superseded`, `swept`, `dismissed`, `duplicate`, `filed` and `fixed` are left out. The project list
|
|
185
|
+
does not ask GitHub, so a filed or swept finding can still be in that number; the Findings tab asks
|
|
186
|
+
and can count fewer. A `to-file` row keeps its draft. Each row shows its tags: the ones stored on
|
|
187
|
+
the record, or, when none are stored, the default for its path (`tests`, `docs`, `infra`, `ui` or
|
|
188
|
+
`backend`), marked as derived from the path. The tab asks `forge issues` online, so a closed issue
|
|
189
|
+
can show `fixed`, and says when those states were read. When GitHub cannot be asked it says so, and
|
|
190
|
+
that a filed finding may show as open. When the server can write, select findings (a row with no
|
|
191
|
+
record key cannot) and confirm one action. There is no dry run. Each runs
|
|
192
|
+
[`forge findings`](commands.md#forge-findings) on the repository root with `--actor ui`: *Mark fixed*
|
|
193
|
+
is `forge findings fix REPO FP…` with `--commit` (7 to 40 hex characters), `--reason`, or both;
|
|
194
|
+
*Dismiss* is `forge findings dismiss REPO FP… --reason TEXT` (the reason is required); *Reopen* is
|
|
195
|
+
`forge findings reopen REPO FP…`; *Mark to file* is `forge findings to-file REPO FP…` with an
|
|
196
|
+
optional `--title` and keeps a draft, it does not open a GitHub issue; *Duplicate of…* is
|
|
197
|
+
`forge findings dup REPO FP --of FP` (one finding); *Tags…* is `forge findings tag REPO FP… -- TAG…`
|
|
198
|
+
with `--add` or `--remove`. A row's *Note* is `forge findings note REPO FP TEXT` (empty text clears
|
|
199
|
+
it) and *Edit* is `forge findings edit REPO FP` with `--severity` (`P0`–`P3`), `--text-file`, or
|
|
200
|
+
both: the replacement stays on the record and does not rewrite the review. Note and edit take one
|
|
201
|
+
finding. *File selected* is separate and still runs `forge issues`: it shows the drafts and creates
|
|
202
|
+
the GitHub issues only after that confirm. *Triage with an agent* is on the same tab. You name a
|
|
203
|
+
spec; the page checks it with `bash scripts/forge-dispatch.sh doctor --spec S --role side` and does
|
|
204
|
+
not call a model for that check. *Start triage* stays disabled until that check passes, while a
|
|
205
|
+
triage is already running, or when *Most findings* is filled in with anything other than a whole
|
|
206
|
+
number from 1 to 2000. Starting
|
|
207
|
+
asks you to confirm, because it spends that model's quota, then runs
|
|
208
|
+
`forge findings triage REPO --spec S [--max-findings N] --detach --actor ui`. Left empty, *Most
|
|
209
|
+
findings* omits `--max-findings` and the command's default of 400 applies. While it runs, the page reads
|
|
210
|
+
`forge findings triage-status` and `forge findings proposals` every 5 seconds. The agent only
|
|
211
|
+
proposes. Each proposal is `duplicate`, `fixed`, `tag`, `issue` or `plan`. *Approve* asks first and
|
|
212
|
+
runs `forge findings apply REPO N PID --approve HASH [--plan-dir DIR] --actor ui` with the hash on
|
|
213
|
+
that card, so a proposal that changed since you read it is refused and nothing is written. An
|
|
214
|
+
`issue` approval only marks those findings `to-file` with the draft; GitHub is not contacted. A
|
|
215
|
+
`plan` approval writes a plan directory and shows
|
|
216
|
+
`bash scripts/forge-parallel.sh plan DIR --repo CHECKOUT`. Nothing runs by itself. *Reject* runs
|
|
217
|
+
`forge findings reject REPO N PID [--reason TEXT] --actor ui` when you press it, with no confirm.
|
|
218
|
+
Under `--read-only` the tab still lists the findings and shows those `forge findings` commands to
|
|
219
|
+
copy, including the triage ones, and hides the buttons. The Memories tab shows what `memory.md`
|
|
220
|
+
gives each role and each learning's state, as `forge memory learnings` reports it. Runs and
|
|
221
|
+
checkouts that are gone are read from the dataset, and those rows say so. When the server can write,
|
|
222
|
+
each learning on the checkout you are looking at has a checkbox, the filtered list has *Select all*,
|
|
223
|
+
and *Forget selected* runs [`forge memory forget`](commands.md#forge-memory-forget) on that checkout
|
|
224
|
+
with `--actor ui`. It dry-runs first. The confirm lists the learnings (`category:key` and the text)
|
|
225
|
+
and the `memory.md` lines that go, or says that no `memory.md` line goes. Cancelling sends nothing
|
|
226
|
+
more. The result then says how many ledger rows each key lost, or that the key was not found. A
|
|
227
|
+
learning with no category or key cannot be selected. *Add learning* runs `forge memory add` on the
|
|
228
|
+
checkout you picked, or on every checkout of the project that exists when none is picked:
|
|
229
|
+
`--category verify|trap|finding --text TEXT [--path P]… --actor ui`. *Edit* on a row runs
|
|
230
|
+
`forge memory edit` there with that learning's `category:key` and `--text`, the same `--actor ui`.
|
|
231
|
+
Each asks you to confirm first, with no dry run; the confirm names the checkouts and, for an edit,
|
|
232
|
+
the old text and the new. Add and edit are documented with
|
|
233
|
+
[`forge memory forget`](commands.md#forge-memory-forget). Under `--read-only` the tab still shows
|
|
234
|
+
the learnings, hides the checkboxes, Forget, Add and Edit, and shows the `forge memory` commands
|
|
235
|
+
to copy. Reachable from the header, a run's repository name and each map district.
|
|
144
236
|
- **Disk (`#/disk`):** what forge takes on disk in every repository it has runs for (each run dir's
|
|
145
237
|
review snapshots, logs and anything forge does not create, each run's worktree folder, the data home),
|
|
146
|
-
what can go without losing a run, and the command that takes it back (`forge runs compact`),
|
|
147
|
-
The same report as `forge du --all`; measured in the background when the screen opens.
|
|
238
|
+
what can go without losing a run, and the command that takes it back (`forge runs compact --logs`),
|
|
239
|
+
to copy. The same report as `forge du --all`; measured in the background when the screen opens.
|
|
240
|
+
When the server can write, a reclaimable run gets *Compact* and the whole-disk command gets
|
|
241
|
+
*Compact all*. Each one dry-runs
|
|
242
|
+
[`forge runs compact`](commands.md#forge-runs-compact) `--logs` first and the confirm says how
|
|
243
|
+
much space would be freed and across how many runs. The real call is the same command without
|
|
244
|
+
`--dry-run`. An active run is refused and the page says to compact it after it ends. Copy stays
|
|
245
|
+
beside the button. Under `--read-only` the commands are only copied. This command records
|
|
246
|
+
`run_compacted` and takes no actor.
|
|
148
247
|
- **Worktrees (`#/worktrees`):** every worktree forge created, in any repository it knows: its
|
|
149
248
|
run, task, branch, last commit, size and status (in use, uncommitted changes, locked, needed by
|
|
150
249
|
the run, failed task, finished, missing on disk, not forge's, unknown to git, removed), and the
|
|
151
|
-
command that removes it safely, to copy.
|
|
152
|
-
|
|
250
|
+
command that removes it safely, to copy. Those copied commands never use `--force` (`git worktree
|
|
251
|
+
remove`, `git branch -d` for a finished merged branch, `rm -rf` for a leftover folder, `git status`
|
|
252
|
+
or `git worktree prune` when that is the safe next step). The per-run `forge runs rm … --dry-run`
|
|
253
|
+
line is still only copied: it would delete the run directory as well. When the server can write,
|
|
254
|
+
the filtered view adds a checkbox and *Remove* on each row that can go, *Select all* for those
|
|
255
|
+
rows, *Remove selected*, and *Delete merged branches too*. *Remove* and *Remove selected* both
|
|
256
|
+
run [`forge worktrees rm`](commands.md#forge-worktrees-rm) with `--actor ui` (and `--branches`
|
|
257
|
+
when that box is checked): one dry run, a summary of what would go and what is skipped and why,
|
|
258
|
+
then a confirm, then the real call and a line per row (removed, skipped, or failed, with the
|
|
259
|
+
reason). If the dry run would remove nothing, that summary is the end of it and nothing is
|
|
260
|
+
asked. A row that cannot be removed shows why beside a disabled checkbox (its run is active,
|
|
261
|
+
uncommitted changes, locked by git, the run still needs it, already gone, not forge's, already
|
|
262
|
+
removed, or not a leftover). Under `--read-only` there is no checkbox and no Remove, and every
|
|
263
|
+
copy button stays. Removed worktrees are listed from the dataset (`worktree_created` and
|
|
153
264
|
`worktree_removed` events); worktrees from before forge recorded them are derived from run dirs,
|
|
154
265
|
without dates. With `FORGE_DATASET=off` the screen lists only what git and the run dirs say.
|
|
155
266
|
- **Open findings:** the review findings a run left open (tolerated by `--qa-threshold`,
|
|
@@ -172,16 +283,25 @@ indistinguishable from the same command typed in a terminal, except that `contro
|
|
|
172
283
|
- **Summaries:** a switch above a plan's task table turns summaries on or off for the run. A task's own
|
|
173
284
|
switch, in its Summary section, sets it to *On*, *Off* or *Inherit* (the run's setting). Each change is
|
|
174
285
|
confirmed first. Turning them on for a finished run starts `forge summarize` in the background.
|
|
175
|
-
- **Brief answers:** each brief question in a task's inspector has an answer box, and *Send* records the
|
|
286
|
+
- **Brief answers and proposals:** each brief question in a task's inspector has an answer box, and *Send* records the
|
|
176
287
|
answer (`forge brief answer`, logged as `ui`). A late answer, given after the task started, shows the
|
|
177
|
-
CLI's notice under its question.
|
|
288
|
+
CLI's notice under its question. An answered parked `wave` or `plan` question has *Propose a change*
|
|
289
|
+
(`forge brief propose`, logged as `ui`). A proposal in state `proposed` has *Approve*
|
|
290
|
+
(`forge brief apply PLAN PID --approve HASH --actor ui`, using the hash on the card) and *Reject*
|
|
291
|
+
(`forge brief reject`, with an optional reason, logged as `ui`). Answers, proposals, approvals and
|
|
292
|
+
rejections are sent at once, without a confirm.
|
|
178
293
|
|
|
179
294
|
Writing is protected, because anything that can reach the server could otherwise change your
|
|
180
295
|
runs. The server makes a random token each time it starts and puts it in the page it serves;
|
|
181
296
|
the page sends it with every change, and the server also checks the `Host` and `Origin`
|
|
182
297
|
headers, so another website open in your browser cannot make your browser change a run. Reading
|
|
183
298
|
needs no token. `--read-only` (or `FORGE_UI_READONLY=1`) turns writing off altogether: no
|
|
184
|
-
token is issued and every change is refused.
|
|
299
|
+
token is issued and every change is refused. No action button is shown: not the run controls,
|
|
300
|
+
not Remove or Forget selected or Compact, not the finding actions, Add learning, Edit or triage
|
|
301
|
+
Start, Approve and Reject, and not *Send answer*. The summaries and the questions still show,
|
|
302
|
+
without their switches, answer boxes, or Propose, Approve and Reject buttons, and every copy
|
|
303
|
+
button stays (worktree commands, compact commands, the `forge findings` and `forge memory`
|
|
304
|
+
commands, the triage commands, and the `retry --answer` command on a waiting task). `FORGE_UI_READONLY=1 forge ui open` starts such a
|
|
185
305
|
server, and the launcher never reuses a server running in the other mode; it replaces it.
|
|
186
306
|
|
|
187
307
|
Also: replay, critical path, Fractal child-task trees, quick jump (Ctrl K, ⌘K on a Mac, or
|
package/docs/memory.md
CHANGED
|
@@ -116,12 +116,28 @@ forge-memory.sh show <repo>
|
|
|
116
116
|
forge-memory.sh prune <repo> # re-apply staleness and the cap now
|
|
117
117
|
forge-memory.sh spend <repo> [--run <run-id>] # what forge has cost this repo
|
|
118
118
|
forge-memory.sh learnings <repo> [--json] # every ledger learning and its state, as JSON (forge memory learnings)
|
|
119
|
+
forge-memory.sh forget <repo> <category:key>... # drop those ledger rows and rebuild memory.md
|
|
120
|
+
[--dry-run] [--json] [--actor ui|cli]
|
|
119
121
|
```
|
|
120
122
|
|
|
121
123
|
`record` appends to the ledger and then rebuilds `memory.md` from the whole ledger — the
|
|
122
124
|
rebuild is idempotent, so a crashed run can leave the ledger a row short but can never leave
|
|
123
|
-
memory half-written. Editing `memory.md` by hand therefore does not stick
|
|
124
|
-
|
|
125
|
+
memory half-written. Editing `memory.md` by hand therefore does not stick: the next rebuild
|
|
126
|
+
overwrites it.
|
|
127
|
+
|
|
128
|
+
`forget` is how a learning is removed. Its identity is `category:key`, the same pair the rebuild
|
|
129
|
+
groups on (category, and the text normalised to lowercase with runs of non-alphanumerics collapsed
|
|
130
|
+
to one space). `forge memory forget REPO KEY…` drops every ledger row of those keys and rebuilds
|
|
131
|
+
`memory.md` from what remains. `--dry-run` writes nothing and still lists the `- ` lines that
|
|
132
|
+
would leave. A key that is not in the ledger is not an error. A real forget that drops at least
|
|
133
|
+
one row records a `memory_forget` dataset event, including the actor (`--actor ui` or `cli`,
|
|
134
|
+
default `cli`). `--json` prints
|
|
135
|
+
`{ok, dry_run, keys: [{key, rows, found}], memory_lines_removed}`. Exit 0 ok, 2 usage. See
|
|
136
|
+
[the command](commands.md#forge-memory-forget).
|
|
137
|
+
|
|
138
|
+
forge-ui's Memories tab does this for the learnings you select: *Forget selected* dry-runs,
|
|
139
|
+
confirms with the learnings and the `memory.md` lines that go, then runs `forget` as actor `ui`
|
|
140
|
+
on the checkout the tab is showing. See [Controls](forge-ui.md#controls).
|
|
125
141
|
|
|
126
142
|
```bash
|
|
127
143
|
# what would a dwarf actually be told about this repo?
|
|
@@ -146,11 +162,16 @@ its rows, and what forge does with it now:
|
|
|
146
162
|
| `muted` | every row of it was marked not injectable (Jev's curation) |
|
|
147
163
|
|
|
148
164
|
The states come from forge-memory.sh's own rebuild, run into a scratch directory, so they cannot differ
|
|
149
|
-
from what `record` writes;
|
|
165
|
+
from what `record` writes; `learnings` itself only reads the repository. The answer also has the current `memory.md` by
|
|
150
166
|
section, with the roles each section reaches, and `rebuilt_differs` when that file is not what a rebuild
|
|
151
167
|
makes now (an older forge wrote it, or a `prune` asked Jev to drop facts). forge-ui's Projects screen
|
|
152
168
|
shows it on each repository's *Memories* tab, merged across the checkouts its runs started in and, from
|
|
153
|
-
the dataset, the learnings of checkouts that are gone.
|
|
169
|
+
the dataset, the learnings of checkouts that are gone. With write controls the tab adds a checkbox per
|
|
170
|
+
learning, *Select all* for the ones the filters show, and *Forget selected*. That dry-runs
|
|
171
|
+
`forge memory forget` on the checkout you are looking at, then asks, listing each `category:key` and
|
|
172
|
+
the `memory.md` lines that go. Under `--read-only` the list stays and those controls do not. A learning
|
|
173
|
+
is removed by `forget`, which edits the ledger and rebuilds `memory.md`; editing `memory.md` by hand
|
|
174
|
+
does not stick.
|
|
154
175
|
|
|
155
176
|
## Spend
|
|
156
177
|
|
package/docs/models.md
CHANGED
|
@@ -171,3 +171,11 @@ or absent = the built-in default). It applies only when neither `--timeout` nor
|
|
|
171
171
|
elsewhere.
|
|
172
172
|
|
|
173
173
|
Adding a model is one line in this file. Nothing else needs to change.
|
|
174
|
+
|
|
175
|
+
**Moving an alias to a newer model.** Keep the old model under a versioned alias, as
|
|
176
|
+
`terra-5.6` keeps gpt-5.6-terra now that `terra` is gpt-6.1-terra. Each dispatch records
|
|
177
|
+
the model id it ran, so the statistics that count by alias (`forge dataset reviewers`, review
|
|
178
|
+
history, forge-ui's model leaderboard) count an old `terra` dispatch under `terra-5.6`, the
|
|
179
|
+
alias that resolves to its model today, and never under the newer `terra`. Without a versioned
|
|
180
|
+
alias for the old model, its dispatches stay counted with the alias's new ones. Statistics that count by
|
|
181
|
+
model id (routing, forecasts, effort notes, shadow pairs) were already separate.
|
package/docs/reviews.md
CHANGED
|
@@ -48,6 +48,16 @@ file) is retried the same way: its verdict counts for nothing, but the committed
|
|
|
48
48
|
Untracked files a reviewer leaves in its copy, such as a test run's `__pycache__/`, do not void
|
|
49
49
|
the review.
|
|
50
50
|
|
|
51
|
+
### A large task diff
|
|
52
|
+
|
|
53
|
+
A task review inlines its diff up to 400 KB, the whole-run review's limit. Over it, the prompt
|
|
54
|
+
holds the diff's stat and the reviewer reads the diff in its working copy, which holds the attempt
|
|
55
|
+
as one commit over its base (`git diff HEAD~1 HEAD`), as the whole-run review and `adopt` already
|
|
56
|
+
do. If the reviewer's harness still refuses the prompt as too large (codex's `input_too_large`,
|
|
57
|
+
claude's "Prompt is too long"), the task ends `ERROR` with a note that names the cause and the way
|
|
58
|
+
out: a retry would send the same prompt, so review the commit with `forge-parallel.sh adopt`, or
|
|
59
|
+
split the task.
|
|
60
|
+
|
|
51
61
|
## Retrying a failed task
|
|
52
62
|
|
|
53
63
|
```bash
|
|
@@ -113,6 +123,79 @@ retried again, so a stuck task cannot burn its whole budget repeating itself.
|
|
|
113
123
|
`tasks/<id>/attempts.tsv` records every entry (epoch, attempt number, resulting status, infra
|
|
114
124
|
class).
|
|
115
125
|
|
|
126
|
+
### A budget per model: `--retry-per-model N`
|
|
127
|
+
|
|
128
|
+
`plan --retry-per-model N` (1 to 99) writes `retry_per_model`. `--no-retry-per-model` removes
|
|
129
|
+
it; a re-plan that names neither keeps the file. A task may fail N times on the model it is
|
|
130
|
+
running. After those failures the next attempt moves one rung up the pools given to `plan`,
|
|
131
|
+
and the count starts again. With `--escalate-effort`, the same N applies to each effort of
|
|
132
|
+
that model before the next effort. This replaces `--escalate-after` for the plan. When
|
|
133
|
+
`escalate_after` is also present, `run` prints `retry-per-model N replaces --escalate-after
|
|
134
|
+
for this plan` and the policy follows `retry_per_model`.
|
|
135
|
+
|
|
136
|
+
Automatic retries still need `--retry-failed` above 0. Any positive budget turns the ladder on;
|
|
137
|
+
that number is not the limit. A person's decision, `--max-attempts`, the converging stop, a
|
|
138
|
+
`noretry` marker and `escalation.stop` still apply. `forge-route.py per-model` says whether one
|
|
139
|
+
task may run again. `worst-case` is what the plan table prints: `retry per model: N`,
|
|
140
|
+
`worst case with retry-per-model N: X dispatches` (implementer, reviewer, and shadow reviews
|
|
141
|
+
when those are on), and, when the cap cuts a ladder short,
|
|
142
|
+
`max-attempts … stops these tasks before the top of their ladder`.
|
|
143
|
+
|
|
144
|
+
Pools `low`, `medium` and `high` with N=3 give a task that starts on `low` up to 9 implementer
|
|
145
|
+
attempts, three on each rung. `--max-attempts` bounds that. The default cap is 8, so the table
|
|
146
|
+
names the task unless `plan --max-attempts` raises it.
|
|
147
|
+
|
|
148
|
+
### Failures that are the plan's
|
|
149
|
+
|
|
150
|
+
Two outcomes are not a further try of the model.
|
|
151
|
+
|
|
152
|
+
**Reason `plan`.** Task, solo and group reviews ask for this brace. Sweep, adopt and final
|
|
153
|
+
reviews do not. A finding whose only fix is a file the task did not declare ends its first line
|
|
154
|
+
with `{outside=<path>}`, several paths comma-separated, in its own braces immediately before
|
|
155
|
+
the facts brace:
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
- [P1][CONFIRMED] path/file.py:123 — {outside=a.py,b.py} {reach=main origin=new evidence=ran}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
The implementer does not edit that file. It finishes, then ends its message with one
|
|
162
|
+
`FORGE_BLOCKED: <path>: <why>` line per path. `qa.input` shows those lines as a claim ("The
|
|
163
|
+
implementer says these fixes need files outside the task") and tells the reviewer to confirm a
|
|
164
|
+
real one with `{outside=<path>}` or refute it. Only the reviewer's brace stops the task. When
|
|
165
|
+
the status is `FAIL`, the verdict in `qa.last` is `PASS` or `FAIL`, every blocking finding
|
|
166
|
+
carries `{outside=…}`, and each path is outside the task's declared files, the decomposed task
|
|
167
|
+
stops as `NEEDS_DECISION` with reason `plan` after that attempt, before any escalation. A group
|
|
168
|
+
member's settled `FAIL` is checked the same way. A solo review is not.
|
|
169
|
+
`tasks/<id>/outside.json` lists each path with the task that declares it, or none, and that
|
|
170
|
+
task's status. `decision.md` prints `path — declared by <id> (<status>)` or
|
|
171
|
+
`path — declared by no task`, then the plan choices: add the path to this task's `files`, make
|
|
172
|
+
this task depend on the owner, or merge the two rows. Edit `tasks.tsv`, run `plan` again when
|
|
173
|
+
no run is live, then `retry --decide retry=1` with `--reason` and `--approved`.
|
|
174
|
+
|
|
175
|
+
That `FAIL` counts toward `--max-attempts`, because a review happened. It does not spend a
|
|
176
|
+
further attempt on the model: escalation does not run, and `--retry-failed` does not re-queue a
|
|
177
|
+
`NEEDS_DECISION` task. Another dispatch cannot change a file this task does not declare. A
|
|
178
|
+
tolerated or `PLAUSIBLE` finding does not block, so it does not count toward the stop. A later
|
|
179
|
+
decision restarts the escalation streak past this attempt.
|
|
180
|
+
|
|
181
|
+
**`STALE`.** `prompt.dispatched` and `approach.dispatched` are the copies taken when the
|
|
182
|
+
attempt is dispatched. A missing `approach.md` is an empty copy. If `prompt.md` or `approach.md`
|
|
183
|
+
differs at review time, the attempt is not reviewed. The status is `STALE`, the diff is
|
|
184
|
+
`stale.diff`, `control.log` records `prompt-changed` with actor `scheduler`, and the console
|
|
185
|
+
says the attempt was not reviewed and no attempt was spent. This spends nothing against the
|
|
186
|
+
model: the implementer was not judged on the text it was given, so the result says nothing
|
|
187
|
+
about it. The attempt counter is refunded, the cap skips `STALE` the way it skips `INFRA`, the
|
|
188
|
+
escalation streak treats `STALE` as neutral, and no decision is written. The scheduler
|
|
189
|
+
re-dispatches at once, unless the run is stopping, with `retry_findings.source` `prompt`.
|
|
190
|
+
`retry_findings.md` holds the new requirements and the diff, and the attempt number is reused.
|
|
191
|
+
A `STALE` task still waiting at the next `run` is prepared the same way. That re-dispatch does
|
|
192
|
+
not need `--retry-failed`. `forge control retry` accepts `STALE`; `--dwarf` is refused, because
|
|
193
|
+
the same implementer gets the new text. A plain `forge-parallel.sh retry` does not take this
|
|
194
|
+
path. The stale attempt's `changes.diff` is removed, so a
|
|
195
|
+
re-dispatch that keeps the committed work is reviewed rather than refused as identical. The
|
|
196
|
+
dataset attempt event has `prompt_changed`. `forge dataset routing`, tiers and the forecast
|
|
197
|
+
leave those attempts out. The `prompt` blob is the text the implementer was given.
|
|
198
|
+
|
|
116
199
|
## Infrastructure failures are not task failures
|
|
117
200
|
|
|
118
201
|
A quota or usage limit, an auth problem, a rate limit, a network error, or a harness that
|
|
@@ -301,6 +384,38 @@ share a commit, `since=` is that commit and the prompt says nothing changed. The
|
|
|
301
384
|
labelled-line rule applies: restate only what is still open, because every labelled line
|
|
302
385
|
is filed.
|
|
303
386
|
|
|
387
|
+
## Group review (opt-in)
|
|
388
|
+
|
|
389
|
+
`plan --groups waves --group-review` reviews several related tasks in one QA dispatch. It is
|
|
390
|
+
off unless you pass it. A planner's groups, and `--groups` without `--group-review`, are names
|
|
391
|
+
only (`review=task`): they show in the approval table, and each task is still reviewed on its
|
|
392
|
+
own. The mechanics are in
|
|
393
|
+
[Groups and group review](../references/decompose.md#groups-and-group-review-opt-in).
|
|
394
|
+
|
|
395
|
+
**Fewer dispatches, a larger prompt.** A group is one review instead of one per member, and
|
|
396
|
+
the reviewer sees those tasks together: each task's requirements, and the combined diff. The
|
|
397
|
+
prompt is larger. That is the tradeoff.
|
|
398
|
+
|
|
399
|
+
**A failure stops the group.** A blocking finding sends the implicated members back. The
|
|
400
|
+
others stay implemented and are not retried, and nothing in the group merges until those
|
|
401
|
+
members are fixed and the group passes. A member also waits for its siblings before anything
|
|
402
|
+
merges, so a task that depends on one of them starts later than it would under per-task review.
|
|
403
|
+
|
|
404
|
+
**Fewer dispatches are not a measured saving.** They do not by themselves prove a lower token
|
|
405
|
+
cost, or that the same defects are caught. The group's QA dispatch is recorded with `scope`
|
|
406
|
+
`group` and is left out of the per-task reviewer statistics. Read the `group_review` and
|
|
407
|
+
`group_merge` events. Measure with `forge dataset` before treating group review as a cost
|
|
408
|
+
saving. See [the dataset](../references/dataset.md#raw-events-not-training-examples).
|
|
409
|
+
|
|
410
|
+
**When to use it.** Many small, related, low-risk tasks. Keep a high-risk task on per-task
|
|
411
|
+
review. `--group-review` already leaves high-difficulty tasks out of the groups it derives.
|
|
412
|
+
|
|
413
|
+
A combined diff over `group_max_diff_kb` (256 KB unless the plan says otherwise) is not
|
|
414
|
+
reviewed and not truncated: the group stops for a decision. That is separate from a
|
|
415
|
+
[whole-run review](#whole-run-review-opt-in), which reads the combined result after the run
|
|
416
|
+
and does truncate. Group review runs no shadow review, does not continue a reviewer session
|
|
417
|
+
across rounds, and does not run under Fractal.
|
|
418
|
+
|
|
304
419
|
## Reviewer session (opt-in experiment)
|
|
305
420
|
|
|
306
421
|
`plan --reviewer-session` continues the same reviewer's session across rounds. It is off
|
|
@@ -311,6 +426,13 @@ when the resolved harness, model and effort are unchanged. The approval table na
|
|
|
311
426
|
Dispatch details are in
|
|
312
427
|
[continuing a reviewer session](../references/harnesses.md#continuing-a-reviewer-session).
|
|
313
428
|
|
|
429
|
+
`plan --reviewer-session-rate R` turns it on for a sampled share of the tasks only, to compare
|
|
430
|
+
the two halves in one run. Within each difficulty, `plan` picks round(R × n) tasks by a hash of
|
|
431
|
+
the run id and the task id, and writes them to `reviewer_session_tasks`. A re-plan keeps the
|
|
432
|
+
same tasks. The other tasks review fresh every round, and their `review_sessions.tsv` rows say
|
|
433
|
+
`not-sampled`. Plain `--reviewer-session` on a re-plan goes back to every task. A whole-run
|
|
434
|
+
review is not sampled.
|
|
435
|
+
|
|
314
436
|
Any round that cannot continue starts a fresh session. That is the first round, a missing
|
|
315
437
|
or malformed session id, a resolution that is missing or different, any harness other
|
|
316
438
|
than those three, a Fractal plan, and a continue that the harness refuses or that fails
|