@harness-engineering/cli 1.25.5 → 1.25.7

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 (54) hide show
  1. package/dist/{agents-md-COWXFHR5.js → agents-md-QPO3H5HX.js} +3 -3
  2. package/dist/{architecture-EYPG4ZMC.js → architecture-IJLXRHZA.js} +4 -4
  3. package/dist/{assess-project-JQPEVJIA.js → assess-project-QU6XIVJK.js} +1 -1
  4. package/dist/bin/harness-mcp.js +16 -15
  5. package/dist/bin/harness.js +26 -25
  6. package/dist/business-knowledge-6RHYJOB3.js +7 -0
  7. package/dist/{check-phase-gate-AJRMDGYW.js → check-phase-gate-TNY64AOS.js} +4 -4
  8. package/dist/{chunk-HWLHJSJQ.js → chunk-2DF6OZLG.js} +2 -2
  9. package/dist/{chunk-2OIPQMU5.js → chunk-AS5DQT4S.js} +9 -9
  10. package/dist/{chunk-YFIALHGI.js → chunk-D3XL2FLX.js} +5 -5
  11. package/dist/{chunk-4NK7Z3BP.js → chunk-E5Z6NTTQ.js} +1 -1
  12. package/dist/{chunk-KWQTMJ3B.js → chunk-FRDS4XGD.js} +1 -1
  13. package/dist/{chunk-KXUCIAM4.js → chunk-G5SNXUIK.js} +1 -1
  14. package/dist/{chunk-2TFT7XRX.js → chunk-GVNT2YC7.js} +9 -9
  15. package/dist/{chunk-UI6NWJJK.js → chunk-IQO7IINR.js} +1 -1
  16. package/dist/{chunk-ZYYVDA5K.js → chunk-IT2KORSK.js} +1 -1
  17. package/dist/{chunk-2X42NMPD.js → chunk-JJQ3TW2E.js} +227 -109
  18. package/dist/{chunk-BOQRTARD.js → chunk-JPZY7ZQX.js} +1 -1
  19. package/dist/{chunk-24ZGGCIW.js → chunk-K35D7HF3.js} +1 -1
  20. package/dist/{chunk-KDHZAL4B.js → chunk-K533WNZG.js} +38 -2
  21. package/dist/{chunk-WN6YIQ66.js → chunk-KVJZQ2MV.js} +1 -1
  22. package/dist/{chunk-Q6ZEUMOF.js → chunk-LTCEV7VF.js} +3 -3
  23. package/dist/{chunk-BVRWLK5U.js → chunk-LXPRO2FH.js} +2 -2
  24. package/dist/{chunk-2X336Q7J.js → chunk-MCDCZMKN.js} +1 -1
  25. package/dist/{chunk-UB6NZNJJ.js → chunk-MLOGYWLY.js} +2 -2
  26. package/dist/{chunk-K2SON7TI.js → chunk-NKQEMWGT.js} +333 -121
  27. package/dist/{chunk-PVRKHUTA.js → chunk-PCOU2UXU.js} +8 -8
  28. package/dist/chunk-RC5ZY3EV.js +82 -0
  29. package/dist/{chunk-2OM5TA56.js → chunk-SZ3Q4XEO.js} +212 -183
  30. package/dist/{chunk-5R2LFUU3.js → chunk-TQRCODRJ.js} +1 -1
  31. package/dist/{chunk-KVK3KAFQ.js → chunk-XVJRFP7W.js} +6 -6
  32. package/dist/{chunk-JD4FGVHH.js → chunk-YRBNAHH4.js} +4 -4
  33. package/dist/{chunk-KHMKAC6E.js → chunk-ZIYLIYN4.js} +115 -103
  34. package/dist/{ci-workflow-35KBJC2U.js → ci-workflow-FJYRFZYQ.js} +3 -3
  35. package/dist/{dist-RADHOOXG.js → dist-HPWNWCT6.js} +3 -1
  36. package/dist/{dist-UMONICND.js → dist-ZV6GO6FA.js} +2 -2
  37. package/dist/{docs-T5J2AJH6.js → docs-7DW3DI4Z.js} +4 -4
  38. package/dist/{engine-KWHV2LUX.js → engine-P7EE2IWO.js} +3 -3
  39. package/dist/{entropy-GEBHWBPR.js → entropy-HCXRTDFU.js} +3 -3
  40. package/dist/{feedback-I4QPE3RI.js → feedback-Y4FYN3NR.js} +1 -1
  41. package/dist/{generate-agent-definitions-3XNR77ET.js → generate-agent-definitions-3EHPIWBO.js} +4 -4
  42. package/dist/{graph-loader-JHQVQRUS.js → graph-loader-KXVS3YK3.js} +1 -1
  43. package/dist/index.d.ts +14 -8
  44. package/dist/index.js +26 -25
  45. package/dist/{loader-MN2CZXPG.js → loader-SKHF3JVV.js} +3 -3
  46. package/dist/{mcp-XSU77BZY.js → mcp-MWYIPDQU.js} +16 -15
  47. package/dist/{performance-7I5MCEFP.js → performance-ADWH5NJY.js} +4 -4
  48. package/dist/{review-pipeline-PWPKJXSN.js → review-pipeline-TLKE5OQD.js} +3 -3
  49. package/dist/{runtime-ZYEFJSGS.js → runtime-7LYAW7GU.js} +3 -3
  50. package/dist/{scan-MPJ6JHUY.js → scan-BGJ7TLLV.js} +1 -1
  51. package/dist/{security-OVTGS7DL.js → security-5XWINYVB.js} +1 -1
  52. package/dist/{validate-ACIP5BUO.js → validate-BFFHYHY7.js} +4 -4
  53. package/dist/{validate-cross-check-OWITNCHN.js → validate-cross-check-GQX7OVCR.js} +3 -3
  54. package/package.json +5 -5
@@ -1,3 +1,10 @@
1
+ import {
2
+ assessProjectDefinition,
3
+ handleAssessProject
4
+ } from "./chunk-XVJRFP7W.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-2TFT7XRX.js";
15
+ } from "./chunk-GVNT2YC7.js";
9
16
  import {
10
17
  getSecurityTrendsDefinition,
11
18
  handleGetSecurityTrends,
12
19
  handleRunSecurityScan,
13
20
  runSecurityScanDefinition
14
- } from "./chunk-UB6NZNJJ.js";
21
+ } from "./chunk-MLOGYWLY.js";
15
22
  import {
16
23
  handleRunCodeReview,
17
24
  runCodeReviewDefinition,
18
25
  sortFindingsBySeverity
19
- } from "./chunk-HWLHJSJQ.js";
20
- import {
21
- assessProjectDefinition,
22
- handleAssessProject
23
- } from "./chunk-KVK3KAFQ.js";
26
+ } from "./chunk-2DF6OZLG.js";
24
27
  import {
25
28
  handleValidateProject,
26
29
  validateToolDefinition
27
- } from "./chunk-Q6ZEUMOF.js";
30
+ } from "./chunk-LTCEV7VF.js";
28
31
  import {
29
32
  checkDependenciesDefinition,
30
33
  handleCheckDependencies
31
- } from "./chunk-JD4FGVHH.js";
34
+ } from "./chunk-YRBNAHH4.js";
32
35
  import {
33
36
  resolveProjectConfig
34
- } from "./chunk-UI6NWJJK.js";
37
+ } from "./chunk-IQO7IINR.js";
35
38
  import {
36
39
  checkDocsDefinition,
37
40
  handleCheckDocs
38
- } from "./chunk-2OIPQMU5.js";
41
+ } from "./chunk-AS5DQT4S.js";
39
42
  import {
40
43
  detectEntropyDefinition,
41
44
  handleDetectEntropy
42
- } from "./chunk-YFIALHGI.js";
45
+ } from "./chunk-D3XL2FLX.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-PVRKHUTA.js";
55
+ } from "./chunk-PCOU2UXU.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-5R2LFUU3.js";
64
+ } from "./chunk-TQRCODRJ.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-JPZY7ZQX.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-KHMKAC6E.js";
104
+ } from "./chunk-ZIYLIYN4.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/
@@ -672,9 +676,11 @@ function scaffoldMcp(engine, safePath, i, language) {
672
676
  ...language !== void 0 && { language }
673
677
  });
674
678
  if (!renderResult.ok) return resultToMcpResponse(renderResult);
679
+ const existingProject = engine.isExistingProject(safePath);
675
680
  const writeResult = engine.write(renderResult.value, safePath, {
676
681
  overwrite: false,
677
- ...language !== void 0 && { language }
682
+ ...language !== void 0 && { language },
683
+ existingProject
678
684
  });
679
685
  if (writeResult.ok) {
680
686
  persistToolingConfig(safePath, resolveResult.value, i.framework);
@@ -695,7 +701,7 @@ ${skippedMsg}`
695
701
  async function handleInitProject(input) {
696
702
  const i = input;
697
703
  try {
698
- const { TemplateEngine } = await import("./engine-KWHV2LUX.js");
704
+ const { TemplateEngine } = await import("./engine-P7EE2IWO.js");
699
705
  const engine = new TemplateEngine(resolveTemplatesDir());
700
706
  const safePath = sanitizePath(i.path);
701
707
  const detected = tryDetectFramework(engine, safePath, i);
@@ -717,7 +723,7 @@ var listPersonasDefinition = {
717
723
  inputSchema: { type: "object", properties: {} }
718
724
  };
719
725
  async function handleListPersonas() {
720
- const { listPersonas } = await import("./loader-MN2CZXPG.js");
726
+ const { listPersonas } = await import("./loader-SKHF3JVV.js");
721
727
  const result = listPersonas(resolvePersonasDir());
722
728
  return resultToMcpResponse(result);
723
729
  }
@@ -741,10 +747,10 @@ async function handleGeneratePersonaArtifacts(input) {
741
747
  if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.name)) {
742
748
  return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.name}`)));
743
749
  }
744
- const { loadPersona } = await import("./loader-MN2CZXPG.js");
745
- const { generateRuntime } = await import("./runtime-ZYEFJSGS.js");
746
- const { generateAgentsMd } = await import("./agents-md-COWXFHR5.js");
747
- const { generateCIWorkflow } = await import("./ci-workflow-35KBJC2U.js");
750
+ const { loadPersona } = await import("./loader-SKHF3JVV.js");
751
+ const { generateRuntime } = await import("./runtime-7LYAW7GU.js");
752
+ const { generateAgentsMd } = await import("./agents-md-QPO3H5HX.js");
753
+ const { generateCIWorkflow } = await import("./ci-workflow-FJYRFZYQ.js");
748
754
  const personasDir = resolvePersonasDir();
749
755
  const filePath = path3.join(personasDir, `${input.name}.yaml`);
750
756
  if (!filePath.startsWith(personasDir)) {
@@ -799,7 +805,7 @@ async function handleRunPersona(input) {
799
805
  if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.persona)) {
800
806
  return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.persona}`)));
801
807
  }
802
- const { loadPersona } = await import("./loader-MN2CZXPG.js");
808
+ const { loadPersona } = await import("./loader-SKHF3JVV.js");
803
809
  const { runPersona } = await import("./runner-AAEF2TXY.js");
804
810
  const { executeSkill } = await import("./skill-executor-MOCUIAYS.js");
805
811
  const personasDir = resolvePersonasDir();
@@ -1335,6 +1341,15 @@ function loadOrGenerateProfile(projectRoot) {
1335
1341
  return profile;
1336
1342
  }
1337
1343
 
1344
+ // src/mcp/tools/event-emitter.ts
1345
+ async function emitSkillEvent(projectPath, event) {
1346
+ try {
1347
+ const { emitEvent } = await import("./dist-ZV6GO6FA.js");
1348
+ await emitEvent(projectPath, event);
1349
+ } catch {
1350
+ }
1351
+ }
1352
+
1338
1353
  // src/mcp/tools/skill.ts
1339
1354
  var runSkillDefinition = {
1340
1355
  name: "run_skill",
@@ -1442,6 +1457,14 @@ ${stateContent}
1442
1457
  } catch {
1443
1458
  }
1444
1459
  }
1460
+ if (input.path) {
1461
+ await emitSkillEvent(projectRoot, {
1462
+ skill: input.skill,
1463
+ type: "phase_transition",
1464
+ summary: `skill invoked: ${input.skill}`,
1465
+ data: { from: "", to: input.phase ?? "start" }
1466
+ });
1467
+ }
1445
1468
  return resultToMcpResponse(Ok(content));
1446
1469
  }
1447
1470
  var createSkillDefinition = {
@@ -1593,7 +1616,7 @@ async function autoSyncRoadmap(projectPath) {
1593
1616
  try {
1594
1617
  const roadmapFile = path11.join(projectPath, "docs", "roadmap.md");
1595
1618
  if (!fs10.existsSync(roadmapFile)) return;
1596
- const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-UMONICND.js");
1619
+ const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-ZV6GO6FA.js");
1597
1620
  const raw = fs10.readFileSync(roadmapFile, "utf-8");
1598
1621
  const parseResult = parseRoadmap(raw);
1599
1622
  if (!parseResult.ok) return;
@@ -1623,7 +1646,7 @@ async function triggerExternalSync(projectPath, roadmapFile) {
1623
1646
  console.warn("[roadmap-sync] GITHUB_TOKEN not found \u2014 external sync skipped");
1624
1647
  return;
1625
1648
  }
1626
- const { fullSync, GitHubIssuesSyncAdapter } = await import("./dist-UMONICND.js");
1649
+ const { fullSync, GitHubIssuesSyncAdapter } = await import("./dist-ZV6GO6FA.js");
1627
1650
  const adapter = new GitHubIssuesSyncAdapter({
1628
1651
  token,
1629
1652
  config: trackerConfig
@@ -1720,12 +1743,12 @@ var manageStateDefinition = {
1720
1743
  }
1721
1744
  };
1722
1745
  async function handleShow(projectPath, input) {
1723
- const { loadState } = await import("./dist-UMONICND.js");
1746
+ const { loadState } = await import("./dist-ZV6GO6FA.js");
1724
1747
  return resultToMcpResponse(await loadState(projectPath, input.stream, input.session));
1725
1748
  }
1726
1749
  async function handleLearn(projectPath, input) {
1727
1750
  if (!input.learning) return mcpError("Error: learning is required for learn action");
1728
- const { appendLearning } = await import("./dist-UMONICND.js");
1751
+ const { appendLearning } = await import("./dist-ZV6GO6FA.js");
1729
1752
  const result = await appendLearning(
1730
1753
  projectPath,
1731
1754
  input.learning,
@@ -1740,7 +1763,7 @@ async function handleLearn(projectPath, input) {
1740
1763
  async function handleFailure(projectPath, input) {
1741
1764
  if (!input.description) return mcpError("Error: description is required for failure action");
1742
1765
  if (!input.failureType) return mcpError("Error: failureType is required for failure action");
1743
- const { appendFailure } = await import("./dist-UMONICND.js");
1766
+ const { appendFailure } = await import("./dist-ZV6GO6FA.js");
1744
1767
  const result = await appendFailure(
1745
1768
  projectPath,
1746
1769
  input.description,
@@ -1750,27 +1773,48 @@ async function handleFailure(projectPath, input) {
1750
1773
  input.session
1751
1774
  );
1752
1775
  if (!result.ok) return resultToMcpResponse(result);
1776
+ await emitSkillEvent(projectPath, {
1777
+ skill: input.skillName ?? "unknown",
1778
+ type: "error",
1779
+ summary: input.description,
1780
+ data: { failureType: input.failureType }
1781
+ });
1753
1782
  return resultToMcpResponse(Ok({ recorded: true }));
1754
1783
  }
1755
1784
  async function handleArchive(projectPath, input) {
1756
- const { archiveFailures } = await import("./dist-UMONICND.js");
1785
+ const { archiveFailures } = await import("./dist-ZV6GO6FA.js");
1757
1786
  const result = await archiveFailures(projectPath, input.stream, input.session);
1758
1787
  if (!result.ok) return resultToMcpResponse(result);
1759
1788
  return resultToMcpResponse(Ok({ archived: true }));
1760
1789
  }
1761
1790
  async function handleReset(projectPath, input) {
1762
- const { saveState, DEFAULT_STATE } = await import("./dist-UMONICND.js");
1791
+ const { saveState, DEFAULT_STATE } = await import("./dist-ZV6GO6FA.js");
1763
1792
  const result = await saveState(projectPath, { ...DEFAULT_STATE }, input.stream, input.session);
1764
1793
  if (!result.ok) return resultToMcpResponse(result);
1765
1794
  return resultToMcpResponse(Ok({ reset: true }));
1766
1795
  }
1767
- async function handleGate(projectPath, _input) {
1768
- const { runMechanicalGate } = await import("./dist-UMONICND.js");
1769
- return resultToMcpResponse(await runMechanicalGate(projectPath));
1796
+ async function handleGate(projectPath, input) {
1797
+ const { runMechanicalGate } = await import("./dist-ZV6GO6FA.js");
1798
+ const result = await runMechanicalGate(projectPath);
1799
+ if (result.ok) {
1800
+ await emitSkillEvent(projectPath, {
1801
+ skill: input.skillName ?? "unknown",
1802
+ type: "gate_result",
1803
+ summary: result.value.passed ? "gate passed" : "gate failed",
1804
+ data: {
1805
+ passed: result.value.passed,
1806
+ checks: result.value.checks?.map((c) => ({
1807
+ name: c.name,
1808
+ passed: c.passed
1809
+ }))
1810
+ }
1811
+ });
1812
+ }
1813
+ return resultToMcpResponse(result);
1770
1814
  }
1771
1815
  async function handleSaveHandoff(projectPath, input) {
1772
1816
  if (!input.handoff) return mcpError("Error: handoff is required for save-handoff action");
1773
- const { saveHandoff } = await import("./dist-UMONICND.js");
1817
+ const { saveHandoff } = await import("./dist-ZV6GO6FA.js");
1774
1818
  const result = await saveHandoff(
1775
1819
  projectPath,
1776
1820
  input.handoff,
@@ -1778,11 +1822,21 @@ async function handleSaveHandoff(projectPath, input) {
1778
1822
  input.session
1779
1823
  );
1780
1824
  if (!result.ok) return resultToMcpResponse(result);
1825
+ const handoffData = input.handoff;
1826
+ await emitSkillEvent(projectPath, {
1827
+ skill: input.skillName ?? handoffData.fromSkill ?? "unknown",
1828
+ type: "handoff",
1829
+ summary: handoffData.summary ?? "session handoff",
1830
+ data: {
1831
+ fromSkill: handoffData.fromSkill,
1832
+ toSkill: handoffData.toSkill
1833
+ }
1834
+ });
1781
1835
  await autoSyncRoadmap(projectPath);
1782
1836
  return resultToMcpResponse(Ok({ saved: true }));
1783
1837
  }
1784
1838
  async function handleLoadHandoff(projectPath, input) {
1785
- const { loadHandoff } = await import("./dist-UMONICND.js");
1839
+ const { loadHandoff } = await import("./dist-ZV6GO6FA.js");
1786
1840
  return resultToMcpResponse(await loadHandoff(projectPath, input.stream, input.session));
1787
1841
  }
1788
1842
  async function handleAppendEntry(projectPath, input) {
@@ -1790,7 +1844,7 @@ async function handleAppendEntry(projectPath, input) {
1790
1844
  if (!input.authorSkill) return mcpError("Error: authorSkill is required for append_entry action");
1791
1845
  if (!input.content) return mcpError("Error: content is required for append_entry action");
1792
1846
  if (input.session) {
1793
- const { appendSessionEntry } = await import("./dist-UMONICND.js");
1847
+ const { appendSessionEntry } = await import("./dist-ZV6GO6FA.js");
1794
1848
  const result = await appendSessionEntry(
1795
1849
  projectPath,
1796
1850
  input.session,
@@ -1803,7 +1857,7 @@ async function handleAppendEntry(projectPath, input) {
1803
1857
  if (input.section !== "decisions") {
1804
1858
  return mcpError("Error: session is required for non-decisions sections");
1805
1859
  }
1806
- const { loadState, saveState } = await import("./dist-UMONICND.js");
1860
+ const { loadState, saveState } = await import("./dist-ZV6GO6FA.js");
1807
1861
  const lr = await loadState(projectPath, input.stream);
1808
1862
  if (!lr.ok) return resultToMcpResponse(lr);
1809
1863
  lr.value.decisions.push({
@@ -1821,7 +1875,7 @@ async function handleUpdateEntryStatus(projectPath, input) {
1821
1875
  if (!input.entryId) return mcpError("Error: entryId is required for update_entry_status action");
1822
1876
  if (!input.newStatus)
1823
1877
  return mcpError("Error: newStatus is required for update_entry_status action");
1824
- const { updateSessionEntryStatus } = await import("./dist-UMONICND.js");
1878
+ const { updateSessionEntryStatus } = await import("./dist-ZV6GO6FA.js");
1825
1879
  const result = await updateSessionEntryStatus(
1826
1880
  projectPath,
1827
1881
  input.session,
@@ -1834,7 +1888,7 @@ async function handleUpdateEntryStatus(projectPath, input) {
1834
1888
  async function handleReadSection(projectPath, input) {
1835
1889
  if (!input.session) return mcpError("Error: session is required for read_section action");
1836
1890
  if (!input.section) return mcpError("Error: section is required for read_section action");
1837
- const { readSessionSection } = await import("./dist-UMONICND.js");
1891
+ const { readSessionSection } = await import("./dist-ZV6GO6FA.js");
1838
1892
  const result = await readSessionSection(
1839
1893
  projectPath,
1840
1894
  input.session,
@@ -1844,13 +1898,13 @@ async function handleReadSection(projectPath, input) {
1844
1898
  }
1845
1899
  async function handleReadSections(projectPath, input) {
1846
1900
  if (!input.session) return mcpError("Error: session is required for read_sections action");
1847
- const { readSessionSections } = await import("./dist-UMONICND.js");
1901
+ const { readSessionSections } = await import("./dist-ZV6GO6FA.js");
1848
1902
  const result = await readSessionSections(projectPath, input.session);
1849
1903
  return resultToMcpResponse(result);
1850
1904
  }
1851
1905
  async function handleArchiveSession(projectPath, input) {
1852
1906
  if (!input.session) return mcpError("Error: session is required for archive_session action");
1853
- const { archiveSession } = await import("./dist-UMONICND.js");
1907
+ const { archiveSession } = await import("./dist-ZV6GO6FA.js");
1854
1908
  const result = await archiveSession(projectPath, input.session);
1855
1909
  if (!result.ok) return resultToMcpResponse(result);
1856
1910
  await autoSyncRoadmap(projectPath);
@@ -1864,12 +1918,28 @@ async function handleTaskComplete(projectPath, _input) {
1864
1918
  await autoSyncRoadmap(projectPath);
1865
1919
  return resultToMcpResponse(Ok({ synced: true, trigger: "task-complete" }));
1866
1920
  }
1867
- async function handlePhaseStart(projectPath, _input) {
1921
+ async function handlePhaseStart(projectPath, input) {
1868
1922
  await autoSyncRoadmap(projectPath);
1923
+ if (input.skillName) {
1924
+ await emitSkillEvent(projectPath, {
1925
+ skill: input.skillName,
1926
+ type: "phase_transition",
1927
+ summary: `entering phase: ${input.description ?? "unknown"}`,
1928
+ data: { from: "", to: input.description ?? "unknown" }
1929
+ });
1930
+ }
1869
1931
  return resultToMcpResponse(Ok({ synced: true, trigger: "phase-start" }));
1870
1932
  }
1871
- async function handlePhaseComplete(projectPath, _input) {
1933
+ async function handlePhaseComplete(projectPath, input) {
1872
1934
  await autoSyncRoadmap(projectPath);
1935
+ if (input.skillName) {
1936
+ await emitSkillEvent(projectPath, {
1937
+ skill: input.skillName,
1938
+ type: "phase_transition",
1939
+ summary: `completed phase: ${input.description ?? "unknown"}`,
1940
+ data: { from: input.description ?? "unknown", to: "" }
1941
+ });
1942
+ }
1873
1943
  return resultToMcpResponse(Ok({ synced: true, trigger: "phase-complete" }));
1874
1944
  }
1875
1945
  var ACTION_HANDLERS = {
@@ -1914,7 +1984,7 @@ var listStreamsDefinition = {
1914
1984
  };
1915
1985
  async function handleListStreams(input) {
1916
1986
  try {
1917
- const { listStreams, loadStreamIndex } = await import("./dist-UMONICND.js");
1987
+ const { listStreams, loadStreamIndex } = await import("./dist-ZV6GO6FA.js");
1918
1988
  const projectPath = sanitizePath(input.path);
1919
1989
  const indexResult = await loadStreamIndex(projectPath);
1920
1990
  const streamsResult = await listStreams(projectPath);
@@ -1952,7 +2022,7 @@ var checkPhaseGateDefinition = {
1952
2022
  };
1953
2023
  async function handleCheckPhaseGate(input) {
1954
2024
  try {
1955
- const { runCheckPhaseGate } = await import("./check-phase-gate-AJRMDGYW.js");
2025
+ const { runCheckPhaseGate } = await import("./check-phase-gate-TNY64AOS.js");
1956
2026
  const result = await runCheckPhaseGate({ cwd: sanitizePath(input.path) });
1957
2027
  if (result.ok) {
1958
2028
  return { content: [{ type: "text", text: JSON.stringify(result.value) }] };
@@ -2008,7 +2078,7 @@ async function handleValidateCrossCheck(input) {
2008
2078
  };
2009
2079
  }
2010
2080
  try {
2011
- const { runCrossCheck } = await import("./validate-cross-check-OWITNCHN.js");
2081
+ const { runCrossCheck } = await import("./validate-cross-check-GQX7OVCR.js");
2012
2082
  const specsDir = path12.resolve(projectPath, input.specsDir ?? "docs/specs");
2013
2083
  if (!specsDir.startsWith(projectPath)) {
2014
2084
  return {
@@ -2731,7 +2801,7 @@ async function handleGenerateSlashCommands(input) {
2731
2801
  // src/mcp/resources/state.ts
2732
2802
  async function getStateResource(projectRoot) {
2733
2803
  try {
2734
- const { loadState, migrateToStreams } = await import("./dist-UMONICND.js");
2804
+ const { loadState, migrateToStreams } = await import("./dist-ZV6GO6FA.js");
2735
2805
  await migrateToStreams(projectRoot);
2736
2806
  const result = await loadState(projectRoot);
2737
2807
  if (result.ok) {
@@ -2849,7 +2919,7 @@ async function handleQueryGraph(input) {
2849
2919
  const projectPath = sanitizePath(input.path);
2850
2920
  const store = await loadGraphStore(projectPath);
2851
2921
  if (!store) return graphNotFoundError();
2852
- const { ContextQL } = await import("./dist-RADHOOXG.js");
2922
+ const { ContextQL } = await import("./dist-HPWNWCT6.js");
2853
2923
  const cql = new ContextQL(store);
2854
2924
  const result = cql.execute({
2855
2925
  rootNodeIds: input.rootNodeIds,
@@ -2931,7 +3001,7 @@ async function handleSearchSimilar(input) {
2931
3001
  const projectPath = sanitizePath(input.path);
2932
3002
  const store = await loadGraphStore(projectPath);
2933
3003
  if (!store) return graphNotFoundError();
2934
- const { FusionLayer } = await import("./dist-RADHOOXG.js");
3004
+ const { FusionLayer } = await import("./dist-HPWNWCT6.js");
2935
3005
  const fusion = new FusionLayer(store);
2936
3006
  const results = fusion.search(input.query, input.topK ?? 10);
2937
3007
  if (input.mode === "summary") {
@@ -2986,7 +3056,7 @@ async function handleFindContextFor(input) {
2986
3056
  const projectPath = sanitizePath(input.path);
2987
3057
  const store = await loadGraphStore(projectPath);
2988
3058
  if (!store) return graphNotFoundError();
2989
- const { FusionLayer, ContextQL } = await import("./dist-RADHOOXG.js");
3059
+ const { FusionLayer, ContextQL } = await import("./dist-HPWNWCT6.js");
2990
3060
  const fusion = new FusionLayer(store);
2991
3061
  const cql = new ContextQL(store);
2992
3062
  const tokenBudget = input.tokenBudget ?? 4e3;
@@ -3091,7 +3161,7 @@ async function handleGetRelationships(input) {
3091
3161
  const projectPath = sanitizePath(input.path);
3092
3162
  const store = await loadGraphStore(projectPath);
3093
3163
  if (!store) return graphNotFoundError();
3094
- const { ContextQL } = await import("./dist-RADHOOXG.js");
3164
+ const { ContextQL } = await import("./dist-HPWNWCT6.js");
3095
3165
  const cql = new ContextQL(store);
3096
3166
  const direction = input.direction ?? "both";
3097
3167
  const bidirectional = direction === "both" || direction === "inbound";
@@ -3209,7 +3279,7 @@ async function handleGetImpact(input) {
3209
3279
  const projectPath = sanitizePath(input.path);
3210
3280
  const store = await loadGraphStore(projectPath);
3211
3281
  if (!store) return graphNotFoundError();
3212
- const { ContextQL } = await import("./dist-RADHOOXG.js");
3282
+ const { ContextQL } = await import("./dist-HPWNWCT6.js");
3213
3283
  let targetNodeId = input.nodeId;
3214
3284
  if (!targetNodeId && input.filePath) {
3215
3285
  const fileNodes = store.findNodes({ type: "file" });
@@ -3341,7 +3411,7 @@ async function handleIngestSource(input) {
3341
3411
  try {
3342
3412
  const projectPath = sanitizePath(input.path);
3343
3413
  const graphDir = path16.join(projectPath, ".harness", "graph");
3344
- const { GraphStore, CodeIngestor, TopologicalLinker, KnowledgeIngestor, GitIngestor } = await import("./dist-RADHOOXG.js");
3414
+ const { GraphStore, CodeIngestor, TopologicalLinker, KnowledgeIngestor, GitIngestor } = await import("./dist-HPWNWCT6.js");
3345
3415
  const fs17 = await import("fs/promises");
3346
3416
  await fs17.mkdir(graphDir, { recursive: true });
3347
3417
  const store = new GraphStore();
@@ -3425,7 +3495,7 @@ async function handleDetectAnomalies(input) {
3425
3495
  const projectPath = sanitizePath(input.path);
3426
3496
  const store = await loadGraphStore(projectPath);
3427
3497
  if (!store) return graphNotFoundError();
3428
- const { GraphAnomalyAdapter } = await import("./dist-RADHOOXG.js");
3498
+ const { GraphAnomalyAdapter } = await import("./dist-HPWNWCT6.js");
3429
3499
  const adapter = new GraphAnomalyAdapter(store);
3430
3500
  const report = adapter.detect({
3431
3501
  ...input.threshold !== void 0 && { threshold: input.threshold },
@@ -3474,7 +3544,7 @@ async function handleAskGraph(input) {
3474
3544
  const projectPath = sanitizePath(input.path);
3475
3545
  const store = await loadGraphStore(projectPath);
3476
3546
  if (!store) return graphNotFoundError();
3477
- const { askGraph } = await import("./dist-RADHOOXG.js");
3547
+ const { askGraph } = await import("./dist-HPWNWCT6.js");
3478
3548
  const result = await askGraph(store, input.question);
3479
3549
  return {
3480
3550
  content: [{ type: "text", text: JSON.stringify(result) }]
@@ -3538,7 +3608,7 @@ async function handleComputeBlastRadius(input) {
3538
3608
  const projectPath = sanitizePath(input.path);
3539
3609
  const store = await loadGraphStore(projectPath);
3540
3610
  if (!store) return graphNotFoundError();
3541
- const { CascadeSimulator } = await import("./dist-RADHOOXG.js");
3611
+ const { CascadeSimulator } = await import("./dist-HPWNWCT6.js");
3542
3612
  let targetNodeId = input.nodeId;
3543
3613
  if (!targetNodeId && input.file) {
3544
3614
  const fileNodes = store.findNodes({ type: "file" });
@@ -3739,7 +3809,7 @@ var generateAgentDefinitionsDefinition = {
3739
3809
  }
3740
3810
  };
3741
3811
  async function handleGenerateAgentDefinitions(input) {
3742
- const { generateAgentDefinitions } = await import("./generate-agent-definitions-3XNR77ET.js");
3812
+ const { generateAgentDefinitions } = await import("./generate-agent-definitions-3EHPIWBO.js");
3743
3813
  const platforms = input.platform === "all" || !input.platform ? ["claude-code", "gemini-cli"] : [input.platform];
3744
3814
  const results = generateAgentDefinitions({
3745
3815
  platforms: [...platforms],
@@ -4067,7 +4137,7 @@ function shouldTriggerExternalSync(input, response) {
4067
4137
  }
4068
4138
  async function handleManageRoadmap(input) {
4069
4139
  try {
4070
- const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges, assignFeature } = await import("./dist-UMONICND.js");
4140
+ const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges, assignFeature } = await import("./dist-ZV6GO6FA.js");
4071
4141
  const { Ok: Ok2 } = await import("./dist-3EWNRFFQ.js");
4072
4142
  const projectPath = sanitizePath(input.path);
4073
4143
  const deps = {
@@ -4230,8 +4300,12 @@ ${rows.join("\n")}`;
4230
4300
  prompt += `
4231
4301
 
4232
4302
  **Recommendation:** ${recLabel} (confidence: ${recommendation.confidence})`;
4233
- prompt += `
4234
- > ${recommendation.reason}`;
4303
+ const cleanReason = recommendation.reason.trim();
4304
+ const cleanText = text.trim();
4305
+ if (cleanReason && cleanReason !== cleanText && !cleanReason.startsWith(cleanText)) {
4306
+ prompt += `
4307
+ > ${cleanReason}`;
4308
+ }
4235
4309
  }
4236
4310
  }
4237
4311
  return prompt;
@@ -4502,7 +4576,7 @@ async function handleTransition(validInput, projectPath, id) {
4502
4576
  const transition = transitionResult.data;
4503
4577
  const prompt = renderTransition(transition);
4504
4578
  try {
4505
- const { saveHandoff } = await import("./dist-UMONICND.js");
4579
+ const { saveHandoff } = await import("./dist-ZV6GO6FA.js");
4506
4580
  await saveHandoff(
4507
4581
  projectPath,
4508
4582
  {
@@ -4529,6 +4603,19 @@ async function handleTransition(validInput, projectPath, id) {
4529
4603
  `${transition.completedPhase} -> ${transition.suggestedNext}`,
4530
4604
  validInput.stream
4531
4605
  );
4606
+ const skillName = "emit_interaction";
4607
+ await emitSkillEvent(projectPath, {
4608
+ skill: skillName,
4609
+ type: "phase_transition",
4610
+ summary: `${transition.completedPhase} -> ${transition.suggestedNext}`,
4611
+ data: { from: transition.completedPhase, to: transition.suggestedNext }
4612
+ });
4613
+ await emitSkillEvent(projectPath, {
4614
+ skill: skillName,
4615
+ type: "handoff",
4616
+ summary: transition.reason,
4617
+ data: { fromSkill: skillName, toSkill: transition.suggestedNext }
4618
+ });
4532
4619
  const metadata = { id, handoffWritten: true };
4533
4620
  if (!transition.requiresConfirmation) {
4534
4621
  metadata.autoTransition = true;
@@ -4570,7 +4657,7 @@ async function handleEmitInteraction(input) {
4570
4657
  }
4571
4658
  async function recordInteraction(projectPath, id, type, decision, stream) {
4572
4659
  try {
4573
- const { loadState, saveState } = await import("./dist-UMONICND.js");
4660
+ const { loadState, saveState } = await import("./dist-ZV6GO6FA.js");
4574
4661
  const stateResult = await loadState(projectPath, stream);
4575
4662
  if (stateResult.ok) {
4576
4663
  const state = stateResult.value;
@@ -4593,17 +4680,22 @@ function flattenSessionSections(sections) {
4593
4680
  ([name, entries]) => Array.isArray(entries) ? entries.map((e) => ({ sectionName: name, ...e })) : []
4594
4681
  );
4595
4682
  }
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
- }
4683
+ function graphContextItems(input) {
4684
+ const blocks = input.graphContext?.context ?? [];
4685
+ return [...blocks].sort((a, b) => b.score - a.score);
4686
+ }
4687
+ function sessionSectionItems(input) {
4604
4688
  const flat = flattenSessionSections(input.sessionSections);
4605
4689
  return flat.sort((a, b) => (b.timestamp ?? "").localeCompare(a.timestamp ?? ""));
4606
4690
  }
4691
+ var sectionResolvers = {
4692
+ graphContext: graphContextItems,
4693
+ learnings: (input) => Array.isArray(input.learnings) ? input.learnings : [],
4694
+ sessionSections: sessionSectionItems
4695
+ };
4696
+ function sectionItems(input) {
4697
+ return sectionResolvers[input.section](input);
4698
+ }
4607
4699
  function checkSectionGuards(section, mode) {
4608
4700
  if (section === "graphContext" && (mode ?? "summary") === "summary") {
4609
4701
  return {
@@ -4654,7 +4746,16 @@ var gatherContextDefinition = {
4654
4746
  type: "array",
4655
4747
  items: {
4656
4748
  type: "string",
4657
- enum: ["state", "learnings", "handoff", "graph", "validation", "sessions", "events"]
4749
+ enum: [
4750
+ "state",
4751
+ "learnings",
4752
+ "handoff",
4753
+ "graph",
4754
+ "validation",
4755
+ "sessions",
4756
+ "events",
4757
+ "businessKnowledge"
4758
+ ]
4658
4759
  },
4659
4760
  description: "Which constituents to include (default: all)"
4660
4761
  },
@@ -4717,10 +4818,10 @@ async function handleGatherContext(input) {
4717
4818
  input.include ?? ["state", "learnings", "handoff", "graph", "validation"]
4718
4819
  );
4719
4820
  const errors = [];
4720
- const statePromise = includeSet.has("state") ? import("./dist-UMONICND.js").then(
4821
+ const statePromise = includeSet.has("state") ? import("./dist-ZV6GO6FA.js").then(
4721
4822
  (core) => core.loadState(projectPath, void 0, input.session)
4722
4823
  ) : Promise.resolve(null);
4723
- const learningsPromise = includeSet.has("learnings") ? import("./dist-UMONICND.js").then(
4824
+ const learningsPromise = includeSet.has("learnings") ? import("./dist-ZV6GO6FA.js").then(
4724
4825
  (core) => core.loadBudgetedLearnings(projectPath, {
4725
4826
  intent: input.intent,
4726
4827
  tokenBudget: input.learningsBudget ?? 1e3,
@@ -4729,14 +4830,14 @@ async function handleGatherContext(input) {
4729
4830
  ...input.depth !== void 0 && { depth: input.depth }
4730
4831
  })
4731
4832
  ) : Promise.resolve(null);
4732
- const handoffPromise = includeSet.has("handoff") ? import("./dist-UMONICND.js").then(
4833
+ const handoffPromise = includeSet.has("handoff") ? import("./dist-ZV6GO6FA.js").then(
4733
4834
  (core) => core.loadHandoff(projectPath, void 0, input.session)
4734
4835
  ) : Promise.resolve(null);
4735
4836
  const graphPromise = includeSet.has("graph") ? (async () => {
4736
- const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-JHQVQRUS.js");
4837
+ const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-KXVS3YK3.js");
4737
4838
  const store = await loadGraphStore2(projectPath);
4738
4839
  if (!store) return null;
4739
- const { FusionLayer, ContextQL } = await import("./dist-RADHOOXG.js");
4840
+ const { FusionLayer, ContextQL } = await import("./dist-HPWNWCT6.js");
4740
4841
  const fusion = new FusionLayer(store);
4741
4842
  const cql = new ContextQL(store);
4742
4843
  const tokenBudget = input.tokenBudget ?? 4e3;
@@ -4773,11 +4874,11 @@ async function handleGatherContext(input) {
4773
4874
  context: contextBlocks
4774
4875
  };
4775
4876
  })() : Promise.resolve(null);
4776
- const sessionsPromise = includeSet.has("sessions") && input.session ? import("./dist-UMONICND.js").then(
4877
+ const sessionsPromise = includeSet.has("sessions") && input.session ? import("./dist-ZV6GO6FA.js").then(
4777
4878
  (core) => core.readSessionSections(projectPath, input.session)
4778
4879
  ) : Promise.resolve(null);
4779
4880
  const shouldIncludeEvents = input.includeEvents !== void 0 ? input.includeEvents : includeSet.has("events") || !!input.session && !input.include;
4780
- const eventsPromise = shouldIncludeEvents ? import("./dist-UMONICND.js").then(async (core) => {
4881
+ const eventsPromise = shouldIncludeEvents ? import("./dist-ZV6GO6FA.js").then(async (core) => {
4781
4882
  const result = await core.loadEvents(projectPath, {
4782
4883
  session: input.session
4783
4884
  });
@@ -4785,11 +4886,16 @@ async function handleGatherContext(input) {
4785
4886
  return core.formatEventTimeline(result.value);
4786
4887
  }) : Promise.resolve(null);
4787
4888
  const validationPromise = includeSet.has("validation") ? (async () => {
4788
- const { handleValidateProject: handleValidateProject2 } = await import("./validate-ACIP5BUO.js");
4889
+ const { handleValidateProject: handleValidateProject2 } = await import("./validate-BFFHYHY7.js");
4789
4890
  const result = await handleValidateProject2({ path: projectPath });
4790
4891
  const first = result.content[0];
4791
4892
  return first ? JSON.parse(first.text) : null;
4792
4893
  })() : Promise.resolve(null);
4894
+ const businessKnowledgePromise = includeSet.has("businessKnowledge") ? (async () => {
4895
+ const { getBusinessKnowledgeResource: getBusinessKnowledgeResource2 } = await import("./business-knowledge-6RHYJOB3.js");
4896
+ const raw = await getBusinessKnowledgeResource2(projectPath);
4897
+ return JSON.parse(raw);
4898
+ })() : Promise.resolve(null);
4793
4899
  const [
4794
4900
  stateResult,
4795
4901
  learningsResult,
@@ -4797,7 +4903,8 @@ async function handleGatherContext(input) {
4797
4903
  graphResult,
4798
4904
  validationResult,
4799
4905
  sessionsResult,
4800
- eventsResult
4906
+ eventsResult,
4907
+ businessKnowledgeResult
4801
4908
  ] = await Promise.allSettled([
4802
4909
  statePromise,
4803
4910
  learningsPromise,
@@ -4805,7 +4912,8 @@ async function handleGatherContext(input) {
4805
4912
  graphPromise,
4806
4913
  validationPromise,
4807
4914
  sessionsPromise,
4808
- eventsPromise
4915
+ eventsPromise,
4916
+ businessKnowledgePromise
4809
4917
  ]);
4810
4918
  function extract(settled, name) {
4811
4919
  if (settled.status === "rejected") {
@@ -4821,6 +4929,7 @@ async function handleGatherContext(input) {
4821
4929
  const validationRaw = extract(validationResult, "validation");
4822
4930
  const sessionsRaw = extract(sessionsResult, "sessions");
4823
4931
  const eventsTimeline = extract(eventsResult, "events");
4932
+ const businessKnowledgeRaw = extract(businessKnowledgeResult, "businessKnowledge");
4824
4933
  const state = stateRaw && typeof stateRaw === "object" && "ok" in stateRaw ? stateRaw.ok ? stateRaw.value : (() => {
4825
4934
  errors.push(`state: ${stateRaw.error.message}`);
4826
4935
  return null;
@@ -4869,6 +4978,7 @@ async function handleGatherContext(input) {
4869
4978
  validation: outputValidation,
4870
4979
  sessionSections: sessionSections ?? null,
4871
4980
  events: eventsTimeline || null,
4981
+ businessKnowledge: businessKnowledgeRaw ?? null,
4872
4982
  meta: {
4873
4983
  assembledIn,
4874
4984
  graphAvailable: graphContext !== null,
@@ -4879,7 +4989,7 @@ async function handleGatherContext(input) {
4879
4989
  };
4880
4990
  if (input.session) {
4881
4991
  try {
4882
- const core = await import("./dist-UMONICND.js");
4992
+ const core = await import("./dist-ZV6GO6FA.js");
4883
4993
  core.updateSessionIndex(
4884
4994
  projectPath,
4885
4995
  input.session,
@@ -5031,7 +5141,7 @@ async function handleReviewChanges(input) {
5031
5141
  }
5032
5142
  }
5033
5143
  async function runQuickReview(projectPath, diff, diffLines, downgraded, offset, limit) {
5034
- const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-I4QPE3RI.js");
5144
+ const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-Y4FYN3NR.js");
5035
5145
  const result = await handleAnalyzeDiff2({ diff, path: projectPath });
5036
5146
  const firstContent = result.content[0];
5037
5147
  if (!firstContent) throw new Error("Empty analyze_diff response");
@@ -5066,7 +5176,7 @@ function extractFileCount(diffParsed) {
5066
5176
  return files?.length ?? 0;
5067
5177
  }
5068
5178
  async function runStandardReview(projectPath, diff, diffLines, downgraded, offset, limit) {
5069
- const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-I4QPE3RI.js");
5179
+ const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-Y4FYN3NR.js");
5070
5180
  const [diffResult, reviewResult] = await Promise.all([
5071
5181
  handleAnalyzeDiff2({ diff, path: projectPath }),
5072
5182
  handleCreateSelfReview2({ path: projectPath, diff })
@@ -5101,7 +5211,7 @@ async function runStandardReview(projectPath, diff, diffLines, downgraded, offse
5101
5211
  };
5102
5212
  }
5103
5213
  async function runDeepReview(projectPath, diff, diffLines, _downgraded, offset, limit) {
5104
- const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-PWPKJXSN.js");
5214
+ const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-TLKE5OQD.js");
5105
5215
  const result = await handleRunCodeReview2({
5106
5216
  path: projectPath,
5107
5217
  diff,
@@ -5180,7 +5290,7 @@ async function handleCheckTaskIndependence(input) {
5180
5290
  try {
5181
5291
  const projectPath = sanitizePath(input.path);
5182
5292
  const store = await loadGraphStore(projectPath);
5183
- const { TaskIndependenceAnalyzer } = await import("./dist-RADHOOXG.js");
5293
+ const { TaskIndependenceAnalyzer } = await import("./dist-HPWNWCT6.js");
5184
5294
  const analyzer = new TaskIndependenceAnalyzer(store ?? void 0);
5185
5295
  const result = analyzer.analyze({
5186
5296
  tasks: input.tasks,
@@ -5268,7 +5378,7 @@ async function handlePredictConflicts(input) {
5268
5378
  try {
5269
5379
  const projectPath = sanitizePath(input.path);
5270
5380
  const store = await loadGraphStore(projectPath);
5271
- const { ConflictPredictor } = await import("./dist-RADHOOXG.js");
5381
+ const { ConflictPredictor } = await import("./dist-HPWNWCT6.js");
5272
5382
  const predictor = new ConflictPredictor(store ?? void 0);
5273
5383
  const result = predictor.predict({
5274
5384
  tasks: input.tasks,
@@ -5374,7 +5484,7 @@ async function handleDetectStaleConstraints(input) {
5374
5484
  isError: true
5375
5485
  };
5376
5486
  }
5377
- const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-JHQVQRUS.js");
5487
+ const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-KXVS3YK3.js");
5378
5488
  const store = await loadGraphStore2(projectPath);
5379
5489
  if (!store) {
5380
5490
  return {
@@ -5395,7 +5505,7 @@ async function handleDetectStaleConstraints(input) {
5395
5505
  ]
5396
5506
  };
5397
5507
  }
5398
- const { detectStaleConstraints } = await import("./dist-UMONICND.js");
5508
+ const { detectStaleConstraints } = await import("./dist-ZV6GO6FA.js");
5399
5509
  const result = detectStaleConstraints(
5400
5510
  store,
5401
5511
  windowDays,
@@ -5515,10 +5625,10 @@ function countCriticalFindings(securityData) {
5515
5625
  return findings.filter((f) => f.severity === "error").length;
5516
5626
  }
5517
5627
  async function runHealthChecks(projectPath) {
5518
- const { handleAssessProject: handleAssessProject2 } = await import("./assess-project-JQPEVJIA.js");
5519
- const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-EYPG4ZMC.js");
5520
- const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-GEBHWBPR.js");
5521
- const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-OVTGS7DL.js");
5628
+ const { handleAssessProject: handleAssessProject2 } = await import("./assess-project-QU6XIVJK.js");
5629
+ const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-IJLXRHZA.js");
5630
+ const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-HCXRTDFU.js");
5631
+ const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-5XWINYVB.js");
5522
5632
  const [assessResult, depsResult, entropyResult, securityResult] = await Promise.all([
5523
5633
  handleAssessProject2({
5524
5634
  path: projectPath,
@@ -5573,10 +5683,10 @@ function avg(values) {
5573
5683
  }
5574
5684
  async function runGraphMetrics(projectPath) {
5575
5685
  try {
5576
- const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-JHQVQRUS.js");
5686
+ const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-KXVS3YK3.js");
5577
5687
  const store = await loadGraphStore2(projectPath);
5578
5688
  if (!store) return ZERO_METRICS;
5579
- const { GraphCouplingAdapter, GraphComplexityAdapter, GraphAnomalyAdapter } = await import("./dist-RADHOOXG.js");
5689
+ const { GraphCouplingAdapter, GraphComplexityAdapter, GraphAnomalyAdapter } = await import("./dist-HPWNWCT6.js");
5580
5690
  const couplingAdapter = new GraphCouplingAdapter(store);
5581
5691
  const couplingData = couplingAdapter.computeCouplingData();
5582
5692
  const files = couplingData.files;
@@ -6315,7 +6425,7 @@ async function handleGetDecayTrends(input) {
6315
6425
  };
6316
6426
  }
6317
6427
  try {
6318
- const core = await import("./dist-UMONICND.js");
6428
+ const core = await import("./dist-ZV6GO6FA.js");
6319
6429
  const { TimelineManager } = core;
6320
6430
  const manager = new TimelineManager(projectPath);
6321
6431
  const timeline = manager.load();
@@ -6450,7 +6560,7 @@ async function handleCodeOutline(input) {
6450
6560
  };
6451
6561
  }
6452
6562
  try {
6453
- const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-UMONICND.js");
6563
+ const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-ZV6GO6FA.js");
6454
6564
  const { stat } = await import("fs/promises");
6455
6565
  const stats = await stat(targetPath).catch(() => null);
6456
6566
  if (stats?.isFile()) {
@@ -6469,7 +6579,7 @@ async function handleCodeOutline(input) {
6469
6579
  })
6470
6580
  );
6471
6581
  fileStats.sort((a, b) => b.mtimeMs - a.mtimeMs);
6472
- const { paginate: paginate2 } = await import("./dist-UMONICND.js");
6582
+ const { paginate: paginate2 } = await import("./dist-ZV6GO6FA.js");
6473
6583
  const paged = paginate2(fileStats, input.offset ?? 0, input.limit ?? 30);
6474
6584
  const results = [];
6475
6585
  for (const entry of paged.items) {
@@ -6542,7 +6652,7 @@ async function handleCodeSearch(input) {
6542
6652
  };
6543
6653
  }
6544
6654
  try {
6545
- const { searchSymbols } = await import("./dist-UMONICND.js");
6655
+ const { searchSymbols } = await import("./dist-ZV6GO6FA.js");
6546
6656
  const result = await searchSymbols(input.query, directory, input.glob);
6547
6657
  const lines = [`Search: "${result.query}" \u2014 ${result.matches.length} matches`];
6548
6658
  for (const match of result.matches) {
@@ -6611,7 +6721,7 @@ async function handleCodeUnfold(input) {
6611
6721
  }
6612
6722
  try {
6613
6723
  if (input.symbol) {
6614
- const { unfoldSymbol } = await import("./dist-UMONICND.js");
6724
+ const { unfoldSymbol } = await import("./dist-ZV6GO6FA.js");
6615
6725
  const result = await unfoldSymbol(filePath, input.symbol);
6616
6726
  const header = result.warning ? `${result.file}:${result.startLine}-${result.endLine} ${result.warning}
6617
6727
  ` : `${result.file}:${result.startLine}-${result.endLine}
@@ -6619,7 +6729,7 @@ async function handleCodeUnfold(input) {
6619
6729
  return { content: [{ type: "text", text: header + result.content }] };
6620
6730
  }
6621
6731
  if (input.startLine != null && input.endLine != null) {
6622
- const { unfoldRange } = await import("./dist-UMONICND.js");
6732
+ const { unfoldRange } = await import("./dist-ZV6GO6FA.js");
6623
6733
  const result = await unfoldRange(filePath, input.startLine, input.endLine);
6624
6734
  const header = `${result.file}:${result.startLine}-${result.endLine}
6625
6735
  `;
@@ -6681,7 +6791,7 @@ async function handleCheckTraceability(input) {
6681
6791
  isError: true
6682
6792
  };
6683
6793
  }
6684
- const { queryTraceability } = await import("./dist-RADHOOXG.js");
6794
+ const { queryTraceability } = await import("./dist-HPWNWCT6.js");
6685
6795
  const options = {};
6686
6796
  if (input.spec) options.specPath = input.spec;
6687
6797
  if (input.feature) options.featureName = input.feature;
@@ -6804,7 +6914,7 @@ async function handlePredictFailures(input) {
6804
6914
  };
6805
6915
  }
6806
6916
  try {
6807
- const core = await import("./dist-UMONICND.js");
6917
+ const core = await import("./dist-ZV6GO6FA.js");
6808
6918
  const { TimelineManager, PredictionEngine, SpecImpactEstimator } = core;
6809
6919
  const manager = new TimelineManager(projectPath);
6810
6920
  const includeRoadmap = input.includeRoadmap !== false;
@@ -6994,7 +7104,7 @@ function handleContentMode(content, pipeline, budget, source) {
6994
7104
  };
6995
7105
  }
6996
7106
  async function handleIntentMode(projectPath, intent, pipeline, budget, filterContent) {
6997
- const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-JHQVQRUS.js");
7107
+ const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-KXVS3YK3.js");
6998
7108
  const store = await loadGraphStore2(projectPath);
6999
7109
  if (!store) {
7000
7110
  return {
@@ -7007,7 +7117,7 @@ async function handleIntentMode(projectPath, intent, pipeline, budget, filterCon
7007
7117
  isError: true
7008
7118
  };
7009
7119
  }
7010
- const { PackedSummaryCache, FusionLayer, ContextQL } = await import("./dist-RADHOOXG.js");
7120
+ const { PackedSummaryCache, FusionLayer, ContextQL } = await import("./dist-HPWNWCT6.js");
7011
7121
  const cache = new PackedSummaryCache(store);
7012
7122
  const cachedEnvelope = cache.get(intent);
7013
7123
  if (cachedEnvelope) {
@@ -7220,7 +7330,7 @@ async function handleDetectConstraintEmergence(input) {
7220
7330
  }
7221
7331
  const nodePath = await import("path");
7222
7332
  const historyPath = nodePath.resolve(projectPath, ".harness/arch/violation-history.json");
7223
- const { ViolationHistoryManager, detectEmergentConstraints } = await import("./dist-UMONICND.js");
7333
+ const { ViolationHistoryManager, detectEmergentConstraints } = await import("./dist-ZV6GO6FA.js");
7224
7334
  const manager = new ViolationHistoryManager(historyPath);
7225
7335
  const history = manager.load();
7226
7336
  const options = { windowWeeks, minOccurrences };
@@ -7426,6 +7536,13 @@ var RESOURCE_DEFINITIONS = [
7426
7536
  description: "All edges with types, confidence scores, and timestamps",
7427
7537
  mimeType: "application/json",
7428
7538
  _meta: { stability: "session" }
7539
+ },
7540
+ {
7541
+ uri: "harness://business-knowledge",
7542
+ name: "Business Knowledge",
7543
+ description: "Business domain knowledge from docs/knowledge/ organized by domain (rules, processes, concepts, terms, metrics)",
7544
+ mimeType: "application/json",
7545
+ _meta: { stability: "session" }
7429
7546
  }
7430
7547
  ];
7431
7548
  var RESOURCE_HANDLERS = {
@@ -7436,7 +7553,8 @@ var RESOURCE_HANDLERS = {
7436
7553
  "harness://state": getStateResource,
7437
7554
  "harness://graph": getGraphResource,
7438
7555
  "harness://entities": getEntitiesResource,
7439
- "harness://relationships": getRelationshipsResource
7556
+ "harness://relationships": getRelationshipsResource,
7557
+ "harness://business-knowledge": getBusinessKnowledgeResource
7440
7558
  };
7441
7559
  function getToolDefinitions() {
7442
7560
  return TOOL_DEFINITIONS;
@@ -7462,7 +7580,7 @@ async function appendUpdateNotification(result, resolvedRoot) {
7462
7580
  shouldRunCheck,
7463
7581
  readCheckState,
7464
7582
  spawnBackgroundCheck
7465
- } = await import("./dist-UMONICND.js");
7583
+ } = await import("./dist-ZV6GO6FA.js");
7466
7584
  const { CLI_VERSION } = await import("./version-CUI434OP.js");
7467
7585
  const configInterval = readConfigInterval(resolvedRoot);
7468
7586
  const DEFAULT_INTERVAL = 864e5;