@giamme/forge 0.18.0 → 0.20.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 (93) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +1 -0
  3. package/SKILL.md +19 -2
  4. package/VERSION +1 -1
  5. package/docs/artifacts.md +25 -1
  6. package/docs/commands.md +217 -18
  7. package/docs/decomposed-runs.md +114 -1
  8. package/docs/development.md +2 -1
  9. package/docs/forge-ui.md +138 -18
  10. package/docs/memory.md +25 -4
  11. package/docs/models.md +8 -0
  12. package/docs/reviews.md +122 -0
  13. package/forge +26 -3
  14. package/package.json +2 -1
  15. package/references/dataset.md +20 -1
  16. package/references/decompose.md +641 -41
  17. package/references/harnesses.md +18 -3
  18. package/references/memory.md +30 -5
  19. package/references/planning.md +43 -14
  20. package/references/ui.md +53 -6
  21. package/registry.tsv +8 -3
  22. package/scripts/forge-brief.py +88 -3
  23. package/scripts/forge-compare.py +4 -3
  24. package/scripts/forge-contract.py +202 -27
  25. package/scripts/forge-control.py +117 -5
  26. package/scripts/forge-dispatch.sh +34 -5
  27. package/scripts/forge-findings.py +675 -0
  28. package/scripts/forge-group.py +496 -0
  29. package/scripts/forge-groups.py +89 -0
  30. package/scripts/forge-handoff.py +1128 -0
  31. package/scripts/forge-issues.py +228 -97
  32. package/scripts/forge-lib-group.sh +641 -0
  33. package/scripts/forge-lib-plans.sh +339 -3
  34. package/scripts/forge-lib-task.sh +197 -4
  35. package/scripts/forge-memory.sh +711 -17
  36. package/scripts/forge-parallel.sh +721 -38
  37. package/scripts/forge-planner.py +104 -8
  38. package/scripts/forge-route.py +190 -12
  39. package/scripts/forge-runs.py +9 -5
  40. package/scripts/forge-schedule.py +417 -52
  41. package/scripts/forge-solo.sh +2 -0
  42. package/scripts/forge-sweep.py +199 -44
  43. package/scripts/forge-worktrees.py +243 -0
  44. package/scripts/forge_brief/__init__.py +294 -50
  45. package/scripts/forge_brief/answers.py +58 -11
  46. package/scripts/forge_brief/proposals.py +1630 -0
  47. package/scripts/forge_dataset/efforts.py +4 -3
  48. package/scripts/forge_dataset/export.py +24 -12
  49. package/scripts/forge_dataset/facts.py +5 -3
  50. package/scripts/forge_dataset/forecast.py +8 -18
  51. package/scripts/forge_dataset/harvest.py +204 -9
  52. package/scripts/forge_dataset/history.py +11 -6
  53. package/scripts/forge_dataset/importer.py +65 -1
  54. package/scripts/forge_dataset/names.py +66 -0
  55. package/scripts/forge_dataset/reviewers.py +5 -2
  56. package/scripts/forge_dataset/risk.py +6 -3
  57. package/scripts/forge_dataset/routing.py +6 -1
  58. package/scripts/forge_findings/__init__.py +17 -0
  59. package/scripts/forge_findings/apply.py +441 -0
  60. package/scripts/forge_findings/status.py +43 -0
  61. package/scripts/forge_findings/store.py +583 -0
  62. package/scripts/forge_findings/tags.py +53 -0
  63. package/scripts/forge_findings/triage.py +603 -0
  64. package/scripts/forge_groups/__init__.py +308 -0
  65. package/scripts/forge_groups/attribute.py +289 -0
  66. package/scripts/forge_groups/review.py +286 -0
  67. package/scripts/forge_identity.py +327 -0
  68. package/scripts/forge_memory_list.py +7 -3
  69. package/scripts/forge_owner.py +152 -0
  70. package/scripts/forge_side/__init__.py +228 -38
  71. package/ui/docs/api.md +303 -29
  72. package/ui/forge_ui/control.py +1018 -6
  73. package/ui/forge_ui/executions.py +8 -1
  74. package/ui/forge_ui/export.py +31 -4
  75. package/ui/forge_ui/groups.py +264 -0
  76. package/ui/forge_ui/models.py +70 -8
  77. package/ui/forge_ui/projects.py +209 -22
  78. package/ui/forge_ui/reader.py +262 -19
  79. package/ui/forge_ui/server.py +4 -0
  80. package/ui/forge_ui/static/app.js +93 -13
  81. package/ui/forge_ui/static/briefview.js +350 -47
  82. package/ui/forge_ui/static/diffview.js +86 -1
  83. package/ui/forge_ui/static/findingsactions.js +201 -0
  84. package/ui/forge_ui/static/groupsview.js +332 -0
  85. package/ui/forge_ui/static/index.html +3 -0
  86. package/ui/forge_ui/static/panel.js +127 -7
  87. package/ui/forge_ui/static/projectsview.js +764 -30
  88. package/ui/forge_ui/static/runmodel.js +14 -3
  89. package/ui/forge_ui/static/storageview.js +91 -10
  90. package/ui/forge_ui/static/style.css +138 -5
  91. package/ui/forge_ui/static/triageview.js +423 -0
  92. package/ui/forge_ui/static/worktreesview.js +233 -12
  93. package/ui/forge_ui/storage.py +14 -0
@@ -236,10 +236,21 @@
236
236
  const CAUSE_LABELS = { capacity: 'at capacity', rate_limit: 'rate limited', usage_limit: 'usage limit', budget: 'out of budget',
237
237
  auth: 'login needed', network: 'network down', provider_down: 'provider down', empty: 'empty answer', cancelled: 'cancelled' };
238
238
  const causeLabel = cause => cause ? (Object.prototype.hasOwnProperty.call(CAUSE_LABELS, cause) ? CAUSE_LABELS[cause] : String(cause)) : null;
239
+ // Words the page shows in place of a status word. IMPLEMENTED is a member whose work is in and whose group has not reviewed it.
240
+ const STATUS_LABELS = { IMPLEMENTED: 'awaiting group review' };
241
+ function statusLabel(status) {
242
+ const word = status == null ? '' : String(status);
243
+ return Object.prototype.hasOwnProperty.call(STATUS_LABELS, word) ? STATUS_LABELS[word] : word;
244
+ }
239
245
  // The status word, with an INFRA task's cause after it (`INFRA · usage limit`); plain `INFRA` when no cause was recorded.
246
+ // IMPLEMENTED reads as its label. The word itself stays the lamp class (taskStatus).
240
247
  function statusText(t) {
241
- const status = taskStatus(t), label = status === 'INFRA' ? causeLabel(t.infra && t.infra.cause) : null;
242
- return label ? `INFRA · ${label}` : status;
248
+ const status = taskStatus(t);
249
+ if (status === 'INFRA') {
250
+ const label = causeLabel(t.infra && t.infra.cause);
251
+ return label ? `INFRA · ${label}` : status;
252
+ }
253
+ return statusLabel(status);
243
254
  }
244
255
  const DAY_NAMES = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
245
256
  const MONTH_NAMES = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
@@ -951,7 +962,7 @@
951
962
  }
952
963
 
953
964
  return { liveNow, runState, execStatus, matchRun, filterOptions, atlasModel, repoKey, repoLabel, compareRepo, columns, planModel, finishState,
954
- finalStatus, runReviewStatus, reviewSinceLine, reviewAt, taskStatus, statusText, causeLabel, resetText, taskVerdict, attemptStatus, attemptNote, attemptFailed, isWaiting,
965
+ finalStatus, runReviewStatus, reviewSinceLine, reviewAt, taskStatus, statusText, statusLabel, causeLabel, resetText, taskVerdict, attemptStatus, attemptNote, attemptFailed, isWaiting,
955
966
  attributionLine, taskParts,
956
967
  taskTimes, metricValue, overlap, projectSchedule, execModel, verifyLeds, criticalPath, concurrency, stateAt, timeRange, events, lineage, structureKey, innerKey,
957
968
  fmtDur, alias, basename, weight, searchIndex, searchRank, statusEvents, fractalTree, sweepLine, sweepState, retroSummary };
@@ -1,11 +1,12 @@
1
1
  /* forge-ui Disk screen (#139): what forge takes on disk in every repository it has runs for (run dirs, worktrees,
2
2
  its data home) and the command that takes each part back (window.ForgeStorage, and a CommonJS module under
3
3
  node:test). Route #/disk. The same report as `forge du --all`, from the same rules (scripts/forge_storage.py).
4
- The commands come from the server and are only ever copied: the page runs nothing, so it works with
5
- --read-only too. Measuring visits every file, so it runs once in the background when the screen opens and
4
+ The commands come from the server. Under --read-only they are only ever copied. When controls are on, a
5
+ reclaimable run (and every reclaimable run at once) can be compacted from here, after a dry run and a
6
+ confirmation. Measuring visits every file, so it runs once in the background when the screen opens and
6
7
  again on "Measure again"; the page polls only while a measurement runs.
7
8
  The pure helpers are tested in ui/tests/js/storageview.test.js.
8
- ctx = { runHref(path) -> href | null, tablePrefs?(id), saveTablePrefs?(id, prefs) }. */
9
+ ctx = { runHref(key) -> href (a run row's key is null when the run list does not show it), tablePrefs?(id), saveTablePrefs?(id, prefs) }. */
9
10
  (function (root, factory) {
10
11
  'use strict';
11
12
  const api = factory(root);
@@ -25,6 +26,35 @@
25
26
  while (v >= 1024 && i < units.length - 1) { v /= 1024; i += 1; }
26
27
  return (i === 0 ? String(v) : v.toFixed(v < 10 ? 1 : 0)) + ' ' + units[i];
27
28
  }
29
+ // A copied command is a compact only when it is `forge runs compact`. `--all` is the whole disk; anything
30
+ // else names one run. `forge du --all` and `forge runs rm` are not compacts.
31
+ function compactKind(command) {
32
+ if (typeof command !== 'string' || !command.includes('forge runs compact')) return null;
33
+ return /(?:^|\s)--all(?:\s|$)/.test(command) ? 'all' : 'run';
34
+ }
35
+ // The compact POST body, without dry_run (the caller adds it). `all` compacts every reclaimable run;
36
+ // a string or {run}|{key} compacts that run.
37
+ function compactBody(target) {
38
+ if (target === 'all' || (target && typeof target === 'object' && target.all === true)) return { all: true };
39
+ if (typeof target === 'string') return { run: target };
40
+ const raw = target && typeof target === 'object' ? (target.run != null ? target.run : target.key) : null;
41
+ return { run: raw == null ? '' : String(raw) };
42
+ }
43
+ function compactPayload(answer) {
44
+ const data = answer && answer.data;
45
+ if (data && typeof data === 'object' && !Array.isArray(data)
46
+ && ('bytes_freed' in data || 'runs' in data || 'dry_run' in data)) return data;
47
+ return answer && typeof answer === 'object' ? answer : {};
48
+ }
49
+ // What the confirm and the result say: the bytes `forge runs compact --json` would free, and how many runs.
50
+ function compactSummary(answer) {
51
+ const body = compactPayload(answer);
52
+ const bytes = typeof body.bytes_freed === 'number' && Number.isFinite(body.bytes_freed) ? body.bytes_freed : 0;
53
+ const n = Array.isArray(body.runs) ? body.runs.length : 0;
54
+ const runs = n === 1 ? '1 run' : n + ' runs';
55
+ return (body.dry_run ? 'Would free ' : 'Freed ') + humanBytes(bytes) + ' across ' + runs;
56
+ }
57
+ const ACTIVE_RUN = 'this run is active: compact it after it ends';
28
58
  // One line on the whole: what forge takes and what can go without losing a run.
29
59
  function summary(data) {
30
60
  const t = (data && data.totals) || {};
@@ -83,7 +113,7 @@
83
113
  function render(host, ctx) {
84
114
  const UI = root.ForgeUI;
85
115
  const el = (tag, text, cls) => UI.el(tag, text, cls);
86
- const s = { answer: null, error: null, timer: null, seq: 0 };
116
+ const s = { answer: null, error: null, timer: null, seq: 0, writes: false, compacting: false };
87
117
 
88
118
  const head = el('div', undefined, 'wt-head');
89
119
  const again = el('button', 'Measure again'); again.type = 'button';
@@ -91,15 +121,18 @@
91
121
  again.addEventListener('click', () => load(true));
92
122
  const stamp = el('span', '', 'muted wt-stamp');
93
123
  head.append(el('h1', 'Disk', 'module-title'), again, stamp);
94
- const lede = el('p', 'What forge takes on disk in every repository it has runs for, and the command that takes each part back. Review snapshots and log copies can go without losing a run: every run stays viewable here and in the dataset. Commands are only copied: this page runs nothing.', 'muted wt-lede');
124
+ const LEDE_OFF = 'What forge takes on disk in every repository it has runs for, and the command that takes each part back. Review snapshots and log copies can go without losing a run: every run stays viewable here and in the dataset. Commands are only copied: this page runs nothing.';
125
+ const LEDE_ON = 'What forge takes on disk in every repository it has runs for, and the command that takes each part back. Review snapshots and log copies can go without losing a run: every run stays viewable here and in the dataset. Copy a command, or compact from here after a dry run and a confirmation.';
126
+ const lede = el('p', LEDE_OFF, 'muted wt-lede');
95
127
  const status = el('p', undefined, 'wt-totals'); status.setAttribute('role', 'status');
96
128
  const cmds = el('div', undefined, 'disk-commands');
129
+ const action = el('div');
97
130
  const chart = el('section', undefined, 'disk-chart');
98
131
  chart.setAttribute('aria-label', 'Where the space goes');
99
132
  const tip = el('div', undefined, 'disk-tip'); tip.hidden = true; tip.setAttribute('role', 'tooltip');
100
133
  const tableHost = el('div', undefined, 'wt-table');
101
134
  const extra = el('section', undefined, 'disk-extra');
102
- host.replaceChildren(head, lede, status, chart, cmds, tableHost, extra, tip);
135
+ host.replaceChildren(head, lede, status, chart, cmds, action, tableHost, extra, tip);
103
136
 
104
137
  // one tooltip for every segment: what it is, its size and its share, beside the pointer or the focused segment
105
138
  function showTip(seg, x, y) {
@@ -164,17 +197,58 @@
164
197
  });
165
198
  return b;
166
199
  }
167
- function commandBox(c) {
200
+ function commandBox(c, key) {
168
201
  const box = el('div', undefined, 'wt-cmd');
169
202
  const code = el('code', c.command, 'mono'); code.tabIndex = 0; code.title = c.label;
170
203
  box.append(code, copyButton(c.command));
204
+ const kind = compactKind(c && c.command);
205
+ if (s.writes && kind === 'all') box.append(compactButton('Compact all', { all: true }));
206
+ else if (s.writes && kind === 'run' && key) box.append(compactButton('Compact', { run: key }));
171
207
  return box;
172
208
  }
209
+ function compactButton(text, target) {
210
+ const b = el('button', text, 'wt-copy ui-danger'); b.type = 'button';
211
+ b.addEventListener('click', () => { runCompact(target); });
212
+ return b;
213
+ }
214
+ function refusedActive(res) { return !!(res && res.status === 409 && res.error !== 'busy'); }
215
+ async function runCompact(target) {
216
+ if (s.compacting) return;
217
+ s.compacting = true;
218
+ for (const child of [...action.children]) child.remove();
219
+ const path = '/api/storage/compact';
220
+ const base = compactBody(target);
221
+ try {
222
+ const preview = await UI.post(path, { ...base, dry_run: true });
223
+ if (!action.isConnected) return;
224
+ if (refusedActive(preview)) {
225
+ UI.outcome(action, { ok: false, status: 409, error: preview.error || 'refused', detail: ACTIVE_RUN });
226
+ return;
227
+ }
228
+ if (!preview || !preview.ok || (preview.data && preview.data.ok === false)) {
229
+ UI.outcome(action, preview && preview.ok ? { ok: false, status: preview.status || 500, error: 'failed', detail: 'Could not preview what compact would free' } : preview);
230
+ return;
231
+ }
232
+ const yes = await UI.confirmInline(action, compactSummary(preview), { danger: true });
233
+ if (!action.isConnected || !yes) return;
234
+ const res = await UI.post(path, { ...base, dry_run: false });
235
+ if (!action.isConnected) return;
236
+ if (refusedActive(res)) {
237
+ UI.outcome(action, { ok: false, status: 409, error: res.error || 'refused', detail: ACTIVE_RUN });
238
+ return;
239
+ }
240
+ if (!res || !res.ok) { UI.outcome(action, res); return; }
241
+ UI.outcome(action, res, compactSummary(res));
242
+ await load(true);
243
+ } finally {
244
+ s.compacting = false;
245
+ }
246
+ }
173
247
  const when = t => Number.isFinite(t) ? new Date(t * 1000).toLocaleString() : '—';
174
248
  const bytesCell = n => Number.isFinite(n) && n > 0 ? humanBytes(n) : '—';
175
249
  const columns = [
176
250
  { id: 'run', label: 'Run', value: r => r.run_id, cell: r => {
177
- const href = ctx.runHref ? ctx.runHref(r.path) : null;
251
+ const href = r.key && ctx.runHref ? ctx.runHref(r.key) : null;
178
252
  const n = el(href ? 'a' : 'span', r.run_id, 'mono'); if (href) n.href = href; n.title = r.path; return n; } },
179
253
  { id: 'repo', label: 'Repository', value: r => repoName(r.repo), cell: r => { const n = el('span', repoName(r.repo)); if (r.repo) n.title = r.repo; return n; } },
180
254
  { id: 'total', label: 'Total', value: r => r.total, cell: r => humanBytes(r.total) },
@@ -182,7 +256,7 @@
182
256
  { id: 'logs', label: 'Logs', value: r => r.logs + r.gz, cell: r => bytesCell(r.logs + r.gz) },
183
257
  { id: 'strays', label: "Not forge's", title: 'a dependency install or a .git found inside the run dir: forge never removes these', value: r => r.strays, cell: r => bytesCell(r.strays) },
184
258
  { id: 'reclaimable', label: 'Can go', title: 'what forge runs compact --logs would take back (logs estimated)', value: r => r.reclaimable, cell: r => bytesCell(r.reclaimable) },
185
- { id: 'command', label: 'Command', sortable: false, cls: 'wt-command-col', cell: r => { const box = el('div', undefined, 'wt-cmds'); for (const c of list(r.commands)) box.append(commandBox(c)); return box; } },
259
+ { id: 'command', label: 'Command', sortable: false, cls: 'wt-command-col', cell: r => { const box = el('div', undefined, 'wt-cmds'); for (const c of list(r.commands)) box.append(commandBox(c, r.key)); return box; } },
186
260
  { id: 'updated', label: 'Changed', value: r => r.updated, cell: r => when(r.updated) },
187
261
  { id: 'path', label: 'Path', value: r => r.path, cell: r => el('span', r.path, 'mono'), hidden: true },
188
262
  ];
@@ -219,6 +293,7 @@
219
293
  extra.replaceChildren(...out);
220
294
  }
221
295
  function drawNow() {
296
+ lede.textContent = s.writes ? LEDE_ON : LEDE_OFF;
222
297
  const a = s.answer, d = a && a.data;
223
298
  if (s.error) status.replaceChildren(el('span', `Could not read the disk report (${s.error}).`, 'warn'));
224
299
  else if (!a) status.replaceChildren(el('span', 'Asking…', 'muted'));
@@ -249,6 +324,12 @@
249
324
  }
250
325
  // A redraw never pulls a command out from under someone selecting or copying it (#115).
251
326
  const draw = () => { if (UI.guard) UI.guard(host, drawNow); else drawNow(); };
327
+ UI.controlsEnabled().then(on => {
328
+ const next = !!on;
329
+ if (s.writes === next) return;
330
+ s.writes = next;
331
+ draw();
332
+ });
252
333
 
253
334
  async function load(refresh) {
254
335
  const mine = ++s.seq;
@@ -267,5 +348,5 @@
267
348
  return { reload: () => load(true) };
268
349
  }
269
350
 
270
- return { render, humanBytes, summary, homeParts, repoName, HOME_LABEL, PARTS, breakdown, byRepo, pct };
351
+ return { render, humanBytes, summary, homeParts, repoName, HOME_LABEL, PARTS, breakdown, byRepo, pct, compactBody, compactSummary };
271
352
  });
@@ -101,15 +101,16 @@
101
101
 
102
102
  /* status: the lamp behind each forge state. One meaning each (--st; --st-lit on the 3D plate): four lamps, and the
103
103
  waiting lamp for a task that waits for the user (NEEDS_INPUT, NEEDS_DECISION, and an integration that only waits for the user).
104
+ IMPLEMENTED waits for its group's review and uses that same waiting lamp.
104
105
  A hollow lamp is that lamp's family but not its plain case: passed without a merge, stopped, failed outside the code,
105
106
  an outdated review, waiting for you */
106
107
  .st-merged, .st-pass, .st-accepted, .st-nochanges { --st: var(--lamp-green); --st-lit: var(--lit-green); }
107
108
  .st-running, .st-interrupted { --st: var(--lamp-amber); --st-lit: var(--lit-amber); }
108
109
  .st-pending, .st-none, .st-unknown, .st-invalidated, .st-outdated { --st: var(--lamp-off); --st-lit: var(--lamp-off); }
109
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); }
110
- .st-needs_input, .st-needs_decision, .st-waiting { --st: var(--lamp-wait); --st-lit: var(--lit-wait); }
111
+ .st-needs_input, .st-needs_decision, .st-waiting, .st-implemented { --st: var(--lamp-wait); --st-lit: var(--lit-wait); }
111
112
  [class^="st-"], [class*=" st-"] { --st-fill: var(--st); --st-ring: var(--lamp-edge); }
112
- .st-accepted, .st-nochanges, .st-interrupted, .st-infra, .st-timeout, .st-blocked, .st-outdated, .st-needs_input, .st-needs_decision, .st-waiting { --st-fill: transparent; --st-ring: var(--st); }
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
114
  /* verification lanes: flaky passed on a rerun (amber, hollow), known passed with only baseline failures (green, hollow) */
114
115
  .st-flaky { --st: var(--lamp-amber); --st-lit: var(--lit-amber); --st-fill: transparent; --st-ring: var(--st); }
115
116
  .st-known { --st: var(--lamp-green); --st-lit: var(--lit-green); --st-fill: transparent; --st-ring: var(--st); }
@@ -172,6 +173,11 @@ a.chip, a.chip:hover { color: inherit; text-decoration: none; }
172
173
  .sev-chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: var(--t-xs); white-space: nowrap; }
173
174
  .sev-chip::before { content: ''; width: 9px; height: 9px; clip-path: var(--sev-shape, circle(30%)); background: var(--sev, var(--muted)); flex: none; }
174
175
  .chip.sev-chip { font-family: var(--mono); font-weight: 600; letter-spacing: 0; text-transform: none; font-size: var(--t-xs); }
176
+ /* IMPLEMENTED's label is a phrase, so it keeps the waiting lamp and drops the status-word capitals */
177
+ .chip.st-implemented { text-transform: none; letter-spacing: 0; font-family: var(--font-ui); font-weight: 650; font-size: var(--t-xs); }
178
+ a.group-chip { display: inline-flex; align-items: center; padding: 0 6px; border: 1px solid var(--rule); border-radius: var(--r-small); background: var(--key); color: var(--ink);
179
+ font-family: var(--mono); font-weight: 600; font-size: var(--t-xs); letter-spacing: 0; text-transform: none; text-decoration: none; white-space: nowrap; }
180
+ a.group-chip:hover { text-decoration: underline; text-underline-offset: 2px; }
175
181
  /* a model's name plate: the alias engraved, its effort beside it; the one way a model is shown */
176
182
  .model-plate { display: inline-flex; align-items: stretch; vertical-align: middle; border: 1px solid var(--rule-2); border-radius: var(--r-small); overflow: hidden; white-space: nowrap; line-height: 1.55; }
177
183
  .model-plate .mp-name { padding: 0 6px; background: var(--module-2); color: var(--ink); font-family: var(--font-plate); font-weight: 700; font-size: .857rem; letter-spacing: .06em; text-transform: uppercase; transition: background-color var(--relay); }
@@ -344,16 +350,25 @@ body.no-tasks .tasks-module { display: none; }
344
350
  body[data-shell=workbench].no-tasks .run-view { grid-template-rows: auto minmax(0, 1fr) auto 0; }
345
351
  body[data-shell=immersive] .sidebar { position: absolute; z-index: 4; left: var(--gap); top: var(--gap); bottom: var(--gap); width: var(--runs-w); box-shadow: var(--ply-1); }
346
352
  body[data-shell=immersive][data-runs=closed] .sidebar { display: none; }
347
- body[data-shell=immersive]:is([data-view=models], [data-view=findings], [data-view=settings], [data-view=worktrees], [data-view=disk], [data-view=projects], [data-view=waiting], [data-view=loading], [data-view=first-run]) #main { left: calc(var(--L) - var(--gap)); }
353
+ body[data-shell=immersive]:is([data-view=models], [data-view=findings], [data-view=settings], [data-view=worktrees], [data-view=disk], [data-view=projects], [data-view=waiting], [data-view=loading], [data-view=first-run], [data-view=group]) #main { left: calc(var(--L) - var(--gap)); }
348
354
  body[data-shell=immersive] .stage-row, body[data-shell=immersive] .stage-col { position: absolute; inset: 0; }
349
355
  body[data-shell=immersive] .stage-col .stage-slot { position: absolute; inset: 0; }
350
356
  body[data-shell=immersive] .insp-module { position: absolute; z-index: 3; right: var(--gap); top: var(--gap); bottom: var(--gap); width: var(--insp-w); box-shadow: var(--ply-1); }
351
357
  body[data-shell=immersive][data-insp=closed] .insp-module { display: none; }
352
358
  body[data-shell=immersive] .run-header { position: absolute; z-index: 3; left: var(--L); top: var(--gap); width: min(1040px, calc(100% - var(--L) - var(--R))); box-shadow: var(--ply-1); }
353
359
  body[data-shell=immersive] .tasks-module { position: absolute; z-index: 3; left: var(--L); right: var(--R); bottom: var(--gap); height: var(--tasks-h); box-shadow: var(--ply-1); }
360
+ body[data-shell=immersive] .groups-module:not([hidden]) { position: absolute; z-index: 3; left: var(--L); right: var(--R); bottom: var(--B); max-height: min(32vh, 240px); box-shadow: var(--ply-1); }
354
361
  body[data-shell=immersive][data-tasks=closed] .tasks-module { height: auto; }
355
362
  body[data-shell=immersive] .strip-wrap { position: absolute; z-index: 2; left: var(--L); right: var(--R); bottom: var(--B); }
356
363
  body[data-shell=immersive] .stage-col .graph, body[data-shell=immersive] .stage-col .files-view { position: absolute; inset: 0; overflow: auto; padding: calc(var(--head-h, 132px) + 2 * var(--gap)) var(--R) calc(var(--B) + var(--gap)) var(--L); }
364
+ /* --groups-h is the groups block's used height, published from its border box. The strip, the stage
365
+ note and the 2D stage padding sit one gap above that block. Below 761px the modules stack in flow. */
366
+ @media (min-width: 761px) {
367
+ body[data-shell=immersive] .run-view.has-groups .strip-wrap { bottom: calc(var(--B) + var(--groups-h, 0px) + var(--gap)); }
368
+ body[data-shell=immersive] .run-view.has-groups .stage-col .graph,
369
+ body[data-shell=immersive] .run-view.has-groups .stage-col .files-view { padding-bottom: calc(var(--B) + var(--groups-h, 0px) + 2 * var(--gap)); }
370
+ body[data-shell=immersive] .run-view.has-groups .stage-note { bottom: calc(var(--B) + var(--groups-h, 0px) + var(--gap) + 60px); }
371
+ }
357
372
  body[data-shell=immersive] .diff-view { position: absolute; z-index: 3; left: var(--L); right: var(--gap); top: var(--gap); bottom: var(--B); overflow: auto; padding: var(--s-4); box-shadow: var(--ply-1); }
358
373
  body[data-shell=immersive] .run-view.diff-open .run-header { display: none; }
359
374
  body[data-shell=immersive] .map-head-module { position: absolute; z-index: 3; left: var(--L); top: var(--gap); width: max-content; max-width: calc(100% - var(--L) - var(--gap)); box-shadow: var(--ply-1); }
@@ -388,6 +403,12 @@ body[data-shell=workbench] .insp-module .splitter.v { left: -5px; }
388
403
  body[data-shell=workbench] .run-header { grid-area: head; border-radius: 0; border-width: 0 0 1px; }
389
404
  body[data-shell=workbench] .strip-wrap { grid-area: strip; padding: var(--s-2) var(--s-3) 0; }
390
405
  body[data-shell=workbench] .tasks-module { grid-area: tasks; position: relative; border-radius: 0; border-width: 1px 0 0; }
406
+ body[data-shell=workbench] .run-view.has-groups { grid-template-rows: auto minmax(0, 1fr) auto auto var(--tasks-h);
407
+ grid-template-areas: "head insp" "stage insp" "strip insp" "groups insp" "tasks insp"; }
408
+ body[data-shell=workbench][data-tasks=closed] .run-view.has-groups { grid-template-rows: auto minmax(0, 1fr) auto auto auto; }
409
+ body[data-shell=workbench] .groups-module { grid-area: groups; position: relative; border-radius: 0; border-width: 1px 0 0; max-height: min(32vh, 240px); }
410
+ body[data-shell=workbench] .run-view.diff-open.has-groups .diff-view { grid-area: 2 / 1 / 6 / 3; }
411
+ body[data-shell] .run-view.diff-open .groups-module { display: none; }
391
412
  body[data-shell=workbench] .tasks-module .splitter.h { top: -5px; }
392
413
  body[data-shell=workbench] .run-view.diff-open .diff-view { grid-area: 2 / 1 / 5 / 3; overflow: auto; padding: var(--s-4); border-radius: 0; border-width: 0; }
393
414
  body[data-shell=workbench] .map-view { display: grid; grid-template-rows: auto minmax(0, 1fr); }
@@ -399,7 +420,7 @@ body[data-shell=workbench] .map-cards-host { overflow: auto; }
399
420
  body[data-shell=workbench] .map-cards { padding: var(--s-4); }
400
421
 
401
422
  /* content views: the leaderboard and the waiting pages */
402
- body:is([data-view=models], [data-view=findings], [data-view=settings], [data-view=worktrees], [data-view=disk], [data-view=projects], [data-view=waiting], [data-view=loading], [data-view=first-run]) #main { padding: var(--s-6) var(--s-6) var(--s-8); }
423
+ body:is([data-view=models], [data-view=findings], [data-view=settings], [data-view=worktrees], [data-view=disk], [data-view=projects], [data-view=waiting], [data-view=loading], [data-view=first-run], [data-view=group]) #main { padding: var(--s-6) var(--s-6) var(--s-8); }
403
424
 
404
425
  /* ---------- the stage: the panel the run is inlaid on ---------- */
405
426
  .stage-slot { position: relative; background: var(--stage-bg); }
@@ -834,6 +855,26 @@ a.brief-open:hover { text-decoration: none; background: var(--module-2); }
834
855
  .brief-q .brief-notice { margin: 0; }
835
856
  .brief-parked { margin-top: var(--s-2); }
836
857
  .brief-parked > .brief-questions { margin-top: var(--s-2); }
858
+ /* Grouped questions, proposals and affected badges (#136). The questions strip stays short until a
859
+ proposal is open; then it shares the tasks module with the table, which keeps a minimum of its own. */
860
+ .brief-group { display: grid; gap: 2px; margin: var(--s-2) 10px 0; }
861
+ .brief-group-title { margin: 0; font-size: var(--t-sm); }
862
+ .brief-goal { margin: 0; color: var(--muted); font-size: var(--t-xs); overflow-wrap: anywhere; }
863
+ .brief-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
864
+ .brief-actions input { flex: 1 1 12rem; min-width: 8rem; min-height: 28px; padding: 4px 8px; }
865
+ .brief-proposals { display: grid; gap: var(--s-2); align-content: start; padding: 6px 10px 10px; overflow: auto; min-height: 0; flex: 1 1 auto; }
866
+ .brief-proposal { display: grid; gap: 4px; padding: var(--s-2) 10px; border: 1px solid var(--rule); border-radius: var(--r-key); background: var(--module-2); }
867
+ .brief-proposal-top { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
868
+ .brief-summary, .brief-reason { margin: 0; overflow-wrap: anywhere; }
869
+ .brief-reason { color: var(--warn-ink); }
870
+ .brief-hash { font-size: var(--t-xs); overflow-wrap: anywhere; }
871
+ .brief-proposal .brief-notice { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
872
+ .brief-patch .diff-scroll, pre.brief-diff { max-height: 8rem; overflow: auto; }
873
+ pre.brief-diff { margin: 0; white-space: pre; }
874
+ .brief-proposal[aria-busy=true] { opacity: .7; }
875
+ .brief-affected-row { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
876
+ .run-questions[data-proposals] { flex: 1 1 auto; max-height: none; }
877
+ .tasks-module:has(.run-questions[data-proposals]:not([hidden])) .run-tasks { min-height: 5.5rem; }
837
878
 
838
879
  /* ---------- tables ---------- */
839
880
  .table-scroll { overflow: auto; max-width: 100%; border: 1px solid var(--rule); border-radius: var(--r-key); background: var(--module); }
@@ -1301,7 +1342,12 @@ dialog.export-dialog h2 { margin-bottom: var(--s-2); }
1301
1342
  body[data-shell] .stage-col .stage-slot, body[data-shell] .map-view .stage-slot { position: relative; inset: auto; height: clamp(300px, 105vw, 62vh); border-radius: var(--r-module); overflow: hidden; }
1302
1343
  body[data-shell] .run-view .stage-col .stage-slot { height: clamp(240px, 72vw, 62vh); } /* a run's plate is wide: no empty bands above and below it */
1303
1344
  body[data-shell] .stage-col .graph, body[data-shell] .stage-col .files-view, body[data-shell] .map-cards { position: static; padding: 0; overflow: auto; }
1304
- body[data-shell] :is(.run-header, .insp-module, .tasks-module, .diff-view, .map-head-module, .strip-wrap) { position: static; width: auto; max-width: none; height: auto; margin: 0; box-shadow: none; border-radius: var(--r-module); border-width: 1px; }
1345
+ body[data-shell] :is(.run-header, .insp-module, .tasks-module, .groups-module, .diff-view, .map-head-module, .strip-wrap) { position: static; width: auto; max-width: none; height: auto; margin: 0; box-shadow: none; border-radius: var(--r-module); border-width: 1px; }
1346
+ body[data-shell=immersive] .groups-module:not([hidden]),
1347
+ body[data-shell=workbench] .groups-module:not([hidden]) { position: static; inset: auto; left: auto; right: auto; bottom: auto; width: auto; max-width: none; height: auto; max-height: 60vh; margin: 0; box-shadow: none; border-radius: var(--r-module); border-width: 1px; }
1348
+ /* the desktop groups row is more specific than the stacked run view; drop it so a phone stays one column */
1349
+ body[data-shell=workbench] .run-view.has-groups,
1350
+ body[data-shell=workbench][data-tasks=closed] .run-view.has-groups { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: none; }
1305
1351
  body[data-shell] .tasks-module .run-tasks { max-height: 60vh; }
1306
1352
  body[data-shell] .stage-note { position: static; }
1307
1353
  .stage-ctl { top: auto; bottom: var(--gap); right: var(--gap); translate: none; grid-auto-flow: column; }
@@ -1450,6 +1496,65 @@ table.wt-grid { width: max-content; min-width: 100%; }
1450
1496
  .prj-findings td.prj-wide { white-space: normal; min-width: 26em; }
1451
1497
  .prj-summary { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-width: 46em; }
1452
1498
  .prj-learning { display: inline-block; max-width: 48em; }
1499
+ .prj-actions { margin-top: var(--s-2); }
1500
+ .prj-actions .fnd-picked { min-width: 8em; font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
1501
+ .prj-findings td:first-child input[type=checkbox] { margin: 0; }
1502
+ .fnd-form { display: grid; gap: var(--s-2); }
1503
+ .fnd-form:empty { display: none; }
1504
+ .fnd-form-title { margin: 0; font-size: var(--t-sm); }
1505
+ .fnd-form-body { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s-2); }
1506
+ .fnd-form-body textarea { min-width: 26em; font: inherit; }
1507
+ .fnd-form-msg { margin: 0; font-size: var(--t-sm); }
1508
+ .fnd-form-msg:empty { display: none; }
1509
+ .fnd-confirm:empty, .fnd-result:empty { display: none; }
1510
+ .fnd-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
1511
+ .fnd-tag { padding: 0 6px; border: 1px solid var(--rule); border-radius: var(--r-small); background: var(--key); color: var(--ink); font-size: var(--t-xs); }
1512
+ .fnd-tag-derived { color: var(--muted); border-style: dashed; background: transparent; }
1513
+ .fnd-rowbtn { padding: 0 6px; min-height: 22px; font-size: var(--t-xs); }
1514
+ .fnd-rec { margin: var(--s-2) 0 0; font-size: var(--t-xs); overflow-wrap: anywhere; }
1515
+ .fnd-cmds { display: grid; gap: 4px; margin-top: var(--s-2); }
1516
+ .fnd-cmds p { margin: 0; font-size: var(--t-xs); }
1517
+ .fnd-cmd { display: flex; align-items: center; gap: var(--s-2); }
1518
+ .fnd-cmd code { flex: 1 1 auto; min-width: 0; padding: 2px 6px; border: 1px solid var(--rule); border-radius: var(--r-small); font-size: var(--t-xs); white-space: pre-wrap; overflow-wrap: anywhere; }
1519
+ .fnd-copy { min-height: 22px; padding: 0 8px; font-size: var(--t-xs); }
1520
+
1521
+ /* ---------- triage panel on the Findings tab (#161) ---------- */
1522
+ .triage { border: 1px solid var(--rule); border-radius: var(--r-key); background: var(--module-2); }
1523
+ .triage-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2); padding: var(--s-2) 10px; cursor: pointer; }
1524
+ .triage-title:focus-visible { outline: 2px solid var(--route); outline-offset: 2px; }
1525
+ .triage-badge { font-size: var(--t-xs); color: var(--muted); }
1526
+ .triage-badge-running { color: var(--warn-ink); font-weight: 600; }
1527
+ .triage-badge-failed { color: var(--lamp-red); font-weight: 600; }
1528
+ .triage-body { display: grid; gap: var(--s-2); padding: 0 10px 10px; }
1529
+ .triage-start { display: grid; gap: var(--s-2); }
1530
+ .triage-form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
1531
+ .triage-form input[data-field=spec] { min-width: 14rem; }
1532
+ .triage-form input[data-field=max] { width: 6rem; }
1533
+ .triage-check { margin: 0; font-size: var(--t-sm); overflow-wrap: anywhere; }
1534
+ .triage-check:empty, .triage-confirm:empty, .triage-msgs:empty { display: none; }
1535
+ .triage-cmds { display: grid; gap: 4px; }
1536
+ .triage-cmds p { margin: 0; font-size: var(--t-xs); }
1537
+ .triage-view { display: grid; gap: var(--s-2); }
1538
+ .triage-state-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; }
1539
+ .triage-state-name { font-weight: 600; }
1540
+ .triage-reason { margin: 0; overflow-wrap: anywhere; }
1541
+ .triage-group { display: grid; gap: var(--s-2); align-content: start; }
1542
+ .triage-card { display: grid; gap: 4px; padding: var(--s-2) 10px; border: 1px solid var(--rule); border-radius: var(--r-key); background: var(--module); }
1543
+ .triage-card[aria-busy=true] { opacity: .7; }
1544
+ .triage-card-top { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
1545
+ .triage-state-applied { color: var(--lamp-green, var(--ink)); }
1546
+ .triage-state-rejected { color: var(--muted); }
1547
+ .triage-summary, .triage-why, .triage-title-line, .triage-decided { margin: 0; overflow-wrap: anywhere; }
1548
+ .triage-title-line { font-weight: 600; }
1549
+ .triage-fps, .triage-tasks { margin: 0; padding-left: 1.2em; display: grid; gap: 2px; font-size: var(--t-sm); }
1550
+ .triage-fp-id { font-size: var(--t-xs); }
1551
+ button.triage-fp-id { min-height: 20px; padding: 0 6px; }
1552
+ .triage-fp-text { overflow-wrap: anywhere; }
1553
+ .triage-hash { font-size: var(--t-xs); overflow-wrap: anywhere; }
1554
+ .triage-details summary { cursor: pointer; font-size: var(--t-sm); }
1555
+ .triage-pre { margin: 4px 0 0; max-height: 12rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--t-xs); }
1556
+ .triage-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
1557
+ .triage-actions input { flex: 1 1 12rem; min-width: 8rem; min-height: 28px; padding: 4px 8px; }
1453
1558
  .prj-where a, .project-link { white-space: nowrap; }
1454
1559
  .prj-tabs a:focus-visible, .prj-links a:focus-visible, .project-link:focus-visible { outline: 2px solid var(--route); outline-offset: 2px; }
1455
1560
 
@@ -1627,3 +1732,31 @@ dialog.set-guide::backdrop { background: light-dark(rgb(17 22 19 / .35), rgb(0 0
1627
1732
  /* A held redraw that has lasted (#115) */
1628
1733
  .live-held { position: fixed; right: var(--s-4); bottom: var(--s-4); z-index: 30; display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3); border: 1px solid var(--rule); border-radius: var(--r-key); background: var(--module); color: var(--ink); box-shadow: var(--ply-2); font-size: var(--t-sm); }
1629
1734
  .live-held[hidden] { display: none; }
1735
+
1736
+ /* ---------- groups: the run's groups block, and #/runs/<key>/group/<gid> ---------- */
1737
+ .groups-module { overflow: auto; }
1738
+ .groups-module[hidden] { display: none; }
1739
+ .groups-block { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
1740
+ .group-rows { min-height: 0; }
1741
+ .group-row { display: grid; gap: 2px 12px; padding: 8px 10px; border-bottom: 1px solid var(--rule); }
1742
+ .group-row:last-child { border-bottom: 0; }
1743
+ .group-title { font-weight: 650; overflow-wrap: anywhere; }
1744
+ a.group-title { text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 3px; }
1745
+ .group-goal { margin: 0; color: var(--muted); font-size: var(--t-sm); }
1746
+ .group-meta, .group-members, .group-state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); font-size: var(--t-sm); }
1747
+ .group-state { margin: 0; }
1748
+ .group-round, .group-round-members { font-family: var(--mono); font-size: var(--t-xs); }
1749
+ .group-view { max-width: 1100px; }
1750
+ .group-page { display: grid; gap: var(--s-5); }
1751
+ .group-head { display: grid; gap: var(--s-2); }
1752
+ .group-head h1, .group-section h2, .group-round-row h3 { margin: 0; }
1753
+ .group-section { display: grid; gap: var(--s-2); }
1754
+ .group-findings { width: 100%; border-collapse: collapse; }
1755
+ .group-findings th, .group-findings td { text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--rule); vertical-align: baseline; font-size: var(--t-sm); overflow-wrap: anywhere; }
1756
+ .group-findings th { font-family: var(--font-plate); font-size: .786rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
1757
+ .group-ambiguous { background: var(--warn-wash); }
1758
+ .group-blocking { color: var(--lamp-red); font-weight: 700; }
1759
+ .group-cmd { margin: 0; }
1760
+ .group-round-row { display: grid; gap: 2px; padding-bottom: var(--s-2); border-bottom: 1px solid var(--rule); }
1761
+ .group-round-row:last-child { border-bottom: 0; padding-bottom: 0; }
1762
+ .group-members .chip { text-decoration: none; }