@harness-engineering/cli 1.20.1 → 1.22.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 (159) hide show
  1. package/dist/agents/skills/claude-code/cleanup-dead-code/skill.yaml +3 -0
  2. package/dist/agents/skills/claude-code/detect-doc-drift/skill.yaml +5 -0
  3. package/dist/agents/skills/claude-code/enforce-architecture/skill.yaml +13 -0
  4. package/dist/agents/skills/claude-code/harness-accessibility/skill.yaml +20 -0
  5. package/dist/agents/skills/claude-code/harness-code-review/skill.yaml +5 -0
  6. package/dist/agents/skills/claude-code/harness-codebase-cleanup/skill.yaml +5 -0
  7. package/dist/agents/skills/claude-code/harness-debugging/skill.yaml +5 -0
  8. package/dist/agents/skills/claude-code/harness-dependency-health/skill.yaml +9 -0
  9. package/dist/agents/skills/claude-code/harness-design/skill.yaml +20 -0
  10. package/dist/agents/skills/claude-code/harness-design-mobile/skill.yaml +20 -0
  11. package/dist/agents/skills/claude-code/harness-design-system/skill.yaml +22 -0
  12. package/dist/agents/skills/claude-code/harness-design-web/skill.yaml +22 -0
  13. package/dist/agents/skills/claude-code/harness-diagnostics/skill.yaml +19 -0
  14. package/dist/agents/skills/claude-code/harness-git-workflow/skill.yaml +15 -0
  15. package/dist/agents/skills/claude-code/harness-hotspot-detector/skill.yaml +9 -0
  16. package/dist/agents/skills/claude-code/harness-i18n/skill.yaml +22 -0
  17. package/dist/agents/skills/claude-code/harness-i18n-process/skill.yaml +15 -0
  18. package/dist/agents/skills/claude-code/harness-i18n-workflow/skill.yaml +19 -0
  19. package/dist/agents/skills/claude-code/harness-integrity/skill.yaml +5 -0
  20. package/dist/agents/skills/claude-code/harness-perf/skill.yaml +3 -0
  21. package/dist/agents/skills/claude-code/harness-perf-tdd/skill.yaml +20 -0
  22. package/dist/agents/skills/claude-code/harness-pre-commit-review/skill.yaml +18 -0
  23. package/dist/agents/skills/claude-code/harness-refactoring/skill.yaml +9 -0
  24. package/dist/agents/skills/claude-code/harness-security-review/skill.yaml +23 -0
  25. package/dist/agents/skills/claude-code/harness-security-scan/skill.yaml +3 -0
  26. package/dist/agents/skills/claude-code/harness-soundness-review/skill.yaml +5 -0
  27. package/dist/agents/skills/claude-code/harness-supply-chain-audit/skill.yaml +3 -0
  28. package/dist/agents/skills/claude-code/harness-tdd/skill.yaml +3 -0
  29. package/dist/agents/skills/codex/cleanup-dead-code/skill.yaml +3 -0
  30. package/dist/agents/skills/codex/detect-doc-drift/skill.yaml +5 -0
  31. package/dist/agents/skills/codex/enforce-architecture/skill.yaml +13 -0
  32. package/dist/agents/skills/codex/harness-accessibility/skill.yaml +20 -0
  33. package/dist/agents/skills/codex/harness-code-review/skill.yaml +5 -0
  34. package/dist/agents/skills/codex/harness-codebase-cleanup/skill.yaml +5 -0
  35. package/dist/agents/skills/codex/harness-debugging/skill.yaml +5 -0
  36. package/dist/agents/skills/codex/harness-dependency-health/skill.yaml +9 -0
  37. package/dist/agents/skills/codex/harness-design/skill.yaml +20 -0
  38. package/dist/agents/skills/codex/harness-design-mobile/skill.yaml +20 -0
  39. package/dist/agents/skills/codex/harness-design-system/skill.yaml +22 -0
  40. package/dist/agents/skills/codex/harness-design-web/skill.yaml +22 -0
  41. package/dist/agents/skills/codex/harness-diagnostics/skill.yaml +19 -0
  42. package/dist/agents/skills/codex/harness-git-workflow/skill.yaml +15 -0
  43. package/dist/agents/skills/codex/harness-hotspot-detector/skill.yaml +9 -0
  44. package/dist/agents/skills/codex/harness-i18n/skill.yaml +22 -0
  45. package/dist/agents/skills/codex/harness-i18n-process/skill.yaml +15 -0
  46. package/dist/agents/skills/codex/harness-i18n-workflow/skill.yaml +19 -0
  47. package/dist/agents/skills/codex/harness-integrity/skill.yaml +5 -0
  48. package/dist/agents/skills/codex/harness-perf/skill.yaml +3 -0
  49. package/dist/agents/skills/codex/harness-perf-tdd/skill.yaml +20 -0
  50. package/dist/agents/skills/codex/harness-pre-commit-review/skill.yaml +18 -0
  51. package/dist/agents/skills/codex/harness-refactoring/skill.yaml +9 -0
  52. package/dist/agents/skills/codex/harness-security-review/skill.yaml +23 -0
  53. package/dist/agents/skills/codex/harness-security-scan/skill.yaml +3 -0
  54. package/dist/agents/skills/codex/harness-soundness-review/skill.yaml +5 -0
  55. package/dist/agents/skills/codex/harness-supply-chain-audit/skill.yaml +3 -0
  56. package/dist/agents/skills/codex/harness-tdd/skill.yaml +3 -0
  57. package/dist/agents/skills/cursor/cleanup-dead-code/skill.yaml +3 -0
  58. package/dist/agents/skills/cursor/detect-doc-drift/skill.yaml +5 -0
  59. package/dist/agents/skills/cursor/enforce-architecture/skill.yaml +13 -0
  60. package/dist/agents/skills/cursor/harness-accessibility/skill.yaml +20 -0
  61. package/dist/agents/skills/cursor/harness-code-review/skill.yaml +5 -0
  62. package/dist/agents/skills/cursor/harness-codebase-cleanup/skill.yaml +5 -0
  63. package/dist/agents/skills/cursor/harness-debugging/skill.yaml +5 -0
  64. package/dist/agents/skills/cursor/harness-dependency-health/skill.yaml +9 -0
  65. package/dist/agents/skills/cursor/harness-design/skill.yaml +20 -0
  66. package/dist/agents/skills/cursor/harness-design-mobile/skill.yaml +20 -0
  67. package/dist/agents/skills/cursor/harness-design-system/skill.yaml +22 -0
  68. package/dist/agents/skills/cursor/harness-design-web/skill.yaml +22 -0
  69. package/dist/agents/skills/cursor/harness-diagnostics/skill.yaml +19 -0
  70. package/dist/agents/skills/cursor/harness-git-workflow/skill.yaml +15 -0
  71. package/dist/agents/skills/cursor/harness-hotspot-detector/skill.yaml +9 -0
  72. package/dist/agents/skills/cursor/harness-i18n/skill.yaml +22 -0
  73. package/dist/agents/skills/cursor/harness-i18n-process/skill.yaml +15 -0
  74. package/dist/agents/skills/cursor/harness-i18n-workflow/skill.yaml +19 -0
  75. package/dist/agents/skills/cursor/harness-integrity/skill.yaml +5 -0
  76. package/dist/agents/skills/cursor/harness-perf/skill.yaml +3 -0
  77. package/dist/agents/skills/cursor/harness-perf-tdd/skill.yaml +20 -0
  78. package/dist/agents/skills/cursor/harness-pre-commit-review/skill.yaml +18 -0
  79. package/dist/agents/skills/cursor/harness-refactoring/skill.yaml +9 -0
  80. package/dist/agents/skills/cursor/harness-security-review/skill.yaml +23 -0
  81. package/dist/agents/skills/cursor/harness-security-scan/skill.yaml +3 -0
  82. package/dist/agents/skills/cursor/harness-soundness-review/skill.yaml +5 -0
  83. package/dist/agents/skills/cursor/harness-supply-chain-audit/skill.yaml +3 -0
  84. package/dist/agents/skills/cursor/harness-tdd/skill.yaml +3 -0
  85. package/dist/agents/skills/gemini-cli/cleanup-dead-code/skill.yaml +3 -0
  86. package/dist/agents/skills/gemini-cli/detect-doc-drift/skill.yaml +5 -0
  87. package/dist/agents/skills/gemini-cli/enforce-architecture/skill.yaml +13 -0
  88. package/dist/agents/skills/gemini-cli/harness-accessibility/skill.yaml +20 -0
  89. package/dist/agents/skills/gemini-cli/harness-code-review/skill.yaml +5 -0
  90. package/dist/agents/skills/gemini-cli/harness-codebase-cleanup/skill.yaml +5 -0
  91. package/dist/agents/skills/gemini-cli/harness-debugging/skill.yaml +5 -0
  92. package/dist/agents/skills/gemini-cli/harness-dependency-health/skill.yaml +9 -0
  93. package/dist/agents/skills/gemini-cli/harness-design/skill.yaml +20 -0
  94. package/dist/agents/skills/gemini-cli/harness-design-mobile/skill.yaml +20 -0
  95. package/dist/agents/skills/gemini-cli/harness-design-system/skill.yaml +22 -0
  96. package/dist/agents/skills/gemini-cli/harness-design-web/skill.yaml +22 -0
  97. package/dist/agents/skills/gemini-cli/harness-diagnostics/skill.yaml +19 -0
  98. package/dist/agents/skills/gemini-cli/harness-git-workflow/skill.yaml +15 -0
  99. package/dist/agents/skills/gemini-cli/harness-hotspot-detector/skill.yaml +9 -0
  100. package/dist/agents/skills/gemini-cli/harness-i18n/skill.yaml +22 -0
  101. package/dist/agents/skills/gemini-cli/harness-i18n-process/skill.yaml +15 -0
  102. package/dist/agents/skills/gemini-cli/harness-i18n-workflow/skill.yaml +19 -0
  103. package/dist/agents/skills/gemini-cli/harness-integrity/skill.yaml +5 -0
  104. package/dist/agents/skills/gemini-cli/harness-perf/skill.yaml +3 -0
  105. package/dist/agents/skills/gemini-cli/harness-perf-tdd/skill.yaml +20 -0
  106. package/dist/agents/skills/gemini-cli/harness-pre-commit-review/skill.yaml +18 -0
  107. package/dist/agents/skills/gemini-cli/harness-refactoring/skill.yaml +9 -0
  108. package/dist/agents/skills/gemini-cli/harness-security-review/skill.yaml +23 -0
  109. package/dist/agents/skills/gemini-cli/harness-security-scan/skill.yaml +3 -0
  110. package/dist/agents/skills/gemini-cli/harness-soundness-review/skill.yaml +5 -0
  111. package/dist/agents/skills/gemini-cli/harness-supply-chain-audit/skill.yaml +3 -0
  112. package/dist/agents/skills/gemini-cli/harness-tdd/skill.yaml +3 -0
  113. package/dist/{agents-md-WHXVPOK2.js → agents-md-PM7LO74M.js} +2 -1
  114. package/dist/{architecture-45YCLD26.js → architecture-OVOCDTI6.js} +3 -2
  115. package/dist/assess-project-R2OZIDDS.js +9 -0
  116. package/dist/bin/harness-mcp.js +15 -13
  117. package/dist/bin/harness.js +21 -19
  118. package/dist/{check-phase-gate-2VXVOUJ5.js → check-phase-gate-7JQ6EW5R.js} +4 -3
  119. package/dist/{chunk-M6TIO6NF.js → chunk-2PAPHA77.js} +1 -1
  120. package/dist/chunk-5FBWWMY2.js +293 -0
  121. package/dist/{chunk-H6KZAGHZ.js → chunk-5QTWFO24.js} +8 -8
  122. package/dist/{chunk-CZZXE6BL.js → chunk-ASS5TD2Y.js} +1 -1
  123. package/dist/{chunk-45ZJPG24.js → chunk-B4WHXHF7.js} +1 -1
  124. package/dist/{chunk-SQY4AAKP.js → chunk-DJEBBENF.js} +1005 -408
  125. package/dist/{chunk-LEWXD6PR.js → chunk-DXYOAQQC.js} +1 -1
  126. package/dist/{chunk-PDEEQJHH.js → chunk-FSLFBLYW.js} +7 -7
  127. package/dist/{chunk-YDOGGQSF.js → chunk-GRJ7A4WT.js} +17 -2
  128. package/dist/{chunk-4U4V7A6U.js → chunk-IK5GSLW6.js} +4 -4
  129. package/dist/{chunk-LVJ7SCD7.js → chunk-J7W4LTRK.js} +2 -2
  130. package/dist/{chunk-PDOSLTWP.js → chunk-PUOMFNRO.js} +26 -3
  131. package/dist/{chunk-HKUX2X7O.js → chunk-SE4YPMLH.js} +9 -1
  132. package/dist/{chunk-HAJD5LTI.js → chunk-SOTTK27D.js} +459 -37
  133. package/dist/{chunk-LRG3B43J.js → chunk-T5QWCVGK.js} +1 -1
  134. package/dist/{dist-U7EAO6T2.js → chunk-TEZI27SA.js} +401 -60
  135. package/dist/{chunk-IC5CZSHF.js → chunk-U44JNY3Y.js} +1549 -593
  136. package/dist/{chunk-A33LHIRD.js → chunk-W6MPLFXU.js} +3 -3
  137. package/dist/{chunk-V73TEHIF.js → chunk-ZEIEUCZL.js} +9 -9
  138. package/dist/{ci-workflow-HWX5OVLI.js → ci-workflow-OTTEERPF.js} +2 -1
  139. package/dist/{create-skill-NDXQSTIK.js → create-skill-U3XCFRZN.js} +2 -2
  140. package/dist/dist-IA6XYKNO.js +92 -0
  141. package/dist/{dist-WHL3NN5S.js → dist-LCR2IO7U.js} +56 -3
  142. package/dist/{docs-FJFY7GF2.js → docs-CHAYSGOP.js} +4 -3
  143. package/dist/{engine-R5BZHIZB.js → engine-4MY2U5RZ.js} +2 -1
  144. package/dist/{entropy-Y2GE4MYS.js → entropy-AKSZG7G5.js} +3 -2
  145. package/dist/{feedback-FKZ7GMPO.js → feedback-QGCSW7SB.js} +1 -1
  146. package/dist/{generate-agent-definitions-LN3A45OL.js → generate-agent-definitions-KU6X2UQN.js} +2 -1
  147. package/dist/{graph-loader-KMHDQYDT.js → graph-loader-FJN4H7Y4.js} +1 -1
  148. package/dist/index.d.ts +58 -2
  149. package/dist/index.js +27 -23
  150. package/dist/{loader-2TBQUFWX.js → loader-AV5XEMER.js} +2 -1
  151. package/dist/{mcp-KEY575NJ.js → mcp-LWHVQRG7.js} +15 -13
  152. package/dist/{performance-BSOMMWK5.js → performance-ETZVXXGQ.js} +4 -3
  153. package/dist/{review-pipeline-KUBHP3RV.js → review-pipeline-3ZS3GJSP.js} +1 -1
  154. package/dist/{runtime-BN7KGJAO.js → runtime-KQTJRK3H.js} +2 -1
  155. package/dist/{security-3T4JGDZP.js → security-LJCLZES6.js} +1 -1
  156. package/dist/{skill-executor-XEVDGXUM.js → skill-executor-2BZQLHYN.js} +2 -2
  157. package/dist/{validate-R5WGB2AV.js → validate-4IA5RPEX.js} +3 -2
  158. package/dist/{validate-cross-check-76Z5P6EX.js → validate-cross-check-VX2BAHQI.js} +2 -1
  159. package/package.json +4 -4
@@ -1,26 +1,28 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  startServer
4
- } from "../chunk-SQY4AAKP.js";
5
- import "../chunk-4U4V7A6U.js";
6
- import "../chunk-PDEEQJHH.js";
7
- import "../chunk-V73TEHIF.js";
8
- import "../chunk-LEWXD6PR.js";
9
- import "../chunk-45ZJPG24.js";
4
+ } from "../chunk-DJEBBENF.js";
5
+ import "../chunk-IK5GSLW6.js";
6
+ import "../chunk-FSLFBLYW.js";
7
+ import "../chunk-ZEIEUCZL.js";
8
+ import "../chunk-DXYOAQQC.js";
9
+ import "../chunk-B4WHXHF7.js";
10
+ import "../chunk-5FBWWMY2.js";
10
11
  import "../chunk-CJDVBBPB.js";
11
- import "../chunk-LVJ7SCD7.js";
12
- import "../chunk-CZZXE6BL.js";
13
- import "../chunk-A33LHIRD.js";
12
+ import "../chunk-J7W4LTRK.js";
13
+ import "../chunk-ASS5TD2Y.js";
14
+ import "../chunk-W6MPLFXU.js";
14
15
  import "../chunk-H7Y5CKTM.js";
15
- import "../chunk-H6KZAGHZ.js";
16
- import "../chunk-YDOGGQSF.js";
16
+ import "../chunk-5QTWFO24.js";
17
+ import "../chunk-GRJ7A4WT.js";
17
18
  import "../chunk-IDZNPTYD.js";
18
19
  import "../chunk-W6Y7ZW3Y.js";
19
20
  import "../chunk-N5G5QMS3.js";
20
21
  import "../chunk-3WGJMBKH.js";
21
- import "../chunk-HKUX2X7O.js";
22
- import "../chunk-IC5CZSHF.js";
22
+ import "../chunk-SE4YPMLH.js";
23
+ import "../chunk-U44JNY3Y.js";
23
24
  import "../chunk-ERS5EVUZ.js";
25
+ import "../chunk-TEZI27SA.js";
24
26
 
25
27
  // src/bin/harness-mcp.ts
26
28
  import "dotenv/config";
@@ -2,56 +2,58 @@
2
2
  import {
3
3
  createProgram,
4
4
  printFirstRunWelcome
5
- } from "../chunk-HAJD5LTI.js";
5
+ } from "../chunk-SOTTK27D.js";
6
+ import "../chunk-OD3S2NHN.js";
6
7
  import "../chunk-SD3SQOZ2.js";
7
- import "../chunk-PDOSLTWP.js";
8
+ import "../chunk-PUOMFNRO.js";
8
9
  import "../chunk-6KWBH4EO.js";
10
+ import "../chunk-YLN34N65.js";
9
11
  import "../chunk-YQ6KC6TE.js";
10
12
  import "../chunk-TRAPF4IX.js";
11
- import "../chunk-M6TIO6NF.js";
13
+ import "../chunk-2PAPHA77.js";
12
14
  import "../chunk-TEFCFC4H.js";
13
- import "../chunk-LRG3B43J.js";
15
+ import "../chunk-T5QWCVGK.js";
14
16
  import "../chunk-EBJQ6N4M.js";
15
17
  import "../chunk-DBSOCI3G.js";
16
18
  import "../chunk-FIAPHX37.js";
17
19
  import "../chunk-KET4QQZB.js";
18
- import "../chunk-OD3S2NHN.js";
19
- import "../chunk-SQY4AAKP.js";
20
- import "../chunk-4U4V7A6U.js";
21
- import "../chunk-PDEEQJHH.js";
22
- import "../chunk-V73TEHIF.js";
23
- import "../chunk-LEWXD6PR.js";
24
- import "../chunk-45ZJPG24.js";
20
+ import "../chunk-DJEBBENF.js";
21
+ import "../chunk-IK5GSLW6.js";
22
+ import "../chunk-FSLFBLYW.js";
23
+ import "../chunk-ZEIEUCZL.js";
24
+ import "../chunk-DXYOAQQC.js";
25
+ import "../chunk-B4WHXHF7.js";
26
+ import "../chunk-5FBWWMY2.js";
25
27
  import "../chunk-CJDVBBPB.js";
26
- import "../chunk-LVJ7SCD7.js";
27
- import "../chunk-CZZXE6BL.js";
28
- import "../chunk-A33LHIRD.js";
28
+ import "../chunk-J7W4LTRK.js";
29
+ import "../chunk-ASS5TD2Y.js";
30
+ import "../chunk-W6MPLFXU.js";
29
31
  import "../chunk-H7Y5CKTM.js";
30
- import "../chunk-H6KZAGHZ.js";
32
+ import "../chunk-5QTWFO24.js";
31
33
  import {
32
34
  findConfigFile,
33
35
  loadConfig
34
- } from "../chunk-YDOGGQSF.js";
36
+ } from "../chunk-GRJ7A4WT.js";
35
37
  import "../chunk-IDZNPTYD.js";
36
38
  import "../chunk-W6Y7ZW3Y.js";
37
39
  import "../chunk-N5G5QMS3.js";
38
40
  import {
39
41
  handleError
40
42
  } from "../chunk-3WGJMBKH.js";
41
- import "../chunk-HKUX2X7O.js";
43
+ import "../chunk-SE4YPMLH.js";
42
44
  import {
43
45
  CLI_VERSION
44
46
  } from "../chunk-BM3PWGXQ.js";
45
47
  import "../chunk-GZKSBLQL.js";
46
- import "../chunk-YLN34N65.js";
47
48
  import {
48
49
  getUpdateNotification,
49
50
  isUpdateCheckEnabled,
50
51
  readCheckState,
51
52
  shouldRunCheck,
52
53
  spawnBackgroundCheck
53
- } from "../chunk-IC5CZSHF.js";
54
+ } from "../chunk-U44JNY3Y.js";
54
55
  import "../chunk-ERS5EVUZ.js";
56
+ import "../chunk-TEZI27SA.js";
55
57
 
56
58
  // src/bin/harness.ts
57
59
  import "dotenv/config";
@@ -1,12 +1,13 @@
1
1
  import {
2
2
  createCheckPhaseGateCommand,
3
3
  runCheckPhaseGate
4
- } from "./chunk-PDOSLTWP.js";
4
+ } from "./chunk-PUOMFNRO.js";
5
5
  import "./chunk-EBJQ6N4M.js";
6
- import "./chunk-YDOGGQSF.js";
6
+ import "./chunk-GRJ7A4WT.js";
7
7
  import "./chunk-3WGJMBKH.js";
8
- import "./chunk-IC5CZSHF.js";
8
+ import "./chunk-U44JNY3Y.js";
9
9
  import "./chunk-ERS5EVUZ.js";
10
+ import "./chunk-TEZI27SA.js";
10
11
  export {
11
12
  createCheckPhaseGateCommand,
12
13
  runCheckPhaseGate
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-N5G5QMS3.js";
4
4
  import {
5
5
  SkillMetadataSchema
6
- } from "./chunk-HKUX2X7O.js";
6
+ } from "./chunk-SE4YPMLH.js";
7
7
 
8
8
  // src/persona/skill-executor.ts
9
9
  import * as fs from "fs";
@@ -0,0 +1,293 @@
1
+ import {
2
+ sanitizePath
3
+ } from "./chunk-W6Y7ZW3Y.js";
4
+
5
+ // src/mcp/tools/assess-project.ts
6
+ var assessProjectDefinition = {
7
+ name: "assess_project",
8
+ description: "Run all project health checks in parallel and return a unified report. Checks: validate, dependencies, docs, entropy, security, performance, lint.",
9
+ inputSchema: {
10
+ type: "object",
11
+ properties: {
12
+ path: { type: "string", description: "Path to project root" },
13
+ checks: {
14
+ type: "array",
15
+ items: {
16
+ type: "string",
17
+ enum: ["validate", "deps", "docs", "entropy", "security", "perf", "lint"]
18
+ },
19
+ description: "Which checks to run (default: all)"
20
+ },
21
+ mode: {
22
+ type: "string",
23
+ enum: ["summary", "detailed"],
24
+ description: "Response density. Default: summary"
25
+ }
26
+ },
27
+ required: ["path"]
28
+ }
29
+ };
30
+ async function handleAssessProject(input) {
31
+ const start = Date.now();
32
+ let projectPath;
33
+ try {
34
+ projectPath = sanitizePath(input.path);
35
+ } catch (error) {
36
+ return {
37
+ content: [
38
+ {
39
+ type: "text",
40
+ text: `Error: ${error instanceof Error ? error.message : String(error)}`
41
+ }
42
+ ],
43
+ isError: true
44
+ };
45
+ }
46
+ const checksToRun = new Set(
47
+ input.checks ?? ["validate", "deps", "docs", "entropy", "security", "perf", "lint"]
48
+ );
49
+ const mode = input.mode ?? "summary";
50
+ let validateResult = null;
51
+ if (checksToRun.has("validate")) {
52
+ try {
53
+ const { handleValidateProject } = await import("./validate-4IA5RPEX.js");
54
+ const result = await handleValidateProject({ path: projectPath });
55
+ const first = result.content[0];
56
+ const parsed = first ? JSON.parse(first.text) : {};
57
+ validateResult = {
58
+ name: "validate",
59
+ passed: parsed.valid === true,
60
+ issueCount: parsed.errors?.length ?? 0,
61
+ ...parsed.errors?.length > 0 ? { topIssue: parsed.errors[0] } : {},
62
+ ...mode === "detailed" ? { detailed: parsed } : {}
63
+ };
64
+ } catch (error) {
65
+ validateResult = {
66
+ name: "validate",
67
+ passed: false,
68
+ issueCount: 1,
69
+ topIssue: error instanceof Error ? error.message : String(error)
70
+ };
71
+ }
72
+ }
73
+ const parallelChecks = [];
74
+ if (checksToRun.has("deps")) {
75
+ parallelChecks.push(
76
+ (async () => {
77
+ try {
78
+ const { handleCheckDependencies } = await import("./architecture-OVOCDTI6.js");
79
+ const result = await handleCheckDependencies({ path: projectPath });
80
+ const first = result.content[0];
81
+ const parsed = first ? JSON.parse(first.text) : {};
82
+ const violations = parsed.violations ?? [];
83
+ return {
84
+ name: "deps",
85
+ passed: !result.isError && violations.length === 0,
86
+ issueCount: violations.length,
87
+ ...violations.length > 0 ? { topIssue: violations[0]?.message ?? String(violations[0]) } : {},
88
+ ...mode === "detailed" ? { detailed: parsed } : {}
89
+ };
90
+ } catch (error) {
91
+ return {
92
+ name: "deps",
93
+ passed: false,
94
+ issueCount: 1,
95
+ topIssue: error instanceof Error ? error.message : String(error)
96
+ };
97
+ }
98
+ })()
99
+ );
100
+ }
101
+ if (checksToRun.has("docs")) {
102
+ parallelChecks.push(
103
+ (async () => {
104
+ try {
105
+ const { handleCheckDocs } = await import("./docs-CHAYSGOP.js");
106
+ const result = await handleCheckDocs({ path: projectPath, scope: "coverage" });
107
+ const first = result.content[0];
108
+ const parsed = first ? JSON.parse(first.text) : {};
109
+ const undocumented = parsed.undocumented ?? parsed.files?.undocumented ?? [];
110
+ return {
111
+ name: "docs",
112
+ passed: !result.isError,
113
+ issueCount: Array.isArray(undocumented) ? undocumented.length : 0,
114
+ ...Array.isArray(undocumented) && undocumented.length > 0 ? { topIssue: `Undocumented: ${undocumented[0]}` } : {},
115
+ ...mode === "detailed" ? { detailed: parsed } : {}
116
+ };
117
+ } catch (error) {
118
+ return {
119
+ name: "docs",
120
+ passed: false,
121
+ issueCount: 1,
122
+ topIssue: error instanceof Error ? error.message : String(error)
123
+ };
124
+ }
125
+ })()
126
+ );
127
+ }
128
+ if (checksToRun.has("entropy")) {
129
+ parallelChecks.push(
130
+ (async () => {
131
+ try {
132
+ const { handleDetectEntropy } = await import("./entropy-AKSZG7G5.js");
133
+ const result = await handleDetectEntropy({ path: projectPath, type: "all" });
134
+ const first = result.content[0];
135
+ const parsed = first ? JSON.parse(first.text) : {};
136
+ const issues = (parsed.drift?.staleReferences?.length ?? 0) + (parsed.drift?.missingTargets?.length ?? 0) + (parsed.deadCode?.unusedImports?.length ?? 0) + (parsed.deadCode?.unusedExports?.length ?? 0) + (parsed.patterns?.violations?.length ?? 0);
137
+ return {
138
+ name: "entropy",
139
+ passed: !("isError" in result && result.isError) && issues === 0,
140
+ issueCount: issues,
141
+ ...issues > 0 ? { topIssue: "Entropy detected -- run detect_entropy for details" } : {},
142
+ ...mode === "detailed" ? { detailed: parsed } : {}
143
+ };
144
+ } catch (error) {
145
+ return {
146
+ name: "entropy",
147
+ passed: false,
148
+ issueCount: 1,
149
+ topIssue: error instanceof Error ? error.message : String(error)
150
+ };
151
+ }
152
+ })()
153
+ );
154
+ }
155
+ if (checksToRun.has("security")) {
156
+ parallelChecks.push(
157
+ (async () => {
158
+ try {
159
+ const { handleRunSecurityScan } = await import("./security-LJCLZES6.js");
160
+ const result = await handleRunSecurityScan({ path: projectPath });
161
+ const first = result.content[0];
162
+ const parsed = first ? JSON.parse(first.text) : {};
163
+ const findings = parsed.findings ?? [];
164
+ const errorCount = findings.filter(
165
+ (f) => f.severity === "error"
166
+ ).length;
167
+ return {
168
+ name: "security",
169
+ passed: !result.isError && errorCount === 0,
170
+ issueCount: findings.length,
171
+ ...findings.length > 0 ? {
172
+ topIssue: `${findings[0]?.rule ?? findings[0]?.type ?? "finding"}: ${findings[0]?.message ?? ""}`
173
+ } : {},
174
+ ...mode === "detailed" ? { detailed: parsed } : {}
175
+ };
176
+ } catch (error) {
177
+ return {
178
+ name: "security",
179
+ passed: false,
180
+ issueCount: 1,
181
+ topIssue: error instanceof Error ? error.message : String(error)
182
+ };
183
+ }
184
+ })()
185
+ );
186
+ }
187
+ if (checksToRun.has("perf")) {
188
+ parallelChecks.push(
189
+ (async () => {
190
+ try {
191
+ const { handleCheckPerformance } = await import("./performance-ETZVXXGQ.js");
192
+ const result = await handleCheckPerformance({ path: projectPath });
193
+ if ("isError" in result && result.isError) {
194
+ const msg = result.content[0]?.text ?? "Performance check failed";
195
+ return { name: "perf", passed: false, issueCount: 1, topIssue: msg };
196
+ }
197
+ const first = result.content[0];
198
+ let parsed = {};
199
+ try {
200
+ parsed = first ? JSON.parse(first.text) : {};
201
+ } catch {
202
+ return {
203
+ name: "perf",
204
+ passed: false,
205
+ issueCount: 1,
206
+ topIssue: first?.text ?? "Invalid perf output"
207
+ };
208
+ }
209
+ const issues = parsed.violations?.length ?? parsed.issues?.length ?? 0;
210
+ return {
211
+ name: "perf",
212
+ passed: issues === 0,
213
+ issueCount: issues,
214
+ ...issues > 0 ? { topIssue: "Performance issues detected" } : {},
215
+ ...mode === "detailed" ? { detailed: parsed } : {}
216
+ };
217
+ } catch (error) {
218
+ return {
219
+ name: "perf",
220
+ passed: false,
221
+ issueCount: 1,
222
+ topIssue: error instanceof Error ? error.message : String(error)
223
+ };
224
+ }
225
+ })()
226
+ );
227
+ }
228
+ if (checksToRun.has("lint")) {
229
+ parallelChecks.push(
230
+ (async () => {
231
+ try {
232
+ const { execFileSync } = await import("child_process");
233
+ const output = execFileSync("npx", ["turbo", "run", "lint", "--force"], {
234
+ cwd: projectPath,
235
+ encoding: "utf-8",
236
+ timeout: 6e4,
237
+ stdio: ["pipe", "pipe", "pipe"]
238
+ });
239
+ return {
240
+ name: "lint",
241
+ passed: true,
242
+ issueCount: 0,
243
+ ...mode === "detailed" ? { detailed: output } : {}
244
+ };
245
+ } catch (error) {
246
+ const stderr = error && typeof error === "object" && "stderr" in error ? String(error.stderr) : "";
247
+ const stdout = error && typeof error === "object" && "stdout" in error ? String(error.stdout) : "";
248
+ const combined = (stderr + "\n" + stdout).trim();
249
+ const errorMatch = combined.match(/(\d+) error/);
250
+ const issueCount = errorMatch?.[1] ? parseInt(errorMatch[1], 10) : 1;
251
+ const firstError = combined.split("\n").find((line) => line.includes("error"));
252
+ return {
253
+ name: "lint",
254
+ passed: false,
255
+ issueCount,
256
+ topIssue: firstError?.trim() ?? (error instanceof Error ? error.message : String(error)),
257
+ ...mode === "detailed" ? { detailed: combined } : {}
258
+ };
259
+ }
260
+ })()
261
+ );
262
+ }
263
+ const parallelResults = await Promise.all(parallelChecks);
264
+ const allChecks = [];
265
+ if (validateResult) allChecks.push(validateResult);
266
+ allChecks.push(...parallelResults);
267
+ const healthy = allChecks.every((c) => c.passed);
268
+ const assessedIn = Date.now() - start;
269
+ if (mode === "summary") {
270
+ const summaryChecks = allChecks.map(({ detailed: _d, ...rest }) => rest);
271
+ return {
272
+ content: [
273
+ {
274
+ type: "text",
275
+ text: JSON.stringify({ healthy, checks: summaryChecks, assessedIn })
276
+ }
277
+ ]
278
+ };
279
+ }
280
+ return {
281
+ content: [
282
+ {
283
+ type: "text",
284
+ text: JSON.stringify({ healthy, checks: allChecks, assessedIn })
285
+ }
286
+ ]
287
+ };
288
+ }
289
+
290
+ export {
291
+ assessProjectDefinition,
292
+ handleAssessProject
293
+ };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  findConfigFile,
3
3
  loadConfig
4
- } from "./chunk-YDOGGQSF.js";
4
+ } from "./chunk-GRJ7A4WT.js";
5
5
  import {
6
6
  resultToMcpResponse
7
7
  } from "./chunk-IDZNPTYD.js";
@@ -46,18 +46,18 @@ async function handleCheckDocs(input) {
46
46
  const projectPath = sanitizePath(input.path);
47
47
  const scope = input.scope ?? "coverage";
48
48
  if (scope === "integrity") {
49
- const { validateKnowledgeMap } = await import("./dist-WHL3NN5S.js");
49
+ const { validateKnowledgeMap } = await import("./dist-LCR2IO7U.js");
50
50
  const result2 = await validateKnowledgeMap(projectPath);
51
51
  return resultToMcpResponse(result2);
52
52
  }
53
53
  if (scope === "all") {
54
- const { checkDocCoverage: checkDocCoverage2, validateKnowledgeMap } = await import("./dist-WHL3NN5S.js");
54
+ const { checkDocCoverage: checkDocCoverage2, validateKnowledgeMap } = await import("./dist-LCR2IO7U.js");
55
55
  const domain2 = input.domain ?? "src";
56
- const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-KMHDQYDT.js");
56
+ const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-FJN4H7Y4.js");
57
57
  const store2 = await loadGraphStore2(projectPath);
58
58
  let graphCoverage2;
59
59
  if (store2) {
60
- const { Assembler } = await import("./dist-U7EAO6T2.js");
60
+ const { Assembler } = await import("./dist-IA6XYKNO.js");
61
61
  const assembler = new Assembler(store2);
62
62
  const report = assembler.checkCoverage();
63
63
  graphCoverage2 = {
@@ -90,13 +90,13 @@ async function handleCheckDocs(input) {
90
90
  }
91
91
  return resultToMcpResponse(Ok({ coverage, integrity }));
92
92
  }
93
- const { checkDocCoverage } = await import("./dist-WHL3NN5S.js");
93
+ const { checkDocCoverage } = await import("./dist-LCR2IO7U.js");
94
94
  const domain = input.domain ?? "src";
95
- const { loadGraphStore } = await import("./graph-loader-KMHDQYDT.js");
95
+ const { loadGraphStore } = await import("./graph-loader-FJN4H7Y4.js");
96
96
  const store = await loadGraphStore(projectPath);
97
97
  let graphCoverage;
98
98
  if (store) {
99
- const { Assembler } = await import("./dist-U7EAO6T2.js");
99
+ const { Assembler } = await import("./dist-IA6XYKNO.js");
100
100
  const assembler = new Assembler(store);
101
101
  const report = assembler.checkCoverage();
102
102
  graphCoverage = {
@@ -15,7 +15,7 @@ function evictIfNeeded() {
15
15
  }
16
16
  }
17
17
  async function doLoadGraphStore(projectRoot) {
18
- const { GraphStore } = await import("./dist-U7EAO6T2.js");
18
+ const { GraphStore } = await import("./dist-IA6XYKNO.js");
19
19
  const graphDir = path.join(projectRoot, ".harness", "graph");
20
20
  const store = new GraphStore();
21
21
  const loaded = await store.load(graphDir);
@@ -45,7 +45,7 @@ var runCodeReviewDefinition = {
45
45
  };
46
46
  async function handleRunCodeReview(input) {
47
47
  try {
48
- const { parseDiff, runReviewPipeline } = await import("./dist-WHL3NN5S.js");
48
+ const { parseDiff, runReviewPipeline } = await import("./dist-LCR2IO7U.js");
49
49
  const parseResult = parseDiff(input.diff);
50
50
  if (!parseResult.ok) {
51
51
  return {