@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.
Files changed (93) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +1 -0
  3. package/SKILL.md +19 -2
  4. package/VERSION +1 -1
  5. package/docs/artifacts.md +25 -1
  6. package/docs/commands.md +217 -18
  7. package/docs/decomposed-runs.md +114 -1
  8. package/docs/development.md +2 -1
  9. package/docs/forge-ui.md +138 -18
  10. package/docs/memory.md +25 -4
  11. package/docs/models.md +8 -0
  12. package/docs/reviews.md +122 -0
  13. package/forge +26 -3
  14. package/package.json +2 -1
  15. package/references/dataset.md +20 -1
  16. package/references/decompose.md +641 -41
  17. package/references/harnesses.md +18 -3
  18. package/references/memory.md +30 -5
  19. package/references/planning.md +43 -14
  20. package/references/ui.md +53 -6
  21. package/registry.tsv +8 -3
  22. package/scripts/forge-brief.py +88 -3
  23. package/scripts/forge-compare.py +4 -3
  24. package/scripts/forge-contract.py +202 -27
  25. package/scripts/forge-control.py +117 -5
  26. package/scripts/forge-dispatch.sh +34 -5
  27. package/scripts/forge-findings.py +675 -0
  28. package/scripts/forge-group.py +496 -0
  29. package/scripts/forge-groups.py +89 -0
  30. package/scripts/forge-handoff.py +1128 -0
  31. package/scripts/forge-issues.py +228 -97
  32. package/scripts/forge-lib-group.sh +641 -0
  33. package/scripts/forge-lib-plans.sh +339 -3
  34. package/scripts/forge-lib-task.sh +197 -4
  35. package/scripts/forge-memory.sh +711 -17
  36. package/scripts/forge-parallel.sh +721 -38
  37. package/scripts/forge-planner.py +104 -8
  38. package/scripts/forge-route.py +190 -12
  39. package/scripts/forge-runs.py +9 -5
  40. package/scripts/forge-schedule.py +417 -52
  41. package/scripts/forge-solo.sh +2 -0
  42. package/scripts/forge-sweep.py +199 -44
  43. package/scripts/forge-worktrees.py +243 -0
  44. package/scripts/forge_brief/__init__.py +294 -50
  45. package/scripts/forge_brief/answers.py +58 -11
  46. package/scripts/forge_brief/proposals.py +1630 -0
  47. package/scripts/forge_dataset/efforts.py +4 -3
  48. package/scripts/forge_dataset/export.py +24 -12
  49. package/scripts/forge_dataset/facts.py +5 -3
  50. package/scripts/forge_dataset/forecast.py +8 -18
  51. package/scripts/forge_dataset/harvest.py +204 -9
  52. package/scripts/forge_dataset/history.py +11 -6
  53. package/scripts/forge_dataset/importer.py +65 -1
  54. package/scripts/forge_dataset/names.py +66 -0
  55. package/scripts/forge_dataset/reviewers.py +5 -2
  56. package/scripts/forge_dataset/risk.py +6 -3
  57. package/scripts/forge_dataset/routing.py +6 -1
  58. package/scripts/forge_findings/__init__.py +17 -0
  59. package/scripts/forge_findings/apply.py +441 -0
  60. package/scripts/forge_findings/status.py +43 -0
  61. package/scripts/forge_findings/store.py +583 -0
  62. package/scripts/forge_findings/tags.py +53 -0
  63. package/scripts/forge_findings/triage.py +603 -0
  64. package/scripts/forge_groups/__init__.py +308 -0
  65. package/scripts/forge_groups/attribute.py +289 -0
  66. package/scripts/forge_groups/review.py +286 -0
  67. package/scripts/forge_identity.py +327 -0
  68. package/scripts/forge_memory_list.py +7 -3
  69. package/scripts/forge_owner.py +152 -0
  70. package/scripts/forge_side/__init__.py +228 -38
  71. package/ui/docs/api.md +303 -29
  72. package/ui/forge_ui/control.py +1018 -6
  73. package/ui/forge_ui/executions.py +8 -1
  74. package/ui/forge_ui/export.py +31 -4
  75. package/ui/forge_ui/groups.py +264 -0
  76. package/ui/forge_ui/models.py +70 -8
  77. package/ui/forge_ui/projects.py +209 -22
  78. package/ui/forge_ui/reader.py +262 -19
  79. package/ui/forge_ui/server.py +4 -0
  80. package/ui/forge_ui/static/app.js +93 -13
  81. package/ui/forge_ui/static/briefview.js +350 -47
  82. package/ui/forge_ui/static/diffview.js +86 -1
  83. package/ui/forge_ui/static/findingsactions.js +201 -0
  84. package/ui/forge_ui/static/groupsview.js +332 -0
  85. package/ui/forge_ui/static/index.html +3 -0
  86. package/ui/forge_ui/static/panel.js +127 -7
  87. package/ui/forge_ui/static/projectsview.js +764 -30
  88. package/ui/forge_ui/static/runmodel.js +14 -3
  89. package/ui/forge_ui/static/storageview.js +91 -10
  90. package/ui/forge_ui/static/style.css +138 -5
  91. package/ui/forge_ui/static/triageview.js +423 -0
  92. package/ui/forge_ui/static/worktreesview.js +233 -12
  93. package/ui/forge_ui/storage.py +14 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,55 @@ All notable changes to this project are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and versions follow the format `{major}.{minor}[.{patch}]` ([...] parts appear only when non-zero).
7
7
 
8
+ ## [0.20] - 2026-11-17
9
+
10
+ Review findings you can trust and manage: one record per repository with issue states from GitHub, forge findings and forge-ui actions, an optional triage agent, and a sweep per finding.
11
+
12
+ ### Added
13
+
14
+ - You can now manage review findings. `forge findings` shows every finding of a repository and marks them fixed, dismissed, reopened, to file or a duplicate, with tags (ui, tests, infra, backend, docs by default, or your own), notes and edits. forge-ui's Findings tab does the same on selected rows and files the selected ones as issues, and its Memories tab can add and edit learnings (`forge memory add` / `edit`). An optional triage agent, run on a model you name, proposes duplicates, fixes, tags, issues and forge plans for related findings; nothing changes until you approve a proposal.
15
+
16
+ ### Changed
17
+
18
+ - `--sweep` now works per finding instead of once per plan: a later run of the same plan sweeps the findings its new tasks left, in a new round, and never a finding an earlier round already tried. When there is nothing new, the run summary says so. A finding the sweep fixed is recorded as fixed once its fix task merges.
19
+
20
+ ### Fixed
21
+
22
+ - Review findings now show their real state. A finding that was filed as an issue, fixed in the code, dismissed or swept no longer shows as open: forge reads issue states from GitHub (closed issues count as fixed), keeps one record per repository whatever checkout or worktree a run used, and finds every run of the repository, including runs from removed worktrees. forge-ui's open count leaves out shadow and unlabelled reviews.
23
+
24
+ ## [0.19] - 2026-11-15
25
+
26
+ Group review and wider brief answers; a retry budget per model, scripted tasks, chained plans and forge handoff; early stops for a fix outside the task and for a prompt edited mid-attempt; forge-ui runs its own commands; and forge's website.
27
+
28
+ ### Highlights
29
+
30
+ - forge has a website: https://giamme.github.io/forge/, with plain-language docs from install to steering a live run, a route map of a run, and the full reference one link away. It is built from `site/` with no dependencies and published by GitHub Pages; the npm package links to it.
31
+
32
+ ### Added
33
+
34
+ - `plan --reviewer-session-rate R` turns the reviewer-session experiment on for a sampled share of the tasks, balanced by difficulty and fixed at plan time, so one run can compare continued and fresh review rounds. The other tasks log `not-sampled` in `review_sessions.tsv`.
35
+ - Brief mode part 2: a task's questions name its group, `--brief-scope wave|plan` lets you answer wider questions, and the answer becomes a proposal (`forge brief propose`). Nothing in the plan changes until you approve its exact diff with `forge brief apply PLAN PID --approve HASH`, or reject it. A wave proposal changes only that group's unstarted tasks; a plan proposal can also add, remove or split tasks. Affected tasks get their questions asked again. Proposals can be approved or rejected in forge-ui too.
36
+ - Opt-in group review (`plan --groups waves --group-review`): related tasks share one QA dispatch over their combined diff. Each finding goes back only to the member whose files it names (or the members a `{tasks=…}` tag names), the group merges in one step once it passes, and a finding that names no member stops the group for your decision (`forge group show|retry`). Groups and their review show in forge-ui. Group dispatches are recorded as `scope=group` and kept out of reviewer statistics. Fewer dispatches are not yet a measured saving.
37
+ - Groups derived with `plan --groups waves` get a title (`Wave N`). The approval table shows each group's title and goal, says which groups have no goal, and `forge group set PLAN GID --goal "…"` (or `--title`) sets one and freezes the groups again, logged in `control.log`.
38
+ - Chained plans (`plan <dir> --after <prev>`): a plan can start from an earlier plan's integration branch, so a second milestone builds on the first before either is integrated. `run` refuses when the earlier plan moved, and `integrate` names the whole chain it brings in.
39
+ - `forge handoff`: another session or another harness can pick up a run. `show` reports what the run is doing and what needs a person, `note` leaves a line for the next session, `claim` records who drives it (a 12-hour lease, `--take-over` to override), and `resume` follows a live scheduler or restarts a stopped run detached with its recorded flags, after saving and resetting tasks left `RUNNING`.
40
+ - A task whose every blocking finding needs a file it does not declare now stops early as `NEEDS_DECISION` (reason `plan`) instead of spending more attempts. The reviewer marks such a finding `{outside=path}`; the implementer can claim one with a `FORGE_BLOCKED: <path>: <why>` line for the reviewer to confirm or refute. `decision.md` names the task that owns each path and the plan edits that fix it (add the file, depend on the owner, or merge the rows).
41
+ - Editing a task's `prompt.md` or `approach.md` while its attempt runs no longer gets the old work reviewed against the new text: the attempt becomes `STALE`, spends nothing, and the implementer is re-dispatched with the new requirements and a diff of what changed. `control.log` records it as `prompt-changed`, and the dataset keeps such attempts out of pass rates.
42
+ - Retry budget per model (`plan --retry-per-model N`): a task may fail N times on each model the retry policy gives it before it moves a tier up, replacing `--escalate-after`. The approval table prints the worst case: the most implementer, reviewer and shadow dispatches the plan can spend if every rung fails.
43
+ - Scripted tasks: a `tasks.tsv` row whose dwarf column is `script` runs the executable `tasks/<id>/run` in its worktree instead of a model, from the task's base on every attempt, under the plan's timeout. A non-zero exit fails the task with no review; otherwise the result is reviewed as a script's output. Codemods and generated files no longer need a model to type them.
44
+ - forge-ui runs its own commands when controls are on: remove finished or failed worktrees in bulk (`forge worktrees rm`), forget memory learnings (`forge memory forget REPO category:key`), compact one run or all runs from the Disk screen, and answer a waiting task's question from the task panel (`forge control retry --answer`, which also prepares the retry itself when no run is live). Read-only mode shows each command to copy instead.
45
+
46
+ ### Changed
47
+
48
+ - `terra` now resolves to gpt-6.1-terra. The previous model is still available as `terra-5.6`, and dispatches recorded on it are counted under `terra-5.6` in `forge dataset reviewers`, review history and forge-ui's model leaderboard, never mixed into the new `terra`.
49
+
50
+ ### Fixed
51
+
52
+ - forge-ui: each run on the Disk screen links to its run page again. The screen matched runs by path, and its real path often differed from the one the run list uses; it now gets each run's key from the server, and a run dir the run list does not show stays plain text.
53
+ - Reviewers can run tests that need a temporary directory: every read-only dispatch gets a writable temp dir of its own outside the repository (`TMPDIR`, `TMP`, `TEMP`), removed when it ends. On codex the read-only sandbox now allows writes to that directory alone, so test runners such as Vitest no longer stop with `EPERM`.
54
+ - A task whose diff is over 400 KB is reviewed: the reviewer gets the diff's stat and reads the diff in its snapshot, as the whole-run review already does, instead of a prompt its harness refuses. If a harness still refuses a prompt as too large, the task's note says so and points to `adopt` or a split, since a retry would send the same prompt.
55
+ - An implementer whose CLI cancelled its session before it changed anything (grok does this when a tool call needs an approval a headless run cannot give) is now an infrastructure stop: the task waits as `INFRA` with no attempt spent. It used to fail as an empty diff marked never to retry, which also blocked every task that depended on it.
56
+
8
57
  ## [0.18] - 2026-11-13
9
58
 
10
59
  Around each task and on disk: retro notes, brief mode, task summaries and the task inspector; review snapshots removed after each review, forge runs compact, forge du and the Disk screen, and a list of everything forge puts on disk.
package/README.md CHANGED
@@ -18,6 +18,7 @@
18
18
  <a href="#quick-start">Quick start</a> ·
19
19
  <a href="#how-it-works">How it works</a> ·
20
20
  <a href="#forge-ui">forge-ui</a> ·
21
+ <a href="https://giamme.github.io/forge/">Website</a> ·
21
22
  <a href="docs/README.md">Docs</a> ·
22
23
  <a href="CHANGELOG.md">Changelog</a>
23
24
  </p>
package/SKILL.md CHANGED
@@ -77,7 +77,10 @@ For explanation requests, explain the workflow without spending model quota.
77
77
  tests also run without its non-test changes, and the reviewer is asked to report any that
78
78
  still pass as P2; it needs `.forge/verify-subset` and never changes a result by itself. So is
79
79
  `plan --pre-review-tests`: before each review forge runs only the tests the attempt affects
80
- (`.forge/verify-subset`), and a red attempt goes back to its implementer unreviewed. `plan` explores by default (`--explore 0.2`: now and then
80
+ (`.forge/verify-subset`), and a red attempt goes back to its implementer unreviewed. So are
81
+ `plan --groups` and `plan --group-review`: one review can cover several small, related,
82
+ low-risk tasks. Offer them, never add them unprompted, and keep a high-risk task on per-task
83
+ review. Read [Groups and group review](references/decompose.md#groups-and-group-review-opt-in). `plan` explores by default (`--explore 0.2`: now and then
81
84
  a row left to forge gets its neighbouring tier's model from the user's pools, odds
82
85
  recorded for `forge dataset routing`); say so with the table and pass `--explore 0` when
83
86
  the user declines. Retries follow a policy: after three failed attempts on one model the
@@ -89,7 +92,14 @@ For explanation requests, explain the workflow without spending model quota.
89
92
  (a threshold, a budget, a model pin, a drain, stop or queued retry; `forge control show <plan>`
90
93
  lists them). Never set a control, pin, `drain|stop|retry`, delete a run or compact one with
91
94
  `forge control` / `forge runs rm` / `forge runs compact` unless the user asks; `forge du` only reads. Exit `130` / `INTERRUPTED`: the run was signalled or
92
- stopped; relay the `retry` lines it printed.
95
+ stopped; `forge handoff resume <plan>` carries it on, and relay the `retry` lines it printed to finish by hand.
96
+ - When a session starts on a repo with an active or unfinished run, or the user names one, run
97
+ `forge handoff` first and work from its output. Never start `run` for a run whose scheduler is
98
+ live; continue with `forge handoff resume <plan> --harness <this harness>`, which follows a live
99
+ run and restarts a stopped one with its recorded flags. A Fractal plan is left to `forge fractal
100
+ resume`. Claim the run with the session's harness. Take over another driver only on the user's
101
+ word (`--take-over`). Record what is not on disk (a decision the user made, a hand fix under way)
102
+ with `forge handoff note`.
93
103
  - A `waiting for your answer:` block is status `NEEDS_INPUT`: relay each question verbatim and
94
104
  pass it with `retry <plan> <id> --answer "<reply>"`. Never answer for the user; nothing else
95
105
  resumes it.
@@ -100,6 +110,10 @@ For explanation requests, explain the workflow without spending model quota.
100
110
  split choice replaces the row in `tasks.tsv` and is a later `run`
101
111
  ([when reviews don't converge](references/decompose.md#when-reviews-dont-converge)); do that
102
112
  only when the user asks.
113
+ - A group at `NEEDS_DECISION` waits for the user. Present `forge group show <plan>`. Run
114
+ `forge group retry <plan> <gid> --tasks <ids>` only on the user's word: that answers an
115
+ ambiguous decision. An oversized group is split in `groups.tsv` and planned again; do not
116
+ retry it. Nothing else resumes it.
103
117
  - Exit `8` / status `INFRA` is an infrastructure stop (`capacity`, `rate_limit`, `usage_limit`,
104
118
  `budget`, `auth`, `network`, `provider_down`, `empty` or `cancelled`; an old run may say
105
119
  `quota`), not a task failure, and no attempt was spent. Report each "needs you" item with its
@@ -109,6 +123,9 @@ For explanation requests, explain the workflow without spending model quota.
109
123
  - CONFIRMED findings the threshold tolerated, from a PASS or a FAIL (`tasks/<id>/known_issues.md`);
110
124
  - PLAUSIBLE findings in a passed task's `qa.last`;
111
125
  - whatever a whole-run review left open.
126
+ - Triage (`forge findings triage REPO --spec S`) needs a model the user names, never one you choose. Offer it, never start it unprompted. Relay its proposals, and run `forge findings apply` only on the user's explicit word for each one.
127
+
128
+ `forge findings` holds what happened to each finding (fixed, dismissed, duplicate, to file), and a finding marked `to-file` is offered with the others.
112
129
 
113
130
  When there are any, act on the user's `--file-issues` choice with one filer:
114
131
  - **gh-proman**, only when it is installed and set up for the repository: `gh-proman -C <repo> config show` exits 0. It also puts the issues on the team's board with a priority. Run `gh-proman findings --from <plan or run dir> --include-plausible --json`, then follow the gh-proman skill's review-findings steps.
package/VERSION CHANGED
@@ -1 +1 @@
1
- 0.18
1
+ 0.20
package/docs/artifacts.md CHANGED
@@ -58,7 +58,25 @@ A decomposed run adds:
58
58
  tasks.tsv
59
59
  waves.tsv, deferrals.txt
60
60
  tasks/<id>/{capsule.md,prompt.md,dwarf.*,qa.*,changes.diff,status}
61
+ tasks/<id>/run executable a dwarf cell of `script` runs
62
+ tasks/<id>/script.log stdout and stderr of that command
63
+ tasks/<id>/attempts/script-<hex>/ one script run (16 hex digits): script.log, the run file, metrics.json
61
64
  tasks/<id>/attempt, attempts.tsv attempts spent; one audit row per entry (incl. refunded stops)
65
+ groups.tsv id, review, qa, members, title, goal; absent unless groups are on
66
+ groups.frozen sha256 of the six columns, then each member's deps and files
67
+ group_max_tasks, group_max_diff_kb review-group bounds (defaults 6 members and 256 KB when absent)
68
+ groups/<gid>/status, round, rounds.tsv, merged
69
+ a review=group group's outcome; rounds.tsv is round, epoch, status, implicated, qa spec
70
+ groups/<gid>/candidate.base, candidate.commit, fingerprint, members.tsv, members.paths, combined.diff
71
+ the candidate the one review read; members.tsv is round, task, commit, attempt
72
+ groups/<gid>/qa.input, qa.last, qa.out, qa.gate, qa.round-<n>.last, known_issues.md, infra.txt
73
+ groups/<gid>/attribution.json, decision.md, decision.<round>.md, conflict.files
74
+ groups/<gid>/attempts/qa-<id>/group.round
75
+ the round that QA dispatch reviewed, read by a dataset import
76
+ groups/<gid>/settled.round, settle.tasks, retries.used, invalidated.reason, review.base, merge.out, group.out
77
+ tasks/<id>/reviewed.commit, source.fingerprint
78
+ the commit and worktree fingerprint a review=group member stopped at
79
+ tasks/<id>/settled.group gid and round, once a group FAIL judged this member
62
80
  tasks/<id>/known_issues.md, qa.gate findings the threshold tolerated, and the gate's decision (accept, fail or keep)
63
81
  sweep/plan.json, plan.md run --sweep: the fix tasks, their findings, and every finding left out with its reason
64
82
  tasks/<id>/sweep.json a fix task's findings (S1, S2, ...), each with its source task and key
@@ -79,7 +97,7 @@ A decomposed run adds:
79
97
  tasks/<id>/changes.since.diff diff from that commit to the one under review; omitted when there is no such range
80
98
  tasks/<id>/changes.since.range the two commits, full hashes
81
99
  tasks/<id>/changes.since.stat diff --stat of that range
82
- tasks/<id>/review_sessions.tsv one row per review round while plan --reviewer-session is on: round, attempt, mode, reason, session id
100
+ tasks/<id>/review_sessions.tsv one row per review round while plan --reviewer-session is on: round, attempt, mode, reason (not-sampled for a task --reviewer-session-rate left out), session id
83
101
  tasks/<id>/implementer_sessions.tsv one row per attempt while plan --implementer-session is on: row, attempt, mode (continued|fresh|failed), reason, session id
84
102
  tasks/<id>/reviewed.dwarf.{session,resolved} the implementer session that made reviewed.commit, and what it ran as
85
103
  tasks/<id>/retry_findings.dwarf.{session,resolved} the same, carried beside the retry findings; what --implementer-session continues
@@ -90,6 +108,7 @@ A decomposed run adds:
90
108
  infra_backoff, infra_fallback --infra-backoff's shape; on while --infra-fallback is set
91
109
  max_parallel the concurrency limit: written by each run from --max-parallel, changed live by forge control
92
110
  reviewer_session holds on; present while plan --reviewer-session is on
111
+ reviewer_session_rate, reviewer_session_tasks --reviewer-session-rate's share, and the task ids it picked (one per line)
93
112
  implementer_session holds on; present while plan --implementer-session is on
94
113
  <final-review-dir>/review.meta final-review-<epoch>-<pid>/ or integrate-*/final-review/; base=, tip=, source=, spec=, threshold=, integration=, previous=, since=; session= and session_reason= while reviewer_session is set
95
114
  control.log one JSON line per human change made with forge control, and per request outcome
@@ -99,6 +118,7 @@ A decomposed run adds:
99
118
  infra.paused only while something is paused on infrastructure: {"scopes": [...]}
100
119
  control.lock the lock that serialises changes to the plan's control files, created by whichever takes it first (forge control, the scheduler or an escalation record) and left in place
101
120
  retry_budget, infra_budget only while a scheduler runs: its live budgets (a number each)
121
+ after absolute path of the plan this one follows (`plan --after`)
102
122
  integration.base commit the integration branch started from
103
123
  verification.{status,exit,log,command,fingerprint} the combined verification; status PASS, FAIL or INTERRUPTED (a signal stopped it)
104
124
  verification.{flaky,retry.log} only when a failing command passed on rerun (lanes: flaky alone, per lane)
@@ -125,10 +145,14 @@ with worktrees and branches at:
125
145
 
126
146
  ```
127
147
  <repo>/../.forge-worktrees/<run-id>/<task-id> worktree
148
+ <repo>/../.forge-worktrees/<run-id>/_group-<gid> group-review candidate; kept for the merge
128
149
  forge/<run-id>/<task-id> task branch
129
150
  forge/<run-id>-integration integration branch
130
151
  ```
131
152
 
153
+ A group review's files are what each outcome writes. The rules are in
154
+ [Groups and group review](../references/decompose.md#groups-and-group-review-opt-in).
155
+
132
156
  `control.log` lines look like
133
157
  `{"at": 1761200000.5, "actor": "ui", "action": "set", "task": null, "key": "qa-threshold", "value": "P2", "previous": "P1"}`
134
158
  (`actor` is `cli` or `ui`; `action` is `set`, `pin`, `unpin`, `drain`, `resume`, `stop`, `retry` or
package/docs/commands.md CHANGED
@@ -15,21 +15,25 @@ harness (`/forge`); this command installs forge and drives its optional tools.
15
15
  | `forge update` | fast-forward a git checkout and refresh every harness installation; on an npm install it names the npm command instead. See [updating](install.md#updating-all-harness-installations) |
16
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
- | `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` (`P0`..`P3`, `none` or `default` for the plan, `inherit` per task), `timeout`, `escalate-after`, `escalate-effort` (`on`/`off`), `verify-retries`, `infra-backoff` (a backoff shape; `none` drops it), `infra-fallback` (`on`/`off`), `max-attempts` (a non-negative integer, `0` = no cap, and only with `--confirm`), `converge-window` (a non-negative integer), `pre-review-tests` (`on`/`off`), `pre-review-parallel` (1-64), `summaries` (`on`/`off`; on a finished run it also starts `forge summarize`), `retry-budget`, `infra-retries` or `max-parallel` (1-64) (the last three only while a scheduler runs; `--task ID` for `qa-threshold`, `retry-budget` and `summaries`, value `inherit` drops the override); `pin PLAN_DIR TASK SPEC` sets the model the task's next full retry uses once, `unpin` drops it. While a scheduler runs: `drain` starts nothing new until `resume` (a run with nothing left to start ends as usual); `stop [--now]` ends the run once the running tasks finish (`--now` interrupts them; `run` exits 130 without verifying, unless every task had merged by then: it then verifies and exits 0 as usual); `retry PLAN_DIR TASK [--dwarf SPEC]` queues a retry, and a `NEEDS_DECISION` task instead needs `--decide retry=N` or `--decide threshold=Pn`, or `--dwarf SPEC`, each with `--reason TEXT --approved`; `add PLAN_DIR TASK` (a row appended to `tasks.tsv`) queues a request the scheduler applies or refuses. `show` (`--json` for JSON) also says whether the run is drained or stopping, prints an `INFRA` task's cause, and, while a scheduler is live, lists each infrastructure pause with its reset and "needs you". The text table lists each task's attempts against its cap (`9/8`, or `9/-` when there is no cap). Every change and every request's outcome is logged in `control.log`. Exit 2 invalid input, 3 refused. See [live controls](decomposed-runs.md#changing-a-run-while-it-works) |
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, `after <run>` when the plan was chained, and the run dir. Read-only; the same summaries forge-ui shows |
19
+ | `forge handoff [show] [RUN_DIR \| --repo DIR] [--json]` / `note RUN_DIR TEXT [--actor A] [--json]` / `claim RUN_DIR --harness H [--session S] [--take-over] [--json]` / `resume RUN_DIR [--take-over] [--harness H] [--session S] [--json]` | the run for the next session. `show` is the default (`forge handoff` and `forge handoff RUN_DIR`); it writes nothing. `--repo DIR`, or no argument inside a checkout, reports that repo's newest registered plan that is live or still has a task not `MERGED`. The report has the run, its option files and `run.flags.json`, scheduler liveness, task states, what needs a person, the last `control.log` changes, tasks left `RUNNING`, notes newest first, the driver and the next commands. `note` appends one line to `handoff.notes.jsonl` (`--actor` defaults to `cli`; whitespace collapses; empty text, text over 2000 characters and text that is not UTF-8 are refused). `claim` requires `--harness H` (`[a-z0-9._-]{1,40}`) and writes `handoff.driver.json` (`harness`, `session`, `since`, `last_seen`); `--session S` is an id with no whitespace, at most 200 characters. A different driver last seen under 12 hours ago is refused unless `--take-over` (one `control.log` line, action `take-over`, actor `cli`, and a dataset `control` event). `resume` claims (`--harness` defaults to `unknown`), follows a live scheduler and starts nothing, names `forge fractal resume` for a Fractal plan, and otherwise saves each stale `RUNNING` task's diff, resets that worktree, marks it `INTERRUPTED` without counting the attempt twice, prepares every `INTERRUPTED` task and restarts `run` detached from `run.flags.json`. Exit 0 ok, 2 usage or not a run dir, 3 no run to report or another driver holds the run; a restart that cannot be launched exits 1. See [from another session](decomposed-runs.md#from-another-session-or-harness) |
20
+ | `forge control show\|set\|pin\|unpin\|drain\|resume\|stop\|retry\|add PLAN_DIR …` | change a live plan: `set` takes `qa-threshold` (`P0`..`P3`, `none` or `default` for the plan, `inherit` per task), `timeout`, `escalate-after`, `escalate-effort` (`on`/`off`), `verify-retries`, `infra-backoff` (a backoff shape; `none` drops it), `infra-fallback` (`on`/`off`), `max-attempts` (a non-negative integer, `0` = no cap, and only with `--confirm`), `converge-window` (a non-negative integer), `pre-review-tests` (`on`/`off`), `pre-review-parallel` (1-64), `summaries` (`on`/`off`; on a finished run it also starts `forge summarize`), `retry-budget`, `infra-retries` or `max-parallel` (1-64) (the last three only while a scheduler runs; `--task ID` for `qa-threshold`, `retry-budget` and `summaries`, value `inherit` drops the override); `pin PLAN_DIR TASK SPEC` sets the model the task's next full retry uses once, `unpin` drops it. While a scheduler runs: `drain` starts nothing new until `resume` (a run with nothing left to start ends as usual); `stop [--now]` ends the run once the running tasks finish (`--now` interrupts them; `run` exits 130 without verifying, unless every task had merged by then: it then verifies and exits 0 as usual); `retry PLAN_DIR TASK [--dwarf SPEC]` queues a retry, including a `STALE` task (its `prompt.md` or `approach.md` changed during the attempt: it is re-dispatched with the new text on the same implementer, and `--dwarf` is refused). `retry PLAN_DIR TASK --answer TEXT` (or `--answer-file F`, `-` for stdin) answers a `NEEDS_INPUT` task: 1 to 8000 characters after stripping, no NUL, and not combined with `--dwarf` or `--decide`. On a live run it is queued and the scheduler writes `tasks/<id>/answer.md` and resumes the task; with no live run it prepares the task through `forge-parallel.sh retry --answer-file --no-dispatch` for the next `run` (`forge-parallel.sh retry --answer` itself is unchanged). `--json` prints `{"queued": true, "request"}` when queued and `{"queued": false, "prepared": true}` when prepared. `control.log` records the value `answer` and `answer_chars`, never the text (`--actor` `ui` or `cli`, default `cli`). A `NEEDS_DECISION` task instead needs `--decide retry=N` or `--decide threshold=Pn`, or `--dwarf SPEC`, each with `--reason TEXT --approved`; `add PLAN_DIR TASK` (a row appended to `tasks.tsv`) queues a request the scheduler applies or refuses. `show` (`--json` for JSON) also says whether the run is drained or stopping, prints an `INFRA` task's cause, and, while a scheduler is live, lists each infrastructure pause with its reset and "needs you". The text table lists each task's attempts against its cap (`9/8`, or `9/-` when there is no cap). Every change and every request's outcome is logged in `control.log`. Exit 2 invalid input, 3 refused. See [live controls](decomposed-runs.md#changing-a-run-while-it-works) |
20
21
  | `forge config show [--repo DIR] [--json]` / `forge config set <key> <value> [--repo DIR] [--json]` / `forge config unset <key> [--repo DIR] [--json]` | one view of every config source (registry, the legacy Jev file, decide, the user `features`, the repo's `.forge/verify`, `setup` and `verify-subset`, dataset, `FORGE_*` variables with secrets hidden); `set` / `unset` edit `repo.verify`, `repo.setup`, `repo.verify-subset` (must contain `{files}` or `{changed}`; `--repo` required) and `decide.gate.<gate>`, `decide.gate.<gate>.provider`, `decide.gate.<gate>.model` (`off`, `shadow` or `on`; those write the user level and do not need `--repo`). They also set the user feature keys: `retro` (`off` or `on`), `brief` (`off`, `advisory`, `gated` or `strict`), `brief.scope` (`task`, `wave` or `plan`), `brief.model` (a spec), `summaries` (`off` or `on`), `summaries.model` (a spec), `storage.compact` (`auto`, the default, or `off`) and `storage.warn-gb` (gigabytes, `20` by default, or `off`; see [forge du](#forge-du)). Those write the user file and ignore `--repo`; `unset` removes one key. A bad value exits 2 and writes nothing. A model spec is checked for its form when it is set; whether it resolves is checked when `plan` uses it. Unset of a `decide.gate.*` key is refused: set the mode to `off`. `-` as a value reads stdin for the per-repo files. Exit 2 on invalid input |
21
22
  | `forge config profile list\|show\|create\|edit\|set\|unset\|rm\|use` | named bundles of routing, policy, gates and budget in `decide.json`; see [below](#forge-config-profile) |
22
23
  | `forge watch [RUN_DIR \| --repo DIR \| --all] [--interval S] [--settle S] [--until-done] [--no-notify] [--exec CMD]` | follow runs live: a line for every task status change, and a desktop notification, `--exec CMD` and the repo's `.forge/on-finish` when a run finishes or fails, a task fails or a final review gives its verdict; see [below](#forge-watch). Read-only |
23
24
  | `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) |
24
25
  | `forge runs compact [RUN_DIR … \| --repo DIR \| --all] [--logs] [--older-than DAYS] [--dry-run] [--json]` | keep every run and take back what it holds for nothing: leftover review snapshots and, with `--logs`, gzipped log copies; see [below](#forge-runs-compact) |
25
26
  | `forge du [--repo DIR \| --all] [--top N] [--json]` | what forge takes on disk (run dirs, worktree folders, its data home) and the command that takes each part back; see [below](#forge-du). Read-only |
27
+ | `forge worktrees rm PATH… [--branches] [--dry-run] [--json] [--actor {cli,ui}]` | remove `failed` and `finished` worktrees, and leftover folders, by forge-ui's rules (never `--force`; `--branches` is `git branch -d` on a finished worktree's merged branch). Exit 0 when no row failed, 4 when one did, 2 usage. See [below](#forge-worktrees-rm) |
26
28
  | `forge runs rerun RUN_DIR --dwarf SPEC [--qa SPEC] [--to DIR] [--max-parallel N] [--dry-run] [--run --yes]` | set up the same plan again with another implementer, from the same starting commit; spends nothing unless `--run --yes`; never merges. See [below](#forge-runs-rerun-and-compare) |
27
29
  | `forge runs compare RUN_A RUN_B [--json] [--no-record]` | two runs of one plan, side by side, per task; records the pair in the dataset |
28
- | `forge memory show\|learnings\|prune\|spend REPO …` | a repository's project memory; `learnings REPO --json` lists every learning in its ledger with what forge does with it (`in_memory`, `waiting` for a second run, `stale`, `capped`, `muted`), from forge-memory.sh's own rebuild, without changing the repository. See [project memory](memory.md) |
30
+ | `forge memory show\|learnings\|prune\|spend\|forget\|add\|edit REPO …` | a repository's project memory. `learnings REPO --json` lists every learning with what forge does with it (`in_memory`, `waiting`, `stale`, `capped`, `muted`); a learning a person wrote has `manual: true` (the field is absent otherwise). `forget REPO KEY…` (`KEY` is `category:key`; `--dry-run`, `--json`, `--actor ui\|cli`) drops those ledger rows and rebuilds `memory.md`; a missing key is not an error. `add REPO --category verify\|trap\|finding --text T [--path P]…` appends one person row (kept at once). `edit REPO KEY --text T` replaces that learning and keeps its paths; a missing key is an error. `--json` on forget prints `{ok, dry_run, keys: [{key, rows, found}], memory_lines_removed}`; on add and edit `{ok, key, memory_lines_added, memory_lines_removed}`. Exit 0 ok, 2 usage. See [below](#forge-memory-forget) and [project memory](memory.md) |
29
31
  | `forge issues RUN [--apply] …` | file the review findings a run left open as GitHub issues; see [below](#forge-issues) |
32
+ | `forge findings show\|fix\|dismiss\|reopen\|to-file\|dup\|tag\|note\|edit\|triage\|triage-status\|proposals\|apply\|reject REPO …` | every review finding of a repository and what happened to it. `REPO` is a checkout, a linked worktree, or a plan or solo run dir. `triage` is read-only and needs `--spec`. `--actor` is `cli` (default), `ui` or `triage`; `--json` is machine-readable. Exit 0 ok, 2 usage, 3 refused, 1 error. See [below](#forge-findings) |
30
33
  | `forge pr [RUN_DIR \| --repo DIR] [--texts] [--paths] [--out FILE] [--create [--base B] [--head B]]` | a draft pull-request description for a finished run, on stdout; `--create` opens it as a draft PR with `gh`; see [below](#forge-pr) |
31
34
  | `forge retro note\|report\|issues PLAN …` | retro notes on what got in a run's way (`plan --retro`): `note` records one by hand (`--type`, `--fixable-by`, `--summary`, and `--command`, `--exit`, `--error`, `--blocking`, `--tried` as needed), `report` writes `retro.md`, and `issues` drafts GitHub issues for forge's own repository and posts only with `--apply --approve HASH`. `record` is forge's own call after a dispatch. Exit 2 usage, 3 refused. See [retro notes](../references/decompose.md#retro-notes-opt-in) |
32
- | `forge brief write\|show\|answer\|stale PLAN …` | each task's open questions, asked before it starts (`plan --brief`): `write` asks the missing ones, `show` lists them (`--task`, `--json`), `answer PLAN TASK QID TEXT` records an answer (`--file F`, `--actor`), and `stale PLAN TASK` flags dependents' open questions after a merge. Exit 2 usage or an unknown task or question; 3 when PLAN is not a plan dir, or, for `write` and `show`, when brief is off for it. See [brief mode](../references/decompose.md#brief-mode-opt-in) |
35
+ | `forge brief write\|show\|answer\|stale\|propose\|proposals\|apply\|reject PLAN …` | each task's open questions, asked before it starts (`plan --brief`), and the diff a wider answer waits on. `write` asks the missing ones (`--task ID`, `--jobs N`; `--force` redoes a task that already has `brief.json`). `show` lists them (`--task`, `--json`), parked questions by group and tasks marked `affected by <pid>`. `answer PLAN TASK QID TEXT` records an answer (`--file F`, `--actor`). A task answer goes into the prompt before the task starts and is late after. A parked `wave` or `plan` question is answerable only when `--brief-scope` is at least that wide; the answer is stored and the command prints `forge brief propose`. `stale PLAN TASK` flags dependents' open questions after a merge. `propose PLAN TASK QID` (`--actor`) turns that parked answer into `proposals/<pid>/`, one read-only dispatch. `proposals PLAN` (`--json`) lists every proposal with its state, scope, group, summary, diff and, while `proposed`, the apply line. `apply PLAN PID --approve HASH` (`--actor`, `--no-regenerate`) writes that diff. `--no-regenerate` marks affected tasks and does not regenerate their questions. `reject PLAN PID` (`--reason TEXT`, `--actor`) marks it `rejected` and touches no plan file. Exit 2 usage or an unknown task, question or proposal; 3 when PLAN is not a plan dir, when brief is off (`write`, `show`, `propose`), or when a proposal is refused (`propose`, `apply`, `reject`). See [brief mode](../references/decompose.md#brief-mode-opt-in) |
36
+ | `forge group show\|retry\|set PLAN …` | a plan's task groups (`plan --groups`, and `plan --group-review`). `show PLAN [--group GID] [--json]` is read-only: every group, and for a `review=group` group its round, status, implicated tasks and, when `NEEDS_DECISION`, the first line of `decision.md`. Exit 3 when there is no `groups.tsv`; exit 2 for an unknown group. `retry PLAN GID [--tasks a,b] [--reason TEXT]` answers an ambiguous `NEEDS_DECISION` (`--tasks` is required; those members become `FAIL`, and so does any member with its own blocking finding) or rearms `UNKNOWN`, `INFRA`, `TIMEOUT`, `INTERRUPTED` or `ERROR` to `INTERRUPTED` so the next run reviews again, with no member attempt spent. An oversized group is refused: split `groups.tsv` and run `plan` again. `set PLAN GID [--title T] [--goal G] [--reason TEXT]` rewrites a group's title or goal (one line each, at most 500 characters, empty for none) and freezes the groups again, logged as `group-set`; refused (exit 3) when the groups or a member's deps or files changed since `plan`. `--reason` is at most 2000 characters, logged in `control.log` with `actor` `cli`. Exit 0 ok, 2 usage or an unknown group or task (including `retry` with no `groups.tsv`), 3 refused (a state this command does not retry, or the control lock busy). A settle that fails returns that command's exit code. See [group review](reviews.md#group-review-opt-in) |
33
37
  | `forge summarize PLAN [--task ID] [--force] [--json]` | a generated summary per task (`plan --summaries on`), in `tasks/<id>/summary.json`, rewritten only when its facts change. Exit 2 usage, 3 when PLAN is not a directory. See [task summaries](../references/decompose.md#task-summaries-opt-in) |
34
38
  | `forge ui open\|status\|stop` | forge-ui, the run viewer; see [the command group](forge-ui.md#forge-ui-command-group) |
35
39
  | `forge dataset …` | every run's inputs and outcomes; see [run dataset](dataset.md) |
@@ -143,7 +147,177 @@ forge does not create, and what `forge runs compact --logs` would take back), ea
143
147
  folder, and forge's data home (the dataset and its blobs, which are kept, archives, exports, legacy
144
148
  files). It ends with the commands that take each part back. Sizes are disk usage, as `du` counts it;
145
149
  every file is visited, so a large tree takes a while. It reads only, apart from keeping the totals for
146
- the `storage.warn-gb` check. forge-ui's **Disk** screen shows the same report.
150
+ the `storage.warn-gb` check. forge-ui's **Disk** screen shows the same report and, when the server can write, compacts from it after a dry run ([Controls](forge-ui.md#controls)).
151
+
152
+ ### `forge worktrees rm`
153
+
154
+ ```
155
+ forge worktrees rm PATH… [--branches] [--dry-run] [--json] [--actor {cli,ui}]
156
+ ```
157
+
158
+ Removes worktrees by the rules of forge-ui's Worktrees screen (`ui/forge_ui/worktrees.py` `compute`), the one rule set. It never passes `--force`.
159
+
160
+ - A `failed` or `finished` worktree whose repository is known is `git worktree remove`. `--branches` also runs `git branch -d` (never `-D`) on a `finished` worktree whose branch is merged. A `failed` worktree's branch stays, and so does an unmerged one: `-d` refuses it.
161
+ - An `unknown` row that is a leftover folder (git no longer lists it as a worktree) is deleted as a folder, after checking again that git does not list it and that it still sits under `.forge-worktrees`.
162
+ - Every other status is skipped with its reason: its run is active, it has uncommitted changes, it is locked by git, it is the integration worktree of a run not integrated yet, its folder is gone (`git worktree prune`), it is not forge's worktree, it is already removed, it is not a leftover, the path is not a worktree forge knows, or its repository is not known.
163
+
164
+ The same path given twice is one row. `--dry-run` computes the same actions and changes nothing. `--actor` is who asked, `cli` (the default) or `ui`, recorded with a real removal: a `worktree_removed` dataset event (the actor on the event) and a gone entry in the location list, `forge worktrees rm (<actor>)`. A skip and a dry run record nothing.
165
+
166
+ `--json` prints one object on stdout, on failure too:
167
+
168
+ ```json
169
+ {"ok": true, "dry_run": false,
170
+ "rows": [{"path": "…", "action": "remove", "status": "removed", "reason": null}]}
171
+ ```
172
+
173
+ `action` is `remove`, `remove+branch`, `delete-folder` or `none`. `status` is `removed`, `skipped`, `failed` or `would-remove` (the dry run). `reason` is a string, or null when there is nothing to say. `ok` is false when any row is `failed`. A worktree that was removed and whose branch then refused `-d` is `failed`, with the reason that the worktree is gone and the branch stays.
174
+
175
+ Exit 0 when no row failed (a skip is not a failure), 4 when a row failed, 2 usage. forge-ui's Remove runs this with `--actor ui`. See [Controls](forge-ui.md#controls).
176
+
177
+ ### `forge memory forget`
178
+
179
+ ```
180
+ forge memory forget REPO KEY… [--dry-run] [--json] [--actor {ui,cli}]
181
+ ```
182
+
183
+ `KEY` is `category:key`, the identity the rebuild and `learnings` already use. Each part is normalised (lowercase, every run of non-alphanumerics collapsed to one space) and neither part may be empty. A repeated key, or two spellings that normalise to one, is a single entry.
184
+
185
+ It removes those learnings' rows from `.forge/ledger.tsv` and rebuilds `.forge/memory.md` from the ledger that remains. `--dry-run` touches neither file. A key that is not in the ledger is not an error. The command runs when `FORGE_MEMORY=off` too: it is an edit you asked for, not an automatic write.
186
+
187
+ `--json` prints one object:
188
+
189
+ ```json
190
+ {"ok": true, "dry_run": false,
191
+ "keys": [{"key": "trap:alpha thing", "rows": 2, "found": true}],
192
+ "memory_lines_removed": ["- alpha thing [a.py]"]}
193
+ ```
194
+
195
+ `rows` is how many ledger rows matched that key. `found` is false when none did. `memory_lines_removed` is the `- ` fact lines a rebuild of `memory.md` loses, in their old order, not a count and not the section headings. `ok` is true on that object. A usage error prints to stderr and exits before any JSON.
196
+
197
+ A real forget that drops at least one row records a `memory_forget` dataset event (`keys`, `rows`, `actor`). A dry run, and a forget that matches nothing, record nothing. `--actor` is `cli` (the default) or `ui`.
198
+
199
+ Exit 0 ok, 2 usage (a bad key, an unknown option, a missing repo, or no key). See [project memory](memory.md#scriptsforge-memorysh).
200
+
201
+ `add` and `edit` write a row a person asked for, so they run when `FORGE_MEMORY=off` too.
202
+
203
+ ```
204
+ forge memory add REPO --category verify|trap|finding --text TEXT [--path P]… [--actor {ui,cli}] [--json]
205
+ forge memory edit REPO KEY --text TEXT [--path P]… [--actor {ui,cli}] [--json]
206
+ ```
207
+
208
+ `add` appends one ledger row and rebuilds `.forge/memory.md`. The row's role is `person` and its run id is `manual-<epoch>` (seconds). `--category` is `verify`, `trap` or `finding`. `--text` is one line, 1 to 300 characters, with no tab; the rebuild then clamps it like any other fact (180 characters, anchor kept). `--path` is repeatable, at most 20: each path is relative, at most 300 characters, and must not contain `..`, a comma, a tab, a newline, or `[` or `]`. The paths are stored on the row, and the first is appended as `[anchor]` when the text has none. A `finding` written this way is injected on that first row, not after a second run. The row is still dropped when its anchor path is gone, and under the cap it is trimmed only after every run fact.
209
+
210
+ `edit` is a forget of that one learning plus an add, in one rewrite of the ledger and one rebuild. `KEY` is `category:key`, normalised the same way as `forget`. The new row keeps that category, and its key is computed from the new text, so the key you pass and the key it prints can differ. Paths are the old row's paths and anchors, plus any new `--path`, still at most 20; an old path that could not be an anchor is dropped rather than refusing the edit. A key that is not in the ledger is an error and nothing is written.
211
+
212
+ `--json` prints one object, `{"ok": true, "key": "trap:alpha thing", "memory_lines_added": ["- alpha thing [a.py]"], "memory_lines_removed": []}`. Without it the line is `added <key>` or `edited <key>`. Each command records one dataset event, `memory_add` or `memory_edit` (`key`, `actor`). `learnings --json` sets `manual` to true on a learning that has any `person` row, and omits the field otherwise.
213
+
214
+ Exit 0 ok, 2 usage (a bad category, text or path, a missing `--text`, a repo that is not a directory, or, for `edit`, a key that is not in the ledger).
215
+
216
+ ### `forge findings`
217
+
218
+ Every review finding of a repository, and what happened to it. The record belongs to the repository, not to the checkout a run started in. `REPO` is a checkout, a linked worktree, or a plan or solo run dir. `FP` is the 12-hex fingerprint `show` prints. Every subcommand takes `--actor {cli,ui,triage}` (default `cli`) and `--json`.
219
+
220
+ ```
221
+ forge findings show REPO [--status S]… [--online]
222
+ forge findings fix REPO FP… [--commit SHA] [--reason TEXT]
223
+ forge findings dismiss REPO FP… --reason TEXT
224
+ forge findings reopen REPO FP…
225
+ forge findings to-file REPO FP… [--title T] [--body-file F]
226
+ forge findings dup REPO FP --of FP
227
+ forge findings tag REPO FP… (--add | --remove) TAG… [--]
228
+ forge findings note REPO FP TEXT
229
+ forge findings edit REPO FP [--severity P0|P1|P2|P3] [--text-file F]
230
+ forge findings triage REPO --spec S [--timeout N] [--max-findings N] [--detach]
231
+ forge findings triage-status REPO [N]
232
+ forge findings proposals REPO [N]
233
+ forge findings apply REPO N PID --approve HASH [--plan-dir DIR]
234
+ forge findings reject REPO N PID [--reason TEXT]
235
+ ```
236
+
237
+ `show` lists every run of the repository (the same collection as `forge issues --all-runs --include-plausible --include-dismissed`). It is offline unless `--online`, which asks GitHub which findings are already filed. `--status S` is repeatable; `open` keeps both `open` and `to-file`. Any other name keeps that status, and an unknown name keeps nothing. Rows are worst severity first, then the newest plan. A line is `fp status severity tags file:line summary`. Tags are the record's tags when it has any, otherwise the default for the file.
238
+
239
+ `fix` marks findings `fixed`. It needs `--commit` (7 to 40 lowercase hex characters), `--reason` (at most 500 characters), or both. `dismiss` marks them `dismissed` and requires `--reason` (at most 500). `reopen` marks them `open`. `to-file` keeps a draft issue: `--title` is at most 200 characters, `--body-file` is a file (not `-`) of at most 20000 characters. `dup` marks one finding a duplicate of `--of`; a finding cannot duplicate itself. A status change clears that entry's reason, commit, issue url and `duplicate_of`, and keeps its tags, note, edit and draft.
240
+
241
+ `tag` adds or removes tags. Exactly one of `--add` or `--remove`. `--` separates fingerprints from tags; without it, tags follow the flag and fingerprints precede it. A tag matches `^[a-z][a-z0-9-]{0,23}$`. A finding holds at most 8. `note` sets the note (at most 2000 characters); empty text clears it. `edit` needs `--severity`, `--text-file` (at most 4000 characters, not `-`), or both. The replacement is stored on the record as `edit` and does not rewrite the review. A repeated fingerprint counts once. One fingerprint that is not 12 hex characters refuses the whole command.
242
+
243
+ A change that leaves an entry as it was is reported unchanged and is not written. `--json` on these commands prints `{ok, op, changed: [{fp, before, after}], unchanged}`. Without it the line is `<op>: N changed, M unchanged`.
244
+
245
+ The record is `${XDG_STATE_HOME:-~/.local/state}/forge/findings/<identity key>.record.json` (`{"version": 1, "findings": {fp: entry}}`). An empty or relative `XDG_STATE_HOME` counts as unset. The identity key is 16 hex characters of the repository root, shared by every checkout. Beside it: `<key>.record.log.jsonl` (one JSON line per change) and a `finding_record` dataset event per change (fail-open). `<key>.lock` is the same lock `forge issues --apply` takes; a busy lock is retried for 10 seconds, then refused. Old per-checkout dismissals (`<checkout key>.json`) are merged in on read as `dismissed` and never written again.
246
+
247
+ Stored statuses are `open`, `to-file`, `filed`, `fixed`, `dismissed` and `duplicate`. `open` in the record means reopened. An entry may also hold `tags`, `note`, `edit` (`severity`, `text`) and `draft` (`title`, `body`). A tag, note or edit on a finding the record has not seen stores it as `open`, and that hides a swept mark or an old dismissal the same way `reopen` does. `filed` is what `forge issues --apply` records, with the issue url; there is no findings subcommand that files.
248
+
249
+ The status `show` prints is the first of these that answers:
250
+
251
+ 1. The record, when it is `duplicate`, `dismissed`, `fixed`, `filed` or `to-file`. A record of `open` does not stop here: a filed issue in step 2 still shows, and a swept or old dismissal does not.
252
+ 2. The issues listing: filed and `CLOSED` is `fixed`, filed is `filed`; unless the record reopened it, swept is `swept` and an old dismissal is `dismissed`.
253
+ 3. A review row, which `show` does not pass. forge-ui does: a shadow review is `shadow`, an unlabelled one (`UNSTATED`) is `unlabelled`, a superseded one is `superseded`.
254
+ 4. `open`.
255
+
256
+ Only `open` and `to-file` count as open. Default tags, when the record has none, come from the path, first match: `tests` (a `tests/` or `test/` directory, or `test_*`, `*_test.*`, `*.test.*`), `docs` (`docs/`, `site/`, `*.md`), `infra` (`.github/`, `ci/`, `scripts/forge-install`, `Dockerfile`, a root `*.yml` or `*.yaml`, a name starting with `install`), `ui` (`ui/`, `web/`, `frontend/`, `static/`, or `*.js`, `*.ts`, `*.tsx`, `*.css`, `*.html`), otherwise `backend`. No path gives no tag.
257
+
258
+ `triage` asks one read-only model to propose what to do. `--spec` is required, named as `forge --dwarf` names a model. `--timeout` is seconds, default 3600, and must not be negative. `--max-findings` is 1 to 2000, default 400: the open and `to-file` findings, worst then newest. The dispatch is `forge-dispatch.sh side` (kind `triage`), after `doctor --spec S --role side`. It is refused when `FORGE_TRIAGE` is off, when the repository's privacy floor says never send, when the repository has no checkout to read, when a triage is already `running`, or when 200 triage dirs already exist. Nothing in a triage edits a finding, a file, a memory or an issue.
259
+
260
+ Each triage is `${XDG_STATE_HOME:-~/.local/state}/forge/triage/<identity key>/<N>/` with `state.json`, `findings.json`, `prompt.txt`, `proposals.json` and `done`, plus the dispatch's `side.last` and `side.resolved`. `state` is `running`, then `done` or `failed` (with `reason`). A `running` triage whose process is gone, or whose `done` exists, reads as `failed` with reason `lost`. The model replies once and, if the `forge-triage` block is unusable, once more; an empty proposal list is a successful `done`. `--detach` returns at once (`{"triage": N, "state": "running"}`, exit 0) and the job continues in its own session. That job is the internal `_triage-job` command, which `--help` does not list; it writes its exit code to `done`. Without `--detach` the command waits and exits 1 when the state is `failed`.
261
+
262
+ `triage-status` and `proposals` read triage `N`, or the newest when `N` is omitted. `proposals` prints `proposals.json`. Each proposal has `id` (`p1`, `p2`, …), `hash` (12 hex characters), `state` (`pending`, then `applied` or `rejected`) and one kind:
263
+
264
+ | Kind | Carries | Approving it |
265
+ |---|---|---|
266
+ | `duplicate` | `fp`, `of`, `why` | marks `fp` `duplicate` of `of`, reason `why` cut to 500 characters |
267
+ | `fixed` | `fp`, `evidence`, `commit` | marks `fp` `fixed`, reason `evidence` cut to 500 characters; `commit` is kept when it is 7 to 40 lowercase hex characters |
268
+ | `tag` | `fps`, `tags` | adds those tags |
269
+ | `issue` | `fps`, `title`, `body` | marks them `to-file` with that draft. GitHub is never contacted |
270
+ | `plan` | `fps`, `title`, `request`, `plan` | writes a plan dir and prints the command that would run it. Nothing is dispatched |
271
+
272
+ `apply REPO N PID --approve HASH` applies one `pending` proposal. `HASH` is the hash `proposals` shows; it is checked against the proposal as it is now, and a mismatch is refused with nothing written. The record is written with actor `triage`. The person who asked is `decided.actor` on the proposal (`decided` is `{at, actor}` and, for a rejection, `reason`). A `plan` approval writes `request.md` and a plan `forge-planner.py parse` has accepted. `--plan-dir` chooses the directory; the default is `${XDG_STATE_HOME:-~/.local/state}/forge/plans/<identity key>/triage-<N>-<pid>`. The directory must not already exist. Findings that have no note get the note `in plan <dir>`. The command prints the plan dir and `bash scripts/forge-parallel.sh plan <dir> --repo <checkout>`. `reject` marks one `pending` proposal `rejected`. `--reason` is at most 500 characters. A proposal that is not `pending`, an unknown triage or id, or a fingerprint that is not a finding of the repository now, is refused and left as it was.
273
+
274
+ `show --json`:
275
+
276
+ ```json
277
+ {
278
+ "repo": "owner/repo",
279
+ "root": "/path/to/repo",
280
+ "key": "0123456789abcdef",
281
+ "findings": [
282
+ {
283
+ "fp": "a1b2c3d4e5f6",
284
+ "status": "open",
285
+ "severity": "P2",
286
+ "tags": ["backend"],
287
+ "file": "src/app.py",
288
+ "summary": "widget drops events on retry",
289
+ "record": null
290
+ }
291
+ ],
292
+ "notes": [],
293
+ "warnings": []
294
+ }
295
+ ```
296
+
297
+ Each finding is that object plus the `forge issues --json` fields (`confidence`, `origin`, `plan`, `plan_dir`, `task`, `text`, `reviewer`, `commit`, `review`, `filed`, `swept`, `dismissed`). `record` is the record entry, or null.
298
+
299
+ `proposals --json` prints `proposals.json`:
300
+
301
+ ```json
302
+ {
303
+ "triage": 1,
304
+ "spec": "alias:high",
305
+ "at": "2026-11-16T12:00:00Z",
306
+ "proposals": [
307
+ {
308
+ "id": "p1",
309
+ "hash": "0123456789ab",
310
+ "state": "pending",
311
+ "kind": "duplicate",
312
+ "fp": "aaaaaaaaaaaa",
313
+ "of": "bbbbbbbbbbbb",
314
+ "why": "same cache defect"
315
+ }
316
+ ]
317
+ }
318
+ ```
319
+
320
+ Exit 0 ok, 2 usage (the command line is not usable; nothing was written), 3 refused (the record or the triage refuses the change; nothing was written), 1 error. A triage that finishes `failed` exits 1 after printing its state. A usage error, a refusal or an error the command reports itself prints `forge findings: …` on stderr, and with `--json` also `{"ok": false, "error": "…"}`.
147
321
 
148
322
  ### `forge runs rerun` and `forge runs compare`
149
323
 
@@ -189,17 +363,27 @@ the size of a `--only` selection).
189
363
 
190
364
  | Flag | Does |
191
365
  |---|---|
192
- | `--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 |
366
+ | `--json` | machine-readable output; `findings` lists each one with its fingerprint, severity, origin (`tolerated`, `accepted`, `review` or `plausible`), task, `review`, `swept` (`{task, finding}` when the run's finding sweep fixed it; such a finding is never drafted), `filed` state, `dismissed` mark, `record` (the finding-record entry, or null) and `status` (`open`, `to-file`, `filed`, `fixed`, `dismissed`, `duplicate` or `swept`). A whole-run finding's `review` is `{name, outdated, merged_since}` (`outdated` is null when the review has no verdict or the plan has no accepted integration commit; `merged_since` is empty unless the review is outdated). Every other finding has `review` null |
193
367
  | `--offline` | never run `gh`: no filed state, commit publication judged from local refs |
194
368
  | `--only FP` | keep only these 12-hex fingerprints (repeatable or comma-separated) |
195
- | `--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 |
196
- | `--dismiss FP`, `--undismiss FP`, `--reason TEXT` | mark findings as needing no work (or take it back), then exit; no network. The marks live outside the repo, in `${XDG_STATE_HOME:-~/.local/state}/forge/findings/<repo key>.json` |
369
+ | `--all-runs` | read `RUN` as a repository (or a plan dir naming one) and collect every run of that repository: the main checkout, linked worktrees, and checkouts that are gone. The newest plan wins for a finding present in several |
370
+ | `--to-file` | keep only findings whose record status is `to-file`. A draft title replaces the generated one and the draft body follows under Notes. May be combined with `--only`: both must match |
371
+ | `--dismiss FP`, `--undismiss FP`, `--reason TEXT` | mark findings as needing no work (or take it back), then exit; no network. `--dismiss` writes status `dismissed` on the finding record and `--undismiss` writes `open`. A fingerprint that matches no current finding is accepted |
197
372
  | `--include-dismissed` | draft dismissed findings too |
198
373
 
374
+ Findings, dismissals and the `filed` mark belong to the repository, not to the checkout the run
375
+ started in. The record is `${XDG_STATE_HOME:-~/.local/state}/forge/findings/<identity key>.record.json`
376
+ (see [forge findings](#forge-findings)). Old `<checkout key>.json` dismissal stores are read and never
377
+ written. A finding that is `filed`, `fixed` or `duplicate` is never drafted, and `--apply` records
378
+ `filed` with the issue url. When the run's checkout is gone, the command uses the repository root, and
379
+ the GitHub slug is `origin` of the first checkout of that repository that still exists. That checkout
380
+ is the only one asked: no `origin`, or an `origin` that is not a GitHub `owner/repo`, ends the search.
381
+ `--repo` still overrides it; `--apply` needs a slug.
382
+
199
383
  Two filers for one repository at once would both see a finding as unfiled, so `--apply` takes a
200
384
  repository lock from the issue lookup to the last `gh issue create`, and each dismissal takes it
201
385
  around its write. A busy lock is retried for 10 s, then exit 3. Exit 0 ok, 2 usage or a `gh` or
202
- dismissal-store error, 3 busy.
386
+ record-store error, 3 busy.
203
387
 
204
388
  ### `forge pr`
205
389
 
@@ -653,16 +837,19 @@ Decomposed runs: many dwarves in isolated worktrees, per-task QA, only passing w
653
837
  Bash 3.2 entrypoints use a Python standard-library coordinator to schedule eligible tasks.
654
838
 
655
839
  ```
656
- forge-parallel.sh plan <plan-dir> --repo <dir> [routing flags] [--planner <spec>] [--no-memory]
840
+ forge-parallel.sh plan <plan-dir> --repo <dir> [--after <plan-dir>] [routing flags] [--planner <spec>] [--no-memory]
657
841
  [--gate NAME=MODE[,...]] [--no-gates] [--decide-budget tokens=N[,usd=X]]
658
842
  [--decompose-level L] [--shadow-qa <spec>[,..]|none] [--shadow-rate R]
659
- [--reviewer-session | --no-reviewer-session]
843
+ [--reviewer-session | --reviewer-session-rate R | --no-reviewer-session]
660
844
  [--implementer-session | --no-implementer-session]
661
845
  [--explore E] [--ui | --no-ui] [--fail-first | --no-fail-first]
662
846
  [--pre-review-tests | --no-pre-review-tests] [--pre-review-parallel N]
663
847
  [--qa-threshold P0|P1|P2|P3|none|default]
664
848
  [--profile NAME | --no-profile] [--fast ROLES] [--collapse-chains]
665
- [--max-attempts N] [--converge-window N] [--no-infra-fallback]
849
+ [--groups waves|FILE] [--group-review]
850
+ [--group-max-tasks N] [--group-max-diff-kb N]
851
+ [--max-attempts N] [--retry-per-model N | --no-retry-per-model]
852
+ [--converge-window N] [--no-infra-fallback]
666
853
  [--retro | --no-retro] [--brief advisory|gated|strict|off] [--brief-scope task|wave|plan]
667
854
  [--brief-model SPEC] [--summaries on|off] [--summaries-model SPEC]
668
855
  forge-parallel.sh auto <plan-dir> --repo <dir> --goal-file <file> [--planner <spec>]
@@ -697,7 +884,7 @@ forge-parallel.sh combine <new-plan-dir> <plan-dir> <plan-dir>... [--verify <c
697
884
 
698
885
  | Subcommand | Does |
699
886
  |---|---|
700
- | `plan` | validate `tasks.tsv`, resolve difficulty → concrete dwarf/qa specs, compute waves, render the approval table |
887
+ | `plan` | validate `tasks.tsv`, resolve difficulty → concrete dwarf/qa specs, compute waves, and with `groups.tsv` or `--groups` validate, resolve and freeze the groups; render the approval table. A `dwarf` cell of `script` is kept: that task runs the executable `tasks/<id>/run` |
701
888
  | `auto` | from a goal file to that table in one blocking command; with `--approved`, also `run`. The orchestrator's job is mechanical, so a small model can drive it. See [below](#forge-parallelsh-auto) |
702
889
  | `run` | schedule ready tasks; per task: worktree → dwarf → diff → QA → status; merge passing tasks onto the integration branch |
703
890
  | `retry` | re-run **one** failed task in the worktree it already has, with its reviewer's findings in the prompt; with `--answer` or `--answer-file`, answer a `NEEDS_INPUT` task and run it; with `--decide` or `--dwarf` plus `--reason` and `--approved`, decide a `NEEDS_DECISION` task and run it |
@@ -707,6 +894,8 @@ forge-parallel.sh combine <new-plan-dir> <plan-dir> <plan-dir>... [--verify <c
707
894
  | `review` | **opt-in, spends QA quota** — one reviewer reads the whole combined result; read-only |
708
895
  | `split` / `combine` | move tasks into a plan of their own / join fully merged plans into one |
709
896
 
897
+ A `tasks.tsv` row whose `dwarf` column is `script` runs the executable `tasks/<id>/run`. `plan` exits 2 when that file is missing or not executable, does not route the row, skips its implementer doctor, shows it in the table and counts no implementer dispatch. The `qa` column is still a model. See [Scripted tasks](../references/decompose.md#scripted-tasks).
898
+
710
899
  | Flag | Subcommands | Remembered in the plan | Means |
711
900
  |---|---|---|---|
712
901
  | `--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 |
@@ -721,12 +910,13 @@ forge-parallel.sh combine <new-plan-dir> <plan-dir> <plan-dir>... [--verify <c
721
910
  | `--no-infra-fallback` | plan, run | `infra_fallback` | turn lateral recovery off. A plan with no file stays off, and a re-plan keeps the setting it has |
722
911
  | `--converge-window N` | plan | `converge_window` | reviews the non-converging signal looks at (default `4` when the file is absent; below `2` it never fires). Changing it later is `forge control set converge-window N` |
723
912
  | `--max-attempts N` | plan | `max_attempts` | attempts a task may spend across runs before it stops for a decision (default `8` when the file is absent; `0` means no cap). Changing it later is `forge control set max-attempts N --confirm` |
913
+ | `--retry-per-model N` / `--no-retry-per-model` | plan | `retry_per_model` | a task may fail `N` times (1 to 99) on each model the retry policy gives it, then it moves one rung up and the count starts again. With `escalate_effort` on, the same `N` applies to each effort of that model. Replaces `--escalate-after` for this plan: when `escalate_after` is also present, `run` says so and follows `retry_per_model`. `--no-retry-per-model` removes the file; a re-plan with neither keeps it. Automatic retries still need `--retry-failed` above 0. See [a budget per model](reviews.md#a-budget-per-model---retry-per-model-n) |
724
914
  | `--decide retry=N` / `--decide threshold=Pn` | retry | no — this retry only | resume a `NEEDS_DECISION` task: `N` more attempts (`N` from 1 to 20) or this task's blocking threshold (`P0`..`P3`) and then one retry. Needs `--reason` and `--approved`. Refused on any other status |
725
915
  | `--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) |
726
916
  | `--verify-retries N` | run, retry, integrate | `verify_retries` | reruns of a failed verify command, or of each failed lane (default `1`, `0` = strict single run); with `.forge/verify-subset`, a failed command's failing test files run alone first and confirm a regression without a full rerun |
727
917
  | `--verify-lane 'name[opts]=cmd'` | run, retry | `verify.d/<name>` | one verification lane; repeatable. Options as in a lane file, comma-separated (`group=g`, `first`, `retries=n`, `reports=dir`, `baseline=file`). The first one of an invocation replaces the plan's earlier lanes and `--verify`; see [verification lanes](../references/decompose.md#execution-checks-and-integration-verification) |
728
918
  | `--verify-parallel N` | run, retry, integrate | `verify_parallel` | lanes run at once, 1 to 32 (default `3`) |
729
- | `--escalate-after N` | run, retry | `escalate_after` | failed attempts on one model before the next goes a tier up (default `3`, `0` = off) |
919
+ | `--escalate-after N` | run, retry | `escalate_after` | failed attempts on one model before the next goes a tier up (default `3`, `0` = off). When `retry_per_model` is set, that count is the trigger instead |
730
920
  | `--pre-review-tests` | plan | `pre_review_tests` | before each review, run only the tests the attempt affects; a red attempt goes back to its implementer unreviewed (off by default; `--no-pre-review-tests` turns it off). See [pre-review tests](../references/decompose.md#pre-review-tests-opt-in) |
731
921
  | `--pre-review-parallel N` | plan | `pre_review_parallel` | how many of those checks run at once across tasks, 1 to 64 (default `2`) |
732
922
  | `--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) |
@@ -739,9 +929,14 @@ forge-parallel.sh combine <new-plan-dir> <plan-dir> <plan-dir>... [--verify <c
739
929
  | `--no-profile` | plan | removes `profile.json` | no profile. `routed.json` stays |
740
930
  | `--fast ROLES` | plan | `fast` | which of `dwarf`, `qa`, `planner`, `review` ask for the fast tier (`all` or `none`). Omitted on a re-plan, the file stays; `none` removes it. See [below](#the-fast-tier) |
741
931
  | `--collapse-chains` | plan | no — this call only | merge a chain into one task named `combined`, after validation and before routing. A one-task or branching plan is unchanged. An already collapsed plan is not an error. See [below](#collapse-chains) |
932
+ | `--after DIR` | plan | `after`, `integration.base` | start from plan DIR's integration branch. DIR is a plan of the same repo whose tasks are all `MERGED`, whose integration tip equals `accepted.integration`, and whose scheduler is not live. Otherwise exit 2, and the plan directory and branches stay as they were. Creates `forge/<run>-integration` at that tip. A later `plan` without the flag keeps it. `run` exits 3 if DIR moved before this plan has merged a task. See [Chained plans](../references/decompose.md#chained-plans) |
933
+ | `--groups waves\|FILE` | plan | `groups.tsv`, `groups.frozen` | opt-in. `waves` writes one group per computed wave of at least two tasks; `FILE` copies that `groups.tsv`. An existing `groups.tsv` and no flag is kept. Then validated, its group QA resolved, and frozen. `run` refuses when the file or a member's deps or files changed. See [Groups and group review](../references/decompose.md#groups-and-group-review-opt-in) |
934
+ | `--group-review` | plan | the `review` column | with `--groups waves` only: those groups are `review=group` (one QA review for the group). High-difficulty tasks stay out. Without `waves`, `plan` exits 2 |
935
+ | `--group-max-tasks N` | plan | `group_max_tasks`, only when given | most members of a review group (default 6). A positive integer. Deriving waves needs at least 2 |
936
+ | `--group-max-diff-kb N` | plan | `group_max_diff_kb`, only when given | largest combined diff a group review will read, in KB (default 256). Over it, the group stops for a decision and nothing is truncated |
742
937
  | `--retro` / `--no-retro` | plan | `retro_mode` | agents record what got in their way, as retro notes. Off by default. Without either flag the plan keeps its earlier choice; a first plan takes the user setting (`forge config set retro on`). See [retro notes](../references/decompose.md#retro-notes-opt-in) |
743
938
  | `--brief advisory\|gated\|strict\|off` | plan | `brief` | one read-only dispatch per task writes its open questions before the task starts. `advisory` lets the run go on, `gated` holds a task with an unanswered must-answer question, and `strict` makes `run` exit `3` while any question is open. `off` turns it off. On needs `--brief-model` (or `forge config set brief.model`), else exit `2`. See [brief mode](../references/decompose.md#brief-mode-opt-in) |
744
- | `--brief-scope task\|wave\|plan` | plan | `brief_scope` | which questions act. Default `task`; only `task` acts so far, and `wave` or `plan` questions are parked in `brief.parked.json`. Only with brief on |
939
+ | `--brief-scope task\|wave\|plan` | plan | `brief_scope` | which parked questions can be answered. Default `task`: a task answer goes into that task's prompt, and a `wave` or `plan` question stays in `brief.parked.json` until a proposal is approved. `wave` also answers wave questions; the proposal may change the prompt, approach and files of unstarted members of that question's group, which must be in `groups.tsv`. `plan` answers wave and plan questions; a plan proposal may also add, remove and split tasks and change deps. See [brief mode](../references/decompose.md#brief-mode-opt-in). Only with brief on |
745
940
  | `--brief-model SPEC` | plan | `brief_model` | the model that writes the questions. Required with brief on; forge never picks one |
746
941
  | `--summaries on\|off` | plan | `summaries` | a generated summary per task in `tasks/<id>/summary.json`, rewritten only when its facts change. Off by default. See [task summaries](../references/decompose.md#task-summaries-opt-in) |
747
942
  | `--summaries-model SPEC` | plan | `summaries_model` | the model that writes the summaries. Required with summaries on; forge never picks one |
@@ -982,8 +1177,11 @@ Exit `0` when the search finished, culprit or not, `1` when a step could not run
982
1177
  only the user can answer, kept in `tasks/<id>/needs_input.md`. The run summary lists it under
983
1178
  `waiting for your answer:` with the first line of the question and the command to answer it, and
984
1179
  the retry hint does not count it as failed. Its dependents end `BLOCKED`, and neither a later
985
- `run`, `--retry-failed` nor `forge control retry` resumes it. Only
986
- `retry <plan> <id> --answer "<text>"` (or `--answer-file F`) does: the question and the answer
1180
+ `run`, `--retry-failed` nor a plain `forge control retry` resumes it. Only an answer does:
1181
+ `retry <plan> <id> --answer "<text>"` (or `--answer-file F`), and on a live run
1182
+ `forge control retry <plan> <id> --answer TEXT` (or `--answer-file F`, `-` for stdin), which queues
1183
+ that answer for the scheduler. With no live run, `forge control retry --answer` prepares the task
1184
+ the way `retry … --answer-file --no-dispatch` does. The question and the answer
987
1185
  join the findings of the next attempt, a normal new attempt. Without an answer, or with one older
988
1186
  than the question, `retry` exits `2` and changes nothing; if escalation refuses the retry, the
989
1187
  question and the answer stay for the same `--answer` to be tried again. A run that ends with such a
@@ -992,7 +1190,8 @@ sets this status.
992
1190
 
993
1191
  **`NEEDS_DECISION`** is the same kind of stop for a choice rather than a question. The reviews in
994
1192
  the last window all failed and kept finding new problems, or the retry policy has no stronger
995
- model, or the task has spent its attempt cap (`plan --max-attempts N`, default 8 across runs;
1193
+ model, or every blocking finding needs a file the task does not declare (reason `plan`), or the
1194
+ task has spent its attempt cap (`plan --max-attempts N`, default 8 across runs;
996
1195
  `forge control set max-attempts N --confirm` changes it, and `0` means no cap). The reasons and
997
1196
  the `retry` and `accept` commands are in `tasks/<id>/decision.md`. The run summary lists them under
998
1197
  `waiting for your decision:`. Neither a later `run`, `--retry-failed`, a retry budget nor a pin