@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/ui/docs/api.md CHANGED
@@ -55,6 +55,18 @@ written), and the reader must never raise because of one.
55
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 |
56
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 |
57
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 |
58
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 |
59
71
  | `integration.base`, `accepted.integration` | one commit each: where the integration branch started, the revision the run accepted |
60
72
  | `attempts/<role>-<uuid>/` | one *execution* (below) of the run itself: `parallel` (a `run`) or `verification` |
@@ -62,7 +74,7 @@ written), and the reader must never raise because of one.
62
74
  | `final-review` | a symlink to the newest *published* review dir; `final-review.verdict` a copy of its verdict |
63
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 |
64
76
  | `tasks/<id>/merged` | exists when the task was merged; its mtime is when |
65
- | `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 |
66
78
  | `tasks/<id>/attempt` | the current attempt number |
67
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 |
68
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` |
@@ -119,7 +131,14 @@ Only the transcript, checks and environment endpoints open an execution's `.log`
119
131
  running one's log for its `now`; no read opens a `.cmd`.
120
132
 
121
133
  **Task status** is `MERGED` if `tasks/<id>/merged` exists, otherwise the first word of
122
- `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.
123
142
 
124
143
  Only the ids listed in `tasks.tsv` are tasks: `tasks/` may also hold forge's own dirs (e.g.
125
144
  `tasks/_integration/`), and a task dir holds many other files (`attempts/` is a directory of
@@ -186,6 +205,7 @@ def discover(plans=(), roots=(), registry=True, registry_dir=None) -> list[tuple
186
205
  def summarize(path, source='plan') -> dict # a RunSummary, below
187
206
  def detail(path, source='plan') -> dict # a RunDetail, below
188
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
189
209
  def execution_detail(path, name, source='plan') -> dict | None # an ExecutionDetail
190
210
  def final_review_detail(path, name, source='plan') -> dict | None # a FinalReviewDetail
191
211
  def task_diff(path, task_id, which='current', source='plan') -> dict | None # a DiffDetail
@@ -208,6 +228,7 @@ class Catalog:
208
228
  def get(self, key) -> dict | None # RunDetail for that run_key, or None
209
229
  def identity(self, key) -> dict | None # {root, worktree, branch, source} of that run; None for an unknown key
210
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
211
232
  def execution(self, key, name) -> dict | None
212
233
  def final_review(self, key, name) -> dict | None
213
234
  def diff(self, key, task_id, which='current'), execution_diff(self, key, name),
@@ -254,6 +275,7 @@ its last 20,000 behind a leading `…`. Their `truncated` lists the field names
254
275
  | `GET /api/runs` | `200 {"runs": [RunSummary, ...]}` |
255
276
  | `GET /api/runs/<key>` | `200 RunDetail`, or `404 {"error": "not found"}` |
256
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"}` |
257
279
  | `GET /api/runs/<key>/executions/<role>-<uuid>` | `200 ExecutionDetail` |
258
280
  | `GET /api/runs/<key>/final-reviews/<name>` | `200 FinalReviewDetail`; `<name>` is `final-review-<e>-<p>` or `integrate-<e>-<p>` |
259
281
  | `GET /api/runs/<key>/tasks/<id>/diff[/<which>]` | `200 DiffDetail`; `<which>` is `current` (the default: `changes.diff`), `prev`, `committed` (plan tasks), `existing` (solo) |
@@ -280,10 +302,29 @@ its last 20,000 behind a leading `…`. Their `truncated` lists the field names
280
302
  | `POST /api/runs/<key>/issues` | file GitHub issues for chosen findings; authenticated, 300 s timeout |
281
303
  | `POST /api/runs/<key>/issues/dismiss` | dismiss or (`undo`) restore findings; authenticated |
282
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/projects/<id>/memories/add` | add a learning in a project's checkouts (`forge memory add`); body `{path?, category, text, paths?}`; authenticated |
309
+ | `POST /api/projects/<id>/memories/edit` | replace a learning's text in a project's checkouts (`forge memory edit`); body `{path?, key, text}`; authenticated |
310
+ | `POST /api/projects/<id>/findings/fix` | mark findings fixed (`forge findings fix`); body `{fps, commit?, reason?}`; authenticated |
311
+ | `POST /api/projects/<id>/findings/dismiss` | dismiss findings (`forge findings dismiss`); body `{fps, reason}`; authenticated |
312
+ | `POST /api/projects/<id>/findings/reopen` | reopen findings (`forge findings reopen`); body `{fps}`; authenticated |
313
+ | `POST /api/projects/<id>/findings/to-file` | mark findings to-file and keep a draft (`forge findings to-file`); body `{fps, title?, body?}`; authenticated |
314
+ | `POST /api/projects/<id>/findings/dup` | mark one finding a duplicate (`forge findings dup`); body `{fps: [one], of}`; authenticated |
315
+ | `POST /api/projects/<id>/findings/tag` | add or remove tags (`forge findings tag`); body `{fps, tags, remove?}`; authenticated |
316
+ | `POST /api/projects/<id>/findings/note` | set or clear one finding's note (`forge findings note`); body `{fps: [one], text}`; authenticated |
317
+ | `POST /api/projects/<id>/findings/edit` | edit one finding's severity or text (`forge findings edit`); body `{fps: [one], severity?, text?}`; authenticated |
318
+ | `POST /api/projects/<id>/triage` | start a detached triage (`forge findings triage --spec S --detach`); body `{spec, max_findings?}`; authenticated |
319
+ | `GET /api/projects/<id>/triage[?n=N]` | `200 {state, proposals}` from `forge findings triage-status` and `proposals`, read each time |
320
+ | `POST /api/projects/<id>/triage/<n>/<pid>/apply` | approve one proposal (`forge findings apply --approve HASH`); body `{hash, plan_dir?}`; authenticated |
321
+ | `POST /api/projects/<id>/triage/<n>/<pid>/reject` | reject one proposal (`forge findings reject`); body `{reason?}`; authenticated |
322
+ | `GET /api/specs/check?spec=S` | `200 {ok: true, resolved}` or `{ok: false, error}` from `bash scripts/forge-dispatch.sh doctor --spec S --role side`; no model call; answered in read-only mode |
323
+ | `POST /api/storage/compact` | compact one run or all (`forge runs compact --logs`); authenticated, 900 s timeout |
283
324
  | `GET /api/models/reviewers` | `200` the `forge dataset reviewers --json` report (how each reviewer's PASSed work held up); no parameters |
284
325
  | `GET /api/projects` | `200 {projects: [ProjectRow]}`: one row per repository (see Projects) |
285
326
  | `GET /api/projects/<id>` | `200 Project`, `404` for an unknown id |
286
- | `GET /api/projects/<id>/findings[?refresh=1]` | `200 ProjectFindings`: every review's findings with their status |
327
+ | `GET /api/projects/<id>/findings[?refresh=1]` | `200 ProjectFindings`: every review's findings with status, tags, record and draft |
287
328
  | `GET /api/projects/<id>/memories[?refresh=1]` | `200 ProjectMemories`: what each checkout's memory gives models and every learning's state |
288
329
  | `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) |
289
330
  | `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) |
@@ -298,15 +339,16 @@ its last 20,000 behind a leading `…`. Their `truncated` lists the field names
298
339
  | `GET /<name>` | that file from `forge_ui/static/` (`.html .js .css .svg` only, no subdirs) |
299
340
  | 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` |
300
341
 
301
- The lazy endpoints answer `404 {"error": "not found"}` for an unknown run, task,
342
+ The lazy endpoints answer `404 {"error": "not found"}` for an unknown run, task, group,
302
343
  execution or review; the diff endpoints also for a `<which>` the run kind has not (`existing`
303
344
  of a plan task, `prev` of a solo run), the diff and transcript endpoints for an execution that is
304
345
  not `qa` or `dwarf`; the
305
346
  Fractal node endpoints for an unknown node or a task whose Fractal state is not `available`. A
306
347
  diff that is not there yet is a `200` with `available: false`. An execution is looked for only where executions are written:
307
348
  `attempts/`, `tasks/<id>/attempts/`, `shadow/<id>/<a>-<k>/attempts/`,
308
- `final-review-*/attempts/` and `integrate-*/final-review/attempts/`, in that order; a dir
309
- that resolves outside the run dir (a symlinked `attempts/`, say) is ignored. The verification
349
+ `final-review-*/attempts/`, `integrate-*/final-review/attempts/` and `groups/<gid>/attempts/`,
350
+ in that order; a dir that resolves outside the run dir (a symlinked `attempts/`, say) is ignored.
351
+ A group's QA dispatch is the last of those, so a task execution of the same id is still found first. The verification
310
352
  log endpoints answer `404` for a solo run, a `<lane>` not matching `[A-Za-z0-9][A-Za-z0-9_-]{0,63}`
311
353
  (so no `..`), a `<k>` or `<n>` that is not a positive decimal without a leading zero, and a log
312
354
  that is missing, a symlink or not a regular file.
@@ -577,6 +619,12 @@ Every RunSummary field, plus:
577
619
  - `waves` comes from `waves.tsv` (index 0 is wave 1); `[]` when it is missing. A solo run's
578
620
  `waves` is `[["solo"]]`.
579
621
  - `tasks` keeps the order of `tasks.tsv`. A solo run has one task, described below.
622
+ - `groups` is present only when `groups.tsv` exists: one Group summary per row, in file order
623
+ (Group, below). Each task then also has `group`, the id of the group that lists it, or `null`
624
+ when it is in none. A task listed in two groups takes the first group in the file. A plan with
625
+ no `groups.tsv` has neither key, on the run or on a task, so that run JSON is unchanged. An
626
+ empty `groups.tsv` still exists: `groups` is `[]` and every task's `group` is `null`. A solo
627
+ run has neither key.
580
628
  - `warnings` names every file or line the reader skipped as malformed. Missing files are
581
629
  not warnings.
582
630
 
@@ -772,8 +820,9 @@ Every RunSummary field, plus:
772
820
  not a scheduler runs); else, while `scheduler.live` is true, for a `PENDING` or `INFRA` task:
773
821
  `infra` (a pause in `scheduler.pauses` holds it: scope `all`, or its id in `tasks`; the pause's
774
822
  keys plus `kind`), then for a `PENDING` task `deps` (`on`: its deps not merged, `stopped`: those
775
- in a stopped status such as `FAIL`; a dep at `NEEDS_INPUT` or `NEEDS_DECISION` is in `on` only, as the user
776
- holds it and the retry policy did not stop it), `stopping` (`mode`), `drained`, `brief` (`questions`: a gated
823
+ in a stopped status such as `FAIL` or `NOCHANGES`; a dep at `NEEDS_INPUT`, `NEEDS_DECISION` or
824
+ `IMPLEMENTED` is in `on` only — the first two wait for the user, `IMPLEMENTED` waits for the group's
825
+ review, and none of them is a stopped dependency), `stopping` (`mode`), `drained`, `brief` (`questions`: a gated
777
826
  plan holds it for the ids of its `must_answer` questions with no entry in `brief.answers.json`, or `[]`
778
827
  while `brief.json` is not written yet and `brief.pid` names a running process; the same two files
779
828
  `forge-schedule.py` reads), `overlap` (`on`: running
@@ -835,6 +884,75 @@ and `retry_sources.tsv` are read from the run directory (next to `attempts.tsv`)
835
884
  empty, so a later attempt whose dwarf changed is `unknown` unless a retry source or a queued retry
836
885
  explains it. `goal` and `criteria` are capped as `tasks/solo/goal` and `tasks/solo/criteria`.
837
886
 
887
+ ## Group
888
+
889
+ `GET /api/runs/<key>/groups/<gid>` returns one group. `<gid>` matches
890
+ `[a-z0-9][a-z0-9-]{0,39}`. An unknown gid, a gid outside that pattern, or an unknown run is
891
+ `404 {"error": "not found"}`. A plan with no such group, including a solo run, is the same 404.
892
+
893
+ RunDetail `groups` (only when `groups.tsv` exists) lists the summary, in file order. A
894
+ `review=task` summary is identity and goal only. A `review=group` summary also carries the
895
+ review state. `-` in a cell is `null`. `members` is a list of task ids, or `null` for `-` or an
896
+ empty cell.
897
+
898
+ ```json
899
+ {"id": "ship", "review": "group", "qa": "opus", "members": ["reader", "page"],
900
+ "title": "Ship the reader", "goal": "Land it together",
901
+ "status": "PASS", "round": 2, "merged": true, "implicated": null, "decision": "Accepted",
902
+ "rounds": [{"round": 1, "epoch": 1760601000.0, "status": "FAIL", "implicated": ["reader"], "reviewer": "opus"},
903
+ {"round": 2, "epoch": 1760602000.0, "status": "PASS", "implicated": null, "reviewer": "opus"}]}
904
+ ```
905
+
906
+ - `status` is the first word of `groups/<gid>/status`, or `null` when that file is missing. `round`
907
+ is the integer in `round`, or `null`. `merged` is whether `merged` exists.
908
+ - `rounds` comes from `rounds.tsv`. `implicated` on the summary is the last parsed round's
909
+ `implicated` (`null` for `-`, or when there is no round). `decision` is the first line of
910
+ `decision.md`, or `null`. A row with a round or epoch that does not parse is warned and skipped.
911
+ - A `review` other than `task` or `group` is warned and the row is still returned, without the
912
+ 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.
913
+ Missing files are `null` or `[]` or `false`, not warnings. Nothing in a malformed file raises.
914
+
915
+ The group endpoint returns that summary plus the review itself:
916
+
917
+ ```json
918
+ {"attribution": {"round": 2, "findings": [
919
+ {"n": 1, "severity": "P1", "status": "CONFIRMED", "file": "ui/reader.py", "line": 42,
920
+ "tasks": ["reader"], "blocking": true, "ambiguous": false}],
921
+ "implicated": ["reader"], "ambiguous": [1], "blocking": true},
922
+ "members_by_round": [{"round": 1, "members": [
923
+ {"task": "reader", "commit": "abc123", "attempt": 1}]}],
924
+ "qa_last": "FORGE_VERDICT: PASS\n", "known_issues": null,
925
+ "candidate": {"base": "aaaaaaaa", "commit": "bbbbbbbb"},
926
+ "execution": {"id": "qa-…", "role": "qa", "state": "done"},
927
+ "warnings": [], "truncated": []}
928
+ ```
929
+
930
+ - `attribution` is `attribution.json`, or `null` when the file is missing or its `findings` is not
931
+ a list (warned: `not an attribution`). Each finding keeps `n`, `severity`, `status`, `file`,
932
+ `line`, `tasks`, `blocking` and `ambiguous`. A finding that is not an object is skipped. A value
933
+ of the wrong type is warned and replaced (`n` falls back to its 1-based index, `line` to `null`,
934
+ `tasks` to `[]`, the flags to `false`). `implicated` is a list of ids and `ambiguous` a list of
935
+ finding numbers, `[]` when absent or the wrong type. Top-level `blocking` is kept only when it
936
+ is a boolean.
937
+ - `members_by_round` groups `members.tsv` by round, in file order. `-` for `commit` or `attempt`
938
+ is `null`. A row with no round or no task is warned and skipped; an attempt that is not an
939
+ integer is warned and kept as `null`.
940
+ - `qa_last` and `known_issues` use the bounded reader TaskDetail's texts and a final review's
941
+ `qa.last` use: the first 20,000 and last 8,000 characters, the cut named in `truncated`
942
+ (`qa_last`, `known_issues`). A missing file is `null`.
943
+ - `candidate` is the first line of `candidate.base` and `candidate.commit`, with `-` as `null`.
944
+ - `execution` is the group's QA dispatch: the newest `qa` execution in
945
+ `groups/<gid>/attempts/`, built by the same reader a task's QA dispatch uses, or `null` when
946
+ there is none. It is `running` only while `groups/<gid>/status` is `REVIEWING`; any other
947
+ unfinished dispatch is `orphaned`. The execution and transcript endpoints open it with
948
+ `owner` `{"kind": "group", "id": "<gid>"}`, and while it runs they read the group dir's
949
+ `qa.delivered`, `qa.prompt` and `qa.input` the way a task's owner dir is read.
950
+ - `warnings` and `truncated` are that read's. A warning is kept when its file is under
951
+ `groups/<gid>/` (this group's rounds, members, attribution and review dispatch). A malformed
952
+ `groups.tsv` row, and another group's files, are warnings of the run read, not of this group.
953
+ `truncated` names the texts this read cut (`qa_last`, `known_issues`). A `review=task` group
954
+ has the same detail fields; with no review dir they are `null` or `[]`, and `warnings` is `[]`.
955
+
838
956
  ## Execution
839
957
 
840
958
  ```json
@@ -859,8 +977,8 @@ explains it. `goal` and `criteria` are capped as `tasks/solo/goal` and `tasks/so
859
977
  and it is the newest execution of its role in its dir, else `orphaned`. The owner is live
860
978
  when: the task's status is `RUNNING` (task executions and their children); the solo
861
979
  status is `RUNNING`; a shadow has no `shadow.status`; a final review's `state` is
862
- `running`; always, for the run's own `parallel` and `verification`. A `dwarf` or `qa`
863
- whose parent is not `running` is `orphaned`.
980
+ `running`; a group's `status` is `REVIEWING` (its QA dispatch); always, for the run's own
981
+ `parallel` and `verification`. A `dwarf` or `qa` whose parent is not `running` is `orphaned`.
864
982
  - `parent`: for `dwarf` and `qa`, the `task` (or `solo`) execution `dataset.json` names, else
865
983
  the latest one whose run (`started` to `ended`, open while unfinished) contains this
866
984
  start, else `null`. `task`, `solo`, `parallel` and `verification` have no parent.
@@ -981,8 +1099,8 @@ ExecutionDetail: the Execution, plus `resolved` (every `key=value` of `<role>.re
981
1099
  `<role>.prompt` copy; while running without one, the owner dir's `<role>.delivered`, then
982
1100
  `.prompt`, then `.input`), `last` (the `<role>.last` copy), `findings` (a list of Findings for
983
1101
  a finished `qa`, else `null`, in place of the summary), `owner`
984
- (`{"kind": "task" | "shadow" | "final_review" | "run", "id": ...}`: the task id (`solo` for a
985
- solo run), `<task>/<attempt>-<k>`, the review name, or `null`), `truncated` and `warnings`.
1102
+ (`{"kind": "task" | "shadow" | "final_review" | "run" | "group", "id": ...}`: the task id (`solo` for a
1103
+ solo run), `<task>/<attempt>-<k>`, the review name, the group id, or `null`), `truncated` and `warnings`.
986
1104
 
987
1105
  FinalReviewDetail: the FinalReviewSummary, plus `meta` (every `review.meta` key),
988
1106
  `tasks_summary`, `qa_input`, `qa_last`, `known_issues` (texts or `null`), `findings` (a list
@@ -1403,16 +1521,17 @@ difficulty paths deps model` each), `decomposition_history` (its newest 20, each
1403
1521
 
1404
1522
  - It holds `style.css` (with the labels' face, `D-DINCondensed-Bold.woff2`, inlined as a `data:`
1405
1523
  URL) and the classic scripts the run view uses (`theme.js icons.js datatable.js shell.js
1406
- runmodel.js cloudmodel.js graph.js gantt.js verifyview.js checksview.js panel.js diffview.js convo.js files.js
1407
- map3d.js search.js app.js`), inline; the import map; a `<script type="application/json" id="forge-snapshot">` with
1524
+ runmodel.js cloudmodel.js graph.js gantt.js verifyview.js checksview.js briefview.js groupsview.js
1525
+ 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
1408
1526
  `{meta, api}`; and a `<script type="text/plain" id="forge-stage">` holding `iso.js`,
1409
1527
  `cloud3d.js`, `findings3d.js`, `stagectl.js` and `scene3d.js` bundled into one module (each
1410
1528
  module in its own scope, relative imports bound to the earlier ones' exports, `createStage`
1411
1529
  exported), which `map3d.js` imports from a `blob:` URL.
1412
1530
  - `api` maps each path the page requests to that endpoint's response as the server would answer
1413
1531
  it (server.api_get): `/api/runs` (this run only), the RunDetail, every TaskDetail, every
1414
- ExecutionDetail the RunDetail names, every FinalReviewDetail, Files, RunFindings, and the
1415
- Fractal trees and nodes. With `texts=1` also every diff the page can open (each task's diff and its `sources`,
1532
+ Group detail, every ExecutionDetail the RunDetail or a Group names, every FinalReviewDetail, Files, RunFindings, and the
1533
+ Fractal trees and nodes. A script named above whose file is not in `forge_ui/static/` yet is left out,
1534
+ 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`,
1416
1535
  each final review's, each Fractal node's), every `dwarf` and `qa` ExecutionTranscript (at most 2 MB each)
1417
1536
  and ExecutionChecks, every TaskChecks, the RunEnvironment,
1418
1537
  and the VerificationLog tail of `verification.log`, of each lane's log and of each lane run's log
@@ -1422,6 +1541,9 @@ difficulty paths deps model` each), `decomposition_history` (its newest 20, each
1422
1541
  planning_last approach retry_findings needs_input dwarf_input error last_line message excerpt tail lines call split detail`.
1423
1542
  Under each brief `questions` or `parked` entry it also nulls `why`, `options`, `default` and `answer`
1424
1543
  (`scope`, `state`, `id`, `must_answer` and `possibly_stale` stay; a late answer's `text` is in the list above).
1544
+ Under each group, on RunDetail `groups` and on `GET …/groups/<gid>`, it nulls `goal` and `decision`
1545
+ (the planner's line and the first line of `decision.md`). The run's own `goal` stays, and so does a
1546
+ group's `title`. A task's `decision` object stays, with its `text` nulled by the list above.
1425
1547
  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`.
1426
1548
  - `paths=0` (the default) makes every string that is a whole absolute path (but `/api/…`, `url`s
1427
1549
  and `command`s) its last component, and replaces the run dir, the repo and the home dir inside other
@@ -1449,7 +1571,7 @@ each authenticated POST to the table, so a new write route is one entry in it.
1449
1571
 
1450
1572
  **The call.** `[<forge root>/forge, ...]`, an argv list with no shell, in a process
1451
1573
  group of its own. `stdin` is closed, except for a profile create or edit (the profile object) and a
1452
- brief answer (the answer text), both via `--file -`. `<forge root>` is two directories above `forge_ui/` and can be replaced as
1574
+ 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
1453
1575
  `forge_ui.server.forge_cli`. A call that outlives its timeout (60 s) gets SIGTERM for its whole
1454
1576
  group, SIGKILL 5 s later if anything is left, and is reaped, all before the run's lock is
1455
1577
  released; the answer is `504 {"error": "timeout", "detail": "the operation may have partly
@@ -1641,6 +1763,138 @@ deletion) `500`. Deletion holds the run's write lock and a server-wide lock on t
1641
1763
  directory (`409 busy` when either is held). The run key is looked up again under the lock, and
1642
1764
  once the directory is gone every later request for that key is `404`. Timeout 900 s.
1643
1765
 
1766
+ ### `POST /api/worktrees/remove`
1767
+
1768
+ Body: `{"paths": [string, 1 to 200], "branches": bool (false), "dry_run": bool (false)}`. Every path
1769
+ is absolute, has no control characters and is a row of `GET /api/worktrees`: the cached rows are
1770
+ checked and, when a path is missing, read once again. A path that is not listed is `400`. Runs
1771
+ `worktrees rm <paths…> [--branches] [--dry-run] --json --actor ui` and answers with its object
1772
+ (`ok`, `dry_run`, `rows: [{path, action, status, reason}]`, status `removed`, `skipped`, `failed` or
1773
+ `would-remove`). Exit 4 (a row failed) is a `200` with `ok: false` and the rows, so the page can say
1774
+ which row failed; exit 2 `400`, exit 3 `409`. A server-wide lock (`409 {"error": "busy"}`) covers
1775
+ the call; timeout 900 s. After a real removal (not `dry_run`) the worktrees and storage caches are
1776
+ dropped, so the next `GET` reads again. Refused under `--read-only` (`405`) and without the token.
1777
+
1778
+ ### `POST /api/projects/<id>/memories/forget`
1779
+
1780
+ Body: `{"keys": [string "category:key", 1 to 200], "dry_run": bool (false), "path": string}`. The
1781
+ project is `<id>` of `GET /api/projects` (`404` when unknown). Without `path` the call runs in every
1782
+ checkout of the project that exists; `path` must be one of them (`400` otherwise). Runs `memory
1783
+ forget <checkout> <keys…> [--dry-run] --json --actor ui` once per checkout and answers `200
1784
+ {"ok", "dry_run", "checkouts": [{"path", "result"}]}`, `result` being that CLI's object. A checkout
1785
+ whose call failed has `result: null` plus `status` and `error` (the mapped answer), and `ok` is
1786
+ false; when every checkout failed the first failure is the answer. A project with no existing
1787
+ checkout is `409`. A server-wide lock (`409 busy`); timeout 60 s per checkout. A real forget drops
1788
+ the project screen's memory answers. Refused under `--read-only` and without the token.
1789
+
1790
+ ### `POST /api/projects/<id>/memories/add` and `/memories/edit`
1791
+
1792
+ The project is `<id>` of `GET /api/projects` (`404` when unknown). Without `path` the call runs in every
1793
+ checkout of the project that exists; `path` must be one of them (`400` otherwise). A project with no
1794
+ existing checkout is `409`.
1795
+
1796
+ `add` body: `{"path": string, "category": "verify"|"trap"|"finding", "text": string, "paths": [string]}`.
1797
+ `text` is one line of 1 to 300 characters with no control character. `paths` is at most 20 relative
1798
+ paths (no `..`, no comma, no `[` or `]`, each at most 300 characters); omit it or pass `[]` for none.
1799
+ Runs `memory add <checkout> --category C --text T [--path P]… --actor ui --json` once per checkout.
1800
+
1801
+ `edit` body: `{"path": string, "key": "category:key", "text": string}`, the same text rule. Runs
1802
+ `memory edit <checkout> <key> --text T --actor ui --json` once per checkout. The route takes no
1803
+ `paths` field.
1804
+
1805
+ Both answer `200 {"ok", "checkouts": [{"path", "result"}]}`, `result` being that CLI's object. A
1806
+ checkout whose call failed has `result: null` plus `status` and `error`, and `ok` is false; when
1807
+ every checkout failed the first failure is the answer. A server-wide lock (`409 busy`); timeout 60 s
1808
+ per checkout. The project screen's memory answers are dropped after the calls. Refused under
1809
+ `--read-only` and without the token.
1810
+
1811
+ ### `POST /api/projects/<id>/findings/<op>`
1812
+
1813
+ `<op>` is `fix`, `dismiss`, `reopen`, `to-file`, `dup`, `tag`, `note` or `edit`. The project is `<id>`
1814
+ of `GET /api/projects` (`404` when unknown, or when it has no root). Runs `findings <op> <root> … --actor
1815
+ ui --json`. `dup`, `note` and `edit` take exactly one fingerprint; the others take 1 to 200, and a
1816
+ repeated fingerprint is one finding. Every fingerprint is 12 lowercase hex characters. `200` with the
1817
+ CLI's object (`ok`, `op`, `changed`, `unchanged`). Exit 2 is `400`, exit 3 is `409` with the CLI's
1818
+ message. A server-wide findings lock (`409 {"error": "busy"}`); timeout 60 s. A successful call drops
1819
+ the project screen's findings listings and its run cache. Refused under `--read-only` and without the
1820
+ token. Unknown fields are `400`.
1821
+
1822
+ | `<op>` | Body | What the CLI receives |
1823
+ | --- | --- | --- |
1824
+ | `fix` | `{fps, commit?, reason?}`. At least one of `commit` (7 to 40 lowercase hex) and `reason` (at most 500 characters, no NUL) | `--commit`, `--reason` |
1825
+ | `dismiss` | `{fps, reason}` (`reason` required, same limit) | `--reason` |
1826
+ | `reopen` | `{fps}` | the fingerprints only |
1827
+ | `to-file` | `{fps, title?, body?}`. `title` at most 200 characters, no NUL. `body` at most 20000 characters, written to a private file | `--title`, `--body-file` |
1828
+ | `dup` | `{fps: [one], of}` (`of` is 12 lowercase hex) | `--of` |
1829
+ | `tag` | `{fps, tags, remove?}`. `tags` is 1 to 8 values matching `^[a-z][a-z0-9-]{0,23}$`. `remove` true selects `--remove`, otherwise `--add` | `-- TAG… --add` or `-- TAG… --remove` |
1830
+ | `note` | `{fps: [one], text}` (`text` at most 2000 characters, no NUL; empty clears the note) | the text as the positional argument |
1831
+ | `edit` | `{fps: [one], severity?, text?}`. At least one. `severity` is `P0`, `P1`, `P2` or `P3`. `text` at most 4000 characters, written to a private file | `--severity`, `--text-file` |
1832
+
1833
+ ### `POST /api/projects/<id>/triage`, `GET /api/projects/<id>/triage`, apply and reject
1834
+
1835
+ The repository is the project's root when that directory exists, otherwise the first checkout that
1836
+ still exists. An unknown project is `404 {"error": "not found"}`; a project with no directory left
1837
+ on this machine is `404 {"error": "no checkout"}`.
1838
+
1839
+ `POST /api/projects/<id>/triage` body: `{"spec": string, "max_findings": int}`. `spec` is 1 to 120
1840
+ characters of letters, digits and `. _ : / @ + -`. `max_findings`, when present, is an integer from
1841
+ 1 to 2000. Runs `findings triage <repo> --spec S [--max-findings N] --detach --actor ui --json` and
1842
+ answers `200` with the CLI's object (`triage`, `state`). `--detach` returns at once; this is the one
1843
+ route whose CLI starts a model. Exit 3 is `409` with the CLI's message. It does not take the findings
1844
+ lock. Timeout 60 s. Refused under `--read-only` and without the token.
1845
+
1846
+ `GET /api/projects/<id>/triage[?n=N]` runs `findings triage-status <repo> [N] --json` and `findings
1847
+ proposals <repo> [N] --json` on every request, with no cache. `N` is 1 to 9 digits. No triage yet
1848
+ (the status command exits 3 with that message) is `200 {"state": null, "proposals": null}`. A triage
1849
+ with no proposals yet leaves `proposals` null and still returns the state. Any other query parameter
1850
+ is `400`. Read-only servers answer this GET. Timeout 60 s per CLI call.
1851
+
1852
+ `POST …/triage/<n>/<pid>/apply` body: `{"hash": string, "plan_dir": string}`. `<n>` is 1 to 9 digits,
1853
+ `<pid>` matches `^p[0-9]{1,4}$`, and `hash` is 12 lowercase hex characters (the proposal's hash; a
1854
+ mismatch is the CLI's refusal). `plan_dir`, when present, is an absolute path. Runs `findings apply
1855
+ <repo> N PID --approve HASH [--plan-dir D] --actor ui --json`. `200` with the CLI's object. For a
1856
+ `plan` proposal that object carries `plan_dir` and `next` (`bash scripts/forge-parallel.sh plan DIR
1857
+ --repo CHECKOUT`); nothing is dispatched. An `issue` proposal only marks findings `to-file` with the
1858
+ draft.
1859
+
1860
+ `POST …/triage/<n>/<pid>/reject` body: `{"reason": string}`. `reason`, when present, is at most 500
1861
+ characters (newline and tab allowed; blank is omitted). Runs `findings reject <repo> N PID [--reason
1862
+ T] --actor ui --json`.
1863
+
1864
+ Apply and reject hold the server-wide findings lock (`409 {"error": "busy"}`). Exit 2 is `400`, exit
1865
+ 3 is `409` with the CLI's message. A successful call drops the project screen's findings listings and
1866
+ its run cache. Timeout 60 s. Refused under `--read-only` and without the token.
1867
+
1868
+ ### `GET /api/specs/check?spec=S`
1869
+
1870
+ Runs `bash scripts/forge-dispatch.sh doctor --spec S --role side` and answers `200 {"ok": true,
1871
+ "resolved": {key: value}}` from the doctor's `key=value` lines, or `200 {"ok": false, "error"}` when
1872
+ the doctor refuses. The check finished either way; no model is called. `spec` is required and uses
1873
+ the same 1-to-120-character check as triage start: a spec that fails it is `400` and the doctor is
1874
+ not run. A literal `+` in the query is a plus. Any other query parameter is `400`. Read-only servers
1875
+ answer this GET. Timeout 60 s.
1876
+
1877
+ ### `POST /api/storage/compact`
1878
+
1879
+ Body: `{"run": "<12-hex run key>"}` or `{"all": true}` (exactly one), and `"dry_run": bool (false)`.
1880
+ Runs `runs compact <run dir> --logs --json [--dry-run]`, or `runs compact --all --logs --json
1881
+ [--dry-run]`, and answers with its object (`ok`, `dry_run`, `bytes_freed`, `runs`). An unknown run
1882
+ key is `404`. Exit 2 `400`; exit 3 (the named run is active) `409` with the CLI's message; exit 4
1883
+ `500`. A server-wide lock (`409 {"error": "busy"}`); timeout 900 s. A real compaction marks the
1884
+ `GET /api/storage` answer stale, so the next read measures again. Refused under `--read-only` and
1885
+ without the token.
1886
+
1887
+ ### `POST /api/runs/<key>/tasks/<id>/answer`
1888
+
1889
+ Body: `{"text": string}`, 1 to 8000 characters after stripping, no NUL; `<id>` is a task id as for
1890
+ the brief route. The run must be a plan (`404` otherwise). Always runs `control retry <plan> <id>
1891
+ --answer-file - --actor ui --json` with the stripped text on stdin: forge queues the answer for a
1892
+ live scheduler and prepares the retry itself when none runs. The answer is `200 {"live": bool,
1893
+ "result": <the CLI's object>}`, where `live` says whether `scheduler.live` named a live process (as
1894
+ RunDetail's `scheduler.live`) and `result` is `{"queued": true, "request"}` or `{"queued": false,
1895
+ "prepared": true}`. Exit 3 (the task is not `NEEDS_INPUT`) is `409` with the CLI's message. Holds
1896
+ the run's write lock (`409 busy`); timeout 60 s. Refused under `--read-only` and without the token.
1897
+
1644
1898
  ### `GET /api/models/reviewers`
1645
1899
 
1646
1900
  Runs `dataset reviewers --json` and answers with its object: `horizon_days`, `min_landed`,
@@ -1658,14 +1912,20 @@ cloud's (cloudmodel.js `hashId`: FNV-1a over the root's UTF-16 code units, 8 hex
1658
1912
 
1659
1913
  ```
1660
1914
  ProjectRow = {id, name, root, exists, runs, live, last, path_only (runs tied by path only), checkouts,
1661
- memory_lines (lines of <root>/.forge/memory.md, null when absent), open_findings (not superseded)}
1915
+ memory_lines (lines of <root>/.forge/memory.md, null when absent),
1916
+ open_findings (rows the record and the review rules call open or to-file; this list does not
1917
+ ask GitHub, so a filed or swept finding can still be counted)}
1662
1918
  Project = {id, name, root, exists, live, last, path_only, memory_off_runs,
1663
1919
  checkouts: [{path, exists, branch, runs, root}], runs: [RunSummary + identity_source, dataset_uid, no_memory]}
1664
- ProjectFindings = {id, rows: [Finding], notes: [text], runs, dataset_runs, computed, available}
1920
+ ProjectFindings = {id, rows: [Finding], notes: [text], runs, dataset_runs, computed, available,
1921
+ issues_online (true when that listing was the online one), issues_read_at (unix time the listing was read, or null)}
1665
1922
  Finding = {source: run|dataset, run (key or null), run_id, task, final_review (its dir name, 'final' from the
1666
1923
  dataset), attempt, kind: primary|shadow|final, reviewer, verdict, at, id, severity, confidence, location,
1667
- summary, text, fp (forge issues' key, null when it cannot parse the line), count, occurrences: [{run,
1668
- run_id, task, attempt, kind, reviewer, at, href}], status, fileable, origin, href (the diff at the finding)}
1924
+ summary, text, fp (forge issues' key, null when it cannot parse the line), record_fp (the finding
1925
+ record's 12-hex key, or null when the row cannot be keyed), record (that record entry, or null),
1926
+ tags (the entry's tags, or the default for the path when none are stored), draft (the to-file
1927
+ draft, or null), count, occurrences: [{run, run_id, task, attempt, kind, reviewer, at, href}],
1928
+ status, fileable, origin, href (the diff at the finding)}
1669
1929
  ProjectMemories = {id, sources: [{path, root, branch, ok, ledger, memory, rebuilt_differs, max_lines}], differs,
1670
1930
  learnings: [{category, key, text, count, states: {source path: state}, rows, last, dataset_only}],
1671
1931
  notes, memory_off_runs, runs, computed}
@@ -1673,13 +1933,23 @@ ProjectMemories = {id, sources: [{path, root, branch, ok, ledger, memory, rebuil
1673
1933
 
1674
1934
  Findings come from every review of every run dir (parsed by forge-contract.py through `findings.py`), and
1675
1935
  from `dataset history --json` for runs whose dir is gone (their base commit ties a run whose checkout is
1676
- gone to the project, as `repos.py` does). `status` comes from one `issues <run> --json --offline --all-runs
1677
- --include-plausible --include-dismissed` listing per project, matched by `forge issues`' own key, else
1678
- `superseded` when a later review of the same task (or a later final review) passed, else `open`. Repeats
1679
- within a task collapse by that key; a line it cannot parse is its own row. Memories run `memory learnings
1680
- <checkout> --json` for the root and each checkout a run started in that still exists. A run's findings
1681
- are cached by its `updated` time, the CLI's answers for 300 s; `refresh=1` reads everything again; any
1682
- other parameter is a `400`.
1936
+ gone to the project, as `repos.py` does). Repeats within a task collapse by `forge issues`' own key; a
1937
+ line it cannot parse is its own row. `status` is `forge_findings.status.effective`: the record when it is
1938
+ `duplicate`, `dismissed`, `fixed`, `filed` or `to-file`; otherwise the `forge issues` entry (filed and
1939
+ `CLOSED` is `fixed`, any other filed issue is `filed`, and, unless the record reopened it, swept is
1940
+ `swept` and an old dismissal is `dismissed`); otherwise the review row (`shadow`, `unlabelled` when the
1941
+ confidence is `UNSTATED`, `superseded` when a later review of the same task or a later final review
1942
+ passed); otherwise `open`. Only `open` and `to-file` count as open. `tags` are the record's tags when it
1943
+ has any, otherwise the default for the file (`tests`, `docs`, `infra`, `ui` or `backend`; no path gives
1944
+ none). `draft` is the record entry's draft, or null. The issues listing is `issues <path> --json
1945
+ --all-runs --include-plausible --include-dismissed`, asked of the repository root first and then of up
1946
+ to three of its run dirs: online (no `--offline`, so GitHub can say an issue is closed), and with
1947
+ `--offline` when that fails or takes over 60 s. `notes` says
1948
+ when the dataset, `forge issues` or the finding record could not be read, and when issue states were not
1949
+ read from GitHub (a filed finding may then show as open). Memories run `memory learnings <checkout>
1950
+ --json` for the root and each checkout a run started in that still exists. A run's findings are cached
1951
+ by its `updated` time, the CLI's answers for 300 s; `refresh=1` reads everything again; any other
1952
+ parameter is a `400`.
1683
1953
 
1684
1954
  ### `GET /api/worktrees`
1685
1955
 
@@ -1734,7 +2004,7 @@ Storage = {state: measuring | ready | error | unavailable, error, started, progr
1734
2004
  data: Report | null (the last measurement, kept while the next one runs)}
1735
2005
  Report = {repo: null, computed, complete, totals: {runs, worktrees, data_home, reclaimable, snapshots, logs, strays},
1736
2006
  runs: [{path, run_id, repo, updated, total, snapshots, snapshot_count, logs, gz, compressible, strays,
1737
- fractal, other, reclaimable, complete, commands: [{label, command}]}],
2007
+ fractal, other, reclaimable, complete, key: forge-ui run key | null (not in the run list), commands: [{label, command}]}],
1738
2008
  strays: [{path, bytes, kind: dependencies | git, run}], worktrees: [{repo, run_id, path, bytes, complete}],
1739
2009
  data_home: {path, bytes, parts: {dataset, blobs, archive, exports, legacy, storage, other}} | null,
1740
2010
  commands: [{label, command, bytes?}]}
@@ -1847,6 +2117,10 @@ Suggested meaning: merged and pass green, running blue, pending grey, fail, erro
1847
2117
  red, infra and timeout orange, blocked, interrupted, invalidated, unknown and nochanges muted
1848
2118
  purple. `NEEDS_DECISION` takes the same waiting colour as `NEEDS_INPUT` (`--lamp-wait`, the
1849
2119
  `st-needs_input` class in `style.css`): a task that waits for the user is neither done nor failed.
2120
+ `IMPLEMENTED` is the same kind of waiting status: the member's work is in and it is awaiting the
2121
+ group's review. `reader.status_class` returns `waiting` for it, and a task that depends on one
2122
+ lists it in `waiting.on` and not in `waiting.stopped`. The page paints it with
2123
+ `st-implemented`, the same waiting colour; until that class exists the stage falls back to `#888`.
1850
2124
 
1851
2125
  ## The graph (`forge_ui/static/graph.js`)
1852
2126