@giamme/forge 0.12.1 → 0.13.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.
Files changed (107) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/README.md +1 -1
  3. package/SKILL.md +29 -12
  4. package/VERSION +1 -1
  5. package/docs/add-ons.md +11 -6
  6. package/docs/artifacts.md +12 -6
  7. package/docs/commands.md +179 -17
  8. package/docs/decomposed-runs.md +13 -5
  9. package/docs/forge-ui.md +7 -3
  10. package/docs/memory.md +2 -1
  11. package/docs/models.md +4 -2
  12. package/docs/reviews.md +49 -20
  13. package/docs/troubleshooting.md +3 -1
  14. package/forge +17 -1
  15. package/package.json +1 -1
  16. package/references/dataset.md +39 -13
  17. package/references/decision-models.md +759 -0
  18. package/references/decompose.md +166 -29
  19. package/references/harnesses.md +10 -3
  20. package/references/planning.md +8 -0
  21. package/references/solo.md +13 -3
  22. package/scripts/forge-artifact.sh +30 -4
  23. package/scripts/forge-config.py +238 -29
  24. package/scripts/forge-contract.py +95 -56
  25. package/scripts/forge-control.py +40 -9
  26. package/scripts/forge-decide.py +6 -0
  27. package/scripts/forge-dispatch.sh +38 -16
  28. package/scripts/forge-fail-first.py +2 -2
  29. package/scripts/forge-gate-addressed.sh +40 -0
  30. package/scripts/forge-gate-message.sh +64 -0
  31. package/scripts/forge-issues.py +321 -33
  32. package/scripts/forge-jev-options.sh +269 -42
  33. package/scripts/forge-lib-attribute.sh +447 -0
  34. package/scripts/forge-lib-gates.sh +32 -0
  35. package/scripts/forge-lib-plans.sh +17 -6
  36. package/scripts/forge-lib-review.sh +22 -17
  37. package/scripts/forge-lib-task.sh +217 -38
  38. package/scripts/forge-lib-verify.sh +45 -8
  39. package/scripts/forge-memory.sh +3 -3
  40. package/scripts/forge-parallel-options.sh +18 -5
  41. package/scripts/forge-parallel.sh +455 -303
  42. package/scripts/forge-plan-check.py +35 -1
  43. package/scripts/forge-pre-review.py +437 -0
  44. package/scripts/forge-prompt.py +25 -5
  45. package/scripts/forge-route.py +2 -2
  46. package/scripts/forge-runtime.py +10 -4
  47. package/scripts/forge-schedule.py +21 -5
  48. package/scripts/forge-shadow.py +2 -2
  49. package/scripts/forge-solo.sh +38 -9
  50. package/scripts/forge-submodules.py +389 -0
  51. package/scripts/forge_dataset/cli.py +12 -6
  52. package/scripts/forge_dataset/export.py +55 -45
  53. package/scripts/forge_dataset/harvest.py +33 -5
  54. package/scripts/{forge_jev/outcome.py → forge_dataset/states.py} +21 -7
  55. package/scripts/forge_decide/__init__.py +141 -0
  56. package/scripts/forge_decide/budget.py +149 -0
  57. package/scripts/forge_decide/cache.py +66 -0
  58. package/scripts/forge_decide/cli.py +953 -0
  59. package/scripts/forge_decide/doctor.py +221 -0
  60. package/scripts/forge_decide/label_addressed.py +75 -0
  61. package/scripts/forge_decide/label_attribution.py +62 -0
  62. package/scripts/forge_decide/label_coverage.py +81 -0
  63. package/scripts/forge_decide/label_message.py +38 -0
  64. package/scripts/forge_decide/label_prompt.py +139 -0
  65. package/scripts/forge_decide/labels.py +328 -0
  66. package/scripts/forge_decide/metrics.py +125 -0
  67. package/scripts/forge_decide/migrate.py +226 -0
  68. package/scripts/forge_decide/providers.py +292 -0
  69. package/scripts/forge_decide/replay.py +350 -0
  70. package/scripts/forge_decide/report.py +382 -0
  71. package/scripts/forge_decide/resolve.py +397 -0
  72. package/scripts/forge_decide/sites.py +377 -0
  73. package/scripts/forge_jev/__init__.py +202 -104
  74. package/scripts/forge_jev/addressed.py +171 -0
  75. package/scripts/forge_jev/attribution.py +198 -0
  76. package/scripts/forge_jev/cli.py +460 -382
  77. package/scripts/forge_jev/client.py +155 -77
  78. package/scripts/forge_jev/coupling.py +19 -87
  79. package/scripts/forge_jev/coverage.py +303 -0
  80. package/scripts/forge_jev/findings.py +219 -0
  81. package/scripts/forge_jev/gates.py +225 -27
  82. package/scripts/forge_jev/memory.py +65 -4
  83. package/scripts/forge_jev/message.py +134 -0
  84. package/scripts/forge_jev/plan_gates.py +294 -0
  85. package/scripts/forge_jev/questions.py +173 -313
  86. package/scripts/forge_jev/verify.py +130 -104
  87. package/ui/README.md +2 -2
  88. package/ui/docs/api.md +60 -32
  89. package/ui/forge_ui/control.py +60 -11
  90. package/ui/forge_ui/export.py +2 -1
  91. package/ui/forge_ui/models.py +1 -0
  92. package/ui/forge_ui/reader.py +87 -14
  93. package/ui/forge_ui/static/app.js +2 -2
  94. package/ui/forge_ui/static/controls.js +20 -13
  95. package/ui/forge_ui/static/panel.js +63 -17
  96. package/ui/forge_ui/static/runmodel.js +23 -1
  97. package/ui/forge_ui/static/scene3d.js +2 -15
  98. package/ui/forge_ui/static/settings.js +336 -41
  99. package/ui/forge_ui/static/style.css +19 -7
  100. package/references/jev.md +0 -865
  101. package/scripts/forge_jev/backtest.py +0 -322
  102. package/scripts/forge_jev/corpus.py +0 -156
  103. package/scripts/forge_jev/features.py +0 -24
  104. package/scripts/forge_jev/predict.py +0 -204
  105. package/scripts/forge_jev/review.py +0 -73
  106. package/scripts/forge_jev/routing.py +0 -271
  107. package/scripts/forge_jev/subset.py +0 -123
package/CHANGELOG.md CHANGED
@@ -5,6 +5,61 @@ 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.13] - 2026-10-30
9
+
10
+ Decision-model gates are now yours to set, off, shadow or on, per user or per repository with `forge decide`, and when on they act: drift and forward edit the plan, prompt and coverage send it back to the planner, and five new gates bounce unaddressed retries, read the implementer's final message, find the merge that broke verification and triage leftover findings. QA verdicts now follow a P2 blocking threshold in both directions, and a retry can continue the implementer's own session.
11
+
12
+ ### Added
13
+
14
+ - A gate can ask any TypeSafe-compatible (jev) or Cloudflare-compatible (clef) endpoint, hosted or on your machine: `forge decide provider add` takes a URL, a model, a context limit and a price, and a key only on stdin or as the name of an environment variable.
15
+ - Decision models can be capped per run and per day, in tokens and estimated cost (`forge decide budget`, or `--decide-budget tokens=N,usd=X` on a run); a gate past a cap stops asking for the rest of the run or day.
16
+ - `forge decide` sets each decision-model gate (drift, forward, prompt, memory-curate, memory-slice, memory-stale, verify-discover) to off, shadow or on, for you or per repository (`.forge/decide.json`): `status`, `gate`, `provider`, `budget`, `privacy`, `doctor` and `migrate`. Shadow asks and records but changes nothing. Its first change migrates `jev.json`; until then every run behaves exactly as before. `forge decide privacy never-send --repo DIR` stops every gate from sending anything about that repository.
17
+ - forge-ui's Settings page sets each gate's mode, the providers, the budgets and a repository's privacy floor, through `forge decide`.
18
+ - `--gate name=mode` and `--no-gates` on `plan` and solo runs choose the gates for that run; they are kept with the run, so resume and retry decide the same way.
19
+ - A decision-model question asked again in the same run is answered from the run directory's request cache: free, outside the budget, and logged as `cached`. `FORGE_DECIDE_CACHE=off` turns it off.
20
+ - A gate goes `on` only for a provider and model with a passing replay: `forge decide gate G on`, and `forge config set` of an `on` gate's provider or model, refuse (exit 3) and name the replay to run. `--force` turns it on anyway, and a forced gate is marked in `forge decide status` and `report`, `forge config show`, the plan's decide line and forge-ui's Settings, which shows the whole refusal. `forge decide migrate` marks the gates it turns on as forced.
21
+ - `forge decide replay --site S --provider P --model M` re-asks a site's labelled past requests on that provider and model, compares the answers with the live model's and the site's no-model baseline, and records whether it passes. Without `--send` it is a dry run that sends nothing; a replay skips repos under the privacy floor and is charged to no budget. The decision-models guide gains a "Measuring a gate" section.
22
+ - `forge decide report` shows, per decision-model site over recent runs, what it cost (calls, cache hits, errors, skips, tokens, and dollars at the provider's price) and how often it fired right, wrong or missed, judged against labels taken from what the runs did next. It asks no model.
23
+ - forge-ui marks a PASS that forge turned into FAIL, and shows the QA threshold with where it comes from, such as `P2 (default)`.
24
+ - Task and integration worktrees now contain the repository's submodules, each at its recorded commit, copied from your checkout's own copy without network access and invisible to git. A submodule forge cannot fill is named in the implementer's brief.
25
+ - `plan --pre-review-tests` runs only the tests an attempt affects (from `.forge/test-map`, naming conventions or references) before paying for its review; a red result goes back to the implementer as findings, unreviewed. `--pre-review-parallel N` caps how many run at once, `forge control set` changes both during a run, and forge-ui shows the result.
26
+ - `plan --implementer-session` lets a retry continue the implementer's own claude or openclaude session, so it does not re-read what it already knows, when its spec is unchanged and its work is still what the review judged; otherwise the retry starts fresh as before. Each attempt is logged in `tasks/<id>/implementer_sessions.tsv`, and `forge dataset status` counts implementer continues apart from reviewer ones.
27
+ - `forge-parallel.sh attribute <plan>` (or `run --attribute`) finds the merged task that broke the combined verification, by re-running the same verification at merge boundaries. With the new `attribution` gate on, the likeliest culprit is checked first.
28
+ - New `dwarf-message` gate: an implementer whose final message says it did not finish, or was blocked, is sent back without a review (`INCOMPLETE`), keeping the findings it was working on. One that asks a question only you can answer stops the task as `NEEDS_INPUT`; the run summary shows the question, and `forge-parallel.sh retry <plan> <task> --answer "…"` (or `--answer-file`) resumes it.
29
+ - New `retry-addressed` gate: a retry whose change leaves one of its blocking findings untouched goes back to the implementer without paying for a review. The attempt is recorded as `BOUNCED`, and the next one is always reviewed.
30
+ - When `on`, the prompt gate and the new coverage gate send work back to the planner once: a task whose prompt reads as too vague to check, or a requirement in `request.md` that no task covers. `plan` then exits 4 and writes `plan.sendback.md`; fix the plan and run `plan` again. A block under the task table shows what each plan-time gate did.
31
+ - `forge decide status`, `report` and `replay` cover the five new gates (coverage, retry-addressed, dwarf-message, attribution, findings), which start `off` and need `--force` to go `on` until a replay passes. Every label now means "the gate should have acted"; the memory gates report how often they acted. `references/decision-models.md` describes what each gate does when on.
32
+ - forge-ui shows a task waiting for your answer with its question, `BOUNCED` and `INCOMPLETE` attempts, and the result of `attribute`.
33
+ - New `findings` gate for `forge-issues.py`: a leftover finding that rewords an open issue becomes a comment on that issue instead of a new one, and the `--file-issues ask` dialog pre-selects the findings that name a concrete defect, with a reason for each one left out. `forge-jev.py findings` offers the same check to other tools.
34
+
35
+ ### Changed
36
+
37
+ - `forge issues` and the finding sweep read the findings a review tolerated the same way the gate does, at the run's actual threshold, so each one is filed.
38
+ - QA verdicts now follow a blocking threshold in both directions, `P2` unless `--qa-threshold` sets another, in solo runs, decomposed tasks and the whole-run review alike. A PASS that lists a CONFIRMED finding at the threshold or worse becomes FAIL, and its retry says why. A FAIL made only of CONFIRMED findings below it is accepted, and those findings are kept in `known_issues.md`. `--qa-threshold P3` (or `none`) makes every CONFIRMED finding block; `plan` now takes the flag too.
39
+ - Implementers and reviewers are told to verify within the change: the tests it affects, not the whole suite or repo-wide lint, format and type checks unless the task asks, with a reviewer spending about 5 minutes at most on test runs.
40
+ - QA reviews now run at `high` effort when the reviewer spec names none (it was `xhigh`), and the approval table says so; planning stays at `xhigh`. Name an effort (`--qa opus:xhigh`) to keep the old one.
41
+ - The drift gate asks about the 25 files a task could plausibly touch, ranked, instead of the first 120 in alphabetical order. When `on`, drift adds the files it predicts to the task before the waves are computed, and the forward gate adds the dependency it predicts (never one that would form a cycle); both are recorded in `plan-gates.json`. In `shadow`, and under `--jev-shadow`, they only record what they would do.
42
+ - Verify discovery says when the command it picks may test only part of the repository (for example Python tests in a repo that also has Rust code), and reads remembered test commands from the project memory itself.
43
+
44
+ ### Deprecated
45
+
46
+ - `forge jev` still works for one release and names the `forge decide` command that replaces it; `--jev-act` does nothing and says so; `forge config`'s `jev.enabled` is replaced by `decide.gate.<gate>`.
47
+
48
+ ### Removed
49
+
50
+ - The decision-model sites that did not earn their place are gone: `forge jev backtest` (and the tracked `jev-backtests/` data), review triage, same-wave coupling (coupling keeps forward dependencies), the Clef first-pass and retry-pass predictions and their forge-ui drawing, verify flake triage (the deterministic rerun stays), the test-subset site (`.forge/verify-subset` stays for `--fail-first`) and score-plan's routing tiers. `references/decision-models.md` replaces the Jev reference.
51
+
52
+ ### Fixed
53
+
54
+ - A dispatch whose harness exits very quickly now still records its log clock, so forge-ui can time its commands.
55
+ - A reviewer that runs the tests no longer gets a passing attempt thrown away: files it leaves untracked in its review copy, such as `__pycache__/` in a repository with no `.gitignore`, no longer void the review. A task `INVALIDATED` because its review copy changed is now retried by `--retry-failed`, and that retry, like an explicit `retry`, only reviews the unchanged work again; forge-ui offers Retry now for it.
56
+ - `forge issues` and the finding sweep read a location that lists several lines or adds a note (`path:442,674`, `path:117-119 (also …)`) as its file and first line, instead of dropping the finding as having no location.
57
+ - A dispatch no longer hangs forever when its run directory is removed, or cannot be written, while the agent is running: it used to wait for its log-clock sampler, which waited for it. Test runs left one such pair of processes behind each time.
58
+
59
+ ### For contributors
60
+
61
+ - The dataset records each review's gate decision, PASS verdicts that forge turned into FAIL, the solo gate, and where the threshold came from.
62
+
8
63
  ## [0.12.1] - 2026-10-28
9
64
 
10
65
  A run can now fix the review findings it tolerated before it ends (`run --sweep Pn`), and forge-ui shows where each task stands, the checks each attempt ran and the environment problems several tasks hit. A task that deletes large files no longer breaks its review.
package/README.md CHANGED
@@ -80,7 +80,7 @@ Inside any agent CLI where forge is installed:
80
80
  ```
81
81
 
82
82
  That's the whole minimum. `sol` builds it at `high` effort on Codex, `opus` reviews the diff at
83
- `xhigh` (the default reviewer), and you get back a summary of the change plus qa's findings.
83
+ `high` (the default reviewer), and you get back a summary of the change plus qa's findings.
84
84
 
85
85
  ```text
86
86
  # pick both sides
package/SKILL.md CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: forge
3
3
  description: Dispatch implementation and independent diff review to user-selected models through local agent CLIs. Use for /forge or explicit requests to delegate coding or review; explanation-only questions do not authorize dispatch.
4
- argument-hint: '"<goal>" --dwarf <alias>[:effort[:harness]] [--qa <alias>] [--planner <alias>] [--yolo-dwarf] [--yolo-qa] [--decompose-level low|medium|high] [--fractal|--no-fractal|--fractal-auto-decompose] [--fractal-planner <spec>] [--jev|--no-jev] [--jev-shadow] [--no-memory] [--no-ripwire] [--ui|--no-ui] [--timeout <seconds>] [--retry-failed <n>] [--escalate-after <n>] [--qa-threshold P0|P1|P2|P3] [--file-issues ask|auto|off] [--shadow-qa <spec>[,<spec>]] [--shadow-rate <0..1>] [--reviewer-session] [--explore <0..0.5>] [--fail-first]'
4
+ argument-hint: '"<goal>" --dwarf <alias>[:effort[:harness]] [--qa <alias>] [--planner <alias>] [--yolo-dwarf] [--yolo-qa] [--decompose-level low|medium|high] [--fractal|--no-fractal|--fractal-auto-decompose] [--fractal-planner <spec>] [--jev|--no-jev] [--jev-shadow] [--gate NAME=MODE] [--no-gates] [--decide-budget tokens=N[,usd=X]] [--no-memory] [--no-ripwire] [--ui|--no-ui] [--timeout <seconds>] [--retry-failed <n>] [--escalate-after <n>] [--qa-threshold P0|P1|P2|P3|none|default] [--file-issues ask|auto|off] [--shadow-qa <spec>[,<spec>]] [--shadow-rate <0..1>] [--reviewer-session] [--explore <0..0.5>] [--fail-first]'
5
5
  allowed-tools: [Bash, Read]
6
6
  ---
7
7
 
@@ -14,7 +14,7 @@ For explanation requests, explain the workflow without spending model quota.
14
14
  ## Choices and boundaries
15
15
 
16
16
  - A dwarf model must be chosen by the user. Ask when it is missing; never invent one.
17
- - QA defaults to `opus`; effort defaults to `medium` for dwarf and `xhigh` for QA/planner.
17
+ - QA defaults to `opus`; effort defaults to `medium` for dwarf, `high` for QA and `xhigh` for the planner.
18
18
  - Specs are `alias[:effort[:harness]]`, e.g. `sol:xhigh:openclaude`. Resolve using
19
19
  [registry.tsv](registry.tsv); report any effort clamp. Literal model IDs require a harness.
20
20
  - Bypass flags apply only when explicitly requested for that role (`--yolo-dwarf`,
@@ -41,16 +41,22 @@ For explanation requests, explain the workflow without spending model quota.
41
41
  - One implementer per tree. Solo edits remain uncommitted. Decomposed runs may commit
42
42
  and merge on Forge task and integration branches. Updating the user's branch requires
43
43
  separate authorization and `integrate --approved`. Never push automatically.
44
+ - The QA threshold defaults to `P2`: a CONFIRMED finding at P2 or worse blocks, so a PASS that
45
+ lists one becomes FAIL, and milder CONFIRMED findings are recorded as known issues. `--qa-threshold`
46
+ changes it (see [the verdict rule](docs/reviews.md#verdicts-and-failure)).
44
47
  - Show the decomposed task/model table and wait for approval before dispatch. Retry only
45
48
  when requested; preserve failed task branches and worktrees. `run --retry-failed N`,
46
- `--infra-retries M`, `--qa-threshold Pn`, `plan --shadow-qa` (a second review of a
49
+ `--infra-retries M`, `plan --shadow-qa` (a second review of a
47
50
  sampled share of attempts, never read, to measure reviewer agreement) and
48
- `plan --reviewer-session` (continue the reviewer's session across rounds) and `run --sweep Pn`
51
+ `plan --reviewer-session` (continue the reviewer's session across rounds),
52
+ `plan --implementer-session` (a retry continues the implementer's session) and `run --sweep Pn`
49
53
  (once every task merged, fix the tolerated findings at Pn or worse in a few extra tasks, one per
50
54
  file; `--sweep-ahead` instead hands a task the open findings in its files) are opt-in: offer
51
55
  them, never add them unprompted. So is `--fail-first` (solo or `plan`): the change's new
52
56
  tests also run without its non-test changes, and the reviewer is asked to report any that
53
- still pass as P2; it needs `.forge/verify-subset` and never changes a result by itself. `plan` explores by default (`--explore 0.2`: now and then
57
+ still pass as P2; it needs `.forge/verify-subset` and never changes a result by itself. So is
58
+ `plan --pre-review-tests`: before each review forge runs only the tests the attempt affects
59
+ (`.forge/verify-subset`), and a red attempt goes back to its implementer unreviewed. `plan` explores by default (`--explore 0.2`: now and then
54
60
  a row left to forge gets its neighbouring tier's model from the user's pools, odds
55
61
  recorded for `forge dataset routing`); say so with the table and pass `--explore 0` when
56
62
  the user declines. Retries follow a policy: after three failed attempts on one model the
@@ -63,12 +69,16 @@ For explanation requests, explain the workflow without spending model quota.
63
69
  lists them). Never set a control, pin, `drain|stop|retry` or delete a run with `forge control` /
64
70
  `forge runs rm` unless the user asks. Exit `130` / `INTERRUPTED`: the run was signalled or
65
71
  stopped; relay the `retry` lines it printed.
72
+ - A run that ends with a `waiting for your answer:` block has tasks in status `NEEDS_INPUT`: the
73
+ implementer asked a question only the user can answer. Relay each question to the user
74
+ verbatim, and pass the reply with `retry <plan> <id> --answer "<reply>"`. Never answer for the
75
+ user, and never retry such a task without an answer: nothing else resumes it.
66
76
  - Exit `8` / status `INFRA` is a quota, auth or network stop, not a task failure and no
67
77
  attempt was spent: report it, say what to fix, and re-run only when told. For a multi-task
68
78
  plan, offer the opt-in whole-run review (`review`, or `integrate --final-review <qa-spec>`);
69
79
  it spends QA quota, so never run it unprompted.
70
80
  - **Leftover findings become issues.** A run can finish with review findings nobody will act on:
71
- - CONFIRMED findings that `--qa-threshold` tolerated (`tasks/<id>/known_issues.md`);
81
+ - CONFIRMED findings the threshold tolerated, from a PASS or a FAIL (`tasks/<id>/known_issues.md`);
72
82
  - PLAUSIBLE findings in a passed task's `qa.last`;
73
83
  - whatever a whole-run review left open.
74
84
 
@@ -81,11 +91,13 @@ For explanation requests, explain the workflow without spending model quota.
81
91
  - `auto`: file them without asking (`--apply`, PLAUSIBLE included as "to verify" issues) and report what was created and skipped.
82
92
  - `off`: never offer.
83
93
 
94
+ With the `findings` gate on (`forge decide gate findings on`), forge's filer adds `preselect` and `reason` to each finding in the dry-run JSON, and `--apply` turns a reworded duplicate of an open issue into a comment on it (`comments`, `commented`). `ask` shows the pre-selected findings and the reason for each one left out, and files the ones the user keeps with `--only <fps> --max-issues <count>`. `auto` files only the pre-selected ones the same way.
95
+
84
96
  `--file-issues` is an instruction to you: never forward it to a runner. Skip INFRA, interrupted and still-failing runs. Both filers mark each issue with the same finding fingerprint and skip a finding either one already filed, so offering again after a retry only brings up new ones. A draft flagged as a possible duplicate is skipped on `--apply`: show it, and file it (`--confirm-new`) only if the user says it is different.
85
- - Jev is optional, off unless configured and enabled, and always advisory: it never
86
- changes a task's tier, never selects a model, and never substitutes for QA acceptance
97
+ - Decision models (Jev, Clef) are optional, off until a gate is opted in with `forge decide`,
98
+ fail-open, and never change a task's tier, select a model, or substitute for QA acceptance
87
99
  or repository verification (`--jev-act` is still accepted and changes nothing). Read
88
- [Jev](references/jev.md) when selected.
100
+ [Decision models](references/decision-models.md) when selected.
89
101
 
90
102
  ## Common workflow
91
103
 
@@ -105,6 +117,10 @@ For explanation requests, explain the workflow without spending model quota.
105
117
  Pass the recorded Fractal choice and requested limits to the execution runner; tier
106
118
  pools go to solo directly or decomposed `plan`. Fractal does not replace planner dispatch.
107
119
  `--timeout` applies to decomposed runs too (kept in the plan).
120
+ When `plan` exits 4, the prompt or coverage gate sent work back: read `<plan>/plan.sendback.md`,
121
+ rewrite each listed task's `prompt.md`, and extend or add tasks for each uncovered
122
+ requirement (with `--planner`, re-dispatch it with that file appended), then run `plan`
123
+ again, once. Forge never sends the same task or requirement back twice.
108
124
  4. Runners default to summary output. Read each `dwarf.last` and `qa.last` once; retrieve raw
109
125
  logs only when needed. Report findings faithfully, and identify verification
110
126
  limits. Source or review mutations invalidate acceptance. Missing verdicts are UNKNOWN.
@@ -137,9 +153,10 @@ Runners offer installation once before agents; dispatch never prompts. See
137
153
  `FORGE_UI=off`, one shared server, privacy.
138
154
  - [Dataset](references/dataset.md): every run's inputs and outcomes, kept outside the repo
139
155
  for training decision models; `forge dataset status|import|export|outcomes`, `FORGE_DATASET=off`.
140
- - [Jev](references/jev.md): optional TypeSafe System One judgments for routing, test
141
- selection and memory curation; off by default. Chosen sites can go to Cloudflare's hosted
142
- Clef instead (`forge jev setup --provider cloudflare`, `forge jev sites`, `FORGE_CLEF=off`).
156
+ - [Decision models](references/decision-models.md): optional TypeSafe Jev or Cloudflare Clef
157
+ judgments (drift, forward dependency, prompt adequacy, memory curation, verify discovery);
158
+ off until a gate is opted in with `forge decide`; the criteria a site must meet, and what
159
+ was tried and removed.
143
160
 
144
161
  The common invocation is `/forge "<goal>" --dwarf <spec> [--qa <spec>]`. Advanced flags and
145
162
  commands live with their mode reference. Use [offline tests and evaluation cases](tests/README.md)
package/VERSION CHANGED
@@ -1 +1 @@
1
- 0.12.1
1
+ 0.13
package/docs/add-ons.md CHANGED
@@ -15,13 +15,18 @@ and retries. See [installation, controls and attempt artifacts](../references/ri
15
15
  ## Jev
16
16
 
17
17
  Jev is TypeSafe's "System One" model. It answers narrow, typed questions over the state it is
18
- given, quickly and with calibrated probabilities. forge can ask it for advice on routing, test
19
- selection, gates and memory curation. That advice sits beside forge's own decisions and never
20
- replaces a model choice, a test run, a review or verification.
18
+ given, quickly and with calibrated probabilities. forge can ask it for advice on plan-time
19
+ warnings (drift, a forward dependency, a vague prompt), memory curation and finding a verify
20
+ command. That advice sits beside forge's own decisions and never replaces a model choice, a
21
+ test run, a review or verification. A failed request behaves as if Jev were off.
21
22
 
22
23
  It is **off by default**. Each enabled capability sends a narrow slice of the run to an external
23
- API: task prompts, diff hunks, test names or memory text, and never `.forge/` or `.git`. The
24
- installer offers setup and declines by default.
24
+ API: task prompts, file excerpts, diff hunks, candidate commands or memory text. Drift's
25
+ candidate file list leaves out `.forge/` and `.git`, but nothing else does: **`.forge/memory.md`
26
+ is sent**. Prompt adequacy puts its first 4000 characters in every `gates` request, memory
27
+ curation sends entries from it, and verify discover (`tests`) sends the bullets under its
28
+ `## Verify` heading. Keep private text out of that file, or leave `gates`, `memory` and `tests`
29
+ off for the repo. The installer offers setup and declines by default.
25
30
 
26
31
  ```sh
27
32
  forge jev setup # store an API key
@@ -30,4 +35,4 @@ forge jev enable [--capability NAME] # turn it on, optionally for one capabili
30
35
  ```
31
36
 
32
37
  Chosen sites can go to Cloudflare's hosted Clef instead (`forge jev setup --provider cloudflare`).
33
- The [full Jev reference](../references/jev.md) covers capabilities, privacy and backtests.
38
+ The [decision-models reference](../references/decision-models.md) covers the sites, privacy and what was tried and removed.
package/docs/artifacts.md CHANGED
@@ -19,7 +19,7 @@ as if the dwarf had written it.
19
19
  <role>.infra only after an infrastructure failure: class, retry_after, detail, harness, model
20
20
  <role>.orphans only when processes were left running after the harness exited
21
21
  <role>.session session id reported by claude, openclaude or codex; absent when the dispatch published none
22
- <role>.continue only when the dispatch was asked to continue a reviewer session: requested=, mode=continued|failed, reason=
22
+ <role>.continue only when the dispatch was asked to continue a session (a reviewer's, or an implementer's): requested=, mode=continued|failed, reason=
23
23
  changes.diff the dwarf's real diff, which is qa's input
24
24
  ```
25
25
 
@@ -30,6 +30,8 @@ A solo run also records, for forge-ui and for you:
30
30
  status RUNNING, then PASS|FAIL|UNKNOWN|NOCHANGES|INVALIDATED|TIMEOUT|INFRA|INTERRUPTED|ERROR
31
31
  dwarf.spec, qa.spec the specs the run was given
32
32
  attempts.tsv epoch, attempt number, status, infrastructure class, dwarf spec; one row per invocation
33
+ qa.gate, known_issues.md the gate's decision (accept, fail or keep) and the findings the threshold tolerated
34
+ qa_threshold only with --qa-threshold: P0-P3 or none; without it the default P2 applies
33
35
  ```
34
36
 
35
37
  Plus, in the repo itself and surviving the run:
@@ -48,7 +50,7 @@ A decomposed run adds:
48
50
  waves.tsv, deferrals.txt
49
51
  tasks/<id>/{capsule.md,prompt.md,dwarf.*,qa.*,changes.diff,status}
50
52
  tasks/<id>/attempt, attempts.tsv attempts spent; one audit row per entry (incl. refunded stops)
51
- tasks/<id>/known_issues.md, qa.gate findings tolerated by --qa-threshold, and the gate's decision
53
+ tasks/<id>/known_issues.md, qa.gate findings the threshold tolerated, and the gate's decision (accept, fail or keep)
52
54
  sweep/plan.json, plan.md run --sweep: the fix tasks, their findings, and every finding left out with its reason
53
55
  tasks/<id>/sweep.json a fix task's findings (S1, S2, ...), each with its source task and key
54
56
  tasks/<id>/sweep.outcome.json what the fix task's review said of each, written when it merged; forge issues reads it
@@ -57,7 +59,7 @@ A decomposed run adds:
57
59
  tasks/<id>/guard.txt what forge observed about the implementer (self-commit, orphans, promises)
58
60
  tasks/<id>/infra.txt, resume, noretry infrastructure stop record (<role>.infra plus stage=); QA-only resume marker; no-progress marker
59
61
  tasks/<id>/<role>.harness only while a guarded dispatch runs: its harness's pid and start time, for forge-guard.py stop
60
- tasks/<id>/qa_threshold optional per-task blocking threshold: P0-P3, or none (exempt from the plan's)
62
+ tasks/<id>/qa_threshold optional per-task blocking threshold: P0-P3, or none (P3; exempt from a looser plan threshold)
61
63
  tasks/<id>/escalations.tsv epoch, attempt, from-spec, to-spec, source (policy|retry|pin|fallback); older rows have 4 columns
62
64
  tasks/<id>/escalation.pin a human's one-shot model for the next full retry: one dwarf spec on one line
63
65
  tasks/<id>/escalation.pin.applying the pin while a retry has claimed it; removed once the retry is recorded
@@ -68,13 +70,17 @@ A decomposed run adds:
68
70
  tasks/<id>/changes.since.range the two commits, full hashes
69
71
  tasks/<id>/changes.since.stat diff --stat of that range
70
72
  tasks/<id>/review_sessions.tsv one row per review round while plan --reviewer-session is on: round, attempt, mode, reason, session id
73
+ tasks/<id>/implementer_sessions.tsv one row per attempt while plan --implementer-session is on: row, attempt, mode (continued|fresh|failed), reason, session id
74
+ tasks/<id>/reviewed.dwarf.{session,resolved} the implementer session that made reviewed.commit, and what it ran as
75
+ tasks/<id>/retry_findings.dwarf.{session,resolved} the same, carried beside the retry findings; what --implementer-session continues
71
76
  tasks/<id>/retry_budget, retries.used live per-task retry budget (a number); retries spent (kept after the run)
72
77
  results.tsv id status branch
73
- timeout, qa_threshold, verify_retries options remembered from run/retry flags (also escalate_after)
78
+ timeout, qa_threshold, verify_retries options remembered from plan/run/retry/review flags (also escalate_after); no qa_threshold file means the default P2
74
79
  escalate_effort on: the retry policy's effort step (--escalate-effort; absent = off)
75
80
  infra_backoff, infra_fallback --infra-backoff's shape; on while --infra-fallback is set
76
81
  max_parallel the concurrency limit: written by each run from --max-parallel, changed live by forge control
77
82
  reviewer_session holds on; present while plan --reviewer-session is on
83
+ implementer_session holds on; present while plan --implementer-session is on
78
84
  <final-review-dir>/review.meta final-review-<epoch>-<pid>/ or integrate-*/final-review/; base=, tip=, source=, spec=, threshold=, integration=, previous=, since=; session= and session_reason= while reviewer_session is set
79
85
  control.log one JSON line per human change made with forge control, and per request outcome
80
86
  control.requests/ retry and add requests queued by forge control: one JSON file each, removed once settled
@@ -97,8 +103,8 @@ A decomposed run adds:
97
103
  verify_parallel lanes run at once (--verify-parallel; default 3)
98
104
  ```
99
105
 
100
- `verification.runs.tsv` is tab-separated, one row per run: `n`, `kind` (`initial`, `rerun`, or
101
- `jev_retry` for a single command), `exit`, `tree_changed` (`0`/`1`), `duration_s` and `log`. With
106
+ `verification.runs.tsv` is tab-separated, one row per run: `n`, `kind` (`initial` or `rerun`; runs
107
+ from before 2026-10-27 can also hold `jev_retry`), `exit`, `tree_changed` (`0`/`1`), `duration_s` and `log`. With
102
108
  lanes each row has two more columns, `lane` and `started` (epoch seconds); lanes run side by
103
109
  side, so `tree_changed` is `1` only when the whole verification was a single lane run that
104
110
  changed the tree (`verification.lanes.json`'s `mutated` says whether it changed at all). In lanes