claude-flow-novice 2.0.0 → 2.0.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 (951) hide show
  1. package/.claude/agents/CLAUDE.md +669 -51
  2. package/.claude/agents/agent-principles/CODER_AGENT_GUIDELINES.md +1245 -0
  3. package/.claude/agents/agent-principles/agent-type-guidelines.md +137 -0
  4. package/.claude/agents/agent-principles/format-selection.md +20 -0
  5. package/.claude/agents/agent-principles/prompt-engineering.md +165 -35
  6. package/.claude/agents/agent-principles/quality-metrics.md +83 -2
  7. package/.claude/agents/analysis/code-analyzer.md +722 -0
  8. package/.claude/agents/analysis/code-review/analyze-code-quality.md +33 -3
  9. package/.claude/agents/analysis/perf-analyzer.md +812 -0
  10. package/.claude/agents/architecture/system-architect.md +25 -11
  11. package/.claude/agents/cfn-loop/product-owner.md +458 -2
  12. package/.claude/agents/code-booster.md +13 -2
  13. package/.claude/agents/consensus/byzantine-coordinator.md +259 -6
  14. package/.claude/agents/consensus/consensus-builder.md +135 -2
  15. package/.claude/agents/consensus/crdt-synchronizer.md +307 -771
  16. package/.claude/agents/consensus/gossip-coordinator.md +227 -2
  17. package/.claude/agents/consensus/performance-benchmarker.md +385 -704
  18. package/.claude/agents/consensus/quorum-manager.md +241 -749
  19. package/.claude/agents/consensus/raft-manager.md +195 -2
  20. package/.claude/agents/consensus/security-manager.md +461 -518
  21. package/.claude/agents/core-agents/analyst.md +560 -0
  22. package/.claude/agents/core-agents/architect.md +578 -0
  23. package/.claude/agents/core-agents/base-template-generator.md +137 -0
  24. package/.claude/agents/core-agents/coder.md +409 -0
  25. package/.claude/agents/core-agents/coordinator.md +1429 -0
  26. package/.claude/agents/core-agents/planner.md +343 -0
  27. package/.claude/agents/core-agents/researcher.md +414 -0
  28. package/.claude/agents/core-agents/reviewer.md +652 -0
  29. package/.claude/agents/core-agents/task-coordinator.md +400 -0
  30. package/.claude/agents/core-agents/tester.md +912 -0
  31. package/.claude/agents/development/backend/dev-backend-api.md +418 -23
  32. package/.claude/agents/devops/devops-engineer.md +240 -433
  33. package/.claude/agents/documentation/api-docs/docs-api-openapi.md +350 -11
  34. package/.claude/agents/examples/blocking-coordinator-example.md +388 -0
  35. package/.claude/agents/frontend/interaction-tester.md +334 -17
  36. package/.claude/agents/frontend/react-frontend-engineer.md +255 -2
  37. package/.claude/agents/frontend/state-architect.md +235 -9
  38. package/.claude/agents/frontend/ui-designer.md +261 -132
  39. package/.claude/agents/goal/goal-planner.md +803 -52
  40. package/.claude/agents/planning-team/api-designer-persona.md +736 -0
  41. package/.claude/agents/planning-team/security-architect-persona.md +643 -0
  42. package/.claude/agents/planning-team/system-architect-persona.md +585 -0
  43. package/.claude/agents/product-owner-team/accessibility-advocate-persona.md +796 -0
  44. package/.claude/agents/product-owner-team/cto-agent.md +473 -0
  45. package/.claude/agents/product-owner-team/power-user-persona.md +590 -0
  46. package/.claude/agents/product-owner-team/product-owner-agent.md +806 -0
  47. package/.claude/agents/security/security-specialist.md +515 -13
  48. package/.claude/agents/sparc/architecture.md +237 -1
  49. package/.claude/agents/sparc/pseudocode.md +237 -1
  50. package/.claude/agents/sparc/refinement.md +244 -1
  51. package/.claude/agents/sparc/specification.md +282 -21
  52. package/.claude/agents/specialized/code-booster.md +826 -0
  53. package/.claude/agents/specialized/mobile/mobile-dev.md +560 -0
  54. package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +33 -1
  55. package/.claude/agents/swarm/adaptive-coordinator-enhanced.md +485 -746
  56. package/.claude/agents/swarm/adaptive-coordinator.md +269 -37
  57. package/.claude/agents/swarm/blocking-coordinator-example.md +456 -0
  58. package/.claude/agents/swarm/hierarchical-coordinator.md +324 -60
  59. package/.claude/agents/swarm/mesh-coordinator.md +774 -324
  60. package/.claude/agents/swarm/test-coordinator.md +123 -74
  61. package/.claude/agents/testing/e2e/playwright-agent.md +32 -0
  62. package/.claude/agents/testing/interaction-tester.md +525 -0
  63. package/.claude/agents/testing/playwright-tester.md +405 -0
  64. package/.claude/agents/testing/production-validator.md +644 -0
  65. package/.claude/agents/testing/tdd-london-swarm.md +659 -0
  66. package/.claude/agents/testing/unit/tdd-london-swarm.md +27 -0
  67. package/.claude/agents/testing/validation/production-validator.md +390 -1
  68. package/.claude/agents-ignore/mesh-coordinator-backup.md +435 -0
  69. package/.claude/commands/cfn-loop-document.md +441 -0
  70. package/.claude/commands/github-commit.md +289 -0
  71. package/.claude-flow-novice/.claude/agents/CLAUDE.md +669 -51
  72. package/.claude-flow-novice/.claude/agents/agent-principles/agent-type-guidelines.md +137 -0
  73. package/.claude-flow-novice/.claude/agents/agent-principles/format-selection.md +20 -0
  74. package/.claude-flow-novice/.claude/agents/agent-principles/prompt-engineering.md +165 -35
  75. package/.claude-flow-novice/.claude/agents/agent-principles/quality-metrics.md +83 -2
  76. package/.claude-flow-novice/.claude/agents/analysis/code-analyzer.md +722 -192
  77. package/.claude-flow-novice/.claude/agents/analysis/code-review/analyze-code-quality.md +33 -3
  78. package/.claude-flow-novice/.claude/agents/analysis/perf-analyzer.md +812 -0
  79. package/.claude-flow-novice/.claude/agents/architecture/system-architect.md +25 -11
  80. package/.claude-flow-novice/.claude/agents/cfn-loop/product-owner.md +458 -2
  81. package/.claude-flow-novice/.claude/agents/code-booster.md +13 -2
  82. package/.claude-flow-novice/.claude/agents/consensus/byzantine-coordinator.md +259 -6
  83. package/.claude-flow-novice/.claude/agents/consensus/consensus-builder.md +135 -2
  84. package/.claude-flow-novice/.claude/agents/consensus/crdt-synchronizer.md +307 -771
  85. package/.claude-flow-novice/.claude/agents/consensus/gossip-coordinator.md +227 -2
  86. package/.claude-flow-novice/.claude/agents/consensus/performance-benchmarker.md +385 -704
  87. package/.claude-flow-novice/.claude/agents/consensus/quorum-manager.md +241 -749
  88. package/.claude-flow-novice/.claude/agents/consensus/raft-manager.md +195 -2
  89. package/.claude-flow-novice/.claude/agents/consensus/security-manager.md +461 -518
  90. package/.claude-flow-novice/.claude/agents/core-agents/analyst.md +560 -0
  91. package/.claude-flow-novice/.claude/agents/core-agents/architect.md +578 -0
  92. package/.claude-flow-novice/.claude/agents/core-agents/base-template-generator.md +137 -0
  93. package/.claude-flow-novice/.claude/agents/core-agents/coder.md +409 -0
  94. package/.claude-flow-novice/.claude/agents/core-agents/coordinator.md +1429 -0
  95. package/.claude-flow-novice/.claude/agents/core-agents/planner.md +343 -0
  96. package/.claude-flow-novice/.claude/agents/core-agents/researcher.md +414 -0
  97. package/.claude-flow-novice/.claude/agents/core-agents/reviewer.md +652 -0
  98. package/.claude-flow-novice/.claude/agents/core-agents/task-coordinator.md +400 -0
  99. package/.claude-flow-novice/.claude/agents/core-agents/tester.md +912 -0
  100. package/.claude-flow-novice/.claude/agents/development/backend/dev-backend-api.md +418 -23
  101. package/.claude-flow-novice/.claude/agents/devops/devops-engineer.md +240 -433
  102. package/.claude-flow-novice/.claude/agents/documentation/api-docs/docs-api-openapi.md +350 -11
  103. package/.claude-flow-novice/.claude/agents/examples/blocking-coordinator-example.md +388 -0
  104. package/.claude-flow-novice/.claude/agents/frontend/interaction-tester.md +334 -17
  105. package/.claude-flow-novice/.claude/agents/frontend/react-frontend-engineer.md +255 -2
  106. package/.claude-flow-novice/.claude/agents/frontend/state-architect.md +235 -9
  107. package/.claude-flow-novice/.claude/agents/frontend/ui-designer.md +261 -132
  108. package/.claude-flow-novice/.claude/agents/goal/goal-planner.md +803 -52
  109. package/.claude-flow-novice/.claude/agents/planning-team/api-designer-persona.md +736 -0
  110. package/.claude-flow-novice/.claude/agents/planning-team/security-architect-persona.md +643 -0
  111. package/.claude-flow-novice/.claude/agents/planning-team/system-architect-persona.md +585 -0
  112. package/.claude-flow-novice/.claude/agents/predesign-negotiation/accessibility-advocate-persona.md +796 -0
  113. package/.claude-flow-novice/.claude/agents/predesign-negotiation/cto-agent.md +473 -0
  114. package/.claude-flow-novice/.claude/agents/predesign-negotiation/power-user-persona.md +590 -0
  115. package/.claude-flow-novice/.claude/agents/predesign-negotiation/product-owner-agent.md +806 -0
  116. package/.claude-flow-novice/.claude/agents/product-owner-team/accessibility-advocate-persona.md +796 -0
  117. package/.claude-flow-novice/.claude/agents/product-owner-team/cto-agent.md +473 -0
  118. package/.claude-flow-novice/.claude/agents/product-owner-team/power-user-persona.md +590 -0
  119. package/.claude-flow-novice/.claude/agents/product-owner-team/product-owner-agent.md +806 -0
  120. package/.claude-flow-novice/.claude/agents/security/security-specialist.md +515 -13
  121. package/.claude-flow-novice/.claude/agents/sparc/architecture.md +237 -1
  122. package/.claude-flow-novice/.claude/agents/sparc/pseudocode.md +237 -1
  123. package/.claude-flow-novice/.claude/agents/sparc/refinement.md +244 -1
  124. package/.claude-flow-novice/.claude/agents/sparc/specification.md +282 -21
  125. package/.claude-flow-novice/.claude/agents/specialized/code-booster.md +826 -0
  126. package/.claude-flow-novice/.claude/agents/specialized/mobile/mobile-dev.md +560 -0
  127. package/.claude-flow-novice/.claude/agents/specialized/mobile/spec-mobile-react-native.md +33 -1
  128. package/.claude-flow-novice/.claude/agents/swarm/adaptive-coordinator-enhanced.md +485 -746
  129. package/.claude-flow-novice/.claude/agents/swarm/adaptive-coordinator.md +269 -37
  130. package/.claude-flow-novice/.claude/agents/swarm/blocking-coordinator-example.md +456 -0
  131. package/.claude-flow-novice/.claude/agents/swarm/hierarchical-coordinator.md +324 -60
  132. package/.claude-flow-novice/.claude/agents/swarm/mesh-coordinator.md +774 -324
  133. package/.claude-flow-novice/.claude/agents/swarm/test-coordinator.md +123 -74
  134. package/.claude-flow-novice/.claude/agents/testing/e2e/playwright-agent.md +32 -0
  135. package/.claude-flow-novice/.claude/agents/testing/interaction-tester.md +525 -0
  136. package/.claude-flow-novice/.claude/agents/testing/playwright-tester.md +405 -0
  137. package/.claude-flow-novice/.claude/agents/testing/production-validator.md +644 -0
  138. package/.claude-flow-novice/.claude/agents/testing/tdd-london-swarm.md +659 -0
  139. package/.claude-flow-novice/.claude/agents/testing/unit/tdd-london-swarm.md +27 -0
  140. package/.claude-flow-novice/.claude/agents/testing/validation/production-validator.md +390 -1
  141. package/.claude-flow-novice/config/typescript/tsconfig.tsbuildinfo +1 -1
  142. package/.claude-flow-novice/dist/__tests__/redis/RedisHealthMonitor.test.d.ts +14 -0
  143. package/.claude-flow-novice/dist/agents/heartbeat-manager.d.ts +73 -0
  144. package/.claude-flow-novice/dist/agents/lifecycle-cleanup-enhanced.d.ts +190 -0
  145. package/.claude-flow-novice/dist/cfn-loop/__tests__/agent-lifecycle-sqlite.test.d.ts +17 -0
  146. package/.claude-flow-novice/dist/cfn-loop/__tests__/blocking-coordination-audit.test.d.ts +16 -0
  147. package/.claude-flow-novice/dist/cfn-loop/__tests__/blocking-coordination-signals.test.d.ts +14 -0
  148. package/.claude-flow-novice/dist/cfn-loop/__tests__/byzantine-consensus-adapter.test.d.ts +14 -0
  149. package/.claude-flow-novice/dist/cfn-loop/__tests__/byzantine-performance.test.d.ts +17 -0
  150. package/.claude-flow-novice/dist/cfn-loop/__tests__/cfn-loop-byzantine-integration.test.d.ts +15 -0
  151. package/.claude-flow-novice/dist/cfn-loop/__tests__/cfn-loop-e2e.test.d.ts +15 -0
  152. package/.claude-flow-novice/dist/cfn-loop/__tests__/cfn-loop-memory-manager.test.d.ts +9 -0
  153. package/.claude-flow-novice/dist/cfn-loop/__tests__/cleanup-integration.test.d.ts +21 -0
  154. package/.claude-flow-novice/dist/cfn-loop/__tests__/cleanup-performance-validation.test.d.ts +13 -0
  155. package/.claude-flow-novice/dist/cfn-loop/__tests__/coordinator-timeout-handler.test.d.ts +14 -0
  156. package/.claude-flow-novice/dist/cfn-loop/__tests__/dead-coordinator-detection.test.d.ts +15 -0
  157. package/.claude-flow-novice/dist/cfn-loop/__tests__/doc-code-examples-validator.d.ts +35 -0
  158. package/.claude-flow-novice/dist/cfn-loop/__tests__/doc-executable-examples.test.d.ts +10 -0
  159. package/.claude-flow-novice/dist/cfn-loop/__tests__/extended-timeout-testing.test.d.ts +24 -0
  160. package/.claude-flow-novice/dist/cfn-loop/__tests__/heartbeat-warning-system.test.d.ts +21 -0
  161. package/.claude-flow-novice/dist/cfn-loop/__tests__/redis-health-monitor.test.d.ts +22 -0
  162. package/.claude-flow-novice/dist/cfn-loop/__tests__/signal-ack-protocol.test.d.ts +21 -0
  163. package/.claude-flow-novice/dist/cfn-loop/__tests__/sqlite-memory-manager.test.d.ts +19 -0
  164. package/.claude-flow-novice/dist/cfn-loop/__tests__/test-utilities.d.ts +133 -0
  165. package/.claude-flow-novice/dist/cfn-loop/agent-lifecycle-sqlite.d.ts +143 -0
  166. package/.claude-flow-novice/dist/cfn-loop/blocking-coordination-signals.d.ts +178 -0
  167. package/.claude-flow-novice/dist/cfn-loop/blocking-coordination.d.ts +268 -0
  168. package/.claude-flow-novice/dist/cfn-loop/byzantine-consensus-adapter.d.ts +193 -0
  169. package/.claude-flow-novice/dist/cfn-loop/cfn-loop-memory-manager.d.ts +221 -0
  170. package/.claude-flow-novice/dist/cfn-loop/cfn-loop-orchestrator.d.ts +193 -1
  171. package/.claude-flow-novice/dist/cfn-loop/checkpoint-serializer.d.ts +113 -0
  172. package/.claude-flow-novice/dist/cfn-loop/circuit-breaker.d.ts +8 -2
  173. package/.claude-flow-novice/dist/cfn-loop/conflict-resolver.d.ts +221 -0
  174. package/.claude-flow-novice/dist/cfn-loop/consensus/enterprise-planning-consensus.d.ts +61 -0
  175. package/.claude-flow-novice/dist/cfn-loop/consensus/mvp-consensus.d.ts +33 -0
  176. package/.claude-flow-novice/dist/cfn-loop/coordination-validator.d.ts +121 -0
  177. package/.claude-flow-novice/dist/cfn-loop/coordinator-timeout-handler.d.ts +195 -0
  178. package/.claude-flow-novice/dist/cfn-loop/crash-detector.d.ts +138 -0
  179. package/.claude-flow-novice/dist/cfn-loop/epic-report-generator.d.ts +136 -0
  180. package/.claude-flow-novice/dist/cfn-loop/git-checkpoint-integration.example.d.ts +13 -0
  181. package/.claude-flow-novice/dist/cfn-loop/git-checkpoint-manager.d.ts +165 -0
  182. package/.claude-flow-novice/dist/cfn-loop/heartbeat-integration-example.d.ts +16 -0
  183. package/.claude-flow-novice/dist/cfn-loop/heartbeat-warning-system.d.ts +202 -0
  184. package/.claude-flow-novice/dist/cfn-loop/meta-coordinator.d.ts +208 -0
  185. package/.claude-flow-novice/dist/cfn-loop/modes/__tests__/mode-selection.test.d.ts +9 -0
  186. package/.claude-flow-novice/dist/cfn-loop/modes/enterprise-mode.d.ts +37 -0
  187. package/.claude-flow-novice/dist/cfn-loop/modes/index.d.ts +111 -0
  188. package/.claude-flow-novice/dist/cfn-loop/modes/mvp-mode.d.ts +31 -0
  189. package/.claude-flow-novice/dist/cfn-loop/modes/standard-mode.d.ts +31 -0
  190. package/.claude-flow-novice/dist/cfn-loop/modes/types.d.ts +135 -0
  191. package/.claude-flow-novice/dist/cfn-loop/product-owner/enterprise-owner-team.d.ts +50 -0
  192. package/.claude-flow-novice/dist/cfn-loop/product-owner/mvp-owner.d.ts +31 -0
  193. package/.claude-flow-novice/dist/cfn-loop/recovery-engine.d.ts +183 -0
  194. package/.claude-flow-novice/dist/cfn-loop/redis-health-integration-example.d.ts +13 -0
  195. package/.claude-flow-novice/dist/cfn-loop/redis-health-monitor.d.ts +164 -0
  196. package/.claude-flow-novice/dist/cfn-loop/redis-pubsub-helpers.d.ts +230 -0
  197. package/.claude-flow-novice/dist/cfn-loop/sprint-coordinator-enhanced.d.ts +199 -0
  198. package/.claude-flow-novice/dist/cfn-loop/state-checkpoint-manager.d.ts +198 -0
  199. package/.claude-flow-novice/dist/cfn-loop/test-aggregator.d.ts +205 -0
  200. package/.claude-flow-novice/dist/cfn-loop/test-lock-coordinator.d.ts +176 -0
  201. package/.claude-flow-novice/dist/cfn-loop/test-product-owner-decision.d.ts +19 -0
  202. package/.claude-flow-novice/dist/cfn-loop/types.d.ts +174 -0
  203. package/.claude-flow-novice/dist/cfn-loop/validator-methods-replacement.d.ts +68 -0
  204. package/.claude-flow-novice/dist/cli/cleanup-orphans.d.ts +54 -0
  205. package/.claude-flow-novice/dist/cli/commands/agent-lifecycle.d.ts +226 -0
  206. package/.claude-flow-novice/dist/cli/commands/cfn-loop-parallel.d.ts +21 -0
  207. package/.claude-flow-novice/dist/cli/commands/recovery-resume.d.ts +33 -0
  208. package/.claude-flow-novice/dist/cli/commands/recovery-status.d.ts +57 -0
  209. package/.claude-flow-novice/dist/cli/commands/recovery.d.ts +88 -0
  210. package/.claude-flow-novice/dist/cli/commands/validate-coordination.d.ts +14 -0
  211. package/.claude-flow-novice/dist/cli/node-compat.d.ts +1 -1
  212. package/.claude-flow-novice/dist/cli/simple-commands/hive-mind/queen.d.ts +3 -3
  213. package/.claude-flow-novice/dist/cli/utils/interactive-detector.d.ts +1 -1
  214. package/.claude-flow-novice/dist/cli/utils/redis-client.d.ts +1 -5
  215. package/.claude-flow-novice/dist/consensus/byzantine-coordinator.d.ts +314 -0
  216. package/.claude-flow-novice/dist/constants/agent-types.d.ts +2 -2
  217. package/.claude-flow-novice/dist/coordination/hive-orchestrator.d.ts +1 -1
  218. package/.claude-flow-novice/dist/coordination/validation-schemas.d.ts +12 -12
  219. package/.claude-flow-novice/dist/hooks/index.d.ts +1 -1
  220. package/.claude-flow-novice/dist/hooks/useSwarmRealtimeData.d.ts +11 -11
  221. package/.claude-flow-novice/dist/memory/advanced-memory-manager.d.ts +1 -0
  222. package/.claude-flow-novice/dist/memory/backends/sqlite.d.ts +1 -0
  223. package/.claude-flow-novice/dist/memory/distributed-memory.d.ts +1 -0
  224. package/.claude-flow-novice/dist/memory/secret-detector.d.ts +131 -0
  225. package/.claude-flow-novice/dist/memory/sqlite-enhanced-backend.d.ts +1 -0
  226. package/.claude-flow-novice/dist/monitoring/memory-leak-dashboard-widget.d.ts +194 -0
  227. package/.claude-flow-novice/dist/providers/api-key-rotation-example.d.ts +54 -0
  228. package/.claude-flow-novice/dist/providers/api-key-rotator.d.ts +166 -0
  229. package/.claude-flow-novice/dist/providers/rate-limit-detector.d.ts +60 -0
  230. package/.claude-flow-novice/dist/redis/RedisHealthMonitor.d.ts +162 -0
  231. package/.claude-flow-novice/dist/redis/health-integration-example.d.ts +86 -0
  232. package/.claude-flow-novice/dist/services/swarm-memory-manager.d.ts +1 -0
  233. package/.claude-flow-novice/dist/src/agents/heartbeat-manager.js +144 -0
  234. package/.claude-flow-novice/dist/src/agents/lifecycle-cleanup-enhanced.js +514 -0
  235. package/.claude-flow-novice/dist/src/automation/test-pipeline/PipelineValidator.js +1 -1
  236. package/.claude-flow-novice/dist/src/automation/test-pipeline/SwarmTestCoordinator.js +1 -1
  237. package/.claude-flow-novice/dist/src/cfn-loop/agent-lifecycle-sqlite.js +385 -0
  238. package/.claude-flow-novice/dist/src/cfn-loop/blocking-coordination-signals.js +470 -0
  239. package/.claude-flow-novice/dist/src/cfn-loop/blocking-coordination.js +768 -0
  240. package/.claude-flow-novice/dist/src/cfn-loop/byzantine-consensus-adapter.js +548 -0
  241. package/.claude-flow-novice/dist/src/cfn-loop/cfn-loop-memory-manager.js +589 -0
  242. package/.claude-flow-novice/dist/src/cfn-loop/cfn-loop-orchestrator.js +1059 -21
  243. package/.claude-flow-novice/dist/src/cfn-loop/checkpoint-serializer.js +308 -0
  244. package/.claude-flow-novice/dist/src/cfn-loop/circuit-breaker.js +34 -9
  245. package/.claude-flow-novice/dist/src/cfn-loop/conflict-resolver.js +525 -0
  246. package/.claude-flow-novice/dist/src/cfn-loop/consensus/enterprise-planning-consensus.js +403 -0
  247. package/.claude-flow-novice/dist/src/cfn-loop/consensus/mvp-consensus.js +235 -0
  248. package/.claude-flow-novice/dist/src/cfn-loop/coordination-validator.js +304 -0
  249. package/.claude-flow-novice/dist/src/cfn-loop/coordinator-timeout-handler.js +600 -0
  250. package/.claude-flow-novice/dist/src/cfn-loop/crash-detector.js +362 -0
  251. package/.claude-flow-novice/dist/src/cfn-loop/epic-report-generator.js +283 -0
  252. package/.claude-flow-novice/dist/src/cfn-loop/git-checkpoint-integration.example.js +161 -0
  253. package/.claude-flow-novice/dist/src/cfn-loop/git-checkpoint-manager.js +486 -0
  254. package/.claude-flow-novice/dist/src/cfn-loop/heartbeat-integration-example.js +187 -0
  255. package/.claude-flow-novice/dist/src/cfn-loop/heartbeat-warning-system.js +492 -0
  256. package/.claude-flow-novice/dist/src/cfn-loop/meta-coordinator.js +538 -0
  257. package/.claude-flow-novice/dist/src/cfn-loop/modes/enterprise-mode.js +132 -0
  258. package/.claude-flow-novice/dist/src/cfn-loop/modes/index.js +191 -0
  259. package/.claude-flow-novice/dist/src/cfn-loop/modes/mvp-mode.js +79 -0
  260. package/.claude-flow-novice/dist/src/cfn-loop/modes/standard-mode.js +81 -0
  261. package/.claude-flow-novice/dist/src/cfn-loop/modes/types.js +41 -0
  262. package/.claude-flow-novice/dist/src/cfn-loop/product-owner/enterprise-owner-team.js +380 -0
  263. package/.claude-flow-novice/dist/src/cfn-loop/product-owner/mvp-owner.js +170 -0
  264. package/.claude-flow-novice/dist/src/cfn-loop/recovery-engine.js +546 -0
  265. package/.claude-flow-novice/dist/src/cfn-loop/redis-health-integration-example.js +215 -0
  266. package/.claude-flow-novice/dist/src/cfn-loop/redis-health-monitor.js +414 -0
  267. package/.claude-flow-novice/dist/src/cfn-loop/redis-pubsub-helpers.js +463 -0
  268. package/.claude-flow-novice/dist/src/cfn-loop/sprint-coordinator-enhanced.js +466 -0
  269. package/.claude-flow-novice/dist/src/cfn-loop/state-checkpoint-manager.js +402 -0
  270. package/.claude-flow-novice/dist/src/cfn-loop/test-aggregator.js +476 -0
  271. package/.claude-flow-novice/dist/src/cfn-loop/test-lock-coordinator.js +446 -0
  272. package/.claude-flow-novice/dist/src/cfn-loop/test-product-owner-decision.js +69 -0
  273. package/.claude-flow-novice/dist/src/cfn-loop/types.js +30 -0
  274. package/.claude-flow-novice/dist/src/cfn-loop/validator-methods-replacement.js +362 -0
  275. package/.claude-flow-novice/dist/src/cli/cleanup-orphans.js +246 -0
  276. package/.claude-flow-novice/dist/src/cli/commands/agent-lifecycle.js +1058 -0
  277. package/.claude-flow-novice/dist/src/cli/commands/cfn-loop-parallel.js +436 -0
  278. package/.claude-flow-novice/dist/src/cli/commands/index.js +86 -0
  279. package/.claude-flow-novice/dist/src/cli/commands/parse-epic.js +64 -2
  280. package/.claude-flow-novice/dist/src/cli/commands/recovery-resume.js +369 -0
  281. package/.claude-flow-novice/dist/src/cli/commands/recovery-status.js +265 -0
  282. package/.claude-flow-novice/dist/src/cli/commands/recovery.js +546 -0
  283. package/.claude-flow-novice/dist/src/cli/commands/validate-coordination.js +211 -0
  284. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/CLAUDE-backup-pre-enterprise-loop.md +735 -0
  285. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/CLAUDE.md +176 -326
  286. package/.claude-flow-novice/dist/src/coordination/shared/transparency/transparency-system.js +1 -1
  287. package/.claude-flow-novice/dist/src/memory/advanced-memory-manager.js +17 -2
  288. package/.claude-flow-novice/dist/src/memory/backends/sqlite.js +23 -1
  289. package/.claude-flow-novice/dist/src/memory/distributed-memory.js +18 -3
  290. package/.claude-flow-novice/dist/src/memory/secret-detector.js +253 -0
  291. package/.claude-flow-novice/dist/src/memory/sqlite-enhanced-backend.js +20 -1
  292. package/.claude-flow-novice/dist/src/monitoring/memory-leak-dashboard-widget.js +421 -0
  293. package/.claude-flow-novice/dist/src/observability/prometheus-metrics.d.js +8 -0
  294. package/.claude-flow-novice/dist/src/providers/api-key-rotation-example.js +165 -0
  295. package/.claude-flow-novice/dist/src/providers/api-key-rotator.js +412 -0
  296. package/.claude-flow-novice/dist/src/providers/rate-limit-detector.js +193 -0
  297. package/.claude-flow-novice/dist/src/redis/RedisHealthMonitor.js +429 -0
  298. package/.claude-flow-novice/dist/src/redis/health-integration-example.js +353 -0
  299. package/.claude-flow-novice/dist/src/services/swarm-memory-manager.js +72 -42
  300. package/.claude-flow-novice/dist/src/sqlite/ACLEnforcer.cjs +928 -0
  301. package/.claude-flow-novice/dist/src/sqlite/AgentRegistry.cjs +702 -0
  302. package/.claude-flow-novice/dist/src/sqlite/AgentRegistry.js +702 -0
  303. package/.claude-flow-novice/dist/src/sqlite/EncryptionKeyManager.cjs +754 -0
  304. package/.claude-flow-novice/dist/src/sqlite/EncryptionKeyManager.js +754 -0
  305. package/.claude-flow-novice/dist/src/sqlite/MemoryStoreAdapter.cjs +571 -0
  306. package/.claude-flow-novice/dist/src/sqlite/MemoryStoreAdapter.js +571 -0
  307. package/.claude-flow-novice/dist/src/sqlite/MultiLayerCache.cjs +640 -0
  308. package/.claude-flow-novice/dist/src/sqlite/MultiLayerCache.js +640 -0
  309. package/.claude-flow-novice/dist/src/sqlite/RedisCoordinator.cjs +636 -0
  310. package/.claude-flow-novice/dist/src/sqlite/RedisCoordinator.js +636 -0
  311. package/.claude-flow-novice/dist/src/sqlite/SwarmMemoryManager.cjs +750 -0
  312. package/.claude-flow-novice/dist/src/sqlite/SwarmMemoryManager.js +750 -0
  313. package/.claude-flow-novice/dist/src/sqlite/index.cjs +620 -0
  314. package/.claude-flow-novice/dist/src/sqlite/index.js +620 -0
  315. package/.claude-flow-novice/dist/src/sqlite/performance-benchmarks.cjs +839 -0
  316. package/.claude-flow-novice/dist/src/sqlite/performance-benchmarks.js +839 -0
  317. package/.claude-flow-novice/dist/src/testing/performance/PerformanceTestRunner.js +1 -1
  318. package/.claude-flow-novice/dist/src/wasm-regex-engine/pkg/wasm_regex_engine.d.js +11 -0
  319. package/.claude-flow-novice/dist/src/wasm-regex-engine/pkg/wasm_regex_engine_bg.wasm.d.js +28 -0
  320. package/.claude-flow-novice/dist/web/api/routes/parallel-status.d.ts +105 -0
  321. package/.claude-flow-novice/dist/web/dashboard/hooks/useWebSocket.d.ts +4 -4
  322. package/.claude-flow-novice/tsconfig.tsbuildinfo +1 -1
  323. package/AUTO_SETUP.md +271 -0
  324. package/CLAUDE.md +176 -326
  325. package/README.md +127 -30
  326. package/config/.env.example +17 -0
  327. package/config/cfn-loop/enterprise-criteria.json +207 -0
  328. package/config/cfn-loop/instructions/enterprise-instructions.md +506 -0
  329. package/config/cfn-loop/instructions/mvp-instructions.md +420 -0
  330. package/config/cfn-loop/instructions/standard-instructions.md +497 -0
  331. package/config/cfn-loop/mvp-criteria.json +133 -0
  332. package/config/docker/DEPLOYMENT_VALIDATION_RESULTS.md +1 -1
  333. package/config/docker/QUICK_START.txt +7 -5
  334. package/config/docker/STABILITY_TEST_README.md +10 -10
  335. package/config/hooks/AGENT_TEMPLATE_VALIDATOR_COMPLETION.md +440 -0
  336. package/config/hooks/BLOCKING_COORDINATION_VALIDATOR_IMPLEMENTATION_REPORT.md +559 -0
  337. package/config/hooks/BLOCKING_COORDINATION_VALIDATOR_README.md +467 -0
  338. package/config/hooks/CFN_LOOP_MEMORY_VALIDATOR_IMPLEMENTATION.md +343 -0
  339. package/config/hooks/COVERAGE_VALIDATOR_QUICK_START.md +218 -0
  340. package/config/hooks/POST_TEST_COVERAGE_README.md +657 -0
  341. package/config/hooks/README-AGENT-TEMPLATE-VALIDATOR.md +464 -0
  342. package/config/hooks/README-CFN-LOOP-MEMORY-VALIDATOR.md +442 -0
  343. package/config/hooks/TEST_COVERAGE_VALIDATOR_COMPLETION.md +497 -0
  344. package/config/hooks/WASM_REGEX_ENGINE.md +210 -0
  345. package/config/hooks/coverage.config.json +40 -0
  346. package/config/hooks/hook-manager.cjs +47 -0
  347. package/config/hooks/markdown-validator.js +202 -0
  348. package/config/hooks/post-edit-agent-template.js +607 -0
  349. package/config/hooks/post-edit-blocking-coordination.js +748 -0
  350. package/config/hooks/post-edit-cfn-loop-memory.cjs +503 -0
  351. package/config/hooks/post-edit-pipeline.js +290 -145
  352. package/config/hooks/post-test-coverage.js +981 -0
  353. package/config/hooks/pre-commit-db-scan +119 -0
  354. package/config/hooks/pre-edit-security.js +33 -6
  355. package/config/hooks/pre-tool-validation.js +60 -1
  356. package/config/hooks/safety-validator.js +236 -21
  357. package/config/hooks/safety-validator.js.backup +1323 -0
  358. package/config/hooks/validators/CWEValidator.js +152 -0
  359. package/config/hooks/validators/ComplianceValidator.js +187 -0
  360. package/config/hooks/validators/DependencyScanner.js +162 -0
  361. package/config/hooks/validators/InputSanitizer.js +134 -0
  362. package/config/hooks/validators/OWASPValidator.js +197 -0
  363. package/config/hooks/validators/SecurityPatternScanner.js +318 -0
  364. package/config/jest/jest.config.js +12 -1
  365. package/docs/PRE_COMMIT_HOOK.md +294 -0
  366. package/docs/README.md +130 -153
  367. package/docs/TEST_INFRASTRUCTURE.md +381 -0
  368. package/docs/agent-lifecycle-hooks.md +860 -0
  369. package/docs/api/FUNCTION_CATALOG.md +584 -0
  370. package/docs/api/ROUTING_QUICK_REFERENCE.md +117 -0
  371. package/docs/api/VALIDATION_QUICK_REFERENCE.md +172 -0
  372. package/docs/api/blocking-coordination-api.md +1451 -0
  373. package/docs/architecture/MULTI_SWARM_COORDINATION_README.md +620 -0
  374. package/docs/architecture/README_REALTIME_COMMUNICATION.md +463 -0
  375. package/docs/architecture/REALTIME_COMMUNICATION_ANALYSIS.md +321 -0
  376. package/docs/architecture/WASM_ARCHITECTURE_SUMMARY.md +429 -0
  377. package/docs/architecture/WASM_INTEGRATION_ARCHITECTURE.md +1330 -0
  378. package/docs/archive/2025-10-10-architecture/deprecated-implementations/BLOCKING_COORDINATION_VALIDATION_FINAL.md +334 -0
  379. package/docs/archive/2025-10-10-architecture/deprecated-implementations/blocking-coordination-pattern.md +484 -0
  380. package/docs/archive/2025-10-10-architecture/deprecated-implementations/production-blocking-coordination-plan.md +764 -0
  381. package/docs/archive/2025-10-10-architecture/deprecated-implementations/revised-production-blocking-plan.md +614 -0
  382. package/docs/archive/2025-10-10-architecture/implementation-guides/WASM_IMPLEMENTATION_GUIDE.md +1011 -0
  383. package/docs/archive/2025-10-10-architecture/implementation-guides/WASM_ROLLOUT_PLAN.md +701 -0
  384. package/docs/archive/2025-10-10-architecture/implementation-guides/agent-lifecycle-implementation-plan.md +1428 -0
  385. package/docs/archive/2025-10-10-architecture/other-designs/CORRECTED-task-tool-constraints.md +366 -0
  386. package/docs/archive/2025-10-10-architecture/other-designs/claude-code-task-tool-constraints.md +401 -0
  387. package/docs/archive/2025-10-10-architecture/other-designs/cleanup-architecture-explanation.md +423 -0
  388. package/docs/archive/2025-10-10-guides/setup-guides/CONTRIBUTING.md +136 -0
  389. package/docs/archive/2025-10-10-guides/setup-guides/DEVELOPMENT_SETUP.md +486 -0
  390. package/docs/archive/2025-10-10-guides/setup-guides/EXAMPLES.md +793 -0
  391. package/docs/archive/2025-10-10-guides/setup-guides/INSTALLATION.md +608 -0
  392. package/docs/archive/2025-10-10-guides/setup-guides/QUICK_START_INSTALLATION.md +521 -0
  393. package/docs/archive/2025-10-10-guides/setup-guides/README.md +162 -0
  394. package/docs/archive/2025-10-10-guides/setup-guides/TROUBLESHOOTING.md +1388 -0
  395. package/docs/archive/2025-10-10-operations/ARCHIVE_MIGRATION_PLAN.md +214 -0
  396. package/docs/archive/2025-10-10-performance/wasm-deliverables/WASM_DELIVERABLES.md +421 -0
  397. package/docs/archive/ARCHIVAL_EXECUTION_REPORT_2025-10-10.md +219 -0
  398. package/docs/archive/HTTP_POLLING_FALLBACK.md +283 -0
  399. package/docs/archive/reference-historical/BACKUP_MANIFEST.md +32 -0
  400. package/docs/archive/reference-historical/README-PHASE4.md +355 -0
  401. package/docs/archive/reference-historical/READMEv2.md +524 -0
  402. package/docs/deployment/blocking-coordination-secrets.md +1445 -0
  403. package/docs/implementation/SQLITE_INTEGRATION_IMPLEMENTATION.md +663 -0
  404. package/docs/integration/cfn-loop-examples.md +1107 -0
  405. package/docs/observability/prometheus-setup.md +455 -0
  406. package/docs/operations/OPERATIONS_FOLDER_REVIEW_REPORT.json +135 -0
  407. package/docs/operations/failure-recovery-playbook.md +877 -0
  408. package/docs/operations/monitoring-runbook.md +880 -0
  409. package/docs/patterns/blocking-coordination-pattern.md +642 -0
  410. package/docs/reference/CHANGELOG-POST-EDIT-PIPELINE.md +370 -0
  411. package/docs/reference/MANUAL_NPM_PUBLICATION_GUIDE.md +248 -0
  412. package/docs/security/SEC-002-race-condition-fix.md +300 -0
  413. package/docs/security/SEC-003-JSON-VALIDATION.md +215 -0
  414. package/docs/testing/chaos-engineering.md +524 -0
  415. package/docs/training/best-practices.md +1241 -0
  416. package/docs/training/faq.md +1483 -0
  417. package/docs/training/interactive-tutorial.md +966 -0
  418. package/docs/training/troubleshooting-guide.md +1279 -0
  419. package/docs/training/video-walkthrough-script.md +675 -0
  420. package/examples/demonstrations/phase5-demonstration.cjs +227 -0
  421. package/examples/rest-api-simple/sparc-implementation-roadmap.md +1 -1
  422. package/examples/rest-api-simple/sparc-implementation-roadmap.md.backup-1760135091708 +190 -0
  423. package/examples/templates/basic-swarm/CLAUDE.md +464 -0
  424. package/examples/templates/custom-agent/CLAUDE.md +299 -0
  425. package/examples/templates/custom-agent/package.json +26 -0
  426. package/examples/templates/event-bus/package.json +28 -0
  427. package/examples/templates/fleet-manager/CLAUDE.md +134 -0
  428. package/examples/templates/fleet-manager/package.json +28 -0
  429. package/package.json +60 -18
  430. package/readme/additional-commands.md +365 -2
  431. package/readme/cfn-loop-modes.md +527 -0
  432. package/readme/logs-cli-redis.md +82 -14
  433. package/readme/logs-documentation-index.md +8 -0
  434. package/readme/logs-features.md +188 -24
  435. package/readme/logs-slash-commands.md +35 -11
  436. package/scripts/CLEANUP_OPTIMIZATION_REPORT.json +312 -0
  437. package/scripts/CLEANUP_PERFORMANCE_OPTIMIZATION.md +387 -0
  438. package/scripts/CLEANUP_QUICK_START.md +268 -0
  439. package/scripts/CLEANUP_TEST_RESULTS.md +205 -0
  440. package/scripts/auto-setup.js +332 -0
  441. package/scripts/cleanup-blocking-coordination.sh +420 -0
  442. package/scripts/collect-build-metrics.js +65 -0
  443. package/scripts/demo/README.md +79 -0
  444. package/scripts/demo/autoscaling-demo-simplified.js +963 -0
  445. package/scripts/demo/comprehensive-dashboard-test.js +693 -0
  446. package/scripts/demo/confidence-log.js +87 -0
  447. package/scripts/demo/confidence-report.js +82 -0
  448. package/scripts/demo/demo-multi-swarm-coordination.js +325 -0
  449. package/scripts/demo/demo-production-deployment.js +399 -0
  450. package/scripts/demo/demo-visualization-system.js +149 -0
  451. package/scripts/demo/performance-analysis.cjs +71 -0
  452. package/scripts/demo/performance-analysis.js +71 -0
  453. package/scripts/demo/test-autoscaling-demo.js +314 -0
  454. package/scripts/dev/demo-phase3-compliance.js +2 -2
  455. package/scripts/ecosystem.config.cjs +90 -0
  456. package/scripts/hook-wrapper.sh +54 -0
  457. package/scripts/install-pre-commit-hook.sh +127 -0
  458. package/scripts/legacy/performance-test-runner.js +7 -7
  459. package/scripts/migration/QUICK-START.md +189 -0
  460. package/scripts/migration/QUICK-START.md.backup-1760135091363 +189 -0
  461. package/scripts/migration/README.md +30 -0
  462. package/scripts/migration/TASK-1.3.2-COMPLETION-REPORT.md +500 -0
  463. package/scripts/migration/TASK-1.3.2-COMPLETION-REPORT.md.backup-1760135091348 +500 -0
  464. package/scripts/migration/UPDATE-PATHS-README.md +464 -0
  465. package/scripts/migration/UPDATE-PATHS-README.md.backup-1760135091337 +464 -0
  466. package/scripts/migration/example-patterns.json +19 -0
  467. package/scripts/migration/reorganize-workspace.js +504 -0
  468. package/scripts/migration/test-update-paths.js +359 -0
  469. package/scripts/migration/update-paths.js +664 -0
  470. package/scripts/migration/validate-migration.js +647 -0
  471. package/scripts/monitoring/README.md +6 -6
  472. package/scripts/monitoring/analyze-resources.sh +1 -1
  473. package/scripts/monitoring/dynamic-monitor.sh +4 -4
  474. package/scripts/monitoring/test-monitor-quick.sh +1 -1
  475. package/scripts/performance-test-runner.js +7 -7
  476. package/scripts/redis-lua/cleanup-blocking-coordination.lua +198 -0
  477. package/scripts/sync-agents.js +290 -0
  478. package/scripts/test/NEW_STABILITY_TEST_GUIDE.md +13 -8
  479. package/scripts/test/quick-multilingual-demo.js +2 -2
  480. package/scripts/test-cleanup-performance.sh +416 -0
  481. package/scripts/test-runner.cjs +154 -0
  482. package/scripts/validate-agent-hooks.js +506 -0
  483. package/scripts/validation/README.md +33 -0
  484. package/scripts/validation/acl-security-validation.cjs +214 -0
  485. package/scripts/validation/acl-security-validation.js +402 -0
  486. package/scripts/validation/byzantine-verification.js +407 -0
  487. package/scripts/validation/final-phase-2-consensus.cjs +219 -0
  488. package/scripts/validation/final-security-validation.js +791 -0
  489. package/scripts/validation/final-wasm-validation.cjs +840 -0
  490. package/scripts/validation/integration-test-analysis.js +105 -0
  491. package/scripts/validation/phase-0-comprehensive-validation.js +474 -0
  492. package/scripts/validation/phase-0-consensus-report.js +139 -0
  493. package/scripts/validation/phase-0-final-report.js +112 -0
  494. package/scripts/validation/phase-0-redis-consensus-report.js +129 -0
  495. package/scripts/validation/phase-0-validation-improved.js +490 -0
  496. package/scripts/validation/phase-0-validation-test.js +65 -0
  497. package/scripts/validation/phase-1-consensus-report.cjs +342 -0
  498. package/scripts/validation/phase-1-consensus-validation.cjs +551 -0
  499. package/scripts/validation/phase-1-consensus-validation.js +551 -0
  500. package/scripts/validation/phase-2-consensus-report.cjs +186 -0
  501. package/scripts/validation/phase-2-validation.cjs +171 -0
  502. package/scripts/validation/phase-2-validation.js +171 -0
  503. package/scripts/validation/phase-4-consensus-report.js +181 -0
  504. package/scripts/validation/phase-4-final-validation.js +351 -0
  505. package/scripts/validation/phase-5-consensus-report.cjs +113 -0
  506. package/scripts/validation/phase-5-consensus-report.js +113 -0
  507. package/scripts/validation/security-analysis.js +49 -0
  508. package/scripts/validation/security-validation.js +492 -0
  509. package/scripts/validation/simple-security-validation.js +464 -0
  510. package/scripts/verify-installation.js +44 -14
  511. package/src/cli/simple-commands/init/templates/CLAUDE-backup-pre-enterprise-loop.md +735 -0
  512. package/src/cli/simple-commands/init/templates/CLAUDE.md +176 -326
  513. package/src/observability/blocking-coordination-metrics.js +161 -0
  514. package/src/observability/prometheus-metrics.d.ts +21 -0
  515. package/src/observability/prometheus-metrics.js +280 -0
  516. package/wiki/tutorials/beginner/04-quality-testing.md +3 -3
  517. package/.claude/agents/analyst.md +0 -300
  518. package/.claude/agents/architect.md +0 -558
  519. package/.claude/agents/base-template-generator.md +0 -65
  520. package/.claude/agents/coder.md +0 -181
  521. package/.claude/agents/planner.md +0 -135
  522. package/.claude/agents/researcher.md +0 -185
  523. package/.claude/agents/reviewer.md +0 -293
  524. package/.claude/agents/task-coordinator.md +0 -126
  525. package/.claude/agents/tester.md +0 -664
  526. package/MCP_DEPRECATION_COMPLETE.md +0 -375
  527. package/V2.0.0_READY_FOR_PUBLICATION.md +0 -417
  528. package/V2_RELEASE_SUMMARY.md +0 -568
  529. package/docs/DEPLOYMENT.md +0 -523
  530. package/docs/TROUBLESHOOTING.md +0 -1388
  531. package/docs/agent-token-analysis-results.json +0 -1329
  532. package/docs/architecture/agent-lifecycle-implementation-plan.md +0 -1428
  533. package/templates/custom-agent/package.json +0 -26
  534. package/templates/event-bus/package.json +0 -28
  535. package/templates/fleet-manager/package.json +0 -28
  536. /package/.claude/{agents → agents-ignore}/benchmarking-tests/test-agent-code-heavy.md +0 -0
  537. /package/.claude/{agents → agents-ignore}/benchmarking-tests/test-agent-metadata.md +0 -0
  538. /package/.claude/{agents → agents-ignore}/benchmarking-tests/test-agent-minimal.md +0 -0
  539. /package/.claude/{agents/coordinator.md → agents-ignore/coordinator-backup.md} +0 -0
  540. /package/.claude/{agents → agents-ignore}/data/ml/data-ml-model.md +0 -0
  541. /package/.claude/{agents → agents-ignore}/github/code-review-swarm.md +0 -0
  542. /package/.claude/{agents → agents-ignore}/github/github-modes.md +0 -0
  543. /package/.claude/{agents/templates → agents-ignore/github}/github-pr-manager.md +0 -0
  544. /package/.claude/{agents → agents-ignore}/github/github-specialist.md +0 -0
  545. /package/.claude/{agents → agents-ignore}/github/issue-tracker.md +0 -0
  546. /package/.claude/{agents → agents-ignore}/github/multi-repo-swarm.md +0 -0
  547. /package/.claude/{agents/devops/ci-cd → agents-ignore/github}/ops-cicd-github.md +0 -0
  548. /package/.claude/{agents → agents-ignore}/github/pr-manager.md +0 -0
  549. /package/.claude/{agents → agents-ignore}/github/project-board-sync.md +0 -0
  550. /package/.claude/{agents → agents-ignore}/github/release-manager.md +0 -0
  551. /package/.claude/{agents → agents-ignore}/github/release-swarm.md +0 -0
  552. /package/.claude/{agents → agents-ignore}/github/repo-architect.md +0 -0
  553. /package/.claude/{agents → agents-ignore}/github/swarm-issue.md +0 -0
  554. /package/.claude/{agents → agents-ignore}/github/swarm-pr.md +0 -0
  555. /package/.claude/{agents → agents-ignore}/github/sync-coordinator.md +0 -0
  556. /package/.claude/{agents → agents-ignore}/github/workflow-automation.md +0 -0
  557. /package/.claude/{agents → agents-ignore}/neural/neural-pattern-agent.md +0 -0
  558. /package/.claude/{agents → agents-ignore}/neural/safla-neural.md +0 -0
  559. /package/.claude/{agents → agents-ignore}/optimization/benchmark-suite.md +0 -0
  560. /package/.claude/{agents → agents-ignore}/optimization/load-balancer.md +0 -0
  561. /package/.claude/{agents → agents-ignore}/optimization/perf-analyzer.md +0 -0
  562. /package/.claude/{agents → agents-ignore}/optimization/performance-monitor.md +0 -0
  563. /package/.claude/{agents → agents-ignore}/optimization/resource-allocator.md +0 -0
  564. /package/.claude/{agents → agents-ignore}/optimization/topology-optimizer.md +0 -0
  565. /package/.claude/{agents → agents-ignore}/sublinear/consciousness-evolution-agent.md +0 -0
  566. /package/.claude/{agents → agents-ignore}/sublinear/matrix-solver-agent.md +0 -0
  567. /package/.claude/{agents → agents-ignore}/sublinear/nanosecond-scheduler-agent.md +0 -0
  568. /package/.claude/{agents → agents-ignore}/sublinear/pagerank-agent.md +0 -0
  569. /package/.claude/{agents → agents-ignore}/sublinear/phi-calculator-agent.md +0 -0
  570. /package/.claude/{agents → agents-ignore}/sublinear/psycho-symbolic-agent.md +0 -0
  571. /package/.claude/{agents → agents-ignore}/sublinear/sublinear.md +0 -0
  572. /package/.claude/{agents → agents-ignore}/sublinear/temporal-advantage-agent.md +0 -0
  573. /package/.claude/{agents/architecture → agents-ignore}/system-design/arch-system-design.md +0 -0
  574. /package/.claude/{agents → agents-ignore}/templates/automation-smart-agent.md +0 -0
  575. /package/.claude/{agents → agents-ignore}/templates/coordinator-swarm-init.md +0 -0
  576. /package/.claude/{agents → agents-ignore}/templates/implementer-sparc-coder.md +0 -0
  577. /package/.claude/{agents → agents-ignore}/templates/memory-coordinator.md +0 -0
  578. /package/.claude/{agents → agents-ignore}/templates/migration-plan.md +0 -0
  579. /package/.claude/{agents → agents-ignore}/templates/orchestrator-task.md +0 -0
  580. /package/.claude/{agents → agents-ignore}/templates/performance-analyzer.md +0 -0
  581. /package/.claude/{agents → agents-ignore}/templates/sparc-coordinator.md +0 -0
  582. /package/{.claude/agents/specialized → .claude-flow-novice/.claude/agents/agent-principles}/CODER_AGENT_GUIDELINES.md +0 -0
  583. /package/docs/{API.md → api/API.md} +0 -0
  584. /package/docs/{CONFIGURATION.md → api/CONFIGURATION.md} +0 -0
  585. /package/docs/{PROVIDER_ROUTING_CONFIGURATION.md → api/PROVIDER_ROUTING_CONFIGURATION.md} +0 -0
  586. /package/docs/{PROVIDER_ROUTING_VERIFICATION.md → api/PROVIDER_ROUTING_VERIFICATION.md} +0 -0
  587. /package/docs/{ROUTING_FLOW_DIAGRAM.md → api/ROUTING_FLOW_DIAGRAM.md} +0 -0
  588. /package/{AGENT_PERFORMANCE_GUIDELINES.md → docs/architecture/AGENT_PERFORMANCE_GUIDELINES.md} +0 -0
  589. /package/docs/{EVENTEMITTER_CLEANUP_PATTERN.md → architecture/EVENTEMITTER_CLEANUP_PATTERN.md} +0 -0
  590. /package/docs/{REDIS_COORDINATION_SYSTEM.md → architecture/REDIS_COORDINATION_SYSTEM.md} +0 -0
  591. /package/docs/{SYSTEM_ARCHITECTURE.md → architecture/SYSTEM_ARCHITECTURE.md} +0 -0
  592. /package/docs/{consensus → architecture/consensus}/QUORUM_VERIFICATION_GUIDE.md +0 -0
  593. /package/docs/{consensus → architecture/consensus}/README.md +0 -0
  594. /package/docs/{consensus → architecture/consensus}/consensus-verification-1758747665635.json +0 -0
  595. /package/docs/{agents → archive/2025-10-10-architecture/agent-subdirectory}/MIGRATION_SUMMARY.md +0 -0
  596. /package/docs/{agents → archive/2025-10-10-architecture/agent-subdirectory}/README.md +0 -0
  597. /package/docs/{agent-booster-architecture.md → archive/2025-10-10-architecture/agent-subdirectory/agent-booster-architecture.md} +0 -0
  598. /package/docs/{agent-prompt-guidelines.md → archive/2025-10-10-architecture/agent-subdirectory/agent-prompt-guidelines.md} +0 -0
  599. /package/docs/{agent-token-usage-analysis-report.md → archive/2025-10-10-architecture/agent-subdirectory/agent-token-usage-analysis-report.md} +0 -0
  600. /package/docs/{agents → archive/2025-10-10-architecture/agent-subdirectory}/consensus-README.md +0 -0
  601. /package/docs/{agents → archive/2025-10-10-architecture/agent-subdirectory}/dependency-tracking-examples.md +0 -0
  602. /package/docs/{agents → archive/2025-10-10-architecture/agent-subdirectory}/optimization-README.md +0 -0
  603. /package/docs/{agents → archive/2025-10-10-architecture/agent-subdirectory}/swarm-README.md +0 -0
  604. /package/docs/{consensus → archive/2025-10-10-architecture/consensus-rounds}/CONSENSUS-COMPARISON.md +0 -0
  605. /package/docs/{consensus → archive/2025-10-10-architecture/consensus-rounds}/ROUND-5-EXECUTIVE-SUMMARY.md +0 -0
  606. /package/docs/{consensus → archive/2025-10-10-architecture/consensus-rounds}/consolidated-consensus-report.md +0 -0
  607. /package/docs/{consensus → archive/2025-10-10-architecture/consensus-rounds}/fullstack-consensus-round-2.md +0 -0
  608. /package/docs/{consensus → archive/2025-10-10-architecture/consensus-rounds}/fullstack-round-3-consensus-summary.md +0 -0
  609. /package/docs/{consensus → archive/2025-10-10-architecture/consensus-rounds}/fullstack-round-3-validator-1.md +0 -0
  610. /package/docs/{consensus → archive/2025-10-10-architecture/consensus-rounds}/fullstack-round-3-validator-2.md +0 -0
  611. /package/docs/{consensus → archive/2025-10-10-architecture/consensus-rounds}/fullstack-round-3-validator-3.md +0 -0
  612. /package/docs/{consensus → archive/2025-10-10-architecture/consensus-rounds}/fullstack-round-3-validator-4.md +0 -0
  613. /package/docs/{consensus → archive/2025-10-10-architecture/consensus-rounds}/fullstack-round-4-consensus-summary.md +0 -0
  614. /package/docs/{consensus → archive/2025-10-10-architecture/consensus-rounds}/fullstack-round-4-validator-1.md +0 -0
  615. /package/docs/{consensus → archive/2025-10-10-architecture/consensus-rounds}/fullstack-round-4-validator-2.md +0 -0
  616. /package/docs/{consensus → archive/2025-10-10-architecture/consensus-rounds}/fullstack-round-4-validator-3.md +0 -0
  617. /package/docs/{consensus → archive/2025-10-10-architecture/consensus-rounds}/fullstack-round-4-validator-4.md +0 -0
  618. /package/docs/{consensus → archive/2025-10-10-architecture/consensus-rounds}/fullstack-round-5-final-consensus.md +0 -0
  619. /package/docs/{consensus → archive/2025-10-10-architecture/consensus-rounds}/fullstack-swarm-consensus-report.md +0 -0
  620. /package/docs/{consensus → archive/2025-10-10-architecture/consensus-rounds}/post-edit-consensus-round-2.md +0 -0
  621. /package/docs/{consensus → archive/2025-10-10-architecture/consensus-rounds}/raft-implementation-summary.md +0 -0
  622. /package/docs/{consensus → archive/2025-10-10-architecture/consensus-rounds}/verification-summary.md +0 -0
  623. /package/docs/{comprehensive-mcp-solution-architecture.md → archive/2025-10-10-architecture/deprecated-implementations/comprehensive-mcp-solution-architecture.md} +0 -0
  624. /package/docs/{architecture → archive/2025-10-10-architecture}/experimental/ExperimentalFeaturesArchitecture.md +0 -0
  625. /package/docs/{architecture → archive/2025-10-10-architecture/frontend-specific}/frontend-agent-ecosystem-integration.md +0 -0
  626. /package/docs/{architecture → archive/2025-10-10-architecture/frontend-specific}/frontend-agent-technical-decisions.md +0 -0
  627. /package/docs/{architecture → archive/2025-10-10-architecture/frontend-specific}/frontend-backend-coordination-interfaces.md +0 -0
  628. /package/docs/{architecture → archive/2025-10-10-architecture/frontend-specific}/react-frontend-agent-specification.md +0 -0
  629. /package/docs/{architecture → archive/2025-10-10-architecture/github-specific}/github-agent-consolidation-architecture.md +0 -0
  630. /package/docs/{architecture → archive/2025-10-10-architecture/github-specific}/github-architecture-diagrams.md +0 -0
  631. /package/docs/{architecture → archive/2025-10-10-architecture/implementation-guides}/agent-lifecycle-implementation-guide.md +0 -0
  632. /package/docs/{architecture → archive/2025-10-10-architecture/implementation-guides}/implementation-guide.md +0 -0
  633. /package/docs/{architecture → archive/2025-10-10-architecture/implementation-guides}/implementation-specifications.md +0 -0
  634. /package/docs/{architecture → archive/2025-10-10-architecture/implementation-guides}/integration-guide.md +0 -0
  635. /package/docs/{architecture → archive/2025-10-10-architecture/implementation-guides}/performance-optimization-guide.md +0 -0
  636. /package/docs/{architecture → archive/2025-10-10-architecture/old-summaries}/architecture-summary-report.md +0 -0
  637. /package/docs/{architecture → archive/2025-10-10-architecture/old-summaries}/fullstack-swarm-implementation-summary.md +0 -0
  638. /package/docs/{architecture → archive/2025-10-10-architecture/old-summaries}/ultra-fast-communication-summary.md +0 -0
  639. /package/docs/{architecture → archive/2025-10-10-architecture/other-designs}/agent-discovery-registration-system.md +0 -0
  640. /package/docs/{architecture → archive/2025-10-10-architecture/other-designs}/agent-lifecycle-management-architecture.md +0 -0
  641. /package/docs/{architecture → archive/2025-10-10-architecture/other-designs}/architectural-decisions.md +0 -0
  642. /package/docs/{architecture → archive/2025-10-10-architecture/other-designs}/architecture-decision-records.md +0 -0
  643. /package/docs/{claude-soul-implementation.md → archive/2025-10-10-architecture/other-designs/claude-soul-implementation.md} +0 -0
  644. /package/docs/{architecture → archive/2025-10-10-architecture/other-designs}/file-based-cross-team-communication.md +0 -0
  645. /package/docs/{architecture → archive/2025-10-10-architecture/other-designs}/full-stack-swarm-team-specification.md +0 -0
  646. /package/docs/{architecture → archive/2025-10-10-architecture/other-designs}/fullstack-communication-integration.md +0 -0
  647. /package/docs/{architecture → archive/2025-10-10-architecture/other-designs}/stage3-unified-system-architecture.md +0 -0
  648. /package/docs/{architecture → archive/2025-10-10-architecture/other-designs}/ultra-fast-communication-bus-design.md +0 -0
  649. /package/docs/{architecture → archive/2025-10-10-architecture/other-designs}/zero-latency-communication-architecture.md +0 -0
  650. /package/docs/{architecture → archive/2025-10-10-architecture/specific-feature-specs}/dynamic-agent-spawning-architecture.md +0 -0
  651. /package/docs/{fleet-manager-design.md → archive/2025-10-10-architecture/specific-feature-specs/fleet-manager-design.md} +0 -0
  652. /package/docs/{architecture → archive/2025-10-10-architecture/specific-feature-specs}/fleet-manager-npm-architecture.md +0 -0
  653. /package/docs/{help-coordinator-implementation.md → archive/2025-10-10-architecture/specific-feature-specs/help-coordinator-implementation.md} +0 -0
  654. /package/docs/{architecture → archive/2025-10-10-architecture/specific-feature-specs}/high-performance-memory-store.md +0 -0
  655. /package/docs/{architecture → archive/2025-10-10-architecture/specific-feature-specs}/intelligent-configuration-system.md +0 -0
  656. /package/docs/{architecture → archive/2025-10-10-architecture/specific-feature-specs}/message-serialization-compression-strategy.md +0 -0
  657. /package/docs/{architecture → archive/2025-10-10-architecture/specific-feature-specs}/priority-queue-dead-letter-design.md +0 -0
  658. /package/docs/{architecture → archive/2025-10-10-architecture/specific-feature-specs}/swarm-message-router-extension-design.md +0 -0
  659. /package/docs/{architecture → archive/2025-10-10-architecture/specific-feature-specs}/swarm-router-implementation-spec.md +0 -0
  660. /package/docs/{architecture → archive/2025-10-10-architecture/specific-feature-specs}/user-preference-storage-design.md +0 -0
  661. /package/docs/{architecture → archive/2025-10-10-architecture/specific-feature-specs}/websocket-connection-scaling-design.md +0 -0
  662. /package/docs/{swarm-coordination-test-results.md → archive/2025-10-10-architecture/test-results/swarm-coordination-test-results.md} +0 -0
  663. /package/docs/{development → archive/2025-10-10-development}/COMPREHENSIVE_WORKFLOW_SYSTEM.md +0 -0
  664. /package/docs/{development → archive/2025-10-10-development}/DEVELOPMENT_WORKFLOW.md +0 -0
  665. /package/docs/{EXAMPLES.md → archive/2025-10-10-development/EXAMPLES.md} +0 -0
  666. /package/docs/{development → archive/2025-10-10-development}/SPARC.md +0 -0
  667. /package/docs/{development → archive/2025-10-10-development}/agent-scope-creep-prevention-guide.md +0 -0
  668. /package/docs/{development → archive/2025-10-10-development}/cargo-build-validator-summary.md +0 -0
  669. /package/docs/{development → archive/2025-10-10-development/cli-consolidation}/command-consolidation-technical-spec.md +0 -0
  670. /package/docs/{development → archive/2025-10-10-development/cli-consolidation}/consolidated-cli-implementation.md +0 -0
  671. /package/docs/{development → archive/2025-10-10-development/cli-consolidation}/consolidated-command-design.md +0 -0
  672. /package/docs/{development → archive/2025-10-10-development}/experimental-features-improvement-plan.md +0 -0
  673. /package/docs/{development → archive/2025-10-10-development}/feature-simplification-strategy.md +0 -0
  674. /package/docs/{fixes → archive/2025-10-10-development/fixes}/fullstack-swarm-fixes-round-1.md +0 -0
  675. /package/docs/{fixes → archive/2025-10-10-development/fixes}/fullstack-swarm-fixes-round-3.md +0 -0
  676. /package/docs/{fixes → archive/2025-10-10-development/fixes}/fullstack-swarm-fixes-round-4.md +0 -0
  677. /package/docs/{fixes → archive/2025-10-10-development/fixes}/fullstack-swarm-fixes-round-5.md +0 -0
  678. /package/docs/{fixes → archive/2025-10-10-development/fixes}/round-5-quick-reference.md +0 -0
  679. /package/docs/{fixes → archive/2025-10-10-development/fixes}/round-5-summary.md +0 -0
  680. /package/docs/{fixes → archive/2025-10-10-development/fixes}/round-5-visual-summary.md +0 -0
  681. /package/docs/{implementation → archive/2025-10-10-development/implementation}/configuration-system-specs.md +0 -0
  682. /package/docs/{development → archive/2025-10-10-development}/npm-packaging-solution.md +0 -0
  683. /package/docs/{development → archive/2025-10-10-development}/pair-optimization.md +0 -0
  684. /package/docs/{phase11-cli-integration-complete.md → archive/2025-10-10-development/phase-summaries/phase11-cli-integration-complete.md} +0 -0
  685. /package/docs/{phase4-deployment-summary.md → archive/2025-10-10-development/phase-summaries/phase4-deployment-summary.md} +0 -0
  686. /package/docs/{development → archive/2025-10-10-development}/rust-framework-detection.md +0 -0
  687. /package/docs/{SDK-INTEGRATION-TEST-SUMMARY.md → archive/2025-10-10-development/sdk-integration/SDK-INTEGRATION-TEST-SUMMARY.md} +0 -0
  688. /package/docs/{SDK-TESTING.md → archive/2025-10-10-development/sdk-integration/SDK-TESTING.md} +0 -0
  689. /package/docs/{claude-agent-sdk-integration-strategy.md → archive/2025-10-10-development/sdk-integration/claude-agent-sdk-integration-strategy.md} +0 -0
  690. /package/docs/{sdk-integration-phase1.md → archive/2025-10-10-development/sdk-integration/sdk-integration-phase1.md} +0 -0
  691. /package/docs/{sdk-migration-guide.md → archive/2025-10-10-development/sdk-integration/sdk-migration-guide.md} +0 -0
  692. /package/docs/{sdk-phase1-summary.md → archive/2025-10-10-development/sdk-integration/sdk-phase1-summary.md} +0 -0
  693. /package/docs/{swarm-fullstack → archive/2025-10-10-development/swarm-fullstack}/IMPLEMENTATION-SUMMARY.md +0 -0
  694. /package/docs/{swarm-fullstack → archive/2025-10-10-development/swarm-fullstack}/frontend-testing-system.md +0 -0
  695. /package/docs/{development → archive/2025-10-10-development}/technical-implementation-guide.md +0 -0
  696. /package/docs/{development → archive/2025-10-10-development}/token-tracking-guide.md +0 -0
  697. /package/docs/{development → archive/2025-10-10-development}/token-tracking-status.md +0 -0
  698. /package/docs/{development → archive/2025-10-10-development}/troubleshooting.md +0 -0
  699. /package/docs/{development → archive/2025-10-10-development}/typescript-distribution-solution.md +0 -0
  700. /package/docs/{personalization → archive/2025-10-10-guides/personalization}/cli-integration-guide.md +0 -0
  701. /package/docs/{phase4-ux → archive/2025-10-10-guides/phase4-ux}/error-handling-ux-guide.md +0 -0
  702. /package/docs/{phase4-ux → archive/2025-10-10-guides/phase4-ux}/rollout-monitoring-dashboard.md +0 -0
  703. /package/docs/{phase4-ux → archive/2025-10-10-guides/phase4-ux}/user-experience-validation-framework.md +0 -0
  704. /package/docs/{phase4-ux → archive/2025-10-10-guides/phase4-ux}/user-onboarding-experience.md +0 -0
  705. /package/docs/{NOVICE_USER_GUIDE.md → archive/2025-10-10-guides/setup-guides/NOVICE_USER_GUIDE.md} +0 -0
  706. /package/docs/{QUICK_START.md → archive/2025-10-10-guides/setup-guides/QUICK_START.md} +0 -0
  707. /package/docs/{SETUP_WIZARD.md → archive/2025-10-10-guides/setup-guides/SETUP_WIZARD.md} +0 -0
  708. /package/docs/{ZAIR_SETUP_CHECKLIST.md → archive/2025-10-10-guides/setup-guides/ZAIR_SETUP_CHECKLIST.md} +0 -0
  709. /package/docs/{user → archive/2025-10-10-guides/user-guides}/PREFERENCE_SYSTEM_GUIDE.md +0 -0
  710. /package/docs/{user → archive/2025-10-10-guides/user-guides}/USER_GUIDE.md +0 -0
  711. /package/docs/{user → archive/2025-10-10-guides/user-guides}/enterprise-stakeholder-guide.md +0 -0
  712. /package/docs/{user → archive/2025-10-10-guides/user-guides}/novice-user-guide.md +0 -0
  713. /package/docs/{user → archive/2025-10-10-guides/user-guides}/tutorial.md +0 -0
  714. /package/docs/{user → archive/2025-10-10-guides/user-guides}/ux-assessment-pain-points.md +0 -0
  715. /package/docs/{ux-design/mockups → archive/2025-10-10-guides/ux-design}/configuration-ui-mockups.md +0 -0
  716. /package/docs/{ux-design/wizards → archive/2025-10-10-guides/ux-design}/configuration-wizard-flows.md +0 -0
  717. /package/docs/{ux-design/ui-patterns → archive/2025-10-10-guides/ux-design}/progressive-disclosure-patterns.md +0 -0
  718. /package/docs/{ux-design → archive/2025-10-10-guides/ux-design}/usability-testing-plan.md +0 -0
  719. /package/docs/{ux-design/user-journeys → archive/2025-10-10-guides/ux-design}/user-personas-analysis.md +0 -0
  720. /package/docs/{ux-design/accessibility → archive/2025-10-10-guides/ux-design}/wcag-compliance-guidelines.md +0 -0
  721. /package/docs/{HOOK-COMPARISON.md → archive/2025-10-10-integration/HOOK-COMPARISON.md} +0 -0
  722. /package/docs/{POST-EDIT-PIPELINE-AGENT-INFO.md → archive/2025-10-10-integration/POST-EDIT-PIPELINE-AGENT-INFO.md} +0 -0
  723. /package/docs/{POST-EDIT-PIPELINE-MERGED.md → archive/2025-10-10-integration/POST-EDIT-PIPELINE-MERGED.md} +0 -0
  724. /package/docs/{POST-EDIT-PIPELINE-UNIFIED.md → archive/2025-10-10-integration/POST-EDIT-PIPELINE-UNIFIED.md} +0 -0
  725. /package/docs/{automation → archive/2025-10-10-integration/automation}/swarm-test-pipeline-strategy.md +0 -0
  726. /package/docs/{integration → archive/2025-10-10-integration/mcp-compatibility}/issue-772-implementation-plan.md +0 -0
  727. /package/docs/{mcp-backwards-compatibility.md → archive/2025-10-10-integration/mcp-compatibility/mcp-backwards-compatibility.md} +0 -0
  728. /package/docs/{mcp-novice-simplification.md → archive/2025-10-10-integration/mcp-compatibility/mcp-novice-simplification.md} +0 -0
  729. /package/docs/{slash-commands → archive/2025-10-10-integration/slash-commands}/cfn-claude-sync-usage.md +0 -0
  730. /package/docs/{slash-commands → archive/2025-10-10-integration/slash-commands}/cfn-loop-quick-reference.md +0 -0
  731. /package/docs/{slash-commands → archive/2025-10-10-integration/slash-commands}/cfn-loop-usage.md +0 -0
  732. /package/docs/{final-slash-commands-setup.md → archive/2025-10-10-integration/slash-commands/final-slash-commands-setup.md} +0 -0
  733. /package/docs/{commands → archive/2025-10-10-integration/slash-commands}/fullstack.md +0 -0
  734. /package/docs/{slash-commands-complete-status.md → archive/2025-10-10-integration/slash-commands/slash-commands-complete-status.md} +0 -0
  735. /package/docs/{slash-commands-status-report.md → archive/2025-10-10-integration/slash-commands/slash-commands-status-report.md} +0 -0
  736. /package/docs/{workflows → archive/2025-10-10-integration/workflows}/IMPLEMENTATION_SUMMARY.md +0 -0
  737. /package/docs/{workflows → archive/2025-10-10-integration/workflows}/README.md +0 -0
  738. /package/docs/{workflows → archive/2025-10-10-integration/workflows}/iterative-build-test-workflow.md +0 -0
  739. /package/docs/{DOCUMENTATION_AUTO_UPDATER_CHANGELOG.md → archive/2025-10-10-migration/deprecation-notices/DOCUMENTATION_AUTO_UPDATER_CHANGELOG.md} +0 -0
  740. /package/{MCP_DEPRECATION_NOTICE.md → docs/archive/2025-10-10-migration/deprecation-notices/MCP_DEPRECATION_NOTICE.md} +0 -0
  741. /package/docs/{migration → archive/2025-10-10-migration/deprecation-notices}/README.md +0 -0
  742. /package/docs/{deprecation-report.md → archive/2025-10-10-migration/deprecation-notices/deprecation-report.md} +0 -0
  743. /package/docs/{migration → archive/2025-10-10-migration/v2-migration}/COMPREHENSIVE_MIGRATION_GUIDE.md +0 -0
  744. /package/docs/{V1_TO_V2_MIGRATION.md → archive/2025-10-10-migration/v2-migration/V1_TO_V2_MIGRATION.md} +0 -0
  745. /package/{V2_MIGRATION_GUIDE.md → docs/archive/2025-10-10-migration/v2-migration/V2_MIGRATION_GUIDE.md} +0 -0
  746. /package/docs/{migration → archive/2025-10-10-migration/v2-migration}/migration-assessment-toolkit.md +0 -0
  747. /package/docs/{npm-package-updates.md → archive/2025-10-10-migration/v2-migration/npm-package-updates.md} +0 -0
  748. /package/docs/{migration → archive/2025-10-10-migration/v2-migration}/proven-migration-case-studies.md +0 -0
  749. /package/docs/{APM_INTEGRATION_GUIDE.md → archive/2025-10-10-operations/APM_INTEGRATION_GUIDE.md} +0 -0
  750. /package/docs/{operations → archive/2025-10-10-operations}/DEPLOYMENT.md +0 -0
  751. /package/docs/{operations → archive/2025-10-10-operations}/ENABLE_AUTHENTICATION.md +0 -0
  752. /package/docs/{HOW_METRICS_WORK.md → archive/2025-10-10-operations/HOW_METRICS_WORK.md} +0 -0
  753. /package/docs/{METRICS_PLACEMENT_STRATEGY.md → archive/2025-10-10-operations/METRICS_PLACEMENT_STRATEGY.md} +0 -0
  754. /package/docs/{PRODUCTION_OPERATIONS.md → archive/2025-10-10-operations/PRODUCTION_OPERATIONS.md} +0 -0
  755. /package/docs/{operations → archive/2025-10-10-operations}/RESOURCE_MANAGEMENT_IMPLEMENTATION_PLAN.md +0 -0
  756. /package/docs/{operations → archive/2025-10-10-operations}/RESOURCE_MANAGEMENT_TECHNICAL_SPECS.md +0 -0
  757. /package/docs/{SESSION_CLEANUP_SYSTEM.md → archive/2025-10-10-operations/SESSION_CLEANUP_SYSTEM.md} +0 -0
  758. /package/docs/{V2_TRANSPARENCY_SYSTEM.md → archive/2025-10-10-operations/V2_TRANSPARENCY_SYSTEM.md} +0 -0
  759. /package/docs/{operations → archive/2025-10-10-operations}/analytics-system.md +0 -0
  760. /package/docs/{operations → archive/2025-10-10-operations/benchmarks}/benchmark-claude-flow-conflict-analysis.md +0 -0
  761. /package/docs/{operations → archive/2025-10-10-operations/benchmarks}/benchmark-cleanup-analysis.md +0 -0
  762. /package/docs/{operations → archive/2025-10-10-operations/benchmarks}/build-artifacts-analysis.md +0 -0
  763. /package/docs/{operations → archive/2025-10-10-operations/byzantine-consensus}/FINAL_BYZANTINE_CONSENSUS_VERIFICATION_REPORT.md +0 -0
  764. /package/docs/{operations → archive/2025-10-10-operations/byzantine-consensus}/byzantine-consensus-verification-report-phase2.md +0 -0
  765. /package/docs/{operations → archive/2025-10-10-operations/byzantine-consensus}/byzantine-consensus-verification-report-phase4.md +0 -0
  766. /package/docs/{operations → archive/2025-10-10-operations}/chrome-mcp-research-report.md +0 -0
  767. /package/docs/{ci-cd → archive/2025-10-10-operations/ci-cd}/README.md +0 -0
  768. /package/docs/{operations → archive/2025-10-10-operations}/cli-command-consolidation-analysis.md +0 -0
  769. /package/docs/{deployment → archive/2025-10-10-operations/deployment}/DEPLOYMENT_GUIDE.md +0 -0
  770. /package/docs/{deployment → archive/2025-10-10-operations/deployment}/DEPLOYMENT_STRATEGIES.md +0 -0
  771. /package/docs/{deployment → archive/2025-10-10-operations/deployment}/DISASTER_RECOVERY.md +0 -0
  772. /package/docs/{deployment → archive/2025-10-10-operations/deployment}/DOCKER_SECURITY.md +0 -0
  773. /package/docs/{deployment → archive/2025-10-10-operations/deployment}/HELM_CHARTS.md +0 -0
  774. /package/docs/{deployment → archive/2025-10-10-operations/deployment}/INFRASTRUCTURE_AS_CODE.md +0 -0
  775. /package/docs/{deployment → archive/2025-10-10-operations/deployment}/MONITORING_OBSERVABILITY.md +0 -0
  776. /package/docs/{deployment → archive/2025-10-10-operations/deployment}/PERFORMANCE_OPTIMIZATION.md +0 -0
  777. /package/docs/{deployment → archive/2025-10-10-operations/deployment}/README.md +0 -0
  778. /package/docs/{deployment → archive/2025-10-10-operations/deployment}/pm2-setup.md +0 -0
  779. /package/docs/{deployment → archive/2025-10-10-operations/deployment}/production-deployment-guide.md +0 -0
  780. /package/docs/{operations → archive/2025-10-10-operations}/deployment-checklist.md +0 -0
  781. /package/docs/{operations → archive/2025-10-10-operations}/deployment-report.md +0 -0
  782. /package/docs/{metrics-counter-usage.md → archive/2025-10-10-operations/metrics-counter-usage.md} +0 -0
  783. /package/docs/{operations → archive/2025-10-10-operations}/migration-strategy.md +0 -0
  784. /package/docs/{operations → archive/2025-10-10-operations/performance-analysis}/agent-analysis-report.md +0 -0
  785. /package/docs/{operations → archive/2025-10-10-operations/performance-analysis}/agent-persistence-performance-analysis.md +0 -0
  786. /package/docs/{operations → archive/2025-10-10-operations/performance-analysis}/performance-analysis-report.md +0 -0
  787. /package/docs/{runbooks → archive/2025-10-10-operations/runbooks}/DATABASE_PERFORMANCE_RUNBOOK.md +0 -0
  788. /package/docs/{runbooks → archive/2025-10-10-operations/runbooks}/EMERGENCY_RESPONSE_PROCEDURES.md +0 -0
  789. /package/docs/{runbooks → archive/2025-10-10-operations/runbooks}/SERVICE_OUTAGE_RUNBOOK.md +0 -0
  790. /package/docs/{operations → archive/2025-10-10-operations}/shadcn-mcp-swarm-research-report.md +0 -0
  791. /package/docs/{operations → archive/2025-10-10-operations}/training-pipeline-demo.md +0 -0
  792. /package/docs/{operations → archive/2025-10-10-operations}/training-pipeline-real-only.md +0 -0
  793. /package/docs/{operations → archive/2025-10-10-operations/validation-reports}/COMPREHENSIVE_QA_VALIDATION_REPORT.md +0 -0
  794. /package/docs/{operations → archive/2025-10-10-operations/validation-reports}/PRODUCTION_VALIDATION_REPORT.md +0 -0
  795. /package/docs/{operations → archive/2025-10-10-operations/validation-reports}/WIKI_VALIDATION_REPORT.md +0 -0
  796. /package/docs/{operations → archive/2025-10-10-operations/validation-reports}/checkpoint-1-3-validation-report.md +0 -0
  797. /package/docs/{operations → archive/2025-10-10-operations/validation-reports}/checkpoint-1-4-validation-summary.md +0 -0
  798. /package/docs/{operations → archive/2025-10-10-operations/validation-reports}/cli-validation-report.md +0 -0
  799. /package/docs/{operations → archive/2025-10-10-operations/validation-reports}/command-consolidation-usability-validation.md +0 -0
  800. /package/docs/{operations → archive/2025-10-10-operations/validation-reports}/configuration-system-validation-report.md +0 -0
  801. /package/docs/{operations → archive/2025-10-10-operations/validation-reports}/experimental-features-validation-report.md +0 -0
  802. /package/docs/{operations → archive/2025-10-10-operations/validation-reports}/final-validation-summary.md +0 -0
  803. /package/docs/{operations → archive/2025-10-10-operations/validation-reports}/unified-config-validation-report.md +0 -0
  804. /package/docs/{operations → archive/2025-10-10-operations/validation-reports}/validation-executive-summary.md +0 -0
  805. /package/docs/{operations → archive/2025-10-10-operations/validation-reports}/validator-scope-overreach-analysis.md +0 -0
  806. /package/docs/{operations → archive/2025-10-10-operations/validation-reports}/verification-integration.md +0 -0
  807. /package/docs/{operations → archive/2025-10-10-operations/validation-reports}/verification-validation.md +0 -0
  808. /package/docs/{performance → archive/2025-10-10-performance}/COMPREHENSIVE_SQLITE_ANALYSIS.md +0 -0
  809. /package/docs/{LRU_GARBAGE_COLLECTION.md → archive/2025-10-10-performance/LRU_GARBAGE_COLLECTION.md} +0 -0
  810. /package/docs/{OPTIMIZATION_SAFETY_REPORT.md → archive/2025-10-10-performance/OPTIMIZATION_SAFETY_REPORT.md} +0 -0
  811. /package/docs/{performance → archive/2025-10-10-performance}/Phase3-Remediation-Report.md +0 -0
  812. /package/docs/{benchmark-realistic-code-generation.md → archive/2025-10-10-performance/benchmarks/benchmark-realistic-code-generation.md} +0 -0
  813. /package/docs/{benchmark-rust-known-issues.md → archive/2025-10-10-performance/benchmarks/benchmark-rust-known-issues.md} +0 -0
  814. /package/docs/{benchmark-rust-support-summary.md → archive/2025-10-10-performance/benchmarks/benchmark-rust-support-summary.md} +0 -0
  815. /package/docs/{optimization → archive/2025-10-10-performance/optimization}/README.md +0 -0
  816. /package/docs/{optimization → archive/2025-10-10-performance/optimization}/communication-improvements.md +0 -0
  817. /package/docs/{performance → archive/2025-10-10-performance/optimization}/sqlite-performance-analysis.md +0 -0
  818. /package/docs/{security → archive/2025-10-10-security}/DEPLOYMENT_CHECKLIST.md +0 -0
  819. /package/docs/{security → archive/2025-10-10-security}/GIT_SECRETS_SETUP.md +0 -0
  820. /package/docs/{operations/SECURITY_AUDIT_REPORT.md → archive/2025-10-10-security/PACKAGE_SECURITY_AUDIT.md} +0 -0
  821. /package/docs/{security → archive/2025-10-10-security}/SECRET-DETECTION.md +0 -0
  822. /package/docs/{SECURITY_AUDIT_REPORT.md → archive/2025-10-10-security/SECRET_DETECTION_AUDIT.md} +0 -0
  823. /package/docs/{security → archive/2025-10-10-security/authentication}/JWT_AUTHENTICATION.md +0 -0
  824. /package/docs/{security → archive/2025-10-10-security/authentication}/MIGRATION_BASE64_TO_JWT.md +0 -0
  825. /package/docs/{security → archive/2025-10-10-security/authentication}/REDIS_AUTHENTICATION.md +0 -0
  826. /package/docs/{SECURITY_AUTH.md → archive/2025-10-10-security/authentication/SECURITY_AUTH.md} +0 -0
  827. /package/docs/{certification → archive/2025-10-10-security/certification}/FINAL-PRODUCTION-CERTIFICATION.md +0 -0
  828. /package/docs/{certification → archive/2025-10-10-security/certification}/README.md +0 -0
  829. /package/docs/{certification → archive/2025-10-10-security/certification}/fullstack-swarm-production-cert.md +0 -0
  830. /package/docs/{certification → archive/2025-10-10-security/certification}/post-edit-pipeline-production-cert.md +0 -0
  831. /package/docs/{security → archive/2025-10-10-security}/phase5-security-implementation-summary.md +0 -0
  832. /package/docs/{security → archive/2025-10-10-security}/sec-024-lamport-clock-implementation.md +0 -0
  833. /package/docs/{security → archive/2025-10-10-security/vulnerabilities}/CRYPTO_CIPHER_FIX_REPORT.md +0 -0
  834. /package/docs/{security → archive/2025-10-10-security/vulnerabilities}/CRYPTO_VULNERABILITY_SUMMARY.md +0 -0
  835. /package/docs/{security → archive/2025-10-10-security/vulnerabilities}/cve-2025-005-006-implementation.md +0 -0
  836. /package/docs/{security → archive/2025-10-10-security/vulnerabilities}/rbac-test-bypass-fix.md +0 -0
  837. /package/docs/{testing → archive/2025-10-10-testing}/README.md +0 -0
  838. /package/docs/{testing → archive/2025-10-10-testing}/consensus-decision-matrix.md +0 -0
  839. /package/docs/{testing → archive/2025-10-10-testing}/playwright-mcp-integration-guide.md +0 -0
  840. /package/docs/{CROSS_PLATFORM_TEST_RESULTS.md → archive/2025-10-10-testing/test-results/CROSS_PLATFORM_TEST_RESULTS.md} +0 -0
  841. /package/docs/{V2_MULTI_LEVEL_TEST_RESULTS.md → archive/2025-10-10-testing/test-results/V2_MULTI_LEVEL_TEST_RESULTS.md} +0 -0
  842. /package/docs/{backend-testing-system.md → archive/2025-10-10-testing/test-results/backend-testing-system.md} +0 -0
  843. /package/docs/{benchmark-test-report.md → archive/2025-10-10-testing/test-results/benchmark-test-report.md} +0 -0
  844. /package/docs/{testing → archive/2025-10-10-testing/test-results}/comprehensive-test-results.md +0 -0
  845. /package/docs/{validation → archive/2025-10-10-testing/validation}/PRODUCTION-CERTIFICATION-SUMMARY.md +0 -0
  846. /package/docs/{validation → archive/2025-10-10-testing/validation}/byzantine-consensus-coordination-report.md +0 -0
  847. /package/docs/{validation → archive/2025-10-10-testing/validation}/byzantine-consensus-summary.md +0 -0
  848. /package/docs/{validation → archive/2025-10-10-testing/validation}/completion-validation-verification-report.md +0 -0
  849. /package/docs/{validation → archive/2025-10-10-testing/validation}/fullstack-integration-report.md +0 -0
  850. /package/docs/{validation → archive/2025-10-10-testing/validation}/phase2-byzantine-consensus-verification-report.md +0 -0
  851. /package/docs/{validation → archive/2025-10-10-testing/validation}/phase2-completion-consensus-report.md +0 -0
  852. /package/docs/{validation → archive/2025-10-10-testing/validation}/stage5-consensus-report.md +0 -0
  853. /package/docs/{validation → archive/2025-10-10-testing/validation}/stage6-final-certification.md +0 -0
  854. /package/docs/{validation → archive/2025-10-10-testing/validation}/stage7-production-certification.md +0 -0
  855. /package/docs/{ERROR_HANDLING_IMPLEMENTATION_SUMMARY.md → archive/ERROR_HANDLING_IMPLEMENTATION_SUMMARY.md} +0 -0
  856. /package/docs/{ERROR_MESSAGES_GUIDE.md → archive/ERROR_MESSAGES_GUIDE.md} +0 -0
  857. /package/docs/{HTTP_POLLING_FALLBACK.md → archive/HTTP_POLLING_FALLBACK.md.backup-1760135090706} +0 -0
  858. /package/docs/{phase2-implementation-summary.md → archive/cfn-loop/completed-phases/phase2-implementation-summary.md} +0 -0
  859. /package/docs/{CFN_LOOP.md → archive/cfn-loop/deprecated-3-loop/CFN_LOOP.md} +0 -0
  860. /package/docs/{validation-loop-pattern.md → archive/cfn-loop/early-patterns/validation-loop-pattern.md} +0 -0
  861. /package/docs/{MCP_ENDPOINTS_REFERENCE.md → archive/deprecated-mcp/MCP_ENDPOINTS_REFERENCE.md} +0 -0
  862. /package/docs/{api → archive/deprecated-mcp}/MCP_TOOLS.md +0 -0
  863. /package/docs/{api → archive/deprecated-mcp}/mcp-swarm-integration-api.md +0 -0
  864. /package/docs/{API_AUTH.md → archive/phase3-auth-unimplemented/API_AUTH.md} +0 -0
  865. /package/docs/{AUTHENTICATION.md → archive/phase3-auth-unimplemented/AUTHENTICATION.md} +0 -0
  866. /package/docs/{AUTH_DOCUMENTATION_SUMMARY.md → archive/phase3-auth-unimplemented/AUTH_DOCUMENTATION_SUMMARY.md} +0 -0
  867. /package/docs/{AUTH_MIGRATION.md → archive/phase3-auth-unimplemented/AUTH_MIGRATION.md} +0 -0
  868. /package/docs/{phase5-booster-integration-summary.md → archive/phase5-booster-integration-summary.md} +0 -0
  869. /package/{CHANGELOG_V2.md → docs/archive/reference-historical/CHANGELOG_V2.md} +0 -0
  870. /package/docs/{INDEX.md → archive/reference-historical/INDEX.md} +0 -0
  871. /package/docs/{CFN_LOOP_PHASE_ORCHESTRATION.md → cfn-loop/CFN_LOOP_PHASE_ORCHESTRATION.md} +0 -0
  872. /package/docs/{CFN_LOOP_SCOPE_CONTROL.md → cfn-loop/CFN_LOOP_SCOPE_CONTROL.md} +0 -0
  873. /package/docs/{CFN_LOOP_SELF_LOOPING_ADDITIONS.md → cfn-loop/CFN_LOOP_SELF_LOOPING_ADDITIONS.md} +0 -0
  874. /package/docs/{SPRINT_ORCHESTRATION.md → cfn-loop/SPRINT_ORCHESTRATION.md} +0 -0
  875. /package/docs/{epic-iteration-limits-implementation.md → cfn-loop/epic-iteration-limits-implementation.md} +0 -0
  876. /package/docs/{phase-5-sprint-5.2-multi-level-control.md → cfn-loop/phase-5-sprint-5.2-multi-level-control.md} +0 -0
  877. /package/docs/{phase-orchestrator-sprint-enhancement-summary.md → cfn-loop/phase-orchestrator-sprint-enhancement-summary.md} +0 -0
  878. /package/docs/{phases → cfn-loop/phases}/PHASE_06_ARCHITECTURE_SUMMARY.md +0 -0
  879. /package/docs/{phases → cfn-loop/phases}/PHASE_06_COMPONENT_INTERFACES.md +0 -0
  880. /package/docs/{phases → cfn-loop/phases}/PHASE_06_INTEGRATION_STRATEGY.md +0 -0
  881. /package/docs/{phases → cfn-loop/phases}/PHASE_06_MESH_COORDINATION_ARCHITECTURE.md +0 -0
  882. /package/docs/{phases → cfn-loop/phases}/PHASE_06_README.md +0 -0
  883. /package/docs/{phases → cfn-loop/phases}/PHASE_07_HELP_SYSTEM_ARCHITECTURE.md +0 -0
  884. /package/docs/{phases → cfn-loop/phases}/PHASE_0_SDK_FOUNDATION.md +0 -0
  885. /package/docs/{phases → cfn-loop/phases}/phase-05-architecture.md +0 -0
  886. /package/docs/{self-validating-loops-implementation.md → cfn-loop/self-validating-loops-implementation.md} +0 -0
  887. /package/{CHANGELOG.md → docs/reference/CHANGELOG.md} +0 -0
  888. /package/{NPM_PACKAGE_CONTENTS.md → docs/reference/NPM_PACKAGE_CONTENTS.md} +0 -0
  889. /package/{README-NPM.md → docs/reference/README-NPM.md} +0 -0
  890. /package/docs/{SITE_MAP.md → reference/SITE_MAP.md} +0 -0
  891. /package/docs/{research → reference/research}/AGENT_ACCESSIBILITY_GUIDE.md +0 -0
  892. /package/docs/{research → reference/research}/AGENT_PERMISSION_SYSTEM_ANALYSIS.md +0 -0
  893. /package/docs/{research → reference/research}/CLAUDE_AGENT_SDK_COMPREHENSIVE_ANALYSIS.md +0 -0
  894. /package/docs/{research → reference/research}/CLAUDE_AGENT_SDK_EXECUTIVE_SUMMARY.md +0 -0
  895. /package/docs/{research → reference/research}/CLEANUP_CRITERIA_QUICK_REFERENCE.md +0 -0
  896. /package/docs/{research → reference/research}/claude-session-cpu-behavior-analysis.md +0 -0
  897. /package/docs/{research → reference/research}/completion-validation-research.md +0 -0
  898. /package/docs/{templates → reference/templates}/PHASE_DOCUMENT_TEMPLATE.md +0 -0
  899. /package/docs/{templates → reference/templates}/PHASE_TEMPLATE_USAGE_GUIDE.md +0 -0
  900. /package/docs/{TEMPLATE_CUSTOMIZATION_GUIDE.md → reference/templates/TEMPLATE_CUSTOMIZATION_GUIDE.md} +0 -0
  901. /package/docs/{TEMPLATE_EXAMPLES_AND_BEST_PRACTICES.md → reference/templates/TEMPLATE_EXAMPLES_AND_BEST_PRACTICES.md} +0 -0
  902. /package/docs/{TEMPLATE_SYSTEM_DOCUMENTATION.md → reference/templates/TEMPLATE_SYSTEM_DOCUMENTATION.md} +0 -0
  903. /package/docs/{wiki → reference/wiki}/background-commands.md +0 -0
  904. /package/docs/{wiki → reference/wiki}/efficiency-patterns-and-anti-patterns.md +0 -0
  905. /package/docs/{wiki → reference/wiki}/monitoring-and-metrics-guide.md +0 -0
  906. /package/docs/{wiki → reference/wiki}/performance-benchmarking-tools.md +0 -0
  907. /package/docs/{wiki → reference/wiki}/performance-optimization-strategies.md +0 -0
  908. /package/docs/{wiki → reference/wiki}/performance-testing-framework.md +0 -0
  909. /package/docs/{wiki → reference/wiki}/resource-optimization-techniques.md +0 -0
  910. /package/docs/{wiki → reference/wiki}/scalability-guidelines.md +0 -0
  911. /package/docs/{wiki → reference/wiki}/security/README.md +0 -0
  912. /package/docs/{wiki → reference/wiki}/security/authentication-authorization-strategies.md +0 -0
  913. /package/docs/{wiki → reference/wiki}/security/compliance-automation-workflows.md +0 -0
  914. /package/docs/{wiki → reference/wiki}/security/compliance-frameworks-integration.md +0 -0
  915. /package/docs/{wiki → reference/wiki}/security/enterprise-security-patterns.md +0 -0
  916. /package/docs/{wiki → reference/wiki}/security/incident-response-guide.md +0 -0
  917. /package/docs/{wiki → reference/wiki}/security/secrets-management-guide.md +0 -0
  918. /package/docs/{wiki → reference/wiki}/security/secure-coding-patterns.md +0 -0
  919. /package/docs/{wiki → reference/wiki}/security/security-best-practices.md +0 -0
  920. /package/docs/{wiki → reference/wiki}/security/security-first-development-workflows.md +0 -0
  921. /package/docs/{wiki → reference/wiki}/security/security-testing-framework.md +0 -0
  922. /package/docs/{wiki → reference/wiki}/session-persistence.md +0 -0
  923. /package/docs/{wiki → reference/wiki}/stream-chain-command.md +0 -0
  924. /package/docs/{wiki → reference/wiki}/troubleshooting/README.md +0 -0
  925. /package/docs/{wiki → reference/wiki}/troubleshooting/cli-troubleshooting.md +0 -0
  926. /package/docs/{wiki → reference/wiki}/troubleshooting/configuration-troubleshooting.md +0 -0
  927. /package/docs/{wiki → reference/wiki}/troubleshooting/debug-mode.md +0 -0
  928. /package/docs/{wiki → reference/wiki}/troubleshooting/error-analysis.md +0 -0
  929. /package/docs/{wiki → reference/wiki}/troubleshooting/linux-troubleshooting.md +0 -0
  930. /package/docs/{wiki → reference/wiki}/troubleshooting/log-analysis.md +0 -0
  931. /package/docs/{wiki → reference/wiki}/troubleshooting/macos-troubleshooting.md +0 -0
  932. /package/docs/{wiki → reference/wiki}/troubleshooting/mcp-troubleshooting.md +0 -0
  933. /package/docs/{wiki → reference/wiki}/troubleshooting/performance-troubleshooting.md +0 -0
  934. /package/docs/{wiki → reference/wiki}/troubleshooting/quick-reference.md +0 -0
  935. /package/docs/{wiki → reference/wiki}/troubleshooting/windows-troubleshooting.md +0 -0
  936. /package/docs/{wiki → reference/wiki}/troubleshooting-slow-workflows.md +0 -0
  937. /package/docs/{CROSS_PLATFORM_VALIDATION_CONFIDENCE.json → testing/CROSS_PLATFORM_VALIDATION_CONFIDENCE.json} +0 -0
  938. /package/docs/{validation → testing/validation}/byzantine-validation-report.json +0 -0
  939. /package/{templates → examples/templates}/README.md +0 -0
  940. /package/{templates → examples/templates}/basic-swarm/.claude/settings.json +0 -0
  941. /package/{templates/basic-swarm/CLAUDE.md → examples/templates/basic-swarm/CLAUDE.md.backup-1760135091193} +0 -0
  942. /package/{templates → examples/templates}/basic-swarm/coordination.md +0 -0
  943. /package/{templates → examples/templates}/basic-swarm/memory-bank.md +0 -0
  944. /package/{templates → examples/templates}/basic-swarm/package.json +0 -0
  945. /package/{templates → examples/templates}/custom-agent/.claude/settings.json +0 -0
  946. /package/{templates/custom-agent/CLAUDE.md → examples/templates/custom-agent/CLAUDE.md.backup-1760135091180} +0 -0
  947. /package/{templates → examples/templates}/event-bus/.claude/settings.json +0 -0
  948. /package/{templates → examples/templates}/event-bus/CLAUDE.md +0 -0
  949. /package/{templates → examples/templates}/fleet-manager/.claude/settings.json +0 -0
  950. /package/{templates/fleet-manager/CLAUDE.md → examples/templates/fleet-manager/CLAUDE.md.backup-1760135091167} +0 -0
  951. /package/{docs → scripts}/agent-token-analysis.js +0 -0
@@ -0,0 +1,1483 @@
1
+ # Blocking Coordination FAQ
2
+
3
+ **Version:** 1.0
4
+ **Last Updated:** 2025-10-10
5
+ **Questions:** 30
6
+
7
+ ---
8
+
9
+ ## General Questions
10
+
11
+ ### Q1: When should I use blocking coordination?
12
+
13
+ **Answer:** Use blocking coordination when you need to synchronize distributed agents waiting for critical events. Specifically:
14
+
15
+ **Use Cases:**
16
+ - **CFN Loop 2 (Consensus Validation):** Product Owner waits for ALL validator responses before calculating consensus
17
+ - **CFN Loop 4 (GOAP Decisions):** Product Owner waits for validation results before executing PROCEED/DEFER/ESCALATE decision
18
+ - **Multi-Agent Workflows:** Any scenario where work cannot proceed until a signal is received
19
+
20
+ **Don't Use For:**
21
+ - Independent parallel tasks (no synchronization needed)
22
+ - Simple request-response (use direct HTTP/gRPC instead)
23
+ - Fire-and-forget operations (use message queue instead)
24
+
25
+ **Example (When to Use):**
26
+ ```typescript
27
+ // ✅ GOOD: Wait for all validators before deciding
28
+ const consensus = await productOwner.blockUntilAllValidatorsRespond();
29
+ if (consensus >= 0.90) {
30
+ await productOwner.proceedToNextPhase();
31
+ }
32
+
33
+ // ❌ BAD: Don't use for independent tasks
34
+ await coordinator.blockUntilSignal(); // Unnecessary blocking
35
+ await doIndependentWork();
36
+ ```
37
+
38
+ ---
39
+
40
+ ### Q2: How do I choose timeout duration?
41
+
42
+ **Answer:** Use the **2× expected task duration** rule:
43
+
44
+ **Formula:**
45
+ ```
46
+ Timeout = 2 × P95(task_duration)
47
+ ```
48
+
49
+ **By Environment:**
50
+ - **Development:** 5-10 minutes (fast feedback)
51
+ - **Staging:** 15-20 minutes (realistic load)
52
+ - **Production:** 30-60 minutes (accommodate peak load)
53
+
54
+ **Dynamic Calculation:**
55
+ ```typescript
56
+ async function calculateTimeout(taskType: string): Promise<number> {
57
+ const p95 = await metrics.getHistogramQuantile(
58
+ 'blocking_coordination_duration_seconds',
59
+ 0.95,
60
+ { task_type: taskType }
61
+ );
62
+
63
+ // 2× P95, minimum 5min, maximum 60min
64
+ return Math.min(
65
+ Math.max(p95 * 2 * 1000, 5 * 60 * 1000),
66
+ 60 * 60 * 1000
67
+ );
68
+ }
69
+ ```
70
+
71
+ **Example:**
72
+ - P95 = 3 minutes → Timeout = 6 minutes
73
+ - P95 = 15 minutes → Timeout = 30 minutes
74
+ - P95 = 45 minutes → Timeout = 60 minutes (capped)
75
+
76
+ ---
77
+
78
+ ### Q3: What happens if a coordinator dies?
79
+
80
+ **Answer:** The dead coordinator detection system handles failures automatically:
81
+
82
+ **Detection Flow:**
83
+ 1. **Heartbeat stops** (coordinator crashes)
84
+ 2. **Heartbeat TTL expires** (90 seconds)
85
+ 3. **Timeout handler detects** stale heartbeat (>120s old)
86
+ 4. **3 warnings issued** over 5 minutes
87
+ 5. **Escalation triggered** after 3rd warning
88
+ 6. **Work transferred** to new coordinator
89
+ 7. **Old state cleaned up** (signals, ACKs, warnings)
90
+
91
+ **Timeline:**
92
+ ```
93
+ 00:00 - Coordinator dies
94
+ 00:90 - Heartbeat key expires in Redis
95
+ 02:00 - Timeout handler detects stale heartbeat (warning 1)
96
+ 03:00 - Warning 2
97
+ 04:00 - Warning 3
98
+ 04:01 - Escalation: spawn replacement coordinator
99
+ 04:05 - Work transferred to new coordinator
100
+ 04:06 - Old coordinator state cleaned up
101
+ ```
102
+
103
+ **No Data Loss:**
104
+ - Incomplete work stored in Redis with TTL
105
+ - Replacement coordinator picks up work
106
+ - Idempotent operations prevent duplication
107
+
108
+ ---
109
+
110
+ ### Q4: How do I troubleshoot signal delivery failures?
111
+
112
+ **Answer:** Follow this diagnostic checklist:
113
+
114
+ **Step 1: Verify Signal Exists**
115
+ ```bash
116
+ redis-cli GET "blocking:signal:<receiver-id>"
117
+ # If null → signal never sent
118
+ ```
119
+
120
+ **Step 2: Check HMAC Secret**
121
+ ```bash
122
+ # Verify secret matches on both sender and receiver
123
+ echo $BLOCKING_COORDINATION_SECRET | md5sum
124
+ ```
125
+
126
+ **Step 3: Inspect Signature**
127
+ ```bash
128
+ # Get signal from Redis
129
+ SIGNAL=$(redis-cli GET "blocking:signal:<receiver-id>")
130
+
131
+ # Extract signature
132
+ SIGNATURE=$(echo "$SIGNAL" | jq -r '.signature')
133
+
134
+ # Manually calculate expected signature
135
+ PAYLOAD="sender:receiver:type:timestamp"
136
+ EXPECTED=$(echo -n "$PAYLOAD" | openssl dgst -sha256 -hmac "$SECRET" -hex | awk '{print $2}')
137
+
138
+ # Compare
139
+ echo "Received: $SIGNATURE"
140
+ echo "Expected: $EXPECTED"
141
+ ```
142
+
143
+ **Step 4: Review Logs**
144
+ ```bash
145
+ # Check for verification errors
146
+ grep "signature" /var/log/cfn-loop/coordinator-*.log
147
+
148
+ # Common errors:
149
+ # - "Invalid signal signature" → HMAC secret mismatch
150
+ # - "Signal timestamp too old" → Clock skew
151
+ # - "Unknown signal type" → Protocol version mismatch
152
+ ```
153
+
154
+ **Step 5: Check Retry Logs**
155
+ ```bash
156
+ # Look for retry attempts
157
+ grep "retry" /var/log/cfn-loop/coordinator-*.log
158
+
159
+ # If 3 retries failed → escalate to timeout handler
160
+ ```
161
+
162
+ **Quick Fix:**
163
+ ```bash
164
+ # Resend signal with correct signature
165
+ node scripts/resend-signal.js --sender=A --receiver=B --type=wake
166
+ ```
167
+
168
+ ---
169
+
170
+ ### Q5: What's the difference between heartbeat TTL and dead coordinator threshold?
171
+
172
+ **Answer:** They serve different purposes in failure detection:
173
+
174
+ **Heartbeat TTL (90 seconds):**
175
+ - **Purpose:** How long Redis keeps the heartbeat key
176
+ - **Mechanism:** Redis automatically deletes key after 90s
177
+ - **Rationale:** 18× heartbeat interval (5s) for tolerance
178
+
179
+ **Dead Coordinator Threshold (120 seconds):**
180
+ - **Purpose:** When we consider coordinator dead (not just slow)
181
+ - **Mechanism:** Timeout handler checks heartbeat age
182
+ - **Rationale:** 2× TTL to prevent false positives
183
+
184
+ **Relationship:**
185
+ ```
186
+ Heartbeat sent every 5s
187
+
188
+ Heartbeat expires after 90s (TTL)
189
+
190
+ Heartbeat considered stale after 120s (threshold)
191
+
192
+ Escalation after 3 warnings
193
+ ```
194
+
195
+ **Why Threshold > TTL?**
196
+ - Redis slowdowns can delay heartbeat updates
197
+ - Network jitter can cause temporary staleness
198
+ - 2× TTL reduces false positive rate from ~10% to <1%
199
+
200
+ **Example Timeline:**
201
+ ```
202
+ 00:00 - Last heartbeat sent (timestamp: 1633024800000)
203
+ 01:30 - Heartbeat expires (TTL reached)
204
+ 02:00 - Threshold reached (120s old)
205
+ 02:00 - Warning 1 issued
206
+ 02:30 - Heartbeat still missing
207
+ 03:00 - Warning 2 issued
208
+ 04:00 - Warning 3 issued
209
+ 04:01 - Escalation: coordinator marked dead
210
+ ```
211
+
212
+ ---
213
+
214
+ ## Implementation Questions
215
+
216
+ ### Q6: How do I rotate HMAC secrets?
217
+
218
+ **Answer:** Use a **dual-secret zero-downtime rotation** strategy:
219
+
220
+ **Phase 1: Add New Secret (No Downtime)**
221
+ ```bash
222
+ # Generate new secret
223
+ NEW_SECRET=$(openssl rand -hex 32)
224
+
225
+ # Add to Vault alongside old
226
+ vault kv patch secret/cfn-loop/blocking-coordination \
227
+ secret_new="$NEW_SECRET"
228
+
229
+ # Update coordinators to accept both
230
+ export BLOCKING_COORDINATION_SECRET="old-secret"
231
+ export BLOCKING_COORDINATION_SECRET_NEW="$NEW_SECRET"
232
+
233
+ # Reload coordinators (no restart)
234
+ systemctl reload coordinator@*
235
+ ```
236
+
237
+ **Phase 2: Update Verification Logic**
238
+ ```typescript
239
+ private verifySignalSignature(signal: Signal): boolean {
240
+ // Try new secret first
241
+ if (process.env.BLOCKING_COORDINATION_SECRET_NEW) {
242
+ const validWithNew = this.verifyWithSecret(
243
+ signal,
244
+ process.env.BLOCKING_COORDINATION_SECRET_NEW
245
+ );
246
+ if (validWithNew) return true;
247
+ }
248
+
249
+ // Fall back to old secret
250
+ return this.verifyWithSecret(
251
+ signal,
252
+ process.env.BLOCKING_COORDINATION_SECRET!
253
+ );
254
+ }
255
+ ```
256
+
257
+ **Phase 3: Wait for Signal TTL (24 hours)**
258
+ ```bash
259
+ # All signals signed with old secret will expire in 24h
260
+ # Wait to ensure no old signals remain in Redis
261
+ ```
262
+
263
+ **Phase 4: Promote New Secret**
264
+ ```bash
265
+ # Remove old secret from Vault
266
+ vault kv patch secret/cfn-loop/blocking-coordination \
267
+ secret="$NEW_SECRET"
268
+
269
+ vault kv delete secret/cfn-loop/blocking-coordination/secret_new
270
+
271
+ # Update environment (restart required)
272
+ export BLOCKING_COORDINATION_SECRET="$NEW_SECRET"
273
+ unset BLOCKING_COORDINATION_SECRET_NEW
274
+
275
+ systemctl restart coordinator@*
276
+ ```
277
+
278
+ **Rotation Schedule:**
279
+ - **Production:** 90 days
280
+ - **Staging:** 30 days
281
+ - **Development:** No rotation (fixed dev secret)
282
+
283
+ ---
284
+
285
+ ### Q7: Why use Redis SCAN instead of KEYS?
286
+
287
+ **Answer:** KEYS is **O(N) and blocks Redis**, while SCAN is **cursor-based and non-blocking**.
288
+
289
+ **KEYS Problems:**
290
+ ```bash
291
+ # BAD: Blocks Redis for entire operation
292
+ redis-cli KEYS "blocking:*"
293
+
294
+ # With 10,000 keys:
295
+ # - Blocks Redis for ~500ms
296
+ # - All other operations wait
297
+ # - Can cause cascading timeouts
298
+ ```
299
+
300
+ **SCAN Solution:**
301
+ ```typescript
302
+ // GOOD: Non-blocking, iterative
303
+ async function* scanKeys(pattern: string): AsyncGenerator<string> {
304
+ let cursor = '0';
305
+
306
+ do {
307
+ const [nextCursor, keys] = await redis.scan(
308
+ cursor,
309
+ 'MATCH', pattern,
310
+ 'COUNT', 100 // Process 100 keys per iteration
311
+ );
312
+
313
+ for (const key of keys) {
314
+ yield key;
315
+ }
316
+
317
+ cursor = nextCursor;
318
+ } while (cursor !== '0');
319
+ }
320
+
321
+ // Usage:
322
+ for await (const key of scanKeys('blocking:*')) {
323
+ // Process key without blocking Redis
324
+ }
325
+ ```
326
+
327
+ **Performance Comparison:**
328
+ ```
329
+ 10,000 keys:
330
+
331
+ KEYS (blocking):
332
+ - Total time: 500ms
333
+ - Redis blocked: 500ms
334
+ - Memory: All keys loaded at once
335
+
336
+ SCAN (non-blocking):
337
+ - Total time: 500ms (100 iterations × 5ms)
338
+ - Redis blocked per iteration: 5ms
339
+ - Memory: 100 keys at a time
340
+ ```
341
+
342
+ **SCAN Trade-offs:**
343
+ - ✅ **Pro:** Doesn't block Redis
344
+ - ✅ **Pro:** Memory efficient (batched)
345
+ - ✅ **Pro:** Production safe
346
+ - ❌ **Con:** More complex code
347
+ - ❌ **Con:** May return duplicates (cursor reset)
348
+ - ❌ **Con:** Not guaranteed order
349
+
350
+ **When to Use Each:**
351
+ - **KEYS:** Development only, <100 keys
352
+ - **SCAN:** Production, any key count
353
+
354
+ ---
355
+
356
+ ### Q8: How do cleanup scripts avoid removing active coordinators?
357
+
358
+ **Answer:** Cleanup scripts use a **stale threshold >2× dead coordinator threshold** to ensure only truly abandoned coordinators are removed.
359
+
360
+ **Thresholds:**
361
+ - **Dead coordinator threshold:** 120 seconds (2 minutes)
362
+ - **Stale cleanup threshold:** 600 seconds (10 minutes)
363
+ - **Ratio:** 5× dead threshold
364
+
365
+ **Logic:**
366
+ ```typescript
367
+ const DEAD_THRESHOLD = 120000; // 120s
368
+ const STALE_THRESHOLD = 600000; // 600s (10 minutes)
369
+
370
+ async function cleanupStaleCoordinators() {
371
+ const now = Date.now();
372
+
373
+ for await (const key of scanKeys('blocking:heartbeat:*')) {
374
+ const data = await redis.get(key);
375
+ if (!data) continue; // Key expired, already handled
376
+
377
+ const { timestamp } = JSON.parse(data);
378
+ const age = now - timestamp;
379
+
380
+ // Only clean up if >10 minutes old (very stale)
381
+ if (age > STALE_THRESHOLD) {
382
+ const coordinatorId = key.replace('blocking:heartbeat:', '');
383
+ console.log(`Cleaning up stale coordinator: ${coordinatorId} (${age}ms old)`);
384
+
385
+ await redis.del(key);
386
+ await redis.del(`blocking:signal:${coordinatorId}`);
387
+ await redis.del(`blocking:ack:${coordinatorId}`);
388
+ }
389
+ }
390
+ }
391
+ ```
392
+
393
+ **Why 10 Minutes?**
394
+ 1. Dead coordinator detected at 120s
395
+ 2. 3 warnings issued over 5 minutes (120s, 180s, 240s)
396
+ 3. Escalation at 240s (4 minutes)
397
+ 4. Cleanup runs at 600s (10 minutes)
398
+ 5. 10min >> 4min ensures coordinator already handled by timeout handler
399
+
400
+ **Safety Checks:**
401
+ ```typescript
402
+ // Additional safety: only clean up if TTL is -2 (expired)
403
+ const ttl = await redis.ttl(key);
404
+ if (ttl > 0) {
405
+ // Key still valid, skip cleanup
406
+ continue;
407
+ }
408
+
409
+ // Only clean up if no recent activity
410
+ const lastActivity = await redis.get(`activity:${coordinatorId}`);
411
+ if (lastActivity && Date.now() - parseInt(lastActivity) < STALE_THRESHOLD) {
412
+ // Recent activity detected, skip cleanup
413
+ continue;
414
+ }
415
+ ```
416
+
417
+ ---
418
+
419
+ ### Q9: What's the purpose of the circuit breaker?
420
+
421
+ **Answer:** The circuit breaker **prevents cascading failures** by failing fast when Redis is unavailable, then retrying with exponential backoff.
422
+
423
+ **Problem Without Circuit Breaker:**
424
+ ```
425
+ Redis down
426
+
427
+ Coordinator retries infinitely
428
+
429
+ Resources exhausted (threads, memory, connections)
430
+
431
+ Coordinator crashes
432
+
433
+ All coordinators crash (cascading failure)
434
+ ```
435
+
436
+ **Solution With Circuit Breaker:**
437
+ ```
438
+ Redis down
439
+
440
+ Retry with backoff [1s, 2s, 4s, 8s]
441
+
442
+ After 4 attempts (15s), circuit opens
443
+
444
+ Coordinator enters degraded mode
445
+
446
+ Redis recovers
447
+
448
+ Circuit closes automatically
449
+
450
+ Normal operation resumes
451
+ ```
452
+
453
+ **Implementation:**
454
+ ```typescript
455
+ class CircuitBreaker {
456
+ private consecutiveFailures = 0;
457
+ private isOpen = false;
458
+
459
+ async execute<T>(operation: () => Promise<T>): Promise<T> {
460
+ if (this.isOpen) {
461
+ throw new Error('Circuit breaker open: Redis unavailable');
462
+ }
463
+
464
+ const delays = [1000, 2000, 4000, 8000];
465
+
466
+ for (let attempt = 0; attempt < 4; attempt++) {
467
+ try {
468
+ const result = await operation();
469
+ this.consecutiveFailures = 0; // Reset on success
470
+ return result;
471
+ } catch (error) {
472
+ this.consecutiveFailures++;
473
+
474
+ if (attempt === 3) {
475
+ // Final attempt failed
476
+ if (this.consecutiveFailures >= 10) {
477
+ this.isOpen = true; // Open circuit after 10 consecutive failures
478
+ }
479
+ throw error;
480
+ }
481
+
482
+ await new Promise(r => setTimeout(r, delays[attempt]));
483
+ }
484
+ }
485
+
486
+ throw new Error('Unreachable');
487
+ }
488
+ }
489
+ ```
490
+
491
+ **Benefits:**
492
+ - **Fail Fast:** 15s vs. infinite retries
493
+ - **Resource Conservation:** No resource exhaustion
494
+ - **Auto-Recovery:** Circuit closes after Redis recovers
495
+ - **Graceful Degradation:** Coordinator enters safe mode
496
+
497
+ ---
498
+
499
+ ### Q10: How do I tune heartbeat intervals?
500
+
501
+ **Answer:** Heartbeat interval depends on **coordinator count** and **detection speed requirements**.
502
+
503
+ **Default Configuration (1-10 Coordinators):**
504
+ ```typescript
505
+ const HEARTBEAT_INTERVAL = 5000; // 5s
506
+ const HEARTBEAT_TTL = 90; // 90s (18× interval)
507
+ const DEAD_THRESHOLD = 120000; // 120s (24× interval)
508
+ ```
509
+
510
+ **High Coordinator Count (>100):**
511
+ ```typescript
512
+ // Reduce Redis load
513
+ const HEARTBEAT_INTERVAL = 10000; // 10s
514
+ const HEARTBEAT_TTL = 180; // 180s (18× interval)
515
+ const DEAD_THRESHOLD = 240000; // 240s (24× interval)
516
+ ```
517
+
518
+ **Fast Detection Required (<1min):**
519
+ ```typescript
520
+ // Faster detection at cost of Redis load
521
+ const HEARTBEAT_INTERVAL = 3000; // 3s
522
+ const HEARTBEAT_TTL = 60; // 60s (20× interval)
523
+ const DEAD_THRESHOLD = 90000; // 90s (30× interval)
524
+ ```
525
+
526
+ **Redis Load Calculation:**
527
+ ```
528
+ Heartbeats per day = (86400s / interval) × coordinator_count
529
+
530
+ Examples:
531
+ - 5s interval, 10 coordinators: 172,800 heartbeats/day
532
+ - 10s interval, 100 coordinators: 864,000 heartbeats/day
533
+ - 3s interval, 10 coordinators: 288,000 heartbeats/day
534
+ ```
535
+
536
+ **Tuning Guidelines:**
537
+ 1. **Start with defaults** (5s interval)
538
+ 2. **Monitor Redis load** (ops/sec, CPU)
539
+ 3. **If Redis >80% CPU**, increase interval to 10s
540
+ 4. **If detection >3min**, decrease interval to 3s
541
+ 5. **Always maintain:** TTL ≥ 18× interval, threshold ≥ 2× TTL
542
+
543
+ ---
544
+
545
+ ## Operational Questions
546
+
547
+ ### Q11: What Prometheus metrics should I monitor?
548
+
549
+ **Answer:** Monitor these 4 critical metrics with appropriate thresholds:
550
+
551
+ **1. Blocking Duration (Histogram)**
552
+ ```yaml
553
+ metric: blocking_coordination_duration_seconds
554
+ buckets: [10, 30, 60, 120, 300, 600, 1800]
555
+
556
+ Alerts:
557
+ - Info: P50 <60s (baseline)
558
+ - Warning: P95 >300s (5 minutes)
559
+ - Critical: P99 >1800s (30 minutes)
560
+
561
+ PromQL:
562
+ histogram_quantile(0.95, rate(blocking_coordination_duration_seconds_bucket[5m]))
563
+ ```
564
+
565
+ **2. Active Coordinators (Gauge)**
566
+ ```yaml
567
+ metric: active_coordinators
568
+ type: gauge
569
+
570
+ Alerts:
571
+ - Info: <10 coordinators
572
+ - Warning: 10-20 coordinators
573
+ - Critical: >20 coordinators
574
+
575
+ PromQL:
576
+ active_coordinators
577
+ ```
578
+
579
+ **3. Signal Delivery Latency (Histogram)**
580
+ ```yaml
581
+ metric: signal_delivery_latency_seconds
582
+ buckets: [0.1, 0.5, 1, 2, 5, 10]
583
+
584
+ Alerts:
585
+ - Target: P95 <5s
586
+ - Warning: P95 >10s
587
+
588
+ PromQL:
589
+ histogram_quantile(0.95, rate(signal_delivery_latency_seconds_bucket[5m]))
590
+ ```
591
+
592
+ **4. Timeout Events (Counter)**
593
+ ```yaml
594
+ metric: timeout_events_total
595
+ type: counter
596
+
597
+ Alerts:
598
+ - Warning: rate >0.5 events/sec
599
+ - Critical: rate >2 events/sec
600
+
601
+ PromQL:
602
+ rate(timeout_events_total[5m])
603
+ ```
604
+
605
+ **Grafana Dashboard Panels:**
606
+ 1. Blocking Duration (Time series, 3 lines: P50/P95/P99)
607
+ 2. Active Coordinators (Stat panel with trend sparkline)
608
+ 3. Signal Latency (Heatmap showing distribution)
609
+ 4. Timeout Rate (Bar gauge with color thresholds)
610
+
611
+ ---
612
+
613
+ ### Q12: How do I debug stuck coordinators?
614
+
615
+ **Answer:** Follow this systematic debugging approach:
616
+
617
+ **Step 1: Identify Stuck Coordinator**
618
+ ```bash
619
+ # List all coordinators
620
+ redis-cli KEYS "blocking:heartbeat:*"
621
+
622
+ # Check each heartbeat age
623
+ for key in $(redis-cli KEYS "blocking:heartbeat:*"); do
624
+ data=$(redis-cli GET "$key")
625
+ timestamp=$(echo "$data" | jq -r '.timestamp')
626
+ age=$(( $(date +%s)000 - timestamp ))
627
+ echo "$key: ${age}ms old"
628
+ done
629
+ ```
630
+
631
+ **Step 2: Check If Waiting for Signal**
632
+ ```bash
633
+ COORDINATOR_ID="coord-123"
634
+
635
+ # Check if signal exists
636
+ redis-cli GET "blocking:signal:$COORDINATOR_ID"
637
+
638
+ # If null → signal never sent (sender problem)
639
+ # If present → check signature
640
+ ```
641
+
642
+ **Step 3: Verify Signal Signature**
643
+ ```bash
644
+ # Get signal
645
+ SIGNAL=$(redis-cli GET "blocking:signal:$COORDINATOR_ID")
646
+
647
+ # Extract fields
648
+ SENDER=$(echo "$SIGNAL" | jq -r '.senderId')
649
+ RECEIVER=$(echo "$SIGNAL" | jq -r '.receiverId')
650
+ TYPE=$(echo "$SIGNAL" | jq -r '.type')
651
+ TIMESTAMP=$(echo "$SIGNAL" | jq -r '.timestamp')
652
+ SIGNATURE=$(echo "$SIGNAL" | jq -r '.signature')
653
+
654
+ # Calculate expected signature
655
+ SECRET="$BLOCKING_COORDINATION_SECRET"
656
+ PAYLOAD="${SENDER}:${RECEIVER}:${TYPE}:${TIMESTAMP}"
657
+ EXPECTED=$(echo -n "$PAYLOAD" | openssl dgst -sha256 -hmac "$SECRET" -hex | awk '{print $2}')
658
+
659
+ # Compare
660
+ if [ "$SIGNATURE" == "$EXPECTED" ]; then
661
+ echo "Signature valid ✅"
662
+ else
663
+ echo "Signature invalid ❌"
664
+ echo "Received: $SIGNATURE"
665
+ echo "Expected: $EXPECTED"
666
+ fi
667
+ ```
668
+
669
+ **Step 4: Check Coordinator Logs**
670
+ ```bash
671
+ # View last 100 lines
672
+ tail -100 /var/log/cfn-loop/coordinator-$COORDINATOR_ID.log
673
+
674
+ # Look for:
675
+ # - "Waiting for signal" (stuck in blockUntilSignal)
676
+ # - "Invalid signature" (HMAC mismatch)
677
+ # - "Redis error" (connection issues)
678
+ # - "Timeout" (should have timed out but didn't)
679
+ ```
680
+
681
+ **Step 5: Force Resolution**
682
+ ```bash
683
+ # Option 1: Resend signal
684
+ node scripts/resend-signal.js --receiver=$COORDINATOR_ID --type=wake
685
+
686
+ # Option 2: Force timeout
687
+ kill -SIGTERM $(pgrep -f "coordinator-$COORDINATOR_ID")
688
+
689
+ # Option 3: Manual cleanup
690
+ redis-cli DEL "blocking:signal:$COORDINATOR_ID"
691
+ redis-cli DEL "blocking:heartbeat:$COORDINATOR_ID"
692
+ ```
693
+
694
+ ---
695
+
696
+ ### Q13: When should I scale Redis?
697
+
698
+ **Answer:** Scale Redis when you hit these **resource or performance thresholds**:
699
+
700
+ **Scale Vertically (More Resources) When:**
701
+
702
+ **1. Memory >80% of maxmemory**
703
+ ```bash
704
+ # Check memory usage
705
+ redis-cli INFO memory | grep used_memory_human
706
+
707
+ # If >80%, increase maxmemory
708
+ redis-cli CONFIG SET maxmemory 16gb
709
+
710
+ # Or scale instance
711
+ # AWS ElastiCache: cache.m6g.xlarge → cache.m6g.2xlarge
712
+ ```
713
+
714
+ **2. CPU >70% sustained**
715
+ ```bash
716
+ # Check CPU
717
+ redis-cli INFO cpu
718
+
719
+ # If >70% for >5 minutes, scale instance
720
+ ```
721
+
722
+ **3. Network throughput >80% of limit**
723
+ ```bash
724
+ # Check network
725
+ redis-cli INFO stats | grep total_net_output_bytes
726
+
727
+ # If approaching instance network limit, scale to bigger instance
728
+ ```
729
+
730
+ **Scale Horizontally (Redis Cluster) When:**
731
+
732
+ **1. >1000 Coordinators**
733
+ ```bash
734
+ # Current: Single Redis instance
735
+ # Problem: Too many heartbeats (1000 × 5s = 200 heartbeats/sec)
736
+
737
+ # Solution: 3-node Redis Cluster
738
+ redis-cli --cluster create \
739
+ redis-1:6379 redis-2:6379 redis-3:6379 \
740
+ --cluster-replicas 1
741
+
742
+ # Distribute coordinators across shards
743
+ # - Coordinators 1-333 → shard 1
744
+ # - Coordinators 334-666 → shard 2
745
+ # - Coordinators 667-1000 → shard 3
746
+ ```
747
+
748
+ **2. P95 Latency >50ms**
749
+ ```bash
750
+ # Check latency
751
+ redis-cli --latency-history
752
+
753
+ # If P95 >50ms, scale horizontally
754
+ # Use Redis Cluster to distribute load
755
+ ```
756
+
757
+ **3. >10,000 keys**
758
+ ```bash
759
+ # Count keys
760
+ redis-cli DBSIZE
761
+
762
+ # If >10k keys, shard across cluster
763
+ # Use hash slots for distribution
764
+ ```
765
+
766
+ **Scaling Checklist:**
767
+ - [ ] Monitor memory, CPU, network, latency
768
+ - [ ] Set alerts: memory >80%, CPU >70%, latency P95 >50ms
769
+ - [ ] Scale vertically first (easier)
770
+ - [ ] Scale horizontally at >1000 coordinators
771
+ - [ ] Test failover before production
772
+ - [ ] Update coordinator configs to use cluster endpoints
773
+
774
+ ---
775
+
776
+ ### Q14: How do I test blocking coordination locally?
777
+
778
+ **Answer:** Use this **local development setup** for testing:
779
+
780
+ **Setup Redis**
781
+ ```bash
782
+ # Option 1: Docker (recommended)
783
+ docker run -d \
784
+ --name redis-dev \
785
+ -p 6379:6379 \
786
+ redis:7-alpine
787
+
788
+ # Option 2: Local install
789
+ brew install redis # macOS
790
+ sudo apt install redis # Ubuntu
791
+
792
+ redis-server
793
+ ```
794
+
795
+ **Set Environment Variables**
796
+ ```bash
797
+ # .env.development
798
+ cat > .env << 'EOF'
799
+ REDIS_URL=redis://localhost:6379
800
+ REDIS_PASSWORD=
801
+ BLOCKING_COORDINATION_SECRET=dev-secret-do-not-use-in-prod
802
+ NODE_ENV=development
803
+ HEARTBEAT_INTERVAL=5000
804
+ HEARTBEAT_TTL=90
805
+ DEAD_THRESHOLD=120000
806
+ EOF
807
+
808
+ source .env
809
+ ```
810
+
811
+ **Run Test Coordinators**
812
+ ```bash
813
+ # Terminal 1: Start coordinator A
814
+ DEBUG=blocking:* node tests/manual/coordinator-a.js
815
+
816
+ # Terminal 2: Start coordinator B
817
+ DEBUG=blocking:* node tests/manual/coordinator-b.js
818
+
819
+ # Terminal 3: Send signal
820
+ node tests/manual/send-signal.js --sender=coord-a --receiver=coord-b --type=wake
821
+ ```
822
+
823
+ **Unit Tests**
824
+ ```bash
825
+ # Run all blocking coordination tests
826
+ npm run test:blocking
827
+
828
+ # Run specific test
829
+ npm run test tests/blocking/signal-ack.test.ts
830
+
831
+ # Run with coverage
832
+ npm run test:coverage -- tests/blocking/
833
+ ```
834
+
835
+ **Integration Tests**
836
+ ```bash
837
+ # Test full flow (signal → ACK → timeout)
838
+ npm run test:integration:blocking
839
+
840
+ # Test chaos scenarios
841
+ npm run test:chaos:process-kill
842
+ npm run test:chaos:redis-failure
843
+ ```
844
+
845
+ **Manual Testing Script**
846
+ ```typescript
847
+ // tests/manual/blocking-flow.ts
848
+ import { BlockingCoordinator } from './src/cfn-loop/blocking-coordinator';
849
+
850
+ async function testBlockingFlow() {
851
+ // Start coordinator A
852
+ const coordA = new BlockingCoordinator('coord-a', {
853
+ timeout: 60000,
854
+ secret: process.env.BLOCKING_COORDINATION_SECRET!
855
+ });
856
+ await coordA.initialize();
857
+
858
+ // Start coordinator B
859
+ const coordB = new BlockingCoordinator('coord-b', {
860
+ timeout: 60000,
861
+ secret: process.env.BLOCKING_COORDINATION_SECRET!
862
+ });
863
+ await coordB.initialize();
864
+
865
+ // Coord B blocks
866
+ const blockPromise = coordB.blockUntilSignal();
867
+
868
+ // Coord A sends signal after 5s
869
+ setTimeout(async () => {
870
+ await coordA.sendSignal('coord-b', 'wake');
871
+ }, 5000);
872
+
873
+ // Wait for signal receipt
874
+ await blockPromise;
875
+ console.log('✅ Signal received, flow complete');
876
+
877
+ // Cleanup
878
+ await coordA.shutdown();
879
+ await coordB.shutdown();
880
+ }
881
+
882
+ testBlockingFlow().catch(console.error);
883
+ ```
884
+
885
+ ---
886
+
887
+ ### Q15: What are common production issues?
888
+
889
+ **Answer:** These are the **top 5 production issues** and solutions:
890
+
891
+ **1. Signal Delivery Failures (40% of issues)**
892
+
893
+ **Cause:**
894
+ - HMAC secret mismatch
895
+ - Clock skew between coordinators
896
+ - Network partition
897
+
898
+ **Solution:**
899
+ ```bash
900
+ # Verify secrets match
901
+ ansible all -m shell -a "echo \$BLOCKING_COORDINATION_SECRET | md5sum"
902
+
903
+ # Sync clocks
904
+ ansible all -m shell -a "sudo ntpdate -u pool.ntp.org"
905
+
906
+ # Check network
907
+ ansible all -m ping
908
+ ```
909
+
910
+ **2. Coordinator Death Not Detected (25% of issues)**
911
+
912
+ **Cause:**
913
+ - Timeout handler not running
914
+ - Heartbeat TTL too long
915
+ - Cleanup script misconfigured
916
+
917
+ **Solution:**
918
+ ```bash
919
+ # Verify timeout handler running
920
+ systemctl status coordinator-timeout-handler
921
+
922
+ # Check heartbeat TTL
923
+ redis-cli TTL "blocking:heartbeat:*" | sort -n | head -1
924
+
925
+ # Verify cleanup script schedule
926
+ systemctl list-timers | grep cleanup
927
+ ```
928
+
929
+ **3. Redis Performance Degradation (20% of issues)**
930
+
931
+ **Cause:**
932
+ - Too many coordinators (>100)
933
+ - KEYS command blocking Redis
934
+ - Memory >90% maxmemory
935
+
936
+ **Solution:**
937
+ ```bash
938
+ # Scale coordinators down
939
+ kubectl scale deployment coordinator --replicas=50
940
+
941
+ # Replace KEYS with SCAN in code
942
+ # Monitor memory
943
+ redis-cli INFO memory | grep used_memory_percentage
944
+
945
+ # Scale Redis
946
+ aws elasticache modify-cache-cluster --cache-node-type cache.m6g.2xlarge
947
+ ```
948
+
949
+ **4. Circuit Breaker Stuck Open (10% of issues)**
950
+
951
+ **Cause:**
952
+ - Redis auth failure
953
+ - Long Redis restart (>15s)
954
+ - Circuit breaker not resetting
955
+
956
+ **Solution:**
957
+ ```bash
958
+ # Verify Redis auth
959
+ redis-cli -a $REDIS_PASSWORD ping
960
+
961
+ # Manual circuit breaker reset
962
+ curl -X POST http://localhost:9090/circuit-breaker/reset
963
+
964
+ # Check auto-reset logic
965
+ grep "circuit.*reset" /var/log/cfn-loop/coordinator-*.log
966
+ ```
967
+
968
+ **5. Memory Leak in Coordinator (5% of issues)**
969
+
970
+ **Cause:**
971
+ - Event listeners not cleaned up
972
+ - Redis keys without TTL
973
+ - Promise chains not resolved
974
+
975
+ **Solution:**
976
+ ```bash
977
+ # Check memory growth
978
+ ps aux --sort=-rss | grep coordinator | head -5
979
+
980
+ # Heap snapshot
981
+ node --inspect coordinator.js
982
+ # chrome://inspect → Take heap snapshot
983
+
984
+ # Find keys without TTL
985
+ redis-cli --scan --pattern "blocking:*" | while read key; do
986
+ ttl=$(redis-cli TTL "$key")
987
+ if [ "$ttl" -eq -1 ]; then
988
+ echo "No TTL: $key"
989
+ fi
990
+ done
991
+ ```
992
+
993
+ ---
994
+
995
+ ## Advanced Questions
996
+
997
+ ### Q16: Can I use blocking coordination with multiple Redis instances?
998
+
999
+ **Answer:** Yes, use **Redis Cluster or Sentinel** for high availability:
1000
+
1001
+ **Redis Cluster (Sharding)**
1002
+ ```typescript
1003
+ import { Cluster } from 'ioredis';
1004
+
1005
+ const redis = new Cluster([
1006
+ { host: 'redis-1', port: 6379 },
1007
+ { host: 'redis-2', port: 6379 },
1008
+ { host: 'redis-3', port: 6379 }
1009
+ ]);
1010
+
1011
+ const coordinator = new BlockingCoordinator('coord-1', {
1012
+ redis, // Uses cluster client
1013
+ timeout: 600000
1014
+ });
1015
+ ```
1016
+
1017
+ **Redis Sentinel (Failover)**
1018
+ ```typescript
1019
+ import Redis from 'ioredis';
1020
+
1021
+ const redis = new Redis({
1022
+ sentinels: [
1023
+ { host: 'sentinel-1', port: 26379 },
1024
+ { host: 'sentinel-2', port: 26379 },
1025
+ { host: 'sentinel-3', port: 26379 }
1026
+ ],
1027
+ name: 'mymaster',
1028
+ password: process.env.REDIS_PASSWORD
1029
+ });
1030
+
1031
+ const coordinator = new BlockingCoordinator('coord-1', {
1032
+ redis,
1033
+ timeout: 600000
1034
+ });
1035
+ ```
1036
+
1037
+ **Trade-offs:**
1038
+ - ✅ **Pro:** High availability, auto-failover
1039
+ - ✅ **Pro:** Horizontal scaling (cluster)
1040
+ - ❌ **Con:** More complex setup
1041
+ - ❌ **Con:** Cross-slot commands not supported (cluster)
1042
+
1043
+ **Key Distribution in Cluster:**
1044
+ ```bash
1045
+ # Coordinators automatically distributed across shards
1046
+ blocking:heartbeat:coord-1 → slot 12345 → shard 1
1047
+ blocking:heartbeat:coord-2 → slot 54321 → shard 2
1048
+ blocking:heartbeat:coord-3 → slot 23456 → shard 3
1049
+ ```
1050
+
1051
+ ---
1052
+
1053
+ ### Q17: How do I implement custom signal types?
1054
+
1055
+ **Answer:** Extend the `Signal` interface with **typed metadata**:
1056
+
1057
+ **Define Custom Types**
1058
+ ```typescript
1059
+ // src/cfn-loop/signal-types.ts
1060
+ export enum SignalType {
1061
+ WAKE = 'wake',
1062
+ VALIDATE = 'validate',
1063
+ DECIDE = 'decide',
1064
+ CHECKPOINT = 'checkpoint'
1065
+ }
1066
+
1067
+ export interface BaseSignal {
1068
+ senderId: string;
1069
+ receiverId: string;
1070
+ type: SignalType;
1071
+ timestamp: number;
1072
+ signature?: string;
1073
+ }
1074
+
1075
+ export interface ValidateSignal extends BaseSignal {
1076
+ type: SignalType.VALIDATE;
1077
+ metadata: {
1078
+ validatorId: string;
1079
+ confidence: number;
1080
+ recommendations: string[];
1081
+ };
1082
+ }
1083
+
1084
+ export interface DecideSignal extends BaseSignal {
1085
+ type: SignalType.DECIDE;
1086
+ metadata: {
1087
+ decision: 'PROCEED' | 'DEFER' | 'ESCALATE';
1088
+ consensus: number;
1089
+ reasoning: string;
1090
+ };
1091
+ }
1092
+
1093
+ export type Signal = BaseSignal | ValidateSignal | DecideSignal;
1094
+ ```
1095
+
1096
+ **Custom Handler**
1097
+ ```typescript
1098
+ class CFNLoopCoordinator extends BlockingCoordinator {
1099
+ protected async handleSignal(signal: Signal): Promise<void> {
1100
+ switch (signal.type) {
1101
+ case SignalType.VALIDATE:
1102
+ return this.handleValidate(signal as ValidateSignal);
1103
+
1104
+ case SignalType.DECIDE:
1105
+ return this.handleDecide(signal as DecideSignal);
1106
+
1107
+ default:
1108
+ return super.handleSignal(signal);
1109
+ }
1110
+ }
1111
+
1112
+ private async handleValidate(signal: ValidateSignal): Promise<void> {
1113
+ const { validatorId, confidence, recommendations } = signal.metadata;
1114
+
1115
+ // Store validation result
1116
+ await this.redis.setex(
1117
+ `validation:${this.id}:${validatorId}`,
1118
+ 3600,
1119
+ JSON.stringify({ confidence, recommendations })
1120
+ );
1121
+
1122
+ // Check if all validators responded
1123
+ const results = await this.getAllValidationResults();
1124
+
1125
+ if (results.length >= this.expectedValidators) {
1126
+ const consensus = this.calculateConsensus(results);
1127
+
1128
+ // Send DECIDE signal
1129
+ await this.sendSignal('product-owner', SignalType.DECIDE, {
1130
+ decision: consensus >= 0.90 ? 'PROCEED' : 'DEFER',
1131
+ consensus,
1132
+ reasoning: `${results.length} validators, consensus ${consensus}`
1133
+ });
1134
+ }
1135
+ }
1136
+ }
1137
+ ```
1138
+
1139
+ **Signature Calculation with Metadata**
1140
+ ```typescript
1141
+ private signSignal(signal: Signal): string {
1142
+ const basePayload = `${signal.senderId}:${signal.receiverId}:${signal.type}:${signal.timestamp}`;
1143
+
1144
+ // Include metadata hash in signature
1145
+ let payload = basePayload;
1146
+ if ('metadata' in signal) {
1147
+ const metadataHash = crypto
1148
+ .createHash('sha256')
1149
+ .update(JSON.stringify(signal.metadata))
1150
+ .digest('hex');
1151
+ payload = `${basePayload}:${metadataHash}`;
1152
+ }
1153
+
1154
+ return crypto
1155
+ .createHmac('sha256', this.secret)
1156
+ .update(payload)
1157
+ .digest('hex');
1158
+ }
1159
+ ```
1160
+
1161
+ ---
1162
+
1163
+ ### Q18: Can blocking coordination work across data centers?
1164
+
1165
+ **Answer:** Yes, but requires **careful latency and partition handling**:
1166
+
1167
+ **Multi-DC Setup**
1168
+ ```typescript
1169
+ // Use Redis global replication
1170
+ const redis = new Redis.Cluster([
1171
+ // US East
1172
+ { host: 'redis-us-east-1', port: 6379 },
1173
+ { host: 'redis-us-east-2', port: 6379 },
1174
+
1175
+ // EU West
1176
+ { host: 'redis-eu-west-1', port: 6379 },
1177
+ { host: 'redis-eu-west-2', port: 6379 }
1178
+ ]);
1179
+
1180
+ const coordinator = new BlockingCoordinator('coord-us-1', {
1181
+ redis,
1182
+ timeout: 1800000, // 30min (longer for cross-DC latency)
1183
+ heartbeatInterval: 10000 // 10s (reduce cross-DC traffic)
1184
+ });
1185
+ ```
1186
+
1187
+ **Latency Considerations**
1188
+ ```
1189
+ Intra-DC latency: <1ms
1190
+ Cross-DC latency: 50-200ms
1191
+
1192
+ Heartbeat timing:
1193
+ - Interval: 10s (vs. 5s intra-DC)
1194
+ - TTL: 180s (vs. 90s intra-DC)
1195
+ - Dead threshold: 240s (vs. 120s intra-DC)
1196
+ ```
1197
+
1198
+ **Partition Handling**
1199
+ ```typescript
1200
+ class MultiDCCoordinator extends BlockingCoordinator {
1201
+ async blockUntilSignal(timeout?: number): Promise<void> {
1202
+ try {
1203
+ return await super.blockUntilSignal(timeout);
1204
+ } catch (error) {
1205
+ if (error.message.includes('Network partition')) {
1206
+ // Fallback to local coordinator in same DC
1207
+ return this.blockOnLocalCoordinator();
1208
+ }
1209
+ throw error;
1210
+ }
1211
+ }
1212
+
1213
+ private async blockOnLocalCoordinator(): Promise<void> {
1214
+ const localRedis = new Redis({ host: 'redis-local', port: 6379 });
1215
+ // Use local Redis during partition
1216
+ }
1217
+ }
1218
+ ```
1219
+
1220
+ **Trade-offs:**
1221
+ - ✅ **Pro:** Global coordination across DCs
1222
+ - ✅ **Pro:** Fault tolerance (DC failure)
1223
+ - ❌ **Con:** Higher latency (50-200ms)
1224
+ - ❌ **Con:** Partition risk (network split-brain)
1225
+ - ❌ **Con:** Complex conflict resolution
1226
+
1227
+ **Best Practice:** Keep coordinators within same DC, use async messaging for cross-DC coordination.
1228
+
1229
+ ---
1230
+
1231
+ ### Q19: How do I measure blocking coordination performance?
1232
+
1233
+ **Answer:** Track these **key performance indicators (KPIs)**:
1234
+
1235
+ **1. Blocking Duration (Primary KPI)**
1236
+ ```typescript
1237
+ // Measure time spent blocked
1238
+ const startTime = Date.now();
1239
+ await coordinator.blockUntilSignal();
1240
+ const duration = Date.now() - startTime;
1241
+
1242
+ blockingDurationHistogram.observe(duration / 1000);
1243
+
1244
+ // Targets:
1245
+ // P50 <60s, P95 <300s, P99 <1800s
1246
+ ```
1247
+
1248
+ **2. Signal Delivery Latency**
1249
+ ```typescript
1250
+ // Measure time from signal sent to ACK received
1251
+ const signalSentTime = Date.now();
1252
+ await coordinator.sendSignal('receiver', 'wake');
1253
+
1254
+ // In receiver:
1255
+ const signalReceivedTime = Date.now();
1256
+ const latency = signalReceivedTime - signalSentTime;
1257
+
1258
+ signalLatencyHistogram.observe(latency / 1000);
1259
+
1260
+ // Target: P95 <5s
1261
+ ```
1262
+
1263
+ **3. Coordinator Uptime**
1264
+ ```typescript
1265
+ // Track uptime percentage
1266
+ const uptimeSeconds = Date.now() - coordinator.startTime;
1267
+ const totalSeconds = Date.now() - systemStartTime;
1268
+ const uptimePercentage = (uptimeSeconds / totalSeconds) * 100;
1269
+
1270
+ coordinatorUptimeGauge.set(uptimePercentage);
1271
+
1272
+ // Target: >99.9% uptime
1273
+ ```
1274
+
1275
+ **4. Recovery Time (RTO)**
1276
+ ```typescript
1277
+ // Measure time from death to recovery
1278
+ const deathTime = Date.now(); // Coordinator killed
1279
+ // ... dead coordinator detected ...
1280
+ const recoveryTime = Date.now();
1281
+
1282
+ const rto = recoveryTime - deathTime;
1283
+ recoveryTimeHistogram.observe(rto / 1000);
1284
+
1285
+ // Target: P95 <10s
1286
+ ```
1287
+
1288
+ **5. Throughput (Signals/sec)**
1289
+ ```typescript
1290
+ // Track signal processing rate
1291
+ signalCounter.inc();
1292
+
1293
+ // Calculate rate
1294
+ const rate = await prometheusQuery(
1295
+ 'rate(signal_delivery_total[5m])'
1296
+ );
1297
+
1298
+ // Target: >100 signals/sec
1299
+ ```
1300
+
1301
+ **Benchmark Script**
1302
+ ```bash
1303
+ #!/bin/bash
1304
+ # benchmark-blocking-coordination.sh
1305
+
1306
+ # Start 10 coordinators
1307
+ for i in {1..10}; do
1308
+ node coordinator.js --id coord-$i &
1309
+ done
1310
+
1311
+ # Send 1000 signals
1312
+ for i in {1..1000}; do
1313
+ node send-signal.js --receiver coord-$(( RANDOM % 10 + 1 )) --type wake
1314
+ done
1315
+
1316
+ # Measure results
1317
+ DURATION=$(prometheus-query 'histogram_quantile(0.95, blocking_coordination_duration_seconds)')
1318
+ LATENCY=$(prometheus-query 'histogram_quantile(0.95, signal_delivery_latency_seconds)')
1319
+ THROUGHPUT=$(prometheus-query 'rate(signal_delivery_total[5m])')
1320
+
1321
+ echo "P95 Duration: ${DURATION}s"
1322
+ echo "P95 Latency: ${LATENCY}s"
1323
+ echo "Throughput: ${THROUGHPUT} signals/sec"
1324
+ ```
1325
+
1326
+ ---
1327
+
1328
+ ### Q20: What are the security best practices?
1329
+
1330
+ **Answer:** Follow these **security hardening guidelines**:
1331
+
1332
+ **1. HMAC Secret Management**
1333
+ ```bash
1334
+ # Generate cryptographically secure secret
1335
+ SECRET=$(openssl rand -hex 32) # 256-bit
1336
+
1337
+ # Store in Vault/Secrets Manager (never git)
1338
+ vault kv put secret/cfn-loop/blocking secret="$SECRET"
1339
+
1340
+ # Rotate every 90 days (production)
1341
+ # Use dual-secret strategy for zero-downtime rotation
1342
+ ```
1343
+
1344
+ **2. Network Security**
1345
+ ```bash
1346
+ # Isolate Redis network
1347
+ # AWS: Use VPC with security groups
1348
+ aws ec2 authorize-security-group-ingress \
1349
+ --group-id sg-redis \
1350
+ --protocol tcp \
1351
+ --port 6379 \
1352
+ --source-group sg-coordinators # Only coordinators can access
1353
+
1354
+ # Use TLS for Redis connections
1355
+ REDIS_URL=rediss://redis:6379 # Note: rediss:// (TLS)
1356
+ REDIS_TLS_CERT=/path/to/redis.crt
1357
+ ```
1358
+
1359
+ **3. Authentication & Authorization**
1360
+ ```bash
1361
+ # Redis authentication
1362
+ redis-cli CONFIG SET requirepass "$REDIS_PASSWORD"
1363
+
1364
+ # Use separate Redis users (Redis 6+)
1365
+ redis-cli ACL SETUSER coordinator \
1366
+ on >$COORDINATOR_PASSWORD \
1367
+ ~blocking:* \
1368
+ +get +set +setex +del +keys +scan
1369
+
1370
+ # Coordinators use limited ACL user
1371
+ REDIS_USER=coordinator
1372
+ REDIS_PASSWORD=$COORDINATOR_PASSWORD
1373
+ ```
1374
+
1375
+ **4. Input Validation**
1376
+ ```typescript
1377
+ // Validate signal structure
1378
+ function validateSignal(signal: any): signal is Signal {
1379
+ if (!signal.senderId || typeof signal.senderId !== 'string') {
1380
+ throw new Error('Invalid senderId');
1381
+ }
1382
+
1383
+ if (!signal.receiverId || typeof signal.receiverId !== 'string') {
1384
+ throw new Error('Invalid receiverId');
1385
+ }
1386
+
1387
+ if (!signal.timestamp || typeof signal.timestamp !== 'number') {
1388
+ throw new Error('Invalid timestamp');
1389
+ }
1390
+
1391
+ // Prevent timestamp replay attacks (>5min old)
1392
+ const age = Date.now() - signal.timestamp;
1393
+ if (age > 300000) {
1394
+ throw new Error('Signal timestamp too old');
1395
+ }
1396
+
1397
+ return true;
1398
+ }
1399
+ ```
1400
+
1401
+ **5. Rate Limiting**
1402
+ ```typescript
1403
+ // Prevent signal flooding
1404
+ class RateLimitedCoordinator extends BlockingCoordinator {
1405
+ private signalCounts = new Map<string, number>();
1406
+
1407
+ async sendSignal(receiverId: string, type: string): Promise<void> {
1408
+ const key = `${this.id}:${receiverId}`;
1409
+ const count = this.signalCounts.get(key) || 0;
1410
+
1411
+ // Max 100 signals per minute per receiver
1412
+ if (count >= 100) {
1413
+ throw new Error('Rate limit exceeded');
1414
+ }
1415
+
1416
+ this.signalCounts.set(key, count + 1);
1417
+
1418
+ setTimeout(() => {
1419
+ this.signalCounts.set(key, 0);
1420
+ }, 60000);
1421
+
1422
+ return super.sendSignal(receiverId, type);
1423
+ }
1424
+ }
1425
+ ```
1426
+
1427
+ **6. Audit Logging**
1428
+ ```typescript
1429
+ // Log all signal operations
1430
+ class AuditedCoordinator extends BlockingCoordinator {
1431
+ async sendSignal(receiverId: string, type: string): Promise<void> {
1432
+ await this.auditLog.write({
1433
+ event: 'signal_sent',
1434
+ senderId: this.id,
1435
+ receiverId,
1436
+ type,
1437
+ timestamp: Date.now(),
1438
+ sourceIp: this.getSourceIp()
1439
+ });
1440
+
1441
+ return super.sendSignal(receiverId, type);
1442
+ }
1443
+ }
1444
+ ```
1445
+
1446
+ ---
1447
+
1448
+ ## Troubleshooting Questions
1449
+
1450
+ ### Q21-Q30: See Troubleshooting Guide
1451
+
1452
+ For detailed troubleshooting scenarios, refer to:
1453
+ - **Q21-Q25:** Common issues → `/docs/training/troubleshooting-guide.md`
1454
+ - **Q26-Q30:** Advanced debugging → `/docs/training/troubleshooting-guide.md`
1455
+
1456
+ ---
1457
+
1458
+ ## Getting Help
1459
+
1460
+ ### Resources
1461
+
1462
+ **Documentation:**
1463
+ - Video Walkthrough: `/docs/training/video-walkthrough-script.md`
1464
+ - Troubleshooting Guide: `/docs/training/troubleshooting-guide.md`
1465
+ - Best Practices: `/docs/training/best-practices.md`
1466
+ - Interactive Tutorial: `/docs/training/interactive-tutorial.md`
1467
+
1468
+ **Support Channels:**
1469
+ - **Slack:** #blocking-coordination
1470
+ - **Email:** devops-team@example.com
1471
+ - **Office Hours:** Tuesdays 2pm PT
1472
+ - **On-call:** PagerDuty "CFN Loop" escalation policy
1473
+
1474
+ **Contributing:**
1475
+ - Report issues: https://github.com/example/claude-flow-novice/issues
1476
+ - Submit PRs: https://github.com/example/claude-flow-novice/pulls
1477
+ - Contribution guide: `/docs/CONTRIBUTING.md`
1478
+
1479
+ ---
1480
+
1481
+ **Last Updated:** 2025-10-10
1482
+ **Maintainer:** DevOps Team
1483
+ **Version:** 1.0