claude-flow-novice 1.3.6 → 1.5.1

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 (347) hide show
  1. package/.claude/agents/analysis/code-analyzer.md +3 -20
  2. package/.claude/agents/analysis/code-review/analyze-code-quality.md +1 -1
  3. package/.claude/agents/analyst.md +208 -550
  4. package/.claude/agents/architect.md +136 -469
  5. package/.claude/agents/architecture/system-architect.md +20 -1
  6. package/.claude/agents/architecture/system-design/arch-system-design.md +1 -1
  7. package/.claude/agents/base-template-generator.md +24 -1
  8. package/.claude/agents/coder.md +87 -303
  9. package/.claude/agents/consensus/byzantine-coordinator.md +4 -21
  10. package/.claude/agents/consensus/consensus-builder.md +3 -20
  11. package/.claude/agents/consensus/crdt-synchronizer.md +4 -21
  12. package/.claude/agents/consensus/gossip-coordinator.md +4 -21
  13. package/.claude/agents/consensus/performance-benchmarker.md +4 -21
  14. package/.claude/agents/consensus/quorum-manager.md +4 -21
  15. package/.claude/agents/consensus/raft-manager.md +4 -21
  16. package/.claude/agents/consensus/security-manager.md +4 -21
  17. package/.claude/agents/coordinator.md +22 -11
  18. package/.claude/agents/data/ml/data-ml-model.md +2 -2
  19. package/.claude/agents/development/backend/dev-backend-api.md +2 -2
  20. package/.claude/agents/devops/ci-cd/ops-cicd-github.md +2 -2
  21. package/.claude/agents/devops/devops-engineer.md +134 -402
  22. package/.claude/agents/documentation/api-docs/docs-api-openapi.md +2 -2
  23. package/.claude/agents/github/code-review-swarm.md +1 -1
  24. package/.claude/agents/github/github-specialist.md +856 -0
  25. package/.claude/agents/github/pr-manager.md +1 -1
  26. package/.claude/agents/github/release-manager.md +1 -1
  27. package/.claude/agents/neural/neural-pattern-agent.md +762 -0
  28. package/.claude/agents/optimization/benchmark-suite.md +1 -1
  29. package/.claude/agents/optimization/perf-analyzer.md +1 -1
  30. package/.claude/agents/optimization/performance-monitor.md +1 -1
  31. package/.claude/agents/planner.md +135 -0
  32. package/.claude/agents/researcher.md +22 -9
  33. package/.claude/agents/reviewer.md +291 -0
  34. package/.claude/agents/security/security-specialist.md +1 -1
  35. package/.claude/agents/sparc/architecture.md +1 -1
  36. package/.claude/agents/sparc/pseudocode.md +1 -1
  37. package/.claude/agents/sparc/refinement.md +1 -1
  38. package/.claude/agents/sparc/specification.md +1 -1
  39. package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +2 -2
  40. package/.claude/agents/tester.md +21 -11
  41. package/.claude/agents/testing/unit/tdd-london-swarm.md +1 -1
  42. package/.claude/agents/testing/validation/production-validator.md +1 -1
  43. package/.claude/commands/claude-soul.js +1 -1
  44. package/.claude/commands/fullstack.md +134 -0
  45. package/.claude/commands/index.js +4 -0
  46. package/.claude/hooks.json +12 -15
  47. package/{.claude → .claude-flow-novice/.claude}/agents/MIGRATION_SUMMARY.md +1 -1
  48. package/.claude-flow-novice/.claude/agents/analysis/code-analyzer.md +192 -0
  49. package/.claude-flow-novice/.claude/agents/analysis/code-review/analyze-code-quality.md +180 -0
  50. package/.claude-flow-novice/.claude/agents/analyst.md +300 -0
  51. package/.claude-flow-novice/.claude/agents/architect.md +557 -0
  52. package/.claude-flow-novice/.claude/agents/architecture/system-architect.md +630 -0
  53. package/.claude-flow-novice/.claude/agents/architecture/system-design/arch-system-design.md +156 -0
  54. package/.claude-flow-novice/.claude/agents/base-template-generator.md +65 -0
  55. package/.claude-flow-novice/.claude/agents/coder.md +180 -0
  56. package/.claude-flow-novice/.claude/agents/consensus/byzantine-coordinator.md +46 -0
  57. package/.claude-flow-novice/.claude/agents/consensus/consensus-builder.md +225 -0
  58. package/.claude-flow-novice/.claude/agents/consensus/crdt-synchronizer.md +980 -0
  59. package/.claude-flow-novice/.claude/agents/consensus/gossip-coordinator.md +46 -0
  60. package/.claude-flow-novice/.claude/agents/consensus/performance-benchmarker.md +834 -0
  61. package/.claude-flow-novice/.claude/agents/consensus/quorum-manager.md +806 -0
  62. package/.claude-flow-novice/.claude/agents/consensus/raft-manager.md +46 -0
  63. package/.claude-flow-novice/.claude/agents/consensus/security-manager.md +605 -0
  64. package/.claude-flow-novice/.claude/agents/coordinator.md +842 -0
  65. package/.claude-flow-novice/.claude/agents/data/ml/data-ml-model.md +193 -0
  66. package/.claude-flow-novice/.claude/agents/development/backend/dev-backend-api.md +142 -0
  67. package/.claude-flow-novice/.claude/agents/devops/ci-cd/ops-cicd-github.md +164 -0
  68. package/.claude-flow-novice/.claude/agents/devops/devops-engineer.md +638 -0
  69. package/.claude-flow-novice/.claude/agents/documentation/api-docs/docs-api-openapi.md +174 -0
  70. package/.claude-flow-novice/.claude/agents/github/code-review-swarm.md +538 -0
  71. package/.claude-flow-novice/.claude/agents/github/github-modes.md +173 -0
  72. package/.claude-flow-novice/.claude/agents/github/github-specialist.md +856 -0
  73. package/.claude-flow-novice/.claude/agents/github/issue-tracker.md +319 -0
  74. package/.claude-flow-novice/.claude/agents/github/multi-repo-swarm.md +553 -0
  75. package/.claude-flow-novice/.claude/agents/github/pr-manager.md +191 -0
  76. package/.claude-flow-novice/.claude/agents/github/project-board-sync.md +509 -0
  77. package/.claude-flow-novice/.claude/agents/github/release-manager.md +367 -0
  78. package/.claude-flow-novice/.claude/agents/github/release-swarm.md +583 -0
  79. package/.claude-flow-novice/.claude/agents/github/repo-architect.md +398 -0
  80. package/.claude-flow-novice/.claude/agents/github/swarm-issue.md +573 -0
  81. package/.claude-flow-novice/.claude/agents/github/swarm-pr.md +428 -0
  82. package/.claude-flow-novice/.claude/agents/github/sync-coordinator.md +452 -0
  83. package/.claude-flow-novice/.claude/agents/github/workflow-automation.md +635 -0
  84. package/.claude-flow-novice/.claude/agents/goal/goal-planner.md +73 -0
  85. package/.claude-flow-novice/.claude/agents/neural/neural-pattern-agent.md +762 -0
  86. package/.claude-flow-novice/.claude/agents/neural/safla-neural.md +74 -0
  87. package/.claude-flow-novice/.claude/agents/optimization/benchmark-suite.md +665 -0
  88. package/.claude-flow-novice/.claude/agents/optimization/load-balancer.md +431 -0
  89. package/.claude-flow-novice/.claude/agents/optimization/perf-analyzer.md +725 -0
  90. package/.claude-flow-novice/.claude/agents/optimization/performance-monitor.md +672 -0
  91. package/.claude-flow-novice/.claude/agents/optimization/resource-allocator.md +674 -0
  92. package/.claude-flow-novice/.claude/agents/optimization/topology-optimizer.md +808 -0
  93. package/.claude-flow-novice/.claude/agents/planner.md +135 -0
  94. package/.claude-flow-novice/.claude/agents/researcher.md +185 -0
  95. package/.claude-flow-novice/.claude/agents/reviewer.md +291 -0
  96. package/.claude-flow-novice/.claude/agents/security/security-specialist.md +978 -0
  97. package/.claude-flow-novice/.claude/agents/sparc/architecture.md +472 -0
  98. package/.claude-flow-novice/.claude/agents/sparc/pseudocode.md +318 -0
  99. package/.claude-flow-novice/.claude/agents/sparc/refinement.md +525 -0
  100. package/.claude-flow-novice/.claude/agents/sparc/specification.md +276 -0
  101. package/.claude-flow-novice/.claude/agents/specialized/mobile/spec-mobile-react-native.md +226 -0
  102. package/.claude-flow-novice/.claude/agents/sublinear/consciousness-evolution-agent.md +499 -0
  103. package/.claude-flow-novice/.claude/agents/sublinear/matrix-solver-agent.md +113 -0
  104. package/.claude-flow-novice/.claude/agents/sublinear/nanosecond-scheduler-agent.md +644 -0
  105. package/.claude-flow-novice/.claude/agents/sublinear/pagerank-agent.md +699 -0
  106. package/.claude-flow-novice/.claude/agents/sublinear/phi-calculator-agent.md +749 -0
  107. package/.claude-flow-novice/.claude/agents/sublinear/psycho-symbolic-agent.md +543 -0
  108. package/.claude-flow-novice/.claude/agents/sublinear/sublinear.md +816 -0
  109. package/.claude-flow-novice/.claude/agents/sublinear/temporal-advantage-agent.md +360 -0
  110. package/.claude-flow-novice/.claude/agents/swarm/adaptive-coordinator-enhanced.md +746 -0
  111. package/.claude-flow-novice/.claude/agents/swarm/adaptive-coordinator.md +396 -0
  112. package/.claude-flow-novice/.claude/agents/swarm/hierarchical-coordinator.md +300 -0
  113. package/.claude-flow-novice/.claude/agents/swarm/mesh-coordinator.md +435 -0
  114. package/.claude-flow-novice/.claude/agents/templates/automation-smart-agent.md +205 -0
  115. package/.claude-flow-novice/.claude/agents/templates/coordinator-swarm-init.md +90 -0
  116. package/.claude-flow-novice/.claude/agents/templates/github-pr-manager.md +177 -0
  117. package/.claude-flow-novice/.claude/agents/templates/implementer-sparc-coder.md +259 -0
  118. package/.claude-flow-novice/.claude/agents/templates/memory-coordinator.md +187 -0
  119. package/.claude-flow-novice/.claude/agents/templates/migration-plan.md +746 -0
  120. package/.claude-flow-novice/.claude/agents/templates/orchestrator-task.md +139 -0
  121. package/.claude-flow-novice/.claude/agents/templates/performance-analyzer.md +199 -0
  122. package/.claude-flow-novice/.claude/agents/templates/sparc-coordinator.md +183 -0
  123. package/.claude-flow-novice/.claude/agents/tester.md +663 -0
  124. package/.claude-flow-novice/.claude/agents/testing/e2e/playwright-agent.md +249 -0
  125. package/.claude-flow-novice/.claude/agents/testing/unit/tdd-london-swarm.md +244 -0
  126. package/.claude-flow-novice/.claude/agents/testing/validation/production-validator.md +395 -0
  127. package/.claude-flow-novice/dist/index.js +12 -24
  128. package/.claude-flow-novice/dist/index.js.map +1 -0
  129. package/.claude-flow-novice/dist/src/agents/agent-manager.js +123 -69
  130. package/.claude-flow-novice/dist/src/agents/agent-manager.js.map +1 -1
  131. package/.claude-flow-novice/dist/src/agents/github/utils/hook-integration.js +7 -7
  132. package/.claude-flow-novice/dist/src/agents/github/utils/hook-integration.js.map +1 -1
  133. package/.claude-flow-novice/dist/src/agents/stage3-integration-validator.js +485 -0
  134. package/.claude-flow-novice/dist/src/agents/stage3-integration-validator.js.map +1 -0
  135. package/.claude-flow-novice/dist/src/agents/unified-ultra-fast-agent-manager.js +630 -0
  136. package/.claude-flow-novice/dist/src/agents/unified-ultra-fast-agent-manager.js.map +1 -0
  137. package/.claude-flow-novice/dist/src/cli/commands/agent.js +1 -1
  138. package/.claude-flow-novice/dist/src/cli/commands/agent.js.map +1 -1
  139. package/.claude-flow-novice/dist/src/cli/commands/config-integration.js +6 -6
  140. package/.claude-flow-novice/dist/src/cli/commands/enterprise.js +18 -18
  141. package/.claude-flow-novice/dist/src/cli/commands/enterprise.js.map +1 -1
  142. package/.claude-flow-novice/dist/src/cli/commands/goal-init.js +4 -4
  143. package/.claude-flow-novice/dist/src/cli/commands/help-new.js +23 -23
  144. package/.claude-flow-novice/dist/src/cli/commands/help-new.js.map +1 -1
  145. package/.claude-flow-novice/dist/src/cli/commands/help.js +74 -74
  146. package/.claude-flow-novice/dist/src/cli/commands/help.js.map +1 -1
  147. package/.claude-flow-novice/dist/src/cli/commands/hive-mind/pause.js +2 -2
  148. package/.claude-flow-novice/dist/src/cli/commands/hive-mind/pause.js.map +1 -1
  149. package/.claude-flow-novice/dist/src/cli/commands/hive.js +4 -4
  150. package/.claude-flow-novice/dist/src/cli/commands/index.js +103 -132
  151. package/.claude-flow-novice/dist/src/cli/commands/index.js.map +1 -1
  152. package/.claude-flow-novice/dist/src/cli/commands/mcp.js +1 -1
  153. package/.claude-flow-novice/dist/src/cli/commands/migrate.js +4 -4
  154. package/.claude-flow-novice/dist/src/cli/commands/migrate.js.map +1 -1
  155. package/.claude-flow-novice/dist/src/cli/commands/monitor.js +1 -1
  156. package/.claude-flow-novice/dist/src/cli/commands/neural-init.js +4 -4
  157. package/.claude-flow-novice/dist/src/cli/commands/ruv-swarm.js +8 -8
  158. package/.claude-flow-novice/dist/src/cli/commands/sparc.js +12 -12
  159. package/.claude-flow-novice/dist/src/cli/commands/sparc.js.map +1 -1
  160. package/.claude-flow-novice/dist/src/cli/commands/start/start-command.js +3 -3
  161. package/.claude-flow-novice/dist/src/cli/commands/status.js +1 -1
  162. package/.claude-flow-novice/dist/src/cli/commands/swarm.js +7 -7
  163. package/.claude-flow-novice/dist/src/cli/commands/swarm.js.map +1 -1
  164. package/.claude-flow-novice/dist/src/cli/commands/verification.js +18 -18
  165. package/.claude-flow-novice/dist/src/cli/completion.js +54 -54
  166. package/.claude-flow-novice/dist/src/cli/completion.js.map +1 -1
  167. package/.claude-flow-novice/dist/src/cli/consolidated/ConsolidatedCLI.js +11 -11
  168. package/.claude-flow-novice/dist/src/cli/consolidated/ConsolidatedCLI.js.map +1 -1
  169. package/.claude-flow-novice/dist/src/cli/consolidated/core/CommandHandlers.js +31 -31
  170. package/.claude-flow-novice/dist/src/cli/consolidated/core/TierManager.js +39 -39
  171. package/.claude-flow-novice/dist/src/cli/consolidated/core/TierManager.js.map +1 -1
  172. package/.claude-flow-novice/dist/src/cli/consolidated/help/InteractiveHelp.js +25 -25
  173. package/.claude-flow-novice/dist/src/cli/consolidated/help/InteractiveHelp.js.map +1 -1
  174. package/.claude-flow-novice/dist/src/cli/consolidated/routing/CommandRouter.js +8 -8
  175. package/.claude-flow-novice/dist/src/cli/consolidated/routing/CommandRouter.js.map +1 -1
  176. package/.claude-flow-novice/dist/src/cli/consolidated/utils/IntelligentDefaults.js +6 -6
  177. package/.claude-flow-novice/dist/src/cli/consolidated/utils/IntelligentDefaults.js.map +1 -1
  178. package/.claude-flow-novice/dist/src/cli/consolidated/utils/PerformanceOptimizer.js +7 -7
  179. package/.claude-flow-novice/dist/src/cli/consolidated/utils/PerformanceOptimizer.js.map +1 -1
  180. package/.claude-flow-novice/dist/src/cli/index-remote.js +10 -10
  181. package/.claude-flow-novice/dist/src/cli/index.js +1 -1
  182. package/.claude-flow-novice/dist/src/cli/init/directory-structure.js +8 -8
  183. package/.claude-flow-novice/dist/src/cli/init/index.js +3 -3
  184. package/.claude-flow-novice/dist/src/cli/init/sparc-environment.js +67 -67
  185. package/.claude-flow-novice/dist/src/cli/init/swarm-commands.js +18 -18
  186. package/.claude-flow-novice/dist/src/cli/node-repl.js +2 -2
  187. package/.claude-flow-novice/dist/src/cli/repl.js +1 -1
  188. package/.claude-flow-novice/dist/src/cli/simple-cli.js +68 -68
  189. package/.claude-flow-novice/dist/src/cli/simple-cli.js.map +1 -1
  190. package/.claude-flow-novice/dist/src/cli/simple-commands/session-start-soul.js +271 -0
  191. package/.claude-flow-novice/dist/src/cli/simple-orchestrator.js +7 -7
  192. package/.claude-flow-novice/dist/src/cli/simple-orchestrator.js.map +1 -1
  193. package/.claude-flow-novice/dist/src/cli/ui/fallback-handler.js +7 -7
  194. package/.claude-flow-novice/dist/src/communication/enhanced-event-bus.js +816 -0
  195. package/.claude-flow-novice/dist/src/communication/enhanced-event-bus.js.map +1 -0
  196. package/.claude-flow-novice/dist/src/communication/failure-recovery-system.js +812 -0
  197. package/.claude-flow-novice/dist/src/communication/failure-recovery-system.js.map +1 -0
  198. package/.claude-flow-novice/dist/src/communication/optimized-serialization.js +369 -0
  199. package/.claude-flow-novice/dist/src/communication/optimized-serialization.js.map +1 -0
  200. package/.claude-flow-novice/dist/src/communication/performance-optimizations.js +526 -0
  201. package/.claude-flow-novice/dist/src/communication/performance-optimizations.js.map +1 -0
  202. package/.claude-flow-novice/dist/src/communication/performance-validator.js +532 -0
  203. package/.claude-flow-novice/dist/src/communication/performance-validator.js.map +1 -0
  204. package/.claude-flow-novice/dist/src/communication/priority-message-queue.js +525 -0
  205. package/.claude-flow-novice/dist/src/communication/priority-message-queue.js.map +1 -0
  206. package/.claude-flow-novice/dist/src/communication/shared-buffer-bus.js +218 -0
  207. package/.claude-flow-novice/dist/src/communication/shared-buffer-bus.js.map +1 -0
  208. package/.claude-flow-novice/dist/src/communication/ultra-fast-communication-bus.js +521 -0
  209. package/.claude-flow-novice/dist/src/communication/ultra-fast-communication-bus.js.map +1 -0
  210. package/.claude-flow-novice/dist/src/communication/ultra-fast-serialization.js +563 -0
  211. package/.claude-flow-novice/dist/src/communication/ultra-fast-serialization.js.map +1 -0
  212. package/.claude-flow-novice/dist/src/communication/websocket-cluster.js +344 -0
  213. package/.claude-flow-novice/dist/src/communication/websocket-cluster.js.map +1 -0
  214. package/.claude-flow-novice/dist/src/communication/zero-copy-structures.js +369 -0
  215. package/.claude-flow-novice/dist/src/communication/zero-copy-structures.js.map +1 -0
  216. package/.claude-flow-novice/dist/src/config/config-manager.js +1 -1
  217. package/.claude-flow-novice/dist/src/config/config-manager.js.map +1 -1
  218. package/.claude-flow-novice/dist/src/config/core/intelligent-configuration-manager.js +1 -1
  219. package/.claude-flow-novice/dist/src/config/integration/hooks-integration.js +6 -6
  220. package/.claude-flow-novice/dist/src/config/integration/hooks-integration.js.map +1 -1
  221. package/.claude-flow-novice/dist/src/config/migration/config-migration.js +1 -1
  222. package/.claude-flow-novice/dist/src/config/ruv-swarm-integration.js +1 -1
  223. package/.claude-flow-novice/dist/src/config/utils/zero-config-setup.js +1 -1
  224. package/.claude-flow-novice/dist/src/config/utils/zero-config-setup.js.map +1 -1
  225. package/.claude-flow-novice/dist/src/config/web-portal-config.js +0 -9
  226. package/.claude-flow-novice/dist/src/config/web-portal-config.js.map +1 -1
  227. package/.claude-flow-novice/dist/src/config/zero-config-setup.js +18 -18
  228. package/.claude-flow-novice/dist/src/config/zero-config-setup.js.map +1 -1
  229. package/.claude-flow-novice/dist/src/core/logger.js +33 -10
  230. package/.claude-flow-novice/dist/src/core/logger.js.map +1 -1
  231. package/.claude-flow-novice/dist/src/migration/index.js +1 -1
  232. package/.claude-flow-novice/dist/src/migration/index.js.map +1 -1
  233. package/.claude-flow-novice/dist/src/migration/migration-runner.js +4 -4
  234. package/.claude-flow-novice/dist/src/migration/migration-runner.js.map +1 -1
  235. package/.claude-flow-novice/dist/src/monitoring/agent-health-monitor.js +430 -0
  236. package/.claude-flow-novice/dist/src/monitoring/agent-health-monitor.js.map +1 -0
  237. package/.claude-flow-novice/dist/src/slash-commands/claude-soul.js +248 -365
  238. package/.claude-flow-novice/dist/src/slash-commands/register-all-commands.js +1 -1
  239. package/.claude-flow-novice/dist/src/swarm/claude-code-interface.js +1 -1
  240. package/.claude-flow-novice/dist/src/swarm/claude-flow-executor.js +1 -1
  241. package/.claude-flow-novice/dist/src/swarm/consensus-coordinator.js +471 -0
  242. package/.claude-flow-novice/dist/src/swarm/consensus-coordinator.js.map +1 -0
  243. package/.claude-flow-novice/dist/src/swarm/hive-mind-integration.js +1 -1
  244. package/.claude-flow-novice/dist/src/swarm/large-scale-coordinator.js +543 -0
  245. package/.claude-flow-novice/dist/src/swarm/large-scale-coordinator.js.map +1 -0
  246. package/.claude-flow-novice/dist/src/swarm/optimizations/connection-pool.js +1 -1
  247. package/.claude-flow-novice/dist/src/swarm/optimizations/optimized-executor.js +1 -1
  248. package/.claude-flow-novice/dist/src/swarm/types.js.map +1 -1
  249. package/.claude-flow-novice/dist/src/swarm-fullstack/integrations/communication-bridge.js +709 -0
  250. package/.claude-flow-novice/dist/src/swarm-fullstack/integrations/communication-bridge.js.map +1 -0
  251. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/api-contract-validator.js +612 -0
  252. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/api-contract-validator.js.map +1 -0
  253. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/backend-test-orchestrator.js +679 -0
  254. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/backend-test-orchestrator.js.map +1 -0
  255. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/frontend-test-orchestrator.js +654 -0
  256. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/frontend-test-orchestrator.js.map +1 -0
  257. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/visual-regression.js +402 -0
  258. package/.claude-flow-novice/dist/src/swarm-fullstack/testing/visual-regression.js.map +1 -0
  259. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/convergence-detector.js +459 -0
  260. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/convergence-detector.js.map +1 -0
  261. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/fix-coordinator.js +513 -0
  262. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/fix-coordinator.js.map +1 -0
  263. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/index.js +19 -0
  264. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/index.js.map +1 -0
  265. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/iterative-build-test.js +568 -0
  266. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/iterative-build-test.js.map +1 -0
  267. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/regression-test-manager.js +418 -0
  268. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/regression-test-manager.js.map +1 -0
  269. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/test-result-analyzer.js +530 -0
  270. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/test-result-analyzer.js.map +1 -0
  271. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/workflow-metrics.js +250 -0
  272. package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/workflow-metrics.js.map +1 -0
  273. package/.claude-flow-novice/dist/src/task/index.js +7 -7
  274. package/.claude-flow-novice/dist/src/validation/fullstack-integration-validator.js +420 -0
  275. package/.claude-flow-novice/dist/src/validation/fullstack-integration-validator.js.map +1 -0
  276. package/.claude-flow-novice/dist/src/validation/production-validator.js +1435 -0
  277. package/.claude-flow-novice/dist/src/validation/production-validator.js.map +1 -0
  278. package/.claude-flow-novice/dist/src/verification/cli-integration.js +3 -3
  279. package/.claude-flow-novice/dist/src/verification/hooks.js +1 -1
  280. package/CHANGELOG.md +26 -0
  281. package/CLAUDE.md +1967 -68
  282. package/README.md +0 -1
  283. package/config/build/babel.config.cjs +19 -11
  284. package/config/typescript/tsconfig.json +1 -1
  285. package/examples/claude-api-error-handling.ts +2 -2
  286. package/examples/frontend-testing-demo.ts +470 -0
  287. package/examples/litellm/config/config.yaml +1 -1
  288. package/package.json +13 -7
  289. package/scripts/build/unified-builder.sh +6 -6
  290. package/scripts/build/validate-agents.js +238 -0
  291. package/scripts/run-production-validation.ts +590 -0
  292. package/scripts/test/test-coordination-features.ts +2 -2
  293. package/scripts/validate-stage3-performance.ts +377 -0
  294. package/src/cli/simple-commands/hooks.js +1 -0
  295. package/src/cli/simple-commands/init/agent-copier.js +0 -2
  296. package/src/cli/simple-commands/init/index.js +5 -97
  297. package/src/cli/simple-commands/init/templates/CLAUDE.md +163 -1158
  298. package/src/cli/simple-commands/init/templates/claude-md.js +38 -157
  299. package/src/swarm-fullstack/integrations/communication-bridge.ts +931 -0
  300. package/src/swarm-fullstack/testing/api-contract-validator.ts +909 -0
  301. package/src/swarm-fullstack/testing/backend-test-orchestrator.ts +791 -0
  302. package/src/swarm-fullstack/testing/frontend-test-orchestrator.ts +853 -0
  303. package/src/swarm-fullstack/testing/visual-regression.ts +507 -0
  304. package/src/swarm-fullstack/workflows/convergence-detector.ts +736 -0
  305. package/src/swarm-fullstack/workflows/fix-coordinator.ts +677 -0
  306. package/src/swarm-fullstack/workflows/index.ts +75 -0
  307. package/src/swarm-fullstack/workflows/iterative-build-test.ts +829 -0
  308. package/src/swarm-fullstack/workflows/regression-test-manager.ts +590 -0
  309. package/src/swarm-fullstack/workflows/test-result-analyzer.ts +739 -0
  310. package/src/swarm-fullstack/workflows/workflow-metrics.ts +399 -0
  311. package/wiki/command-reference/README.md +1 -2
  312. package/wiki/command-reference/mcp-tools/README.md +1 -1
  313. package/wiki/getting-started/claude-code-mcp/README.md +1 -2
  314. package/wiki/getting-started/installation/README.md +2 -10
  315. package/.claude/commands/flow-nexus/app-store.md +0 -124
  316. package/.claude/commands/flow-nexus/challenges.md +0 -120
  317. package/.claude/commands/flow-nexus/login-registration.md +0 -65
  318. package/.claude/commands/flow-nexus/neural-network.md +0 -134
  319. package/.claude/commands/flow-nexus/payments.md +0 -116
  320. package/.claude/commands/flow-nexus/sandbox.md +0 -83
  321. package/.claude/commands/flow-nexus/swarm.md +0 -87
  322. package/.claude/commands/flow-nexus/user-tools.md +0 -152
  323. package/.claude/commands/flow-nexus/workflow.md +0 -115
  324. package/.claude-flow-novice/dist/cli/index.js +0 -45
  325. package/.claude-flow-novice/dist/core/index.js +0 -22
  326. package/.claude-flow-novice/dist/mcp/mcp-server-novice.js +0 -595
  327. package/.claude-flow-novice/dist/mcp/mcp-server-sdk.js +0 -649
  328. package/.claude-flow-novice/dist/mcp/mcp-server-with-slash-commands.js +0 -776
  329. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-md.js +0 -1101
  330. package/src/cli/simple-commands/init/templates/CLAUDE.md.optimized +0 -265
  331. /package/{.claude → .claude-flow-novice/.claude}/agents/README.md +0 -0
  332. /package/{.claude → .claude-flow-novice/.claude}/agents/backend-dev.json +0 -0
  333. /package/{.claude → .claude-flow-novice/.claude}/agents/code-analyzer.json +0 -0
  334. /package/{.claude → .claude-flow-novice/.claude}/agents/coder.json +0 -0
  335. /package/{.claude → .claude-flow-novice/.claude}/agents/consensus/README.md +0 -0
  336. /package/{.claude → .claude-flow-novice/.claude}/agents/core/coder.md +0 -0
  337. /package/{.claude → .claude-flow-novice/.claude}/agents/core/planner.md +0 -0
  338. /package/{.claude → .claude-flow-novice/.claude}/agents/core/researcher.md +0 -0
  339. /package/{.claude → .claude-flow-novice/.claude}/agents/core/reviewer.md +0 -0
  340. /package/{.claude → .claude-flow-novice/.claude}/agents/core/tester.md +0 -0
  341. /package/{.claude → .claude-flow-novice/.claude}/agents/optimization/README.md +0 -0
  342. /package/{.claude → .claude-flow-novice/.claude}/agents/planner.json +0 -0
  343. /package/{.claude → .claude-flow-novice/.claude}/agents/researcher.json +0 -0
  344. /package/{.claude → .claude-flow-novice/.claude}/agents/reviewer.json +0 -0
  345. /package/{.claude → .claude-flow-novice/.claude}/agents/swarm/README.md +0 -0
  346. /package/{.claude → .claude-flow-novice/.claude}/agents/system-architect.json +0 -0
  347. /package/{.claude → .claude-flow-novice/.claude}/agents/tester.json +0 -0
@@ -3,17 +3,21 @@
3
3
  /**
4
4
  * CLAUDE-SOUL.md Slash Command
5
5
  *
6
- * Generate a project soul document - the why, what, and how of the project
7
- * A sparse language doc limited to 500 lines focusing on project essence
6
+ * Interactive questionnaire to create a project soul document.
7
+ * Guides users through defining their project's who, what, when, where, why
8
+ * to provide context for AI agents when they hit roadblocks.
9
+ * Document size: 250-500 words focusing on project essence and decision context.
8
10
  */
9
11
 
10
12
  import fs from 'fs/promises';
11
13
  import path from 'path';
14
+ import readline from 'readline';
12
15
 
13
16
  export class ClaudeSoulSlashCommand {
14
17
  constructor(projectPath = process.cwd()) {
15
18
  this.projectPath = projectPath;
16
19
  this.claudeSoulPath = path.join(projectPath, 'claude-soul.md');
20
+ this.rl = null;
17
21
  }
18
22
 
19
23
  /**
@@ -23,16 +27,40 @@ export class ClaudeSoulSlashCommand {
23
27
  const {
24
28
  backup = true,
25
29
  preview = false,
26
- force = false
30
+ force = false,
31
+ interactive = true
27
32
  } = options;
28
33
 
29
34
  try {
30
- console.log('🚀 Generating claude-soul.md...');
35
+ console.log('🚀 Creating your project soul document...');
31
36
 
32
- // Step 1: Generate soul content
33
- const soulContent = await this.generateSoulContent();
37
+ if (!preview) {
38
+ console.log('📝 This interactive questionnaire will help AI agents understand your project context.');
39
+ console.log('');
40
+ }
41
+
42
+ let projectData;
43
+
44
+ if (interactive && !preview) {
45
+ // Step 1: Run interactive questionnaire
46
+ projectData = await this.runQuestionnaire();
47
+
48
+ if (!projectData) {
49
+ return {
50
+ success: false,
51
+ action: 'cancelled',
52
+ message: 'Questionnaire cancelled by user'
53
+ };
54
+ }
55
+ } else {
56
+ // Fallback to auto-generation for preview mode
57
+ projectData = await this.autoGenerateData();
58
+ }
59
+
60
+ // Step 2: Generate soul content
61
+ const soulContent = await this.generateSoulContent(projectData);
34
62
 
35
- // Step 2: Handle preview mode
63
+ // Step 3: Handle preview mode
36
64
  if (preview) {
37
65
  return {
38
66
  success: true,
@@ -42,10 +70,10 @@ export class ClaudeSoulSlashCommand {
42
70
  };
43
71
  }
44
72
 
45
- // Step 3: Check for existing file
73
+ // Step 4: Check for existing file
46
74
  const existingSoulExists = await this.fileExists(this.claudeSoulPath);
47
75
 
48
- // Step 4: Handle force/confirmation for existing files
76
+ // Step 5: Handle force/confirmation for existing files
49
77
  if (existingSoulExists && !force) {
50
78
  const shouldOverwrite = await this.confirmOverwrite();
51
79
  if (!shouldOverwrite) {
@@ -57,15 +85,18 @@ export class ClaudeSoulSlashCommand {
57
85
  }
58
86
  }
59
87
 
60
- // Step 5: Create backup if requested
88
+ // Step 6: Create backup if requested
61
89
  if (backup && existingSoulExists) {
62
90
  await this.createBackup();
63
91
  }
64
92
 
65
- // Step 6: Write the file
93
+ // Step 7: Write the file
66
94
  await fs.writeFile(this.claudeSoulPath, soulContent, 'utf8');
67
95
 
68
- console.log('✅ claude-soul.md generated successfully');
96
+ console.log('');
97
+ console.log('✅ claude-soul.md created successfully!');
98
+ console.log('📊 AI agents can now reference this document for project context.');
99
+
69
100
  return {
70
101
  success: true,
71
102
  action: 'generated',
@@ -81,402 +112,229 @@ export class ClaudeSoulSlashCommand {
81
112
  action: 'error',
82
113
  error: error.message
83
114
  };
115
+ } finally {
116
+ if (this.rl) {
117
+ this.rl.close();
118
+ }
84
119
  }
85
120
  }
86
121
 
87
122
  /**
88
- * Generate the soul content by analyzing the project
123
+ * Generate the soul content from questionnaire data
89
124
  */
90
- async generateSoulContent() {
91
- const projectAnalysis = await this.analyzeProject();
92
-
93
- return `# ${projectAnalysis.name} - Project Soul
125
+ async generateSoulContent(projectData) {
126
+ const projectName = projectData.name || path.basename(this.projectPath);
94
127
 
95
- > **AI Context**: This document contains the project's essence, purpose, and philosophy. Use this context to understand project goals, make consistent decisions about code and architecture, and maintain alignment with project values throughout development.
128
+ return `# ${projectName} - Project Soul
96
129
 
97
- ## WHY - The Purpose
130
+ > **AI Context**: This document provides essential project context to help AI agents understand goals, make decisions, and maintain alignment with project values when encountering roadblocks or architectural choices.
98
131
 
99
- ### Core Mission
100
- ${projectAnalysis.mission}
132
+ ## WHO - The People
101
133
 
102
- ### Problem We Solve
103
- ${projectAnalysis.problem}
134
+ **Project Owner**: ${projectData.owner || 'Not specified'}
135
+ **Target Users**: ${projectData.targetUsers || 'Not specified'}
136
+ **Team**: ${projectData.teamSize || 'Not specified'}
104
137
 
105
- ### Vision
106
- ${projectAnalysis.vision}
138
+ ## WHAT - The Project
107
139
 
108
- ## WHAT - The Essence
140
+ **Purpose**: ${projectData.purpose}
109
141
 
110
- ### Project Identity
111
- - **Type**: ${projectAnalysis.type}
112
- - **Domain**: ${projectAnalysis.domain}
113
- - **Scope**: ${projectAnalysis.scope}
142
+ **Core Problem**: ${projectData.problem}
114
143
 
115
- ### Core Capabilities
116
- ${projectAnalysis.capabilities.map(cap => `- ${cap}`).join('\n')}
144
+ **Key Features**:
145
+ ${(projectData.features || []).map(feature => `- ${feature}`).join('\n') || '- Not specified'}
117
146
 
118
- ### Key Features
119
- ${projectAnalysis.features.map(feature => `- ${feature}`).join('\n')}
147
+ **Success Metrics**: ${projectData.successMetrics || 'Not specified'}
120
148
 
121
- ### Architecture Philosophy
122
- ${projectAnalysis.architecture}
149
+ ## WHEN - The Timeline
123
150
 
124
- ## HOW - The Approach
151
+ **Project Stage**: ${projectData.stage || 'Not specified'}
152
+ **Key Milestones**: ${projectData.milestones || 'Not specified'}
153
+ **Constraints**: ${projectData.timeConstraints || 'None specified'}
125
154
 
126
- ### Development Methodology
127
- ${projectAnalysis.methodology}
155
+ ## WHERE - The Context
128
156
 
129
- ### Technology Stack
130
- ${projectAnalysis.techStack.map(tech => `- ${tech}`).join('\n')}
157
+ **Domain**: ${projectData.domain || 'General software'}
158
+ **Environment**: ${projectData.environment || 'Not specified'}
159
+ **Scale**: ${projectData.scale || 'Small to medium'}
131
160
 
132
- ### Code Principles
133
- ${projectAnalysis.principles.map(principle => `- ${principle}`).join('\n')}
161
+ ## WHY - The Motivation
134
162
 
135
- ### Quality Standards
136
- ${projectAnalysis.quality}
163
+ **Vision**: ${projectData.vision}
137
164
 
138
- ## SOUL - The Spirit
165
+ **Values**:
166
+ ${(projectData.values || []).map(value => `- ${value}`).join('\n') || '- Quality and maintainability'}
139
167
 
140
- ### Values
141
- ${projectAnalysis.values.map(value => `- ${value}`).join('\n')}
168
+ **Impact**: ${projectData.impact || 'Positive user experience'}
142
169
 
143
- ### Community
144
- ${projectAnalysis.community}
170
+ ## TECHNICAL SOUL
145
171
 
146
- ### Future Vision
147
- ${projectAnalysis.future}
148
-
149
- ### Legacy Goals
150
- ${projectAnalysis.legacy}
172
+ **Architecture Preference**: ${projectData.architecture || 'Clean and maintainable'}
173
+ **Technology Stack**: ${projectData.techStack || 'Modern best practices'}
174
+ **Quality Standards**: ${projectData.quality || 'High standards with testing'}
175
+ **Decision Framework**: ${projectData.decisions || 'Pragmatic choices balancing speed and quality'}
151
176
 
152
177
  ---
153
178
 
154
- > **For AI Assistants**: Reference this document when writing code, suggesting architecture changes, or making technical decisions. Ensure all recommendations align with the project's mission, values, and technical approach outlined above.
179
+ > **AI Assistant Guidance**: When you encounter ambiguity or need to make technical decisions, refer to this document. Prioritize solutions that align with the stated values, target users, and technical preferences. If unsure, ask for clarification within the context of these project goals.
155
180
 
156
- *Generated: ${new Date().toISOString().split('T')[0]} | Limit: 500 lines | Last updated: ${new Date().toLocaleDateString()}*
181
+ *Created: ${new Date().toLocaleDateString()} | Words: ${this.countWords(projectData)} | Purpose: AI Decision Context*
157
182
  `;
158
183
  }
159
184
 
160
185
  /**
161
- * Analyze the project to extract its soul
186
+ * Run interactive questionnaire to gather project data
162
187
  */
163
- async analyzeProject() {
164
- const packageInfo = await this.getPackageInfo();
165
- const repoInfo = await this.getRepositoryInfo();
166
- const codebaseInfo = await this.getCodebaseInfo();
188
+ async runQuestionnaire() {
189
+ this.rl = readline.createInterface({
190
+ input: process.stdin,
191
+ output: process.stdout
192
+ });
167
193
 
168
- // Generate project analysis
169
- return {
170
- name: packageInfo.name || path.basename(this.projectPath),
171
- mission: this.inferMission(packageInfo, repoInfo),
172
- problem: this.inferProblem(packageInfo, codebaseInfo),
173
- vision: this.inferVision(packageInfo, repoInfo),
174
- type: this.inferProjectType(packageInfo, codebaseInfo),
175
- domain: this.inferDomain(packageInfo, codebaseInfo),
176
- scope: this.inferScope(packageInfo, codebaseInfo),
177
- capabilities: this.inferCapabilities(packageInfo, codebaseInfo),
178
- features: this.inferFeatures(packageInfo, codebaseInfo),
179
- architecture: this.inferArchitecture(codebaseInfo),
180
- methodology: this.inferMethodology(codebaseInfo),
181
- techStack: this.inferTechStack(packageInfo, codebaseInfo),
182
- principles: this.inferPrinciples(codebaseInfo),
183
- quality: this.inferQuality(packageInfo, codebaseInfo),
184
- values: this.inferValues(packageInfo, repoInfo),
185
- community: this.inferCommunity(packageInfo, repoInfo),
186
- future: this.inferFuture(packageInfo, repoInfo),
187
- legacy: this.inferLegacy(packageInfo, repoInfo)
188
- };
189
- }
194
+ console.log('📋 Let\'s define your project\'s soul! (Press Ctrl+C anytime to cancel)');
195
+ console.log('💡 This context helps AI agents make better decisions when they encounter roadblocks.');
196
+ console.log('');
190
197
 
191
- /**
192
- * Get package.json information
193
- */
194
- async getPackageInfo() {
195
198
  try {
196
- const packagePath = path.join(this.projectPath, 'package.json');
197
- const packageContent = await fs.readFile(packagePath, 'utf8');
198
- return JSON.parse(packageContent);
199
- } catch {
200
- return {};
201
- }
202
- }
199
+ const projectData = {};
203
200
 
204
- /**
205
- * Get repository information
206
- */
207
- async getRepositoryInfo() {
208
- const info = { hasGit: false, files: [] };
209
-
210
- try {
211
- await fs.access(path.join(this.projectPath, '.git'));
212
- info.hasGit = true;
213
- } catch {}
201
+ // WHO questions
202
+ console.log('\n🙋 WHO - The People Behind This Project');
203
+ projectData.owner = await this.ask('Who is the main owner/maintainer of this project?', 'Individual developer');
204
+ projectData.targetUsers = await this.ask('Who are your primary users/audience?', 'Developers');
205
+ projectData.teamSize = await this.ask('Team size (solo, 2-5, 6-20, 20+)?', 'Solo');
214
206
 
215
- try {
216
- const files = await fs.readdir(this.projectPath);
217
- info.files = files;
218
- } catch {}
219
-
220
- return info;
221
- }
207
+ // WHAT questions
208
+ console.log('\n📦 WHAT - The Project Essence');
209
+ projectData.name = await this.ask('Project name?', path.basename(this.projectPath));
210
+ projectData.purpose = await this.ask('What does this project do? (1-2 sentences)', 'Solves development problems');
211
+ projectData.problem = await this.ask('What specific problem does it solve?', 'Streamlines common tasks');
222
212
 
223
- /**
224
- * Get codebase structure information
225
- */
226
- async getCodebaseInfo() {
227
- const info = {
228
- directories: [],
229
- languages: new Set(),
230
- configFiles: [],
231
- testFiles: [],
232
- hasTests: false,
233
- hasDocumentation: false
234
- };
213
+ const featuresInput = await this.ask('Key features (comma-separated)?', 'Core functionality');
214
+ projectData.features = featuresInput.split(',').map(f => f.trim()).filter(f => f);
235
215
 
236
- try {
237
- const entries = await fs.readdir(this.projectPath, { withFileTypes: true });
238
-
239
- for (const entry of entries) {
240
- if (entry.isDirectory()) {
241
- info.directories.push(entry.name);
242
- } else {
243
- const ext = path.extname(entry.name).toLowerCase();
244
- const name = entry.name.toLowerCase();
245
-
246
- // Track languages
247
- const languageMap = {
248
- '.js': 'JavaScript',
249
- '.ts': 'TypeScript',
250
- '.py': 'Python',
251
- '.go': 'Go',
252
- '.rs': 'Rust',
253
- '.java': 'Java',
254
- '.cpp': 'C++',
255
- '.c': 'C'
256
- };
216
+ projectData.successMetrics = await this.ask('How do you measure success?', 'User satisfaction and adoption');
257
217
 
258
- if (languageMap[ext]) {
259
- info.languages.add(languageMap[ext]);
260
- }
261
-
262
- // Track config files
263
- if (name.includes('config') || name.includes('.json') ||
264
- name.includes('.yml') || name.includes('.yaml')) {
265
- info.configFiles.push(entry.name);
266
- }
267
-
268
- // Track test files
269
- if (name.includes('test') || name.includes('spec')) {
270
- info.testFiles.push(entry.name);
271
- info.hasTests = true;
272
- }
273
-
274
- // Track documentation
275
- if (ext === '.md' || name.includes('readme') || name.includes('doc')) {
276
- info.hasDocumentation = true;
277
- }
278
- }
279
- }
280
- } catch {}
218
+ // WHEN questions
219
+ console.log('\n⏰ WHEN - Timeline and Stage');
220
+ projectData.stage = await this.ask('Current stage (concept/prototype/mvp/production/mature)?', 'Development');
221
+ projectData.milestones = await this.ask('Key upcoming milestones?', 'Feature completion');
222
+ projectData.timeConstraints = await this.ask('Any time constraints or deadlines?', 'None');
281
223
 
282
- return info;
283
- }
224
+ // WHERE questions
225
+ console.log('\n🌍 WHERE - Context and Environment');
226
+ projectData.domain = await this.ask('What domain/industry?', 'Software development');
227
+ projectData.environment = await this.ask('Deployment environment (local/web/mobile/enterprise)?', 'Web');
228
+ projectData.scale = await this.ask('Expected scale (personal/small team/enterprise)?', 'Small team');
284
229
 
285
- // Inference methods
286
- inferMission(pkg, repo) {
287
- if (pkg.description) {
288
- return pkg.description;
289
- }
230
+ // WHY questions
231
+ console.log('\n💡 WHY - Motivation and Vision');
232
+ projectData.vision = await this.ask('What\'s your long-term vision?', 'Create valuable, maintainable software');
290
233
 
291
- const name = pkg.name || path.basename(this.projectPath);
234
+ const valuesInput = await this.ask('Core values (comma-separated)?', 'Quality, simplicity, maintainability');
235
+ projectData.values = valuesInput.split(',').map(v => v.trim()).filter(v => v);
292
236
 
293
- if (name.includes('flow') || name.includes('orchestrat')) {
294
- return "Orchestrate and coordinate complex workflows with intelligent automation";
295
- }
296
- if (name.includes('api') || name.includes('server')) {
297
- return "Provide robust API services and server-side functionality";
298
- }
299
- if (name.includes('cli') || name.includes('tool')) {
300
- return "Deliver powerful command-line tools for developer productivity";
301
- }
237
+ projectData.impact = await this.ask('What impact do you want to achieve?', 'Improve developer productivity');
302
238
 
303
- return "Solve complex problems through innovative software solutions";
304
- }
239
+ // TECHNICAL questions
240
+ console.log('\n⚙️ TECHNICAL - Architecture and Approach');
241
+ projectData.architecture = await this.ask('Preferred architecture style?', 'Clean and modular');
242
+ projectData.techStack = await this.ask('Technology preferences?', 'Modern, well-supported tools');
243
+ projectData.quality = await this.ask('Quality standards?', 'High with automated testing');
244
+ projectData.decisions = await this.ask('How should AI agents make decisions when unclear?', 'Ask for clarification, prefer maintainable solutions');
305
245
 
306
- inferProblem(pkg, codebase) {
307
- if (pkg.name?.includes('flow')) {
308
- return "Complex multi-agent coordination and workflow orchestration requires simplified interfaces while maintaining advanced capabilities";
309
- }
310
- if (codebase.languages.has('TypeScript') && codebase.hasTests) {
311
- return "Enterprise-grade development workflows need reliable, type-safe, and well-tested solutions";
312
- }
313
- return "Modern software development requires efficient, maintainable, and scalable solutions";
314
- }
246
+ console.log('');
247
+ console.log('✅ Questionnaire complete! Generating your project soul document...');
315
248
 
316
- inferVision(pkg, repo) {
317
- if (pkg.name?.includes('novice')) {
318
- return "Democratize advanced technology by making it accessible to users of all skill levels";
249
+ return projectData;
250
+ } catch (error) {
251
+ if (error.message === 'CANCELLED') {
252
+ console.log('\n❌ Questionnaire cancelled.');
253
+ return null;
254
+ }
255
+ throw error;
319
256
  }
320
- return "Create software that empowers users and teams to achieve more with less complexity";
321
257
  }
322
258
 
323
- inferProjectType(pkg, codebase) {
324
- if (pkg.bin) return "CLI Tool";
325
- if (codebase.directories.includes('src') && codebase.directories.includes('tests')) return "Library/Framework";
326
- if (pkg.dependencies?.express || pkg.dependencies?.fastify) return "Web Service";
327
- if (codebase.languages.has('TypeScript')) return "TypeScript Application";
328
- return "Software Project";
329
- }
330
-
331
- inferDomain(pkg, codebase) {
332
- const name = (pkg.name || '').toLowerCase();
333
- if (name.includes('flow') || name.includes('orchestrat')) return "Workflow Orchestration";
334
- if (name.includes('ai') || name.includes('ml')) return "Artificial Intelligence";
335
- if (name.includes('api') || name.includes('web')) return "Web Development";
336
- if (name.includes('cli') || name.includes('tool')) return "Developer Tools";
337
- return "Software Development";
338
- }
339
-
340
- inferScope(pkg, codebase) {
341
- const dirCount = codebase.directories.length;
342
- const langCount = codebase.languages.size;
343
-
344
- if (dirCount > 10 && langCount > 2) return "Enterprise-scale multi-language platform";
345
- if (dirCount > 5) return "Medium-scale application with modular architecture";
346
- return "Focused tool with clear boundaries";
347
- }
348
-
349
- inferCapabilities(pkg, codebase) {
350
- const caps = [];
351
-
352
- if (pkg.bin) caps.push("Command-line interface execution");
353
- if (codebase.hasTests) caps.push("Automated testing and validation");
354
- if (codebase.languages.has('TypeScript')) caps.push("Type-safe development");
355
- if (pkg.dependencies?.sqlite3) caps.push("Persistent data storage");
356
- if (pkg.scripts?.build) caps.push("Build and compilation");
357
- if (pkg.name?.includes('flow')) caps.push("Workflow orchestration and automation");
358
-
359
- return caps.length > 0 ? caps : ["Core functionality delivery", "Modular architecture"];
360
- }
361
-
362
- inferFeatures(pkg, codebase) {
363
- const features = new Set();
364
-
365
- if (pkg.scripts) {
366
- Object.keys(pkg.scripts).forEach(script => {
367
- if (script.includes('test') && !features.has("testing")) {
368
- features.add("Comprehensive testing suite");
369
- features.add("testing");
370
- }
371
- if (script.includes('build') && !features.has("build")) {
372
- features.add("Automated build system");
373
- features.add("build");
374
- }
375
- if (script.includes('dev') && !features.has("dev")) {
376
- features.add("Development workflow tools");
377
- features.add("dev");
259
+ /**
260
+ * Ask a question with default value
261
+ */
262
+ async ask(question, defaultValue) {
263
+ return new Promise((resolve, reject) => {
264
+ const prompt = defaultValue ?
265
+ `${question} [${defaultValue}]: ` :
266
+ `${question}: `;
267
+
268
+ this.rl.question(prompt, (answer) => {
269
+ if (answer.toLowerCase() === 'ctrl+c' || answer.toLowerCase() === 'cancel') {
270
+ reject(new Error('CANCELLED'));
271
+ return;
378
272
  }
273
+ resolve(answer.trim() || defaultValue);
379
274
  });
380
- }
381
-
382
- if (codebase.configFiles.length > 0) features.add("Flexible configuration system");
383
- if (codebase.hasDocumentation) features.add("Comprehensive documentation");
384
-
385
- // Filter out the marker keys and return as array
386
- const filteredFeatures = Array.from(features).filter(f =>
387
- f !== "testing" && f !== "build" && f !== "dev"
388
- );
389
-
390
- return filteredFeatures.length > 0 ? filteredFeatures : ["Modular design", "Clean architecture"];
391
- }
392
-
393
- inferArchitecture(codebase) {
394
- if (codebase.directories.includes('src') && codebase.directories.includes('dist')) {
395
- return "Source-to-distribution compilation with clear separation of concerns";
396
- }
397
- if (codebase.directories.includes('lib') || codebase.directories.includes('src')) {
398
- return "Modular architecture with logical component separation";
399
- }
400
- return "Clean, maintainable structure following best practices";
401
- }
402
-
403
- inferMethodology(codebase) {
404
- if (codebase.hasTests && codebase.directories.includes('src')) {
405
- return "Test-driven development with continuous integration";
406
- }
407
- if (codebase.hasTests) {
408
- return "Quality-first development with automated validation";
409
- }
410
- return "Iterative development with focus on maintainability";
275
+ });
411
276
  }
412
277
 
413
- inferTechStack(pkg, codebase) {
414
- const stack = [];
415
-
416
- Array.from(codebase.languages).forEach(lang => stack.push(lang));
417
-
418
- if (pkg.dependencies?.sqlite3) stack.push("SQLite Database");
419
- if (pkg.dependencies?.express) stack.push("Express.js");
420
- if (pkg.dependencies?.react) stack.push("React");
421
- if (pkg.devDependencies?.jest) stack.push("Jest Testing");
422
- if (pkg.devDependencies?.typescript) stack.push("TypeScript Compiler");
423
-
424
- return stack.length > 0 ? stack : ["Modern JavaScript/TypeScript ecosystem"];
425
- }
426
-
427
- inferPrinciples(codebase) {
428
- const principles = ["Clean, readable code"];
429
-
430
- if (codebase.hasTests) principles.push("Test-driven development");
431
- if (codebase.languages.has('TypeScript')) principles.push("Type safety and static analysis");
432
- if (codebase.directories.includes('src')) principles.push("Separation of concerns");
433
-
434
- principles.push("Progressive enhancement");
435
- principles.push("Documentation-first approach");
436
-
437
- return principles;
438
- }
439
-
440
- inferQuality(pkg, codebase) {
441
- let quality = "High standards with ";
442
-
443
- if (codebase.hasTests) quality += "comprehensive testing, ";
444
- if (codebase.languages.has('TypeScript')) quality += "type safety, ";
445
- if (pkg.scripts?.lint) quality += "linting, ";
446
-
447
- quality += "and continuous improvement";
448
-
449
- return quality;
450
- }
451
-
452
- inferValues(pkg, repo) {
453
- const values = ["Simplicity without sacrificing power"];
454
-
455
- if (pkg.name?.includes('novice')) values.push("Accessibility for all skill levels");
456
- if (pkg.license === 'MIT') values.push("Open source collaboration");
457
-
458
- values.push("Quality over quantity");
459
- values.push("User-centric design");
460
-
461
- return values;
462
- }
278
+ /**
279
+ * Auto-generate data for preview mode (fallback)
280
+ */
281
+ async autoGenerateData() {
282
+ const packageInfo = await this.getBasicPackageInfo();
283
+ const projectName = packageInfo.name || path.basename(this.projectPath);
463
284
 
464
- inferCommunity(pkg, repo) {
465
- if (pkg.repository?.url) {
466
- return `Open source project welcoming contributions. Repository: ${pkg.repository.url}`;
467
- }
468
- return "Collaborative development with focus on shared learning and improvement";
285
+ return {
286
+ name: projectName,
287
+ owner: 'Project Owner',
288
+ targetUsers: 'Developers and end users',
289
+ teamSize: 'Small team',
290
+ purpose: packageInfo.description || 'Software project providing valuable functionality',
291
+ problem: 'Solving common development challenges',
292
+ features: ['Core functionality', 'User interface', 'API integration'],
293
+ successMetrics: 'User adoption and satisfaction',
294
+ stage: 'Development',
295
+ milestones: 'Feature completion and testing',
296
+ timeConstraints: 'Ongoing development',
297
+ domain: 'Software development',
298
+ environment: 'Web application',
299
+ scale: 'Medium scale',
300
+ vision: 'Create maintainable, valuable software',
301
+ values: ['Quality', 'Maintainability', 'User focus'],
302
+ impact: 'Positive user experience and productivity',
303
+ architecture: 'Clean, modular architecture',
304
+ techStack: 'Modern JavaScript/TypeScript stack',
305
+ quality: 'High standards with automated testing',
306
+ decisions: 'Pragmatic choices balancing quality and delivery speed'
307
+ };
469
308
  }
470
309
 
471
- inferFuture(pkg, repo) {
472
- if (pkg.name?.includes('flow')) {
473
- return "Evolve into the premier platform for accessible AI workflow orchestration";
310
+ /**
311
+ * Get basic package.json information
312
+ */
313
+ async getBasicPackageInfo() {
314
+ try {
315
+ const packagePath = path.join(this.projectPath, 'package.json');
316
+ const packageContent = await fs.readFile(packagePath, 'utf8');
317
+ return JSON.parse(packageContent);
318
+ } catch {
319
+ return {};
474
320
  }
475
- return "Continuous evolution to meet emerging developer needs and technological advances";
476
321
  }
477
322
 
478
- inferLegacy(pkg, repo) {
479
- return "Create lasting impact by making complex technology accessible and empowering developers to build amazing things";
323
+ /**
324
+ * Count approximate words in project data
325
+ */
326
+ countWords(projectData) {
327
+ const textFields = [
328
+ projectData.owner, projectData.targetUsers, projectData.purpose,
329
+ projectData.problem, projectData.vision, projectData.impact,
330
+ projectData.architecture, projectData.techStack, projectData.quality,
331
+ projectData.decisions
332
+ ];
333
+
334
+ const arrayFields = projectData.features.concat(projectData.values);
335
+
336
+ const allText = textFields.concat(arrayFields).join(' ');
337
+ return allText.split(/\s+/).filter(word => word.length > 0).length;
480
338
  }
481
339
 
482
340
  /**
@@ -500,6 +358,13 @@ ${projectAnalysis.legacy}
500
358
  * Simple confirmation prompt for overwriting existing files
501
359
  */
502
360
  async confirmOverwrite() {
361
+ if (this.rl) {
362
+ return new Promise((resolve) => {
363
+ this.rl.question('⚠️ claude-soul.md exists. Overwrite? (y/N): ', (answer) => {
364
+ resolve(answer.toLowerCase().startsWith('y'));
365
+ });
366
+ });
367
+ }
503
368
  console.log('⚠️ claude-soul.md exists. Use --force to overwrite or --preview to see changes.');
504
369
  return false;
505
370
  }
@@ -516,12 +381,17 @@ ${projectAnalysis.legacy}
516
381
  }
517
382
  }
518
383
 
519
- /**
520
- * Show preview of what would be generated
521
- */
522
- async showPreview() {
523
- const result = await this.execute({ preview: true });
384
+ }
385
+
386
+ /**
387
+ * CLI Interface for slash command
388
+ */
389
+ export async function executeClaudeSoulCommand(args = {}) {
390
+ const command = new ClaudeSoulSlashCommand();
524
391
 
392
+ // Handle different command modes
393
+ if (args.preview) {
394
+ const result = await command.execute({ ...args, preview: true });
525
395
  if (result.success) {
526
396
  console.log('📄 claude-soul.md Preview:');
527
397
  console.log('━'.repeat(50));
@@ -530,23 +400,31 @@ ${projectAnalysis.legacy}
530
400
  console.log(`📊 Total length: ${result.content.length} characters`);
531
401
  console.log(`📏 Lines: ${result.content.split('\n').length}`);
532
402
  }
533
-
534
403
  return result;
535
404
  }
536
- }
537
405
 
538
- /**
539
- * CLI Interface for slash command
540
- */
541
- export async function executeClaudeSoulCommand(args = {}) {
542
- const command = new ClaudeSoulSlashCommand();
406
+ if (args.help) {
407
+ console.log(`
408
+ 🧠 Claude Soul - Project Context Generator
543
409
 
544
- // Handle different command modes
545
- if (args.preview) {
546
- return await command.showPreview();
410
+ Creates a project soul document to provide AI agents with essential context
411
+ about your project's who, what, when, where, and why.
412
+
413
+ Usage:
414
+ /claude-soul # Interactive questionnaire
415
+ /claude-soul --preview # Show preview without saving
416
+ /claude-soul --force # Overwrite existing file
417
+ /claude-soul --no-interactive # Skip questionnaire, auto-generate
418
+
419
+ Purpose: When AI agents hit roadblocks, they can reference this document
420
+ to understand project goals and make decisions aligned with your vision.
421
+
422
+ Document size: 250-500 words focusing on decision-making context.
423
+ `);
424
+ return { success: true, action: 'help' };
547
425
  }
548
426
 
549
- // Default: generate claude-soul.md
427
+ // Default: run interactive questionnaire
550
428
  return await command.execute(args);
551
429
  }
552
430
 
@@ -555,8 +433,13 @@ if (import.meta.url === `file://${process.argv[1]}`) {
555
433
  const args = {
556
434
  preview: process.argv.includes('--preview'),
557
435
  force: process.argv.includes('--force'),
558
- backup: !process.argv.includes('--no-backup')
436
+ backup: !process.argv.includes('--no-backup'),
437
+ interactive: !process.argv.includes('--no-interactive'),
438
+ help: process.argv.includes('--help') || process.argv.includes('-h')
559
439
  };
560
440
 
561
- executeClaudeSoulCommand(args);
441
+ executeClaudeSoulCommand(args).catch(error => {
442
+ console.error('Error:', error.message);
443
+ process.exit(1);
444
+ });
562
445
  }