@event4u/agent-config 14.21.0 → 14.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.
Files changed (235) hide show
  1. package/.augment-plugin/marketplace.json +3 -3
  2. package/.augment-plugin/plugin.json +1 -1
  3. package/.claude-plugin/marketplace.json +1 -1
  4. package/CHANGELOG.md +164 -187
  5. package/CREDITS.md +37 -0
  6. package/README.md +1 -1
  7. package/dist/agent-src/commands/analyze/inbox.md +380 -5
  8. package/dist/agent-src/commands/analyze/repo.md +4 -2
  9. package/dist/agent-src/commands/pr/merge.md +47 -38
  10. package/dist/agent-src/commands/roadmap/next.md +8 -0
  11. package/dist/agent-src/contexts/communication/rules-auto/token-efficiency-mechanics.md +69 -0
  12. package/dist/agent-src/contexts/execution/auto-dispatch-classification.md +5 -5
  13. package/dist/agent-src/contexts/execution/autonomy-mechanics.md +12 -0
  14. package/dist/agent-src/rules/external-code-graph-interop.md +19 -14
  15. package/dist/agent-src/rules/notes-first-reasoning.md +36 -25
  16. package/dist/agent-src/rules/token-efficiency.md +26 -3
  17. package/dist/agent-src/scripts/_cli_entry.ts +51 -0
  18. package/dist/agent-src/scripts/archive_completed_roadmaps.ts +120 -27
  19. package/dist/agent-src/scripts/roadmap_gates.ts +4 -20
  20. package/dist/agent-src/scripts/roadmap_set_step.ts +5 -2
  21. package/dist/agent-src/scripts/stubs_due.ts +4 -18
  22. package/dist/agent-src/scripts/update_roadmap_progress.ts +7 -24
  23. package/dist/agent-src/skills/code-intelligence/SKILL.md +82 -1
  24. package/dist/agent-src/skills/git-workflow/references/push-closes-its-loop.md +9 -0
  25. package/dist/agent-src/skills/roadmap-writing/SKILL.md +17 -0
  26. package/dist/agent-src/skills/tailwind-engineer/SKILL.md +52 -2
  27. package/dist/agent-src/templates/agent-settings.md +0 -1
  28. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  29. package/dist/cli/registry.js +1 -1
  30. package/dist/cli-delegate/_cli_entry.js +8 -0
  31. package/dist/cli-delegate/_lib/pin_resolver.js +170 -0
  32. package/dist/cli-delegate/archival_sweep.js +8 -0
  33. package/dist/cli-delegate/archive_completed_roadmaps.js +542 -0
  34. package/dist/cli-delegate/check_update_banner.js +923 -0
  35. package/dist/cli-delegate/{chunk-ZVBOHSVF.js → chunk-2KKXJW25.js} +23 -9
  36. package/dist/cli-delegate/chunk-5EK5WQN6.js +28 -0
  37. package/dist/cli-delegate/chunk-7XGD2OEU.js +96 -0
  38. package/dist/cli-delegate/chunk-DBH4AHDK.js +155 -0
  39. package/dist/cli-delegate/{chunk-4FS4WRXP.js → chunk-IAI3XL43.js} +15 -3
  40. package/dist/cli-delegate/chunk-JO25G5H7.js +20 -0
  41. package/dist/cli-delegate/{chunk-643Z7FIC.js → chunk-KCNTUSPI.js} +7 -1
  42. package/dist/cli-delegate/chunk-LTYVIY76.js +7961 -0
  43. package/dist/cli-delegate/chunk-QAJS5YWY.js +999 -0
  44. package/dist/cli-delegate/{chunk-YS6XTLEK.js → chunk-TYSY33MD.js} +56 -6
  45. package/dist/cli-delegate/chunk-ULET4BYS.js +328 -0
  46. package/dist/cli-delegate/chunk-YDQSHTD7.js +187 -0
  47. package/dist/cli-delegate/chunk-YWVXLR44.js +48 -0
  48. package/dist/cli-delegate/chunk-ZZQBUHFK.js +273 -0
  49. package/dist/cli-delegate/cmd_conformance.js +2 -2
  50. package/dist/cli-delegate/cmd_export.js +2 -2
  51. package/dist/cli-delegate/cmd_handoff.js +45 -13
  52. package/dist/cli-delegate/cmd_prune.js +2 -2
  53. package/dist/cli-delegate/cmd_session_recycle.js +4 -14
  54. package/dist/cli-delegate/cmd_settings_migrate.js +2 -2
  55. package/dist/cli-delegate/cmd_settings_set.js +1 -1
  56. package/dist/cli-delegate/cmd_sync.js +2 -2
  57. package/dist/cli-delegate/cmd_uninstall.js +2 -2
  58. package/dist/cli-delegate/cmd_validate.js +2 -2
  59. package/dist/cli-delegate/dashboard_mode.js +16 -0
  60. package/dist/cli-delegate/gate_budget.js +24 -0
  61. package/dist/cli-delegate/gate_execute.js +25 -0
  62. package/dist/cli-delegate/guarded_baseline.js +18 -0
  63. package/dist/cli-delegate/resume_probe.js +22 -0
  64. package/dist/cli-delegate/roadmap_gates.js +638 -0
  65. package/dist/cli-delegate/roadmap_set_step.js +173 -0
  66. package/dist/cli-delegate/stub_queue.js +47 -0
  67. package/dist/cli-delegate/stubs_due.js +38 -0
  68. package/dist/cli-delegate/ticket_bundles.js +59 -0
  69. package/dist/cli-delegate/update_roadmap_progress.js +60 -0
  70. package/dist/discovery/deprecation-report.md +1 -1
  71. package/dist/discovery/discovery-manifest.json +13 -13
  72. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  73. package/dist/discovery/discovery-manifest.summary.md +1 -1
  74. package/dist/discovery/dormancy-report.md +1 -1
  75. package/dist/discovery/orphan-report.md +1 -1
  76. package/dist/discovery/packs.json +2 -2
  77. package/dist/discovery/trust-report.md +1 -1
  78. package/dist/discovery/workspaces.json +2 -2
  79. package/dist/hooks/dispatch.js +1813 -946
  80. package/dist/install/claudeLayerCarriage.js +237 -0
  81. package/dist/install/claudePathsPlan.js +79 -0
  82. package/dist/install/hostLayerFingerprint.js +1 -1
  83. package/dist/install/install.mjs +21 -3
  84. package/dist/install/partitionEligibility.js +231 -117
  85. package/dist/install/ruleLayerPartition.js +10 -7
  86. package/dist/mcp/registry-manifest.json +2 -2
  87. package/dist/mcp/server.json +2 -2
  88. package/dist/mcp/server.mjs +10870 -7641
  89. package/dist/scripts/_lib/lean_projection_mode.js +108 -0
  90. package/dist/scripts/_lib/router_match.js +243 -0
  91. package/dist/scripts/_lib/rule_injection.js +216 -0
  92. package/dist/scripts/condense.js +52 -45
  93. package/dist/scripts/project_thin_rules.js +139 -19
  94. package/dist/server/schemas/settings.js +16 -3
  95. package/docs/MIGRATION.md +105 -1
  96. package/docs/contracts/settings-classes.md +40 -8
  97. package/docs/guidelines/agent-infra/minimal-safe-diff-mechanics.md +73 -0
  98. package/docs/guidelines/agent-infra/notes-horizon-mechanics.md +90 -0
  99. package/llms.txt +1 -1
  100. package/package.json +7 -4
  101. package/src/agent-src/scripts/_cli_entry.ts +51 -0
  102. package/src/agent-src/scripts/archive_completed_roadmaps.ts +120 -27
  103. package/src/agent-src/scripts/roadmap_gates.ts +4 -20
  104. package/src/agent-src/scripts/roadmap_set_step.ts +5 -2
  105. package/src/agent-src/scripts/stubs_due.ts +4 -18
  106. package/src/agent-src/scripts/update_roadmap_progress.ts +7 -24
  107. package/src/config/agent-settings.template.yml +47 -1
  108. package/src/config/continuity-surface.json +516 -0
  109. package/src/config/estate-count-budget.json +1 -1
  110. package/src/config/evaluator-budgets.json +4 -4
  111. package/src/config/gate-coverage.yml +29 -8
  112. package/src/config/gate-violation-baselines.json +8 -8
  113. package/src/config/gitignore-block.txt +19 -0
  114. package/src/config/hook-token-budget.json +7 -6
  115. package/src/config/host-injection-effect.json +73 -0
  116. package/src/config/packed-binary-manifest.json +33 -0
  117. package/src/config/preamble-payload-budget.json +112 -105
  118. package/src/config/publish-surface.json +4 -2
  119. package/src/config/routing-coverage-seed.json +9 -2
  120. package/src/install/claudeLayerCarriage.ts +273 -0
  121. package/src/install/claudePathsPlan.ts +76 -0
  122. package/src/install/hostLayerFingerprint.ts +1 -1
  123. package/src/install/partitionEligibility.ts +261 -127
  124. package/src/install/ruleLayerPartition.ts +19 -23
  125. package/src/scripts/_cli/cmd_session_recycle.ts +2 -25
  126. package/src/scripts/_cli/handoff_sessions.ts +14 -44
  127. package/src/scripts/_dispatch.bash +77 -27
  128. package/src/scripts/_lib/auto_dispatch.ts +2 -2
  129. package/src/scripts/_lib/catalogue_layer_parity.ts +146 -0
  130. package/src/scripts/_lib/continuity_slot.ts +295 -0
  131. package/src/scripts/_lib/continuity_surface.ts +296 -0
  132. package/src/scripts/_lib/continuity_writer.ts +253 -0
  133. package/src/scripts/_lib/corpus_manifest.ts +26 -9
  134. package/src/scripts/_lib/hook_settings.ts +86 -1
  135. package/src/scripts/_lib/injection_effect.ts +151 -0
  136. package/src/scripts/_lib/layer_overlap_notice.ts +50 -6
  137. package/src/scripts/_lib/lean_projection_mode.ts +127 -0
  138. package/src/scripts/_lib/packed_binary_predicate.ts +262 -0
  139. package/src/scripts/_lib/pin_resolver.ts +13 -0
  140. package/src/scripts/_lib/recycle_envelope_paths.ts +109 -21
  141. package/src/scripts/_lib/regression_neighbourhood.ts +159 -22
  142. package/src/scripts/_lib/retired_status.ts +74 -0
  143. package/src/scripts/_lib/session_eol.ts +44 -0
  144. package/src/scripts/_lib/session_index_trust.ts +346 -0
  145. package/src/scripts/_lib/skill_catalogue.ts +156 -21
  146. package/src/scripts/_lib/standing_bound_ratchet.ts +154 -0
  147. package/src/scripts/_lib/subagent_capsule.ts +117 -8
  148. package/src/scripts/_lib/vendored_grammar_upstream.ts +280 -0
  149. package/src/scripts/ai_council/api_transport.ts +5 -0
  150. package/src/scripts/ai_council/deliberation_metrics.ts +353 -0
  151. package/src/scripts/ai_council/prompts.ts +9 -0
  152. package/src/scripts/ai_council/synthesis_disagreement.ts +206 -0
  153. package/src/scripts/audit_mcp_tools.ts +69 -25
  154. package/src/scripts/build_mcp_catalog.ts +24 -1
  155. package/src/scripts/capture_skill_catalogue.ts +24 -11
  156. package/src/scripts/check_candidate_lines.ts +499 -0
  157. package/src/scripts/check_continuity_surface.ts +475 -0
  158. package/src/scripts/check_dependency_floors.ts +13 -6
  159. package/src/scripts/check_estate_count.ts +40 -79
  160. package/src/scripts/check_host_tree_parity.ts +291 -0
  161. package/src/scripts/check_pack_size.ts +262 -23
  162. package/src/scripts/check_preamble_payload_budget.ts +136 -7
  163. package/src/scripts/check_roadmap_trackable.ts +19 -16
  164. package/src/scripts/check_rule_layer_partition.ts +54 -34
  165. package/src/scripts/check_rule_projection_integrity.ts +102 -2
  166. package/src/scripts/check_single_delivery.ts +97 -31
  167. package/src/scripts/check_update_banner.ts +13 -0
  168. package/src/scripts/ci_settle.ts +205 -5
  169. package/src/scripts/code_graph/build.ts +217 -15
  170. package/src/scripts/code_graph/cli.ts +334 -15
  171. package/src/scripts/code_graph/detect.ts +38 -0
  172. package/src/scripts/code_graph/extract.ts +11 -0
  173. package/src/scripts/code_graph/grammar_probe.ts +43 -0
  174. package/src/scripts/code_graph/loader.ts +88 -14
  175. package/src/scripts/code_graph/query.ts +144 -11
  176. package/src/scripts/code_graph/resolution_tiers.ts +238 -0
  177. package/src/scripts/code_graph/sqlite_store.ts +262 -6
  178. package/src/scripts/code_graph/types.ts +117 -3
  179. package/src/scripts/code_graph/validate.ts +26 -1
  180. package/src/scripts/code_graph/verbs.ts +590 -0
  181. package/src/scripts/condense.ts +54 -42
  182. package/src/scripts/corpus_manifest.ts +5 -5
  183. package/src/scripts/council_cli.ts +11 -12
  184. package/src/scripts/count_intent_disagreement.ts +426 -0
  185. package/src/scripts/handoff_context_hook.ts +118 -1
  186. package/src/scripts/hook_effect_doctor.ts +82 -1
  187. package/src/scripts/hook_manifest.json +1 -1
  188. package/src/scripts/hook_manifest.yaml +87 -12
  189. package/src/scripts/hooks/block_speaking_inbox_dir.ts +182 -16
  190. package/src/scripts/hooks/chain_nudge_hook.ts +282 -0
  191. package/src/scripts/hooks/code_graph_context_hook.ts +201 -0
  192. package/src/scripts/hooks/concern_registry.ts +4 -2
  193. package/src/scripts/hooks/host_semantics.ts +1 -1
  194. package/src/scripts/hooks/orchestration_record_hook.ts +2 -2
  195. package/src/scripts/hooks/push_settle_hook.ts +3 -2
  196. package/src/scripts/hooks/rule_inject_hook.ts +108 -21
  197. package/src/scripts/hooks/session_eol_hook.ts +120 -2
  198. package/src/scripts/hooks/skill_route_hook.ts +11 -4
  199. package/src/scripts/hot_context_hook.ts +62 -7
  200. package/src/scripts/inbox_source_census.ts +322 -0
  201. package/src/scripts/install-hooks.sh +82 -0
  202. package/src/scripts/{lint_carrier_integrity.ts → lint_deferral_integrity.ts} +60 -214
  203. package/src/scripts/lint_plan_risk_register.ts +13 -17
  204. package/src/scripts/lint_roadmap_blockers.ts +164 -1
  205. package/src/scripts/mcp_server/consumer_tool_catalog.json +152 -2
  206. package/src/scripts/mcp_server/graph_tools.ts +294 -0
  207. package/src/scripts/mcp_server/path_util.ts +31 -0
  208. package/src/scripts/mcp_server/suggest_skill.ts +72 -0
  209. package/src/scripts/mcp_server/tool_catalog_source.ts +7 -1
  210. package/src/scripts/mcp_server/tools.ts +5 -69
  211. package/src/scripts/media/lib/adapter-contract.md +7 -2
  212. package/src/scripts/media/lib/fixtures/flux/asset-0001.png +0 -0
  213. package/src/scripts/media/lib/fixtures/gemini-image/asset-0001.png +0 -0
  214. package/src/scripts/media/lib/fixtures/ideogram/asset-0001.png +0 -0
  215. package/src/scripts/model_rule_injection.ts +61 -4
  216. package/src/scripts/project_thin_rules.ts +149 -16
  217. package/src/scripts/rdp_candidates_delta.ts +276 -0
  218. package/src/scripts/rdp_quality_eval.ts +217 -19
  219. package/src/scripts/release_mix_taxonomy.json +3 -2
  220. package/src/scripts/report_host_injection_effect.ts +189 -0
  221. package/src/scripts/report_layer_overlap.ts +41 -0
  222. package/src/scripts/report_skill_menu_census.ts +341 -0
  223. package/src/scripts/report_standing_payload_by_host.ts +650 -0
  224. package/src/scripts/schemas/agent-settings.schema.json +7 -1
  225. package/src/scripts/session_memory_index.ts +81 -8
  226. package/src/scripts/skill_tools/score_skill_relevance.ts +70 -6
  227. package/src/scripts/skill_tools/suggest_skill_for_task.ts +37 -3
  228. package/src/server/schemas/settings.ts +23 -4
  229. package/src/vendor/grammars/README.md +86 -0
  230. package/src/vendor/grammars/tree-sitter-javascript.wasm +0 -0
  231. package/src/vendor/grammars/tree-sitter-php.wasm +0 -0
  232. package/src/vendor/grammars/tree-sitter-typescript.wasm +0 -0
  233. package/src/scripts/_lib/carrier_status.ts +0 -118
  234. package/src/scripts/_lib/estate_carrier_cases.ts +0 -72
  235. package/src/scripts/hooks/code_graph_nudge_hook.ts +0 -191
@@ -29,6 +29,30 @@ const _HERE = fileURLToPath(import.meta.url);
29
29
  export const ROOT = path.resolve(path.dirname(_HERE), '..', '..');
30
30
  export const CATALOG = path.join(ROOT, 'src/scripts/mcp_server/consumer_tool_catalog.json');
31
31
  export const TOOLS_TS = path.join(ROOT, 'src/scripts/mcp_server/tools.ts');
32
+ /**
33
+ * Modules that contribute records to `ALLOWLIST` from OUTSIDE `tools.ts`.
34
+ *
35
+ * `tools.ts` sits past the source-size ceiling, so a tool family whose records
36
+ * would cost ~250 units of excess there is defined in its own module and spread
37
+ * into the allowlist. This generator indexed `tools.ts` alone, so the five
38
+ * `graph_*` tools rendered `_stub-only_` in the published inventory — the doc
39
+ * asserting the exact opposite of the catalogue's own `implemented_on: ["stdio"]`,
40
+ * and `--check` staying green because it compared the doc against its own wrong
41
+ * render. Found by an independent review.
42
+ *
43
+ * A LIST rather than a directory walk: a walk would silently pick up any future
44
+ * file with a matching shape, and the point of this index is to say where a
45
+ * handler actually is. Adding a family here is one line in the same change that
46
+ * adds the family.
47
+ */
48
+ export const HANDLER_MODULES: readonly { file: string; label: string; block: string }[] = [
49
+ { file: path.join(ROOT, 'src/scripts/mcp_server/tools.ts'), label: 'tools.ts', block: 'export const ALLOWLIST' },
50
+ {
51
+ file: path.join(ROOT, 'src/scripts/mcp_server/graph_tools.ts'),
52
+ label: 'graph_tools.ts',
53
+ block: 'export const GRAPH_TOOLS',
54
+ },
55
+ ];
32
56
  export const OUT = path.join(ROOT, 'docs/contracts/mcp-tool-inventory.md');
33
57
 
34
58
  // Match `<name>: {` entries at 4-space indent inside the TS ALLOWLIST record
@@ -71,28 +95,36 @@ function _relativeToRoot(p: string): string {
71
95
  return path.relative(ROOT, p).split(path.sep).join('/');
72
96
  }
73
97
 
74
- function _index_handlers(): Map<string, number> {
75
- const out = new Map<string, number>();
76
- const lines = _splitlines(fs.readFileSync(TOOLS_TS, 'utf-8'));
77
- // Only index entries inside the `export const ALLOWLIST` block.
78
- let inAllowlist = false;
79
- for (let idx = 0; idx < lines.length; idx += 1) {
80
- const i = idx + 1;
81
- const line = lines[idx] as string;
82
- if (line.startsWith('export const ALLOWLIST')) {
83
- inAllowlist = true;
84
- continue;
85
- }
86
- if (inAllowlist && line.startsWith('};')) {
87
- inAllowlist = false;
88
- continue;
89
- }
90
- if (!inAllowlist) {
98
+ function _index_handlers(): Map<string, { label: string; line: number }> {
99
+ const out = new Map<string, { label: string; line: number }>();
100
+ for (const mod of HANDLER_MODULES) {
101
+ let text: string;
102
+ try {
103
+ text = fs.readFileSync(mod.file, 'utf-8');
104
+ } catch {
91
105
  continue;
92
106
  }
93
- const m = HANDLER_RE.exec(line);
94
- if (m) {
95
- out.set(m[1] as string, i);
107
+ const lines = _splitlines(text);
108
+ // Only index entries inside the module's own registration block.
109
+ let inBlock = false;
110
+ for (let idx = 0; idx < lines.length; idx += 1) {
111
+ const i = idx + 1;
112
+ const line = lines[idx] as string;
113
+ if (line.startsWith(mod.block)) {
114
+ inBlock = true;
115
+ continue;
116
+ }
117
+ if (inBlock && line.startsWith('};')) {
118
+ inBlock = false;
119
+ continue;
120
+ }
121
+ if (!inBlock) {
122
+ continue;
123
+ }
124
+ const m = HANDLER_RE.exec(line);
125
+ if (m) {
126
+ out.set(m[1] as string, { label: mod.label, line: i });
127
+ }
96
128
  }
97
129
  }
98
130
  return out;
@@ -117,7 +149,11 @@ function _joinSorted(obj: Map<string, number>): string {
117
149
  return keys.map((k) => `${k}=${obj.get(k)}`).join(', ');
118
150
  }
119
151
 
120
- function _render(catalog: Catalog, handlers: Map<string, number>, cat_lines: Map<string, number>): string {
152
+ function _render(
153
+ catalog: Catalog,
154
+ handlers: Map<string, { label: string; line: number }>,
155
+ cat_lines: Map<string, number>,
156
+ ): string {
121
157
  const tools = catalog.tools;
122
158
  const total = tools.length;
123
159
  const by_transport = new Map<string, number>();
@@ -145,7 +181,14 @@ function _render(catalog: Catalog, handlers: Map<string, number>, cat_lines: Map
145
181
  lines.push('');
146
182
  lines.push('# MCP tool inventory');
147
183
  lines.push('');
148
- lines.push('> Generated by [`audit_mcp_tools`](../../audit_mcp_tools)');
184
+ // A BARE command name, and deliberately not a link to this file: an
185
+ // independent review flagged the previous `../../audit_mcp_tools` as a
186
+ // path that resolves nowhere and proposed `src/scripts/audit_mcp_tools.ts`.
187
+ // That fix is refused by `generated_by.test.ts` § 1.4, which forbids a
188
+ // generated artifact from hard-coding its generator's script path — the
189
+ // broken link and the literal path are two wrong answers, and the
190
+ // replacement form the rule names is the runnable command.
191
+ lines.push('> Generated by `audit_mcp_tools`. Do not edit.');
149
192
  lines.push('> from the source-of-truth catalog');
150
193
  lines.push('> [`src/scripts/mcp_server/consumer_tool_catalog.json`](../../src/scripts/mcp_server/consumer_tool_catalog.json).');
151
194
  lines.push('> Do **not** hand-edit; rerun `./scripts-run src/scripts/audit_mcp_tools --write`.');
@@ -172,10 +215,10 @@ function _render(catalog: Catalog, handlers: Map<string, number>, cat_lines: Map
172
215
  cat_line !== undefined
173
216
  ? `[\`consumer_tool_catalog.json:${cat_line}\`](../../src/scripts/mcp_server/consumer_tool_catalog.json#L${cat_line})`
174
217
  : '_missing_';
175
- const h_line = handlers.get(name);
218
+ const h = handlers.get(name);
176
219
  const h_cite =
177
- h_line !== undefined
178
- ? `[\`tools.ts:${h_line}\`](../../src/scripts/mcp_server/tools.ts#L${h_line})`
220
+ h !== undefined
221
+ ? `[\`${h.label}:${h.line}\`](../../src/scripts/mcp_server/${h.label}#L${h.line})`
179
222
  : '_stub-only_';
180
223
  lines.push(`| \`${name}\` | \`${side}\` | ${transports} | ${cat_cite} | ${h_cite} |`);
181
224
  }
@@ -240,6 +283,7 @@ export function main(argv: string[] | null = null): number {
240
283
  candidates: [
241
284
  path.posix.join('src', 'scripts', 'mcp_server', 'consumer_tool_catalog.json'),
242
285
  path.posix.join('src', 'scripts', 'mcp_server', 'tools.ts'),
286
+ path.posix.join('src', 'scripts', 'mcp_server', 'graph_tools.ts'),
243
287
  ],
244
288
  repoRoot: ROOT,
245
289
  });
@@ -163,7 +163,30 @@ export function _buildCatalog(): Record<string, unknown> {
163
163
  return {
164
164
  schema_version: 1,
165
165
  description: CATALOG_DESCRIPTION,
166
- install_hint_stdio: `npx -y ${_packageName()} mcp-server`,
166
+ // `agent-config mcp-server`, not an `npx` form — AI council 2026-09-08,
167
+ // 2/2 convergent (road-to-a-graph-that-is-shipped 4.2, Fork 3 option 5).
168
+ //
169
+ // Both npx shapes are unusable here and for different reasons.
170
+ // `npx -y <pkg>@<version> mcp-server` is what `docs/mcp-server.md:97`
171
+ // documents and what the pin rationale at `docs/mcp-server.md:82` argues
172
+ // for, but the step's own verify requires the literal `npx -y` to be
173
+ // ABSENT from this file. Dropping the `-y` to satisfy that makes npx
174
+ // PROMPT before installing a package that is not present, which in a
175
+ // non-interactive MCP client start is a hang rather than a prompt.
176
+ //
177
+ // The installed binary is what the setup docs lead with
178
+ // (`docs/setup/mcp-client-config.md:35`,
179
+ // `docs/getting-started-local-stdio.md:9` — "the turnkey path … one
180
+ // command"), is non-interactive, and resolves no dist-tag at all
181
+ // because it IS whatever the consumer installed. Its cost is stated in
182
+ // the catalog description rather than hidden: it assumes the package is
183
+ // on PATH.
184
+ //
185
+ // RECORDED CONFLICT, per the same council verdict: this step's verify
186
+ // and the docs' pinned form contradict each other directly — the test
187
+ // forbids the string the documentation recommends. That is a defect in
188
+ // one of the two, and it is named here rather than silently normalised.
189
+ install_hint_stdio: `${_packageName().split('/').pop() ?? 'agent-config'} mcp-server`,
167
190
  tools: entries,
168
191
  };
169
192
  }
@@ -71,7 +71,7 @@ import * as path from 'node:path';
71
71
  import { fileURLToPath } from 'node:url';
72
72
 
73
73
  import {
74
- DEFAULT_CATALOGUE_ROOTS,
74
+ PROJECTION_CATALOGUE_ROOT,
75
75
  OBSERVATION_LOG,
76
76
  analyzeSelector,
77
77
  buildHostEventRecord,
@@ -85,8 +85,9 @@ import {
85
85
  measureCatalogueVolume,
86
86
  parseHostBudgetEvent,
87
87
  readObservationLog,
88
+ readCatalogueAcross,
88
89
  readProjectedCatalogue,
89
- resolveSkillsRoot,
90
+ resolveSkillCatalogueRoots,
90
91
  type HostProjectionRow,
91
92
  type ProjectionMode,
92
93
  type ProjectionModeCounts,
@@ -118,13 +119,18 @@ function resolveCatalogueRoot(explicit: string | null): string {
118
119
  }
119
120
  return explicit;
120
121
  }
121
- for (const candidate of DEFAULT_CATALOGUE_ROOTS) {
122
+ // The PROJECTION first, then the authored tree — deliberately NOT the generic
123
+ // ranker order, and deliberately not `DEFAULT_CATALOGUE_ROOTS`, which became a
124
+ // label list on 2026-09-07 (its `~/` entry joins to `<repo>/~/.claude/skills`,
125
+ // a path that can never exist). This module compares what a host DELIVERED
126
+ // against what was PROJECTED, so the projection is the subject; ranking it
127
+ // against `src/skills` would answer a different question with the same words.
128
+ const CANDIDATES = [PROJECTION_CATALOGUE_ROOT, 'src/skills'] as const;
129
+ for (const candidate of CANDIDATES) {
122
130
  const abs = path.join(REPO, candidate);
123
131
  if (fs.existsSync(abs)) return abs;
124
132
  }
125
- throw new Error(
126
- `no catalogue root found — tried ${DEFAULT_CATALOGUE_ROOTS.join(', ')} under ${REPO}`,
127
- );
133
+ throw new Error(`no catalogue root found — tried ${CANDIDATES.join(', ')} under ${REPO}`);
128
134
  }
129
135
 
130
136
  function argValue(flag: string): string | null {
@@ -326,17 +332,24 @@ function projectionModeFlagFor(host: string, counts: ProjectionModeCounts): { fl
326
332
  */
327
333
  function runPointableBareMode(): number {
328
334
  const explicitRoot = argValue('--catalogue-root');
329
- const rankerRoot = explicitRoot ? resolveCatalogueRoot(explicitRoot) : resolveSkillsRoot(REPO);
330
- if (rankerRoot === null) {
335
+ // The RANKER'S roots, which is what this join claims to read — corrected twice
336
+ // in one day. It first used `resolveSkillsRoot`; then, on the reasoning that
337
+ // "the projection is the subject", `.claude/skills` alone. Both were wrong
338
+ // after the ADR-236 amendment EMPTIED that directory of skills: the join read
339
+ // 49 command wrappers as the catalogue and published pointableBare 0 against
340
+ // unpointableBare 16, with the empty-guard silent because 49 is not 0. An
341
+ // explicit --catalogue-root still means exactly that one tree.
342
+ const rankerRoots = explicitRoot ? [resolveCatalogueRoot(explicitRoot)] : resolveSkillCatalogueRoots(REPO);
343
+ if (rankerRoots.length === 0) {
331
344
  process.stderr.write(
332
- '❌ no catalogue root resolved for the ranker — tried ' +
333
- `${DEFAULT_CATALOGUE_ROOTS.join(', ')} under ${REPO}.\n` +
345
+ `❌ no catalogue root resolved for the ranker under ${REPO}.\n` +
334
346
  ' An empty catalogue is never a clean join: it would report 0 pointable\n' +
335
347
  ' entries because nothing was read, not because nothing diverged.\n',
336
348
  );
337
349
  return 1;
338
350
  }
339
- const catalogueNames = readProjectedCatalogue(rankerRoot).map((entry) => entry.name);
351
+ const rankerRoot = rankerRoots[0] as string;
352
+ const catalogueNames = readCatalogueAcross(rankerRoots).map((entry) => entry.name);
340
353
  // The guard the error text above already promised, and did not have. A
341
354
  // present-but-empty or half-generated projection resolves fine — the
342
355
  // resolver returns the first EXISTING directory, not the first non-empty