@event4u/agent-config 14.19.0 → 14.21.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 (161) 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 +351 -156
  5. package/README.md +1 -1
  6. package/agents/templates/.ai-council.yml.example +10 -0
  7. package/dist/agent-src/commands/agent-handoff.md +42 -41
  8. package/dist/agent-src/commands/analyze/inbox.md +1 -1
  9. package/dist/agent-src/commands/analyze/{reference-repo.md → repo.md} +247 -32
  10. package/dist/agent-src/commands/analyze/roadmap-repos.md +129 -0
  11. package/dist/agent-src/commands/analyze.md +12 -7
  12. package/dist/agent-src/commands/feature/plan.md +55 -16
  13. package/dist/agent-src/commands/feature/refactor.md +8 -3
  14. package/dist/agent-src/commands/humanize.md +48 -4
  15. package/dist/agent-src/contexts/execution/contract-decision-sheet.md +22 -1
  16. package/dist/agent-src/contexts/execution/host-capability-manifest.md +11 -2
  17. package/dist/agent-src/contexts/execution/roadmap-process-loop.md +35 -2
  18. package/dist/agent-src/contexts/execution/terminal-states.md +4 -1
  19. package/dist/agent-src/rules/evaluator-independence.md +4 -4
  20. package/dist/agent-src/rules/external-reference-deep-dive.md +2 -2
  21. package/dist/agent-src/rules/untrusted-input-defense.md +0 -2
  22. package/dist/agent-src/skills/competitive-positioning/SKILL.md +2 -2
  23. package/dist/agent-src/skills/evaluate-llm-feature/SKILL.md +1 -1
  24. package/dist/agent-src/skills/humanizer/references/anti-aiisms.md +27 -11
  25. package/dist/agent-src/skills/learning-to-rule-or-skill/SKILL.md +1 -1
  26. package/dist/agent-src/skills/markitdown/SKILL.md +2 -2
  27. package/dist/agent-src/skills/repomix-packer/SKILL.md +1 -1
  28. package/dist/agent-src/skills/skill-improvement-pipeline/SKILL.md +28 -6
  29. package/dist/agent-src/skills/technical-specification/SKILL.md +4 -0
  30. package/dist/agent-src/skills/test-driven-development/SKILL.md +1 -3
  31. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  32. package/dist/agent-src/templates/features.md +5 -0
  33. package/dist/agent-src/templates/roadmaps.md +29 -1
  34. package/dist/agent-src/templates/scripts/telemetry/mcp_lite.ts +213 -0
  35. package/dist/agent-src/templates/scripts/telemetry/report_renderer.ts +16 -0
  36. package/dist/agent-src/templates/scripts/telemetry_report.ts +22 -2
  37. package/dist/cli/mcp/dispatch.js +10 -0
  38. package/dist/cli/mcp/stdio.js +33 -2
  39. package/dist/cli/mcp/telemetry.js +227 -0
  40. package/dist/cli-delegate/{chunk-KPBWFOPZ.js → chunk-2FTMENJL.js} +194 -37
  41. package/dist/cli-delegate/{chunk-PMEKGDED.js → chunk-2TAQ2K4V.js} +166 -1
  42. package/dist/cli-delegate/{chunk-GZTMRYCN.js → chunk-643Z7FIC.js} +79 -12
  43. package/dist/cli-delegate/{chunk-CYH5SP6M.js → chunk-I6RHFQEG.js} +151 -16
  44. package/dist/cli-delegate/{chunk-IDHUQIXP.js → chunk-J3RFNKG4.js} +41 -5
  45. package/dist/cli-delegate/{chunk-7PRE6ZV2.js → chunk-YS6XTLEK.js} +199 -4
  46. package/dist/cli-delegate/chunk-ZVBOHSVF.js +1109 -0
  47. package/dist/cli-delegate/cmd_conformance.js +88 -110
  48. package/dist/cli-delegate/cmd_doctor.js +3 -3
  49. package/dist/cli-delegate/cmd_export.js +2 -2
  50. package/dist/cli-delegate/cmd_handoff.js +42 -12
  51. package/dist/cli-delegate/cmd_memory_get.js +1 -1
  52. package/dist/cli-delegate/cmd_prune.js +2 -2
  53. package/dist/cli-delegate/cmd_route_audit.js +1 -1
  54. package/dist/cli-delegate/cmd_session_recycle.js +59 -902
  55. package/dist/cli-delegate/cmd_settings_migrate.js +2 -2
  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/discovery/deprecation-report.md +1 -1
  60. package/dist/discovery/discovery-manifest.json +62 -31
  61. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  62. package/dist/discovery/discovery-manifest.summary.md +3 -3
  63. package/dist/discovery/dormancy-report.md +1 -1
  64. package/dist/discovery/orphan-report.md +1 -1
  65. package/dist/discovery/packs.json +7 -6
  66. package/dist/discovery/trust-report.md +2 -2
  67. package/dist/discovery/workspaces.json +6 -5
  68. package/dist/hooks/dispatch.js +3801 -2803
  69. package/dist/install/install.mjs +396 -168
  70. package/dist/mcp/registry-manifest.json +3 -3
  71. package/dist/mcp/server.json +2 -2
  72. package/dist/mcp/server.mjs +809 -180
  73. package/dist/scripts/ai_council/content_ceiling.js +63 -0
  74. package/dist/scripts/ai_council/seat_policy.js +106 -0
  75. package/dist/scripts/ai_council/transport_resolver.js +21 -0
  76. package/dist/scripts/mcp_server/telemetry.js +148 -0
  77. package/docs/guidelines/agent-infra/naming.md +1 -1
  78. package/docs/guidelines/agent-infra/security-lint-containment.md +46 -6
  79. package/docs/guidelines/agent-infra/self-improvement-pipeline.md +4 -4
  80. package/docs/guidelines/agent-infra/untrusted-input-spotlighting.md +1 -1
  81. package/docs/guidelines/redundancy-taxonomy.md +28 -0
  82. package/llms.txt +14 -14
  83. package/package.json +1 -1
  84. package/src/agent-src/templates/scripts/telemetry/mcp_lite.ts +213 -0
  85. package/src/agent-src/templates/scripts/telemetry/report_renderer.ts +16 -0
  86. package/src/agent-src/templates/scripts/telemetry_report.ts +22 -2
  87. package/src/config/assurance-capability-registry.json +9 -0
  88. package/src/config/gate-coverage.yml +55 -0
  89. package/src/config/gate-violation-baselines.json +18 -6
  90. package/src/config/release-gate-locality.yml +4 -3
  91. package/src/scripts/_cli/cmd_session_recycle.ts +51 -3
  92. package/src/scripts/_lib/audit_field_provenance.ts +44 -3
  93. package/src/scripts/_lib/blocked_by_marker.ts +189 -0
  94. package/src/scripts/_lib/host_capability.ts +76 -1
  95. package/src/scripts/_lib/install_reach_checks.ts +33 -1
  96. package/src/scripts/_lib/mcp_bridge.ts +222 -10
  97. package/src/scripts/_lib/mcp_consent_residual.ts +173 -0
  98. package/src/scripts/_lib/orchestration_record.ts +23 -1
  99. package/src/scripts/_lib/recycle_envelope_paths.ts +190 -0
  100. package/src/scripts/_lib/release_highlights.ts +19 -211
  101. package/src/scripts/_lib/release_material.ts +27 -77
  102. package/src/scripts/_lib/release_position.ts +96 -0
  103. package/src/scripts/_lib/review_skipped_record.ts +17 -1
  104. package/src/scripts/_lib/security_lint.ts +179 -7
  105. package/src/scripts/_lib/self_repair.ts +141 -6
  106. package/src/scripts/_lib/self_repair_store.ts +273 -7
  107. package/src/scripts/_lib/structured_ask.ts +117 -0
  108. package/src/scripts/_lib/subagent_capsule.ts +155 -3
  109. package/src/scripts/_lib/tty_prompt.ts +76 -0
  110. package/src/scripts/ai_council/api_transport.ts +163 -0
  111. package/src/scripts/ai_council/clients.ts +58 -63
  112. package/src/scripts/ai_council/config.ts +13 -0
  113. package/src/scripts/ai_council/content_ceiling.ts +79 -0
  114. package/src/scripts/ai_council/jury_aggregate.ts +178 -0
  115. package/src/scripts/ai_council/seat_policy.ts +137 -0
  116. package/src/scripts/ai_council/status_surface.ts +79 -0
  117. package/src/scripts/ai_council/transport_resolver.ts +59 -1
  118. package/src/scripts/ai_tells_rules.ts +446 -5
  119. package/src/scripts/ask_block_census.ts +499 -0
  120. package/src/scripts/bench_humanizer_eval.ts +264 -40
  121. package/src/scripts/bench_prose_tells_fp.ts +198 -0
  122. package/src/scripts/build_rule_trigger_matrix.ts +5 -0
  123. package/src/scripts/check_branch_work_committed.ts +234 -0
  124. package/src/scripts/check_mcp_doc_drift.ts +217 -0
  125. package/src/scripts/check_pack_size.ts +321 -3
  126. package/src/scripts/check_release_highlights.ts +0 -157
  127. package/src/scripts/council_cli.ts +18 -27
  128. package/src/scripts/detect_ai_tells.ts +142 -20
  129. package/src/scripts/handoff_context_hook.ts +54 -7
  130. package/src/scripts/harvest_reference_tokens.ts +698 -0
  131. package/src/scripts/hook_manifest.json +1 -1
  132. package/src/scripts/hook_manifest.yaml +31 -1
  133. package/src/scripts/hooks/concern_registry.ts +2 -0
  134. package/src/scripts/hooks/delegation_nudge_hook.ts +45 -1
  135. package/src/scripts/hooks/one_question_per_ask_hook.ts +191 -0
  136. package/src/scripts/hooks/session_eol_hook.ts +18 -7
  137. package/src/scripts/install-hooks.sh +52 -0
  138. package/src/scripts/install.ts +4 -4
  139. package/src/scripts/lint_agent_security.ts +316 -25
  140. package/src/scripts/lint_confusables.ts +42 -6
  141. package/src/scripts/lint_handoffs.ts +0 -132
  142. package/src/scripts/lint_hidden_unicode.ts +49 -7
  143. package/src/scripts/lint_instruction_smuggling.ts +42 -6
  144. package/src/scripts/lint_mcp_config_security.ts +42 -6
  145. package/src/scripts/lint_roadmap_blockers.ts +51 -1
  146. package/src/scripts/lint_roadmap_later_disposition.ts +217 -27
  147. package/src/scripts/lint_skill_frontmatter_safety.ts +43 -7
  148. package/src/scripts/mcp_server/resources.ts +41 -0
  149. package/src/scripts/mcp_server/telemetry.ts +19 -4
  150. package/src/scripts/migrate_command_suggestions.ts +1 -1
  151. package/src/scripts/orchestration_record.ts +12 -1
  152. package/src/scripts/probe_unblocked_ask.ts +135 -2
  153. package/src/scripts/release.ts +50 -95
  154. package/src/scripts/release_drill.ts +6 -10
  155. package/src/scripts/release_env.ts +1 -0
  156. package/src/scripts/release_publication.ts +40 -31
  157. package/src/scripts/self_repair_cli.ts +31 -1
  158. package/src/scripts/self_review_gate.ts +409 -15
  159. package/src/scripts/skill_scout.ts +69 -0
  160. package/dist/cli-delegate/chunk-2GNWGMAL.js +0 -172
  161. package/dist/cli-delegate/chunk-LPPWO5CE.js +0 -161
@@ -7373,7 +7373,7 @@ import * as crypto3 from "node:crypto";
7373
7373
  import * as fs24 from "node:fs";
7374
7374
  import * as os8 from "node:os";
7375
7375
  import * as path21 from "node:path";
7376
- import process3 from "node:process";
7376
+ import process4 from "node:process";
7377
7377
  import { fileURLToPath as fileURLToPath6, pathToFileURL as pathToFileURL2 } from "node:url";
7378
7378
 
7379
7379
  // src/scripts/_lib/json_pointers.ts
@@ -8130,17 +8130,173 @@ function current_package_version(repo_root) {
8130
8130
  // src/scripts/_lib/mcp_bridge.ts
8131
8131
  import * as fs3 from "node:fs";
8132
8132
  import * as path3 from "node:path";
8133
+
8134
+ // src/scripts/_lib/host_capability.ts
8135
+ import process2 from "node:process";
8136
+ var SAFE_DEFAULT = {
8137
+ schema_version: 1,
8138
+ subagent_spawn: false,
8139
+ parallel_spawn: false,
8140
+ status_polling: false,
8141
+ separate_quota_pool: false,
8142
+ agent_teams: false,
8143
+ worker_respawn: false,
8144
+ structured_ask: false,
8145
+ reads_project_mcp_config: false,
8146
+ // `true` because the safe answer here is "there is still a step", not
8147
+ // "there is nothing to do" — see the field's own note.
8148
+ mcp_needs_manual_activation: true
8149
+ };
8150
+ function asBool(value) {
8151
+ return value === true;
8152
+ }
8153
+ function normalizeHostManifest(input) {
8154
+ if (input === null || typeof input !== "object") {
8155
+ return { ...SAFE_DEFAULT };
8156
+ }
8157
+ const src = input;
8158
+ return {
8159
+ schema_version: 1,
8160
+ subagent_spawn: asBool(src.subagent_spawn),
8161
+ parallel_spawn: asBool(src.parallel_spawn),
8162
+ status_polling: asBool(src.status_polling),
8163
+ separate_quota_pool: asBool(src.separate_quota_pool),
8164
+ agent_teams: asBool(src.agent_teams),
8165
+ worker_respawn: asBool(src.worker_respawn),
8166
+ structured_ask: asBool(src.structured_ask),
8167
+ reads_project_mcp_config: asBool(src.reads_project_mcp_config),
8168
+ // Inverted coercion, matching the inverted default: only an explicit
8169
+ // `false` clears the residual, so an absent or malformed value keeps
8170
+ // the manual step visible instead of silently dropping it.
8171
+ mcp_needs_manual_activation: src.mcp_needs_manual_activation !== false
8172
+ };
8173
+ }
8174
+ var HOST_CAPABILITY_REGISTRY = {
8175
+ claude: { subagent_spawn: true, parallel_spawn: true, structured_ask: false }
8176
+ };
8177
+ function resolveHostCapabilities(hostId, override) {
8178
+ if (override !== void 0 && override !== null && typeof override === "object" && !Array.isArray(override)) {
8179
+ return normalizeHostManifest(override);
8180
+ }
8181
+ const row = hostId !== null && hostId !== void 0 ? HOST_CAPABILITY_REGISTRY[hostId] : void 0;
8182
+ if (row === void 0) {
8183
+ return { ...SAFE_DEFAULT };
8184
+ }
8185
+ return { ...SAFE_DEFAULT, ...row, schema_version: 1 };
8186
+ }
8187
+ function probeHostCapabilities(hostId) {
8188
+ const base = resolveHostCapabilities(hostId);
8189
+ const flag = process2.env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS;
8190
+ const probedAgentTeams = typeof flag === "string" && flag !== "";
8191
+ return { ...base, agent_teams: base.agent_teams || probedAgentTeams };
8192
+ }
8193
+ var CAPABILITY_FIELDS = [
8194
+ "subagent_spawn",
8195
+ "parallel_spawn",
8196
+ "status_polling",
8197
+ "separate_quota_pool",
8198
+ "agent_teams",
8199
+ "worker_respawn",
8200
+ "structured_ask",
8201
+ "reads_project_mcp_config",
8202
+ "mcp_needs_manual_activation"
8203
+ ];
8204
+ function describeHostCapabilities(hostId) {
8205
+ const manifest = probeHostCapabilities(hostId);
8206
+ const row = hostId !== null && hostId !== void 0 ? HOST_CAPABILITY_REGISTRY[hostId] : void 0;
8207
+ const flag = process2.env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS;
8208
+ const probedAgentTeams = typeof flag === "string" && flag !== "";
8209
+ const sources = {};
8210
+ for (const field of CAPABILITY_FIELDS) {
8211
+ if (row !== void 0 && typeof row[field] === "boolean") {
8212
+ sources[field] = "registry";
8213
+ } else if (field === "agent_teams" && probedAgentTeams) {
8214
+ sources[field] = "live-probe";
8215
+ } else {
8216
+ sources[field] = "default";
8217
+ }
8218
+ }
8219
+ return { manifest, sources };
8220
+ }
8221
+
8222
+ // src/scripts/_lib/mcp_bridge.ts
8133
8223
  var MCP_SERVER_KEY = "agent-config";
8134
- var MCP_BRIDGE_ENTRY = {
8135
- mcpServers: {
8136
- [MCP_SERVER_KEY]: {
8137
- command: "npx",
8138
- args: ["-y", "@event4u/agent-config", "mcp-server"]
8224
+ var MCP_PACKAGE_NAME = "@event4u/agent-config";
8225
+ function mcpBridgeEntry(packageRoot) {
8226
+ const version = readPackageVersion(packageRoot);
8227
+ const spec = version === null ? MCP_PACKAGE_NAME : `${MCP_PACKAGE_NAME}@${version}`;
8228
+ return {
8229
+ mcpServers: {
8230
+ [MCP_SERVER_KEY]: {
8231
+ command: "npx",
8232
+ args: ["-y", spec, "mcp-server"]
8233
+ }
8139
8234
  }
8235
+ };
8236
+ }
8237
+ function readPackageVersion(packageRoot) {
8238
+ try {
8239
+ const raw = fs3.readFileSync(path3.join(packageRoot, "package.json"), "utf-8");
8240
+ const v = JSON.parse(raw).version;
8241
+ return typeof v === "string" && v.trim() !== "" ? v : null;
8242
+ } catch {
8243
+ return null;
8140
8244
  }
8141
- };
8245
+ }
8142
8246
  function makeEnsureMcpBridge(mergeJsonFile) {
8143
- return (projectRoot, force) => mergeJsonFile(path3.join(projectRoot, ".mcp.json"), MCP_BRIDGE_ENTRY, force, ".mcp.json");
8247
+ return (projectRoot, force, packageRoot = projectRoot) => mergeJsonFile(
8248
+ path3.join(projectRoot, ".mcp.json"),
8249
+ mcpBridgeEntry(packageRoot),
8250
+ force,
8251
+ ".mcp.json"
8252
+ );
8253
+ }
8254
+ var MCP_PROJECT_CONFIG = {
8255
+ "claude-code": { hostId: "claude", relPath: ".mcp.json" },
8256
+ cursor: { hostId: "cursor", relPath: ".cursor/mcp.json" },
8257
+ "gemini-cli": { hostId: "gemini", relPath: ".gemini/settings.json" }
8258
+ };
8259
+ function mcpRegistrationTargets(tools, readsConfig) {
8260
+ const out = [];
8261
+ for (const [toolId, spec] of Object.entries(MCP_PROJECT_CONFIG)) {
8262
+ if (toolId === "claude-code") continue;
8263
+ if (!tools.has(toolId)) continue;
8264
+ if (!readsConfig(spec.hostId)) continue;
8265
+ out.push({ toolId, hostId: spec.hostId, relPath: spec.relPath });
8266
+ }
8267
+ return out;
8268
+ }
8269
+ function makeEnsureMcpRegistrations(mergeJsonFile) {
8270
+ return (projectRoot, force, packageRoot, targets) => {
8271
+ const merged = {};
8272
+ for (const t of targets) {
8273
+ merged[t.toolId] = mergeJsonFile(
8274
+ path3.join(projectRoot, ...t.relPath.split("/")),
8275
+ mcpBridgeEntry(packageRoot),
8276
+ force,
8277
+ t.relPath
8278
+ );
8279
+ }
8280
+ return merged;
8281
+ };
8282
+ }
8283
+ function readsProjectMcpConfig(hostId) {
8284
+ return probeHostCapabilities(hostId).reads_project_mcp_config;
8285
+ }
8286
+ function registerMcpHosts(mergeJsonFile, projectRoot, force, packageRoot, tools, into, readsConfig = readsProjectMcpConfig) {
8287
+ const ensure = makeEnsureMcpRegistrations(mergeJsonFile);
8288
+ const claude = MCP_PROJECT_CONFIG["claude-code"];
8289
+ if (tools.has("claude-code") && claude !== void 0) {
8290
+ const merged = ensure(projectRoot, force, packageRoot, [
8291
+ { toolId: "claude-code", hostId: claude.hostId, relPath: claude.relPath }
8292
+ ]);
8293
+ (into["claude-code"] ??= []).push(...merged["claude-code"] ?? []);
8294
+ }
8295
+ for (const [toolId, keys] of Object.entries(
8296
+ ensure(projectRoot, force, packageRoot, mcpRegistrationTargets(tools, readsConfig))
8297
+ )) {
8298
+ (into[toolId] ??= []).push(...keys);
8299
+ }
8144
8300
  }
8145
8301
  function projectionModeOf(raw) {
8146
8302
  return raw === "scoped" ? "scoped" : raw === "tiered" ? "tiered" : "legacy-all";
@@ -8184,6 +8340,79 @@ function applyTieredPrune(deployResults, packageRoot, pruneBy) {
8184
8340
  };
8185
8341
  }
8186
8342
 
8343
+ // src/scripts/_lib/mcp_consent_residual.ts
8344
+ var SEEDED = {
8345
+ claude: {
8346
+ hostId: "claude",
8347
+ residual: "Approve the project-scoped `agent-config` server the first time the host prompts \u2014 the installer writes `.mcp.json` but does not pre-approve it.",
8348
+ source: "vendor-doc",
8349
+ cite: "Host documentation: a project-scope MCP server requires explicit approval, suppressible only through the user-global `enabledMcpjsonServers` key, which this package deliberately does not write (blocker `mcp-user-scope-approval-consent`)."
8350
+ }
8351
+ };
8352
+ var TOOL_TO_HOST = {
8353
+ "claude-code": "claude",
8354
+ cursor: "cursor",
8355
+ "gemini-cli": "gemini",
8356
+ windsurf: "windsurf",
8357
+ cline: "cline",
8358
+ copilot: "copilot",
8359
+ augment: "augment"
8360
+ };
8361
+ function residualFor(hostId) {
8362
+ const { manifest, sources } = describeHostCapabilities(hostId);
8363
+ if (sources.mcp_needs_manual_activation === "registry" && !manifest.mcp_needs_manual_activation) {
8364
+ return null;
8365
+ }
8366
+ return SEEDED[hostId] ?? null;
8367
+ }
8368
+ function isRecorded(hostId) {
8369
+ const { sources } = describeHostCapabilities(hostId);
8370
+ return hostId in SEEDED || sources.mcp_needs_manual_activation === "registry";
8371
+ }
8372
+ function residualLine(hostId) {
8373
+ const r = residualFor(hostId);
8374
+ if (r !== null) {
8375
+ return {
8376
+ hostId,
8377
+ state: "residual",
8378
+ text: `${hostId}: ${r.residual} (source: ${r.source} \u2014 not observed here)`
8379
+ };
8380
+ }
8381
+ if (isRecorded(hostId)) {
8382
+ return {
8383
+ hostId,
8384
+ state: "cleared",
8385
+ text: `${hostId}: nothing left to do (source: observed)`
8386
+ };
8387
+ }
8388
+ return {
8389
+ hostId,
8390
+ state: "unrecorded",
8391
+ text: `${hostId}: no residual recorded \u2014 nobody checked this host, which is not the same as nothing to do`
8392
+ };
8393
+ }
8394
+ function residualReport(toolIds) {
8395
+ const seen = /* @__PURE__ */ new Set();
8396
+ const out = [];
8397
+ for (const toolId of toolIds) {
8398
+ const hostId = TOOL_TO_HOST[toolId];
8399
+ if (hostId === void 0 || seen.has(hostId)) continue;
8400
+ seen.add(hostId);
8401
+ const line = residualLine(hostId);
8402
+ if (line.state !== "cleared") out.push(line);
8403
+ }
8404
+ return out;
8405
+ }
8406
+ function printResiduals(toolIds, quiet, write = (s) => process.stdout.write(s)) {
8407
+ if (quiet) return;
8408
+ const lines = residualReport(toolIds);
8409
+ if (lines.length === 0) return;
8410
+ write(" Still needs you (MCP):\n");
8411
+ for (const line of lines) write(` \u2022 ${line.text}
8412
+ `);
8413
+ write("\n");
8414
+ }
8415
+
8187
8416
  // src/scripts/_lib/scoped_projection.ts
8188
8417
  import * as fs5 from "node:fs";
8189
8418
  import { createRequire } from "node:module";
@@ -17278,7 +17507,7 @@ function render_native_model_md(text, tier) {
17278
17507
  import { spawnSync } from "node:child_process";
17279
17508
  import * as fs23 from "node:fs";
17280
17509
  import * as path20 from "node:path";
17281
- import process2 from "node:process";
17510
+ import process3 from "node:process";
17282
17511
  import { fileURLToPath as fileURLToPath5, pathToFileURL } from "node:url";
17283
17512
 
17284
17513
  // src/scripts/_lib/package_root.ts
@@ -17339,10 +17568,10 @@ var ArgparseExit = class extends Error {
17339
17568
  }
17340
17569
  };
17341
17570
  function _stdoutSink() {
17342
- return { write: (t) => process2.stdout.write(t) };
17571
+ return { write: (t) => process3.stdout.write(t) };
17343
17572
  }
17344
17573
  function _stderrSink() {
17345
- return { write: (t) => process2.stderr.write(t) };
17574
+ return { write: (t) => process3.stderr.write(t) };
17346
17575
  }
17347
17576
  function _print(out, line = "") {
17348
17577
  out.write(line + "\n");
@@ -17684,7 +17913,7 @@ function _load_state_migrator() {
17684
17913
  if (driver === null) {
17685
17914
  return null;
17686
17915
  }
17687
- const binName = process2.platform === "win32" ? "tsx.cmd" : "tsx";
17916
+ const binName = process3.platform === "win32" ? "tsx.cmd" : "tsx";
17688
17917
  let tsxBin = null;
17689
17918
  for (let dir = pkg_root; ; ) {
17690
17919
  const cand = path20.join(dir, "node_modules", ".bin", binName);
@@ -17955,7 +18184,7 @@ function _parse2(argv, out, err) {
17955
18184
  function main(argv = null, options = {}) {
17956
18185
  const out = options.out ?? _stdoutSink();
17957
18186
  const err = options.err ?? _stderrSink();
17958
- const args = _parse2(argv ?? process2.argv.slice(2), out, err);
18187
+ const args = _parse2(argv ?? process3.argv.slice(2), out, err);
17959
18188
  const [project] = resolve_project_root(null, { cwd: options.cwd ?? null });
17960
18189
  if (args.from_major) {
17961
18190
  _print(out, `\u2139\uFE0F declared source major: ${args.from_major}.x`);
@@ -17983,32 +18212,32 @@ function main(argv = null, options = {}) {
17983
18212
  var _inForeignBundle = !(typeof __AGENT_CONFIG_CLI_DELEGATE__ !== "undefined" && __AGENT_CONFIG_CLI_DELEGATE__);
17984
18213
  var _HERE = fileURLToPath5(import.meta.url);
17985
18214
  function _isCliEntry() {
17986
- if (process2.argv[1] === void 0) {
18215
+ if (process3.argv[1] === void 0) {
17987
18216
  return false;
17988
18217
  }
17989
18218
  if (typeof __AGENT_CONFIG_CLI_DELEGATE__ !== "undefined" && __AGENT_CONFIG_CLI_DELEGATE__) {
17990
- if (path20.basename(process2.argv[1], ".js") === "cmd_migrate") {
18219
+ if (path20.basename(process3.argv[1], ".js") === "cmd_migrate") {
17991
18220
  return true;
17992
18221
  }
17993
18222
  }
17994
- const argvUrl = pathToFileURL(path20.resolve(process2.argv[1])).href;
18223
+ const argvUrl = pathToFileURL(path20.resolve(process3.argv[1])).href;
17995
18224
  if (import.meta.url === argvUrl) {
17996
18225
  return true;
17997
18226
  }
17998
18227
  try {
17999
18228
  const here = fs23.realpathSync(fileURLToPath5(import.meta.url));
18000
- const argv = fs23.realpathSync(path20.resolve(process2.argv[1]));
18229
+ const argv = fs23.realpathSync(path20.resolve(process3.argv[1]));
18001
18230
  return here === argv;
18002
18231
  } catch {
18003
18232
  return false;
18004
18233
  }
18005
18234
  }
18006
- if (!_inForeignBundle && (_isCliEntry() || process2.argv[1] === _HERE)) {
18235
+ if (!_inForeignBundle && (_isCliEntry() || process3.argv[1] === _HERE)) {
18007
18236
  try {
18008
- process2.exitCode = main(process2.argv.slice(2));
18237
+ process3.exitCode = main(process3.argv.slice(2));
18009
18238
  } catch (exc) {
18010
18239
  if (exc instanceof ArgparseExit) {
18011
- process2.exitCode = exc.code;
18240
+ process3.exitCode = exc.code;
18012
18241
  } else {
18013
18242
  throw exc;
18014
18243
  }
@@ -18148,7 +18377,7 @@ function atomicWrite0644(target, body, prefix) {
18148
18377
  const dir = path21.dirname(target);
18149
18378
  const tmpName = path21.join(
18150
18379
  dir,
18151
- `${prefix}${process3.pid}.${crypto3.randomBytes(6).toString("hex")}.yml.tmp`
18380
+ `${prefix}${process4.pid}.${crypto3.randomBytes(6).toString("hex")}.yml.tmp`
18152
18381
  );
18153
18382
  let fd = null;
18154
18383
  try {
@@ -18324,7 +18553,7 @@ var state = {
18324
18553
  };
18325
18554
  function _emit_progress(obj) {
18326
18555
  if (!state.PROGRESS_NDJSON) return;
18327
- process3.stdout.write(jsonDumpsCompact(obj) + "\n");
18556
+ process4.stdout.write(jsonDumpsCompact(obj) + "\n");
18328
18557
  }
18329
18558
  function _emit_progress_terminal(rc) {
18330
18559
  if (!state.PROGRESS_NDJSON) return;
@@ -18335,25 +18564,25 @@ function _emit_progress_terminal(rc) {
18335
18564
  }
18336
18565
  }
18337
18566
  function info(msg) {
18338
- if (!state.QUIET) process3.stdout.write(` ${msg}
18567
+ if (!state.QUIET) process4.stdout.write(` ${msg}
18339
18568
  `);
18340
18569
  }
18341
18570
  function success(msg) {
18342
- if (!state.QUIET) process3.stdout.write(` \u2705 ${msg}
18571
+ if (!state.QUIET) process4.stdout.write(` \u2705 ${msg}
18343
18572
  `);
18344
18573
  }
18345
18574
  function skip(msg) {
18346
- if (!state.QUIET) process3.stdout.write(` \u23ED\uFE0F ${msg}
18575
+ if (!state.QUIET) process4.stdout.write(` \u23ED\uFE0F ${msg}
18347
18576
  `);
18348
18577
  }
18349
18578
  function warn(msg) {
18350
- process3.stderr.write(` \u26A0\uFE0F ${msg}
18579
+ process4.stderr.write(` \u26A0\uFE0F ${msg}
18351
18580
  `);
18352
18581
  }
18353
18582
  function fail(msg) {
18354
- process3.stderr.write(` \u274C ${msg}
18583
+ process4.stderr.write(` \u274C ${msg}
18355
18584
  `);
18356
- process3.stderr.write(
18585
+ process4.stderr.write(
18357
18586
  " Diagnose: `./agent-config doctor` (or `--check <id>` for a single category)\n"
18358
18587
  );
18359
18588
  throw new SystemExitError(1);
@@ -18382,7 +18611,7 @@ function detect_package_type_for_project(project_root, package_root) {
18382
18611
  }
18383
18612
  function _is_interactive() {
18384
18613
  try {
18385
- return Boolean(process3.stdin.isTTY) && Boolean(process3.stdout.isTTY);
18614
+ return Boolean(process4.stdin.isTTY) && Boolean(process4.stdout.isTTY);
18386
18615
  } catch {
18387
18616
  return false;
18388
18617
  }
@@ -19355,7 +19584,7 @@ function dirHasEntries(p) {
19355
19584
  }
19356
19585
  }
19357
19586
  function _resolve_tsx_invocation(scriptPath, scriptArgs) {
19358
- const binName = process3.platform === "win32" ? "tsx.cmd" : "tsx";
19587
+ const binName = process4.platform === "win32" ? "tsx.cmd" : "tsx";
19359
19588
  let dir = path21.dirname(scriptPath);
19360
19589
  for (; ; ) {
19361
19590
  const candidate = path21.join(dir, "node_modules", ".bin", binName);
@@ -19588,7 +19817,7 @@ function _validate_scope(tools, scope, was_all) {
19588
19817
  if (scope !== "project" && scope !== "global") {
19589
19818
  fail(`_validate_scope: unknown scope '${scope}'`);
19590
19819
  }
19591
- if (process3.env["AGENT_CONFIG_DEV_MODE"] === "1") return tools;
19820
+ if (process4.env["AGENT_CONFIG_DEV_MODE"] === "1") return tools;
19592
19821
  const incompatible = [...tools].filter((t) => {
19593
19822
  const sup = SCOPE_SUPPORT[t] ?? "both";
19594
19823
  return sup !== "both" && sup !== scope;
@@ -19602,14 +19831,14 @@ function _validate_scope(tools, scope, was_all) {
19602
19831
  }
19603
19832
  function _enforce_consumer_global_only(scope) {
19604
19833
  if (scope !== "project") return;
19605
- if (process3.env["AGENT_CONFIG_DEV_MODE"] === "1") return;
19834
+ if (process4.env["AGENT_CONFIG_DEV_MODE"] === "1") return;
19606
19835
  fail(
19607
19836
  "--scope=project is reserved for maintainers (ADR-020 \u2014 consumer installs are global-only). Set AGENT_CONFIG_DEV_MODE=1 to opt in. See docs/maintainers/dev-mode.md."
19608
19837
  );
19609
19838
  }
19610
19839
  function _enforce_not_source_repo(scope, project_root) {
19611
19840
  if (scope === "global") return;
19612
- if (process3.env["AGENT_CONFIG_ALLOW_SELF_INSTALL"] === "1") return;
19841
+ if (process4.env["AGENT_CONFIG_ALLOW_SELF_INSTALL"] === "1") return;
19613
19842
  const [is_source, signature] = _is_agent_config_source_repo(project_root);
19614
19843
  if (!is_source) return;
19615
19844
  fail(
@@ -19713,7 +19942,7 @@ function _resolve_scope(opts, detected, detect_reason, custom_path) {
19713
19942
  return "project";
19714
19943
  }
19715
19944
  function _run_scope_prompt(opts, reason, custom_path) {
19716
- if (!process3.stdin.isTTY && custom_path === null) {
19945
+ if (!process4.stdin.isTTY && custom_path === null) {
19717
19946
  fail(
19718
19947
  "Ambiguous install scope detected and stdin is not a TTY. Pass --scope=project|global (or --custom-path=<dir>) to override."
19719
19948
  );
@@ -19762,7 +19991,7 @@ function _read_line(prompt_text) {
19762
19991
  return line.trim();
19763
19992
  }
19764
19993
  function readLineSyncRaw(promptText) {
19765
- process3.stdout.write(promptText);
19994
+ process4.stdout.write(promptText);
19766
19995
  const buf = Buffer.alloc(1);
19767
19996
  const bytes = [];
19768
19997
  let sawAny = false;
@@ -19793,13 +20022,13 @@ function readLineSyncRaw(promptText) {
19793
20022
  return Buffer.from(bytes).toString("utf-8");
19794
20023
  }
19795
20024
  function prompt_scope_choice(reason) {
19796
- process3.stdout.write("\n");
20025
+ process4.stdout.write("\n");
19797
20026
  info(`Ambiguous install scope: ${reason}.`);
19798
20027
  info("Choose where to install:");
19799
- process3.stdout.write(" 1) Project \u2014 install into the current directory\n");
19800
- process3.stdout.write(" 2) User \u2014 install into ~/ (recommended; one install per machine)\n");
19801
- process3.stdout.write(" 3) Custom \u2014 specify an explicit destination path\n");
19802
- process3.stdout.write("\n");
20028
+ process4.stdout.write(" 1) Project \u2014 install into the current directory\n");
20029
+ process4.stdout.write(" 2) User \u2014 install into ~/ (recommended; one install per machine)\n");
20030
+ process4.stdout.write(" 3) Custom \u2014 specify an explicit destination path\n");
20031
+ process4.stdout.write("\n");
19803
20032
  let attempts = 0;
19804
20033
  while (attempts < 3) {
19805
20034
  const reply = _read_line("Choose [1/2/3]: ");
@@ -19908,7 +20137,7 @@ var MIGRATE_LEGACY_YAML_FILES = [".agent-settings.yml", ".agent-user.yml"];
19908
20137
  var MIGRATE_LEGACY_TOOL_DIRS = [".augment", ".claude", ".cursor"];
19909
20138
  var AGENT_CONFIG_PACKAGE_NAME = "@event4u/agent-config";
19910
20139
  function _is_agent_config_source_repo(project_root) {
19911
- if (process3.env["AGENT_CONFIG_CONSUMER_MODE"] === "1") {
20140
+ if (process4.env["AGENT_CONFIG_CONSUMER_MODE"] === "1") {
19912
20141
  return [false, "consumer-mode-override"];
19913
20142
  }
19914
20143
  const pkg_json = path21.join(project_root, "package.json");
@@ -19937,7 +20166,7 @@ function _is_agent_config_source_repo(project_root) {
19937
20166
  return [false, ""];
19938
20167
  }
19939
20168
  function _detect_legacy_for_migration(project_root) {
19940
- if (process3.env["AGENT_CONFIG_DEV_MODE"] === "1") return [];
20169
+ if (process4.env["AGENT_CONFIG_DEV_MODE"] === "1") return [];
19941
20170
  const [is_source, signature] = _is_agent_config_source_repo(project_root);
19942
20171
  if (is_source) {
19943
20172
  if (!state.QUIET) {
@@ -19966,7 +20195,7 @@ function _detect_legacy_for_migration(project_root) {
19966
20195
  }
19967
20196
  function _prompt_migrate_to_global(project_root, artefacts) {
19968
20197
  if (!state.QUIET) {
19969
- process3.stdout.write("\n");
20198
+ process4.stdout.write("\n");
19970
20199
  warn("Legacy project-local artefacts detected \u2014 pre-ADR-020 layout:");
19971
20200
  for (const rel of artefacts) {
19972
20201
  info(` ${path21.join(project_root, rel)}`);
@@ -20007,7 +20236,7 @@ function _format_global_root_for_marker(global_root) {
20007
20236
  return `~/${rel.split(path21.sep).join("/")}`;
20008
20237
  }
20009
20238
  function _remove_legacy_consumer_bridge_marker(project_root, env = null) {
20010
- const env_map = env ?? process3.env;
20239
+ const env_map = env ?? process4.env;
20011
20240
  if (env_map["AGENT_CONFIG_DEV_MODE"] === "1") return null;
20012
20241
  if (isDir(path21.join(project_root, ".agent-src.uncondensed"))) return null;
20013
20242
  const target = path21.join(project_root, CONSUMER_BRIDGE_MARKER_RELPATH);
@@ -20025,7 +20254,7 @@ var PROJECT_ANCHOR_TOOLS = {
20025
20254
  "gemini-cli": ".gemini/agent-config.bridge.yml"
20026
20255
  };
20027
20256
  function _write_per_tool_project_anchors(project_root, tools, env = null, now = null) {
20028
- const env_map = env ?? process3.env;
20257
+ const env_map = env ?? process4.env;
20029
20258
  if (env_map["AGENT_CONFIG_DEV_MODE"] === "1") return [];
20030
20259
  if (isDir(path21.join(project_root, ".agent-src.uncondensed"))) return [];
20031
20260
  const global_root_str = _format_global_root_for_marker(
@@ -20561,13 +20790,13 @@ function install_global(tools, force, project_root = null, core_only = false) {
20561
20790
  const classification = classify_mismatch(installed_version, recorded);
20562
20791
  if (classification === "downgrade" && !force) {
20563
20792
  if (!state.QUIET) {
20564
- process3.stdout.write("\n");
20793
+ process4.stdout.write("\n");
20565
20794
  warn("Refusing global install: lockfile records a newer version.");
20566
20795
  info(` Lockfile: ${read_path}`);
20567
20796
  info(` Recorded version: ${recorded}`);
20568
20797
  info(` Current package: ${installed_version}`);
20569
20798
  info(" Fix: upgrade the package, or re-run with `--force`");
20570
- process3.stdout.write("\n");
20799
+ process4.stdout.write("\n");
20571
20800
  }
20572
20801
  return 1;
20573
20802
  }
@@ -20581,13 +20810,13 @@ function install_global(tools, force, project_root = null, core_only = false) {
20581
20810
  );
20582
20811
  }
20583
20812
  if (!state.QUIET) {
20584
- process3.stdout.write("\n");
20813
+ process4.stdout.write("\n");
20585
20814
  info("Agent Config \u2014 Global (user-scope) install [ADR-007]");
20586
20815
  info("Per-tool anchor paths:");
20587
20816
  for (const tool_id of [...tools].sort()) {
20588
20817
  const anchor = USER_SCOPE_PATHS[tool_id];
20589
20818
  if (anchor === void 0) continue;
20590
- process3.stdout.write(` ${tool_id.padEnd(15)} \u2192 ${anchor}
20819
+ process4.stdout.write(` ${tool_id.padEnd(15)} \u2192 ${anchor}
20591
20820
  `);
20592
20821
  }
20593
20822
  }
@@ -20596,7 +20825,7 @@ function install_global(tools, force, project_root = null, core_only = false) {
20596
20825
  const merged_tools = [.../* @__PURE__ */ new Set([...existing_tools, ...tools])].sort();
20597
20826
  const written = write_lockfile(installed_version, merged_tools, { path: write_path });
20598
20827
  if (!state.QUIET) {
20599
- process3.stdout.write("\n");
20828
+ process4.stdout.write("\n");
20600
20829
  info(`Lockfile written: ${written}`);
20601
20830
  info(` schema_version=1, agent_config_version=${installed_version}`);
20602
20831
  info(` tools=${merged_tools.join(",")}`);
@@ -20604,7 +20833,7 @@ function install_global(tools, force, project_root = null, core_only = false) {
20604
20833
  if (project_root !== null && pathExists(_resolve_settings_read(project_root)) && !isDir(path21.join(project_root, ".agent-src.uncondensed"))) {
20605
20834
  const drift = collect_drift(project_root);
20606
20835
  if (!state.QUIET) {
20607
- process3.stdout.write("\n");
20836
+ process4.stdout.write("\n");
20608
20837
  for (const line of format_drift_report(drift).replace(/\n$/, "").split("\n")) {
20609
20838
  info(line);
20610
20839
  }
@@ -20685,30 +20914,30 @@ function install_global(tools, force, project_root = null, core_only = false) {
20685
20914
  });
20686
20915
  }
20687
20916
  if (!state.QUIET) {
20688
- process3.stdout.write("\n");
20917
+ process4.stdout.write("\n");
20689
20918
  info("Deployed per-tool content:");
20690
20919
  for (const tool_id of Object.keys(deploy_results).sort()) {
20691
20920
  const [w, s, status] = deploy_results[tool_id];
20692
20921
  const anchor = USER_SCOPE_PATHS[tool_id] ?? "";
20693
20922
  if (status === "deployed" && tool_id === "claude-desktop") {
20694
20923
  const bundles_dir = _claude_desktop_bundles_dir();
20695
- process3.stdout.write(` ${tool_id.padEnd(15)} \u2192 ${bundles_dir} (${w} bundles)
20924
+ process4.stdout.write(` ${tool_id.padEnd(15)} \u2192 ${bundles_dir} (${w} bundles)
20696
20925
  `);
20697
20926
  } else if (status === "deployed") {
20698
- process3.stdout.write(` ${tool_id.padEnd(15)} \u2192 ${anchor} (${w} files, ${s} skipped)
20927
+ process4.stdout.write(` ${tool_id.padEnd(15)} \u2192 ${anchor} (${w} files, ${s} skipped)
20699
20928
  `);
20700
20929
  } else if (status === "marker") {
20701
- process3.stdout.write(
20930
+ process4.stdout.write(
20702
20931
  ` ${tool_id.padEnd(15)} \u2192 ${anchor}agent-config.md (${w ? "written" : "skipped"})
20703
20932
  `
20704
20933
  );
20705
20934
  } else if (status === "hint") {
20706
- process3.stdout.write(
20935
+ process4.stdout.write(
20707
20936
  ` ${tool_id.padEnd(15)} \u2192 no user-scope convention; use \`agent-config export --tool=${tool_id}\`
20708
20937
  `
20709
20938
  );
20710
20939
  } else {
20711
- process3.stdout.write(
20940
+ process4.stdout.write(
20712
20941
  ` ${tool_id.padEnd(15)} \u2192 no global-scope content yet (project-scope install supported)
20713
20942
  `
20714
20943
  );
@@ -20743,21 +20972,21 @@ function install_global(tools, force, project_root = null, core_only = false) {
20743
20972
  warn(line);
20744
20973
  }
20745
20974
  const notice = _scoped_migration_notice(deploy_results, project_root, package_root, {
20746
- env: process3.env,
20747
- stdinTty: process3.stdin.isTTY === true,
20748
- stdoutTty: process3.stdout.isTTY === true
20975
+ env: process4.env,
20976
+ stdinTty: process4.stdin.isTTY === true,
20977
+ stdoutTty: process4.stdout.isTTY === true
20749
20978
  });
20750
20979
  if (notice.length > 0) {
20751
- process3.stdout.write("\n");
20980
+ process4.stdout.write("\n");
20752
20981
  for (const line of notice) info(line);
20753
20982
  }
20754
20983
  } catch {
20755
20984
  }
20756
20985
  }
20757
20986
  if (!state.QUIET) {
20758
- process3.stdout.write("\n");
20987
+ process4.stdout.write("\n");
20759
20988
  success(`Global install completed (v${installed_version}).`);
20760
- process3.stdout.write("\n");
20989
+ process4.stdout.write("\n");
20761
20990
  }
20762
20991
  return 0;
20763
20992
  }
@@ -20914,8 +21143,8 @@ var _VALUE_FLAGS = {
20914
21143
  "--layer": "layer"
20915
21144
  };
20916
21145
  function _argError(msg) {
20917
- process3.stderr.write(USAGE);
20918
- process3.stderr.write(`${PROG}: error: ${msg}
21146
+ process4.stderr.write(USAGE);
21147
+ process4.stderr.write(`${PROG}: error: ${msg}
20919
21148
  `);
20920
21149
  throw new ArgparseExit2(2);
20921
21150
  }
@@ -20954,7 +21183,7 @@ function parse_options(argv) {
20954
21183
  while (i < argv.length) {
20955
21184
  const a = argv[i];
20956
21185
  if (a === "-h" || a === "--help") {
20957
- process3.stdout.write(USAGE);
21186
+ process4.stdout.write(USAGE);
20958
21187
  throw new ArgparseExit2(0);
20959
21188
  }
20960
21189
  const eq = a.startsWith("--") ? a.indexOf("=") : -1;
@@ -21158,12 +21387,12 @@ personal:
21158
21387
  }
21159
21388
  _write_install_mode_marker(target_root, "minimal");
21160
21389
  if (!state.QUIET) {
21161
- process3.stderr.write(
21390
+ process4.stderr.write(
21162
21391
  "\u2139\uFE0F Minimal install \u2014 run `agent-config install --force` to add AGENTS.md, bridges, and tool integrations.\n"
21163
21392
  );
21164
21393
  }
21165
21394
  if (!state.QUIET) {
21166
- process3.stdout.write("\n");
21395
+ process4.stdout.write("\n");
21167
21396
  info("Next steps:");
21168
21397
  info(" \u2022 Ensure `agent-config` is on $PATH: npm install -g @event4u/agent-config");
21169
21398
  info(" \u2022 Drop project-scoped overrides under `agents/overrides/{rules,skills,commands}/`.");
@@ -21195,14 +21424,14 @@ var _INTERACTIVE_VERBOSITIES = [
21195
21424
  ];
21196
21425
  var _LOCAL_CONFIG_FILE = ".agent-config.local.json";
21197
21426
  function _interactive_prompt_choice(label, options) {
21198
- process3.stdout.write("\n");
21199
- process3.stdout.write(` ${label}
21427
+ process4.stdout.write("\n");
21428
+ process4.stdout.write(` ${label}
21200
21429
  `);
21201
21430
  options.forEach(([key, blurb], idx) => {
21202
- process3.stdout.write(` ${idx + 1}. ${key} \u2014 ${blurb}
21431
+ process4.stdout.write(` ${idx + 1}. ${key} \u2014 ${blurb}
21203
21432
  `);
21204
21433
  });
21205
- process3.stdout.write("\n");
21434
+ process4.stdout.write("\n");
21206
21435
  for (; ; ) {
21207
21436
  const raw = _read_line(` Choice [1-${options.length}, default 1]: `);
21208
21437
  if (raw === null) return options[0][0];
@@ -21214,14 +21443,14 @@ function _interactive_prompt_choice(label, options) {
21214
21443
  for (const [key] of options) {
21215
21444
  if (raw.toLowerCase() === key) return key;
21216
21445
  }
21217
- process3.stdout.write(
21446
+ process4.stdout.write(
21218
21447
  ` \u26A0\uFE0F Pick a number 1-${options.length} or one of: ${options.map(([k]) => k).join(", ")}.
21219
21448
  `
21220
21449
  );
21221
21450
  }
21222
21451
  }
21223
21452
  function run_interactive_init(project_root, force) {
21224
- if (!process3.stdin.isTTY) {
21453
+ if (!process4.stdin.isTTY) {
21225
21454
  warn(
21226
21455
  `--interactive requested but stdin is not a TTY; skipping the prompt. Re-run interactively or hand-edit ${_LOCAL_CONFIG_FILE}.`
21227
21456
  );
@@ -21234,7 +21463,7 @@ function run_interactive_init(project_root, force) {
21234
21463
  );
21235
21464
  return 0;
21236
21465
  }
21237
- process3.stdout.write("\n");
21466
+ process4.stdout.write("\n");
21238
21467
  info("Interactive init \u2014 captures user-type / stack / verbosity");
21239
21468
  info("(forward-compatible stub; runtime filtering activates with step-9)");
21240
21469
  const user_type = _interactive_prompt_choice("Primary user type:", _INTERACTIVE_USER_TYPES);
@@ -21261,10 +21490,10 @@ var _WIZARD_READY_RE = /^WIZARD_READY (http:\/\/(?:127\.0\.0\.1|localhost):\d+\/
21261
21490
  var _WIZARD_TIMEOUTS = [10, 20, 40, 80];
21262
21491
  function _wizard_should_launch(opts) {
21263
21492
  if (opts.no_ui) return [false, "--no-ui flag set"];
21264
- const env_no_ui = (process3.env["AGENT_CONFIG_NO_UI"] ?? "").trim();
21493
+ const env_no_ui = (process4.env["AGENT_CONFIG_NO_UI"] ?? "").trim();
21265
21494
  if (env_no_ui && env_no_ui !== "0") return [false, "AGENT_CONFIG_NO_UI env set"];
21266
- if ((process3.env["CI"] ?? "").trim()) return [false, "CI environment detected"];
21267
- if (!process3.stdout.isTTY) return [false, "stdout is not a TTY"];
21495
+ if ((process4.env["CI"] ?? "").trim()) return [false, "CI environment detected"];
21496
+ if (!process4.stdout.isTTY) return [false, "stdout is not a TTY"];
21268
21497
  const tools_raw = opts.tools;
21269
21498
  if (tools_raw && !_tools_was_all(tools_raw)) {
21270
21499
  return [false, "explicit --tools= selection (headless install)"];
@@ -21300,7 +21529,7 @@ function unlinkMissingOk(p) {
21300
21529
  }
21301
21530
  function pidAlive(pid) {
21302
21531
  try {
21303
- process3.kill(pid, 0);
21532
+ process4.kill(pid, 0);
21304
21533
  return true;
21305
21534
  } catch (err) {
21306
21535
  return err.code === "EPERM";
@@ -21325,7 +21554,7 @@ function _kill_stale_wizard_server() {
21325
21554
  }
21326
21555
  if (!_pid_is_agent_config(pid)) return;
21327
21556
  try {
21328
- process3.kill(pid, "SIGTERM");
21557
+ process4.kill(pid, "SIGTERM");
21329
21558
  } catch {
21330
21559
  unlinkMissingOk(p);
21331
21560
  return;
@@ -21340,12 +21569,12 @@ function _kill_stale_wizard_server() {
21340
21569
  }
21341
21570
  if (!exited) {
21342
21571
  try {
21343
- process3.kill(pid, "SIGKILL");
21572
+ process4.kill(pid, "SIGKILL");
21344
21573
  } catch {
21345
21574
  }
21346
21575
  }
21347
21576
  unlinkMissingOk(p);
21348
- process3.stdout.write("(Stopped the previous wizard server.)\n");
21577
+ process4.stdout.write("(Stopped the previous wizard server.)\n");
21349
21578
  }
21350
21579
  function sleepMs(ms) {
21351
21580
  const end = Date.now() + ms;
@@ -21358,7 +21587,7 @@ function _wizard_spawn(project_root, pass_project_root = true) {
21358
21587
  _kill_stale_wizard_server();
21359
21588
  const cli = _wizard_cli_dist(project_root);
21360
21589
  if (cli === null) {
21361
- process3.stdout.write(
21590
+ process4.stdout.write(
21362
21591
  "(Wizard not available \u2014 CLI bundle not built. Run 'npm run build' at the package root to produce dist/cli/.)\n"
21363
21592
  );
21364
21593
  return 0;
@@ -21367,14 +21596,14 @@ function _wizard_spawn(project_root, pass_project_root = true) {
21367
21596
  if (pass_project_root) {
21368
21597
  cmd.push("--project-root", project_root);
21369
21598
  }
21370
- const env = { ...process3.env };
21599
+ const env = { ...process4.env };
21371
21600
  return _wizard_run_sync(cmd, env, cli);
21372
21601
  }
21373
21602
  function _wizard_run_sync(cmd, env, cli) {
21374
21603
  const total = _WIZARD_TIMEOUTS.reduce((a, b) => a + b, 0);
21375
21604
  const log_path = path21.join(
21376
21605
  os8.tmpdir(),
21377
- `agent-config-wizard-${process3.pid}-${Date.now()}.log`
21606
+ `agent-config-wizard-${process4.pid}-${Date.now()}.log`
21378
21607
  );
21379
21608
  let child;
21380
21609
  let log_fd = null;
@@ -21389,7 +21618,7 @@ function _wizard_run_sync(cmd, env, cli) {
21389
21618
  });
21390
21619
  child.unref();
21391
21620
  } catch (exc) {
21392
- process3.stdout.write(
21621
+ process4.stdout.write(
21393
21622
  `(Wizard failed to start: ${String(exc)}; run 'node ${cli} install --no-open' manually.)
21394
21623
  `
21395
21624
  );
@@ -21428,7 +21657,7 @@ function _wizard_run_sync(cmd, env, cli) {
21428
21657
  if (matched_url === null) {
21429
21658
  const logLines = read_log().split("\n").filter((l) => l !== "");
21430
21659
  const tail = logLines.length ? logLines.slice(-20).join("\n ") : "(no output captured)";
21431
- process3.stdout.write(
21660
+ process4.stdout.write(
21432
21661
  `(Wizard server did not report ready within ${Math.trunc(total)}s; run 'node ${cli} install --no-open' manually.)
21433
21662
  Last output:
21434
21663
  ${tail}
@@ -21436,49 +21665,49 @@ function _wizard_run_sync(cmd, env, cli) {
21436
21665
  );
21437
21666
  return 0;
21438
21667
  }
21439
- process3.stdout.write("\n");
21440
- process3.stdout.write(`Setup wizard ready: ${matched_url}
21668
+ process4.stdout.write("\n");
21669
+ process4.stdout.write(`Setup wizard ready: ${matched_url}
21441
21670
  `);
21442
21671
  _openBrowser(matched_url);
21443
- process3.stdout.write(
21672
+ process4.stdout.write(
21444
21673
  "(Wizard server keeps running in the background \u2014 finish the wizard in the browser tab; the next install run stops any stale server.)\n"
21445
21674
  );
21446
21675
  return 0;
21447
21676
  }
21448
21677
  function _openBrowser(url) {
21449
21678
  try {
21450
- const opener = process3.platform === "darwin" ? ["open", [url]] : process3.platform === "win32" ? ["cmd", ["/c", "start", "", url]] : ["xdg-open", [url]];
21679
+ const opener = process4.platform === "darwin" ? ["open", [url]] : process4.platform === "win32" ? ["cmd", ["/c", "start", "", url]] : ["xdg-open", [url]];
21451
21680
  spawnSync2(opener[0], opener[1], { stdio: "ignore" });
21452
21681
  } catch {
21453
21682
  }
21454
21683
  }
21455
21684
  function _dry_run_summary(opts) {
21456
21685
  const target = resolvePath(
21457
- opts.custom_path || opts.project || process3.env["PROJECT_ROOT"] || process3.cwd()
21686
+ opts.custom_path || opts.project || process4.env["PROJECT_ROOT"] || process4.cwd()
21458
21687
  );
21459
21688
  const [will_launch, why_not] = _wizard_should_launch(opts);
21460
- process3.stdout.write("\n");
21461
- process3.stdout.write("[dry-run] Plan summary \u2014 no files written, no subprocesses spawned:\n");
21462
- process3.stdout.write(` profile: ${opts.profile}
21689
+ process4.stdout.write("\n");
21690
+ process4.stdout.write("[dry-run] Plan summary \u2014 no files written, no subprocesses spawned:\n");
21691
+ process4.stdout.write(` profile: ${opts.profile}
21463
21692
  `);
21464
- process3.stdout.write(` user-type: ${opts.user_type || "(none)"}
21693
+ process4.stdout.write(` user-type: ${opts.user_type || "(none)"}
21465
21694
  `);
21466
- process3.stdout.write(` scope: ${opts.scope || (opts.global_install ? "global" : "auto")}
21695
+ process4.stdout.write(` scope: ${opts.scope || (opts.global_install ? "global" : "auto")}
21467
21696
  `);
21468
- process3.stdout.write(` tools: ${opts.tools || "all"}
21697
+ process4.stdout.write(` tools: ${opts.tools || "all"}
21469
21698
  `);
21470
- process3.stdout.write(` target: ${target}
21699
+ process4.stdout.write(` target: ${target}
21471
21700
  `);
21472
- process3.stdout.write(` minimal: ${pyBool(opts.minimal)}
21701
+ process4.stdout.write(` minimal: ${pyBool(opts.minimal)}
21473
21702
  `);
21474
- process3.stdout.write(` force: ${pyBool(opts.force)}
21703
+ process4.stdout.write(` force: ${pyBool(opts.force)}
21475
21704
  `);
21476
- process3.stdout.write(` offline: ${pyBool(opts.offline)}
21705
+ process4.stdout.write(` offline: ${pyBool(opts.offline)}
21477
21706
  `);
21478
21707
  if (will_launch) {
21479
- process3.stdout.write(" wizard: Would auto-launch (pass --no-ui to suppress).\n");
21708
+ process4.stdout.write(" wizard: Would auto-launch (pass --no-ui to suppress).\n");
21480
21709
  } else {
21481
- process3.stdout.write(` wizard: Suppressed (${why_not}).
21710
+ process4.stdout.write(` wizard: Suppressed (${why_not}).
21482
21711
  `);
21483
21712
  }
21484
21713
  if (opts.global_install) {
@@ -21492,21 +21721,21 @@ function _dry_run_summary(opts) {
21492
21721
  preview = {};
21493
21722
  }
21494
21723
  const total = Object.values(preview).reduce((a, v) => a + v.length, 0);
21495
- process3.stdout.write("\n");
21724
+ process4.stdout.write("\n");
21496
21725
  if (total === 0) {
21497
- process3.stdout.write(" reap (cleanup): nothing to reap \u2014 no stale deployed files.\n");
21726
+ process4.stdout.write(" reap (cleanup): nothing to reap \u2014 no stale deployed files.\n");
21498
21727
  } else {
21499
- process3.stdout.write(` reap (cleanup): would remove ${total} stale file(s):
21728
+ process4.stdout.write(` reap (cleanup): would remove ${total} stale file(s):
21500
21729
  `);
21501
21730
  for (const tool_id of Object.keys(preview).sort()) {
21502
21731
  for (const p of preview[tool_id]) {
21503
- process3.stdout.write(` ${tool_id}: ${p}
21732
+ process4.stdout.write(` ${tool_id}: ${p}
21504
21733
  `);
21505
21734
  }
21506
21735
  }
21507
21736
  }
21508
21737
  }
21509
- process3.stdout.write("\n");
21738
+ process4.stdout.write("\n");
21510
21739
  return 0;
21511
21740
  }
21512
21741
  function pyBool(v) {
@@ -21515,45 +21744,45 @@ function pyBool(v) {
21515
21744
  function _apply_payload_preview(payload, opts) {
21516
21745
  const schema_version = payload["schema_version"] ?? "<missing>";
21517
21746
  const target = resolvePath(
21518
- opts.custom_path || opts.project || process3.env["PROJECT_ROOT"] || process3.cwd()
21747
+ opts.custom_path || opts.project || process4.env["PROJECT_ROOT"] || process4.cwd()
21519
21748
  );
21520
- process3.stdout.write("\n");
21521
- process3.stdout.write(
21749
+ process4.stdout.write("\n");
21750
+ process4.stdout.write(
21522
21751
  "[apply-payload] Plan summary \u2014 no files written, no subprocesses spawned:\n"
21523
21752
  );
21524
- process3.stdout.write(` schema: ${schema_version}
21753
+ process4.stdout.write(` schema: ${schema_version}
21525
21754
  `);
21526
21755
  if (schema_version === "wizard-v2") {
21527
21756
  const tools = payload["tools"] || [];
21528
21757
  const packs = payload["packs"] || [];
21529
21758
  const settings = payload["settings"] || {};
21530
21759
  const scope_to_project = Boolean(payload["scope_to_project_only"] ?? false);
21531
- process3.stdout.write(` tools: ${tools.length ? tools.join(",") : "(none)"}
21760
+ process4.stdout.write(` tools: ${tools.length ? tools.join(",") : "(none)"}
21532
21761
  `);
21533
- process3.stdout.write(` packs: ${packs.length ? packs.join(",") : "(base)"}
21762
+ process4.stdout.write(` packs: ${packs.length ? packs.join(",") : "(base)"}
21534
21763
  `);
21535
- process3.stdout.write(` settings: ${Object.keys(settings).length} top-level key(s)
21764
+ process4.stdout.write(` settings: ${Object.keys(settings).length} top-level key(s)
21536
21765
  `);
21537
- process3.stdout.write(` scope: ${scope_to_project ? "project" : "global"}
21766
+ process4.stdout.write(` scope: ${scope_to_project ? "project" : "global"}
21538
21767
  `);
21539
21768
  } else if (schema_version === "installer-v1") {
21540
21769
  const ai_tools = payload["ai_tools"] || [];
21541
21770
  const configs = payload["configs"] || {};
21542
- process3.stdout.write(` ai_tools: ${ai_tools.length ? ai_tools.join(",") : "(none)"}
21771
+ process4.stdout.write(` ai_tools: ${ai_tools.length ? ai_tools.join(",") : "(none)"}
21543
21772
  `);
21544
- process3.stdout.write(` configs: ${Object.keys(configs).length} tool config(s)
21773
+ process4.stdout.write(` configs: ${Object.keys(configs).length} tool config(s)
21545
21774
  `);
21546
21775
  } else {
21547
- process3.stdout.write(` error: unsupported schema_version: ${pyRepr(schema_version)}
21776
+ process4.stdout.write(` error: unsupported schema_version: ${pyRepr(schema_version)}
21548
21777
  `);
21549
- process3.stdout.write("\n");
21778
+ process4.stdout.write("\n");
21550
21779
  return 2;
21551
21780
  }
21552
- process3.stdout.write(` target: ${target}
21781
+ process4.stdout.write(` target: ${target}
21553
21782
  `);
21554
- process3.stdout.write(` dry_run: ${pyBool(Boolean(payload["dry_run"] ?? opts.dry_run))}
21783
+ process4.stdout.write(` dry_run: ${pyBool(Boolean(payload["dry_run"] ?? opts.dry_run))}
21555
21784
  `);
21556
- process3.stdout.write("\n");
21785
+ process4.stdout.write("\n");
21557
21786
  return 0;
21558
21787
  }
21559
21788
  function pyRepr(v) {
@@ -21626,8 +21855,8 @@ function main2(argv) {
21626
21855
  state.QUIET = true;
21627
21856
  }
21628
21857
  if (opts.offline) {
21629
- process3.env["AGENT_CONFIG_OFFLINE"] = "1";
21630
- process3.env["AGENT_CONFIG_NO_UPDATE_CHECK"] = "1";
21858
+ process4.env["AGENT_CONFIG_OFFLINE"] = "1";
21859
+ process4.env["AGENT_CONFIG_NO_UPDATE_CHECK"] = "1";
21631
21860
  }
21632
21861
  if (!SUPPORTED_PROFILES.includes(opts.profile)) {
21633
21862
  fail(`Unsupported profile: ${opts.profile}. Supported: ${SUPPORTED_PROFILES.join(", ")}`);
@@ -21645,7 +21874,7 @@ function main2(argv) {
21645
21874
  }
21646
21875
  if (opts.minimal) {
21647
21876
  const target_root = resolvePath(
21648
- opts.custom_path || opts.project || process3.env["PROJECT_ROOT"] || process3.cwd()
21877
+ opts.custom_path || opts.project || process4.env["PROJECT_ROOT"] || process4.cwd()
21649
21878
  );
21650
21879
  const minimal_package_root = path21.dirname(
21651
21880
  path21.dirname(path21.dirname(_minimal_templates_root()))
@@ -21653,7 +21882,7 @@ function main2(argv) {
21653
21882
  const validated_user_type = _validate_user_type(minimal_package_root, opts.user_type);
21654
21883
  return install_minimal(target_root, opts.force, validated_user_type);
21655
21884
  }
21656
- const detect_root = resolvePath(opts.project || process3.env["PROJECT_ROOT"] || process3.cwd());
21885
+ const detect_root = resolvePath(opts.project || process4.env["PROJECT_ROOT"] || process4.cwd());
21657
21886
  const [detected, detect_reason] = detect_scope(detect_root);
21658
21887
  const custom_path = opts.custom_path ? resolvePath(opts.custom_path) : null;
21659
21888
  const scope = _resolve_scope(opts, detected, detect_reason, custom_path);
@@ -21679,7 +21908,7 @@ function main2(argv) {
21679
21908
  }
21680
21909
  return rc2;
21681
21910
  }
21682
- const project_root = custom_path || resolvePath(opts.project || process3.env["PROJECT_ROOT"] || process3.cwd());
21911
+ const project_root = custom_path || resolvePath(opts.project || process4.env["PROJECT_ROOT"] || process4.cwd());
21683
21912
  const is_first_run = !pathExists(path21.join(project_root, SETTINGS_FILE));
21684
21913
  const rc = _main_project_install(opts, project_root, parsed_tools, is_first_run);
21685
21914
  if (rc === 0 && opts.interactive) {
@@ -21689,7 +21918,7 @@ function main2(argv) {
21689
21918
  return rc;
21690
21919
  }
21691
21920
  function _propose_modules_config(project_root, is_first_run) {
21692
- if (!is_first_run || state.QUIET || !process3.stdin.isTTY || !process3.stdout.isTTY) return;
21921
+ if (!is_first_run || state.QUIET || !process4.stdin.isTTY || !process4.stdout.isTTY) return;
21693
21922
  let candidates;
21694
21923
  try {
21695
21924
  candidates = detect_module_roots(project_root);
@@ -21697,21 +21926,21 @@ function _propose_modules_config(project_root, is_first_run) {
21697
21926
  return;
21698
21927
  }
21699
21928
  if (!candidates || candidates.length === 0) return;
21700
- process3.stdout.write("\n");
21929
+ process4.stdout.write("\n");
21701
21930
  info("Module-root candidates detected \u2014 propose `modules:` block");
21702
21931
  info("Paste into .agent-project-settings.yml to enable module-aware skills (or skip; the block stays opt-in).");
21703
- process3.stdout.write("\n");
21704
- process3.stdout.write(" modules:\n");
21705
- process3.stdout.write(" enabled: true\n");
21706
- process3.stdout.write(" root_paths: [" + candidates.map((c) => c.path).join(", ") + "]\n");
21932
+ process4.stdout.write("\n");
21933
+ process4.stdout.write(" modules:\n");
21934
+ process4.stdout.write(" enabled: true\n");
21935
+ process4.stdout.write(" root_paths: [" + candidates.map((c) => c.path).join(", ") + "]\n");
21707
21936
  const primary_ns = candidates.find((c) => c.namespace_template_guess)?.namespace_template_guess ?? "";
21708
21937
  if (primary_ns) {
21709
- process3.stdout.write(` namespace_template: '${primary_ns}'
21938
+ process4.stdout.write(` namespace_template: '${primary_ns}'
21710
21939
  `);
21711
21940
  }
21712
- process3.stdout.write(" agent_folder: agents\n");
21713
- process3.stdout.write(" skip_dirs: [.module-template, .example]\n");
21714
- process3.stdout.write("\n");
21941
+ process4.stdout.write(" agent_folder: agents\n");
21942
+ process4.stdout.write(" skip_dirs: [.module-template, .example]\n");
21943
+ process4.stdout.write("\n");
21715
21944
  info(
21716
21945
  "Re-run anytime via `./scripts-run src/scripts/propose_modules_config` (installed under <package>/src/scripts/)."
21717
21946
  );
@@ -21804,14 +22033,14 @@ function _main_project_install(opts, project_root, parsed_tools, is_first_run) {
21804
22033
  package_type = detect_package_type(package_root);
21805
22034
  }
21806
22035
  if (!state.QUIET) {
21807
- process3.stdout.write("\n");
22036
+ process4.stdout.write("\n");
21808
22037
  info("Agent Config \u2014 Project Bridge Installer");
21809
22038
  info(`Project: ${project_root}`);
21810
22039
  info(`Package: ${package_root}`);
21811
22040
  info(`Type: ${package_type}`);
21812
22041
  info(`Profile: ${opts.profile}`);
21813
22042
  if (opts.user_type) info(`UserType: ${opts.user_type}`);
21814
- process3.stdout.write("\n");
22043
+ process4.stdout.write("\n");
21815
22044
  }
21816
22045
  ensure_agent_settings(project_root, package_root, opts.profile, opts.force, opts.user_type, opts.packs ?? null);
21817
22046
  _write_install_mode_marker(project_root, "full");
@@ -21823,11 +22052,9 @@ function _main_project_install(opts, project_root, parsed_tools, is_first_run) {
21823
22052
  ...ensure_augment_bridge(project_root, opts.force)
21824
22053
  ];
21825
22054
  if (_is_tool_enabled(tools, "claude-code")) {
21826
- merged_keys_by_tool["claude-code"] = [
21827
- ...ensure_claude_bridge(project_root, opts.force),
21828
- ...ensure_mcp_bridge(project_root, opts.force)
21829
- ];
22055
+ merged_keys_by_tool["claude-code"] = ensure_claude_bridge(project_root, opts.force);
21830
22056
  }
22057
+ registerMcpHosts(merge_json_file, project_root, opts.force, package_root, tools, merged_keys_by_tool);
21831
22058
  if (_is_tool_enabled(tools, "cursor")) {
21832
22059
  merged_keys_by_tool["cursor"] = ensure_cursor_bridge(project_root, opts.force);
21833
22060
  }
@@ -21877,7 +22104,7 @@ function _main_project_install(opts, project_root, parsed_tools, is_first_run) {
21877
22104
  }
21878
22105
  if (!opts.skip_bridges && !opts.no_smoke) {
21879
22106
  if (!state.QUIET) {
21880
- process3.stdout.write("\n");
22107
+ process4.stdout.write("\n");
21881
22108
  info("Smoke-testing installed hook bridges (dry-run)");
21882
22109
  }
21883
22110
  _smoke_test_hooks(project_root, package_root);
@@ -21898,34 +22125,35 @@ function _main_project_install(opts, project_root, parsed_tools, is_first_run) {
21898
22125
  finalize_claude_model_tiers(project_root);
21899
22126
  }
21900
22127
  if (!state.QUIET) {
21901
- process3.stdout.write("\n");
22128
+ process4.stdout.write("\n");
21902
22129
  success("Done.");
21903
22130
  if (is_first_run) {
21904
- process3.stdout.write("\n");
21905
- process3.stdout.write(" Try these 3 prompts with your agent:\n");
21906
- process3.stdout.write(' 1. "Refactor this function" \u2192 agent analyzes first\n');
21907
- process3.stdout.write(' 2. "Add caching to this" \u2192 agent asks instead of guessing\n');
21908
- process3.stdout.write(' 3. "Implement this feature" \u2192 agent respects your codebase\n');
21909
- process3.stdout.write("\n");
21910
- process3.stdout.write(" Next steps:\n");
21911
- process3.stdout.write(" \u2022 Commit .agent-settings.yml and bridge files to your repo\n");
21912
- process3.stdout.write(" \u2022 New team members run `npx @event4u/agent-config init` \u2014 done\n");
21913
- process3.stdout.write(" \u2022 Inspect hook coverage: ./agent-config hooks:status\n");
21914
- process3.stdout.write(
22131
+ process4.stdout.write("\n");
22132
+ process4.stdout.write(" Try these 3 prompts with your agent:\n");
22133
+ process4.stdout.write(' 1. "Refactor this function" \u2192 agent analyzes first\n');
22134
+ process4.stdout.write(' 2. "Add caching to this" \u2192 agent asks instead of guessing\n');
22135
+ process4.stdout.write(' 3. "Implement this feature" \u2192 agent respects your codebase\n');
22136
+ process4.stdout.write("\n");
22137
+ process4.stdout.write(" Next steps:\n");
22138
+ process4.stdout.write(" \u2022 Commit .agent-settings.yml and bridge files to your repo\n");
22139
+ process4.stdout.write(" \u2022 New team members run `npx @event4u/agent-config init` \u2014 done\n");
22140
+ process4.stdout.write(" \u2022 Inspect hook coverage: ./agent-config hooks:status\n");
22141
+ process4.stdout.write(
21915
22142
  " \u2022 Full walkthrough: https://github.com/event4u-app/agent-config/blob/main/docs/getting-started.md\n"
21916
22143
  );
21917
- process3.stdout.write("\n");
22144
+ process4.stdout.write("\n");
21918
22145
  } else {
21919
- process3.stdout.write(
22146
+ process4.stdout.write(
21920
22147
  " Re-run complete. Walkthrough: https://github.com/event4u-app/agent-config/blob/main/docs/getting-started.md\n"
21921
22148
  );
21922
- process3.stdout.write("\n");
22149
+ process4.stdout.write("\n");
21923
22150
  }
22151
+ printResiduals(tools, state.QUIET);
21924
22152
  if (_is_tool_enabled(tools, "claude-code")) {
21925
22153
  const team_hint = _team_setup_hint_line(project_root);
21926
22154
  if (team_hint !== null) {
21927
- process3.stdout.write(team_hint + "\n");
21928
- process3.stdout.write("\n");
22155
+ process4.stdout.write(team_hint + "\n");
22156
+ process4.stdout.write("\n");
21929
22157
  }
21930
22158
  }
21931
22159
  }
@@ -21937,21 +22165,21 @@ function _main_project_install(opts, project_root, parsed_tools, is_first_run) {
21937
22165
  return 0;
21938
22166
  }
21939
22167
  function _resolvedArgv1() {
21940
- if (process3.argv[1] === void 0) return void 0;
22168
+ if (process4.argv[1] === void 0) return void 0;
21941
22169
  try {
21942
- return fs24.realpathSync(path21.resolve(process3.argv[1]));
22170
+ return fs24.realpathSync(path21.resolve(process4.argv[1]));
21943
22171
  } catch {
21944
- return path21.resolve(process3.argv[1]);
22172
+ return path21.resolve(process4.argv[1]);
21945
22173
  }
21946
22174
  }
21947
22175
  var _argv1 = _resolvedArgv1();
21948
22176
  var _isCliEntry2 = _argv1 !== void 0 && import.meta.url === pathToFileURL2(_argv1).href;
21949
22177
  if (_isCliEntry2 || _argv1 === _HERE2) {
21950
22178
  try {
21951
- process3.exitCode = main2(process3.argv.slice(2));
22179
+ process4.exitCode = main2(process4.argv.slice(2));
21952
22180
  } catch (e) {
21953
22181
  if (e instanceof SystemExitError || e instanceof ArgparseExit2) {
21954
- process3.exitCode = e.code;
22182
+ process4.exitCode = e.code;
21955
22183
  } else {
21956
22184
  throw e;
21957
22185
  }