@giamme/forge 0.21.0 → 0.23.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 +81 -0
- package/README.md +25 -15
- package/SKILL.md +137 -216
- package/VERSION +1 -1
- package/bin/forge.js +104 -0
- package/docs/README.md +2 -3
- package/docs/add-ons.md +5 -3
- package/docs/artifacts.md +17 -2
- package/docs/commands.md +85 -63
- package/docs/decomposed-runs.md +195 -21
- package/docs/development.md +12 -10
- package/docs/forge-ui.md +33 -4
- package/docs/install.md +127 -6
- package/docs/memory.md +6 -1
- package/docs/models.md +36 -10
- package/docs/reviews.md +50 -29
- package/docs/safety.md +27 -2
- package/docs/troubleshooting.md +8 -11
- package/forge +29 -4
- package/forge.cmd +56 -0
- package/package.json +6 -3
- package/references/dataset.md +10 -9
- package/references/decompose-integration.md +337 -0
- package/references/decompose-opt-in.md +527 -0
- package/references/decompose-recovery.md +569 -0
- package/references/decompose-review.md +256 -0
- package/references/decompose.md +99 -1606
- package/references/findings.md +68 -0
- package/references/harnesses.md +7 -12
- package/references/memory.md +13 -2
- package/references/planning.md +48 -18
- package/references/ripwire.md +38 -13
- package/references/runtime.md +22 -33
- package/references/setup.md +90 -0
- package/references/solo.md +13 -42
- package/references/ui.md +12 -5
- package/registry.tsv +40 -22
- package/scripts/forge-artifact.sh +148 -13
- package/scripts/forge-compare.py +5 -15
- package/scripts/forge-config.py +14 -1
- package/scripts/forge-contract.py +216 -53
- package/scripts/forge-control.py +781 -51
- package/scripts/forge-dispatch.sh +202 -42
- package/scripts/forge-du.py +13 -3
- package/scripts/forge-guard.py +137 -6
- package/scripts/forge-handoff.py +221 -39
- package/scripts/forge-install-ripwire.sh +100 -24
- package/scripts/forge-install.sh +100 -41
- package/scripts/forge-issues.py +6 -4
- package/scripts/forge-jev-options.sh +3 -5
- package/scripts/forge-lib-adopt.sh +169 -5
- package/scripts/forge-lib-attribute.sh +10 -3
- package/scripts/forge-lib-decompose.sh +454 -0
- package/scripts/forge-lib-env.sh +179 -0
- package/scripts/forge-lib-group.sh +9 -6
- package/scripts/forge-lib-plans.sh +38 -21
- package/scripts/forge-lib-review.sh +28 -8
- package/scripts/forge-lib-task.sh +263 -69
- package/scripts/forge-lib-verify.sh +59 -10
- package/scripts/forge-memory.sh +83 -4
- package/scripts/forge-metrics.sh +10 -3
- package/scripts/forge-parallel-options.sh +23 -4
- package/scripts/forge-parallel.sh +602 -217
- package/scripts/forge-plan-check.py +71 -8
- package/scripts/forge-planner.py +303 -17
- package/scripts/forge-pr.py +9 -1
- package/scripts/forge-prompt.py +2 -2
- package/scripts/forge-review-links.py +248 -0
- package/scripts/forge-ripwire.py +234 -16
- package/scripts/forge-route.py +19 -27
- package/scripts/forge-runs-rm.py +92 -21
- package/scripts/forge-runs.py +46 -5
- package/scripts/forge-runtime.py +39 -14
- package/scripts/forge-schedule.py +141 -33
- package/scripts/forge-setup-stale.py +236 -0
- package/scripts/forge-setup.py +804 -0
- package/scripts/forge-shadow.py +2 -20
- package/scripts/forge-solo-lock.py +46 -0
- package/scripts/forge-solo.sh +39 -58
- package/scripts/forge-sweep.py +3 -2
- package/scripts/forge-ui.py +8 -1
- package/scripts/forge-update.sh +8 -3
- package/scripts/forge-verify.py +17 -1
- package/scripts/forge-version.py +13 -1
- package/scripts/forge-watch.py +7 -2
- package/scripts/forge-win.sh +156 -0
- package/scripts/forge_brief/__init__.py +6 -1
- package/scripts/forge_brief/proposals.py +6 -1
- package/scripts/forge_dataset/__init__.py +1 -1
- package/scripts/forge_dataset/capture.py +0 -34
- package/scripts/forge_dataset/checks.py +0 -1
- package/scripts/forge_dataset/cli.py +5 -1
- package/scripts/forge_dataset/export.py +28 -6
- package/scripts/forge_dataset/facts.py +1 -2
- package/scripts/forge_dataset/forecast.py +1 -1
- package/scripts/forge_dataset/harvest.py +107 -7
- package/scripts/forge_dataset/importer.py +3 -2
- package/scripts/forge_dataset/pairs.py +3 -3
- package/scripts/forge_dataset/reviewers.py +4 -3
- package/scripts/forge_dataset/routing.py +6 -3
- package/scripts/forge_dataset/tiers.py +1 -1
- package/scripts/forge_decide/__init__.py +1 -1
- package/scripts/forge_decide/budget.py +12 -7
- package/scripts/forge_decide/profiles.py +11 -14
- package/scripts/forge_decide/replay.py +9 -4
- package/scripts/forge_decompose.py +987 -0
- package/scripts/forge_flock.py +17 -2
- package/scripts/forge_groups/review.py +6 -1
- package/scripts/forge_jev/__init__.py +1 -1
- package/scripts/forge_jev/cli.py +10 -1
- package/scripts/forge_jev/gates.py +10 -1
- package/scripts/forge_jev/verify.py +10 -2
- package/scripts/forge_legacy.py +86 -0
- package/scripts/forge_memory_home.py +57 -0
- package/scripts/forge_models.py +151 -0
- package/scripts/forge_posix.py +17 -0
- package/scripts/forge_prefs.py +138 -0
- package/scripts/forge_proc.py +108 -0
- package/scripts/forge_registry.py +2 -2
- package/scripts/forge_side/__init__.py +23 -4
- package/scripts/forge_storage.py +28 -15
- package/ui/README.md +22 -10
- package/ui/docs/api.md +121 -99
- package/ui/forge_ui/control.py +53 -16
- package/ui/forge_ui/export.py +0 -10
- package/ui/forge_ui/models.py +15 -2
- package/ui/forge_ui/projects.py +4 -1
- package/ui/forge_ui/reader.py +462 -60
- package/ui/forge_ui/server.py +0 -10
- package/ui/forge_ui/static/app.js +28 -9
- package/ui/forge_ui/static/checksview.js +12 -3
- package/ui/forge_ui/static/controls.js +147 -11
- package/ui/forge_ui/static/convo.js +5 -2
- package/ui/forge_ui/static/diffview.js +4 -5
- package/ui/forge_ui/static/panel.js +180 -77
- package/ui/forge_ui/static/projectsview.js +16 -2
- package/ui/forge_ui/static/runmodel.js +18 -4
- package/ui/forge_ui/static/scene3d.js +52 -31
- package/ui/forge_ui/static/settings.js +1 -1
- package/ui/forge_ui/static/storageview.js +2 -2
- package/ui/forge_ui/static/style.css +23 -6
- package/ui/forge_ui/static/worktreesview.js +8 -4
- package/ui/forge_ui/transcripts.py +6 -0
- package/ui/forge_ui/worktrees.py +13 -1
- package/docs/fractal.md +0 -181
- package/references/fractal-dashboard.md +0 -21
- package/references/fractal.md +0 -307
- package/scripts/forge-fractal-dispatch.sh +0 -4
- package/scripts/forge-fractal-options.sh +0 -54
- package/scripts/forge-fractal.py +0 -6
- package/scripts/forge-install-fractal.sh +0 -4
- package/scripts/forge_fractal/__init__.py +0 -88
- package/scripts/forge_fractal/bridge.py +0 -46
- package/scripts/forge_fractal/cli.py +0 -224
- package/scripts/forge_fractal/dashboard.css +0 -138
- package/scripts/forge_fractal/dashboard.html +0 -41
- package/scripts/forge_fractal/dashboard.js +0 -687
- package/scripts/forge_fractal/decomposition.py +0 -262
- package/scripts/forge_fractal/execution.py +0 -659
- package/scripts/forge_fractal/inspection.py +0 -261
- package/scripts/forge_fractal/install.py +0 -158
- package/scripts/forge_fractal/invocation.py +0 -95
- package/scripts/forge_fractal/pipeline.py +0 -125
- package/scripts/forge_fractal/selection.py +0 -180
- package/ui/forge_ui/fractal.py +0 -582
package/docs/memory.md
CHANGED
|
@@ -62,7 +62,7 @@ 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)).
|
|
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-opt-in.md#retro-notes-opt-in)).
|
|
66
66
|
|
|
67
67
|
`.forge/` is the **only** thing forge writes into your working tree rather than onto a branch
|
|
68
68
|
of its own. It is excluded from every captured diff, so a reviewer never sees it as the
|
|
@@ -105,6 +105,10 @@ counting that keeps `memory.md` honest.
|
|
|
105
105
|
If you contribute to someone else's repo, gitignore it. A pull request containing forge's
|
|
106
106
|
notes to itself is noise to a reviewer who does not use forge.
|
|
107
107
|
|
|
108
|
+
From a linked worktree (`git worktree add`) whose `.forge/` is not tracked, forge keeps the memory
|
|
109
|
+
in the main checkout's `.forge/`, so `git worktree remove` cannot take learnings with it; see
|
|
110
|
+
[the reference](../references/memory.md#committing-ignoring-disabling).
|
|
111
|
+
|
|
108
112
|
## `scripts/forge-memory.sh`
|
|
109
113
|
|
|
110
114
|
```
|
|
@@ -113,6 +117,7 @@ forge-memory.sh note <planner|dwarf|qa> # the instruction to append
|
|
|
113
117
|
forge-memory.sh record <repo> --last <file> --role <r> [--run-id X] [--task T]
|
|
114
118
|
[--model M] [--verdict V] [--duration S]
|
|
115
119
|
forge-memory.sh show <repo>
|
|
120
|
+
forge-memory.sh where <repo> # the checkout whose .forge/ holds the memory
|
|
116
121
|
forge-memory.sh prune <repo> # re-apply staleness and the cap now
|
|
117
122
|
forge-memory.sh spend <repo> [--run <run-id>] # what forge has cost this repo
|
|
118
123
|
forge-memory.sh learnings <repo> [--json] # every ledger learning and its state, as JSON (forge memory learnings)
|
package/docs/models.md
CHANGED
|
@@ -114,7 +114,8 @@ A word that isn't a recognized effort at all is an error, not a clamp.
|
|
|
114
114
|
|
|
115
115
|
## Yolo mode
|
|
116
116
|
|
|
117
|
-
`--yolo-dwarf` and `--yolo-qa` drop that role's
|
|
117
|
+
`--yolo-dwarf` and `--yolo-qa` drop that role's permission and approval gates, and on codex its
|
|
118
|
+
sandbox:
|
|
118
119
|
|
|
119
120
|
| Harness | Flag used |
|
|
120
121
|
|---|---|
|
|
@@ -127,10 +128,13 @@ Each flag applies to **one role only**, so `--yolo-dwarf` alone is the normal co
|
|
|
127
128
|
the implementer gets a free hand, the reviewer stays fenced in and still can't edit the code
|
|
128
129
|
it's judging.
|
|
129
130
|
|
|
130
|
-
You mostly don't need it.
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
You mostly don't need it. Without yolo the dwarf already edits files and runs tests on codex,
|
|
132
|
+
claude, openclaude, opencode and grok, and qa reads and runs commands without its editing
|
|
133
|
+
tools. Only codex puts a role in an OS sandbox: on claude, openclaude, opencode and grok a role
|
|
134
|
+
with a shell can already install dependencies, write outside the repo and reach the network, and
|
|
135
|
+
yolo adds only the tools and prompts the permission mode held back. On opencode the dwarf gets
|
|
136
|
+
`--auto` either way, so `--yolo-dwarf` changes nothing there. [Safety](safety.md#what-each-role-can-do-per-harness)
|
|
137
|
+
has the table of what each role can do on each harness.
|
|
134
138
|
|
|
135
139
|
> **Antigravity is the exception worth knowing.** Without yolo it cannot run *any* shell
|
|
136
140
|
> command, and a single denied command **aborts the whole run** rather than degrading — a
|
|
@@ -146,12 +150,12 @@ columns, plus an optional fifth:
|
|
|
146
150
|
|
|
147
151
|
```
|
|
148
152
|
# alias harness model effort [timeout]
|
|
149
|
-
sol codex gpt-6.
|
|
150
|
-
sol openclaude gpt-6.
|
|
153
|
+
sol codex gpt-6.2-sol <=ultra
|
|
154
|
+
sol openclaude gpt-6.2-sol <=max
|
|
151
155
|
gemini-pro antigravity gemini-3.1-pro low,high
|
|
152
|
-
opus antigravity claude-opus-4-6-thinking none
|
|
156
|
+
opus-4.6 antigravity claude-opus-4-6-thinking none
|
|
153
157
|
grok grok grok-4.7 <=xhigh
|
|
154
|
-
grok opencode github-copilot/grok-4.6 -
|
|
158
|
+
grok-4.6 opencode github-copilot/grok-4.6 -
|
|
155
159
|
```
|
|
156
160
|
|
|
157
161
|
| `effort` form | Means |
|
|
@@ -170,10 +174,32 @@ or absent = the built-in default). It applies only when neither `--timeout` nor
|
|
|
170
174
|
`--dwarf sol` means sol on codex; `--dwarf sol:high:openclaude` moves the same model
|
|
171
175
|
elsewhere.
|
|
172
176
|
|
|
177
|
+
**An alias is one model on every harness.** Every row of an alias names the same model family
|
|
178
|
+
and version; only a provider prefix (`github-copilot/`) or a `-preview` suffix may differ. A
|
|
179
|
+
harness that serves only another version gets an alias of its own: Antigravity's Claude models
|
|
180
|
+
are `opus-4.6` and `sonnet-4.6`, GitHub Copilot's older Fable and Grok are `fable-5.1` and
|
|
181
|
+
`grok-4.6`, and Gemini Pro on opencode is a second `gemini-pro` row, never a `gemini` one. So
|
|
182
|
+
`opus::antigravity` no longer picks a different Opus under the same name: it passes `opus` as a
|
|
183
|
+
literal model id, with a note that Antigravity serves `opus-4.6`, and the statistics that count by alias never mix two models. `tests/test_model_registry.py` fails on an
|
|
184
|
+
alias whose rows disagree.
|
|
185
|
+
|
|
186
|
+
**The approval table says which model each spec runs.** Under the waves, a `models` block lists
|
|
187
|
+
every spec of the plan with the model id it resolves to today (`sol:high gpt-6.2-sol on codex`),
|
|
188
|
+
so a moved alias is never a surprise. `python3 scripts/forge_models.py describe SPEC` prints
|
|
189
|
+
the same line for any spec.
|
|
190
|
+
|
|
191
|
+
**Claude models are named by exact id.** The claude and openclaude rows pass
|
|
192
|
+
`claude-opus-5-5`, `claude-sonnet-5-5`, `claude-haiku-5-5` and `claude-fable-5-2`, not the
|
|
193
|
+
claude CLI's own `opus` or `sonnet`, which the CLI moves to a newer model on its own. So the
|
|
194
|
+
version that runs is the one the registry, the approval table and the statistics show, and a
|
|
195
|
+
new Claude release is a registry edit like any other: move the alias and keep the old model
|
|
196
|
+
under a versioned alias.
|
|
197
|
+
|
|
173
198
|
Adding a model is one line in this file. Nothing else needs to change.
|
|
174
199
|
|
|
175
200
|
**Moving an alias to a newer model.** Keep the old model under a versioned alias, as
|
|
176
|
-
`terra-5.6` keeps gpt-5.6-terra now that `terra` is gpt-6.1-terra.
|
|
201
|
+
`terra-5.6` keeps gpt-5.6-terra now that `terra` is gpt-6.1-terra, and `sol-6.1` and `astra-6`
|
|
202
|
+
keep gpt-6.1-sol and gpt-6-astra now that `sol` and `astra` are the 6.2 models. Each dispatch records
|
|
177
203
|
the model id it ran, so the statistics that count by alias (`forge dataset reviewers`, review
|
|
178
204
|
history, forge-ui's model leaderboard) count an old `terra` dispatch under `terra-5.6`, the
|
|
179
205
|
alias that resolves to its model today, and never under the newer `terra`. Without a versioned
|
package/docs/reviews.md
CHANGED
|
@@ -15,13 +15,19 @@ FORGE_VERDICT: FAIL — at least one CONFIRMED finding at the blocking thresho
|
|
|
15
15
|
|
|
16
16
|
forge decides the verdict from the findings, at a blocking threshold: `P2` unless
|
|
17
17
|
`--qa-threshold` sets another. A CONFIRMED finding at the threshold or worse, or one with no
|
|
18
|
-
severity, blocks: a PASS that lists one becomes FAIL.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
severity, blocks: a PASS that lists one becomes FAIL. Reporting failing tests caused by the
|
|
19
|
+
change blocks the same way: a FAIL whose reply reports failing tests (`FORGE_TESTS: RAN —
|
|
20
|
+
FAILED: <names>`, `FORGE_TESTS: FAILED — <names>`, or `FORGE_TESTS_FAILED: <names>`) stays FAIL
|
|
21
|
+
even when every CONFIRMED finding is below the threshold, and a PASS that reports failing tests
|
|
22
|
+
becomes FAIL. The prompt asks the reviewer to file tests failing because of this change as a
|
|
23
|
+
blocking CONFIRMED finding at the threshold or worse, while pre-existing unrelated failures stay
|
|
24
|
+
in prose. A CONFIRMED finding below the threshold never blocks on its own:
|
|
25
|
+
a FAIL made only of those (with no failing tests reported) is accepted, and either way they are
|
|
26
|
+
recorded in `known_issues.md`, which `forge issues` and the sweep pick up. PLAUSIBLE findings never
|
|
27
|
+
block. `--qa-threshold P3` (or `none`) makes every CONFIRMED finding block.
|
|
28
|
+
|
|
29
|
+
Only a standalone final line counts, and the parser is shared by every runner (solo
|
|
30
|
+
and decomposed). The prompt shows each verdict with a dash and its
|
|
25
31
|
meaning, and some reviewers copy that whole line, so `FORGE_VERDICT: PASS — meaning` is
|
|
26
32
|
accepted, as are trailing whitespace and CRLF line endings. Prose or a quoted marker earlier
|
|
27
33
|
in the reply is never a verdict. A missing verdict is `UNKNOWN` and is treated exactly like a
|
|
@@ -29,10 +35,15 @@ failure — excluded from integration and flagged. Merging a diff whose reviewer
|
|
|
29
35
|
a conclusion would defeat the point of reviewing it, so the ambiguous case fails safe.
|
|
30
36
|
|
|
31
37
|
Before the verdict, a reviewer says whether its tests ran: `FORGE_TESTS: RAN`,
|
|
32
|
-
`FORGE_TESTS:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
`FORGE_TESTS: RAN — FAILED: <names>`, `FORGE_TESTS: PARTIAL — <what stopped or was skipped>`,
|
|
39
|
+
`FORGE_TESTS: NOT NEEDED — why` or `FORGE_TESTS: COULD NOT RUN — why`. Checks listed in the
|
|
40
|
+
brief's acceptance criteria take priority over the 5-minute guideline (or set `--qa-test-minutes N`,
|
|
41
|
+
`0` for no separate minute cap); any stopped or skipped check must report `PARTIAL` rather than
|
|
42
|
+
`RAN`. Plain `RAN`, `PARTIAL`, `NOT NEEDED` and `COULD NOT RUN` never change the verdict, while
|
|
43
|
+
`RAN — FAILED: <names>` (or a `FORGE_TESTS_FAILED: <names>` line) stops the gate from accepting a
|
|
44
|
+
FAIL and turns a PASS into FAIL. `PARTIAL` and `COULD NOT RUN` print a note, and forge-ui and the
|
|
45
|
+
dataset record the status so a review that skipped acceptance checks stands out cleanly.
|
|
46
|
+
Markup and any separator are accepted, and a line that says something else is recorded as `unclear`.
|
|
36
47
|
An older reply has no such line.
|
|
37
48
|
|
|
38
49
|
A failing task is excluded and **its branch and worktree are preserved**; the rest of the run
|
|
@@ -78,10 +89,12 @@ Two things it deliberately does:
|
|
|
78
89
|
- **Reviews the task's cumulative diff**, against the commit the task was originally branched
|
|
79
90
|
from — not just the fix. Reviewing the fix alone would let the first attempt's code through
|
|
80
91
|
unread.
|
|
81
|
-
- **Refuses to re-review identical code.** If the retry produces a byte-identical diff
|
|
82
|
-
task fails again without spending a QA dispatch. A retry that
|
|
83
|
-
and leaves
|
|
84
|
-
`tasks/<id>/noretry` and QA is not dispatched.
|
|
92
|
+
- **Refuses to re-review identical code.** If the retry produces a byte-identical diff
|
|
93
|
+
against an unchanged brief, the task fails again without spending a QA dispatch. A retry that
|
|
94
|
+
only rejects the findings, and leaves both the diff and the brief unchanged, writes
|
|
95
|
+
`tasks/<id>/noretry` and QA is not dispatched. Clarifying `tasks/<id>/prompt.md` or
|
|
96
|
+
`approach.md` (or changing `qa_threshold`) before retrying lets QA re-review even unchanged code
|
|
97
|
+
against the updated brief.
|
|
85
98
|
|
|
86
99
|
When the diff did change, QA on that retry is handed the previous round as well as the
|
|
87
100
|
cumulative diff. The report goes under **Findings from the previous review round**. The
|
|
@@ -170,7 +183,10 @@ member's settled `FAIL` is checked the same way. A solo review is not.
|
|
|
170
183
|
task's status. `decision.md` prints `path — declared by <id> (<status>)` or
|
|
171
184
|
`path — declared by no task`, then the plan choices: add the path to this task's `files`, make
|
|
172
185
|
this task depend on the owner, or merge the two rows. Edit `tasks.tsv`, run `plan` again when
|
|
173
|
-
no run is live, then `retry --decide retry=1` with `--reason` and `--approved`.
|
|
186
|
+
no run is live, then `retry --decide retry=1` with `--reason` and `--approved`. When no task
|
|
187
|
+
declares the path, the first choice is one command, on a live run too:
|
|
188
|
+
`forge control retry <plan> <id> --decide files+=<path> --reason "…" --approved` adds it to the
|
|
189
|
+
task's files and resumes it (refused, with nothing written, when another task declares the path).
|
|
174
190
|
|
|
175
191
|
That `FAIL` counts toward `--max-attempts`, because a review happened. It does not spend a
|
|
176
192
|
further attempt on the model: escalation does not run, and `--retry-failed` does not re-queue a
|
|
@@ -196,6 +212,12 @@ re-dispatch that keeps the committed work is reviewed rather than refused as ide
|
|
|
196
212
|
dataset attempt event has `prompt_changed`. `forge dataset routing`, tiers and the forecast
|
|
197
213
|
leave those attempts out. The `prompt` blob is the text the implementer was given.
|
|
198
214
|
|
|
215
|
+
An edit made while the review runs is caught the same way, after the review and before its verdict
|
|
216
|
+
counts: the attempt is `STALE`, the review's `FAIL` costs nothing, and its findings go to the next attempt
|
|
217
|
+
with the new text, to be checked against it. Edits at any other moment (between attempts, while a task waits)
|
|
218
|
+
are logged in `control.log` when the next attempt starts, and the run summary marks a drifted file the brief
|
|
219
|
+
names as `(named in the brief)`, apart from drift nothing explains.
|
|
220
|
+
|
|
199
221
|
## Infrastructure failures are not task failures
|
|
200
222
|
|
|
201
223
|
A quota or usage limit, an auth problem, a rate limit, a network error, or a harness that
|
|
@@ -231,8 +253,7 @@ nothing new until `forge control resume <plan>`, inside the same run.
|
|
|
231
253
|
`.infra` (`dwarf.infra`/`qa.infra`) holds `class=`, `retry_after=`, `detail=`, `rc=`,
|
|
232
254
|
`role=`, `harness=`, `model=`. Detection is deliberately strict: strong phrases only, and ordinary text that merely
|
|
233
255
|
mentions "rate limit" in a reply that otherwise succeeded is never classified. A false
|
|
234
|
-
positive costs a pause, not a spent attempt.
|
|
235
|
-
still collapses to Fractal's own "failed" handling; QA-side stops propagate as above.
|
|
256
|
+
positive costs a pause, not a spent attempt.
|
|
236
257
|
|
|
237
258
|
## Severity, thresholds and known issues
|
|
238
259
|
|
|
@@ -390,7 +411,7 @@ is filed.
|
|
|
390
411
|
off unless you pass it. A planner's groups, and `--groups` without `--group-review`, are names
|
|
391
412
|
only (`review=task`): they show in the approval table, and each task is still reviewed on its
|
|
392
413
|
own. The mechanics are in
|
|
393
|
-
[Groups and group review](../references/decompose.md#groups-and-group-review-opt-in).
|
|
414
|
+
[Groups and group review](../references/decompose-opt-in.md#groups-and-group-review-opt-in).
|
|
394
415
|
|
|
395
416
|
**Fewer dispatches, a larger prompt.** A group is one review instead of one per member, and
|
|
396
417
|
the reviewer sees those tasks together: each task's requirements, and the combined diff. The
|
|
@@ -413,8 +434,8 @@ review. `--group-review` already leaves high-difficulty tasks out of the groups
|
|
|
413
434
|
A combined diff over `group_max_diff_kb` (256 KB unless the plan says otherwise) is not
|
|
414
435
|
reviewed and not truncated: the group stops for a decision. That is separate from a
|
|
415
436
|
[whole-run review](#whole-run-review-opt-in), which reads the combined result after the run
|
|
416
|
-
and does truncate. Group review runs no shadow review
|
|
417
|
-
across rounds
|
|
437
|
+
and does truncate. Group review runs no shadow review and does not continue a reviewer session
|
|
438
|
+
across rounds.
|
|
418
439
|
|
|
419
440
|
## Reviewer session (opt-in experiment)
|
|
420
441
|
|
|
@@ -435,15 +456,15 @@ review is not sampled.
|
|
|
435
456
|
|
|
436
457
|
Any round that cannot continue starts a fresh session. That is the first round, a missing
|
|
437
458
|
or malformed session id, a resolution that is missing or different, any harness other
|
|
438
|
-
than those three,
|
|
459
|
+
than those three, and a continue that the harness refuses or that fails
|
|
439
460
|
(dispatch exit **9**). Exit 9 means the session was not continued. Forge sends the same
|
|
440
461
|
prompt again as a fresh session, and that dispatch decides the round. One row per round
|
|
441
462
|
is appended to `tasks/<id>/review_sessions.tsv`: round, attempt, `continued` or `fresh`,
|
|
442
463
|
the reason, and the session id the round considered (empty when there was none). The
|
|
443
464
|
row describes the dispatch whose result counts, so a failed continue is a single
|
|
444
465
|
`fresh` row. Reasons are `same-spec`, `first-round`, `no-session`, `invalid-session`,
|
|
445
|
-
`spec-changed`, `harness-unsupported`, `
|
|
446
|
-
`continue-failed
|
|
466
|
+
`spec-changed`, `harness-unsupported`, `continue-unsupported` and
|
|
467
|
+
`continue-failed` (`fractal` appears only in rows written before forge 0.23). A final review records the same outcome as `session=` and
|
|
447
468
|
`session_reason=` in `review.meta`.
|
|
448
469
|
|
|
449
470
|
A shadow review never continues a session. It stays a separate fresh review of a copy of
|
|
@@ -471,7 +492,7 @@ finishes, so the most it costs is reviews and a little latency. To measure what
|
|
|
471
492
|
buys, list the reviewers' own model at another effort (`--shadow-qa sol:medium` beside `sol:high`):
|
|
472
493
|
`forge dataset pairs` reports those pairs apart from model and family comparisons, and a shadow
|
|
473
494
|
identical to its primary is recorded as a control, never as an effort comparison. See
|
|
474
|
-
[decomposition](../references/decompose.md#shadow-reviews-opt-in).
|
|
495
|
+
[decomposition](../references/decompose-review.md#shadow-reviews-opt-in).
|
|
475
496
|
|
|
476
497
|
## Implementer guards
|
|
477
498
|
|
|
@@ -481,7 +502,7 @@ it did not run. forge then **observes** whether it did, rather than trusting its
|
|
|
481
502
|
- **self-commit / branch switch** — HEAD or the checked-out ref moved during the dispatch;
|
|
482
503
|
- **orphan processes** — the harness runs in its own session; anything still alive in it after
|
|
483
504
|
the harness exits is listed in `<role>.orphans` and stopped (`FORGE_ORPHAN_GUARD=off`
|
|
484
|
-
disables this
|
|
505
|
+
disables this);
|
|
485
506
|
- **promised later work** — "running in the background", "will report back once it
|
|
486
507
|
finishes" and similar in the final message.
|
|
487
508
|
|
|
@@ -508,7 +529,7 @@ run) when the source fingerprint is unchanged. If the rerun passes the status is
|
|
|
508
529
|
intermittent failure can be a real bug, so it is never passed off as a clean pass. A command
|
|
509
530
|
that changes the tree is never retried.
|
|
510
531
|
|
|
511
|
-
With [verification lanes](../references/decompose.md#execution-checks-and-integration-verification)
|
|
532
|
+
With [verification lanes](../references/decompose-integration.md#execution-checks-and-integration-verification)
|
|
512
533
|
the rerun is per lane: only a lane that failed runs again, alone, and a lane that passes on its
|
|
513
534
|
rerun is `flaky`. The run is then a pass, but `run`/`retry`/`integrate` print
|
|
514
535
|
`FLAKY: lane <name> failed once and passed on rerun`, and `verification.flaky` records each
|
|
@@ -534,7 +555,7 @@ and against the base without it, using the per-file command in `.forge/verify-su
|
|
|
534
555
|
the reviewer the result: `proven`, `passes_without_change`, `inconclusive` or `error`. The
|
|
535
556
|
reviewer is asked for a P2 finding for every test that passes without the change. It is advice
|
|
536
557
|
only: forge never changes a status or verdict from it. forge-ui shows the evidence under the
|
|
537
|
-
review findings. See [fail-first evidence](../references/decompose.md#fail-first-evidence-opt-in).
|
|
558
|
+
review findings. See [fail-first evidence](../references/decompose-review.md#fail-first-evidence-opt-in).
|
|
538
559
|
|
|
539
560
|
## Pre-review tests (opt-in)
|
|
540
561
|
|
|
@@ -545,4 +566,4 @@ a change to shared test infrastructure, more than 20 files or more than 120 s is
|
|
|
545
566
|
broad. A red attempt goes back to its implementer without a review, with the failing tests and
|
|
546
567
|
their output as its findings; a test that also fails on the task base is not blamed, and a failure
|
|
547
568
|
that passes when rerun alone is recorded as flaky. Green, the reviewer gets the result as
|
|
548
|
-
evidence. See [pre-review tests](../references/decompose.md#pre-review-tests-opt-in).
|
|
569
|
+
evidence. See [pre-review tests](../references/decompose-review.md#pre-review-tests-opt-in).
|
package/docs/safety.md
CHANGED
|
@@ -12,8 +12,10 @@ What forge never does to your branch and working tree, what it refuses to run on
|
|
|
12
12
|
branches and the `forge/<run-id>-integration` branch — branches forge created for itself.
|
|
13
13
|
Never your branch, never a push. Your branch and working tree are untouched for the whole
|
|
14
14
|
run.
|
|
15
|
-
- Bypass flags are never added on forge's own initiative. `--yolo-dwarf` / `--yolo-qa`
|
|
16
|
-
|
|
15
|
+
- Bypass flags are never added on forge's own initiative. `--yolo-dwarf` / `--yolo-qa` remove
|
|
16
|
+
whatever fence forge put around a role, so that choice is always explicit and visible. How
|
|
17
|
+
much fence there is without them depends on the harness: forge sets an OS sandbox only on
|
|
18
|
+
codex. See [what each role can do](#what-each-role-can-do-per-harness).
|
|
17
19
|
- **One dwarf per working tree, always.** Two agents editing one tree interleave their edits
|
|
18
20
|
into a diff neither of them wrote and qa cannot untangle. Parallelism comes from separate
|
|
19
21
|
worktrees, which is why worktrees are mandatory there rather than an optimization.
|
|
@@ -31,6 +33,29 @@ What forge never does to your branch and working tree, what it refuses to run on
|
|
|
31
33
|
hold its lock), a worktree, or a file forge does not create, and they import the run into the
|
|
32
34
|
dataset strictly before anything goes. Log copies are gzipped, never deleted.
|
|
33
35
|
|
|
36
|
+
## What each role can do, per harness
|
|
37
|
+
|
|
38
|
+
forge sets an operating-system sandbox only on **codex**. On the other harnesses a role without
|
|
39
|
+
yolo is limited by the harness's permission mode, and a role that has a shell can use it for
|
|
40
|
+
anything your user account can do: install dependencies, write outside the repository, reach the
|
|
41
|
+
network. Disabled editing tools stop the editor tools, not a shell command that writes a file.
|
|
42
|
+
Your own harness settings (a sandbox in its config, deny rules) still apply on top of what forge
|
|
43
|
+
passes.
|
|
44
|
+
|
|
45
|
+
| Harness | Dwarf without yolo | Reviewer (QA, planner) without yolo | What yolo changes |
|
|
46
|
+
|---|---|---|---|
|
|
47
|
+
| codex | `--approve-for-me`: commands run inside the sandbox your codex configuration gives `codex exec`; forge does not choose one | **read-only sandbox**: reads everything, writes only its own temp dir, no edits to the tree | drops the sandbox and approvals (`--dangerously-bypass-approvals-and-sandbox`) |
|
|
48
|
+
| claude, openclaude | `--permission-mode acceptEdits --allowedTools Bash`: edits plus an unrestricted shell | the same shell, with `Edit`, `Write` and `NotebookEdit` disabled; it can still write through Bash | `--dangerously-skip-permissions`: every tool, no prompts |
|
|
49
|
+
| opencode | `--auto`, always: every tool, including the shell | `--auto --agent plan`: opencode's read-only agent, not a permission boundary | nothing for the dwarf (it already has `--auto`); a reviewer loses `--agent plan` |
|
|
50
|
+
| grok | `--permission-mode acceptEdits --allow Bash`: edits plus an unrestricted shell | the same shell, with `Edit` and `Write` denied; it can still write through Bash | `--always-approve`: every tool, no prompts |
|
|
51
|
+
| antigravity | `--mode accept-edits`: edits, but **no shell command at all** (a denied command aborts the run) | `--mode plan`: reads only, no shell | `--dangerously-skip-permissions`: the only way to run commands |
|
|
52
|
+
|
|
53
|
+
What protects your work whatever the harness: a dwarf works in a worktree or on your uncommitted
|
|
54
|
+
tree as described above, a reviewer works on a disposable snapshot, and forge fingerprints the
|
|
55
|
+
tree before and after each review, so a reviewer that changed what it was judging does not pass.
|
|
56
|
+
None of that stops a shell command from writing elsewhere on your machine. If you need that, run
|
|
57
|
+
the harness inside its own sandbox (a container, or the harness's sandbox setting).
|
|
58
|
+
|
|
34
59
|
## Preconditions
|
|
35
60
|
|
|
36
61
|
- Not a git repo → decomposed runs refuse. Worktrees are impossible and there's no honest
|
package/docs/troubleshooting.md
CHANGED
|
@@ -16,7 +16,7 @@ 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` | 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) |
|
|
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-recovery.md#infrastructure-failures) |
|
|
20
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
21
|
| "needs you" and the cause is **auth** | log in to that harness again. The pause spends no waits |
|
|
22
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 |
|
|
@@ -24,7 +24,7 @@ Symptoms, causes and fixes, from a skill a harness cannot see to a task that wil
|
|
|
24
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) |
|
|
25
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) |
|
|
26
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 |
|
|
27
|
-
| `combine` / `split` refuses | the message names why: unmerged task left behind, duplicate ids, locked or dirty plan, a Fractal
|
|
27
|
+
| `combine` / `split` refuses | the message names why: unmerged task left behind, duplicate ids, locked or dirty plan, a plan made with Fractal (removed in 0.23), or a selection that strands a dependent. Nothing was changed |
|
|
28
28
|
| `integrate --final-review` stops with exit `5` | the whole-run reviewer found a blocking defect (or never reached a verdict); findings are in `<plan>/…/final-review/qa.last`. Your branch is untouched. Exit `8` means the reviewer hit a quota/auth stop: run it again |
|
|
29
29
|
| `FLAKY` in the summary, verification `PASS` | the verify command failed once and passed on rerun. Read `verification.log` (the first run) — an intermittent failure can be a real bug. `--verify-retries 0` restores the strict single run |
|
|
30
30
|
| `verify coverage: suite '…' is not run by the verify command` | the project defines a suite your `--verify` skips. Advisory only; add it to the command (or `.forge/verify`) if it should gate the merge |
|
|
@@ -38,21 +38,18 @@ Symptoms, causes and fixes, from a skill a harness cannot see to a task that wil
|
|
|
38
38
|
| every wave has exactly one task | `files` sets overlap across most tasks; the decomposition isn't actually parallel |
|
|
39
39
|
| dwarves reimplement already-merged work | `goal.txt` or `files` missing, so the capsule carries no useful status |
|
|
40
40
|
| several tasks report "produced no changes" | the decomposition made tasks that weren't independently actionable — use a coarser `--decompose-level`, not more retries |
|
|
41
|
-
| `retry` says "produced no new changes" | the dwarf returned a byte-identical diff, so no reviewer was paid to read the same code twice. Escalate with `--dwarf`, or
|
|
41
|
+
| `retry` says "produced no new changes" | the dwarf returned a byte-identical diff against the same brief, so no reviewer was paid to read the same code twice. Escalate with `--dwarf`, or clarify `prompt.md` / `approach.md` (an updated brief re-reviews even unchanged code) |
|
|
42
42
|
| a new file's code never reached QA | fixed: untracked files are diffed against `/dev/null`. A hand-built capture using only `git status --porcelain` shows the reviewer a filename and no content |
|
|
43
43
|
| claude dwarf ends "I need your permission to edit" | a permission mode that prompts for Edit. forge uses `acceptEdits` plus an explicit Bash allowance, because `auto` allows shell but prompts for Edit, and `acceptEdits` alone allows Edit but prompts for real shell commands |
|
|
44
44
|
| `.forge/` turns up in a review | a diff capture is missing `':(exclude).forge'` |
|
|
45
45
|
| memory stays empty | nothing durable was learned — the common, correct case. The ledger still has a row per dispatch |
|
|
46
46
|
| a wrong fact keeps reappearing | `memory.md` is rebuilt from the ledger; delete the ledger rows, not the memory line |
|
|
47
47
|
| dwarves build incompatible interfaces | the seam was never agreed — plan the approach, or use `--planner` |
|
|
48
|
-
|
|
|
49
|
-
| `
|
|
50
|
-
|
|
|
51
|
-
|
|
|
52
|
-
|
|
|
53
|
-
| Fractal work was paused or its coordinator exited | inspect `status` and `logs`, then use explicit `resume RUN_ID`; retry starts a new attempt |
|
|
54
|
-
| browser dashboard closed while work is running | execution is independent; reopen with `forge fractal open RUN_ID` |
|
|
55
|
-
| costs are unknown or a dollar cap is rejected | the bridge only reports available usage; v1 cannot enforce a spending cap |
|
|
48
|
+
| `--fractal…` or `forge fractal` says it `was removed with Fractal` | forge 0.23 removed that backend; drop the flag. A task is split into subtasks by forge itself: [Splitting a task into subtasks](decomposed-runs.md#splitting-a-task-into-subtasks) |
|
|
49
|
+
| `run`, `retry` or `forge handoff resume` says a plan `was made with Fractal` | an old plan stays readable (`forge runs`, forge-ui) but is never run again; start a new run for the work that is left. `forge du` shows what the old runtime left on disk |
|
|
50
|
+
| a task is `BLOCKED` and the summary says `waiting for their subtasks` | a subtask failed or waits for you; no attempt of the task was spent. Retry it in its own plan (`retry <plan-dir>/tasks/<id>/sub <subtask>`), then `run <plan-dir>` again |
|
|
51
|
+
| `not split`, and the node reads `bounded` | the split would pass a limit of the run (`--split-depth`, `--split-children`, `--split-nodes`); the task runs as one task. The limits are frozen by the first run |
|
|
52
|
+
| a `plan` that changes `--split-…` is refused | the limits cannot change once the plan has run; make a new plan for other limits |
|
|
56
53
|
|
|
57
54
|
For per-harness invocation details, effort ladders and known CLI failure modes, see
|
|
58
55
|
[`references/harnesses.md`](../references/harnesses.md). For decomposition mechanics, see
|
package/forge
CHANGED
|
@@ -11,6 +11,10 @@ while [ -L "$SELF" ]; do
|
|
|
11
11
|
esac
|
|
12
12
|
done
|
|
13
13
|
ROOT="$(cd -P "$(dirname "$SELF")" && pwd)"
|
|
14
|
+
# Windows: re-run inside MSYS2 when started from Git Bash (no-op elsewhere).
|
|
15
|
+
. "$ROOT/scripts/forge-win.sh"
|
|
16
|
+
source "$ROOT/scripts/forge-lib-env.sh"
|
|
17
|
+
forge_ensure_python3
|
|
14
18
|
|
|
15
19
|
usage() {
|
|
16
20
|
printf '%s\n' \
|
|
@@ -18,7 +22,8 @@ usage() {
|
|
|
18
22
|
'' \
|
|
19
23
|
'commands:' \
|
|
20
24
|
' install link forge into each agent harness on this machine; --dry-run previews' \
|
|
21
|
-
'
|
|
25
|
+
' setup what forge needs to get started, asked once: models, reviews, add-ons; show, export' \
|
|
26
|
+
' ripwire the optional Ripwire context engine: status [--check], install, update [--version TAG]' \
|
|
22
27
|
' decide decision-model gates: status, gate, provider, budget, privacy, doctor, migrate, report, replay' \
|
|
23
28
|
' jev the old decision-model commands, replaced by decide (kept for one release)' \
|
|
24
29
|
' dataset every run'"'"'s inputs and outcomes: status, dump, import, export, outcomes, ...' \
|
|
@@ -72,10 +77,30 @@ case "${1:-}" in
|
|
|
72
77
|
shift
|
|
73
78
|
exec /bin/bash "$ROOT/scripts/forge-install.sh" "$@"
|
|
74
79
|
;;
|
|
75
|
-
|
|
80
|
+
setup)
|
|
81
|
+
shift
|
|
82
|
+
exec python3 "$ROOT/scripts/forge-setup.py" "$@"
|
|
83
|
+
;;
|
|
84
|
+
ripwire)
|
|
76
85
|
shift
|
|
77
|
-
|
|
78
|
-
|
|
86
|
+
case "${1:-}" in
|
|
87
|
+
status) shift; exec python3 "$ROOT/scripts/forge-ripwire.py" --doctor "$@" ;;
|
|
88
|
+
install) shift; exec /bin/bash "$ROOT/scripts/forge-install-ripwire.sh" "$@" ;;
|
|
89
|
+
update) shift; exec /bin/bash "$ROOT/scripts/forge-install-ripwire.sh" --upgrade "$@" ;;
|
|
90
|
+
''|-h|--help|help)
|
|
91
|
+
printf '%s\n' 'usage: forge ripwire status [--check] | install [--yes] [--version TAG] | update [--yes] [--version TAG]' \
|
|
92
|
+
' status the installed Ripwire, whether forge can use it (0.6 or later) and the newest release' \
|
|
93
|
+
' install install the latest release into ~/.local/bin (asks first)' \
|
|
94
|
+
' update replace the Ripwire forge installed with the latest release (asks first)'
|
|
95
|
+
[ -n "${1:-}" ] && exit 0
|
|
96
|
+
exit 2 ;;
|
|
97
|
+
*) printf 'forge ripwire: unknown command: %s (status, install, update)\n' "$1" >&2; exit 2 ;;
|
|
98
|
+
esac
|
|
99
|
+
;;
|
|
100
|
+
fractal)
|
|
101
|
+
# Removed in forge 0.23 (#154): one line and exit 2, like a removed flag.
|
|
102
|
+
printf '%s\n' 'forge: forge fractal was removed with Fractal in forge 0.23. Task decomposition is native now (see docs/decomposed-runs.md); forge du shows what the old runtime left on disk.' >&2
|
|
103
|
+
exit 2
|
|
79
104
|
;;
|
|
80
105
|
decide)
|
|
81
106
|
shift
|
package/forge.cmd
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
@echo off
|
|
2
|
+
setlocal EnableExtensions
|
|
3
|
+
set "FORGE_SCRIPT=%~dp0forge"
|
|
4
|
+
|
|
5
|
+
if defined FORGE_BASH (
|
|
6
|
+
if exist "%FORGE_BASH%" (
|
|
7
|
+
set "BASH_EXE=%FORGE_BASH%"
|
|
8
|
+
goto :run
|
|
9
|
+
)
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
for %%P in (
|
|
13
|
+
"%ProgramFiles%\Git\bin\bash.exe"
|
|
14
|
+
"%ProgramFiles(x86)%\Git\bin\bash.exe"
|
|
15
|
+
"%LocalAppData%\Programs\Git\bin\bash.exe"
|
|
16
|
+
) do (
|
|
17
|
+
if exist "%%~P" (
|
|
18
|
+
set "BASH_EXE=%%~P"
|
|
19
|
+
goto :run
|
|
20
|
+
)
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
for %%I in (bash.exe) do (
|
|
24
|
+
if not "%%~$PATH:I"=="" call :check_bash "%%~$PATH:I" && goto :run
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
for %%I in (git.exe) do (
|
|
28
|
+
if not "%%~$PATH:I"=="" (
|
|
29
|
+
if exist "%%~dp$PATH:I..\bin\bash.exe" (
|
|
30
|
+
set "BASH_EXE=%%~dp$PATH:I..\bin\bash.exe"
|
|
31
|
+
goto :run
|
|
32
|
+
)
|
|
33
|
+
if exist "%%~dp$PATH:I..\usr\bin\bash.exe" (
|
|
34
|
+
set "BASH_EXE=%%~dp$PATH:I..\usr\bin\bash.exe"
|
|
35
|
+
goto :run
|
|
36
|
+
)
|
|
37
|
+
)
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
echo forge: Git Bash not found. Install Git for Windows or set FORGE_BASH. 1>&2
|
|
41
|
+
exit /b 127
|
|
42
|
+
|
|
43
|
+
:check_bash
|
|
44
|
+
set "CAND=%~1"
|
|
45
|
+
set "TEST=%CAND:\System32\bash.exe=%"
|
|
46
|
+
if not "%TEST%"=="%CAND%" exit /b 1
|
|
47
|
+
set "TEST=%CAND:\SysWOW64\bash.exe=%"
|
|
48
|
+
if not "%TEST%"=="%CAND%" exit /b 1
|
|
49
|
+
set "TEST=%CAND:\WindowsApps\=%"
|
|
50
|
+
if not "%TEST%"=="%CAND%" exit /b 1
|
|
51
|
+
set "BASH_EXE=%CAND%"
|
|
52
|
+
exit /b 0
|
|
53
|
+
|
|
54
|
+
:run
|
|
55
|
+
"%BASH_EXE%" "%FORGE_SCRIPT%" %*
|
|
56
|
+
exit /b %ERRORLEVEL%
|
package/package.json
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@giamme/forge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.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",
|
|
7
7
|
"author": "Giamme",
|
|
8
8
|
"repository": { "type": "git", "url": "git+https://github.com/Giamme/forge.git" },
|
|
9
9
|
"homepage": "https://giamme.github.io/forge/",
|
|
10
|
-
"bin": { "forge": "forge" },
|
|
11
|
-
"
|
|
10
|
+
"bin": { "forge": "bin/forge.js" },
|
|
11
|
+
"scripts": { "test": "bash tests/check.sh", "lint": "ruff check ." },
|
|
12
|
+
"os": ["darwin", "linux", "win32"],
|
|
12
13
|
"files": [
|
|
13
14
|
"forge",
|
|
15
|
+
"forge.cmd",
|
|
16
|
+
"bin/",
|
|
14
17
|
"SKILL.md",
|
|
15
18
|
"VERSION",
|
|
16
19
|
"CHANGELOG.md",
|
package/references/dataset.md
CHANGED
|
@@ -31,12 +31,12 @@ time order: an attempt that PASSed, then a merge that CONFLICTed, then a human `
|
|
|
31
31
|
|---|---|---|
|
|
32
32
|
| `start` | execution | a receipt written by `begin()`. A start with no matching end is an execution that was killed or is still running |
|
|
33
33
|
| `dispatch` | model call | role, alias, harness, **resolved** model, effort after clamping, timeout and its source, delivery (custom or native review), phase timings, exit, timeout, infra class, tokens, parsed verdict and findings, `tests` (a reviewer's `FORGE_TESTS` line: `status`, `reason`; null when it has none), `FORGE_LEARNING` lines, `session_id`, `session_continue`, `service_tier`, `speed`, `speed_reason`. Blobs: the delivered prompt and the final message |
|
|
34
|
-
| `attempt` | task attempt or solo run | status, attempt number (with refund and resume flags), trigger (`initial`, `auto`, `human`), dwarf and qa spec, declared vs changed files, numstat, drift, guard notes, gate line (`thr<TAB>decision<TAB>worst<TAB>n_confirmed<TAB>n_unlabelled<TAB>n_below`; a solo attempt has it too, with the `known_issues` blob; null when the run wrote none), patch key, the files this execution wrote and the ones it only carried, `sent_back` (`prereview`, `bounce` or `message`: the send-back this attempt ended with, which leaves its status `FAIL`; null otherwise) and `retry_source` (where the retry findings it was given came from: `review`, `prereview`, `bounce`, `message` or `answer`; null on a first attempt). Blobs: the diff, retry findings, memory slices, capsule, Jev task files |
|
|
34
|
+
| `attempt` | task attempt or solo run | status, attempt number (with refund and resume flags), trigger (`initial`, `auto`, `human`), dwarf and qa spec, declared vs changed files, numstat, drift, guard notes, gate line (`thr<TAB>decision<TAB>worst<TAB>n_confirmed<TAB>n_unlabelled<TAB>n_below`; a solo attempt has it too, with the `known_issues` blob; null when the run wrote none), patch key, the files this execution wrote and the ones it only carried, `sent_back` (`prereview`, `bounce` or `message`: the send-back this attempt ended with, which leaves its status `FAIL`; null otherwise) and `retry_source` (where the retry findings it was given came from: `review`, `prereview`, `bounce`, `message` or `answer`; null on a first attempt). Blobs: the diff, retry findings, memory slices, capsule, Jev task files; `steered` (the messages `forge control steer` gave this attempt: `{actor, at, sha256, chars, mode}` with mode `queued`, or `live` for one sent while the implementer ran (#252), `[]` when none; their text is the `steer` blob) |
|
|
35
35
|
| `verification` / `verify_run` | verify, and each command execution | command and its source (flag, `.forge/verify`, Jev), status, flaky. One `verify_run` per execution, each with its own log |
|
|
36
|
-
| `plan` | `plan` | goal, original request, decompose level, exploratory routing decisions (`tasks[id].route`, with their odds), author (`planner` when a planner was dispatched into the plan dir, else `orchestrator`), `orchestrator` (the first line of the plan's `orchestrator` file: `auto` for a plan started by `forge-parallel.sh auto`; absent for a plan built by hand), per-task declared vs executed difficulty and who set it, pools, waves, Jev's plan-time judgments (stores from before 2026-10-27 also hold routing and coupling), options (`qa_threshold`, the effective blocking threshold, and `qa_threshold_source`, `set` when the plan's file held a valid value and `default` otherwise; plus `reviewer_session` when that file is present), `plan_gates` (the parsed `plan-gates.json`: what the plan-time gates did, with the `sent_back` history and `pending`; absent when the plan has no such file), `shape`, `widest` and `wave_count` from `plan-shape.json` (`shape` is `one`, `chain` or `branches`; `wave_count` is how many waves; `widest` is the largest wave). `waves` stays the task-to-wave map from `waves.tsv` on every plan. `collapsed` (true when `collapsed.json` exists) and `collapsed_from` (the task ids it merged), `plan_gate` (the parsed `plan-gate.json`: the planner's one-task-or-plan decision). `shape`, `widest`, `wave_count`, `collapsed`, `collapsed_from` and `plan_gate` are absent when their file is missing. Blobs: both task tables, prompts, approaches, excerpts of the declared files at plan time, the file inventory, `memory.md` |
|
|
36
|
+
| `plan` | `plan` | goal, original request, decompose level, exploratory routing decisions (`tasks[id].route`, with their odds), author (`planner` when a planner was dispatched into the plan dir, else `orchestrator`), `orchestrator` (the first line of the plan's `orchestrator` file: `auto` for a plan started by `forge-parallel.sh auto`; absent for a plan built by hand), per-task declared vs executed difficulty and who set it, pools, waves, Jev's plan-time judgments (stores from before 2026-10-27 also hold routing and coupling), options (`qa_threshold`, the effective blocking threshold, and `qa_threshold_source`, `set` when the plan's file held a valid value and `default` otherwise; plus `reviewer_session` when that file is present), `plan_gates` (the parsed `plan-gates.json`: what the plan-time gates did, with the `sent_back` history and `pending`; absent when the plan has no such file), `shape`, `widest` and `wave_count` from `plan-shape.json` (`shape` is `one`, `chain` or `branches`; `wave_count` is how many waves; `widest` is the largest wave). `waves` stays the task-to-wave map from `waves.tsv` on every plan. `collapsed` (true when `collapsed.json` exists) and `collapsed_from` (the task ids it merged), `plan_gate` (the parsed `plan-gate.json`: the planner's one-task-or-plan decision). `shape`, `widest`, `wave_count`, `collapsed`, `collapsed_from` and `plan_gate` are absent when their file is missing. Recursive decomposition (#153), each absent when the plan has no such record: `decomposition` (`limits` in force for the tree, `frozen`, and `nodes`: per task its `decision` (`atomic`, `split`, `bounded`), `reason`, `by` (`planner`, `user`, `auto`, `default`), `children` and the `limit` a bounded node met); `parent`, on the plan of a split task's subtasks (`run` and `run_id` of the plan above, `task`, `level`, `root`, `start` (`keep` or `fresh`), `by`, `reason`; its `orchestrator` is `split`); `chain`, on a stage of a larger goal (`stage`, `first`, `previous`, and `later`, the titles of the stages proposed after it). A split makes a new revision of the plan it happened in, and the sub-plan gets a plan record of its own, so a subtask's dispatches belong to a run like any task's. Blobs: both task tables, prompts, approaches, excerpts of the declared files at plan time, the file inventory, `memory.md` |
|
|
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
|
-
| `event` | point event | `merge` (MERGED, CONFLICT with the files, INVALIDATED and why), `adopt` (a range made outside forge: base, tip, verdict, approved, adopted, spec, reason, authors; adopted 0 when the review refused it), `integrate_advanced`, `integrate_conflict`, `combine_conflict`, `sched_terminal`, `memory_record`, `memory_prune`, `attribution` (below) |
|
|
39
|
+
| `event` | point event | `merge` (MERGED, CONFLICT with the files, INVALIDATED and why), `adopt` (a range made outside forge: base, tip, verdict, approved, adopted, spec, reason, authors, lineage and submission (the first submission's adopt directory and this one's number, #155); adopted 0 when the review refused it), `integrate_advanced`, `integrate_conflict`, `combine_conflict`, `sched_terminal`, `memory_record`, `memory_prune`, `attribution` (below) |
|
|
40
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
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 |
|
|
42
42
|
| `event` `control` | `forge control` change | a human's live change: `at`, `actor` (`cli`/`ui`), `action` (`set`, `pin`, `unpin`), `key`, `value`, `previous`; task events carry the task id. Also read back from `control.log` by `import` |
|
|
@@ -51,7 +51,7 @@ time order: an attempt that PASSed, then a merge that CONFLICTed, then a human `
|
|
|
51
51
|
| `event` `brief_question` | a brief question stored by `forge brief write` | `task`, `qid`, `scope`, `must_answer` (kept only under `gated`), and `parked`: true for a `wave` or `plan` question, which is kept in `brief.parked.json` |
|
|
52
52
|
| `event` `brief_answer` | an answer given with `forge brief answer` | `task`, `qid`, `actor` (`cli`, or `ui` from forge-ui), and `late`: true once the task has started. The answer is also logged in `control.log` as an `answer` change |
|
|
53
53
|
| `jev` | Jev request | site, answers, usage, latency, mode. Blob: the **full request** (state and questions). Its original sha is `jev.jsonl`'s `key`. A per-attempt gate's request state carries `run`, `task` and `attempt` (`dwarf-message`, `retry-addressed`), so its key differs per attempt and per run; `attribution` carries `run` only |
|
|
54
|
-
| `fractal_step` / `fractal_node` |
|
|
54
|
+
| `fractal_step` / `fractal_node` | a step or node of a run made with Fractal (removed in 0.23) | written only by `import --fractal` now: decomposition decision, iteration, resolved model, cost, tokens, candidate diff |
|
|
55
55
|
| `ledger` | ledger row | imported `.forge/ledger.tsv` rows |
|
|
56
56
|
| `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` |
|
|
57
57
|
| `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 |
|
|
@@ -119,8 +119,8 @@ The feature files `retro_mode`, `brief`, `brief_scope`, `brief_model`, `summarie
|
|
|
119
119
|
one under its file name. `brief_scope` and `brief_model` exist only when brief is on, and
|
|
120
120
|
`summaries_model` only when summaries is on. `retro_mode`, `brief` and `summaries` hold `off`
|
|
121
121
|
after an explicit off (`--no-retro`, `--brief off`, `--summaries off`); with no choice they
|
|
122
|
-
are absent. See [retro notes](decompose.md#retro-notes-opt-in), [brief mode](decompose.md#brief-mode-opt-in)
|
|
123
|
-
and [task summaries](decompose.md#task-summaries-opt-in).
|
|
122
|
+
are absent. See [retro notes](decompose-opt-in.md#retro-notes-opt-in), [brief mode](decompose-opt-in.md#brief-mode-opt-in)
|
|
123
|
+
and [task summaries](decompose-opt-in.md#task-summaries-opt-in).
|
|
124
124
|
|
|
125
125
|
Each blob reference carries `sha` (the stored bytes), `original_sha`, `n` (the original
|
|
126
126
|
size), `kept`, and `cut`. A cut keeps the head and the tail, because a QA prompt ends with
|
|
@@ -200,6 +200,7 @@ forge still running keeps writing.
|
|
|
200
200
|
./forge dataset export [--slice S]... [--limit N] [--seed N] [--out DIR] # labeled decision cases
|
|
201
201
|
./forge dataset outcomes [--horizon-days 14] [--repo PATH] [--dry-run] [--deadline S] [--quiet] # what integrated work became
|
|
202
202
|
./forge dataset routing [--repo PATH] [--since DAYS] [--json] # pass rate and runtime per tier and model
|
|
203
|
+
# export, routing, reviewers and pairs leave a task out from its first steered attempt (forge control steer, #134); --include-steered keeps it
|
|
203
204
|
./forge dataset reviewers [--horizon-days 14] [--repo PATH] [--json] # how each reviewer's PASSed work held up
|
|
204
205
|
./forge dataset risk [--repo PATH] [--json] # tasks by difficulty and risk together, and how each pair fared
|
|
205
206
|
./forge dataset tiers [--repo PATH] [--tier T] [--json] # what explains results inside each tier, held out by run
|
|
@@ -325,7 +326,7 @@ only to local models. Builds are deterministic for a given store and `--seed`.
|
|
|
325
326
|
tables kept apart because they answer different questions.
|
|
326
327
|
|
|
327
328
|
**Observational.** Every task's first attempt, by declared tier and the model and effort that
|
|
328
|
-
ran it (resolved, so `sol` and `gpt-6.
|
|
329
|
+
ran it (resolved, so `sol` and `gpt-6.2-sol:medium:codex` share a row):
|
|
329
330
|
- first-try pass rate with a Wilson 95% interval
|
|
330
331
|
- the share that passed review at some attempt, or that a human accepted
|
|
331
332
|
- unfinished tasks
|
|
@@ -333,7 +334,7 @@ ran it (resolved, so `sol` and `gpt-6.1-sol:medium:codex` share a row):
|
|
|
333
334
|
- the implementer's median runtime
|
|
334
335
|
|
|
335
336
|
Routing chose who ran what, so a model sent the hard tasks looks worse here than it is.
|
|
336
|
-
Fractal
|
|
337
|
+
Runs made with Fractal (removed in 0.23) are left out, since their dispatches have identities of their own.
|
|
337
338
|
|
|
338
339
|
**Randomized.** The `plan --explore` draws, one row per (tier, pool pick, neighbour) pair.
|
|
339
340
|
Round-robin pools make the pair differ between rows, and a model has no chance at all
|
|
@@ -452,7 +453,7 @@ A plan event's `tasks.<id>.risk` is the task's `tasks/<id>/risk` rating (`low`,
|
|
|
452
453
|
|
|
453
454
|
`forge dataset tiers` asks whether a tier, `high` above all, mixes tasks that behave very
|
|
454
455
|
differently, before anyone adds a tier. It reads the tasks `routing` counts (first attempt says
|
|
455
|
-
something about the implementer,
|
|
456
|
+
something about the implementer, old Fractal runs left out) and changes nothing in a run. Facts come in
|
|
456
457
|
two kinds, reported apart:
|
|
457
458
|
|
|
458
459
|
- **plan time**, known before dispatch, so a rule could route on them: declared files,
|