@cleocode/core 2026.3.45 → 2026.3.47

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 (154) hide show
  1. package/dist/bootstrap.d.ts.map +1 -1
  2. package/dist/index.js +1508 -377
  3. package/dist/index.js.map +4 -4
  4. package/dist/init.d.ts.map +1 -1
  5. package/dist/injection.d.ts +1 -1
  6. package/dist/injection.d.ts.map +1 -1
  7. package/dist/routing/capability-matrix.d.ts +6 -4
  8. package/dist/routing/capability-matrix.d.ts.map +1 -1
  9. package/dist/scaffold.d.ts +35 -9
  10. package/dist/scaffold.d.ts.map +1 -1
  11. package/dist/skills/agents/install.d.ts.map +1 -1
  12. package/dist/skills/routing-table.d.ts +17 -16
  13. package/dist/skills/routing-table.d.ts.map +1 -1
  14. package/dist/skills/skill-paths.d.ts.map +1 -1
  15. package/dist/system/health.d.ts.map +1 -1
  16. package/dist/ui/index.d.ts +0 -1
  17. package/dist/ui/index.d.ts.map +1 -1
  18. package/package.json +9 -4
  19. package/schemas/adr-frontmatter.schema.json +72 -0
  20. package/schemas/agent-configs.schema.json +120 -0
  21. package/schemas/agent-registry.json +243 -0
  22. package/schemas/agent-registry.schema.json +132 -0
  23. package/schemas/archive/research-manifest.schema.json +257 -0
  24. package/schemas/archive.schema.json +450 -0
  25. package/schemas/brain-decision.schema.json +69 -0
  26. package/schemas/brain-learning.schema.json +57 -0
  27. package/schemas/brain-pattern.schema.json +72 -0
  28. package/schemas/config.schema.json +2606 -0
  29. package/schemas/context-state.schema.json +137 -0
  30. package/schemas/contribution.schema.json +722 -0
  31. package/schemas/critical-path.schema.json +246 -0
  32. package/schemas/deps-cache.schema.json +97 -0
  33. package/schemas/doctor-output.schema.json +283 -0
  34. package/schemas/error.schema.json +161 -0
  35. package/schemas/export-package.schema.json +375 -0
  36. package/schemas/global-config.schema.json +219 -0
  37. package/schemas/grade.schema.json +49 -0
  38. package/schemas/log.schema.json +250 -0
  39. package/schemas/metrics.schema.json +328 -0
  40. package/schemas/migrations.schema.json +150 -0
  41. package/schemas/nexus-registry.schema.json +90 -0
  42. package/schemas/operation-constitution.schema.json +438 -0
  43. package/schemas/output.schema.json +164 -0
  44. package/schemas/project-context.schema.json +164 -0
  45. package/schemas/project-info.schema.json +180 -0
  46. package/schemas/projects-registry.schema.json +107 -0
  47. package/schemas/protocol-frontmatter.schema.json +72 -0
  48. package/schemas/rcasd-consensus-report.schema.json +10 -0
  49. package/schemas/rcasd-evidence.schema.json +42 -0
  50. package/schemas/rcasd-gate-result.schema.json +46 -0
  51. package/schemas/rcasd-hitl-resolution.schema.json +10 -0
  52. package/schemas/rcasd-index.schema.json +10 -0
  53. package/schemas/rcasd-manifest.schema.json +10 -0
  54. package/schemas/rcasd-research-output.schema.json +10 -0
  55. package/schemas/rcasd-spec-frontmatter.schema.json +10 -0
  56. package/schemas/rcasd-stage-transition.schema.json +38 -0
  57. package/schemas/releases.schema.json +267 -0
  58. package/schemas/skills-manifest.schema.json +91 -0
  59. package/schemas/skillsmp.schema.json +208 -0
  60. package/schemas/spec-index.schema.json +196 -0
  61. package/schemas/system-flow-atlas.schema.json +125 -0
  62. package/src/__tests__/injection-chain.test.d.ts +4 -3
  63. package/src/__tests__/injection-chain.test.d.ts.map +1 -1
  64. package/src/__tests__/injection-chain.test.js +11 -10
  65. package/src/__tests__/injection-chain.test.js.map +1 -1
  66. package/src/__tests__/injection-chain.test.ts +11 -10
  67. package/src/__tests__/injection-mvi-tiers.test.js +4 -2
  68. package/src/__tests__/injection-mvi-tiers.test.js.map +1 -1
  69. package/src/__tests__/injection-mvi-tiers.test.ts +4 -2
  70. package/src/agents/__tests__/capacity.test.d.ts +7 -0
  71. package/src/agents/__tests__/capacity.test.d.ts.map +1 -0
  72. package/src/agents/__tests__/capacity.test.js +173 -0
  73. package/src/agents/__tests__/capacity.test.js.map +1 -0
  74. package/src/agents/__tests__/registry.test.d.ts +8 -0
  75. package/src/agents/__tests__/registry.test.d.ts.map +1 -0
  76. package/src/agents/__tests__/registry.test.js +348 -0
  77. package/src/agents/__tests__/registry.test.js.map +1 -0
  78. package/src/agents/__tests__/retry.test.d.ts +7 -0
  79. package/src/agents/__tests__/retry.test.d.ts.map +1 -0
  80. package/src/agents/__tests__/retry.test.js +225 -0
  81. package/src/agents/__tests__/retry.test.js.map +1 -0
  82. package/src/bootstrap.ts +37 -6
  83. package/src/init.ts +63 -18
  84. package/src/injection.ts +11 -5
  85. package/src/intelligence/__tests__/impact.test.d.ts +15 -0
  86. package/src/intelligence/__tests__/impact.test.d.ts.map +1 -0
  87. package/src/intelligence/__tests__/impact.test.js +384 -0
  88. package/src/intelligence/__tests__/impact.test.js.map +1 -0
  89. package/src/intelligence/__tests__/patterns.test.d.ts +8 -0
  90. package/src/intelligence/__tests__/patterns.test.d.ts.map +1 -0
  91. package/src/intelligence/__tests__/patterns.test.js +370 -0
  92. package/src/intelligence/__tests__/patterns.test.js.map +1 -0
  93. package/src/intelligence/__tests__/prediction.test.d.ts +8 -0
  94. package/src/intelligence/__tests__/prediction.test.d.ts.map +1 -0
  95. package/src/intelligence/__tests__/prediction.test.js +314 -0
  96. package/src/intelligence/__tests__/prediction.test.js.map +1 -0
  97. package/src/nexus/__tests__/nexus-e2e.test.d.ts +12 -0
  98. package/src/nexus/__tests__/nexus-e2e.test.d.ts.map +1 -0
  99. package/src/nexus/__tests__/nexus-e2e.test.js +1220 -0
  100. package/src/nexus/__tests__/nexus-e2e.test.js.map +1 -0
  101. package/src/nexus/__tests__/transfer.test.d.ts +8 -0
  102. package/src/nexus/__tests__/transfer.test.d.ts.map +1 -0
  103. package/src/nexus/__tests__/transfer.test.js +372 -0
  104. package/src/nexus/__tests__/transfer.test.js.map +1 -0
  105. package/src/nexus/__tests__/transfer.test.ts +1 -1
  106. package/src/routing/capability-matrix.ts +1435 -205
  107. package/src/scaffold.ts +70 -13
  108. package/src/sessions/__tests__/briefing.test.js +28 -2
  109. package/src/sessions/__tests__/briefing.test.js.map +1 -1
  110. package/src/skills/__tests__/routing-table.test.js +48 -31
  111. package/src/skills/__tests__/routing-table.test.js.map +1 -1
  112. package/src/skills/__tests__/routing-table.test.ts +53 -33
  113. package/src/skills/agents/install.ts +9 -1
  114. package/src/skills/orchestrator/__tests__/spawn-tier.test.js +41 -32
  115. package/src/skills/orchestrator/__tests__/spawn-tier.test.js.map +1 -1
  116. package/src/skills/routing-table.ts +39 -253
  117. package/src/skills/skill-paths.ts +3 -2
  118. package/src/store/__tests__/project-detect.test.js +1 -1
  119. package/src/store/__tests__/project-detect.test.js.map +1 -1
  120. package/src/store/__tests__/project-detect.test.ts +1 -1
  121. package/src/store/__tests__/test-db-helper.d.ts.map +1 -1
  122. package/src/store/__tests__/test-db-helper.js +0 -1
  123. package/src/store/__tests__/test-db-helper.js.map +1 -1
  124. package/src/system/health.ts +18 -7
  125. package/src/ui/index.ts +0 -6
  126. package/src/validation/operation-gate-validators.ts +2 -2
  127. package/templates/CLEO-INJECTION.md +120 -0
  128. package/templates/README.md +29 -0
  129. package/templates/agent-registry.json +305 -0
  130. package/templates/cleo-gitignore +74 -0
  131. package/templates/config.template.json +187 -0
  132. package/templates/git-hooks/commit-msg +149 -0
  133. package/templates/git-hooks/pre-commit +40 -0
  134. package/templates/git-hooks/pre-push +79 -0
  135. package/templates/github/ISSUE_TEMPLATE/bug_report.yml +143 -0
  136. package/templates/github/ISSUE_TEMPLATE/config.yml +8 -0
  137. package/templates/github/ISSUE_TEMPLATE/feature_request.yml +125 -0
  138. package/templates/github/ISSUE_TEMPLATE/help_question.yml +99 -0
  139. package/templates/global-config.template.json +56 -0
  140. package/templates/hooks/precompact-safestop.sh +89 -0
  141. package/templates/issue-templates/bug_report.yml +143 -0
  142. package/templates/issue-templates/config.yml +8 -0
  143. package/templates/issue-templates/feature_request.yml +125 -0
  144. package/templates/issue-templates/help_question.yml +99 -0
  145. package/templates/skillsmp.json.example +28 -0
  146. package/templates/skillsmp.json.example.md +214 -0
  147. package/dist/ui/injection-legacy.d.ts +0 -26
  148. package/dist/ui/injection-legacy.d.ts.map +0 -1
  149. package/src/ui/__tests__/injection-registry.test.d.ts +0 -11
  150. package/src/ui/__tests__/injection-registry.test.d.ts.map +0 -1
  151. package/src/ui/__tests__/injection-registry.test.js +0 -46
  152. package/src/ui/__tests__/injection-registry.test.js.map +0 -1
  153. package/src/ui/__tests__/injection-registry.test.ts +0 -57
  154. package/src/ui/injection-legacy.ts +0 -44
package/dist/index.js CHANGED
@@ -18472,16 +18472,6 @@ var init_json_schema_validator = __esm({
18472
18472
  });
18473
18473
 
18474
18474
  // packages/core/src/schema-management.ts
18475
- var schema_management_exports = {};
18476
- __export(schema_management_exports, {
18477
- checkGlobalSchemas: () => checkGlobalSchemas,
18478
- checkSchemaStaleness: () => checkSchemaStaleness,
18479
- cleanProjectSchemas: () => cleanProjectSchemas,
18480
- ensureGlobalSchemas: () => ensureGlobalSchemas,
18481
- getSchemaVersion: () => getSchemaVersion2,
18482
- listInstalledSchemas: () => listInstalledSchemas,
18483
- resolveSchemaPath: () => resolveSchemaPath
18484
- });
18485
18475
  import {
18486
18476
  copyFileSync as copyFileSync4,
18487
18477
  existsSync as existsSync30,
@@ -18607,70 +18597,6 @@ function checkGlobalSchemas() {
18607
18597
  stale
18608
18598
  };
18609
18599
  }
18610
- function checkSchemaStaleness() {
18611
- const globalDir = getCleoSchemasDir();
18612
- const bundledFiles = listBundledSchemas();
18613
- const stale = [];
18614
- const current = [];
18615
- const missing = [];
18616
- const packageRoot = getPackageRoot();
18617
- const bundledDir = join34(packageRoot, "schemas");
18618
- for (const file2 of bundledFiles) {
18619
- const globalPath = join34(globalDir, file2);
18620
- if (!existsSync30(globalPath)) {
18621
- missing.push(file2);
18622
- continue;
18623
- }
18624
- const bundledVersion = readVersionFromPath(join34(bundledDir, file2));
18625
- const globalVersion = readVersionFromPath(globalPath);
18626
- if (bundledVersion !== null && bundledVersion !== globalVersion) {
18627
- stale.push(file2);
18628
- } else {
18629
- current.push(file2);
18630
- }
18631
- }
18632
- return { stale, current, missing };
18633
- }
18634
- function listInstalledSchemas() {
18635
- const globalDir = getCleoSchemasDir();
18636
- if (!existsSync30(globalDir)) return [];
18637
- let files;
18638
- try {
18639
- files = readdirSync16(globalDir).filter((f) => f.endsWith(".schema.json"));
18640
- } catch {
18641
- return [];
18642
- }
18643
- return files.map((name2) => {
18644
- const fullPath = join34(globalDir, name2);
18645
- return {
18646
- name: name2,
18647
- path: fullPath,
18648
- version: readVersionFromPath(fullPath)
18649
- };
18650
- });
18651
- }
18652
- async function cleanProjectSchemas(projectRoot) {
18653
- const projectSchemasDir = join34(projectRoot, ".cleo", "schemas");
18654
- if (!existsSync30(projectSchemasDir)) {
18655
- return { cleaned: false };
18656
- }
18657
- try {
18658
- const stat2 = statSync7(projectSchemasDir);
18659
- if (!stat2.isDirectory()) {
18660
- return { cleaned: false };
18661
- }
18662
- } catch {
18663
- return { cleaned: false };
18664
- }
18665
- const timestamp2 = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
18666
- const backupDir = join34(projectRoot, ".cleo", "backups", "schemas");
18667
- const backupTarget = join34(backupDir, `schemas-${timestamp2}`);
18668
- if (!existsSync30(backupDir)) {
18669
- mkdirSync8(backupDir, { recursive: true });
18670
- }
18671
- renameSync3(projectSchemasDir, backupTarget);
18672
- return { cleaned: true };
18673
- }
18674
18600
  var init_schema_management = __esm({
18675
18601
  "packages/core/src/schema-management.ts"() {
18676
18602
  "use strict";
@@ -18876,7 +18802,7 @@ async function ensureInjection(projectRoot) {
18876
18802
  }
18877
18803
  }
18878
18804
  const agentsMdPath = join36(projectRoot, "AGENTS.md");
18879
- const agentsMdLines = ["@~/.cleo/templates/CLEO-INJECTION.md"];
18805
+ const agentsMdLines = ["@~/.agents/AGENTS.md"];
18880
18806
  const projectContextPath = join36(projectRoot, ".cleo", "project-context.json");
18881
18807
  if (existsSync32(projectContextPath)) {
18882
18808
  agentsMdLines.push("@.cleo/project-context.json");
@@ -18889,7 +18815,8 @@ async function ensureInjection(projectRoot) {
18889
18815
  if (contributorBlock) {
18890
18816
  agentsMdLines.push(contributorBlock);
18891
18817
  }
18892
- const agentsAction = await inject2(agentsMdPath, agentsMdLines.join("\n"));
18818
+ const agentsMdContent = agentsMdLines.join("\n");
18819
+ const agentsAction = await inject2(agentsMdPath, agentsMdContent);
18893
18820
  actions.push(`AGENTS.md CLEO content (${agentsAction})`);
18894
18821
  const content = getInjectionTemplateContent();
18895
18822
  if (content) {
@@ -18904,8 +18831,9 @@ async function ensureInjection(projectRoot) {
18904
18831
  try {
18905
18832
  const globalAgentsDir = getAgentsHome();
18906
18833
  const globalAgentsMd = join36(globalAgentsDir, "AGENTS.md");
18834
+ const globalHubContent = "@~/.cleo/templates/CLEO-INJECTION.md";
18907
18835
  await mkdir4(globalAgentsDir, { recursive: true });
18908
- await inject2(globalAgentsMd, "@~/.cleo/templates/CLEO-INJECTION.md");
18836
+ await inject2(globalAgentsMd, globalHubContent);
18909
18837
  } catch {
18910
18838
  }
18911
18839
  return {
@@ -19085,6 +19013,7 @@ __export(scaffold_exports, {
19085
19013
  CLEO_GITIGNORE_FALLBACK: () => CLEO_GITIGNORE_FALLBACK,
19086
19014
  REQUIRED_CLEO_SUBDIRS: () => REQUIRED_CLEO_SUBDIRS,
19087
19015
  REQUIRED_GLOBAL_SUBDIRS: () => REQUIRED_GLOBAL_SUBDIRS,
19016
+ STALE_GLOBAL_ENTRIES: () => STALE_GLOBAL_ENTRIES,
19088
19017
  checkBrainDb: () => checkBrainDb,
19089
19018
  checkCleoGitRepo: () => checkCleoGitRepo,
19090
19019
  checkCleoStructure: () => checkCleoStructure,
@@ -19121,7 +19050,7 @@ __export(scaffold_exports, {
19121
19050
  import { execFile as execFile3 } from "node:child_process";
19122
19051
  import { randomUUID } from "node:crypto";
19123
19052
  import { existsSync as existsSync33, constants as fsConstants3, readFileSync as readFileSync22, statSync as statSync8 } from "node:fs";
19124
- import { access as access3, mkdir as mkdir5, readFile as readFile6, writeFile as writeFile5 } from "node:fs/promises";
19053
+ import { access as access3, mkdir as mkdir5, readFile as readFile6, rm as rm2, writeFile as writeFile5 } from "node:fs/promises";
19125
19054
  import { dirname as dirname8, join as join37, resolve as resolve5 } from "node:path";
19126
19055
  import { fileURLToPath as fileURLToPath4 } from "node:url";
19127
19056
  import { promisify as promisify3 } from "node:util";
@@ -19136,7 +19065,7 @@ async function fileExists(path2) {
19136
19065
  async function stripCLEOBlocks(filePath) {
19137
19066
  if (!existsSync33(filePath)) return;
19138
19067
  const content = await readFile6(filePath, "utf8");
19139
- const stripped = content.replace(/\n?<!-- CLEO:START -->[\s\S]*?<!-- CLEO:END -->\n?/g, "");
19068
+ const stripped = content.replace(/\n?<!-- CLEO:START[^>]*-->[\s\S]*?<!-- CLEO:END -->\n?/g, "");
19140
19069
  if (stripped !== content) await writeFile5(filePath, stripped, "utf8");
19141
19070
  }
19142
19071
  async function removeCleoFromRootGitignore(projectRoot) {
@@ -19413,7 +19342,7 @@ async function ensureProjectContext(projectRoot, opts) {
19413
19342
  try {
19414
19343
  const schemaPath = join37(
19415
19344
  dirname8(fileURLToPath4(import.meta.url)),
19416
- "../../schemas/project-context.schema.json"
19345
+ "../schemas/project-context.schema.json"
19417
19346
  );
19418
19347
  if (existsSync33(schemaPath)) {
19419
19348
  const AjvModule = await import("ajv");
@@ -19819,6 +19748,19 @@ async function ensureGlobalHome() {
19819
19748
  for (const subdir of REQUIRED_GLOBAL_SUBDIRS) {
19820
19749
  await mkdir5(join37(cleoHome, subdir), { recursive: true });
19821
19750
  }
19751
+ for (const stale of STALE_GLOBAL_ENTRIES) {
19752
+ const stalePath = join37(cleoHome, stale);
19753
+ if (existsSync33(stalePath)) {
19754
+ try {
19755
+ await rm2(stalePath, { recursive: true, force: true });
19756
+ console.warn(`[CLEO] Removed stale global entry: ${stalePath}`);
19757
+ } catch (err) {
19758
+ console.warn(
19759
+ `[CLEO] Could not remove stale global entry ${stalePath}: ${err instanceof Error ? err.message : String(err)}`
19760
+ );
19761
+ }
19762
+ }
19763
+ }
19822
19764
  return {
19823
19765
  action: alreadyExists ? "skipped" : "created",
19824
19766
  path: cleoHome,
@@ -19854,11 +19796,9 @@ async function ensureGlobalTemplates() {
19854
19796
  return { action: "created", path: injectionPath };
19855
19797
  }
19856
19798
  async function ensureGlobalScaffold() {
19857
- const { ensureGlobalSchemas: ensureGlobalSchemas2 } = await Promise.resolve().then(() => (init_schema_management(), schema_management_exports));
19858
19799
  const home = await ensureGlobalHome();
19859
- const schemas = ensureGlobalSchemas2();
19860
19800
  const templates = await ensureGlobalTemplates();
19861
- return { home, schemas, templates };
19801
+ return { home, templates };
19862
19802
  }
19863
19803
  function checkGlobalHome() {
19864
19804
  const cleoHome = getCleoHome();
@@ -19935,7 +19875,7 @@ function checkLogDir(projectRoot) {
19935
19875
  fix: null
19936
19876
  };
19937
19877
  }
19938
- var execFileAsync3, REQUIRED_CLEO_SUBDIRS, CLEO_GITIGNORE_FALLBACK, REQUIRED_GLOBAL_SUBDIRS;
19878
+ var execFileAsync3, REQUIRED_CLEO_SUBDIRS, CLEO_GITIGNORE_FALLBACK, REQUIRED_GLOBAL_SUBDIRS, STALE_GLOBAL_ENTRIES;
19939
19879
  var init_scaffold = __esm({
19940
19880
  "packages/core/src/scaffold.ts"() {
19941
19881
  "use strict";
@@ -19992,7 +19932,21 @@ metrics/
19992
19932
  .backups/
19993
19933
  backups/
19994
19934
  `;
19995
- REQUIRED_GLOBAL_SUBDIRS = ["schemas", "templates"];
19935
+ REQUIRED_GLOBAL_SUBDIRS = ["logs", "templates"];
19936
+ STALE_GLOBAL_ENTRIES = [
19937
+ "adrs",
19938
+ "rcasd",
19939
+ "agent-outputs",
19940
+ "backups",
19941
+ "sandbox",
19942
+ "tasks.db",
19943
+ "tasks.db-shm",
19944
+ "tasks.db-wal",
19945
+ "brain-worker.pid",
19946
+ "VERSION",
19947
+ "schemas",
19948
+ "bin"
19949
+ ];
19996
19950
  }
19997
19951
  });
19998
19952
 
@@ -41536,8 +41490,8 @@ function parseTokenMetrics(inputFile, cwd) {
41536
41490
  const raw = JSON.parse(readFileSync28(file2, "utf-8"));
41537
41491
  if (raw.resourceMetrics) {
41538
41492
  const points = [];
41539
- for (const rm2 of raw.resourceMetrics ?? []) {
41540
- for (const sm of rm2.scopeMetrics ?? []) {
41493
+ for (const rm3 of raw.resourceMetrics ?? []) {
41494
+ for (const sm of rm3.scopeMetrics ?? []) {
41541
41495
  for (const metric of sm.metrics ?? []) {
41542
41496
  if (metric.name !== "claude_code.token.usage") continue;
41543
41497
  for (const dp of metric.sum?.dataPoints ?? []) {
@@ -47551,8 +47505,8 @@ var PLATFORM_PATHS = {
47551
47505
  "gitlab-ci": ".gitlab-ci.yml",
47552
47506
  circleci: ".circleci/config.yml"
47553
47507
  };
47554
- function getPlatformPath(platform3) {
47555
- return PLATFORM_PATHS[platform3];
47508
+ function getPlatformPath(platform5) {
47509
+ return PLATFORM_PATHS[platform5];
47556
47510
  }
47557
47511
  function detectCIPlatform(projectDir) {
47558
47512
  const dir = projectDir ?? process.cwd();
@@ -47646,10 +47600,10 @@ workflows:
47646
47600
  only: /^v.*/
47647
47601
  `;
47648
47602
  }
47649
- function generateCIConfig(platform3, cwd) {
47603
+ function generateCIConfig(platform5, cwd) {
47650
47604
  const releaseConfig = loadReleaseConfig(cwd);
47651
47605
  const gates = releaseConfig.gates.map((g) => ({ name: g.name, command: g.command }));
47652
- switch (platform3) {
47606
+ switch (platform5) {
47653
47607
  case "github-actions":
47654
47608
  return generateGitHubActions({ gates });
47655
47609
  case "gitlab-ci":
@@ -47658,10 +47612,10 @@ function generateCIConfig(platform3, cwd) {
47658
47612
  return generateCircleCI({ gates });
47659
47613
  }
47660
47614
  }
47661
- function writeCIConfig(platform3, options = {}) {
47615
+ function writeCIConfig(platform5, options = {}) {
47662
47616
  const projectDir = options.projectDir ?? process.cwd();
47663
- const outputPath = join63(projectDir, getPlatformPath(platform3));
47664
- const content = generateCIConfig(platform3, projectDir);
47617
+ const outputPath = join63(projectDir, getPlatformPath(platform5));
47618
+ const content = generateCIConfig(platform5, projectDir);
47665
47619
  if (options.dryRun) {
47666
47620
  return { action: "would_write", path: outputPath, content };
47667
47621
  }
@@ -47669,9 +47623,9 @@ function writeCIConfig(platform3, options = {}) {
47669
47623
  writeFileSync6(outputPath, content, "utf-8");
47670
47624
  return { action: "wrote", path: outputPath, content };
47671
47625
  }
47672
- function validateCIConfig(platform3, projectDir) {
47626
+ function validateCIConfig(platform5, projectDir) {
47673
47627
  const dir = projectDir ?? process.cwd();
47674
- const configPath = join63(dir, getPlatformPath(platform3));
47628
+ const configPath = join63(dir, getPlatformPath(platform5));
47675
47629
  if (!existsSync59(configPath)) {
47676
47630
  return { valid: false, exists: false, errors: ["Config file not found"] };
47677
47631
  }
@@ -49213,239 +49167,1463 @@ __export(routing_exports, {
49213
49167
  var CAPABILITY_MATRIX = [
49214
49168
  // === Tasks Domain ===
49215
49169
  // Query operations
49216
- { domain: "tasks", operation: "show", gateway: "query", mode: "native" },
49217
- { domain: "tasks", operation: "list", gateway: "query", mode: "native" },
49218
- { domain: "tasks", operation: "find", gateway: "query", mode: "native" },
49219
- { domain: "tasks", operation: "tree", gateway: "query", mode: "native" },
49220
- { domain: "tasks", operation: "blockers", gateway: "query", mode: "native" },
49221
- { domain: "tasks", operation: "depends", gateway: "query", mode: "native" },
49222
- { domain: "tasks", operation: "analyze", gateway: "query", mode: "native" },
49223
- { domain: "tasks", operation: "next", gateway: "query", mode: "native" },
49224
- { domain: "tasks", operation: "plan", gateway: "query", mode: "native" },
49225
- { domain: "tasks", operation: "relates", gateway: "query", mode: "native" },
49226
- { domain: "tasks", operation: "complexity.estimate", gateway: "query", mode: "native" },
49227
- { domain: "tasks", operation: "history", gateway: "query", mode: "native" },
49228
- { domain: "tasks", operation: "current", gateway: "query", mode: "native" },
49229
- { domain: "tasks", operation: "label.list", gateway: "query", mode: "native" },
49170
+ { domain: "tasks", operation: "show", gateway: "query", mode: "native", preferredChannel: "mcp" },
49171
+ { domain: "tasks", operation: "list", gateway: "query", mode: "native", preferredChannel: "mcp" },
49172
+ { domain: "tasks", operation: "find", gateway: "query", mode: "native", preferredChannel: "mcp" },
49173
+ {
49174
+ domain: "tasks",
49175
+ operation: "tree",
49176
+ gateway: "query",
49177
+ mode: "native",
49178
+ preferredChannel: "either"
49179
+ },
49180
+ {
49181
+ domain: "tasks",
49182
+ operation: "blockers",
49183
+ gateway: "query",
49184
+ mode: "native",
49185
+ preferredChannel: "either"
49186
+ },
49187
+ {
49188
+ domain: "tasks",
49189
+ operation: "depends",
49190
+ gateway: "query",
49191
+ mode: "native",
49192
+ preferredChannel: "either"
49193
+ },
49194
+ {
49195
+ domain: "tasks",
49196
+ operation: "analyze",
49197
+ gateway: "query",
49198
+ mode: "native",
49199
+ preferredChannel: "either"
49200
+ },
49201
+ { domain: "tasks", operation: "next", gateway: "query", mode: "native", preferredChannel: "mcp" },
49202
+ { domain: "tasks", operation: "plan", gateway: "query", mode: "native", preferredChannel: "mcp" },
49203
+ {
49204
+ domain: "tasks",
49205
+ operation: "relates",
49206
+ gateway: "query",
49207
+ mode: "native",
49208
+ preferredChannel: "either"
49209
+ },
49210
+ {
49211
+ domain: "tasks",
49212
+ operation: "complexity.estimate",
49213
+ gateway: "query",
49214
+ mode: "native",
49215
+ preferredChannel: "either"
49216
+ },
49217
+ {
49218
+ domain: "tasks",
49219
+ operation: "history",
49220
+ gateway: "query",
49221
+ mode: "native",
49222
+ preferredChannel: "either"
49223
+ },
49224
+ {
49225
+ domain: "tasks",
49226
+ operation: "current",
49227
+ gateway: "query",
49228
+ mode: "native",
49229
+ preferredChannel: "mcp"
49230
+ },
49231
+ {
49232
+ domain: "tasks",
49233
+ operation: "label.list",
49234
+ gateway: "query",
49235
+ mode: "native",
49236
+ preferredChannel: "either"
49237
+ },
49230
49238
  // Mutate operations
49231
- { domain: "tasks", operation: "add", gateway: "mutate", mode: "native" },
49232
- { domain: "tasks", operation: "update", gateway: "mutate", mode: "native" },
49233
- { domain: "tasks", operation: "complete", gateway: "mutate", mode: "native" },
49234
- { domain: "tasks", operation: "cancel", gateway: "mutate", mode: "native" },
49235
- { domain: "tasks", operation: "delete", gateway: "mutate", mode: "native" },
49236
- { domain: "tasks", operation: "archive", gateway: "mutate", mode: "native" },
49237
- { domain: "tasks", operation: "restore", gateway: "mutate", mode: "native" },
49238
- { domain: "tasks", operation: "reparent", gateway: "mutate", mode: "native" },
49239
- { domain: "tasks", operation: "reorder", gateway: "mutate", mode: "native" },
49240
- { domain: "tasks", operation: "relates.add", gateway: "mutate", mode: "native" },
49241
- { domain: "tasks", operation: "start", gateway: "mutate", mode: "native" },
49242
- { domain: "tasks", operation: "stop", gateway: "mutate", mode: "native" },
49239
+ { domain: "tasks", operation: "add", gateway: "mutate", mode: "native", preferredChannel: "mcp" },
49240
+ {
49241
+ domain: "tasks",
49242
+ operation: "update",
49243
+ gateway: "mutate",
49244
+ mode: "native",
49245
+ preferredChannel: "mcp"
49246
+ },
49247
+ {
49248
+ domain: "tasks",
49249
+ operation: "complete",
49250
+ gateway: "mutate",
49251
+ mode: "native",
49252
+ preferredChannel: "mcp"
49253
+ },
49254
+ {
49255
+ domain: "tasks",
49256
+ operation: "cancel",
49257
+ gateway: "mutate",
49258
+ mode: "native",
49259
+ preferredChannel: "either"
49260
+ },
49261
+ {
49262
+ domain: "tasks",
49263
+ operation: "delete",
49264
+ gateway: "mutate",
49265
+ mode: "native",
49266
+ preferredChannel: "either"
49267
+ },
49268
+ {
49269
+ domain: "tasks",
49270
+ operation: "archive",
49271
+ gateway: "mutate",
49272
+ mode: "native",
49273
+ preferredChannel: "either"
49274
+ },
49275
+ {
49276
+ domain: "tasks",
49277
+ operation: "restore",
49278
+ gateway: "mutate",
49279
+ mode: "native",
49280
+ preferredChannel: "either"
49281
+ },
49282
+ {
49283
+ domain: "tasks",
49284
+ operation: "reparent",
49285
+ gateway: "mutate",
49286
+ mode: "native",
49287
+ preferredChannel: "either"
49288
+ },
49289
+ {
49290
+ domain: "tasks",
49291
+ operation: "reorder",
49292
+ gateway: "mutate",
49293
+ mode: "native",
49294
+ preferredChannel: "either"
49295
+ },
49296
+ {
49297
+ domain: "tasks",
49298
+ operation: "relates.add",
49299
+ gateway: "mutate",
49300
+ mode: "native",
49301
+ preferredChannel: "either"
49302
+ },
49303
+ {
49304
+ domain: "tasks",
49305
+ operation: "start",
49306
+ gateway: "mutate",
49307
+ mode: "native",
49308
+ preferredChannel: "mcp"
49309
+ },
49310
+ {
49311
+ domain: "tasks",
49312
+ operation: "stop",
49313
+ gateway: "mutate",
49314
+ mode: "native",
49315
+ preferredChannel: "mcp"
49316
+ },
49243
49317
  // Sync sub-domain (provider-agnostic task reconciliation)
49244
- { domain: "tasks", operation: "sync.reconcile", gateway: "mutate", mode: "native" },
49245
- { domain: "tasks", operation: "sync.links", gateway: "query", mode: "native" },
49246
- { domain: "tasks", operation: "sync.links.remove", gateway: "mutate", mode: "native" },
49318
+ {
49319
+ domain: "tasks",
49320
+ operation: "sync.reconcile",
49321
+ gateway: "mutate",
49322
+ mode: "native",
49323
+ preferredChannel: "either"
49324
+ },
49325
+ {
49326
+ domain: "tasks",
49327
+ operation: "sync.links",
49328
+ gateway: "query",
49329
+ mode: "native",
49330
+ preferredChannel: "either"
49331
+ },
49332
+ {
49333
+ domain: "tasks",
49334
+ operation: "sync.links.remove",
49335
+ gateway: "mutate",
49336
+ mode: "native",
49337
+ preferredChannel: "either"
49338
+ },
49247
49339
  // === Session Domain ===
49248
49340
  // Query operations
49249
- { domain: "session", operation: "status", gateway: "query", mode: "native" },
49250
- { domain: "session", operation: "list", gateway: "query", mode: "native" },
49251
- { domain: "session", operation: "show", gateway: "query", mode: "native" },
49252
- { domain: "session", operation: "decision.log", gateway: "query", mode: "native" },
49253
- { domain: "session", operation: "context.drift", gateway: "query", mode: "native" },
49254
- { domain: "session", operation: "handoff.show", gateway: "query", mode: "native" },
49255
- { domain: "session", operation: "briefing.show", gateway: "query", mode: "native" },
49256
- { domain: "session", operation: "find", gateway: "query", mode: "native" },
49341
+ {
49342
+ domain: "session",
49343
+ operation: "status",
49344
+ gateway: "query",
49345
+ mode: "native",
49346
+ preferredChannel: "mcp"
49347
+ },
49348
+ {
49349
+ domain: "session",
49350
+ operation: "list",
49351
+ gateway: "query",
49352
+ mode: "native",
49353
+ preferredChannel: "either"
49354
+ },
49355
+ {
49356
+ domain: "session",
49357
+ operation: "show",
49358
+ gateway: "query",
49359
+ mode: "native",
49360
+ preferredChannel: "either"
49361
+ },
49362
+ {
49363
+ domain: "session",
49364
+ operation: "decision.log",
49365
+ gateway: "query",
49366
+ mode: "native",
49367
+ preferredChannel: "either"
49368
+ },
49369
+ {
49370
+ domain: "session",
49371
+ operation: "context.drift",
49372
+ gateway: "query",
49373
+ mode: "native",
49374
+ preferredChannel: "either"
49375
+ },
49376
+ {
49377
+ domain: "session",
49378
+ operation: "handoff.show",
49379
+ gateway: "query",
49380
+ mode: "native",
49381
+ preferredChannel: "mcp"
49382
+ },
49383
+ {
49384
+ domain: "session",
49385
+ operation: "briefing.show",
49386
+ gateway: "query",
49387
+ mode: "native",
49388
+ preferredChannel: "mcp"
49389
+ },
49390
+ {
49391
+ domain: "session",
49392
+ operation: "find",
49393
+ gateway: "query",
49394
+ mode: "native",
49395
+ preferredChannel: "either"
49396
+ },
49257
49397
  // Mutate operations
49258
- { domain: "session", operation: "start", gateway: "mutate", mode: "native" },
49259
- { domain: "session", operation: "end", gateway: "mutate", mode: "native" },
49260
- { domain: "session", operation: "resume", gateway: "mutate", mode: "native" },
49261
- { domain: "session", operation: "suspend", gateway: "mutate", mode: "native" },
49262
- { domain: "session", operation: "gc", gateway: "mutate", mode: "native" },
49263
- { domain: "session", operation: "record.decision", gateway: "mutate", mode: "native" },
49264
- { domain: "session", operation: "record.assumption", gateway: "mutate", mode: "native" },
49398
+ {
49399
+ domain: "session",
49400
+ operation: "start",
49401
+ gateway: "mutate",
49402
+ mode: "native",
49403
+ preferredChannel: "mcp"
49404
+ },
49405
+ {
49406
+ domain: "session",
49407
+ operation: "end",
49408
+ gateway: "mutate",
49409
+ mode: "native",
49410
+ preferredChannel: "mcp"
49411
+ },
49412
+ {
49413
+ domain: "session",
49414
+ operation: "resume",
49415
+ gateway: "mutate",
49416
+ mode: "native",
49417
+ preferredChannel: "either"
49418
+ },
49419
+ {
49420
+ domain: "session",
49421
+ operation: "suspend",
49422
+ gateway: "mutate",
49423
+ mode: "native",
49424
+ preferredChannel: "either"
49425
+ },
49426
+ {
49427
+ domain: "session",
49428
+ operation: "gc",
49429
+ gateway: "mutate",
49430
+ mode: "native",
49431
+ preferredChannel: "either"
49432
+ },
49433
+ {
49434
+ domain: "session",
49435
+ operation: "record.decision",
49436
+ gateway: "mutate",
49437
+ mode: "native",
49438
+ preferredChannel: "either"
49439
+ },
49440
+ {
49441
+ domain: "session",
49442
+ operation: "record.assumption",
49443
+ gateway: "mutate",
49444
+ mode: "native",
49445
+ preferredChannel: "either"
49446
+ },
49265
49447
  // === Admin Domain ===
49266
49448
  // Query operations
49267
- { domain: "admin", operation: "version", gateway: "query", mode: "native" },
49268
- { domain: "admin", operation: "health", gateway: "query", mode: "native" },
49269
- { domain: "admin", operation: "config.show", gateway: "query", mode: "native" },
49270
- { domain: "admin", operation: "stats", gateway: "query", mode: "native" },
49271
- { domain: "admin", operation: "context", gateway: "query", mode: "native" },
49272
- { domain: "admin", operation: "runtime", gateway: "query", mode: "native" },
49273
- { domain: "admin", operation: "job", gateway: "query", mode: "native" },
49274
- { domain: "admin", operation: "dash", gateway: "query", mode: "native" },
49275
- { domain: "admin", operation: "log", gateway: "query", mode: "native" },
49276
- { domain: "admin", operation: "sequence", gateway: "query", mode: "native" },
49277
- { domain: "admin", operation: "help", gateway: "query", mode: "native" },
49278
- { domain: "admin", operation: "token", gateway: "query", mode: "native" },
49279
- { domain: "admin", operation: "export", gateway: "query", mode: "native" },
49280
- { domain: "admin", operation: "adr.show", gateway: "query", mode: "native" },
49281
- { domain: "admin", operation: "adr.find", gateway: "query", mode: "native" },
49449
+ {
49450
+ domain: "admin",
49451
+ operation: "version",
49452
+ gateway: "query",
49453
+ mode: "native",
49454
+ preferredChannel: "either"
49455
+ },
49456
+ {
49457
+ domain: "admin",
49458
+ operation: "health",
49459
+ gateway: "query",
49460
+ mode: "native",
49461
+ preferredChannel: "either"
49462
+ },
49463
+ {
49464
+ domain: "admin",
49465
+ operation: "config.show",
49466
+ gateway: "query",
49467
+ mode: "native",
49468
+ preferredChannel: "either"
49469
+ },
49470
+ {
49471
+ domain: "admin",
49472
+ operation: "stats",
49473
+ gateway: "query",
49474
+ mode: "native",
49475
+ preferredChannel: "either"
49476
+ },
49477
+ {
49478
+ domain: "admin",
49479
+ operation: "context",
49480
+ gateway: "query",
49481
+ mode: "native",
49482
+ preferredChannel: "either"
49483
+ },
49484
+ {
49485
+ domain: "admin",
49486
+ operation: "runtime",
49487
+ gateway: "query",
49488
+ mode: "native",
49489
+ preferredChannel: "either"
49490
+ },
49491
+ {
49492
+ domain: "admin",
49493
+ operation: "job",
49494
+ gateway: "query",
49495
+ mode: "native",
49496
+ preferredChannel: "either"
49497
+ },
49498
+ { domain: "admin", operation: "dash", gateway: "query", mode: "native", preferredChannel: "mcp" },
49499
+ {
49500
+ domain: "admin",
49501
+ operation: "log",
49502
+ gateway: "query",
49503
+ mode: "native",
49504
+ preferredChannel: "either"
49505
+ },
49506
+ {
49507
+ domain: "admin",
49508
+ operation: "sequence",
49509
+ gateway: "query",
49510
+ mode: "native",
49511
+ preferredChannel: "either"
49512
+ },
49513
+ { domain: "admin", operation: "help", gateway: "query", mode: "native", preferredChannel: "mcp" },
49514
+ {
49515
+ domain: "admin",
49516
+ operation: "token",
49517
+ gateway: "query",
49518
+ mode: "native",
49519
+ preferredChannel: "either"
49520
+ },
49521
+ {
49522
+ domain: "admin",
49523
+ operation: "export",
49524
+ gateway: "query",
49525
+ mode: "native",
49526
+ preferredChannel: "either"
49527
+ },
49528
+ {
49529
+ domain: "admin",
49530
+ operation: "adr.show",
49531
+ gateway: "query",
49532
+ mode: "native",
49533
+ preferredChannel: "either"
49534
+ },
49535
+ {
49536
+ domain: "admin",
49537
+ operation: "adr.find",
49538
+ gateway: "query",
49539
+ mode: "native",
49540
+ preferredChannel: "either"
49541
+ },
49542
+ { domain: "admin", operation: "map", gateway: "query", mode: "native", preferredChannel: "mcp" },
49282
49543
  // Mutate operations
49283
- { domain: "admin", operation: "init", gateway: "mutate", mode: "native" },
49284
- { domain: "admin", operation: "config.set", gateway: "mutate", mode: "native" },
49285
- { domain: "admin", operation: "backup", gateway: "mutate", mode: "native" },
49286
- { domain: "admin", operation: "migrate", gateway: "mutate", mode: "native" },
49287
- { domain: "admin", operation: "cleanup", gateway: "mutate", mode: "native" },
49288
- { domain: "admin", operation: "safestop", gateway: "mutate", mode: "native" },
49289
- { domain: "admin", operation: "inject.generate", gateway: "mutate", mode: "native" },
49290
- { domain: "admin", operation: "job.cancel", gateway: "mutate", mode: "native" },
49291
- { domain: "admin", operation: "install.global", gateway: "mutate", mode: "native" },
49292
- { domain: "admin", operation: "token", gateway: "mutate", mode: "native" },
49293
- { domain: "admin", operation: "health", gateway: "mutate", mode: "native" },
49294
- { domain: "admin", operation: "detect", gateway: "mutate", mode: "native" },
49295
- { domain: "admin", operation: "import", gateway: "mutate", mode: "native" },
49296
- { domain: "admin", operation: "context.inject", gateway: "mutate", mode: "native" },
49297
- { domain: "admin", operation: "adr.sync", gateway: "mutate", mode: "native" },
49544
+ {
49545
+ domain: "admin",
49546
+ operation: "init",
49547
+ gateway: "mutate",
49548
+ mode: "native",
49549
+ preferredChannel: "either"
49550
+ },
49551
+ {
49552
+ domain: "admin",
49553
+ operation: "config.set",
49554
+ gateway: "mutate",
49555
+ mode: "native",
49556
+ preferredChannel: "either"
49557
+ },
49558
+ {
49559
+ domain: "admin",
49560
+ operation: "backup",
49561
+ gateway: "mutate",
49562
+ mode: "native",
49563
+ preferredChannel: "either"
49564
+ },
49565
+ {
49566
+ domain: "admin",
49567
+ operation: "migrate",
49568
+ gateway: "mutate",
49569
+ mode: "native",
49570
+ preferredChannel: "either"
49571
+ },
49572
+ {
49573
+ domain: "admin",
49574
+ operation: "cleanup",
49575
+ gateway: "mutate",
49576
+ mode: "native",
49577
+ preferredChannel: "either"
49578
+ },
49579
+ {
49580
+ domain: "admin",
49581
+ operation: "safestop",
49582
+ gateway: "mutate",
49583
+ mode: "native",
49584
+ preferredChannel: "either"
49585
+ },
49586
+ {
49587
+ domain: "admin",
49588
+ operation: "inject.generate",
49589
+ gateway: "mutate",
49590
+ mode: "native",
49591
+ preferredChannel: "either"
49592
+ },
49593
+ {
49594
+ domain: "admin",
49595
+ operation: "job.cancel",
49596
+ gateway: "mutate",
49597
+ mode: "native",
49598
+ preferredChannel: "either"
49599
+ },
49600
+ {
49601
+ domain: "admin",
49602
+ operation: "install.global",
49603
+ gateway: "mutate",
49604
+ mode: "native",
49605
+ preferredChannel: "either"
49606
+ },
49607
+ {
49608
+ domain: "admin",
49609
+ operation: "token",
49610
+ gateway: "mutate",
49611
+ mode: "native",
49612
+ preferredChannel: "either"
49613
+ },
49614
+ {
49615
+ domain: "admin",
49616
+ operation: "health",
49617
+ gateway: "mutate",
49618
+ mode: "native",
49619
+ preferredChannel: "either"
49620
+ },
49621
+ {
49622
+ domain: "admin",
49623
+ operation: "detect",
49624
+ gateway: "mutate",
49625
+ mode: "native",
49626
+ preferredChannel: "either"
49627
+ },
49628
+ {
49629
+ domain: "admin",
49630
+ operation: "import",
49631
+ gateway: "mutate",
49632
+ mode: "native",
49633
+ preferredChannel: "either"
49634
+ },
49635
+ {
49636
+ domain: "admin",
49637
+ operation: "context.inject",
49638
+ gateway: "mutate",
49639
+ mode: "native",
49640
+ preferredChannel: "either"
49641
+ },
49642
+ {
49643
+ domain: "admin",
49644
+ operation: "adr.sync",
49645
+ gateway: "mutate",
49646
+ mode: "native",
49647
+ preferredChannel: "either"
49648
+ },
49649
+ {
49650
+ domain: "admin",
49651
+ operation: "map",
49652
+ gateway: "mutate",
49653
+ mode: "native",
49654
+ preferredChannel: "either"
49655
+ },
49298
49656
  // === Check Domain ===
49299
49657
  // Query operations
49300
- { domain: "check", operation: "schema", gateway: "query", mode: "native" },
49301
- { domain: "check", operation: "protocol", gateway: "query", mode: "native" },
49302
- { domain: "check", operation: "task", gateway: "query", mode: "native" },
49303
- { domain: "check", operation: "manifest", gateway: "query", mode: "native" },
49304
- { domain: "check", operation: "output", gateway: "query", mode: "native" },
49305
- { domain: "check", operation: "compliance.summary", gateway: "query", mode: "native" },
49306
- { domain: "check", operation: "test", gateway: "query", mode: "native" },
49307
- { domain: "check", operation: "coherence", gateway: "query", mode: "native" },
49308
- { domain: "check", operation: "gate.status", gateway: "query", mode: "native" },
49309
- { domain: "check", operation: "archive.stats", gateway: "query", mode: "native" },
49310
- { domain: "check", operation: "grade", gateway: "query", mode: "native" },
49311
- { domain: "check", operation: "grade.list", gateway: "query", mode: "native" },
49312
- { domain: "check", operation: "chain.validate", gateway: "query", mode: "native" },
49658
+ {
49659
+ domain: "check",
49660
+ operation: "schema",
49661
+ gateway: "query",
49662
+ mode: "native",
49663
+ preferredChannel: "either"
49664
+ },
49665
+ {
49666
+ domain: "check",
49667
+ operation: "protocol",
49668
+ gateway: "query",
49669
+ mode: "native",
49670
+ preferredChannel: "either"
49671
+ },
49672
+ {
49673
+ domain: "check",
49674
+ operation: "task",
49675
+ gateway: "query",
49676
+ mode: "native",
49677
+ preferredChannel: "either"
49678
+ },
49679
+ {
49680
+ domain: "check",
49681
+ operation: "manifest",
49682
+ gateway: "query",
49683
+ mode: "native",
49684
+ preferredChannel: "either"
49685
+ },
49686
+ {
49687
+ domain: "check",
49688
+ operation: "output",
49689
+ gateway: "query",
49690
+ mode: "native",
49691
+ preferredChannel: "either"
49692
+ },
49693
+ {
49694
+ domain: "check",
49695
+ operation: "compliance.summary",
49696
+ gateway: "query",
49697
+ mode: "native",
49698
+ preferredChannel: "mcp"
49699
+ },
49700
+ {
49701
+ domain: "check",
49702
+ operation: "test",
49703
+ gateway: "query",
49704
+ mode: "native",
49705
+ preferredChannel: "either"
49706
+ },
49707
+ {
49708
+ domain: "check",
49709
+ operation: "coherence",
49710
+ gateway: "query",
49711
+ mode: "native",
49712
+ preferredChannel: "either"
49713
+ },
49714
+ {
49715
+ domain: "check",
49716
+ operation: "gate.status",
49717
+ gateway: "query",
49718
+ mode: "native",
49719
+ preferredChannel: "either"
49720
+ },
49721
+ {
49722
+ domain: "check",
49723
+ operation: "archive.stats",
49724
+ gateway: "query",
49725
+ mode: "native",
49726
+ preferredChannel: "either"
49727
+ },
49728
+ {
49729
+ domain: "check",
49730
+ operation: "grade",
49731
+ gateway: "query",
49732
+ mode: "native",
49733
+ preferredChannel: "either"
49734
+ },
49735
+ {
49736
+ domain: "check",
49737
+ operation: "grade.list",
49738
+ gateway: "query",
49739
+ mode: "native",
49740
+ preferredChannel: "either"
49741
+ },
49742
+ {
49743
+ domain: "check",
49744
+ operation: "chain.validate",
49745
+ gateway: "query",
49746
+ mode: "native",
49747
+ preferredChannel: "either"
49748
+ },
49313
49749
  // Mutate operations
49314
- { domain: "check", operation: "compliance.record", gateway: "mutate", mode: "native" },
49315
- { domain: "check", operation: "test.run", gateway: "mutate", mode: "native" },
49316
- { domain: "check", operation: "gate.set", gateway: "mutate", mode: "native" },
49750
+ {
49751
+ domain: "check",
49752
+ operation: "compliance.record",
49753
+ gateway: "mutate",
49754
+ mode: "native",
49755
+ preferredChannel: "mcp"
49756
+ },
49757
+ {
49758
+ domain: "check",
49759
+ operation: "test.run",
49760
+ gateway: "mutate",
49761
+ mode: "native",
49762
+ preferredChannel: "either"
49763
+ },
49764
+ {
49765
+ domain: "check",
49766
+ operation: "gate.set",
49767
+ gateway: "mutate",
49768
+ mode: "native",
49769
+ preferredChannel: "either"
49770
+ },
49771
+ {
49772
+ domain: "check",
49773
+ operation: "compliance.sync",
49774
+ gateway: "mutate",
49775
+ mode: "native",
49776
+ preferredChannel: "either"
49777
+ },
49317
49778
  // === Orchestrate Domain ===
49318
49779
  // Query operations
49319
- { domain: "orchestrate", operation: "status", gateway: "query", mode: "native" },
49320
- { domain: "orchestrate", operation: "next", gateway: "query", mode: "native" },
49321
- { domain: "orchestrate", operation: "ready", gateway: "query", mode: "native" },
49322
- { domain: "orchestrate", operation: "analyze", gateway: "query", mode: "native" },
49323
- { domain: "orchestrate", operation: "context", gateway: "query", mode: "native" },
49324
- { domain: "orchestrate", operation: "waves", gateway: "query", mode: "native" },
49325
- { domain: "orchestrate", operation: "bootstrap", gateway: "query", mode: "native" },
49326
- { domain: "orchestrate", operation: "unblock.opportunities", gateway: "query", mode: "native" },
49327
- { domain: "orchestrate", operation: "tessera.list", gateway: "query", mode: "native" },
49780
+ {
49781
+ domain: "orchestrate",
49782
+ operation: "status",
49783
+ gateway: "query",
49784
+ mode: "native",
49785
+ preferredChannel: "either"
49786
+ },
49787
+ {
49788
+ domain: "orchestrate",
49789
+ operation: "next",
49790
+ gateway: "query",
49791
+ mode: "native",
49792
+ preferredChannel: "either"
49793
+ },
49794
+ {
49795
+ domain: "orchestrate",
49796
+ operation: "ready",
49797
+ gateway: "query",
49798
+ mode: "native",
49799
+ preferredChannel: "either"
49800
+ },
49801
+ {
49802
+ domain: "orchestrate",
49803
+ operation: "analyze",
49804
+ gateway: "query",
49805
+ mode: "native",
49806
+ preferredChannel: "either"
49807
+ },
49808
+ {
49809
+ domain: "orchestrate",
49810
+ operation: "context",
49811
+ gateway: "query",
49812
+ mode: "native",
49813
+ preferredChannel: "either"
49814
+ },
49815
+ {
49816
+ domain: "orchestrate",
49817
+ operation: "waves",
49818
+ gateway: "query",
49819
+ mode: "native",
49820
+ preferredChannel: "either"
49821
+ },
49822
+ {
49823
+ domain: "orchestrate",
49824
+ operation: "bootstrap",
49825
+ gateway: "query",
49826
+ mode: "native",
49827
+ preferredChannel: "either"
49828
+ },
49829
+ {
49830
+ domain: "orchestrate",
49831
+ operation: "unblock.opportunities",
49832
+ gateway: "query",
49833
+ mode: "native",
49834
+ preferredChannel: "either"
49835
+ },
49836
+ {
49837
+ domain: "orchestrate",
49838
+ operation: "tessera.list",
49839
+ gateway: "query",
49840
+ mode: "native",
49841
+ preferredChannel: "either"
49842
+ },
49328
49843
  // Mutate operations
49329
- { domain: "orchestrate", operation: "start", gateway: "mutate", mode: "native" },
49330
- { domain: "orchestrate", operation: "spawn", gateway: "mutate", mode: "native" },
49331
- { domain: "orchestrate", operation: "handoff", gateway: "mutate", mode: "native" },
49332
- { domain: "orchestrate", operation: "spawn.execute", gateway: "mutate", mode: "native" },
49333
- { domain: "orchestrate", operation: "validate", gateway: "mutate", mode: "native" },
49334
- { domain: "orchestrate", operation: "parallel", gateway: "mutate", mode: "native" },
49335
- { domain: "orchestrate", operation: "tessera.instantiate", gateway: "mutate", mode: "native" },
49844
+ {
49845
+ domain: "orchestrate",
49846
+ operation: "start",
49847
+ gateway: "mutate",
49848
+ mode: "native",
49849
+ preferredChannel: "either"
49850
+ },
49851
+ {
49852
+ domain: "orchestrate",
49853
+ operation: "spawn",
49854
+ gateway: "mutate",
49855
+ mode: "native",
49856
+ preferredChannel: "mcp"
49857
+ },
49858
+ {
49859
+ domain: "orchestrate",
49860
+ operation: "handoff",
49861
+ gateway: "mutate",
49862
+ mode: "native",
49863
+ preferredChannel: "either"
49864
+ },
49865
+ {
49866
+ domain: "orchestrate",
49867
+ operation: "spawn.execute",
49868
+ gateway: "mutate",
49869
+ mode: "native",
49870
+ preferredChannel: "either"
49871
+ },
49872
+ {
49873
+ domain: "orchestrate",
49874
+ operation: "validate",
49875
+ gateway: "mutate",
49876
+ mode: "native",
49877
+ preferredChannel: "either"
49878
+ },
49879
+ {
49880
+ domain: "orchestrate",
49881
+ operation: "parallel",
49882
+ gateway: "mutate",
49883
+ mode: "native",
49884
+ preferredChannel: "either"
49885
+ },
49886
+ {
49887
+ domain: "orchestrate",
49888
+ operation: "tessera.instantiate",
49889
+ gateway: "mutate",
49890
+ mode: "native",
49891
+ preferredChannel: "either"
49892
+ },
49336
49893
  // === Memory Domain (brain.db cognitive memory -- T5241) ===
49337
49894
  // Query operations
49338
- { domain: "memory", operation: "find", gateway: "query", mode: "native" },
49339
- { domain: "memory", operation: "timeline", gateway: "query", mode: "native" },
49340
- { domain: "memory", operation: "fetch", gateway: "query", mode: "native" },
49341
- { domain: "memory", operation: "decision.find", gateway: "query", mode: "native" },
49342
- { domain: "memory", operation: "pattern.find", gateway: "query", mode: "native" },
49343
- { domain: "memory", operation: "learning.find", gateway: "query", mode: "native" },
49344
- { domain: "memory", operation: "graph.show", gateway: "query", mode: "native" },
49345
- { domain: "memory", operation: "graph.neighbors", gateway: "query", mode: "native" },
49346
- { domain: "memory", operation: "reason.why", gateway: "query", mode: "native" },
49347
- { domain: "memory", operation: "reason.similar", gateway: "query", mode: "native" },
49348
- { domain: "memory", operation: "search.hybrid", gateway: "query", mode: "native" },
49895
+ {
49896
+ domain: "memory",
49897
+ operation: "find",
49898
+ gateway: "query",
49899
+ mode: "native",
49900
+ preferredChannel: "mcp"
49901
+ },
49902
+ {
49903
+ domain: "memory",
49904
+ operation: "timeline",
49905
+ gateway: "query",
49906
+ mode: "native",
49907
+ preferredChannel: "mcp"
49908
+ },
49909
+ {
49910
+ domain: "memory",
49911
+ operation: "fetch",
49912
+ gateway: "query",
49913
+ mode: "native",
49914
+ preferredChannel: "mcp"
49915
+ },
49916
+ {
49917
+ domain: "memory",
49918
+ operation: "decision.find",
49919
+ gateway: "query",
49920
+ mode: "native",
49921
+ preferredChannel: "mcp"
49922
+ },
49923
+ {
49924
+ domain: "memory",
49925
+ operation: "pattern.find",
49926
+ gateway: "query",
49927
+ mode: "native",
49928
+ preferredChannel: "mcp"
49929
+ },
49930
+ {
49931
+ domain: "memory",
49932
+ operation: "learning.find",
49933
+ gateway: "query",
49934
+ mode: "native",
49935
+ preferredChannel: "mcp"
49936
+ },
49937
+ {
49938
+ domain: "memory",
49939
+ operation: "graph.show",
49940
+ gateway: "query",
49941
+ mode: "native",
49942
+ preferredChannel: "either"
49943
+ },
49944
+ {
49945
+ domain: "memory",
49946
+ operation: "graph.neighbors",
49947
+ gateway: "query",
49948
+ mode: "native",
49949
+ preferredChannel: "either"
49950
+ },
49951
+ {
49952
+ domain: "memory",
49953
+ operation: "reason.why",
49954
+ gateway: "query",
49955
+ mode: "native",
49956
+ preferredChannel: "either"
49957
+ },
49958
+ {
49959
+ domain: "memory",
49960
+ operation: "reason.similar",
49961
+ gateway: "query",
49962
+ mode: "native",
49963
+ preferredChannel: "either"
49964
+ },
49965
+ {
49966
+ domain: "memory",
49967
+ operation: "search.hybrid",
49968
+ gateway: "query",
49969
+ mode: "native",
49970
+ preferredChannel: "either"
49971
+ },
49349
49972
  // Mutate operations
49350
- { domain: "memory", operation: "observe", gateway: "mutate", mode: "native" },
49351
- { domain: "memory", operation: "decision.store", gateway: "mutate", mode: "native" },
49352
- { domain: "memory", operation: "pattern.store", gateway: "mutate", mode: "native" },
49353
- { domain: "memory", operation: "learning.store", gateway: "mutate", mode: "native" },
49354
- { domain: "memory", operation: "link", gateway: "mutate", mode: "native" },
49355
- { domain: "memory", operation: "graph.add", gateway: "mutate", mode: "native" },
49356
- { domain: "memory", operation: "graph.remove", gateway: "mutate", mode: "native" },
49973
+ {
49974
+ domain: "memory",
49975
+ operation: "observe",
49976
+ gateway: "mutate",
49977
+ mode: "native",
49978
+ preferredChannel: "mcp"
49979
+ },
49980
+ {
49981
+ domain: "memory",
49982
+ operation: "decision.store",
49983
+ gateway: "mutate",
49984
+ mode: "native",
49985
+ preferredChannel: "mcp"
49986
+ },
49987
+ {
49988
+ domain: "memory",
49989
+ operation: "pattern.store",
49990
+ gateway: "mutate",
49991
+ mode: "native",
49992
+ preferredChannel: "mcp"
49993
+ },
49994
+ {
49995
+ domain: "memory",
49996
+ operation: "learning.store",
49997
+ gateway: "mutate",
49998
+ mode: "native",
49999
+ preferredChannel: "mcp"
50000
+ },
50001
+ {
50002
+ domain: "memory",
50003
+ operation: "link",
50004
+ gateway: "mutate",
50005
+ mode: "native",
50006
+ preferredChannel: "either"
50007
+ },
50008
+ {
50009
+ domain: "memory",
50010
+ operation: "graph.add",
50011
+ gateway: "mutate",
50012
+ mode: "native",
50013
+ preferredChannel: "either"
50014
+ },
50015
+ {
50016
+ domain: "memory",
50017
+ operation: "graph.remove",
50018
+ gateway: "mutate",
50019
+ mode: "native",
50020
+ preferredChannel: "either"
50021
+ },
49357
50022
  // === Pipeline Domain ===
49358
50023
  // Stage sub-domain (RCASD lifecycle)
49359
- { domain: "pipeline", operation: "stage.validate", gateway: "query", mode: "native" },
49360
- { domain: "pipeline", operation: "stage.status", gateway: "query", mode: "native" },
49361
- { domain: "pipeline", operation: "stage.history", gateway: "query", mode: "native" },
49362
- { domain: "pipeline", operation: "stage.record", gateway: "mutate", mode: "native" },
49363
- { domain: "pipeline", operation: "stage.skip", gateway: "mutate", mode: "native" },
49364
- { domain: "pipeline", operation: "stage.reset", gateway: "mutate", mode: "native" },
49365
- { domain: "pipeline", operation: "stage.gate.pass", gateway: "mutate", mode: "native" },
49366
- { domain: "pipeline", operation: "stage.gate.fail", gateway: "mutate", mode: "native" },
50024
+ {
50025
+ domain: "pipeline",
50026
+ operation: "stage.validate",
50027
+ gateway: "query",
50028
+ mode: "native",
50029
+ preferredChannel: "mcp"
50030
+ },
50031
+ {
50032
+ domain: "pipeline",
50033
+ operation: "stage.status",
50034
+ gateway: "query",
50035
+ mode: "native",
50036
+ preferredChannel: "mcp"
50037
+ },
50038
+ {
50039
+ domain: "pipeline",
50040
+ operation: "stage.history",
50041
+ gateway: "query",
50042
+ mode: "native",
50043
+ preferredChannel: "either"
50044
+ },
50045
+ {
50046
+ domain: "pipeline",
50047
+ operation: "stage.record",
50048
+ gateway: "mutate",
50049
+ mode: "native",
50050
+ preferredChannel: "either"
50051
+ },
50052
+ {
50053
+ domain: "pipeline",
50054
+ operation: "stage.skip",
50055
+ gateway: "mutate",
50056
+ mode: "native",
50057
+ preferredChannel: "either"
50058
+ },
50059
+ {
50060
+ domain: "pipeline",
50061
+ operation: "stage.reset",
50062
+ gateway: "mutate",
50063
+ mode: "native",
50064
+ preferredChannel: "either"
50065
+ },
50066
+ {
50067
+ domain: "pipeline",
50068
+ operation: "stage.gate.pass",
50069
+ gateway: "mutate",
50070
+ mode: "native",
50071
+ preferredChannel: "either"
50072
+ },
50073
+ {
50074
+ domain: "pipeline",
50075
+ operation: "stage.gate.fail",
50076
+ gateway: "mutate",
50077
+ mode: "native",
50078
+ preferredChannel: "either"
50079
+ },
49367
50080
  // Manifest sub-domain (T5241)
49368
- { domain: "pipeline", operation: "manifest.show", gateway: "query", mode: "native" },
49369
- { domain: "pipeline", operation: "manifest.list", gateway: "query", mode: "native" },
49370
- { domain: "pipeline", operation: "manifest.find", gateway: "query", mode: "native" },
49371
- { domain: "pipeline", operation: "manifest.stats", gateway: "query", mode: "native" },
49372
- { domain: "pipeline", operation: "manifest.append", gateway: "mutate", mode: "native" },
49373
- { domain: "pipeline", operation: "manifest.archive", gateway: "mutate", mode: "native" },
50081
+ {
50082
+ domain: "pipeline",
50083
+ operation: "manifest.show",
50084
+ gateway: "query",
50085
+ mode: "native",
50086
+ preferredChannel: "either"
50087
+ },
50088
+ {
50089
+ domain: "pipeline",
50090
+ operation: "manifest.list",
50091
+ gateway: "query",
50092
+ mode: "native",
50093
+ preferredChannel: "either"
50094
+ },
50095
+ {
50096
+ domain: "pipeline",
50097
+ operation: "manifest.find",
50098
+ gateway: "query",
50099
+ mode: "native",
50100
+ preferredChannel: "either"
50101
+ },
50102
+ {
50103
+ domain: "pipeline",
50104
+ operation: "manifest.stats",
50105
+ gateway: "query",
50106
+ mode: "native",
50107
+ preferredChannel: "either"
50108
+ },
50109
+ {
50110
+ domain: "pipeline",
50111
+ operation: "manifest.append",
50112
+ gateway: "mutate",
50113
+ mode: "native",
50114
+ preferredChannel: "either"
50115
+ },
50116
+ {
50117
+ domain: "pipeline",
50118
+ operation: "manifest.archive",
50119
+ gateway: "mutate",
50120
+ mode: "native",
50121
+ preferredChannel: "either"
50122
+ },
49374
50123
  // Phase sub-domain (T5326)
49375
- { domain: "pipeline", operation: "phase.show", gateway: "query", mode: "native" },
49376
- { domain: "pipeline", operation: "phase.list", gateway: "query", mode: "native" },
49377
- { domain: "pipeline", operation: "phase.set", gateway: "mutate", mode: "native" },
49378
- { domain: "pipeline", operation: "phase.advance", gateway: "mutate", mode: "native" },
49379
- { domain: "pipeline", operation: "phase.rename", gateway: "mutate", mode: "native" },
49380
- { domain: "pipeline", operation: "phase.delete", gateway: "mutate", mode: "native" },
50124
+ {
50125
+ domain: "pipeline",
50126
+ operation: "phase.show",
50127
+ gateway: "query",
50128
+ mode: "native",
50129
+ preferredChannel: "either"
50130
+ },
50131
+ {
50132
+ domain: "pipeline",
50133
+ operation: "phase.list",
50134
+ gateway: "query",
50135
+ mode: "native",
50136
+ preferredChannel: "either"
50137
+ },
50138
+ {
50139
+ domain: "pipeline",
50140
+ operation: "phase.set",
50141
+ gateway: "mutate",
50142
+ mode: "native",
50143
+ preferredChannel: "either"
50144
+ },
50145
+ {
50146
+ domain: "pipeline",
50147
+ operation: "phase.advance",
50148
+ gateway: "mutate",
50149
+ mode: "native",
50150
+ preferredChannel: "either"
50151
+ },
50152
+ {
50153
+ domain: "pipeline",
50154
+ operation: "phase.rename",
50155
+ gateway: "mutate",
50156
+ mode: "native",
50157
+ preferredChannel: "either"
50158
+ },
50159
+ {
50160
+ domain: "pipeline",
50161
+ operation: "phase.delete",
50162
+ gateway: "mutate",
50163
+ mode: "native",
50164
+ preferredChannel: "either"
50165
+ },
49381
50166
  // Chain sub-domain (T5405)
49382
- { domain: "pipeline", operation: "chain.show", gateway: "query", mode: "native" },
49383
- { domain: "pipeline", operation: "chain.list", gateway: "query", mode: "native" },
49384
- { domain: "pipeline", operation: "chain.add", gateway: "mutate", mode: "native" },
49385
- { domain: "pipeline", operation: "chain.instantiate", gateway: "mutate", mode: "native" },
49386
- { domain: "pipeline", operation: "chain.advance", gateway: "mutate", mode: "native" },
50167
+ {
50168
+ domain: "pipeline",
50169
+ operation: "chain.show",
50170
+ gateway: "query",
50171
+ mode: "native",
50172
+ preferredChannel: "either"
50173
+ },
50174
+ {
50175
+ domain: "pipeline",
50176
+ operation: "chain.list",
50177
+ gateway: "query",
50178
+ mode: "native",
50179
+ preferredChannel: "either"
50180
+ },
50181
+ {
50182
+ domain: "pipeline",
50183
+ operation: "chain.add",
50184
+ gateway: "mutate",
50185
+ mode: "native",
50186
+ preferredChannel: "either"
50187
+ },
50188
+ {
50189
+ domain: "pipeline",
50190
+ operation: "chain.instantiate",
50191
+ gateway: "mutate",
50192
+ mode: "native",
50193
+ preferredChannel: "either"
50194
+ },
50195
+ {
50196
+ domain: "pipeline",
50197
+ operation: "chain.advance",
50198
+ gateway: "mutate",
50199
+ mode: "native",
50200
+ preferredChannel: "either"
50201
+ },
49387
50202
  // Release sub-domain (T5615 consolidated)
49388
- { domain: "pipeline", operation: "release.list", gateway: "query", mode: "native" },
49389
- { domain: "pipeline", operation: "release.show", gateway: "query", mode: "native" },
49390
- { domain: "pipeline", operation: "release.channel.show", gateway: "query", mode: "native" },
49391
- { domain: "pipeline", operation: "release.ship", gateway: "mutate", mode: "native" },
49392
- { domain: "pipeline", operation: "release.cancel", gateway: "mutate", mode: "native" },
49393
- { domain: "pipeline", operation: "release.rollback", gateway: "mutate", mode: "native" },
50203
+ {
50204
+ domain: "pipeline",
50205
+ operation: "release.list",
50206
+ gateway: "query",
50207
+ mode: "native",
50208
+ preferredChannel: "either"
50209
+ },
50210
+ {
50211
+ domain: "pipeline",
50212
+ operation: "release.show",
50213
+ gateway: "query",
50214
+ mode: "native",
50215
+ preferredChannel: "either"
50216
+ },
50217
+ {
50218
+ domain: "pipeline",
50219
+ operation: "release.channel.show",
50220
+ gateway: "query",
50221
+ mode: "native",
50222
+ preferredChannel: "either"
50223
+ },
50224
+ {
50225
+ domain: "pipeline",
50226
+ operation: "release.ship",
50227
+ gateway: "mutate",
50228
+ mode: "native",
50229
+ preferredChannel: "cli"
50230
+ },
50231
+ {
50232
+ domain: "pipeline",
50233
+ operation: "release.cancel",
50234
+ gateway: "mutate",
50235
+ mode: "native",
50236
+ preferredChannel: "either"
50237
+ },
50238
+ {
50239
+ domain: "pipeline",
50240
+ operation: "release.rollback",
50241
+ gateway: "mutate",
50242
+ mode: "native",
50243
+ preferredChannel: "either"
50244
+ },
49394
50245
  // === Tools Domain ===
49395
50246
  // Issue operations
49396
- { domain: "tools", operation: "issue.diagnostics", gateway: "query", mode: "native" },
50247
+ {
50248
+ domain: "tools",
50249
+ operation: "issue.diagnostics",
50250
+ gateway: "query",
50251
+ mode: "native",
50252
+ preferredChannel: "either"
50253
+ },
49397
50254
  // Skill operations
49398
- { domain: "tools", operation: "skill.list", gateway: "query", mode: "native" },
49399
- { domain: "tools", operation: "skill.show", gateway: "query", mode: "native" },
49400
- { domain: "tools", operation: "skill.find", gateway: "query", mode: "native" },
49401
- { domain: "tools", operation: "skill.dispatch", gateway: "query", mode: "native" },
49402
- { domain: "tools", operation: "skill.verify", gateway: "query", mode: "native" },
49403
- { domain: "tools", operation: "skill.dependencies", gateway: "query", mode: "native" },
49404
- { domain: "tools", operation: "skill.spawn.providers", gateway: "query", mode: "native" },
49405
- { domain: "tools", operation: "skill.catalog", gateway: "query", mode: "native" },
49406
- { domain: "tools", operation: "skill.precedence", gateway: "query", mode: "native" },
49407
- { domain: "tools", operation: "skill.install", gateway: "mutate", mode: "native" },
49408
- { domain: "tools", operation: "skill.uninstall", gateway: "mutate", mode: "native" },
49409
- { domain: "tools", operation: "skill.refresh", gateway: "mutate", mode: "native" },
50255
+ {
50256
+ domain: "tools",
50257
+ operation: "skill.list",
50258
+ gateway: "query",
50259
+ mode: "native",
50260
+ preferredChannel: "mcp"
50261
+ },
50262
+ {
50263
+ domain: "tools",
50264
+ operation: "skill.show",
50265
+ gateway: "query",
50266
+ mode: "native",
50267
+ preferredChannel: "mcp"
50268
+ },
50269
+ {
50270
+ domain: "tools",
50271
+ operation: "skill.find",
50272
+ gateway: "query",
50273
+ mode: "native",
50274
+ preferredChannel: "mcp"
50275
+ },
50276
+ {
50277
+ domain: "tools",
50278
+ operation: "skill.dispatch",
50279
+ gateway: "query",
50280
+ mode: "native",
50281
+ preferredChannel: "either"
50282
+ },
50283
+ {
50284
+ domain: "tools",
50285
+ operation: "skill.verify",
50286
+ gateway: "query",
50287
+ mode: "native",
50288
+ preferredChannel: "either"
50289
+ },
50290
+ {
50291
+ domain: "tools",
50292
+ operation: "skill.dependencies",
50293
+ gateway: "query",
50294
+ mode: "native",
50295
+ preferredChannel: "either"
50296
+ },
50297
+ {
50298
+ domain: "tools",
50299
+ operation: "skill.spawn.providers",
50300
+ gateway: "query",
50301
+ mode: "native",
50302
+ preferredChannel: "either"
50303
+ },
50304
+ {
50305
+ domain: "tools",
50306
+ operation: "skill.catalog",
50307
+ gateway: "query",
50308
+ mode: "native",
50309
+ preferredChannel: "either"
50310
+ },
50311
+ {
50312
+ domain: "tools",
50313
+ operation: "skill.precedence",
50314
+ gateway: "query",
50315
+ mode: "native",
50316
+ preferredChannel: "either"
50317
+ },
50318
+ {
50319
+ domain: "tools",
50320
+ operation: "skill.install",
50321
+ gateway: "mutate",
50322
+ mode: "native",
50323
+ preferredChannel: "either"
50324
+ },
50325
+ {
50326
+ domain: "tools",
50327
+ operation: "skill.uninstall",
50328
+ gateway: "mutate",
50329
+ mode: "native",
50330
+ preferredChannel: "either"
50331
+ },
50332
+ {
50333
+ domain: "tools",
50334
+ operation: "skill.refresh",
50335
+ gateway: "mutate",
50336
+ mode: "native",
50337
+ preferredChannel: "either"
50338
+ },
49410
50339
  // Provider operations
49411
- { domain: "tools", operation: "provider.list", gateway: "query", mode: "native" },
49412
- { domain: "tools", operation: "provider.detect", gateway: "query", mode: "native" },
49413
- { domain: "tools", operation: "provider.inject.status", gateway: "query", mode: "native" },
49414
- { domain: "tools", operation: "provider.supports", gateway: "query", mode: "native" },
49415
- { domain: "tools", operation: "provider.hooks", gateway: "query", mode: "native" },
49416
- { domain: "tools", operation: "provider.inject", gateway: "mutate", mode: "native" },
50340
+ {
50341
+ domain: "tools",
50342
+ operation: "provider.list",
50343
+ gateway: "query",
50344
+ mode: "native",
50345
+ preferredChannel: "mcp"
50346
+ },
50347
+ {
50348
+ domain: "tools",
50349
+ operation: "provider.detect",
50350
+ gateway: "query",
50351
+ mode: "native",
50352
+ preferredChannel: "mcp"
50353
+ },
50354
+ {
50355
+ domain: "tools",
50356
+ operation: "provider.inject.status",
50357
+ gateway: "query",
50358
+ mode: "native",
50359
+ preferredChannel: "either"
50360
+ },
50361
+ {
50362
+ domain: "tools",
50363
+ operation: "provider.supports",
50364
+ gateway: "query",
50365
+ mode: "native",
50366
+ preferredChannel: "either"
50367
+ },
50368
+ {
50369
+ domain: "tools",
50370
+ operation: "provider.hooks",
50371
+ gateway: "query",
50372
+ mode: "native",
50373
+ preferredChannel: "either"
50374
+ },
50375
+ {
50376
+ domain: "tools",
50377
+ operation: "provider.inject",
50378
+ gateway: "mutate",
50379
+ mode: "native",
50380
+ preferredChannel: "either"
50381
+ },
50382
+ // Adapter sub-domain (T5240)
50383
+ {
50384
+ domain: "tools",
50385
+ operation: "adapter.list",
50386
+ gateway: "query",
50387
+ mode: "native",
50388
+ preferredChannel: "mcp"
50389
+ },
50390
+ {
50391
+ domain: "tools",
50392
+ operation: "adapter.show",
50393
+ gateway: "query",
50394
+ mode: "native",
50395
+ preferredChannel: "mcp"
50396
+ },
50397
+ {
50398
+ domain: "tools",
50399
+ operation: "adapter.detect",
50400
+ gateway: "query",
50401
+ mode: "native",
50402
+ preferredChannel: "either"
50403
+ },
50404
+ {
50405
+ domain: "tools",
50406
+ operation: "adapter.health",
50407
+ gateway: "query",
50408
+ mode: "native",
50409
+ preferredChannel: "either"
50410
+ },
50411
+ {
50412
+ domain: "tools",
50413
+ operation: "adapter.activate",
50414
+ gateway: "mutate",
50415
+ mode: "native",
50416
+ preferredChannel: "mcp"
50417
+ },
50418
+ {
50419
+ domain: "tools",
50420
+ operation: "adapter.dispose",
50421
+ gateway: "mutate",
50422
+ mode: "native",
50423
+ preferredChannel: "either"
50424
+ },
49417
50425
  // === Nexus Domain ===
49418
50426
  // Query operations
49419
- { domain: "nexus", operation: "status", gateway: "query", mode: "native" },
49420
- { domain: "nexus", operation: "list", gateway: "query", mode: "native" },
49421
- { domain: "nexus", operation: "show", gateway: "query", mode: "native" },
49422
- { domain: "nexus", operation: "search", gateway: "query", mode: "native" },
49423
- { domain: "nexus", operation: "graph", gateway: "query", mode: "native" },
49424
- { domain: "nexus", operation: "deps", gateway: "query", mode: "native" },
49425
- { domain: "nexus", operation: "resolve", gateway: "query", mode: "native" },
49426
- { domain: "nexus", operation: "discover", gateway: "query", mode: "native" },
49427
- { domain: "nexus", operation: "orphans.list", gateway: "query", mode: "native" },
49428
- { domain: "nexus", operation: "blockers.show", gateway: "query", mode: "native" },
49429
- { domain: "nexus", operation: "path.show", gateway: "query", mode: "native" },
49430
- { domain: "nexus", operation: "share.status", gateway: "query", mode: "native" },
50427
+ {
50428
+ domain: "nexus",
50429
+ operation: "status",
50430
+ gateway: "query",
50431
+ mode: "native",
50432
+ preferredChannel: "either"
50433
+ },
50434
+ {
50435
+ domain: "nexus",
50436
+ operation: "list",
50437
+ gateway: "query",
50438
+ mode: "native",
50439
+ preferredChannel: "either"
50440
+ },
50441
+ {
50442
+ domain: "nexus",
50443
+ operation: "show",
50444
+ gateway: "query",
50445
+ mode: "native",
50446
+ preferredChannel: "either"
50447
+ },
50448
+ {
50449
+ domain: "nexus",
50450
+ operation: "search",
50451
+ gateway: "query",
50452
+ mode: "native",
50453
+ preferredChannel: "either"
50454
+ },
50455
+ {
50456
+ domain: "nexus",
50457
+ operation: "graph",
50458
+ gateway: "query",
50459
+ mode: "native",
50460
+ preferredChannel: "either"
50461
+ },
50462
+ {
50463
+ domain: "nexus",
50464
+ operation: "deps",
50465
+ gateway: "query",
50466
+ mode: "native",
50467
+ preferredChannel: "either"
50468
+ },
50469
+ {
50470
+ domain: "nexus",
50471
+ operation: "resolve",
50472
+ gateway: "query",
50473
+ mode: "native",
50474
+ preferredChannel: "either"
50475
+ },
50476
+ {
50477
+ domain: "nexus",
50478
+ operation: "discover",
50479
+ gateway: "query",
50480
+ mode: "native",
50481
+ preferredChannel: "either"
50482
+ },
50483
+ {
50484
+ domain: "nexus",
50485
+ operation: "orphans.list",
50486
+ gateway: "query",
50487
+ mode: "native",
50488
+ preferredChannel: "either"
50489
+ },
50490
+ {
50491
+ domain: "nexus",
50492
+ operation: "blockers.show",
50493
+ gateway: "query",
50494
+ mode: "native",
50495
+ preferredChannel: "either"
50496
+ },
50497
+ {
50498
+ domain: "nexus",
50499
+ operation: "path.show",
50500
+ gateway: "query",
50501
+ mode: "native",
50502
+ preferredChannel: "either"
50503
+ },
50504
+ {
50505
+ domain: "nexus",
50506
+ operation: "share.status",
50507
+ gateway: "query",
50508
+ mode: "native",
50509
+ preferredChannel: "either"
50510
+ },
50511
+ {
50512
+ domain: "nexus",
50513
+ operation: "transfer.preview",
50514
+ gateway: "query",
50515
+ mode: "native",
50516
+ preferredChannel: "either"
50517
+ },
49431
50518
  // Mutate operations
49432
- { domain: "nexus", operation: "init", gateway: "mutate", mode: "native" },
49433
- { domain: "nexus", operation: "register", gateway: "mutate", mode: "native" },
49434
- { domain: "nexus", operation: "unregister", gateway: "mutate", mode: "native" },
49435
- { domain: "nexus", operation: "sync", gateway: "mutate", mode: "native" },
49436
- { domain: "nexus", operation: "reconcile", gateway: "mutate", mode: "native" },
49437
- { domain: "nexus", operation: "permission.set", gateway: "mutate", mode: "native" },
49438
- { domain: "nexus", operation: "share.snapshot.export", gateway: "mutate", mode: "native" },
49439
- { domain: "nexus", operation: "share.snapshot.import", gateway: "mutate", mode: "native" },
50519
+ {
50520
+ domain: "nexus",
50521
+ operation: "init",
50522
+ gateway: "mutate",
50523
+ mode: "native",
50524
+ preferredChannel: "either"
50525
+ },
50526
+ {
50527
+ domain: "nexus",
50528
+ operation: "register",
50529
+ gateway: "mutate",
50530
+ mode: "native",
50531
+ preferredChannel: "either"
50532
+ },
50533
+ {
50534
+ domain: "nexus",
50535
+ operation: "unregister",
50536
+ gateway: "mutate",
50537
+ mode: "native",
50538
+ preferredChannel: "either"
50539
+ },
50540
+ {
50541
+ domain: "nexus",
50542
+ operation: "sync",
50543
+ gateway: "mutate",
50544
+ mode: "native",
50545
+ preferredChannel: "either"
50546
+ },
50547
+ {
50548
+ domain: "nexus",
50549
+ operation: "reconcile",
50550
+ gateway: "mutate",
50551
+ mode: "native",
50552
+ preferredChannel: "either"
50553
+ },
50554
+ {
50555
+ domain: "nexus",
50556
+ operation: "permission.set",
50557
+ gateway: "mutate",
50558
+ mode: "native",
50559
+ preferredChannel: "either"
50560
+ },
50561
+ {
50562
+ domain: "nexus",
50563
+ operation: "share.snapshot.export",
50564
+ gateway: "mutate",
50565
+ mode: "native",
50566
+ preferredChannel: "either"
50567
+ },
50568
+ {
50569
+ domain: "nexus",
50570
+ operation: "share.snapshot.import",
50571
+ gateway: "mutate",
50572
+ mode: "native",
50573
+ preferredChannel: "either"
50574
+ },
50575
+ {
50576
+ domain: "nexus",
50577
+ operation: "transfer",
50578
+ gateway: "mutate",
50579
+ mode: "native",
50580
+ preferredChannel: "either"
50581
+ },
49440
50582
  // === Sticky Domain ===
49441
50583
  // Query operations
49442
- { domain: "sticky", operation: "list", gateway: "query", mode: "native" },
49443
- { domain: "sticky", operation: "show", gateway: "query", mode: "native" },
50584
+ {
50585
+ domain: "sticky",
50586
+ operation: "list",
50587
+ gateway: "query",
50588
+ mode: "native",
50589
+ preferredChannel: "mcp"
50590
+ },
50591
+ {
50592
+ domain: "sticky",
50593
+ operation: "show",
50594
+ gateway: "query",
50595
+ mode: "native",
50596
+ preferredChannel: "mcp"
50597
+ },
49444
50598
  // Mutate operations
49445
- { domain: "sticky", operation: "add", gateway: "mutate", mode: "native" },
49446
- { domain: "sticky", operation: "archive", gateway: "mutate", mode: "native" },
49447
- { domain: "sticky", operation: "convert", gateway: "mutate", mode: "native" },
49448
- { domain: "sticky", operation: "purge", gateway: "mutate", mode: "native" }
50599
+ {
50600
+ domain: "sticky",
50601
+ operation: "add",
50602
+ gateway: "mutate",
50603
+ mode: "native",
50604
+ preferredChannel: "mcp"
50605
+ },
50606
+ {
50607
+ domain: "sticky",
50608
+ operation: "archive",
50609
+ gateway: "mutate",
50610
+ mode: "native",
50611
+ preferredChannel: "either"
50612
+ },
50613
+ {
50614
+ domain: "sticky",
50615
+ operation: "convert",
50616
+ gateway: "mutate",
50617
+ mode: "native",
50618
+ preferredChannel: "either"
50619
+ },
50620
+ {
50621
+ domain: "sticky",
50622
+ operation: "purge",
50623
+ gateway: "mutate",
50624
+ mode: "native",
50625
+ preferredChannel: "either"
50626
+ }
49449
50627
  ];
49450
50628
  function getOperationMode(domain2, operation, gateway) {
49451
50629
  const entry = CAPABILITY_MATRIX.find(
@@ -50465,7 +51643,9 @@ function extractBody(content) {
50465
51643
  // packages/core/src/skills/agents/install.ts
50466
51644
  init_paths();
50467
51645
  import { existsSync as existsSync66, mkdirSync as mkdirSync14, readdirSync as readdirSync25, readlinkSync, symlinkSync, unlinkSync as unlinkSync4 } from "node:fs";
51646
+ import { platform as platform2 } from "node:os";
50468
51647
  import { basename as basename12, join as join70 } from "node:path";
51648
+ var DIR_SYMLINK_TYPE = platform2() === "win32" ? "junction" : "dir";
50469
51649
  function getAgentInstallDir() {
50470
51650
  return getClaudeAgentsDir();
50471
51651
  }
@@ -50495,7 +51675,7 @@ function installAgent(agentDir) {
50495
51675
  }
50496
51676
  }
50497
51677
  try {
50498
- symlinkSync(agentDir, targetPath, "dir");
51678
+ symlinkSync(agentDir, targetPath, DIR_SYMLINK_TYPE);
50499
51679
  return { installed: true, path: targetPath };
50500
51680
  } catch (err) {
50501
51681
  return { installed: false, path: targetPath, error: `Symlink failed: ${err}` };
@@ -52391,11 +53571,11 @@ async function validateOrchestratorCompliance(epicId, cwd) {
52391
53571
  }
52392
53572
 
52393
53573
  // packages/core/src/skills/skill-paths.ts
52394
- init_paths();
52395
53574
  import { existsSync as existsSync76, lstatSync, readlinkSync as readlinkSync2, realpathSync as realpathSync2 } from "node:fs";
52396
53575
  import { delimiter, join as join79, resolve as resolve9 } from "node:path";
53576
+ import { getCanonicalSkillsDir as getCanonicalSkillsDir2 } from "@cleocode/caamp";
52397
53577
  function getCaampCanonical() {
52398
- return join79(getAgentsHome(), "skills");
53578
+ return getCanonicalSkillsDir2();
52399
53579
  }
52400
53580
  function getProjectEmbedded(projectRoot) {
52401
53581
  const root = projectRoot ?? process.cwd();
@@ -54541,7 +55721,7 @@ function getNodeVersionInfo() {
54541
55721
  };
54542
55722
  }
54543
55723
  function getNodeUpgradeInstructions() {
54544
- const platform3 = detectPlatform();
55724
+ const platform5 = detectPlatform();
54545
55725
  const arch2 = process.arch;
54546
55726
  const instructions = [];
54547
55727
  const hasFnm = commandExists2("fnm");
@@ -54556,7 +55736,7 @@ function getNodeUpgradeInstructions() {
54556
55736
  if (hasVolta) {
54557
55737
  instructions.push(`volta install node@${MINIMUM_NODE_MAJOR}`);
54558
55738
  }
54559
- switch (platform3) {
55739
+ switch (platform5) {
54560
55740
  case "linux":
54561
55741
  if (commandExists2("dnf")) {
54562
55742
  instructions.push(
@@ -54588,7 +55768,7 @@ function getNodeUpgradeInstructions() {
54588
55768
  }
54589
55769
  instructions.push(`https://nodejs.org/en/download/`);
54590
55770
  const recommended = instructions[0] ?? `https://nodejs.org/en/download/`;
54591
- return { platform: platform3, arch: arch2, instructions, recommended };
55771
+ return { platform: platform5, arch: arch2, instructions, recommended };
54592
55772
  }
54593
55773
  function getSystemInfo2() {
54594
55774
  return {
@@ -57160,7 +58340,6 @@ function validateLabels2(labels, repoLabels) {
57160
58340
  var ui_exports = {};
57161
58341
  __export(ui_exports, {
57162
58342
  ALIASES_VERSION: () => ALIASES_VERSION,
57163
- INJECTION_VALIDATION_KEYS: () => INJECTION_VALIDATION_KEYS,
57164
58343
  appendToChangelog: () => appendToChangelog,
57165
58344
  checkAliasesStatus: () => checkAliasesStatus,
57166
58345
  defaultFlags: () => defaultFlags,
@@ -57177,7 +58356,6 @@ __export(ui_exports, {
57177
58356
  getCurrentShell: () => getCurrentShell,
57178
58357
  getInstalledVersion: () => getInstalledVersion,
57179
58358
  getRcFilePath: () => getRcFilePath,
57180
- getValidationKey: () => getValidationKey,
57181
58359
  groupTasksIntoSections: () => groupTasksIntoSections,
57182
58360
  hasAliasBlock: () => hasAliasBlock,
57183
58361
  injectAliases: () => injectAliases,
@@ -57193,7 +58371,7 @@ __export(ui_exports, {
57193
58371
 
57194
58372
  // packages/core/src/ui/aliases.ts
57195
58373
  import { existsSync as existsSync92, readFileSync as readFileSync67, writeFileSync as writeFileSync15 } from "node:fs";
57196
- import { homedir as homedir5, platform as platform2 } from "node:os";
58374
+ import { homedir as homedir5, platform as platform3 } from "node:os";
57197
58375
  import { join as join96 } from "node:path";
57198
58376
  var MARKER_START = "# CLEO-CLAUDE-ALIASES:START";
57199
58377
  var MARKER_END = "# CLEO-CLAUDE-ALIASES:END";
@@ -57208,7 +58386,7 @@ function getCurrentShell() {
57208
58386
  const shell = process.env.SHELL ?? "";
57209
58387
  if (shell.includes("zsh")) return "zsh";
57210
58388
  if (shell.includes("bash")) return "bash";
57211
- if (platform2() === "win32") return "powershell";
58389
+ if (platform3() === "win32") return "powershell";
57212
58390
  return "bash";
57213
58391
  }
57214
58392
  function getRcFilePath(shell) {
@@ -57232,7 +58410,7 @@ function detectAvailableShells() {
57232
58410
  const shells = [];
57233
58411
  if (existsSync92(getRcFilePath("bash")) || existsSync92("/bin/bash")) shells.push("bash");
57234
58412
  if (existsSync92(getRcFilePath("zsh")) || existsSync92("/bin/zsh")) shells.push("zsh");
57235
- if (platform2() === "win32") shells.push("powershell");
58413
+ if (platform3() === "win32") shells.push("powershell");
57236
58414
  return shells;
57237
58415
  }
57238
58416
  function generateBashAliases(cleoPath) {
@@ -57664,16 +58842,6 @@ function isJsonOutput(flags) {
57664
58842
  return resolveFormat(flags.format) === "json";
57665
58843
  }
57666
58844
 
57667
- // packages/core/src/ui/injection-legacy.ts
57668
- var INJECTION_VALIDATION_KEYS = {
57669
- "CLAUDE.md": "claude_md",
57670
- "AGENTS.md": "agents_md",
57671
- "GEMINI.md": "gemini_md"
57672
- };
57673
- function getValidationKey(target) {
57674
- return INJECTION_VALIDATION_KEYS[target] ?? target.toLowerCase().replace(/[^a-z0-9]/g, "_");
57675
- }
57676
-
57677
58845
  // packages/core/src/validation/index.ts
57678
58846
  var validation_exports = {};
57679
58847
  __export(validation_exports, {
@@ -60654,15 +61822,34 @@ init_injection();
60654
61822
  init_memory_bridge();
60655
61823
  import { existsSync as existsSync99, readdirSync as readdirSync33, readFileSync as readFileSync73 } from "node:fs";
60656
61824
  import { copyFile as copyFile3, lstat, mkdir as mkdir16, readFile as readFile17, symlink, unlink as unlink4, writeFile as writeFile11 } from "node:fs/promises";
61825
+ import { platform as platform4 } from "node:os";
60657
61826
  import { basename as basename17, dirname as dirname19, join as join100 } from "node:path";
60658
61827
  init_paths();
60659
61828
  init_scaffold();
60660
61829
  init_schema_management();
60661
61830
  init_json2();
61831
+ var DIR_SYMLINK_TYPE2 = platform4() === "win32" ? "junction" : "dir";
60662
61832
  async function initAgentDefinition(created, warnings) {
60663
- const packageRoot = getPackageRoot();
60664
- const agentSourceDir = join100(packageRoot, "agents", "cleo-subagent");
60665
- if (!existsSync99(agentSourceDir)) {
61833
+ let agentSourceDir = null;
61834
+ try {
61835
+ const { createRequire: createRequire5 } = await import("node:module");
61836
+ const req = createRequire5(import.meta.url);
61837
+ const agentsPkgMain = req.resolve("@cleocode/agents/package.json");
61838
+ const agentsPkgRoot = dirname19(agentsPkgMain);
61839
+ const candidate = join100(agentsPkgRoot, "cleo-subagent");
61840
+ if (existsSync99(candidate)) {
61841
+ agentSourceDir = candidate;
61842
+ }
61843
+ } catch {
61844
+ }
61845
+ if (!agentSourceDir) {
61846
+ const packageRoot = getPackageRoot();
61847
+ const bundled = join100(packageRoot, "agents", "cleo-subagent");
61848
+ if (existsSync99(bundled)) {
61849
+ agentSourceDir = bundled;
61850
+ }
61851
+ }
61852
+ if (!agentSourceDir) {
60666
61853
  warnings.push("agents/cleo-subagent/ not found in package, skipping agent definition install");
60667
61854
  return;
60668
61855
  }
@@ -60676,7 +61863,7 @@ async function initAgentDefinition(created, warnings) {
60676
61863
  }
60677
61864
  } catch {
60678
61865
  }
60679
- await symlink(agentSourceDir, globalAgentsDir, "dir");
61866
+ await symlink(agentSourceDir, globalAgentsDir, DIR_SYMLINK_TYPE2);
60680
61867
  created.push("agent: cleo-subagent (symlinked)");
60681
61868
  } catch (_err) {
60682
61869
  try {
@@ -60693,61 +61880,6 @@ async function initAgentDefinition(created, warnings) {
60693
61880
  }
60694
61881
  }
60695
61882
  }
60696
- async function initCoreSkills(created, warnings) {
60697
- try {
60698
- const { getInstalledProviders: getInstalledProviders3, installSkill: installSkill2, registerSkillLibraryFromPath } = await import("@cleocode/caamp");
60699
- const providers = getInstalledProviders3();
60700
- if (providers.length === 0) {
60701
- return;
60702
- }
60703
- const packageRoot = getPackageRoot();
60704
- let ctSkillsRoot = null;
60705
- try {
60706
- const bundledPath = join100(packageRoot, "packages", "skills");
60707
- if (existsSync99(join100(bundledPath, "skills.json"))) {
60708
- ctSkillsRoot = bundledPath;
60709
- } else {
60710
- const ctSkillsPath = join100(packageRoot, "node_modules", "@cleocode", "skills");
60711
- if (existsSync99(join100(ctSkillsPath, "skills.json"))) {
60712
- ctSkillsRoot = ctSkillsPath;
60713
- }
60714
- }
60715
- } catch {
60716
- }
60717
- if (!ctSkillsRoot) {
60718
- warnings.push("skills package not found, skipping core skill installation");
60719
- return;
60720
- }
60721
- try {
60722
- registerSkillLibraryFromPath(ctSkillsRoot);
60723
- } catch {
60724
- warnings.push("Failed to register skill library with CAAMP");
60725
- }
60726
- const catalogPath = join100(ctSkillsRoot, "skills.json");
60727
- const catalog3 = JSON.parse(readFileSync73(catalogPath, "utf-8"));
60728
- const skills = catalog3.skills ?? [];
60729
- const coreSkills = skills.filter((s) => s.tier <= 2);
60730
- const installed = [];
60731
- for (const skill of coreSkills) {
60732
- const skillSourceDir = dirname19(join100(ctSkillsRoot, skill.path));
60733
- if (!existsSync99(skillSourceDir)) {
60734
- continue;
60735
- }
60736
- try {
60737
- const result = await installSkill2(skillSourceDir, skill.name, providers, true);
60738
- if (result.success) {
60739
- installed.push(skill.name);
60740
- }
60741
- } catch {
60742
- }
60743
- }
60744
- if (installed.length > 0) {
60745
- created.push(`skills: ${installed.length} core skills installed`);
60746
- }
60747
- } catch (err) {
60748
- warnings.push(`Core skill install: ${err instanceof Error ? err.message : String(err)}`);
60749
- }
60750
- }
60751
61883
  async function initNexusRegistration(projectRoot, created, warnings) {
60752
61884
  try {
60753
61885
  const { nexusReconcile: nexusReconcile2 } = await Promise.resolve().then(() => (init_registry3(), registry_exports3));
@@ -61005,7 +62137,6 @@ async function initProject(opts = {}) {
61005
62137
  warnings.push(`Contributor MCP setup: ${err instanceof Error ? err.message : String(err)}`);
61006
62138
  }
61007
62139
  await initAgentDefinition(created, warnings);
61008
- await initCoreSkills(created, warnings);
61009
62140
  await initNexusRegistration(projRoot, created, warnings);
61010
62141
  try {
61011
62142
  const { AdapterManager: AdapterManager2 } = await Promise.resolve().then(() => (init_adapters(), adapters_exports));