@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
@@ -41,7 +41,7 @@ const SESSIONS_STATE_FILE = path.join(
41
41
  os.homedir(),
42
42
  '.wundr',
43
43
  'sessions',
44
- 'state.json',
44
+ 'state.json'
45
45
  );
46
46
  const REPORTS_DIR = path.join(GUARDIAN_BASE_DIR, 'reports');
47
47
 
@@ -126,7 +126,7 @@ async function ensureGuardianDir(): Promise<void> {
126
126
  * Get color function based on severity
127
127
  */
128
128
  function getSeverityColor(
129
- severity: InterventionSeverity,
129
+ severity: InterventionSeverity
130
130
  ): (str: string) => string {
131
131
  switch (severity) {
132
132
  case 'critical':
@@ -184,7 +184,7 @@ async function loadGuardianState(): Promise<GuardianState> {
184
184
  try {
185
185
  const interventionsContent = await fs.readFile(
186
186
  INTERVENTIONS_FILE,
187
- 'utf-8',
187
+ 'utf-8'
188
188
  );
189
189
  interventions = JSON.parse(interventionsContent) as StoredIntervention[];
190
190
  } catch {
@@ -211,11 +211,11 @@ async function saveGuardianState(state: GuardianState): Promise<void> {
211
211
  await ensureGuardianDir();
212
212
  await fs.writeFile(
213
213
  INTERVENTIONS_FILE,
214
- JSON.stringify(state.interventions, null, 2),
214
+ JSON.stringify(state.interventions, null, 2)
215
215
  );
216
216
  await fs.writeFile(
217
217
  REVIEW_QUEUE_FILE,
218
- JSON.stringify(state.reviewQueue, null, 2),
218
+ JSON.stringify(state.reviewQueue, null, 2)
219
219
  );
220
220
  }
221
221
 
@@ -338,7 +338,7 @@ async function generateReport(options: ReportOptions): Promise<void> {
338
338
  dateStr,
339
339
  report,
340
340
  recommendations,
341
- guardianState,
341
+ guardianState
342
342
  );
343
343
 
344
344
  if (options.output) {
@@ -351,7 +351,7 @@ async function generateReport(options: ReportOptions): Promise<void> {
351
351
  } catch (error) {
352
352
  spinner.fail('Failed to generate report');
353
353
  console.error(
354
- chalk.red(error instanceof Error ? error.message : String(error)),
354
+ chalk.red(error instanceof Error ? error.message : String(error))
355
355
  );
356
356
  }
357
357
  }
@@ -363,7 +363,7 @@ function generateMarkdownReport(
363
363
  dateStr: string,
364
364
  report: AggregatedDriftReport,
365
365
  recommendations: InterventionRecommendation[],
366
- guardianState: GuardianState,
366
+ guardianState: GuardianState
367
367
  ): string {
368
368
  let md = '# Guardian Daily Alignment Report\n\n';
369
369
  md += `**Date:** ${dateStr}\n`;
@@ -411,7 +411,7 @@ function displayTerminalReport(
411
411
  dateStr: string,
412
412
  report: AggregatedDriftReport,
413
413
  recommendations: InterventionRecommendation[],
414
- guardianState: GuardianState,
414
+ guardianState: GuardianState
415
415
  ): void {
416
416
  console.log(chalk.cyan('\n' + '='.repeat(70)));
417
417
  console.log(chalk.cyan.bold(' GUARDIAN DAILY ALIGNMENT REPORT'));
@@ -427,15 +427,15 @@ function displayTerminalReport(
427
427
  const statusColor = getStatusColor(report.overallStatus);
428
428
  console.log(`Total Sessions: ${chalk.white(report.totalSessions)}`);
429
429
  console.log(
430
- `Average Drift Score: ${chalk.white(report.averageScore.toFixed(1))}`,
430
+ `Average Drift Score: ${chalk.white(report.averageScore.toFixed(1))}`
431
431
  );
432
432
  console.log(`Overall Status: ${statusColor(report.overallStatus)}`);
433
433
  console.log(`Trend: ${chalk.white(report.trend)}`);
434
434
  console.log(
435
- `Critical Sessions: ${report.criticalSessions.length > 0 ? chalk.red(report.criticalSessions.length) : chalk.green('0')}`,
435
+ `Critical Sessions: ${report.criticalSessions.length > 0 ? chalk.red(report.criticalSessions.length) : chalk.green('0')}`
436
436
  );
437
437
  console.log(
438
- `Concerning Sessions: ${report.concerningSessions.length > 0 ? chalk.yellow(report.concerningSessions.length) : chalk.green('0')}`,
438
+ `Concerning Sessions: ${report.concerningSessions.length > 0 ? chalk.yellow(report.concerningSessions.length) : chalk.green('0')}`
439
439
  );
440
440
  console.log('');
441
441
 
@@ -447,7 +447,7 @@ function displayTerminalReport(
447
447
  for (const rec of recommendations) {
448
448
  const severityColor = getSeverityColor(rec.severity);
449
449
  console.log(
450
- `${severityColor(getSeverityBadge(rec.severity))} ${chalk.white(rec.dimension)}`,
450
+ `${severityColor(getSeverityBadge(rec.severity))} ${chalk.white(rec.dimension)}`
451
451
  );
452
452
  console.log(` Action: ${rec.action}`);
453
453
  console.log(` Urgency: ${rec.urgency}h`);
@@ -465,8 +465,8 @@ function displayTerminalReport(
465
465
  console.log(chalk.gray('-'.repeat(40)));
466
466
  console.log(
467
467
  chalk.yellow(
468
- `${pendingReviews.length} session(s) flagged for Guardian attention.`,
469
- ),
468
+ `${pendingReviews.length} session(s) flagged for Guardian attention.`
469
+ )
470
470
  );
471
471
  console.log(chalk.gray('Run "wundr guardian review" for details.\n'));
472
472
  }
@@ -492,7 +492,7 @@ async function showReviewQueue(): Promise<void> {
492
492
  if (pendingReviews.length === 0) {
493
493
  console.log(chalk.green('\nNo sessions require Guardian review.'));
494
494
  console.log(
495
- chalk.gray('All systems operating within acceptable parameters.\n'),
495
+ chalk.gray('All systems operating within acceptable parameters.\n')
496
496
  );
497
497
  return;
498
498
  }
@@ -504,8 +504,8 @@ async function showReviewQueue(): Promise<void> {
504
504
  padRight('Severity', 12) +
505
505
  padRight('Drift Score', 14) +
506
506
  padRight('Flagged At', 22) +
507
- padRight('Reason', 22),
508
- ),
507
+ padRight('Reason', 22)
508
+ )
509
509
  );
510
510
  console.log(chalk.gray('-'.repeat(90)));
511
511
 
@@ -519,22 +519,22 @@ async function showReviewQueue(): Promise<void> {
519
519
  severityColor(padRight(getSeverityBadge(item.severity), 12)) +
520
520
  padRight(item.driftScore.toFixed(1), 14) +
521
521
  padRight(flaggedAt, 22) +
522
- chalk.gray(truncate(item.reason, 22)),
522
+ chalk.gray(truncate(item.reason, 22))
523
523
  );
524
524
  }
525
525
 
526
526
  console.log(chalk.gray('-'.repeat(90)));
527
527
  console.log(
528
- chalk.gray(`Total: ${pendingReviews.length} session(s) pending review\n`),
528
+ chalk.gray(`Total: ${pendingReviews.length} session(s) pending review\n`)
529
529
  );
530
530
 
531
531
  // Show summary by severity
532
532
  const criticalCount = pendingReviews.filter(
533
- r => r.severity === 'critical',
533
+ r => r.severity === 'critical'
534
534
  ).length;
535
535
  const highCount = pendingReviews.filter(r => r.severity === 'high').length;
536
536
  const mediumCount = pendingReviews.filter(
537
- r => r.severity === 'medium',
537
+ r => r.severity === 'medium'
538
538
  ).length;
539
539
 
540
540
  if (criticalCount > 0) {
@@ -550,7 +550,7 @@ async function showReviewQueue(): Promise<void> {
550
550
  } catch (error) {
551
551
  spinner.fail('Failed to load review queue');
552
552
  console.error(
553
- chalk.red(error instanceof Error ? error.message : String(error)),
553
+ chalk.red(error instanceof Error ? error.message : String(error))
554
554
  );
555
555
  }
556
556
  }
@@ -571,20 +571,20 @@ async function listInterventions(options: InterventionsOptions): Promise<void> {
571
571
  cutoffDate.setDate(cutoffDate.getDate() - days);
572
572
 
573
573
  interventions = interventions.filter(
574
- i => new Date(i.timestamp) >= cutoffDate,
574
+ i => new Date(i.timestamp) >= cutoffDate
575
575
  );
576
576
 
577
577
  // Filter by session
578
578
  if (options.session) {
579
579
  interventions = interventions.filter(
580
- i => i.sessionId === options.session,
580
+ i => i.sessionId === options.session
581
581
  );
582
582
  }
583
583
 
584
584
  // Sort by timestamp descending (most recent first)
585
585
  interventions.sort(
586
586
  (a, b) =>
587
- new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime(),
587
+ new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime()
588
588
  );
589
589
 
590
590
  spinner.stop();
@@ -592,14 +592,14 @@ async function listInterventions(options: InterventionsOptions): Promise<void> {
592
592
  console.log(chalk.cyan('\nGuardian Interventions'));
593
593
  console.log(
594
594
  chalk.gray(
595
- `Last ${days} days${options.session ? ` - Session: ${options.session}` : ''}`,
596
- ),
595
+ `Last ${days} days${options.session ? ` - Session: ${options.session}` : ''}`
596
+ )
597
597
  );
598
598
  console.log(chalk.gray('='.repeat(100)));
599
599
 
600
600
  if (interventions.length === 0) {
601
601
  console.log(
602
- chalk.green('\nNo interventions recorded in the specified time period.'),
602
+ chalk.green('\nNo interventions recorded in the specified time period.')
603
603
  );
604
604
  console.log('');
605
605
  return;
@@ -613,8 +613,8 @@ async function listInterventions(options: InterventionsOptions): Promise<void> {
613
613
  padRight('Severity', 12) +
614
614
  padRight('Dimension', 20) +
615
615
  padRight('Status', 12) +
616
- padRight('Time', 18),
617
- ),
616
+ padRight('Time', 18)
617
+ )
618
618
  );
619
619
  console.log(chalk.gray('-'.repeat(100)));
620
620
 
@@ -635,7 +635,7 @@ async function listInterventions(options: InterventionsOptions): Promise<void> {
635
635
  severityColor(padRight(getSeverityBadge(intervention.severity), 12)) +
636
636
  padRight(truncate(intervention.dimension, 18), 20) +
637
637
  statusColor(padRight(`[${intervention.status.toUpperCase()}]`, 12)) +
638
- chalk.gray(padRight(timestamp, 18)),
638
+ chalk.gray(padRight(timestamp, 18))
639
639
  );
640
640
  }
641
641
 
@@ -646,18 +646,18 @@ async function listInterventions(options: InterventionsOptions): Promise<void> {
646
646
  const applied = interventions.filter(i => i.status === 'applied').length;
647
647
  const pending = interventions.filter(i => i.status === 'pending').length;
648
648
  const dismissed = interventions.filter(
649
- i => i.status === 'dismissed',
649
+ i => i.status === 'dismissed'
650
650
  ).length;
651
651
 
652
652
  console.log(chalk.gray('Summary:'));
653
653
  console.log(
654
- ` Applied: ${chalk.green(applied)} Pending: ${chalk.yellow(pending)} Dismissed: ${chalk.gray(dismissed)}`,
654
+ ` Applied: ${chalk.green(applied)} Pending: ${chalk.yellow(pending)} Dismissed: ${chalk.gray(dismissed)}`
655
655
  );
656
656
  console.log('');
657
657
  } catch (error) {
658
658
  spinner.fail('Failed to load interventions');
659
659
  console.error(
660
- chalk.red(error instanceof Error ? error.message : String(error)),
660
+ chalk.red(error instanceof Error ? error.message : String(error))
661
661
  );
662
662
  }
663
663
  }
@@ -692,13 +692,13 @@ async function displayDashboard(): Promise<void> {
692
692
 
693
693
  console.log(chalk.cyan.bold('\n' + '='.repeat(80)));
694
694
  console.log(
695
- chalk.cyan.bold(' GUARDIAN ALIGNMENT DASHBOARD'),
695
+ chalk.cyan.bold(' GUARDIAN ALIGNMENT DASHBOARD')
696
696
  );
697
697
  console.log(chalk.cyan.bold('='.repeat(80)));
698
698
  console.log(
699
699
  chalk.gray(
700
- ` Last Updated: ${new Date().toLocaleString()}`,
701
- ),
700
+ ` Last Updated: ${new Date().toLocaleString()}`
701
+ )
702
702
  );
703
703
  console.log('');
704
704
 
@@ -708,7 +708,7 @@ async function displayDashboard(): Promise<void> {
708
708
 
709
709
  const statusColor = getStatusColor(report.overallStatus);
710
710
  console.log(
711
- ` Overall Status: ${statusColor(report.overallStatus.padEnd(12))} Avg Drift Score: ${chalk.white(report.averageScore.toFixed(1).padEnd(8))} Trend: ${chalk.white(report.trend)}`,
711
+ ` Overall Status: ${statusColor(report.overallStatus.padEnd(12))} Avg Drift Score: ${chalk.white(report.averageScore.toFixed(1).padEnd(8))} Trend: ${chalk.white(report.trend)}`
712
712
  );
713
713
  console.log('');
714
714
 
@@ -716,7 +716,7 @@ async function displayDashboard(): Promise<void> {
716
716
  console.log(chalk.cyan.bold(' SESSIONS'));
717
717
  console.log(chalk.gray(' ' + '-'.repeat(78)));
718
718
  console.log(
719
- ` Total: ${chalk.white(report.totalSessions.toString().padEnd(6))} Critical: ${report.criticalSessions.length > 0 ? chalk.red(report.criticalSessions.length.toString().padEnd(4)) : chalk.green('0'.padEnd(4))} Concerning: ${report.concerningSessions.length > 0 ? chalk.yellow(report.concerningSessions.length.toString().padEnd(4)) : chalk.green('0'.padEnd(4))} Healthy: ${chalk.green((report.totalSessions - report.criticalSessions.length - report.concerningSessions.length).toString())}`,
719
+ ` Total: ${chalk.white(report.totalSessions.toString().padEnd(6))} Critical: ${report.criticalSessions.length > 0 ? chalk.red(report.criticalSessions.length.toString().padEnd(4)) : chalk.green('0'.padEnd(4))} Concerning: ${report.concerningSessions.length > 0 ? chalk.yellow(report.concerningSessions.length.toString().padEnd(4)) : chalk.green('0'.padEnd(4))} Healthy: ${chalk.green((report.totalSessions - report.criticalSessions.length - report.concerningSessions.length).toString())}`
720
720
  );
721
721
  console.log('');
722
722
 
@@ -725,16 +725,16 @@ async function displayDashboard(): Promise<void> {
725
725
  console.log(chalk.gray(' ' + '-'.repeat(78)));
726
726
 
727
727
  const pendingInterventions = guardianState.interventions.filter(
728
- i => i.status === 'pending',
728
+ i => i.status === 'pending'
729
729
  );
730
730
  const recentApplied = guardianState.interventions.filter(
731
731
  i =>
732
732
  i.status === 'applied' &&
733
- new Date(i.timestamp) > new Date(Date.now() - 24 * 60 * 60 * 1000),
733
+ new Date(i.timestamp) > new Date(Date.now() - 24 * 60 * 60 * 1000)
734
734
  );
735
735
 
736
736
  console.log(
737
- ` Pending: ${pendingInterventions.length > 0 ? chalk.yellow(pendingInterventions.length.toString().padEnd(6)) : chalk.green('0'.padEnd(6))} Applied (24h): ${chalk.white(recentApplied.length.toString().padEnd(6))} Recommended: ${recommendations.length > 0 ? chalk.yellow(recommendations.length.toString()) : chalk.green('0')}`,
737
+ ` Pending: ${pendingInterventions.length > 0 ? chalk.yellow(pendingInterventions.length.toString().padEnd(6)) : chalk.green('0'.padEnd(6))} Applied (24h): ${chalk.white(recentApplied.length.toString().padEnd(6))} Recommended: ${recommendations.length > 0 ? chalk.yellow(recommendations.length.toString()) : chalk.green('0')}`
738
738
  );
739
739
  console.log('');
740
740
 
@@ -748,14 +748,14 @@ async function displayDashboard(): Promise<void> {
748
748
  console.log(chalk.green(' No sessions require Guardian review.'));
749
749
  } else {
750
750
  const criticalReviews = pendingReviews.filter(
751
- r => r.severity === 'critical',
751
+ r => r.severity === 'critical'
752
752
  ).length;
753
753
  const highReviews = pendingReviews.filter(
754
- r => r.severity === 'high',
754
+ r => r.severity === 'high'
755
755
  ).length;
756
756
 
757
757
  console.log(
758
- ` Pending: ${chalk.yellow(pendingReviews.length.toString().padEnd(6))} Critical: ${criticalReviews > 0 ? chalk.red(criticalReviews.toString().padEnd(6)) : chalk.green('0'.padEnd(6))} High: ${highReviews > 0 ? chalk.yellow(highReviews.toString()) : chalk.green('0')}`,
758
+ ` Pending: ${chalk.yellow(pendingReviews.length.toString().padEnd(6))} Critical: ${criticalReviews > 0 ? chalk.red(criticalReviews.toString().padEnd(6)) : chalk.green('0'.padEnd(6))} High: ${highReviews > 0 ? chalk.yellow(highReviews.toString()) : chalk.green('0')}`
759
759
  );
760
760
  }
761
761
  console.log('');
@@ -768,13 +768,13 @@ async function displayDashboard(): Promise<void> {
768
768
  for (const rec of recommendations.slice(0, 3)) {
769
769
  const severityColor = getSeverityColor(rec.severity);
770
770
  console.log(
771
- ` ${severityColor(getSeverityBadge(rec.severity))} ${rec.dimension}: ${truncate(rec.action, 50)}`,
771
+ ` ${severityColor(getSeverityBadge(rec.severity))} ${rec.dimension}: ${truncate(rec.action, 50)}`
772
772
  );
773
773
  }
774
774
 
775
775
  if (recommendations.length > 3) {
776
776
  console.log(
777
- chalk.gray(` ... and ${recommendations.length - 3} more`),
777
+ chalk.gray(` ... and ${recommendations.length - 3} more`)
778
778
  );
779
779
  }
780
780
  console.log('');
@@ -785,16 +785,16 @@ async function displayDashboard(): Promise<void> {
785
785
  console.log(chalk.gray(' ' + '-'.repeat(78)));
786
786
  console.log(
787
787
  chalk.gray(
788
- ' wundr guardian report - Generate full alignment report',
789
- ),
788
+ ' wundr guardian report - Generate full alignment report'
789
+ )
790
790
  );
791
791
  console.log(
792
792
  chalk.gray(
793
- ' wundr guardian review - View sessions requiring attention',
794
- ),
793
+ ' wundr guardian review - View sessions requiring attention'
794
+ )
795
795
  );
796
796
  console.log(
797
- chalk.gray(' wundr guardian interventions - List recent interventions'),
797
+ chalk.gray(' wundr guardian interventions - List recent interventions')
798
798
  );
799
799
  console.log('');
800
800
 
@@ -803,7 +803,7 @@ async function displayDashboard(): Promise<void> {
803
803
  } catch (error) {
804
804
  spinner.fail('Failed to load dashboard');
805
805
  console.error(
806
- chalk.red(error instanceof Error ? error.message : String(error)),
806
+ chalk.red(error instanceof Error ? error.message : String(error))
807
807
  );
808
808
  }
809
809
  }
@@ -818,7 +818,7 @@ async function displayDashboard(): Promise<void> {
818
818
  export function createGuardianCommand(): Command {
819
819
  const guardian = new Command('guardian')
820
820
  .description(
821
- 'Guardian Dashboard - AI alignment monitoring and intervention management',
821
+ 'Guardian Dashboard - AI alignment monitoring and intervention management'
822
822
  )
823
823
  .addHelpText(
824
824
  'after',
@@ -831,7 +831,7 @@ Examples:
831
831
  ${chalk.green('wundr guardian review')} Show sessions requiring Guardian review
832
832
  ${chalk.green('wundr guardian interventions')} List recent interventions
833
833
  ${chalk.green('wundr guardian interventions --days 14')} Show interventions from last 14 days
834
- `),
834
+ `)
835
835
  );
836
836
 
837
837
  // Default action - show dashboard
@@ -19,7 +19,7 @@ export class InitCommands {
19
19
  constructor(
20
20
  private program: Command,
21
21
  private configManager: ConfigManager,
22
- private pluginManager: PluginManager,
22
+ private pluginManager: PluginManager
23
23
  ) {
24
24
  this.registerCommands();
25
25
  }
@@ -37,7 +37,10 @@ export class InitCommands {
37
37
  .option('--skip-git', 'skip git initialization')
38
38
  .option('--skip-install', 'skip dependency installation')
39
39
  .option('--monorepo', 'initialize as monorepo')
40
- .option('--with-rag', 'initialize RAG (Retrieval-Augmented Generation) support')
40
+ .option(
41
+ '--with-rag',
42
+ 'initialize RAG (Retrieval-Augmented Generation) support'
43
+ )
41
44
  .action(async (name, options) => {
42
45
  await this.initProject(name, options);
43
46
  });
@@ -132,10 +135,10 @@ export class InitCommands {
132
135
 
133
136
  if (ragResult.success) {
134
137
  logger.success(
135
- `RAG initialized: ${ragResult.filesIndexed} files indexed`,
138
+ `RAG initialized: ${ragResult.filesIndexed} files indexed`
136
139
  );
137
140
  logger.info(
138
- ` Framework detected: ${chalk.cyan(ragResult.framework.name)}`,
141
+ ` Framework detected: ${chalk.cyan(ragResult.framework.name)}`
139
142
  );
140
143
  } else {
141
144
  logger.warn('RAG initialization had issues:');
@@ -158,7 +161,7 @@ export class InitCommands {
158
161
  'WUNDR_INIT_PROJECT_FAILED',
159
162
  'Failed to initialize project',
160
163
  { name, options },
161
- true,
164
+ true
162
165
  );
163
166
  }
164
167
  }
@@ -189,7 +192,7 @@ export class InitCommands {
189
192
  logger.info(` Exclusions: ${chalk.cyan(result.excludePath)}`);
190
193
  logger.info(` Files indexed: ${chalk.cyan(result.filesIndexed)}`);
191
194
  logger.info(
192
- ` Framework: ${chalk.cyan(result.framework.name)} (${result.framework.projectType})`,
195
+ ` Framework: ${chalk.cyan(result.framework.name)} (${result.framework.projectType})`
193
196
  );
194
197
  } else {
195
198
  logger.error('RAG initialization failed:');
@@ -206,7 +209,7 @@ export class InitCommands {
206
209
  'WUNDR_INIT_RAG_FAILED',
207
210
  'Failed to initialize RAG',
208
211
  { options },
209
- true,
212
+ true
210
213
  );
211
214
  }
212
215
  }
@@ -234,7 +237,7 @@ export class InitCommands {
234
237
  'WUNDR_INIT_CONFIG_FAILED',
235
238
  'Failed to initialize configuration',
236
239
  { options },
237
- true,
240
+ true
238
241
  );
239
242
  }
240
243
  }
@@ -269,7 +272,7 @@ export class InitCommands {
269
272
  // Create workspace-specific wundr config
270
273
  await this.configManager.loadConfig();
271
274
  await this.configManager.saveConfig(
272
- path.join(process.cwd(), 'wundr.config.json'),
275
+ path.join(process.cwd(), 'wundr.config.json')
273
276
  );
274
277
 
275
278
  logger.success('Workspace initialized successfully!');
@@ -278,7 +281,7 @@ export class InitCommands {
278
281
  'WUNDR_INIT_WORKSPACE_FAILED',
279
282
  'Failed to initialize workspace',
280
283
  { options },
281
- true,
284
+ true
282
285
  );
283
286
  }
284
287
  }
@@ -305,7 +308,7 @@ export class InitCommands {
305
308
  'WUNDR_INIT_PLUGINS_FAILED',
306
309
  'Failed to initialize plugins',
307
310
  { options },
308
- true,
311
+ true
309
312
  );
310
313
  }
311
314
  }
@@ -315,7 +318,7 @@ export class InitCommands {
315
318
  */
316
319
  private async createProjectStructure(
317
320
  projectPath: string,
318
- options: any,
321
+ options: any
319
322
  ): Promise<void> {
320
323
  await fs.ensureDir(projectPath);
321
324
 
@@ -332,7 +335,7 @@ export class InitCommands {
332
335
  // Create project-specific config
333
336
  const config = await this.configManager.loadConfig();
334
337
  await this.configManager.saveConfig(
335
- path.join(projectPath, 'wundr.config.json'),
338
+ path.join(projectPath, 'wundr.config.json')
336
339
  );
337
340
  }
338
341
 
@@ -341,11 +344,11 @@ export class InitCommands {
341
344
  */
342
345
  private async createDefaultStructure(
343
346
  projectPath: string,
344
- options: any,
347
+ options: any
345
348
  ): Promise<void> {
346
349
  const directories = options.monorepo
347
- ? ['packages', 'apps', 'tools', 'docs', 'scripts', '.claude-flow']
348
- : ['src', 'tests', 'docs', 'scripts', '.claude-flow'];
350
+ ? ['packages', 'apps', 'tools', 'docs', 'scripts', '.ruflo']
351
+ : ['src', 'tests', 'docs', 'scripts', '.ruflo'];
349
352
 
350
353
  for (const dir of directories) {
351
354
  await fs.ensureDir(path.join(projectPath, dir));
@@ -644,11 +647,11 @@ fi
644
647
 
645
648
  await fs.writeFile(
646
649
  path.join(projectPath, 'scripts', 'verify-claims.sh'),
647
- verifyScript,
650
+ verifyScript
648
651
  );
649
652
  await fs.chmod(
650
653
  path.join(projectPath, 'scripts', 'verify-claims.sh'),
651
- '755',
654
+ '755'
652
655
  );
653
656
 
654
657
  // Create FAILURES.md
@@ -678,7 +681,7 @@ _(None yet - will be populated when failures are resolved)_
678
681
 
679
682
  await fs.writeFile(
680
683
  path.join(projectPath, 'docs', 'FAILURES.md'),
681
- failuresMd,
684
+ failuresMd
682
685
  );
683
686
 
684
687
  // Create verification hooks
@@ -716,9 +719,9 @@ _(None yet - will be populated when failures are resolved)_
716
719
  };
717
720
 
718
721
  await fs.writeJson(
719
- path.join(projectPath, '.claude-flow', 'verification-hooks.json'),
722
+ path.join(projectPath, '.ruflo', 'verification-hooks.json'),
720
723
  verificationHooks,
721
- { spaces: 2 },
724
+ { spaces: 2 }
722
725
  );
723
726
 
724
727
  // Create agent verification protocol
@@ -759,7 +762,7 @@ Remember: It's better to report a failure honestly than to claim false success.
759
762
 
760
763
  await fs.writeFile(
761
764
  path.join(projectPath, 'docs', 'AGENT_VERIFICATION_PROTOCOL.md'),
762
- agentProtocol,
765
+ agentProtocol
763
766
  );
764
767
 
765
768
  logger.debug('Verification files created');