@giamme/forge 0.15.0 → 0.17.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 +48 -0
- package/VERSION +1 -1
- package/docs/artifacts.md +1 -1
- package/docs/commands.md +14 -3
- package/docs/dataset.md +8 -0
- package/docs/forge-ui.md +14 -0
- package/docs/memory.md +22 -0
- package/docs/reviews.md +22 -1
- package/forge +11 -0
- package/package.json +1 -1
- package/references/dataset.md +129 -7
- package/references/decision-models.md +15 -2
- package/references/decompose.md +95 -13
- package/references/harnesses.md +4 -1
- package/references/planning.md +3 -2
- package/references/solo.md +5 -1
- package/references/ui.md +10 -1
- package/scripts/forge-artifact.sh +53 -0
- package/scripts/forge-contract.py +107 -9
- package/scripts/forge-control.py +0 -2
- package/scripts/forge-dispatch.sh +28 -12
- package/scripts/forge-fail-first.py +3 -1
- package/scripts/forge-guard.py +247 -8
- package/scripts/forge-issues.py +16 -3
- package/scripts/forge-ledger.py +3 -1
- package/scripts/forge-lib-adopt.sh +266 -0
- package/scripts/forge-lib-attribute.sh +10 -2
- package/scripts/forge-lib-plans.sh +16 -4
- package/scripts/forge-lib-review.sh +8 -2
- package/scripts/forge-lib-task.sh +19 -5
- package/scripts/forge-memory.sh +41 -4
- package/scripts/forge-metrics.sh +29 -0
- package/scripts/forge-parallel.sh +99 -14
- package/scripts/forge-plan-check.py +25 -2
- package/scripts/forge-planner.py +20 -6
- package/scripts/forge-route.py +16 -2
- package/scripts/forge-runs-rm.py +23 -7
- package/scripts/forge-runtime.py +25 -2
- package/scripts/forge-schedule.py +5 -2
- package/scripts/forge-shadow.py +30 -9
- package/scripts/forge-solo.sh +6 -0
- package/scripts/forge-sweep.py +25 -10
- package/scripts/forge_dataset/cli.py +99 -0
- package/scripts/forge_dataset/export.py +1 -0
- package/scripts/forge_dataset/facts.py +278 -0
- package/scripts/forge_dataset/harvest.py +27 -3
- package/scripts/forge_dataset/history.py +126 -0
- package/scripts/forge_dataset/outcomes.py +206 -58
- package/scripts/forge_dataset/pairs.py +174 -0
- package/scripts/forge_dataset/risk.py +108 -0
- package/scripts/forge_dataset/tiers.py +427 -0
- package/scripts/forge_dataset/worktrees.py +95 -0
- package/scripts/forge_decide/cli.py +23 -2
- package/scripts/forge_decide/labels.py +30 -6
- package/scripts/forge_decide/replay.py +10 -4
- package/scripts/forge_memory_list.py +153 -0
- package/scripts/forge_worktrees.py +88 -0
- package/ui/README.md +31 -0
- package/ui/docs/api.md +92 -6
- package/ui/forge_ui/__init__.py +14 -1
- package/ui/forge_ui/__main__.py +1 -1
- package/ui/forge_ui/control.py +77 -0
- package/ui/forge_ui/export.py +9 -2
- package/ui/forge_ui/findings.py +11 -2
- package/ui/forge_ui/projects.py +571 -0
- package/ui/forge_ui/reader.py +96 -9
- package/ui/forge_ui/server.py +8 -0
- package/ui/forge_ui/static/app.js +105 -22
- package/ui/forge_ui/static/cloudui.js +6 -2
- package/ui/forge_ui/static/convo.js +1 -1
- package/ui/forge_ui/static/diffview.js +9 -5
- package/ui/forge_ui/static/files.js +1 -1
- package/ui/forge_ui/static/index.html +5 -1
- package/ui/forge_ui/static/panel.js +69 -2
- package/ui/forge_ui/static/projectsview.js +372 -0
- package/ui/forge_ui/static/settings.js +136 -4
- package/ui/forge_ui/static/style.css +94 -3
- package/ui/forge_ui/static/uikit.js +94 -1
- package/ui/forge_ui/static/worktreesview.js +250 -0
- package/ui/forge_ui/worktrees.py +570 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,54 @@ 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.17] - 2026-11-11
|
|
9
|
+
|
|
10
|
+
Measure reviews and routing: outcomes recorded at the end of every run, finding facts, paired reviews, task risk and a look inside each difficulty tier, all in shadow; plus adoption fixes.
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- forge-ui: each adopted range listed above the final review now opens its review (verdict, gate, findings, what a person kept, the reviewer's reply and prompt) and the range's diff with the findings pinned, through `/api/runs/<key>/adoptions/<name>` and its `/diff`. An export includes them, and keeps each adoption's reason private unless texts are included (#131).
|
|
15
|
+
- Outcomes are now recorded without anyone running `forge dataset outcomes`: the end of every `run` and `integrate` harvests that repository, bounded by `FORGE_OUTCOMES_TIMEOUT` (default 20 s), never changing the exit code, and off with `FORGE_OUTCOMES=off`. The harvest also follows work where it went: an integration whose branch a pull request merged and deleted is measured on the branch it landed in, and so is a run whose integration branch was merged by hand. `forge dataset status` shows the outcomes recorded and when they were last harvested (#120).
|
|
16
|
+
- Reviewers now end each finding with three facts: its reach (main path, realistic or unusual), its origin (new in this change or already there) and their evidence (ran it, traced it or suspected). The facts are recorded in shadow. No verdict changes, and `forge issues`, the ledger and forge-ui read a finding with them exactly as one without. forge-ui shows them beside each finding in the diff. The new `forge dataset facts` command reports how often two reviewers of one attempt agree on reach compared with severity. It also replays candidate rules on past reviews, such as "unusual reach does not block unless P0" and "existing problems do not block", and lists the findings each rule would have let through (#119).
|
|
17
|
+
- A shadow review (`--shadow-qa`) no longer repeats its primary's exact settings when another listed spec differs. If every listed spec is identical to the primary, the shadow still runs but is labelled a control, so it measures noise and never counts as an effort comparison. The new `forge dataset pairs` command groups paired reviews by what differs between the two reviewers: effort within one model, another model, another family, or nothing (controls). For each pair of settings it reports verdict agreement with a 95% interval, the blocking findings only one side found, and how many times the tokens and time each side used. Listing a reviewer's own model at another effort, such as `--shadow-qa sol:medium` beside `sol:high` reviewers, now measures what that effort buys (#121).
|
|
18
|
+
- A task can now carry a risk rating, separate from its difficulty: what a mistake that gets through would cost. The planner rates it, or you write `low`, `medium` or `high` to `tasks/<id>/risk` before `plan`. It is recorded in shadow. No model, reviewer or verdict changes, `tasks.tsv` keeps its columns, and a plan without ratings behaves as before. The new `forge dataset risk` command shows tasks by difficulty and risk together: how often the two ratings differ, and, per pair, first-try passes, serious findings and landed work that did not hold. The docs now say that reviewer tiers follow difficulty (#122).
|
|
19
|
+
- The new `forge dataset tiers` command looks inside each difficulty tier before anyone adds a tier. It sets plan-time facts (declared files, dependencies, wave, prompt size) against first-try passes, attempts and unfinished tasks. Each fact is tested on runs the split never saw, and adjusted for the implementer, so a weaker model mix is not read as harder tasks. Facts known only after the attempt, such as the diff size, are reported apart. `--sample` writes past prompts for a blind re-rating, and `--blind` reports how often that rating matches the recorded tier. Nothing in a run changes (#123).
|
|
20
|
+
- `forge decide replay --label first-attempt` judges the stored drift answers on the 2026-10-16 label: a file counts as drift when attempt 1 edited it, whether or not that attempt passed. It sends nothing and records nothing, so promotion still reads the site's own label. The replay report now also shows an inverted gate's threshold as it is configured, such as `prompt_warn 0.55 (inverted: a score at or above 0.45)`, instead of `0.44999999999999996` (#101).
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- `run --sweep` now fixes what an adopted range's review tolerated, with the adoption's reviewer reviewing the fix, where it used to drop those findings for want of a model. Findings a person kept (`accept`, or `adopt --approved`) are still never swept, and the sweep plan now lists them as `accepted` instead of leaving them out silently (#131).
|
|
25
|
+
- `adopt`'s reviewer is now told the run's verification command (or its lanes' commands), so it can run the parts that touch the adopted range. Verification itself still runs after the review, as before (#131).
|
|
26
|
+
|
|
27
|
+
## [0.16] - 2026-11-06
|
|
28
|
+
|
|
29
|
+
forge-ui gets a Worktrees screen and a Projects screen with each repository's runs, findings and memories, and a live refresh no longer cancels what you were doing. A stopped run can be steered by hand: adopt brings in a commit made outside forge, and retry --no-dispatch resumes several tasks side by side. Reviewers get the attempt's dependencies and say whether their tests ran, and a timeout now stops the test servers a harness started.
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- Each reviewer now says whether its tests ran, with a `FORGE_TESTS: RAN`, `NOT NEEDED` or `COULD NOT RUN` line before its verdict. It never changes the verdict. The run summary lists reviews whose tests could not run, and forge-ui and the dataset record the answer (#117).
|
|
34
|
+
- forge-ui's Settings page now explains each decision gate: what it does, when it asks, what it sends and what `on` changes. **How to set this up** opens a dialog with the steps from adding a provider to turning a gate on, and how to stop sending.
|
|
35
|
+
- `forge-parallel.sh adopt` brings a commit made outside forge into a run, where `review` used to refuse. It cherry-picks a commit or range, or with `--head` takes what is already on the integration branch, and the run's QA reviews just that range against your reason, with no implementer. A failed review puts the branch back unless `--approved` keeps it, whose findings then reach `forge issues` and the run's report. A review that concludes nothing (a crash, a timeout, a stop) always puts it back. Every adoption is recorded and shown in forge-ui, and `attribute` can name one as the step that broke verification (#79).
|
|
36
|
+
- `forge-parallel.sh retry --no-dispatch` resumes several stopped tasks side by side: it records the decision, carries the findings forward and starts nothing, and one `run` then dispatches them all under `--max-parallel`. `--decide` and `--dwarf` now combine, so "this model, two more attempts" is one decision, on `retry` and on `forge control retry`. The run summary shows how (#118).
|
|
37
|
+
- forge-ui shows forge's version next to the logo, with the build id in its tooltip, and `/api/health` now reports that version (#113).
|
|
38
|
+
- forge-ui has a Worktrees screen (`#/worktrees`, linked from the header and from each run's page). It lists every worktree forge created, in any repository it knows, with its run, task, branch, last commit, size and status: in use, uncommitted changes, locked, needed by the run, failed task, finished, missing on disk, not forge's, unknown to git, or removed. It gives the command that removes each one safely, to copy, never with `--force`. The page runs nothing, so it works with `--read-only`. forge now records each worktree it adds or removes in the dataset (`worktree_created`, `worktree_removed`, read with `forge dataset worktrees`), so removed ones stay listed with their dates. Worktrees from older runs are derived from run dirs and the dataset (#125).
|
|
39
|
+
- forge-ui has a Projects screen (`#/projects`), linked from the header, a run's repository name and each map district. It has one page per repository with three tabs. Runs lists its runs, with the checkout and branch as a column. Findings lists every finding of every review of every run, with its run, task, attempt, reviewer and status, and opens the diff at it. A finding a later review got past is `superseded`, never `fixed`, and repeats across rounds are one row with a count. Memories shows what `memory.md` gives each role and every learning in the ledger with its state, from each checkout. The dataset fills in runs and checkouts that are gone, and those rows say so (#126).
|
|
40
|
+
- `forge memory learnings <repo> --json` lists every learning in a repository's ledger with what forge does with it: in memory, waiting for a second run, stale, trimmed by the cap, or curated out. The states come from forge's own memory rebuild, run without changing the repository. `forge memory` also takes `show`, `prune`, `spend` and `inject` (#126).
|
|
41
|
+
|
|
42
|
+
### Changed
|
|
43
|
+
|
|
44
|
+
- `forge runs rm --worktrees` also removes a clean scratch worktree forge left in the run's folder: an `integrate` candidate (`_candidate-<n>`) or a culprit search's `_attribute`. It used to count them as foreign and keep them. It uses the same ownership rule as forge-ui's Worktrees screen (#125).
|
|
45
|
+
- Review snapshots now also get `bower_components`, `.bundle`, `Pods`, Mix's `deps` and `_build`, `.dart_tool`, `elm-stuff` and SwiftPM's `.build` linked from the checkout under review, beside `node_modules`, `.venv`, `venv` and `vendor`, so reviewers can run dependency-backed tests in more ecosystems. The fail-first check links the same directories (#127).
|
|
46
|
+
|
|
47
|
+
### Fixed
|
|
48
|
+
|
|
49
|
+
- A codex that never reaches the network ("workspace routing discovery failed", or a reconnect loop that runs out) is now an infrastructure stop. A task pauses as `INFRA` and `--infra-retries` waits it out, where it used to end as `ERROR`, and a whole-run review exits 8 instead of reporting a failed review (#114).
|
|
50
|
+
- Reviewers can run tests with the attempt's own dependencies: forge links `node_modules`, `.venv`, `venv` and `vendor` from the checkout under review into its review snapshot, at the root and in workspace packages, and the prompt says what is there and tells the reviewer to report rather than search or install (#117).
|
|
51
|
+
- A `retry` with no decision behind it no longer prints a "No such file" error about `decided.left`.
|
|
52
|
+
- forge-ui: a live refresh no longer cancels a click, clears a text selection, replaces a focused `<select>` or closes a disclosure you opened. A redraw waits until you finish and then shows the latest data, and a long wait tells you newer data is there (#115).
|
|
53
|
+
- A retry no longer prints a missing-file error when the optional qa.gate file is absent.
|
|
54
|
+
- A dispatch that times out or exits now also stops the processes its harness started in sessions or process groups of their own, such as a test runner and the web servers it launched, before verification or a retry can overlap with them in the same worktree. forge samples the harness's descendants every 2 seconds and lists what it stopped in `<role>.orphans`. A standalone `retry` that gets a TERM or Ctrl-C now stops what it dispatched before it exits with 143, instead of leaving the implementer running (#129).
|
|
55
|
+
|
|
8
56
|
## [0.15] - 2026-11-04
|
|
9
57
|
|
|
10
58
|
Profiles keep your model routing and run policies under a name, and forge-parallel.sh auto takes a goal to the approval table in one blocking command, planning only when it pays and collapsing plans that would run sequentially. Fast service tiers can be asked per role.
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.17
|
package/docs/artifacts.md
CHANGED
|
@@ -17,7 +17,7 @@ as if the dwarf had written it.
|
|
|
17
17
|
<role>.clock when the log grew: one `<epoch> <bytes>` line per second it grew (forge-ui times codex and grok events by it; FORGE_LOG_CLOCK=off)
|
|
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
|
-
<role>.orphans only when processes were left running after the harness exited
|
|
20
|
+
<role>.orphans only when processes were left running after the harness exited or timed out
|
|
21
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)
|
|
22
22
|
<role>.session session id reported by claude, openclaude or codex; absent when the dispatch published none
|
|
23
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=
|
package/docs/commands.md
CHANGED
|
@@ -23,6 +23,7 @@ harness (`/forge`); this command installs forge and drives its optional tools.
|
|
|
23
23
|
| `forge runs rm RUN_DIR [--dry-run] [--yes] [--no-archive] [--worktrees] [--branches] [--json]` | delete a run directory but keep what it taught the dataset; see [below](#forge-runs-rm) |
|
|
24
24
|
| `forge runs rerun RUN_DIR --dwarf SPEC [--qa SPEC] [--to DIR] [--max-parallel N] [--dry-run] [--run --yes]` | set up the same plan again with another implementer, from the same starting commit; spends nothing unless `--run --yes`; never merges. See [below](#forge-runs-rerun-and-compare) |
|
|
25
25
|
| `forge runs compare RUN_A RUN_B [--json] [--no-record]` | two runs of one plan, side by side, per task; records the pair in the dataset |
|
|
26
|
+
| `forge memory show\|learnings\|prune\|spend REPO …` | a repository's project memory; `learnings REPO --json` lists every learning in its ledger with what forge does with it (`in_memory`, `waiting` for a second run, `stale`, `capped`, `muted`), from forge-memory.sh's own rebuild, without changing the repository. See [project memory](memory.md) |
|
|
26
27
|
| `forge issues RUN [--apply] …` | file the review findings a run left open as GitHub issues; see [below](#forge-issues) |
|
|
27
28
|
| `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) |
|
|
28
29
|
| `forge ui open\|status\|stop` | forge-ui, the run viewer; see [the command group](forge-ui.md#forge-ui-command-group) |
|
|
@@ -80,7 +81,9 @@ solo run), so a run started meanwhile fails to start instead of racing the delet
|
|
|
80
81
|
|
|
81
82
|
What counts as the run's is decided from the run id, not read from the run directory: a worktree
|
|
82
83
|
under `<repo>/../.forge-worktrees/<run id>/` on `forge/<run id>/<task>` or
|
|
83
|
-
`forge/<run id>-integration
|
|
84
|
+
`forge/<run id>-integration`, or a detached scratch worktree forge left there (`_candidate-<n>` from
|
|
85
|
+
`integrate`, `_attribute[-<n>]` from `attribute`). forge-ui's Worktrees screen uses the same rule
|
|
86
|
+
(`scripts/forge_worktrees.py`). Any other worktree there is `foreign`, one with uncommitted changes
|
|
84
87
|
is `dirty`; neither is touched, and a dirty one keeps the run directory only when `--worktrees`
|
|
85
88
|
was asked. Branches are reported
|
|
86
89
|
`merged` or `UNMERGED`, so you see what deleting them would lose. `--dry-run` changes nothing and
|
|
@@ -488,7 +491,12 @@ quietly swapping backends hides the fact that the one you picked is broken.
|
|
|
488
491
|
**Process hygiene.** Unless `FORGE_ORPHAN_GUARD=off` (or the run is a Fractal one), the harness
|
|
489
492
|
is started in its own session, and after it exits any process still alive in that session is
|
|
490
493
|
listed in `<role>.orphans` and stopped, so a backgrounded measurement cannot outlive the
|
|
491
|
-
dispatch. The timeout watchdog and the exit trap signal the whole session too.
|
|
494
|
+
dispatch. The timeout watchdog and the exit trap signal the whole session too. A tool that leaves
|
|
495
|
+
that session (a test runner's web server started in a session of its own) is still the harness's
|
|
496
|
+
descendant: forge samples the harness's descendants every 2 s while it runs, and stops those
|
|
497
|
+
still alive, with their children, after a timeout or exit as well. A process that double-forks
|
|
498
|
+
away within those 2 s is not seen. A standalone `retry` that gets a TERM or Ctrl-C stops
|
|
499
|
+
everything it dispatched the same way before it exits (`143`).
|
|
492
500
|
|
|
493
501
|
**Log clock.** Beside the log, `<role>.clock` records when it grew (one `<epoch> <bytes>` line for
|
|
494
502
|
each second it did), so forge-ui can time the commands of a harness that logs no times (codex,
|
|
@@ -621,6 +629,7 @@ forge-parallel.sh retry <plan-dir> <task-id> [--dwarf <spec>] [--answer <tex
|
|
|
621
629
|
[--verify <cmd> | --verify-lane 'name[opts]=cmd' ...] [--verify-parallel N]
|
|
622
630
|
[--escalate-after N] [--escalate-effort | --no-escalate-effort]
|
|
623
631
|
forge-parallel.sh accept <plan-dir> <task-id> --reason "<why>" --approved
|
|
632
|
+
forge-parallel.sh adopt <plan-dir> <commit|a..b> | --head --reason "<why>" [--qa <spec>] [--yolo-qa] [--approved]
|
|
624
633
|
forge-parallel.sh review <plan-dir> [--qa <spec>] [--yolo-qa] [--qa-threshold P0|P1|P2|P3|none|default]
|
|
625
634
|
forge-parallel.sh attribute <plan-dir> [--force]
|
|
626
635
|
forge-parallel.sh integrate <plan-dir> --approved [--final-review <qa-spec>] [--verify-retries N]
|
|
@@ -925,7 +934,9 @@ model, or the task has spent its attempt cap (`plan --max-attempts N`, default 8
|
|
|
925
934
|
the `retry` and `accept` commands are in `tasks/<id>/decision.md`. The run summary lists them under
|
|
926
935
|
`waiting for your decision:`. Neither a later `run`, `--retry-failed`, a retry budget nor a pin
|
|
927
936
|
resumes that same task. Only `retry <plan> <id> --decide retry=N` or `--decide threshold=Pn`, or
|
|
928
|
-
`--dwarf <spec>`, each with `--reason "…" --approved`, or
|
|
937
|
+
`--dwarf <spec>`, or `--decide` and `--dwarf` together, each with `--reason "…" --approved`, or
|
|
938
|
+
`accept`, does. To resume several at once, add `--no-dispatch` to each `retry`, which records the
|
|
939
|
+
decision and starts nothing, then `run` the plan. Replacing it is a hand
|
|
929
940
|
edit of `tasks.tsv` before the next `run`, as the summary says (`forge control add` queues a new
|
|
930
941
|
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
|
|
931
942
|
task still in `tasks.tsv` and unmerged exits `5`. See
|
package/docs/dataset.md
CHANGED
|
@@ -15,6 +15,10 @@ forge dataset import ~/.local/share/forge/legacy # runs that predate live capt
|
|
|
15
15
|
forge dataset export # labeled decision cases for benchmarks and fine-tuning
|
|
16
16
|
forge dataset outcomes # which integrated lines survived, read from git history
|
|
17
17
|
forge dataset reviewers # how often work each reviewer PASSed was later reverted or rewritten
|
|
18
|
+
forge dataset risk # tasks by difficulty and risk together: do they differ, how did each pair fare
|
|
19
|
+
forge dataset tiers # what explains results inside each difficulty tier, and how noisy the rating is
|
|
20
|
+
forge dataset pairs # two reviewers of one attempt: what another effort, model or family found and cost
|
|
21
|
+
forge dataset facts # findings' reach, origin and evidence: do reviewers agree, would a gate on them help
|
|
18
22
|
forge dataset forecast <plan> # likely tokens, time and first-try PASS rate for a plan's tasks
|
|
19
23
|
```
|
|
20
24
|
|
|
@@ -23,6 +27,10 @@ advisory only and never changes routing, and it shows "not enough data" below 10
|
|
|
23
27
|
reviewer rather than a rate a handful of tasks would make up. See
|
|
24
28
|
[the reviewer report card](../references/dataset.md#reviewer-report-card).
|
|
25
29
|
|
|
30
|
+
`forge dataset facts` measures the three facts reviewers add to each finding (reach, origin,
|
|
31
|
+
evidence) before any gate uses them: agreement between two reviewers of one attempt, and what
|
|
32
|
+
rules on them would have changed. See [finding facts](../references/dataset.md#finding-facts).
|
|
33
|
+
|
|
26
34
|
`forge dataset forecast <plan>` estimates a plan from past tasks at the same tier and model:
|
|
27
35
|
median and p90 tokens and time, and the first-try PASS rate with a 95% interval, per task and in
|
|
28
36
|
total. It flags tasks below 50% and says "not enough history" under 5 past tasks. `run` prints
|
package/docs/forge-ui.md
CHANGED
|
@@ -123,6 +123,20 @@ indistinguishable from the same command typed in a terminal, except that `contro
|
|
|
123
123
|
Each is `forge control`; see [decomposed runs](decomposed-runs.md#changing-a-run-while-it-works).
|
|
124
124
|
A control that cannot apply (a budget with no live scheduler, a merged task) is disabled and
|
|
125
125
|
says why.
|
|
126
|
+
- **Projects (`#/projects`):** one page per repository with its runs, every finding forge's reviews
|
|
127
|
+
wrote about it (each attempt, final reviews, shadow reviews behind a toggle), and every memory forge
|
|
128
|
+
keeps for it, whichever run or checkout they came from. A finding a later review got past is
|
|
129
|
+
`superseded`, never `fixed`; repeats across rounds are one row with a count. The Memories tab shows
|
|
130
|
+
what `memory.md` gives each role and each learning's state, as `forge memory learnings` reports it.
|
|
131
|
+
Runs and checkouts that are gone are read from the dataset, and those rows say so. Reachable from the
|
|
132
|
+
header, a run's repository name and each map district.
|
|
133
|
+
- **Worktrees (`#/worktrees`):** every worktree forge created, in any repository it knows: its
|
|
134
|
+
run, task, branch, last commit, size and status (in use, uncommitted changes, locked, needed by
|
|
135
|
+
the run, failed task, finished, missing on disk, not forge's, unknown to git, removed), and the
|
|
136
|
+
command that removes it safely, to copy. The commands never use `--force` and the page runs
|
|
137
|
+
none of them. Removed worktrees are listed from the dataset (`worktree_created` and
|
|
138
|
+
`worktree_removed` events); worktrees from before forge recorded them are derived from run dirs,
|
|
139
|
+
without dates. With `FORGE_DATASET=off` the screen lists only what git and the run dirs say.
|
|
126
140
|
- **Open findings:** the review findings a run left open (tolerated by `--qa-threshold`,
|
|
127
141
|
PLAUSIBLE, or left by the whole-run review), for this run or every run of its repository.
|
|
128
142
|
Findings of an outdated review carry an "outdated review" marker, findings a person
|
package/docs/memory.md
CHANGED
|
@@ -113,6 +113,7 @@ forge-memory.sh record <repo> --last <file> --role <r> [--run-id X] [--task T]
|
|
|
113
113
|
forge-memory.sh show <repo>
|
|
114
114
|
forge-memory.sh prune <repo> # re-apply staleness and the cap now
|
|
115
115
|
forge-memory.sh spend <repo> [--run <run-id>] # what forge has cost this repo
|
|
116
|
+
forge-memory.sh learnings <repo> [--json] # every ledger learning and its state, as JSON (forge memory learnings)
|
|
116
117
|
```
|
|
117
118
|
|
|
118
119
|
`record` appends to the ledger and then rebuilds `memory.md` from the whole ledger — the
|
|
@@ -128,6 +129,27 @@ bash scripts/forge-memory.sh inject ~/dev/api dwarf
|
|
|
128
129
|
rm -rf ~/dev/api/.forge
|
|
129
130
|
```
|
|
130
131
|
|
|
132
|
+
## Every learning and its state
|
|
133
|
+
|
|
134
|
+
`forge memory learnings <repo> --json` lists each learning in the ledger once (grouped as the rebuild groups
|
|
135
|
+
them: by category and normalised text) with the number of distinct runs that emitted it, its latest wording,
|
|
136
|
+
its rows, and what forge does with it now:
|
|
137
|
+
|
|
138
|
+
| State | Why |
|
|
139
|
+
|---|---|
|
|
140
|
+
| `in_memory` | the rebuilt `memory.md` has it |
|
|
141
|
+
| `waiting` | a finding seen in one run only: it needs a second run to be promoted |
|
|
142
|
+
| `stale` | its `[anchor]` path no longer exists |
|
|
143
|
+
| `capped` | trimmed by the memory cap (`FORGE_MEMORY_MAX_LINES`, `FORGE_MEMORY_MAX_BYTES`) |
|
|
144
|
+
| `muted` | every row of it was marked not injectable (Jev's curation) |
|
|
145
|
+
|
|
146
|
+
The states come from forge-memory.sh's own rebuild, run into a scratch directory, so they cannot differ
|
|
147
|
+
from what `record` writes; the repository is only read. The answer also has the current `memory.md` by
|
|
148
|
+
section, with the roles each section reaches, and `rebuilt_differs` when that file is not what a rebuild
|
|
149
|
+
makes now (an older forge wrote it, or a `prune` asked Jev to drop facts). forge-ui's Projects screen
|
|
150
|
+
shows it on each repository's *Memories* tab, merged across the checkouts its runs started in and, from
|
|
151
|
+
the dataset, the learnings of checkouts that are gone.
|
|
152
|
+
|
|
131
153
|
## Spend
|
|
132
154
|
|
|
133
155
|
The ledger already holds a row per dispatch and is never injected into a prompt, so
|
package/docs/reviews.md
CHANGED
|
@@ -28,6 +28,13 @@ in the reply is never a verdict. A missing verdict is `UNKNOWN` and is treated e
|
|
|
28
28
|
failure — excluded from integration and flagged. Merging a diff whose reviewer never reached
|
|
29
29
|
a conclusion would defeat the point of reviewing it, so the ambiguous case fails safe.
|
|
30
30
|
|
|
31
|
+
Before the verdict, a reviewer says whether its tests ran: `FORGE_TESTS: RAN`,
|
|
32
|
+
`FORGE_TESTS: NOT NEEDED — why` or `FORGE_TESTS: COULD NOT RUN — why`. This never changes the
|
|
33
|
+
verdict. `COULD NOT RUN` prints a note, and forge-ui and the dataset record all three, so a review
|
|
34
|
+
that judged the diff by reading alone can be told apart. Markup and any separator are accepted,
|
|
35
|
+
because nothing gates on this line, and a line that says something else is recorded as `unclear`.
|
|
36
|
+
An older reply has no such line.
|
|
37
|
+
|
|
31
38
|
A failing task is excluded and **its branch and worktree are preserved**; the rest of the run
|
|
32
39
|
proceeds. forge never loops a dwarf against its reviewer on its own: a retry happens when you
|
|
33
40
|
type `retry`, or when you opt in for a run with `--retry-failed N` ([below](#retrying-inside-a-run---retry-failed-n)).
|
|
@@ -167,6 +174,17 @@ decision `fail`), and the next attempt starts with a note saying why.
|
|
|
167
174
|
It fails safe: an unlabelled CONFIRMED finding, or a FAIL with no CONFIRMED finding at all,
|
|
168
175
|
is never tolerated.
|
|
169
176
|
|
|
177
|
+
Every finding also ends its first line with three facts, `{reach=main|realistic|unusual
|
|
178
|
+
origin=new|existing evidence=ran|traced|suspected}`: how likely the trigger is, whether this change
|
|
179
|
+
introduced the problem, and how the reviewer knows. They are **recorded in shadow** and decide
|
|
180
|
+
nothing: the gate, `forge issues`, the ledger and forge-ui read a finding with the suffix exactly as
|
|
181
|
+
one without it, and a missing or malformed suffix changes nothing. They go to the run dataset, and
|
|
182
|
+
`forge dataset facts` says whether a gate on them would do better than the severity line alone: how
|
|
183
|
+
often two reviewers of one attempt agree on reach versus severity (with `--shadow-qa`), and how many
|
|
184
|
+
reviews and rounds rules such as "unusual reach does not block unless P0" or "existing problems do
|
|
185
|
+
not block" would have changed, listing the findings they would have let through so a person can
|
|
186
|
+
judge them. See [the dataset reference](../references/dataset.md#finding-facts).
|
|
187
|
+
|
|
170
188
|
Tolerated findings are recorded, not fixed. After a run, the skill offers once to file them as
|
|
171
189
|
GitHub issues, together with PLAUSIBLE findings of passed tasks and whatever a whole-run review
|
|
172
190
|
left open (`--file-issues ask|auto|off`, `ask` by default). Where the
|
|
@@ -327,7 +345,10 @@ family than the task's. Its verdict goes to the run dataset and nothing in the r
|
|
|
327
345
|
so it never changes a status, merge, memory or retry. `forge dataset status` then reports how
|
|
328
346
|
often the two reviewers agree, overall and per model pair. The table shows the extra reviews
|
|
329
347
|
before you approve. The shadow runs beside the main review and is stopped soon after that
|
|
330
|
-
finishes, so the most it costs is reviews and a little latency.
|
|
348
|
+
finishes, so the most it costs is reviews and a little latency. To measure what reviewer effort
|
|
349
|
+
buys, list the reviewers' own model at another effort (`--shadow-qa sol:medium` beside `sol:high`):
|
|
350
|
+
`forge dataset pairs` reports those pairs apart from model and family comparisons, and a shadow
|
|
351
|
+
identical to its primary is recorded as a control, never as an effort comparison. See
|
|
331
352
|
[decomposition](../references/decompose.md#shadow-reviews-opt-in).
|
|
332
353
|
|
|
333
354
|
## Implementer guards
|
package/forge
CHANGED
|
@@ -23,6 +23,7 @@ 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
|
+
' memory a repository'"'"'s project memory: show, learnings --json (each learning and its state), prune' \
|
|
26
27
|
' pr a draft pull-request description for a finished run (--create opens it with gh)' \
|
|
27
28
|
' ui forge-ui, the run viewer: open [DIR], status, stop' \
|
|
28
29
|
' runs this repo'"'"'s recent runs in the terminal: state, verdicts and run dirs; rerun a plan with another model, compare' \
|
|
@@ -98,6 +99,16 @@ case "${1:-}" in
|
|
|
98
99
|
shift
|
|
99
100
|
exec python3 "$ROOT/scripts/forge-issues.py" "$@"
|
|
100
101
|
;;
|
|
102
|
+
memory)
|
|
103
|
+
shift
|
|
104
|
+
# only the commands its help lists: note and record are what a run writes into the ledger, not a person
|
|
105
|
+
case "${1:-}" in
|
|
106
|
+
show|learnings|prune|spend|inject|-h|--help|help) ;;
|
|
107
|
+
'') /bin/bash "$ROOT/scripts/forge-memory.sh" --help >&2; exit 2 ;;
|
|
108
|
+
*) printf 'forge memory: unknown command: %s (show, learnings, prune, spend or inject)\n' "$1" >&2; exit 2 ;;
|
|
109
|
+
esac
|
|
110
|
+
exec /bin/bash "$ROOT/scripts/forge-memory.sh" "$@"
|
|
111
|
+
;;
|
|
101
112
|
pr)
|
|
102
113
|
shift
|
|
103
114
|
exec python3 "$ROOT/scripts/forge-pr.py" "$@"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@giamme/forge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "Multi-model coding with a reviewer that reads the code: plan, build in parallel worktrees, review every real diff, merge only what passes.",
|
|
5
5
|
"keywords": ["claude-code", "codex", "opencode", "agent-skill", "code-review", "multi-model"],
|
|
6
6
|
"license": "MIT",
|
package/references/dataset.md
CHANGED
|
@@ -30,16 +30,17 @@ time order: an attempt that PASSed, then a merge that CONFLICTed, then a human `
|
|
|
30
30
|
| kind | one per | what it holds |
|
|
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
|
-
| `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, `FORGE_LEARNING` lines, `session_id`, `session_continue`, `service_tier`, `speed`, `speed_reason`. Blobs: the delivered prompt and the final message |
|
|
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
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 |
|
|
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
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` |
|
|
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), `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; 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` |
|
|
43
|
+
| `event` `worktree_created` / `worktree_removed` | forge adds or removes a worktree | `path`, `branch` (`-` when detached), `kind` (`task`, `integration`, `candidate` for integrate's scratch worktree, `attribute` for the culprit search's), `repo_path`, and the task for a task worktree; `forge runs rm` adds `by`. Written at task and `_integration` creation, the merged-task cleanup at the end of `run`, integrate's candidate, every prefix of `attribute`, `combine` and `split` (a moved worktree is removed from the old run and created in the new one), and `forge runs rm --worktrees`. A worktree removed outside forge has no `worktree_removed`. forge-ui's Worktrees screen reads them through `forge dataset worktrees` |
|
|
43
44
|
| `event` `run_delete_started` / `run_deleted` | `forge runs rm` | written strictly around a run's deletion: `path`, `run_id`, `archive`, and for `run_deleted` the bytes freed |
|
|
44
45
|
| `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
46
|
| `jev` | Jev request | site, answers, usage, latency, mode. Blob: the **full request** (state and questions). Its original sha is `jev.jsonl`'s `key`. A per-attempt gate's request state carries `run`, `task` and `attempt` (`dwarf-message`, `retry-addressed`), so its key differs per attempt and per run; `attribution` carries `run` only |
|
|
@@ -47,7 +48,7 @@ time order: an attempt that PASSed, then a merge that CONFLICTed, then a human `
|
|
|
47
48
|
| `ledger` | ledger row | imported `.forge/ledger.tsv` rows |
|
|
48
49
|
| `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
50
|
| `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 |
|
|
50
|
-
| `outcome` | integrated task, per horizon | written by `forge dataset outcomes`,
|
|
51
|
+
| `outcome` | integrated task, per horizon | written by `forge dataset outcomes`, which the end of every `run` and `integrate` also runs for its repository: how many of the lines a task added survive N days after it landed, and what reverted it |
|
|
51
52
|
|
|
52
53
|
An attempt that forge sent back without a review keeps the status `FAIL` in the dataset, and
|
|
53
54
|
`sent_back` says what sent it back (`prereview`, `bounce` or `message`). `attempts.tsv` names the
|
|
@@ -159,10 +160,17 @@ forge still running keeps writing.
|
|
|
159
160
|
./forge dataset blob <sha> # print one stored blob
|
|
160
161
|
./forge dataset import <dir|archive|legacy-dir>... [--registry] [--fractal] [--ledger REPO] [--dry-run]
|
|
161
162
|
./forge dataset export [--slice S]... [--limit N] [--seed N] [--out DIR] # labeled decision cases
|
|
162
|
-
./forge dataset outcomes [--horizon-days 14] [--repo PATH] [--dry-run]
|
|
163
|
+
./forge dataset outcomes [--horizon-days 14] [--repo PATH] [--dry-run] [--deadline S] [--quiet] # what integrated work became
|
|
163
164
|
./forge dataset routing [--repo PATH] [--since DAYS] [--json] # pass rate and runtime per tier and model
|
|
164
165
|
./forge dataset reviewers [--horizon-days 14] [--repo PATH] [--json] # how each reviewer's PASSed work held up
|
|
166
|
+
./forge dataset risk [--repo PATH] [--json] # tasks by difficulty and risk together, and how each pair fared
|
|
167
|
+
./forge dataset tiers [--repo PATH] [--tier T] [--json] # what explains results inside each tier, held out by run
|
|
168
|
+
./forge dataset tiers --sample N --out DIR | --blind DIR # past prompts to rate blind, then agreement with the recorded tier
|
|
169
|
+
./forge dataset pairs [--repo PATH] [--json] # two reviewers of one attempt, by what differs (effort, model, family)
|
|
170
|
+
./forge dataset facts [--repo PATH] [--json] # findings' reach, origin and evidence: agreement, and rules replayed
|
|
165
171
|
./forge dataset forecast <plan> [--repo PATH] [--json] # likely cost and first-try PASS rate per task
|
|
172
|
+
./forge dataset worktrees [--json] # the worktrees forge created and removed (forge-ui's Worktrees screen)
|
|
173
|
+
./forge dataset history [--json] # every review's findings and every learning, by run (forge-ui's Projects screen)
|
|
166
174
|
```
|
|
167
175
|
|
|
168
176
|
`status` runs a different completeness check for each mode, because each mode
|
|
@@ -333,11 +341,31 @@ For every integration, and every task it brought in, the harvester records:
|
|
|
333
341
|
integration, dated before `integrate` + N days. The branch is resolved once, and the
|
|
334
342
|
chain is walked by position, so commit dates out of order cannot skip a commit.
|
|
335
343
|
|
|
336
|
-
|
|
344
|
+
**Followed where it went** (#120). When the branch `integrate` advanced is gone, or the
|
|
345
|
+
integration is no longer on its first-parent chain, the harvester looks for it in every other
|
|
346
|
+
branch (local, then remote, never forge's own `forge/` branches): the commit where it entered
|
|
347
|
+
a branch's first-parent chain, a merge or the integration itself, is where the horizon is walked
|
|
348
|
+
from, on that branch. The outcome records `followed` (the branch) and `landed` (that commit). A
|
|
349
|
+
feature branch that a pull request merged and then deleted is followed this way. A run nobody
|
|
350
|
+
ran `integrate` for, its integration branch merged by hand, is followed the same way from its
|
|
351
|
+
last integration commit, and its horizon counts from when it landed (`merged_by_hand`).
|
|
352
|
+
|
|
353
|
+
Three cases leave a task without a survival count:
|
|
337
354
|
- **Pending:** the horizon has not been reached and no later commit has passed it yet.
|
|
338
355
|
Nothing is written, and the next harvest tries again.
|
|
339
|
-
- **
|
|
340
|
-
|
|
356
|
+
- **Not landed:** a run merged by hand whose integration no branch contains: not merged yet,
|
|
357
|
+
or squashed. Nothing is written, and the next harvest tries again.
|
|
358
|
+
- **Lost:** an `integrate` that a squash, rebase or reset took off every branch. This means
|
|
359
|
+
unobservable, not failed; `lost_cause` says whether its branch was deleted (`branch_gone`)
|
|
360
|
+
or rewritten (`off_branch`).
|
|
361
|
+
|
|
362
|
+
**When it runs.** The end of every `run` (unless it was interrupted) and every `integrate`
|
|
363
|
+
harvests that plan's repository: bounded by `FORGE_OUTCOMES_TIMEOUT` seconds (default 20; it
|
|
364
|
+
starts no new integration after that, and is killed 10 s later), never changing the exit code,
|
|
365
|
+
with its errors in `errors.log`. `FORGE_OUTCOMES=off`, or the dataset off, skips it. A new
|
|
366
|
+
integration cannot have reached its horizon, so what it records is older work coming due. Every
|
|
367
|
+
harvest that writes leaves `outcomes.last` in the dataset dir, and `forge dataset status`
|
|
368
|
+
prints the outcomes recorded by status and what the last harvest did.
|
|
341
369
|
|
|
342
370
|
The rid names the integration, the reviewed commit and the horizon, so harvesting again
|
|
343
371
|
adds nothing, and two horizons are two outcomes. Survival describes the diff that landed,
|
|
@@ -369,6 +397,100 @@ or its model when no alias was recorded, as the forge-ui Models view keys it. A
|
|
|
369
397
|
forge-ui shows the rate as the Reviewers table's **Did not hold** column, through
|
|
370
398
|
`GET /api/models/reviewers`, which runs this command with `--json`.
|
|
371
399
|
|
|
400
|
+
## Risk beside difficulty
|
|
401
|
+
|
|
402
|
+
A plan event's `tasks.<id>.risk` is the task's `tasks/<id>/risk` rating (`low`, `medium`,
|
|
403
|
+
`high`, or null when it was not rated), recorded beside its difficulty. Nothing routes on it.
|
|
404
|
+
`forge dataset risk` counts each task once, as its run's latest plan revision rated it:
|
|
405
|
+
|
|
406
|
+
- how many tasks are rated, how many have a risk equal to their difficulty, and Cohen's kappa
|
|
407
|
+
between the two. A rating that only echoes difficulty adds nothing, and the question stops there.
|
|
408
|
+
- per (difficulty, risk) cell: tasks; first attempts that passed; tasks whose primary review
|
|
409
|
+
found a CONFIRMED P0 or P1; landed work (`forge dataset outcomes`, the longest horizon followed)
|
|
410
|
+
and how much of it did not hold. A cell under 10 tasks is flagged rather than read as an answer:
|
|
411
|
+
outcomes take 14 days, and low difficulty with high risk, the case that matters, is rare.
|
|
412
|
+
|
|
413
|
+
## Inside a tier
|
|
414
|
+
|
|
415
|
+
`forge dataset tiers` asks whether a tier, `high` above all, mixes tasks that behave very
|
|
416
|
+
differently, before anyone adds a tier. It reads the tasks `routing` counts (first attempt says
|
|
417
|
+
something about the implementer, fractal runs left out) and changes nothing in a run. Facts come in
|
|
418
|
+
two kinds, reported apart:
|
|
419
|
+
|
|
420
|
+
- **plan time**, known before dispatch, so a rule could route on them: declared files,
|
|
421
|
+
dependencies, wave, and the size of the task's prompt in KB;
|
|
422
|
+
- **afterwards**, known only once the first attempt ran, so they can explain a result but never
|
|
423
|
+
route one: lines in that attempt's diff and files it changed.
|
|
424
|
+
|
|
425
|
+
Outcomes are first attempt passed, attempts taken, and unfinished (never passed, not accepted).
|
|
426
|
+
Per tier and fact:
|
|
427
|
+
|
|
428
|
+
- **bins**: the tier in thirds of the fact, each with tasks, runs, first pass (Wilson 95%), mean
|
|
429
|
+
attempts and unfinished. Descriptive only: a run's tasks are correlated and routing chose who
|
|
430
|
+
ran what.
|
|
431
|
+
- **held out by run**: runs go to 5 folds by a hash of their id. On the other folds, each
|
|
432
|
+
threshold at the training values' quartiles is scored on outcomes adjusted for the implementer
|
|
433
|
+
(an outcome minus its model's mean in the tier, shrunk toward the tier mean by 5 tasks), so a
|
|
434
|
+
weaker model mix is not read as harder tasks. The best threshold and its direction are applied
|
|
435
|
+
to the held-out runs. `lift` is the held-out difference between the side predicted higher and
|
|
436
|
+
the other, in the outcome's units (points for rates, attempts for attempts): above 0 means the
|
|
437
|
+
direction learned elsewhere held. The interval resamples held-out runs. It is omitted under 10
|
|
438
|
+
runs, or when no threshold leaves 5 tasks on each side.
|
|
439
|
+
- **repos**: first pass per repo with 10 or more tasks in the tier, and the implementer-adjusted
|
|
440
|
+
residual with a run bootstrap. Not held out: a repo's runs mostly stay in it.
|
|
441
|
+
|
|
442
|
+
Label noise is measured blind and never by the report itself, since rating costs model calls or a
|
|
443
|
+
person's time. `--sample N --out DIR` writes N past prompts, one task per run before any run gives
|
|
444
|
+
a second, to `DIR/prompts/<n>.md`, with `DIR/sample.tsv` mapping each number to its run and task.
|
|
445
|
+
The tier is not in either file, but a prompt can name it (2 of 663 did on one machine), so tell the
|
|
446
|
+
rater to ignore that. The rater writes `DIR/ratings.tsv` as `<n><TAB>low|medium|high`, and
|
|
447
|
+
`--blind DIR` reports the agreement rate with the recorded tier (Wilson 95%), Cohen's kappa and the
|
|
448
|
+
confusion table. Lines naming an unknown number or an invalid tier are counted, not guessed.
|
|
449
|
+
|
|
450
|
+
## Paired reviews
|
|
451
|
+
|
|
452
|
+
`forge dataset pairs` reads the usable shadow pairs (as `status` counts them) and groups them by
|
|
453
|
+
the two reviewers' recorded harness, model and effort, each pair ordered lower effort first
|
|
454
|
+
(side `a`), then by model name:
|
|
455
|
+
|
|
456
|
+
- `effort`: the same model, at another effort or through another harness
|
|
457
|
+
- `model`: another model of the same family (`forge-shadow.py`'s families)
|
|
458
|
+
- `family`: another family
|
|
459
|
+
- `control`: identical settings. Their disagreement is the noise the others are read against,
|
|
460
|
+
and a control is never an effort comparison
|
|
461
|
+
|
|
462
|
+
Per pair of settings: `pairs`, `agree`, `agreement` with its Wilson 95% interval `ci`, and
|
|
463
|
+
`enough` from 30 pairs, the bar `forge dataset routing` uses. `only_a` and `only_b` count
|
|
464
|
+
blocking findings (CONFIRMED at the attempt's threshold or worse, or unlabelled) that the other
|
|
465
|
+
side did not name: nothing of it in the same file within 10 lines. An unlocated finding is always
|
|
466
|
+
unique, and a finding both sides name at different severities is not. `tokens_ratio` and
|
|
467
|
+
`time_ratio` are the medians over pairs of b's input plus output tokens and elapsed time as a
|
|
468
|
+
multiple of a's. A unique find is not a correct one: whether it was real is judged afterwards,
|
|
469
|
+
from outcomes or hidden tests. It only advises.
|
|
470
|
+
|
|
471
|
+
## Finding facts
|
|
472
|
+
|
|
473
|
+
A reviewer ends each finding's first line with `{reach=… origin=… evidence=…}`. Each QA dispatch
|
|
474
|
+
records it beside the finding's severity and status as `findings[].facts` = `{reach, origin,
|
|
475
|
+
evidence}` (a value that is not one of the fact's words is null), and the finding's `head` has the
|
|
476
|
+
suffix cut. A finding without the suffix has no `facts` key. Nothing in forge decides on them yet:
|
|
477
|
+
`forge dataset facts` measures whether a gate should.
|
|
478
|
+
|
|
479
|
+
- **Coverage**: findings and reviews that carry facts, each fact's values, and reach by severity.
|
|
480
|
+
- **Agreement**: for every usable shadow pair (as `status` counts them), the findings both
|
|
481
|
+
reviewers name (same file, lines at most 10 apart, nearest first). Severity and each fact are
|
|
482
|
+
compared where both reviewers gave a value, as a raw share and as Cohen's kappa: severity has
|
|
483
|
+
four values and reach three, so raw agreement alone would flatter reach.
|
|
484
|
+
- **Rules**: the review each task attempt ended on, replayed through the severity gate with and
|
|
485
|
+
without a rule (the threshold its `qa.gate` recorded, else the plan's). `unusual`: reach=unusual
|
|
486
|
+
does not block unless P0. `existing`: origin=existing does not block. `both`. A rule only
|
|
487
|
+
releases a CONFIRMED or UNSTATED finding that has a severity; an unlabelled one still blocks.
|
|
488
|
+
Counted: reviews that would have passed, and the attempts after the first such review that
|
|
489
|
+
would not have run. Up to 50 released findings are listed with their run, task, attempt and head.
|
|
490
|
+
|
|
491
|
+
The replay without a rule is the gate itself. It agreed with every recorded gate decision on one
|
|
492
|
+
machine's store (545 of 545), so a difference is the rule's.
|
|
493
|
+
|
|
372
494
|
## Plan forecast
|
|
373
495
|
|
|
374
496
|
`forge dataset forecast <plan>` reads the plan's `tasks.tsv` (the declared tier from
|
|
@@ -549,11 +549,24 @@ On the judged half of the runs (the newer half, see [Promotion](#promotion)), `-
|
|
|
549
549
|
- precision, recall and the number flagged at the site's threshold, against its floor;
|
|
550
550
|
- `PASSES: passes`, or `does not pass:` with the first rule that failed.
|
|
551
551
|
|
|
552
|
+
An inverted site's threshold is shown as configured, with the score it cuts at beside it:
|
|
553
|
+
`prompt_warn 0.55 (inverted: a score at or above 0.45)`.
|
|
554
|
+
|
|
552
555
|
A replay is not charged to the run or daily budget, and its requests are not written to
|
|
553
556
|
`jev.jsonl` or the dataset. Each `--send` is a deliberate call to the provider.
|
|
554
557
|
|
|
555
|
-
|
|
556
|
-
|
|
558
|
+
`--label V` judges the answers already stored on another label of the site, to check a past
|
|
559
|
+
result against the current one. It sends nothing and records nothing, so `gate on` only ever
|
|
560
|
+
reads a site's own label; `--label` with `--send` is refused. Requests that only the other label
|
|
561
|
+
labels and that were never answered are left out, and the output says how many were judged out of
|
|
562
|
+
how many. One variant exists:
|
|
563
|
+
|
|
564
|
+
- `jev-drift --label first-attempt`: the file is in attempt 1's changed files, passed or not.
|
|
565
|
+
It is the label of the 2026-10-16 replay. The site's own label is the final passing attempt's,
|
|
566
|
+
which has fewer positives.
|
|
567
|
+
|
|
568
|
+
Exit codes: 2 for an unknown site, a site with no label, an unknown provider, an unknown label
|
|
569
|
+
variant or a bad flag; 1 when the provider has no key and is not local.
|
|
557
570
|
|
|
558
571
|
### Promotion
|
|
559
572
|
|