@harness-engineering/cli 1.25.4 → 1.25.6

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 (123) hide show
  1. package/dist/agents/skills/claude-code/enforce-architecture/SKILL.md +12 -0
  2. package/dist/agents/skills/claude-code/harness-api-design/SKILL.md +12 -0
  3. package/dist/agents/skills/claude-code/harness-architecture-advisor/SKILL.md +12 -0
  4. package/dist/agents/skills/claude-code/harness-auth/SKILL.md +12 -0
  5. package/dist/agents/skills/claude-code/harness-code-review/SKILL.md +30 -6
  6. package/dist/agents/skills/claude-code/harness-database/SKILL.md +12 -0
  7. package/dist/agents/skills/claude-code/harness-debugging/SKILL.md +38 -6
  8. package/dist/agents/skills/claude-code/harness-deployment/SKILL.md +12 -0
  9. package/dist/agents/skills/claude-code/harness-execution/SKILL.md +30 -6
  10. package/dist/agents/skills/claude-code/harness-planning/SKILL.md +20 -9
  11. package/dist/agents/skills/claude-code/harness-pre-commit-review/SKILL.md +59 -6
  12. package/dist/agents/skills/claude-code/harness-refactoring/SKILL.md +28 -7
  13. package/dist/agents/skills/claude-code/harness-security-scan/SKILL.md +12 -0
  14. package/dist/agents/skills/claude-code/harness-skill-authoring/SKILL.md +43 -8
  15. package/dist/agents/skills/claude-code/harness-soundness-review/SKILL.md +59 -7
  16. package/dist/agents/skills/claude-code/harness-tdd/SKILL.md +21 -0
  17. package/dist/agents/skills/claude-code/harness-verification/SKILL.md +31 -6
  18. package/dist/agents/skills/codex/enforce-architecture/SKILL.md +12 -0
  19. package/dist/agents/skills/codex/harness-api-design/SKILL.md +12 -0
  20. package/dist/agents/skills/codex/harness-architecture-advisor/SKILL.md +12 -0
  21. package/dist/agents/skills/codex/harness-auth/SKILL.md +12 -0
  22. package/dist/agents/skills/codex/harness-code-review/SKILL.md +30 -6
  23. package/dist/agents/skills/codex/harness-database/SKILL.md +12 -0
  24. package/dist/agents/skills/codex/harness-debugging/SKILL.md +38 -6
  25. package/dist/agents/skills/codex/harness-deployment/SKILL.md +12 -0
  26. package/dist/agents/skills/codex/harness-execution/SKILL.md +30 -6
  27. package/dist/agents/skills/codex/harness-planning/SKILL.md +20 -9
  28. package/dist/agents/skills/codex/harness-pre-commit-review/SKILL.md +59 -6
  29. package/dist/agents/skills/codex/harness-refactoring/SKILL.md +28 -7
  30. package/dist/agents/skills/codex/harness-security-scan/SKILL.md +12 -0
  31. package/dist/agents/skills/codex/harness-skill-authoring/SKILL.md +43 -8
  32. package/dist/agents/skills/codex/harness-soundness-review/SKILL.md +59 -7
  33. package/dist/agents/skills/codex/harness-tdd/SKILL.md +21 -0
  34. package/dist/agents/skills/codex/harness-verification/SKILL.md +31 -6
  35. package/dist/agents/skills/cursor/enforce-architecture/SKILL.md +12 -0
  36. package/dist/agents/skills/cursor/harness-api-design/SKILL.md +12 -0
  37. package/dist/agents/skills/cursor/harness-architecture-advisor/SKILL.md +12 -0
  38. package/dist/agents/skills/cursor/harness-auth/SKILL.md +12 -0
  39. package/dist/agents/skills/cursor/harness-code-review/SKILL.md +30 -6
  40. package/dist/agents/skills/cursor/harness-database/SKILL.md +12 -0
  41. package/dist/agents/skills/cursor/harness-debugging/SKILL.md +38 -6
  42. package/dist/agents/skills/cursor/harness-deployment/SKILL.md +12 -0
  43. package/dist/agents/skills/cursor/harness-execution/SKILL.md +30 -6
  44. package/dist/agents/skills/cursor/harness-planning/SKILL.md +20 -9
  45. package/dist/agents/skills/cursor/harness-pre-commit-review/SKILL.md +59 -6
  46. package/dist/agents/skills/cursor/harness-refactoring/SKILL.md +28 -7
  47. package/dist/agents/skills/cursor/harness-security-scan/SKILL.md +12 -0
  48. package/dist/agents/skills/cursor/harness-skill-authoring/SKILL.md +43 -8
  49. package/dist/agents/skills/cursor/harness-soundness-review/SKILL.md +59 -7
  50. package/dist/agents/skills/cursor/harness-tdd/SKILL.md +21 -0
  51. package/dist/agents/skills/cursor/harness-verification/SKILL.md +31 -6
  52. package/dist/agents/skills/gemini-cli/enforce-architecture/SKILL.md +12 -0
  53. package/dist/agents/skills/gemini-cli/harness-api-design/SKILL.md +12 -0
  54. package/dist/agents/skills/gemini-cli/harness-architecture-advisor/SKILL.md +12 -0
  55. package/dist/agents/skills/gemini-cli/harness-auth/SKILL.md +12 -0
  56. package/dist/agents/skills/gemini-cli/harness-code-review/SKILL.md +30 -6
  57. package/dist/agents/skills/gemini-cli/harness-database/SKILL.md +12 -0
  58. package/dist/agents/skills/gemini-cli/harness-debugging/SKILL.md +38 -6
  59. package/dist/agents/skills/gemini-cli/harness-deployment/SKILL.md +12 -0
  60. package/dist/agents/skills/gemini-cli/harness-execution/SKILL.md +30 -6
  61. package/dist/agents/skills/gemini-cli/harness-planning/SKILL.md +20 -9
  62. package/dist/agents/skills/gemini-cli/harness-pre-commit-review/SKILL.md +59 -6
  63. package/dist/agents/skills/gemini-cli/harness-refactoring/SKILL.md +28 -7
  64. package/dist/agents/skills/gemini-cli/harness-security-scan/SKILL.md +12 -0
  65. package/dist/agents/skills/gemini-cli/harness-skill-authoring/SKILL.md +43 -8
  66. package/dist/agents/skills/gemini-cli/harness-soundness-review/SKILL.md +59 -7
  67. package/dist/agents/skills/gemini-cli/harness-tdd/SKILL.md +21 -0
  68. package/dist/agents/skills/gemini-cli/harness-verification/SKILL.md +31 -6
  69. package/dist/{agents-md-MCUM4SIZ.js → agents-md-2PYJM2MK.js} +3 -3
  70. package/dist/{architecture-HNIO6AUX.js → architecture-VCLB7A23.js} +4 -4
  71. package/dist/{assess-project-6MV5TNY3.js → assess-project-64C6LIKN.js} +1 -1
  72. package/dist/bin/harness-mcp.js +16 -15
  73. package/dist/bin/harness.js +27 -115
  74. package/dist/business-knowledge-6RHYJOB3.js +7 -0
  75. package/dist/{check-phase-gate-VCBQHQAC.js → check-phase-gate-RT6PGEHY.js} +4 -4
  76. package/dist/{chunk-MI6MA6OP.js → chunk-42ZZLMYD.js} +169 -118
  77. package/dist/{chunk-BUYW3SA2.js → chunk-43VBX44J.js} +219 -107
  78. package/dist/{chunk-UV3BZMGT.js → chunk-4YEBV2FT.js} +2 -2
  79. package/dist/{chunk-5BQ5BOJL.js → chunk-7BAGSY5Q.js} +1 -1
  80. package/dist/{chunk-FSNPBT74.js → chunk-BUJOMC3O.js} +1 -1
  81. package/dist/{chunk-M55DGGF3.js → chunk-CBZECDCW.js} +5 -5
  82. package/dist/{chunk-XTITAVUR.js → chunk-EY6F2QXW.js} +1 -1
  83. package/dist/{chunk-6VZQJ5CX.js → chunk-FL6A72LV.js} +1 -1
  84. package/dist/{chunk-CXJTVICF.js → chunk-JQCS75DY.js} +4 -4
  85. package/dist/{chunk-WIQA4BSH.js → chunk-JUXFYB2K.js} +1 -1
  86. package/dist/{chunk-FES2YEQU.js → chunk-KJC4SE7C.js} +9 -9
  87. package/dist/{chunk-4NK7Z3BP.js → chunk-R2BI5UPK.js} +1 -1
  88. package/dist/{chunk-2KZAXESR.js → chunk-R7P2FMJT.js} +360 -183
  89. package/dist/chunk-RC5ZY3EV.js +82 -0
  90. package/dist/{chunk-K2SON7TI.js → chunk-RDQGCHKD.js} +252 -57
  91. package/dist/{chunk-EHRZMOQ2.js → chunk-RKZW3FDF.js} +1 -1
  92. package/dist/{chunk-BOQRTARD.js → chunk-SMY35HJM.js} +1 -1
  93. package/dist/{chunk-UQZBZINS.js → chunk-SZZ5UQL7.js} +6 -6
  94. package/dist/{chunk-AT74HEQM.js → chunk-U2OMWI7Z.js} +1 -1
  95. package/dist/{chunk-P7PANON5.js → chunk-VELT5VAG.js} +1 -1
  96. package/dist/{chunk-YTP2UDPV.js → chunk-WEOGCL7B.js} +3 -3
  97. package/dist/{chunk-TYV4EUAD.js → chunk-X2JJ3CPG.js} +8 -8
  98. package/dist/{chunk-GEEYCQDS.js → chunk-XLO4AXXM.js} +9 -9
  99. package/dist/{chunk-47N6R2F4.js → chunk-XMEEYMGE.js} +1 -1
  100. package/dist/{chunk-FIQL2HND.js → chunk-Y5JA4J2M.js} +2 -2
  101. package/dist/{chunk-F23H3U5U.js → chunk-ZAKUCM7O.js} +2 -2
  102. package/dist/{ci-workflow-RTM7VVTD.js → ci-workflow-SZL3KVUK.js} +3 -3
  103. package/dist/{dist-RADHOOXG.js → dist-GRW3X2ZQ.js} +3 -1
  104. package/dist/{dist-WCSJHQPK.js → dist-T3DGV5UN.js} +16 -2
  105. package/dist/{docs-UBOGGHTY.js → docs-WDLJORLK.js} +4 -4
  106. package/dist/{engine-MJJAP5CH.js → engine-2YWYRCKK.js} +3 -3
  107. package/dist/{entropy-EMSXF2PX.js → entropy-PJGTOORX.js} +3 -3
  108. package/dist/{feedback-ZLUX72HD.js → feedback-M5KCJKL2.js} +1 -1
  109. package/dist/{generate-agent-definitions-AWLPJ27C.js → generate-agent-definitions-MFDW6LZT.js} +4 -4
  110. package/dist/{graph-loader-JHQVQRUS.js → graph-loader-QMKXT454.js} +1 -1
  111. package/dist/hooks/telemetry-reporter.js +22 -1
  112. package/dist/index.d.ts +5 -5
  113. package/dist/index.js +26 -25
  114. package/dist/{loader-JVSJZSWZ.js → loader-6O52FYHE.js} +3 -3
  115. package/dist/{mcp-JZ7YB7TD.js → mcp-GGNFWKVC.js} +16 -15
  116. package/dist/{performance-7AGWJUY4.js → performance-337U5URQ.js} +4 -4
  117. package/dist/{review-pipeline-ZWVQJTJX.js → review-pipeline-DB5RD4SN.js} +3 -3
  118. package/dist/{runtime-D6YUQPP2.js → runtime-B74EN2WD.js} +3 -3
  119. package/dist/{scan-MPJ6JHUY.js → scan-DXQUHGTT.js} +1 -1
  120. package/dist/{security-JLZUAQYT.js → security-3AYN6FVU.js} +1 -1
  121. package/dist/{validate-TIIHRPMA.js → validate-35CD7VWN.js} +4 -4
  122. package/dist/{validate-cross-check-ZOWFA3DB.js → validate-cross-check-LJKXBQYH.js} +3 -3
  123. package/package.json +5 -5
@@ -1,3 +1,10 @@
1
+ import {
2
+ assessProjectDefinition,
3
+ handleAssessProject
4
+ } from "./chunk-SZZ5UQL7.js";
5
+ import {
6
+ getBusinessKnowledgeResource
7
+ } from "./chunk-RC5ZY3EV.js";
1
8
  import {
2
9
  analyzeDiffDefinition,
3
10
  createSelfReviewDefinition,
@@ -5,41 +12,37 @@ import {
5
12
  handleCreateSelfReview,
6
13
  handleRequestPeerReview,
7
14
  requestPeerReviewDefinition
8
- } from "./chunk-FES2YEQU.js";
15
+ } from "./chunk-KJC4SE7C.js";
9
16
  import {
10
17
  getSecurityTrendsDefinition,
11
18
  handleGetSecurityTrends,
12
19
  handleRunSecurityScan,
13
20
  runSecurityScanDefinition
14
- } from "./chunk-UV3BZMGT.js";
21
+ } from "./chunk-4YEBV2FT.js";
15
22
  import {
16
23
  handleRunCodeReview,
17
24
  runCodeReviewDefinition,
18
25
  sortFindingsBySeverity
19
- } from "./chunk-F23H3U5U.js";
20
- import {
21
- assessProjectDefinition,
22
- handleAssessProject
23
- } from "./chunk-UQZBZINS.js";
26
+ } from "./chunk-ZAKUCM7O.js";
24
27
  import {
25
28
  handleValidateProject,
26
29
  validateToolDefinition
27
- } from "./chunk-YTP2UDPV.js";
30
+ } from "./chunk-WEOGCL7B.js";
28
31
  import {
29
32
  checkDependenciesDefinition,
30
33
  handleCheckDependencies
31
- } from "./chunk-CXJTVICF.js";
34
+ } from "./chunk-JQCS75DY.js";
32
35
  import {
33
36
  resolveProjectConfig
34
- } from "./chunk-47N6R2F4.js";
37
+ } from "./chunk-XMEEYMGE.js";
35
38
  import {
36
39
  checkDocsDefinition,
37
40
  handleCheckDocs
38
- } from "./chunk-GEEYCQDS.js";
41
+ } from "./chunk-XLO4AXXM.js";
39
42
  import {
40
43
  detectEntropyDefinition,
41
44
  handleDetectEntropy
42
- } from "./chunk-M55DGGF3.js";
45
+ } from "./chunk-CBZECDCW.js";
43
46
  import {
44
47
  checkPerformanceDefinition,
45
48
  getCriticalPathsDefinition,
@@ -49,7 +52,7 @@ import {
49
52
  handleGetPerfBaselines,
50
53
  handleUpdatePerfBaselines,
51
54
  updatePerfBaselinesDefinition
52
- } from "./chunk-TYV4EUAD.js";
55
+ } from "./chunk-X2JJ3CPG.js";
53
56
  import {
54
57
  resultToMcpResponse
55
58
  } from "./chunk-EPUKTTJZ.js";
@@ -58,7 +61,7 @@ import {
58
61
  } from "./chunk-W6Y7ZW3Y.js";
59
62
  import {
60
63
  resolveConfig
61
- } from "./chunk-WIQA4BSH.js";
64
+ } from "./chunk-JUXFYB2K.js";
62
65
  import {
63
66
  GENERATED_HEADER_CLAUDE,
64
67
  GENERATED_HEADER_CODEX,
@@ -80,7 +83,7 @@ import {
80
83
  } from "./chunk-6B6UN6SG.js";
81
84
  import {
82
85
  loadGraphStore
83
- } from "./chunk-BOQRTARD.js";
86
+ } from "./chunk-SMY35HJM.js";
84
87
  import {
85
88
  CompactionPipeline,
86
89
  DEFAULT_TOKEN_BUDGET,
@@ -98,7 +101,7 @@ import {
98
101
  scanForInjection,
99
102
  serializeEnvelope,
100
103
  writeTaint
101
- } from "./chunk-MI6MA6OP.js";
104
+ } from "./chunk-42ZZLMYD.js";
102
105
  import {
103
106
  Err,
104
107
  Ok
@@ -287,6 +290,7 @@ hooks/
287
290
  interactions/
288
291
  security/
289
292
  sessions/
293
+ streams/
290
294
  workspaces/
291
295
  state.json
292
296
  state/
@@ -695,7 +699,7 @@ ${skippedMsg}`
695
699
  async function handleInitProject(input) {
696
700
  const i = input;
697
701
  try {
698
- const { TemplateEngine } = await import("./engine-MJJAP5CH.js");
702
+ const { TemplateEngine } = await import("./engine-2YWYRCKK.js");
699
703
  const engine = new TemplateEngine(resolveTemplatesDir());
700
704
  const safePath = sanitizePath(i.path);
701
705
  const detected = tryDetectFramework(engine, safePath, i);
@@ -717,7 +721,7 @@ var listPersonasDefinition = {
717
721
  inputSchema: { type: "object", properties: {} }
718
722
  };
719
723
  async function handleListPersonas() {
720
- const { listPersonas } = await import("./loader-JVSJZSWZ.js");
724
+ const { listPersonas } = await import("./loader-6O52FYHE.js");
721
725
  const result = listPersonas(resolvePersonasDir());
722
726
  return resultToMcpResponse(result);
723
727
  }
@@ -741,10 +745,10 @@ async function handleGeneratePersonaArtifacts(input) {
741
745
  if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.name)) {
742
746
  return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.name}`)));
743
747
  }
744
- const { loadPersona } = await import("./loader-JVSJZSWZ.js");
745
- const { generateRuntime } = await import("./runtime-D6YUQPP2.js");
746
- const { generateAgentsMd } = await import("./agents-md-MCUM4SIZ.js");
747
- const { generateCIWorkflow } = await import("./ci-workflow-RTM7VVTD.js");
748
+ const { loadPersona } = await import("./loader-6O52FYHE.js");
749
+ const { generateRuntime } = await import("./runtime-B74EN2WD.js");
750
+ const { generateAgentsMd } = await import("./agents-md-2PYJM2MK.js");
751
+ const { generateCIWorkflow } = await import("./ci-workflow-SZL3KVUK.js");
748
752
  const personasDir = resolvePersonasDir();
749
753
  const filePath = path3.join(personasDir, `${input.name}.yaml`);
750
754
  if (!filePath.startsWith(personasDir)) {
@@ -799,7 +803,7 @@ async function handleRunPersona(input) {
799
803
  if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.persona)) {
800
804
  return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.persona}`)));
801
805
  }
802
- const { loadPersona } = await import("./loader-JVSJZSWZ.js");
806
+ const { loadPersona } = await import("./loader-6O52FYHE.js");
803
807
  const { runPersona } = await import("./runner-AAEF2TXY.js");
804
808
  const { executeSkill } = await import("./skill-executor-MOCUIAYS.js");
805
809
  const personasDir = resolvePersonasDir();
@@ -1335,6 +1339,15 @@ function loadOrGenerateProfile(projectRoot) {
1335
1339
  return profile;
1336
1340
  }
1337
1341
 
1342
+ // src/mcp/tools/event-emitter.ts
1343
+ async function emitSkillEvent(projectPath, event) {
1344
+ try {
1345
+ const { emitEvent } = await import("./dist-T3DGV5UN.js");
1346
+ await emitEvent(projectPath, event);
1347
+ } catch {
1348
+ }
1349
+ }
1350
+
1338
1351
  // src/mcp/tools/skill.ts
1339
1352
  var runSkillDefinition = {
1340
1353
  name: "run_skill",
@@ -1442,6 +1455,14 @@ ${stateContent}
1442
1455
  } catch {
1443
1456
  }
1444
1457
  }
1458
+ if (input.path) {
1459
+ await emitSkillEvent(projectRoot, {
1460
+ skill: input.skill,
1461
+ type: "phase_transition",
1462
+ summary: `skill invoked: ${input.skill}`,
1463
+ data: { from: "", to: input.phase ?? "start" }
1464
+ });
1465
+ }
1445
1466
  return resultToMcpResponse(Ok(content));
1446
1467
  }
1447
1468
  var createSkillDefinition = {
@@ -1593,7 +1614,7 @@ async function autoSyncRoadmap(projectPath) {
1593
1614
  try {
1594
1615
  const roadmapFile = path11.join(projectPath, "docs", "roadmap.md");
1595
1616
  if (!fs10.existsSync(roadmapFile)) return;
1596
- const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-WCSJHQPK.js");
1617
+ const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-T3DGV5UN.js");
1597
1618
  const raw = fs10.readFileSync(roadmapFile, "utf-8");
1598
1619
  const parseResult = parseRoadmap(raw);
1599
1620
  if (!parseResult.ok) return;
@@ -1623,7 +1644,7 @@ async function triggerExternalSync(projectPath, roadmapFile) {
1623
1644
  console.warn("[roadmap-sync] GITHUB_TOKEN not found \u2014 external sync skipped");
1624
1645
  return;
1625
1646
  }
1626
- const { fullSync, GitHubIssuesSyncAdapter } = await import("./dist-WCSJHQPK.js");
1647
+ const { fullSync, GitHubIssuesSyncAdapter } = await import("./dist-T3DGV5UN.js");
1627
1648
  const adapter = new GitHubIssuesSyncAdapter({
1628
1649
  token,
1629
1650
  config: trackerConfig
@@ -1720,12 +1741,12 @@ var manageStateDefinition = {
1720
1741
  }
1721
1742
  };
1722
1743
  async function handleShow(projectPath, input) {
1723
- const { loadState } = await import("./dist-WCSJHQPK.js");
1744
+ const { loadState } = await import("./dist-T3DGV5UN.js");
1724
1745
  return resultToMcpResponse(await loadState(projectPath, input.stream, input.session));
1725
1746
  }
1726
1747
  async function handleLearn(projectPath, input) {
1727
1748
  if (!input.learning) return mcpError("Error: learning is required for learn action");
1728
- const { appendLearning } = await import("./dist-WCSJHQPK.js");
1749
+ const { appendLearning } = await import("./dist-T3DGV5UN.js");
1729
1750
  const result = await appendLearning(
1730
1751
  projectPath,
1731
1752
  input.learning,
@@ -1740,7 +1761,7 @@ async function handleLearn(projectPath, input) {
1740
1761
  async function handleFailure(projectPath, input) {
1741
1762
  if (!input.description) return mcpError("Error: description is required for failure action");
1742
1763
  if (!input.failureType) return mcpError("Error: failureType is required for failure action");
1743
- const { appendFailure } = await import("./dist-WCSJHQPK.js");
1764
+ const { appendFailure } = await import("./dist-T3DGV5UN.js");
1744
1765
  const result = await appendFailure(
1745
1766
  projectPath,
1746
1767
  input.description,
@@ -1750,27 +1771,48 @@ async function handleFailure(projectPath, input) {
1750
1771
  input.session
1751
1772
  );
1752
1773
  if (!result.ok) return resultToMcpResponse(result);
1774
+ await emitSkillEvent(projectPath, {
1775
+ skill: input.skillName ?? "unknown",
1776
+ type: "error",
1777
+ summary: input.description,
1778
+ data: { failureType: input.failureType }
1779
+ });
1753
1780
  return resultToMcpResponse(Ok({ recorded: true }));
1754
1781
  }
1755
1782
  async function handleArchive(projectPath, input) {
1756
- const { archiveFailures } = await import("./dist-WCSJHQPK.js");
1783
+ const { archiveFailures } = await import("./dist-T3DGV5UN.js");
1757
1784
  const result = await archiveFailures(projectPath, input.stream, input.session);
1758
1785
  if (!result.ok) return resultToMcpResponse(result);
1759
1786
  return resultToMcpResponse(Ok({ archived: true }));
1760
1787
  }
1761
1788
  async function handleReset(projectPath, input) {
1762
- const { saveState, DEFAULT_STATE } = await import("./dist-WCSJHQPK.js");
1789
+ const { saveState, DEFAULT_STATE } = await import("./dist-T3DGV5UN.js");
1763
1790
  const result = await saveState(projectPath, { ...DEFAULT_STATE }, input.stream, input.session);
1764
1791
  if (!result.ok) return resultToMcpResponse(result);
1765
1792
  return resultToMcpResponse(Ok({ reset: true }));
1766
1793
  }
1767
- async function handleGate(projectPath, _input) {
1768
- const { runMechanicalGate } = await import("./dist-WCSJHQPK.js");
1769
- return resultToMcpResponse(await runMechanicalGate(projectPath));
1794
+ async function handleGate(projectPath, input) {
1795
+ const { runMechanicalGate } = await import("./dist-T3DGV5UN.js");
1796
+ const result = await runMechanicalGate(projectPath);
1797
+ if (result.ok) {
1798
+ await emitSkillEvent(projectPath, {
1799
+ skill: input.skillName ?? "unknown",
1800
+ type: "gate_result",
1801
+ summary: result.value.passed ? "gate passed" : "gate failed",
1802
+ data: {
1803
+ passed: result.value.passed,
1804
+ checks: result.value.checks?.map((c) => ({
1805
+ name: c.name,
1806
+ passed: c.passed
1807
+ }))
1808
+ }
1809
+ });
1810
+ }
1811
+ return resultToMcpResponse(result);
1770
1812
  }
1771
1813
  async function handleSaveHandoff(projectPath, input) {
1772
1814
  if (!input.handoff) return mcpError("Error: handoff is required for save-handoff action");
1773
- const { saveHandoff } = await import("./dist-WCSJHQPK.js");
1815
+ const { saveHandoff } = await import("./dist-T3DGV5UN.js");
1774
1816
  const result = await saveHandoff(
1775
1817
  projectPath,
1776
1818
  input.handoff,
@@ -1778,11 +1820,21 @@ async function handleSaveHandoff(projectPath, input) {
1778
1820
  input.session
1779
1821
  );
1780
1822
  if (!result.ok) return resultToMcpResponse(result);
1823
+ const handoffData = input.handoff;
1824
+ await emitSkillEvent(projectPath, {
1825
+ skill: input.skillName ?? handoffData.fromSkill ?? "unknown",
1826
+ type: "handoff",
1827
+ summary: handoffData.summary ?? "session handoff",
1828
+ data: {
1829
+ fromSkill: handoffData.fromSkill,
1830
+ toSkill: handoffData.toSkill
1831
+ }
1832
+ });
1781
1833
  await autoSyncRoadmap(projectPath);
1782
1834
  return resultToMcpResponse(Ok({ saved: true }));
1783
1835
  }
1784
1836
  async function handleLoadHandoff(projectPath, input) {
1785
- const { loadHandoff } = await import("./dist-WCSJHQPK.js");
1837
+ const { loadHandoff } = await import("./dist-T3DGV5UN.js");
1786
1838
  return resultToMcpResponse(await loadHandoff(projectPath, input.stream, input.session));
1787
1839
  }
1788
1840
  async function handleAppendEntry(projectPath, input) {
@@ -1790,7 +1842,7 @@ async function handleAppendEntry(projectPath, input) {
1790
1842
  if (!input.authorSkill) return mcpError("Error: authorSkill is required for append_entry action");
1791
1843
  if (!input.content) return mcpError("Error: content is required for append_entry action");
1792
1844
  if (input.session) {
1793
- const { appendSessionEntry } = await import("./dist-WCSJHQPK.js");
1845
+ const { appendSessionEntry } = await import("./dist-T3DGV5UN.js");
1794
1846
  const result = await appendSessionEntry(
1795
1847
  projectPath,
1796
1848
  input.session,
@@ -1803,7 +1855,7 @@ async function handleAppendEntry(projectPath, input) {
1803
1855
  if (input.section !== "decisions") {
1804
1856
  return mcpError("Error: session is required for non-decisions sections");
1805
1857
  }
1806
- const { loadState, saveState } = await import("./dist-WCSJHQPK.js");
1858
+ const { loadState, saveState } = await import("./dist-T3DGV5UN.js");
1807
1859
  const lr = await loadState(projectPath, input.stream);
1808
1860
  if (!lr.ok) return resultToMcpResponse(lr);
1809
1861
  lr.value.decisions.push({
@@ -1821,7 +1873,7 @@ async function handleUpdateEntryStatus(projectPath, input) {
1821
1873
  if (!input.entryId) return mcpError("Error: entryId is required for update_entry_status action");
1822
1874
  if (!input.newStatus)
1823
1875
  return mcpError("Error: newStatus is required for update_entry_status action");
1824
- const { updateSessionEntryStatus } = await import("./dist-WCSJHQPK.js");
1876
+ const { updateSessionEntryStatus } = await import("./dist-T3DGV5UN.js");
1825
1877
  const result = await updateSessionEntryStatus(
1826
1878
  projectPath,
1827
1879
  input.session,
@@ -1834,7 +1886,7 @@ async function handleUpdateEntryStatus(projectPath, input) {
1834
1886
  async function handleReadSection(projectPath, input) {
1835
1887
  if (!input.session) return mcpError("Error: session is required for read_section action");
1836
1888
  if (!input.section) return mcpError("Error: section is required for read_section action");
1837
- const { readSessionSection } = await import("./dist-WCSJHQPK.js");
1889
+ const { readSessionSection } = await import("./dist-T3DGV5UN.js");
1838
1890
  const result = await readSessionSection(
1839
1891
  projectPath,
1840
1892
  input.session,
@@ -1844,13 +1896,13 @@ async function handleReadSection(projectPath, input) {
1844
1896
  }
1845
1897
  async function handleReadSections(projectPath, input) {
1846
1898
  if (!input.session) return mcpError("Error: session is required for read_sections action");
1847
- const { readSessionSections } = await import("./dist-WCSJHQPK.js");
1899
+ const { readSessionSections } = await import("./dist-T3DGV5UN.js");
1848
1900
  const result = await readSessionSections(projectPath, input.session);
1849
1901
  return resultToMcpResponse(result);
1850
1902
  }
1851
1903
  async function handleArchiveSession(projectPath, input) {
1852
1904
  if (!input.session) return mcpError("Error: session is required for archive_session action");
1853
- const { archiveSession } = await import("./dist-WCSJHQPK.js");
1905
+ const { archiveSession } = await import("./dist-T3DGV5UN.js");
1854
1906
  const result = await archiveSession(projectPath, input.session);
1855
1907
  if (!result.ok) return resultToMcpResponse(result);
1856
1908
  await autoSyncRoadmap(projectPath);
@@ -1864,12 +1916,28 @@ async function handleTaskComplete(projectPath, _input) {
1864
1916
  await autoSyncRoadmap(projectPath);
1865
1917
  return resultToMcpResponse(Ok({ synced: true, trigger: "task-complete" }));
1866
1918
  }
1867
- async function handlePhaseStart(projectPath, _input) {
1919
+ async function handlePhaseStart(projectPath, input) {
1868
1920
  await autoSyncRoadmap(projectPath);
1921
+ if (input.skillName) {
1922
+ await emitSkillEvent(projectPath, {
1923
+ skill: input.skillName,
1924
+ type: "phase_transition",
1925
+ summary: `entering phase: ${input.description ?? "unknown"}`,
1926
+ data: { from: "", to: input.description ?? "unknown" }
1927
+ });
1928
+ }
1869
1929
  return resultToMcpResponse(Ok({ synced: true, trigger: "phase-start" }));
1870
1930
  }
1871
- async function handlePhaseComplete(projectPath, _input) {
1931
+ async function handlePhaseComplete(projectPath, input) {
1872
1932
  await autoSyncRoadmap(projectPath);
1933
+ if (input.skillName) {
1934
+ await emitSkillEvent(projectPath, {
1935
+ skill: input.skillName,
1936
+ type: "phase_transition",
1937
+ summary: `completed phase: ${input.description ?? "unknown"}`,
1938
+ data: { from: input.description ?? "unknown", to: "" }
1939
+ });
1940
+ }
1873
1941
  return resultToMcpResponse(Ok({ synced: true, trigger: "phase-complete" }));
1874
1942
  }
1875
1943
  var ACTION_HANDLERS = {
@@ -1914,7 +1982,7 @@ var listStreamsDefinition = {
1914
1982
  };
1915
1983
  async function handleListStreams(input) {
1916
1984
  try {
1917
- const { listStreams, loadStreamIndex } = await import("./dist-WCSJHQPK.js");
1985
+ const { listStreams, loadStreamIndex } = await import("./dist-T3DGV5UN.js");
1918
1986
  const projectPath = sanitizePath(input.path);
1919
1987
  const indexResult = await loadStreamIndex(projectPath);
1920
1988
  const streamsResult = await listStreams(projectPath);
@@ -1952,7 +2020,7 @@ var checkPhaseGateDefinition = {
1952
2020
  };
1953
2021
  async function handleCheckPhaseGate(input) {
1954
2022
  try {
1955
- const { runCheckPhaseGate } = await import("./check-phase-gate-VCBQHQAC.js");
2023
+ const { runCheckPhaseGate } = await import("./check-phase-gate-RT6PGEHY.js");
1956
2024
  const result = await runCheckPhaseGate({ cwd: sanitizePath(input.path) });
1957
2025
  if (result.ok) {
1958
2026
  return { content: [{ type: "text", text: JSON.stringify(result.value) }] };
@@ -2008,7 +2076,7 @@ async function handleValidateCrossCheck(input) {
2008
2076
  };
2009
2077
  }
2010
2078
  try {
2011
- const { runCrossCheck } = await import("./validate-cross-check-ZOWFA3DB.js");
2079
+ const { runCrossCheck } = await import("./validate-cross-check-LJKXBQYH.js");
2012
2080
  const specsDir = path12.resolve(projectPath, input.specsDir ?? "docs/specs");
2013
2081
  if (!specsDir.startsWith(projectPath)) {
2014
2082
  return {
@@ -2475,7 +2543,7 @@ function resolveSkillSources(opts) {
2475
2543
  addSource(communityDir, "community");
2476
2544
  const globalCommunityDir = resolveGlobalCommunitySkillsDir();
2477
2545
  addSource(globalCommunityDir, "community");
2478
- if (opts.includeGlobal || sources.length === 0) {
2546
+ if (opts.includeGlobal || opts.global || sources.length === 0) {
2479
2547
  const globalDir = resolveGlobalSkillsDir();
2480
2548
  addSource(globalDir, "global");
2481
2549
  }
@@ -2731,7 +2799,7 @@ async function handleGenerateSlashCommands(input) {
2731
2799
  // src/mcp/resources/state.ts
2732
2800
  async function getStateResource(projectRoot) {
2733
2801
  try {
2734
- const { loadState, migrateToStreams } = await import("./dist-WCSJHQPK.js");
2802
+ const { loadState, migrateToStreams } = await import("./dist-T3DGV5UN.js");
2735
2803
  await migrateToStreams(projectRoot);
2736
2804
  const result = await loadState(projectRoot);
2737
2805
  if (result.ok) {
@@ -2849,7 +2917,7 @@ async function handleQueryGraph(input) {
2849
2917
  const projectPath = sanitizePath(input.path);
2850
2918
  const store = await loadGraphStore(projectPath);
2851
2919
  if (!store) return graphNotFoundError();
2852
- const { ContextQL } = await import("./dist-RADHOOXG.js");
2920
+ const { ContextQL } = await import("./dist-GRW3X2ZQ.js");
2853
2921
  const cql = new ContextQL(store);
2854
2922
  const result = cql.execute({
2855
2923
  rootNodeIds: input.rootNodeIds,
@@ -2931,7 +2999,7 @@ async function handleSearchSimilar(input) {
2931
2999
  const projectPath = sanitizePath(input.path);
2932
3000
  const store = await loadGraphStore(projectPath);
2933
3001
  if (!store) return graphNotFoundError();
2934
- const { FusionLayer } = await import("./dist-RADHOOXG.js");
3002
+ const { FusionLayer } = await import("./dist-GRW3X2ZQ.js");
2935
3003
  const fusion = new FusionLayer(store);
2936
3004
  const results = fusion.search(input.query, input.topK ?? 10);
2937
3005
  if (input.mode === "summary") {
@@ -2986,7 +3054,7 @@ async function handleFindContextFor(input) {
2986
3054
  const projectPath = sanitizePath(input.path);
2987
3055
  const store = await loadGraphStore(projectPath);
2988
3056
  if (!store) return graphNotFoundError();
2989
- const { FusionLayer, ContextQL } = await import("./dist-RADHOOXG.js");
3057
+ const { FusionLayer, ContextQL } = await import("./dist-GRW3X2ZQ.js");
2990
3058
  const fusion = new FusionLayer(store);
2991
3059
  const cql = new ContextQL(store);
2992
3060
  const tokenBudget = input.tokenBudget ?? 4e3;
@@ -3091,7 +3159,7 @@ async function handleGetRelationships(input) {
3091
3159
  const projectPath = sanitizePath(input.path);
3092
3160
  const store = await loadGraphStore(projectPath);
3093
3161
  if (!store) return graphNotFoundError();
3094
- const { ContextQL } = await import("./dist-RADHOOXG.js");
3162
+ const { ContextQL } = await import("./dist-GRW3X2ZQ.js");
3095
3163
  const cql = new ContextQL(store);
3096
3164
  const direction = input.direction ?? "both";
3097
3165
  const bidirectional = direction === "both" || direction === "inbound";
@@ -3209,7 +3277,7 @@ async function handleGetImpact(input) {
3209
3277
  const projectPath = sanitizePath(input.path);
3210
3278
  const store = await loadGraphStore(projectPath);
3211
3279
  if (!store) return graphNotFoundError();
3212
- const { ContextQL } = await import("./dist-RADHOOXG.js");
3280
+ const { ContextQL } = await import("./dist-GRW3X2ZQ.js");
3213
3281
  let targetNodeId = input.nodeId;
3214
3282
  if (!targetNodeId && input.filePath) {
3215
3283
  const fileNodes = store.findNodes({ type: "file" });
@@ -3341,7 +3409,7 @@ async function handleIngestSource(input) {
3341
3409
  try {
3342
3410
  const projectPath = sanitizePath(input.path);
3343
3411
  const graphDir = path16.join(projectPath, ".harness", "graph");
3344
- const { GraphStore, CodeIngestor, TopologicalLinker, KnowledgeIngestor, GitIngestor } = await import("./dist-RADHOOXG.js");
3412
+ const { GraphStore, CodeIngestor, TopologicalLinker, KnowledgeIngestor, GitIngestor } = await import("./dist-GRW3X2ZQ.js");
3345
3413
  const fs17 = await import("fs/promises");
3346
3414
  await fs17.mkdir(graphDir, { recursive: true });
3347
3415
  const store = new GraphStore();
@@ -3425,7 +3493,7 @@ async function handleDetectAnomalies(input) {
3425
3493
  const projectPath = sanitizePath(input.path);
3426
3494
  const store = await loadGraphStore(projectPath);
3427
3495
  if (!store) return graphNotFoundError();
3428
- const { GraphAnomalyAdapter } = await import("./dist-RADHOOXG.js");
3496
+ const { GraphAnomalyAdapter } = await import("./dist-GRW3X2ZQ.js");
3429
3497
  const adapter = new GraphAnomalyAdapter(store);
3430
3498
  const report = adapter.detect({
3431
3499
  ...input.threshold !== void 0 && { threshold: input.threshold },
@@ -3474,7 +3542,7 @@ async function handleAskGraph(input) {
3474
3542
  const projectPath = sanitizePath(input.path);
3475
3543
  const store = await loadGraphStore(projectPath);
3476
3544
  if (!store) return graphNotFoundError();
3477
- const { askGraph } = await import("./dist-RADHOOXG.js");
3545
+ const { askGraph } = await import("./dist-GRW3X2ZQ.js");
3478
3546
  const result = await askGraph(store, input.question);
3479
3547
  return {
3480
3548
  content: [{ type: "text", text: JSON.stringify(result) }]
@@ -3538,7 +3606,7 @@ async function handleComputeBlastRadius(input) {
3538
3606
  const projectPath = sanitizePath(input.path);
3539
3607
  const store = await loadGraphStore(projectPath);
3540
3608
  if (!store) return graphNotFoundError();
3541
- const { CascadeSimulator } = await import("./dist-RADHOOXG.js");
3609
+ const { CascadeSimulator } = await import("./dist-GRW3X2ZQ.js");
3542
3610
  let targetNodeId = input.nodeId;
3543
3611
  if (!targetNodeId && input.file) {
3544
3612
  const fileNodes = store.findNodes({ type: "file" });
@@ -3739,7 +3807,7 @@ var generateAgentDefinitionsDefinition = {
3739
3807
  }
3740
3808
  };
3741
3809
  async function handleGenerateAgentDefinitions(input) {
3742
- const { generateAgentDefinitions } = await import("./generate-agent-definitions-AWLPJ27C.js");
3810
+ const { generateAgentDefinitions } = await import("./generate-agent-definitions-MFDW6LZT.js");
3743
3811
  const platforms = input.platform === "all" || !input.platform ? ["claude-code", "gemini-cli"] : [input.platform];
3744
3812
  const results = generateAgentDefinitions({
3745
3813
  platforms: [...platforms],
@@ -4067,7 +4135,7 @@ function shouldTriggerExternalSync(input, response) {
4067
4135
  }
4068
4136
  async function handleManageRoadmap(input) {
4069
4137
  try {
4070
- const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges, assignFeature } = await import("./dist-WCSJHQPK.js");
4138
+ const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges, assignFeature } = await import("./dist-T3DGV5UN.js");
4071
4139
  const { Ok: Ok2 } = await import("./dist-3EWNRFFQ.js");
4072
4140
  const projectPath = sanitizePath(input.path);
4073
4141
  const deps = {
@@ -4502,7 +4570,7 @@ async function handleTransition(validInput, projectPath, id) {
4502
4570
  const transition = transitionResult.data;
4503
4571
  const prompt = renderTransition(transition);
4504
4572
  try {
4505
- const { saveHandoff } = await import("./dist-WCSJHQPK.js");
4573
+ const { saveHandoff } = await import("./dist-T3DGV5UN.js");
4506
4574
  await saveHandoff(
4507
4575
  projectPath,
4508
4576
  {
@@ -4529,6 +4597,19 @@ async function handleTransition(validInput, projectPath, id) {
4529
4597
  `${transition.completedPhase} -> ${transition.suggestedNext}`,
4530
4598
  validInput.stream
4531
4599
  );
4600
+ const skillName = "emit_interaction";
4601
+ await emitSkillEvent(projectPath, {
4602
+ skill: skillName,
4603
+ type: "phase_transition",
4604
+ summary: `${transition.completedPhase} -> ${transition.suggestedNext}`,
4605
+ data: { from: transition.completedPhase, to: transition.suggestedNext }
4606
+ });
4607
+ await emitSkillEvent(projectPath, {
4608
+ skill: skillName,
4609
+ type: "handoff",
4610
+ summary: transition.reason,
4611
+ data: { fromSkill: skillName, toSkill: transition.suggestedNext }
4612
+ });
4532
4613
  const metadata = { id, handoffWritten: true };
4533
4614
  if (!transition.requiresConfirmation) {
4534
4615
  metadata.autoTransition = true;
@@ -4570,7 +4651,7 @@ async function handleEmitInteraction(input) {
4570
4651
  }
4571
4652
  async function recordInteraction(projectPath, id, type, decision, stream) {
4572
4653
  try {
4573
- const { loadState, saveState } = await import("./dist-WCSJHQPK.js");
4654
+ const { loadState, saveState } = await import("./dist-T3DGV5UN.js");
4574
4655
  const stateResult = await loadState(projectPath, stream);
4575
4656
  if (stateResult.ok) {
4576
4657
  const state = stateResult.value;
@@ -4593,17 +4674,22 @@ function flattenSessionSections(sections) {
4593
4674
  ([name, entries]) => Array.isArray(entries) ? entries.map((e) => ({ sectionName: name, ...e })) : []
4594
4675
  );
4595
4676
  }
4596
- function sectionItems(input) {
4597
- if (input.section === "graphContext") {
4598
- const blocks = input.graphContext?.context ?? [];
4599
- return [...blocks].sort((a, b) => b.score - a.score);
4600
- }
4601
- if (input.section === "learnings") {
4602
- return Array.isArray(input.learnings) ? input.learnings : [];
4603
- }
4677
+ function graphContextItems(input) {
4678
+ const blocks = input.graphContext?.context ?? [];
4679
+ return [...blocks].sort((a, b) => b.score - a.score);
4680
+ }
4681
+ function sessionSectionItems(input) {
4604
4682
  const flat = flattenSessionSections(input.sessionSections);
4605
4683
  return flat.sort((a, b) => (b.timestamp ?? "").localeCompare(a.timestamp ?? ""));
4606
4684
  }
4685
+ var sectionResolvers = {
4686
+ graphContext: graphContextItems,
4687
+ learnings: (input) => Array.isArray(input.learnings) ? input.learnings : [],
4688
+ sessionSections: sessionSectionItems
4689
+ };
4690
+ function sectionItems(input) {
4691
+ return sectionResolvers[input.section](input);
4692
+ }
4607
4693
  function checkSectionGuards(section, mode) {
4608
4694
  if (section === "graphContext" && (mode ?? "summary") === "summary") {
4609
4695
  return {
@@ -4654,7 +4740,16 @@ var gatherContextDefinition = {
4654
4740
  type: "array",
4655
4741
  items: {
4656
4742
  type: "string",
4657
- enum: ["state", "learnings", "handoff", "graph", "validation", "sessions", "events"]
4743
+ enum: [
4744
+ "state",
4745
+ "learnings",
4746
+ "handoff",
4747
+ "graph",
4748
+ "validation",
4749
+ "sessions",
4750
+ "events",
4751
+ "businessKnowledge"
4752
+ ]
4658
4753
  },
4659
4754
  description: "Which constituents to include (default: all)"
4660
4755
  },
@@ -4717,10 +4812,10 @@ async function handleGatherContext(input) {
4717
4812
  input.include ?? ["state", "learnings", "handoff", "graph", "validation"]
4718
4813
  );
4719
4814
  const errors = [];
4720
- const statePromise = includeSet.has("state") ? import("./dist-WCSJHQPK.js").then(
4815
+ const statePromise = includeSet.has("state") ? import("./dist-T3DGV5UN.js").then(
4721
4816
  (core) => core.loadState(projectPath, void 0, input.session)
4722
4817
  ) : Promise.resolve(null);
4723
- const learningsPromise = includeSet.has("learnings") ? import("./dist-WCSJHQPK.js").then(
4818
+ const learningsPromise = includeSet.has("learnings") ? import("./dist-T3DGV5UN.js").then(
4724
4819
  (core) => core.loadBudgetedLearnings(projectPath, {
4725
4820
  intent: input.intent,
4726
4821
  tokenBudget: input.learningsBudget ?? 1e3,
@@ -4729,14 +4824,14 @@ async function handleGatherContext(input) {
4729
4824
  ...input.depth !== void 0 && { depth: input.depth }
4730
4825
  })
4731
4826
  ) : Promise.resolve(null);
4732
- const handoffPromise = includeSet.has("handoff") ? import("./dist-WCSJHQPK.js").then(
4827
+ const handoffPromise = includeSet.has("handoff") ? import("./dist-T3DGV5UN.js").then(
4733
4828
  (core) => core.loadHandoff(projectPath, void 0, input.session)
4734
4829
  ) : Promise.resolve(null);
4735
4830
  const graphPromise = includeSet.has("graph") ? (async () => {
4736
- const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-JHQVQRUS.js");
4831
+ const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-QMKXT454.js");
4737
4832
  const store = await loadGraphStore2(projectPath);
4738
4833
  if (!store) return null;
4739
- const { FusionLayer, ContextQL } = await import("./dist-RADHOOXG.js");
4834
+ const { FusionLayer, ContextQL } = await import("./dist-GRW3X2ZQ.js");
4740
4835
  const fusion = new FusionLayer(store);
4741
4836
  const cql = new ContextQL(store);
4742
4837
  const tokenBudget = input.tokenBudget ?? 4e3;
@@ -4773,11 +4868,11 @@ async function handleGatherContext(input) {
4773
4868
  context: contextBlocks
4774
4869
  };
4775
4870
  })() : Promise.resolve(null);
4776
- const sessionsPromise = includeSet.has("sessions") && input.session ? import("./dist-WCSJHQPK.js").then(
4871
+ const sessionsPromise = includeSet.has("sessions") && input.session ? import("./dist-T3DGV5UN.js").then(
4777
4872
  (core) => core.readSessionSections(projectPath, input.session)
4778
4873
  ) : Promise.resolve(null);
4779
4874
  const shouldIncludeEvents = input.includeEvents !== void 0 ? input.includeEvents : includeSet.has("events") || !!input.session && !input.include;
4780
- const eventsPromise = shouldIncludeEvents ? import("./dist-WCSJHQPK.js").then(async (core) => {
4875
+ const eventsPromise = shouldIncludeEvents ? import("./dist-T3DGV5UN.js").then(async (core) => {
4781
4876
  const result = await core.loadEvents(projectPath, {
4782
4877
  session: input.session
4783
4878
  });
@@ -4785,11 +4880,16 @@ async function handleGatherContext(input) {
4785
4880
  return core.formatEventTimeline(result.value);
4786
4881
  }) : Promise.resolve(null);
4787
4882
  const validationPromise = includeSet.has("validation") ? (async () => {
4788
- const { handleValidateProject: handleValidateProject2 } = await import("./validate-TIIHRPMA.js");
4883
+ const { handleValidateProject: handleValidateProject2 } = await import("./validate-35CD7VWN.js");
4789
4884
  const result = await handleValidateProject2({ path: projectPath });
4790
4885
  const first = result.content[0];
4791
4886
  return first ? JSON.parse(first.text) : null;
4792
4887
  })() : Promise.resolve(null);
4888
+ const businessKnowledgePromise = includeSet.has("businessKnowledge") ? (async () => {
4889
+ const { getBusinessKnowledgeResource: getBusinessKnowledgeResource2 } = await import("./business-knowledge-6RHYJOB3.js");
4890
+ const raw = await getBusinessKnowledgeResource2(projectPath);
4891
+ return JSON.parse(raw);
4892
+ })() : Promise.resolve(null);
4793
4893
  const [
4794
4894
  stateResult,
4795
4895
  learningsResult,
@@ -4797,7 +4897,8 @@ async function handleGatherContext(input) {
4797
4897
  graphResult,
4798
4898
  validationResult,
4799
4899
  sessionsResult,
4800
- eventsResult
4900
+ eventsResult,
4901
+ businessKnowledgeResult
4801
4902
  ] = await Promise.allSettled([
4802
4903
  statePromise,
4803
4904
  learningsPromise,
@@ -4805,7 +4906,8 @@ async function handleGatherContext(input) {
4805
4906
  graphPromise,
4806
4907
  validationPromise,
4807
4908
  sessionsPromise,
4808
- eventsPromise
4909
+ eventsPromise,
4910
+ businessKnowledgePromise
4809
4911
  ]);
4810
4912
  function extract(settled, name) {
4811
4913
  if (settled.status === "rejected") {
@@ -4821,6 +4923,7 @@ async function handleGatherContext(input) {
4821
4923
  const validationRaw = extract(validationResult, "validation");
4822
4924
  const sessionsRaw = extract(sessionsResult, "sessions");
4823
4925
  const eventsTimeline = extract(eventsResult, "events");
4926
+ const businessKnowledgeRaw = extract(businessKnowledgeResult, "businessKnowledge");
4824
4927
  const state = stateRaw && typeof stateRaw === "object" && "ok" in stateRaw ? stateRaw.ok ? stateRaw.value : (() => {
4825
4928
  errors.push(`state: ${stateRaw.error.message}`);
4826
4929
  return null;
@@ -4869,6 +4972,7 @@ async function handleGatherContext(input) {
4869
4972
  validation: outputValidation,
4870
4973
  sessionSections: sessionSections ?? null,
4871
4974
  events: eventsTimeline || null,
4975
+ businessKnowledge: businessKnowledgeRaw ?? null,
4872
4976
  meta: {
4873
4977
  assembledIn,
4874
4978
  graphAvailable: graphContext !== null,
@@ -4879,7 +4983,7 @@ async function handleGatherContext(input) {
4879
4983
  };
4880
4984
  if (input.session) {
4881
4985
  try {
4882
- const core = await import("./dist-WCSJHQPK.js");
4986
+ const core = await import("./dist-T3DGV5UN.js");
4883
4987
  core.updateSessionIndex(
4884
4988
  projectPath,
4885
4989
  input.session,
@@ -5031,7 +5135,7 @@ async function handleReviewChanges(input) {
5031
5135
  }
5032
5136
  }
5033
5137
  async function runQuickReview(projectPath, diff, diffLines, downgraded, offset, limit) {
5034
- const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-ZLUX72HD.js");
5138
+ const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-M5KCJKL2.js");
5035
5139
  const result = await handleAnalyzeDiff2({ diff, path: projectPath });
5036
5140
  const firstContent = result.content[0];
5037
5141
  if (!firstContent) throw new Error("Empty analyze_diff response");
@@ -5066,7 +5170,7 @@ function extractFileCount(diffParsed) {
5066
5170
  return files?.length ?? 0;
5067
5171
  }
5068
5172
  async function runStandardReview(projectPath, diff, diffLines, downgraded, offset, limit) {
5069
- const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-ZLUX72HD.js");
5173
+ const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-M5KCJKL2.js");
5070
5174
  const [diffResult, reviewResult] = await Promise.all([
5071
5175
  handleAnalyzeDiff2({ diff, path: projectPath }),
5072
5176
  handleCreateSelfReview2({ path: projectPath, diff })
@@ -5101,7 +5205,7 @@ async function runStandardReview(projectPath, diff, diffLines, downgraded, offse
5101
5205
  };
5102
5206
  }
5103
5207
  async function runDeepReview(projectPath, diff, diffLines, _downgraded, offset, limit) {
5104
- const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-ZWVQJTJX.js");
5208
+ const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-DB5RD4SN.js");
5105
5209
  const result = await handleRunCodeReview2({
5106
5210
  path: projectPath,
5107
5211
  diff,
@@ -5180,7 +5284,7 @@ async function handleCheckTaskIndependence(input) {
5180
5284
  try {
5181
5285
  const projectPath = sanitizePath(input.path);
5182
5286
  const store = await loadGraphStore(projectPath);
5183
- const { TaskIndependenceAnalyzer } = await import("./dist-RADHOOXG.js");
5287
+ const { TaskIndependenceAnalyzer } = await import("./dist-GRW3X2ZQ.js");
5184
5288
  const analyzer = new TaskIndependenceAnalyzer(store ?? void 0);
5185
5289
  const result = analyzer.analyze({
5186
5290
  tasks: input.tasks,
@@ -5268,7 +5372,7 @@ async function handlePredictConflicts(input) {
5268
5372
  try {
5269
5373
  const projectPath = sanitizePath(input.path);
5270
5374
  const store = await loadGraphStore(projectPath);
5271
- const { ConflictPredictor } = await import("./dist-RADHOOXG.js");
5375
+ const { ConflictPredictor } = await import("./dist-GRW3X2ZQ.js");
5272
5376
  const predictor = new ConflictPredictor(store ?? void 0);
5273
5377
  const result = predictor.predict({
5274
5378
  tasks: input.tasks,
@@ -5374,7 +5478,7 @@ async function handleDetectStaleConstraints(input) {
5374
5478
  isError: true
5375
5479
  };
5376
5480
  }
5377
- const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-JHQVQRUS.js");
5481
+ const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-QMKXT454.js");
5378
5482
  const store = await loadGraphStore2(projectPath);
5379
5483
  if (!store) {
5380
5484
  return {
@@ -5395,7 +5499,7 @@ async function handleDetectStaleConstraints(input) {
5395
5499
  ]
5396
5500
  };
5397
5501
  }
5398
- const { detectStaleConstraints } = await import("./dist-WCSJHQPK.js");
5502
+ const { detectStaleConstraints } = await import("./dist-T3DGV5UN.js");
5399
5503
  const result = detectStaleConstraints(
5400
5504
  store,
5401
5505
  windowDays,
@@ -5515,10 +5619,10 @@ function countCriticalFindings(securityData) {
5515
5619
  return findings.filter((f) => f.severity === "error").length;
5516
5620
  }
5517
5621
  async function runHealthChecks(projectPath) {
5518
- const { handleAssessProject: handleAssessProject2 } = await import("./assess-project-6MV5TNY3.js");
5519
- const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-HNIO6AUX.js");
5520
- const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-EMSXF2PX.js");
5521
- const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-JLZUAQYT.js");
5622
+ const { handleAssessProject: handleAssessProject2 } = await import("./assess-project-64C6LIKN.js");
5623
+ const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-VCLB7A23.js");
5624
+ const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-PJGTOORX.js");
5625
+ const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-3AYN6FVU.js");
5522
5626
  const [assessResult, depsResult, entropyResult, securityResult] = await Promise.all([
5523
5627
  handleAssessProject2({
5524
5628
  path: projectPath,
@@ -5573,10 +5677,10 @@ function avg(values) {
5573
5677
  }
5574
5678
  async function runGraphMetrics(projectPath) {
5575
5679
  try {
5576
- const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-JHQVQRUS.js");
5680
+ const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-QMKXT454.js");
5577
5681
  const store = await loadGraphStore2(projectPath);
5578
5682
  if (!store) return ZERO_METRICS;
5579
- const { GraphCouplingAdapter, GraphComplexityAdapter, GraphAnomalyAdapter } = await import("./dist-RADHOOXG.js");
5683
+ const { GraphCouplingAdapter, GraphComplexityAdapter, GraphAnomalyAdapter } = await import("./dist-GRW3X2ZQ.js");
5580
5684
  const couplingAdapter = new GraphCouplingAdapter(store);
5581
5685
  const couplingData = couplingAdapter.computeCouplingData();
5582
5686
  const files = couplingData.files;
@@ -6315,7 +6419,7 @@ async function handleGetDecayTrends(input) {
6315
6419
  };
6316
6420
  }
6317
6421
  try {
6318
- const core = await import("./dist-WCSJHQPK.js");
6422
+ const core = await import("./dist-T3DGV5UN.js");
6319
6423
  const { TimelineManager } = core;
6320
6424
  const manager = new TimelineManager(projectPath);
6321
6425
  const timeline = manager.load();
@@ -6450,7 +6554,7 @@ async function handleCodeOutline(input) {
6450
6554
  };
6451
6555
  }
6452
6556
  try {
6453
- const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-WCSJHQPK.js");
6557
+ const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-T3DGV5UN.js");
6454
6558
  const { stat } = await import("fs/promises");
6455
6559
  const stats = await stat(targetPath).catch(() => null);
6456
6560
  if (stats?.isFile()) {
@@ -6469,7 +6573,7 @@ async function handleCodeOutline(input) {
6469
6573
  })
6470
6574
  );
6471
6575
  fileStats.sort((a, b) => b.mtimeMs - a.mtimeMs);
6472
- const { paginate: paginate2 } = await import("./dist-WCSJHQPK.js");
6576
+ const { paginate: paginate2 } = await import("./dist-T3DGV5UN.js");
6473
6577
  const paged = paginate2(fileStats, input.offset ?? 0, input.limit ?? 30);
6474
6578
  const results = [];
6475
6579
  for (const entry of paged.items) {
@@ -6542,7 +6646,7 @@ async function handleCodeSearch(input) {
6542
6646
  };
6543
6647
  }
6544
6648
  try {
6545
- const { searchSymbols } = await import("./dist-WCSJHQPK.js");
6649
+ const { searchSymbols } = await import("./dist-T3DGV5UN.js");
6546
6650
  const result = await searchSymbols(input.query, directory, input.glob);
6547
6651
  const lines = [`Search: "${result.query}" \u2014 ${result.matches.length} matches`];
6548
6652
  for (const match of result.matches) {
@@ -6611,7 +6715,7 @@ async function handleCodeUnfold(input) {
6611
6715
  }
6612
6716
  try {
6613
6717
  if (input.symbol) {
6614
- const { unfoldSymbol } = await import("./dist-WCSJHQPK.js");
6718
+ const { unfoldSymbol } = await import("./dist-T3DGV5UN.js");
6615
6719
  const result = await unfoldSymbol(filePath, input.symbol);
6616
6720
  const header = result.warning ? `${result.file}:${result.startLine}-${result.endLine} ${result.warning}
6617
6721
  ` : `${result.file}:${result.startLine}-${result.endLine}
@@ -6619,7 +6723,7 @@ async function handleCodeUnfold(input) {
6619
6723
  return { content: [{ type: "text", text: header + result.content }] };
6620
6724
  }
6621
6725
  if (input.startLine != null && input.endLine != null) {
6622
- const { unfoldRange } = await import("./dist-WCSJHQPK.js");
6726
+ const { unfoldRange } = await import("./dist-T3DGV5UN.js");
6623
6727
  const result = await unfoldRange(filePath, input.startLine, input.endLine);
6624
6728
  const header = `${result.file}:${result.startLine}-${result.endLine}
6625
6729
  `;
@@ -6681,7 +6785,7 @@ async function handleCheckTraceability(input) {
6681
6785
  isError: true
6682
6786
  };
6683
6787
  }
6684
- const { queryTraceability } = await import("./dist-RADHOOXG.js");
6788
+ const { queryTraceability } = await import("./dist-GRW3X2ZQ.js");
6685
6789
  const options = {};
6686
6790
  if (input.spec) options.specPath = input.spec;
6687
6791
  if (input.feature) options.featureName = input.feature;
@@ -6804,7 +6908,7 @@ async function handlePredictFailures(input) {
6804
6908
  };
6805
6909
  }
6806
6910
  try {
6807
- const core = await import("./dist-WCSJHQPK.js");
6911
+ const core = await import("./dist-T3DGV5UN.js");
6808
6912
  const { TimelineManager, PredictionEngine, SpecImpactEstimator } = core;
6809
6913
  const manager = new TimelineManager(projectPath);
6810
6914
  const includeRoadmap = input.includeRoadmap !== false;
@@ -6994,7 +7098,7 @@ function handleContentMode(content, pipeline, budget, source) {
6994
7098
  };
6995
7099
  }
6996
7100
  async function handleIntentMode(projectPath, intent, pipeline, budget, filterContent) {
6997
- const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-JHQVQRUS.js");
7101
+ const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-QMKXT454.js");
6998
7102
  const store = await loadGraphStore2(projectPath);
6999
7103
  if (!store) {
7000
7104
  return {
@@ -7007,7 +7111,7 @@ async function handleIntentMode(projectPath, intent, pipeline, budget, filterCon
7007
7111
  isError: true
7008
7112
  };
7009
7113
  }
7010
- const { PackedSummaryCache, FusionLayer, ContextQL } = await import("./dist-RADHOOXG.js");
7114
+ const { PackedSummaryCache, FusionLayer, ContextQL } = await import("./dist-GRW3X2ZQ.js");
7011
7115
  const cache = new PackedSummaryCache(store);
7012
7116
  const cachedEnvelope = cache.get(intent);
7013
7117
  if (cachedEnvelope) {
@@ -7220,7 +7324,7 @@ async function handleDetectConstraintEmergence(input) {
7220
7324
  }
7221
7325
  const nodePath = await import("path");
7222
7326
  const historyPath = nodePath.resolve(projectPath, ".harness/arch/violation-history.json");
7223
- const { ViolationHistoryManager, detectEmergentConstraints } = await import("./dist-WCSJHQPK.js");
7327
+ const { ViolationHistoryManager, detectEmergentConstraints } = await import("./dist-T3DGV5UN.js");
7224
7328
  const manager = new ViolationHistoryManager(historyPath);
7225
7329
  const history = manager.load();
7226
7330
  const options = { windowWeeks, minOccurrences };
@@ -7426,6 +7530,13 @@ var RESOURCE_DEFINITIONS = [
7426
7530
  description: "All edges with types, confidence scores, and timestamps",
7427
7531
  mimeType: "application/json",
7428
7532
  _meta: { stability: "session" }
7533
+ },
7534
+ {
7535
+ uri: "harness://business-knowledge",
7536
+ name: "Business Knowledge",
7537
+ description: "Business domain knowledge from docs/knowledge/ organized by domain (rules, processes, concepts, terms, metrics)",
7538
+ mimeType: "application/json",
7539
+ _meta: { stability: "session" }
7429
7540
  }
7430
7541
  ];
7431
7542
  var RESOURCE_HANDLERS = {
@@ -7436,7 +7547,8 @@ var RESOURCE_HANDLERS = {
7436
7547
  "harness://state": getStateResource,
7437
7548
  "harness://graph": getGraphResource,
7438
7549
  "harness://entities": getEntitiesResource,
7439
- "harness://relationships": getRelationshipsResource
7550
+ "harness://relationships": getRelationshipsResource,
7551
+ "harness://business-knowledge": getBusinessKnowledgeResource
7440
7552
  };
7441
7553
  function getToolDefinitions() {
7442
7554
  return TOOL_DEFINITIONS;
@@ -7462,7 +7574,7 @@ async function appendUpdateNotification(result, resolvedRoot) {
7462
7574
  shouldRunCheck,
7463
7575
  readCheckState,
7464
7576
  spawnBackgroundCheck
7465
- } = await import("./dist-WCSJHQPK.js");
7577
+ } = await import("./dist-T3DGV5UN.js");
7466
7578
  const { CLI_VERSION } = await import("./version-CUI434OP.js");
7467
7579
  const configInterval = readConfigInterval(resolvedRoot);
7468
7580
  const DEFAULT_INTERVAL = 864e5;