@giamme/forge 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +61 -0
- package/README.md +19 -12
- package/SKILL.md +137 -216
- package/VERSION +1 -1
- package/docs/README.md +2 -3
- package/docs/add-ons.md +5 -3
- package/docs/artifacts.md +17 -2
- package/docs/commands.md +85 -63
- package/docs/decomposed-runs.md +195 -21
- package/docs/development.md +11 -9
- package/docs/forge-ui.md +33 -4
- package/docs/install.md +37 -5
- package/docs/memory.md +6 -1
- package/docs/models.md +36 -10
- package/docs/reviews.md +44 -25
- package/docs/safety.md +27 -2
- package/docs/troubleshooting.md +7 -10
- package/forge +25 -4
- package/package.json +2 -1
- package/references/dataset.md +10 -9
- package/references/decompose-integration.md +337 -0
- package/references/decompose-opt-in.md +527 -0
- package/references/decompose-recovery.md +569 -0
- package/references/decompose-review.md +256 -0
- package/references/decompose.md +99 -1606
- package/references/findings.md +68 -0
- package/references/harnesses.md +7 -12
- package/references/memory.md +13 -2
- package/references/planning.md +48 -18
- package/references/ripwire.md +38 -13
- package/references/runtime.md +22 -33
- package/references/setup.md +90 -0
- package/references/solo.md +13 -42
- package/references/ui.md +12 -5
- package/registry.tsv +40 -22
- package/scripts/forge-artifact.sh +143 -12
- package/scripts/forge-compare.py +5 -15
- package/scripts/forge-config.py +14 -1
- package/scripts/forge-contract.py +216 -53
- package/scripts/forge-control.py +777 -54
- package/scripts/forge-dispatch.sh +95 -12
- package/scripts/forge-du.py +13 -3
- package/scripts/forge-handoff.py +221 -39
- package/scripts/forge-install-ripwire.sh +100 -24
- package/scripts/forge-install.sh +18 -32
- package/scripts/forge-issues.py +6 -4
- package/scripts/forge-jev-options.sh +3 -5
- package/scripts/forge-lib-adopt.sh +169 -5
- package/scripts/forge-lib-attribute.sh +10 -3
- package/scripts/forge-lib-decompose.sh +454 -0
- package/scripts/forge-lib-env.sh +21 -0
- package/scripts/forge-lib-group.sh +4 -1
- package/scripts/forge-lib-plans.sh +30 -18
- package/scripts/forge-lib-review.sh +28 -8
- package/scripts/forge-lib-task.sh +225 -56
- package/scripts/forge-lib-verify.sh +59 -10
- package/scripts/forge-memory.sh +81 -4
- package/scripts/forge-metrics.sh +4 -2
- package/scripts/forge-parallel-options.sh +23 -4
- package/scripts/forge-parallel.sh +447 -175
- package/scripts/forge-plan-check.py +71 -8
- package/scripts/forge-planner.py +303 -17
- package/scripts/forge-pr.py +9 -1
- package/scripts/forge-prompt.py +2 -2
- package/scripts/forge-review-links.py +248 -0
- package/scripts/forge-ripwire.py +234 -16
- package/scripts/forge-route.py +19 -27
- package/scripts/forge-runs-rm.py +92 -21
- package/scripts/forge-runs.py +46 -5
- package/scripts/forge-runtime.py +37 -12
- package/scripts/forge-schedule.py +124 -33
- package/scripts/forge-setup-stale.py +236 -0
- package/scripts/forge-setup.py +804 -0
- package/scripts/forge-shadow.py +2 -20
- package/scripts/forge-solo-lock.py +46 -0
- package/scripts/forge-solo.sh +33 -56
- package/scripts/forge-sweep.py +2 -1
- package/scripts/forge-ui.py +8 -1
- package/scripts/forge-update.sh +2 -2
- package/scripts/forge-verify.py +16 -1
- package/scripts/forge-version.py +13 -1
- package/scripts/forge-watch.py +7 -2
- package/scripts/forge_dataset/__init__.py +1 -1
- package/scripts/forge_dataset/capture.py +0 -34
- package/scripts/forge_dataset/checks.py +0 -1
- package/scripts/forge_dataset/cli.py +5 -1
- package/scripts/forge_dataset/export.py +28 -6
- package/scripts/forge_dataset/facts.py +1 -2
- package/scripts/forge_dataset/forecast.py +1 -1
- package/scripts/forge_dataset/harvest.py +107 -7
- package/scripts/forge_dataset/importer.py +3 -2
- package/scripts/forge_dataset/pairs.py +3 -3
- package/scripts/forge_dataset/reviewers.py +4 -3
- package/scripts/forge_dataset/routing.py +6 -3
- package/scripts/forge_dataset/tiers.py +1 -1
- package/scripts/forge_decide/__init__.py +1 -1
- package/scripts/forge_decide/profiles.py +11 -14
- package/scripts/forge_decompose.py +987 -0
- package/scripts/forge_groups/review.py +6 -1
- package/scripts/forge_jev/__init__.py +1 -1
- package/scripts/forge_jev/cli.py +10 -1
- package/scripts/forge_jev/gates.py +10 -1
- package/scripts/forge_jev/verify.py +10 -2
- package/scripts/forge_legacy.py +86 -0
- package/scripts/forge_memory_home.py +57 -0
- package/scripts/forge_models.py +151 -0
- package/scripts/forge_prefs.py +138 -0
- package/scripts/forge_side/__init__.py +10 -0
- package/scripts/forge_storage.py +28 -15
- package/ui/README.md +22 -10
- package/ui/docs/api.md +121 -99
- package/ui/forge_ui/control.py +46 -14
- package/ui/forge_ui/export.py +0 -10
- package/ui/forge_ui/models.py +15 -2
- package/ui/forge_ui/projects.py +4 -1
- package/ui/forge_ui/reader.py +456 -59
- package/ui/forge_ui/server.py +0 -10
- package/ui/forge_ui/static/app.js +28 -9
- package/ui/forge_ui/static/checksview.js +12 -3
- package/ui/forge_ui/static/controls.js +147 -11
- package/ui/forge_ui/static/convo.js +5 -2
- package/ui/forge_ui/static/diffview.js +4 -5
- package/ui/forge_ui/static/panel.js +180 -77
- package/ui/forge_ui/static/projectsview.js +16 -2
- package/ui/forge_ui/static/runmodel.js +18 -4
- package/ui/forge_ui/static/scene3d.js +29 -29
- package/ui/forge_ui/static/settings.js +1 -1
- package/ui/forge_ui/static/storageview.js +2 -2
- package/ui/forge_ui/static/style.css +23 -6
- package/ui/forge_ui/static/worktreesview.js +8 -4
- package/ui/forge_ui/transcripts.py +6 -0
- package/ui/forge_ui/worktrees.py +13 -1
- package/docs/fractal.md +0 -181
- package/references/fractal-dashboard.md +0 -21
- package/references/fractal.md +0 -307
- package/scripts/forge-fractal-dispatch.sh +0 -4
- package/scripts/forge-fractal-options.sh +0 -54
- package/scripts/forge-fractal.py +0 -6
- package/scripts/forge-install-fractal.sh +0 -4
- package/scripts/forge_fractal/__init__.py +0 -88
- package/scripts/forge_fractal/bridge.py +0 -46
- package/scripts/forge_fractal/cli.py +0 -224
- package/scripts/forge_fractal/dashboard.css +0 -138
- package/scripts/forge_fractal/dashboard.html +0 -41
- package/scripts/forge_fractal/dashboard.js +0 -687
- package/scripts/forge_fractal/decomposition.py +0 -262
- package/scripts/forge_fractal/execution.py +0 -659
- package/scripts/forge_fractal/inspection.py +0 -261
- package/scripts/forge_fractal/install.py +0 -158
- package/scripts/forge_fractal/invocation.py +0 -95
- package/scripts/forge_fractal/pipeline.py +0 -125
- package/scripts/forge_fractal/selection.py +0 -180
- package/ui/forge_ui/fractal.py +0 -582
|
@@ -106,11 +106,11 @@
|
|
|
106
106
|
an outdated review, waiting for you */
|
|
107
107
|
.st-merged, .st-pass, .st-accepted, .st-nochanges { --st: var(--lamp-green); --st-lit: var(--lit-green); }
|
|
108
108
|
.st-running, .st-interrupted { --st: var(--lamp-amber); --st-lit: var(--lit-amber); }
|
|
109
|
-
.st-pending, .st-none, .st-unknown, .st-invalidated, .st-outdated { --st: var(--lamp-off); --st-lit: var(--lamp-off); }
|
|
109
|
+
.st-pending, .st-none, .st-unknown, .st-invalidated, .st-outdated, .st-stale { --st: var(--lamp-off); --st-lit: var(--lamp-off); }
|
|
110
110
|
.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); }
|
|
111
111
|
.st-needs_input, .st-needs_decision, .st-waiting, .st-implemented { --st: var(--lamp-wait); --st-lit: var(--lit-wait); }
|
|
112
112
|
[class^="st-"], [class*=" st-"] { --st-fill: var(--st); --st-ring: var(--lamp-edge); }
|
|
113
|
-
.st-accepted, .st-nochanges, .st-interrupted, .st-infra, .st-timeout, .st-blocked, .st-outdated, .st-needs_input, .st-needs_decision, .st-waiting, .st-implemented { --st-fill: transparent; --st-ring: var(--st); }
|
|
113
|
+
.st-accepted, .st-nochanges, .st-interrupted, .st-infra, .st-timeout, .st-blocked, .st-outdated, .st-stale, .st-needs_input, .st-needs_decision, .st-waiting, .st-implemented { --st-fill: transparent; --st-ring: var(--st); }
|
|
114
114
|
/* verification lanes: flaky passed on a rerun (amber, hollow), known passed with only baseline failures (green, hollow) */
|
|
115
115
|
.st-flaky { --st: var(--lamp-amber); --st-lit: var(--lit-amber); --st-fill: transparent; --st-ring: var(--st); }
|
|
116
116
|
.st-known { --st: var(--lamp-green); --st-lit: var(--lit-green); --st-fill: transparent; --st-ring: var(--st); }
|
|
@@ -579,6 +579,8 @@ dialog.keys-sheet::backdrop { background: light-dark(rgb(17 22 19 / .35), rgb(0
|
|
|
579
579
|
.tasks-switch .sum-msgs { flex-basis: 100%; }
|
|
580
580
|
.tasks-switch .sum-model { display: inline-flex; }
|
|
581
581
|
.tasks-switch .sum-state { font-weight: 600; }
|
|
582
|
+
.tasks-switch .sum-model-form { display: inline-flex; gap: var(--s-1); align-items: center; }
|
|
583
|
+
.tasks-switch .sum-model-form input { width: 14ch; font-family: var(--mono, monospace); }
|
|
582
584
|
body[data-tasks=closed] .tasks-module :is(.run-tasks, .splitter, .dt-tools, .tasks-switch, .run-questions) { display: none; }
|
|
583
585
|
body[data-tasks=closed] .tasks-module .module-head { border-bottom: 0; }
|
|
584
586
|
.run-tasks .dt, .run-tasks .dt-frame, .run-tasks .table-scroll { height: 100%; }
|
|
@@ -608,6 +610,9 @@ body[data-tasks=closed] .tasks-module .module-head { border-bottom: 0; }
|
|
|
608
610
|
.insp-section { margin: var(--s-5) 0 0; }
|
|
609
611
|
.inspector > .insp-section:first-child { margin-top: var(--s-1); }
|
|
610
612
|
.insp-section h3 { margin: 0 0 var(--s-2); }
|
|
613
|
+
.handoff-notes { list-style: none; margin: var(--s-2) 0 0; padding: 0; }
|
|
614
|
+
.handoff-notes li { margin: 0 0 var(--s-2); }
|
|
615
|
+
.handoff-notes li > div { white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
611
616
|
.fields { display: grid; grid-template-columns: minmax(96px, 128px) minmax(0, 1fr); gap: 5px var(--s-4); margin: 0 0 var(--s-3); font-size: var(--t-sm); }
|
|
612
617
|
dt { color: var(--muted); }
|
|
613
618
|
dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; font-variant-numeric: tabular-nums; }
|
|
@@ -750,11 +755,10 @@ a.check-cmd { color: var(--ink); text-underline-offset: 2px; }
|
|
|
750
755
|
.ph-snapshot { background: var(--ph-3); }
|
|
751
756
|
.ph-verification { background: var(--ph-4); }
|
|
752
757
|
.ph-finalization { background: var(--ph-2); }
|
|
753
|
-
.
|
|
758
|
+
.node-tree { list-style: none; margin: var(--s-2) 0; padding: 0; display: grid; gap: 3px; }
|
|
754
759
|
.ft-node { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: var(--t-sm); }
|
|
755
760
|
.ft-node > a { font-family: var(--mono); font-weight: 600; }
|
|
756
761
|
.ft-node > .diff-link.small { margin-left: auto; }
|
|
757
|
-
.ft-node.reserved > a { font-weight: 400; color: var(--muted); }
|
|
758
762
|
.ft-node .muted { font-size: var(--t-xs); }
|
|
759
763
|
.ft-d1 { padding-left: 16px; } .ft-d2 { padding-left: 32px; } .ft-d3 { padding-left: 48px; } .ft-d4 { padding-left: 64px; } .ft-d5 { padding-left: 80px; } .ft-d6 { padding-left: 96px; }
|
|
760
764
|
.ft-node:not(.ft-d0) { border-left: 1px solid var(--rule-2); margin-left: 4px; }
|
|
@@ -766,7 +770,7 @@ p.ui-outcome { display: flex; align-items: flex-start; gap: 7px; margin: 6px 0 0
|
|
|
766
770
|
/* an inline confirm: a strip with Confirm and Cancel keys, its lamp the route lamp (red for a destructive change) */
|
|
767
771
|
.ui-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: var(--s-2) 0 0; padding: 6px var(--s-2); border: 1px solid var(--route); border-radius: var(--r-key); background: var(--key); }
|
|
768
772
|
.ui-confirm.danger { border-color: var(--lamp-red); }
|
|
769
|
-
.ui-confirm-text { flex: 1 1 14em; min-width: 0; font-size: var(--t-sm); overflow-wrap: anywhere; }
|
|
773
|
+
.ui-confirm-text { flex: 1 1 14em; min-width: 0; font-size: var(--t-sm); overflow-wrap: anywhere; white-space: pre-line; }
|
|
770
774
|
.ui-confirm button { min-height: 28px; }
|
|
771
775
|
button.ui-danger { background: var(--lamp-red); border-color: var(--lamp-red); color: light-dark(#fff, #111613); }
|
|
772
776
|
button.ui-danger:hover:not(:disabled) { background: var(--lamp-red); color: light-dark(#fff, #111613); opacity: .9; }
|
|
@@ -796,6 +800,13 @@ p.ctl-why::before { content: ''; width: 7px; height: 7px; border-radius: 50%; ba
|
|
|
796
800
|
.ctl-set button, .ctl-pin > button { min-height: 28px; }
|
|
797
801
|
.ctl-set button[aria-pressed=true] { background: var(--key); box-shadow: inset 0 0 0 1px var(--rule-2); color: var(--muted); }
|
|
798
802
|
.ctl-pin-now { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
|
|
803
|
+
/* models per difficulty (#169) and what a spec runs */
|
|
804
|
+
.ctl-tiers { margin-top: var(--s-1); }
|
|
805
|
+
.ctl-tier-now { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
|
|
806
|
+
.ctl-role { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
|
|
807
|
+
.ctl-spec { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
|
|
808
|
+
.ctl-model { overflow-wrap: anywhere; }
|
|
809
|
+
.ctl-resolved { overflow-wrap: anywhere; }
|
|
799
810
|
p.ctl-stop { display: flex; align-items: center; gap: 7px; margin: 0; padding: 4px var(--s-2); border-radius: var(--r-small); background: var(--warn-wash); color: var(--warn-ink); font-weight: 600; }
|
|
800
811
|
.ctl-log { margin-top: var(--s-1); }
|
|
801
812
|
/* the run's keys (drain, resume, stop), its drained or stopping state, pauses and a queued retry's answer */
|
|
@@ -825,6 +836,12 @@ p.ctl-request-refused { color: var(--warn-ink); font-weight: 600; }
|
|
|
825
836
|
.sum-bank { justify-self: start; flex-wrap: wrap; max-width: 100%; }
|
|
826
837
|
p.sum-note { margin: 0; font-size: var(--t-xs); }
|
|
827
838
|
.sum-msgs:empty { display: none; }
|
|
839
|
+
.steer-waiting { list-style: none; margin: 0 0 var(--s-1); padding: 0; display: grid; gap: var(--s-1); }
|
|
840
|
+
.steer-waiting .steer-text { white-space: pre-wrap; margin: 0; }
|
|
841
|
+
.steer-box { display: grid; gap: var(--s-1); }
|
|
842
|
+
.steer-box textarea { width: 100%; box-sizing: border-box; font: inherit; }
|
|
843
|
+
.steer-box button { justify-self: start; }
|
|
844
|
+
.tag.steered { margin-left: var(--s-1); }
|
|
828
845
|
/* the one-sentence column: one line, cut off at the cell's edge */
|
|
829
846
|
.sum-col { max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
830
847
|
/* who decided an escalation, on the line that reports it */
|
|
@@ -1495,7 +1512,7 @@ table.wt-grid { width: max-content; min-width: 100%; }
|
|
|
1495
1512
|
.prj-findings td { white-space: nowrap; }
|
|
1496
1513
|
.prj-findings td.prj-wide { white-space: normal; min-width: 26em; }
|
|
1497
1514
|
.prj-summary { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-width: 46em; }
|
|
1498
|
-
.prj-learning { display: inline-block; max-width: 48em; }
|
|
1515
|
+
.prj-learning { display: inline-block; max-width: 48em; white-space: normal; }
|
|
1499
1516
|
.prj-actions { margin-top: var(--s-2); }
|
|
1500
1517
|
.prj-actions .fnd-picked { min-width: 8em; font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
|
|
1501
1518
|
.prj-findings td:first-child input[type=checkbox] { margin: 0; }
|
|
@@ -89,8 +89,12 @@
|
|
|
89
89
|
// One sentence for the dry run: how many would go, then each skip (and any failure) with its reason.
|
|
90
90
|
function summaryText(answer) {
|
|
91
91
|
const rows = answerRows(answer);
|
|
92
|
-
const
|
|
93
|
-
|
|
92
|
+
const going = rows.filter(r => r.status === 'would-remove'), n = going.length;
|
|
93
|
+
const branches = going.filter(r => r.action === 'remove+branch').length, folders = going.filter(r => r.action === 'delete-folder').length;
|
|
94
|
+
const plural = (count, one, many) => count + ' ' + (count === 1 ? one : many);
|
|
95
|
+
const extra = [branches && plural(branches, 'merged branch deleted', 'merged branches deleted'),
|
|
96
|
+
folders && plural(folders, 'leftover folder deleted', 'leftover folders deleted')].filter(Boolean);
|
|
97
|
+
let text = plural(n, 'worktree', 'worktrees') + ' would be removed' + (extra.length ? ' (' + extra.join(', ') + ')' : '') + '.';
|
|
94
98
|
const skipped = rows.filter(r => r.status === 'skipped');
|
|
95
99
|
const failed = rows.filter(r => r.status === 'failed');
|
|
96
100
|
if (skipped.length) text += ' Skipped: ' + skipped.map(rowBit).join('; ') + '.';
|
|
@@ -113,7 +117,7 @@
|
|
|
113
117
|
if (line.status === 'failed') return 'failed' + reason;
|
|
114
118
|
return (line.status || '') + reason;
|
|
115
119
|
}
|
|
116
|
-
const confirmQuestion = n => 'Remove ' + n + ' worktrees?';
|
|
120
|
+
const confirmQuestion = n => n === 1 ? 'Remove 1 worktree?' : 'Remove ' + n + ' worktrees?';
|
|
117
121
|
|
|
118
122
|
/* ---------- DOM ---------- */
|
|
119
123
|
function render(host, ctx) {
|
|
@@ -467,5 +471,5 @@
|
|
|
467
471
|
};
|
|
468
472
|
}
|
|
469
473
|
|
|
470
|
-
return { render, filterRows, totals, humanBytes, repoName, shortPath, label, removable, blockReason, selectable, summaryText, resultLines, STATUSES, LABEL };
|
|
474
|
+
return { render, filterRows, totals, humanBytes, repoName, shortPath, label, removable, blockReason, selectable, summaryText, confirmQuestion, resultLines, STATUSES, LABEL };
|
|
471
475
|
});
|
|
@@ -359,6 +359,12 @@ def parse_claude(text, session_file=False):
|
|
|
359
359
|
done.pop('running', None)
|
|
360
360
|
_answered(done, lines.end, t)
|
|
361
361
|
_put(done, 'output', _payload(block.get('content'))[0], OUTPUT_CAP)
|
|
362
|
+
elif kind == 'user' and message and value.get('isReplay'):
|
|
363
|
+
# Live steering (#252): the CLI replays each user message where it took it in. The first, before the
|
|
364
|
+
# model did anything, is the prompt; every later one is a message the user sent while it ran.
|
|
365
|
+
said = ' '.join(b.get('text', '') for b in _blocks(message.get('content')) if b.get('type') == 'text').strip()
|
|
366
|
+
if said and any(ev['kind'] in ('message', 'reasoning', 'command', 'edit', 'tool', 'result') for ev in events):
|
|
367
|
+
events.append(_event('steer', text=said, t=t))
|
|
362
368
|
elif kind == 'user' and message:
|
|
363
369
|
for block in _blocks(message.get('content')):
|
|
364
370
|
bt = block.get('type')
|
package/ui/forge_ui/worktrees.py
CHANGED
|
@@ -221,7 +221,7 @@ def _runs(catalog):
|
|
|
221
221
|
continue
|
|
222
222
|
read = reader._Read(run['path'])
|
|
223
223
|
try:
|
|
224
|
-
live = reader.
|
|
224
|
+
live = reader.run_live(read)
|
|
225
225
|
except Exception:
|
|
226
226
|
live = False
|
|
227
227
|
tasks = {t['id']: t['status'] for t in run.get('task_statuses') or [] if t.get('id')}
|
|
@@ -229,6 +229,18 @@ def _runs(catalog):
|
|
|
229
229
|
out.append(dict(key=run['key'], path=run['path'], run_id=run['run_id'], repo=run['repo'],
|
|
230
230
|
root=run.get('repo_root') or run['repo'], tasks=tasks, live=live,
|
|
231
231
|
integration=read.exists('accepted.integration') or read.exists('integration.base')))
|
|
232
|
+
# The subtasks of a split task (#153) are a plan of their own under it, with its own run id, branches
|
|
233
|
+
# and worktree folder. It is not a listed run, and its worktrees are forge's all the same.
|
|
234
|
+
for sub in reader.sub_plans(run['path']):
|
|
235
|
+
below = reader._Read(sub)
|
|
236
|
+
run_id = below.line('run_id')
|
|
237
|
+
if not run_id:
|
|
238
|
+
continue
|
|
239
|
+
states = {t['id']: t['status'] for t in reader._tasks(below)}
|
|
240
|
+
out.append(dict(key=reader.run_key(sub), path=str(below.path), run_id=run_id, repo=run['repo'],
|
|
241
|
+
root=run.get('repo_root') or run['repo'], tasks=states,
|
|
242
|
+
live=live or any(s == 'RUNNING' for s in states.values()),
|
|
243
|
+
integration=below.exists('integration.base')))
|
|
232
244
|
return out
|
|
233
245
|
|
|
234
246
|
|
package/docs/fractal.md
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
# Fractal execution
|
|
2
|
-
|
|
3
|
-
[← README](../README.md) · [All docs](README.md)
|
|
4
|
-
|
|
5
|
-
Fractal is an optional implementation backend for both solo and decomposed runs. It uses
|
|
6
|
-
the existing Forge dispatcher for Codex, Claude, OpenClaude, OpenCode and Antigravity.
|
|
7
|
-
Each work step gets a fresh model invocation; preserved files and child results provide
|
|
8
|
-
continuity when a parent resumes. Independent QA reviews the complete Forge task diff.
|
|
9
|
-
|
|
10
|
-
`--decompose-level` plans top-level Forge tasks before execution. `--fractal` lets an
|
|
11
|
-
implementer request nested children during execution. They can be used together, and
|
|
12
|
-
solo runs can use Fractal without a top-level decomposition.
|
|
13
|
-
|
|
14
|
-
## Install the optional runtime
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
forge fractal install --dry-run
|
|
18
|
-
forge fractal install --yes --with-prerequisites
|
|
19
|
-
forge fractal doctor --spec sol --spec opus --json
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
The managed runtime pins **Fractal 1.2.0** at revision
|
|
23
|
-
`18793200c0d7e8cdb2db369ea3abe5647a1e15e4`, checks the source archive checksum,
|
|
24
|
-
and includes the required `wiki` executable. It prefers an existing Python 3.12–3.14;
|
|
25
|
-
with prerequisite installation selected, it can provision uv, Python 3.13 and tmux.
|
|
26
|
-
tmux installation uses an existing Homebrew on macOS or apt on Debian/Ubuntu.
|
|
27
|
-
The [installation reference](../references/fractal.md#installation-and-provenance) covers
|
|
28
|
-
consent, supported bootstrap platforms, provenance and failure diagnostics.
|
|
29
|
-
|
|
30
|
-
Installation never enables Fractal for a run, adds no command and leaves your shell startup
|
|
31
|
-
files alone.
|
|
32
|
-
Doctor checks the runtime and advertised harness capabilities without calling a provider.
|
|
33
|
-
|
|
34
|
-
## Start and inspect a run
|
|
35
|
-
|
|
36
|
-
Through the skill:
|
|
37
|
-
|
|
38
|
-
```text
|
|
39
|
-
/forge "add retry with exponential backoff to the HTTP client" --dwarf sol:high --fractal
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Or prepare a solo run directory outside the product repository and invoke the runner:
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
FORGE_RUN="$HOME/.local/state/forge/examples/http-client"
|
|
46
|
-
mkdir -p "$FORGE_RUN"
|
|
47
|
-
printf '%s\n' 'Add bounded exponential backoff to the HTTP client and run its tests.' > "$FORGE_RUN/prompt.md"
|
|
48
|
-
bash scripts/forge-solo.sh "$FORGE_RUN" --repo /absolute/path/to/product \
|
|
49
|
-
--dwarf sol:high --qa opus --fractal --fractal-concurrency 3
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
Choose a new run directory for unrelated work. Backend selection, routing pools and limits
|
|
53
|
-
are stored with the run; resume and explicit retry retain them. For a prepared, approved
|
|
54
|
-
decomposed plan, select the backend on `run`:
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
bash scripts/forge-parallel.sh run /absolute/path/to/plan --fractal --dry-run
|
|
58
|
-
bash scripts/forge-parallel.sh run /absolute/path/to/plan --fractal
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Dry runs show resolved model pools, limits and proposed workspaces without installation
|
|
62
|
-
or provider calls. When a selected runtime is unavailable, interactive runs offer
|
|
63
|
-
installation; unattended runs return an actionable error instead of changing backends.
|
|
64
|
-
|
|
65
|
-
Discover the managed run ID, then inspect it from another terminal:
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
forge fractal runs --repo /absolute/path/to/product --json
|
|
69
|
-
forge fractal open # live runs index
|
|
70
|
-
forge fractal status RUN_ID --json
|
|
71
|
-
forge fractal tree RUN_ID --json
|
|
72
|
-
forge fractal logs RUN_ID --follow
|
|
73
|
-
forge fractal report RUN_ID --html /absolute/path/to/report.html
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
`RUN_ID` is the `run-…` identifier returned by `runs`, not the solo directory or plan name.
|
|
77
|
-
The [run inspector](../references/fractal-dashboard.md) opens on progress and problems, then lets
|
|
78
|
-
readers inspect task QA/history or node decisions, logs and changes. It refreshes about every
|
|
79
|
-
two seconds without replacing the workspace; search, selection, focus and scrolling remain in
|
|
80
|
-
place. “Pause live updates” affects the browser only. Browser access is read-only, bound to
|
|
81
|
-
`127.0.0.1` with an ephemeral access token. Closing its server does not stop execution.
|
|
82
|
-
Portable HTML embeds complete captured history and logs, works offline and needs no Fractal
|
|
83
|
-
runtime to read.
|
|
84
|
-
|
|
85
|
-
## Automatic recursive decomposition
|
|
86
|
-
|
|
87
|
-
`--fractal` permits workers to request children. To require a planning decision before
|
|
88
|
-
every eligible node implements, use `--fractal-auto-decompose`:
|
|
89
|
-
|
|
90
|
-
```text
|
|
91
|
-
/forge "<goal>" --dwarf luna:high --qa sol:high --fractal-auto-decompose --fractal-planner sol:xhigh --fractal-depth 3 --fractal-nodes 24
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
After the top-level Forge approval, the planner automatically splits useful work or
|
|
95
|
-
records why it is atomic. Children repeat this decision within the approved ownership
|
|
96
|
-
and frozen limits. `--fractal-planner` selects a separate decision model; when omitted,
|
|
97
|
-
Forge reuses the configured top-level planner, then the task's initial root model.
|
|
98
|
-
Decisions use disposable snapshots, persist for resume, and appear in tree/status/HTML
|
|
99
|
-
reports. Ordinary `--fractal` and existing runs retain their current behavior. Start a
|
|
100
|
-
new run to change policy or planner. See the [full decision contract](../references/fractal.md#automatic-decomposition-decisions).
|
|
101
|
-
|
|
102
|
-
## Bounds, recovery and acceptance
|
|
103
|
-
|
|
104
|
-
Defaults per Forge task are two nesting levels below implementation, three unsettled
|
|
105
|
-
direct children per node, twelve lifetime nodes, six iterations per node per attempt,
|
|
106
|
-
and a 45-minute attempt deadline excluding explicit pauses. Three model slots are shared
|
|
107
|
-
across the whole Forge run, including QA. `--max-parallel` bounds top-level task pipelines;
|
|
108
|
-
`--fractal-concurrency` bounds model invocations across their nested trees.
|
|
109
|
-
|
|
110
|
-
Child difficulty selects a frozen `--dwarf-low`, `--dwarf-medium` or `--dwarf-high` pool,
|
|
111
|
-
falling back to the configured general dwarf, then the parent. Dependencies and owned
|
|
112
|
-
paths constrain admission; overlapping ownership is serialized. Fractal never implies
|
|
113
|
-
`--yolo-dwarf`. Costs are observational; unavailable usage stays unknown and dollar-cap
|
|
114
|
-
requests are rejected.
|
|
115
|
-
|
|
116
|
-
```bash
|
|
117
|
-
forge fractal pause RUN_ID
|
|
118
|
-
forge fractal resume RUN_ID
|
|
119
|
-
forge fractal stop RUN_ID
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
Pause and stop preserve work and diagnostics. Run-level resume recovers recorded execution
|
|
123
|
-
and the Forge pipeline without repeating accepted stages. Use explicit runner retry for
|
|
124
|
-
a new attempt, retaining work and the original Forge QA baseline. Controls also accept
|
|
125
|
-
`--task TASK_ID` and `--task TASK_ID --node NODE_ID`; those IDs come from `tree` output.
|
|
126
|
-
|
|
127
|
-
Managed data lives in `${XDG_STATE_HOME:-$HOME/.local/state}/forge/fractal/`. Solo execution
|
|
128
|
-
uses an isolated snapshot and imports changes only after checking source drift, preserving
|
|
129
|
-
staging and leaving changes uncommitted. Decomposed candidates return to Forge's existing
|
|
130
|
-
review/integration pipeline. **Fractal completion is not Forge acceptance**: QA, repository
|
|
131
|
-
verification and authorization to update the user's branch remain distinct.
|
|
132
|
-
|
|
133
|
-
See the [full Fractal reference](../references/fractal.md) for limits, child requests and
|
|
134
|
-
recovery details, and [verification evidence](../tests/fractal-verification.md) for the tested
|
|
135
|
-
platforms and browser checks. No paid-provider or speed/cost claim follows from fake-CLI tests.
|
|
136
|
-
|
|
137
|
-
## `forge fractal` command group
|
|
138
|
-
|
|
139
|
-
Run it as `forge fractal`, or `forge fractal` from a git checkout.
|
|
140
|
-
This group manages Fractal runs; it does not replace the `/forge` skill or runner scripts.
|
|
141
|
-
|
|
142
|
-
| Command | Purpose |
|
|
143
|
-
| --- | --- |
|
|
144
|
-
| `install [--dry-run] [--yes] [--with-prerequisites]` | preview or install the isolated pinned runtime |
|
|
145
|
-
| `doctor [--spec SPEC] [--json]` | check runtime/hooks/tmux and optional repeated harness specs without provider calls |
|
|
146
|
-
| `runs [--repo DIR] [--json] [--html PATH]` | discover managed runs, optionally filtered by repository |
|
|
147
|
-
| `status\|tree\|activity RUN_ID` | inspect progress, hierarchy and history |
|
|
148
|
-
| `logs\|costs\|messages\|config RUN_ID` | inspect diagnostics, observed accounting, radio traffic and effective settings |
|
|
149
|
-
| `pause\|resume\|stop RUN_ID` | request a control and record its observed state |
|
|
150
|
-
| `open [RUN_ID] [--port PORT]` | open the read-only live dashboard or runs index |
|
|
151
|
-
| `report RUN_ID [--html PATH]` | capture a self-contained HTML report; default filename is `RUN_ID.html` |
|
|
152
|
-
|
|
153
|
-
Inspection commands accept `--task TASK_ID`, `--node NODE_ID`, `--json`, `--html PATH`,
|
|
154
|
-
`--offset N` and `--limit N` (1–1000). They currently return a common JSON run projection;
|
|
155
|
-
the command names do not imply separate output schemas. `logs --follow` follows changes.
|
|
156
|
-
HTML exports capture full history and logs. Controls require an explicit run ID, and a
|
|
157
|
-
node control also requires its task ID; they never guess the latest run. Use each command's
|
|
158
|
-
`--help` for its accepted options. Installation is also available through
|
|
159
|
-
`bash scripts/forge-install-fractal.sh`.
|
|
160
|
-
|
|
161
|
-
Fractal adds a managed workspace alongside the runner artifacts described here:
|
|
162
|
-
|
|
163
|
-
```text
|
|
164
|
-
${XDG_STATE_HOME:-$HOME/.local/state}/forge/fractal/
|
|
165
|
-
runtime/ isolated pinned Fractal and wiki environment
|
|
166
|
-
provenance.json installed versions and source checksum
|
|
167
|
-
installs/ installation attempts and diagnostics
|
|
168
|
-
runs/<run-id>/run.json effective routing, limits and runner binding
|
|
169
|
-
runs/<run-id>/controls/ requested controls and observed results
|
|
170
|
-
runs/<run-id>/tasks/<task-id>/
|
|
171
|
-
request.json / state.json task request and execution checkpoint
|
|
172
|
-
initialization.json control repository and Fractal ledger provenance
|
|
173
|
-
control/ Fractal metadata, separate from product changes
|
|
174
|
-
nodes/<node-id>/product/ isolated product candidate
|
|
175
|
-
nodes/<node-id>/steps/ fresh dispatcher attempts and raw logs
|
|
176
|
-
outcome.json captured Forge acceptance and verification
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
The original solo/plan directory stores `fractal-selection.json`; decomposed plans also
|
|
180
|
-
store `fractal-routing.json`. Prefer `forge fractal runs`, `tree`, `logs` and `report`
|
|
181
|
-
to direct ledger access. Inspection and stop never delete managed work.
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Forge run inspector: approved design brief
|
|
2
|
-
|
|
3
|
-
The dashboard and portable HTML report inspect one Fractal run at a time. The interface is dark-only, code-first and read-only. Fractal execution, Forge acceptance, verification and QA remain separate statuses; execution completion does not imply acceptance.
|
|
4
|
-
|
|
5
|
-
## Workspace
|
|
6
|
-
|
|
7
|
-
- A compact header identifies the run. The left pane holds searchable task and node rows with goal excerpts, status, model and parent/child nesting. Search retains ancestors of matching nodes.
|
|
8
|
-
- The right pane opens on the run overview, with progress and problems first. Task views are Summary, QA and History. Node views are Overview, Decomposition, Logs and Changes. Configuration and copyable terminal commands are secondary run views.
|
|
9
|
-
- Decomposition decisions show decision, reason, phase, planner, attempts, bounds and admitted children as fields. Logs are selected by step and file. Candidate changes are shown as line-oriented diffs, and raw text can be downloaded.
|
|
10
|
-
- Run, task, node and view live in the URL. The runs index is reachable even when the server was launched with a run ID. Browser Back and Forward restore selection.
|
|
11
|
-
- At narrow widths, the navigator and details become separate screens with an explicit back action. Keyboard focus is visible and status uses text as well as color. Reduced motion is respected.
|
|
12
|
-
|
|
13
|
-
## Refresh and data
|
|
14
|
-
|
|
15
|
-
Progress is requested about every two seconds. The page keeps its header, navigator, detail pane, selected item, tab, search, expanded rows, focus and scroll positions mounted while fields and rows reconcile by stable identifiers. It does not refocus a control during a refresh. A resource has at most one request in flight; late replies from a previous navigation are ignored.
|
|
16
|
-
|
|
17
|
-
The last successful view stays visible if a request fails. The status says stale/reconnecting and offers Retry. “Pause live updates” stops browser polling and is distinct from pausing run execution. Log follow starts off, turns off when the reader scrolls away, and can be restored with “Jump to latest.”
|
|
18
|
-
|
|
19
|
-
The live `data` endpoint supports `scope=progress`, `scope=runs`, and `scope=artifact` with a selected task and optional node. Artifacts are `task`, `node`, `qa`, `history`, `logs` and `changes`; history also takes `table=events|steps|messages` and a zero-based `offset`. An unscoped `data` request retains the original full projection for compatibility. Heavy files and ledger pages are fetched only for the selected view. The CLI capture schema and commands remain available.
|
|
20
|
-
|
|
21
|
-
The Python renderer inlines the separate CSS and JavaScript assets into each report. Portable reports retain the complete captured history and logs, escape artifact text and open from `file:` without network access. The loopback host check, ephemeral token, read-only HTTP surface and managed-file boundary remain in force. No execution engine, run-state schema or browser execution control is part of this design.
|