@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.
- package/.augment-plugin/marketplace.json +3 -3
- package/.augment-plugin/plugin.json +1 -1
- package/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +164 -187
- package/CREDITS.md +37 -0
- package/README.md +1 -1
- package/dist/agent-src/commands/analyze/inbox.md +380 -5
- package/dist/agent-src/commands/analyze/repo.md +4 -2
- package/dist/agent-src/commands/pr/merge.md +47 -38
- package/dist/agent-src/commands/roadmap/next.md +8 -0
- package/dist/agent-src/contexts/communication/rules-auto/token-efficiency-mechanics.md +69 -0
- package/dist/agent-src/contexts/execution/auto-dispatch-classification.md +5 -5
- package/dist/agent-src/contexts/execution/autonomy-mechanics.md +12 -0
- package/dist/agent-src/rules/external-code-graph-interop.md +19 -14
- package/dist/agent-src/rules/notes-first-reasoning.md +36 -25
- package/dist/agent-src/rules/token-efficiency.md +26 -3
- package/dist/agent-src/scripts/_cli_entry.ts +51 -0
- package/dist/agent-src/scripts/archive_completed_roadmaps.ts +120 -27
- package/dist/agent-src/scripts/roadmap_gates.ts +4 -20
- package/dist/agent-src/scripts/roadmap_set_step.ts +5 -2
- package/dist/agent-src/scripts/stubs_due.ts +4 -18
- package/dist/agent-src/scripts/update_roadmap_progress.ts +7 -24
- package/dist/agent-src/skills/code-intelligence/SKILL.md +82 -1
- package/dist/agent-src/skills/git-workflow/references/push-closes-its-loop.md +9 -0
- package/dist/agent-src/skills/roadmap-writing/SKILL.md +17 -0
- package/dist/agent-src/skills/tailwind-engineer/SKILL.md +52 -2
- package/dist/agent-src/templates/agent-settings.md +0 -1
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/cli/registry.js +1 -1
- package/dist/cli-delegate/_cli_entry.js +8 -0
- package/dist/cli-delegate/_lib/pin_resolver.js +170 -0
- package/dist/cli-delegate/archival_sweep.js +8 -0
- package/dist/cli-delegate/archive_completed_roadmaps.js +542 -0
- package/dist/cli-delegate/check_update_banner.js +923 -0
- package/dist/cli-delegate/{chunk-ZVBOHSVF.js → chunk-2KKXJW25.js} +23 -9
- package/dist/cli-delegate/chunk-5EK5WQN6.js +28 -0
- package/dist/cli-delegate/chunk-7XGD2OEU.js +96 -0
- package/dist/cli-delegate/chunk-DBH4AHDK.js +155 -0
- package/dist/cli-delegate/{chunk-4FS4WRXP.js → chunk-IAI3XL43.js} +15 -3
- package/dist/cli-delegate/chunk-JO25G5H7.js +20 -0
- package/dist/cli-delegate/{chunk-643Z7FIC.js → chunk-KCNTUSPI.js} +7 -1
- package/dist/cli-delegate/chunk-LTYVIY76.js +7961 -0
- package/dist/cli-delegate/chunk-QAJS5YWY.js +999 -0
- package/dist/cli-delegate/{chunk-YS6XTLEK.js → chunk-TYSY33MD.js} +56 -6
- package/dist/cli-delegate/chunk-ULET4BYS.js +328 -0
- package/dist/cli-delegate/chunk-YDQSHTD7.js +187 -0
- package/dist/cli-delegate/chunk-YWVXLR44.js +48 -0
- package/dist/cli-delegate/chunk-ZZQBUHFK.js +273 -0
- package/dist/cli-delegate/cmd_conformance.js +2 -2
- package/dist/cli-delegate/cmd_export.js +2 -2
- package/dist/cli-delegate/cmd_handoff.js +45 -13
- package/dist/cli-delegate/cmd_prune.js +2 -2
- package/dist/cli-delegate/cmd_session_recycle.js +4 -14
- package/dist/cli-delegate/cmd_settings_migrate.js +2 -2
- package/dist/cli-delegate/cmd_settings_set.js +1 -1
- package/dist/cli-delegate/cmd_sync.js +2 -2
- package/dist/cli-delegate/cmd_uninstall.js +2 -2
- package/dist/cli-delegate/cmd_validate.js +2 -2
- package/dist/cli-delegate/dashboard_mode.js +16 -0
- package/dist/cli-delegate/gate_budget.js +24 -0
- package/dist/cli-delegate/gate_execute.js +25 -0
- package/dist/cli-delegate/guarded_baseline.js +18 -0
- package/dist/cli-delegate/resume_probe.js +22 -0
- package/dist/cli-delegate/roadmap_gates.js +638 -0
- package/dist/cli-delegate/roadmap_set_step.js +173 -0
- package/dist/cli-delegate/stub_queue.js +47 -0
- package/dist/cli-delegate/stubs_due.js +38 -0
- package/dist/cli-delegate/ticket_bundles.js +59 -0
- package/dist/cli-delegate/update_roadmap_progress.js +60 -0
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +13 -13
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +1 -1
- package/dist/discovery/dormancy-report.md +1 -1
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +2 -2
- package/dist/discovery/trust-report.md +1 -1
- package/dist/discovery/workspaces.json +2 -2
- package/dist/hooks/dispatch.js +1813 -946
- package/dist/install/claudeLayerCarriage.js +237 -0
- package/dist/install/claudePathsPlan.js +79 -0
- package/dist/install/hostLayerFingerprint.js +1 -1
- package/dist/install/install.mjs +21 -3
- package/dist/install/partitionEligibility.js +231 -117
- package/dist/install/ruleLayerPartition.js +10 -7
- package/dist/mcp/registry-manifest.json +2 -2
- package/dist/mcp/server.json +2 -2
- package/dist/mcp/server.mjs +10870 -7641
- package/dist/scripts/_lib/lean_projection_mode.js +108 -0
- package/dist/scripts/_lib/router_match.js +243 -0
- package/dist/scripts/_lib/rule_injection.js +216 -0
- package/dist/scripts/condense.js +52 -45
- package/dist/scripts/project_thin_rules.js +139 -19
- package/dist/server/schemas/settings.js +16 -3
- package/docs/MIGRATION.md +105 -1
- package/docs/contracts/settings-classes.md +40 -8
- package/docs/guidelines/agent-infra/minimal-safe-diff-mechanics.md +73 -0
- package/docs/guidelines/agent-infra/notes-horizon-mechanics.md +90 -0
- package/llms.txt +1 -1
- package/package.json +7 -4
- package/src/agent-src/scripts/_cli_entry.ts +51 -0
- package/src/agent-src/scripts/archive_completed_roadmaps.ts +120 -27
- package/src/agent-src/scripts/roadmap_gates.ts +4 -20
- package/src/agent-src/scripts/roadmap_set_step.ts +5 -2
- package/src/agent-src/scripts/stubs_due.ts +4 -18
- package/src/agent-src/scripts/update_roadmap_progress.ts +7 -24
- package/src/config/agent-settings.template.yml +47 -1
- package/src/config/continuity-surface.json +516 -0
- package/src/config/estate-count-budget.json +1 -1
- package/src/config/evaluator-budgets.json +4 -4
- package/src/config/gate-coverage.yml +29 -8
- package/src/config/gate-violation-baselines.json +8 -8
- package/src/config/gitignore-block.txt +19 -0
- package/src/config/hook-token-budget.json +7 -6
- package/src/config/host-injection-effect.json +73 -0
- package/src/config/packed-binary-manifest.json +33 -0
- package/src/config/preamble-payload-budget.json +112 -105
- package/src/config/publish-surface.json +4 -2
- package/src/config/routing-coverage-seed.json +9 -2
- package/src/install/claudeLayerCarriage.ts +273 -0
- package/src/install/claudePathsPlan.ts +76 -0
- package/src/install/hostLayerFingerprint.ts +1 -1
- package/src/install/partitionEligibility.ts +261 -127
- package/src/install/ruleLayerPartition.ts +19 -23
- package/src/scripts/_cli/cmd_session_recycle.ts +2 -25
- package/src/scripts/_cli/handoff_sessions.ts +14 -44
- package/src/scripts/_dispatch.bash +77 -27
- package/src/scripts/_lib/auto_dispatch.ts +2 -2
- package/src/scripts/_lib/catalogue_layer_parity.ts +146 -0
- package/src/scripts/_lib/continuity_slot.ts +295 -0
- package/src/scripts/_lib/continuity_surface.ts +296 -0
- package/src/scripts/_lib/continuity_writer.ts +253 -0
- package/src/scripts/_lib/corpus_manifest.ts +26 -9
- package/src/scripts/_lib/hook_settings.ts +86 -1
- package/src/scripts/_lib/injection_effect.ts +151 -0
- package/src/scripts/_lib/layer_overlap_notice.ts +50 -6
- package/src/scripts/_lib/lean_projection_mode.ts +127 -0
- package/src/scripts/_lib/packed_binary_predicate.ts +262 -0
- package/src/scripts/_lib/pin_resolver.ts +13 -0
- package/src/scripts/_lib/recycle_envelope_paths.ts +109 -21
- package/src/scripts/_lib/regression_neighbourhood.ts +159 -22
- package/src/scripts/_lib/retired_status.ts +74 -0
- package/src/scripts/_lib/session_eol.ts +44 -0
- package/src/scripts/_lib/session_index_trust.ts +346 -0
- package/src/scripts/_lib/skill_catalogue.ts +156 -21
- package/src/scripts/_lib/standing_bound_ratchet.ts +154 -0
- package/src/scripts/_lib/subagent_capsule.ts +117 -8
- package/src/scripts/_lib/vendored_grammar_upstream.ts +280 -0
- package/src/scripts/ai_council/api_transport.ts +5 -0
- package/src/scripts/ai_council/deliberation_metrics.ts +353 -0
- package/src/scripts/ai_council/prompts.ts +9 -0
- package/src/scripts/ai_council/synthesis_disagreement.ts +206 -0
- package/src/scripts/audit_mcp_tools.ts +69 -25
- package/src/scripts/build_mcp_catalog.ts +24 -1
- package/src/scripts/capture_skill_catalogue.ts +24 -11
- package/src/scripts/check_candidate_lines.ts +499 -0
- package/src/scripts/check_continuity_surface.ts +475 -0
- package/src/scripts/check_dependency_floors.ts +13 -6
- package/src/scripts/check_estate_count.ts +40 -79
- package/src/scripts/check_host_tree_parity.ts +291 -0
- package/src/scripts/check_pack_size.ts +262 -23
- package/src/scripts/check_preamble_payload_budget.ts +136 -7
- package/src/scripts/check_roadmap_trackable.ts +19 -16
- package/src/scripts/check_rule_layer_partition.ts +54 -34
- package/src/scripts/check_rule_projection_integrity.ts +102 -2
- package/src/scripts/check_single_delivery.ts +97 -31
- package/src/scripts/check_update_banner.ts +13 -0
- package/src/scripts/ci_settle.ts +205 -5
- package/src/scripts/code_graph/build.ts +217 -15
- package/src/scripts/code_graph/cli.ts +334 -15
- package/src/scripts/code_graph/detect.ts +38 -0
- package/src/scripts/code_graph/extract.ts +11 -0
- package/src/scripts/code_graph/grammar_probe.ts +43 -0
- package/src/scripts/code_graph/loader.ts +88 -14
- package/src/scripts/code_graph/query.ts +144 -11
- package/src/scripts/code_graph/resolution_tiers.ts +238 -0
- package/src/scripts/code_graph/sqlite_store.ts +262 -6
- package/src/scripts/code_graph/types.ts +117 -3
- package/src/scripts/code_graph/validate.ts +26 -1
- package/src/scripts/code_graph/verbs.ts +590 -0
- package/src/scripts/condense.ts +54 -42
- package/src/scripts/corpus_manifest.ts +5 -5
- package/src/scripts/council_cli.ts +11 -12
- package/src/scripts/count_intent_disagreement.ts +426 -0
- package/src/scripts/handoff_context_hook.ts +118 -1
- package/src/scripts/hook_effect_doctor.ts +82 -1
- package/src/scripts/hook_manifest.json +1 -1
- package/src/scripts/hook_manifest.yaml +87 -12
- package/src/scripts/hooks/block_speaking_inbox_dir.ts +182 -16
- package/src/scripts/hooks/chain_nudge_hook.ts +282 -0
- package/src/scripts/hooks/code_graph_context_hook.ts +201 -0
- package/src/scripts/hooks/concern_registry.ts +4 -2
- package/src/scripts/hooks/host_semantics.ts +1 -1
- package/src/scripts/hooks/orchestration_record_hook.ts +2 -2
- package/src/scripts/hooks/push_settle_hook.ts +3 -2
- package/src/scripts/hooks/rule_inject_hook.ts +108 -21
- package/src/scripts/hooks/session_eol_hook.ts +120 -2
- package/src/scripts/hooks/skill_route_hook.ts +11 -4
- package/src/scripts/hot_context_hook.ts +62 -7
- package/src/scripts/inbox_source_census.ts +322 -0
- package/src/scripts/install-hooks.sh +82 -0
- package/src/scripts/{lint_carrier_integrity.ts → lint_deferral_integrity.ts} +60 -214
- package/src/scripts/lint_plan_risk_register.ts +13 -17
- package/src/scripts/lint_roadmap_blockers.ts +164 -1
- package/src/scripts/mcp_server/consumer_tool_catalog.json +152 -2
- package/src/scripts/mcp_server/graph_tools.ts +294 -0
- package/src/scripts/mcp_server/path_util.ts +31 -0
- package/src/scripts/mcp_server/suggest_skill.ts +72 -0
- package/src/scripts/mcp_server/tool_catalog_source.ts +7 -1
- package/src/scripts/mcp_server/tools.ts +5 -69
- package/src/scripts/media/lib/adapter-contract.md +7 -2
- package/src/scripts/media/lib/fixtures/flux/asset-0001.png +0 -0
- package/src/scripts/media/lib/fixtures/gemini-image/asset-0001.png +0 -0
- package/src/scripts/media/lib/fixtures/ideogram/asset-0001.png +0 -0
- package/src/scripts/model_rule_injection.ts +61 -4
- package/src/scripts/project_thin_rules.ts +149 -16
- package/src/scripts/rdp_candidates_delta.ts +276 -0
- package/src/scripts/rdp_quality_eval.ts +217 -19
- package/src/scripts/release_mix_taxonomy.json +3 -2
- package/src/scripts/report_host_injection_effect.ts +189 -0
- package/src/scripts/report_layer_overlap.ts +41 -0
- package/src/scripts/report_skill_menu_census.ts +341 -0
- package/src/scripts/report_standing_payload_by_host.ts +650 -0
- package/src/scripts/schemas/agent-settings.schema.json +7 -1
- package/src/scripts/session_memory_index.ts +81 -8
- package/src/scripts/skill_tools/score_skill_relevance.ts +70 -6
- package/src/scripts/skill_tools/suggest_skill_for_task.ts +37 -3
- package/src/server/schemas/settings.ts +23 -4
- package/src/vendor/grammars/README.md +86 -0
- package/src/vendor/grammars/tree-sitter-javascript.wasm +0 -0
- package/src/vendor/grammars/tree-sitter-php.wasm +0 -0
- package/src/vendor/grammars/tree-sitter-typescript.wasm +0 -0
- package/src/scripts/_lib/carrier_status.ts +0 -118
- package/src/scripts/_lib/estate_carrier_cases.ts +0 -72
- 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
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
|
94
|
-
|
|
95
|
-
|
|
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(
|
|
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
|
-
|
|
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
|
|
218
|
+
const h = handlers.get(name);
|
|
176
219
|
const h_cite =
|
|
177
|
-
|
|
178
|
-
? `[
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
330
|
-
|
|
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
|
-
|
|
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
|
|
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
|