claude-flow-novice 2.15.5 → 2.15.7

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 (540) hide show
  1. package/.claude/cfn-extras/.gs-api-quota.json +16 -0
  2. package/.claude/cfn-extras/.gs-progress-state.json +22 -0
  3. package/.claude/cfn-extras/GOOGLE_SHEETS_IMPLEMENTATION_SUMMARY.md +414 -0
  4. package/.claude/cfn-extras/agents/google-sheets/README.md +114 -0
  5. package/.claude/cfn-extras/agents/google-sheets/google-sheets-advanced-analytics-specialist.md +288 -0
  6. package/.claude/cfn-extras/agents/google-sheets/google-sheets-api-integrator.md +127 -0
  7. package/.claude/cfn-extras/agents/google-sheets/google-sheets-automation-scripting-specialist.md +195 -0
  8. package/.claude/cfn-extras/agents/google-sheets/google-sheets-business-validator.md +179 -0
  9. package/.claude/cfn-extras/agents/google-sheets/google-sheets-collaboration-security-specialist.md +240 -0
  10. package/.claude/cfn-extras/agents/google-sheets/google-sheets-coordinator.md +214 -0
  11. package/.claude/cfn-extras/agents/google-sheets/google-sheets-data-transformer.md +127 -0
  12. package/.claude/cfn-extras/agents/google-sheets/google-sheets-data-validation-quality-specialist.md +177 -0
  13. package/.claude/cfn-extras/agents/google-sheets/google-sheets-data-validator.md +119 -0
  14. package/.claude/cfn-extras/agents/google-sheets/google-sheets-data-visualization-specialist.md +135 -0
  15. package/.claude/cfn-extras/agents/google-sheets/google-sheets-design-layout-specialist.md +109 -0
  16. package/.claude/cfn-extras/agents/google-sheets/google-sheets-formula-engineer.md +127 -0
  17. package/.claude/cfn-extras/agents/google-sheets/google-sheets-formula-engineering-specialist.md +138 -0
  18. package/.claude/cfn-extras/agents/google-sheets/google-sheets-formula-validator.md +128 -0
  19. package/.claude/cfn-extras/agents/google-sheets/google-sheets-generalist.md +645 -0
  20. package/.claude/cfn-extras/agents/google-sheets/google-sheets-integration-api-specialist.md +258 -0
  21. package/.claude/cfn-extras/agents/google-sheets/google-sheets-performance-analyst.md +125 -0
  22. package/.claude/cfn-extras/agents/google-sheets/google-sheets-performance-optimization-specialist.md +211 -0
  23. package/.claude/cfn-extras/agents/google-sheets/google-sheets-schema-designer.md +130 -0
  24. package/.claude/cfn-extras/agents/google-sheets/google-sheets-template-architecture-specialist.md +259 -0
  25. package/.claude/cfn-extras/docs/GOOGLE_SHEETS_CFN_LOOP.md +617 -0
  26. package/.claude/cfn-extras/skills/GOOGLE_SHEETS_SKILLS_README.md +453 -0
  27. package/.claude/cfn-extras/skills/google-sheets-api-coordinator/SKILL.md +272 -0
  28. package/.claude/cfn-extras/skills/google-sheets-api-coordinator/api-call.sh +254 -0
  29. package/.claude/cfn-extras/skills/google-sheets-api-coordinator/test.sh +174 -0
  30. package/.claude/cfn-extras/skills/google-sheets-api-coordinator/validate.sh +98 -0
  31. package/.claude/cfn-extras/skills/google-sheets-decomposition/SKILL.md +269 -0
  32. package/.claude/cfn-extras/skills/google-sheets-decomposition/decompose.sh +313 -0
  33. package/.claude/cfn-extras/skills/google-sheets-formula-builder/SKILL.md +237 -0
  34. package/.claude/cfn-extras/skills/google-sheets-formula-builder/build-formula.sh +220 -0
  35. package/.claude/cfn-extras/skills/google-sheets-formula-builder/test.sh +172 -0
  36. package/.claude/cfn-extras/skills/google-sheets-formula-builder/validate.sh +98 -0
  37. package/.claude/cfn-extras/skills/google-sheets-progress/SKILL.md +287 -0
  38. package/.claude/cfn-extras/skills/google-sheets-progress/test.sh +385 -0
  39. package/.claude/cfn-extras/skills/google-sheets-progress/track-progress.sh +516 -0
  40. package/.claude/cfn-extras/skills/google-sheets-progress/validate.sh +119 -0
  41. package/.claude/cfn-extras/skills/google-sheets-sprint-order/SKILL.md +277 -0
  42. package/.claude/cfn-extras/skills/google-sheets-sprint-order/order-sprints.sh +233 -0
  43. package/.claude/cfn-extras/skills/google-sheets-validation/SKILL.md +352 -0
  44. package/.claude/cfn-extras/skills/google-sheets-validation/test.sh +355 -0
  45. package/.claude/cfn-extras/skills/google-sheets-validation/validate-state.sh +374 -0
  46. package/.claude/cfn-extras/skills/google-sheets-validation/validate.sh +128 -0
  47. package/.claude/commands/cfn-context.md +10 -0
  48. package/.claude/commands/cfn-loop-cli.md +36 -15
  49. package/.claude/commands/google-sheets/google-sheets-loop.md +289 -0
  50. package/.claude/skills/cfn-agent-selector/SKILL.md +143 -0
  51. package/.claude/skills/cfn-agent-selector/select-agents.sh +94 -0
  52. package/.claude/skills/cfn-agent-spawning/get-agent-provider-env.sh +22 -2
  53. package/.claude/skills/cfn-docker-agent-spawning/spawn-agent.sh +21 -2
  54. package/.claude/skills/cfn-docker-loop-orchestration/orchestrate.sh +11 -5
  55. package/.claude/skills/cfn-docker-redis-coordination/MIGRATION_SUMMARY.md +348 -0
  56. package/.claude/skills/cfn-docker-redis-coordination/README.md +294 -0
  57. package/.claude/skills/cfn-docker-redis-coordination/jest.config.js +37 -0
  58. package/.claude/skills/cfn-docker-redis-coordination/package-lock.json +5259 -0
  59. package/.claude/skills/cfn-docker-redis-coordination/package.json +40 -0
  60. package/.claude/skills/cfn-docker-redis-coordination/src/coordinator.ts +801 -0
  61. package/.claude/skills/cfn-docker-redis-coordination/src/index.ts +42 -0
  62. package/.claude/skills/cfn-docker-redis-coordination/src/types.ts +351 -0
  63. package/.claude/skills/cfn-docker-redis-coordination/tests/coordinator.test.ts +1464 -0
  64. package/.claude/skills/cfn-docker-redis-coordination/tsconfig.json +30 -0
  65. package/.claude/skills/cfn-loop-orchestration/.eslintrc.js +56 -0
  66. package/.claude/skills/cfn-loop-orchestration/.prettierrc.json +18 -0
  67. package/.claude/skills/cfn-loop-orchestration/README.md +149 -41
  68. package/.claude/skills/cfn-loop-orchestration/helpers/gate-check.sh +39 -577
  69. package/.claude/skills/cfn-loop-orchestration/helpers/parse-test-results.sh +49 -270
  70. package/.claude/skills/cfn-loop-orchestration/jest.config.js +67 -0
  71. package/.claude/skills/cfn-loop-orchestration/orchestrate-wrapper.sh +268 -0
  72. package/.claude/skills/cfn-loop-orchestration/orchestrate.sh +91 -8
  73. package/.claude/skills/cfn-loop-orchestration/package-lock.json +5470 -0
  74. package/.claude/skills/cfn-loop-orchestration/package.json +49 -0
  75. package/.claude/skills/cfn-loop-orchestration/src/agent-spawner/agent-spawner.ts +34 -0
  76. package/.claude/skills/cfn-loop-orchestration/src/gate-checker/gate-checker.ts +36 -0
  77. package/.claude/skills/cfn-loop-orchestration/src/helpers/consensus.ts +87 -0
  78. package/.claude/skills/cfn-loop-orchestration/src/helpers/gate-check.ts +115 -0
  79. package/.claude/skills/cfn-loop-orchestration/src/helpers/parse-test-results.ts +372 -0
  80. package/.claude/skills/cfn-loop-orchestration/src/index.ts +14 -0
  81. package/.claude/skills/cfn-loop-orchestration/src/orchestrator/orchestrator.ts +31 -0
  82. package/.claude/skills/cfn-loop-orchestration/src/redis/redis-coordinator.ts +72 -0
  83. package/.claude/skills/cfn-loop-orchestration/src/types.ts +188 -0
  84. package/.claude/skills/cfn-loop-orchestration/src/utils/logger.ts +32 -0
  85. package/.claude/skills/cfn-loop-orchestration/tests/consensus.test.ts +142 -0
  86. package/.claude/skills/cfn-loop-orchestration/tests/deliverable-verifier.test.ts +199 -0
  87. package/.claude/skills/cfn-loop-orchestration/tests/gate-check.test.ts +325 -0
  88. package/.claude/skills/cfn-loop-orchestration/tests/iteration-manager.test.ts +132 -0
  89. package/.claude/skills/cfn-loop-orchestration/tests/parse-test-results.test.ts +382 -0
  90. package/.claude/skills/cfn-loop-orchestration/tests/setup.ts +22 -0
  91. package/.claude/skills/cfn-loop-orchestration/tests/timeout-calculator.test.ts +118 -0
  92. package/.claude/skills/cfn-loop-orchestration/tests/types.test.ts +132 -0
  93. package/.claude/skills/cfn-loop-orchestration/tsconfig.json +54 -0
  94. package/.claude/skills/cfn-redis-coordination/bash-wrappers/store-context.sh +23 -0
  95. package/.claude/skills/cfn-redis-coordination/coverage/clover.xml +1447 -0
  96. package/.claude/skills/cfn-redis-coordination/coverage/coverage-final.json +13 -0
  97. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/agent-logger.ts.html +1423 -0
  98. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/agent-recovery.ts.html +1447 -0
  99. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/base.css +224 -0
  100. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/block-navigation.js +87 -0
  101. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/completion-reporter.ts.html +1273 -0
  102. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/context-manager.ts.html +1066 -0
  103. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/favicon.png +0 -0
  104. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/index.html +281 -0
  105. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/mode-detector.ts.html +550 -0
  106. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/prettify.css +1 -0
  107. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/prettify.js +2 -0
  108. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/redis-client.ts.html +2047 -0
  109. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/result-collector.ts.html +1396 -0
  110. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  111. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/sorter.js +210 -0
  112. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/swarm-manager.ts.html +1567 -0
  113. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/task-analyzer.ts.html +1297 -0
  114. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/task-executor.ts.html +1354 -0
  115. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/types.ts.html +790 -0
  116. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/waiting-coordinator.ts.html +1846 -0
  117. package/.claude/skills/cfn-redis-coordination/coverage/lcov.info +2650 -0
  118. package/.claude/skills/cfn-redis-coordination/dist/agent-logger.d.ts +92 -0
  119. package/.claude/skills/cfn-redis-coordination/dist/agent-logger.d.ts.map +1 -0
  120. package/.claude/skills/cfn-redis-coordination/dist/agent-logger.js +329 -0
  121. package/.claude/skills/cfn-redis-coordination/dist/agent-logger.js.map +1 -0
  122. package/.claude/skills/cfn-redis-coordination/dist/agent-recovery.d.ts +75 -0
  123. package/.claude/skills/cfn-redis-coordination/dist/agent-recovery.d.ts.map +1 -0
  124. package/.claude/skills/cfn-redis-coordination/dist/agent-recovery.js +302 -0
  125. package/.claude/skills/cfn-redis-coordination/dist/agent-recovery.js.map +1 -0
  126. package/.claude/skills/cfn-redis-coordination/dist/completion-reporter.d.ts +58 -0
  127. package/.claude/skills/cfn-redis-coordination/dist/completion-reporter.d.ts.map +1 -0
  128. package/.claude/skills/cfn-redis-coordination/dist/completion-reporter.js +237 -0
  129. package/.claude/skills/cfn-redis-coordination/dist/completion-reporter.js.map +1 -0
  130. package/.claude/skills/cfn-redis-coordination/dist/context-manager.d.ts +63 -0
  131. package/.claude/skills/cfn-redis-coordination/dist/context-manager.d.ts.map +1 -0
  132. package/.claude/skills/cfn-redis-coordination/dist/context-manager.js +230 -0
  133. package/.claude/skills/cfn-redis-coordination/dist/context-manager.js.map +1 -0
  134. package/.claude/skills/cfn-redis-coordination/dist/index.d.ts +45 -0
  135. package/.claude/skills/cfn-redis-coordination/dist/index.d.ts.map +1 -0
  136. package/.claude/skills/cfn-redis-coordination/dist/index.js +114 -0
  137. package/.claude/skills/cfn-redis-coordination/dist/index.js.map +1 -0
  138. package/.claude/skills/cfn-redis-coordination/dist/mode-detector.d.ts +31 -0
  139. package/.claude/skills/cfn-redis-coordination/dist/mode-detector.d.ts.map +1 -0
  140. package/.claude/skills/cfn-redis-coordination/dist/mode-detector.js +185 -0
  141. package/.claude/skills/cfn-redis-coordination/dist/mode-detector.js.map +1 -0
  142. package/.claude/skills/cfn-redis-coordination/dist/redis-client.d.ts +191 -0
  143. package/.claude/skills/cfn-redis-coordination/dist/redis-client.d.ts.map +1 -0
  144. package/.claude/skills/cfn-redis-coordination/dist/redis-client.js +509 -0
  145. package/.claude/skills/cfn-redis-coordination/dist/redis-client.js.map +1 -0
  146. package/.claude/skills/cfn-redis-coordination/dist/result-collector.d.ts +75 -0
  147. package/.claude/skills/cfn-redis-coordination/dist/result-collector.d.ts.map +1 -0
  148. package/.claude/skills/cfn-redis-coordination/dist/result-collector.js +281 -0
  149. package/.claude/skills/cfn-redis-coordination/dist/result-collector.js.map +1 -0
  150. package/.claude/skills/cfn-redis-coordination/dist/swarm-manager.d.ts +75 -0
  151. package/.claude/skills/cfn-redis-coordination/dist/swarm-manager.d.ts.map +1 -0
  152. package/.claude/skills/cfn-redis-coordination/dist/swarm-manager.js +354 -0
  153. package/.claude/skills/cfn-redis-coordination/dist/swarm-manager.js.map +1 -0
  154. package/.claude/skills/cfn-redis-coordination/dist/task-analyzer.d.ts +62 -0
  155. package/.claude/skills/cfn-redis-coordination/dist/task-analyzer.d.ts.map +1 -0
  156. package/.claude/skills/cfn-redis-coordination/dist/task-analyzer.js +305 -0
  157. package/.claude/skills/cfn-redis-coordination/dist/task-analyzer.js.map +1 -0
  158. package/.claude/skills/cfn-redis-coordination/dist/task-executor.d.ts +97 -0
  159. package/.claude/skills/cfn-redis-coordination/dist/task-executor.d.ts.map +1 -0
  160. package/.claude/skills/cfn-redis-coordination/dist/task-executor.js +283 -0
  161. package/.claude/skills/cfn-redis-coordination/dist/task-executor.js.map +1 -0
  162. package/.claude/skills/cfn-redis-coordination/dist/types.d.ts +176 -0
  163. package/.claude/skills/cfn-redis-coordination/dist/types.d.ts.map +1 -0
  164. package/.claude/skills/cfn-redis-coordination/dist/types.js +81 -0
  165. package/.claude/skills/cfn-redis-coordination/dist/types.js.map +1 -0
  166. package/.claude/skills/cfn-redis-coordination/dist/waiting-coordinator.d.ts +86 -0
  167. package/.claude/skills/cfn-redis-coordination/dist/waiting-coordinator.d.ts.map +1 -0
  168. package/.claude/skills/cfn-redis-coordination/dist/waiting-coordinator.js +419 -0
  169. package/.claude/skills/cfn-redis-coordination/dist/waiting-coordinator.js.map +1 -0
  170. package/.claude/skills/cfn-redis-coordination/docs/migration/PHASE_3_REDIS_COORDINATION_COMPLETION_REPORT.md +553 -0
  171. package/.claude/skills/cfn-redis-coordination/jest.config.js +23 -0
  172. package/.claude/skills/cfn-redis-coordination/package-lock.json +5272 -0
  173. package/.claude/skills/cfn-redis-coordination/package.json +45 -0
  174. package/.claude/skills/cfn-redis-coordination/redis-cli-wrapper.sh +21 -8
  175. package/.claude/skills/cfn-redis-coordination/src/agent-logger.ts +446 -0
  176. package/.claude/skills/cfn-redis-coordination/src/agent-recovery.ts +454 -0
  177. package/.claude/skills/cfn-redis-coordination/src/completion-reporter.ts +396 -0
  178. package/.claude/skills/cfn-redis-coordination/src/context-manager.ts +327 -0
  179. package/.claude/skills/cfn-redis-coordination/src/index.ts +82 -0
  180. package/.claude/skills/cfn-redis-coordination/src/mode-detector.ts +155 -0
  181. package/.claude/skills/cfn-redis-coordination/src/redis/redis-client.ts +305 -0
  182. package/.claude/skills/cfn-redis-coordination/src/redis/redis-functions.ts +283 -0
  183. package/.claude/skills/cfn-redis-coordination/src/redis-client.ts +654 -0
  184. package/.claude/skills/cfn-redis-coordination/src/result-collector.ts +437 -0
  185. package/.claude/skills/cfn-redis-coordination/src/swarm-manager.ts +494 -0
  186. package/.claude/skills/cfn-redis-coordination/src/task-analyzer.ts +404 -0
  187. package/.claude/skills/cfn-redis-coordination/src/task-executor.ts +423 -0
  188. package/.claude/skills/cfn-redis-coordination/src/types.ts +235 -0
  189. package/.claude/skills/cfn-redis-coordination/src/waiting-coordinator.ts +587 -0
  190. package/.claude/skills/cfn-redis-coordination/test-connection-attempts.js +70 -0
  191. package/.claude/skills/cfn-redis-coordination/test-mode-simple.js +121 -0
  192. package/.claude/skills/cfn-redis-coordination/test-redis-check.js +84 -0
  193. package/.claude/skills/cfn-redis-coordination/test-task-mode-redis.cjs +391 -0
  194. package/.claude/skills/cfn-redis-coordination/tests/coordination.test.ts +788 -0
  195. package/.claude/skills/cfn-redis-coordination/tsconfig.json +31 -0
  196. package/claude-assets/agents/cfn-dev-team/coordinators/cfn-frontend-coordinator.md +13 -72
  197. package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md +172 -62
  198. package/claude-assets/agents/cfn-dev-team/coordinators/consensus-builder.md +465 -508
  199. package/claude-assets/agents/cfn-dev-team/coordinators/handoff-coordinator.md +733 -743
  200. package/claude-assets/agents/cfn-dev-team/coordinators/multi-sprint-coordinator.md +13 -79
  201. package/claude-assets/agents/cfn-dev-team/dev-ops/docker-specialist.md +13 -18
  202. package/claude-assets/agents/cfn-dev-team/dev-ops/kubernetes-specialist.md +13 -18
  203. package/claude-assets/agents/cfn-dev-team/developers/api-gateway-specialist.md +13 -18
  204. package/claude-assets/agents/cfn-dev-team/developers/backend-developer.md +15 -17
  205. package/claude-assets/agents/cfn-dev-team/developers/data/data-engineer.md +15 -17
  206. package/claude-assets/agents/cfn-dev-team/developers/database/database-architect.md +15 -14
  207. package/claude-assets/agents/cfn-dev-team/developers/frontend/mobile-dev.md +15 -17
  208. package/claude-assets/agents/cfn-dev-team/developers/frontend/react-frontend-engineer.md +15 -17
  209. package/claude-assets/agents/cfn-dev-team/developers/frontend/typescript-specialist.md +15 -17
  210. package/claude-assets/agents/cfn-dev-team/developers/frontend/ui-designer.md +23 -30
  211. package/claude-assets/agents/cfn-dev-team/developers/graphql-specialist.md +13 -18
  212. package/claude-assets/agents/cfn-dev-team/developers/rust-developer.md +13 -18
  213. package/claude-assets/agents/cfn-dev-team/reviewers/code-reviewer.md +312 -317
  214. package/claude-assets/agents/cfn-dev-team/reviewers/quality/code-quality-validator.md +23 -20
  215. package/claude-assets/agents/cfn-dev-team/reviewers/quality/perf-analyzer.md +23 -20
  216. package/claude-assets/agents/cfn-dev-team/reviewers/quality/performance-benchmarker.md +23 -20
  217. package/claude-assets/agents/cfn-dev-team/reviewers/quality/security-specialist.md +23 -20
  218. package/claude-assets/agents/cfn-dev-team/testers/api-testing-specialist.md +16 -21
  219. package/claude-assets/agents/cfn-dev-team/testers/chaos-engineering-specialist.md +15 -20
  220. package/claude-assets/agents/cfn-dev-team/testers/contract-tester.md +718 -737
  221. package/claude-assets/agents/cfn-dev-team/testers/integration-tester.md +817 -828
  222. package/claude-assets/agents/cfn-dev-team/testers/interaction-tester.md +15 -20
  223. package/claude-assets/agents/cfn-dev-team/testers/load-testing-specialist.md +8 -9
  224. package/claude-assets/agents/cfn-dev-team/testers/mutation-testing-specialist.md +668 -684
  225. package/claude-assets/agents/cfn-dev-team/testers/playwright-tester.md +15 -20
  226. package/claude-assets/agents/cfn-dev-team/testers/tester.md +248 -253
  227. package/claude-assets/agents/cfn-dev-team/utility/epic-creator.md +13 -18
  228. package/claude-assets/agents/cfn-dev-team/utility/memory-leak-specialist.md +13 -18
  229. package/claude-assets/agents/cfn-dev-team/utility/z-ai-specialist.md +13 -18
  230. package/claude-assets/agents/custom/cfn-redis-operations.md +530 -0
  231. package/claude-assets/agents/custom/cfn-system-expert.md +77 -0
  232. package/claude-assets/cfn-extras/.gs-api-quota.json +16 -0
  233. package/claude-assets/cfn-extras/.gs-progress-state.json +22 -0
  234. package/claude-assets/cfn-extras/GOOGLE_SHEETS_IMPLEMENTATION_SUMMARY.md +414 -0
  235. package/claude-assets/cfn-extras/agents/google-sheets/README.md +114 -0
  236. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-advanced-analytics-specialist.md +288 -0
  237. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-api-integrator.md +127 -0
  238. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-automation-scripting-specialist.md +195 -0
  239. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-business-validator.md +179 -0
  240. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-collaboration-security-specialist.md +240 -0
  241. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-coordinator.md +214 -0
  242. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-data-transformer.md +127 -0
  243. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-data-validation-quality-specialist.md +177 -0
  244. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-data-validator.md +119 -0
  245. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-data-visualization-specialist.md +135 -0
  246. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-design-layout-specialist.md +109 -0
  247. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-formula-engineer.md +127 -0
  248. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-formula-engineering-specialist.md +138 -0
  249. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-formula-validator.md +128 -0
  250. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-generalist.md +645 -0
  251. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-integration-api-specialist.md +258 -0
  252. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-performance-analyst.md +125 -0
  253. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-performance-optimization-specialist.md +211 -0
  254. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-schema-designer.md +130 -0
  255. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-template-architecture-specialist.md +259 -0
  256. package/claude-assets/cfn-extras/docs/GOOGLE_SHEETS_CFN_LOOP.md +617 -0
  257. package/claude-assets/cfn-extras/skills/GOOGLE_SHEETS_SKILLS_README.md +453 -0
  258. package/claude-assets/cfn-extras/skills/google-sheets-api-coordinator/SKILL.md +272 -0
  259. package/claude-assets/cfn-extras/skills/google-sheets-api-coordinator/api-call.sh +254 -0
  260. package/claude-assets/cfn-extras/skills/google-sheets-api-coordinator/test.sh +174 -0
  261. package/claude-assets/cfn-extras/skills/google-sheets-api-coordinator/validate.sh +98 -0
  262. package/claude-assets/cfn-extras/skills/google-sheets-decomposition/SKILL.md +269 -0
  263. package/claude-assets/cfn-extras/skills/google-sheets-decomposition/decompose.sh +313 -0
  264. package/claude-assets/cfn-extras/skills/google-sheets-formula-builder/SKILL.md +237 -0
  265. package/claude-assets/cfn-extras/skills/google-sheets-formula-builder/build-formula.sh +220 -0
  266. package/claude-assets/cfn-extras/skills/google-sheets-formula-builder/test.sh +172 -0
  267. package/claude-assets/cfn-extras/skills/google-sheets-formula-builder/validate.sh +98 -0
  268. package/claude-assets/cfn-extras/skills/google-sheets-progress/SKILL.md +287 -0
  269. package/claude-assets/cfn-extras/skills/google-sheets-progress/test.sh +385 -0
  270. package/claude-assets/cfn-extras/skills/google-sheets-progress/track-progress.sh +516 -0
  271. package/claude-assets/cfn-extras/skills/google-sheets-progress/validate.sh +119 -0
  272. package/claude-assets/cfn-extras/skills/google-sheets-sprint-order/SKILL.md +277 -0
  273. package/claude-assets/cfn-extras/skills/google-sheets-sprint-order/order-sprints.sh +233 -0
  274. package/claude-assets/cfn-extras/skills/google-sheets-validation/SKILL.md +352 -0
  275. package/claude-assets/cfn-extras/skills/google-sheets-validation/test.sh +355 -0
  276. package/claude-assets/cfn-extras/skills/google-sheets-validation/validate-state.sh +374 -0
  277. package/claude-assets/cfn-extras/skills/google-sheets-validation/validate.sh +128 -0
  278. package/claude-assets/commands/cfn-context.md +10 -0
  279. package/claude-assets/commands/cfn-loop-cli.md +36 -15
  280. package/claude-assets/commands/google-sheets/google-sheets-loop.md +289 -0
  281. package/claude-assets/hooks/cfn-pre-execution/SESSION_START_README.md +87 -0
  282. package/claude-assets/hooks/cfn-pre-execution/TEST_SESSION_START.md +128 -0
  283. package/claude-assets/hooks/cfn-pre-execution/session-start-context.sh +111 -0
  284. package/claude-assets/skills/cfn-agent-selection-with-fallback/INTEGRATION_EXAMPLE.md +209 -0
  285. package/claude-assets/skills/cfn-agent-selection-with-fallback/README.md +130 -0
  286. package/claude-assets/skills/cfn-agent-selection-with-fallback/SKILL.md +243 -0
  287. package/claude-assets/skills/cfn-agent-selection-with-fallback/agent-mappings.json +142 -0
  288. package/claude-assets/skills/cfn-agent-selection-with-fallback/select-agents.sh +173 -0
  289. package/claude-assets/skills/cfn-agent-selection-with-fallback/task-classifier.sh +71 -0
  290. package/claude-assets/skills/cfn-agent-selection-with-fallback/test-agent-selection.sh +282 -0
  291. package/claude-assets/skills/cfn-agent-selector/SKILL.md +143 -0
  292. package/claude-assets/skills/cfn-agent-selector/select-agents.sh +94 -0
  293. package/claude-assets/skills/cfn-agent-spawning/get-agent-provider-env.sh +22 -2
  294. package/claude-assets/skills/cfn-docker-agent-spawning/spawn-agent.sh +21 -2
  295. package/claude-assets/skills/cfn-docker-coordination/.eslintrc.json +33 -0
  296. package/claude-assets/skills/cfn-docker-coordination/README.md +349 -0
  297. package/claude-assets/skills/cfn-docker-coordination/docker-helpers.sh +433 -0
  298. package/claude-assets/skills/cfn-docker-coordination/jest.config.js +25 -0
  299. package/claude-assets/skills/cfn-docker-coordination/package-lock.json +6827 -0
  300. package/claude-assets/skills/cfn-docker-coordination/package.json +38 -0
  301. package/claude-assets/skills/cfn-docker-coordination/src/agent-container.ts +471 -0
  302. package/claude-assets/skills/cfn-docker-coordination/src/docker-client.ts +483 -0
  303. package/claude-assets/skills/cfn-docker-coordination/src/health-checker.ts +418 -0
  304. package/claude-assets/skills/cfn-docker-coordination/src/index.ts +45 -0
  305. package/claude-assets/skills/cfn-docker-coordination/src/network-manager.ts +377 -0
  306. package/claude-assets/skills/cfn-docker-coordination/src/types.ts +412 -0
  307. package/claude-assets/skills/cfn-docker-coordination/src/volume-manager.ts +389 -0
  308. package/claude-assets/skills/cfn-docker-coordination/tests/agent-container.test.ts +379 -0
  309. package/claude-assets/skills/cfn-docker-coordination/tests/docker-client.test.ts +345 -0
  310. package/claude-assets/skills/cfn-docker-coordination/tests/health-checker.test.ts +535 -0
  311. package/claude-assets/skills/cfn-docker-coordination/tests/integration.test.ts +193 -0
  312. package/claude-assets/skills/cfn-docker-coordination/tests/network-manager.test.ts +352 -0
  313. package/claude-assets/skills/cfn-docker-coordination/tests/setup.ts +36 -0
  314. package/claude-assets/skills/cfn-docker-coordination/tsconfig.json +29 -0
  315. package/claude-assets/skills/cfn-docker-logging/INTEGRATION.md +268 -0
  316. package/claude-assets/skills/cfn-docker-logging/SAMPLE_OUTPUTS.md +237 -0
  317. package/claude-assets/skills/cfn-docker-logging/SKILL.md +442 -0
  318. package/claude-assets/skills/cfn-docker-logging/capture-container-logs.sh +120 -0
  319. package/claude-assets/skills/cfn-docker-logging/enable-logging.sh +430 -0
  320. package/claude-assets/skills/cfn-docker-logging/init-hybrid-logging.sh +210 -0
  321. package/claude-assets/skills/cfn-docker-logging/queries/analytics-summary.sh +87 -0
  322. package/claude-assets/skills/cfn-docker-logging/queries/query-agent-timeline.sh +51 -0
  323. package/claude-assets/skills/cfn-docker-logging/queries/query-consensus-history.sh +56 -0
  324. package/claude-assets/skills/cfn-docker-logging/queries/query-coordination-timeline.sh +39 -0
  325. package/claude-assets/skills/cfn-docker-logging/queries/query-failed-containers.sh +40 -0
  326. package/claude-assets/skills/cfn-docker-logging/queries/query-gate-checks.sh +39 -0
  327. package/claude-assets/skills/cfn-docker-logging/schema.sql +111 -0
  328. package/claude-assets/skills/cfn-docker-logging/sqlite-helpers.sh +240 -0
  329. package/claude-assets/skills/cfn-docker-logging/test-hybrid-logging.sh +331 -0
  330. package/claude-assets/skills/cfn-docker-loop-orchestration/orchestrate.sh +11 -5
  331. package/claude-assets/skills/cfn-docker-redis-coordination/MIGRATION_SUMMARY.md +348 -0
  332. package/claude-assets/skills/cfn-docker-redis-coordination/README.md +294 -0
  333. package/claude-assets/skills/cfn-docker-redis-coordination/jest.config.js +37 -0
  334. package/claude-assets/skills/cfn-docker-redis-coordination/package-lock.json +5259 -0
  335. package/claude-assets/skills/cfn-docker-redis-coordination/package.json +40 -0
  336. package/claude-assets/skills/cfn-docker-redis-coordination/src/coordinator.ts +801 -0
  337. package/claude-assets/skills/cfn-docker-redis-coordination/src/index.ts +42 -0
  338. package/claude-assets/skills/cfn-docker-redis-coordination/src/types.ts +351 -0
  339. package/claude-assets/skills/cfn-docker-redis-coordination/tests/coordinator.test.ts +1464 -0
  340. package/claude-assets/skills/cfn-docker-redis-coordination/tsconfig.json +30 -0
  341. package/claude-assets/skills/cfn-error-logging/.eslintrc.json +57 -0
  342. package/claude-assets/skills/cfn-error-logging/.prettierrc.json +10 -0
  343. package/claude-assets/skills/cfn-error-logging/MIGRATION_SUMMARY.md +485 -0
  344. package/claude-assets/skills/cfn-error-logging/package.json +47 -0
  345. package/claude-assets/skills/cfn-error-logging/src/error-logger.ts +1042 -0
  346. package/claude-assets/skills/cfn-error-logging/src/index.ts +12 -0
  347. package/claude-assets/skills/cfn-error-logging/src/types.ts +456 -0
  348. package/claude-assets/skills/cfn-error-logging/tests/error-logger.test.ts +1302 -0
  349. package/claude-assets/skills/cfn-error-logging/tsconfig.json +38 -0
  350. package/claude-assets/skills/cfn-loop-orchestration/.eslintrc.js +56 -0
  351. package/claude-assets/skills/cfn-loop-orchestration/.prettierrc.json +18 -0
  352. package/claude-assets/skills/cfn-loop-orchestration/README.md +149 -41
  353. package/claude-assets/skills/cfn-loop-orchestration/helpers/gate-check.sh +39 -577
  354. package/claude-assets/skills/cfn-loop-orchestration/helpers/parse-test-results.sh +49 -270
  355. package/claude-assets/skills/cfn-loop-orchestration/jest.config.js +67 -0
  356. package/claude-assets/skills/cfn-loop-orchestration/orchestrate-wrapper.sh +268 -0
  357. package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh +91 -8
  358. package/claude-assets/skills/cfn-loop-orchestration/package-lock.json +5470 -0
  359. package/claude-assets/skills/cfn-loop-orchestration/package.json +49 -0
  360. package/claude-assets/skills/cfn-loop-orchestration/src/agent-spawner/agent-spawner.ts +34 -0
  361. package/claude-assets/skills/cfn-loop-orchestration/src/gate-checker/gate-checker.ts +36 -0
  362. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/gate-check.ts +115 -0
  363. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/parse-test-results.ts +372 -0
  364. package/claude-assets/skills/cfn-loop-orchestration/src/index.ts +14 -0
  365. package/claude-assets/skills/cfn-loop-orchestration/src/orchestrator/orchestrator.ts +31 -0
  366. package/claude-assets/skills/cfn-loop-orchestration/src/redis/redis-coordinator.ts +72 -0
  367. package/claude-assets/skills/cfn-loop-orchestration/src/types.ts +188 -0
  368. package/claude-assets/skills/cfn-loop-orchestration/src/utils/logger.ts +32 -0
  369. package/claude-assets/skills/cfn-loop-orchestration/tests/consensus.test.ts +142 -0
  370. package/claude-assets/skills/cfn-loop-orchestration/tests/deliverable-verifier.test.ts +199 -0
  371. package/claude-assets/skills/cfn-loop-orchestration/tests/gate-check.test.ts +325 -0
  372. package/claude-assets/skills/cfn-loop-orchestration/tests/iteration-manager.test.ts +132 -0
  373. package/claude-assets/skills/cfn-loop-orchestration/tests/parse-test-results.test.ts +382 -0
  374. package/claude-assets/skills/cfn-loop-orchestration/tests/setup.ts +22 -0
  375. package/claude-assets/skills/cfn-loop-orchestration/tests/timeout-calculator.test.ts +118 -0
  376. package/claude-assets/skills/cfn-loop-orchestration/tests/types.test.ts +132 -0
  377. package/claude-assets/skills/cfn-loop-orchestration/tsconfig.json +54 -0
  378. package/claude-assets/skills/cfn-redis-coordination/bash-wrappers/store-context.sh +23 -0
  379. package/claude-assets/skills/cfn-redis-coordination/coverage/clover.xml +1447 -0
  380. package/claude-assets/skills/cfn-redis-coordination/coverage/coverage-final.json +13 -0
  381. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/agent-logger.ts.html +1423 -0
  382. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/agent-recovery.ts.html +1447 -0
  383. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/base.css +224 -0
  384. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/block-navigation.js +87 -0
  385. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/completion-reporter.ts.html +1273 -0
  386. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/context-manager.ts.html +1066 -0
  387. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/favicon.png +0 -0
  388. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/index.html +281 -0
  389. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/mode-detector.ts.html +550 -0
  390. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/prettify.css +1 -0
  391. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/prettify.js +2 -0
  392. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/redis-client.ts.html +2047 -0
  393. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/result-collector.ts.html +1396 -0
  394. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  395. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/sorter.js +210 -0
  396. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/swarm-manager.ts.html +1567 -0
  397. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/task-analyzer.ts.html +1297 -0
  398. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/task-executor.ts.html +1354 -0
  399. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/types.ts.html +790 -0
  400. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/waiting-coordinator.ts.html +1846 -0
  401. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov.info +2650 -0
  402. package/claude-assets/skills/cfn-redis-coordination/dist/agent-logger.d.ts +92 -0
  403. package/claude-assets/skills/cfn-redis-coordination/dist/agent-logger.d.ts.map +1 -0
  404. package/claude-assets/skills/cfn-redis-coordination/dist/agent-logger.js +329 -0
  405. package/claude-assets/skills/cfn-redis-coordination/dist/agent-logger.js.map +1 -0
  406. package/claude-assets/skills/cfn-redis-coordination/dist/agent-recovery.d.ts +75 -0
  407. package/claude-assets/skills/cfn-redis-coordination/dist/agent-recovery.d.ts.map +1 -0
  408. package/claude-assets/skills/cfn-redis-coordination/dist/agent-recovery.js +302 -0
  409. package/claude-assets/skills/cfn-redis-coordination/dist/agent-recovery.js.map +1 -0
  410. package/claude-assets/skills/cfn-redis-coordination/dist/completion-reporter.d.ts +58 -0
  411. package/claude-assets/skills/cfn-redis-coordination/dist/completion-reporter.d.ts.map +1 -0
  412. package/claude-assets/skills/cfn-redis-coordination/dist/completion-reporter.js +237 -0
  413. package/claude-assets/skills/cfn-redis-coordination/dist/completion-reporter.js.map +1 -0
  414. package/claude-assets/skills/cfn-redis-coordination/dist/context-manager.d.ts +63 -0
  415. package/claude-assets/skills/cfn-redis-coordination/dist/context-manager.d.ts.map +1 -0
  416. package/claude-assets/skills/cfn-redis-coordination/dist/context-manager.js +230 -0
  417. package/claude-assets/skills/cfn-redis-coordination/dist/context-manager.js.map +1 -0
  418. package/claude-assets/skills/cfn-redis-coordination/dist/index.d.ts +45 -0
  419. package/claude-assets/skills/cfn-redis-coordination/dist/index.d.ts.map +1 -0
  420. package/claude-assets/skills/cfn-redis-coordination/dist/index.js +114 -0
  421. package/claude-assets/skills/cfn-redis-coordination/dist/index.js.map +1 -0
  422. package/claude-assets/skills/cfn-redis-coordination/dist/mode-detector.d.ts +31 -0
  423. package/claude-assets/skills/cfn-redis-coordination/dist/mode-detector.d.ts.map +1 -0
  424. package/claude-assets/skills/cfn-redis-coordination/dist/mode-detector.js +185 -0
  425. package/claude-assets/skills/cfn-redis-coordination/dist/mode-detector.js.map +1 -0
  426. package/claude-assets/skills/cfn-redis-coordination/dist/redis-client.d.ts +191 -0
  427. package/claude-assets/skills/cfn-redis-coordination/dist/redis-client.d.ts.map +1 -0
  428. package/claude-assets/skills/cfn-redis-coordination/dist/redis-client.js +509 -0
  429. package/claude-assets/skills/cfn-redis-coordination/dist/redis-client.js.map +1 -0
  430. package/claude-assets/skills/cfn-redis-coordination/dist/result-collector.d.ts +75 -0
  431. package/claude-assets/skills/cfn-redis-coordination/dist/result-collector.d.ts.map +1 -0
  432. package/claude-assets/skills/cfn-redis-coordination/dist/result-collector.js +281 -0
  433. package/claude-assets/skills/cfn-redis-coordination/dist/result-collector.js.map +1 -0
  434. package/claude-assets/skills/cfn-redis-coordination/dist/swarm-manager.d.ts +75 -0
  435. package/claude-assets/skills/cfn-redis-coordination/dist/swarm-manager.d.ts.map +1 -0
  436. package/claude-assets/skills/cfn-redis-coordination/dist/swarm-manager.js +354 -0
  437. package/claude-assets/skills/cfn-redis-coordination/dist/swarm-manager.js.map +1 -0
  438. package/claude-assets/skills/cfn-redis-coordination/dist/task-analyzer.d.ts +62 -0
  439. package/claude-assets/skills/cfn-redis-coordination/dist/task-analyzer.d.ts.map +1 -0
  440. package/claude-assets/skills/cfn-redis-coordination/dist/task-analyzer.js +305 -0
  441. package/claude-assets/skills/cfn-redis-coordination/dist/task-analyzer.js.map +1 -0
  442. package/claude-assets/skills/cfn-redis-coordination/dist/task-executor.d.ts +97 -0
  443. package/claude-assets/skills/cfn-redis-coordination/dist/task-executor.d.ts.map +1 -0
  444. package/claude-assets/skills/cfn-redis-coordination/dist/task-executor.js +283 -0
  445. package/claude-assets/skills/cfn-redis-coordination/dist/task-executor.js.map +1 -0
  446. package/claude-assets/skills/cfn-redis-coordination/dist/types.d.ts +176 -0
  447. package/claude-assets/skills/cfn-redis-coordination/dist/types.d.ts.map +1 -0
  448. package/claude-assets/skills/cfn-redis-coordination/dist/types.js +81 -0
  449. package/claude-assets/skills/cfn-redis-coordination/dist/types.js.map +1 -0
  450. package/claude-assets/skills/cfn-redis-coordination/dist/waiting-coordinator.d.ts +86 -0
  451. package/claude-assets/skills/cfn-redis-coordination/dist/waiting-coordinator.d.ts.map +1 -0
  452. package/claude-assets/skills/cfn-redis-coordination/dist/waiting-coordinator.js +419 -0
  453. package/claude-assets/skills/cfn-redis-coordination/dist/waiting-coordinator.js.map +1 -0
  454. package/claude-assets/skills/cfn-redis-coordination/docs/migration/PHASE_3_REDIS_COORDINATION_COMPLETION_REPORT.md +553 -0
  455. package/claude-assets/skills/cfn-redis-coordination/jest.config.js +23 -0
  456. package/claude-assets/skills/cfn-redis-coordination/package-lock.json +5272 -0
  457. package/claude-assets/skills/cfn-redis-coordination/package.json +45 -0
  458. package/claude-assets/skills/cfn-redis-coordination/redis-cli-wrapper.sh +21 -8
  459. package/claude-assets/skills/cfn-redis-coordination/src/agent-logger.ts +446 -0
  460. package/claude-assets/skills/cfn-redis-coordination/src/agent-recovery.ts +454 -0
  461. package/claude-assets/skills/cfn-redis-coordination/src/completion-reporter.ts +396 -0
  462. package/claude-assets/skills/cfn-redis-coordination/src/context-manager.ts +327 -0
  463. package/claude-assets/skills/cfn-redis-coordination/src/index.ts +82 -0
  464. package/claude-assets/skills/cfn-redis-coordination/src/mode-detector.ts +155 -0
  465. package/claude-assets/skills/cfn-redis-coordination/src/redis/redis-client.ts +305 -0
  466. package/claude-assets/skills/cfn-redis-coordination/src/redis/redis-functions.ts +283 -0
  467. package/claude-assets/skills/cfn-redis-coordination/src/redis-client.ts +654 -0
  468. package/claude-assets/skills/cfn-redis-coordination/src/result-collector.ts +437 -0
  469. package/claude-assets/skills/cfn-redis-coordination/src/swarm-manager.ts +494 -0
  470. package/claude-assets/skills/cfn-redis-coordination/src/task-analyzer.ts +404 -0
  471. package/claude-assets/skills/cfn-redis-coordination/src/task-executor.ts +423 -0
  472. package/claude-assets/skills/cfn-redis-coordination/src/types.ts +235 -0
  473. package/claude-assets/skills/cfn-redis-coordination/src/waiting-coordinator.ts +587 -0
  474. package/claude-assets/skills/cfn-redis-coordination/test-connection-attempts.js +70 -0
  475. package/claude-assets/skills/cfn-redis-coordination/test-mode-simple.js +121 -0
  476. package/claude-assets/skills/cfn-redis-coordination/test-redis-check.js +84 -0
  477. package/claude-assets/skills/cfn-redis-coordination/test-task-mode-redis.cjs +391 -0
  478. package/claude-assets/skills/cfn-redis-coordination/tests/coordination.test.ts +788 -0
  479. package/claude-assets/skills/cfn-redis-coordination/tsconfig.json +31 -0
  480. package/claude-assets/skills/cfn-skill-propagation/README.md +233 -0
  481. package/claude-assets/skills/cfn-skill-propagation/package-lock.json +5174 -0
  482. package/claude-assets/skills/cfn-skill-propagation/package.json +52 -0
  483. package/claude-assets/skills/cfn-skill-propagation/propagate-skill-update.sh +32 -0
  484. package/claude-assets/skills/cfn-skill-propagation/src/cli.ts +75 -0
  485. package/claude-assets/skills/cfn-skill-propagation/src/database-adapter.ts +239 -0
  486. package/claude-assets/skills/cfn-skill-propagation/src/file-system-adapter.ts +113 -0
  487. package/claude-assets/skills/cfn-skill-propagation/src/index.ts +72 -0
  488. package/claude-assets/skills/cfn-skill-propagation/src/logger.ts +43 -0
  489. package/claude-assets/skills/cfn-skill-propagation/src/metadata-parser.ts +154 -0
  490. package/claude-assets/skills/cfn-skill-propagation/src/skill-propagator.ts +274 -0
  491. package/claude-assets/skills/cfn-skill-propagation/src/skill-validator.ts +179 -0
  492. package/claude-assets/skills/cfn-skill-propagation/src/types.ts +143 -0
  493. package/claude-assets/skills/cfn-skill-propagation/src/version-manager.ts +118 -0
  494. package/claude-assets/skills/cfn-skill-propagation/tests/file-system-adapter.test.ts +91 -0
  495. package/claude-assets/skills/cfn-skill-propagation/tests/metadata-parser.test.ts +176 -0
  496. package/claude-assets/skills/cfn-skill-propagation/tests/skill-propagator.test.ts +209 -0
  497. package/claude-assets/skills/cfn-skill-propagation/tests/skill-validator.test.ts +203 -0
  498. package/claude-assets/skills/cfn-skill-propagation/tests/version-manager.test.ts +115 -0
  499. package/claude-assets/skills/cfn-skill-propagation/tsconfig.json +34 -0
  500. package/claude-assets/skills/task-classifier/SKILL.md +81 -0
  501. package/claude-assets/skills/task-classifier/classify-task.sh +62 -0
  502. package/claude-assets/skills/workflow-codification/package-lock.json +5170 -0
  503. package/claude-assets/skills/workflow-codification/package.json +30 -0
  504. package/claude-assets/skills/workflow-codification/src/index.ts +24 -0
  505. package/claude-assets/skills/workflow-codification/src/pattern-analyzer.ts +537 -0
  506. package/claude-assets/skills/workflow-codification/src/types.ts +180 -0
  507. package/claude-assets/skills/workflow-codification/tests/pattern-analyzer.test.ts +960 -0
  508. package/claude-assets/skills/workflow-codification/tsconfig.json +34 -0
  509. package/claude-assets/skills/workflow-codification/workflow-codification.db +0 -0
  510. package/dist/agent-spawner/agent-spawner.js +448 -0
  511. package/dist/agent-spawner/agent-spawner.js.map +1 -0
  512. package/dist/agent-spawner/index.js +10 -0
  513. package/dist/agent-spawner/index.js.map +1 -0
  514. package/dist/agent-spawner/types.js +14 -0
  515. package/dist/agent-spawner/types.js.map +1 -0
  516. package/dist/cli/agent-executor.js +47 -1
  517. package/dist/cli/agent-executor.js.map +1 -1
  518. package/dist/cli/agent-spawn.js +4 -1
  519. package/dist/cli/agent-spawn.js.map +1 -1
  520. package/dist/cli/config-manager.js +91 -109
  521. package/dist/cli/config-manager.js.map +1 -1
  522. package/dist/cli/tool-executor.js +3 -1
  523. package/dist/cli/tool-executor.js.map +1 -1
  524. package/dist/gate-checker/gate-checker.js +292 -0
  525. package/dist/gate-checker/gate-checker.js.map +1 -0
  526. package/dist/gate-checker/types.js +94 -0
  527. package/dist/gate-checker/types.js.map +1 -0
  528. package/dist/lib/database-service/connection-pool-manager.js +2 -1
  529. package/dist/lib/database-service/connection-pool-manager.js.map +1 -1
  530. package/dist/orchestrator/index.js +10 -0
  531. package/dist/orchestrator/index.js.map +1 -0
  532. package/dist/orchestrator/orchestrate.js +496 -0
  533. package/dist/orchestrator/orchestrate.js.map +1 -0
  534. package/dist/orchestrator/types.js +58 -0
  535. package/dist/orchestrator/types.js.map +1 -0
  536. package/package.json +1 -1
  537. package/scripts/clean-agent-profiles.sh +112 -0
  538. package/scripts/switch-api.sh +142 -4
  539. package/scripts/verify-no-secrets.sh +6 -13
  540. package/tests/README.md +175 -58
@@ -0,0 +1,654 @@
1
+ /**
2
+ * Mode-Aware Redis Client
3
+ *
4
+ * Redis client that automatically stubs operations in Task Mode
5
+ * and executes normally in CLI Mode.
6
+ *
7
+ * CRITICAL ANTI-PATTERN PREVENTION (per audit):
8
+ * - Task Mode: All Redis operations gracefully no-op with warnings
9
+ * - CLI Mode: Full Redis coordination available
10
+ *
11
+ * This prevents the audit finding: "22 agent profiles with unconditional redis-cli"
12
+ */
13
+
14
+ import Redis from 'ioredis';
15
+ import type {
16
+ RedisConfig,
17
+ Logger,
18
+ ModeDetection,
19
+ ExecutionMode
20
+ } from './types';
21
+ import { CoordinationError, CoordinationErrorType } from './types';
22
+ import { detectMode, ConsoleLogger } from './mode-detector';
23
+
24
+ /**
25
+ * Mode-aware Redis coordinator
26
+ *
27
+ * Automatically detects Task Mode vs CLI Mode and stubs Redis operations
28
+ * when appropriate. Prevents failures from undefined TASK_ID/AGENT_ID.
29
+ */
30
+ export class RedisCoordinator {
31
+ private client: Redis | null = null;
32
+ private modeDetection: ModeDetection | null = null;
33
+ private logger: Logger;
34
+
35
+ constructor(
36
+ private config: Partial<RedisConfig> = {},
37
+ logger?: Logger
38
+ ) {
39
+ this.logger = logger || new ConsoleLogger('[CFN-Redis]');
40
+ }
41
+
42
+ /**
43
+ * Initialize the Redis client with mode detection
44
+ *
45
+ * MUST be called before any Redis operations.
46
+ * Detects mode and creates client or stubs accordingly.
47
+ */
48
+ async initialize(): Promise<void> {
49
+ // Detect mode first
50
+ this.modeDetection = await detectMode(this.logger);
51
+
52
+ // If Task Mode, don't create Redis client at all
53
+ if (this.modeDetection.mode === 'task') {
54
+ this.logger.info('Task Mode: Redis client will be stubbed');
55
+ this.client = null;
56
+ return;
57
+ }
58
+
59
+ // If CLI Mode but Redis unavailable, stub
60
+ if (!this.modeDetection.redisAvailable) {
61
+ this.logger.warn('CLI Mode but Redis unavailable: Operations will soft-fail');
62
+ this.client = null;
63
+ return;
64
+ }
65
+
66
+ // CLI Mode with Redis available: Create real client
67
+ const host = this.config.host || process.env.REDIS_HOST || 'localhost';
68
+ const port = this.config.port || parseInt(process.env.REDIS_PORT || '6379', 10);
69
+ const password = this.config.password || process.env.REDIS_PASSWORD || process.env.CFN_REDIS_PASSWORD;
70
+
71
+ this.client = new Redis({
72
+ host,
73
+ port,
74
+ password: password || undefined,
75
+ db: this.config.db || 0,
76
+ connectTimeout: this.config.connectTimeout || 5000,
77
+ commandTimeout: this.config.commandTimeout || 5000,
78
+ retryStrategy: this.config.retryStrategy || ((times) => {
79
+ if (times > 3) return null; // Stop retrying after 3 attempts
80
+ return Math.min(times * 100, 2000); // Exponential backoff
81
+ }),
82
+ lazyConnect: false
83
+ });
84
+
85
+ // Attach error handlers
86
+ this.client.on('error', (err) => {
87
+ this.logger.error('Redis connection error', err);
88
+ });
89
+
90
+ this.client.on('connect', () => {
91
+ this.logger.debug('Redis connected');
92
+ });
93
+
94
+ this.logger.info('✅ CLI Mode: Redis client initialized');
95
+ }
96
+
97
+ /**
98
+ * Check if Redis operations are safe to execute
99
+ *
100
+ * Agent profiles should check this before attempting Redis operations:
101
+ * ```typescript
102
+ * if (coordinator.canUseRedis) {
103
+ * await coordinator.lpush(...);
104
+ * } else {
105
+ * // Return results directly to Main Chat
106
+ * }
107
+ * ```
108
+ */
109
+ get canUseRedis(): boolean {
110
+ return this.modeDetection?.canUseRedis ?? false;
111
+ }
112
+
113
+ /**
114
+ * Get current execution mode
115
+ */
116
+ get mode(): ExecutionMode {
117
+ return this.modeDetection?.mode ?? 'unknown';
118
+ }
119
+
120
+ /**
121
+ * Get mode detection details
122
+ */
123
+ getModeDetection(): ModeDetection | null {
124
+ return this.modeDetection;
125
+ }
126
+
127
+ /**
128
+ * Graceful stub for Task Mode
129
+ *
130
+ * Logs warning and returns immediately without error.
131
+ * Prevents agent failures from undefined variables.
132
+ */
133
+ private gracefulStub<T>(operation: string, defaultValue: T): T {
134
+ if (!this.modeDetection) {
135
+ throw new CoordinationError(
136
+ CoordinationErrorType.INVALID_STATE,
137
+ 'Redis coordinator not initialized. Call initialize() first.'
138
+ );
139
+ }
140
+
141
+ this.logger.warn(`⚠️ Redis operation skipped: ${operation}`);
142
+ this.logger.info(`💡 Reason: ${this.modeDetection.reason}`);
143
+ this.logger.info('🔧 Task Mode agents return results directly to Main Chat');
144
+
145
+ return defaultValue;
146
+ }
147
+
148
+ /**
149
+ * Check if client is ready
150
+ */
151
+ private ensureClient(): Redis {
152
+ if (!this.client) {
153
+ if (this.modeDetection?.mode === 'task') {
154
+ throw new CoordinationError(
155
+ CoordinationErrorType.MODE_MISMATCH,
156
+ 'Cannot execute Redis operations in Task Mode',
157
+ 'task',
158
+ false
159
+ );
160
+ }
161
+ throw new CoordinationError(
162
+ CoordinationErrorType.REDIS_UNAVAILABLE,
163
+ 'Redis client not available. Check initialization and Redis connectivity.',
164
+ this.modeDetection?.mode,
165
+ true
166
+ );
167
+ }
168
+ return this.client;
169
+ }
170
+
171
+ // ==================== Redis Operations with Graceful Fallback ====================
172
+
173
+ /**
174
+ * LPUSH: Push to list (left/head)
175
+ *
176
+ * Gracefully stubs in Task Mode.
177
+ */
178
+ async lpush(key: string, ...values: string[]): Promise<number> {
179
+ if (!this.canUseRedis) {
180
+ return this.gracefulStub(`LPUSH ${key}`, 0);
181
+ }
182
+
183
+ try {
184
+ const client = this.ensureClient();
185
+ return await client.lpush(key, ...values);
186
+ } catch (error) {
187
+ this.logger.error(`LPUSH failed for key: ${key}`, error as Error);
188
+ throw new CoordinationError(
189
+ CoordinationErrorType.REDIS_UNAVAILABLE,
190
+ `LPUSH operation failed: ${(error as Error).message}`,
191
+ this.mode,
192
+ true
193
+ );
194
+ }
195
+ }
196
+
197
+ /**
198
+ * RPUSH: Push to list (right/tail)
199
+ *
200
+ * Gracefully stubs in Task Mode.
201
+ */
202
+ async rpush(key: string, ...values: string[]): Promise<number> {
203
+ if (!this.canUseRedis) {
204
+ return this.gracefulStub(`RPUSH ${key}`, 0);
205
+ }
206
+
207
+ try {
208
+ const client = this.ensureClient();
209
+ return await client.rpush(key, ...values);
210
+ } catch (error) {
211
+ this.logger.error(`RPUSH failed for key: ${key}`, error as Error);
212
+ throw new CoordinationError(
213
+ CoordinationErrorType.REDIS_UNAVAILABLE,
214
+ `RPUSH operation failed: ${(error as Error).message}`,
215
+ this.mode,
216
+ true
217
+ );
218
+ }
219
+ }
220
+
221
+ /**
222
+ * BLPOP: Blocking pop from list (left/head)
223
+ *
224
+ * CRITICAL: This is the coordination primitive for agent waiting.
225
+ * Gracefully stubs in Task Mode to prevent indefinite blocking.
226
+ *
227
+ * @param key Key(s) to pop from
228
+ * @param timeout Timeout in seconds
229
+ * @returns [key, value] or null if timeout
230
+ */
231
+ async blpop(...args: Array<string | number>): Promise<[string, string] | null> {
232
+ if (!this.canUseRedis) {
233
+ const keys = args.slice(0, -1).join(',');
234
+ return this.gracefulStub(`BLPOP ${keys}`, null);
235
+ }
236
+
237
+ try {
238
+ const client = this.ensureClient();
239
+ // Handle both forms: blpop(key, timeout) and blpop(key1, key2, ..., timeout)
240
+ const result = await (client.blpop as any)(...args);
241
+ return result as [string, string] | null;
242
+ } catch (error) {
243
+ this.logger.error(`BLPOP failed`, error as Error);
244
+ throw new CoordinationError(
245
+ CoordinationErrorType.REDIS_UNAVAILABLE,
246
+ `BLPOP operation failed: ${(error as Error).message}`,
247
+ this.mode,
248
+ true
249
+ );
250
+ }
251
+ }
252
+
253
+ /**
254
+ * HSET: Set hash field
255
+ *
256
+ * Gracefully stubs in Task Mode.
257
+ */
258
+ async hset(key: string, ...fieldValues: string[]): Promise<number> {
259
+ if (!this.canUseRedis) {
260
+ return this.gracefulStub(`HSET ${key}`, 0);
261
+ }
262
+
263
+ try {
264
+ const client = this.ensureClient();
265
+ return await client.hset(key, ...fieldValues);
266
+ } catch (error) {
267
+ this.logger.error(`HSET failed for key: ${key}`, error as Error);
268
+ throw new CoordinationError(
269
+ CoordinationErrorType.REDIS_UNAVAILABLE,
270
+ `HSET operation failed: ${(error as Error).message}`,
271
+ this.mode,
272
+ true
273
+ );
274
+ }
275
+ }
276
+
277
+ /**
278
+ * HGET: Get hash field
279
+ *
280
+ * Gracefully stubs in Task Mode.
281
+ */
282
+ async hget(key: string, field: string): Promise<string | null> {
283
+ if (!this.canUseRedis) {
284
+ return this.gracefulStub(`HGET ${key} ${field}`, null);
285
+ }
286
+
287
+ try {
288
+ const client = this.ensureClient();
289
+ return await client.hget(key, field);
290
+ } catch (error) {
291
+ this.logger.error(`HGET failed for key: ${key}, field: ${field}`, error as Error);
292
+ throw new CoordinationError(
293
+ CoordinationErrorType.REDIS_UNAVAILABLE,
294
+ `HGET operation failed: ${(error as Error).message}`,
295
+ this.mode,
296
+ true
297
+ );
298
+ }
299
+ }
300
+
301
+ /**
302
+ * HGETALL: Get all hash fields
303
+ *
304
+ * Gracefully stubs in Task Mode.
305
+ */
306
+ async hgetall(key: string): Promise<Record<string, string>> {
307
+ if (!this.canUseRedis) {
308
+ return this.gracefulStub(`HGETALL ${key}`, {});
309
+ }
310
+
311
+ try {
312
+ const client = this.ensureClient();
313
+ return await client.hgetall(key);
314
+ } catch (error) {
315
+ this.logger.error(`HGETALL failed for key: ${key}`, error as Error);
316
+ throw new CoordinationError(
317
+ CoordinationErrorType.REDIS_UNAVAILABLE,
318
+ `HGETALL operation failed: ${(error as Error).message}`,
319
+ this.mode,
320
+ true
321
+ );
322
+ }
323
+ }
324
+
325
+ /**
326
+ * SET: Set string value
327
+ *
328
+ * Gracefully stubs in Task Mode.
329
+ */
330
+ async set(key: string, value: string, expiryMode?: 'EX' | 'PX', time?: number): Promise<string | null> {
331
+ if (!this.canUseRedis) {
332
+ return this.gracefulStub(`SET ${key}`, null);
333
+ }
334
+
335
+ try {
336
+ const client = this.ensureClient();
337
+ if (expiryMode && time) {
338
+ const result = await (client.set as any)(key, value, expiryMode, time);
339
+ return result;
340
+ }
341
+ const result = await (client.set as any)(key, value);
342
+ return result;
343
+ } catch (error) {
344
+ this.logger.error(`SET failed for key: ${key}`, error as Error);
345
+ throw new CoordinationError(
346
+ CoordinationErrorType.REDIS_UNAVAILABLE,
347
+ `SET operation failed: ${(error as Error).message}`,
348
+ this.mode,
349
+ true
350
+ );
351
+ }
352
+ }
353
+
354
+ /**
355
+ * GET: Get string value
356
+ *
357
+ * Gracefully stubs in Task Mode.
358
+ */
359
+ async get(key: string): Promise<string | null> {
360
+ if (!this.canUseRedis) {
361
+ return this.gracefulStub(`GET ${key}`, null);
362
+ }
363
+
364
+ try {
365
+ const client = this.ensureClient();
366
+ return await client.get(key);
367
+ } catch (error) {
368
+ this.logger.error(`GET failed for key: ${key}`, error as Error);
369
+ throw new CoordinationError(
370
+ CoordinationErrorType.REDIS_UNAVAILABLE,
371
+ `GET operation failed: ${(error as Error).message}`,
372
+ this.mode,
373
+ true
374
+ );
375
+ }
376
+ }
377
+
378
+ /**
379
+ * DEL: Delete key(s)
380
+ *
381
+ * Gracefully stubs in Task Mode.
382
+ */
383
+ async del(...keys: string[]): Promise<number> {
384
+ if (!this.canUseRedis) {
385
+ return this.gracefulStub(`DEL ${keys.join(',')}`, 0);
386
+ }
387
+
388
+ try {
389
+ const client = this.ensureClient();
390
+ return await client.del(...keys);
391
+ } catch (error) {
392
+ this.logger.error(`DEL failed for keys: ${keys.join(',')}`, error as Error);
393
+ throw new CoordinationError(
394
+ CoordinationErrorType.REDIS_UNAVAILABLE,
395
+ `DEL operation failed: ${(error as Error).message}`,
396
+ this.mode,
397
+ true
398
+ );
399
+ }
400
+ }
401
+
402
+ /**
403
+ * EXPIRE: Set key expiry
404
+ *
405
+ * Gracefully stubs in Task Mode.
406
+ */
407
+ async expire(key: string, seconds: number): Promise<number> {
408
+ if (!this.canUseRedis) {
409
+ return this.gracefulStub(`EXPIRE ${key} ${seconds}`, 0);
410
+ }
411
+
412
+ try {
413
+ const client = this.ensureClient();
414
+ return await client.expire(key, seconds);
415
+ } catch (error) {
416
+ this.logger.error(`EXPIRE failed for key: ${key}`, error as Error);
417
+ throw new CoordinationError(
418
+ CoordinationErrorType.REDIS_UNAVAILABLE,
419
+ `EXPIRE operation failed: ${(error as Error).message}`,
420
+ this.mode,
421
+ true
422
+ );
423
+ }
424
+ }
425
+
426
+ /**
427
+ * PING: Test connection
428
+ *
429
+ * Gracefully stubs in Task Mode.
430
+ */
431
+ async ping(): Promise<string> {
432
+ if (!this.canUseRedis) {
433
+ return this.gracefulStub('PING', 'PONG (stubbed)');
434
+ }
435
+
436
+ try {
437
+ const client = this.ensureClient();
438
+ return await client.ping();
439
+ } catch (error) {
440
+ this.logger.error('PING failed', error as Error);
441
+ throw new CoordinationError(
442
+ CoordinationErrorType.REDIS_UNAVAILABLE,
443
+ `PING operation failed: ${(error as Error).message}`,
444
+ this.mode,
445
+ true
446
+ );
447
+ }
448
+ }
449
+
450
+ /**
451
+ * EXISTS: Check if key exists
452
+ *
453
+ * Gracefully stubs in Task Mode.
454
+ */
455
+ async exists(key: string): Promise<number> {
456
+ if (!this.canUseRedis) {
457
+ return this.gracefulStub(`EXISTS ${key}`, 0);
458
+ }
459
+
460
+ try {
461
+ const client = this.ensureClient();
462
+ return await client.exists(key);
463
+ } catch (error) {
464
+ this.logger.error(`EXISTS failed for key: ${key}`, error as Error);
465
+ throw new CoordinationError(
466
+ CoordinationErrorType.REDIS_UNAVAILABLE,
467
+ `EXISTS operation failed: ${(error as Error).message}`,
468
+ this.mode,
469
+ true
470
+ );
471
+ }
472
+ }
473
+
474
+ /**
475
+ * ZADD: Add to sorted set
476
+ *
477
+ * Gracefully stubs in Task Mode.
478
+ */
479
+ async zadd(key: string, ...args: string[]): Promise<number> {
480
+ if (!this.canUseRedis) {
481
+ return this.gracefulStub(`ZADD ${key}`, 0);
482
+ }
483
+
484
+ try {
485
+ const client = this.ensureClient();
486
+ return await client.zadd(key, ...args);
487
+ } catch (error) {
488
+ this.logger.error(`ZADD failed for key: ${key}`, error as Error);
489
+ throw new CoordinationError(
490
+ CoordinationErrorType.REDIS_UNAVAILABLE,
491
+ `ZADD operation failed: ${(error as Error).message}`,
492
+ this.mode,
493
+ true
494
+ );
495
+ }
496
+ }
497
+
498
+ /**
499
+ * ZREVRANGE: Get sorted set in reverse order
500
+ *
501
+ * Gracefully stubs in Task Mode.
502
+ */
503
+ async zrevrange(key: string, start: number, stop: number): Promise<string[]> {
504
+ if (!this.canUseRedis) {
505
+ return this.gracefulStub(`ZREVRANGE ${key}`, []);
506
+ }
507
+
508
+ try {
509
+ const client = this.ensureClient();
510
+ return await client.zrevrange(key, start, stop);
511
+ } catch (error) {
512
+ this.logger.error(`ZREVRANGE failed for key: ${key}`, error as Error);
513
+ throw new CoordinationError(
514
+ CoordinationErrorType.REDIS_UNAVAILABLE,
515
+ `ZREVRANGE operation failed: ${(error as Error).message}`,
516
+ this.mode,
517
+ true
518
+ );
519
+ }
520
+ }
521
+
522
+ /**
523
+ * ZRANGE: Get sorted set
524
+ *
525
+ * Gracefully stubs in Task Mode.
526
+ */
527
+ async zrange(key: string, start: number, stop: number): Promise<string[]> {
528
+ if (!this.canUseRedis) {
529
+ return this.gracefulStub(`ZRANGE ${key}`, []);
530
+ }
531
+
532
+ try {
533
+ const client = this.ensureClient();
534
+ return await client.zrange(key, start, stop);
535
+ } catch (error) {
536
+ this.logger.error(`ZRANGE failed for key: ${key}`, error as Error);
537
+ throw new CoordinationError(
538
+ CoordinationErrorType.REDIS_UNAVAILABLE,
539
+ `ZRANGE operation failed: ${(error as Error).message}`,
540
+ this.mode,
541
+ true
542
+ );
543
+ }
544
+ }
545
+
546
+ /**
547
+ * ZREM: Remove from sorted set
548
+ *
549
+ * Gracefully stubs in Task Mode.
550
+ */
551
+ async zrem(key: string, member: string): Promise<number> {
552
+ if (!this.canUseRedis) {
553
+ return this.gracefulStub(`ZREM ${key}`, 0);
554
+ }
555
+
556
+ try {
557
+ const client = this.ensureClient();
558
+ return await client.zrem(key, member);
559
+ } catch (error) {
560
+ this.logger.error(`ZREM failed for key: ${key}`, error as Error);
561
+ throw new CoordinationError(
562
+ CoordinationErrorType.REDIS_UNAVAILABLE,
563
+ `ZREM operation failed: ${(error as Error).message}`,
564
+ this.mode,
565
+ true
566
+ );
567
+ }
568
+ }
569
+
570
+ /**
571
+ * SADD: Add to set
572
+ *
573
+ * Gracefully stubs in Task Mode.
574
+ */
575
+ async sadd(key: string, ...members: string[]): Promise<number> {
576
+ if (!this.canUseRedis) {
577
+ return this.gracefulStub(`SADD ${key}`, 0);
578
+ }
579
+
580
+ try {
581
+ const client = this.ensureClient();
582
+ return await client.sadd(key, ...members);
583
+ } catch (error) {
584
+ this.logger.error(`SADD failed for key: ${key}`, error as Error);
585
+ throw new CoordinationError(
586
+ CoordinationErrorType.REDIS_UNAVAILABLE,
587
+ `SADD operation failed: ${(error as Error).message}`,
588
+ this.mode,
589
+ true
590
+ );
591
+ }
592
+ }
593
+
594
+ /**
595
+ * SMEMBERS: Get all set members
596
+ *
597
+ * Gracefully stubs in Task Mode.
598
+ */
599
+ async smembers(key: string): Promise<string[]> {
600
+ if (!this.canUseRedis) {
601
+ return this.gracefulStub(`SMEMBERS ${key}`, []);
602
+ }
603
+
604
+ try {
605
+ const client = this.ensureClient();
606
+ return await client.smembers(key);
607
+ } catch (error) {
608
+ this.logger.error(`SMEMBERS failed for key: ${key}`, error as Error);
609
+ throw new CoordinationError(
610
+ CoordinationErrorType.REDIS_UNAVAILABLE,
611
+ `SMEMBERS operation failed: ${(error as Error).message}`,
612
+ this.mode,
613
+ true
614
+ );
615
+ }
616
+ }
617
+
618
+ /**
619
+ * PUBLISH: Publish to channel
620
+ *
621
+ * Gracefully stubs in Task Mode.
622
+ */
623
+ async publish(channel: string, message: string): Promise<number> {
624
+ if (!this.canUseRedis) {
625
+ return this.gracefulStub(`PUBLISH ${channel}`, 0);
626
+ }
627
+
628
+ try {
629
+ const client = this.ensureClient();
630
+ return await client.publish(channel, message);
631
+ } catch (error) {
632
+ this.logger.error(`PUBLISH failed for channel: ${channel}`, error as Error);
633
+ throw new CoordinationError(
634
+ CoordinationErrorType.REDIS_UNAVAILABLE,
635
+ `PUBLISH operation failed: ${(error as Error).message}`,
636
+ this.mode,
637
+ true
638
+ );
639
+ }
640
+ }
641
+
642
+ /**
643
+ * Disconnect from Redis
644
+ *
645
+ * Safe to call in Task Mode (no-op).
646
+ */
647
+ async disconnect(): Promise<void> {
648
+ if (this.client) {
649
+ await this.client.quit();
650
+ this.client = null;
651
+ this.logger.debug('Redis client disconnected');
652
+ }
653
+ }
654
+ }