@giamme/forge 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/SKILL.md +16 -3
- package/VERSION +1 -1
- package/docs/artifacts.md +8 -0
- package/docs/commands.md +70 -6
- package/docs/dataset.md +5 -0
- package/docs/decomposed-runs.md +8 -0
- package/docs/forge-ui.md +23 -2
- package/docs/memory.md +2 -0
- package/docs/safety.md +8 -0
- package/forge +24 -1
- package/package.json +1 -1
- package/references/dataset.md +19 -0
- package/references/decompose.md +134 -1
- package/references/solo.md +2 -1
- package/references/ui.md +5 -2
- package/scripts/forge-artifact.sh +14 -0
- package/scripts/forge-brief.py +132 -0
- package/scripts/forge-compare.py +11 -1
- package/scripts/forge-config.py +176 -9
- package/scripts/forge-contract.py +46 -3
- package/scripts/forge-control.py +86 -13
- package/scripts/forge-dispatch.sh +14 -10
- package/scripts/forge-du.py +167 -0
- package/scripts/forge-lib-adopt.sh +1 -0
- package/scripts/forge-lib-plans.sh +5 -2
- package/scripts/forge-lib-review.sh +29 -1
- package/scripts/forge-metrics.sh +7 -3
- package/scripts/forge-parallel-options.sh +4 -0
- package/scripts/forge-parallel.sh +503 -9
- package/scripts/forge-prompt.py +120 -0
- package/scripts/forge-retro.py +115 -0
- package/scripts/forge-runs-compact.py +443 -0
- package/scripts/forge-runs-rm.py +2 -0
- package/scripts/forge-runs.py +18 -3
- package/scripts/forge-schedule.py +279 -4
- package/scripts/forge-shadow.py +7 -1
- package/scripts/forge-solo.sh +2 -0
- package/scripts/forge-summarize.py +698 -0
- package/scripts/forge-ui-options.sh +10 -0
- package/scripts/forge_brief/__init__.py +587 -0
- package/scripts/forge_brief/answers.py +459 -0
- package/scripts/forge_dataset/__init__.py +10 -0
- package/scripts/forge_dataset/export.py +18 -4
- package/scripts/forge_dataset/facts.py +6 -4
- package/scripts/forge_dataset/harvest.py +40 -6
- package/scripts/forge_dataset/history.py +5 -3
- package/scripts/forge_decide/__init__.py +11 -1
- package/scripts/forge_locations.py +366 -0
- package/scripts/forge_registry.py +19 -0
- package/scripts/forge_retro/__init__.py +417 -0
- package/scripts/forge_retro/issues.py +1193 -0
- package/scripts/forge_retro/report.py +671 -0
- package/scripts/forge_side/__init__.py +477 -0
- package/scripts/forge_storage.py +515 -0
- package/ui/README.md +68 -8
- package/ui/docs/api.md +205 -17
- package/ui/forge_ui/control.py +92 -11
- package/ui/forge_ui/export.py +24 -5
- package/ui/forge_ui/links.py +337 -0
- package/ui/forge_ui/models.py +57 -4
- package/ui/forge_ui/projects.py +4 -1
- package/ui/forge_ui/reader.py +661 -30
- package/ui/forge_ui/static/app.js +86 -4
- package/ui/forge_ui/static/briefview.js +302 -0
- package/ui/forge_ui/static/checksview.js +6 -2
- package/ui/forge_ui/static/controls.js +5 -0
- package/ui/forge_ui/static/index.html +3 -0
- package/ui/forge_ui/static/panel.js +268 -2
- package/ui/forge_ui/static/runmodel.js +13 -1
- package/ui/forge_ui/static/storageview.js +271 -0
- package/ui/forge_ui/static/style.css +99 -3
- package/ui/forge_ui/static/worktreesview.js +3 -3
- package/ui/forge_ui/storage.py +136 -0
- package/ui/forge_ui/transcripts.py +35 -10
- package/ui/forge_ui/worktrees.py +154 -13
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,30 @@ All notable changes to this project are documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and versions follow the format `{major}.{minor}[.{patch}]` ([...] parts appear only when non-zero).
|
|
7
7
|
|
|
8
|
+
## [0.18] - 2026-11-13
|
|
9
|
+
|
|
10
|
+
Around each task and on disk: retro notes, brief mode, task summaries and the task inspector; review snapshots removed after each review, forge runs compact, forge du and the Disk screen, and a list of everything forge puts on disk.
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Retro notes, opt-in with `plan --retro` (or `forge config set retro on`): implementers and reviewers record what got in their way (a missing tool, a flaky test, a wrong instruction), each with its command and error and checked against the run's own logs. `forge retro report` groups them into `retro.md` (forge's own problems, the project's, the environment's) with counts across tasks and earlier runs. `forge retro issues` drafts redacted GitHub issues for forge's repository and posts only what a person approves by hash. Nothing leaves the machine otherwise (#132).
|
|
15
|
+
- forge-ui: the task inspector opens with the task's goal, acceptance criteria and links read from its prompt, then an attempt trail: each attempt's model, verdict, worst finding and why it was retried (automatic, a person's retry, an escalation), each line linking to that attempt's executions (#133).
|
|
16
|
+
- Task summaries, opt-in with `plan --summaries on --summaries-model SPEC`: a cheap read-only dispatch writes a few sentences per task, plus one sentence for the tasks table, rewritten only when the task's attempts, status or review change. `forge summarize` runs it by hand, and `forge control set summaries on|off` (or `--task ID on|off|inherit`) switches it during or after a run. forge-ui shows each summary in the inspector with its model, time and sources, marks one out of date, and has a master switch and a per-task override. forge never picks the model (#133).
|
|
17
|
+
- Brief mode, opt-in with `plan --brief advisory|gated|strict --brief-model SPEC`: before each task starts, a cheap read-only dispatch writes the questions only you can answer, each with why it matters, options and the default forge will assume. Answers (`forge brief answer`, or the answer box in forge-ui's inspector) go into the task's prompt. `gated` holds a task with an unanswered must-answer question, and `strict` makes `run` exit 3 while any is open. After a merge, dependents' open questions are flagged as possibly stale, and an answer that comes after its task started is kept as late, with a `forge control add` suggestion. forge-ui lists the run's open questions, flagged first, then by how soon each task starts (#135).
|
|
18
|
+
- `forge control accept <plan> <task> --reason "…" --approved` accepts a `FAIL`, `UNKNOWN` or `NEEDS_DECISION` task while its run is live. The scheduler applies it at its next pass, just as `forge-parallel.sh accept` would: the findings become known issues, the task merges, and the tasks waiting on it start in the same run instead of ending `BLOCKED`. `control.log` and `accepted.by` record who asked and why. With no live run it is refused, and points to the plain `accept` (#138).
|
|
19
|
+
- `forge runs compact` takes back the space run dirs hold for nothing and keeps every run: after a strict dataset import it removes leftover review snapshots and, with `--logs`, gzips each dwarf's and reviewer's log copy (forge-ui reads them the same way). It holds the run's lock, skips active runs, and reports anything forge did not create (a dependency install inside a run dir) instead of deleting it. On a real 2.3 GB plan dir it took back 2.2 GB (#139).
|
|
20
|
+
- `forge du` shows what forge takes on disk (each run dir's snapshots, logs and other files, each run's worktree folder, and the data home) and the command that takes each part back. forge-ui's new Disk screen shows the same report, with the commands to copy (#139).
|
|
21
|
+
- At run start forge compacts the repository's idle runs in the background and warns when its forge files passed a size you set. `forge config set storage.compact auto|off` (default `auto`) and `storage.warn-gb N|off` (default 20) control it; a run never waits for it (#139).
|
|
22
|
+
- The Disk screen in forge-ui now charts where the space goes: one bar by kind (review snapshots, logs, other run files, what is not forge's, worktrees, the data home) and one per repository, with sizes and shares on hover.
|
|
23
|
+
- forge now keeps a list of everything it puts on disk, in `<config home>/forge/locations.jsonl`: every run dir and worktree, with its repository's git dir and main checkout, and when forge removed it. `forge du`, `forge runs compact` and forge-ui's Disk and Worktrees screens use it to know where to look, so a checkout deleted by hand, a symlinked path or a run dir that is gone no longer hides anything. It is written even with the dataset off (`FORGE_RUN_REGISTRY=off` turns it off), and filled once from the run registry and the worktrees already on disk.
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- Run directories no longer grow by a full copy of the repository for every review: forge removes each review snapshot (task, final, shadow, solo and adopt reviews) once the review ends, whatever its outcome, and a task's next review removes one an interrupted review left behind. `review.base`, `review.deps`, the prompt, the log and the verdict stay. `FORGE_KEEP_SNAPSHOTS=1` keeps them for debugging. Snapshots that existing runs already hold are untouched (#139).
|
|
28
|
+
- A forge command refused by a plan's lock (`accept`, `retry`, `integrate` and the others while another one runs) now says which command holds the lock, with its pid and start time, and on a live run which `forge control` command to use instead, rather than a bare `[Errno 35] Resource temporarily unavailable` (#138).
|
|
29
|
+
- A final review stopped by a signal no longer leaves its review snapshot behind for good: the plan's next final review removes it, as a task's next review already did (#139).
|
|
30
|
+
- forge-ui's Worktrees screen no longer greys out worktrees that are still on disk. It used to miss a repository reached through a symlink, or one whose recorded checkout was deleted by hand; their worktrees then showed as removed or not at all. Now it finds a repository through any of its worktrees and never calls a worktree on disk removed. It names a repository git cannot list, counts a split task's worktree as the run's, and offers to delete a folder left where a worktree was. The screen opens on the worktrees on disk.
|
|
31
|
+
|
|
8
32
|
## [0.17] - 2026-11-11
|
|
9
33
|
|
|
10
34
|
Measure reviews and routing: outcomes recorded at the end of every run, finding facts, paired reviews, task risk and a look inside each difficulty tier, all in shadow; plus adoption fixes.
|
package/SKILL.md
CHANGED
|
@@ -87,15 +87,16 @@ For explanation requests, explain the workflow without spending model quota.
|
|
|
87
87
|
explicitly says so; never self-accept.
|
|
88
88
|
- When you report a run, read `<plan>/control.log` and mention any human change made mid-run
|
|
89
89
|
(a threshold, a budget, a model pin, a drain, stop or queued retry; `forge control show <plan>`
|
|
90
|
-
lists them). Never set a control, pin, `drain|stop|retry
|
|
91
|
-
`forge runs rm` unless the user asks. Exit `130` / `INTERRUPTED`: the run was signalled or
|
|
90
|
+
lists them). Never set a control, pin, `drain|stop|retry`, delete a run or compact one with
|
|
91
|
+
`forge control` / `forge runs rm` / `forge runs compact` unless the user asks; `forge du` only reads. Exit `130` / `INTERRUPTED`: the run was signalled or
|
|
92
92
|
stopped; relay the `retry` lines it printed.
|
|
93
93
|
- A `waiting for your answer:` block is status `NEEDS_INPUT`: relay each question verbatim and
|
|
94
94
|
pass it with `retry <plan> <id> --answer "<reply>"`. Never answer for the user; nothing else
|
|
95
95
|
resumes it.
|
|
96
96
|
- A task at `NEEDS_DECISION` waits for the user. Present `tasks/<id>/decision.md`'s reasons and
|
|
97
97
|
choices. Run `retry --decide`, `retry --dwarf` or `accept` (with `--reason` and `--approved`)
|
|
98
|
-
only on the user's explicit word, never to keep a run going
|
|
98
|
+
only on the user's explicit word, never to keep a run going; on a live run use `forge control
|
|
99
|
+
retry … --decide` or `forge control accept`, which the scheduler applies. Nothing else resumes it. The
|
|
99
100
|
split choice replaces the row in `tasks.tsv` and is a later `run`
|
|
100
101
|
([when reviews don't converge](references/decompose.md#when-reviews-dont-converge)); do that
|
|
101
102
|
only when the user asks.
|
|
@@ -125,6 +126,18 @@ For explanation requests, explain the workflow without spending model quota.
|
|
|
125
126
|
fail-open, and never change a task's tier, select a model, or substitute for QA acceptance
|
|
126
127
|
or repository verification (`--jev-act` is still accepted and changes nothing). Read
|
|
127
128
|
[Decision models](references/decision-models.md) when selected.
|
|
129
|
+
- **Retro, brief and summaries are opt-in:** offer them, never add them unprompted. Brief and
|
|
130
|
+
summaries need a model the user names (`--brief-model`, `--summaries-model` or `forge config
|
|
131
|
+
set`); forge never picks one. With brief on, relay the questions from `forge brief show <plan>`,
|
|
132
|
+
pass the user's answers with `forge brief answer`, and never answer for the user. A strict brief
|
|
133
|
+
run exits `3` before any task starts while questions are open. With retro on, record each
|
|
134
|
+
obstacle with `forge retro note <plan> --type T --fixable-by F --summary S` (`T`: `environment`,
|
|
135
|
+
`sandbox`, `tooling`, `prompt`, `forge-bug` or `other`; `F`: `user`, `forge` or `unsure`), and at
|
|
136
|
+
the end of the run relay the groups in `<plan>/retro.md`. `forge retro issues` posts only on the
|
|
137
|
+
user's approval of the exact text it prints (`--apply --approve <hash>`). Details:
|
|
138
|
+
[retro notes](references/decompose.md#retro-notes-opt-in),
|
|
139
|
+
[brief mode](references/decompose.md#brief-mode-opt-in),
|
|
140
|
+
[task summaries](references/decompose.md#task-summaries-opt-in).
|
|
128
141
|
|
|
129
142
|
## Common workflow
|
|
130
143
|
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.18
|
package/docs/artifacts.md
CHANGED
|
@@ -35,6 +35,14 @@ A solo run also records, for forge-ui and for you:
|
|
|
35
35
|
qa_threshold only with --qa-threshold: P0-P3 or none; without it the default P2 applies
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
+
Review snapshots (`review-*` directories, a full export of the reviewed tree) exist only while their
|
|
39
|
+
review runs. A dwarf's or reviewer's log copy under `attempts/` may be `<role>.log.gz` once `forge runs
|
|
40
|
+
compact --logs` has run: the same bytes, gzipped. See [forge runs compact](commands.md#forge-runs-compact).
|
|
41
|
+
|
|
42
|
+
Outside every repo, beside the run registry (`<config home>/forge/runs/`), `<config home>/forge/locations.jsonl`
|
|
43
|
+
lists every run dir and worktree forge created, with its repository, and when forge removed it. See
|
|
44
|
+
[forge du](commands.md#forge-du).
|
|
45
|
+
|
|
38
46
|
Plus, in the repo itself and surviving the run:
|
|
39
47
|
|
|
40
48
|
```
|
package/docs/commands.md
CHANGED
|
@@ -16,16 +16,21 @@ harness (`/forge`); this command installs forge and drives its optional tools.
|
|
|
16
16
|
| `forge version [--check]` | the installed version, and whether a newer release is out |
|
|
17
17
|
| `forge fractal …` | opt-in Fractal execution; see [the command group](fractal.md#forge-fractal-command-group) |
|
|
18
18
|
| `forge runs [--repo DIR \| --all] [--limit N] [--json]` | this repo's recent runs, newest first: run id, kind, age, task states, verification and final review, goal, and the run dir. Read-only; the same summaries forge-ui shows |
|
|
19
|
-
| `forge control show\|set\|pin\|unpin\|drain\|resume\|stop\|retry\|add PLAN_DIR …` | change a live plan: `set` takes `qa-threshold` (`P0`..`P3`, `none` or `default` for the plan, `inherit` per task), `timeout`, `escalate-after`, `escalate-effort` (`on`/`off`), `verify-retries`, `infra-backoff` (a backoff shape; `none` drops it), `infra-fallback` (`on`/`off`), `max-attempts` (a non-negative integer, `0` = no cap, and only with `--confirm`), `converge-window` (a non-negative integer), `pre-review-tests` (`on`/`off`), `pre-review-parallel` (1-64), `retry-budget`, `infra-retries` or `max-parallel` (1-64) (the last three only while a scheduler runs; `--task ID` for `qa-threshold` and `
|
|
20
|
-
| `forge config show [--repo DIR] [--json]` / `forge config set <key> <value> [--repo DIR] [--json]` / `forge config unset <key> [--repo DIR] [--json]` | one view of every config source (registry, the legacy Jev file, decide, the repo's `.forge/verify`, `setup` and `verify-subset`, dataset, `FORGE_*` variables with secrets hidden); `set` / `unset` edit `repo.verify`, `repo.setup`, `repo.verify-subset` (must contain `{files}` or `{changed}`; `--repo` required) and `decide.gate.<gate>`, `decide.gate.<gate>.provider`, `decide.gate.<gate>.model` (`off`, `shadow` or `on`; those write the user level and do not need `--repo`). Unset of a `decide.gate.*` key is refused: set the mode to `off`. `-` as a value reads stdin for the per-repo files. Exit 2 on invalid input |
|
|
19
|
+
| `forge control show\|set\|pin\|unpin\|drain\|resume\|stop\|retry\|add PLAN_DIR …` | change a live plan: `set` takes `qa-threshold` (`P0`..`P3`, `none` or `default` for the plan, `inherit` per task), `timeout`, `escalate-after`, `escalate-effort` (`on`/`off`), `verify-retries`, `infra-backoff` (a backoff shape; `none` drops it), `infra-fallback` (`on`/`off`), `max-attempts` (a non-negative integer, `0` = no cap, and only with `--confirm`), `converge-window` (a non-negative integer), `pre-review-tests` (`on`/`off`), `pre-review-parallel` (1-64), `summaries` (`on`/`off`; on a finished run it also starts `forge summarize`), `retry-budget`, `infra-retries` or `max-parallel` (1-64) (the last three only while a scheduler runs; `--task ID` for `qa-threshold`, `retry-budget` and `summaries`, value `inherit` drops the override); `pin PLAN_DIR TASK SPEC` sets the model the task's next full retry uses once, `unpin` drops it. While a scheduler runs: `drain` starts nothing new until `resume` (a run with nothing left to start ends as usual); `stop [--now]` ends the run once the running tasks finish (`--now` interrupts them; `run` exits 130 without verifying, unless every task had merged by then: it then verifies and exits 0 as usual); `retry PLAN_DIR TASK [--dwarf SPEC]` queues a retry, and a `NEEDS_DECISION` task instead needs `--decide retry=N` or `--decide threshold=Pn`, or `--dwarf SPEC`, each with `--reason TEXT --approved`; `add PLAN_DIR TASK` (a row appended to `tasks.tsv`) queues a request the scheduler applies or refuses. `show` (`--json` for JSON) also says whether the run is drained or stopping, prints an `INFRA` task's cause, and, while a scheduler is live, lists each infrastructure pause with its reset and "needs you". The text table lists each task's attempts against its cap (`9/8`, or `9/-` when there is no cap). Every change and every request's outcome is logged in `control.log`. Exit 2 invalid input, 3 refused. See [live controls](decomposed-runs.md#changing-a-run-while-it-works) |
|
|
20
|
+
| `forge config show [--repo DIR] [--json]` / `forge config set <key> <value> [--repo DIR] [--json]` / `forge config unset <key> [--repo DIR] [--json]` | one view of every config source (registry, the legacy Jev file, decide, the user `features`, the repo's `.forge/verify`, `setup` and `verify-subset`, dataset, `FORGE_*` variables with secrets hidden); `set` / `unset` edit `repo.verify`, `repo.setup`, `repo.verify-subset` (must contain `{files}` or `{changed}`; `--repo` required) and `decide.gate.<gate>`, `decide.gate.<gate>.provider`, `decide.gate.<gate>.model` (`off`, `shadow` or `on`; those write the user level and do not need `--repo`). They also set the user feature keys: `retro` (`off` or `on`), `brief` (`off`, `advisory`, `gated` or `strict`), `brief.scope` (`task`, `wave` or `plan`), `brief.model` (a spec), `summaries` (`off` or `on`), `summaries.model` (a spec), `storage.compact` (`auto`, the default, or `off`) and `storage.warn-gb` (gigabytes, `20` by default, or `off`; see [forge du](#forge-du)). Those write the user file and ignore `--repo`; `unset` removes one key. A bad value exits 2 and writes nothing. A model spec is checked for its form when it is set; whether it resolves is checked when `plan` uses it. Unset of a `decide.gate.*` key is refused: set the mode to `off`. `-` as a value reads stdin for the per-repo files. Exit 2 on invalid input |
|
|
21
21
|
| `forge config profile list\|show\|create\|edit\|set\|unset\|rm\|use` | named bundles of routing, policy, gates and budget in `decide.json`; see [below](#forge-config-profile) |
|
|
22
22
|
| `forge watch [RUN_DIR \| --repo DIR \| --all] [--interval S] [--settle S] [--until-done] [--no-notify] [--exec CMD]` | follow runs live: a line for every task status change, and a desktop notification, `--exec CMD` and the repo's `.forge/on-finish` when a run finishes or fails, a task fails or a final review gives its verdict; see [below](#forge-watch). Read-only |
|
|
23
23
|
| `forge runs rm RUN_DIR [--dry-run] [--yes] [--no-archive] [--worktrees] [--branches] [--json]` | delete a run directory but keep what it taught the dataset; see [below](#forge-runs-rm) |
|
|
24
|
+
| `forge runs compact [RUN_DIR … \| --repo DIR \| --all] [--logs] [--older-than DAYS] [--dry-run] [--json]` | keep every run and take back what it holds for nothing: leftover review snapshots and, with `--logs`, gzipped log copies; see [below](#forge-runs-compact) |
|
|
25
|
+
| `forge du [--repo DIR \| --all] [--top N] [--json]` | what forge takes on disk (run dirs, worktree folders, its data home) and the command that takes each part back; see [below](#forge-du). Read-only |
|
|
24
26
|
| `forge runs rerun RUN_DIR --dwarf SPEC [--qa SPEC] [--to DIR] [--max-parallel N] [--dry-run] [--run --yes]` | set up the same plan again with another implementer, from the same starting commit; spends nothing unless `--run --yes`; never merges. See [below](#forge-runs-rerun-and-compare) |
|
|
25
27
|
| `forge runs compare RUN_A RUN_B [--json] [--no-record]` | two runs of one plan, side by side, per task; records the pair in the dataset |
|
|
26
28
|
| `forge memory show\|learnings\|prune\|spend REPO …` | a repository's project memory; `learnings REPO --json` lists every learning in its ledger with what forge does with it (`in_memory`, `waiting` for a second run, `stale`, `capped`, `muted`), from forge-memory.sh's own rebuild, without changing the repository. See [project memory](memory.md) |
|
|
27
29
|
| `forge issues RUN [--apply] …` | file the review findings a run left open as GitHub issues; see [below](#forge-issues) |
|
|
28
30
|
| `forge pr [RUN_DIR \| --repo DIR] [--texts] [--paths] [--out FILE] [--create [--base B] [--head B]]` | a draft pull-request description for a finished run, on stdout; `--create` opens it as a draft PR with `gh`; see [below](#forge-pr) |
|
|
31
|
+
| `forge retro note\|report\|issues PLAN …` | retro notes on what got in a run's way (`plan --retro`): `note` records one by hand (`--type`, `--fixable-by`, `--summary`, and `--command`, `--exit`, `--error`, `--blocking`, `--tried` as needed), `report` writes `retro.md`, and `issues` drafts GitHub issues for forge's own repository and posts only with `--apply --approve HASH`. `record` is forge's own call after a dispatch. Exit 2 usage, 3 refused. See [retro notes](../references/decompose.md#retro-notes-opt-in) |
|
|
32
|
+
| `forge brief write\|show\|answer\|stale PLAN …` | each task's open questions, asked before it starts (`plan --brief`): `write` asks the missing ones, `show` lists them (`--task`, `--json`), `answer PLAN TASK QID TEXT` records an answer (`--file F`, `--actor`), and `stale PLAN TASK` flags dependents' open questions after a merge. Exit 2 usage or an unknown task or question; 3 when PLAN is not a plan dir, or, for `write` and `show`, when brief is off for it. See [brief mode](../references/decompose.md#brief-mode-opt-in) |
|
|
33
|
+
| `forge summarize PLAN [--task ID] [--force] [--json]` | a generated summary per task (`plan --summaries on`), in `tasks/<id>/summary.json`, rewritten only when its facts change. Exit 2 usage, 3 when PLAN is not a directory. See [task summaries](../references/decompose.md#task-summaries-opt-in) |
|
|
29
34
|
| `forge ui open\|status\|stop` | forge-ui, the run viewer; see [the command group](forge-ui.md#forge-ui-command-group) |
|
|
30
35
|
| `forge dataset …` | every run's inputs and outcomes; see [run dataset](dataset.md) |
|
|
31
36
|
| `forge decide …` | decision-model gates, providers, budgets and the privacy floor; see [below](#forge-decide) |
|
|
@@ -91,6 +96,55 @@ reports; `--yes` skips the prompt for the run id (needed without a terminal); `-
|
|
|
91
96
|
object, on failure too. Exit 0 ok, 2 refused input, 3 busy or the run is active, 4 failed during
|
|
92
97
|
deletion or the run directory was kept (the same command finishes the job).
|
|
93
98
|
|
|
99
|
+
### `forge runs compact`
|
|
100
|
+
|
|
101
|
+
Keeps every run on disk, viewable in forge-ui and in the dataset, and takes back what it holds for
|
|
102
|
+
nothing. Per run, holding the run's own lock as `forge runs rm` does:
|
|
103
|
+
|
|
104
|
+
1. **preserve**: a strict dataset import of the run, as `forge runs rm` starts with; if any event cannot
|
|
105
|
+
be stored, nothing in that run is touched;
|
|
106
|
+
2. **snapshots**: every review snapshot is removed (a `review` or `review-*` directory with a `.git`, beside
|
|
107
|
+
a `review.base`). Nothing reads one once its review has ended, and since 0.18 forge removes each one
|
|
108
|
+
then; these are older runs' and interrupted reviews' leftovers;
|
|
109
|
+
3. **logs** (`--logs`): each dwarf's and reviewer's log copy in its execution record
|
|
110
|
+
(`attempts/<role>-<id>/<role>.log`, 64 KB or more) becomes `<role>.log.gz`, with the same mode and
|
|
111
|
+
times; forge-ui reads either the same way. The logs in task dirs, which running agents write and
|
|
112
|
+
retries read, are never touched;
|
|
113
|
+
4. **record**: the dataset event `run_compacted`.
|
|
114
|
+
|
|
115
|
+
It never touches an active run, a worktree, or anything forge does not create: a dependency install
|
|
116
|
+
or a `.git` found inside a run dir is reported with its size (`stray`) and left in place. Name run dirs,
|
|
117
|
+
or take every registered run of a repository (`--repo DIR`) or of every repository (`--all`); there an
|
|
118
|
+
active run, or one changed within the hour, is skipped. `--older-than DAYS` keeps to runs unchanged that
|
|
119
|
+
long; `--dry-run` changes nothing and says what would go; `--json` prints one object. Exit 0 ok, 2
|
|
120
|
+
refused input, 3 the one run named is active, 4 failed. On a real 2.3 GB plan dir it took back
|
|
121
|
+
2.2 GB, and forge-ui showed every conversation and check as before.
|
|
122
|
+
|
|
123
|
+
**At run start** (`run` and solo runs), forge starts the same compaction with `--logs` in the background
|
|
124
|
+
for the repository's other runs (`storage.compact auto`, the default; `forge config set storage.compact
|
|
125
|
+
off` or `FORGE_STORAGE_COMPACT=off` turns it off; `FORGE_KEEP_SNAPSHOTS=1` keeps snapshots), measures the
|
|
126
|
+
repository's footprint, and warns on stderr when the last measurement passed `storage.warn-gb` (20 GB by
|
|
127
|
+
default; `off` turns it off). A run never waits for it or fails over it. forge never deletes a run on its
|
|
128
|
+
own: that stays `forge runs rm`.
|
|
129
|
+
|
|
130
|
+
### `forge du`
|
|
131
|
+
|
|
132
|
+
forge knows where to look from its location list, `<config home>/forge/locations.jsonl`
|
|
133
|
+
(`scripts/forge_locations.py`): every run dir and worktree forge creates is added as it is made, with its
|
|
134
|
+
repository's git dir and main working tree, and marked gone when forge removes it. A checkout deleted by hand or
|
|
135
|
+
reached through a symlink hides nothing. It is written whatever `FORGE_DATASET` says (`FORGE_RUN_REGISTRY=off`
|
|
136
|
+
turns it off with the registry), and the first `forge du` or `forge runs compact --repo|--all` fills it once
|
|
137
|
+
from the run registry and the worktrees on disk. It records what forge did; what is there now is always
|
|
138
|
+
read from the disk and git.
|
|
139
|
+
|
|
140
|
+
What forge takes on disk, for the repository at the current directory, `--repo DIR`, or every
|
|
141
|
+
repository (`--all`): each registered run dir (total, review snapshots, logs, other files, anything
|
|
142
|
+
forge does not create, and what `forge runs compact --logs` would take back), each run's worktree
|
|
143
|
+
folder, and forge's data home (the dataset and its blobs, which are kept, archives, exports, legacy
|
|
144
|
+
files). It ends with the commands that take each part back. Sizes are disk usage, as `du` counts it;
|
|
145
|
+
every file is visited, so a large tree takes a while. It reads only, apart from keeping the totals for
|
|
146
|
+
the `storage.warn-gb` check. forge-ui's **Disk** screen shows the same report.
|
|
147
|
+
|
|
94
148
|
### `forge runs rerun` and `forge runs compare`
|
|
95
149
|
|
|
96
150
|
`forge runs rerun <run-dir> --dwarf SPEC` answers "would this plan have gone better on another
|
|
@@ -412,8 +466,9 @@ Resolves a spec into a real CLI invocation and runs it. Needs only bash and core
|
|
|
412
466
|
is the point: it behaves identically no matter which harness is orchestrating.
|
|
413
467
|
|
|
414
468
|
```
|
|
415
|
-
forge-dispatch.sh doctor --spec <spec> [--role dwarf|qa|planner] [--service-tier fast]
|
|
469
|
+
forge-dispatch.sh doctor --spec <spec> [--role dwarf|qa|planner|side] [--service-tier fast]
|
|
416
470
|
forge-dispatch.sh dwarf <spec> --prompt-file <f> [--repo <dir>] [--run-dir <d>] [--yolo] [--dry-run]
|
|
471
|
+
forge-dispatch.sh side <spec> --prompt-file <f> [--repo <dir>] [--run-dir <d>] [--yolo] [--dry-run]
|
|
417
472
|
forge-dispatch.sh qa <spec> --prompt-file <f> [--repo <dir>] [--run-dir <d>] [--yolo] [--dry-run]
|
|
418
473
|
[--native-review [--review-base <ref>]]
|
|
419
474
|
forge-dispatch.sh planner <spec> --prompt-file <f> [--repo <dir>] [--run-dir <d>] [--dry-run]
|
|
@@ -608,6 +663,8 @@ forge-parallel.sh plan <plan-dir> --repo <dir> [routing flags] [--planner <
|
|
|
608
663
|
[--qa-threshold P0|P1|P2|P3|none|default]
|
|
609
664
|
[--profile NAME | --no-profile] [--fast ROLES] [--collapse-chains]
|
|
610
665
|
[--max-attempts N] [--converge-window N] [--no-infra-fallback]
|
|
666
|
+
[--retro | --no-retro] [--brief advisory|gated|strict|off] [--brief-scope task|wave|plan]
|
|
667
|
+
[--brief-model SPEC] [--summaries on|off] [--summaries-model SPEC]
|
|
611
668
|
forge-parallel.sh auto <plan-dir> --repo <dir> --goal-file <file> [--planner <spec>]
|
|
612
669
|
[--decompose-level L] [--plan auto|always|never]
|
|
613
670
|
[--one-task-difficulty low|medium|high]
|
|
@@ -682,8 +739,14 @@ forge-parallel.sh combine <new-plan-dir> <plan-dir> <plan-dir>... [--verify <c
|
|
|
682
739
|
| `--no-profile` | plan | removes `profile.json` | no profile. `routed.json` stays |
|
|
683
740
|
| `--fast ROLES` | plan | `fast` | which of `dwarf`, `qa`, `planner`, `review` ask for the fast tier (`all` or `none`). Omitted on a re-plan, the file stays; `none` removes it. See [below](#the-fast-tier) |
|
|
684
741
|
| `--collapse-chains` | plan | no — this call only | merge a chain into one task named `combined`, after validation and before routing. A one-task or branching plan is unchanged. An already collapsed plan is not an error. See [below](#collapse-chains) |
|
|
685
|
-
|
|
686
|
-
|
|
742
|
+
| `--retro` / `--no-retro` | plan | `retro_mode` | agents record what got in their way, as retro notes. Off by default. Without either flag the plan keeps its earlier choice; a first plan takes the user setting (`forge config set retro on`). See [retro notes](../references/decompose.md#retro-notes-opt-in) |
|
|
743
|
+
| `--brief advisory\|gated\|strict\|off` | plan | `brief` | one read-only dispatch per task writes its open questions before the task starts. `advisory` lets the run go on, `gated` holds a task with an unanswered must-answer question, and `strict` makes `run` exit `3` while any question is open. `off` turns it off. On needs `--brief-model` (or `forge config set brief.model`), else exit `2`. See [brief mode](../references/decompose.md#brief-mode-opt-in) |
|
|
744
|
+
| `--brief-scope task\|wave\|plan` | plan | `brief_scope` | which questions act. Default `task`; only `task` acts so far, and `wave` or `plan` questions are parked in `brief.parked.json`. Only with brief on |
|
|
745
|
+
| `--brief-model SPEC` | plan | `brief_model` | the model that writes the questions. Required with brief on; forge never picks one |
|
|
746
|
+
| `--summaries on\|off` | plan | `summaries` | a generated summary per task in `tasks/<id>/summary.json`, rewritten only when its facts change. Off by default. See [task summaries](../references/decompose.md#task-summaries-opt-in) |
|
|
747
|
+
| `--summaries-model SPEC` | plan | `summaries_model` | the model that writes the summaries. Required with summaries on; forge never picks one |
|
|
748
|
+
|
|
749
|
+
**Exit codes:** `0` ok · `2` usage or validation · `3` precondition (not a git repo, …), and `run` on a strict brief plan with open questions (nothing starts) ·
|
|
687
750
|
`4` **`plan` only: the plan gates sent work back** (see below); **`auto`:** the planner failed, its reply was refused, or the gates sent items back a second time ·
|
|
688
751
|
`5` some task failed QA, the combined verification failed, or a task is still waiting for an
|
|
689
752
|
answer or a decision · `6` integration conflict ·
|
|
@@ -938,7 +1001,8 @@ resumes that same task. Only `retry <plan> <id> --decide retry=N` or `--decide t
|
|
|
938
1001
|
`accept`, does. To resume several at once, add `--no-dispatch` to each `retry`, which records the
|
|
939
1002
|
decision and starts nothing, then `run` the plan. Replacing it is a hand
|
|
940
1003
|
edit of `tasks.tsv` before the next `run`, as the summary says (`forge control add` queues a new
|
|
941
|
-
row but does not replace the stopped one). A live scheduler takes the same flags as `forge control retry
|
|
1004
|
+
row but does not replace the stopped one). A live scheduler takes the same flags as `forge control retry`, and
|
|
1005
|
+
`forge control accept <plan> <id> --reason "…" --approved` for `accept`. A run that ends with such a
|
|
942
1006
|
task still in `tasks.tsv` and unmerged exits `5`. See
|
|
943
1007
|
[when reviews don't converge](../references/decompose.md#when-reviews-dont-converge).
|
|
944
1008
|
|
package/docs/dataset.md
CHANGED
|
@@ -46,5 +46,10 @@ import also reads a plan's `escalations.tsv` (with who decided: `policy`, `retry
|
|
|
46
46
|
`control.log`, so human interventions made with `forge control` are in the dataset as
|
|
47
47
|
`control` events. See [forge runs rm](commands.md#forge-runs-rm).
|
|
48
48
|
|
|
49
|
+
Keeping a run but taking back its space keeps the dataset too. `forge runs compact` starts with the same
|
|
50
|
+
strict import, then removes the run's leftover review snapshots (which the importer never reads) and,
|
|
51
|
+
with `--logs`, gzips its log copies (which the dataset does not store), and records `run_compacted`. A
|
|
52
|
+
second import of a compacted run adds no event. See [forge runs compact](commands.md#forge-runs-compact).
|
|
53
|
+
|
|
49
54
|
Capture is fail-open and never read by anything that builds a prompt. See
|
|
50
55
|
[references/dataset.md](../references/dataset.md) for the event schema and its invariants.
|
package/docs/decomposed-runs.md
CHANGED
|
@@ -250,6 +250,7 @@ forge control stop <plan-dir> # finish what runs, start noth
|
|
|
250
250
|
forge control stop <plan-dir> --now # interrupt the running tasks too, like Ctrl-C
|
|
251
251
|
forge control retry <plan-dir> docs --dwarf sol:high # queue a retry of a stopped or failed task
|
|
252
252
|
forge control add <plan-dir> docs-fix # queue a row you appended to tasks.tsv (with its prompt.md)
|
|
253
|
+
forge control accept <plan-dir> docs --reason "the P2 is a test-only nit" --approved # queue an accept
|
|
253
254
|
```
|
|
254
255
|
|
|
255
256
|
A stop skips verification and exits 130, unless every task had merged by then, and a drain
|
|
@@ -260,6 +261,13 @@ control show` lists the log). A retry is prepared exactly as `forge-parallel.sh
|
|
|
260
261
|
so a task the policy stopped needs `--dwarf`; it spends no automatic retry budget. An added row
|
|
261
262
|
may depend only on tasks the run already knows. Neither outlives the run that was live when it
|
|
262
263
|
was queued, and both are refused once the run is stopping.
|
|
264
|
+
`accept` is `forge-parallel.sh accept` for a live run, which holds the plan lock that command
|
|
265
|
+
needs. It takes a `FAIL`, `UNKNOWN` or `NEEDS_DECISION` task that is neither running nor queued,
|
|
266
|
+
with `--reason` and `--approved`: the findings become known issues, the task merges, and the tasks
|
|
267
|
+
waiting on it start in the same run. `control.log` records who asked (`--actor`) and why, and
|
|
268
|
+
`tasks/<id>/accepted.by` the same. With no live run it is refused and names the plain `accept`.
|
|
269
|
+
A forge command the plan lock refuses says which command holds it (pid and since when), and on a
|
|
270
|
+
live run which `forge control` command to use instead.
|
|
263
271
|
|
|
264
272
|
Each change is validated, written under `control.lock`, and says when it applies:
|
|
265
273
|
|
package/docs/forge-ui.md
CHANGED
|
@@ -80,6 +80,17 @@ running task it shares files with, no free slot, a drain or stop, an infrastruct
|
|
|
80
80
|
its countdown, or the retry policy's stop with the split it proposes. The run's inspector says
|
|
81
81
|
what the scheduler is doing and how many tasks wait on what.
|
|
82
82
|
|
|
83
|
+
A task's inspector opens on its header: its title and goal, its links (`#N` and GitHub issue and pull
|
|
84
|
+
request URLs; `#N` links to the repo's GitHub origin when there is one), and the Prompt, Approach and
|
|
85
|
+
Acceptance criteria buttons. Then comes its attempt trail, one line per attempt with the reason it ran
|
|
86
|
+
(for example *after review findings* or *escalated to a stronger model*). Then its Summary: the
|
|
87
|
+
generated summary, the model and time it was made, its sources, and an *Out of date* mark once the
|
|
88
|
+
task has changed since. Then its Questions: the brief questions, each with an answer box, and parked
|
|
89
|
+
questions behind a collapsed block. A solo run has the header and the trail only. Above a plan's task
|
|
90
|
+
table sit its open brief questions, flagged first and then by projected start, and the summaries switch.
|
|
91
|
+
A run with a retro report or notes shows a Retro section in its run details: the note counts on one line,
|
|
92
|
+
then the report, collapsed.
|
|
93
|
+
|
|
83
94
|
Under each attempt's dwarf and reviewer are the checks they ran, read from their logs: each
|
|
84
95
|
test, type check, lint or build with its exit, its time and the counts it printed, a failed
|
|
85
96
|
one's last lines, and a link to that command in the conversation. Each attempt then says which
|
|
@@ -105,7 +116,7 @@ forge-ui reads everything, and it changes things only by calling forge's own com
|
|
|
105
116
|
never writes a run file, a repo or a config itself. That keeps one set of rules (validation,
|
|
106
117
|
locks, the audit log) whichever way you change something, and a change from the page is
|
|
107
118
|
indistinguishable from the same command typed in a terminal, except that `control.log` says
|
|
108
|
-
`ui` instead of `cli`. Every change asks you to confirm and says when it takes effect
|
|
119
|
+
`ui` instead of `cli`. Every change asks you to confirm and says when it takes effect, except a brief answer, which is sent when you press *Send*.
|
|
109
120
|
|
|
110
121
|
- **Run controls** (a plan's inspector): the QA threshold (shown with its source, `P2 (default)`
|
|
111
122
|
or `P1 (set)`); it accepts `P0`–`P3`, *Default* (drop the setting; P2) and *None* (P3, nothing
|
|
@@ -130,6 +141,10 @@ indistinguishable from the same command typed in a terminal, except that `contro
|
|
|
130
141
|
what `memory.md` gives each role and each learning's state, as `forge memory learnings` reports it.
|
|
131
142
|
Runs and checkouts that are gone are read from the dataset, and those rows say so. Reachable from the
|
|
132
143
|
header, a run's repository name and each map district.
|
|
144
|
+
- **Disk (`#/disk`):** what forge takes on disk in every repository it has runs for (each run dir's
|
|
145
|
+
review snapshots, logs and anything forge does not create, each run's worktree folder, the data home),
|
|
146
|
+
what can go without losing a run, and the command that takes it back (`forge runs compact`), to copy.
|
|
147
|
+
The same report as `forge du --all`; measured in the background when the screen opens.
|
|
133
148
|
- **Worktrees (`#/worktrees`):** every worktree forge created, in any repository it knows: its
|
|
134
149
|
run, task, branch, last commit, size and status (in use, uncommitted changes, locked, needed by
|
|
135
150
|
the run, failed task, finished, missing on disk, not forge's, unknown to git, removed), and the
|
|
@@ -154,13 +169,19 @@ indistinguishable from the same command typed in a terminal, except that `contro
|
|
|
154
169
|
the repository through one of its runs, from a list grouped by repository that shows each
|
|
155
170
|
run's worktree and branch (arrow keys and typing work in it), and the page names the
|
|
156
171
|
directory the configuration was read from.
|
|
172
|
+
- **Summaries:** a switch above a plan's task table turns summaries on or off for the run. A task's own
|
|
173
|
+
switch, in its Summary section, sets it to *On*, *Off* or *Inherit* (the run's setting). Each change is
|
|
174
|
+
confirmed first. Turning them on for a finished run starts `forge summarize` in the background.
|
|
175
|
+
- **Brief answers:** each brief question in a task's inspector has an answer box, and *Send* records the
|
|
176
|
+
answer (`forge brief answer`, logged as `ui`). A late answer, given after the task started, shows the
|
|
177
|
+
CLI's notice under its question. Answers are sent at once, without a confirm.
|
|
157
178
|
|
|
158
179
|
Writing is protected, because anything that can reach the server could otherwise change your
|
|
159
180
|
runs. The server makes a random token each time it starts and puts it in the page it serves;
|
|
160
181
|
the page sends it with every change, and the server also checks the `Host` and `Origin`
|
|
161
182
|
headers, so another website open in your browser cannot make your browser change a run. Reading
|
|
162
183
|
needs no token. `--read-only` (or `FORGE_UI_READONLY=1`) turns writing off altogether: no
|
|
163
|
-
token is issued and every change is refused. `FORGE_UI_READONLY=1 forge ui open` starts such a
|
|
184
|
+
token is issued and every change is refused. The summaries and the questions still show, without their switches and answer boxes. `FORGE_UI_READONLY=1 forge ui open` starts such a
|
|
164
185
|
server, and the launcher never reuses a server running in the other mode; it replaces it.
|
|
165
186
|
|
|
166
187
|
Also: replay, critical path, Fractal child-task trees, quick jump (Ctrl K, ⌘K on a Mac, or
|
package/docs/memory.md
CHANGED
|
@@ -62,6 +62,8 @@ Only `verify` and `trap` are kept on first sighting — those are facts, true th
|
|
|
62
62
|
QA is not told the build command; it is not building anything. It *is* told the recurring
|
|
63
63
|
findings, so it can notice this is the fourth time the same bug shipped.
|
|
64
64
|
|
|
65
|
+
Retro notes are not memory: they never go to `.forge/memory.md` or the ledger, and no prompt reads them back ([retro notes](../references/decompose.md#retro-notes-opt-in)).
|
|
66
|
+
|
|
65
67
|
`.forge/` is the **only** thing forge writes into your working tree rather than onto a branch
|
|
66
68
|
of its own. It is excluded from every captured diff, so a reviewer never sees it as the
|
|
67
69
|
dwarf's work — but it *will* show up as untracked in `git status` after your first run.
|
package/docs/safety.md
CHANGED
|
@@ -22,6 +22,14 @@ What forge never does to your branch and working tree, what it refuses to run on
|
|
|
22
22
|
after `results.tsv` is written and read back.
|
|
23
23
|
- QA runs in a disposable repository. Mutations to the source or review snapshot invalidate
|
|
24
24
|
acceptance. Disabled editing tools alone do not prevent writes through Bash.
|
|
25
|
+
- A review snapshot is as large as the repository's tree, so forge removes it once its review
|
|
26
|
+
ends: task, final, shadow, solo and adopt reviews, whatever the outcome. `review.base`,
|
|
27
|
+
`review.deps`, the prompt, the log and the verdict stay beside it. `FORGE_KEEP_SNAPSHOTS=1`
|
|
28
|
+
keeps snapshots, for debugging. A review ended by a signal can leave its snapshot behind; the
|
|
29
|
+
task's next review, or the plan's next final review, removes it, and so does `forge runs compact`.
|
|
30
|
+
- `forge runs compact` and the background compaction at run start never touch an active run (they
|
|
31
|
+
hold its lock), a worktree, or a file forge does not create, and they import the run into the
|
|
32
|
+
dataset strictly before anything goes. Log copies are gzipped, never deleted.
|
|
25
33
|
|
|
26
34
|
## Preconditions
|
|
27
35
|
|
package/forge
CHANGED
|
@@ -26,7 +26,11 @@ usage() {
|
|
|
26
26
|
' memory a repository'"'"'s project memory: show, learnings --json (each learning and its state), prune' \
|
|
27
27
|
' pr a draft pull-request description for a finished run (--create opens it with gh)' \
|
|
28
28
|
' ui forge-ui, the run viewer: open [DIR], status, stop' \
|
|
29
|
-
' runs this repo'"'"'s recent runs in the terminal: state, verdicts and run dirs;
|
|
29
|
+
' runs this repo'"'"'s recent runs in the terminal: state, verdicts and run dirs; compact, rm, rerun with another model, compare' \
|
|
30
|
+
' du what forge takes on disk (run dirs, worktrees, data home) and the command that takes each part back' \
|
|
31
|
+
' retro notes on what got in a run'"'"'s way, kept on this machine' \
|
|
32
|
+
' summarize a task'"'"'s generated summary, rewritten only when its inputs change' \
|
|
33
|
+
' brief each task'"'"'s open questions, asked before it starts: write, show' \
|
|
30
34
|
' watch follow runs live and get a desktop notification when one finishes or fails' \
|
|
31
35
|
' control a plan'"'"'s live controls: show, set (QA threshold, retries, timeouts), pin, unpin' \
|
|
32
36
|
' config every config source: show, and set/unset the per-repo .forge files and Jev on/off' \
|
|
@@ -122,6 +126,25 @@ case "${1:-}" in
|
|
|
122
126
|
shift
|
|
123
127
|
exec python3 "$ROOT/scripts/forge-runs.py" "$@"
|
|
124
128
|
;;
|
|
129
|
+
du)
|
|
130
|
+
shift
|
|
131
|
+
exec python3 "$ROOT/scripts/forge-du.py" "$@"
|
|
132
|
+
;;
|
|
133
|
+
retro)
|
|
134
|
+
shift
|
|
135
|
+
help_if_bare $# python3 "$ROOT/scripts/forge-retro.py"
|
|
136
|
+
exec python3 "$ROOT/scripts/forge-retro.py" "$@"
|
|
137
|
+
;;
|
|
138
|
+
summarize)
|
|
139
|
+
shift
|
|
140
|
+
help_if_bare $# python3 "$ROOT/scripts/forge-summarize.py"
|
|
141
|
+
exec python3 "$ROOT/scripts/forge-summarize.py" "$@"
|
|
142
|
+
;;
|
|
143
|
+
brief)
|
|
144
|
+
shift
|
|
145
|
+
help_if_bare $# python3 "$ROOT/scripts/forge-brief.py"
|
|
146
|
+
exec python3 "$ROOT/scripts/forge-brief.py" "$@"
|
|
147
|
+
;;
|
|
125
148
|
watch)
|
|
126
149
|
shift
|
|
127
150
|
exec python3 "$ROOT/scripts/forge-watch.py" "$@"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@giamme/forge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "Multi-model coding with a reviewer that reads the code: plan, build in parallel worktrees, review every real diff, merge only what passes.",
|
|
5
5
|
"keywords": ["claude-code", "codex", "opencode", "agent-skill", "code-review", "multi-model"],
|
|
6
6
|
"license": "MIT",
|
package/references/dataset.md
CHANGED
|
@@ -42,7 +42,12 @@ time order: an attempt that PASSed, then a merge that CONFLICTed, then a human `
|
|
|
42
42
|
| `event` `control` | `forge control` change | a human's live change: `at`, `actor` (`cli`/`ui`), `action` (`set`, `pin`, `unpin`), `key`, `value`, `previous`; task events carry the task id. Also read back from `control.log` by `import` |
|
|
43
43
|
| `event` `worktree_created` / `worktree_removed` | forge adds or removes a worktree | `path`, `branch` (`-` when detached), `kind` (`task`, `integration`, `candidate` for integrate's scratch worktree, `attribute` for the culprit search's), `repo_path`, and the task for a task worktree; `forge runs rm` adds `by`. Written at task and `_integration` creation, the merged-task cleanup at the end of `run`, integrate's candidate, every prefix of `attribute`, `combine` and `split` (a moved worktree is removed from the old run and created in the new one), and `forge runs rm --worktrees`. A worktree removed outside forge has no `worktree_removed`. forge-ui's Worktrees screen reads them through `forge dataset worktrees` |
|
|
44
44
|
| `event` `run_delete_started` / `run_deleted` | `forge runs rm` | written strictly around a run's deletion: `path`, `run_id`, `archive`, and for `run_deleted` the bytes freed |
|
|
45
|
+
| `event` `run_compacted` | `forge runs compact` (by hand, or `auto` in the background at run start) | after the strict import and the removals, fail-open: `path`, `bytes_freed`, `snapshots_removed`, `snapshot_bytes`, `logs_compressed`, `log_bytes_freed`, `auto` |
|
|
45
46
|
| `event` `shadow_review` | shadow review | how an opt-in second review ended (`done`, `invalid`, `overtime`, `orphaned`, ...), with the reviewed commit and both specs. Its dispatch is recorded with role `qa_shadow` |
|
|
47
|
+
| `event` `side_dispatch` | a brief or summary dispatch that `forge run`, `forge brief write`, `forge summarize` or the scheduler's summaries started, or could not start | `kind` (`brief` or `summary`), `task`, `spec`, `ok`, and `reason`: null on success, else `timeout`, `error`, `missing` or `cap`. Its dispatch is recorded with role `side_brief` or `side_summary` |
|
|
48
|
+
| `event` `retro_note` | a retro note stored by `forge retro note`, or by `forge retro record` after a dispatch | the note's fields (`type`, `fixable_by`, `summary`, `blocking`, `tried`, `evidence`), forge's context (`role`, `spec`, `alias`, `harness`, `effort`, `tier`, `task`, `attempt`, `run_id`, `version`, `os`, `t`) and `check` (`verified` or `claimed`). Fail-open: the plan's `retro/notes.jsonl` is the record |
|
|
49
|
+
| `event` `brief_question` | a brief question stored by `forge brief write` | `task`, `qid`, `scope`, `must_answer` (kept only under `gated`), and `parked`: true for a `wave` or `plan` question, which is kept in `brief.parked.json` |
|
|
50
|
+
| `event` `brief_answer` | an answer given with `forge brief answer` | `task`, `qid`, `actor` (`cli`, or `ui` from forge-ui), and `late`: true once the task has started. The answer is also logged in `control.log` as an `answer` change |
|
|
46
51
|
| `jev` | Jev request | site, answers, usage, latency, mode. Blob: the **full request** (state and questions). Its original sha is `jev.jsonl`'s `key`. A per-attempt gate's request state carries `run`, `task` and `attempt` (`dwarf-message`, `retry-addressed`), so its key differs per attempt and per run; `attribution` carries `run` only |
|
|
47
52
|
| `fractal_step` / `fractal_node` | Fractal step, node state | decomposition decision, iteration, resolved model, cost, tokens, candidate diff |
|
|
48
53
|
| `ledger` | ledger row | imported `.forge/ledger.tsv` rows |
|
|
@@ -73,6 +78,12 @@ the log does not say. `speed_reason` is why it was not fast (claude's
|
|
|
73
78
|
`fast_mode_disabled_reason`, or codex's error message), or null. Each is null when absent,
|
|
74
79
|
so a dispatch that predates the keys is otherwise unchanged.
|
|
75
80
|
|
|
81
|
+
A brief or summary is a side dispatch (`forge-dispatch.sh side`, read-only). Its dispatch is
|
|
82
|
+
recorded as role `side_brief` or `side_summary` (`forge_dataset.is_side_role`), and its files on
|
|
83
|
+
disk stay `side.*`. Review history, finding facts, review exports and forge-ui's model views
|
|
84
|
+
skip every `side_*` role, so a brief or summary is never counted as a review. A bare `side` is
|
|
85
|
+
the dispatch role itself, not one of these.
|
|
86
|
+
|
|
76
87
|
`plan --reviewer-session` writes `$PLAN/reviewer_session` (`on`). The plan event records
|
|
77
88
|
it in `options`. The file joins the plan id only when it is present, so every plan already
|
|
78
89
|
in a store keeps its id, and turning the experiment on stores a new plan event.
|
|
@@ -84,6 +95,14 @@ its id, and a re-plan that changes the file's content gets a new plan event. `pl
|
|
|
84
95
|
`forge dataset status` counts continued and failed continues for reviewers and implementers
|
|
85
96
|
apart.
|
|
86
97
|
|
|
98
|
+
The feature files `retro_mode`, `brief`, `brief_scope`, `brief_model`, `summaries` and
|
|
99
|
+
`summaries_model` join the plan id the same way, and the plan event's `options` records each
|
|
100
|
+
one under its file name. `brief_scope` and `brief_model` exist only when brief is on, and
|
|
101
|
+
`summaries_model` only when summaries is on. `retro_mode`, `brief` and `summaries` hold `off`
|
|
102
|
+
after an explicit off (`--no-retro`, `--brief off`, `--summaries off`); with no choice they
|
|
103
|
+
are absent. See [retro notes](decompose.md#retro-notes-opt-in), [brief mode](decompose.md#brief-mode-opt-in)
|
|
104
|
+
and [task summaries](decompose.md#task-summaries-opt-in).
|
|
105
|
+
|
|
87
106
|
Each blob reference carries `sha` (the stored bytes), `original_sha`, `n` (the original
|
|
88
107
|
size), `kept`, and `cut`. A cut keeps the head and the tail, because a QA prompt ends with
|
|
89
108
|
the diff and a log ends with the failure. Caps: prompt 1 MiB, diff 2 MiB, message 256 KiB,
|