@giamme/forge 0.12.1 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/CHANGELOG.md +66 -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 +14 -4
  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 +763 -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 +22 -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 +457 -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 +39 -9
  50. package/scripts/forge-submodules.py +389 -0
  51. package/scripts/forge-ui-options.sh +25 -0
  52. package/scripts/forge_dataset/cli.py +12 -6
  53. package/scripts/forge_dataset/export.py +140 -84
  54. package/scripts/forge_dataset/harvest.py +33 -5
  55. package/scripts/{forge_jev/outcome.py → forge_dataset/states.py} +21 -7
  56. package/scripts/forge_decide/__init__.py +141 -0
  57. package/scripts/forge_decide/budget.py +180 -0
  58. package/scripts/forge_decide/cache.py +66 -0
  59. package/scripts/forge_decide/cli.py +953 -0
  60. package/scripts/forge_decide/doctor.py +270 -0
  61. package/scripts/forge_decide/label_addressed.py +75 -0
  62. package/scripts/forge_decide/label_attribution.py +62 -0
  63. package/scripts/forge_decide/label_coverage.py +81 -0
  64. package/scripts/forge_decide/label_message.py +38 -0
  65. package/scripts/forge_decide/label_prompt.py +139 -0
  66. package/scripts/forge_decide/labels.py +328 -0
  67. package/scripts/forge_decide/metrics.py +125 -0
  68. package/scripts/forge_decide/migrate.py +226 -0
  69. package/scripts/forge_decide/providers.py +292 -0
  70. package/scripts/forge_decide/replay.py +350 -0
  71. package/scripts/forge_decide/report.py +382 -0
  72. package/scripts/forge_decide/resolve.py +397 -0
  73. package/scripts/forge_decide/sites.py +377 -0
  74. package/scripts/forge_jev/__init__.py +202 -104
  75. package/scripts/forge_jev/addressed.py +171 -0
  76. package/scripts/forge_jev/attribution.py +198 -0
  77. package/scripts/forge_jev/cli.py +460 -382
  78. package/scripts/forge_jev/client.py +155 -77
  79. package/scripts/forge_jev/coupling.py +19 -87
  80. package/scripts/forge_jev/coverage.py +303 -0
  81. package/scripts/forge_jev/findings.py +219 -0
  82. package/scripts/forge_jev/gates.py +225 -27
  83. package/scripts/forge_jev/memory.py +65 -4
  84. package/scripts/forge_jev/message.py +134 -0
  85. package/scripts/forge_jev/plan_gates.py +294 -0
  86. package/scripts/forge_jev/questions.py +173 -313
  87. package/scripts/forge_jev/verify.py +130 -104
  88. package/ui/README.md +2 -2
  89. package/ui/docs/api.md +92 -39
  90. package/ui/forge_ui/control.py +71 -14
  91. package/ui/forge_ui/export.py +2 -1
  92. package/ui/forge_ui/models.py +17 -16
  93. package/ui/forge_ui/reader.py +132 -21
  94. package/ui/forge_ui/repos.py +428 -0
  95. package/ui/forge_ui/static/app.js +24 -5
  96. package/ui/forge_ui/static/cloudmodel.js +8 -5
  97. package/ui/forge_ui/static/controls.js +20 -13
  98. package/ui/forge_ui/static/modelstats.js +12 -8
  99. package/ui/forge_ui/static/panel.js +63 -17
  100. package/ui/forge_ui/static/runmodel.js +48 -7
  101. package/ui/forge_ui/static/scene3d.js +2 -15
  102. package/ui/forge_ui/static/settings.js +481 -68
  103. package/ui/forge_ui/static/style.css +56 -9
  104. package/references/jev.md +0 -865
  105. package/scripts/forge_jev/backtest.py +0 -322
  106. package/scripts/forge_jev/corpus.py +0 -156
  107. package/scripts/forge_jev/features.py +0 -24
  108. package/scripts/forge_jev/predict.py +0 -204
  109. package/scripts/forge_jev/review.py +0 -73
  110. package/scripts/forge_jev/routing.py +0 -271
  111. package/scripts/forge_jev/subset.py +0 -123
@@ -42,11 +42,13 @@
42
42
  --lamp-green: light-dark(#1d7a39, #5bd57d);
43
43
  --lamp-amber: light-dark(#9c6c00, #f4c443);
44
44
  --lamp-red: light-dark(#bf3127, #ff5f53);
45
+ --lamp-wait: light-dark(#0b7285, #5fd0e4); /* waiting for you (NEEDS_INPUT): stopped, not failed */
45
46
  --lamp-edge: light-dark(rgb(0 0 0 / .18), rgb(0 0 0 / .4));
46
47
  /* the same lamps lit on the 3D plate: on a pale panel a lit lamp is saturated, not darkened for text */
47
48
  --lit-green: light-dark(#2fae55, #5bd57d);
48
49
  --lit-amber: light-dark(#d8b000, #f4c443); /* blending toward the pale panel pulls amber to orange: it starts yellower */
49
50
  --lit-red: light-dark(#e0392e, #ff5f53);
51
+ --lit-wait: light-dark(#1098b3, #5fd0e4);
50
52
  /* the time an attempt spent in each phase: a grey ramp, with the model's own time lit */
51
53
  --ph-1: light-dark(#b9c1b8, #36403a);
52
54
  --ph-2: light-dark(#8e988f, #59645d);
@@ -90,15 +92,17 @@
90
92
  :root[data-theme=light] { color-scheme: light; }
91
93
  :root[data-theme=dark] { color-scheme: dark; }
92
94
 
93
- /* status: the lamp behind each forge state. Five lamps, one meaning each (--st; --st-lit on the 3D plate);
94
- a hollow lamp is that lamp's family but not its plain case: passed without a merge, stopped, failed outside the code,
95
- an outdated review */
95
+ /* status: the lamp behind each forge state. One meaning each (--st; --st-lit on the 3D plate): four lamps, and the
96
+ waiting lamp for a task that waits for the user (NEEDS_INPUT, and an integration that only waits for answers).
97
+ A hollow lamp is that lamp's family but not its plain case: passed without a merge, stopped, failed outside the code,
98
+ an outdated review, waiting for you */
96
99
  .st-merged, .st-pass, .st-accepted, .st-nochanges { --st: var(--lamp-green); --st-lit: var(--lit-green); }
97
100
  .st-running, .st-interrupted { --st: var(--lamp-amber); --st-lit: var(--lit-amber); }
98
101
  .st-pending, .st-none, .st-unknown, .st-invalidated, .st-outdated { --st: var(--lamp-off); --st-lit: var(--lamp-off); }
99
- .st-fail, .st-error, .st-conflict, .st-infra, .st-timeout, .st-blocked { --st: var(--lamp-red); --st-lit: var(--lit-red); }
102
+ .st-fail, .st-error, .st-conflict, .st-infra, .st-timeout, .st-blocked, .st-bounced, .st-incomplete { --st: var(--lamp-red); --st-lit: var(--lit-red); }
103
+ .st-needs_input, .st-waiting { --st: var(--lamp-wait); --st-lit: var(--lit-wait); }
100
104
  [class^="st-"], [class*=" st-"] { --st-fill: var(--st); --st-ring: var(--lamp-edge); }
101
- .st-accepted, .st-nochanges, .st-interrupted, .st-infra, .st-timeout, .st-blocked, .st-outdated { --st-fill: transparent; --st-ring: var(--st); }
105
+ .st-accepted, .st-nochanges, .st-interrupted, .st-infra, .st-timeout, .st-blocked, .st-outdated, .st-needs_input, .st-waiting { --st-fill: transparent; --st-ring: var(--st); }
102
106
  /* verification lanes: flaky passed on a rerun (amber, hollow), known passed with only baseline failures (green, hollow) */
103
107
  .st-flaky { --st: var(--lamp-amber); --st-lit: var(--lit-amber); --st-fill: transparent; --st-ring: var(--st); }
104
108
  .st-known { --st: var(--lamp-green); --st-lit: var(--lit-green); --st-fill: transparent; --st-ring: var(--st); }
@@ -303,6 +307,13 @@ body.resizing.rows { cursor: row-resize; }
303
307
  .run-sub { display: flex; gap: var(--s-2); align-items: baseline; font-size: var(--t-xs); color: var(--muted); min-width: 0; white-space: nowrap; }
304
308
  .run-sub .mono { font-size: var(--t-xs); overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
305
309
  .run-sub .repo { color: var(--ink-2); font-weight: 600; flex: none; }
310
+ /* the repository name and, for a worktree run, its checkout: the name never gives way; the worktree's leaf truncates first, its branch keeps its place */
311
+ .repo-line { display: inline-flex; align-items: baseline; max-width: 100%; min-width: 0; overflow: hidden; vertical-align: baseline; }
312
+ .repo-line > .repo { flex: none; }
313
+ .run-sub .repo-line { flex: 0 1 auto; }
314
+ .repo-wt { display: flex; align-items: baseline; min-width: 0; color: var(--muted); font-weight: 400; white-space: nowrap; }
315
+ .repo-leaf { flex: 0 100 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; } /* shrinks far more than the branch, which only gives way once the leaf is gone */
316
+ .repo-branch { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
306
317
  .run-sub .updated { margin-left: auto; flex: none; }
307
318
  .run-item .chips { margin-top: 3px; }
308
319
  .run-item .chip { font-size: .786rem; padding: 0 5px 0 4px; }
@@ -496,11 +507,15 @@ dialog.keys-sheet::backdrop { background: light-dark(rgb(17 22 19 / .35), rgb(0
496
507
  .run-title-row { display: flex; align-items: center; gap: 6px var(--s-3); min-width: 0; }
497
508
  .run-title-row > .lamp { margin-right: -4px; }
498
509
  .run-title-row > h2 { flex: 1 1 auto; min-width: 14ch; margin: 0; font-size: var(--t-md); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
499
- .run-where { flex: none; white-space: nowrap; color: var(--muted); font-size: var(--t-sm); } /* the id is copied: only the goal gives way */
510
+ .run-where { flex: 0 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 0 var(--s-2); white-space: nowrap; color: var(--muted); font-size: var(--t-sm); } /* the id is copied: only the goal and the worktree give way */
511
+ .run-where > .mono { flex: none; }
500
512
  .run-where .repo { font-weight: 600; color: var(--ink-2); }
513
+ .run-where > .repo { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
514
+ .run-where .repo-wt { max-width: 36ch; } /* a long worktree name must not take the goal's room */
501
515
  .run-title-row > .describer { flex: none; }
502
516
  @container (max-width: 860px) {
503
517
  .run-title-row { flex-wrap: wrap; } .run-title-row > h2 { flex-basis: calc(100% - 24px); }
518
+ .run-title-row > .run-where { flex: 0 1 auto; min-width: 0; max-width: 100%; } /* on its own line, the repository and its worktree give way before the id */
504
519
  .run-title-row > .describer { flex: 0 1 auto; max-width: 100%; flex-wrap: wrap; white-space: normal; row-gap: 2px; }
505
520
  }
506
521
  .run-actions { display: flex; gap: 6px; flex: none; margin-left: auto; }
@@ -566,6 +581,8 @@ summary:hover { color: var(--ink-2); }
566
581
  ul.plain { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 4px; font-size: var(--t-sm); }
567
582
  ul.plain li.current { font-weight: 650; }
568
583
  pre.cmd { max-height: none; }
584
+ .waiting-cmd { display: flex; align-items: flex-start; gap: var(--s-2); }
585
+ .waiting-cmd pre { flex: 1; min-width: 0; }
569
586
  /* the verification inspector (verifyview.js): live state, failing tests, lanes and their logs */
570
587
  .vfy-num { font-variant-numeric: tabular-nums; }
571
588
  .vfy-live { margin: var(--s-3) 0 0; padding: var(--s-3); border-radius: var(--r-key); background: var(--module-2); box-shadow: inset 0 0 0 1px var(--rule); }
@@ -1317,12 +1334,36 @@ dialog.del-dialog::backdrop { background: light-dark(rgb(17 22 19 / .35), rgb(0
1317
1334
  .del-archive { margin: var(--s-2) 0 0; font-size: var(--t-xs); overflow-wrap: anywhere; }
1318
1335
  .del-actions { display: flex; justify-content: flex-end; gap: var(--s-2); margin-top: var(--s-3); }
1319
1336
 
1320
- /* ---------- settings (#/settings): registry, Jev and the repository's .forge files ---------- */
1337
+ /* ---------- settings (#/settings): registry, decision models and the repository's .forge files ---------- */
1321
1338
  .settings-view { display: grid; gap: var(--s-4); max-width: 1100px; }
1322
1339
  .set-head { display: flex; align-items: baseline; gap: var(--s-4); flex-wrap: wrap; }
1323
1340
  .set-lede { margin: 0; font-size: var(--t-sm); }
1324
1341
  .set-picker-row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-3); }
1325
- .set-picker select { min-width: 22em; max-width: 100%; }
1342
+ /* the run picker: a button drawn as a field, and its listbox of runs grouped by repository */
1343
+ button.set-run { justify-content: flex-start; align-items: baseline; gap: var(--s-2); min-width: 22em; max-width: 100%; padding: 6px 28px 6px 10px;
1344
+ border-color: var(--rule-2); box-shadow: none; text-align: left;
1345
+ font-family: inherit; font-weight: 400; font-size: inherit; letter-spacing: normal; text-transform: none; line-height: 1.3; }
1346
+ /* the select's drawn chevron, also on hover: the base button:hover sets the whole background */
1347
+ button.set-run, button.set-run:hover:not(:disabled) { background-color: var(--field);
1348
+ background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
1349
+ background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
1350
+ button.set-run:hover:not(:disabled) { border-color: var(--ink-2); }
1351
+ button.set-run:active:not(:disabled) { scale: 1; }
1352
+ button.set-run[aria-expanded=true] { border-color: var(--route); }
1353
+ .set-run-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1354
+ .set-run .repo-wt, .set-run-opt .repo-wt { flex: none; font-size: var(--t-sm); }
1355
+ .set-run-pop { margin: 0; inset: auto; position: fixed; max-width: min(640px, calc(100vw - 16px)); max-height: min(60vh, 480px); overflow: auto; padding: 6px;
1356
+ border: 1px solid var(--rule); border-radius: var(--r-module); background: var(--module); color: var(--ink); box-shadow: var(--ply-2); }
1357
+ .set-run-list { display: grid; gap: 2px; outline: none; }
1358
+ .set-run-group { display: grid; gap: 1px; }
1359
+ .set-run-group + .set-run-group { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--rule); }
1360
+ .set-run-group-name { display: flex; align-items: baseline; gap: var(--s-2); min-width: 0; padding: 4px 10px 2px; font-size: var(--t-xs); }
1361
+ .set-run-group-name .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1362
+ .set-run-opt { position: relative; display: flex; align-items: baseline; gap: var(--s-2); min-height: 36px; padding: 9px 10px 9px 14px; border-radius: var(--r-key); cursor: pointer; }
1363
+ .set-run-opt[aria-selected=true]::before { content: ''; position: absolute; left: 4px; top: 9px; bottom: 9px; width: 2px; border-radius: 1px; background: var(--route); }
1364
+ .set-run-opt[aria-selected=true] .set-run-label { font-weight: 650; }
1365
+ .set-run-opt.is-active { background: var(--wash); box-shadow: inset 0 0 0 1px var(--rule-2); }
1366
+ .set-run-list:focus-visible .set-run-opt.is-active { box-shadow: inset 0 0 0 2px var(--route); }
1326
1367
  .set-field { display: inline-flex; align-items: center; }
1327
1368
  .set-repo-path, .set-why, .set-state-line, .set-file-status { display: flex; align-items: flex-start; gap: 7px; margin: var(--s-2) 0 0; font-size: var(--t-sm); overflow-wrap: anywhere; }
1328
1369
  .set-repo-path .lamp, .set-why .lamp, .set-state-line .lamp, .set-file-status .lamp { margin-top: .42em; }
@@ -1342,7 +1383,7 @@ button.set-switch { gap: 8px; padding: 0 10px 0 4px; }
1342
1383
  .set-switch-knob::after { content: ''; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--key); box-shadow: 0 0 0 1px var(--lamp-edge); transition: translate var(--relay); }
1343
1384
  button.set-switch[aria-checked=true] .set-switch-knob { background: var(--lamp-green); }
1344
1385
  button.set-switch[aria-checked=true] .set-switch-knob::after { translate: 12px 0; }
1345
- button.set-switch:focus-visible, .set-editor:focus-visible, .set-picker select:focus-visible { outline: 2px solid var(--route); outline-offset: 2px; }
1386
+ button.set-switch:focus-visible, .set-editor:focus-visible, button.set-run:focus-visible, .set-gate select:focus-visible, .set-gate input:focus-visible { outline: 2px solid var(--route); outline-offset: 2px; }
1346
1387
  .set-file { display: grid; gap: var(--s-2); width: 100%; padding: var(--s-3); border: 1px solid var(--rule); border-radius: var(--r-key); background: var(--module-2); }
1347
1388
  .set-file > * { margin-block: 0; }
1348
1389
  .set-file-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
@@ -1363,3 +1404,9 @@ button.set-remove:focus-visible { outline: 2px solid var(--lamp-red); outline-of
1363
1404
  .set-env dt, .set-env dd { margin: 0; overflow-wrap: anywhere; }
1364
1405
  .set-env dt { color: var(--ink-2); }
1365
1406
  .set-readonly { margin: 0; }
1407
+ .set-banner { display: flex; align-items: flex-start; gap: 7px; width: 100%; padding: 6px var(--s-2); border: 1px solid var(--rule-2); border-radius: var(--r-key); background: var(--warn-wash); color: var(--warn-ink); font-size: var(--t-sm); font-weight: 600; overflow-wrap: anywhere; }
1408
+ .set-budget { max-width: 72ch; font-variant-numeric: tabular-nums; }
1409
+ .set-gates { display: grid; gap: var(--s-3); width: 100%; }
1410
+ .set-gate select { min-width: 9em; max-width: 100%; }
1411
+ .set-gate input[type=text] { width: 14em; max-width: 100%; }
1412
+ .set-gate-skip { font-family: var(--mono); font-size: var(--t-xs); color: var(--warn-ink); }