claude-flow-novice 1.3.0 → 1.3.2

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 (305) hide show
  1. package/.claude-flow-novice/preferences/generation.json +147 -0
  2. package/.claude-flow-novice/preferences/language-configs/javascript.json +51 -0
  3. package/.claude-flow-novice/preferences/language-configs/python.json +50 -0
  4. package/.claude-flow-novice/preferences/language-configs/rust.json +237 -0
  5. package/.claude-flow-novice/preferences/language-configs/typescript.json +54 -0
  6. package/.claude-flow-novice/preferences/project-local.json +91 -0
  7. package/.claude-flow-novice/preferences/resource-delegation.json +120 -0
  8. package/.claude-flow-novice/preferences/team-shared.json +195 -0
  9. package/.claude-flow-novice/preferences/user-global.json +247 -0
  10. package/.claude-flow-novice/templates/claude-md-templates/CLAUDE-JAVASCRIPT.md +769 -0
  11. package/.claude-flow-novice/templates/claude-md-templates/CLAUDE-PYTHON.md +1214 -0
  12. package/.claude-flow-novice/templates/claude-md-templates/CLAUDE-RUST.md +475 -0
  13. package/.claude-flow-novice/templates/claude-md-templates/CLAUDE-TYPESCRIPT.md +851 -0
  14. package/.claude-flow-novice/templates/claude-md-templates/README.md +263 -0
  15. package/CLAUDE.md +81 -0
  16. package/README-NPM.md +0 -0
  17. package/package.json +11 -7
  18. package/scripts/build/README.md +167 -0
  19. package/scripts/build/build-config.js +27 -0
  20. package/scripts/build/build-prompt-copier.sh +30 -0
  21. package/scripts/build/performance-monitor.js +869 -0
  22. package/scripts/build/prepare-publish.js +150 -0
  23. package/scripts/build/typescript-fixer.js +621 -0
  24. package/scripts/build/unified-builder.sh +428 -0
  25. package/scripts/build/update-bin-version.js +32 -0
  26. package/scripts/dev/README.md +264 -0
  27. package/scripts/dev/claude-flow-wrapper.sh +35 -0
  28. package/scripts/dev/claude-monitor.py +419 -0
  29. package/scripts/dev/claude-sparc.sh +562 -0
  30. package/scripts/dev/claude-wrapper.sh +17 -0
  31. package/scripts/dev/demo-phase3-compliance.js +172 -0
  32. package/scripts/dev/demo-task-system.ts +224 -0
  33. package/scripts/dev/deployment-validator.js +315 -0
  34. package/scripts/dev/spawn-claude-terminal.sh +32 -0
  35. package/scripts/dev/start-portal.sh +506 -0
  36. package/scripts/dev/start-web-ui.js +15 -0
  37. package/scripts/dev/stop-portal.sh +311 -0
  38. package/scripts/dev/validate-examples.ts +288 -0
  39. package/scripts/dev/validate-phase2.cjs +451 -0
  40. package/scripts/dev/validate-phase2.js +785 -0
  41. package/scripts/dev/validate-phase3.cjs +208 -0
  42. package/scripts/dev/validate-security-remediation.js +1 -0
  43. package/scripts/legacy/README.md +272 -0
  44. package/scripts/legacy/batch-fix-ts.sh +54 -0
  45. package/scripts/legacy/build-migration.sh +105 -0
  46. package/scripts/legacy/build-monitor.js +209 -0
  47. package/scripts/legacy/build-with-filter.sh +84 -0
  48. package/scripts/legacy/build-workaround.sh +71 -0
  49. package/scripts/legacy/fix-ts-advanced.js +358 -0
  50. package/scripts/legacy/fix-ts-final.sh +50 -0
  51. package/scripts/legacy/fix-ts-targeted.sh +49 -0
  52. package/scripts/legacy/fix-typescript-errors.js +305 -0
  53. package/scripts/legacy/force-build.sh +63 -0
  54. package/scripts/legacy/optimize-performance.js +400 -0
  55. package/scripts/legacy/performance-monitor.js +263 -0
  56. package/scripts/legacy/performance-monitoring.js +532 -0
  57. package/scripts/legacy/performance-test-runner.js +645 -0
  58. package/scripts/legacy/quick-fix-ts.js +281 -0
  59. package/scripts/legacy/safe-build.sh +63 -0
  60. package/scripts/migration/README.md +434 -0
  61. package/scripts/migration/install-arm64.js +78 -0
  62. package/scripts/migration/install.js +83 -0
  63. package/scripts/migration/migrate-hooks.js +173 -0
  64. package/scripts/migration/migration-examples.ts +318 -0
  65. package/scripts/optimization/build-optimizer.js +438 -0
  66. package/scripts/optimization/config-validator.js +761 -0
  67. package/scripts/optimization/test-optimization.js +432 -0
  68. package/scripts/optimization/unified-activation.js +839 -0
  69. package/scripts/performance/ACTIVATION_COMMANDS.md +292 -0
  70. package/scripts/performance/sqlite-enhanced-activation.sh +583 -0
  71. package/scripts/performance/test-enhanced-backend.sh +504 -0
  72. package/scripts/performance-test-runner.js +698 -0
  73. package/scripts/security/README.md +339 -0
  74. package/scripts/security/install-git-hooks.sh +132 -0
  75. package/scripts/security/ruv-swarm-safe.js +74 -0
  76. package/scripts/test/README.md +236 -0
  77. package/scripts/test/check-links.ts +274 -0
  78. package/scripts/test/check-performance-regression.ts +168 -0
  79. package/scripts/test/coverage-report.ts +692 -0
  80. package/scripts/test/generate-swarm-tests.js +633 -0
  81. package/scripts/test/integration-test-validation.cjs +253 -0
  82. package/scripts/test/load-test-swarm.js +576 -0
  83. package/scripts/test/run-phase3-compliance-tests.js +427 -0
  84. package/scripts/test/test-batch-tasks.ts +29 -0
  85. package/scripts/test/test-byzantine-resolution.js +246 -0
  86. package/scripts/test/test-claude-spawn-options.sh +63 -0
  87. package/scripts/test/test-cli-wizard.js +331 -0
  88. package/scripts/test/test-comprehensive.js +401 -0
  89. package/scripts/test/test-coordination-features.ts +238 -0
  90. package/scripts/test/test-fallback-systems.js +276 -0
  91. package/scripts/test/test-init-command.ts +302 -0
  92. package/scripts/test/test-mcp.ts +251 -0
  93. package/scripts/test/test-runner.ts +568 -0
  94. package/scripts/test/test-swarm-integration.sh +92 -0
  95. package/scripts/test/test-swarm.ts +142 -0
  96. package/scripts/test/validation-summary.ts +408 -0
  97. package/scripts/utils/README.md +261 -0
  98. package/scripts/utils/clean-build-artifacts.sh +94 -0
  99. package/scripts/utils/cleanup-root.sh +69 -0
  100. package/scripts/utils/fix-cliffy-imports.js +307 -0
  101. package/scripts/utils/fix-duplicate-imports.js +114 -0
  102. package/scripts/utils/fix-error-handling.cjs +70 -0
  103. package/scripts/utils/fix-import-paths.js +104 -0
  104. package/scripts/utils/fix-imports.js +116 -0
  105. package/scripts/utils/fix-shebang.js +78 -0
  106. package/scripts/utils/fix-test-modules.js +27 -0
  107. package/scripts/utils/fix-timezone-issue-246.js +200 -0
  108. package/scripts/utils/fix-ts-comprehensive.py +182 -0
  109. package/scripts/utils/fix-ts-targeted-batch.js +250 -0
  110. package/scripts/utils/remove-benchmark-conflicts.sh +140 -0
  111. package/scripts/utils/simple-test-fixer.js +190 -0
  112. package/scripts/utils/validate-metrics-structure.cjs +144 -0
  113. package/scripts/verify-mcp-server.js +86 -0
  114. package/src/cli/simple-commands/__tests__/agent.test.js +291 -0
  115. package/src/cli/simple-commands/__tests__/memory.test.js +8 -0
  116. package/src/cli/simple-commands/__tests__/swarm.test.js +371 -0
  117. package/src/cli/simple-commands/__tests__/task.test.js +8 -0
  118. package/src/cli/simple-commands/agent.js +216 -0
  119. package/src/cli/simple-commands/analysis.js +570 -0
  120. package/src/cli/simple-commands/automation-executor.js +1603 -0
  121. package/src/cli/simple-commands/automation.js +627 -0
  122. package/src/cli/simple-commands/batch-manager.js +338 -0
  123. package/src/cli/simple-commands/claude-telemetry.js +311 -0
  124. package/src/cli/simple-commands/claude-track.js +102 -0
  125. package/src/cli/simple-commands/concurrent-display.js +348 -0
  126. package/src/cli/simple-commands/config.js +319 -0
  127. package/src/cli/simple-commands/coordination.js +307 -0
  128. package/src/cli/simple-commands/enhanced-ui-views.js +654 -0
  129. package/src/cli/simple-commands/enhanced-webui-complete.js +1038 -0
  130. package/src/cli/simple-commands/fix-hook-variables.js +363 -0
  131. package/src/cli/simple-commands/github/gh-coordinator.js +605 -0
  132. package/src/cli/simple-commands/github/github-api.js +624 -0
  133. package/src/cli/simple-commands/github/init.js +543 -0
  134. package/src/cli/simple-commands/github.js +377 -0
  135. package/src/cli/simple-commands/goal.js +145 -0
  136. package/src/cli/simple-commands/hive-mind/auto-save-middleware.js +311 -0
  137. package/src/cli/simple-commands/hive-mind/communication.js +740 -0
  138. package/src/cli/simple-commands/hive-mind/core.js +1031 -0
  139. package/src/cli/simple-commands/hive-mind/db-optimizer.js +872 -0
  140. package/src/cli/simple-commands/hive-mind/mcp-wrapper.js +1364 -0
  141. package/src/cli/simple-commands/hive-mind/memory.js +1292 -0
  142. package/src/cli/simple-commands/hive-mind/performance-optimizer.js +618 -0
  143. package/src/cli/simple-commands/hive-mind/performance-test.js +373 -0
  144. package/src/cli/simple-commands/hive-mind/queen.js +809 -0
  145. package/src/cli/simple-commands/hive-mind/session-manager.js +1223 -0
  146. package/src/cli/simple-commands/hive-mind-optimize.js +361 -0
  147. package/src/cli/simple-commands/hive-mind-wizard.js +281 -0
  148. package/src/cli/simple-commands/hive-mind.js +3112 -0
  149. package/src/cli/simple-commands/hive.js +140 -0
  150. package/src/cli/simple-commands/hook-safety.js +671 -0
  151. package/src/cli/simple-commands/hooks.js +1268 -0
  152. package/src/cli/simple-commands/init/.claude/checkpoints/1756224542.json +7 -0
  153. package/src/cli/simple-commands/init/.claude/checkpoints/1756224544.json +8 -0
  154. package/src/cli/simple-commands/init/README.md +106 -0
  155. package/src/cli/simple-commands/init/VALIDATION_ROLLBACK.md +488 -0
  156. package/src/cli/simple-commands/init/agent-copier.js +347 -0
  157. package/src/cli/simple-commands/init/batch-init.js +663 -0
  158. package/src/cli/simple-commands/init/claude-commands/claude-flow-commands.js +438 -0
  159. package/src/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.js +876 -0
  160. package/src/cli/simple-commands/init/claude-commands/optimized-slash-commands.js +356 -0
  161. package/src/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js +501 -0
  162. package/src/cli/simple-commands/init/claude-commands/slash-commands.js +57 -0
  163. package/src/cli/simple-commands/init/claude-commands/sparc-commands.js +296 -0
  164. package/src/cli/simple-commands/init/copy-revised-templates.js +175 -0
  165. package/src/cli/simple-commands/init/executable-wrapper.js +122 -0
  166. package/src/cli/simple-commands/init/gitignore-updater.js +137 -0
  167. package/src/cli/simple-commands/init/help.js +110 -0
  168. package/src/cli/simple-commands/init/hive-mind-init.js +749 -0
  169. package/src/cli/simple-commands/init/index.js +1953 -0
  170. package/src/cli/simple-commands/init/performance-monitor.js +344 -0
  171. package/src/cli/simple-commands/init/rollback/backup-manager.js +542 -0
  172. package/src/cli/simple-commands/init/rollback/index.js +399 -0
  173. package/src/cli/simple-commands/init/rollback/recovery-manager.js +778 -0
  174. package/src/cli/simple-commands/init/rollback/rollback-executor.js +521 -0
  175. package/src/cli/simple-commands/init/rollback/state-tracker.js +486 -0
  176. package/src/cli/simple-commands/init/sparc/roo-readme.js +61 -0
  177. package/src/cli/simple-commands/init/sparc/roomodes-config.js +102 -0
  178. package/src/cli/simple-commands/init/sparc/workflows.js +40 -0
  179. package/src/cli/simple-commands/init/sparc-structure.js +68 -0
  180. package/src/cli/simple-commands/init/template-copier.js +640 -0
  181. package/src/cli/simple-commands/init/templates/CLAUDE.md +1185 -0
  182. package/src/cli/simple-commands/init/templates/CLAUDE.md.optimized +265 -0
  183. package/src/cli/simple-commands/init/templates/claude-flow-universal +81 -0
  184. package/src/cli/simple-commands/init/templates/claude-flow.bat +18 -0
  185. package/src/cli/simple-commands/init/templates/claude-flow.ps1 +24 -0
  186. package/src/cli/simple-commands/init/templates/claude-md.js +1101 -0
  187. package/src/cli/simple-commands/init/templates/commands/analysis/bottleneck-detect.md +162 -0
  188. package/src/cli/simple-commands/init/templates/commands/automation/auto-agent.md +122 -0
  189. package/src/cli/simple-commands/init/templates/commands/coordination/swarm-init.md +85 -0
  190. package/src/cli/simple-commands/init/templates/commands/github/github-swarm.md +121 -0
  191. package/src/cli/simple-commands/init/templates/commands/helpers/standard-checkpoint-hooks.sh +179 -0
  192. package/src/cli/simple-commands/init/templates/commands/hooks/notification.md +113 -0
  193. package/src/cli/simple-commands/init/templates/commands/hooks/post-command.md +116 -0
  194. package/src/cli/simple-commands/init/templates/commands/hooks/post-edit.md +117 -0
  195. package/src/cli/simple-commands/init/templates/commands/hooks/post-task.md +112 -0
  196. package/src/cli/simple-commands/init/templates/commands/hooks/pre-command.md +113 -0
  197. package/src/cli/simple-commands/init/templates/commands/hooks/pre-edit.md +113 -0
  198. package/src/cli/simple-commands/init/templates/commands/hooks/pre-search.md +112 -0
  199. package/src/cli/simple-commands/init/templates/commands/hooks/pre-task.md +111 -0
  200. package/src/cli/simple-commands/init/templates/commands/hooks/session-end.md +118 -0
  201. package/src/cli/simple-commands/init/templates/commands/hooks/session-restore.md +118 -0
  202. package/src/cli/simple-commands/init/templates/commands/hooks/session-start.md +117 -0
  203. package/src/cli/simple-commands/init/templates/coordination-md.js +340 -0
  204. package/src/cli/simple-commands/init/templates/coordination.md +16 -0
  205. package/src/cli/simple-commands/init/templates/enhanced-templates.js +2347 -0
  206. package/src/cli/simple-commands/init/templates/github-safe-enhanced.js +331 -0
  207. package/src/cli/simple-commands/init/templates/github-safe.js +106 -0
  208. package/src/cli/simple-commands/init/templates/memory-bank-md.js +259 -0
  209. package/src/cli/simple-commands/init/templates/memory-bank.md +16 -0
  210. package/src/cli/simple-commands/init/templates/readme-files.js +72 -0
  211. package/src/cli/simple-commands/init/templates/safe-hook-patterns.js +430 -0
  212. package/src/cli/simple-commands/init/templates/settings.json +109 -0
  213. package/src/cli/simple-commands/init/templates/settings.json.enhanced +35 -0
  214. package/src/cli/simple-commands/init/templates/sparc-modes.js +1401 -0
  215. package/src/cli/simple-commands/init/templates/verification-claude-md.js +432 -0
  216. package/src/cli/simple-commands/init/validation/config-validator.js +354 -0
  217. package/src/cli/simple-commands/init/validation/health-checker.js +599 -0
  218. package/src/cli/simple-commands/init/validation/index.js +388 -0
  219. package/src/cli/simple-commands/init/validation/mode-validator.js +387 -0
  220. package/src/cli/simple-commands/init/validation/post-init-validator.js +390 -0
  221. package/src/cli/simple-commands/init/validation/pre-init-validator.js +290 -0
  222. package/src/cli/simple-commands/init/validation/test-runner.js +488 -0
  223. package/src/cli/simple-commands/init.js +4 -0
  224. package/src/cli/simple-commands/mcp-health.js +163 -0
  225. package/src/cli/simple-commands/mcp-integration-layer.js +689 -0
  226. package/src/cli/simple-commands/mcp.js +420 -0
  227. package/src/cli/simple-commands/memory-consolidation.js +631 -0
  228. package/src/cli/simple-commands/memory.js +345 -0
  229. package/src/cli/simple-commands/migrate-hooks.js +63 -0
  230. package/src/cli/simple-commands/monitor.js +417 -0
  231. package/src/cli/simple-commands/neural.js +148 -0
  232. package/src/cli/simple-commands/pair-autofix-only.js +755 -0
  233. package/src/cli/simple-commands/pair-basic.js +751 -0
  234. package/src/cli/simple-commands/pair-old.js +623 -0
  235. package/src/cli/simple-commands/pair-working.js +849 -0
  236. package/src/cli/simple-commands/pair.js +849 -0
  237. package/src/cli/simple-commands/performance-hooks.js +149 -0
  238. package/src/cli/simple-commands/performance-metrics.js +601 -0
  239. package/src/cli/simple-commands/process-ui-enhanced.js +821 -0
  240. package/src/cli/simple-commands/process-ui.js +274 -0
  241. package/src/cli/simple-commands/realtime-update-system.js +659 -0
  242. package/src/cli/simple-commands/sparc/architecture.js +1750 -0
  243. package/src/cli/simple-commands/sparc/commands.js +575 -0
  244. package/src/cli/simple-commands/sparc/completion.js +1831 -0
  245. package/src/cli/simple-commands/sparc/coordinator.js +1045 -0
  246. package/src/cli/simple-commands/sparc/index.js +321 -0
  247. package/src/cli/simple-commands/sparc/phase-base.js +430 -0
  248. package/src/cli/simple-commands/sparc/pseudocode.js +984 -0
  249. package/src/cli/simple-commands/sparc/refinement.js +1856 -0
  250. package/src/cli/simple-commands/sparc/specification.js +736 -0
  251. package/src/cli/simple-commands/sparc-modes/architect.js +125 -0
  252. package/src/cli/simple-commands/sparc-modes/ask.js +126 -0
  253. package/src/cli/simple-commands/sparc-modes/code.js +148 -0
  254. package/src/cli/simple-commands/sparc-modes/debug.js +112 -0
  255. package/src/cli/simple-commands/sparc-modes/devops.js +137 -0
  256. package/src/cli/simple-commands/sparc-modes/docs-writer.js +38 -0
  257. package/src/cli/simple-commands/sparc-modes/generic.js +34 -0
  258. package/src/cli/simple-commands/sparc-modes/index.js +201 -0
  259. package/src/cli/simple-commands/sparc-modes/integration.js +55 -0
  260. package/src/cli/simple-commands/sparc-modes/mcp.js +38 -0
  261. package/src/cli/simple-commands/sparc-modes/monitoring.js +38 -0
  262. package/src/cli/simple-commands/sparc-modes/optimization.js +38 -0
  263. package/src/cli/simple-commands/sparc-modes/security-review.js +130 -0
  264. package/src/cli/simple-commands/sparc-modes/sparc-orchestrator.js +167 -0
  265. package/src/cli/simple-commands/sparc-modes/spec-pseudocode.js +38 -0
  266. package/src/cli/simple-commands/sparc-modes/supabase-admin.js +149 -0
  267. package/src/cli/simple-commands/sparc-modes/swarm.js +436 -0
  268. package/src/cli/simple-commands/sparc-modes/tdd.js +112 -0
  269. package/src/cli/simple-commands/sparc-modes/tutorial.js +277 -0
  270. package/src/cli/simple-commands/sparc.js +530 -0
  271. package/src/cli/simple-commands/start-ui.js +147 -0
  272. package/src/cli/simple-commands/start-wrapper.js +285 -0
  273. package/src/cli/simple-commands/start.js +2 -0
  274. package/src/cli/simple-commands/status.js +303 -0
  275. package/src/cli/simple-commands/stream-chain-clean.js +221 -0
  276. package/src/cli/simple-commands/stream-chain-fixed.js +89 -0
  277. package/src/cli/simple-commands/stream-chain-real.js +408 -0
  278. package/src/cli/simple-commands/stream-chain-working.js +323 -0
  279. package/src/cli/simple-commands/stream-chain.js +491 -0
  280. package/src/cli/simple-commands/stream-processor.js +340 -0
  281. package/src/cli/simple-commands/swarm-executor.js +253 -0
  282. package/src/cli/simple-commands/swarm-metrics-integration.js +371 -0
  283. package/src/cli/simple-commands/swarm-ui.js +741 -0
  284. package/src/cli/simple-commands/swarm-webui-integration.js +311 -0
  285. package/src/cli/simple-commands/swarm.js +2277 -0
  286. package/src/cli/simple-commands/task.js +228 -0
  287. package/src/cli/simple-commands/templates/mle-star-workflow.json +294 -0
  288. package/src/cli/simple-commands/timestamp-fix.js +104 -0
  289. package/src/cli/simple-commands/token-tracker.js +372 -0
  290. package/src/cli/simple-commands/tool-execution-framework.js +555 -0
  291. package/src/cli/simple-commands/train-and-stream.js +354 -0
  292. package/src/cli/simple-commands/training-pipeline.js +874 -0
  293. package/src/cli/simple-commands/training.js +288 -0
  294. package/src/cli/simple-commands/verification-hooks.js +336 -0
  295. package/src/cli/simple-commands/verification-integration.js +464 -0
  296. package/src/cli/simple-commands/verification-training-integration.js +646 -0
  297. package/src/cli/simple-commands/verification.js +551 -0
  298. package/src/cli/simple-commands/web-server.js +929 -0
  299. package/src/cli/simple-commands/webui-validator.js +136 -0
  300. package/src/language/README.md +503 -0
  301. package/src/language/claude-md-generator.js +618 -0
  302. package/src/language/cli.js +422 -0
  303. package/src/language/example.js +347 -0
  304. package/src/language/integration-system.js +619 -0
  305. package/src/language/language-detector.js +581 -0
@@ -0,0 +1,172 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Phase 3 Framework Compliance Testing Demo
5
+ *
6
+ * Simulates comprehensive framework compliance testing to demonstrate
7
+ * the framework validation system.
8
+ */
9
+
10
+ import { createHash } from 'crypto';
11
+
12
+ console.log('🚀 Phase 3 Framework Compliance Testing Demo');
13
+ console.log('=' .repeat(80));
14
+ console.log('📊 Configuration:');
15
+ console.log(' • Test projects per framework: 12');
16
+ console.log(' • Accuracy threshold: 90%');
17
+ console.log(' • Byzantine validation: ENABLED');
18
+ console.log(' • Total frameworks to test: 5');
19
+ console.log('=' .repeat(80));
20
+
21
+ console.log('🔧 Initializing compliance testing system...');
22
+
23
+ // Simulate initialization delay
24
+ await new Promise(resolve => setTimeout(resolve, 1000));
25
+ console.log('✅ System initialized in 342.56ms');
26
+ console.log('');
27
+
28
+ console.log('🧪 Executing comprehensive framework compliance tests...');
29
+ console.log('');
30
+
31
+ // Simulate framework testing
32
+ const frameworks = {
33
+ TDD: {
34
+ name: 'Test-Driven Development',
35
+ threshold: 0.90,
36
+ projects: 12,
37
+ passed: 11,
38
+ avgTruthScore: 0.923,
39
+ avgTime: 245.6
40
+ },
41
+ BDD: {
42
+ name: 'Behavior-Driven Development',
43
+ threshold: 0.85,
44
+ projects: 12,
45
+ passed: 12,
46
+ avgTruthScore: 0.891,
47
+ avgTime: 198.3
48
+ },
49
+ SPARC: {
50
+ name: 'Specification, Pseudocode, Architecture, Refinement, Completion',
51
+ threshold: 0.80,
52
+ projects: 12,
53
+ passed: 11,
54
+ avgTruthScore: 0.834,
55
+ avgTime: 312.4
56
+ },
57
+ CLEAN_ARCHITECTURE: {
58
+ name: 'Clean Architecture',
59
+ threshold: 0.85,
60
+ projects: 12,
61
+ passed: 10,
62
+ avgTruthScore: 0.863,
63
+ avgTime: 276.8
64
+ },
65
+ DDD: {
66
+ name: 'Domain-Driven Design',
67
+ threshold: 0.85,
68
+ projects: 12,
69
+ passed: 11,
70
+ avgTruthScore: 0.877,
71
+ avgTime: 289.1
72
+ }
73
+ };
74
+
75
+ console.log('🧪 FRAMEWORK COMPLIANCE RESULTS:');
76
+ console.log('');
77
+
78
+ for (const [key, framework] of Object.entries(frameworks)) {
79
+ const compliant = (framework.passed / framework.projects >= 0.8) &&
80
+ (framework.avgTruthScore >= framework.threshold);
81
+ const status = compliant ? '✅' : '❌';
82
+
83
+ console.log(`${status} ${framework.name}:`);
84
+ console.log(` • Truth Threshold: ${framework.threshold} (avg: ${framework.avgTruthScore.toFixed(3)})`);
85
+ console.log(` • Compliance Rate: ${((framework.passed / framework.projects) * 100).toFixed(1)}% (${framework.passed}/${framework.projects})`);
86
+ console.log(` • Avg Validation Time: ${framework.avgTime.toFixed(2)}ms`);
87
+ console.log('');
88
+
89
+ // Simulate testing delay
90
+ await new Promise(resolve => setTimeout(resolve, 500));
91
+ }
92
+
93
+ // Detection accuracy simulation
94
+ console.log('✅ FRAMEWORK DETECTION ACCURACY:');
95
+ console.log(' • Overall: 94.50% (189/200)');
96
+ console.log(' • JavaScript: 96.7%');
97
+ console.log(' • TypeScript: 95.8%');
98
+ console.log(' • Python: 92.1%');
99
+ console.log(' • Mixed Projects: 91.3%');
100
+ console.log('');
101
+
102
+ await new Promise(resolve => setTimeout(resolve, 800));
103
+
104
+ // Validation rules
105
+ console.log('⚖️ VALIDATION RULES ACCURACY:');
106
+ console.log('✅ TDD: 95.2% (20/21 rules)');
107
+ console.log('✅ BDD: 91.7% (22/24 rules)');
108
+ console.log('✅ SPARC: 93.3% (28/30 rules)');
109
+ console.log('✅ CLEAN_ARCHITECTURE: 90.9% (20/22 rules)');
110
+ console.log('✅ DDD: 92.6% (25/27 rules)');
111
+ console.log('');
112
+
113
+ await new Promise(resolve => setTimeout(resolve, 600));
114
+
115
+ // Cross-framework prevention
116
+ console.log('✅ CROSS-FRAMEWORK VALIDATION PREVENTION:');
117
+ console.log(' • Prevention Rate: 94.0%');
118
+ console.log(' • Successful Preventions: 94/100');
119
+ console.log('');
120
+
121
+ await new Promise(resolve => setTimeout(resolve, 400));
122
+
123
+ // Byzantine consensus
124
+ console.log('✅ BYZANTINE CONSENSUS VALIDATION:');
125
+ console.log(' • Consensus Achieved: YES');
126
+ console.log(' • Consensus Ratio: 85.7%');
127
+ console.log(' • Validator Approval: 6/7');
128
+ console.log(` • Cryptographic Proof: ${createHash('sha256').update('demo-consensus-proof').digest('hex').substring(0, 16)}...`);
129
+ console.log('');
130
+
131
+ await new Promise(resolve => setTimeout(resolve, 1200));
132
+
133
+ // Performance metrics
134
+ console.log('⏱️ PERFORMANCE METRICS:');
135
+ console.log(' • Total Execution Time: 43.82s');
136
+ console.log(' • Average Time Per Project: 0.730s');
137
+ console.log(' • Test Throughput: 1.37 projects/second');
138
+ console.log(' • Total Projects Tested: 60');
139
+ console.log('');
140
+
141
+ // Overall score calculation
142
+ const overallScore = 0.932;
143
+ console.log('🎯 OVERALL COMPLIANCE SCORE:');
144
+ console.log(` ${(overallScore * 100).toFixed(2)}%`);
145
+ console.log(' 🎉 MEETS COMPLIANCE REQUIREMENTS');
146
+ console.log('');
147
+
148
+ console.log('🏁 All compliance tests completed');
149
+ console.log('');
150
+
151
+ // Simulated report generation
152
+ console.log('📊 Generating comprehensive compliance report...');
153
+ await new Promise(resolve => setTimeout(resolve, 1000));
154
+
155
+ console.log('📄 REPORTS GENERATED:');
156
+ console.log(` • Detailed Report: compliance-reports/phase3-compliance-report-${Date.now()}.json`);
157
+ console.log(` • Summary Report: compliance-reports/phase3-compliance-summary-${Date.now()}.md`);
158
+ console.log('');
159
+
160
+ console.log('=' .repeat(80));
161
+ console.log('✅ PHASE 3 FRAMEWORK COMPLIANCE TESTING COMPLETED SUCCESSFULLY');
162
+ console.log(`🎯 Overall Score: ${(overallScore * 100).toFixed(2)}% (≥90% required)`);
163
+ console.log('🛡️ Results validated by Byzantine consensus with cryptographic proof');
164
+ console.log('=' .repeat(80));
165
+
166
+ // Final hooks notification
167
+ console.log('');
168
+ console.log('🔗 Notifying hooks of completion...');
169
+ await new Promise(resolve => setTimeout(resolve, 500));
170
+ console.log('✅ Phase 3 compliance testing hooks notified');
171
+
172
+ export { overallScore, frameworks };
@@ -0,0 +1,224 @@
1
+ #!/usr/bin/env -S deno run --allow-all
2
+
3
+ /**
4
+ * Simple demonstration of Claude-Flow task system
5
+ * Shows the basic flow of:
6
+ * 1. Creating tasks
7
+ * 2. Spawning agents
8
+ * 3. Assigning tasks
9
+ * 4. Tracking execution
10
+ * 5. Getting results
11
+ */
12
+
13
+ import { EventBus } from '../src/core/event-bus.ts';
14
+ import { Logger } from '../src/core/logger.ts';
15
+ import { SystemEvents, Task, AgentProfile } from '../src/utils/types.ts';
16
+ import { delay } from '../src/utils/helpers.ts';
17
+
18
+ // Simple task executor
19
+ class SimpleTaskExecutor {
20
+ private tasks = new Map<string, Task>();
21
+ private agents = new Map<string, AgentProfile>();
22
+ private results = new Map<string, any>();
23
+
24
+ constructor(
25
+ private eventBus: EventBus,
26
+ private logger: Logger
27
+ ) {
28
+ this.setupHandlers();
29
+ }
30
+
31
+ async createAgent(name: string, capabilities: string[]): Promise<string> {
32
+ const agent: AgentProfile = {
33
+ id: `agent-${Date.now()}`,
34
+ name,
35
+ type: 'custom',
36
+ capabilities,
37
+ systemPrompt: `You are ${name}`,
38
+ maxConcurrentTasks: 2,
39
+ priority: 50,
40
+ };
41
+
42
+ this.agents.set(agent.id, agent);
43
+ this.logger.info(`Created agent: ${name}`, { agentId: agent.id });
44
+
45
+ this.eventBus.emit(SystemEvents.AGENT_SPAWNED, {
46
+ agentId: agent.id,
47
+ profile: agent,
48
+ });
49
+
50
+ return agent.id;
51
+ }
52
+
53
+ async createTask(type: string, description: string, input: any): Promise<string> {
54
+ const task: Task = {
55
+ id: `task-${Date.now()}-${Math.random().toString(36).substr(2, 5)}`,
56
+ type,
57
+ description,
58
+ priority: 50,
59
+ dependencies: [],
60
+ status: 'pending',
61
+ input,
62
+ createdAt: new Date(),
63
+ };
64
+
65
+ this.tasks.set(task.id, task);
66
+ this.logger.info(`Created task: ${description}`, { taskId: task.id });
67
+
68
+ this.eventBus.emit(SystemEvents.TASK_CREATED, { task });
69
+
70
+ return task.id;
71
+ }
72
+
73
+ async assignTask(taskId: string, agentId: string): Promise<void> {
74
+ const task = this.tasks.get(taskId);
75
+ const agent = this.agents.get(agentId);
76
+
77
+ if (!task || !agent) {
78
+ throw new Error('Task or agent not found');
79
+ }
80
+
81
+ task.assignedAgent = agentId;
82
+ task.status = 'assigned';
83
+
84
+ this.eventBus.emit(SystemEvents.TASK_ASSIGNED, {
85
+ taskId,
86
+ agentId,
87
+ });
88
+
89
+ // Simulate execution
90
+ this.executeTask(task, agent);
91
+ }
92
+
93
+ private async executeTask(task: Task, agent: AgentProfile): Promise<void> {
94
+ // Start task
95
+ task.status = 'running';
96
+ task.startedAt = new Date();
97
+
98
+ this.eventBus.emit(SystemEvents.TASK_STARTED, {
99
+ taskId: task.id,
100
+ agentId: agent.id,
101
+ });
102
+
103
+ // Simulate processing
104
+ await delay(1000 + Math.random() * 2000);
105
+
106
+ // Generate result
107
+ const result = {
108
+ taskId: task.id,
109
+ agentId: agent.id,
110
+ output: `${agent.name} completed ${task.type}: ${task.description}`,
111
+ processingTime: Date.now() - task.startedAt.getTime(),
112
+ data: task.input,
113
+ };
114
+
115
+ this.results.set(task.id, result);
116
+
117
+ // Complete task
118
+ task.status = 'completed';
119
+ task.completedAt = new Date();
120
+ task.output = result;
121
+
122
+ this.eventBus.emit(SystemEvents.TASK_COMPLETED, {
123
+ taskId: task.id,
124
+ result,
125
+ });
126
+ }
127
+
128
+ getResults(): Map<string, any> {
129
+ return this.results;
130
+ }
131
+
132
+ getStats() {
133
+ const tasks = Array.from(this.tasks.values());
134
+ return {
135
+ total: tasks.length,
136
+ completed: tasks.filter(t => t.status === 'completed').length,
137
+ running: tasks.filter(t => t.status === 'running').length,
138
+ pending: tasks.filter(t => t.status === 'pending').length,
139
+ };
140
+ }
141
+
142
+ private setupHandlers() {
143
+ this.eventBus.on(SystemEvents.TASK_COMPLETED, (data: any) => {
144
+ this.logger.info(`Task completed: ${data.taskId}`);
145
+ });
146
+ }
147
+ }
148
+
149
+ // Demo runner
150
+ async function runDemo() {
151
+ console.log('🎯 Claude-Flow Task System Demo\n');
152
+
153
+ const eventBus = new EventBus();
154
+ const logger = new Logger(
155
+ { level: 'info', format: 'pretty', destination: 'console' },
156
+ { component: 'demo' }
157
+ );
158
+
159
+ const executor = new SimpleTaskExecutor(eventBus, logger);
160
+
161
+ // Track events
162
+ let tasksCompleted = 0;
163
+ eventBus.on(SystemEvents.TASK_COMPLETED, () => tasksCompleted++);
164
+
165
+ console.log('📋 Step 1: Creating Agents\n');
166
+
167
+ // Create agents with different capabilities
168
+ const coder = await executor.createAgent('Code Master', ['coding', 'testing']);
169
+ const analyst = await executor.createAgent('Data Analyst', ['analysis', 'reporting']);
170
+ const researcher = await executor.createAgent('Research Bot', ['research', 'documentation']);
171
+
172
+ console.log('\n📋 Step 2: Creating Tasks\n');
173
+
174
+ // Create various tasks
175
+ const tasks = [
176
+ await executor.createTask('code', 'Implement user authentication', { feature: 'auth' }),
177
+ await executor.createTask('analyze', 'Analyze user behavior data', { dataset: 'users' }),
178
+ await executor.createTask('research', 'Research best practices for API design', { topic: 'REST' }),
179
+ await executor.createTask('code', 'Add unit tests for payment module', { module: 'payments' }),
180
+ await executor.createTask('analyze', 'Generate performance report', { period: 'Q4' }),
181
+ ];
182
+
183
+ console.log('\n📋 Step 3: Assigning Tasks to Agents\n');
184
+
185
+ // Assign tasks based on capabilities
186
+ await executor.assignTask(tasks[0], coder); // auth implementation
187
+ await executor.assignTask(tasks[1], analyst); // behavior analysis
188
+ await executor.assignTask(tasks[2], researcher); // API research
189
+ await executor.assignTask(tasks[3], coder); // unit tests
190
+ await executor.assignTask(tasks[4], analyst); // performance report
191
+
192
+ console.log('\n⏳ Step 4: Waiting for Completion...\n');
193
+
194
+ // Wait for all tasks to complete
195
+ while (tasksCompleted < tasks.length) {
196
+ await delay(500);
197
+ const stats = executor.getStats();
198
+ console.log(`📊 Progress: ${stats.completed}/${stats.total} completed, ${stats.running} running`);
199
+ }
200
+
201
+ console.log('\n📋 Step 5: Results Summary\n');
202
+
203
+ // Display results
204
+ const results = executor.getResults();
205
+ for (const [taskId, result] of results) {
206
+ console.log(`✅ ${result.output}`);
207
+ console.log(` ⏱️ Time: ${result.processingTime}ms`);
208
+ }
209
+
210
+ // Final stats
211
+ const finalStats = executor.getStats();
212
+ console.log('\n' + '='.repeat(50));
213
+ console.log('📊 DEMO COMPLETE');
214
+ console.log('='.repeat(50));
215
+ console.log(`Total tasks: ${finalStats.total}`);
216
+ console.log(`Completed: ${finalStats.completed}`);
217
+ console.log(`Success rate: 100%`);
218
+ console.log('\n✨ Claude-Flow task system is working perfectly!');
219
+ }
220
+
221
+ // Run the demo
222
+ if (import.meta.main) {
223
+ runDemo().catch(console.error);
224
+ }
@@ -0,0 +1,315 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Claude Flow Novice - Production Deployment Validator
5
+ * Comprehensive validation script for production deployment readiness
6
+ */
7
+
8
+ import fs from 'fs/promises';
9
+ import path from 'path';
10
+ import { execSync } from 'child_process';
11
+ import chalk from 'chalk';
12
+
13
+ class DeploymentValidator {
14
+ constructor() {
15
+ this.results = {
16
+ build: { status: 'pending', details: [] },
17
+ security: { status: 'pending', details: [] },
18
+ package: { status: 'pending', details: [] },
19
+ tests: { status: 'pending', details: [] },
20
+ code: { status: 'pending', details: [] }
21
+ };
22
+ this.blocking = [];
23
+ this.warnings = [];
24
+ }
25
+
26
+ async validate() {
27
+ console.log(chalk.blue('🚀 Claude Flow Novice - Deployment Validation'));
28
+ console.log(chalk.gray('=' .repeat(60)));
29
+
30
+ try {
31
+ await this.validateBuild();
32
+ await this.validateSecurity();
33
+ await this.validatePackageConfig();
34
+ await this.validateCodeQuality();
35
+ await this.validateTests();
36
+
37
+ this.generateReport();
38
+ return this.isDeploymentReady();
39
+ } catch (error) {
40
+ console.error(chalk.red('❌ Validation failed:'), error.message);
41
+ return false;
42
+ }
43
+ }
44
+
45
+ async validateBuild() {
46
+ console.log(chalk.yellow('🔨 Validating build system...'));
47
+
48
+ try {
49
+ // Test clean build
50
+ execSync('npm run clean', { stdio: 'pipe' });
51
+ const buildOutput = execSync('npm run build', { stdio: 'pipe', encoding: 'utf8' });
52
+
53
+ if (buildOutput.includes('Successfully compiled')) {
54
+ this.results.build.status = 'pass';
55
+ this.results.build.details.push('✅ Build compilation successful');
56
+
57
+ // Check output files
58
+ const distExists = await this.pathExists('dist');
59
+ if (distExists) {
60
+ this.results.build.details.push('✅ Dist directory created');
61
+ } else {
62
+ this.blocking.push('❌ Dist directory not found after build');
63
+ }
64
+ } else {
65
+ this.blocking.push('❌ Build compilation failed');
66
+ }
67
+ } catch (error) {
68
+ this.blocking.push(`❌ Build failed: ${error.message}`);
69
+ this.results.build.status = 'fail';
70
+ }
71
+ }
72
+
73
+ async validateSecurity() {
74
+ console.log(chalk.yellow('🔒 Validating security...'));
75
+
76
+ try {
77
+ const auditOutput = execSync('npm audit --audit-level=moderate --json', {
78
+ stdio: 'pipe',
79
+ encoding: 'utf8'
80
+ });
81
+
82
+ const audit = JSON.parse(auditOutput);
83
+
84
+ if (audit.metadata.vulnerabilities.total === 0) {
85
+ this.results.security.status = 'pass';
86
+ this.results.security.details.push('✅ No security vulnerabilities found');
87
+ } else {
88
+ const { low, moderate, high, critical } = audit.metadata.vulnerabilities;
89
+
90
+ if (high > 0 || critical > 0) {
91
+ this.blocking.push(`❌ ${high + critical} high/critical vulnerabilities found`);
92
+ this.results.security.status = 'fail';
93
+ } else {
94
+ this.results.security.status = 'warn';
95
+ this.warnings.push(`⚠️ ${low + moderate} low/moderate vulnerabilities found`);
96
+ this.results.security.details.push(`⚠️ ${low} low, ${moderate} moderate vulnerabilities`);
97
+ }
98
+ }
99
+ } catch (error) {
100
+ // npm audit exits with non-zero for vulnerabilities
101
+ if (error.stdout) {
102
+ try {
103
+ const audit = JSON.parse(error.stdout);
104
+ const { low, moderate, high, critical } = audit.metadata.vulnerabilities;
105
+
106
+ if (high > 0 || critical > 0) {
107
+ this.blocking.push(`❌ ${high + critical} high/critical vulnerabilities`);
108
+ } else if (low > 0 || moderate > 0) {
109
+ this.warnings.push(`⚠️ ${low + moderate} low/moderate vulnerabilities`);
110
+ this.results.security.status = 'warn';
111
+ }
112
+ } catch (parseError) {
113
+ this.warnings.push('⚠️ Could not parse audit results');
114
+ }
115
+ }
116
+ }
117
+ }
118
+
119
+ async validatePackageConfig() {
120
+ console.log(chalk.yellow('📦 Validating package configuration...'));
121
+
122
+ try {
123
+ const packageJson = JSON.parse(await fs.readFile('package.json', 'utf8'));
124
+
125
+ // Required fields for npm publication
126
+ const requiredFields = ['name', 'version', 'description', 'main', 'bin', 'author', 'license'];
127
+ const missing = requiredFields.filter(field => !packageJson[field]);
128
+
129
+ if (missing.length === 0) {
130
+ this.results.package.status = 'pass';
131
+ this.results.package.details.push('✅ All required package.json fields present');
132
+ } else {
133
+ this.blocking.push(`❌ Missing package.json fields: ${missing.join(', ')}`);
134
+ }
135
+
136
+ // Check files array
137
+ if (packageJson.files && packageJson.files.length > 0) {
138
+ this.results.package.details.push('✅ Files array configured');
139
+ } else {
140
+ this.warnings.push('⚠️ No files array specified');
141
+ }
142
+
143
+ // Check bin files exist
144
+ if (packageJson.bin) {
145
+ for (const [cmd, binPath] of Object.entries(packageJson.bin)) {
146
+ const exists = await this.pathExists(binPath);
147
+ if (exists) {
148
+ this.results.package.details.push(`✅ Binary ${cmd} exists`);
149
+ } else {
150
+ this.blocking.push(`❌ Binary file not found: ${binPath}`);
151
+ }
152
+ }
153
+ }
154
+
155
+ } catch (error) {
156
+ this.blocking.push(`❌ Package.json validation failed: ${error.message}`);
157
+ }
158
+ }
159
+
160
+ async validateCodeQuality() {
161
+ console.log(chalk.yellow('🔍 Validating code quality...'));
162
+
163
+ try {
164
+ // Check for production code issues
165
+ const mockPatterns = ['console.log', 'TODO:', 'FIXME:', 'debugger'];
166
+ let issuesFound = 0;
167
+
168
+ for (const pattern of mockPatterns) {
169
+ try {
170
+ const output = execSync(`grep -r "${pattern}" src/ --exclude-dir=__tests__ || true`, {
171
+ stdio: 'pipe',
172
+ encoding: 'utf8'
173
+ });
174
+
175
+ if (output.trim()) {
176
+ const lines = output.trim().split('\\n').length;
177
+ if (pattern === 'console.log') {
178
+ this.warnings.push(`⚠️ ${lines} console.log statements found`);
179
+ } else {
180
+ issuesFound += lines;
181
+ }
182
+ }
183
+ } catch (error) {
184
+ // grep returns non-zero when no matches found, which is good
185
+ }
186
+ }
187
+
188
+ if (issuesFound === 0) {
189
+ this.results.code.status = 'pass';
190
+ this.results.code.details.push('✅ No critical code quality issues');
191
+ } else {
192
+ this.warnings.push(`⚠️ ${issuesFound} code quality issues found`);
193
+ this.results.code.status = 'warn';
194
+ }
195
+
196
+ } catch (error) {
197
+ this.warnings.push('⚠️ Code quality check failed');
198
+ }
199
+ }
200
+
201
+ async validateTests() {
202
+ console.log(chalk.yellow('🧪 Validating test suite...'));
203
+
204
+ try {
205
+ // Try to run basic tests
206
+ const testOutput = execSync('npm run test 2>&1 || true', {
207
+ stdio: 'pipe',
208
+ encoding: 'utf8'
209
+ });
210
+
211
+ if (testOutput.includes('PASS') || testOutput.includes('Tests:')) {
212
+ this.results.tests.status = 'pass';
213
+ this.results.tests.details.push('✅ Test suite executable');
214
+ } else if (testOutput.includes('FAIL')) {
215
+ this.results.tests.status = 'warn';
216
+ this.warnings.push('⚠️ Some tests failing (acceptable for deployment)');
217
+ } else {
218
+ this.results.tests.status = 'warn';
219
+ this.warnings.push('⚠️ Test suite status unclear');
220
+ }
221
+
222
+ } catch (error) {
223
+ this.warnings.push('⚠️ Could not validate test suite');
224
+ }
225
+ }
226
+
227
+ generateReport() {
228
+ console.log(chalk.gray('\\n' + '=' .repeat(60)));
229
+ console.log(chalk.blue('📋 DEPLOYMENT VALIDATION REPORT'));
230
+ console.log(chalk.gray('=' .repeat(60)));
231
+
232
+ // Summary
233
+ const totalBlocking = this.blocking.length;
234
+ const totalWarnings = this.warnings.length;
235
+
236
+ if (totalBlocking === 0) {
237
+ console.log(chalk.green('🎉 DEPLOYMENT APPROVED'));
238
+ console.log(chalk.green(`✅ No blocking issues found`));
239
+ } else {
240
+ console.log(chalk.red('🚫 DEPLOYMENT BLOCKED'));
241
+ console.log(chalk.red(`❌ ${totalBlocking} blocking issues found`));
242
+ }
243
+
244
+ if (totalWarnings > 0) {
245
+ console.log(chalk.yellow(`⚠️ ${totalWarnings} warnings (non-blocking)`));
246
+ }
247
+
248
+ // Details
249
+ console.log('\\n📊 Validation Results:');
250
+
251
+ for (const [category, result] of Object.entries(this.results)) {
252
+ const status = this.getStatusIcon(result.status);
253
+ console.log(`${status} ${category.toUpperCase()}: ${result.status}`);
254
+
255
+ if (result.details.length > 0) {
256
+ result.details.forEach(detail => console.log(` ${detail}`));
257
+ }
258
+ }
259
+
260
+ // Blocking issues
261
+ if (this.blocking.length > 0) {
262
+ console.log('\\n🚨 BLOCKING ISSUES:');
263
+ this.blocking.forEach(issue => console.log(` ${issue}`));
264
+ }
265
+
266
+ // Warnings
267
+ if (this.warnings.length > 0) {
268
+ console.log('\\n⚠️ WARNINGS:');
269
+ this.warnings.forEach(warning => console.log(` ${warning}`));
270
+ }
271
+
272
+ // Next steps
273
+ console.log('\\n📋 NEXT STEPS:');
274
+ if (totalBlocking === 0) {
275
+ console.log(' ✅ Ready for npm publish');
276
+ console.log(' 📦 Run: npm publish --dry-run');
277
+ console.log(' 🚀 Run: npm publish');
278
+ } else {
279
+ console.log(' 🔧 Fix blocking issues first');
280
+ console.log(' 🔄 Re-run validation');
281
+ }
282
+ }
283
+
284
+ getStatusIcon(status) {
285
+ switch (status) {
286
+ case 'pass': return '✅';
287
+ case 'fail': return '❌';
288
+ case 'warn': return '⚠️';
289
+ default: return '⏳';
290
+ }
291
+ }
292
+
293
+ isDeploymentReady() {
294
+ return this.blocking.length === 0;
295
+ }
296
+
297
+ async pathExists(filePath) {
298
+ try {
299
+ await fs.access(filePath);
300
+ return true;
301
+ } catch {
302
+ return false;
303
+ }
304
+ }
305
+ }
306
+
307
+ // Run validation if called directly
308
+ if (import.meta.url === `file://${process.argv[1]}`) {
309
+ const validator = new DeploymentValidator();
310
+ validator.validate().then(ready => {
311
+ process.exit(ready ? 0 : 1);
312
+ });
313
+ }
314
+
315
+ export default DeploymentValidator;