@harness-engineering/cli 1.10.0 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/agents/skills/claude-code/enforce-architecture/SKILL.md +4 -0
  2. package/dist/agents/skills/claude-code/harness-parallel-agents/SKILL.md +105 -20
  3. package/dist/agents/skills/claude-code/harness-pre-commit-review/SKILL.md +37 -0
  4. package/dist/agents/skills/gemini-cli/enforce-architecture/SKILL.md +4 -0
  5. package/dist/agents/skills/gemini-cli/harness-parallel-agents/SKILL.md +105 -20
  6. package/dist/agents/skills/gemini-cli/harness-pre-commit-review/SKILL.md +37 -0
  7. package/dist/{agents-md-EMRFLNBC.js → agents-md-KIS2RSMG.js} +1 -1
  8. package/dist/{architecture-5JNN5L3M.js → architecture-AJAUDRQQ.js} +2 -2
  9. package/dist/bin/harness-mcp.js +14 -14
  10. package/dist/bin/harness.js +20 -20
  11. package/dist/{check-phase-gate-WOKIYGAM.js → check-phase-gate-K7QCSYRJ.js} +4 -4
  12. package/dist/{chunk-FPIPT36X.js → chunk-2SWJ4VO7.js} +6 -6
  13. package/dist/{chunk-OPXH4CQN.js → chunk-2YPZKGAG.js} +1 -1
  14. package/dist/{chunk-B7HFEHWP.js → chunk-3WGJMBKH.js} +10 -0
  15. package/dist/{chunk-ECUJQS3B.js → chunk-6N4R6FVX.js} +3 -3
  16. package/dist/{chunk-LXU5M77O.js → chunk-747VBPA4.js} +390 -57
  17. package/dist/{chunk-NX6DSZSM.js → chunk-AE2OWWDH.js} +4497 -2640
  18. package/dist/{chunk-PAHHT2IK.js → chunk-B5SBNH4S.js} +2833 -918
  19. package/dist/{chunk-F4PTVZWA.js → chunk-CTTFXXKJ.js} +7 -7
  20. package/dist/{chunk-PSXF277V.js → chunk-EAURF4LH.js} +1 -1
  21. package/dist/chunk-EBJQ6N4M.js +39 -0
  22. package/dist/{chunk-4PFMY3H7.js → chunk-FLOEMHDF.js} +9 -9
  23. package/dist/{chunk-46YA6FI3.js → chunk-GNGELAXY.js} +2 -2
  24. package/dist/{chunk-EOLRW32Q.js → chunk-HD4IBGLA.js} +9 -1
  25. package/dist/{chunk-CWZ4Y2PO.js → chunk-JLXOEO5C.js} +4 -4
  26. package/dist/{chunk-F3YDAJFQ.js → chunk-L2KLU56K.js} +2 -2
  27. package/dist/{chunk-MO4YQOMB.js → chunk-OIGVQF5V.js} +3 -3
  28. package/dist/{chunk-PMTFPOCT.js → chunk-TJVVU3HB.js} +1 -1
  29. package/dist/{chunk-MDUK2J2O.js → chunk-VRFZWGMS.js} +2 -1
  30. package/dist/{chunk-FX7SQHGD.js → chunk-YXOG2277.js} +2 -2
  31. package/dist/{chunk-7X7ZAYMY.js → chunk-ZU2UBYBY.js} +102 -5
  32. package/dist/{ci-workflow-ZBBUNTHQ.js → ci-workflow-NBL4OT4A.js} +1 -1
  33. package/dist/create-skill-WPXHSLX2.js +11 -0
  34. package/dist/{dist-PBTNVK6K.js → dist-IJ4J4C5G.js} +103 -1
  35. package/dist/{dist-I7DB5VKB.js → dist-M6BQODWC.js} +1145 -0
  36. package/dist/{docs-PTJGD6XI.js → docs-CPTMH3VY.js} +2 -2
  37. package/dist/{engine-SCMZ3G3E.js → engine-BUWPAAGD.js} +1 -1
  38. package/dist/{entropy-YIUBGKY7.js → entropy-Z4FYVQ7L.js} +2 -2
  39. package/dist/{feedback-WEVQSLAA.js → feedback-TT6WF5YX.js} +1 -1
  40. package/dist/{generate-agent-definitions-BU5LOJTI.js → generate-agent-definitions-J5HANRNR.js} +4 -4
  41. package/dist/{graph-loader-RLO3KRIX.js → graph-loader-KO4GJ5N2.js} +1 -1
  42. package/dist/index.d.ts +355 -12
  43. package/dist/index.js +33 -21
  44. package/dist/{loader-6S6PVGSF.js → loader-PCU5YWRH.js} +1 -1
  45. package/dist/mcp-YM6QLHLZ.js +34 -0
  46. package/dist/{performance-5TVW6SA6.js → performance-YJVXOKIB.js} +2 -2
  47. package/dist/{review-pipeline-4JTQAWKW.js → review-pipeline-KGMIMLIE.js} +1 -1
  48. package/dist/{runtime-PXIM7UV6.js → runtime-F6R27LD6.js} +1 -1
  49. package/dist/{security-URYTKLGK.js → security-MX5VVXBC.js} +1 -1
  50. package/dist/skill-executor-RG45LUO5.js +8 -0
  51. package/dist/templates/orchestrator/WORKFLOW.md +48 -0
  52. package/dist/templates/orchestrator/template.json +6 -0
  53. package/dist/{validate-KSDUUK2M.js → validate-EFNMSFKD.js} +2 -2
  54. package/dist/{validate-cross-check-WZAX357V.js → validate-cross-check-LJX65SBS.js} +1 -1
  55. package/package.json +10 -6
  56. package/dist/chunk-HIOXKZYF.js +0 -15
  57. package/dist/create-skill-LUWO46WF.js +0 -11
  58. package/dist/mcp-BNLBTCXZ.js +0 -34
  59. package/dist/skill-executor-KVS47DAU.js +0 -8
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  detectEntropyDefinition,
3
3
  handleDetectEntropy
4
- } from "./chunk-CWZ4Y2PO.js";
4
+ } from "./chunk-JLXOEO5C.js";
5
5
  import {
6
6
  checkPerformanceDefinition,
7
7
  getCriticalPathsDefinition,
@@ -11,7 +11,7 @@ import {
11
11
  handleGetPerfBaselines,
12
12
  handleUpdatePerfBaselines,
13
13
  updatePerfBaselinesDefinition
14
- } from "./chunk-FPIPT36X.js";
14
+ } from "./chunk-2SWJ4VO7.js";
15
15
  import {
16
16
  analyzeDiffDefinition,
17
17
  createSelfReviewDefinition,
@@ -19,15 +19,15 @@ import {
19
19
  handleCreateSelfReview,
20
20
  handleRequestPeerReview,
21
21
  requestPeerReviewDefinition
22
- } from "./chunk-4PFMY3H7.js";
22
+ } from "./chunk-FLOEMHDF.js";
23
23
  import {
24
24
  handleRunSecurityScan,
25
25
  runSecurityScanDefinition
26
- } from "./chunk-PSXF277V.js";
26
+ } from "./chunk-EAURF4LH.js";
27
27
  import {
28
28
  handleRunCodeReview,
29
29
  runCodeReviewDefinition
30
- } from "./chunk-PMTFPOCT.js";
30
+ } from "./chunk-TJVVU3HB.js";
31
31
  import {
32
32
  GENERATED_HEADER_CLAUDE,
33
33
  GENERATED_HEADER_GEMINI,
@@ -38,21 +38,21 @@ import {
38
38
  import {
39
39
  handleValidateProject,
40
40
  validateToolDefinition
41
- } from "./chunk-FX7SQHGD.js";
41
+ } from "./chunk-YXOG2277.js";
42
42
  import {
43
43
  loadGraphStore
44
- } from "./chunk-OPXH4CQN.js";
44
+ } from "./chunk-2YPZKGAG.js";
45
45
  import {
46
46
  checkDependenciesDefinition,
47
47
  handleCheckDependencies
48
- } from "./chunk-MO4YQOMB.js";
48
+ } from "./chunk-OIGVQF5V.js";
49
49
  import {
50
50
  resolveProjectConfig
51
51
  } from "./chunk-K6XAPGML.js";
52
52
  import {
53
53
  checkDocsDefinition,
54
54
  handleCheckDocs
55
- } from "./chunk-F4PTVZWA.js";
55
+ } from "./chunk-CTTFXXKJ.js";
56
56
  import {
57
57
  resultToMcpResponse
58
58
  } from "./chunk-IDZNPTYD.js";
@@ -60,20 +60,21 @@ import {
60
60
  sanitizePath
61
61
  } from "./chunk-W6Y7ZW3Y.js";
62
62
  import {
63
+ resolveCommunitySkillsDir,
63
64
  resolveGlobalSkillsDir,
64
65
  resolvePersonasDir,
65
66
  resolveProjectSkillsDir,
66
67
  resolveSkillsDir,
67
68
  resolveTemplatesDir
68
- } from "./chunk-EOLRW32Q.js";
69
+ } from "./chunk-HD4IBGLA.js";
69
70
  import {
70
71
  CLIError,
71
72
  ExitCode,
72
73
  handleError
73
- } from "./chunk-B7HFEHWP.js";
74
+ } from "./chunk-3WGJMBKH.js";
74
75
  import {
75
76
  SkillMetadataSchema
76
- } from "./chunk-MDUK2J2O.js";
77
+ } from "./chunk-VRFZWGMS.js";
77
78
  import {
78
79
  Err,
79
80
  Ok
@@ -179,7 +180,7 @@ var initProjectDefinition = {
179
180
  };
180
181
  async function handleInitProject(input) {
181
182
  try {
182
- const { TemplateEngine } = await import("./engine-SCMZ3G3E.js");
183
+ const { TemplateEngine } = await import("./engine-BUWPAAGD.js");
183
184
  const templatesDir = resolveTemplatesDir();
184
185
  const engine = new TemplateEngine(templatesDir);
185
186
  const level = input.level ?? "basic";
@@ -217,7 +218,7 @@ var listPersonasDefinition = {
217
218
  inputSchema: { type: "object", properties: {} }
218
219
  };
219
220
  async function handleListPersonas() {
220
- const { listPersonas } = await import("./loader-6S6PVGSF.js");
221
+ const { listPersonas } = await import("./loader-PCU5YWRH.js");
221
222
  const result = listPersonas(resolvePersonasDir());
222
223
  return resultToMcpResponse(result);
223
224
  }
@@ -241,10 +242,10 @@ async function handleGeneratePersonaArtifacts(input) {
241
242
  if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.name)) {
242
243
  return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.name}`)));
243
244
  }
244
- const { loadPersona } = await import("./loader-6S6PVGSF.js");
245
- const { generateRuntime } = await import("./runtime-PXIM7UV6.js");
246
- const { generateAgentsMd } = await import("./agents-md-EMRFLNBC.js");
247
- const { generateCIWorkflow } = await import("./ci-workflow-ZBBUNTHQ.js");
245
+ const { loadPersona } = await import("./loader-PCU5YWRH.js");
246
+ const { generateRuntime } = await import("./runtime-F6R27LD6.js");
247
+ const { generateAgentsMd } = await import("./agents-md-KIS2RSMG.js");
248
+ const { generateCIWorkflow } = await import("./ci-workflow-NBL4OT4A.js");
248
249
  const personasDir = resolvePersonasDir();
249
250
  const filePath = path2.join(personasDir, `${input.name}.yaml`);
250
251
  if (!filePath.startsWith(personasDir)) {
@@ -299,9 +300,9 @@ async function handleRunPersona(input) {
299
300
  if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.persona)) {
300
301
  return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.persona}`)));
301
302
  }
302
- const { loadPersona } = await import("./loader-6S6PVGSF.js");
303
+ const { loadPersona } = await import("./loader-PCU5YWRH.js");
303
304
  const { runPersona } = await import("./runner-VMYLHWOC.js");
304
- const { executeSkill } = await import("./skill-executor-KVS47DAU.js");
305
+ const { executeSkill } = await import("./skill-executor-RG45LUO5.js");
305
306
  const personasDir = resolvePersonasDir();
306
307
  const filePath = path2.join(personasDir, `${input.persona}.yaml`);
307
308
  if (!filePath.startsWith(personasDir)) {
@@ -547,7 +548,7 @@ var createSkillDefinition = {
547
548
  };
548
549
  async function handleCreateSkill(input) {
549
550
  try {
550
- const { generateSkillFiles } = await import("./create-skill-LUWO46WF.js");
551
+ const { generateSkillFiles } = await import("./create-skill-WPXHSLX2.js");
551
552
  const result = generateSkillFiles({
552
553
  name: input.name,
553
554
  description: input.description,
@@ -704,7 +705,7 @@ async function handleManageState(input) {
704
705
  archiveFailures,
705
706
  runMechanicalGate,
706
707
  DEFAULT_STATE
707
- } = await import("./dist-PBTNVK6K.js");
708
+ } = await import("./dist-IJ4J4C5G.js");
708
709
  const projectPath = sanitizePath(input.path);
709
710
  switch (input.action) {
710
711
  case "show": {
@@ -783,7 +784,7 @@ async function handleManageState(input) {
783
784
  isError: true
784
785
  };
785
786
  }
786
- const { saveHandoff } = await import("./dist-PBTNVK6K.js");
787
+ const { saveHandoff } = await import("./dist-IJ4J4C5G.js");
787
788
  const result = await saveHandoff(
788
789
  projectPath,
789
790
  input.handoff,
@@ -792,7 +793,7 @@ async function handleManageState(input) {
792
793
  return resultToMcpResponse(result.ok ? Ok({ saved: true }) : result);
793
794
  }
794
795
  case "load-handoff": {
795
- const { loadHandoff } = await import("./dist-PBTNVK6K.js");
796
+ const { loadHandoff } = await import("./dist-IJ4J4C5G.js");
796
797
  const result = await loadHandoff(projectPath, input.stream);
797
798
  return resultToMcpResponse(result);
798
799
  }
@@ -828,7 +829,7 @@ var listStreamsDefinition = {
828
829
  };
829
830
  async function handleListStreams(input) {
830
831
  try {
831
- const { listStreams, loadStreamIndex } = await import("./dist-PBTNVK6K.js");
832
+ const { listStreams, loadStreamIndex } = await import("./dist-IJ4J4C5G.js");
832
833
  const projectPath = sanitizePath(input.path);
833
834
  const indexResult = await loadStreamIndex(projectPath);
834
835
  const streamsResult = await listStreams(projectPath);
@@ -866,7 +867,7 @@ var checkPhaseGateDefinition = {
866
867
  };
867
868
  async function handleCheckPhaseGate(input) {
868
869
  try {
869
- const { runCheckPhaseGate } = await import("./check-phase-gate-WOKIYGAM.js");
870
+ const { runCheckPhaseGate } = await import("./check-phase-gate-K7QCSYRJ.js");
870
871
  const result = await runCheckPhaseGate({ cwd: sanitizePath(input.path) });
871
872
  if (result.ok) {
872
873
  return { content: [{ type: "text", text: JSON.stringify(result.value) }] };
@@ -922,7 +923,7 @@ async function handleValidateCrossCheck(input) {
922
923
  };
923
924
  }
924
925
  try {
925
- const { runCrossCheck } = await import("./validate-cross-check-WZAX357V.js");
926
+ const { runCrossCheck } = await import("./validate-cross-check-LJX65SBS.js");
926
927
  const specsDir = path8.resolve(projectPath, input.specsDir ?? "docs/specs");
927
928
  if (!specsDir.startsWith(projectPath)) {
928
929
  return {
@@ -1224,6 +1225,10 @@ function generateSlashCommands(opts) {
1224
1225
  if (projectDir) {
1225
1226
  skillSources.push({ dir: projectDir, source: "project" });
1226
1227
  }
1228
+ const communityDir = resolveCommunitySkillsDir();
1229
+ if (fs7.existsSync(communityDir)) {
1230
+ skillSources.push({ dir: communityDir, source: "community" });
1231
+ }
1227
1232
  if (opts.includeGlobal || skillSources.length === 0) {
1228
1233
  const globalDir = resolveGlobalSkillsDir();
1229
1234
  if (!projectDir || path10.resolve(globalDir) !== path10.resolve(projectDir)) {
@@ -1413,7 +1418,7 @@ async function handleGenerateSlashCommands(input) {
1413
1418
  // src/mcp/resources/state.ts
1414
1419
  async function getStateResource(projectRoot) {
1415
1420
  try {
1416
- const { loadState, migrateToStreams } = await import("./dist-PBTNVK6K.js");
1421
+ const { loadState, migrateToStreams } = await import("./dist-IJ4J4C5G.js");
1417
1422
  await migrateToStreams(projectRoot);
1418
1423
  const result = await loadState(projectRoot);
1419
1424
  if (result.ok) {
@@ -1500,7 +1505,7 @@ async function handleQueryGraph(input) {
1500
1505
  const projectPath = sanitizePath(input.path);
1501
1506
  const store = await loadGraphStore(projectPath);
1502
1507
  if (!store) return graphNotFoundError();
1503
- const { ContextQL } = await import("./dist-I7DB5VKB.js");
1508
+ const { ContextQL } = await import("./dist-M6BQODWC.js");
1504
1509
  const cql = new ContextQL(store);
1505
1510
  const result = cql.execute({
1506
1511
  rootNodeIds: input.rootNodeIds,
@@ -1589,7 +1594,7 @@ async function handleSearchSimilar(input) {
1589
1594
  const projectPath = sanitizePath(input.path);
1590
1595
  const store = await loadGraphStore(projectPath);
1591
1596
  if (!store) return graphNotFoundError();
1592
- const { FusionLayer } = await import("./dist-I7DB5VKB.js");
1597
+ const { FusionLayer } = await import("./dist-M6BQODWC.js");
1593
1598
  const fusion = new FusionLayer(store);
1594
1599
  const results = fusion.search(input.query, input.topK ?? 10);
1595
1600
  if (input.mode === "summary") {
@@ -1642,7 +1647,7 @@ async function handleFindContextFor(input) {
1642
1647
  const projectPath = sanitizePath(input.path);
1643
1648
  const store = await loadGraphStore(projectPath);
1644
1649
  if (!store) return graphNotFoundError();
1645
- const { FusionLayer, ContextQL } = await import("./dist-I7DB5VKB.js");
1650
+ const { FusionLayer, ContextQL } = await import("./dist-M6BQODWC.js");
1646
1651
  const fusion = new FusionLayer(store);
1647
1652
  const cql = new ContextQL(store);
1648
1653
  const tokenBudget = input.tokenBudget ?? 4e3;
@@ -1736,7 +1741,7 @@ async function handleGetRelationships(input) {
1736
1741
  const projectPath = sanitizePath(input.path);
1737
1742
  const store = await loadGraphStore(projectPath);
1738
1743
  if (!store) return graphNotFoundError();
1739
- const { ContextQL } = await import("./dist-I7DB5VKB.js");
1744
+ const { ContextQL } = await import("./dist-M6BQODWC.js");
1740
1745
  const cql = new ContextQL(store);
1741
1746
  const direction = input.direction ?? "both";
1742
1747
  const bidirectional = direction === "both" || direction === "inbound";
@@ -1840,7 +1845,7 @@ async function handleGetImpact(input) {
1840
1845
  const projectPath = sanitizePath(input.path);
1841
1846
  const store = await loadGraphStore(projectPath);
1842
1847
  if (!store) return graphNotFoundError();
1843
- const { ContextQL } = await import("./dist-I7DB5VKB.js");
1848
+ const { ContextQL } = await import("./dist-M6BQODWC.js");
1844
1849
  let targetNodeId = input.nodeId;
1845
1850
  if (!targetNodeId && input.filePath) {
1846
1851
  const fileNodes = store.findNodes({ type: "file" });
@@ -1969,7 +1974,7 @@ async function handleIngestSource(input) {
1969
1974
  try {
1970
1975
  const projectPath = sanitizePath(input.path);
1971
1976
  const graphDir = path11.join(projectPath, ".harness", "graph");
1972
- const { GraphStore, CodeIngestor, TopologicalLinker, KnowledgeIngestor, GitIngestor } = await import("./dist-I7DB5VKB.js");
1977
+ const { GraphStore, CodeIngestor, TopologicalLinker, KnowledgeIngestor, GitIngestor } = await import("./dist-M6BQODWC.js");
1973
1978
  const fs10 = await import("fs/promises");
1974
1979
  await fs10.mkdir(graphDir, { recursive: true });
1975
1980
  const store = new GraphStore();
@@ -2042,7 +2047,7 @@ async function handleDetectAnomalies(input) {
2042
2047
  const projectPath = sanitizePath(input.path);
2043
2048
  const store = await loadGraphStore(projectPath);
2044
2049
  if (!store) return graphNotFoundError();
2045
- const { GraphAnomalyAdapter } = await import("./dist-I7DB5VKB.js");
2050
+ const { GraphAnomalyAdapter } = await import("./dist-M6BQODWC.js");
2046
2051
  const adapter = new GraphAnomalyAdapter(store);
2047
2052
  const report = adapter.detect({
2048
2053
  ...input.threshold !== void 0 && { threshold: input.threshold },
@@ -2063,6 +2068,40 @@ async function handleDetectAnomalies(input) {
2063
2068
  };
2064
2069
  }
2065
2070
  }
2071
+ var askGraphDefinition = {
2072
+ name: "ask_graph",
2073
+ description: 'Ask a natural language question about the codebase knowledge graph. Supports questions about impact ("what breaks if I change X?"), finding entities ("where is the auth middleware?"), relationships ("what calls UserService?"), explanations ("what is GraphStore?"), and anomalies ("what looks wrong?"). Returns a human-readable summary and raw graph data.',
2074
+ inputSchema: {
2075
+ type: "object",
2076
+ properties: {
2077
+ path: { type: "string", description: "Path to project root" },
2078
+ question: { type: "string", description: "Natural language question about the codebase" }
2079
+ },
2080
+ required: ["path", "question"]
2081
+ }
2082
+ };
2083
+ async function handleAskGraph(input) {
2084
+ try {
2085
+ const projectPath = sanitizePath(input.path);
2086
+ const store = await loadGraphStore(projectPath);
2087
+ if (!store) return graphNotFoundError();
2088
+ const { askGraph } = await import("./dist-M6BQODWC.js");
2089
+ const result = await askGraph(store, input.question);
2090
+ return {
2091
+ content: [{ type: "text", text: JSON.stringify(result) }]
2092
+ };
2093
+ } catch (error) {
2094
+ return {
2095
+ content: [
2096
+ {
2097
+ type: "text",
2098
+ text: `Error: ${error instanceof Error ? error.message : String(error)}`
2099
+ }
2100
+ ],
2101
+ isError: true
2102
+ };
2103
+ }
2104
+ }
2066
2105
 
2067
2106
  // src/mcp/resources/graph.ts
2068
2107
  import * as fs8 from "fs/promises";
@@ -2182,7 +2221,7 @@ var generateAgentDefinitionsDefinition = {
2182
2221
  }
2183
2222
  };
2184
2223
  async function handleGenerateAgentDefinitions(input) {
2185
- const { generateAgentDefinitions } = await import("./generate-agent-definitions-BU5LOJTI.js");
2224
+ const { generateAgentDefinitions } = await import("./generate-agent-definitions-J5HANRNR.js");
2186
2225
  const platforms = input.platform === "all" || !input.platform ? ["claude-code", "gemini-cli"] : [input.platform];
2187
2226
  const results = generateAgentDefinitions({
2188
2227
  platforms: [...platforms],
@@ -2267,7 +2306,7 @@ function writeRoadmapFile(projectRoot, content) {
2267
2306
  }
2268
2307
  async function handleManageRoadmap(input) {
2269
2308
  try {
2270
- const { parseRoadmap, serializeRoadmap, syncRoadmap } = await import("./dist-PBTNVK6K.js");
2309
+ const { parseRoadmap, serializeRoadmap, syncRoadmap } = await import("./dist-IJ4J4C5G.js");
2271
2310
  const { Ok: Ok2 } = await import("./dist-D4RYGUZE.js");
2272
2311
  const projectPath = sanitizePath(input.path);
2273
2312
  switch (input.action) {
@@ -3033,7 +3072,7 @@ async function handleEmitInteraction(input) {
3033
3072
  const transition = transitionResult.data;
3034
3073
  const prompt = renderTransition(transition);
3035
3074
  try {
3036
- const { saveHandoff } = await import("./dist-PBTNVK6K.js");
3075
+ const { saveHandoff } = await import("./dist-IJ4J4C5G.js");
3037
3076
  await saveHandoff(
3038
3077
  projectPath,
3039
3078
  {
@@ -3134,7 +3173,7 @@ async function handleEmitInteraction(input) {
3134
3173
  }
3135
3174
  async function recordInteraction(projectPath, id, type, decision, stream) {
3136
3175
  try {
3137
- const { loadState, saveState } = await import("./dist-PBTNVK6K.js");
3176
+ const { loadState, saveState } = await import("./dist-IJ4J4C5G.js");
3138
3177
  const stateResult = await loadState(projectPath, stream);
3139
3178
  if (stateResult.ok) {
3140
3179
  const state = stateResult.value;
@@ -3206,16 +3245,16 @@ async function handleGatherContext(input) {
3206
3245
  input.include ?? ["state", "learnings", "handoff", "graph", "validation"]
3207
3246
  );
3208
3247
  const errors = [];
3209
- const statePromise = includeSet.has("state") ? import("./dist-PBTNVK6K.js").then((core) => core.loadState(projectPath)) : Promise.resolve(null);
3210
- const learningsPromise = includeSet.has("learnings") ? import("./dist-PBTNVK6K.js").then(
3248
+ const statePromise = includeSet.has("state") ? import("./dist-IJ4J4C5G.js").then((core) => core.loadState(projectPath)) : Promise.resolve(null);
3249
+ const learningsPromise = includeSet.has("learnings") ? import("./dist-IJ4J4C5G.js").then(
3211
3250
  (core) => core.loadRelevantLearnings(projectPath, input.skill)
3212
3251
  ) : Promise.resolve(null);
3213
- const handoffPromise = includeSet.has("handoff") ? import("./dist-PBTNVK6K.js").then((core) => core.loadHandoff(projectPath)) : Promise.resolve(null);
3252
+ const handoffPromise = includeSet.has("handoff") ? import("./dist-IJ4J4C5G.js").then((core) => core.loadHandoff(projectPath)) : Promise.resolve(null);
3214
3253
  const graphPromise = includeSet.has("graph") ? (async () => {
3215
- const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-RLO3KRIX.js");
3254
+ const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-KO4GJ5N2.js");
3216
3255
  const store = await loadGraphStore2(projectPath);
3217
3256
  if (!store) return null;
3218
- const { FusionLayer, ContextQL } = await import("./dist-I7DB5VKB.js");
3257
+ const { FusionLayer, ContextQL } = await import("./dist-M6BQODWC.js");
3219
3258
  const fusion = new FusionLayer(store);
3220
3259
  const cql = new ContextQL(store);
3221
3260
  const tokenBudget = input.tokenBudget ?? 4e3;
@@ -3253,7 +3292,7 @@ async function handleGatherContext(input) {
3253
3292
  };
3254
3293
  })() : Promise.resolve(null);
3255
3294
  const validationPromise = includeSet.has("validation") ? (async () => {
3256
- const { handleValidateProject: handleValidateProject2 } = await import("./validate-KSDUUK2M.js");
3295
+ const { handleValidateProject: handleValidateProject2 } = await import("./validate-EFNMSFKD.js");
3257
3296
  const result = await handleValidateProject2({ path: projectPath });
3258
3297
  const first = result.content[0];
3259
3298
  return first ? JSON.parse(first.text) : null;
@@ -3386,7 +3425,7 @@ async function handleAssessProject(input) {
3386
3425
  let validateResult = null;
3387
3426
  if (checksToRun.has("validate")) {
3388
3427
  try {
3389
- const { handleValidateProject: handleValidateProject2 } = await import("./validate-KSDUUK2M.js");
3428
+ const { handleValidateProject: handleValidateProject2 } = await import("./validate-EFNMSFKD.js");
3390
3429
  const result = await handleValidateProject2({ path: projectPath });
3391
3430
  const first = result.content[0];
3392
3431
  const parsed = first ? JSON.parse(first.text) : {};
@@ -3411,7 +3450,7 @@ async function handleAssessProject(input) {
3411
3450
  parallelChecks.push(
3412
3451
  (async () => {
3413
3452
  try {
3414
- const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-5JNN5L3M.js");
3453
+ const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-AJAUDRQQ.js");
3415
3454
  const result = await handleCheckDependencies2({ path: projectPath });
3416
3455
  const first = result.content[0];
3417
3456
  const parsed = first ? JSON.parse(first.text) : {};
@@ -3438,7 +3477,7 @@ async function handleAssessProject(input) {
3438
3477
  parallelChecks.push(
3439
3478
  (async () => {
3440
3479
  try {
3441
- const { handleCheckDocs: handleCheckDocs2 } = await import("./docs-PTJGD6XI.js");
3480
+ const { handleCheckDocs: handleCheckDocs2 } = await import("./docs-CPTMH3VY.js");
3442
3481
  const result = await handleCheckDocs2({ path: projectPath, scope: "coverage" });
3443
3482
  const first = result.content[0];
3444
3483
  const parsed = first ? JSON.parse(first.text) : {};
@@ -3465,7 +3504,7 @@ async function handleAssessProject(input) {
3465
3504
  parallelChecks.push(
3466
3505
  (async () => {
3467
3506
  try {
3468
- const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-YIUBGKY7.js");
3507
+ const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-Z4FYVQ7L.js");
3469
3508
  const result = await handleDetectEntropy2({ path: projectPath, type: "all" });
3470
3509
  const first = result.content[0];
3471
3510
  const parsed = first ? JSON.parse(first.text) : {};
@@ -3492,7 +3531,7 @@ async function handleAssessProject(input) {
3492
3531
  parallelChecks.push(
3493
3532
  (async () => {
3494
3533
  try {
3495
- const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-URYTKLGK.js");
3534
+ const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-MX5VVXBC.js");
3496
3535
  const result = await handleRunSecurityScan2({ path: projectPath });
3497
3536
  const first = result.content[0];
3498
3537
  const parsed = first ? JSON.parse(first.text) : {};
@@ -3524,7 +3563,7 @@ async function handleAssessProject(input) {
3524
3563
  parallelChecks.push(
3525
3564
  (async () => {
3526
3565
  try {
3527
- const { handleCheckPerformance: handleCheckPerformance2 } = await import("./performance-5TVW6SA6.js");
3566
+ const { handleCheckPerformance: handleCheckPerformance2 } = await import("./performance-YJVXOKIB.js");
3528
3567
  const result = await handleCheckPerformance2({ path: projectPath });
3529
3568
  const first = result.content[0];
3530
3569
  const parsed = first ? JSON.parse(first.text) : {};
@@ -3699,7 +3738,7 @@ async function handleReviewChanges(input) {
3699
3738
  }
3700
3739
  try {
3701
3740
  if (effectiveDepth === "quick") {
3702
- const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-WEVQSLAA.js");
3741
+ const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-TT6WF5YX.js");
3703
3742
  const result2 = await handleAnalyzeDiff2({ diff, path: projectPath });
3704
3743
  const firstContent = result2.content[0];
3705
3744
  if (!firstContent) throw new Error("Empty analyze_diff response");
@@ -3721,7 +3760,7 @@ async function handleReviewChanges(input) {
3721
3760
  };
3722
3761
  }
3723
3762
  if (effectiveDepth === "standard") {
3724
- const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-WEVQSLAA.js");
3763
+ const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-TT6WF5YX.js");
3725
3764
  const [diffResult, reviewResult] = await Promise.all([
3726
3765
  handleAnalyzeDiff2({ diff, path: projectPath }),
3727
3766
  handleCreateSelfReview2({ path: projectPath, diff })
@@ -3752,7 +3791,7 @@ async function handleReviewChanges(input) {
3752
3791
  ]
3753
3792
  };
3754
3793
  }
3755
- const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-4JTQAWKW.js");
3794
+ const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-KGMIMLIE.js");
3756
3795
  const result = await handleRunCodeReview2({ path: projectPath, diff });
3757
3796
  const deepContent = result.content[0];
3758
3797
  if (!deepContent) throw new Error("Empty code review response");
@@ -3786,6 +3825,291 @@ async function handleReviewChanges(input) {
3786
3825
  }
3787
3826
  }
3788
3827
 
3828
+ // src/mcp/tools/task-independence.ts
3829
+ var checkTaskIndependenceDefinition = {
3830
+ name: "check_task_independence",
3831
+ description: "Check whether N tasks can safely run in parallel by detecting file overlaps and transitive dependency conflicts. Returns pairwise independence matrix and parallel groupings.",
3832
+ inputSchema: {
3833
+ type: "object",
3834
+ properties: {
3835
+ path: { type: "string", description: "Path to project root" },
3836
+ tasks: {
3837
+ type: "array",
3838
+ items: {
3839
+ type: "object",
3840
+ properties: {
3841
+ id: { type: "string" },
3842
+ files: { type: "array", items: { type: "string" } }
3843
+ },
3844
+ required: ["id", "files"]
3845
+ },
3846
+ minItems: 2,
3847
+ description: "Tasks to check. Each task has an id and a list of file paths."
3848
+ },
3849
+ depth: {
3850
+ type: "number",
3851
+ description: "Expansion depth (0=file-only, 1=default, 2-3=thorough)"
3852
+ },
3853
+ edgeTypes: {
3854
+ type: "array",
3855
+ items: { type: "string" },
3856
+ description: "Edge types for graph expansion. Default: imports, calls, references"
3857
+ },
3858
+ mode: {
3859
+ type: "string",
3860
+ enum: ["summary", "detailed"],
3861
+ description: "summary omits overlap details. Default: detailed"
3862
+ }
3863
+ },
3864
+ required: ["path", "tasks"]
3865
+ }
3866
+ };
3867
+ async function handleCheckTaskIndependence(input) {
3868
+ try {
3869
+ const projectPath = sanitizePath(input.path);
3870
+ const store = await loadGraphStore(projectPath);
3871
+ const { TaskIndependenceAnalyzer } = await import("./dist-M6BQODWC.js");
3872
+ const analyzer = new TaskIndependenceAnalyzer(store ?? void 0);
3873
+ const result = analyzer.analyze({
3874
+ tasks: input.tasks,
3875
+ ...input.depth !== void 0 && { depth: input.depth },
3876
+ ...input.edgeTypes !== void 0 && { edgeTypes: input.edgeTypes }
3877
+ });
3878
+ if (input.mode === "summary") {
3879
+ const summaryPairs = result.pairs.map((p) => ({
3880
+ taskA: p.taskA,
3881
+ taskB: p.taskB,
3882
+ independent: p.independent
3883
+ }));
3884
+ return {
3885
+ content: [
3886
+ {
3887
+ type: "text",
3888
+ text: JSON.stringify({
3889
+ mode: "summary",
3890
+ verdict: result.verdict,
3891
+ analysisLevel: result.analysisLevel,
3892
+ depth: result.depth,
3893
+ groups: result.groups,
3894
+ pairs: summaryPairs
3895
+ })
3896
+ }
3897
+ ]
3898
+ };
3899
+ }
3900
+ return {
3901
+ content: [{ type: "text", text: JSON.stringify(result) }]
3902
+ };
3903
+ } catch (error) {
3904
+ return {
3905
+ content: [
3906
+ {
3907
+ type: "text",
3908
+ text: `Error: ${error instanceof Error ? error.message : String(error)}`
3909
+ }
3910
+ ],
3911
+ isError: true
3912
+ };
3913
+ }
3914
+ }
3915
+
3916
+ // src/mcp/tools/conflict-prediction.ts
3917
+ var predictConflictsDefinition = {
3918
+ name: "predict_conflicts",
3919
+ description: "Predict conflict severity for task pairs with automatic parallel group recomputation. Returns severity-classified conflicts, revised groups, and human-readable reasoning.",
3920
+ inputSchema: {
3921
+ type: "object",
3922
+ properties: {
3923
+ path: { type: "string", description: "Path to project root" },
3924
+ tasks: {
3925
+ type: "array",
3926
+ items: {
3927
+ type: "object",
3928
+ properties: {
3929
+ id: { type: "string" },
3930
+ files: { type: "array", items: { type: "string" } }
3931
+ },
3932
+ required: ["id", "files"]
3933
+ },
3934
+ minItems: 2,
3935
+ description: "Tasks to check. Each task has an id and a list of file paths."
3936
+ },
3937
+ depth: {
3938
+ type: "number",
3939
+ description: "Expansion depth (0=file-only, 1=default, 2-3=thorough)"
3940
+ },
3941
+ edgeTypes: {
3942
+ type: "array",
3943
+ items: { type: "string" },
3944
+ description: "Edge types for graph expansion. Default: imports, calls, references"
3945
+ },
3946
+ mode: {
3947
+ type: "string",
3948
+ enum: ["summary", "detailed"],
3949
+ description: "summary omits overlap details from conflicts. Default: detailed"
3950
+ }
3951
+ },
3952
+ required: ["path", "tasks"]
3953
+ }
3954
+ };
3955
+ async function handlePredictConflicts(input) {
3956
+ try {
3957
+ const projectPath = sanitizePath(input.path);
3958
+ const store = await loadGraphStore(projectPath);
3959
+ const { ConflictPredictor } = await import("./dist-M6BQODWC.js");
3960
+ const predictor = new ConflictPredictor(store ?? void 0);
3961
+ const result = predictor.predict({
3962
+ tasks: input.tasks,
3963
+ ...input.depth !== void 0 && { depth: input.depth },
3964
+ ...input.edgeTypes !== void 0 && { edgeTypes: input.edgeTypes }
3965
+ });
3966
+ if (input.mode === "summary") {
3967
+ const summaryConflicts = result.conflicts.map((c) => ({
3968
+ taskA: c.taskA,
3969
+ taskB: c.taskB,
3970
+ severity: c.severity,
3971
+ reason: c.reason,
3972
+ mitigation: c.mitigation
3973
+ }));
3974
+ return {
3975
+ content: [
3976
+ {
3977
+ type: "text",
3978
+ text: JSON.stringify({
3979
+ mode: "summary",
3980
+ tasks: result.tasks,
3981
+ analysisLevel: result.analysisLevel,
3982
+ depth: result.depth,
3983
+ conflicts: summaryConflicts,
3984
+ groups: result.groups,
3985
+ summary: result.summary,
3986
+ verdict: result.verdict
3987
+ })
3988
+ }
3989
+ ]
3990
+ };
3991
+ }
3992
+ return {
3993
+ content: [{ type: "text", text: JSON.stringify(result) }]
3994
+ };
3995
+ } catch (error) {
3996
+ return {
3997
+ content: [
3998
+ {
3999
+ type: "text",
4000
+ text: `Error: ${error instanceof Error ? error.message : String(error)}`
4001
+ }
4002
+ ],
4003
+ isError: true
4004
+ };
4005
+ }
4006
+ }
4007
+
4008
+ // src/mcp/tools/stale-constraints.ts
4009
+ var detectStaleConstraintsDefinition = {
4010
+ name: "detect_stale_constraints",
4011
+ description: "Detect architectural constraint rules that have not been violated within a configurable time window. Surfaces stale constraints as candidates for removal or relaxation.",
4012
+ inputSchema: {
4013
+ type: "object",
4014
+ properties: {
4015
+ path: { type: "string", description: "Path to project root" },
4016
+ windowDays: {
4017
+ type: "number",
4018
+ description: "Number of days without violation to consider a constraint stale (default: 30)"
4019
+ },
4020
+ category: {
4021
+ type: "string",
4022
+ description: "Optional filter by constraint category",
4023
+ enum: [
4024
+ "circular-deps",
4025
+ "layer-violations",
4026
+ "complexity",
4027
+ "coupling",
4028
+ "forbidden-imports",
4029
+ "module-size",
4030
+ "dependency-depth"
4031
+ ]
4032
+ }
4033
+ },
4034
+ required: ["path"]
4035
+ }
4036
+ };
4037
+ async function handleDetectStaleConstraints(input) {
4038
+ let projectPath;
4039
+ try {
4040
+ projectPath = sanitizePath(input.path);
4041
+ } catch (error) {
4042
+ return {
4043
+ content: [
4044
+ {
4045
+ type: "text",
4046
+ text: `Error: ${error instanceof Error ? error.message : String(error)}`
4047
+ }
4048
+ ],
4049
+ isError: true
4050
+ };
4051
+ }
4052
+ try {
4053
+ const windowDays = input.windowDays ?? 30;
4054
+ if (!Number.isFinite(windowDays) || windowDays < 1) {
4055
+ return {
4056
+ content: [
4057
+ {
4058
+ type: "text",
4059
+ text: "Error: windowDays must be a finite number >= 1"
4060
+ }
4061
+ ],
4062
+ isError: true
4063
+ };
4064
+ }
4065
+ const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-KO4GJ5N2.js");
4066
+ const store = await loadGraphStore2(projectPath);
4067
+ if (!store) {
4068
+ return {
4069
+ content: [
4070
+ {
4071
+ type: "text",
4072
+ text: JSON.stringify(
4073
+ {
4074
+ staleConstraints: [],
4075
+ totalConstraints: 0,
4076
+ windowDays,
4077
+ note: "No graph available. Run ingest_source first to populate the knowledge graph."
4078
+ },
4079
+ null,
4080
+ 2
4081
+ )
4082
+ }
4083
+ ]
4084
+ };
4085
+ }
4086
+ const { detectStaleConstraints } = await import("./dist-IJ4J4C5G.js");
4087
+ const result = detectStaleConstraints(
4088
+ store,
4089
+ windowDays,
4090
+ input.category
4091
+ );
4092
+ return {
4093
+ content: [
4094
+ {
4095
+ type: "text",
4096
+ text: JSON.stringify(result, null, 2)
4097
+ }
4098
+ ]
4099
+ };
4100
+ } catch (error) {
4101
+ return {
4102
+ content: [
4103
+ {
4104
+ type: "text",
4105
+ text: `Error: ${error instanceof Error ? error.message : String(error)}`
4106
+ }
4107
+ ],
4108
+ isError: true
4109
+ };
4110
+ }
4111
+ }
4112
+
3789
4113
  // src/mcp/server.ts
3790
4114
  var TOOL_DEFINITIONS = [
3791
4115
  validateToolDefinition,
@@ -3828,7 +4152,11 @@ var TOOL_DEFINITIONS = [
3828
4152
  gatherContextDefinition,
3829
4153
  assessProjectDefinition,
3830
4154
  reviewChangesDefinition,
3831
- detectAnomaliesDefinition
4155
+ detectAnomaliesDefinition,
4156
+ askGraphDefinition,
4157
+ checkTaskIndependenceDefinition,
4158
+ predictConflictsDefinition,
4159
+ detectStaleConstraintsDefinition
3832
4160
  ];
3833
4161
  var TOOL_HANDLERS = {
3834
4162
  validate_project: handleValidateProject,
@@ -3871,7 +4199,11 @@ var TOOL_HANDLERS = {
3871
4199
  gather_context: handleGatherContext,
3872
4200
  assess_project: handleAssessProject,
3873
4201
  review_changes: handleReviewChanges,
3874
- detect_anomalies: handleDetectAnomalies
4202
+ detect_anomalies: handleDetectAnomalies,
4203
+ ask_graph: handleAskGraph,
4204
+ check_task_independence: handleCheckTaskIndependence,
4205
+ predict_conflicts: handlePredictConflicts,
4206
+ detect_stale_constraints: handleDetectStaleConstraints
3875
4207
  };
3876
4208
  var RESOURCE_DEFINITIONS = [
3877
4209
  {
@@ -3962,7 +4294,7 @@ function createHarnessServer(projectRoot) {
3962
4294
  shouldRunCheck,
3963
4295
  readCheckState,
3964
4296
  spawnBackgroundCheck
3965
- } = await import("./dist-PBTNVK6K.js");
4297
+ } = await import("./dist-IJ4J4C5G.js");
3966
4298
  const { CLI_VERSION: version } = await import("./version-KFFPOQAX.js");
3967
4299
  let CLI_VERSION = version;
3968
4300
  let configInterval;
@@ -4022,6 +4354,7 @@ export {
4022
4354
  generateSlashCommands,
4023
4355
  handleOrphanDeletion,
4024
4356
  createGenerateSlashCommandsCommand,
4357
+ handleGetImpact,
4025
4358
  getToolDefinitions,
4026
4359
  createHarnessServer,
4027
4360
  startServer