@event4u/agent-config 9.29.0 → 9.30.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 (122) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +108 -7
  3. package/README.md +1 -0
  4. package/dist/agent-src/commands/analyze/inbox.md +22 -1
  5. package/dist/agent-src/commands/explain-run.md +31 -1
  6. package/dist/agent-src/commands/team/delegate.md +1 -0
  7. package/dist/agent-src/contexts/execution/orchestration-telemetry.md +4 -1
  8. package/dist/agent-src/contexts/execution/roadmap-process-loop.md +17 -0
  9. package/dist/agent-src/contexts/execution/subagent-response-contract.md +11 -1
  10. package/dist/agent-src/rules/preservation-guard.md +9 -0
  11. package/dist/agent-src/scripts/roadmap_gates.ts +312 -0
  12. package/dist/agent-src/scripts/update_roadmap_progress.ts +72 -4
  13. package/dist/agent-src/skills/subagent-orchestration/SKILL.md +10 -0
  14. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  15. package/dist/cli/registry.js +2 -0
  16. package/dist/cli/registry.js.map +1 -1
  17. package/dist/cli-delegate/{chunk-OJM3MBJM.js → chunk-BTJNRUX3.js} +21 -34
  18. package/dist/cli-delegate/{chunk-MMXA5GY7.js → chunk-DDUNNFYX.js} +14 -0
  19. package/dist/cli-delegate/{chunk-NZ5N2XQL.js → chunk-EQY4FLJB.js} +1 -1
  20. package/dist/cli-delegate/{chunk-RCIA67XN.js → chunk-IYTGIG2Y.js} +44 -1
  21. package/dist/cli-delegate/chunk-MMJL4TIX.js +18 -0
  22. package/dist/cli-delegate/chunk-O3CO5BFB.js +161 -0
  23. package/dist/cli-delegate/{chunk-REKCMYOU.js → chunk-PFBV6XRT.js} +36 -20
  24. package/dist/cli-delegate/chunk-RVGBH4XK.js +142 -0
  25. package/dist/cli-delegate/cmd_conformance.js +2798 -95
  26. package/dist/cli-delegate/cmd_doctor.js +2 -1
  27. package/dist/cli-delegate/cmd_export.js +2 -2
  28. package/dist/cli-delegate/cmd_handoff.js +86 -6
  29. package/dist/cli-delegate/cmd_prune.js +2 -2
  30. package/dist/cli-delegate/cmd_route_audit.js +2 -1
  31. package/dist/cli-delegate/cmd_session_recycle.js +177 -0
  32. package/dist/cli-delegate/cmd_settings_get.js +1 -1
  33. package/dist/cli-delegate/cmd_settings_migrate.js +2 -2
  34. package/dist/cli-delegate/cmd_settings_set.js +2 -2
  35. package/dist/cli-delegate/cmd_sync.js +2 -2
  36. package/dist/cli-delegate/cmd_uninstall.js +2 -2
  37. package/dist/cli-delegate/cmd_validate.js +2 -2
  38. package/dist/discovery/deprecation-report.md +1 -1
  39. package/dist/discovery/discovery-manifest.json +7 -7
  40. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  41. package/dist/discovery/discovery-manifest.summary.md +1 -1
  42. package/dist/discovery/orphan-report.md +1 -1
  43. package/dist/discovery/packs.json +2 -2
  44. package/dist/discovery/trust-report.md +1 -1
  45. package/dist/discovery/workspaces.json +2 -2
  46. package/dist/hooks/dispatch.js +1904 -575
  47. package/dist/install/install.mjs +14 -0
  48. package/dist/mcp/registry-manifest.json +2 -2
  49. package/dist/mcp/server.json +2 -2
  50. package/dist/mcp/server.mjs +3760 -726
  51. package/dist/server/schemas/settings.js +6 -0
  52. package/dist/server/schemas/settings.js.map +1 -1
  53. package/dist/ui/assets/index-B5qGYOJo.js +26 -0
  54. package/dist/ui/assets/index-B5qGYOJo.js.map +1 -0
  55. package/dist/ui/index.html +1 -1
  56. package/docs/contracts/settings-classes.md +21 -5
  57. package/package.json +1 -1
  58. package/src/agent-src/scripts/roadmap_gates.ts +312 -0
  59. package/src/agent-src/scripts/update_roadmap_progress.ts +72 -4
  60. package/src/config/agent-settings.template.yml +36 -0
  61. package/src/config/dispatch-economy-metrics.json +61 -0
  62. package/src/config/evaluator-budgets.json +4 -4
  63. package/src/config/hook-token-budget.json +91 -0
  64. package/src/config/recycle-threshold-budget.json +12 -0
  65. package/src/config/rule-enforcement-baseline.json +86 -0
  66. package/src/scripts/_cli/cmd_conformance.ts +17 -2
  67. package/src/scripts/_cli/cmd_session_recycle.ts +226 -0
  68. package/src/scripts/_dispatch.bash +23 -0
  69. package/src/scripts/_lib/judgment_ladder.ts +254 -2
  70. package/src/scripts/_lib/orchestration_record.ts +41 -10
  71. package/src/scripts/_lib/recycle_envelope_paths.ts +35 -0
  72. package/src/scripts/_lib/self_repair.ts +194 -0
  73. package/src/scripts/_lib/session_eol.ts +230 -0
  74. package/src/scripts/_lib/session_role.ts +42 -0
  75. package/src/scripts/_lib/subagent_capsule.ts +159 -0
  76. package/src/scripts/_lib/subagent_response.ts +75 -0
  77. package/src/scripts/ai_council/clients.ts +50 -1
  78. package/src/scripts/ask_transport.ts +221 -0
  79. package/src/scripts/bench_hook_injection.ts +234 -0
  80. package/src/scripts/check_adr_frontmatter.ts +84 -40
  81. package/src/scripts/check_branch_freshness.ts +1 -0
  82. package/src/scripts/check_corpus_staleness.ts +18 -4
  83. package/src/scripts/check_detector_corpus.ts +17 -0
  84. package/src/scripts/check_gitignore_freshness.ts +42 -8
  85. package/src/scripts/check_hook_bundle_freshness.ts +20 -0
  86. package/src/scripts/check_kernel_prefix_stability.ts +1 -0
  87. package/src/scripts/check_standing_rule_delivery.ts +73 -32
  88. package/src/scripts/check_static_layer_stability.ts +154 -0
  89. package/src/scripts/check_suppression_hygiene.ts +48 -0
  90. package/src/scripts/dispatch_economy_report.ts +448 -0
  91. package/src/scripts/dispatch_r2_reviewer.ts +15 -2
  92. package/src/scripts/explain_run.ts +206 -4
  93. package/src/scripts/generate_settings_reference.ts +1 -0
  94. package/src/scripts/handoff_context_hook.ts +112 -4
  95. package/src/scripts/hook_manifest.yaml +117 -10
  96. package/src/scripts/hooks/concern_registry.ts +8 -0
  97. package/src/scripts/hooks/delegation_nudge_hook.ts +40 -3
  98. package/src/scripts/hooks/dispatch_hook.ts +39 -2
  99. package/src/scripts/hooks/edit_shape_hook.ts +303 -0
  100. package/src/scripts/hooks/orchestration_record_hook.ts +19 -1
  101. package/src/scripts/hooks/reread_guard_hook.ts +314 -0
  102. package/src/scripts/hooks/rtk_wrap_hook.ts +133 -14
  103. package/src/scripts/hooks/session_eol_hook.ts +268 -0
  104. package/src/scripts/hooks/turn_end_gate_hook.ts +507 -0
  105. package/src/scripts/install-hooks.sh +1 -1
  106. package/src/scripts/language_mirror_hook.ts +89 -0
  107. package/src/scripts/lint_decision_impact.ts +14 -1
  108. package/src/scripts/lint_hook_manifest.ts +82 -0
  109. package/src/scripts/lint_readme_serial_comma.ts +1 -0
  110. package/src/scripts/lint_rule_enforcement_declaration.ts +347 -0
  111. package/src/scripts/measure_turn_end_gate.ts +194 -0
  112. package/src/scripts/orchestration_record.ts +4 -1
  113. package/src/scripts/rebuild_hook_bundle.ts +1 -0
  114. package/src/scripts/report_conformance_funnel.ts +284 -0
  115. package/src/scripts/report_imperative_density.ts +1 -0
  116. package/src/scripts/routing_doctor.ts +97 -0
  117. package/src/scripts/self_repair_cli.ts +51 -3
  118. package/src/scripts/session_eol_report.ts +261 -0
  119. package/src/server/schemas/settings.ts +14 -0
  120. package/src/templates/compact-instructions.md +40 -0
  121. package/dist/ui/assets/index-JDAF00bC.js +0 -26
  122. package/dist/ui/assets/index-JDAF00bC.js.map +0 -1
@@ -0,0 +1,312 @@
1
+ #!/usr/bin/env tsx
2
+ /**
3
+ * `agent-config gates` — the open decisions that need the user, as actions.
4
+ *
5
+ * The dashboard (`update_roadmap_progress`) already parses every `## Blockers`
6
+ * entry and already counts them per roadmap. What it does not do is separate
7
+ * the blockers the *user* must resolve from the ones the maintainer or an
8
+ * external party owns: the count links into a per-roadmap breakdown, so
9
+ * answering "what do I have to do" means opening every anchor and filtering
10
+ * `Owner:` by hand across the whole file. The fields exist, are CI-enforced by
11
+ * `lint_roadmap_blockers`, and never reach the user in a form they can act on.
12
+ *
13
+ * This command is that missing projection, and nothing more: same parser
14
+ * (`parse_blockers` / `collect`, imported — never re-implemented), filtered by
15
+ * owner, ordered by how much each blocker unblocks, rendered action-first.
16
+ *
17
+ * Deliberately NOT a gate: it exits 0 whether or not decisions are pending.
18
+ * Blocking a pipeline on "the user has an open decision" would turn a
19
+ * visibility aid into a second thing to fight.
20
+ *
21
+ * Invocation (from project root):
22
+ * ./agent-config gates # decisions owned by the user
23
+ * ./agent-config gates --all # every open blocker, grouped by owner
24
+ * ./agent-config gates --json # machine-readable
25
+ */
26
+
27
+ import * as path from 'node:path';
28
+ import { fileURLToPath, pathToFileURL } from 'node:url';
29
+ import * as fs from 'node:fs';
30
+ import { spawnSync } from 'node:child_process';
31
+
32
+ import {
33
+ collect,
34
+ blocker_needs_user as needsUser,
35
+ type Blocker,
36
+ } from './update_roadmap_progress.js';
37
+
38
+ const _HERE = fileURLToPath(import.meta.url);
39
+
40
+ /** Hard wrap for the rendered body — keeps output readable in a narrow pane. */
41
+ const WIDTH = 78;
42
+
43
+ interface Entry {
44
+ blocker: Blocker;
45
+ roadmapRel: string;
46
+ /** Open steps in the roadmap this blocker sits in — the "unblocks" weight. */
47
+ openSteps: number;
48
+ }
49
+
50
+ /**
51
+ * Rejoin wrapped continuation lines into one step each.
52
+ *
53
+ * `parse_blockers` returns `todo` as raw stripped lines, so a step that wraps
54
+ * over three source lines arrives as three entries. A new step starts at an
55
+ * ordered marker (`1.`, `2)`) or a bullet; everything else continues the one
56
+ * before it.
57
+ */
58
+ function regroupTodo(todo: readonly string[]): string[] {
59
+ const steps: string[] = [];
60
+ for (const line of todo) {
61
+ const startsStep = /^(\d+[.)]|[-*+])\s/.test(line);
62
+ if (startsStep || steps.length === 0) {
63
+ steps.push(line);
64
+ } else {
65
+ steps[steps.length - 1] = `${steps[steps.length - 1] as string} ${line}`;
66
+ }
67
+ }
68
+ return steps;
69
+ }
70
+
71
+ /** Wrap `text` to `width`, indenting every line after the first by `indent`. */
72
+ function wrap(text: string, width: number, indent: string): string[] {
73
+ const words = text.split(/\s+/).filter(Boolean);
74
+ if (words.length === 0) {
75
+ return [];
76
+ }
77
+ const lines: string[] = [];
78
+ let cur = '';
79
+ for (const w of words) {
80
+ const candidate = cur === '' ? w : `${cur} ${w}`;
81
+ if (candidate.length > width && cur !== '') {
82
+ lines.push(cur);
83
+ cur = w;
84
+ } else {
85
+ cur = candidate;
86
+ }
87
+ }
88
+ if (cur !== '') {
89
+ lines.push(cur);
90
+ }
91
+ return lines.map((l, i) => (i === 0 ? l : indent + l));
92
+ }
93
+
94
+ /**
95
+ * Column width for the label gutter — sized to the longest label in use
96
+ * (`Blocked until:`, 14 chars) plus one separating space, so no value ever
97
+ * runs flush against its own label.
98
+ */
99
+ const LABEL_W = 15;
100
+
101
+ /** A labelled block: ` Label: value`, wrapped and hanging-indented. */
102
+ function field(label: string, value: string): string[] {
103
+ const pad = ' ' + label.padEnd(LABEL_W);
104
+ const indent = ' '.repeat(pad.length);
105
+ const lines = wrap(value, WIDTH - pad.length, indent);
106
+ if (lines.length === 0) {
107
+ return [];
108
+ }
109
+ return [pad + lines[0], ...lines.slice(1)];
110
+ }
111
+
112
+ function collectEntries(roadmapRoot: string): Entry[] {
113
+ const entries: Entry[] = [];
114
+ for (const r of collect(roadmapRoot)) {
115
+ for (const b of r.open_blockers) {
116
+ entries.push({ blocker: b, roadmapRel: r.rel, openSteps: r.open_ });
117
+ }
118
+ }
119
+ // Most-unblocking first; ties broken deterministically so two runs on an
120
+ // unchanged tree print byte-identical output.
121
+ entries.sort(
122
+ (a, b) =>
123
+ b.openSteps - a.openSteps ||
124
+ a.roadmapRel.localeCompare(b.roadmapRel) ||
125
+ a.blocker.id.localeCompare(b.blocker.id),
126
+ );
127
+ return entries;
128
+ }
129
+
130
+ /**
131
+ * The parser's legacy fallback synthesises one blocker per `> Blocked until …`
132
+ * note under the fixed id `legacy`. That id is an implementation detail and
133
+ * says nothing to a reader, and its text is a *condition* ("blocked until X"),
134
+ * not an imperative — so both the heading and the field label are renamed for
135
+ * this one parser-defined case rather than dressed up as a step list.
136
+ */
137
+ function isLegacy(b: Blocker): boolean {
138
+ return b.id === 'legacy';
139
+ }
140
+
141
+ function renderEntry(e: Entry, index: number): string[] {
142
+ const head = `${index} · ${isLegacy(e.blocker) ? 'blocked-until note' : e.blocker.id}`;
143
+ const tail =
144
+ e.openSteps > 0 ? `unblocks: ${e.openSteps} step${e.openSteps !== 1 ? 's' : ''}` : '';
145
+ const dashes = Math.max(3, WIDTH - head.length - tail.length - 6);
146
+ const out: string[] = [
147
+ '',
148
+ `── ${head} ${'─'.repeat(dashes)} ${tail}`.trimEnd(),
149
+ ...field('Roadmap:', e.roadmapRel),
150
+ ...field('Blocks:', e.blocker.blocks),
151
+ ];
152
+
153
+ const doLabel = isLegacy(e.blocker) ? 'Blocked until:' : 'Do this:';
154
+ const steps = regroupTodo(e.blocker.todo);
155
+ if (steps.length === 0) {
156
+ out.push(
157
+ ...field(
158
+ doLabel,
159
+ '(no steps recorded — the blocker entry in the roadmap needs a ' +
160
+ '**What to do:** list)',
161
+ ),
162
+ );
163
+ } else {
164
+ out.push(...field(doLabel, steps[0] as string));
165
+ for (const s of steps.slice(1)) {
166
+ // Steps 2..n have no label of their own — align them under the
167
+ // first step's text, i.e. the same gutter `field()` produces.
168
+ const indent = ' '.repeat(LABEL_W + 2);
169
+ const lines = wrap(s, WIDTH - LABEL_W - 2, indent);
170
+ out.push(...lines.map((l, i) => (i === 0 ? indent + l : l)));
171
+ }
172
+ }
173
+ out.push(...field('Done when:', e.blocker.resolvedWhen));
174
+ return out;
175
+ }
176
+
177
+ function render(entries: readonly Entry[], all: boolean): string {
178
+ const mine = entries.filter((e) => needsUser(e.blocker.owner));
179
+ const others = entries.filter((e) => !needsUser(e.blocker.owner));
180
+ const shown = all ? entries : mine;
181
+ const lines: string[] = [];
182
+
183
+ if (mine.length === 0) {
184
+ lines.push(
185
+ others.length === 0
186
+ ? 'No open blockers at all.'
187
+ : `Nothing is waiting on you. ${others.length} open blocker` +
188
+ `${others.length !== 1 ? 's' : ''} sit with maintainer/external` +
189
+ `${all ? '' : ' — see --all'}.`,
190
+ );
191
+ } else {
192
+ const head =
193
+ `${mine.length} decision${mine.length !== 1 ? 's' : ''} need${mine.length === 1 ? 's' : ''} you`;
194
+ const rest =
195
+ others.length > 0
196
+ ? ` · ${others.length} more with maintainer/external${all ? '' : ' (--all)'}`
197
+ : '';
198
+ lines.push(head + rest);
199
+ }
200
+
201
+ let n = 0;
202
+ for (const e of shown) {
203
+ n += 1;
204
+ lines.push(...renderEntry(e, n));
205
+ }
206
+ if (shown.length > 0) {
207
+ lines.push('');
208
+ }
209
+ return lines.join('\n') + '\n';
210
+ }
211
+
212
+ function renderJson(entries: readonly Entry[], all: boolean): string {
213
+ const pick = all ? entries : entries.filter((e) => needsUser(e.blocker.owner));
214
+ return (
215
+ JSON.stringify(
216
+ {
217
+ needsYou: entries.filter((e) => needsUser(e.blocker.owner)).length,
218
+ other: entries.filter((e) => !needsUser(e.blocker.owner)).length,
219
+ blockers: pick.map((e) => ({
220
+ id: e.blocker.id,
221
+ roadmap: e.roadmapRel,
222
+ owner: e.blocker.owner,
223
+ needsYou: needsUser(e.blocker.owner),
224
+ blocks: e.blocker.blocks,
225
+ unblocksSteps: e.openSteps,
226
+ todo: regroupTodo(e.blocker.todo),
227
+ resolvedWhen: e.blocker.resolvedWhen,
228
+ })),
229
+ },
230
+ null,
231
+ 2,
232
+ ) + '\n'
233
+ );
234
+ }
235
+
236
+ function _isDir(p: string): boolean {
237
+ try {
238
+ return fs.statSync(p).isDirectory();
239
+ } catch {
240
+ return false;
241
+ }
242
+ }
243
+
244
+ /**
245
+ * Same repo-root resolution as the dashboard: honour the cwd when it holds
246
+ * `agents/roadmaps`, otherwise fall back to the git toplevel (monorepo
247
+ * sub-project support).
248
+ */
249
+ function _resolveRepoRoot(start: string): string {
250
+ if (_isDir(path.join(start, 'agents', 'roadmaps'))) {
251
+ return start;
252
+ }
253
+ try {
254
+ const r = spawnSync('git', ['rev-parse', '--show-toplevel'], {
255
+ cwd: start,
256
+ encoding: 'utf-8',
257
+ timeout: 10_000,
258
+ });
259
+ const top = (r.stdout || '').trim();
260
+ if (r.status === 0 && top !== '' && _isDir(path.join(top, 'agents', 'roadmaps'))) {
261
+ return top;
262
+ }
263
+ } catch {
264
+ /* not a git repo / git missing — keep the cwd default */
265
+ }
266
+ return start;
267
+ }
268
+
269
+ function main(argv?: readonly string[]): number {
270
+ const args = argv ?? process.argv.slice(2);
271
+ const all = args.includes('--all');
272
+ const json = args.includes('--json');
273
+
274
+ const repoRoot = _resolveRepoRoot(process.cwd());
275
+ const roadmapRoot = path.join(repoRoot, 'agents', 'roadmaps');
276
+ if (!_isDir(roadmapRoot)) {
277
+ process.stdout.write(
278
+ json ? '{"needsYou":0,"other":0,"blockers":[]}\n' : 'No roadmaps directory — nothing to report.\n',
279
+ );
280
+ return 0;
281
+ }
282
+
283
+ const entries = collectEntries(roadmapRoot);
284
+ process.stdout.write(json ? renderJson(entries, all) : render(entries, all));
285
+ return 0;
286
+ }
287
+
288
+ function _isCliEntry(): boolean {
289
+ if (process.argv[1] === undefined) {
290
+ return false;
291
+ }
292
+ const argvPath = path.resolve(process.argv[1]);
293
+ if (import.meta.url === pathToFileURL(argvPath).href) {
294
+ return true;
295
+ }
296
+ // A symlinked invocation (`.augment/scripts` → `dist/agent-src/scripts`, or
297
+ // macOS /var → /private/var) makes the raw URLs differ: import.meta.url is
298
+ // the resolved real path while argv[1] keeps the symlink. Compare realpaths
299
+ // so the entry guard still fires through the projection.
300
+ try {
301
+ return fs.realpathSync(_HERE) === fs.realpathSync(argvPath);
302
+ } catch {
303
+ return false;
304
+ }
305
+ }
306
+
307
+ if (_isCliEntry()) {
308
+ process.exitCode = main();
309
+ }
310
+
311
+ export { main, needsUser, regroupTodo, wrap, collectEntries, render, renderJson };
312
+ export type { Entry };
@@ -398,14 +398,32 @@ function _blockerField(slice: string, label: string): string | null {
398
398
  return parts.length ? parts.join(' ') : null;
399
399
  }
400
400
 
401
- /** Lines under `- **What to do:**` up to the next `- **Field:**` marker. */
401
+ /**
402
+ * The `- **What to do:**` text: the remainder of the marker line, plus every
403
+ * line under it up to the next `- **Field:**` marker.
404
+ *
405
+ * The marker line's own remainder is load-bearing and used to be dropped.
406
+ * Authors write both shapes — a numbered list under the marker, and prose that
407
+ * starts inline (`- **What to do:** the build work is done; only real …`) —
408
+ * and every *other* blocker field reads the inline part via `_blockerField`.
409
+ * Skipping it here truncated instructions mid-sentence in both the dashboard
410
+ * and `agent-config gates`, which is precisely the content those surfaces
411
+ * exist to deliver.
412
+ */
402
413
  function _blockerTodo(slice: string): string[] {
403
414
  const lines = _splitlines(slice);
404
- const startIdx = lines.findIndex((l) => /^-[ \t]*\*\*What to do:\*\*/i.test(_strip(l)));
415
+ const markerRe = /^-[ \t]*\*\*What to do:\*\*[ \t]*(.*)$/i;
416
+ const startIdx = lines.findIndex((l) => markerRe.test(_strip(l)));
405
417
  if (startIdx === -1) {
406
418
  return [];
407
419
  }
408
420
  const out: string[] = [];
421
+ const inline = _stripComment(
422
+ (markerRe.exec(_strip(lines[startIdx] as string))?.[1] as string) ?? '',
423
+ );
424
+ if (inline) {
425
+ out.push(inline);
426
+ }
409
427
  for (let i = startIdx + 1; i < lines.length; i++) {
410
428
  const trimmed = _strip(lines[i] as string);
411
429
  if (BLOCKER_FIELD_RE.test(trimmed) || trimmed.startsWith('#')) {
@@ -458,18 +476,56 @@ function parse_blockers(raw_text: string): Blocker[] {
458
476
  }
459
477
  const legacyMatch = LEGACY_BLOCKED_UNTIL_RE.exec(text);
460
478
  if (legacyMatch) {
479
+ // The legacy note is a blockquote and routinely wraps over several
480
+ // `> ` lines. The regex captures one line, so the continuation used to
481
+ // be dropped and the instruction ended mid-sentence — the same defect
482
+ // `_blockerTodo` carried above. Walk the following quoted lines until
483
+ // the quote block ends.
484
+ const parts = [_strip(legacyMatch[1] as string)];
485
+ const allLines = _splitlines(text);
486
+ const noteIdx = allLines.findIndex((l) => LEGACY_BLOCKED_UNTIL_RE.test(_strip(l)));
487
+ for (let i = noteIdx + 1; noteIdx !== -1 && i < allLines.length; i++) {
488
+ const quoted = /^>[ \t]?(.*)$/.exec(_strip(allLines[i] as string));
489
+ if (!quoted) {
490
+ break;
491
+ }
492
+ const cont = _strip(quoted[1] as string);
493
+ if (cont === '') {
494
+ break;
495
+ }
496
+ parts.push(cont);
497
+ }
461
498
  blockers.push({
462
499
  id: 'legacy',
463
500
  status: 'open',
464
501
  owner: 'user',
465
502
  blocks: 'entire roadmap',
466
- todo: [_strip(legacyMatch[1] as string)],
503
+ todo: [parts.join(' ')],
467
504
  resolvedWhen: 'condition described above clears',
468
505
  });
469
506
  }
470
507
  return blockers;
471
508
  }
472
509
 
510
+ /**
511
+ * Does this blocker need the human at the keyboard, rather than the maintainer
512
+ * or an external party?
513
+ *
514
+ * Owner values in the wild are not the clean `user | maintainer | external`
515
+ * enum the template comment suggests — real entries carry qualifiers
516
+ * (`user (billable spend)`, `user / maintainer`, `maintainer (security role)`).
517
+ * Word-boundary matching on `user` keeps the qualified forms and rejects
518
+ * `maintainer`. A shared `user / maintainer` blocker deliberately counts as the
519
+ * user's: showing one decision too many costs a line, hiding one costs the wait.
520
+ *
521
+ * Lives here rather than in `roadmap_gates` because it is owner *semantics*,
522
+ * not presentation — the dashboard header and `agent-config gates` must agree
523
+ * on the split, and two copies of this regex would drift.
524
+ */
525
+ function blocker_needs_user(owner: string): boolean {
526
+ return /\buser\b/i.test(owner);
527
+ }
528
+
473
529
  function parse_roadmap(p: string, roadmap_root: string): RoadmapStats | null {
474
530
  const text = fs.readFileSync(p, { encoding: 'utf-8' });
475
531
  const phase_matches: Array<{ start: number; end: number; g2: string; g3: string | undefined }> =
@@ -674,6 +730,14 @@ function render(roadmaps: RoadmapStats[], bundles: Bundle[] | null = null): stri
674
730
  const pending = pending_iron_law_3(roadmaps);
675
731
  const gated = merge_gated_pending(roadmaps);
676
732
  const total_open_blockers = roadmaps.reduce((s, r) => s + r.open_blockers.length, 0);
733
+ // The count alone answers "is something blocked", never "is it on me" —
734
+ // and the per-roadmap anchors make the owner split a manual read across the
735
+ // whole file. Name the user's share here and point at the command that
736
+ // renders those entries as actions.
737
+ const user_open_blockers = roadmaps.reduce(
738
+ (s, r) => s + r.open_blockers.filter((b) => blocker_needs_user(b.owner)).length,
739
+ 0,
740
+ );
677
741
  const lines: string[] = [];
678
742
  lines.push('# Roadmap Progress\n');
679
743
  const header_meta =
@@ -682,7 +746,10 @@ function render(roadmaps: RoadmapStats[], bundles: Bundle[] | null = null): stri
682
746
  ' · [roadmaps/](roadmaps/) · [archive/](roadmaps/archive/) · ' +
683
747
  '[skipped/](roadmaps/skipped/) · [later/](roadmaps/later/)' +
684
748
  (total_open_blockers > 0
685
- ? ` · **${total_open_blockers}** open blocker${total_open_blockers !== 1 ? 's' : ''}`
749
+ ? ` · **${total_open_blockers}** open blocker${total_open_blockers !== 1 ? 's' : ''}` +
750
+ (user_open_blockers > 0
751
+ ? `, **${user_open_blockers}** need you → \`agent-config gates\``
752
+ : '')
686
753
  : '') +
687
754
  '\n';
688
755
  lines.push(
@@ -1074,6 +1141,7 @@ export {
1074
1141
  is_roadmap_candidate,
1075
1142
  count_checkboxes,
1076
1143
  parse_blockers,
1144
+ blocker_needs_user,
1077
1145
  parse_roadmap,
1078
1146
  bar,
1079
1147
  collect,
@@ -248,6 +248,16 @@ mechanically. Meaning/required-keys table, why-fixed rationale, and the
248
248
  `NEEDS_CONTEXT`-vs-`BLOCKED` distinction →
249
249
  [`subagent-modes-detail` § Status taxonomy](../../agent-src/contexts/execution/subagent-modes-detail.md).
250
250
 
251
+ **The envelope is the ONLY return channel** (token-economy-dispatch
252
+ Phase 6). A worker writes its full output to disk (runtime artifact dir,
253
+ gitignored) and returns the bounded envelope — `summary` +
254
+ `artifact_paths` + verdict, size caps validator-enforced
255
+ (`_lib/subagent_response.ts`: summary ≤ 2,000 chars, whole envelope
256
+ ≤ 12,000). The orchestrator reads FROM the artifact paths on demand —
257
+ never instructs a worker to paste its full result into the return, and
258
+ never ingests a transcript-shaped return wholesale: dispatching N workers
259
+ grows the orchestrator context by N envelopes, not N transcripts.
260
+
251
261
  ## Dispatch prompts — externalized
252
262
 
253
263
  Each mode's literal dispatch template lives under
@@ -39,7 +39,7 @@ schema_version: 1
39
39
  # CI guard: a release bump of `package.json` must update this value
40
40
  # in lockstep — see scripts/check_template_pin_drift.ts (road-to-
41
41
  # portable-runtime-and-update-check P3.3).
42
- agent_config_version: "9.29.0"
42
+ agent_config_version: "9.30.0"
43
43
 
44
44
  # --- Project identity ---
45
45
  project:
@@ -58,9 +58,11 @@ export const REGISTRY = [
58
58
  { name: 'use', disposition: 'delegate', synopsis: 'Switch the active experience/profile (writes profile.id).' },
59
59
  { name: 'sessions:list', disposition: 'delegate', synopsis: 'List live agent sessions on this repository (shared session register).' },
60
60
  { name: 'sessions:claim', disposition: 'delegate', synopsis: 'Claim a roadmap for this session so other sessions skip it; --release clears it.' },
61
+ { name: 'session:recycle', disposition: 'delegate', synopsis: 'Validate + write the main-session recycle envelope; the successor session resumes from it after /clear.' },
61
62
  { name: 'roadmap:progress', disposition: 'delegate', synopsis: 'Regenerate agents/roadmaps-progress.md from open roadmaps.' },
62
63
  { name: 'roadmap:progress-check', disposition: 'delegate', synopsis: 'Fail if agents/roadmaps-progress.md is stale (for CI).' },
63
64
  { name: 'roadmap:archive', disposition: 'delegate', synopsis: 'Archive completed roadmaps (PR-gate sweep).' },
65
+ { name: 'gates', disposition: 'delegate', synopsis: 'Open decisions that need you, as actions — owner-filtered roadmap blockers; --all, --json.' },
64
66
  { name: 'capabilities:index', disposition: 'delegate', synopsis: 'Regenerate CAPABILITIES.yaml (the package coverage index); --check for CI.' },
65
67
  { name: 'affected', disposition: 'delegate', synopsis: 'Artefacts related to <artefact> via the discovery relation-graph (BFS).' },
66
68
  { name: 'graph-explain', disposition: 'delegate', synopsis: 'Seed on a <concept>, expand 2 hops over the discovery relation-graph with a node budget.' },
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/cli/registry.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AAE,UAAU,EAAE,QAAQ,EAAE,uDAAuD,EAAE;IACtH,EAAE,IAAI,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,0EAA0E,EAAE;IACzI,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,4FAA4F,EAAE;IACtJ,EAAE,IAAI,EAAE,oBAAoB,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,sDAAsD,EAAE;IACzH,EAAE,IAAI,EAAE,qBAAqB,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,4FAA4F,EAAE;CAC1J,CAAC;AAEX,MAAM,UAAU,WAAW,CAAC,IAAY;IACpC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,IAAY;IACjC,OAAO,WAAW,CAAC,IAAI,CAAC,EAAE,WAAW,KAAK,QAAQ,CAAC;AACvD,CAAC"}
@@ -1,28 +1,16 @@
1
1
  import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
2
+ import {
3
+ readHookStdin
4
+ } from "./chunk-MMJL4TIX.js";
2
5
  import {
3
6
  load_agent_settings
4
7
  } from "./chunk-LCFJIQ4J.js";
5
8
 
6
9
  // src/scripts/chat_history.ts
7
10
  import { createHash } from "node:crypto";
8
- import * as fs2 from "node:fs";
11
+ import * as fs from "node:fs";
9
12
  import * as path from "node:path";
10
13
  import { fileURLToPath, pathToFileURL } from "node:url";
11
-
12
- // src/scripts/hooks/hook_stdin.ts
13
- import * as fs from "node:fs";
14
- var _override = null;
15
- function readHookStdin() {
16
- if (_override !== null) return _override;
17
- try {
18
- if (process.stdin.isTTY) return "";
19
- return fs.readFileSync(0, "utf-8");
20
- } catch {
21
- return "";
22
- }
23
- }
24
-
25
- // src/scripts/chat_history.ts
26
14
  var DEFAULT_FILE = "agents/runtime/.agent-chat-history";
27
15
  var DEFAULT_SETTINGS_FILE = ".agent-settings.yml";
28
16
  var SCHEMA_VERSION = 4;
@@ -249,14 +237,14 @@ function derive_session_tag(session_id) {
249
237
  }
250
238
  function _isFile(p) {
251
239
  try {
252
- return fs2.statSync(p).isFile();
240
+ return fs.statSync(p).isFile();
253
241
  } catch {
254
242
  return false;
255
243
  }
256
244
  }
257
245
  function _statSize(p) {
258
246
  try {
259
- return fs2.statSync(p).size;
247
+ return fs.statSync(p).size;
260
248
  } catch {
261
249
  return -1;
262
250
  }
@@ -307,7 +295,7 @@ function _session_tag_enabled() {
307
295
  return (process.env.AGENT_CHAT_HISTORY_SESSION_TAG ?? "true").trim().toLowerCase() !== "false";
308
296
  }
309
297
  function _readLines(p) {
310
- const raw = fs2.readFileSync(p, "utf-8");
298
+ const raw = fs.readFileSync(p, "utf-8");
311
299
  if (raw === "") {
312
300
  return [];
313
301
  }
@@ -353,7 +341,7 @@ function read_header(p) {
353
341
  }
354
342
  let first;
355
343
  try {
356
- const raw = fs2.readFileSync(target, "utf-8");
344
+ const raw = fs.readFileSync(target, "utf-8");
357
345
  first = _strip(raw.split("\n", 1)[0] ?? "");
358
346
  } catch {
359
347
  return null;
@@ -383,8 +371,8 @@ function init(freq = "per_phase", options = {}) {
383
371
  if (_is_replay_mode()) {
384
372
  return header;
385
373
  }
386
- fs2.mkdirSync(path.dirname(target), { recursive: true });
387
- fs2.writeFileSync(target, _pyDumps(header) + "\n", { encoding: "utf-8" });
374
+ fs.mkdirSync(path.dirname(target), { recursive: true });
375
+ fs.writeFileSync(target, _pyDumps(header) + "\n", { encoding: "utf-8" });
388
376
  return header;
389
377
  }
390
378
  function migrate_header(p, options = {}) {
@@ -410,7 +398,7 @@ function migrate_header(p, options = {}) {
410
398
  if (typeof existing.started === "string") {
411
399
  new_header.started = existing.started;
412
400
  }
413
- const raw = fs2.readFileSync(target, "utf-8");
401
+ const raw = fs.readFileSync(target, "utf-8");
414
402
  const lines = _pySplitlines(raw);
415
403
  if (lines.length === 0) {
416
404
  return null;
@@ -465,7 +453,7 @@ function append(entry, options = {}) {
465
453
  if (_is_replay_mode()) {
466
454
  return;
467
455
  }
468
- fs2.appendFileSync(target, _pyDumps(entry) + "\n", { encoding: "utf-8" });
456
+ fs.appendFileSync(target, _pyDumps(entry) + "\n", { encoding: "utf-8" });
469
457
  }
470
458
  function _atomic_write_text(target, text) {
471
459
  if (_is_replay_mode()) {
@@ -475,11 +463,11 @@ function _atomic_write_text(target, text) {
475
463
  const uniq = `${process.pid}.${createHash("sha256").update(`${process.pid}:${Date.now()}:${Math.random()}`).digest("hex").slice(0, 8)}`;
476
464
  const tmp = target.slice(0, target.length - suffix.length) + `${suffix}.${uniq}.tmp`;
477
465
  try {
478
- fs2.writeFileSync(tmp, text, { encoding: "utf-8" });
479
- fs2.renameSync(tmp, target);
466
+ fs.writeFileSync(tmp, text, { encoding: "utf-8" });
467
+ fs.renameSync(tmp, target);
480
468
  } catch (exc) {
481
469
  try {
482
- fs2.unlinkSync(tmp);
470
+ fs.unlinkSync(tmp);
483
471
  } catch {
484
472
  }
485
473
  throw exc;
@@ -509,7 +497,7 @@ function reset_with_entries(entries, freq = "per_phase", options = {}) {
509
497
  const target = options.path ?? file_path();
510
498
  const header = _build_header(freq);
511
499
  const body = _normalize_entries(entries);
512
- fs2.mkdirSync(path.dirname(target), { recursive: true });
500
+ fs.mkdirSync(path.dirname(target), { recursive: true });
513
501
  const lines = [_pyDumps(header), ...body.map((e) => _pyDumps(e))];
514
502
  _atomic_write_text(target, lines.join("\n") + "\n");
515
503
  return header;
@@ -530,7 +518,7 @@ function prepend_entries(entries, options = {}) {
530
518
  return new_lines.length;
531
519
  }
532
520
  function _readLinesKeepNewline(p) {
533
- const raw = fs2.readFileSync(p, "utf-8");
521
+ const raw = fs.readFileSync(p, "utf-8");
534
522
  if (raw === "") {
535
523
  return [];
536
524
  }
@@ -552,8 +540,8 @@ function clear(options = {}) {
552
540
  return;
553
541
  }
554
542
  const target = options.path ?? file_path();
555
- if (fs2.existsSync(target)) {
556
- fs2.unlinkSync(target);
543
+ if (fs.existsSync(target)) {
544
+ fs.unlinkSync(target);
557
545
  }
558
546
  }
559
547
  function read_entries(options = {}) {
@@ -2010,8 +1998,8 @@ function _isCliEntry() {
2010
1998
  return true;
2011
1999
  }
2012
2000
  try {
2013
- const here = fs2.realpathSync(fileURLToPath(import.meta.url));
2014
- const argv = fs2.realpathSync(path.resolve(process.argv[1]));
2001
+ const here = fs.realpathSync(fileURLToPath(import.meta.url));
2002
+ const argv = fs.realpathSync(path.resolve(process.argv[1]));
2015
2003
  return here === argv;
2016
2004
  } catch {
2017
2005
  return false;
@@ -2033,7 +2021,6 @@ if (_invokedDirectly) {
2033
2021
  }
2034
2022
 
2035
2023
  export {
2036
- readHookStdin,
2037
2024
  derive_session_tag,
2038
2025
  read_entries,
2039
2026
  list_sessions