@harness-engineering/cli 1.21.0 → 1.23.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 (127) 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-autopilot/SKILL.md +2 -2
  5. package/dist/agents/skills/claude-code/harness-brainstorming/SKILL.md +1 -1
  6. package/dist/agents/skills/claude-code/harness-code-review/skill.yaml +5 -0
  7. package/dist/agents/skills/claude-code/harness-codebase-cleanup/skill.yaml +5 -0
  8. package/dist/agents/skills/claude-code/harness-debugging/skill.yaml +5 -0
  9. package/dist/agents/skills/claude-code/harness-dependency-health/skill.yaml +9 -0
  10. package/dist/agents/skills/claude-code/harness-execution/SKILL.md +1 -1
  11. package/dist/agents/skills/claude-code/harness-hotspot-detector/skill.yaml +9 -0
  12. package/dist/agents/skills/claude-code/harness-integrity/skill.yaml +5 -0
  13. package/dist/agents/skills/claude-code/harness-perf/skill.yaml +3 -0
  14. package/dist/agents/skills/claude-code/harness-refactoring/skill.yaml +9 -0
  15. package/dist/agents/skills/claude-code/harness-roadmap/SKILL.md +5 -5
  16. package/dist/agents/skills/claude-code/harness-roadmap-pilot/SKILL.md +18 -14
  17. package/dist/agents/skills/claude-code/harness-security-scan/skill.yaml +3 -0
  18. package/dist/agents/skills/claude-code/harness-soundness-review/skill.yaml +5 -0
  19. package/dist/agents/skills/claude-code/harness-supply-chain-audit/skill.yaml +3 -0
  20. package/dist/agents/skills/claude-code/harness-tdd/skill.yaml +3 -0
  21. package/dist/agents/skills/codex/cleanup-dead-code/skill.yaml +3 -0
  22. package/dist/agents/skills/codex/detect-doc-drift/skill.yaml +5 -0
  23. package/dist/agents/skills/codex/enforce-architecture/skill.yaml +13 -0
  24. package/dist/agents/skills/codex/harness-autopilot/SKILL.md +2 -2
  25. package/dist/agents/skills/codex/harness-brainstorming/SKILL.md +1 -1
  26. package/dist/agents/skills/codex/harness-code-review/skill.yaml +5 -0
  27. package/dist/agents/skills/codex/harness-codebase-cleanup/skill.yaml +5 -0
  28. package/dist/agents/skills/codex/harness-debugging/skill.yaml +5 -0
  29. package/dist/agents/skills/codex/harness-dependency-health/skill.yaml +9 -0
  30. package/dist/agents/skills/codex/harness-execution/SKILL.md +1 -1
  31. package/dist/agents/skills/codex/harness-hotspot-detector/skill.yaml +9 -0
  32. package/dist/agents/skills/codex/harness-integrity/skill.yaml +5 -0
  33. package/dist/agents/skills/codex/harness-perf/skill.yaml +3 -0
  34. package/dist/agents/skills/codex/harness-refactoring/skill.yaml +9 -0
  35. package/dist/agents/skills/codex/harness-roadmap/SKILL.md +5 -5
  36. package/dist/agents/skills/codex/harness-roadmap-pilot/SKILL.md +18 -14
  37. package/dist/agents/skills/codex/harness-security-scan/skill.yaml +3 -0
  38. package/dist/agents/skills/codex/harness-soundness-review/skill.yaml +5 -0
  39. package/dist/agents/skills/codex/harness-supply-chain-audit/skill.yaml +3 -0
  40. package/dist/agents/skills/codex/harness-tdd/skill.yaml +3 -0
  41. package/dist/agents/skills/cursor/cleanup-dead-code/skill.yaml +3 -0
  42. package/dist/agents/skills/cursor/detect-doc-drift/skill.yaml +5 -0
  43. package/dist/agents/skills/cursor/enforce-architecture/skill.yaml +13 -0
  44. package/dist/agents/skills/cursor/harness-autopilot/SKILL.md +2 -2
  45. package/dist/agents/skills/cursor/harness-brainstorming/SKILL.md +1 -1
  46. package/dist/agents/skills/cursor/harness-code-review/skill.yaml +5 -0
  47. package/dist/agents/skills/cursor/harness-codebase-cleanup/skill.yaml +5 -0
  48. package/dist/agents/skills/cursor/harness-debugging/skill.yaml +5 -0
  49. package/dist/agents/skills/cursor/harness-dependency-health/skill.yaml +9 -0
  50. package/dist/agents/skills/cursor/harness-execution/SKILL.md +1 -1
  51. package/dist/agents/skills/cursor/harness-hotspot-detector/skill.yaml +9 -0
  52. package/dist/agents/skills/cursor/harness-integrity/skill.yaml +5 -0
  53. package/dist/agents/skills/cursor/harness-perf/skill.yaml +3 -0
  54. package/dist/agents/skills/cursor/harness-refactoring/skill.yaml +9 -0
  55. package/dist/agents/skills/cursor/harness-roadmap/SKILL.md +5 -5
  56. package/dist/agents/skills/cursor/harness-roadmap-pilot/SKILL.md +18 -14
  57. package/dist/agents/skills/cursor/harness-security-scan/skill.yaml +3 -0
  58. package/dist/agents/skills/cursor/harness-soundness-review/skill.yaml +5 -0
  59. package/dist/agents/skills/cursor/harness-supply-chain-audit/skill.yaml +3 -0
  60. package/dist/agents/skills/cursor/harness-tdd/skill.yaml +3 -0
  61. package/dist/agents/skills/gemini-cli/cleanup-dead-code/skill.yaml +3 -0
  62. package/dist/agents/skills/gemini-cli/detect-doc-drift/skill.yaml +5 -0
  63. package/dist/agents/skills/gemini-cli/enforce-architecture/skill.yaml +13 -0
  64. package/dist/agents/skills/gemini-cli/harness-autopilot/SKILL.md +2 -2
  65. package/dist/agents/skills/gemini-cli/harness-brainstorming/SKILL.md +1 -1
  66. package/dist/agents/skills/gemini-cli/harness-code-review/skill.yaml +5 -0
  67. package/dist/agents/skills/gemini-cli/harness-codebase-cleanup/skill.yaml +5 -0
  68. package/dist/agents/skills/gemini-cli/harness-debugging/skill.yaml +5 -0
  69. package/dist/agents/skills/gemini-cli/harness-dependency-health/skill.yaml +9 -0
  70. package/dist/agents/skills/gemini-cli/harness-execution/SKILL.md +1 -1
  71. package/dist/agents/skills/gemini-cli/harness-hotspot-detector/skill.yaml +9 -0
  72. package/dist/agents/skills/gemini-cli/harness-integrity/skill.yaml +5 -0
  73. package/dist/agents/skills/gemini-cli/harness-perf/skill.yaml +3 -0
  74. package/dist/agents/skills/gemini-cli/harness-refactoring/skill.yaml +9 -0
  75. package/dist/agents/skills/gemini-cli/harness-roadmap/SKILL.md +5 -5
  76. package/dist/agents/skills/gemini-cli/harness-roadmap-pilot/SKILL.md +18 -14
  77. package/dist/agents/skills/gemini-cli/harness-security-scan/skill.yaml +3 -0
  78. package/dist/agents/skills/gemini-cli/harness-soundness-review/skill.yaml +5 -0
  79. package/dist/agents/skills/gemini-cli/harness-supply-chain-audit/skill.yaml +3 -0
  80. package/dist/agents/skills/gemini-cli/harness-tdd/skill.yaml +3 -0
  81. package/dist/{agents-md-TDTLYAQU.js → agents-md-GLKJSGKT.js} +2 -1
  82. package/dist/{architecture-NANP4XPE.js → architecture-EDSBAGR4.js} +3 -2
  83. package/dist/assess-project-CEDY4JU3.js +9 -0
  84. package/dist/bin/harness-mcp.js +15 -13
  85. package/dist/bin/harness.js +21 -19
  86. package/dist/{check-phase-gate-I4NQOCSU.js → check-phase-gate-N3DTKFCZ.js} +4 -3
  87. package/dist/{chunk-UEKQ5G3V.js → chunk-26AUZBV4.js} +459 -37
  88. package/dist/chunk-2LAEDVOC.js +293 -0
  89. package/dist/{chunk-M6TIO6NF.js → chunk-2PAPHA77.js} +1 -1
  90. package/dist/{dist-U7EAO6T2.js → chunk-5SWE24IG.js} +401 -60
  91. package/dist/{chunk-7G2ZUTZA.js → chunk-A4AI3H3R.js} +26 -3
  92. package/dist/{chunk-HUDEBSR2.js → chunk-AIBAYANF.js} +3 -3
  93. package/dist/{chunk-6GEYPBDU.js → chunk-AKVG4MMZ.js} +9 -9
  94. package/dist/{chunk-SPUK5W4W.js → chunk-ENA4O4WD.js} +2 -2
  95. package/dist/{chunk-SZ5TGZMI.js → chunk-GJRUIXUK.js} +17 -2
  96. package/dist/{chunk-YF5ROTWR.js → chunk-HT4VPPB4.js} +8 -8
  97. package/dist/{chunk-L6LTNZQZ.js → chunk-LIWGCYON.js} +1 -1
  98. package/dist/{chunk-UVJFBKCX.js → chunk-QUKH6QCJ.js} +7 -7
  99. package/dist/{chunk-HKUX2X7O.js → chunk-SE4YPMLH.js} +9 -1
  100. package/dist/{chunk-TMSGI27F.js → chunk-SM22U22L.js} +982 -386
  101. package/dist/{chunk-LRG3B43J.js → chunk-T5QWCVGK.js} +1 -1
  102. package/dist/{chunk-H6LXAH66.js → chunk-TD6MQUV2.js} +1 -1
  103. package/dist/{chunk-WXI5ONCU.js → chunk-TJ6NLLAY.js} +4 -4
  104. package/dist/{chunk-CZZXE6BL.js → chunk-TLDCCPUZ.js} +1 -1
  105. package/dist/{chunk-YZYBQZVL.js → chunk-XDAIFVGC.js} +1539 -587
  106. package/dist/{ci-workflow-Z4IUJBZL.js → ci-workflow-LE3QF4FP.js} +2 -1
  107. package/dist/{create-skill-NDXQSTIK.js → create-skill-U3XCFRZN.js} +2 -2
  108. package/dist/dist-OEXTQQZC.js +92 -0
  109. package/dist/{dist-KV2ICL5X.js → dist-YIKUBJLQ.js} +56 -3
  110. package/dist/{docs-2PCZVSGB.js → docs-F5G7NAFF.js} +4 -3
  111. package/dist/{engine-EOXMI5MD.js → engine-LX5RVGXN.js} +2 -1
  112. package/dist/{entropy-VGXXBIGX.js → entropy-A5Q2USYX.js} +3 -2
  113. package/dist/{feedback-VTSPL3O7.js → feedback-2EU25RIW.js} +1 -1
  114. package/dist/{generate-agent-definitions-QICSCGXB.js → generate-agent-definitions-HNJHO5YQ.js} +2 -1
  115. package/dist/{graph-loader-KMHDQYDT.js → graph-loader-XULF5QF7.js} +1 -1
  116. package/dist/index.d.ts +66 -10
  117. package/dist/index.js +27 -23
  118. package/dist/{loader-7S4FYAPP.js → loader-GWIEW4HM.js} +2 -1
  119. package/dist/{mcp-DF25USTE.js → mcp-ID3LR6JB.js} +15 -13
  120. package/dist/{performance-RV4DUMFI.js → performance-YAY2A6A6.js} +4 -3
  121. package/dist/{review-pipeline-7KQJB4SI.js → review-pipeline-YD4WI3JM.js} +1 -1
  122. package/dist/{runtime-XKOHGGRC.js → runtime-UJ4YO4CA.js} +2 -1
  123. package/dist/{security-NLWTMK3G.js → security-IBSUKMVD.js} +1 -1
  124. package/dist/{skill-executor-XEVDGXUM.js → skill-executor-2BZQLHYN.js} +2 -2
  125. package/dist/{validate-VHFE6J6O.js → validate-NHXWKMCR.js} +3 -2
  126. package/dist/{validate-cross-check-PFRKABCS.js → validate-cross-check-R3GV2MLM.js} +2 -1
  127. package/package.json +4 -4
@@ -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-NHXWKMCR.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-EDSBAGR4.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-F5G7NAFF.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-A5Q2USYX.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-IBSUKMVD.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-YAY2A6A6.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
+ };
@@ -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";