@giamme/forge 0.17.0 → 0.19.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 (110) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +1 -0
  3. package/SKILL.md +32 -5
  4. package/VERSION +1 -1
  5. package/docs/artifacts.md +33 -1
  6. package/docs/commands.md +147 -16
  7. package/docs/dataset.md +5 -0
  8. package/docs/decomposed-runs.md +122 -1
  9. package/docs/development.md +2 -1
  10. package/docs/forge-ui.md +98 -8
  11. package/docs/memory.md +27 -4
  12. package/docs/models.md +8 -0
  13. package/docs/reviews.md +122 -0
  14. package/docs/safety.md +8 -0
  15. package/forge +44 -4
  16. package/package.json +2 -1
  17. package/references/dataset.md +39 -1
  18. package/references/decompose.md +737 -16
  19. package/references/harnesses.md +18 -3
  20. package/references/planning.md +43 -14
  21. package/references/solo.md +2 -1
  22. package/references/ui.md +56 -6
  23. package/registry.tsv +8 -3
  24. package/scripts/forge-artifact.sh +14 -0
  25. package/scripts/forge-brief.py +217 -0
  26. package/scripts/forge-compare.py +13 -2
  27. package/scripts/forge-config.py +176 -9
  28. package/scripts/forge-contract.py +246 -28
  29. package/scripts/forge-control.py +200 -15
  30. package/scripts/forge-dispatch.sh +48 -15
  31. package/scripts/forge-du.py +167 -0
  32. package/scripts/forge-group.py +496 -0
  33. package/scripts/forge-groups.py +89 -0
  34. package/scripts/forge-handoff.py +1128 -0
  35. package/scripts/forge-lib-adopt.sh +1 -0
  36. package/scripts/forge-lib-group.sh +641 -0
  37. package/scripts/forge-lib-plans.sh +343 -4
  38. package/scripts/forge-lib-review.sh +29 -1
  39. package/scripts/forge-lib-task.sh +197 -4
  40. package/scripts/forge-memory.sh +245 -3
  41. package/scripts/forge-metrics.sh +7 -3
  42. package/scripts/forge-parallel-options.sh +4 -0
  43. package/scripts/forge-parallel.sh +1216 -41
  44. package/scripts/forge-planner.py +104 -8
  45. package/scripts/forge-prompt.py +120 -0
  46. package/scripts/forge-retro.py +115 -0
  47. package/scripts/forge-route.py +190 -12
  48. package/scripts/forge-runs-compact.py +443 -0
  49. package/scripts/forge-runs-rm.py +2 -0
  50. package/scripts/forge-runs.py +27 -8
  51. package/scripts/forge-schedule.py +633 -49
  52. package/scripts/forge-shadow.py +7 -1
  53. package/scripts/forge-solo.sh +4 -0
  54. package/scripts/forge-summarize.py +698 -0
  55. package/scripts/forge-ui-options.sh +10 -0
  56. package/scripts/forge-worktrees.py +243 -0
  57. package/scripts/forge_brief/__init__.py +831 -0
  58. package/scripts/forge_brief/answers.py +506 -0
  59. package/scripts/forge_brief/proposals.py +1630 -0
  60. package/scripts/forge_dataset/__init__.py +10 -0
  61. package/scripts/forge_dataset/efforts.py +4 -3
  62. package/scripts/forge_dataset/export.py +36 -10
  63. package/scripts/forge_dataset/facts.py +8 -4
  64. package/scripts/forge_dataset/forecast.py +8 -18
  65. package/scripts/forge_dataset/harvest.py +241 -12
  66. package/scripts/forge_dataset/history.py +13 -6
  67. package/scripts/forge_dataset/importer.py +65 -1
  68. package/scripts/forge_dataset/names.py +66 -0
  69. package/scripts/forge_dataset/reviewers.py +5 -2
  70. package/scripts/forge_dataset/risk.py +6 -3
  71. package/scripts/forge_dataset/routing.py +6 -1
  72. package/scripts/forge_decide/__init__.py +11 -1
  73. package/scripts/forge_groups/__init__.py +308 -0
  74. package/scripts/forge_groups/attribute.py +289 -0
  75. package/scripts/forge_groups/review.py +286 -0
  76. package/scripts/forge_locations.py +366 -0
  77. package/scripts/forge_owner.py +152 -0
  78. package/scripts/forge_registry.py +19 -0
  79. package/scripts/forge_retro/__init__.py +417 -0
  80. package/scripts/forge_retro/issues.py +1193 -0
  81. package/scripts/forge_retro/report.py +671 -0
  82. package/scripts/forge_side/__init__.py +482 -0
  83. package/scripts/forge_storage.py +515 -0
  84. package/ui/README.md +68 -8
  85. package/ui/docs/api.md +375 -31
  86. package/ui/forge_ui/control.py +451 -11
  87. package/ui/forge_ui/executions.py +8 -1
  88. package/ui/forge_ui/export.py +53 -7
  89. package/ui/forge_ui/groups.py +264 -0
  90. package/ui/forge_ui/links.py +337 -0
  91. package/ui/forge_ui/models.py +125 -10
  92. package/ui/forge_ui/projects.py +4 -1
  93. package/ui/forge_ui/reader.py +919 -45
  94. package/ui/forge_ui/server.py +4 -0
  95. package/ui/forge_ui/static/app.js +173 -11
  96. package/ui/forge_ui/static/briefview.js +605 -0
  97. package/ui/forge_ui/static/checksview.js +6 -2
  98. package/ui/forge_ui/static/controls.js +5 -0
  99. package/ui/forge_ui/static/diffview.js +86 -1
  100. package/ui/forge_ui/static/groupsview.js +332 -0
  101. package/ui/forge_ui/static/index.html +4 -0
  102. package/ui/forge_ui/static/panel.js +394 -8
  103. package/ui/forge_ui/static/projectsview.js +189 -10
  104. package/ui/forge_ui/static/runmodel.js +27 -4
  105. package/ui/forge_ui/static/storageview.js +352 -0
  106. package/ui/forge_ui/static/style.css +176 -6
  107. package/ui/forge_ui/static/worktreesview.js +235 -14
  108. package/ui/forge_ui/storage.py +150 -0
  109. package/ui/forge_ui/transcripts.py +35 -10
  110. package/ui/forge_ui/worktrees.py +154 -13
package/ui/docs/api.md CHANGED
@@ -52,15 +52,29 @@ written), and the reader must never raise because of one.
52
52
  | `attribution.json` | the result of `forge-parallel.sh attribute`: `culprit` (a task id or `null`), `base_fails`, `inconclusive` (a reason or `null`), `merges`, `steps`, `verification_runs`, `gate` (`null` without the gate, else `{mode, ranking, tried, outcome}`); returned as `attribution`, see RunDetail |
53
53
  | `max_parallel`, `escalate_after`, `verify_retries` | one integer each |
54
54
  | `qa_threshold` | `P0`..`P3`, the least severe finding that still blocks; `final_qa` the final review's QA spec |
55
+ | `summaries`, `summaries_model` | the run's task-summary switch (`on` or `off`; absent is `off`) and its model spec, from `forge control set summaries`; returned as `summaries`, see RunDetail |
55
56
  | `profile.json` | the profile the run froze: `name`, `level` (`user`, `repo` or `builtin`), `body` (the profile object), `shadowed` (levels the winning copy hid), `frozen_at` (UTC, `YYYY-MM-DDTHH:MM:SSZ`), `overridden` (the sorted dotted keys a flag of the run replaced, such as `routing.qa.any`; empty when none). RunDetail returns `settings.profile` `{name, level, overridden}`, `null` when the file is absent, unreadable or not that shape |
56
57
  | `deferrals.txt` | one line per task the wave planner deferred |
58
+ | `groups.tsv` | tab-separated, 6 columns: `id review qa members title goal`. `#` lines and blank lines are skipped. `id` matches `[a-z0-9][a-z0-9-]{0,39}`. `review` is `task` or `group`. `qa` is a model spec or `-`. `members` is a comma list of task ids or `-`. `-` in any cell reads as `null`. A row with a bad id, or a repeated id, is skipped with a warning; the first copy of an id wins. Returned as RunDetail `groups` only when this file exists |
59
+ | `groups/<gid>/status` | one word, for a `review=group` group: `REVIEWING PASS FAIL NEEDS_DECISION UNKNOWN CONFLICT INFRA TIMEOUT ERROR INVALIDATED WAITING INTERRUPTED`. Any other word is kept as written |
60
+ | `groups/<gid>/round` | the current round, an integer |
61
+ | `groups/<gid>/merged` | exists when the group's review was merged |
62
+ | `groups/<gid>/rounds.tsv` | `round<TAB>epoch<TAB>status<TAB>implicated<TAB>reviewer` per line. `implicated` is a comma list of task ids or `-`. A row whose round or epoch does not parse is warned and skipped |
63
+ | `groups/<gid>/members.tsv` | `round<TAB>task<TAB>commit<TAB>attempt` per line: who was in each round. Returned on the group detail as `members_by_round` |
64
+ | `groups/<gid>/attribution.json` | `{round, findings: [{n, severity, status, file, line, tasks, blocking, ambiguous}], implicated, ambiguous}`, and `blocking` when it is a boolean. Returned as `attribution` |
65
+ | `groups/<gid>/decision.md` | the group's decision; the detail keeps its first line |
66
+ | `groups/<gid>/qa.last`, `qa.gate`, `known_issues.md` | the group's review, as a task's: the reply, the gate line, the tolerated findings. `qa.last` and `known_issues.md` are returned on the group detail |
67
+ | `groups/<gid>/candidate.base`, `candidate.commit` | one commit each: the base the group reviewed and the candidate it reviewed. Returned as `candidate` `{base, commit}` |
68
+ | `groups/<gid>/qa.input`, `qa.out`, `qa.log` (or `.gz`), `qa.clock` | the group's QA dispatch, sitting in the group dir as a task's sit in its task dir |
69
+ | `groups/<gid>/attempts/qa-<uuid>/` | that dispatch's execution, the same dir a task's QA dispatch writes |
70
+ | `retro.md`, `retro/notes.jsonl` | written when retro mode is on: the report (Markdown) and one JSON note per line (`fixable_by` `user`, `forge` or `unsure`, `check` `verified` or `claimed`, `blocking` a boolean). Returned as `retro`, see RunDetail |
57
71
  | `integration.base`, `accepted.integration` | one commit each: where the integration branch started, the revision the run accepted |
58
72
  | `attempts/<role>-<uuid>/` | one *execution* (below) of the run itself: `parallel` (a `run`) or `verification` |
59
73
  | `final-review-<epoch>-<pid>/` | one whole-run review: `qa.input`, `qa.last`, `verdict` (`PASS FAIL UNKNOWN INVALIDATED ACCEPTED`; absent while it runs or when nothing was judged), `qa.infra`, `qa.gate`, `known_issues.md`, `review.meta` (`key=value`: `base tip source spec threshold integration`, `threshold=none` when unset; `integration` is the integration-branch commit the reviewed result contains and is absent on older runs), `tasks.summary`, `attempts/qa-<uuid>/` |
60
74
  | `final-review` | a symlink to the newest *published* review dir; `final-review.verdict` a copy of its verdict |
61
75
  | `integrate-<epoch>-<pid>/` | one `integrate`: `setup.log`, `merge.log`, `verification.*`, `attempts/verification-<uuid>/`, and `final-review/` (a review dir as above) when it ran one |
62
76
  | `tasks/<id>/merged` | exists when the task was merged; its mtime is when |
63
- | `tasks/<id>/status` | one word: `RUNNING PASS FAIL ERROR INFRA TIMEOUT UNKNOWN INVALIDATED BLOCKED INTERRUPTED NOCHANGES CONFLICT NEEDS_INPUT NEEDS_DECISION` |
77
+ | `tasks/<id>/status` | one word: `RUNNING PASS FAIL ERROR INFRA TIMEOUT UNKNOWN INVALIDATED BLOCKED INTERRUPTED NOCHANGES CONFLICT NEEDS_INPUT NEEDS_DECISION IMPLEMENTED`. `IMPLEMENTED` means the member's own work is in and it is waiting for its group's review |
64
78
  | `tasks/<id>/attempt` | the current attempt number |
65
79
  | `tasks/<id>/attempts.tsv` | `epoch<TAB>attempt<TAB>status<TAB>infra_class` per line, one per attempt entry; status may also be `MERGED`, `BOUNCED` or `INCOMPLETE` (a send-back that no reviewer judged: the task status stays `FAIL`), `infra_class` may be empty, `-` or missing |
66
80
  | `tasks/<id>/escalations.tsv` | `epoch<TAB>attempt<TAB>from_spec<TAB>to_spec[<TAB>source]` per line; `source` (who decided: `policy`, a human's `retry --dwarf` as `retry`, or a `pin`) is missing on older rows, which read as `policy` |
@@ -75,6 +89,14 @@ written), and the reader must never raise because of one.
75
89
  | `tasks/<id>/accepted.by` | who accepted a task over a reviewer's FAIL, and why (`key=value`: `task`, `status`, `reason`, `by`, `at`, `epoch`, `attempt`, `reviewed_commit`; older runs are free text; returned as text) |
76
90
  | `tasks/<id>/qa.gate` | `threshold<TAB>decision<TAB>worst<TAB>n_confirmed<TAB>n_unlabelled<TAB>n_below` (`decision` is `accept` (the reviewer said FAIL, every CONFIRMED finding was below the threshold), `fail` (the reviewer said PASS, but listed a blocking CONFIRMED finding) or `keep`, `-` for none) |
77
91
  | `tasks/<id>/known_issues.md` | the confirmed findings a threshold tolerated |
92
+ | `tasks/<id>/summary.json` | the task's generated summary: `{text, sentence, model, generated_at, inputs_hash, sources}`, `generated_at` in epoch seconds, `sources` a list of `{kind, ref}` (`kind` `attempt` or `finding`; a finding's `ref` is `<attempt>:<title>`); returned as `summary`, see Task |
93
+ | `tasks/<id>/summary.error` | the reason the last generation failed; the previous `summary.json` is kept. Returned as `error` inside `summary` |
94
+ | `tasks/<id>/summaries` | the task's summary switch, `on` or `off`, from `forge control set summaries --task <id>`; `inherit` removes the file. Returned as `summaries_override` |
95
+ | `brief` | the plan's brief level: `advisory`, `gated` or `strict`. `off`, any other word, or a missing file means brief mode is off. Returned as RunDetail `brief` (`null` when off) |
96
+ | `tasks/<id>/brief.json` | the task's questions: `{questions: [{id, text, why, options, default, scope, must_answer, possibly_stale}], model, generated_at}`. Returned inside the task's `brief.questions` |
97
+ | `tasks/<id>/brief.parked.json` | wider-scope questions (`wave` or `plan`), the same shape. Returned as `brief.parked` |
98
+ | `tasks/<id>/brief.answers.json` | `{qid: {text, actor, t}}`: answers given before the task started. A question with an entry here is `answered` |
99
+ | `tasks/<id>/brief.late.json` | the same shape, for answers given after the task started. Returned as `brief.late`; a question that has one and no answer yet is `late` |
78
100
  | `tasks/<id>/prereview.json`, `prereview.md` | the pre-review tests of the latest attempt (opt-in `plan --pre-review-tests`): `status` (`passed`, `flaky`, `pre-existing`, `failed`, `skipped`, `error`), `reason`, `command`, `selected`, `failing`, `preexisting`, `flaky`, `runs`, `seconds`; returned on a task as `pre_review` `{status, reason, command, selected, failing, preexisting, flaky, seconds, tail}` (`tail`: the end of the last failing run's output), `null` without the file. `prereview.md` is the implementer's findings of a `failed` check |
79
101
  | `tasks/<id>/dwarf.input`, `qa.input` | the prompts forge assembled; `<role>.delivered`, `<role>.resolved` the live dispatch files |
80
102
  | `tasks/<id>/<role>.log`, `<role>.clock` | the running dispatch's harness log and its clock: one `<epoch> <bytes>` line each time the log grew (forge-dispatch.sh samples it every second; `FORGE_LOG_CLOCK=off` writes none) |
@@ -109,7 +131,14 @@ Only the transcript, checks and environment endpoints open an execution's `.log`
109
131
  running one's log for its `now`; no read opens a `.cmd`.
110
132
 
111
133
  **Task status** is `MERGED` if `tasks/<id>/merged` exists, otherwise the first word of
112
- `tasks/<id>/status`, otherwise `PENDING`.
134
+ `tasks/<id>/status`, otherwise `PENDING`. `IMPLEMENTED` is a waiting status: the work is in,
135
+ and the task is awaiting its group's review. It is not done, not active and not failed, and a
136
+ task that depends on one waits on it (it is not a stopped dependency). `status_class` in
137
+ `reader.py` returns `waiting` for it, as it does for `NEEDS_INPUT` and `NEEDS_DECISION`.
138
+ `_waiting` uses that class for a dependency: `done` (`MERGED` only) drops it from `on`,
139
+ `failed` (the stopped statuses, `NOCHANGES` included) puts it in `stopped`, and `waiting`
140
+ leaves it in `on` only. `PASS` is neither: it is saved and not merged yet, so a dependent
141
+ still lists it.
113
142
 
114
143
  Only the ids listed in `tasks.tsv` are tasks: `tasks/` may also hold forge's own dirs (e.g.
115
144
  `tasks/_integration/`), and a task dir holds many other files (`attempts/` is a directory of
@@ -139,6 +168,7 @@ raise because of one. Older solo dirs have `verdict` and not `status`.
139
168
  | `dwarf.log`, `qa.log` | raw logs. The summary stats them and does not read them, so `updated` moves while a model writes |
140
169
  | `changes.diff`, `existing.diff` | the run's change, and the uncommitted changes the repo already had when it started |
141
170
  | `fractal-selection.json` | as for a plan |
171
+ | `retro.md`, `retro/notes.jsonl` | as for a plan; `retro` in the detail is read the same way |
142
172
 
143
173
  **Solo status** is the first word of `status`, otherwise the first word of `verdict`, otherwise
144
174
  `UNKNOWN`.
@@ -175,6 +205,7 @@ def discover(plans=(), roots=(), registry=True, registry_dir=None) -> list[tuple
175
205
  def summarize(path, source='plan') -> dict # a RunSummary, below
176
206
  def detail(path, source='plan') -> dict # a RunDetail, below
177
207
  def task_detail(path, task_id, source='plan') -> dict | None # a TaskDetail
208
+ def group_detail(path, gid, source='plan') -> dict | None # a Group, or None
178
209
  def execution_detail(path, name, source='plan') -> dict | None # an ExecutionDetail
179
210
  def final_review_detail(path, name, source='plan') -> dict | None # a FinalReviewDetail
180
211
  def task_diff(path, task_id, which='current', source='plan') -> dict | None # a DiffDetail
@@ -197,6 +228,7 @@ class Catalog:
197
228
  def get(self, key) -> dict | None # RunDetail for that run_key, or None
198
229
  def identity(self, key) -> dict | None # {root, worktree, branch, source} of that run; None for an unknown key
199
230
  def task(self, key, task_id) -> dict | None
231
+ def group(self, key, gid) -> dict | None # a Group, or None for an unknown gid or a gid that cannot name one
200
232
  def execution(self, key, name) -> dict | None
201
233
  def final_review(self, key, name) -> dict | None
202
234
  def diff(self, key, task_id, which='current'), execution_diff(self, key, name),
@@ -225,7 +257,7 @@ loaded. When it cannot be loaded, `findings_available` is `false` and every find
225
257
  is `null`; verdicts and `gate` do not need it.
226
258
 
227
259
  Text fields are capped so one huge file cannot blow up a response: `request`, `prompt`,
228
- `approach`, `retry_findings`, `needs_input` and the `decision` text keep their first 20,000 characters, and an `infra` `detail` its first 400; `qa_tail`, `dwarf_tail`
260
+ `approach`, `retry_findings`, `needs_input`, the `decision` text, `retro`'s `text`, a summary's `text`, `sentence` and `error` and each source `ref`, a brief question's `text`, `why`, `default`, each option and its `answer`, a parked question's text and a late answer's `text` keep their first 20,000 characters, and an `infra` `detail` its first 400; `qa_tail`, `dwarf_tail`
229
261
  and `verification.log_tail` keep their last 4,000. A capped field ends (or, for tails,
230
262
  starts) with `…` and the value of `truncated` lists the field names that were cut.
231
263
 
@@ -243,6 +275,7 @@ its last 20,000 behind a leading `…`. Their `truncated` lists the field names
243
275
  | `GET /api/runs` | `200 {"runs": [RunSummary, ...]}` |
244
276
  | `GET /api/runs/<key>` | `200 RunDetail`, or `404 {"error": "not found"}` |
245
277
  | `GET /api/runs/<key>/tasks/<id>` | `200 TaskDetail`; `<id>` is percent-decoded (strict UTF-8) and must be a `tasks.tsv` id (`solo` for a solo run). An id that decodes to `/`, NUL, U+FFFD, `.` or `..` is a 404 without a read |
278
+ | `GET /api/runs/<key>/groups/<gid>` | `200 Group`; `<gid>` matches `[a-z0-9][a-z0-9-]{0,39}`. An unknown gid, a gid outside that pattern, or an unknown run is `404 {"error": "not found"}` |
246
279
  | `GET /api/runs/<key>/executions/<role>-<uuid>` | `200 ExecutionDetail` |
247
280
  | `GET /api/runs/<key>/final-reviews/<name>` | `200 FinalReviewDetail`; `<name>` is `final-review-<e>-<p>` or `integrate-<e>-<p>` |
248
281
  | `GET /api/runs/<key>/tasks/<id>/diff[/<which>]` | `200 DiffDetail`; `<which>` is `current` (the default: `changes.diff`), `prev`, `committed` (plan tasks), `existing` (solo) |
@@ -264,16 +297,22 @@ its last 20,000 behind a leading `…`. Their `truncated` lists the field names
264
297
  | `GET /api/health` | `200 {"app": "forge-ui", "version", "build", "pid", "controls": true\|false}`; `version` is forge's own (the root `VERSION` file, read when this server started), `null` when that file cannot be read; `controls` is `false` in read-only mode |
265
298
  | `GET /api/runs/<key>/controls` | `200` the `forge control show --json` object of a plan run (see Controls); `404` for a solo or unknown run |
266
299
  | `POST /api/runs/<key>/controls` | change one control or pin; authenticated, see Controls (write endpoints) |
300
+ | `POST /api/runs/<key>/tasks/<id>/brief/<qid>` | record a brief answer (`forge brief answer … --file - --actor ui`); authenticated, see Controls |
267
301
  | `GET /api/runs/<key>/issues?scope=run\|repo&offline=0\|1&plausible=0\|1&dismissed=0\|1&only=fp,fp` | `200` the `forge issues --json` listing, run fresh on every request (no cache); see Controls (write endpoints) |
268
302
  | `POST /api/runs/<key>/issues` | file GitHub issues for chosen findings; authenticated, 300 s timeout |
269
303
  | `POST /api/runs/<key>/issues/dismiss` | dismiss or (`undo`) restore findings; authenticated |
270
304
  | `POST /api/runs/<key>/delete` | dry-run or delete a run with `forge runs rm`; authenticated, 900 s timeout; later requests for the key answer `404` |
305
+ | `POST /api/runs/<key>/tasks/<id>/answer` | answer a task that waits for input (`forge control retry … --answer-file -`); authenticated, see Controls |
306
+ | `POST /api/worktrees/remove` | remove chosen worktrees (`forge worktrees rm`); authenticated, 900 s timeout |
307
+ | `POST /api/projects/<id>/memories/forget` | forget learnings in a project's checkouts (`forge memory forget`); authenticated |
308
+ | `POST /api/storage/compact` | compact one run or all (`forge runs compact --logs`); authenticated, 900 s timeout |
271
309
  | `GET /api/models/reviewers` | `200` the `forge dataset reviewers --json` report (how each reviewer's PASSed work held up); no parameters |
272
310
  | `GET /api/projects` | `200 {projects: [ProjectRow]}`: one row per repository (see Projects) |
273
311
  | `GET /api/projects/<id>` | `200 Project`, `404` for an unknown id |
274
312
  | `GET /api/projects/<id>/findings[?refresh=1]` | `200 ProjectFindings`: every review's findings with their status |
275
313
  | `GET /api/projects/<id>/memories[?refresh=1]` | `200 ProjectMemories`: what each checkout's memory gives models and every learning's state |
276
314
  | `GET /api/worktrees[?refresh=1]` | `200 Worktrees`: every worktree forge created, with its status and the commands to remove it; cached 60 s (see Worktrees) |
315
+ | `GET /api/storage[?refresh=1]` | `200 Storage`: what forge takes on disk and the commands that take it back, measured in the background; cached 600 s (see Storage) |
277
316
  | `GET /api/config?run=<key>` | `200` the `forge config show --json` of that run's repository root (see Config) |
278
317
  | `POST /api/config` | set or unset one allowed key (`repo.verify`, `repo.setup`, `repo.verify-subset`, `decide.gate.<gate>`, `decide.gate.<gate>.provider`, `decide.gate.<gate>.model`); `jev.enabled` is gone; authenticated |
279
318
  | `GET /api/config/profiles?run=<key>` | `200` every profile of that run's repository, each with its level, shadowed levels, default flag and body (see Profiles) |
@@ -285,15 +324,16 @@ its last 20,000 behind a leading `…`. Their `truncated` lists the field names
285
324
  | `GET /<name>` | that file from `forge_ui/static/` (`.html .js .css .svg` only, no subdirs) |
286
325
  | anything else | `404 {"error": "not found"}` (an unknown path or run); a method a path does not take (PUT, DELETE, OPTIONS, a POST to a read path): `405` with `Allow`, except that a GET to a path that only takes POST (`/api/runs/<key>/delete`, `/api/runs/<key>/issues/dismiss`) answers `404` |
287
326
 
288
- The lazy endpoints answer `404 {"error": "not found"}` for an unknown run, task,
327
+ The lazy endpoints answer `404 {"error": "not found"}` for an unknown run, task, group,
289
328
  execution or review; the diff endpoints also for a `<which>` the run kind has not (`existing`
290
329
  of a plan task, `prev` of a solo run), the diff and transcript endpoints for an execution that is
291
330
  not `qa` or `dwarf`; the
292
331
  Fractal node endpoints for an unknown node or a task whose Fractal state is not `available`. A
293
332
  diff that is not there yet is a `200` with `available: false`. An execution is looked for only where executions are written:
294
333
  `attempts/`, `tasks/<id>/attempts/`, `shadow/<id>/<a>-<k>/attempts/`,
295
- `final-review-*/attempts/` and `integrate-*/final-review/attempts/`, in that order; a dir
296
- that resolves outside the run dir (a symlinked `attempts/`, say) is ignored. The verification
334
+ `final-review-*/attempts/`, `integrate-*/final-review/attempts/` and `groups/<gid>/attempts/`,
335
+ in that order; a dir that resolves outside the run dir (a symlinked `attempts/`, say) is ignored.
336
+ A group's QA dispatch is the last of those, so a task execution of the same id is still found first. The verification
297
337
  log endpoints answer `404` for a solo run, a `<lane>` not matching `[A-Za-z0-9][A-Za-z0-9_-]{0,63}`
298
338
  (so no `..`), a `<k>` or `<n>` that is not a positive decimal without a leading zero, and a log
299
339
  that is missing, a symlink or not a regular file.
@@ -397,6 +437,10 @@ Every RunSummary field, plus:
397
437
  ```json
398
438
  {
399
439
  "request": "the user's request, verbatim",
440
+ "retro": {"text": "# Retro\n…", "notes": 6, "user": 2, "forge": 2, "unsure": 1,
441
+ "verified": 3, "claimed": 3, "blocking": 3},
442
+ "summaries": {"mode": "on", "model": "sol:low"},
443
+ "brief": {"level": "gated", "open": 2, "flagged": 1},
400
444
  "settings": {"explore": 0.5, "shadow_rate": 0.5, "shadow_qa": ["opus", "sol:xhigh"], "timeout": 3600,
401
445
  "max_parallel": 2, "qa_threshold": "P2", "escalate_after": 3, "verify_retries": 1,
402
446
  "final_qa": "opus",
@@ -449,6 +493,22 @@ Every RunSummary field, plus:
449
493
  not a frozen profile (`name` and `level` non-empty strings, `overridden` a list of strings). A solo run
450
494
  reads `$RUN/profile.json` the same way and has no other plan settings: every other value is
451
495
  `null`, including `shadow_qa`, except `qa_threshold` and its source, which read the same way.
496
+ - `retro` is `null` when the run has neither `retro.md` nor `retro/notes.jsonl`; a solo run has the same
497
+ field. Otherwise `text` is `retro.md`, capped like `request` (`null` when that file is missing), and the
498
+ other values count `retro/notes.jsonl`: `notes` is the number of lines that are JSON objects; `user`,
499
+ `forge` and `unsure` count the notes whose `fixable_by` is that value; `verified` and `claimed` those
500
+ whose `check` is that value; `blocking` those whose `blocking` is `true`. A note with any other
501
+ `fixable_by` or `check` counts only in `notes`. A non-blank line that is not a JSON object is skipped,
502
+ with one warning per file (`retro/notes.jsonl: N malformed lines skipped`). `text` is among the texts
503
+ an export leaves out unless it is asked to include them.
504
+ - `summaries` is the run's task-summary switch from its plan files: `mode` is `on` only when `summaries` holds
505
+ `on` (absent, `off` or anything else is `off`), and `model` is the first line of `summaries_model`, or `null`.
506
+ A solo run has `null`. A task's own switch is its `summaries_override` (Task).
507
+ - `brief` is `null` when brief mode is off: the `brief` file is missing, or its first word is not
508
+ `advisory`, `gated` or `strict` (`off` and any other word are off). A solo run's `brief` is always
509
+ `null`. Otherwise `{level, open, flagged}`: `level` is that word; `open` counts task questions whose
510
+ state is `open`; `flagged` counts those that also have `must_answer` true. Parked questions are not
511
+ counted. Each task's own questions are its `brief` (Task).
452
512
  - `attribution` is the result of `forge-parallel.sh attribute` from `attribution.json`, or `null` when
453
513
  the file is missing. `culprit` is the merged task's id or `null`; `base_fails` is `true` only when the
454
514
  base verified FAIL; `inconclusive` is the reason the search stopped without a culprit, or `null`;
@@ -544,6 +604,12 @@ Every RunSummary field, plus:
544
604
  - `waves` comes from `waves.tsv` (index 0 is wave 1); `[]` when it is missing. A solo run's
545
605
  `waves` is `[["solo"]]`.
546
606
  - `tasks` keeps the order of `tasks.tsv`. A solo run has one task, described below.
607
+ - `groups` is present only when `groups.tsv` exists: one Group summary per row, in file order
608
+ (Group, below). Each task then also has `group`, the id of the group that lists it, or `null`
609
+ when it is in none. A task listed in two groups takes the first group in the file. A plan with
610
+ no `groups.tsv` has neither key, on the run or on a task, so that run JSON is unchanged. An
611
+ empty `groups.tsv` still exists: `groups` is `[]` and every task's `group` is `null`. A solo
612
+ run has neither key.
547
613
  - `warnings` names every file or line the reader skipped as malformed. Missing files are
548
614
  not warnings.
549
615
 
@@ -553,6 +619,14 @@ Every RunSummary field, plus:
553
619
  {
554
620
  "id": "reader",
555
621
  "title": "Read plan dirs into plain dicts",
622
+ "header": {"title": "Read plan dirs into plain dicts",
623
+ "goal": "The first paragraph of approach.md, else of prompt.md.",
624
+ "criteria": "The Acceptance criteria section of prompt.md.",
625
+ "links": [{"kind": "issue", "number": 133, "url": "https://github.com/acme/widgets/issues/133", "source": "prompt.md"}]},
626
+ "trail": [{"attempt": 1, "dwarf": "luna", "verdict": "FAIL", "findings": FindingsSummary, "worst": "P1",
627
+ "reason": "first", "executions": ["task-…", "dwarf-…", "qa-…"]},
628
+ {"attempt": 2, "dwarf": "sol", "verdict": "PASS", "findings": FindingsSummary, "worst": null,
629
+ "reason": "review", "executions": ["task-…"]}],
556
630
  "deps": [],
557
631
  "difficulty": "high",
558
632
  "files": ["forge_ui/reader.py", "tests/test_reader.py"],
@@ -603,7 +677,18 @@ Every RunSummary field, plus:
603
677
  "waiting": null,
604
678
  "sweep": null,
605
679
  "swept": [{"id": "S1", "severity": "P2", "confidence": "CONFIRMED", "task": "reader", "location": "ui/reader.py:12",
606
- "summary": "Status is read twice.", "status": "fixed", "note": null, "by": "sweep-1"}]
680
+ "summary": "Status is read twice.", "status": "fixed", "note": null, "by": "sweep-1"}],
681
+ "summary": {"text": "Reads the plan dirs.\n…", "sentence": "Reads plan dirs into plain dicts.", "model": "sol:low",
682
+ "generated_at": 1760621300, "sources": [{"kind": "attempt", "ref": "2"},
683
+ {"kind": "finding", "ref": "1:Missing status file"}],
684
+ "stale": false, "error": null},
685
+ "summaries_override": null,
686
+ "brief": {"questions": [{"id": "q1", "text": "Which module?", "why": "two readers", "options": ["ui", "cli"],
687
+ "default": "ui", "must_answer": true, "possibly_stale": false,
688
+ "state": "open", "answer": null}],
689
+ "parked": [{"id": "q2", "text": "For the whole plan?", "why": "scope", "options": [],
690
+ "default": null, "scope": "plan", "must_answer": false, "possibly_stale": false}],
691
+ "late": [{"id": "q3", "text": "ship it", "actor": "ui", "t": 1760621400.0}]}
607
692
  }
608
693
  ```
609
694
 
@@ -614,6 +699,44 @@ Every RunSummary field, plus:
614
699
  task has a `tasks/<id>/` dir; else `null`.
615
700
  - `attempt`: integer from `tasks/<id>/attempt`, else the highest attempt in `attempts`,
616
701
  else `null`.
702
+ - `header`: `{title, goal, criteria, links}`. `title` is the task's title. `goal` is the first
703
+ paragraph of `approach.md`, or else of `prompt.md`, after a leading `# ` title line, as plain
704
+ text with its whitespace collapsed, capped at 600 characters. Plain text drops code-span
705
+ backticks, `*` and `**` emphasis and `~~strikethrough~~` markers, and keeps the label of a
706
+ `[label](url)` or image; underscores stay, so a file name is unchanged. `null` when neither
707
+ file has one.
708
+ `criteria` is the text of `prompt.md`'s `## Acceptance criteria` section (an optional colon is
709
+ allowed), up to the next `## ` heading or the end of the file, capped like `prompt`; a `### `
710
+ subsection stays inside it, and a fenced `## ` does not end it. `null` when there is no such
711
+ section, or the section is empty. `links` is `[{kind, number, url, source}]`, deduplicated, in
712
+ order of appearance across `prompt.md`, `approach.md` and the run's `request.md`. A full
713
+ `https://github.com/<owner>/<repo>/issues/<n>` or `.../pull/<n>` URL is kind `issue` or `pr`,
714
+ with that number and the canonical URL (query and fragment dropped). Any other
715
+ `https://github.com/...` URL is kind `url`, `number` `null`. A `#N` reference is kind `issue`;
716
+ its url is `https://github.com/<owner>/<repo>/issues/N` for the GitHub origin of the run's
717
+ repo (the `repo` file, then that repo's `.git/config`, SSH or HTTPS, with no network), or
718
+ `null` when that origin is not GitHub. `#N` inside a code span or a fenced block, and a
719
+ markdown heading, are not links. A fence whose marker lines are block-quoted (`> ~~~`) is
720
+ still a fence. A digit run longer than Python will convert does not raise: `#N` is skipped,
721
+ and an issue or pull URL is kept as kind `url`. `source` is the file name. The same link in a
722
+ later file is kept from the first. The export leaves `goal` and `criteria` out unless texts are chosen;
723
+ `links` stay.
724
+ - `trail`: one entry per `attempts.tsv` row, in that order:
725
+ `{attempt, dwarf, verdict, findings, worst, reason, executions}`. `attempt` and `dwarf` come
726
+ from the row (`dwarf` is its 5th column; empty, `-` and `UNASSIGNED` are `null`; a row without
727
+ the column is `null`). `verdict`, `findings` and `worst` come from the newest done non-shadow
728
+ `qa` execution of that attempt (`worst` is that summary's worst severity, `P0`…`P3`, or
729
+ `null`). With no such execution all three are `null` — the task's `qa.last` is not a fallback.
730
+ `findings` is a FindingsSummary. `executions` is the ids of that attempt's executions, in the
731
+ order of `executions`. `reason` is why the attempt ran: `first` for attempt 1; otherwise the
732
+ source recorded in `tasks/<id>/retry_sources.tsv` (`<attempt>`, `<source>`, `<epoch>`), one of
733
+ `review`, `prereview`, `bounce`, `message`, `answer` (the last known source for that attempt;
734
+ an unknown source is warned and skipped); otherwise `escalation` when this row's dwarf differs
735
+ from the previous row's and `escalations` is not empty; otherwise `manual` when a `control.log`
736
+ line queued a `retry` for this task (actor `cli` or `ui`, no `outcome`) and this row is the
737
+ attempt that ends at or after that queue (a scheduler line, which carries `outcome`, does not);
738
+ otherwise `unknown`. A run from before `retry_sources.tsv` existed has `unknown` for every
739
+ later attempt the other rules do not explain.
617
740
  - `infra` in an attempt: `null` for empty, `-` or missing.
618
741
  - `source` in an escalation: the 5th column of `escalations.tsv` (`policy`, `retry` or `pin`, as forge wrote it); `policy` when the row has only 4 columns or the cell is empty.
619
742
  - `verdict`: `"PASS"`, `"FAIL"` or `null`, from `qa.last` as described above.
@@ -682,8 +805,12 @@ Every RunSummary field, plus:
682
805
  not a scheduler runs); else, while `scheduler.live` is true, for a `PENDING` or `INFRA` task:
683
806
  `infra` (a pause in `scheduler.pauses` holds it: scope `all`, or its id in `tasks`; the pause's
684
807
  keys plus `kind`), then for a `PENDING` task `deps` (`on`: its deps not merged, `stopped`: those
685
- in a stopped status such as `FAIL`; a dep at `NEEDS_INPUT` or `NEEDS_DECISION` is in `on` only, as the user
686
- holds it and the retry policy did not stop it), `stopping` (`mode`), `drained`, `overlap` (`on`: running
808
+ in a stopped status such as `FAIL` or `NOCHANGES`; a dep at `NEEDS_INPUT`, `NEEDS_DECISION` or
809
+ `IMPLEMENTED` is in `on` only — the first two wait for the user, `IMPLEMENTED` waits for the group's
810
+ review, and none of them is a stopped dependency), `stopping` (`mode`), `drained`, `brief` (`questions`: a gated
811
+ plan holds it for the ids of its `must_answer` questions with no entry in `brief.answers.json`, or `[]`
812
+ while `brief.json` is not written yet and `brief.pid` names a running process; the same two files
813
+ `forge-schedule.py` reads), `overlap` (`on`: running
687
814
  tasks whose files overlap its own, as forge-schedule.py tells overlap), `slot` (`running`,
688
815
  `max_parallel`: the run is at its capacity) or `next` (nothing holds it).
689
816
  - `sweep`: `null` unless the task is a finding sweep's fix task (it has a `sweep.json`). Then `file`
@@ -692,6 +819,38 @@ Every RunSummary field, plus:
692
819
  `not-fixed`, or `unreported` when it merged without a line for it; read from `sweep.outcome.json`)
693
820
  and `null` until the fix task merged, `note` the review's words on it.
694
821
  - `swept`: this task's findings a fix task took, the same objects plus `by` (the fix task); `[]`.
822
+ - `summary`: `null` unless `tasks/<id>/summary.json` is a JSON object with a string `text` and a number
823
+ `generated_at` (anything else is `null` and warned, as is a file that is not JSON). Then
824
+ `{text, sentence, model, generated_at, sources, stale, error}`: `sentence` and `model` are `null`
825
+ when the file's are not strings; `generated_at` is its epoch seconds; `sources` keeps the entries that are
826
+ `{kind, ref}` with `kind` `attempt` or `finding` and a string `ref`, and drops the others. `stale` is `true`
827
+ when `attempts.tsv`, `status`, `merged` or `qa.last` has a later mtime than `generated_at`, compared in whole
828
+ seconds (a file written in the second `generated_at` was made in is not later). `merged` counts because
829
+ a merge changes the status the page shows. `error` is the text of `tasks/<id>/summary.error`, or `null` when
830
+ the file is missing or blank. A task whose first generation failed has no `summary.json`, so its `summary` is
831
+ `null` and its error is not shown. The export blanks `text` and `error` unless texts are chosen.
832
+ - `summaries_override`: `on` or `off` from `tasks/<id>/summaries`, or `null` when the file is missing or holds
833
+ anything else (the task then follows the run's switch). A solo run's task has `null` for `summary` and
834
+ `summaries_override`.
835
+ - `brief`: `null` when the run's brief is off, on a solo task, or when the task has none of `brief.json`,
836
+ `brief.parked.json` and `brief.late.json`. Otherwise `{questions, parked, late}`.
837
+ `questions` is `brief.json`'s list, in file order. Each is `{id, text, why, options, default, must_answer,
838
+ possibly_stale, state, answer}`. `state` is `answered` when `brief.answers.json` has the id, else `late`
839
+ when `brief.late.json` has it, else `open`. An id in both files is `answered`: the answer given before
840
+ the task started is the one shown. `answer` is that entry's `text`, or `null` when the entry has no
841
+ string `text`. `must_answer` and `possibly_stale` are true only when the file says `true`
842
+ (`possibly_stale` is also true when the whole `brief.json` says so). `options` keeps the entries that
843
+ are strings; `default` is the string, or `null` when the file's value is not one. A question that is
844
+ not an object, or has no string `id`, is skipped, with one warning for the file
845
+ (`tasks/<id>/brief.json: N question(s) skipped`). `parked` is `brief.parked.json`'s questions, the same
846
+ fields except `state` and `answer`, plus `scope` (a string, or `null`). `late` is `brief.late.json` in
847
+ file order, each `{id, text, actor, t}`: `actor` is a string or `null`, and `t` is a finite number or
848
+ `null`. `text`, `why`, `default`, each option, `answer` and a late `text` are capped like `prompt`
849
+ (the cut is named `tasks/<id>/brief/<qid>.text`, and the same way for `why`, `default`, `options`,
850
+ `answer`, `brief.parked/<qid>.*` and `brief.late/<qid>.text`). The export leaves `text`, `why`,
851
+ `options`, `default` and `answer` out unless texts are chosen (`answer` is only on a task question;
852
+ a late answer's private text is its `text`). `id`, `state`, `must_answer`, `possibly_stale`, `scope`,
853
+ `actor` and `t` stay.
695
854
  - Text fields are `null` when the file is missing.
696
855
 
697
856
  A solo run's one task uses this same shape. `id` is `solo` and `title` is the goal, or
@@ -705,7 +864,79 @@ in `attempts.tsv`, or `null`. `escalations`, `route` and `shadow` are empty. `ve
705
864
  false; `accepted_attempt` and `accepted_over` are `null`; `explored` is false; `waiting` and `sweep` are `null`, `swept` is `[]`.
706
865
  `infra` and `decision` are `null`, `lateral`, `ledger` and `decisions` are `[]`, `attempt_cap` is `null`, and `attempts_total`
707
866
  counts the run dir's `attempts.tsv` rows that are not `INFRA`. `request` on
708
- the detail is `request.md`.
867
+ the detail is `request.md`. `header` and `trail` follow the same rules. `prompt.md`, `approach.md`
868
+ and `retry_sources.tsv` are read from the run directory (next to `attempts.tsv`); `escalations` is
869
+ empty, so a later attempt whose dwarf changed is `unknown` unless a retry source or a queued retry
870
+ explains it. `goal` and `criteria` are capped as `tasks/solo/goal` and `tasks/solo/criteria`.
871
+
872
+ ## Group
873
+
874
+ `GET /api/runs/<key>/groups/<gid>` returns one group. `<gid>` matches
875
+ `[a-z0-9][a-z0-9-]{0,39}`. An unknown gid, a gid outside that pattern, or an unknown run is
876
+ `404 {"error": "not found"}`. A plan with no such group, including a solo run, is the same 404.
877
+
878
+ RunDetail `groups` (only when `groups.tsv` exists) lists the summary, in file order. A
879
+ `review=task` summary is identity and goal only. A `review=group` summary also carries the
880
+ review state. `-` in a cell is `null`. `members` is a list of task ids, or `null` for `-` or an
881
+ empty cell.
882
+
883
+ ```json
884
+ {"id": "ship", "review": "group", "qa": "opus", "members": ["reader", "page"],
885
+ "title": "Ship the reader", "goal": "Land it together",
886
+ "status": "PASS", "round": 2, "merged": true, "implicated": null, "decision": "Accepted",
887
+ "rounds": [{"round": 1, "epoch": 1760601000.0, "status": "FAIL", "implicated": ["reader"], "reviewer": "opus"},
888
+ {"round": 2, "epoch": 1760602000.0, "status": "PASS", "implicated": null, "reviewer": "opus"}]}
889
+ ```
890
+
891
+ - `status` is the first word of `groups/<gid>/status`, or `null` when that file is missing. `round`
892
+ is the integer in `round`, or `null`. `merged` is whether `merged` exists.
893
+ - `rounds` comes from `rounds.tsv`. `implicated` on the summary is the last parsed round's
894
+ `implicated` (`null` for `-`, or when there is no round). `decision` is the first line of
895
+ `decision.md`, or `null`. A row with a round or epoch that does not parse is warned and skipped.
896
+ - A `review` other than `task` or `group` is warned and the row is still returned, without the
897
+ review-state fields. `review` of `-` is `null` and warned the same way. A bad id and a repeated id are warned and skipped; the first copy wins.
898
+ Missing files are `null` or `[]` or `false`, not warnings. Nothing in a malformed file raises.
899
+
900
+ The group endpoint returns that summary plus the review itself:
901
+
902
+ ```json
903
+ {"attribution": {"round": 2, "findings": [
904
+ {"n": 1, "severity": "P1", "status": "CONFIRMED", "file": "ui/reader.py", "line": 42,
905
+ "tasks": ["reader"], "blocking": true, "ambiguous": false}],
906
+ "implicated": ["reader"], "ambiguous": [1], "blocking": true},
907
+ "members_by_round": [{"round": 1, "members": [
908
+ {"task": "reader", "commit": "abc123", "attempt": 1}]}],
909
+ "qa_last": "FORGE_VERDICT: PASS\n", "known_issues": null,
910
+ "candidate": {"base": "aaaaaaaa", "commit": "bbbbbbbb"},
911
+ "execution": {"id": "qa-…", "role": "qa", "state": "done"},
912
+ "warnings": [], "truncated": []}
913
+ ```
914
+
915
+ - `attribution` is `attribution.json`, or `null` when the file is missing or its `findings` is not
916
+ a list (warned: `not an attribution`). Each finding keeps `n`, `severity`, `status`, `file`,
917
+ `line`, `tasks`, `blocking` and `ambiguous`. A finding that is not an object is skipped. A value
918
+ of the wrong type is warned and replaced (`n` falls back to its 1-based index, `line` to `null`,
919
+ `tasks` to `[]`, the flags to `false`). `implicated` is a list of ids and `ambiguous` a list of
920
+ finding numbers, `[]` when absent or the wrong type. Top-level `blocking` is kept only when it
921
+ is a boolean.
922
+ - `members_by_round` groups `members.tsv` by round, in file order. `-` for `commit` or `attempt`
923
+ is `null`. A row with no round or no task is warned and skipped; an attempt that is not an
924
+ integer is warned and kept as `null`.
925
+ - `qa_last` and `known_issues` use the bounded reader TaskDetail's texts and a final review's
926
+ `qa.last` use: the first 20,000 and last 8,000 characters, the cut named in `truncated`
927
+ (`qa_last`, `known_issues`). A missing file is `null`.
928
+ - `candidate` is the first line of `candidate.base` and `candidate.commit`, with `-` as `null`.
929
+ - `execution` is the group's QA dispatch: the newest `qa` execution in
930
+ `groups/<gid>/attempts/`, built by the same reader a task's QA dispatch uses, or `null` when
931
+ there is none. It is `running` only while `groups/<gid>/status` is `REVIEWING`; any other
932
+ unfinished dispatch is `orphaned`. The execution and transcript endpoints open it with
933
+ `owner` `{"kind": "group", "id": "<gid>"}`, and while it runs they read the group dir's
934
+ `qa.delivered`, `qa.prompt` and `qa.input` the way a task's owner dir is read.
935
+ - `warnings` and `truncated` are that read's. A warning is kept when its file is under
936
+ `groups/<gid>/` (this group's rounds, members, attribution and review dispatch). A malformed
937
+ `groups.tsv` row, and another group's files, are warnings of the run read, not of this group.
938
+ `truncated` names the texts this read cut (`qa_last`, `known_issues`). A `review=task` group
939
+ has the same detail fields; with no review dir they are `null` or `[]`, and `warnings` is `[]`.
709
940
 
710
941
  ## Execution
711
942
 
@@ -731,8 +962,8 @@ the detail is `request.md`.
731
962
  and it is the newest execution of its role in its dir, else `orphaned`. The owner is live
732
963
  when: the task's status is `RUNNING` (task executions and their children); the solo
733
964
  status is `RUNNING`; a shadow has no `shadow.status`; a final review's `state` is
734
- `running`; always, for the run's own `parallel` and `verification`. A `dwarf` or `qa`
735
- whose parent is not `running` is `orphaned`.
965
+ `running`; a group's `status` is `REVIEWING` (its QA dispatch); always, for the run's own
966
+ `parallel` and `verification`. A `dwarf` or `qa` whose parent is not `running` is `orphaned`.
736
967
  - `parent`: for `dwarf` and `qa`, the `task` (or `solo`) execution `dataset.json` names, else
737
968
  the latest one whose run (`started` to `ended`, open while unfinished) contains this
738
969
  start, else `null`. `task`, `solo`, `parallel` and `verification` have no parent.
@@ -853,8 +1084,8 @@ ExecutionDetail: the Execution, plus `resolved` (every `key=value` of `<role>.re
853
1084
  `<role>.prompt` copy; while running without one, the owner dir's `<role>.delivered`, then
854
1085
  `.prompt`, then `.input`), `last` (the `<role>.last` copy), `findings` (a list of Findings for
855
1086
  a finished `qa`, else `null`, in place of the summary), `owner`
856
- (`{"kind": "task" | "shadow" | "final_review" | "run", "id": ...}`: the task id (`solo` for a
857
- solo run), `<task>/<attempt>-<k>`, the review name, or `null`), `truncated` and `warnings`.
1087
+ (`{"kind": "task" | "shadow" | "final_review" | "run" | "group", "id": ...}`: the task id (`solo` for a
1088
+ solo run), `<task>/<attempt>-<k>`, the review name, the group id, or `null`), `truncated` and `warnings`.
858
1089
 
859
1090
  FinalReviewDetail: the FinalReviewSummary, plus `meta` (every `review.meta` key),
860
1091
  `tasks_summary`, `qa_input`, `qa_last`, `known_issues` (texts or `null`), `findings` (a list
@@ -1275,24 +1506,30 @@ difficulty paths deps model` each), `decomposition_history` (its newest 20, each
1275
1506
 
1276
1507
  - It holds `style.css` (with the labels' face, `D-DINCondensed-Bold.woff2`, inlined as a `data:`
1277
1508
  URL) and the classic scripts the run view uses (`theme.js icons.js datatable.js shell.js
1278
- runmodel.js cloudmodel.js graph.js gantt.js verifyview.js checksview.js panel.js diffview.js convo.js files.js
1279
- map3d.js search.js app.js`), inline; the import map; a `<script type="application/json" id="forge-snapshot">` with
1509
+ runmodel.js cloudmodel.js graph.js gantt.js verifyview.js checksview.js briefview.js groupsview.js
1510
+ panel.js diffview.js convo.js files.js map3d.js search.js app.js`), inline; the import map; a `<script type="application/json" id="forge-snapshot">` with
1280
1511
  `{meta, api}`; and a `<script type="text/plain" id="forge-stage">` holding `iso.js`,
1281
1512
  `cloud3d.js`, `findings3d.js`, `stagectl.js` and `scene3d.js` bundled into one module (each
1282
1513
  module in its own scope, relative imports bound to the earlier ones' exports, `createStage`
1283
1514
  exported), which `map3d.js` imports from a `blob:` URL.
1284
1515
  - `api` maps each path the page requests to that endpoint's response as the server would answer
1285
1516
  it (server.api_get): `/api/runs` (this run only), the RunDetail, every TaskDetail, every
1286
- ExecutionDetail the RunDetail names, every FinalReviewDetail, Files, RunFindings, and the
1287
- Fractal trees and nodes. With `texts=1` also every diff the page can open (each task's diff and its `sources`,
1517
+ Group detail, every ExecutionDetail the RunDetail or a Group names, every FinalReviewDetail, Files, RunFindings, and the
1518
+ Fractal trees and nodes. A script named above whose file is not in `forge_ui/static/` yet is left out,
1519
+ so `groupsview.js` can be listed before the group page adds it. With `texts=1` also every diff the page can open (each task's diff and its `sources`,
1288
1520
  each final review's, each Fractal node's), every `dwarf` and `qa` ExecutionTranscript (at most 2 MB each)
1289
1521
  and ExecutionChecks, every TaskChecks, the RunEnvironment,
1290
1522
  and the VerificationLog tail of `verification.log`, of each lane's log and of each lane run's log
1291
1523
  (under their tail paths; line ranges are not stored, so the page shows the tail).
1292
1524
  - `texts=0` (the default) nulls these keys wherever they hold a string, list or object: `prompt
1293
1525
  last request log_tail dwarf_tail qa_tail qa_last qa_input tasks_summary known_issues texts text
1294
- planning_last approach retry_findings needs_input dwarf_input error last_line message excerpt tail lines call split detail`,
1295
- and stores no diff, no transcript, no checks and no environment problems (a command is a text). A finding keeps its `summary`, a failing test its `name`.
1526
+ planning_last approach retry_findings needs_input dwarf_input error last_line message excerpt tail lines call split detail`.
1527
+ Under each brief `questions` or `parked` entry it also nulls `why`, `options`, `default` and `answer`
1528
+ (`scope`, `state`, `id`, `must_answer` and `possibly_stale` stay; a late answer's `text` is in the list above).
1529
+ Under each group, on RunDetail `groups` and on `GET …/groups/<gid>`, it nulls `goal` and `decision`
1530
+ (the planner's line and the first line of `decision.md`). The run's own `goal` stays, and so does a
1531
+ group's `title`. A task's `decision` object stays, with its `text` nulled by the list above.
1532
+ It stores no diff, no transcript, no checks and no environment problems (a command is a text). A finding keeps its `summary`, a failing test its `name`.
1296
1533
  - `paths=0` (the default) makes every string that is a whole absolute path (but `/api/…`, `url`s
1297
1534
  and `command`s) its last component, and replaces the run dir, the repo and the home dir inside other
1298
1535
  strings with their last component (`~` for home).
@@ -1317,16 +1554,17 @@ dir, a repo or config; a write route builds an argv, runs it, and answers with w
1317
1554
  validation, the call and the exit-code mapping; `server.py` does the authentication and gives
1318
1555
  each authenticated POST to the table, so a new write route is one entry in it.
1319
1556
 
1320
- **The call.** `[<forge root>/forge, ...]`, an argv list with no shell, `stdin` closed, in a process
1321
- group of its own. `<forge root>` is two directories above `forge_ui/` and can be replaced as
1557
+ **The call.** `[<forge root>/forge, ...]`, an argv list with no shell, in a process
1558
+ group of its own. `stdin` is closed, except for a profile create or edit (the profile object) and a
1559
+ brief answer (the answer text), both via `--file -`, and a task answer (its text, via `--answer-file -`). `<forge root>` is two directories above `forge_ui/` and can be replaced as
1322
1560
  `forge_ui.server.forge_cli`. A call that outlives its timeout (60 s) gets SIGTERM for its whole
1323
1561
  group, SIGKILL 5 s later if anything is left, and is reaped, all before the run's lock is
1324
1562
  released; the answer is `504 {"error": "timeout", "detail": "the operation may have partly
1325
1563
  completed; reload to see the current state"}`.
1326
1564
 
1327
- **Runs are named by key.** The path holds the 12-hex run key and nothing else; the server finds
1328
- the run dir with `Catalog.locate(key)`. A body field never names a path, and a field the route does
1329
- not know is a `400`.
1565
+ **Runs are named by key.** The path holds the 12-hex run key; the server finds
1566
+ the run dir with `Catalog.locate(key)`. A brief answer's path also names the task id and the question
1567
+ id. A body field never names a path, and a field the route does not know is a `400`.
1330
1568
 
1331
1569
  **Authentication.** Each server process makes a random token (`secrets.token_urlsafe(32)`). `GET /`
1332
1570
  (and `/index.html`) carries it as `<meta name="forge-ui-token" content="...">` as the first element
@@ -1398,6 +1636,10 @@ object its stdout holds, when that parses as one.
1398
1636
  | anything else, a signal, a missing CLI, or a 0 with no JSON object | `502` | `bad gateway` |
1399
1637
  | timeout | `504` | `timeout` |
1400
1638
 
1639
+ A brief answer is the exception to the exit-0 row: its CLI prints text, and exit 0 (including a late
1640
+ answer's notice) is `200 {"exit": 0, "output": "<stdout>"}` rather than `502` for a missing JSON object.
1641
+ A non-zero exit uses the row above and also carries `exit` and `output`.
1642
+
1401
1643
  For the controls routes, unknown run keys, solo runs (they have no controls) and runs the
1402
1644
  catalog does not hold are `404 {"error": "not found"}`. The issues, dismiss, delete, config and
1403
1645
  profile routes below accept plan and solo runs alike (`forge issues` and `forge runs rm` take both);
@@ -1429,6 +1671,8 @@ known or a spec runs is for the CLI to say (its `400` or `409` comes back as abo
1429
1671
  |---|---|
1430
1672
  | `{"action": "set", "key": "qa-threshold", "value": "P2"}` (`default` at run level removes the setting, `none` is P3; for a task `inherit` drops the override) | `control set <dir> qa-threshold P2 --actor ui --json` |
1431
1673
  | `{"action": "set", "key": "retry-budget", "value": "inherit", "task": "reader"}` | `control set <dir> retry-budget inherit --task reader --actor ui --json` |
1674
+ | `{"action": "set", "key": "summaries", "value": "on"}` (or `off`) | `control set <dir> summaries on --actor ui --json` |
1675
+ | `{"action": "set", "key": "summaries", "value": "inherit", "task": "reader"}` (`on` or `off` with `task` too) | `control set <dir> summaries inherit --task reader --actor ui --json` |
1432
1676
  | `{"action": "pin", "task": "graph", "spec": "sol:high:codex"}` | `control pin <dir> graph sol:high:codex --actor ui --json` |
1433
1677
  | `{"action": "unpin", "task": "graph"}` | `control unpin <dir> graph --actor ui --json` |
1434
1678
  | `{"action": "drain"}` | `control drain <dir> --actor ui --json` |
@@ -1440,7 +1684,8 @@ known or a spec runs is for the CLI to say (its `400` or `409` comes back as abo
1440
1684
 
1441
1685
  `value` is always a string. `task` is optional on `set`, and only for the keys the CLI allows it
1442
1686
  for; the page sets `max-parallel`, `infra-backoff` (`none` drops it) and `escalate-effort`
1443
- (`on`/`off`) plan-wide. `now` is a boolean. `add` is not exposed: a row is added to `tasks.tsv` by
1687
+ (`on`/`off`) plan-wide. `summaries` takes `on` or `off`, for the run or with a `task`, and `inherit` only with a `task`; `on`
1688
+ for a finished run makes the CLI start `forge summarize` (detached), which the route does not wait for. `now` is a boolean. `add` is not exposed: a row is added to `tasks.tsv` by
1444
1689
  hand, so its CLI is the place to queue it. A success is
1445
1690
  `200 {"ok": true, "changed": {...}, "applies": "...", "controls": {...}}`, where `controls` is the
1446
1691
  `GET` object after the change; `drain`, `resume` and `stop` answer the same way and are refused
@@ -1448,6 +1693,25 @@ hand, so its CLI is the place to queue it. A success is
1448
1693
  Its refusals before queueing (not live, a MERGED task, a spec that fails doctor) are the CLI's
1449
1694
  `409`/`400`; the scheduler applies or refuses it later, in the `log` line with that `request` id.
1450
1695
 
1696
+ ### `POST /api/runs/<key>/tasks/<id>/brief/<qid>`
1697
+
1698
+ Record one answer to a brief question. Body: `{"answer": "<text>"}`. `<id>` matches
1699
+ `^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$` (a task id safe to pass as one argv). `<qid>` must match
1700
+ `^q[0-9]+$`; a path whose question segment does not is `400`, and the CLI is not called. `answer` is a
1701
+ string of 1 to 4096 characters with no NUL. A value that cannot be encoded as UTF-8 is refused too.
1702
+ Any other field, a missing or empty answer, or one longer than 4096 characters is
1703
+ `400 {"error": "invalid", "detail": ...}` before the CLI runs.
1704
+
1705
+ Runs `brief answer <plan dir> <id> <qid> --file - --actor ui`, with the answer as UTF-8 on stdin.
1706
+ Under the run's write lock (`409 {"error": "busy"}`). A solo run or an unknown key is `404`.
1707
+ Timeout 60 s. Read-only mode refuses it with every other write (`405`).
1708
+
1709
+ The CLI prints text and exits 0, including when the answer is late (the task had already started):
1710
+ that prints a notice and still exits 0, so the page can show it. The success body is
1711
+ `200 {"exit": 0, "output": "<stdout>"}`. A non-zero exit uses the mapping above (`2` is `400`
1712
+ `invalid`, `3` is `409` `refused`) and the body also has `exit` (the CLI's code) and `output`
1713
+ (stdout). `detail` is stderr, as for every other write.
1714
+
1451
1715
  ### `GET /api/runs/<key>/issues`
1452
1716
 
1453
1717
  `forge issues <dir> --json [flags]`: the findings the run left open. Query (all optional, an
@@ -1484,6 +1748,51 @@ deletion) `500`. Deletion holds the run's write lock and a server-wide lock on t
1484
1748
  directory (`409 busy` when either is held). The run key is looked up again under the lock, and
1485
1749
  once the directory is gone every later request for that key is `404`. Timeout 900 s.
1486
1750
 
1751
+ ### `POST /api/worktrees/remove`
1752
+
1753
+ Body: `{"paths": [string, 1 to 200], "branches": bool (false), "dry_run": bool (false)}`. Every path
1754
+ is absolute, has no control characters and is a row of `GET /api/worktrees`: the cached rows are
1755
+ checked and, when a path is missing, read once again. A path that is not listed is `400`. Runs
1756
+ `worktrees rm <paths…> [--branches] [--dry-run] --json --actor ui` and answers with its object
1757
+ (`ok`, `dry_run`, `rows: [{path, action, status, reason}]`, status `removed`, `skipped`, `failed` or
1758
+ `would-remove`). Exit 4 (a row failed) is a `200` with `ok: false` and the rows, so the page can say
1759
+ which row failed; exit 2 `400`, exit 3 `409`. A server-wide lock (`409 {"error": "busy"}`) covers
1760
+ the call; timeout 900 s. After a real removal (not `dry_run`) the worktrees and storage caches are
1761
+ dropped, so the next `GET` reads again. Refused under `--read-only` (`405`) and without the token.
1762
+
1763
+ ### `POST /api/projects/<id>/memories/forget`
1764
+
1765
+ Body: `{"keys": [string "category:key", 1 to 200], "dry_run": bool (false), "path": string}`. The
1766
+ project is `<id>` of `GET /api/projects` (`404` when unknown). Without `path` the call runs in every
1767
+ checkout of the project that exists; `path` must be one of them (`400` otherwise). Runs `memory
1768
+ forget <checkout> <keys…> [--dry-run] --json --actor ui` once per checkout and answers `200
1769
+ {"ok", "dry_run", "checkouts": [{"path", "result"}]}`, `result` being that CLI's object. A checkout
1770
+ whose call failed has `result: null` plus `status` and `error` (the mapped answer), and `ok` is
1771
+ false; when every checkout failed the first failure is the answer. A project with no existing
1772
+ checkout is `409`. A server-wide lock (`409 busy`); timeout 60 s per checkout. A real forget drops
1773
+ the project screen's memory answers. Refused under `--read-only` and without the token.
1774
+
1775
+ ### `POST /api/storage/compact`
1776
+
1777
+ Body: `{"run": "<12-hex run key>"}` or `{"all": true}` (exactly one), and `"dry_run": bool (false)`.
1778
+ Runs `runs compact <run dir> --logs --json [--dry-run]`, or `runs compact --all --logs --json
1779
+ [--dry-run]`, and answers with its object (`ok`, `dry_run`, `bytes_freed`, `runs`). An unknown run
1780
+ key is `404`. Exit 2 `400`; exit 3 (the named run is active) `409` with the CLI's message; exit 4
1781
+ `500`. A server-wide lock (`409 {"error": "busy"}`); timeout 900 s. A real compaction marks the
1782
+ `GET /api/storage` answer stale, so the next read measures again. Refused under `--read-only` and
1783
+ without the token.
1784
+
1785
+ ### `POST /api/runs/<key>/tasks/<id>/answer`
1786
+
1787
+ Body: `{"text": string}`, 1 to 8000 characters after stripping, no NUL; `<id>` is a task id as for
1788
+ the brief route. The run must be a plan (`404` otherwise). Always runs `control retry <plan> <id>
1789
+ --answer-file - --actor ui --json` with the stripped text on stdin: forge queues the answer for a
1790
+ live scheduler and prepares the retry itself when none runs. The answer is `200 {"live": bool,
1791
+ "result": <the CLI's object>}`, where `live` says whether `scheduler.live` named a live process (as
1792
+ RunDetail's `scheduler.live`) and `result` is `{"queued": true, "request"}` or `{"queued": false,
1793
+ "prepared": true}`. Exit 3 (the task is not `NEEDS_INPUT`) is `409` with the CLI's message. Holds
1794
+ the run's write lock (`409 busy`); timeout 60 s. Refused under `--read-only` and without the token.
1795
+
1487
1796
  ### `GET /api/models/reviewers`
1488
1797
 
1489
1798
  Runs `dataset reviewers --json` and answers with its object: `horizon_days`, `min_landed`,
@@ -1532,7 +1841,11 @@ it lists, and the repositories `forge dataset worktrees --json` names), `git sta
1532
1841
  worktree on disk, one `git show` per repository for the last commits and one `for-each-ref --merged
1533
1842
  HEAD` for merged branches; it lists the folders under each `.forge-worktrees` that no repository
1534
1843
  lists, and adds the dataset's history through `dataset worktrees --json`. Who owns a worktree is
1535
- forge's rule (`scripts/forge_worktrees.py`, the one `forge runs rm` uses). The answer is cached
1844
+ forge's rule (`scripts/forge_worktrees.py`, the one `forge runs rm` uses), given the task ids of the run
1845
+ plus the worktree's own folder name when its branch is `forge/<run id>/<that name>`. Every worktree folder
1846
+ under the `.forge-worktrees` folders it knows is asked too (`git -C <worktree> worktree list`), so a
1847
+ repository is listed even when every checkout the dataset names is gone; a repository git cannot list is
1848
+ named in `notes`. The answer is cached
1536
1849
  for 60 s per server; `refresh=1` reads everything again, any other parameter is a `400`. Sizes are
1537
1850
  walked in a background thread and are `null` until measured (`sizes_pending` counts the rest).
1538
1851
 
@@ -1548,17 +1861,41 @@ Row = {
1548
1861
  attribute | null), status, merged (branch merged into the repository's HEAD; null unknown),
1549
1862
  head, commit: {sha, time, subject} | null, created, removed (unix times or null), derived
1550
1863
  (true: from a run dir or the dataset, no dates), locked (git's reason, '' for none, null when
1551
- not locked), size (bytes or null), note, commands: [{label, command}]
1864
+ not locked), size (bytes or null), note, commands: [{label, command}], leftover (unknown rows only)
1552
1865
  }
1553
1866
  ```
1554
1867
 
1555
1868
  `status` is one of `in_use`, `dirty`, `locked`, `needed`, `failed`, `finished`, `missing`,
1556
- `foreign`, `unknown`, `removed`. Commands: `dirty` gets `git -C <path> status`; `failed` gets
1869
+ `foreign`, `unknown`, `removed`. A row on disk is never `removed`. Commands: `unknown` with `leftover` (no `.git`,
1870
+ or a `.git` file whose gitdir is gone) gets `rm -rf -- <path>`; `dirty` gets `git -C <path> status`; `failed` gets
1557
1871
  `git -C <repo> worktree remove <path>`; `finished` gets the same plus `git -C <repo> branch -d
1558
1872
  <branch>` when the branch is merged; `missing` gets `git -C <repo> worktree prune`; every other
1559
1873
  status gets none. Paths are quoted for the shell and no command has `--force`. `runs[].command` is
1560
1874
  `forge runs rm <run-dir> --worktrees --branches --dry-run`, null while the run is active.
1561
1875
 
1876
+ ### `GET /api/storage`
1877
+
1878
+ The Disk screen (`forge_ui/storage.py`). Read-only, so it answers in `--read-only` mode too, and it runs
1879
+ no forge command. It loads `scripts/forge_storage.py` read-only and calls its `report` for every
1880
+ registered run (the same as `forge du --all`, without writing its footprint file). The first ask starts
1881
+ one measurement in a background thread and answers `measuring`; the result is kept for 600 s per server,
1882
+ and `refresh=1` measures again (one measurement at a time). Any other parameter is a `400`.
1883
+
1884
+ ```
1885
+ Storage = {state: measuring | ready | error | unavailable, error, started, progress: {done, of} | null,
1886
+ data: Report | null (the last measurement, kept while the next one runs)}
1887
+ Report = {repo: null, computed, complete, totals: {runs, worktrees, data_home, reclaimable, snapshots, logs, strays},
1888
+ runs: [{path, run_id, repo, updated, total, snapshots, snapshot_count, logs, gz, compressible, strays,
1889
+ fractal, other, reclaimable, complete, key: forge-ui run key | null (not in the run list), commands: [{label, command}]}],
1890
+ strays: [{path, bytes, kind: dependencies | git, run}], worktrees: [{repo, run_id, path, bytes, complete}],
1891
+ data_home: {path, bytes, parts: {dataset, blobs, archive, exports, legacy, storage, other}} | null,
1892
+ commands: [{label, command, bytes?}]}
1893
+ ```
1894
+
1895
+ Sizes are disk usage in bytes. `reclaimable` is the snapshots plus an estimate for gzipping the log copies.
1896
+ A run's commands are `forge runs compact <run-dir> --logs` (when something can go) and `forge runs rm
1897
+ <run-dir> --dry-run`; the report's are `forge runs compact --all --logs` and `forge du --all`.
1898
+
1562
1899
  ### `GET /api/config?run=<key>` and `POST /api/config`
1563
1900
 
1564
1901
  The repository is the run's `repo_root` (see RunSummary) when that is an existing absolute directory,
@@ -1632,7 +1969,8 @@ set to `{"ok": false, "error"}` when the CLI printed one.
1632
1969
 
1633
1970
  A `body` is written to the CLI's stdin as JSON (`--file -`). That text is refused at 64 KiB
1634
1971
  with `400`; the HTTP body is already capped at 64 KiB (`413`) by the server, and a re-encode
1635
- can be the larger of the two. This is the one write that passes stdin. Checked before any CLI
1972
+ can be the larger of the two. A brief answer is the other write that passes stdin (the answer text,
1973
+ not a JSON object). Checked before any CLI
1636
1974
  runs, and a failure there calls nothing: `action` is one of the six; `name` and `from` match
1637
1975
  `^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$`; `key` matches `^(routing|policy)\.[a-z_.]+$` (the CLI still
1638
1976
  rejects a key of that shape that is not a real profile key); `value` is a string with no
@@ -1661,6 +1999,10 @@ Suggested meaning: merged and pass green, running blue, pending grey, fail, erro
1661
1999
  red, infra and timeout orange, blocked, interrupted, invalidated, unknown and nochanges muted
1662
2000
  purple. `NEEDS_DECISION` takes the same waiting colour as `NEEDS_INPUT` (`--lamp-wait`, the
1663
2001
  `st-needs_input` class in `style.css`): a task that waits for the user is neither done nor failed.
2002
+ `IMPLEMENTED` is the same kind of waiting status: the member's work is in and it is awaiting the
2003
+ group's review. `reader.status_class` returns `waiting` for it, and a task that depends on one
2004
+ lists it in `waiting.on` and not in `waiting.stopped`. The page paints it with
2005
+ `st-implemented`, the same waiting colour; until that class exists the stage falls back to `#888`.
1664
2006
 
1665
2007
  ## The graph (`forge_ui/static/graph.js`)
1666
2008
 
@@ -1690,9 +2032,11 @@ Plain scripts unless noted; each defines one global and none parses API text as
1690
2032
  |---|---|---|
1691
2033
  | `runmodel.js` | `ForgeRunModel` | pure data, no DOM: the plate layout (archivision's `plate()`), the atlas, plan and execution models, forge-schedule's rules projected forward, the critical path, concurrency, the state of every node at a time `t` (replay, verification lanes included), the finish node's verification LEDs (`verifyLeds`: one per lane in lanes mode, else one per run), filters. Also a CommonJS module, for `node --test` |
1692
2034
  | `gantt.js` | `ForgeGantt` | `render(container, run, {now, onSelect, sel, replay, critical, ghosts})`: attempts on wall-clock time in lanes; `strip(container, run, {now, replay})`: busy attempts and model calls against `max_parallel`. Under the attempts, the finish rows: `verify` (single-command verifications; the newest split into its runs back to back from its start, dashed because that placement is approximate), a `verify · <lane>` row per lane of a lanes verification (each run and rerun at its own time; a run with no exit is UNKNOWN once it ended, never FAIL) and `final review`. A lane or run item opens the verification inspector |
1693
- | `panel.js` | `ForgePanel` | `render(host, ctx)`: the inspector for a run, task, execution, final review, verification, integration or Fractal node; fetches the lazy endpoints once per node; `ctx.diffHash(spec)` links into the diff viewer, `ctx.onFractal(task, TaskFractal)` hands a task's tree to the stage |
2035
+ | `panel.js` | `ForgePanel` | `render(host, ctx)`: the inspector for a run, task, execution, final review, verification, integration or Fractal node; for a task it opens on its `header` (its Prompt, Approach and Acceptance criteria texts, from the lazy detail once loaded), then its `trail`, its `summary` with the `summaries_override` switch, and `ForgeBrief`'s questions; fetches the lazy endpoints once per node; `ctx.diffHash(spec)` links into the diff viewer, `ctx.onFractal(task, TaskFractal)` hands a task's tree to the stage |
1694
2036
  | `verifyview.js` | `ForgeVerify` | `render(host, {run, now, fetchJSON, rerender})`: the verification inspector panel.js delegates to: while it runs, the elapsed time, step, last line and a flag past 5 minutes without output, and a live tail of the followed lane's log (or the single log) read again each poll; when it failed, the failing tests first, grouped by lane with new or known, each opening its lane's log at its line (in an export, the tail); a lanes table (state, time, reruns, counts). Pure helpers (`model`, `laneRow`, `groupFailing`, `idleWarning`, `openStep`, `tailLane`, `logPath`, `linesPath`, `tailLines`) are a CommonJS module too |
1695
2037
  | `checksview.js` | `ForgeChecks` | where each task stands and the checks its agents ran: `cell(task, now, ctx)` (the task table's Now column: the running call and for how long, a `quiet N min` flag past 5 minutes without output, or why it waits), `nowSection`, `execSection` and the attempts' checks and acceptance-criteria lines (`taskChecks`, `underExecution`, `attemptCriteria`) for panel.js, `schedulerFields` (the run inspector), `banner(head, ctx)` (the run header: environment problems more than one task met, read again at most every 15 s while tasks run) and `tick(root, now)`, which app.js calls each refresh to move `data-since`, `data-until` and `data-quiet` times. Pure helpers (`nowModel`, `waitingModel`, `nowRank`, `checkRow`, `countsText`, `coverageModel`, `bannerProblems`, `schedulerModel`, `quietText`, `untilText`) are a CommonJS module too |
2038
+ | `controls.js` | `ForgeControls` | the run and task control panels that panel.js mounts (`mountRun`, `mountTask`) and the pure model under them: what each key is called and where it applies (`KEYS`), `prepare` (a draft's request body and confirm text), `bodyFor`, `savedText` and `agoText`. Every change goes through `ForgeUI` (uikit.js) to `POST /api/runs/<key>/controls`. Also a CommonJS module |
2039
+ | `briefview.js` | `ForgeBrief` | a task's brief questions in the inspector (`taskSection(host, ctx, task)`: each question with its flags and answer, the parked ones in a collapsed *Parked (wider scope)*, and an answer box per question where the page can write, which posts to `POST …/brief/<qid>`), and the run's open questions above the task table (`renderList(host, {run, projections, now, href})`, flagged first, then by projected start). Pure helpers (`openQuestions`, `orderQuestions`, `startLine`) are a CommonJS module too |
1696
2040
  | `diffview.js` | `ForgeDiff` | `render(host, {run, spec, fetchJSON, rerender, href, closeHref})`: a DiffDetail with its findings under their lines; `spec` is `{kind: task, task, source, file}`, `{kind: final, name, file}` or `{kind: fractal, task, node, file}` |
1697
2041
  | `convo.js` | `ForgeConvo` | `render(host, {run, spec: {task, exec}, brief, live, fetchJSON, rerender, diffHash, closeHref, focus})`: an ExecutionTranscript as a timeline, with search, the errors and, while the execution runs, a read of its log every 2.5 s; `focus` (an event index) opens it at that event once and stops following the end |
1698
2042
  | `files.js` | `ForgeFiles` | `matrix(data, run, opts)` (pure: Files as rows of dirs and files against task columns by wave) and `render(host, data, {run, sel, onSelectTask, diffHref, prefs, savePrefs})`: the run's Files mode. Also a CommonJS module |