@harness-engineering/cli 2.3.1 → 2.4.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 (50) hide show
  1. package/dist/agents/skills/claude-code/harness-compliance/SKILL.md +19 -0
  2. package/dist/agents/skills/codex/harness-compliance/SKILL.md +19 -0
  3. package/dist/agents/skills/cursor/harness-compliance/SKILL.md +19 -0
  4. package/dist/agents/skills/gemini-cli/harness-compliance/SKILL.md +19 -0
  5. package/dist/{agents-md-5JG3AE5A.js → agents-md-ROTDQOXM.js} +2 -2
  6. package/dist/{architecture-544ISXDI.js → architecture-I2G7PNQB.js} +3 -3
  7. package/dist/{assess-project-PBO6XFJC.js → assess-project-LO6NCLE7.js} +1 -1
  8. package/dist/bin/harness-mcp.js +13 -13
  9. package/dist/bin/harness.js +22 -22
  10. package/dist/{check-phase-gate-BZU4DGF3.js → check-phase-gate-52SQFNJB.js} +3 -3
  11. package/dist/{chunk-YI6NTL72.js → chunk-27EHWQPK.js} +3 -3
  12. package/dist/{chunk-QZ67TDLJ.js → chunk-2L2A6W6I.js} +3 -3
  13. package/dist/{chunk-R6GLLMRZ.js → chunk-4XB37LST.js} +3 -3
  14. package/dist/{chunk-JMACX5FN.js → chunk-54JTO4NZ.js} +1 -1
  15. package/dist/{chunk-U2SF3KAQ.js → chunk-5YOHXTK3.js} +2 -2
  16. package/dist/{chunk-DHWFOHPX.js → chunk-DJRRTZGD.js} +1 -1
  17. package/dist/{chunk-IYA3NS5P.js → chunk-FJJYQWUP.js} +1 -1
  18. package/dist/{chunk-YNG7BWGB.js → chunk-GDJ2MRYH.js} +82 -8
  19. package/dist/{chunk-EMJFHTPZ.js → chunk-GN2CSZC6.js} +2 -2
  20. package/dist/{chunk-KT5PWWWO.js → chunk-JGPOQJ73.js} +1 -1
  21. package/dist/{chunk-DBJC4ULT.js → chunk-KPWUZSHL.js} +24 -1
  22. package/dist/{chunk-22OKI5QI.js → chunk-MQRKPF46.js} +5 -5
  23. package/dist/{chunk-T2ZMHXCX.js → chunk-MSBVH6ER.js} +1 -1
  24. package/dist/{chunk-J4MX5DIA.js → chunk-NGCM4B4V.js} +2 -2
  25. package/dist/{chunk-2564TBT6.js → chunk-OFMQEUYN.js} +1 -1
  26. package/dist/{chunk-A36MGB3V.js → chunk-Q43LM7CO.js} +70 -70
  27. package/dist/{chunk-LBYGGNEZ.js → chunk-RYVL76ZF.js} +1 -1
  28. package/dist/{chunk-LYMPKO6N.js → chunk-RZASDABE.js} +2 -2
  29. package/dist/{chunk-N6DVSOLZ.js → chunk-TCR5PKMU.js} +123 -32
  30. package/dist/{chunk-WMZKZCCE.js → chunk-TVJZX53C.js} +1 -1
  31. package/dist/{chunk-KJR4Z2YC.js → chunk-U4XK4BB3.js} +6 -6
  32. package/dist/{chunk-TIJXG4UB.js → chunk-WY2J54IZ.js} +6 -6
  33. package/dist/{ci-workflow-ZO6FPO3V.js → ci-workflow-MYBH64CR.js} +2 -2
  34. package/dist/{dist-ZS3Y3YWP.js → dist-ZJGFXGIB.js} +3 -1
  35. package/dist/{docs-VW2KDPI3.js → docs-7CW7WUFB.js} +3 -3
  36. package/dist/{engine-LFQ2JSHY.js → engine-Y75QZW6N.js} +2 -2
  37. package/dist/{entropy-P62LCVJI.js → entropy-P6QELTFA.js} +2 -2
  38. package/dist/{feedback-O3TZAPGX.js → feedback-PJWCDRRZ.js} +1 -1
  39. package/dist/{generate-agent-definitions-WVCOZDKI.js → generate-agent-definitions-ONDIJHHK.js} +3 -3
  40. package/dist/index.d.ts +66 -0
  41. package/dist/index.js +22 -22
  42. package/dist/{loader-UB2A65DN.js → loader-DQRNWKOZ.js} +2 -2
  43. package/dist/{mcp-ST26QMDK.js → mcp-UUNLS3MC.js} +13 -13
  44. package/dist/{performance-5HQG3IU6.js → performance-7X3EFAOD.js} +3 -3
  45. package/dist/{review-pipeline-VRDL5A7J.js → review-pipeline-GAJ22PBC.js} +2 -2
  46. package/dist/{runtime-TQQT2MWQ.js → runtime-6TK6U72R.js} +2 -2
  47. package/dist/{security-IMFAE6MW.js → security-ZSU643D7.js} +1 -1
  48. package/dist/{validate-GW2DG64P.js → validate-IDX6RI3U.js} +3 -3
  49. package/dist/{validate-cross-check-F5YQVXLT.js → validate-cross-check-5YEWZ3EW.js} +2 -2
  50. package/package.json +5 -5
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  init_dist,
6
6
  paginate
7
- } from "./chunk-YNG7BWGB.js";
7
+ } from "./chunk-GDJ2MRYH.js";
8
8
 
9
9
  // src/mcp/tools/review-pipeline.ts
10
10
  init_dist();
@@ -79,7 +79,7 @@ var runCodeReviewDefinition = {
79
79
  };
80
80
  async function handleRunCodeReview(input) {
81
81
  try {
82
- const { parseDiff, runReviewPipeline } = await import("./dist-ZS3Y3YWP.js");
82
+ const { parseDiff, runReviewPipeline } = await import("./dist-ZJGFXGIB.js");
83
83
  const parseResult = parseDiff(input.diff);
84
84
  if (!parseResult.ok) {
85
85
  return {
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  generateRuntime
3
- } from "./chunk-WMZKZCCE.js";
3
+ } from "./chunk-TVJZX53C.js";
4
4
  import {
5
5
  generateAgentsMd
6
- } from "./chunk-IYA3NS5P.js";
6
+ } from "./chunk-FJJYQWUP.js";
7
7
  import {
8
8
  generateCIWorkflow
9
- } from "./chunk-DHWFOHPX.js";
9
+ } from "./chunk-DJRRTZGD.js";
10
10
  import {
11
11
  TemplateEngine
12
- } from "./chunk-JMACX5FN.js";
12
+ } from "./chunk-54JTO4NZ.js";
13
13
  import {
14
14
  generate,
15
15
  validate
@@ -28,18 +28,18 @@ import {
28
28
  OutputMode,
29
29
  createCheckPhaseGateCommand,
30
30
  findFiles
31
- } from "./chunk-U2SF3KAQ.js";
31
+ } from "./chunk-5YOHXTK3.js";
32
32
  import {
33
33
  createGenerateAgentDefinitionsCommand,
34
34
  generateAgentDefinitions
35
- } from "./chunk-LBYGGNEZ.js";
35
+ } from "./chunk-RYVL76ZF.js";
36
36
  import {
37
37
  toKebabCase
38
38
  } from "./chunk-KET4QQZB.js";
39
39
  import {
40
40
  listPersonas,
41
41
  loadPersona
42
- } from "./chunk-KT5PWWWO.js";
42
+ } from "./chunk-JGPOQJ73.js";
43
43
  import {
44
44
  createScanCommand,
45
45
  loadIngestOptions
@@ -57,7 +57,7 @@ import {
57
57
  loadCachedSnapshot,
58
58
  persistToolingConfig,
59
59
  recommend
60
- } from "./chunk-A36MGB3V.js";
60
+ } from "./chunk-Q43LM7CO.js";
61
61
  import {
62
62
  loadGraphStore
63
63
  } from "./chunk-TIQU5VY7.js";
@@ -65,9 +65,10 @@ import {
65
65
  loadOrRebuildIndex
66
66
  } from "./chunk-27AJKSQY.js";
67
67
  import {
68
+ BranchingConfigSchema,
68
69
  findConfigFile,
69
70
  resolveConfig
70
- } from "./chunk-DBJC4ULT.js";
71
+ } from "./chunk-KPWUZSHL.js";
71
72
  import {
72
73
  VALID_PLATFORMS
73
74
  } from "./chunk-3ISINLYT.js";
@@ -163,6 +164,7 @@ import {
163
164
  setActiveStream,
164
165
  validateAgentConfigs,
165
166
  validateAgentsMap,
167
+ validateBranchName,
166
168
  validateDependencies,
167
169
  validateKnowledgeMap,
168
170
  validatePulseConfig,
@@ -170,7 +172,7 @@ import {
170
172
  validateSolutionsDir,
171
173
  writeConfig,
172
174
  writeLockfile
173
- } from "./chunk-YNG7BWGB.js";
175
+ } from "./chunk-GDJ2MRYH.js";
174
176
  import {
175
177
  Err,
176
178
  Ok
@@ -199,7 +201,7 @@ import {
199
201
  } from "./chunk-KFQGP6VL.js";
200
202
 
201
203
  // src/index.ts
202
- import { Command as Command93 } from "commander";
204
+ import { Command as Command94 } from "commander";
203
205
 
204
206
  // src/commands/add.ts
205
207
  init_dist2();
@@ -388,7 +390,7 @@ function registerSkillsCommand(adoption) {
388
390
  const globalOpts = cmd.optsWithGlobals();
389
391
  const limit = Math.max(parseInt(opts.limit, 10) || 20, 1);
390
392
  const cwd = process.cwd();
391
- const { readAdoptionRecords, aggregateBySkill } = await import("./dist-ZS3Y3YWP.js");
393
+ const { readAdoptionRecords, aggregateBySkill } = await import("./dist-ZJGFXGIB.js");
392
394
  const records = readAdoptionRecords(cwd);
393
395
  if (records.length === 0) {
394
396
  if (globalOpts.json) {
@@ -424,7 +426,7 @@ function registerRecentCommand(adoption) {
424
426
  const globalOpts = cmd.optsWithGlobals();
425
427
  const limit = Math.max(parseInt(opts.limit, 10) || 20, 1);
426
428
  const cwd = process.cwd();
427
- const { readAdoptionRecords } = await import("./dist-ZS3Y3YWP.js");
429
+ const { readAdoptionRecords } = await import("./dist-ZJGFXGIB.js");
428
430
  const records = readAdoptionRecords(cwd);
429
431
  if (records.length === 0) {
430
432
  if (globalOpts.json) {
@@ -502,7 +504,7 @@ function registerSkillCommand(adoption) {
502
504
  adoption.command("skill <name>").description("Show detail for a specific skill").action(async (name, _opts, cmd) => {
503
505
  const globalOpts = cmd.optsWithGlobals();
504
506
  const cwd = process.cwd();
505
- const { readAdoptionRecords, aggregateBySkill } = await import("./dist-ZS3Y3YWP.js");
507
+ const { readAdoptionRecords, aggregateBySkill } = await import("./dist-ZJGFXGIB.js");
506
508
  const records = readAdoptionRecords(cwd);
507
509
  const skillRecords = records.filter((r) => r.skill === name);
508
510
  if (skillRecords.length === 0) {
@@ -5816,7 +5818,7 @@ function createMcpCommand() {
5816
5818
  parseBudget
5817
5819
  ).action(async (opts) => {
5818
5820
  const [{ startServer: startServer2, getToolDefinitions: getToolDefinitions2 }, { selectTier }] = await Promise.all([
5819
- import("./mcp-ST26QMDK.js"),
5821
+ import("./mcp-UUNLS3MC.js"),
5820
5822
  import("./tool-tiers-7QGZ3FKY.js")
5821
5823
  ]);
5822
5824
  if (opts.tools && opts.tools.length > 0) {
@@ -6312,7 +6314,7 @@ function registerBenchCommand(perf) {
6312
6314
  perf.command("bench [glob]").description("Run benchmarks via vitest bench").action(async (glob2, _opts, cmd) => {
6313
6315
  const globalOpts = cmd.optsWithGlobals();
6314
6316
  const cwd = process.cwd();
6315
- const { BenchmarkRunner } = await import("./dist-ZS3Y3YWP.js");
6317
+ const { BenchmarkRunner } = await import("./dist-ZJGFXGIB.js");
6316
6318
  const runner = new BenchmarkRunner();
6317
6319
  const benchFiles = runner.discover(cwd, glob2);
6318
6320
  if (benchFiles.length === 0) {
@@ -6376,7 +6378,7 @@ async function runBaselinesShow(globalOpts) {
6376
6378
  }
6377
6379
  async function runBaselinesUpdate(globalOpts) {
6378
6380
  const cwd = process.cwd();
6379
- const { BenchmarkRunner } = await import("./dist-ZS3Y3YWP.js");
6381
+ const { BenchmarkRunner } = await import("./dist-ZJGFXGIB.js");
6380
6382
  const runner = new BenchmarkRunner();
6381
6383
  const manager = new BaselineManager(cwd);
6382
6384
  logger.info("Running benchmarks to update baselines...");
@@ -6407,8 +6409,8 @@ function registerBaselinesCommands(perf) {
6407
6409
  }
6408
6410
  async function getCommitHash2(cwd) {
6409
6411
  try {
6410
- const { execSync: execSync6 } = await import("child_process");
6411
- return execSync6("git rev-parse --short HEAD", { cwd, encoding: "utf-8" }).trim();
6412
+ const { execSync: execSync7 } = await import("child_process");
6413
+ return execSync7("git rev-parse --short HEAD", { cwd, encoding: "utf-8" }).trim();
6412
6414
  } catch {
6413
6415
  return "unknown";
6414
6416
  }
@@ -6417,7 +6419,7 @@ function registerReportCommand(perf) {
6417
6419
  perf.command("report").description("Full performance report with metrics, trends, and hotspots").action(async (_opts, cmd) => {
6418
6420
  const globalOpts = cmd.optsWithGlobals();
6419
6421
  const cwd = process.cwd();
6420
- const { EntropyAnalyzer: EntropyAnalyzer2 } = await import("./dist-ZS3Y3YWP.js");
6422
+ const { EntropyAnalyzer: EntropyAnalyzer2 } = await import("./dist-ZJGFXGIB.js");
6421
6423
  const analyzer = new EntropyAnalyzer2({
6422
6424
  rootDir: path42.resolve(cwd),
6423
6425
  analyze: { complexity: true, coupling: true }
@@ -6833,7 +6835,7 @@ async function runPublishAnalyses(opts) {
6833
6835
  const nameToExternalId = await buildNameToExternalIdMap(projectPath);
6834
6836
  if (!nameToExternalId) return process.exit(1);
6835
6837
  const { AnalysisArchive } = await import("@harness-engineering/orchestrator");
6836
- const { GitHubIssuesSyncAdapter: GitHubIssuesSyncAdapter2 } = await import("./dist-ZS3Y3YWP.js");
6838
+ const { GitHubIssuesSyncAdapter: GitHubIssuesSyncAdapter2 } = await import("./dist-ZJGFXGIB.js");
6837
6839
  const archive = new AnalysisArchive(path44.join(projectPath, ".harness", "analyses"));
6838
6840
  const analyses = await archive.list();
6839
6841
  if (analyses.length === 0) {
@@ -9325,7 +9327,7 @@ async function runSyncAnalyses(opts) {
9325
9327
  return;
9326
9328
  }
9327
9329
  const { AnalysisArchive, loadPublishedIndex: loadPublishedIndex2, savePublishedIndex: savePublishedIndex2 } = await import("@harness-engineering/orchestrator");
9328
- const { GitHubIssuesSyncAdapter: GitHubIssuesSyncAdapter2 } = await import("./dist-ZS3Y3YWP.js");
9330
+ const { GitHubIssuesSyncAdapter: GitHubIssuesSyncAdapter2 } = await import("./dist-ZJGFXGIB.js");
9329
9331
  const adapter = new GitHubIssuesSyncAdapter2({ token, config: trackerConfig });
9330
9332
  const archive = new AnalysisArchive(path62.join(projectPath, ".harness", "analyses"));
9331
9333
  const publishedIndex = loadPublishedIndex2(projectPath);
@@ -10087,6 +10089,7 @@ import { join as join56 } from "path";
10087
10089
  import { promisify } from "util";
10088
10090
  import readline4 from "readline";
10089
10091
  import chalk15 from "chalk";
10092
+ var CLI_PACKAGE = "@harness-engineering/cli";
10090
10093
  function detectPackageManager() {
10091
10094
  try {
10092
10095
  const argv1 = process.argv[1];
@@ -10129,6 +10132,9 @@ function getInstalledVersions(pm, packages) {
10129
10132
  versions[pkg] = null;
10130
10133
  }
10131
10134
  }
10135
+ if (packages.includes(CLI_PACKAGE) && versions[CLI_PACKAGE] === null) {
10136
+ versions[CLI_PACKAGE] = CLI_VERSION;
10137
+ }
10132
10138
  return versions;
10133
10139
  }
10134
10140
  function getInstalledPackages(pm) {
@@ -10139,9 +10145,13 @@ function getInstalledPackages(pm) {
10139
10145
  });
10140
10146
  const data = JSON.parse(output);
10141
10147
  const deps = data.dependencies ?? {};
10142
- return Object.keys(deps).filter((name) => name.startsWith("@harness-engineering/"));
10148
+ const found = Object.keys(deps).filter((name) => name.startsWith("@harness-engineering/"));
10149
+ if (!found.includes(CLI_PACKAGE)) {
10150
+ found.unshift(CLI_PACKAGE);
10151
+ }
10152
+ return found;
10143
10153
  } catch {
10144
- return ["@harness-engineering/cli", "@harness-engineering/core"];
10154
+ return [CLI_PACKAGE, "@harness-engineering/core"];
10145
10155
  }
10146
10156
  }
10147
10157
  function prompt3(question) {
@@ -10310,7 +10320,7 @@ function createUpdateCommand() {
10310
10320
  // src/commands/usage.ts
10311
10321
  import { Command as Command91 } from "commander";
10312
10322
  async function loadAndPriceRecords(cwd, includeClaudeSessions = false) {
10313
- const { readCostRecords, loadPricingData, calculateCost, parseCCRecords } = await import("./dist-ZS3Y3YWP.js");
10323
+ const { readCostRecords, loadPricingData, calculateCost, parseCCRecords } = await import("./dist-ZJGFXGIB.js");
10314
10324
  const records = readCostRecords(cwd);
10315
10325
  if (includeClaudeSessions) {
10316
10326
  const ccRecords = parseCCRecords();
@@ -10403,7 +10413,7 @@ function registerDailyCommand(usage) {
10403
10413
  else logger.info("No usage data found. Run some harness sessions first.");
10404
10414
  return;
10405
10415
  }
10406
- const { aggregateByDay } = await import("./dist-ZS3Y3YWP.js");
10416
+ const { aggregateByDay } = await import("./dist-ZJGFXGIB.js");
10407
10417
  const limited = aggregateByDay(records).slice(0, days);
10408
10418
  if (globalOpts.json) {
10409
10419
  console.log(
@@ -10432,7 +10442,7 @@ function registerSessionsCommand(usage) {
10432
10442
  }
10433
10443
  return;
10434
10444
  }
10435
- const { aggregateBySession } = await import("./dist-ZS3Y3YWP.js");
10445
+ const { aggregateBySession } = await import("./dist-ZJGFXGIB.js");
10436
10446
  const sessionData = aggregateBySession(records);
10437
10447
  const limited = sessionData.slice(0, limit);
10438
10448
  if (globalOpts.json) {
@@ -10512,7 +10522,7 @@ function registerSessionCommand(usage) {
10512
10522
  cwd,
10513
10523
  globalOpts.includeClaudeSessions
10514
10524
  );
10515
- const { aggregateBySession } = await import("./dist-ZS3Y3YWP.js");
10525
+ const { aggregateBySession } = await import("./dist-ZJGFXGIB.js");
10516
10526
  const sessionData = aggregateBySession(records);
10517
10527
  const match = sessionData.find((s) => s.sessionId === id);
10518
10528
  if (!match) {
@@ -10547,7 +10557,7 @@ function registerLatestCommand(usage) {
10547
10557
  }
10548
10558
  return;
10549
10559
  }
10550
- const { aggregateBySession } = await import("./dist-ZS3Y3YWP.js");
10560
+ const { aggregateBySession } = await import("./dist-ZJGFXGIB.js");
10551
10561
  const sessionData = aggregateBySession(records);
10552
10562
  const latest = sessionData[0];
10553
10563
  if (!latest) {
@@ -10716,7 +10726,7 @@ function resolveValidateMode(globalOpts) {
10716
10726
  return OutputMode.TEXT;
10717
10727
  }
10718
10728
  async function printCrossCheckWarnings(mode) {
10719
- const { runCrossCheck: runCrossCheck2 } = await import("./validate-cross-check-F5YQVXLT.js");
10729
+ const { runCrossCheck: runCrossCheck2 } = await import("./validate-cross-check-5YEWZ3EW.js");
10720
10730
  const cwd = process.cwd();
10721
10731
  const crossResult = await runCrossCheck2({
10722
10732
  specsDir: path67.join(cwd, "docs", "specs"),
@@ -10779,6 +10789,86 @@ Agent configs checked via ${engineLabel}${note}`);
10779
10789
  }
10780
10790
  }
10781
10791
 
10792
+ // src/commands/verify.ts
10793
+ init_dist2();
10794
+ import { Command as Command93 } from "commander";
10795
+ import { execSync as execSync6 } from "child_process";
10796
+ function loadBranchingConfig(configPath) {
10797
+ const shouldLoad = configPath !== void 0 || findConfigFile().ok;
10798
+ if (!shouldLoad) {
10799
+ return BranchingConfigSchema.parse({});
10800
+ }
10801
+ const result = resolveConfig(configPath);
10802
+ if (!result.ok) {
10803
+ logger.error(result.error.message);
10804
+ process.exit(result.error.exitCode);
10805
+ }
10806
+ const cfg = result.value.compliance?.branching;
10807
+ return cfg ?? BranchingConfigSchema.parse({});
10808
+ }
10809
+ function resolveBranchName(explicit) {
10810
+ if (explicit && explicit.length > 0) return explicit;
10811
+ const envBranch = process.env.HARNESS_BRANCH || process.env.GITHUB_HEAD_REF || process.env.CI_COMMIT_REF_NAME || process.env.BUILDKITE_BRANCH;
10812
+ if (envBranch && envBranch.length > 0) return envBranch;
10813
+ try {
10814
+ const out = execSync6("git rev-parse --abbrev-ref HEAD", {
10815
+ stdio: ["ignore", "pipe", "ignore"]
10816
+ }).toString().trim();
10817
+ if (out && out !== "HEAD") return out;
10818
+ } catch {
10819
+ return null;
10820
+ }
10821
+ return null;
10822
+ }
10823
+ async function runVerify(options) {
10824
+ const branchingConfig = loadBranchingConfig(options.configPath);
10825
+ const branchName = resolveBranchName(options.branch);
10826
+ if (!branchName) {
10827
+ const msg = "Could not determine the current branch name. Pass --branch <name>, set HARNESS_BRANCH/GITHUB_HEAD_REF, or run inside a git checkout.";
10828
+ if (options.json) {
10829
+ console.log(JSON.stringify({ valid: false, branchName: "", message: msg }));
10830
+ } else {
10831
+ logger.error(msg);
10832
+ }
10833
+ process.exit(ExitCode.ERROR);
10834
+ }
10835
+ const result = validateBranchName(branchName, branchingConfig);
10836
+ if (options.json) {
10837
+ const payload = {
10838
+ valid: result.valid,
10839
+ branchName: result.branchName,
10840
+ ...result.message !== void 0 && { message: result.message },
10841
+ ...result.suggestion !== void 0 && { suggestion: result.suggestion }
10842
+ };
10843
+ console.log(JSON.stringify(payload));
10844
+ process.exit(result.valid ? ExitCode.SUCCESS : ExitCode.VALIDATION_FAILED);
10845
+ }
10846
+ if (result.valid) {
10847
+ logger.success(`Branch name "${branchName}" is compliant.`);
10848
+ process.exit(ExitCode.SUCCESS);
10849
+ }
10850
+ logger.error(result.message || `Branch name "${branchName}" is not compliant.`);
10851
+ if (result.suggestion) {
10852
+ logger.info(`Suggestion: ${result.suggestion}`);
10853
+ }
10854
+ process.exit(ExitCode.VALIDATION_FAILED);
10855
+ }
10856
+ function createVerifyCommand() {
10857
+ return new Command93("verify").description(
10858
+ "Verify project conventions (currently: branch naming). Works with or without a harness.config.json."
10859
+ ).option(
10860
+ "--branch <name>",
10861
+ "Branch name to verify (defaults to HARNESS_BRANCH/GITHUB_HEAD_REF/current branch)"
10862
+ ).option("--json", "Emit machine-readable JSON output").action(async (opts, cmd) => {
10863
+ const globalOpts = cmd.optsWithGlobals();
10864
+ await runVerify({
10865
+ ...typeof globalOpts.config === "string" && { configPath: globalOpts.config },
10866
+ ...typeof opts.branch === "string" && { branch: opts.branch },
10867
+ json: opts.json === true || globalOpts.json === true
10868
+ });
10869
+ });
10870
+ }
10871
+
10782
10872
  // src/commands/_registry.ts
10783
10873
  var commandCreators = [
10784
10874
  createAddCommand,
@@ -10843,12 +10933,13 @@ var commandCreators = [
10843
10933
  createUninstallConstraintsCommand,
10844
10934
  createUpdateCommand,
10845
10935
  createUsageCommand,
10846
- createValidateCommand3
10936
+ createValidateCommand3,
10937
+ createVerifyCommand
10847
10938
  ];
10848
10939
 
10849
10940
  // src/index.ts
10850
10941
  function createProgram() {
10851
- const program = new Command93();
10942
+ const program = new Command94();
10852
10943
  program.name("harness").description("CLI for Harness Engineering toolkit").version(CLI_VERSION).option("-c, --config <path>", "Path to config file").option("--json", "Output as JSON").option("--verbose", "Verbose output").option("--quiet", "Minimal output");
10853
10944
  for (const creator of commandCreators) {
10854
10945
  program.addCommand(creator());
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-KET4QQZB.js";
4
4
  import {
5
5
  init_dist
6
- } from "./chunk-YNG7BWGB.js";
6
+ } from "./chunk-GDJ2MRYH.js";
7
7
  import {
8
8
  Err,
9
9
  Ok
@@ -7,10 +7,10 @@ import {
7
7
  import {
8
8
  findConfigFile,
9
9
  loadConfig
10
- } from "./chunk-DBJC4ULT.js";
10
+ } from "./chunk-KPWUZSHL.js";
11
11
  import {
12
12
  init_dist
13
- } from "./chunk-YNG7BWGB.js";
13
+ } from "./chunk-GDJ2MRYH.js";
14
14
  import {
15
15
  Ok
16
16
  } from "./chunk-RL4VMEXL.js";
@@ -35,7 +35,7 @@ var checkPerformanceDefinition = {
35
35
  };
36
36
  async function handleCheckPerformance(input) {
37
37
  try {
38
- const { EntropyAnalyzer } = await import("./dist-ZS3Y3YWP.js");
38
+ const { EntropyAnalyzer } = await import("./dist-ZJGFXGIB.js");
39
39
  const typeFilter = input.type ?? "all";
40
40
  const projectPath = sanitizePath(input.path);
41
41
  let entryPoints;
@@ -98,7 +98,7 @@ var getPerfBaselinesDefinition = {
98
98
  };
99
99
  async function handleGetPerfBaselines(input) {
100
100
  try {
101
- const { BaselineManager } = await import("./dist-ZS3Y3YWP.js");
101
+ const { BaselineManager } = await import("./dist-ZJGFXGIB.js");
102
102
  const manager = new BaselineManager(sanitizePath(input.path));
103
103
  const baselines = manager.load();
104
104
  return resultToMcpResponse(
@@ -146,7 +146,7 @@ var updatePerfBaselinesDefinition = {
146
146
  };
147
147
  async function handleUpdatePerfBaselines(input) {
148
148
  try {
149
- const { BaselineManager } = await import("./dist-ZS3Y3YWP.js");
149
+ const { BaselineManager } = await import("./dist-ZJGFXGIB.js");
150
150
  const manager = new BaselineManager(sanitizePath(input.path));
151
151
  manager.save(input.results, input.commitHash);
152
152
  const updated = manager.load();
@@ -176,7 +176,7 @@ var getCriticalPathsDefinition = {
176
176
  };
177
177
  async function handleGetCriticalPaths(input) {
178
178
  try {
179
- const { CriticalPathResolver } = await import("./dist-ZS3Y3YWP.js");
179
+ const { CriticalPathResolver } = await import("./dist-ZJGFXGIB.js");
180
180
  const resolver = new CriticalPathResolver(sanitizePath(input.path));
181
181
  const result = await resolver.resolve();
182
182
  return resultToMcpResponse(Ok(result));
@@ -50,7 +50,7 @@ async function handleAssessProject(input) {
50
50
  let validateResult = null;
51
51
  if (checksToRun.has("validate")) {
52
52
  try {
53
- const { handleValidateProject } = await import("./validate-GW2DG64P.js");
53
+ const { handleValidateProject } = await import("./validate-IDX6RI3U.js");
54
54
  const result = await handleValidateProject({ path: projectPath });
55
55
  const first = result.content[0];
56
56
  const parsed = first ? JSON.parse(first.text) : {};
@@ -75,7 +75,7 @@ async function handleAssessProject(input) {
75
75
  parallelChecks.push(
76
76
  (async () => {
77
77
  try {
78
- const { handleCheckDependencies } = await import("./architecture-544ISXDI.js");
78
+ const { handleCheckDependencies } = await import("./architecture-I2G7PNQB.js");
79
79
  const result = await handleCheckDependencies({ path: projectPath });
80
80
  const first = result.content[0];
81
81
  const parsed = first ? JSON.parse(first.text) : {};
@@ -102,7 +102,7 @@ async function handleAssessProject(input) {
102
102
  parallelChecks.push(
103
103
  (async () => {
104
104
  try {
105
- const { handleCheckDocs } = await import("./docs-VW2KDPI3.js");
105
+ const { handleCheckDocs } = await import("./docs-7CW7WUFB.js");
106
106
  const result = await handleCheckDocs({ path: projectPath, scope: "coverage" });
107
107
  const first = result.content[0];
108
108
  const parsed = first ? JSON.parse(first.text) : {};
@@ -129,7 +129,7 @@ async function handleAssessProject(input) {
129
129
  parallelChecks.push(
130
130
  (async () => {
131
131
  try {
132
- const { handleDetectEntropy } = await import("./entropy-P62LCVJI.js");
132
+ const { handleDetectEntropy } = await import("./entropy-P6QELTFA.js");
133
133
  const result = await handleDetectEntropy({ path: projectPath, type: "all" });
134
134
  const first = result.content[0];
135
135
  const parsed = first ? JSON.parse(first.text) : {};
@@ -156,7 +156,7 @@ async function handleAssessProject(input) {
156
156
  parallelChecks.push(
157
157
  (async () => {
158
158
  try {
159
- const { handleRunSecurityScan } = await import("./security-IMFAE6MW.js");
159
+ const { handleRunSecurityScan } = await import("./security-ZSU643D7.js");
160
160
  const result = await handleRunSecurityScan({ path: projectPath });
161
161
  const first = result.content[0];
162
162
  const parsed = first ? JSON.parse(first.text) : {};
@@ -188,7 +188,7 @@ async function handleAssessProject(input) {
188
188
  parallelChecks.push(
189
189
  (async () => {
190
190
  try {
191
- const { handleCheckPerformance } = await import("./performance-5HQG3IU6.js");
191
+ const { handleCheckPerformance } = await import("./performance-7X3EFAOD.js");
192
192
  const result = await handleCheckPerformance({ path: projectPath });
193
193
  if ("isError" in result && result.isError) {
194
194
  const msg = result.content[0]?.text ?? "Performance check failed";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  generateCIWorkflow
3
- } from "./chunk-DHWFOHPX.js";
4
- import "./chunk-YNG7BWGB.js";
3
+ } from "./chunk-DJRRTZGD.js";
4
+ import "./chunk-GDJ2MRYH.js";
5
5
  import "./chunk-RL4VMEXL.js";
6
6
  import "./chunk-XPRGWHBL.js";
7
7
  import "./chunk-KFQGP6VL.js";
@@ -428,6 +428,7 @@ import {
428
428
  validateAgentConfigs,
429
429
  validateAgentsMap,
430
430
  validateBoundaries,
431
+ validateBranchName,
431
432
  validateCommitMessage,
432
433
  validateConfig,
433
434
  validateDependencies,
@@ -447,7 +448,7 @@ import {
447
448
  writeSessionSummary,
448
449
  writeTaint,
449
450
  xssRules
450
- } from "./chunk-YNG7BWGB.js";
451
+ } from "./chunk-GDJ2MRYH.js";
451
452
  import {
452
453
  DEFAULT_SKILL_CONTEXT_BUDGET,
453
454
  Err,
@@ -896,6 +897,7 @@ export {
896
897
  validateAgentConfigs,
897
898
  validateAgentsMap,
898
899
  validateBoundaries,
900
+ validateBranchName,
899
901
  validateCommitMessage,
900
902
  validateConfig,
901
903
  validateDependencies,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  checkDocsDefinition,
3
3
  handleCheckDocs
4
- } from "./chunk-22OKI5QI.js";
4
+ } from "./chunk-MQRKPF46.js";
5
5
  import "./chunk-EPUKTTJZ.js";
6
6
  import "./chunk-W6Y7ZW3Y.js";
7
- import "./chunk-DBJC4ULT.js";
7
+ import "./chunk-KPWUZSHL.js";
8
8
  import "./chunk-ZCZD7FHU.js";
9
- import "./chunk-YNG7BWGB.js";
9
+ import "./chunk-GDJ2MRYH.js";
10
10
  import "./chunk-RL4VMEXL.js";
11
11
  import "./chunk-XPRGWHBL.js";
12
12
  import "./chunk-3WGJMBKH.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  TemplateEngine
3
- } from "./chunk-JMACX5FN.js";
4
- import "./chunk-YNG7BWGB.js";
3
+ } from "./chunk-54JTO4NZ.js";
4
+ import "./chunk-GDJ2MRYH.js";
5
5
  import "./chunk-RL4VMEXL.js";
6
6
  import "./chunk-XPRGWHBL.js";
7
7
  import "./chunk-KFQGP6VL.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  detectEntropyDefinition,
3
3
  handleDetectEntropy
4
- } from "./chunk-YI6NTL72.js";
4
+ } from "./chunk-27EHWQPK.js";
5
5
  import "./chunk-EPUKTTJZ.js";
6
6
  import "./chunk-W6Y7ZW3Y.js";
7
- import "./chunk-YNG7BWGB.js";
7
+ import "./chunk-GDJ2MRYH.js";
8
8
  import "./chunk-RL4VMEXL.js";
9
9
  import "./chunk-XPRGWHBL.js";
10
10
  import "./chunk-KFQGP6VL.js";
@@ -5,7 +5,7 @@ import {
5
5
  handleCreateSelfReview,
6
6
  handleRequestPeerReview,
7
7
  requestPeerReviewDefinition
8
- } from "./chunk-R6GLLMRZ.js";
8
+ } from "./chunk-4XB37LST.js";
9
9
  import "./chunk-EPUKTTJZ.js";
10
10
  import "./chunk-W6Y7ZW3Y.js";
11
11
  import "./chunk-KFQGP6VL.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createGenerateAgentDefinitionsCommand,
3
3
  generateAgentDefinitions
4
- } from "./chunk-LBYGGNEZ.js";
4
+ } from "./chunk-RYVL76ZF.js";
5
5
  import "./chunk-KET4QQZB.js";
6
- import "./chunk-KT5PWWWO.js";
6
+ import "./chunk-JGPOQJ73.js";
7
7
  import "./chunk-3ISINLYT.js";
8
8
  import "./chunk-6B6UN6SG.js";
9
- import "./chunk-YNG7BWGB.js";
9
+ import "./chunk-GDJ2MRYH.js";
10
10
  import "./chunk-RL4VMEXL.js";
11
11
  import "./chunk-XPRGWHBL.js";
12
12
  import "./chunk-3WGJMBKH.js";