@harness-engineering/cli 1.10.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/agents/skills/claude-code/enforce-architecture/SKILL.md +4 -0
  2. package/dist/agents/skills/claude-code/harness-parallel-agents/SKILL.md +105 -20
  3. package/dist/agents/skills/claude-code/harness-pre-commit-review/SKILL.md +37 -0
  4. package/dist/agents/skills/gemini-cli/enforce-architecture/SKILL.md +4 -0
  5. package/dist/agents/skills/gemini-cli/harness-parallel-agents/SKILL.md +105 -20
  6. package/dist/agents/skills/gemini-cli/harness-pre-commit-review/SKILL.md +37 -0
  7. package/dist/{agents-md-EMRFLNBC.js → agents-md-ZFV6RR5J.js} +1 -1
  8. package/dist/{architecture-5JNN5L3M.js → architecture-EXNUMH5R.js} +2 -2
  9. package/dist/bin/harness-mcp.js +14 -14
  10. package/dist/bin/harness.js +20 -20
  11. package/dist/{check-phase-gate-WOKIYGAM.js → check-phase-gate-VZFOY2PO.js} +4 -4
  12. package/dist/{chunk-7X7ZAYMY.js → chunk-2NCIKJES.js} +102 -5
  13. package/dist/{chunk-OPXH4CQN.js → chunk-2YPZKGAG.js} +1 -1
  14. package/dist/{chunk-NX6DSZSM.js → chunk-2YSQOUHO.js} +4483 -2668
  15. package/dist/{chunk-B7HFEHWP.js → chunk-3WGJMBKH.js} +10 -0
  16. package/dist/{chunk-ECUJQS3B.js → chunk-6N4R6FVX.js} +3 -3
  17. package/dist/chunk-EBJQ6N4M.js +39 -0
  18. package/dist/{chunk-46YA6FI3.js → chunk-GNGELAXY.js} +2 -2
  19. package/dist/{chunk-FPIPT36X.js → chunk-GSIVNYVJ.js} +6 -6
  20. package/dist/{chunk-EOLRW32Q.js → chunk-HD4IBGLA.js} +9 -1
  21. package/dist/{chunk-LXU5M77O.js → chunk-I6JZYEGT.js} +390 -57
  22. package/dist/{chunk-F3YDAJFQ.js → chunk-L2KLU56K.js} +2 -2
  23. package/dist/{chunk-F4PTVZWA.js → chunk-NC6PXVWT.js} +7 -7
  24. package/dist/{chunk-4PFMY3H7.js → chunk-PA2XHK75.js} +9 -9
  25. package/dist/{chunk-MO4YQOMB.js → chunk-TI4TGEX6.js} +3 -3
  26. package/dist/{chunk-MDUK2J2O.js → chunk-VRFZWGMS.js} +2 -1
  27. package/dist/{chunk-FX7SQHGD.js → chunk-WJZDO6OY.js} +2 -2
  28. package/dist/{chunk-PMTFPOCT.js → chunk-WUJTCNOU.js} +1 -1
  29. package/dist/{chunk-PSXF277V.js → chunk-X3MN5UQJ.js} +1 -1
  30. package/dist/{chunk-CWZ4Y2PO.js → chunk-Z75JC6I2.js} +4 -4
  31. package/dist/{chunk-PAHHT2IK.js → chunk-ZWC3MN5E.js} +1707 -294
  32. package/dist/{ci-workflow-ZBBUNTHQ.js → ci-workflow-K5RCRNYR.js} +1 -1
  33. package/dist/create-skill-WPXHSLX2.js +11 -0
  34. package/dist/{dist-PBTNVK6K.js → dist-JVZ2MKBC.js} +101 -1
  35. package/dist/{dist-I7DB5VKB.js → dist-M6BQODWC.js} +1145 -0
  36. package/dist/{docs-PTJGD6XI.js → docs-PWCUVYWU.js} +2 -2
  37. package/dist/{engine-SCMZ3G3E.js → engine-6XUP6GAK.js} +1 -1
  38. package/dist/{entropy-YIUBGKY7.js → entropy-4I6JEYAC.js} +2 -2
  39. package/dist/{feedback-WEVQSLAA.js → feedback-TNIW534S.js} +1 -1
  40. package/dist/{generate-agent-definitions-BU5LOJTI.js → generate-agent-definitions-MWKEA5NU.js} +4 -4
  41. package/dist/{graph-loader-RLO3KRIX.js → graph-loader-KO4GJ5N2.js} +1 -1
  42. package/dist/index.d.ts +318 -12
  43. package/dist/index.js +29 -21
  44. package/dist/{loader-6S6PVGSF.js → loader-4FIPIFII.js} +1 -1
  45. package/dist/mcp-MOKLYNZL.js +34 -0
  46. package/dist/{performance-5TVW6SA6.js → performance-BTOJCPXU.js} +2 -2
  47. package/dist/{review-pipeline-4JTQAWKW.js → review-pipeline-3YTW3463.js} +1 -1
  48. package/dist/{runtime-PXIM7UV6.js → runtime-GO7K2PJE.js} +1 -1
  49. package/dist/{security-URYTKLGK.js → security-4P2GGFF6.js} +1 -1
  50. package/dist/skill-executor-RG45LUO5.js +8 -0
  51. package/dist/templates/orchestrator/WORKFLOW.md +48 -0
  52. package/dist/templates/orchestrator/template.json +6 -0
  53. package/dist/{validate-KSDUUK2M.js → validate-JN44D2Q7.js} +2 -2
  54. package/dist/{validate-cross-check-WZAX357V.js → validate-cross-check-DB7RIFFF.js} +1 -1
  55. package/package.json +10 -6
  56. package/dist/chunk-HIOXKZYF.js +0 -15
  57. package/dist/create-skill-LUWO46WF.js +0 -11
  58. package/dist/mcp-BNLBTCXZ.js +0 -34
  59. package/dist/skill-executor-KVS47DAU.js +0 -8
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Command } from 'commander';
2
2
  import { ContextQLResult, IngestResult } from '@harness-engineering/graph';
3
- import { Result } from '@harness-engineering/core';
3
+ import { Result, Violation } from '@harness-engineering/core';
4
4
  import { z } from 'zod';
5
5
  import { Server } from '@modelcontextprotocol/sdk/server/index.js';
6
6
 
@@ -52,23 +52,40 @@ declare function runGraphStatus(projectPath: string): Promise<GraphStatusResult>
52
52
  declare function runGraphExport(projectPath: string, format: string): Promise<string>;
53
53
 
54
54
  /**
55
- * CLI Exit Codes
55
+ * Standard exit codes for the Harness CLI.
56
56
  */
57
57
  declare const ExitCode: {
58
+ /** Command completed successfully */
58
59
  readonly SUCCESS: 0;
60
+ /** Command failed because of a validation error (e.g. check-docs found issues) */
59
61
  readonly VALIDATION_FAILED: 1;
62
+ /** Command failed because of an unexpected error or misconfiguration */
60
63
  readonly ERROR: 2;
61
64
  };
65
+ /**
66
+ * Type representing one of the supported exit codes.
67
+ */
62
68
  type ExitCodeType = (typeof ExitCode)[keyof typeof ExitCode];
63
69
  /**
64
- * CLI-specific error with exit code
70
+ * Custom error class for CLI-specific failures.
71
+ * Includes an exit code that should be used when terminating the process.
65
72
  */
66
73
  declare class CLIError extends Error {
74
+ /** The exit code associated with this error */
67
75
  readonly exitCode: ExitCodeType;
76
+ /**
77
+ * Creates a new CLIError.
78
+ *
79
+ * @param message - Human-readable error message.
80
+ * @param exitCode - Exit code to use when process terminates. Defaults to ExitCode.ERROR.
81
+ */
68
82
  constructor(message: string, exitCode?: ExitCodeType);
69
83
  }
70
84
  /**
71
- * Handle error and exit process
85
+ * Handles an error by logging it to stderr and exiting the process with the appropriate code.
86
+ *
87
+ * @param error - The error to handle.
88
+ * @throws Never returns, as it terminates the process.
72
89
  */
73
90
  declare function handleError(error: unknown): never;
74
91
 
@@ -143,59 +160,138 @@ declare function generateSlashCommands(opts: GenerateOptions): GenerateResult[];
143
160
 
144
161
  interface SkillSource {
145
162
  dir: string;
146
- source: 'project' | 'global';
163
+ source: 'project' | 'community' | 'global';
147
164
  }
148
165
 
166
+ /**
167
+ * Supported output modes for the CLI.
168
+ */
149
169
  declare const OutputMode: {
170
+ /** Output as formatted JSON */
150
171
  readonly JSON: "json";
172
+ /** Output as human-readable text */
151
173
  readonly TEXT: "text";
174
+ /** Minimal output, only errors and successes */
152
175
  readonly QUIET: "quiet";
176
+ /** Full output with detailed context and suggestions */
153
177
  readonly VERBOSE: "verbose";
154
178
  };
179
+ /**
180
+ * Type representing one of the supported output modes.
181
+ */
155
182
  type OutputModeType = (typeof OutputMode)[keyof typeof OutputMode];
183
+ /**
184
+ * Represents a single issue discovered during validation.
185
+ */
156
186
  interface ValidationIssue {
187
+ /** The file where the issue was found */
157
188
  file?: string;
189
+ /** A human-readable description of the issue */
158
190
  message: string;
191
+ /** The line number where the issue occurs */
159
192
  line?: number;
193
+ /** A suggested fix or next step */
160
194
  suggestion?: string;
161
195
  }
196
+ /**
197
+ * The result of a validation operation.
198
+ */
162
199
  interface ValidationResult {
200
+ /** Whether the validation passed overall */
163
201
  valid: boolean;
202
+ /** A list of issues found during validation */
164
203
  issues: ValidationIssue[];
165
204
  }
205
+ /**
206
+ * Formats data and results for CLI output based on the selected mode.
207
+ */
166
208
  declare class OutputFormatter {
167
209
  private mode;
210
+ /**
211
+ * Creates a new OutputFormatter.
212
+ *
213
+ * @param mode - The output mode to use. Defaults to TEXT.
214
+ */
168
215
  constructor(mode?: OutputModeType);
169
216
  /**
170
- * Format raw data (for JSON mode)
217
+ * Formats raw data for output.
218
+ *
219
+ * @param data - The data to format.
220
+ * @returns A string representation of the data based on the current mode.
171
221
  */
172
222
  format(data: unknown): string;
173
223
  /**
174
- * Format validation result
224
+ * Formats a validation result into a user-friendly string.
225
+ *
226
+ * @param result - The validation result to format.
227
+ * @returns A formatted string containing the validation status and any issues.
175
228
  */
176
229
  formatValidation(result: ValidationResult): string;
177
230
  /**
178
- * Format a summary line
231
+ * Formats a summary line with a success/failure icon and label.
232
+ *
233
+ * @param label - The name of the field to summarize.
234
+ * @param value - The value to display.
235
+ * @param success - Whether the summary represents a success or failure state.
236
+ * @returns A formatted summary string, or an empty string in JSON or QUIET modes.
179
237
  */
180
238
  formatSummary(label: string, value: string | number, success: boolean): string;
181
239
  }
182
240
 
241
+ /**
242
+ * Simple logger for CLI output with color-coded icons.
243
+ */
183
244
  declare const logger: {
245
+ /**
246
+ * Logs an informational message with a blue 'i' icon.
247
+ * @param message - The message to log.
248
+ */
184
249
  info: (message: string) => void;
250
+ /**
251
+ * Logs a success message with a green 'v' icon.
252
+ * @param message - The message to log.
253
+ */
185
254
  success: (message: string) => void;
255
+ /**
256
+ * Logs a warning message with a yellow '!' icon.
257
+ * @param message - The message to log.
258
+ */
186
259
  warn: (message: string) => void;
260
+ /**
261
+ * Logs an error message with a red 'x' icon to stderr.
262
+ * @param message - The message to log.
263
+ */
187
264
  error: (message: string) => void;
265
+ /**
266
+ * Logs a dimmed message.
267
+ * @param message - The message to log.
268
+ */
188
269
  dim: (message: string) => void;
270
+ /**
271
+ * Logs raw data as a formatted JSON string.
272
+ * Useful for JSON output mode.
273
+ * @param data - The data to log.
274
+ */
189
275
  raw: (data: unknown) => void;
190
276
  };
191
277
 
278
+ /**
279
+ * The main Harness configuration schema.
280
+ */
192
281
  declare const HarnessConfigSchema: z.ZodObject<{
282
+ /** Configuration schema version */
193
283
  version: z.ZodLiteral<1>;
284
+ /** Human-readable name of the project */
194
285
  name: z.ZodOptional<z.ZodString>;
286
+ /** Root directory of the project, relative to the config file */
195
287
  rootDir: z.ZodDefault<z.ZodString>;
288
+ /** Layered architecture definitions */
196
289
  layers: z.ZodOptional<z.ZodArray<z.ZodObject<{
290
+ /** Human-readable name of the layer */
197
291
  name: z.ZodString;
292
+ /** Glob pattern matching files in this layer */
198
293
  pattern: z.ZodString;
294
+ /** Names of other layers this layer is allowed to import from */
199
295
  allowedDependencies: z.ZodArray<z.ZodString, "many">;
200
296
  }, "strip", z.ZodTypeAny, {
201
297
  name: string;
@@ -206,9 +302,13 @@ declare const HarnessConfigSchema: z.ZodObject<{
206
302
  pattern: string;
207
303
  allowedDependencies: string[];
208
304
  }>, "many">>;
305
+ /** Rules for forbidden cross-module imports */
209
306
  forbiddenImports: z.ZodOptional<z.ZodArray<z.ZodObject<{
307
+ /** Glob pattern matching source files this rule applies to */
210
308
  from: z.ZodString;
309
+ /** List of modules or patterns that are not allowed to be imported */
211
310
  disallow: z.ZodArray<z.ZodString, "many">;
311
+ /** Optional custom message to display on violation */
212
312
  message: z.ZodOptional<z.ZodString>;
213
313
  }, "strip", z.ZodTypeAny, {
214
314
  from: string;
@@ -219,18 +319,26 @@ declare const HarnessConfigSchema: z.ZodObject<{
219
319
  disallow: string[];
220
320
  message?: string | undefined;
221
321
  }>, "many">>;
322
+ /** Boundary enforcement settings */
222
323
  boundaries: z.ZodOptional<z.ZodObject<{
324
+ /** List of globs where files MUST have a corresponding schema/definition */
223
325
  requireSchema: z.ZodArray<z.ZodString, "many">;
224
326
  }, "strip", z.ZodTypeAny, {
225
327
  requireSchema: string[];
226
328
  }, {
227
329
  requireSchema: string[];
228
330
  }>>;
331
+ /** Path to the project's knowledge map (AGENTS.md) */
229
332
  agentsMapPath: z.ZodDefault<z.ZodString>;
333
+ /** Directory containing project documentation */
230
334
  docsDir: z.ZodDefault<z.ZodString>;
335
+ /** Agent orchestration settings */
231
336
  agent: z.ZodOptional<z.ZodObject<{
337
+ /** The execution environment for agents */
232
338
  executor: z.ZodDefault<z.ZodEnum<["subprocess", "cloud", "noop"]>>;
339
+ /** Maximum execution time in milliseconds */
233
340
  timeout: z.ZodDefault<z.ZodNumber>;
341
+ /** Optional list of skill IDs pre-authorized for the agent */
234
342
  skills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
235
343
  }, "strip", z.ZodTypeAny, {
236
344
  executor: "subprocess" | "cloud" | "noop";
@@ -241,8 +349,11 @@ declare const HarnessConfigSchema: z.ZodObject<{
241
349
  timeout?: number | undefined;
242
350
  skills?: string[] | undefined;
243
351
  }>>;
352
+ /** Drift and stale code management settings */
244
353
  entropy: z.ZodOptional<z.ZodObject<{
354
+ /** Patterns to exclude from entropy analysis */
245
355
  excludePatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
356
+ /** Whether to automatically attempt to fix simple entropy issues */
246
357
  autoFix: z.ZodDefault<z.ZodBoolean>;
247
358
  }, "strip", z.ZodTypeAny, {
248
359
  excludePatterns: string[];
@@ -251,38 +362,65 @@ declare const HarnessConfigSchema: z.ZodObject<{
251
362
  excludePatterns?: string[] | undefined;
252
363
  autoFix?: boolean | undefined;
253
364
  }>>;
365
+ /** Security scanning configuration */
254
366
  security: z.ZodOptional<z.ZodObject<{
367
+ /** Whether security scanning is enabled */
255
368
  enabled: z.ZodDefault<z.ZodBoolean>;
369
+ /** Whether to fail on any security warning */
256
370
  strict: z.ZodDefault<z.ZodBoolean>;
371
+ /** Rule-specific severity overrides */
257
372
  rules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["off", "error", "warning", "info"]>>>;
373
+ /** Patterns to exclude from security scans */
258
374
  exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
259
375
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
376
+ /** Whether security scanning is enabled */
260
377
  enabled: z.ZodDefault<z.ZodBoolean>;
378
+ /** Whether to fail on any security warning */
261
379
  strict: z.ZodDefault<z.ZodBoolean>;
380
+ /** Rule-specific severity overrides */
262
381
  rules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["off", "error", "warning", "info"]>>>;
382
+ /** Patterns to exclude from security scans */
263
383
  exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
264
384
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
385
+ /** Whether security scanning is enabled */
265
386
  enabled: z.ZodDefault<z.ZodBoolean>;
387
+ /** Whether to fail on any security warning */
266
388
  strict: z.ZodDefault<z.ZodBoolean>;
389
+ /** Rule-specific severity overrides */
267
390
  rules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["off", "error", "warning", "info"]>>>;
391
+ /** Patterns to exclude from security scans */
268
392
  exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
269
393
  }, z.ZodTypeAny, "passthrough">>>;
394
+ /** Performance and complexity budget settings */
270
395
  performance: z.ZodOptional<z.ZodObject<{
396
+ /** Complexity thresholds per module or pattern */
271
397
  complexity: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
398
+ /** Coupling limits between modules */
272
399
  coupling: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
400
+ /** Size budget for bundles or directories */
273
401
  sizeBudget: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
274
402
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
403
+ /** Complexity thresholds per module or pattern */
275
404
  complexity: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
405
+ /** Coupling limits between modules */
276
406
  coupling: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
407
+ /** Size budget for bundles or directories */
277
408
  sizeBudget: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
278
409
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
410
+ /** Complexity thresholds per module or pattern */
279
411
  complexity: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
412
+ /** Coupling limits between modules */
280
413
  coupling: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
414
+ /** Size budget for bundles or directories */
281
415
  sizeBudget: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
282
416
  }, z.ZodTypeAny, "passthrough">>>;
417
+ /** Project template settings (used by 'harness init') */
283
418
  template: z.ZodOptional<z.ZodObject<{
419
+ /** Complexity level of the template */
284
420
  level: z.ZodEnum<["basic", "intermediate", "advanced"]>;
421
+ /** Primary technology framework */
285
422
  framework: z.ZodOptional<z.ZodString>;
423
+ /** Template version */
286
424
  version: z.ZodNumber;
287
425
  }, "strip", z.ZodTypeAny, {
288
426
  version: number;
@@ -293,11 +431,17 @@ declare const HarnessConfigSchema: z.ZodObject<{
293
431
  level: "basic" | "intermediate" | "advanced";
294
432
  framework?: string | undefined;
295
433
  }>>;
434
+ /** Phase gate and readiness check configuration */
296
435
  phaseGates: z.ZodOptional<z.ZodObject<{
436
+ /** Whether phase gate checks are enabled */
297
437
  enabled: z.ZodDefault<z.ZodBoolean>;
438
+ /** Severity level when a phase gate check fails */
298
439
  severity: z.ZodDefault<z.ZodEnum<["error", "warning"]>>;
440
+ /** List of implementation-to-spec mappings */
299
441
  mappings: z.ZodDefault<z.ZodArray<z.ZodObject<{
442
+ /** Pattern for implementation files */
300
443
  implPattern: z.ZodString;
444
+ /** Pattern for corresponding specification files */
301
445
  specPattern: z.ZodString;
302
446
  }, "strip", z.ZodTypeAny, {
303
447
  implPattern: string;
@@ -321,10 +465,15 @@ declare const HarnessConfigSchema: z.ZodObject<{
321
465
  specPattern: string;
322
466
  }[] | undefined;
323
467
  }>>;
468
+ /** Design system consistency settings */
324
469
  design: z.ZodOptional<z.ZodObject<{
470
+ /** Strictness of design system enforcement */
325
471
  strictness: z.ZodDefault<z.ZodEnum<["strict", "standard", "permissive"]>>;
472
+ /** Supported target platforms */
326
473
  platforms: z.ZodDefault<z.ZodArray<z.ZodEnum<["web", "mobile"]>, "many">>;
474
+ /** Path to design tokens (e.g. JSON or CSS) */
327
475
  tokenPath: z.ZodOptional<z.ZodString>;
476
+ /** Brief description of the intended aesthetic direction */
328
477
  aestheticIntent: z.ZodOptional<z.ZodString>;
329
478
  }, "strip", z.ZodTypeAny, {
330
479
  strictness: "strict" | "standard" | "permissive";
@@ -337,21 +486,37 @@ declare const HarnessConfigSchema: z.ZodObject<{
337
486
  tokenPath?: string | undefined;
338
487
  aestheticIntent?: string | undefined;
339
488
  }>>;
489
+ /** Internationalization (i18n) settings */
340
490
  i18n: z.ZodOptional<z.ZodObject<{
491
+ /** Whether i18n management is enabled */
341
492
  enabled: z.ZodDefault<z.ZodBoolean>;
493
+ /** Strictness of i18n rule enforcement */
342
494
  strictness: z.ZodDefault<z.ZodEnum<["strict", "standard", "permissive"]>>;
495
+ /** The primary language used for development */
343
496
  sourceLocale: z.ZodDefault<z.ZodString>;
497
+ /** List of locales that translations are required for */
344
498
  targetLocales: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
499
+ /** The i18n framework in use */
345
500
  framework: z.ZodDefault<z.ZodEnum<["auto", "i18next", "react-intl", "vue-i18n", "flutter-intl", "apple", "android", "custom"]>>;
501
+ /** Storage format for translation files */
346
502
  format: z.ZodDefault<z.ZodString>;
503
+ /** Syntax used for message formatting */
347
504
  messageFormat: z.ZodDefault<z.ZodEnum<["icu", "i18next", "custom"]>>;
505
+ /** Convention for translation keys */
348
506
  keyConvention: z.ZodDefault<z.ZodEnum<["dot-notation", "snake_case", "camelCase", "custom"]>>;
507
+ /** Mapping of locales to their file paths */
349
508
  translationPaths: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
509
+ /** Platforms targeted by this configuration */
350
510
  platforms: z.ZodDefault<z.ZodArray<z.ZodEnum<["web", "mobile", "backend"]>, "many">>;
511
+ /** Industry vertical (for contextual translations) */
351
512
  industry: z.ZodOptional<z.ZodString>;
513
+ /** Translation coverage requirements */
352
514
  coverage: z.ZodOptional<z.ZodObject<{
515
+ /** Minimum required translation percentage */
353
516
  minimumPercent: z.ZodDefault<z.ZodNumber>;
517
+ /** Whether plural forms are required for all keys */
354
518
  requirePlurals: z.ZodDefault<z.ZodBoolean>;
519
+ /** Whether to detect untranslated strings in source code */
355
520
  detectUntranslated: z.ZodDefault<z.ZodBoolean>;
356
521
  }, "strip", z.ZodTypeAny, {
357
522
  minimumPercent: number;
@@ -362,9 +527,13 @@ declare const HarnessConfigSchema: z.ZodObject<{
362
527
  requirePlurals?: boolean | undefined;
363
528
  detectUntranslated?: boolean | undefined;
364
529
  }>>;
530
+ /** Locale used for pseudo-localization testing */
365
531
  pseudoLocale: z.ZodOptional<z.ZodString>;
532
+ /** MCP server for AI-assisted translation */
366
533
  mcp: z.ZodOptional<z.ZodObject<{
534
+ /** Name or URL of the MCP server */
367
535
  server: z.ZodString;
536
+ /** Project ID on the remote i18n platform */
368
537
  projectId: z.ZodOptional<z.ZodString>;
369
538
  }, "strip", z.ZodTypeAny, {
370
539
  server: string;
@@ -418,10 +587,15 @@ declare const HarnessConfigSchema: z.ZodObject<{
418
587
  projectId?: string | undefined;
419
588
  } | undefined;
420
589
  }>>;
590
+ /** Code review settings */
421
591
  review: z.ZodOptional<z.ZodObject<{
592
+ /** Custom model tier mappings for reviewers */
422
593
  model_tiers: z.ZodOptional<z.ZodObject<{
594
+ /** Model ID to use for fast/cheap operations */
423
595
  fast: z.ZodOptional<z.ZodString>;
596
+ /** Model ID to use for standard reasoning tasks */
424
597
  standard: z.ZodOptional<z.ZodString>;
598
+ /** Model ID to use for complex/critical analysis */
425
599
  strong: z.ZodOptional<z.ZodString>;
426
600
  }, "strip", z.ZodTypeAny, {
427
601
  standard?: string | undefined;
@@ -445,6 +619,24 @@ declare const HarnessConfigSchema: z.ZodObject<{
445
619
  strong?: string | undefined;
446
620
  } | undefined;
447
621
  }>>;
622
+ /** General architectural enforcement settings */
623
+ architecture: z.ZodOptional<z.ZodObject<{
624
+ enabled: z.ZodDefault<z.ZodBoolean>;
625
+ baselinePath: z.ZodDefault<z.ZodString>;
626
+ thresholds: z.ZodDefault<z.ZodRecord<z.ZodEnum<["circular-deps", "layer-violations", "complexity", "coupling", "forbidden-imports", "module-size", "dependency-depth"]>, z.ZodUnion<[z.ZodNumber, z.ZodRecord<z.ZodString, z.ZodNumber>]>>>;
627
+ modules: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodEnum<["circular-deps", "layer-violations", "complexity", "coupling", "forbidden-imports", "module-size", "dependency-depth"]>, z.ZodUnion<[z.ZodNumber, z.ZodRecord<z.ZodString, z.ZodNumber>]>>>>;
628
+ }, "strip", z.ZodTypeAny, {
629
+ thresholds: Partial<Record<"complexity" | "coupling" | "circular-deps" | "layer-violations" | "forbidden-imports" | "module-size" | "dependency-depth", number | Record<string, number>>>;
630
+ modules: Record<string, Partial<Record<"complexity" | "coupling" | "circular-deps" | "layer-violations" | "forbidden-imports" | "module-size" | "dependency-depth", number | Record<string, number>>>>;
631
+ enabled: boolean;
632
+ baselinePath: string;
633
+ }, {
634
+ thresholds?: Partial<Record<"complexity" | "coupling" | "circular-deps" | "layer-violations" | "forbidden-imports" | "module-size" | "dependency-depth", number | Record<string, number>>> | undefined;
635
+ modules?: Record<string, Partial<Record<"complexity" | "coupling" | "circular-deps" | "layer-violations" | "forbidden-imports" | "module-size" | "dependency-depth", number | Record<string, number>>>> | undefined;
636
+ enabled?: boolean | undefined;
637
+ baselinePath?: string | undefined;
638
+ }>>;
639
+ /** How often (in ms) to check for CLI updates */
448
640
  updateCheckInterval: z.ZodOptional<z.ZodNumber>;
449
641
  }, "strip", z.ZodTypeAny, {
450
642
  version: 1;
@@ -475,14 +667,21 @@ declare const HarnessConfigSchema: z.ZodObject<{
475
667
  autoFix: boolean;
476
668
  } | undefined;
477
669
  security?: z.objectOutputType<{
670
+ /** Whether security scanning is enabled */
478
671
  enabled: z.ZodDefault<z.ZodBoolean>;
672
+ /** Whether to fail on any security warning */
479
673
  strict: z.ZodDefault<z.ZodBoolean>;
674
+ /** Rule-specific severity overrides */
480
675
  rules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["off", "error", "warning", "info"]>>>;
676
+ /** Patterns to exclude from security scans */
481
677
  exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
482
678
  }, z.ZodTypeAny, "passthrough"> | undefined;
483
679
  performance?: z.objectOutputType<{
680
+ /** Complexity thresholds per module or pattern */
484
681
  complexity: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
682
+ /** Coupling limits between modules */
485
683
  coupling: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
684
+ /** Size budget for bundles or directories */
486
685
  sizeBudget: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
487
686
  }, z.ZodTypeAny, "passthrough"> | undefined;
488
687
  template?: {
@@ -534,6 +733,12 @@ declare const HarnessConfigSchema: z.ZodObject<{
534
733
  strong?: string | undefined;
535
734
  } | undefined;
536
735
  } | undefined;
736
+ architecture?: {
737
+ thresholds: Partial<Record<"complexity" | "coupling" | "circular-deps" | "layer-violations" | "forbidden-imports" | "module-size" | "dependency-depth", number | Record<string, number>>>;
738
+ modules: Record<string, Partial<Record<"complexity" | "coupling" | "circular-deps" | "layer-violations" | "forbidden-imports" | "module-size" | "dependency-depth", number | Record<string, number>>>>;
739
+ enabled: boolean;
740
+ baselinePath: string;
741
+ } | undefined;
537
742
  updateCheckInterval?: number | undefined;
538
743
  }, {
539
744
  version: 1;
@@ -564,14 +769,21 @@ declare const HarnessConfigSchema: z.ZodObject<{
564
769
  autoFix?: boolean | undefined;
565
770
  } | undefined;
566
771
  security?: z.objectInputType<{
772
+ /** Whether security scanning is enabled */
567
773
  enabled: z.ZodDefault<z.ZodBoolean>;
774
+ /** Whether to fail on any security warning */
568
775
  strict: z.ZodDefault<z.ZodBoolean>;
776
+ /** Rule-specific severity overrides */
569
777
  rules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["off", "error", "warning", "info"]>>>;
778
+ /** Patterns to exclude from security scans */
570
779
  exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
571
780
  }, z.ZodTypeAny, "passthrough"> | undefined;
572
781
  performance?: z.objectInputType<{
782
+ /** Complexity thresholds per module or pattern */
573
783
  complexity: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
784
+ /** Coupling limits between modules */
574
785
  coupling: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
786
+ /** Size budget for bundles or directories */
575
787
  sizeBudget: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
576
788
  }, z.ZodTypeAny, "passthrough"> | undefined;
577
789
  template?: {
@@ -623,20 +835,40 @@ declare const HarnessConfigSchema: z.ZodObject<{
623
835
  strong?: string | undefined;
624
836
  } | undefined;
625
837
  } | undefined;
838
+ architecture?: {
839
+ thresholds?: Partial<Record<"complexity" | "coupling" | "circular-deps" | "layer-violations" | "forbidden-imports" | "module-size" | "dependency-depth", number | Record<string, number>>> | undefined;
840
+ modules?: Record<string, Partial<Record<"complexity" | "coupling" | "circular-deps" | "layer-violations" | "forbidden-imports" | "module-size" | "dependency-depth", number | Record<string, number>>>> | undefined;
841
+ enabled?: boolean | undefined;
842
+ baselinePath?: string | undefined;
843
+ } | undefined;
626
844
  updateCheckInterval?: number | undefined;
627
845
  }>;
846
+ /**
847
+ * Type representing the full Harness configuration.
848
+ */
628
849
  type HarnessConfig = z.infer<typeof HarnessConfigSchema>;
629
850
 
630
851
  /**
631
- * Find config file starting from given directory
852
+ * Searches for a Harness configuration file starting from the given directory
853
+ * and moving up the directory tree until the root is reached.
854
+ *
855
+ * @param startDir - The directory to start searching from. Defaults to current working directory.
856
+ * @returns An Ok result containing the absolute path to the config file, or an Err with a CLIError if not found.
632
857
  */
633
858
  declare function findConfigFile(startDir?: string): Result<string, CLIError>;
634
859
  /**
635
- * Load and validate config from file
860
+ * Loads and validates a Harness configuration from a JSON file.
861
+ *
862
+ * @param configPath - The path to the configuration file.
863
+ * @returns An Ok result with the validated HarnessConfig, or an Err with a CLIError if loading or validation fails.
636
864
  */
637
865
  declare function loadConfig(configPath: string): Result<HarnessConfig, CLIError>;
638
866
  /**
639
- * Load config from default location or specified path
867
+ * Resolves the Harness configuration by either loading from a specified path
868
+ * or searching for the default config file in the current directory tree.
869
+ *
870
+ * @param configPath - Optional path to a specific configuration file.
871
+ * @returns An Ok result with the resolved configuration, or an Err with a CLIError.
640
872
  */
641
873
  declare function resolveConfig(configPath?: string): Result<HarnessConfig, CLIError>;
642
874
 
@@ -988,6 +1220,39 @@ declare function renderClaudeCodeAgent(def: AgentDefinition): string;
988
1220
 
989
1221
  declare function renderGeminiAgent(def: AgentDefinition): string;
990
1222
 
1223
+ interface ImpactPreviewOptions {
1224
+ detailed?: boolean;
1225
+ perFile?: boolean;
1226
+ path?: string;
1227
+ }
1228
+ declare function runImpactPreview(options: ImpactPreviewOptions): Promise<string>;
1229
+
1230
+ interface CheckArchOptions {
1231
+ cwd?: string;
1232
+ configPath?: string;
1233
+ updateBaseline?: boolean;
1234
+ json?: boolean;
1235
+ module?: string;
1236
+ }
1237
+ interface CheckArchResult {
1238
+ passed: boolean;
1239
+ mode: 'baseline' | 'threshold-only';
1240
+ totalViolations: number;
1241
+ newViolations: Violation[];
1242
+ resolvedViolations: string[];
1243
+ preExisting: string[];
1244
+ regressions: Array<{
1245
+ category: string;
1246
+ baselineValue: number;
1247
+ currentValue: number;
1248
+ delta: number;
1249
+ }>;
1250
+ thresholdViolations: Violation[];
1251
+ baselineUpdated?: boolean;
1252
+ warning?: string;
1253
+ }
1254
+ declare function runCheckArch(options: CheckArchOptions): Promise<Result<CheckArchResult, CLIError>>;
1255
+
991
1256
  type ToolDefinition = {
992
1257
  name: string;
993
1258
  description: string;
@@ -997,6 +1262,47 @@ declare function getToolDefinitions(): ToolDefinition[];
997
1262
  declare function createHarnessServer(projectRoot?: string): Server;
998
1263
  declare function startServer(): Promise<void>;
999
1264
 
1265
+ interface InstallOptions {
1266
+ version?: string;
1267
+ force?: boolean;
1268
+ }
1269
+ interface InstallResult {
1270
+ installed: boolean;
1271
+ skipped?: boolean;
1272
+ upgraded?: boolean;
1273
+ name: string;
1274
+ version: string;
1275
+ previousVersion?: string;
1276
+ warnings?: string[];
1277
+ }
1278
+ declare function runInstall(skillName: string, options: InstallOptions): Promise<InstallResult>;
1279
+
1280
+ interface UninstallOptions {
1281
+ force?: boolean;
1282
+ }
1283
+ interface UninstallResult {
1284
+ removed: boolean;
1285
+ name: string;
1286
+ version: string;
1287
+ warnings?: string[];
1288
+ }
1289
+ declare function runUninstall(skillName: string, options: UninstallOptions): Promise<UninstallResult>;
1290
+
1291
+ /**
1292
+ * @harness-engineering/cli
1293
+ *
1294
+ * Command-line interface for the Harness Engineering toolkit.
1295
+ *
1296
+ * This package provides a unified `harness` command with subcommands for
1297
+ * validation, documentation management, dependency checking, and agent
1298
+ * orchestration.
1299
+ */
1300
+
1301
+ /**
1302
+ * Creates and configures the main Harness CLI program.
1303
+ *
1304
+ * @returns A Commander instance with all subcommands registered.
1305
+ */
1000
1306
  declare function createProgram(): Command;
1001
1307
 
1002
- export { AGENT_DESCRIPTIONS, ALLOWED_PERSONA_COMMANDS, type AgentDefinition, CLIError, type CommandExecutor, type CommandStep, type CreateSkillOptions, DEFAULT_TOOLS, ExitCode, GEMINI_TOOL_MAP, type GenerateAgentDefsOptions, type GenerateAgentDefsResult, type GenerateResult, type HandoffContext, type HarnessConfig, OutputFormatter, OutputMode, type Persona, type PersonaMetadata, type PersonaRunReport, type RenderedFiles, type SkillExecutionContext, type SkillExecutionResult, type SkillExecutor, type SkillSource, type SkillStep, type Step, type StepExecutionContext, type StepReport, type TemplateContext, TemplateEngine, type TriggerContext, type TriggerDetectionResult, buildPreamble, createHarnessServer, createProgram, detectTrigger, executeSkill, findConfigFile, generateAgentDefinition, generateAgentDefinitions, generateAgentsMd, generateCIWorkflow, generateRuntime, generateSkillFiles, generateSlashCommands, getToolDefinitions, handleError, listPersonas, loadConfig, loadPersona, logger, renderClaudeCodeAgent, renderGeminiAgent, resolveConfig, runCheckPhaseGate, runCrossCheck, runGraphExport, runGraphStatus, runIngest, runPersona, runQuery, runScan, startServer };
1308
+ export { AGENT_DESCRIPTIONS, ALLOWED_PERSONA_COMMANDS, type AgentDefinition, CLIError, type CheckArchResult, type CommandExecutor, type CommandStep, type CreateSkillOptions, DEFAULT_TOOLS, ExitCode, GEMINI_TOOL_MAP, type GenerateAgentDefsOptions, type GenerateAgentDefsResult, type GenerateResult, type HandoffContext, type HarnessConfig, type InstallResult, OutputFormatter, OutputMode, type Persona, type PersonaMetadata, type PersonaRunReport, type RenderedFiles, type SkillExecutionContext, type SkillExecutionResult, type SkillExecutor, type SkillSource, type SkillStep, type Step, type StepExecutionContext, type StepReport, type TemplateContext, TemplateEngine, type TriggerContext, type TriggerDetectionResult, type UninstallResult, buildPreamble, createHarnessServer, createProgram, detectTrigger, executeSkill, findConfigFile, generateAgentDefinition, generateAgentDefinitions, generateAgentsMd, generateCIWorkflow, generateRuntime, generateSkillFiles, generateSlashCommands, getToolDefinitions, handleError, listPersonas, loadConfig, loadPersona, logger, renderClaudeCodeAgent, renderGeminiAgent, resolveConfig, runCheckArch, runCheckPhaseGate, runCrossCheck, runGraphExport, runGraphStatus, runImpactPreview, runIngest, runInstall, runPersona, runQuery, runScan, runUninstall, startServer };