@giamme/forge 0.13.1 → 0.14.1
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 +38 -0
- package/SKILL.md +17 -11
- package/VERSION +1 -1
- package/docs/artifacts.md +2 -0
- package/docs/commands.md +134 -8
- package/docs/development.md +3 -0
- package/docs/reviews.md +2 -0
- package/docs/troubleshooting.md +5 -1
- package/forge +28 -1
- package/package.json +1 -1
- package/references/dataset.md +3 -1
- package/references/decompose.md +201 -61
- package/references/harnesses.md +4 -1
- package/references/runtime.md +29 -0
- package/references/ui.md +10 -0
- package/scripts/forge-compare.py +491 -0
- package/scripts/forge-config.py +3 -3
- package/scripts/forge-contract.py +34 -8
- package/scripts/forge-control.py +105 -13
- package/scripts/forge-dispatch.sh +85 -25
- package/scripts/forge-jev-options.sh +17 -4
- package/scripts/forge-ledger.py +387 -0
- package/scripts/forge-lib-plans.sh +11 -2
- package/scripts/forge-lib-task.sh +390 -28
- package/scripts/forge-parallel-options.sh +20 -4
- package/scripts/forge-parallel.sh +123 -17
- package/scripts/forge-plan-check.py +68 -3
- package/scripts/forge-pr.py +276 -0
- package/scripts/forge-route.py +403 -38
- package/scripts/forge-runs.py +18 -1
- package/scripts/forge-runtime.py +94 -8
- package/scripts/forge-schedule.py +303 -46
- package/scripts/forge-verify-failed.py +111 -0
- package/scripts/forge-watch.py +372 -0
- package/scripts/forge_dataset/harvest.py +3 -1
- package/scripts/forge_fractal/cli.py +23 -6
- package/scripts/forge_infra.py +274 -0
- package/scripts/forge_jev/client.py +13 -9
- package/ui/docs/api.md +51 -8
- package/ui/forge_ui/export.py +6 -2
- package/ui/forge_ui/reader.py +172 -6
- package/ui/forge_ui/static/app.js +2 -2
- package/ui/forge_ui/static/checksview.js +20 -7
- package/ui/forge_ui/static/controls.js +6 -3
- package/ui/forge_ui/static/panel.js +69 -4
- package/ui/forge_ui/static/runmodel.js +30 -4
- package/ui/forge_ui/static/scene3d.js +3 -2
- package/ui/forge_ui/static/style.css +11 -4
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,44 @@ 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.14.1] - 2026-11-03
|
|
9
|
+
|
|
10
|
+
Two fixes from run 1's follow-ups: a lateral move after an infrastructure stop stays in the tier the task was last assigned, and a claude or openclaude dispatch that already gave its final result is no longer lost to a timeout while a background task keeps it open.
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- A claude or openclaude implementer or reviewer that gave its final result but stayed open on a background task is no longer killed as a timeout. forge ends it after 30 minutes of silence (`FORGE_RESULT_GRACE`, `0` turns it off), or at the watchdog, and its result goes to review; a turn the session starts after a result is never cut short (#110).
|
|
15
|
+
- An infrastructure stop moves a task only within the tier it was last assigned. A re-plan that picks the row's model again, explored or not, now replaces the tier an older escalation or pin recorded, so a task re-planned onto a cheaper tier can no longer move sideways to a stronger tier's model (#106).
|
|
16
|
+
|
|
17
|
+
## [0.14] - 2026-11-02
|
|
18
|
+
|
|
19
|
+
Infrastructure stops now carry a cause and recover on their own where they can, moving sideways to a model of the same tier; forge watch, forge pr and forge runs rerun/compare follow, describe and compare runs; and a run now pays for the full test suite once, after the merge, instead of on every attempt.
|
|
20
|
+
|
|
21
|
+
### Highlights
|
|
22
|
+
|
|
23
|
+
- `forge watch` follows runs from the terminal: it prints each task status change and, when a run finishes or fails, a task fails or a final review gives its verdict, raises a desktop notification (`notify-send` or `osascript`; on a headless machine or in CI it says there is none and only prints). `--exec CMD` and an untracked, executable `.forge/on-finish` in the repo run on those events with `FORGE_WATCH_EVENT`, `FORGE_WATCH_RUN_ID` and `FORGE_WATCH_VERDICT` in their environment. It is read-only and uses the same run reader as forge-ui.
|
|
24
|
+
- `forge pr` writes a draft pull-request description for a finished run: the goal, the tasks and their status, who implemented and reviewed them, the verification and final-review results, the open findings and the integration branch. Private text (the request, prompts, deferrals, local paths) is left out unless you ask with `--texts` or `--paths`, as in the export. `forge pr --create` opens it with `gh pr create --draft`; without `--create` it only prints, and it never pushes.
|
|
25
|
+
- `forge runs rerun <run-dir> --dwarf SPEC` sets the same plan up again with another implementer, starting from the commit the original run started from, and `forge runs compare <run-dir-A> <run-dir-B>` sets two runs side by side per task (status, attempts, tokens, time, diff size) and records the pair in the dataset. A rerun spends nothing until you pass `--run --yes` after reading the token warning and forecast it prints, and it never merges anything.
|
|
26
|
+
- Infrastructure stops now carry a cause (capacity, rate limit, usage limit, budget, login, network, provider down, an empty reply or a cancelled call), and each recovers its own way. When another model of the same tier can take the work, the task, or its review, moves there sideways at once, without spending an attempt or counting as an escalation; a limit that resets is waited out; and a stop only a person can clear, such as spent credits or an expired login, is marked "needs you" in the run summary, `forge control show` and forge-ui. Sideways moves are on for new plans; `plan --no-infra-fallback` turns them off (#81).
|
|
27
|
+
- A failed verification no longer reruns the whole suite to confirm a real failure: with `.forge/verify-subset`, forge first reruns only the failing test files, and runs everything again only if they pass. A `retry` that leaves tasks still to run skips its verification, since the next `run` or `integrate` verifies the branch (#112).
|
|
28
|
+
- When a run has a verification command, implementers no longer run the whole test suite on every attempt, even if a task's acceptance criteria ask for it: forge runs the suite after the merge. `plan` also names tasks whose acceptance criteria ask for the whole suite (#111).
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
|
|
32
|
+
- A task whose reviews keep failing with new findings now stops as `NEEDS_DECISION` and waits for you instead of retrying: `retry --decide retry=N` or `threshold=Pn`, `retry --dwarf <spec>`, `accept`, or a split in `tasks.tsv`. A task that reaches its cap on attempts across runs stops the same way (`plan --max-attempts N`, default 8; raised only with `forge control set max-attempts N --confirm`), and `plan --converge-window N` sets how many reviews the signal looks at (#69).
|
|
33
|
+
- forge-ui shows why a task stopped on infrastructure and whether it needs you, the sideways moves, each task's findings ledger, and a decision panel for tasks waiting for your decision (#81, #69).
|
|
34
|
+
|
|
35
|
+
### Changed
|
|
36
|
+
|
|
37
|
+
- A command group typed on its own, such as `forge control` or `forge dataset`, now prints that group's help with its subcommands, the same as `forge control --help`, instead of a one-line "the following arguments are required" error. It still exits 2, like a bare `forge`.
|
|
38
|
+
- `forge fractal --help` and `forge config --help` (and a bare `forge fractal` or `forge config`) give each subcommand a one-line description, as `forge decide`, `forge dataset`, `forge ui` and `forge control` already did, instead of only listing the names.
|
|
39
|
+
- Task reviews now ask the reviewer to report every confirmed finding in one pass, and to say plainly when the change is correct (#69).
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
|
|
43
|
+
- `--gate` and `--decide-budget` take a `*` or `?` in their value as typed: it is no longer matched against file names in the current directory, so `--gate 'drift=*'` next to a file named `drift=on` is refused and named as given instead of quietly becoming `drift=on` (#82).
|
|
44
|
+
- A decision-model request made from inside a repo, with no `--repo` and no `FORGE_DECIDE_REPO`, now records in `jev.jsonl` and the run dataset the gate mode it was actually sent under, the one that repo's `.forge/decide.json` sets, instead of the mode resolved with no repo at all (#82).
|
|
45
|
+
|
|
8
46
|
## [0.13.1] - 2026-10-30
|
|
9
47
|
|
|
10
48
|
Runs started from a git worktree now sit under their repository in forge-ui, showing the worktree and branch they started in. Also exact decision-model spend caps, and the right gate on each exported review.
|
package/SKILL.md
CHANGED
|
@@ -60,23 +60,29 @@ For explanation requests, explain the workflow without spending model quota.
|
|
|
60
60
|
a row left to forge gets its neighbouring tier's model from the user's pools, odds
|
|
61
61
|
recorded for `forge dataset routing`); say so with the table and pass `--explore 0` when
|
|
62
62
|
the user declines. Retries follow a policy: after three failed attempts on one model the
|
|
63
|
-
next goes a tier up in the user's pools, or the task stops
|
|
63
|
+
next goes a tier up in the user's pools, or the task stops as `NEEDS_DECISION`
|
|
64
64
|
(`--escalate-after N`, `0` = off); an explicit `retry --dwarf` overrides it. `accept`
|
|
65
|
-
overrides a reviewer
|
|
66
|
-
|
|
65
|
+
overrides a reviewer: run it, with `--reason` and `--approved`, only when the user
|
|
66
|
+
explicitly says so; never self-accept.
|
|
67
67
|
- When you report a run, read `<plan>/control.log` and mention any human change made mid-run
|
|
68
68
|
(a threshold, a budget, a model pin, a drain, stop or queued retry; `forge control show <plan>`
|
|
69
69
|
lists them). Never set a control, pin, `drain|stop|retry` or delete a run with `forge control` /
|
|
70
70
|
`forge runs rm` unless the user asks. Exit `130` / `INTERRUPTED`: the run was signalled or
|
|
71
71
|
stopped; relay the `retry` lines it printed.
|
|
72
|
-
- A
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
72
|
+
- A `waiting for your answer:` block is status `NEEDS_INPUT`: relay each question verbatim and
|
|
73
|
+
pass it with `retry <plan> <id> --answer "<reply>"`. Never answer for the user; nothing else
|
|
74
|
+
resumes it.
|
|
75
|
+
- A task at `NEEDS_DECISION` waits for the user. Present `tasks/<id>/decision.md`'s reasons and
|
|
76
|
+
choices. Run `retry --decide`, `retry --dwarf` or `accept` (with `--reason` and `--approved`)
|
|
77
|
+
only on the user's explicit word, never to keep a run going. Nothing else resumes it. The
|
|
78
|
+
split choice replaces the row in `tasks.tsv` and is a later `run`
|
|
79
|
+
([when reviews don't converge](references/decompose.md#when-reviews-dont-converge)); do that
|
|
80
|
+
only when the user asks.
|
|
81
|
+
- Exit `8` / status `INFRA` is an infrastructure stop (`capacity`, `rate_limit`, `usage_limit`,
|
|
82
|
+
`budget`, `auth`, `network`, `provider_down`, `empty` or `cancelled`; an old run may say
|
|
83
|
+
`quota`), not a task failure, and no attempt was spent. Report each "needs you" item with its
|
|
84
|
+
hint, and re-run only when told. Offer a multi-task plan's whole-run review (`review`, or
|
|
85
|
+
`integrate --final-review <qa-spec>`) only when asked: it spends QA quota.
|
|
80
86
|
- **Leftover findings become issues.** A run can finish with review findings nobody will act on:
|
|
81
87
|
- CONFIRMED findings the threshold tolerated, from a PASS or a FAIL (`tasks/<id>/known_issues.md`);
|
|
82
88
|
- PLAUSIBLE findings in a passed task's `qa.last`;
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.14.1
|
package/docs/artifacts.md
CHANGED
|
@@ -18,6 +18,7 @@ as if the dwarf had written it.
|
|
|
18
18
|
<role>.last the final message — read this first
|
|
19
19
|
<role>.infra only after an infrastructure failure: class, retry_after, detail, harness, model
|
|
20
20
|
<role>.orphans only when processes were left running after the harness exited
|
|
21
|
+
<role>.settled only when claude/openclaude stayed up on a background task after its final result and forge ended it: ended_by=grace|timeout, backend_exit=; the result stands (not a timeout)
|
|
21
22
|
<role>.session session id reported by claude, openclaude or codex; absent when the dispatch published none
|
|
22
23
|
<role>.continue only when the dispatch was asked to continue a session (a reviewer's, or an implementer's): requested=, mode=continued|failed, reason=
|
|
23
24
|
changes.diff the dwarf's real diff, which is qa's input
|
|
@@ -61,6 +62,7 @@ A decomposed run adds:
|
|
|
61
62
|
tasks/<id>/<role>.harness only while a guarded dispatch runs: its harness's pid and start time, for forge-guard.py stop
|
|
62
63
|
tasks/<id>/qa_threshold optional per-task blocking threshold: P0-P3, or none (P3; exempt from a looser plan threshold)
|
|
63
64
|
tasks/<id>/escalations.tsv epoch, attempt, from-spec, to-spec, source (policy|retry|pin|fallback); older rows have 4 columns
|
|
65
|
+
tasks/<id>/running.tier tier<TAB>spec<TAB>epoch: the tier the task runs in, written at each assignment (plan, escalation, pin, retry --dwarf, lateral move); the newer of it and route.jsonl's last pick counts, and neither once the task runs another spec
|
|
64
66
|
tasks/<id>/escalation.pin a human's one-shot model for the next full retry: one dwarf spec on one line
|
|
65
67
|
tasks/<id>/escalation.pin.applying the pin while a retry has claimed it; removed once the retry is recorded
|
|
66
68
|
tasks/<id>/retry_findings.commit commit the carried review judged
|
package/docs/commands.md
CHANGED
|
@@ -16,16 +16,54 @@ 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), `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 `retry-budget`, 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]` and `add PLAN_DIR TASK` (a row appended to `tasks.tsv`)
|
|
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 `retry-budget`, 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
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 |
|
|
21
|
+
| `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 |
|
|
21
22
|
| `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) |
|
|
23
|
+
| `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) |
|
|
24
|
+
| `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 |
|
|
22
25
|
| `forge issues RUN [--apply] …` | file the review findings a run left open as GitHub issues; see [below](#forge-issues) |
|
|
26
|
+
| `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) |
|
|
23
27
|
| `forge ui open\|status\|stop` | forge-ui, the run viewer; see [the command group](forge-ui.md#forge-ui-command-group) |
|
|
24
28
|
| `forge dataset …` | every run's inputs and outcomes; see [run dataset](dataset.md) |
|
|
25
29
|
| `forge decide …` | decision-model gates, providers, budgets and the privacy floor; see [below](#forge-decide) |
|
|
26
30
|
| `forge jev …` | deprecated alias of the old decision-model commands, kept for one release; see [below](#forge-decide) |
|
|
27
31
|
| `forge --help` | list the commands; `forge <command> --help` shows each one's options |
|
|
28
32
|
|
|
33
|
+
### `forge watch`
|
|
34
|
+
|
|
35
|
+
Follows runs from the terminal, for when forge-ui is not open or you are away from it.
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
forge watch # every run registered for this repo, new ones too; Ctrl-C stops
|
|
39
|
+
forge watch RUN_DIR # one run, until it ends: exit 0 done, 1 failed, 3 its process looks dead
|
|
40
|
+
forge watch --all --until-done # every repo's runs; stop once nothing is running
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Every task status change prints a line. These events also raise a notification and run the hooks:
|
|
44
|
+
a run finishing (`run-done`) or ending with failures (`run-failed`), a task newly failing
|
|
45
|
+
(`task-failed`) and a final review's `PASS`/`FAIL` (`review`). They are the events forge-ui's bell
|
|
46
|
+
reports, and the runs are read with forge-ui's own reader. The first look at each run is only a
|
|
47
|
+
baseline, so a run that was already over, or had not changed for two hours, says nothing. A run
|
|
48
|
+
that stops is announced once it has stayed stopped for `--settle` seconds (10), so a task that
|
|
49
|
+
fails and is retried automatically is not reported as a failed run (the `task-failed` event still is).
|
|
50
|
+
|
|
51
|
+
- **Desktop notification.** `notify-send` on Linux, `osascript` on macOS. With no notifier on the `PATH`, or on Linux
|
|
52
|
+
with no desktop session (`DISPLAY`, `WAYLAND_DISPLAY` and `DBUS_SESSION_BUS_ADDRESS` all unset: a
|
|
53
|
+
server, a container, CI), forge says so once on stderr and the events only print. `--no-notify` or
|
|
54
|
+
`FORGE_WATCH_NOTIFY=off` turns notifications off.
|
|
55
|
+
- **`--exec CMD`** runs `CMD` through the shell on every event. **`.forge/on-finish`** in the run's repo
|
|
56
|
+
runs on `run-done` and `run-failed` only, with the repo as its working directory.
|
|
57
|
+
- **The environment** of both: `FORGE_WATCH_EVENT`, `FORGE_WATCH_RUN_ID`, `FORGE_WATCH_RUN_DIR`,
|
|
58
|
+
`FORGE_WATCH_REPO`, `FORGE_WATCH_GOAL`, `FORGE_WATCH_TASK` (a `task-failed` event), `FORGE_WATCH_VERDICT`
|
|
59
|
+
(the review's verdict, the failing task's status, else the run's final review or verification status, else
|
|
60
|
+
`PASS`/`FAIL`) and `FORGE_WATCH_MESSAGE`. A hook's output goes to stderr; one that fails or runs
|
|
61
|
+
past 30 seconds is reported there and never stops the watch.
|
|
62
|
+
- **`.forge/on-finish` is run only when it is safe.** `.forge/` is usually committed, so a hook that arrived with
|
|
63
|
+
a cloned repository would run code the first time you watch. It runs only when it is executable, owned by you,
|
|
64
|
+
not writable by others, and not tracked by git; otherwise forge says why on stderr and skips it. A hook you want
|
|
65
|
+
to share goes in your own checkout untracked, or is passed with `--exec`.
|
|
66
|
+
|
|
29
67
|
### `forge runs rm`
|
|
30
68
|
|
|
31
69
|
Deletes a run directory (a plan dir or a solo run dir) without losing its traces. It holds the
|
|
@@ -49,6 +87,34 @@ reports; `--yes` skips the prompt for the run id (needed without a terminal); `-
|
|
|
49
87
|
object, on failure too. Exit 0 ok, 2 refused input, 3 busy or the run is active, 4 failed during
|
|
50
88
|
deletion or the run directory was kept (the same command finishes the job).
|
|
51
89
|
|
|
90
|
+
### `forge runs rerun` and `forge runs compare`
|
|
91
|
+
|
|
92
|
+
`forge runs rerun <run-dir> --dwarf SPEC` answers "would this plan have gone better on another
|
|
93
|
+
model?" with the same tasks, prompts and options. It copies the plan into a new directory
|
|
94
|
+
(`<run-dir>-<spec>`, or `--to`), puts SPEC on every task (`--qa` changes the reviewer too; by
|
|
95
|
+
default each task keeps its own, so one thing changes), and prepares it the way `forge-parallel.sh
|
|
96
|
+
plan` does. The new run's integration branch `forge/<new id>-integration` starts at the commit the
|
|
97
|
+
original run started from (`integration.base`), not at wherever your branch is now, so both runs
|
|
98
|
+
see the same code. Exploratory routing is off for it (`--explore 0`), or some tasks would run on
|
|
99
|
+
a third model.
|
|
100
|
+
|
|
101
|
+
It spends nothing: it prints a warning that a second run costs a second run's tokens, what the
|
|
102
|
+
original run recorded for these tasks, the [plan forecast](dataset.md) for the new model when the
|
|
103
|
+
dataset has history, and the command that starts it. `--run --yes` starts it (`--run` alone is
|
|
104
|
+
refused, so the cost is read first); `--dry-run` creates nothing at all. It never merges: the
|
|
105
|
+
rerun only writes its own `forge/<new id>…` branches and worktrees, and your branch, the original
|
|
106
|
+
run and its branches are not touched. A plan that has a task still `RUNNING`, a solo run (no task
|
|
107
|
+
table), a plan that never started, and a Fractal-backed plan are refused, and a rerun that fails to
|
|
108
|
+
set up is removed again. Exit 0 ok, 2 bad input, 3 refused.
|
|
109
|
+
|
|
110
|
+
`forge runs compare <run-dir-A> <run-dir-B>` sets two runs of one repository side by side per
|
|
111
|
+
task: status, attempts, tokens and time (from the dataset, when the runs are in it) and the lines
|
|
112
|
+
added and deleted on the task's branch. It writes the pair as one `comparison` event to the dataset
|
|
113
|
+
(`--no-record` skips that; the same pair twice is one event; a run that has not attempted a task
|
|
114
|
+
yet is shown but not recorded). `--json` prints everything. One pair of runs is one sample: a task
|
|
115
|
+
that passed on one model and failed on the other may have just been the model's day, so read it
|
|
116
|
+
as what happened, not as which model is better. Nothing routes on it.
|
|
117
|
+
|
|
52
118
|
### `forge issues`
|
|
53
119
|
|
|
54
120
|
`forge issues <plan dir, task dir, review dir, known_issues.md or qa.last>` drafts one GitHub
|
|
@@ -77,6 +143,34 @@ repository lock from the issue lookup to the last `gh issue create`, and each di
|
|
|
77
143
|
around its write. A busy lock is retried for 10 s, then exit 3. Exit 0 ok, 2 usage or a `gh` or
|
|
78
144
|
dismissal-store error, 3 busy.
|
|
79
145
|
|
|
146
|
+
### `forge pr`
|
|
147
|
+
|
|
148
|
+
Writes the pull-request description a finished run deserves, from what the run recorded, so the PR
|
|
149
|
+
that proposes its integration branch says what was built and what was not.
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
forge pr # the newest finished run of this repo, on stdout
|
|
153
|
+
forge pr RUN_DIR --out pr.md # a given run, also written to a file
|
|
154
|
+
forge pr | gh pr create --draft --body-file - --title "…" # your own gh call
|
|
155
|
+
forge pr --create --base main # gh pr create --draft, on forge/<run id>-integration
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
The body has the goal, a table of the tasks (status, difficulty, implementer, reviewer), the tasks that
|
|
159
|
+
did not merge, the verification status and the final review's verdict (marked when tasks merged after
|
|
160
|
+
it), the final review's open findings (severity, location and headline, worst first) and the integration
|
|
161
|
+
branch with the commit it forked from. The suggested title (the goal's first line) goes to stderr.
|
|
162
|
+
A run that still has running or pending tasks is refused; solo runs have no tasks or integration branch
|
|
163
|
+
to describe and are refused too.
|
|
164
|
+
|
|
165
|
+
- **Private text stays out**, as in `forge ui export`: the request, the prompts and the deferrals
|
|
166
|
+
(`--texts` adds the request and the deferrals) and local paths, which are cut to their last component
|
|
167
|
+
(`--paths` keeps them). The goal, task titles and finding headlines are kept: read the body before it
|
|
168
|
+
goes anywhere public.
|
|
169
|
+
- **`--create` is the only thing that does more than print.** It runs `gh pr create --draft` in the
|
|
170
|
+
repo, for `--head` (default `forge/<run id>-integration`) and `--base` (default gh's). It never pushes:
|
|
171
|
+
the branch must already have an upstream (`git push -u origin <branch>`) or forge says so and stops.
|
|
172
|
+
Without `--create` neither `gh` nor the network is used.
|
|
173
|
+
|
|
80
174
|
### `forge decide`
|
|
81
175
|
|
|
82
176
|
Per-gate decision models. The setup — precedence, what each gate does, budgets, the privacy
|
|
@@ -261,7 +355,8 @@ whole ladder. It never dispatches and spends no quota. The retry policy's effort
|
|
|
261
355
|
| `--timeout <s>` | kill this dispatch after `<s>` seconds; `0` disables. See the precedence below |
|
|
262
356
|
|
|
263
357
|
**Exit codes:** `0` ok · `2` spec or usage error · `3` harness missing or unusable ·
|
|
264
|
-
`4` the backend ran and failed · `7` the backend hit its timeout and was killed
|
|
358
|
+
`4` the backend ran and failed · `7` the backend hit its timeout and was killed (unless it had
|
|
359
|
+
already given its final result, below) ·
|
|
265
360
|
`8` an **infrastructure failure** (quota or usage limit, auth, rate limit, network, or an
|
|
266
361
|
empty answer) — nothing about the work was judged, so callers pause instead of counting a
|
|
267
362
|
failure. On `8`, `<run-dir>/<role>.infra` holds `class=`, `retry_after=`, `detail=`, `rc=`,
|
|
@@ -283,6 +378,17 @@ silently stalled the others. The default is deliberately generous: this is a bac
|
|
|
283
378
|
a wedged process, not a budget. A role killed by it has usually left a partial edit behind, so
|
|
284
379
|
`7` is worth reporting as such rather than as a clean failure.
|
|
285
380
|
|
|
381
|
+
**A final result the CLI stays open after.** claude and openclaude stay up while a background
|
|
382
|
+
task their session started is still open, even after the model's final result. When the log
|
|
383
|
+
ends in that result (only background-task events after it) and has been silent for
|
|
384
|
+
`FORGE_RESULT_GRACE` seconds (default 1800; `0` turns it off), forge ends the harness and the
|
|
385
|
+
result stands: the role finished, its exit is the one the CLI gives for that result, and
|
|
386
|
+
`<role>.settled` says `ended_by=grace`. The same holds when the watchdog is what ended it
|
|
387
|
+
(`ended_by=timeout`), so the work goes to review instead of counting as a timeout. A result is
|
|
388
|
+
not always the end: a background task that completes wakes the session for another turn, and a
|
|
389
|
+
turn under way is never ended by the grace, however long it is silent. The grace is long
|
|
390
|
+
because that wake-up can come many minutes later. `<role>.resolved` records `result_grace=`.
|
|
391
|
+
|
|
286
392
|
On `3` or `4`, forge shows you the actual error rather than substituting a different model —
|
|
287
393
|
quietly swapping backends hides the fact that the one you picked is broken.
|
|
288
394
|
|
|
@@ -393,6 +499,7 @@ forge-parallel.sh plan <plan-dir> --repo <dir> [routing flags] [--planner <
|
|
|
393
499
|
[--explore E] [--ui | --no-ui] [--fail-first | --no-fail-first]
|
|
394
500
|
[--pre-review-tests | --no-pre-review-tests] [--pre-review-parallel N]
|
|
395
501
|
[--qa-threshold P0|P1|P2|P3|none|default]
|
|
502
|
+
[--max-attempts N] [--converge-window N] [--no-infra-fallback]
|
|
396
503
|
forge-parallel.sh run <plan-dir> [--max-parallel N] [--yolo-dwarf] [--yolo-qa] [--dry-run]
|
|
397
504
|
[--verify <cmd> | --verify-lane 'name[opts]=cmd' ...]
|
|
398
505
|
[--verify-parallel N] [--setup <cmd>] [--timeout S]
|
|
@@ -404,6 +511,7 @@ forge-parallel.sh run <plan-dir> [--max-parallel N] [--yolo-dwarf] [--yolo
|
|
|
404
511
|
[--sweep-ahead | --no-sweep-ahead] [--attribute | --no-attribute]
|
|
405
512
|
[--fractal | --no-fractal] [--fractal-<limit> <n>]
|
|
406
513
|
forge-parallel.sh retry <plan-dir> <task-id> [--dwarf <spec>] [--answer <text> | --answer-file <file>]
|
|
514
|
+
[--decide retry=N|threshold=Pn] [--reason "<why>" --approved]
|
|
407
515
|
[--timeout S]
|
|
408
516
|
[--qa-threshold P0|P1|P2|P3|none|default] [--verify-retries N]
|
|
409
517
|
[--verify <cmd> | --verify-lane 'name[opts]=cmd' ...] [--verify-parallel N]
|
|
@@ -421,7 +529,7 @@ forge-parallel.sh combine <new-plan-dir> <plan-dir> <plan-dir>... [--verify <c
|
|
|
421
529
|
|---|---|
|
|
422
530
|
| `plan` | validate `tasks.tsv`, resolve difficulty → concrete dwarf/qa specs, compute waves, render the approval table |
|
|
423
531
|
| `run` | schedule ready tasks; per task: worktree → dwarf → diff → QA → status; merge passing tasks onto the integration branch |
|
|
424
|
-
| `retry` | re-run **one** failed task in the worktree it already has, with its reviewer's findings in the prompt; with `--answer` or `--answer-file`, answer a `NEEDS_INPUT` task
|
|
532
|
+
| `retry` | re-run **one** failed task in the worktree it already has, with its reviewer's findings in the prompt; with `--answer` or `--answer-file`, answer a `NEEDS_INPUT` task and run it; with `--decide` or `--dwarf` plus `--reason` and `--approved`, decide a `NEEDS_DECISION` task and run it |
|
|
425
533
|
| `attribute` | after a failed combined verification, search the merge order for **a merge that breaks it**; merges, revises and accepts nothing. See below |
|
|
426
534
|
| `integrate` | **never automatic** — merge the integration branch into your branch |
|
|
427
535
|
| `accept` | **only on your explicit instruction** — merge a `FAIL`/`UNKNOWN` task's reviewed work anyway, recording why |
|
|
@@ -438,9 +546,13 @@ forge-parallel.sh combine <new-plan-dir> <plan-dir> <plan-dir>... [--verify <c
|
|
|
438
546
|
| `--retry-failed N` | run | no — this run only | re-queue a task the reviewer rejected up to `N` more times inside the run |
|
|
439
547
|
| `--infra-retries M` | run | no — this run only | wait out up to `M` infrastructure stops per paused scope (a model, a harness, or everything) instead of ending the run |
|
|
440
548
|
| `--infra-backoff SHAPE` | run | `infra_backoff` | the waits between those stops when the provider gave no retry-after: `exp:B[,C]`, `linear:S,T[,C]` or `list:a,b,...` in seconds (default `exp:60`) |
|
|
441
|
-
| `--infra-fallback` | run | `infra_fallback` |
|
|
549
|
+
| `--infra-fallback` | run | `infra_fallback` | turn lateral recovery on: a stop whose cause moves sideways goes to another model of the same tier (the dwarf pool, or a QA peer from `qa-routing.json`), never a stronger one. A new `plan` writes `on`; this flag writes `on` for a later `run` |
|
|
550
|
+
| `--no-infra-fallback` | plan, run | `infra_fallback` | turn lateral recovery off. A plan with no file stays off, and a re-plan keeps the setting it has |
|
|
551
|
+
| `--converge-window N` | plan | `converge_window` | reviews the non-converging signal looks at (default `4` when the file is absent; below `2` it never fires). Changing it later is `forge control set converge-window N` |
|
|
552
|
+
| `--max-attempts N` | plan | `max_attempts` | attempts a task may spend across runs before it stops for a decision (default `8` when the file is absent; `0` means no cap). Changing it later is `forge control set max-attempts N --confirm` |
|
|
553
|
+
| `--decide retry=N` / `--decide threshold=Pn` | retry | no — this retry only | resume a `NEEDS_DECISION` task: `N` more attempts (`N` from 1 to 20) or this task's blocking threshold (`P0`..`P3`) and then one retry. Needs `--reason` and `--approved`. Refused on any other status |
|
|
442
554
|
| `--qa-threshold P0\|P1\|P2\|P3\|none\|default` | plan, run, retry, review | `qa_threshold` | the least severe CONFIRMED finding that still blocks (default `P2`); milder ones become known issues; `none` means P3, `default` removes the setting. Solo takes `P0`..`P3` or `none`. See [the verdict rule](reviews.md#verdicts-and-failure) |
|
|
443
|
-
| `--verify-retries N` | run, retry, integrate | `verify_retries` | reruns of a failed verify command, or of each failed lane (default `1`, `0` = strict single run) |
|
|
555
|
+
| `--verify-retries N` | run, retry, integrate | `verify_retries` | reruns of a failed verify command, or of each failed lane (default `1`, `0` = strict single run); with `.forge/verify-subset`, a failed command's failing test files run alone first and confirm a regression without a full rerun |
|
|
444
556
|
| `--verify-lane 'name[opts]=cmd'` | run, retry | `verify.d/<name>` | one verification lane; repeatable. Options as in a lane file, comma-separated (`group=g`, `first`, `retries=n`, `reports=dir`, `baseline=file`). The first one of an invocation replaces the plan's earlier lanes and `--verify`; see [verification lanes](../references/decompose.md#execution-checks-and-integration-verification) |
|
|
445
557
|
| `--verify-parallel N` | run, retry, integrate | `verify_parallel` | lanes run at once, 1 to 32 (default `3`) |
|
|
446
558
|
| `--escalate-after N` | run, retry | `escalate_after` | failed attempts on one model before the next goes a tier up (default `3`, `0` = off) |
|
|
@@ -456,9 +568,10 @@ forge-parallel.sh combine <new-plan-dir> <plan-dir> <plan-dir>... [--verify <c
|
|
|
456
568
|
**Exit codes:** `0` ok · `2` usage or validation · `3` precondition (not a git repo, …) ·
|
|
457
569
|
`4` **`plan` only: the plan gates sent work back** (see below) ·
|
|
458
570
|
`5` some task failed QA, the combined verification failed, or a task is still waiting for an
|
|
459
|
-
answer · `6` integration conflict ·
|
|
460
|
-
`8` **paused on an infrastructure failure** (
|
|
461
|
-
|
|
571
|
+
answer or a decision · `6` integration conflict ·
|
|
572
|
+
`8` **paused on an infrastructure failure** (`capacity`, `rate_limit`, `usage_limit`, `budget`,
|
|
573
|
+
`auth`, `network`, `provider_down`, `empty` or `cancelled`; an old run may say `quota`): no
|
|
574
|
+
attempt was spent and nothing was judged — fix a "needs you" cause, or run the same command again ·
|
|
462
575
|
`130` **interrupted or stopped** (a signal, or `forge control stop`): the running tasks are
|
|
463
576
|
`INTERRUPTED` and verification was skipped or stopped; the summary prints the `retry` for each.
|
|
464
577
|
|
|
@@ -523,6 +636,19 @@ question and the answer stay for the same `--answer` to be tried again. A run th
|
|
|
523
636
|
task unmerged exits `5`, as it does for a task that failed. Only the `dwarf-message` gate, when `on`,
|
|
524
637
|
sets this status.
|
|
525
638
|
|
|
639
|
+
**`NEEDS_DECISION`** is the same kind of stop for a choice rather than a question. The reviews in
|
|
640
|
+
the last window all failed and kept finding new problems, or the retry policy has no stronger
|
|
641
|
+
model, or the task has spent its attempt cap (`plan --max-attempts N`, default 8 across runs;
|
|
642
|
+
`forge control set max-attempts N --confirm` changes it, and `0` means no cap). The reasons and
|
|
643
|
+
the `retry` and `accept` commands are in `tasks/<id>/decision.md`. The run summary lists them under
|
|
644
|
+
`waiting for your decision:`. Neither a later `run`, `--retry-failed`, a retry budget nor a pin
|
|
645
|
+
resumes that same task. Only `retry <plan> <id> --decide retry=N` or `--decide threshold=Pn`, or
|
|
646
|
+
`--dwarf <spec>`, each with `--reason "…" --approved`, or `accept`, does. Replacing it is a hand
|
|
647
|
+
edit of `tasks.tsv` before the next `run`, as the summary says (`forge control add` queues a new
|
|
648
|
+
row but does not replace the stopped one). A live scheduler takes the same flags as `forge control retry`. A run that ends with such a
|
|
649
|
+
task still in `tasks.tsv` and unmerged exits `5`. See
|
|
650
|
+
[when reviews don't converge](../references/decompose.md#when-reviews-dont-converge).
|
|
651
|
+
|
|
526
652
|
The full plan → run → integrate walkthrough is in [decomposed runs](decomposed-runs.md#plan-run-integrate). `retry`, `accept` and `review` are covered in [reviews, retries and recovery](reviews.md); resuming, `split`/`combine`, scope drift and `tasks.tsv` in [decomposed runs](decomposed-runs.md).
|
|
527
653
|
|
|
528
654
|
## `scripts/forge-jev.py`
|
package/docs/development.md
CHANGED
|
@@ -34,11 +34,14 @@ forge/
|
|
|
34
34
|
│ ├── forge-fractal-dispatch.sh bridge entrypoint for existing pipelines
|
|
35
35
|
│ ├── forge-install-fractal.sh isolated optional runtime installer
|
|
36
36
|
│ ├── forge_fractal/ nested execution, recovery, inspection and dashboard
|
|
37
|
+
│ ├── forge-compare.py `forge runs rerun|compare`: a plan under another implementer, side by side
|
|
37
38
|
│ ├── forge-ui.py `forge ui open|status|stop`: the one shared forge-ui server
|
|
38
39
|
│ ├── forge-ui-options.sh `--ui|--no-ui` and the fail-open launch, sourced by the runners
|
|
40
|
+
│ ├── forge-watch.py `forge watch`: follow runs, notify, run hooks (reads with forge-ui's reader)
|
|
39
41
|
│ ├── forge_registry.py the run registry: where run dirs are noted, read by forge-ui
|
|
40
42
|
│ ├── forge-dataset.py `forge dataset` entry point
|
|
41
43
|
│ ├── forge_dataset/ the run dataset: capture hooks, readers, importer, status checks
|
|
44
|
+
│ ├── forge-pr.py `forge pr`: a draft PR description for a finished run (reads with forge-ui's reader)
|
|
42
45
|
│ └── forge-install.sh install into every harness that needs it (opencode and grok find it themselves)
|
|
43
46
|
├── ui/ forge-ui: read-only local run viewer (`forge_ui` package, tests, API contract)
|
|
44
47
|
└── references/
|
package/docs/reviews.md
CHANGED
|
@@ -149,6 +149,8 @@ still collapses to Fractal's own "failed" handling; QA-side stops propagate as a
|
|
|
149
149
|
QA is asked to label every finding `- [P0..P3][CONFIRMED|PLAUSIBLE] file:line — what breaks`
|
|
150
150
|
(P0 data loss/security/crash on the main path, P1 wrong behaviour on realistic input, P2
|
|
151
151
|
edge-case bug, P3 minor). [The verdict rule](#verdicts-and-failure) says which of them block.
|
|
152
|
+
Task and solo reviews ask for every CONFIRMED finding, and task reviews also ask the reviewer
|
|
153
|
+
to say so plainly when the diff is correct.
|
|
152
154
|
|
|
153
155
|
`--qa-threshold Pn` (on `plan`, `run`, `retry`, `review` and solo; a plan remembers it) changes
|
|
154
156
|
the default `P2`, the **least severe level that still blocks**: `P2` means P0–P2 block and only P3
|
package/docs/troubleshooting.md
CHANGED
|
@@ -16,7 +16,11 @@ Symptoms, causes and fixes, from a skill a harness cannot see to a task that wil
|
|
|
16
16
|
| task status `ERROR` | worktree creation or a dispatch failed — read `tasks/<id>/dwarf.out` / `qa.out` |
|
|
17
17
|
| task status `UNKNOWN` | QA never emitted a verdict line; read `tasks/<id>/qa.last`. `retry` (or `run --retry-failed N`) asks QA again on the unchanged work — no dwarf runs, no attempt is spent |
|
|
18
18
|
| task status `INVALIDATED`, "artifact changed during review" | the reviewer changed a tracked file in its review copy, so its verdict counts for nothing. `retry` (or `run --retry-failed N`) reviews the unchanged work again — no dwarf runs, no attempt is spent. Untracked leftovers such as `__pycache__/` never cause this |
|
|
19
|
-
| task status `INFRA`, `run` exits `8` |
|
|
19
|
+
| task status `INFRA`, `run` exits `8` | an infrastructure stop, not a task failure, and no attempt was spent. The summary names the cause (`capacity`, `rate_limit`, `usage_limit`, `budget`, `auth`, `network`, `provider_down`, `empty`, `cancelled`; an old run may say `quota`). Read `tasks/<id>/infra.txt`. A line that does not say "needs you" can be waited out with `run --infra-retries M`, or the same command run again. Dependents stay `PENDING`, never `BLOCKED`. See [infrastructure failures](../references/decompose.md#infrastructure-failures) |
|
|
20
|
+
| "needs you" and the cause is **budget** | the harness is out of money. Add credits, or check that harness's billing. The pause spends no waits. A healthy peer of the same tier may already have taken the task |
|
|
21
|
+
| "needs you" and the cause is **auth** | log in to that harness again. The pause spends no waits |
|
|
22
|
+
| "needs you" and the cause is a **usage limit** | the account's usage window, no peer could take the work, and the reset is unknown or more than six hours away. Wait for the reset, or add another harness to this tier's pool |
|
|
23
|
+
| "needs you" and the cause is **cancelled** | the harness cancelled the dispatch. Check that harness's approval and permission settings. The first such stop is tried again at once; with nowhere to move, the pause needs you and spends no waits |
|
|
20
24
|
| a task merged although its reviewer said FAIL | the threshold (`P2` by default) accepted it: every CONFIRMED finding was labelled and milder than the threshold. See `tasks/<id>/known_issues.md` and `qa.gate` (decision `accept`); [the verdict rule](reviews.md#verdicts-and-failure) |
|
|
21
25
|
| a task FAILed although its reviewer said PASS | forge's gate: a CONFIRMED finding at or above the threshold was listed. `qa.gate` says `fail`, and the next attempt starts with a note saying so. Fix those findings, or `accept` the task if a person decides to; [the verdict rule](reviews.md#verdicts-and-failure) |
|
|
22
26
|
| `accept` exits `3` "changed since it was reviewed" | the branch or worktree moved after QA, so accepting would sign off on unreviewed code. `retry` for a fresh review |
|
package/forge
CHANGED
|
@@ -23,8 +23,10 @@ usage() {
|
|
|
23
23
|
' jev the old decision-model commands, replaced by decide (kept for one release)' \
|
|
24
24
|
' dataset every run'"'"'s inputs and outcomes: status, dump, import, export, outcomes, ...' \
|
|
25
25
|
' issues file the review findings a run left open as GitHub issues (plain gh)' \
|
|
26
|
+
' pr a draft pull-request description for a finished run (--create opens it with gh)' \
|
|
26
27
|
' ui forge-ui, the run viewer: open [DIR], status, stop' \
|
|
27
|
-
' runs this repo'"'"'s recent runs in the terminal: state, verdicts and run dirs' \
|
|
28
|
+
' runs this repo'"'"'s recent runs in the terminal: state, verdicts and run dirs; rerun a plan with another model, compare' \
|
|
29
|
+
' watch follow runs live and get a desktop notification when one finishes or fails' \
|
|
28
30
|
' control a plan'"'"'s live controls: show, set (QA threshold, retries, timeouts), pin, unpin' \
|
|
29
31
|
' config every config source: show, and set/unset the per-repo .forge files and Jev on/off' \
|
|
30
32
|
' update fast-forward this checkout and refresh every harness installation' \
|
|
@@ -46,6 +48,16 @@ hit = prefixed if len(prefixed) == 1 else difflib.get_close_matches(word, names,
|
|
|
46
48
|
print(hit[0] if hit else "")' "$1" 2>/dev/null
|
|
47
49
|
}
|
|
48
50
|
|
|
51
|
+
# A command group given no subcommand prints its own help, the way a bare `forge` prints
|
|
52
|
+
# the command list: on stderr with exit 2, rather than argparse's one "arguments are
|
|
53
|
+
# required" line that names none of the subcommands.
|
|
54
|
+
help_if_bare() {
|
|
55
|
+
[ "$1" -gt 0 ] && return 0
|
|
56
|
+
shift
|
|
57
|
+
"$@" --help >&2
|
|
58
|
+
exit 2
|
|
59
|
+
}
|
|
60
|
+
|
|
49
61
|
case "${1:-}" in
|
|
50
62
|
install)
|
|
51
63
|
shift
|
|
@@ -53,14 +65,17 @@ case "${1:-}" in
|
|
|
53
65
|
;;
|
|
54
66
|
fractal)
|
|
55
67
|
shift
|
|
68
|
+
help_if_bare $# python3 "$ROOT/scripts/forge-fractal.py"
|
|
56
69
|
exec python3 "$ROOT/scripts/forge-fractal.py" "$@"
|
|
57
70
|
;;
|
|
58
71
|
decide)
|
|
59
72
|
shift
|
|
73
|
+
help_if_bare $# python3 "$ROOT/scripts/forge-decide.py"
|
|
60
74
|
exec python3 "$ROOT/scripts/forge-decide.py" "$@"
|
|
61
75
|
;;
|
|
62
76
|
jev)
|
|
63
77
|
shift
|
|
78
|
+
help_if_bare $# python3 "$ROOT/scripts/forge-jev.py"
|
|
64
79
|
# Only the launcher says so: forge's own callers run forge-jev.py directly.
|
|
65
80
|
case "${1:-}" in
|
|
66
81
|
setup) NEW='forge decide provider add …' ;;
|
|
@@ -76,26 +91,38 @@ case "${1:-}" in
|
|
|
76
91
|
;;
|
|
77
92
|
dataset)
|
|
78
93
|
shift
|
|
94
|
+
help_if_bare $# python3 "$ROOT/scripts/forge-dataset.py"
|
|
79
95
|
exec python3 "$ROOT/scripts/forge-dataset.py" "$@"
|
|
80
96
|
;;
|
|
81
97
|
issues)
|
|
82
98
|
shift
|
|
83
99
|
exec python3 "$ROOT/scripts/forge-issues.py" "$@"
|
|
84
100
|
;;
|
|
101
|
+
pr)
|
|
102
|
+
shift
|
|
103
|
+
exec python3 "$ROOT/scripts/forge-pr.py" "$@"
|
|
104
|
+
;;
|
|
85
105
|
ui)
|
|
86
106
|
shift
|
|
107
|
+
help_if_bare $# python3 "$ROOT/scripts/forge-ui.py"
|
|
87
108
|
exec python3 "$ROOT/scripts/forge-ui.py" "$@"
|
|
88
109
|
;;
|
|
89
110
|
runs)
|
|
90
111
|
shift
|
|
91
112
|
exec python3 "$ROOT/scripts/forge-runs.py" "$@"
|
|
92
113
|
;;
|
|
114
|
+
watch)
|
|
115
|
+
shift
|
|
116
|
+
exec python3 "$ROOT/scripts/forge-watch.py" "$@"
|
|
117
|
+
;;
|
|
93
118
|
control)
|
|
94
119
|
shift
|
|
120
|
+
help_if_bare $# python3 "$ROOT/scripts/forge-control.py"
|
|
95
121
|
exec python3 "$ROOT/scripts/forge-control.py" "$@"
|
|
96
122
|
;;
|
|
97
123
|
config)
|
|
98
124
|
shift
|
|
125
|
+
help_if_bare $# python3 "$ROOT/scripts/forge-config.py"
|
|
99
126
|
exec python3 "$ROOT/scripts/forge-config.py" "$@"
|
|
100
127
|
;;
|
|
101
128
|
update)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@giamme/forge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.1",
|
|
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
|
@@ -37,7 +37,8 @@ time order: an attempt that PASSed, then a merge that CONFLICTed, then a human `
|
|
|
37
37
|
| `run_end` | `run` | results per task, the accepted integration commit, `memory.md` |
|
|
38
38
|
| `invocation` | user-facing `forge-parallel.sh` subcommand | argv, exit, duration, plus final review, accept, integrate and split/combine payloads |
|
|
39
39
|
| `event` | point event | `merge` (MERGED, CONFLICT with the files, INVALIDATED and why), `integrate_advanced`, `integrate_conflict`, `combine_conflict`, `sched_terminal`, `memory_record`, `memory_prune`, `attribution` (below) |
|
|
40
|
-
| `event` `escalation` | retry that changes the model | the model a retry escalated from and to, `after_attempt`, and `source` (`policy`, `retry` for an explicit `--dwarf`, or `pin`), recorded at the rewrite, before the retried attempt begins |
|
|
40
|
+
| `event` `escalation` | retry that changes the model | the model a retry escalated from and to, `after_attempt`, and `source` (`policy`, `retry` for an explicit `--dwarf`, or `pin`), recorded at the rewrite, before the retried attempt begins. Runs from before lateral moves had their own record may also hold `source` `fallback`: those rows are lateral moves |
|
|
41
|
+
| `event` `lateral` | dwarf-stage infrastructure stop moved the task to another model of its tier | `role` (`dwarf`), the model it moved `from` and `to`, `cause` (the stop's class, `-` when none was given) and `attempt` (the attempts spent when it moved). Recorded in `tasks/<id>/lateral.tsv`, not as an `escalation`; a streak of failures carries across it |
|
|
41
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` |
|
|
42
43
|
| `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 |
|
|
43
44
|
| `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` |
|
|
@@ -45,6 +46,7 @@ time order: an attempt that PASSed, then a merge that CONFLICTed, then a human `
|
|
|
45
46
|
| `fractal_step` / `fractal_node` | Fractal step, node state | decomposition decision, iteration, resolved model, cost, tokens, candidate diff |
|
|
46
47
|
| `ledger` | ledger row | imported `.forge/ledger.tsv` rows |
|
|
47
48
|
| `forecast` | forecast shown by `run` | the plan forecast printed before dispatch (see [plan forecast](#plan-forecast)), once per run and content. Also in the plan as `forecast.json` |
|
|
49
|
+
| `comparison` | `forge runs compare` | two runs of one plan side by side: `a` and `b` each with the run's uid, run id, starting commit and per-task status, attempts, tokens, time and diff size, and a `summary` (tasks merged in both, only in one, in neither). One event per pair and content; the event's run is the second one. Descriptive: nothing routes on it |
|
|
48
50
|
| `outcome` | integrated task, per horizon | written by `forge dataset outcomes`, never by a run: how many of the lines a task added survive N days after `integrate`, and what reverted it |
|
|
49
51
|
|
|
50
52
|
An attempt that forge sent back without a review keeps the status `FAIL` in the dataset, and
|