@harness-engineering/cli 1.13.1 → 1.14.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 (139) hide show
  1. package/dist/agents/skills/claude-code/harness-brainstorming/SKILL.md +39 -0
  2. package/dist/agents/skills/claude-code/harness-code-review/SKILL.md +44 -0
  3. package/dist/agents/skills/claude-code/harness-execution/SKILL.md +44 -0
  4. package/dist/agents/skills/claude-code/harness-planning/SKILL.md +39 -0
  5. package/dist/agents/skills/claude-code/harness-release-readiness/SKILL.md +3 -3
  6. package/dist/agents/skills/claude-code/harness-verification/SKILL.md +35 -0
  7. package/dist/agents/skills/claude-code/initialize-harness-project/SKILL.md +11 -3
  8. package/dist/agents/skills/gemini-cli/harness-brainstorming/SKILL.md +39 -0
  9. package/dist/agents/skills/gemini-cli/harness-code-review/SKILL.md +44 -0
  10. package/dist/agents/skills/gemini-cli/harness-execution/SKILL.md +44 -0
  11. package/dist/agents/skills/gemini-cli/harness-planning/SKILL.md +39 -0
  12. package/dist/agents/skills/gemini-cli/harness-release-readiness/SKILL.md +3 -3
  13. package/dist/agents/skills/gemini-cli/harness-verification/SKILL.md +35 -0
  14. package/dist/agents/skills/gemini-cli/initialize-harness-project/SKILL.md +11 -3
  15. package/dist/agents-md-YTYQDA3P.js +8 -0
  16. package/dist/{architecture-2R5Z4ZAF.js → architecture-JQZYM4US.js} +4 -4
  17. package/dist/bin/harness-mcp.js +14 -14
  18. package/dist/bin/harness.js +24 -24
  19. package/dist/{check-phase-gate-2OFZ7OWW.js → check-phase-gate-L3RADYWO.js} +4 -4
  20. package/dist/{chunk-QY4T6YAZ.js → chunk-3C2MLBPJ.js} +4 -4
  21. package/dist/{chunk-UAX4I5ZE.js → chunk-6KTUUFRN.js} +2 -2
  22. package/dist/{chunk-ND6PNADU.js → chunk-7IP4JIFL.js} +9 -9
  23. package/dist/{chunk-C2ERUR3L.js → chunk-7MJAPE3Z.js} +165 -49
  24. package/dist/{chunk-PQ5YK4AY.js → chunk-ABQHQ6I5.js} +1583 -1169
  25. package/dist/{chunk-QPEH2QPG.js → chunk-DBSOCI3G.js} +53 -54
  26. package/dist/{chunk-MHBMTPW7.js → chunk-ERS5EVUZ.js} +9 -0
  27. package/dist/{chunk-JSTQ3AWB.js → chunk-FIAPHX37.js} +1 -1
  28. package/dist/{chunk-IMFVFNJE.js → chunk-FTMXDOR6.js} +1 -1
  29. package/dist/{chunk-72GHBOL2.js → chunk-GZKSBLQL.js} +1 -1
  30. package/dist/{chunk-K6XAPGML.js → chunk-H7Y5CKTM.js} +1 -1
  31. package/dist/{chunk-4ZMOCPYO.js → chunk-NLVUVUGD.js} +1 -1
  32. package/dist/{chunk-Z77YQRQT.js → chunk-O5OJVPL6.js} +16 -5
  33. package/dist/{chunk-NKDM3FMH.js → chunk-OD3S2NHN.js} +1 -1
  34. package/dist/{chunk-65FRIL4D.js → chunk-OSXBPAMK.js} +1 -1
  35. package/dist/{chunk-DZS7CJKL.js → chunk-OXLLOSSR.js} +45 -47
  36. package/dist/{chunk-TS3XWPW5.js → chunk-RCWZBSK5.js} +1 -1
  37. package/dist/{chunk-NOPU4RZ4.js → chunk-S2FXOWOR.js} +3 -3
  38. package/dist/{chunk-VUCPTQ6G.js → chunk-SD3SQOZ2.js} +1 -1
  39. package/dist/{chunk-IM32EEDM.js → chunk-TPOTOBR7.js} +9 -9
  40. package/dist/{chunk-SSKDAOX5.js → chunk-XKECDXJS.js} +436 -340
  41. package/dist/{chunk-TKJZKICB.js → chunk-YPYGXRDR.js} +7 -7
  42. package/dist/{chunk-Q6AB7W5Z.js → chunk-YQ6KC6TE.js} +1 -1
  43. package/dist/{chunk-NERR4TAO.js → chunk-YZD2MRNQ.js} +972 -747
  44. package/dist/ci-workflow-EQZFVX3P.js +8 -0
  45. package/dist/{dist-HXHWB7SV.js → dist-B26DFXMP.js} +571 -478
  46. package/dist/{dist-L7LAAQAS.js → dist-DZ63LLUD.js} +1 -1
  47. package/dist/{dist-2B363XUH.js → dist-HWXF2C3R.js} +18 -2
  48. package/dist/{dist-D4RYGUZE.js → dist-USY2C5JL.js} +3 -1
  49. package/dist/{docs-FZOPM4GK.js → docs-7ECGYMAV.js} +4 -4
  50. package/dist/engine-EG4EH4IX.js +8 -0
  51. package/dist/{entropy-LVHJMFGH.js → entropy-5USWKLVS.js} +3 -3
  52. package/dist/{feedback-IHLVLMRD.js → feedback-UTBXZZHF.js} +1 -1
  53. package/dist/{generate-agent-definitions-64S3CLEZ.js → generate-agent-definitions-3PM5EU7V.js} +4 -4
  54. package/dist/{graph-loader-GJZ4FN4Y.js → graph-loader-2M2HXDQI.js} +1 -1
  55. package/dist/index.d.ts +148 -9
  56. package/dist/index.js +24 -24
  57. package/dist/loader-ZPALXIVR.js +10 -0
  58. package/dist/{mcp-JQUI7BVZ.js → mcp-362EZHF4.js} +14 -14
  59. package/dist/{performance-ZTVSUANN.js → performance-OQAFMJUD.js} +3 -3
  60. package/dist/{review-pipeline-76JHKGSV.js → review-pipeline-C4GCFVGP.js} +1 -1
  61. package/dist/runtime-7YLVK453.js +9 -0
  62. package/dist/{security-FWQZF2IZ.js → security-PZOX7AQS.js} +1 -1
  63. package/dist/templates/axum/Cargo.toml.hbs +8 -0
  64. package/dist/templates/axum/src/main.rs +12 -0
  65. package/dist/templates/axum/template.json +16 -0
  66. package/dist/templates/django/manage.py.hbs +19 -0
  67. package/dist/templates/django/requirements.txt.hbs +1 -0
  68. package/dist/templates/django/src/settings.py.hbs +44 -0
  69. package/dist/templates/django/src/urls.py +6 -0
  70. package/dist/templates/django/src/wsgi.py.hbs +9 -0
  71. package/dist/templates/django/template.json +21 -0
  72. package/dist/templates/express/package.json.hbs +15 -0
  73. package/dist/templates/express/src/app.ts +12 -0
  74. package/dist/templates/express/src/lib/.gitkeep +0 -0
  75. package/dist/templates/express/template.json +16 -0
  76. package/dist/templates/fastapi/requirements.txt.hbs +2 -0
  77. package/dist/templates/fastapi/src/main.py +8 -0
  78. package/dist/templates/fastapi/template.json +20 -0
  79. package/dist/templates/gin/go.mod.hbs +5 -0
  80. package/dist/templates/gin/main.go +15 -0
  81. package/dist/templates/gin/template.json +19 -0
  82. package/dist/templates/go-base/.golangci.yml +16 -0
  83. package/dist/templates/go-base/AGENTS.md.hbs +35 -0
  84. package/dist/templates/go-base/go.mod.hbs +3 -0
  85. package/dist/templates/go-base/harness.config.json.hbs +17 -0
  86. package/dist/templates/go-base/main.go +7 -0
  87. package/dist/templates/go-base/template.json +14 -0
  88. package/dist/templates/java-base/AGENTS.md.hbs +35 -0
  89. package/dist/templates/java-base/checkstyle.xml +20 -0
  90. package/dist/templates/java-base/harness.config.json.hbs +16 -0
  91. package/dist/templates/java-base/pom.xml.hbs +39 -0
  92. package/dist/templates/java-base/src/main/java/App.java.hbs +5 -0
  93. package/dist/templates/java-base/template.json +13 -0
  94. package/dist/templates/nestjs/nest-cli.json +5 -0
  95. package/dist/templates/nestjs/package.json.hbs +18 -0
  96. package/dist/templates/nestjs/src/app.module.ts +8 -0
  97. package/dist/templates/nestjs/src/lib/.gitkeep +0 -0
  98. package/dist/templates/nestjs/src/main.ts +11 -0
  99. package/dist/templates/nestjs/template.json +16 -0
  100. package/dist/templates/nextjs/template.json +15 -1
  101. package/dist/templates/python-base/.python-version +1 -0
  102. package/dist/templates/python-base/AGENTS.md.hbs +32 -0
  103. package/dist/templates/python-base/harness.config.json.hbs +16 -0
  104. package/dist/templates/python-base/pyproject.toml.hbs +18 -0
  105. package/dist/templates/python-base/ruff.toml +5 -0
  106. package/dist/templates/python-base/src/__init__.py +0 -0
  107. package/dist/templates/python-base/template.json +13 -0
  108. package/dist/templates/react-vite/index.html +12 -0
  109. package/dist/templates/react-vite/package.json.hbs +18 -0
  110. package/dist/templates/react-vite/src/App.tsx +7 -0
  111. package/dist/templates/react-vite/src/lib/.gitkeep +0 -0
  112. package/dist/templates/react-vite/src/main.tsx +9 -0
  113. package/dist/templates/react-vite/template.json +19 -0
  114. package/dist/templates/react-vite/vite.config.ts +6 -0
  115. package/dist/templates/rust-base/AGENTS.md.hbs +35 -0
  116. package/dist/templates/rust-base/Cargo.toml.hbs +6 -0
  117. package/dist/templates/rust-base/clippy.toml +2 -0
  118. package/dist/templates/rust-base/harness.config.json.hbs +17 -0
  119. package/dist/templates/rust-base/src/main.rs +3 -0
  120. package/dist/templates/rust-base/template.json +14 -0
  121. package/dist/templates/spring-boot/pom.xml.hbs +50 -0
  122. package/dist/templates/spring-boot/src/main/java/Application.java.hbs +19 -0
  123. package/dist/templates/spring-boot/template.json +15 -0
  124. package/dist/templates/vue/index.html +12 -0
  125. package/dist/templates/vue/package.json.hbs +16 -0
  126. package/dist/templates/vue/src/App.vue +7 -0
  127. package/dist/templates/vue/src/lib/.gitkeep +0 -0
  128. package/dist/templates/vue/src/main.ts +4 -0
  129. package/dist/templates/vue/template.json +19 -0
  130. package/dist/templates/vue/vite.config.ts +6 -0
  131. package/dist/{validate-GCHZJIL7.js → validate-FD3Z6VJD.js} +4 -4
  132. package/dist/validate-cross-check-WNJM6H2D.js +8 -0
  133. package/package.json +5 -5
  134. package/dist/agents-md-XU3BHE22.js +0 -8
  135. package/dist/ci-workflow-EHV65NQB.js +0 -8
  136. package/dist/engine-OL4T6NZS.js +0 -8
  137. package/dist/loader-DPYFB6R6.js +0 -10
  138. package/dist/runtime-X7U6SC7K.js +0 -9
  139. package/dist/validate-cross-check-STFHYMAZ.js +0 -8
@@ -264,6 +264,49 @@ async function validate(options) {
264
264
  }
265
265
  return { success: true, ruleCount: parseResult.data.rules.length };
266
266
  }
267
+ function resolveOutputDir(options, configOutput) {
268
+ const configDir = path3.dirname(path3.resolve(options.configPath));
269
+ return options.outputDir ? path3.resolve(options.outputDir) : path3.resolve(configDir, configOutput);
270
+ }
271
+ async function prepareOutputDir(outputDir, clean) {
272
+ if (clean) {
273
+ try {
274
+ await fs3.rm(outputDir, { recursive: true, force: true });
275
+ } catch {
276
+ }
277
+ }
278
+ await fs3.mkdir(outputDir, { recursive: true });
279
+ }
280
+ async function processRule(rule, templates, configDir, outputDir, configPath, dryRun, errors) {
281
+ const templateResult = await loadTemplate(rule.type, templates, configDir);
282
+ if (!templateResult.success) {
283
+ errors.push({ type: "template", error: templateResult.error, ruleName: rule.name });
284
+ return null;
285
+ }
286
+ const ruleResult = generateRule(rule, templateResult.source, outputDir, configPath);
287
+ if (!ruleResult.success) {
288
+ errors.push({ type: "render", error: ruleResult.error, ruleName: ruleResult.ruleName });
289
+ return null;
290
+ }
291
+ if (!dryRun) {
292
+ try {
293
+ await fs3.writeFile(ruleResult.rule.outputPath, ruleResult.rule.content, "utf-8");
294
+ } catch (err) {
295
+ errors.push({ type: "write", error: err, path: ruleResult.rule.outputPath });
296
+ return null;
297
+ }
298
+ }
299
+ return rule.name;
300
+ }
301
+ async function writeIndexFile(outputDir, generatedRules, errors) {
302
+ const indexContent = generateIndex(generatedRules);
303
+ const indexPath = path3.join(outputDir, "index.ts");
304
+ try {
305
+ await fs3.writeFile(indexPath, indexContent, "utf-8");
306
+ } catch (err) {
307
+ errors.push({ type: "write", error: err, path: indexPath });
308
+ }
309
+ }
267
310
  async function generate(options) {
268
311
  const errors = [];
269
312
  const parseResult = await parseConfig(options.configPath);
@@ -271,69 +314,25 @@ async function generate(options) {
271
314
  return { success: false, errors: [{ type: "parse", error: parseResult.error }] };
272
315
  }
273
316
  const config = parseResult.data;
317
+ const outputDir = resolveOutputDir(options, config.output);
318
+ const dryRun = options.dryRun ?? false;
274
319
  const configDir = path3.dirname(path3.resolve(options.configPath));
275
- const outputDir = options.outputDir ? path3.resolve(options.outputDir) : path3.resolve(configDir, config.output);
276
- if (options.clean && !options.dryRun) {
277
- try {
278
- await fs3.rm(outputDir, { recursive: true, force: true });
279
- } catch {
280
- }
281
- }
282
- if (!options.dryRun) {
283
- await fs3.mkdir(outputDir, { recursive: true });
320
+ if (!dryRun) {
321
+ await prepareOutputDir(outputDir, options.clean ?? false);
284
322
  }
285
323
  const generatedRules = [];
286
324
  for (const rule of config.rules) {
287
- const templateResult = await loadTemplate(rule.type, config.templates, configDir);
288
- if (!templateResult.success) {
289
- errors.push({
290
- type: "template",
291
- error: templateResult.error,
292
- ruleName: rule.name
293
- });
294
- continue;
295
- }
296
- const ruleResult = generateRule(rule, templateResult.source, outputDir, options.configPath);
297
- if (!ruleResult.success) {
298
- errors.push({
299
- type: "render",
300
- error: ruleResult.error,
301
- ruleName: ruleResult.ruleName
302
- });
303
- continue;
304
- }
305
- if (!options.dryRun) {
306
- try {
307
- await fs3.writeFile(ruleResult.rule.outputPath, ruleResult.rule.content, "utf-8");
308
- } catch (err) {
309
- errors.push({
310
- type: "write",
311
- error: err,
312
- path: ruleResult.rule.outputPath
313
- });
314
- continue;
315
- }
316
- }
317
- generatedRules.push(rule.name);
325
+ const name = await processRule(rule, config.templates, configDir, outputDir, options.configPath, dryRun, errors);
326
+ if (name)
327
+ generatedRules.push(name);
318
328
  }
319
- if (generatedRules.length > 0 && !options.dryRun) {
320
- const indexContent = generateIndex(generatedRules);
321
- const indexPath = path3.join(outputDir, "index.ts");
322
- try {
323
- await fs3.writeFile(indexPath, indexContent, "utf-8");
324
- } catch (err) {
325
- errors.push({ type: "write", error: err, path: indexPath });
326
- }
329
+ if (generatedRules.length > 0 && !dryRun) {
330
+ await writeIndexFile(outputDir, generatedRules, errors);
327
331
  }
328
332
  if (errors.length > 0) {
329
333
  return { success: false, errors };
330
334
  }
331
- return {
332
- success: true,
333
- rulesGenerated: generatedRules,
334
- outputDir,
335
- dryRun: options.dryRun ?? false
336
- };
335
+ return { success: true, rulesGenerated: generatedRules, outputDir, dryRun };
337
336
  }
338
337
 
339
338
  export {
@@ -1,4 +1,12 @@
1
1
  // ../types/dist/index.mjs
2
+ var SESSION_SECTION_NAMES = [
3
+ "terminology",
4
+ "decisions",
5
+ "constraints",
6
+ "risks",
7
+ "openQuestions",
8
+ "evidence"
9
+ ];
2
10
  function Ok(value) {
3
11
  return { ok: true, value };
4
12
  }
@@ -21,6 +29,7 @@ var STANDARD_COGNITIVE_MODES = [
21
29
  ];
22
30
 
23
31
  export {
32
+ SESSION_SECTION_NAMES,
24
33
  Ok,
25
34
  Err,
26
35
  isOk,
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  Err,
6
6
  Ok
7
- } from "./chunk-MHBMTPW7.js";
7
+ } from "./chunk-ERS5EVUZ.js";
8
8
 
9
9
  // src/persona/generators/runtime.ts
10
10
  function generateRuntime(persona) {
@@ -15,7 +15,7 @@ function evictIfNeeded() {
15
15
  }
16
16
  }
17
17
  async function doLoadGraphStore(projectRoot) {
18
- const { GraphStore } = await import("./dist-HXHWB7SV.js");
18
+ const { GraphStore } = await import("./dist-B26DFXMP.js");
19
19
  const graphDir = path.join(projectRoot, ".harness", "graph");
20
20
  const store = new GraphStore();
21
21
  const loaded = await store.load(graphDir);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Ok
3
- } from "./chunk-MHBMTPW7.js";
3
+ } from "./chunk-ERS5EVUZ.js";
4
4
 
5
5
  // src/commands/validate-cross-check.ts
6
6
  import * as fs from "fs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Err,
3
3
  Ok
4
- } from "./chunk-MHBMTPW7.js";
4
+ } from "./chunk-ERS5EVUZ.js";
5
5
 
6
6
  // src/mcp/utils/config-resolver.ts
7
7
  import * as fs from "fs";
@@ -45,7 +45,7 @@ var runCodeReviewDefinition = {
45
45
  };
46
46
  async function handleRunCodeReview(input) {
47
47
  try {
48
- const { parseDiff, runReviewPipeline } = await import("./dist-2B363XUH.js");
48
+ const { parseDiff, runReviewPipeline } = await import("./dist-HWXF2C3R.js");
49
49
  const parseResult = parseDiff(input.diff);
50
50
  if (!parseResult.ok) {
51
51
  return {
@@ -4,11 +4,11 @@ import {
4
4
  } from "./chunk-3WGJMBKH.js";
5
5
  import {
6
6
  ArchConfigSchema
7
- } from "./chunk-PQ5YK4AY.js";
7
+ } from "./chunk-ABQHQ6I5.js";
8
8
  import {
9
9
  Err,
10
10
  Ok
11
- } from "./chunk-MHBMTPW7.js";
11
+ } from "./chunk-ERS5EVUZ.js";
12
12
 
13
13
  // src/config/loader.ts
14
14
  import * as fs from "fs";
@@ -184,12 +184,23 @@ var HarnessConfigSchema = z.object({
184
184
  performance: PerformanceConfigSchema.optional(),
185
185
  /** Project template settings (used by 'harness init') */
186
186
  template: z.object({
187
- /** Complexity level of the template */
188
- level: z.enum(["basic", "intermediate", "advanced"]),
187
+ /** Complexity level of the template (JS/TS only) */
188
+ level: z.enum(["basic", "intermediate", "advanced"]).optional(),
189
+ /** Target language */
190
+ language: z.enum(["typescript", "python", "go", "rust", "java"]).optional(),
189
191
  /** Primary technology framework */
190
192
  framework: z.string().optional(),
191
193
  /** Template version */
192
- version: z.number()
194
+ version: z.number(),
195
+ /** Language-specific tooling configuration */
196
+ tooling: z.object({
197
+ packageManager: z.string().optional(),
198
+ linter: z.string().optional(),
199
+ formatter: z.string().optional(),
200
+ buildTool: z.string().optional(),
201
+ testRunner: z.string().optional(),
202
+ lockFile: z.string().optional()
203
+ }).optional()
193
204
  }).optional(),
194
205
  /** Phase gate and readiness check configuration */
195
206
  phaseGates: PhaseGatesConfigSchema.optional(),
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Err,
3
3
  Ok
4
- } from "./chunk-MHBMTPW7.js";
4
+ } from "./chunk-ERS5EVUZ.js";
5
5
 
6
6
  // src/persona/generators/agents-md.ts
7
7
  function formatTrigger(trigger) {
@@ -26,7 +26,7 @@ var runSecurityScanDefinition = {
26
26
  };
27
27
  async function handleRunSecurityScan(input) {
28
28
  try {
29
- const core = await import("./dist-2B363XUH.js");
29
+ const core = await import("./dist-HWXF2C3R.js");
30
30
  const projectRoot = sanitizePath(input.path);
31
31
  let configData = {};
32
32
  try {
@@ -6,14 +6,14 @@ import {
6
6
  } from "./chunk-W6Y7ZW3Y.js";
7
7
  import {
8
8
  Ok
9
- } from "./chunk-MHBMTPW7.js";
9
+ } from "./chunk-ERS5EVUZ.js";
10
10
 
11
11
  // src/mcp/tools/entropy.ts
12
12
  async function loadEntropyGraphOptions(projectPath) {
13
- const { loadGraphStore } = await import("./graph-loader-GJZ4FN4Y.js");
13
+ const { loadGraphStore } = await import("./graph-loader-2M2HXDQI.js");
14
14
  const store = await loadGraphStore(projectPath);
15
15
  if (!store) return void 0;
16
- const { GraphEntropyAdapter } = await import("./dist-HXHWB7SV.js");
16
+ const { GraphEntropyAdapter } = await import("./dist-B26DFXMP.js");
17
17
  const adapter = new GraphEntropyAdapter(store);
18
18
  const driftData = adapter.computeDriftData();
19
19
  const deadCodeData = adapter.computeDeadCodeData();
@@ -82,9 +82,48 @@ var detectEntropyDefinition = {
82
82
  required: ["path"]
83
83
  }
84
84
  };
85
+ function summarizeDrift(drift) {
86
+ const driftIssues = (drift.drifts ?? []).map(
87
+ (d) => `Drift: ${d.type}${d.file ? ` in ${d.file}` : ""}`
88
+ );
89
+ return { issueCount: driftIssues.length, topIssues: driftIssues.slice(0, 3) };
90
+ }
91
+ function summarizeDeadCode(deadCode) {
92
+ const deadIssues = [
93
+ ...(deadCode.unusedImports ?? []).map(
94
+ (i) => `Unused import: ${i.specifiers.join(", ")} from ${i.source}`
95
+ ),
96
+ ...(deadCode.deadExports ?? []).map(
97
+ (e) => `Dead export: ${e.name} in ${e.file}`
98
+ ),
99
+ ...(deadCode.deadFiles ?? []).map((f) => `Dead file: ${f.path}`)
100
+ ];
101
+ return { issueCount: deadIssues.length, topIssues: deadIssues.slice(0, 3) };
102
+ }
103
+ function summarizePatterns(patterns) {
104
+ const patternIssues = (patterns.violations ?? []).map(
105
+ (v) => `${v.pattern}: ${v.file}`
106
+ );
107
+ return { issueCount: patternIssues.length, topIssues: patternIssues.slice(0, 3) };
108
+ }
109
+ function buildSummaryResponse(report) {
110
+ const summary = {};
111
+ if (report.drift) summary["drift"] = summarizeDrift(report.drift);
112
+ if (report.deadCode) summary["deadCode"] = summarizeDeadCode(report.deadCode);
113
+ if (report.patterns) summary["patterns"] = summarizePatterns(report.patterns);
114
+ const totalIssues = Object.values(summary).reduce((s, c) => s + c.issueCount, 0);
115
+ return {
116
+ content: [
117
+ {
118
+ type: "text",
119
+ text: JSON.stringify({ mode: "summary", totalIssues, categories: summary })
120
+ }
121
+ ]
122
+ };
123
+ }
85
124
  async function handleDetectEntropy(input) {
86
125
  try {
87
- const { EntropyAnalyzer } = await import("./dist-2B363XUH.js");
126
+ const { EntropyAnalyzer } = await import("./dist-HWXF2C3R.js");
88
127
  const typeFilter = input.type ?? "all";
89
128
  const analyzer = new EntropyAnalyzer({
90
129
  rootDir: sanitizePath(input.path),
@@ -97,54 +136,13 @@ async function handleDetectEntropy(input) {
97
136
  const graphOptions = await loadEntropyGraphOptions(sanitizePath(input.path));
98
137
  const result = await analyzer.analyze(graphOptions);
99
138
  if (input.mode === "summary" && result.ok && !input.autoFix) {
100
- const report2 = result.value;
101
- const summary = {};
102
- if (report2.drift) {
103
- const driftIssues = (report2.drift.drifts ?? []).map(
104
- (d) => `Drift: ${d.type}${d.file ? ` in ${d.file}` : ""}`
105
- );
106
- summary["drift"] = {
107
- issueCount: driftIssues.length,
108
- topIssues: driftIssues.slice(0, 3)
109
- };
110
- }
111
- if (report2.deadCode) {
112
- const deadIssues = [
113
- ...(report2.deadCode.unusedImports ?? []).map(
114
- (i) => `Unused import: ${i.specifiers.join(", ")} from ${i.source}`
115
- ),
116
- ...(report2.deadCode.deadExports ?? []).map((e) => `Dead export: ${e.name} in ${e.file}`),
117
- ...(report2.deadCode.deadFiles ?? []).map((f) => `Dead file: ${f.path}`)
118
- ];
119
- summary["deadCode"] = {
120
- issueCount: deadIssues.length,
121
- topIssues: deadIssues.slice(0, 3)
122
- };
123
- }
124
- if (report2.patterns) {
125
- const patternIssues = (report2.patterns.violations ?? []).map(
126
- (v) => `${v.pattern}: ${v.file}`
127
- );
128
- summary["patterns"] = {
129
- issueCount: patternIssues.length,
130
- topIssues: patternIssues.slice(0, 3)
131
- };
132
- }
133
- const totalIssues = Object.values(summary).reduce((s, c) => s + c.issueCount, 0);
134
- return {
135
- content: [
136
- {
137
- type: "text",
138
- text: JSON.stringify({ mode: "summary", totalIssues, categories: summary })
139
- }
140
- ]
141
- };
139
+ return buildSummaryResponse(result.value);
142
140
  }
143
141
  if (!input.autoFix) {
144
142
  return resultToMcpResponse(result);
145
143
  }
146
144
  if (!result.ok) return resultToMcpResponse(result);
147
- const { createFixes, applyFixes, generateSuggestions } = await import("./dist-2B363XUH.js");
145
+ const { createFixes, applyFixes, generateSuggestions } = await import("./dist-HWXF2C3R.js");
148
146
  const report = result.value;
149
147
  const deadCode = report.deadCode;
150
148
  const fixTypesConfig = input.fixTypes ? { fixTypes: input.fixTypes } : void 0;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  listPersonas,
3
3
  loadPersona
4
- } from "./chunk-Q6AB7W5Z.js";
4
+ } from "./chunk-YQ6KC6TE.js";
5
5
  import {
6
6
  toKebabCase
7
7
  } from "./chunk-KET4QQZB.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveProjectConfig
3
- } from "./chunk-K6XAPGML.js";
3
+ } from "./chunk-H7Y5CKTM.js";
4
4
  import {
5
5
  sanitizePath
6
6
  } from "./chunk-W6Y7ZW3Y.js";
@@ -49,7 +49,7 @@ async function handleValidateProject(input) {
49
49
  checks.config = "pass";
50
50
  const config = configResult.value;
51
51
  try {
52
- const core = await import("./dist-2B363XUH.js");
52
+ const core = await import("./dist-HWXF2C3R.js");
53
53
  if (typeof core.validateFileStructure === "function" && Array.isArray(config.conventions)) {
54
54
  const conventions = config.conventions;
55
55
  const structureResult = await core.validateFileStructure(projectPath, conventions);
@@ -68,7 +68,7 @@ async function handleValidateProject(input) {
68
68
  } catch {
69
69
  }
70
70
  try {
71
- const core = await import("./dist-2B363XUH.js");
71
+ const core = await import("./dist-HWXF2C3R.js");
72
72
  if (typeof core.validateAgentsMap === "function") {
73
73
  const agentsMapPath = path.join(projectPath, "AGENTS.md");
74
74
  const agentsResult = await core.validateAgentsMap(agentsMapPath);
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Err,
3
3
  Ok
4
- } from "./chunk-MHBMTPW7.js";
4
+ } from "./chunk-ERS5EVUZ.js";
5
5
 
6
6
  // src/persona/generators/ci-workflow.ts
7
7
  import YAML from "yaml";
@@ -33,7 +33,7 @@ var createSelfReviewDefinition = {
33
33
  };
34
34
  async function handleCreateSelfReview(input) {
35
35
  try {
36
- const { parseDiff, createSelfReview } = await import("./dist-2B363XUH.js");
36
+ const { parseDiff, createSelfReview } = await import("./dist-HWXF2C3R.js");
37
37
  const parseResult = parseDiff(input.diff);
38
38
  if (!parseResult.ok) {
39
39
  return resultToMcpResponse(parseResult);
@@ -53,11 +53,11 @@ async function handleCreateSelfReview(input) {
53
53
  ...input.maxFileCount !== void 0 ? { maxChangedFiles: input.maxFileCount } : {}
54
54
  }
55
55
  };
56
- const { loadGraphStore } = await import("./graph-loader-GJZ4FN4Y.js");
56
+ const { loadGraphStore } = await import("./graph-loader-2M2HXDQI.js");
57
57
  const store = await loadGraphStore(projectPath);
58
58
  let graphData;
59
59
  if (store) {
60
- const { GraphFeedbackAdapter } = await import("./dist-HXHWB7SV.js");
60
+ const { GraphFeedbackAdapter } = await import("./dist-B26DFXMP.js");
61
61
  const adapter = new GraphFeedbackAdapter(store);
62
62
  const changedFiles = parseResult.value.files.map((f) => f.path);
63
63
  const impact = adapter.computeImpactData(changedFiles);
@@ -119,7 +119,7 @@ var analyzeDiffDefinition = {
119
119
  };
120
120
  async function handleAnalyzeDiff(input) {
121
121
  try {
122
- const { parseDiff, analyzeDiff } = await import("./dist-2B363XUH.js");
122
+ const { parseDiff, analyzeDiff } = await import("./dist-HWXF2C3R.js");
123
123
  const parseResult = parseDiff(input.diff);
124
124
  if (!parseResult.ok) {
125
125
  return resultToMcpResponse(parseResult);
@@ -139,10 +139,10 @@ async function handleAnalyzeDiff(input) {
139
139
  let graphImpactData;
140
140
  if (input.path) {
141
141
  try {
142
- const { loadGraphStore } = await import("./graph-loader-GJZ4FN4Y.js");
142
+ const { loadGraphStore } = await import("./graph-loader-2M2HXDQI.js");
143
143
  const store = await loadGraphStore(sanitizePath(input.path));
144
144
  if (store) {
145
- const { GraphFeedbackAdapter } = await import("./dist-HXHWB7SV.js");
145
+ const { GraphFeedbackAdapter } = await import("./dist-B26DFXMP.js");
146
146
  const adapter = new GraphFeedbackAdapter(store);
147
147
  const changedFiles = parseResult.value.files.map((f) => f.path);
148
148
  const impact = adapter.computeImpactData(changedFiles);
@@ -195,7 +195,7 @@ var requestPeerReviewDefinition = {
195
195
  };
196
196
  async function handleRequestPeerReview(input) {
197
197
  try {
198
- const { parseDiff, requestPeerReview } = await import("./dist-2B363XUH.js");
198
+ const { parseDiff, requestPeerReview } = await import("./dist-HWXF2C3R.js");
199
199
  const parseResult = parseDiff(input.diff);
200
200
  if (!parseResult.ok) {
201
201
  return resultToMcpResponse(parseResult);
@@ -206,10 +206,10 @@ async function handleRequestPeerReview(input) {
206
206
  ...input.context ? { metadata: { context: input.context } } : {}
207
207
  };
208
208
  try {
209
- const { loadGraphStore } = await import("./graph-loader-GJZ4FN4Y.js");
209
+ const { loadGraphStore } = await import("./graph-loader-2M2HXDQI.js");
210
210
  const store = await loadGraphStore(sanitizePath(input.path));
211
211
  if (store) {
212
- const { GraphFeedbackAdapter } = await import("./dist-HXHWB7SV.js");
212
+ const { GraphFeedbackAdapter } = await import("./dist-B26DFXMP.js");
213
213
  const adapter = new GraphFeedbackAdapter(store);
214
214
  const changedFiles = parseResult.value.files.map((f) => f.path);
215
215
  const impactData = adapter.computeImpactData(changedFiles);