@giamme/forge 0.16.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 +43 -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 +13 -0
- package/docs/decomposed-runs.md +8 -0
- package/docs/forge-ui.md +23 -2
- package/docs/memory.md +2 -0
- package/docs/reviews.md +15 -1
- package/docs/safety.md +8 -0
- package/forge +24 -1
- package/package.json +1 -1
- package/references/dataset.md +143 -5
- package/references/decision-models.md +15 -2
- package/references/decompose.md +180 -11
- package/references/planning.md +3 -2
- 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 +98 -4
- package/scripts/forge-control.py +86 -13
- package/scripts/forge-dispatch.sh +14 -10
- package/scripts/forge-du.py +167 -0
- package/scripts/forge-issues.py +4 -3
- package/scripts/forge-ledger.py +3 -1
- package/scripts/forge-lib-adopt.sh +8 -1
- package/scripts/forge-lib-plans.sh +5 -2
- package/scripts/forge-lib-review.sh +29 -1
- package/scripts/forge-metrics.sh +29 -3
- package/scripts/forge-parallel-options.sh +4 -0
- package/scripts/forge-parallel.sh +506 -10
- package/scripts/forge-plan-check.py +25 -2
- package/scripts/forge-planner.py +20 -6
- 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 +35 -10
- package/scripts/forge-solo.sh +2 -0
- package/scripts/forge-summarize.py +698 -0
- package/scripts/forge-sweep.py +25 -10
- 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/cli.py +83 -0
- package/scripts/forge_dataset/export.py +18 -4
- package/scripts/forge_dataset/facts.py +280 -0
- package/scripts/forge_dataset/harvest.py +56 -9
- package/scripts/forge_dataset/history.py +5 -3
- package/scripts/forge_dataset/outcomes.py +206 -58
- package/scripts/forge_dataset/pairs.py +174 -0
- package/scripts/forge_dataset/risk.py +108 -0
- package/scripts/forge_dataset/tiers.py +427 -0
- package/scripts/forge_decide/__init__.py +11 -1
- package/scripts/forge_decide/cli.py +23 -2
- package/scripts/forge_decide/labels.py +30 -6
- package/scripts/forge_decide/replay.py +10 -4
- 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 +217 -20
- package/ui/forge_ui/control.py +92 -11
- package/ui/forge_ui/export.py +31 -5
- package/ui/forge_ui/findings.py +4 -2
- 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 +732 -34
- package/ui/forge_ui/server.py +8 -0
- package/ui/forge_ui/static/app.js +92 -5
- 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/diffview.js +7 -3
- package/ui/forge_ui/static/index.html +3 -0
- package/ui/forge_ui/static/panel.js +311 -4
- 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 +100 -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,49 @@ 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
|
+
|
|
32
|
+
## [0.17] - 2026-11-11
|
|
33
|
+
|
|
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.
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
|
|
38
|
+
- forge-ui: each adopted range listed above the final review now opens its review (verdict, gate, findings, what a person kept, the reviewer's reply and prompt) and the range's diff with the findings pinned, through `/api/runs/<key>/adoptions/<name>` and its `/diff`. An export includes them, and keeps each adoption's reason private unless texts are included (#131).
|
|
39
|
+
- Outcomes are now recorded without anyone running `forge dataset outcomes`: the end of every `run` and `integrate` harvests that repository, bounded by `FORGE_OUTCOMES_TIMEOUT` (default 20 s), never changing the exit code, and off with `FORGE_OUTCOMES=off`. The harvest also follows work where it went: an integration whose branch a pull request merged and deleted is measured on the branch it landed in, and so is a run whose integration branch was merged by hand. `forge dataset status` shows the outcomes recorded and when they were last harvested (#120).
|
|
40
|
+
- Reviewers now end each finding with three facts: its reach (main path, realistic or unusual), its origin (new in this change or already there) and their evidence (ran it, traced it or suspected). The facts are recorded in shadow. No verdict changes, and `forge issues`, the ledger and forge-ui read a finding with them exactly as one without. forge-ui shows them beside each finding in the diff. The new `forge dataset facts` command reports how often two reviewers of one attempt agree on reach compared with severity. It also replays candidate rules on past reviews, such as "unusual reach does not block unless P0" and "existing problems do not block", and lists the findings each rule would have let through (#119).
|
|
41
|
+
- A shadow review (`--shadow-qa`) no longer repeats its primary's exact settings when another listed spec differs. If every listed spec is identical to the primary, the shadow still runs but is labelled a control, so it measures noise and never counts as an effort comparison. The new `forge dataset pairs` command groups paired reviews by what differs between the two reviewers: effort within one model, another model, another family, or nothing (controls). For each pair of settings it reports verdict agreement with a 95% interval, the blocking findings only one side found, and how many times the tokens and time each side used. Listing a reviewer's own model at another effort, such as `--shadow-qa sol:medium` beside `sol:high` reviewers, now measures what that effort buys (#121).
|
|
42
|
+
- A task can now carry a risk rating, separate from its difficulty: what a mistake that gets through would cost. The planner rates it, or you write `low`, `medium` or `high` to `tasks/<id>/risk` before `plan`. It is recorded in shadow. No model, reviewer or verdict changes, `tasks.tsv` keeps its columns, and a plan without ratings behaves as before. The new `forge dataset risk` command shows tasks by difficulty and risk together: how often the two ratings differ, and, per pair, first-try passes, serious findings and landed work that did not hold. The docs now say that reviewer tiers follow difficulty (#122).
|
|
43
|
+
- The new `forge dataset tiers` command looks inside each difficulty tier before anyone adds a tier. It sets plan-time facts (declared files, dependencies, wave, prompt size) against first-try passes, attempts and unfinished tasks. Each fact is tested on runs the split never saw, and adjusted for the implementer, so a weaker model mix is not read as harder tasks. Facts known only after the attempt, such as the diff size, are reported apart. `--sample` writes past prompts for a blind re-rating, and `--blind` reports how often that rating matches the recorded tier. Nothing in a run changes (#123).
|
|
44
|
+
- `forge decide replay --label first-attempt` judges the stored drift answers on the 2026-10-16 label: a file counts as drift when attempt 1 edited it, whether or not that attempt passed. It sends nothing and records nothing, so promotion still reads the site's own label. The replay report now also shows an inverted gate's threshold as it is configured, such as `prompt_warn 0.55 (inverted: a score at or above 0.45)`, instead of `0.44999999999999996` (#101).
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
|
|
48
|
+
- `run --sweep` now fixes what an adopted range's review tolerated, with the adoption's reviewer reviewing the fix, where it used to drop those findings for want of a model. Findings a person kept (`accept`, or `adopt --approved`) are still never swept, and the sweep plan now lists them as `accepted` instead of leaving them out silently (#131).
|
|
49
|
+
- `adopt`'s reviewer is now told the run's verification command (or its lanes' commands), so it can run the parts that touch the adopted range. Verification itself still runs after the review, as before (#131).
|
|
50
|
+
|
|
8
51
|
## [0.16] - 2026-11-06
|
|
9
52
|
|
|
10
53
|
forge-ui gets a Worktrees screen and a Projects screen with each repository's runs, findings and memories, and a live refresh no longer cancels what you were doing. A stopped run can be steered by hand: adopt brings in a commit made outside forge, and retry --no-dispatch resumes several tasks side by side. Reviewers get the attempt's dependencies and say whether their tests ran, and a timeout now stops the test servers a harness started.
|
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
|
@@ -15,6 +15,10 @@ forge dataset import ~/.local/share/forge/legacy # runs that predate live capt
|
|
|
15
15
|
forge dataset export # labeled decision cases for benchmarks and fine-tuning
|
|
16
16
|
forge dataset outcomes # which integrated lines survived, read from git history
|
|
17
17
|
forge dataset reviewers # how often work each reviewer PASSed was later reverted or rewritten
|
|
18
|
+
forge dataset risk # tasks by difficulty and risk together: do they differ, how did each pair fare
|
|
19
|
+
forge dataset tiers # what explains results inside each difficulty tier, and how noisy the rating is
|
|
20
|
+
forge dataset pairs # two reviewers of one attempt: what another effort, model or family found and cost
|
|
21
|
+
forge dataset facts # findings' reach, origin and evidence: do reviewers agree, would a gate on them help
|
|
18
22
|
forge dataset forecast <plan> # likely tokens, time and first-try PASS rate for a plan's tasks
|
|
19
23
|
```
|
|
20
24
|
|
|
@@ -23,6 +27,10 @@ advisory only and never changes routing, and it shows "not enough data" below 10
|
|
|
23
27
|
reviewer rather than a rate a handful of tasks would make up. See
|
|
24
28
|
[the reviewer report card](../references/dataset.md#reviewer-report-card).
|
|
25
29
|
|
|
30
|
+
`forge dataset facts` measures the three facts reviewers add to each finding (reach, origin,
|
|
31
|
+
evidence) before any gate uses them: agreement between two reviewers of one attempt, and what
|
|
32
|
+
rules on them would have changed. See [finding facts](../references/dataset.md#finding-facts).
|
|
33
|
+
|
|
26
34
|
`forge dataset forecast <plan>` estimates a plan from past tasks at the same tier and model:
|
|
27
35
|
median and p90 tokens and time, and the first-try PASS rate with a 95% interval, per task and in
|
|
28
36
|
total. It flags tasks below 50% and says "not enough history" under 5 past tasks. `run` prints
|
|
@@ -38,5 +46,10 @@ import also reads a plan's `escalations.tsv` (with who decided: `policy`, `retry
|
|
|
38
46
|
`control.log`, so human interventions made with `forge control` are in the dataset as
|
|
39
47
|
`control` events. See [forge runs rm](commands.md#forge-runs-rm).
|
|
40
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
|
+
|
|
41
54
|
Capture is fail-open and never read by anything that builds a prompt. See
|
|
42
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/reviews.md
CHANGED
|
@@ -174,6 +174,17 @@ decision `fail`), and the next attempt starts with a note saying why.
|
|
|
174
174
|
It fails safe: an unlabelled CONFIRMED finding, or a FAIL with no CONFIRMED finding at all,
|
|
175
175
|
is never tolerated.
|
|
176
176
|
|
|
177
|
+
Every finding also ends its first line with three facts, `{reach=main|realistic|unusual
|
|
178
|
+
origin=new|existing evidence=ran|traced|suspected}`: how likely the trigger is, whether this change
|
|
179
|
+
introduced the problem, and how the reviewer knows. They are **recorded in shadow** and decide
|
|
180
|
+
nothing: the gate, `forge issues`, the ledger and forge-ui read a finding with the suffix exactly as
|
|
181
|
+
one without it, and a missing or malformed suffix changes nothing. They go to the run dataset, and
|
|
182
|
+
`forge dataset facts` says whether a gate on them would do better than the severity line alone: how
|
|
183
|
+
often two reviewers of one attempt agree on reach versus severity (with `--shadow-qa`), and how many
|
|
184
|
+
reviews and rounds rules such as "unusual reach does not block unless P0" or "existing problems do
|
|
185
|
+
not block" would have changed, listing the findings they would have let through so a person can
|
|
186
|
+
judge them. See [the dataset reference](../references/dataset.md#finding-facts).
|
|
187
|
+
|
|
177
188
|
Tolerated findings are recorded, not fixed. After a run, the skill offers once to file them as
|
|
178
189
|
GitHub issues, together with PLAUSIBLE findings of passed tasks and whatever a whole-run review
|
|
179
190
|
left open (`--file-issues ask|auto|off`, `ask` by default). Where the
|
|
@@ -334,7 +345,10 @@ family than the task's. Its verdict goes to the run dataset and nothing in the r
|
|
|
334
345
|
so it never changes a status, merge, memory or retry. `forge dataset status` then reports how
|
|
335
346
|
often the two reviewers agree, overall and per model pair. The table shows the extra reviews
|
|
336
347
|
before you approve. The shadow runs beside the main review and is stopped soon after that
|
|
337
|
-
finishes, so the most it costs is reviews and a little latency.
|
|
348
|
+
finishes, so the most it costs is reviews and a little latency. To measure what reviewer effort
|
|
349
|
+
buys, list the reviewers' own model at another effort (`--shadow-qa sol:medium` beside `sol:high`):
|
|
350
|
+
`forge dataset pairs` reports those pairs apart from model and family comparisons, and a shadow
|
|
351
|
+
identical to its primary is recorded as a control, never as an effort comparison. See
|
|
338
352
|
[decomposition](../references/decompose.md#shadow-reviews-opt-in).
|
|
339
353
|
|
|
340
354
|
## Implementer guards
|
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",
|