@wundr.io/cli 1.0.10 → 1.0.12

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 (269) hide show
  1. package/bin/wundr.js +8 -4
  2. package/package.json +23 -23
  3. package/src/ai/ai-service.ts +16 -17
  4. package/src/ai/claude-client.ts +16 -16
  5. package/src/ai/conversation-manager.ts +29 -29
  6. package/src/cli.ts +4 -4
  7. package/src/commands/ai.ts +246 -78
  8. package/src/commands/alignment.ts +74 -74
  9. package/src/commands/analyze-optimized.ts +111 -78
  10. package/src/commands/analyze.ts +14 -14
  11. package/src/commands/batch.ts +179 -42
  12. package/src/commands/chat.ts +37 -30
  13. package/src/commands/claude-init.ts +41 -45
  14. package/src/commands/claude-setup.ts +204 -119
  15. package/src/commands/computer-setup.ts +85 -43
  16. package/src/commands/create-command.ts +4 -4
  17. package/src/commands/create.ts +27 -27
  18. package/src/commands/dashboard.ts +24 -24
  19. package/src/commands/govern.ts +25 -25
  20. package/src/commands/governance.ts +34 -34
  21. package/src/commands/guardian.ts +56 -56
  22. package/src/commands/init.ts +25 -22
  23. package/src/commands/orchestrator.ts +68 -41
  24. package/src/commands/performance-optimizer.ts +34 -35
  25. package/src/commands/plugins.ts +27 -27
  26. package/src/commands/project-update.ts +175 -72
  27. package/src/commands/rag.ts +185 -78
  28. package/src/commands/session.ts +35 -35
  29. package/src/commands/setup.ts +40 -344
  30. package/src/commands/test-init.ts +3 -3
  31. package/src/commands/test.ts +4 -4
  32. package/src/commands/watch.ts +28 -29
  33. package/src/commands/worktree.ts +49 -49
  34. package/src/context/context-manager.ts +10 -10
  35. package/src/context/session-manager.ts +41 -41
  36. package/src/framework/command-interface.ts +520 -0
  37. package/src/framework/command-registry.ts +942 -0
  38. package/src/framework/completion-exporter.ts +383 -0
  39. package/src/framework/debug-logger.ts +519 -0
  40. package/src/framework/error-handler.ts +867 -0
  41. package/src/framework/help-generator.ts +540 -0
  42. package/src/framework/index.ts +169 -0
  43. package/src/framework/interactive-repl.ts +703 -0
  44. package/src/framework/output-formatter.ts +834 -0
  45. package/src/framework/progress-manager.ts +539 -0
  46. package/src/index.ts +4 -4
  47. package/src/interactive/interactive-mode.ts +16 -16
  48. package/src/lib/conflict-resolution.ts +799 -9
  49. package/src/lib/merge-strategy.ts +529 -7
  50. package/src/lib/safety-mechanisms.ts +422 -18
  51. package/src/lib/state-detection.ts +1015 -13
  52. package/src/nlp/command-mapper.ts +29 -29
  53. package/src/nlp/command-parser.ts +17 -17
  54. package/src/nlp/intent-classifier.ts +7 -7
  55. package/src/nlp/intent-parser.ts +54 -52
  56. package/src/plugins/plugin-manager.ts +61 -39
  57. package/src/tests/computer-setup-integration.test.ts +46 -15
  58. package/src/types/modules.d.ts +424 -1
  59. package/src/utils/backup-rollback-manager.ts +11 -8
  60. package/src/utils/config-manager.ts +3 -3
  61. package/src/utils/error-handler.ts +2 -2
  62. package/src/utils/logger.ts +22 -22
  63. package/templates/batch/ci-cd.yaml +7 -7
  64. package/test-suites/api/health.spec.ts +20 -23
  65. package/test-suites/helpers/test-config.ts +14 -13
  66. package/test-suites/ui/accessibility.spec.ts +27 -22
  67. package/test-suites/ui/smoke.spec.ts +26 -21
  68. package/LICENSE +0 -21
  69. package/dist/ai/ai-service.d.ts +0 -152
  70. package/dist/ai/ai-service.d.ts.map +0 -1
  71. package/dist/ai/ai-service.js +0 -430
  72. package/dist/ai/ai-service.js.map +0 -1
  73. package/dist/ai/claude-client.d.ts +0 -130
  74. package/dist/ai/claude-client.d.ts.map +0 -1
  75. package/dist/ai/claude-client.js +0 -340
  76. package/dist/ai/claude-client.js.map +0 -1
  77. package/dist/ai/conversation-manager.d.ts +0 -164
  78. package/dist/ai/conversation-manager.d.ts.map +0 -1
  79. package/dist/ai/conversation-manager.js +0 -614
  80. package/dist/ai/conversation-manager.js.map +0 -1
  81. package/dist/ai/index.d.ts +0 -5
  82. package/dist/ai/index.d.ts.map +0 -1
  83. package/dist/ai/index.js +0 -8
  84. package/dist/ai/index.js.map +0 -1
  85. package/dist/cli.d.ts +0 -36
  86. package/dist/cli.d.ts.map +0 -1
  87. package/dist/cli.js +0 -192
  88. package/dist/cli.js.map +0 -1
  89. package/dist/commands/ai.d.ts +0 -89
  90. package/dist/commands/ai.d.ts.map +0 -1
  91. package/dist/commands/ai.js +0 -799
  92. package/dist/commands/ai.js.map +0 -1
  93. package/dist/commands/alignment.d.ts +0 -78
  94. package/dist/commands/alignment.d.ts.map +0 -1
  95. package/dist/commands/alignment.js +0 -817
  96. package/dist/commands/alignment.js.map +0 -1
  97. package/dist/commands/analyze-optimized.d.ts +0 -14
  98. package/dist/commands/analyze-optimized.d.ts.map +0 -1
  99. package/dist/commands/analyze-optimized.js +0 -600
  100. package/dist/commands/analyze-optimized.js.map +0 -1
  101. package/dist/commands/analyze.d.ts +0 -65
  102. package/dist/commands/analyze.d.ts.map +0 -1
  103. package/dist/commands/analyze.js +0 -435
  104. package/dist/commands/analyze.js.map +0 -1
  105. package/dist/commands/batch.d.ts +0 -71
  106. package/dist/commands/batch.d.ts.map +0 -1
  107. package/dist/commands/batch.js +0 -738
  108. package/dist/commands/batch.js.map +0 -1
  109. package/dist/commands/chat.d.ts +0 -71
  110. package/dist/commands/chat.d.ts.map +0 -1
  111. package/dist/commands/chat.js +0 -674
  112. package/dist/commands/chat.js.map +0 -1
  113. package/dist/commands/claude-init.d.ts +0 -28
  114. package/dist/commands/claude-init.d.ts.map +0 -1
  115. package/dist/commands/claude-init.js +0 -591
  116. package/dist/commands/claude-init.js.map +0 -1
  117. package/dist/commands/claude-setup.d.ts +0 -119
  118. package/dist/commands/claude-setup.d.ts.map +0 -1
  119. package/dist/commands/claude-setup.js +0 -1073
  120. package/dist/commands/claude-setup.js.map +0 -1
  121. package/dist/commands/computer-setup-commands.d.ts +0 -53
  122. package/dist/commands/computer-setup-commands.d.ts.map +0 -1
  123. package/dist/commands/computer-setup-commands.js +0 -705
  124. package/dist/commands/computer-setup-commands.js.map +0 -1
  125. package/dist/commands/computer-setup.d.ts +0 -7
  126. package/dist/commands/computer-setup.d.ts.map +0 -1
  127. package/dist/commands/computer-setup.js +0 -849
  128. package/dist/commands/computer-setup.js.map +0 -1
  129. package/dist/commands/create-command.d.ts +0 -7
  130. package/dist/commands/create-command.d.ts.map +0 -1
  131. package/dist/commands/create-command.js +0 -158
  132. package/dist/commands/create-command.js.map +0 -1
  133. package/dist/commands/create.d.ts +0 -74
  134. package/dist/commands/create.d.ts.map +0 -1
  135. package/dist/commands/create.js +0 -556
  136. package/dist/commands/create.js.map +0 -1
  137. package/dist/commands/dashboard.d.ts +0 -91
  138. package/dist/commands/dashboard.d.ts.map +0 -1
  139. package/dist/commands/dashboard.js +0 -538
  140. package/dist/commands/dashboard.js.map +0 -1
  141. package/dist/commands/govern.d.ts +0 -70
  142. package/dist/commands/govern.d.ts.map +0 -1
  143. package/dist/commands/govern.js +0 -481
  144. package/dist/commands/govern.js.map +0 -1
  145. package/dist/commands/governance.d.ts +0 -17
  146. package/dist/commands/governance.d.ts.map +0 -1
  147. package/dist/commands/governance.js +0 -703
  148. package/dist/commands/governance.js.map +0 -1
  149. package/dist/commands/guardian.d.ts +0 -20
  150. package/dist/commands/guardian.d.ts.map +0 -1
  151. package/dist/commands/guardian.js +0 -597
  152. package/dist/commands/guardian.js.map +0 -1
  153. package/dist/commands/init.d.ts +0 -59
  154. package/dist/commands/init.d.ts.map +0 -1
  155. package/dist/commands/init.js +0 -650
  156. package/dist/commands/init.js.map +0 -1
  157. package/dist/commands/orchestrator.d.ts +0 -7
  158. package/dist/commands/orchestrator.d.ts.map +0 -1
  159. package/dist/commands/orchestrator.js +0 -571
  160. package/dist/commands/orchestrator.js.map +0 -1
  161. package/dist/commands/performance-optimizer.d.ts +0 -30
  162. package/dist/commands/performance-optimizer.d.ts.map +0 -1
  163. package/dist/commands/performance-optimizer.js +0 -650
  164. package/dist/commands/performance-optimizer.js.map +0 -1
  165. package/dist/commands/plugins.d.ts +0 -87
  166. package/dist/commands/plugins.d.ts.map +0 -1
  167. package/dist/commands/plugins.js +0 -685
  168. package/dist/commands/plugins.js.map +0 -1
  169. package/dist/commands/rag.d.ts +0 -7
  170. package/dist/commands/rag.d.ts.map +0 -1
  171. package/dist/commands/rag.js +0 -748
  172. package/dist/commands/rag.js.map +0 -1
  173. package/dist/commands/session.d.ts +0 -41
  174. package/dist/commands/session.d.ts.map +0 -1
  175. package/dist/commands/session.js +0 -441
  176. package/dist/commands/session.js.map +0 -1
  177. package/dist/commands/setup.d.ts +0 -29
  178. package/dist/commands/setup.d.ts.map +0 -1
  179. package/dist/commands/setup.js +0 -397
  180. package/dist/commands/setup.js.map +0 -1
  181. package/dist/commands/test-init.d.ts +0 -9
  182. package/dist/commands/test-init.d.ts.map +0 -1
  183. package/dist/commands/test-init.js +0 -222
  184. package/dist/commands/test-init.js.map +0 -1
  185. package/dist/commands/test.d.ts +0 -25
  186. package/dist/commands/test.d.ts.map +0 -1
  187. package/dist/commands/test.js +0 -217
  188. package/dist/commands/test.js.map +0 -1
  189. package/dist/commands/vp.d.ts +0 -7
  190. package/dist/commands/vp.d.ts.map +0 -1
  191. package/dist/commands/vp.js +0 -571
  192. package/dist/commands/vp.js.map +0 -1
  193. package/dist/commands/watch.d.ts +0 -76
  194. package/dist/commands/watch.d.ts.map +0 -1
  195. package/dist/commands/watch.js +0 -613
  196. package/dist/commands/watch.js.map +0 -1
  197. package/dist/commands/worktree.d.ts +0 -63
  198. package/dist/commands/worktree.d.ts.map +0 -1
  199. package/dist/commands/worktree.js +0 -774
  200. package/dist/commands/worktree.js.map +0 -1
  201. package/dist/context/context-manager.d.ts +0 -155
  202. package/dist/context/context-manager.d.ts.map +0 -1
  203. package/dist/context/context-manager.js +0 -383
  204. package/dist/context/context-manager.js.map +0 -1
  205. package/dist/context/index.d.ts +0 -3
  206. package/dist/context/index.d.ts.map +0 -1
  207. package/dist/context/index.js +0 -6
  208. package/dist/context/index.js.map +0 -1
  209. package/dist/context/session-manager.d.ts +0 -207
  210. package/dist/context/session-manager.d.ts.map +0 -1
  211. package/dist/context/session-manager.js +0 -686
  212. package/dist/context/session-manager.js.map +0 -1
  213. package/dist/index.d.ts +0 -8
  214. package/dist/index.d.ts.map +0 -1
  215. package/dist/index.js +0 -51
  216. package/dist/index.js.map +0 -1
  217. package/dist/interactive/interactive-mode.d.ts +0 -76
  218. package/dist/interactive/interactive-mode.d.ts.map +0 -1
  219. package/dist/interactive/interactive-mode.js +0 -732
  220. package/dist/interactive/interactive-mode.js.map +0 -1
  221. package/dist/nlp/command-mapper.d.ts +0 -174
  222. package/dist/nlp/command-mapper.d.ts.map +0 -1
  223. package/dist/nlp/command-mapper.js +0 -624
  224. package/dist/nlp/command-mapper.js.map +0 -1
  225. package/dist/nlp/command-parser.d.ts +0 -106
  226. package/dist/nlp/command-parser.d.ts.map +0 -1
  227. package/dist/nlp/command-parser.js +0 -417
  228. package/dist/nlp/command-parser.js.map +0 -1
  229. package/dist/nlp/index.d.ts +0 -5
  230. package/dist/nlp/index.d.ts.map +0 -1
  231. package/dist/nlp/index.js +0 -8
  232. package/dist/nlp/index.js.map +0 -1
  233. package/dist/nlp/intent-classifier.d.ts +0 -59
  234. package/dist/nlp/intent-classifier.d.ts.map +0 -1
  235. package/dist/nlp/intent-classifier.js +0 -384
  236. package/dist/nlp/intent-classifier.js.map +0 -1
  237. package/dist/nlp/intent-parser.d.ts +0 -152
  238. package/dist/nlp/intent-parser.d.ts.map +0 -1
  239. package/dist/nlp/intent-parser.js +0 -744
  240. package/dist/nlp/intent-parser.js.map +0 -1
  241. package/dist/plugins/plugin-manager.d.ts +0 -120
  242. package/dist/plugins/plugin-manager.d.ts.map +0 -1
  243. package/dist/plugins/plugin-manager.js +0 -595
  244. package/dist/plugins/plugin-manager.js.map +0 -1
  245. package/dist/types/index.d.ts +0 -224
  246. package/dist/types/index.d.ts.map +0 -1
  247. package/dist/types/index.js +0 -3
  248. package/dist/types/index.js.map +0 -1
  249. package/dist/utils/backup-rollback-manager.d.ts +0 -72
  250. package/dist/utils/backup-rollback-manager.d.ts.map +0 -1
  251. package/dist/utils/backup-rollback-manager.js +0 -289
  252. package/dist/utils/backup-rollback-manager.js.map +0 -1
  253. package/dist/utils/claude-config-installer.d.ts +0 -98
  254. package/dist/utils/claude-config-installer.d.ts.map +0 -1
  255. package/dist/utils/claude-config-installer.js +0 -678
  256. package/dist/utils/claude-config-installer.js.map +0 -1
  257. package/dist/utils/config-manager.d.ts +0 -73
  258. package/dist/utils/config-manager.d.ts.map +0 -1
  259. package/dist/utils/config-manager.js +0 -339
  260. package/dist/utils/config-manager.js.map +0 -1
  261. package/dist/utils/error-handler.d.ts +0 -46
  262. package/dist/utils/error-handler.d.ts.map +0 -1
  263. package/dist/utils/error-handler.js +0 -169
  264. package/dist/utils/error-handler.js.map +0 -1
  265. package/dist/utils/logger.d.ts +0 -25
  266. package/dist/utils/logger.d.ts.map +0 -1
  267. package/dist/utils/logger.js +0 -105
  268. package/dist/utils/logger.js.map +0 -1
  269. package/src/commands/computer-setup-commands.ts +0 -872
@@ -189,11 +189,11 @@ class AlignmentDriftDetector {
189
189
  return history.entries
190
190
  .filter(
191
191
  (entry: AlignmentHistoryEntry) =>
192
- new Date(entry.timestamp) >= cutoffDate,
192
+ new Date(entry.timestamp) >= cutoffDate
193
193
  )
194
194
  .sort(
195
195
  (a: AlignmentHistoryEntry, b: AlignmentHistoryEntry) =>
196
- new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime(),
196
+ new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime()
197
197
  );
198
198
  }
199
199
 
@@ -205,7 +205,7 @@ class AlignmentDriftDetector {
205
205
  async generateDebtReport(
206
206
  days: number = 7,
207
207
  sessionId?: string,
208
- outputFile?: string,
208
+ outputFile?: string
209
209
  ): Promise<AlignmentDebtReport> {
210
210
  await this.initialize();
211
211
 
@@ -286,13 +286,13 @@ class AlignmentDriftDetector {
286
286
  // Calculate total violations
287
287
  const totalViolations = Object.values(dimensionAnalysis).reduce(
288
288
  (sum, dim) => sum + dim.exceedances,
289
- 0,
289
+ 0
290
290
  );
291
291
 
292
292
  // Generate recommendations
293
293
  const recommendations = this.generateDebtRecommendations(
294
294
  dimensionAnalysis,
295
- trend,
295
+ trend
296
296
  );
297
297
 
298
298
  const report: AlignmentDebtReport = {
@@ -326,7 +326,7 @@ class AlignmentDriftDetector {
326
326
  }
327
327
 
328
328
  private async collectMetrics(
329
- sessionId?: string,
329
+ sessionId?: string
330
330
  ): Promise<AlignmentDriftMetrics> {
331
331
  const sessionMetricsFile = sessionId
332
332
  ? path.join(this.dataDir, 'sessions', `${sessionId}.json`)
@@ -359,23 +359,23 @@ class AlignmentDriftDetector {
359
359
  private calculateScore(metrics: AlignmentDriftMetrics): number {
360
360
  const normalizedPolicyViolation = Math.min(
361
361
  metrics.policyViolationRate / this.thresholds.policyViolation,
362
- 2,
362
+ 2
363
363
  );
364
364
  const normalizedIntentGap = Math.min(
365
365
  metrics.intentOutcomeGap / this.thresholds.intentOutcomeGap,
366
- 2,
366
+ 2
367
367
  );
368
368
  const normalizedEvaluatorDisagreement = Math.min(
369
369
  metrics.evaluatorDisagreement / this.thresholds.evaluatorDisagreement,
370
- 2,
370
+ 2
371
371
  );
372
372
  const normalizedEscalationSuppression = Math.min(
373
373
  metrics.escalationSuppression / this.thresholds.escalationSuppression,
374
- 2,
374
+ 2
375
375
  );
376
376
  const normalizedRewardHacking = Math.min(
377
377
  metrics.rewardHacking / this.thresholds.rewardHacking,
378
- 2,
378
+ 2
379
379
  );
380
380
 
381
381
  const weights = {
@@ -408,7 +408,7 @@ class AlignmentDriftDetector {
408
408
  }
409
409
 
410
410
  private analyzeDimensions(
411
- metrics: AlignmentDriftMetrics,
411
+ metrics: AlignmentDriftMetrics
412
412
  ): AlignmentDimension[] {
413
413
  return [
414
414
  {
@@ -419,7 +419,7 @@ class AlignmentDriftDetector {
419
419
  currentValue: metrics.policyViolationRate,
420
420
  status: this.getDimensionStatus(
421
421
  metrics.policyViolationRate,
422
- this.thresholds.policyViolation,
422
+ this.thresholds.policyViolation
423
423
  ),
424
424
  },
425
425
  {
@@ -430,7 +430,7 @@ class AlignmentDriftDetector {
430
430
  currentValue: metrics.intentOutcomeGap,
431
431
  status: this.getDimensionStatus(
432
432
  metrics.intentOutcomeGap,
433
- this.thresholds.intentOutcomeGap,
433
+ this.thresholds.intentOutcomeGap
434
434
  ),
435
435
  },
436
436
  {
@@ -441,7 +441,7 @@ class AlignmentDriftDetector {
441
441
  currentValue: metrics.evaluatorDisagreement,
442
442
  status: this.getDimensionStatus(
443
443
  metrics.evaluatorDisagreement,
444
- this.thresholds.evaluatorDisagreement,
444
+ this.thresholds.evaluatorDisagreement
445
445
  ),
446
446
  },
447
447
  {
@@ -452,7 +452,7 @@ class AlignmentDriftDetector {
452
452
  currentValue: metrics.escalationSuppression,
453
453
  status: this.getDimensionStatus(
454
454
  metrics.escalationSuppression,
455
- this.thresholds.escalationSuppression,
455
+ this.thresholds.escalationSuppression
456
456
  ),
457
457
  },
458
458
  {
@@ -463,7 +463,7 @@ class AlignmentDriftDetector {
463
463
  currentValue: metrics.rewardHacking,
464
464
  status: this.getDimensionStatus(
465
465
  metrics.rewardHacking,
466
- this.thresholds.rewardHacking,
466
+ this.thresholds.rewardHacking
467
467
  ),
468
468
  },
469
469
  ];
@@ -471,7 +471,7 @@ class AlignmentDriftDetector {
471
471
 
472
472
  private getDimensionStatus(
473
473
  value: number,
474
- threshold: number,
474
+ threshold: number
475
475
  ): 'healthy' | 'warning' | 'critical' {
476
476
  if (value <= threshold) {
477
477
  return 'healthy';
@@ -495,39 +495,39 @@ class AlignmentDriftDetector {
495
495
 
496
496
  private generateRecommendations(
497
497
  dimensions: AlignmentDimension[],
498
- status: string,
498
+ status: string
499
499
  ): string[] {
500
500
  const recommendations: string[] = [];
501
501
 
502
502
  for (const dim of dimensions) {
503
503
  if (dim.status === 'critical') {
504
504
  recommendations.push(
505
- `CRITICAL: ${dim.name} at ${this.formatValue(dim.currentValue, dim.key)} exceeds threshold (${this.formatValue(dim.threshold, dim.key)}). Immediate action required.`,
505
+ `CRITICAL: ${dim.name} at ${this.formatValue(dim.currentValue, dim.key)} exceeds threshold (${this.formatValue(dim.threshold, dim.key)}). Immediate action required.`
506
506
  );
507
507
  } else if (dim.status === 'warning') {
508
508
  recommendations.push(
509
- `WARNING: ${dim.name} at ${this.formatValue(dim.currentValue, dim.key)} approaching threshold (${this.formatValue(dim.threshold, dim.key)}). Monitor closely.`,
509
+ `WARNING: ${dim.name} at ${this.formatValue(dim.currentValue, dim.key)} approaching threshold (${this.formatValue(dim.threshold, dim.key)}). Monitor closely.`
510
510
  );
511
511
  }
512
512
  }
513
513
 
514
514
  if (status === 'critical') {
515
515
  recommendations.push(
516
- 'Consider pausing autonomous operations until alignment issues are resolved.',
516
+ 'Consider pausing autonomous operations until alignment issues are resolved.'
517
517
  );
518
518
  recommendations.push('Schedule immediate review with Guardian role.');
519
519
  } else if (status === 'warning') {
520
520
  recommendations.push(
521
- 'Review recent agent decisions for potential alignment drift.',
521
+ 'Review recent agent decisions for potential alignment drift.'
522
522
  );
523
523
  recommendations.push(
524
- 'Consider tightening constraints or adding checkpoints.',
524
+ 'Consider tightening constraints or adding checkpoints.'
525
525
  );
526
526
  }
527
527
 
528
528
  if (recommendations.length === 0) {
529
529
  recommendations.push(
530
- 'All alignment metrics within acceptable thresholds.',
530
+ 'All alignment metrics within acceptable thresholds.'
531
531
  );
532
532
  }
533
533
 
@@ -536,17 +536,17 @@ class AlignmentDriftDetector {
536
536
 
537
537
  private generateDebtRecommendations(
538
538
  dimensionAnalysis: AlignmentDebtReport['dimensionAnalysis'],
539
- trend: 'improving' | 'stable' | 'degrading',
539
+ trend: 'improving' | 'stable' | 'degrading'
540
540
  ): string[] {
541
541
  const recommendations: string[] = [];
542
542
 
543
543
  if (trend === 'degrading') {
544
544
  recommendations.push(
545
- 'Alignment score is degrading over time. Review recent changes to agent configurations.',
545
+ 'Alignment score is degrading over time. Review recent changes to agent configurations.'
546
546
  );
547
547
  } else if (trend === 'improving') {
548
548
  recommendations.push(
549
- 'Alignment score is improving. Continue current governance practices.',
549
+ 'Alignment score is improving. Continue current governance practices.'
550
550
  );
551
551
  }
552
552
 
@@ -555,7 +555,7 @@ class AlignmentDriftDetector {
555
555
  const friendlyName = this.getFriendlyDimensionName(key);
556
556
  const entry = analysis as DimensionAnalysisEntry;
557
557
  recommendations.push(
558
- `${friendlyName}: ${entry.exceedances} threshold exceedance(s) detected. Average: ${entry.average.toFixed(3)}`,
558
+ `${friendlyName}: ${entry.exceedances} threshold exceedance(s) detected. Average: ${entry.average.toFixed(3)}`
559
559
  );
560
560
  }
561
561
  }
@@ -615,7 +615,7 @@ function padRight(str: string, length: number): string {
615
615
  }
616
616
 
617
617
  function getStatusColor(
618
- status: 'healthy' | 'warning' | 'critical',
618
+ status: 'healthy' | 'warning' | 'critical'
619
619
  ): (str: string) => string {
620
620
  switch (status) {
621
621
  case 'healthy':
@@ -694,7 +694,7 @@ Examples:
694
694
  ${chalk.green('wundr alignment score')} Get current alignment score
695
695
  ${chalk.green('wundr alignment history --days 7')} Show alignment history for past week
696
696
  ${chalk.green('wundr alignment dimensions')} Show breakdown by dimension
697
- `),
697
+ `)
698
698
  );
699
699
 
700
700
  // Report subcommand
@@ -725,7 +725,7 @@ Examples:
725
725
  .option(
726
726
  '-f, --format <type>',
727
727
  'Output format (table, json, chart)',
728
- 'table',
728
+ 'table'
729
729
  )
730
730
  .action(async options => {
731
731
  await showAlignmentHistory(options);
@@ -762,7 +762,7 @@ async function generateAlignmentReport(options: {
762
762
  const report = await detector.generateDebtReport(
763
763
  days,
764
764
  options.session,
765
- options.output,
765
+ options.output
766
766
  );
767
767
 
768
768
  spinner.stop();
@@ -772,13 +772,13 @@ async function generateAlignmentReport(options: {
772
772
  console.log(chalk.gray('='.repeat(70)));
773
773
  console.log(
774
774
  chalk.white('Generated: ') +
775
- chalk.gray(new Date(report.generatedAt).toLocaleString()),
775
+ chalk.gray(new Date(report.generatedAt).toLocaleString())
776
776
  );
777
777
  console.log(
778
778
  chalk.white('Period: ') +
779
779
  chalk.gray(
780
- `${days} days (${new Date(report.period.start).toLocaleDateString()} - ${new Date(report.period.end).toLocaleDateString()})`,
781
- ),
780
+ `${days} days (${new Date(report.period.start).toLocaleDateString()} - ${new Date(report.period.end).toLocaleDateString()})`
781
+ )
782
782
  );
783
783
 
784
784
  if (options.session) {
@@ -790,24 +790,24 @@ async function generateAlignmentReport(options: {
790
790
  console.log(chalk.cyan('Summary'));
791
791
  console.log(
792
792
  chalk.white('Average Score: ') +
793
- formatScore(report.summary.averageScore),
793
+ formatScore(report.summary.averageScore)
794
794
  );
795
795
  console.log(
796
796
  chalk.white('Lowest Score: ') +
797
- formatScore(report.summary.lowestScore),
797
+ formatScore(report.summary.lowestScore)
798
798
  );
799
799
  console.log(
800
800
  chalk.white('Highest Score: ') +
801
- formatScore(report.summary.highestScore),
801
+ formatScore(report.summary.highestScore)
802
802
  );
803
803
  console.log(
804
- chalk.white('Trend: ') + formatTrend(report.summary.trend),
804
+ chalk.white('Trend: ') + formatTrend(report.summary.trend)
805
805
  );
806
806
  console.log(
807
807
  chalk.white('Total Violations: ') +
808
808
  (report.summary.totalViolations > 0
809
809
  ? chalk.red(String(report.summary.totalViolations))
810
- : chalk.green('0')),
810
+ : chalk.green('0'))
811
811
  );
812
812
 
813
813
  // Dimension analysis section
@@ -818,8 +818,8 @@ async function generateAlignmentReport(options: {
818
818
  padRight('Dimension', 25) +
819
819
  padRight('Average', 12) +
820
820
  padRight('Max', 12) +
821
- padRight('Exceedances', 12),
822
- ),
821
+ padRight('Exceedances', 12)
822
+ )
823
823
  );
824
824
  console.log(chalk.gray('-'.repeat(61)));
825
825
 
@@ -840,7 +840,7 @@ async function generateAlignmentReport(options: {
840
840
  padRight(name, 25) +
841
841
  padRight(formatDimensionValue(entry.average, key), 12) +
842
842
  padRight(formatDimensionValue(entry.max, key), 12) +
843
- exceedanceColor(padRight(String(entry.exceedances), 12)),
843
+ exceedanceColor(padRight(String(entry.exceedances), 12))
844
844
  );
845
845
  }
846
846
 
@@ -856,13 +856,13 @@ async function generateAlignmentReport(options: {
856
856
  chalk.white(` ${dimName}: `) +
857
857
  chalk.red(formatDimensionValue(event.value, event.dimension)) +
858
858
  chalk.gray(
859
- ` (threshold: ${formatDimensionValue(event.threshold, event.dimension)})`,
860
- ),
859
+ ` (threshold: ${formatDimensionValue(event.threshold, event.dimension)})`
860
+ )
861
861
  );
862
862
  }
863
863
  if (report.criticalEvents.length > 5) {
864
864
  console.log(
865
- chalk.gray(` ... and ${report.criticalEvents.length - 5} more`),
865
+ chalk.gray(` ... and ${report.criticalEvents.length - 5} more`)
866
866
  );
867
867
  }
868
868
  }
@@ -890,7 +890,7 @@ async function generateAlignmentReport(options: {
890
890
  } catch (error) {
891
891
  spinner.fail('Failed to generate alignment report');
892
892
  console.error(
893
- chalk.red(error instanceof Error ? error.message : String(error)),
893
+ chalk.red(error instanceof Error ? error.message : String(error))
894
894
  );
895
895
  }
896
896
  }
@@ -931,7 +931,7 @@ async function showAlignmentScore(options: {
931
931
 
932
932
  const statusColor = getStatusColor(result.status);
933
933
  console.log(
934
- chalk.white('Status: ') + statusColor(getStatusIcon(result.status)),
934
+ chalk.white('Status: ') + statusColor(getStatusIcon(result.status))
935
935
  );
936
936
 
937
937
  if (options.session) {
@@ -954,7 +954,7 @@ async function showAlignmentScore(options: {
954
954
  console.log(
955
955
  dimStatusColor(` ${icon} `) +
956
956
  chalk.white(padRight(dim.name, 25)) +
957
- dimStatusColor(formatDimensionValue(dim.currentValue, dim.key)),
957
+ dimStatusColor(formatDimensionValue(dim.currentValue, dim.key))
958
958
  );
959
959
  }
960
960
 
@@ -963,7 +963,7 @@ async function showAlignmentScore(options: {
963
963
  } catch (error) {
964
964
  spinner.fail('Failed to get alignment score');
965
965
  console.error(
966
- chalk.red(error instanceof Error ? error.message : String(error)),
966
+ chalk.red(error instanceof Error ? error.message : String(error))
967
967
  );
968
968
  }
969
969
  }
@@ -993,8 +993,8 @@ async function showAlignmentHistory(options: {
993
993
  entries: history,
994
994
  },
995
995
  null,
996
- 2,
997
- ),
996
+ 2
997
+ )
998
998
  );
999
999
  return;
1000
1000
  }
@@ -1002,7 +1002,7 @@ async function showAlignmentHistory(options: {
1002
1002
  console.log(chalk.cyan('\nAlignment History'));
1003
1003
  console.log(chalk.gray('='.repeat(80)));
1004
1004
  console.log(
1005
- chalk.gray(`Showing last ${days} days (${history.length} entries)`),
1005
+ chalk.gray(`Showing last ${days} days (${history.length} entries)`)
1006
1006
  );
1007
1007
 
1008
1008
  if (history.length === 0) {
@@ -1023,8 +1023,8 @@ async function showAlignmentHistory(options: {
1023
1023
  padRight('Score', 10) +
1024
1024
  padRight('Status', 12) +
1025
1025
  padRight('Session', 20) +
1026
- padRight('Policy', 10),
1027
- ),
1026
+ padRight('Policy', 10)
1027
+ )
1028
1028
  );
1029
1029
  console.log(chalk.gray('-'.repeat(80)));
1030
1030
 
@@ -1037,7 +1037,7 @@ async function showAlignmentHistory(options: {
1037
1037
  formatScore(entry.score).padEnd(19) + // Account for ANSI codes
1038
1038
  statusColor(padRight(getStatusIcon(entry.status), 12)) +
1039
1039
  chalk.gray(padRight(entry.sessionId || '-', 20)) +
1040
- padRight(formatPercentage(entry.metrics.policyViolationRate), 10),
1040
+ padRight(formatPercentage(entry.metrics.policyViolationRate), 10)
1041
1041
  );
1042
1042
  }
1043
1043
 
@@ -1051,7 +1051,7 @@ async function showAlignmentHistory(options: {
1051
1051
  } catch (error) {
1052
1052
  spinner.fail('Failed to load alignment history');
1053
1053
  console.error(
1054
- chalk.red(error instanceof Error ? error.message : String(error)),
1054
+ chalk.red(error instanceof Error ? error.message : String(error))
1055
1055
  );
1056
1056
  }
1057
1057
  }
@@ -1099,8 +1099,8 @@ function displayHistoryChart(history: AlignmentHistoryEntry[]): void {
1099
1099
  chalk.gray(
1100
1100
  ' ' +
1101
1101
  'oldest'.padEnd(chartWidth / 2) +
1102
- 'newest'.padStart(chartWidth / 2),
1103
- ),
1102
+ 'newest'.padStart(chartWidth / 2)
1103
+ )
1104
1104
  );
1105
1105
  }
1106
1106
 
@@ -1145,7 +1145,7 @@ async function showDimensionBreakdown(options: {
1145
1145
  const barWidth = 40;
1146
1146
  const valueRatio = Math.min(dim.currentValue / (dim.threshold * 3), 1);
1147
1147
  const thresholdPos = Math.floor(
1148
- (dim.threshold / (dim.threshold * 3)) * barWidth,
1148
+ (dim.threshold / (dim.threshold * 3)) * barWidth
1149
1149
  );
1150
1150
  const valuePos = Math.floor(valueRatio * barWidth);
1151
1151
 
@@ -1162,10 +1162,10 @@ async function showDimensionBreakdown(options: {
1162
1162
 
1163
1163
  console.log(` [${bar}]`);
1164
1164
  console.log(
1165
- ` ${chalk.white('Current:')} ${statusColor(formatDimensionValue(dim.currentValue, dim.key))} ${chalk.white('Threshold:')} ${chalk.yellow(formatDimensionValue(dim.threshold, dim.key))}`,
1165
+ ` ${chalk.white('Current:')} ${statusColor(formatDimensionValue(dim.currentValue, dim.key))} ${chalk.white('Threshold:')} ${chalk.yellow(formatDimensionValue(dim.threshold, dim.key))}`
1166
1166
  );
1167
1167
  console.log(
1168
- ` ${chalk.white('Status:')} ${statusColor(dim.status.toUpperCase())}`,
1168
+ ` ${chalk.white('Status:')} ${statusColor(dim.status.toUpperCase())}`
1169
1169
  );
1170
1170
  }
1171
1171
 
@@ -1174,28 +1174,28 @@ async function showDimensionBreakdown(options: {
1174
1174
  console.log(chalk.cyan('Threshold Reference'));
1175
1175
  console.log(
1176
1176
  chalk.gray(
1177
- ` Policy Violation: >${formatPercentage(thresholds.policyViolation)} daily violations`,
1178
- ),
1177
+ ` Policy Violation: >${formatPercentage(thresholds.policyViolation)} daily violations`
1178
+ )
1179
1179
  );
1180
1180
  console.log(
1181
1181
  chalk.gray(
1182
- ` Intent-Outcome Gap: >${formatPercentage(thresholds.intentOutcomeGap)} divergence`,
1183
- ),
1182
+ ` Intent-Outcome Gap: >${formatPercentage(thresholds.intentOutcomeGap)} divergence`
1183
+ )
1184
1184
  );
1185
1185
  console.log(
1186
1186
  chalk.gray(
1187
- ` Evaluator Disagreement:>${formatPercentage(thresholds.evaluatorDisagreement)} monthly overrides`,
1188
- ),
1187
+ ` Evaluator Disagreement:>${formatPercentage(thresholds.evaluatorDisagreement)} monthly overrides`
1188
+ )
1189
1189
  );
1190
1190
  console.log(
1191
1191
  chalk.gray(
1192
- ` Escalation Suppression:>${formatPercentage(thresholds.escalationSuppression)} drop from baseline`,
1193
- ),
1192
+ ` Escalation Suppression:>${formatPercentage(thresholds.escalationSuppression)} drop from baseline`
1193
+ )
1194
1194
  );
1195
1195
  console.log(
1196
1196
  chalk.gray(
1197
- ` Reward Hacking: >${thresholds.rewardHacking} instances/month`,
1198
- ),
1197
+ ` Reward Hacking: >${thresholds.rewardHacking} instances/month`
1198
+ )
1199
1199
  );
1200
1200
 
1201
1201
  console.log(chalk.gray('='.repeat(90)));
@@ -1203,7 +1203,7 @@ async function showDimensionBreakdown(options: {
1203
1203
  } catch (error) {
1204
1204
  spinner.fail('Failed to load dimension breakdown');
1205
1205
  console.error(
1206
- chalk.red(error instanceof Error ? error.message : String(error)),
1206
+ chalk.red(error instanceof Error ? error.message : String(error))
1207
1207
  );
1208
1208
  }
1209
1209
  }