claude-flow-novice 2.6.0 → 2.8.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 (364) hide show
  1. package/.claude/adaptive-context/cfn-v3-reflection.json +21 -0
  2. package/.claude/agents/AGENT_LIFECYCLE.md +495 -0
  3. package/.claude/agents/CLAUDE.md +1002 -995
  4. package/.claude/agents/accessibility-advocate.md +457 -0
  5. package/.claude/agents/agent-principles/README.md +226 -226
  6. package/.claude/agents/agent-principles/agent-type-guidelines.md +10 -0
  7. package/.claude/agents/agent-principles/format-selection.md +10 -0
  8. package/.claude/agents/agent-principles/phase4-template-optimization.md +502 -494
  9. package/.claude/agents/agent-principles/prompt-engineering.md +8 -0
  10. package/.claude/agents/agent-principles/quality-metrics.md +8 -0
  11. package/.claude/agents/analysis/code-analyzer.md +7 -17
  12. package/.claude/agents/analysis/code-review/analyze-code-quality.md +2 -104
  13. package/.claude/agents/analysis/perf-analyzer.md +2 -196
  14. package/.claude/agents/context/context-curator.md +78 -84
  15. package/.claude/agents/context/context-reflector.md +27 -81
  16. package/.claude/agents/coordinators/README.md +42 -0
  17. package/.claude/agents/coordinators/cfn-v3-coordinator.md +440 -0
  18. package/.claude/agents/{product-owner-team → coordinators}/cto-agent.md +154 -187
  19. package/.claude/agents/coordinators/multi-sprint-coordinator.md +50 -0
  20. package/.claude/agents/{product-owner-team → coordinators}/product-owner-agent.md +6 -39
  21. package/.claude/agents/{cfn-loop → coordinators}/product-owner.md +72 -17
  22. package/.claude/agents/core-agents/reviewer.md +114 -135
  23. package/.claude/agents/custom/agent-builder.md +637 -637
  24. package/.claude/agents/developers/README.md +69 -0
  25. package/.claude/agents/developers/backend-dev.md +77 -0
  26. package/.claude/agents/{core-agents → developers}/coder.md +131 -26
  27. package/.claude/agents/developers/react-frontend-engineer.md +121 -0
  28. package/.claude/agents/{frontend → developers}/state-architect.md +1 -0
  29. package/.claude/agents/{frontend → developers}/ui-designer.md +1 -0
  30. package/.claude/agents/development/backend/dev-backend-api.md +0 -29
  31. package/.claude/agents/development/npm-package-specialist.md +355 -347
  32. package/.claude/agents/documentation/api-docs/docs-api-openapi.md +8 -0
  33. package/.claude/agents/documentation/api-docs.md +8 -0
  34. package/.claude/agents/github/github-commit-agent.md +125 -117
  35. package/.claude/agents/goal/goal-planner.md +8 -0
  36. package/.claude/agents/infrastructure/README.md +100 -0
  37. package/.claude/agents/{specialized → infrastructure}/devops-engineer.md +131 -150
  38. package/.claude/agents/planners/README.md +94 -0
  39. package/.claude/agents/{core-agents → planners}/analyst.md +1 -22
  40. package/.claude/agents/{planning-team → planners}/api-designer-persona.md +8 -0
  41. package/.claude/agents/{core-agents → planners}/architect.md +7 -20
  42. package/.claude/agents/{core-agents → planners}/planner.md +0 -21
  43. package/.claude/agents/{planning-team → planners}/security-architect-persona.md +8 -28
  44. package/.claude/agents/{planning-team → planners}/system-architect-persona.md +6 -38
  45. package/.claude/agents/{architecture → planners}/system-architect.md +12 -17
  46. package/.claude/agents/product-owner-team/accessibility-advocate-persona.md +132 -161
  47. package/.claude/agents/product-owner-team/power-user-persona.md +149 -182
  48. package/.claude/agents/retrospective-analyst.md +84 -0
  49. package/.claude/agents/reviewers/README.md +58 -0
  50. package/.claude/agents/{analysis → reviewers}/code-quality-validator.md +8 -17
  51. package/.claude/agents/reviewers/reviewer.md +181 -0
  52. package/.claude/agents/sparc/architecture.md +6 -25
  53. package/.claude/agents/sparc/pseudocode.md +6 -0
  54. package/.claude/agents/sparc/refinement.md +6 -0
  55. package/.claude/agents/sparc/specification.md +1 -0
  56. package/.claude/agents/specialists/README.md +60 -0
  57. package/.claude/agents/{core-agents → specialists}/base-template-generator.md +8 -21
  58. package/.claude/agents/{specialized → specialists}/cli-agent-optimizer.md +1 -1
  59. package/.claude/agents/{specialized → specialists}/code-booster.md +1 -0
  60. package/.claude/agents/{consensus → specialists}/consensus-builder.md +1 -17
  61. package/.claude/agents/{specialized/mobile → specialists}/mobile-dev.md +0 -20
  62. package/.claude/agents/{core-agents → specialists}/performance-benchmarker.md +134 -148
  63. package/.claude/agents/{specialized → specialists}/rust-developer.md +1 -20
  64. package/.claude/agents/{specialized → specialists}/rust-enterprise-developer.md +1 -20
  65. package/.claude/agents/{specialized → specialists}/rust-mvp-developer.md +1 -20
  66. package/.claude/agents/{core-agents → specialists}/security-manager.md +68 -88
  67. package/.claude/agents/{security → specialists}/security-specialist-existing.md +6 -57
  68. package/.claude/agents/{security → specialists}/security-specialist.md +6 -30
  69. package/.claude/agents/{specialized/mobile → specialists}/spec-mobile-react-native.md +2 -21
  70. package/.claude/agents/testers/README.md +94 -0
  71. package/.claude/agents/{testing → testers}/e2e/playwright-agent.md +1 -20
  72. package/.claude/agents/{testing → testers}/interaction-tester.md +1 -20
  73. package/.claude/agents/{testing → testers}/playwright-tester.md +1 -1
  74. package/.claude/agents/testers/tester.md +139 -0
  75. package/.claude/agents/testers/unit/tdd-london-swarm.md +49 -0
  76. package/.claude/agents/testers/validation/production-validator.md +33 -0
  77. package/.claude/agents-ignore/cfn-loop-coordinator.md +157 -0
  78. package/.claude/agents-ignore/cfn-loop-coordinator.md.backup +156 -0
  79. package/.claude/agents-ignore/coordinator.md.backup +182 -0
  80. package/.claude/agents-ignore/cost-savings-cfn-loop-coordinator.md +760 -0
  81. package/.claude/agents-ignore/cost-savings-coordinator.md +173 -0
  82. package/.claude/artifacts/ace-reflections/REFLECT-001-summary.json +39 -0
  83. package/.claude/artifacts/ace-reflections/sprint-7_$(date -u +/"%Y%m%d_%H%M%S/").json" +47 -0
  84. package/.claude/commands/CFN_COORDINATOR_PARAMETERS.md +10 -10
  85. package/.claude/commands/cfn-loop-epic.md +3 -3
  86. package/.claude/commands/cfn-loop-single.md +3 -3
  87. package/.claude/commands/cfn-loop-sprints.md +1 -1
  88. package/.claude/commands/cfn-loop.md +3 -3
  89. package/.claude/commands/cfn-mode.md +20 -0
  90. package/.claude/commands/write-plan.md +104 -0
  91. package/.claude/data/cfn-loop.db +0 -0
  92. package/.claude/data/cfn_loop_logs.db +0 -0
  93. package/.claude/hooks/BACKUP_USAGE.md +243 -0
  94. package/.claude/hooks/post-edit-cfn-retrospective.sh +79 -0
  95. package/.claude/hooks/post-edit.sh +21 -0
  96. package/.claude/hooks/pre-edit-backup.sh +71 -0
  97. package/.claude/hooks/restore-from-backup.sh +37 -0
  98. package/.claude/prompts/cfn-loop-context.md +115 -0
  99. package/.claude/prompts/loop-specific/loop2.md +50 -0
  100. package/.claude/prompts/loop-specific/loop3.md +43 -0
  101. package/.claude/prompts/loop-specific/loop4.md +54 -0
  102. package/.claude/root-claude-distribute/CLAUDE.md +76 -2
  103. package/.claude/skills/ace-system/sprint-7-lessons.json +46 -0
  104. package/.claude/skills/ace-system/store-reflection.sh +33 -136
  105. package/.claude/skills/agent-discovery/SKILL.md +40 -0
  106. package/.claude/skills/agent-discovery/agents-registry-clean.json +0 -0
  107. package/.claude/skills/agent-discovery/agents-registry-fixed.json +19 -0
  108. package/.claude/skills/agent-discovery/agents-registry.json +718 -0
  109. package/.claude/skills/agent-discovery/discover-agents.py +175 -0
  110. package/.claude/skills/agent-discovery/discover-agents.sh +87 -0
  111. package/.claude/skills/agent-discovery/invoke-registry.sh +11 -0
  112. package/.claude/skills/agent-discovery/temp_script.py +0 -0
  113. package/.claude/skills/agent-output-processing/SKILL.md +359 -0
  114. package/.claude/skills/agent-selector/SKILL.md +90 -0
  115. package/.claude/skills/agent-selector/select-agents.sh +96 -0
  116. package/.claude/skills/agent-spawning/agent-selection-guide.md +1 -1
  117. package/.claude/skills/agent-swap/SKILL.md +36 -0
  118. package/.claude/skills/agent-swap/recommend-swap.sh +60 -0
  119. package/.claude/skills/api-validation/test-endpoints.sh +54 -0
  120. package/.claude/skills/automatic-memory-persistence/SKILL.md +73 -0
  121. package/.claude/skills/automatic-memory-persistence/persist-agent-output.sh +49 -0
  122. package/.claude/skills/automatic-memory-persistence/query-agent-history.sh +35 -0
  123. package/.claude/skills/automatic-memory-persistence/test-memory-persistence.sh +235 -0
  124. package/.claude/skills/cfn-loop-orchestration/README.md +41 -0
  125. package/.claude/skills/cfn-loop-orchestration/SKILL.md +299 -0
  126. package/.claude/skills/cfn-loop-orchestration/helpers/auto-tune-timeouts.sh +228 -0
  127. package/.claude/skills/cfn-loop-orchestration/helpers/consensus.sh +84 -0
  128. package/.claude/skills/cfn-loop-orchestration/helpers/deliverable-verifier.sh +71 -0
  129. package/.claude/skills/cfn-loop-orchestration/helpers/gate-check.sh +90 -0
  130. package/.claude/skills/cfn-loop-orchestration/helpers/iteration-manager.sh +87 -0
  131. package/.claude/skills/cfn-loop-orchestration/helpers/timeout-calculator.sh +51 -0
  132. package/.claude/skills/cfn-loop-orchestration/inject-loop-context.sh +41 -0
  133. package/.claude/skills/cfn-loop-orchestration/monitor-execution.sh +156 -0
  134. package/.claude/skills/cfn-loop-orchestration/orchestrate.sh +840 -0
  135. package/.claude/skills/cfn-loop-orchestration/security_utils.sh +99 -0
  136. package/.claude/skills/cfn-loop-orchestration/test-cfn-orchestration.sh +281 -0
  137. package/.claude/skills/cfn-loop-orchestration/test-edge-cases.sh +188 -0
  138. package/.claude/skills/cfn-loop-validation/SKILL.md +307 -217
  139. package/.claude/skills/complexity-estimator/SKILL.md +96 -0
  140. package/.claude/skills/complexity-estimator/estimate-complexity.sh +144 -0
  141. package/.claude/skills/context-pruner/SKILL.md +75 -0
  142. package/.claude/skills/context-pruner/prune-context.sh +73 -0
  143. package/.claude/skills/defense-in-depth/SKILL.md +133 -0
  144. package/.claude/skills/dependency-extractor/SKILL.md +35 -0
  145. package/.claude/skills/dependency-extractor/extract-dependencies.sh +66 -0
  146. package/.claude/skills/epic-decomposer/SKILL.md +44 -0
  147. package/.claude/skills/epic-decomposer/decompose-epic.sh +104 -0
  148. package/.claude/skills/improvement-recommender/SKILL.md +33 -0
  149. package/.claude/skills/improvement-recommender/recommend-improvements.sh +92 -0
  150. package/.claude/skills/intervention-detector/SKILL.md +39 -0
  151. package/.claude/skills/intervention-detector/detect-intervention.sh +111 -0
  152. package/.claude/skills/intervention-orchestrator/SKILL.md +43 -0
  153. package/.claude/skills/intervention-orchestrator/execute-intervention.sh +59 -0
  154. package/.claude/skills/loop2-output-processing/SKILL.md +163 -0
  155. package/.claude/skills/loop2-output-processing/execute-and-extract.sh +77 -0
  156. package/.claude/skills/loop2-output-processing/execute-and-extract.sh.backup +36 -0
  157. package/.claude/skills/loop2-output-processing/parse-feedback.sh +147 -0
  158. package/.claude/skills/loop2-output-processing/process-validator-output.sh +275 -0
  159. package/.claude/skills/loop2-output-processing/test-bug27-fix.sh +200 -0
  160. package/.claude/skills/loop2-output-processing/test-loop2-processing.sh +113 -0
  161. package/.claude/skills/loop3-output-processing/AGENT_COMPLETION_PROTOCOL.md +206 -0
  162. package/.claude/skills/loop3-output-processing/SKILL.md +421 -0
  163. package/.claude/skills/loop3-output-processing/calculate-confidence.sh +28 -0
  164. package/.claude/skills/loop3-output-processing/execute-and-extract.sh +85 -0
  165. package/.claude/skills/loop3-output-processing/parse-confidence.sh +31 -0
  166. package/.claude/skills/loop3-output-processing/test-agent-timeout.sh +327 -0
  167. package/.claude/skills/loop3-output-processing/test-loop3-processing.sh +155 -0
  168. package/.claude/skills/loop3-output-processing/verify-deliverables.sh +42 -0
  169. package/.claude/skills/pattern-extraction/SKILL.md +30 -0
  170. package/.claude/skills/pattern-extraction/extract-patterns.sh +80 -0
  171. package/.claude/skills/playbook/SKILL.md +113 -0
  172. package/.claude/skills/playbook/init-playbook.sh +54 -0
  173. package/.claude/skills/playbook/playbook.db +0 -0
  174. package/.claude/skills/playbook/query-playbook.sh +79 -0
  175. package/.claude/skills/playbook/update-playbook.sh +69 -0
  176. package/.claude/skills/playbook-auto-update/SKILL.md +29 -0
  177. package/.claude/skills/playbook-auto-update/auto-update-playbook.sh +86 -0
  178. package/.claude/skills/product-owner-decision/SKILL.md +332 -0
  179. package/.claude/skills/product-owner-decision/execute-decision.sh +176 -0
  180. package/.claude/skills/product-owner-decision/parse-decision.sh +66 -0
  181. package/.claude/skills/product-owner-decision/validate-deliverables.sh +82 -0
  182. package/.claude/skills/redis-coordination/LOGGING.md +260 -0
  183. package/.claude/skills/redis-coordination/README.md +30 -29
  184. package/.claude/skills/redis-coordination/SKILL.md +685 -83
  185. package/.claude/skills/redis-coordination/analyze-task-complexity.sh +277 -0
  186. package/.claude/skills/redis-coordination/cfn-loop-exec.sh +468 -0
  187. package/.claude/skills/redis-coordination/collect-confidence-scores.sh +179 -0
  188. package/.claude/skills/redis-coordination/collect-results.sh +75 -0
  189. package/.claude/skills/redis-coordination/data/cfn-loop.db +0 -0
  190. package/.claude/skills/redis-coordination/{test-orchestrator.sh → demos/test-orchestrator.sh} +25 -0
  191. package/.claude/skills/redis-coordination/execute-product-owner-decision.sh +258 -0
  192. package/.claude/skills/redis-coordination/get-agent-timeout.sh +176 -176
  193. package/.claude/skills/redis-coordination/invoke-waiting-mode.sh +93 -227
  194. package/.claude/skills/redis-coordination/invoke-waiting-mode.sh.backup-p7 +423 -0
  195. package/.claude/skills/redis-coordination/log-event.sh +109 -0
  196. package/.claude/skills/redis-coordination/monitor-cfn-violations.sh +391 -0
  197. package/.claude/skills/redis-coordination/orchestrate-cfn-loop-v3.sh +141 -0
  198. package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh +31 -993
  199. package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.backup +38 -0
  200. package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.backup-1761167675 +1672 -0
  201. package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.backup-p5 +1604 -0
  202. package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.backup-phase1 +1550 -0
  203. package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.backup-phase2 +1621 -0
  204. package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.backup-phase3 +1621 -0
  205. package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.bak +0 -0
  206. package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.broken +1627 -0
  207. package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.corrupted +80 -0
  208. package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.deprecated +1864 -0
  209. package/.claude/skills/redis-coordination/query-logs.sh +103 -0
  210. package/.claude/skills/redis-coordination/retrieve-context.sh +58 -0
  211. package/.claude/skills/redis-coordination/select-specialist-agent.sh +371 -0
  212. package/.claude/skills/redis-coordination/semantic-match-tfidf.py +252 -0
  213. package/.claude/skills/redis-coordination/send-heartbeat.sh +164 -72
  214. package/.claude/skills/redis-coordination/signal.sh +38 -0
  215. package/.claude/skills/redis-coordination/store-context.sh +86 -0
  216. package/.claude/skills/redis-coordination/test-context-injection.sh +354 -0
  217. package/.claude/skills/redis-coordination/test-timeout-enforcement.sh +513 -0
  218. package/.claude/skills/redis-coordination/tests/convert-line-endings.sh +15 -0
  219. package/.claude/skills/redis-coordination/tests/dlq-functionality-test.sh +101 -101
  220. package/.claude/skills/redis-coordination/tests/edge-cases-test.sh +98 -98
  221. package/.claude/skills/redis-coordination/tests/integration-test.sh +169 -169
  222. package/.claude/skills/redis-coordination/tests/retry-mechanism-test.sh +81 -81
  223. package/.claude/skills/redis-coordination/tests/run-test-suite.sh +91 -91
  224. package/.claude/skills/redis-coordination/tests/run-tests.sh +4 -0
  225. package/.claude/skills/redis-coordination/tests/test-primitives.sh +166 -0
  226. package/.claude/skills/redis-coordination/tests/test-utils.sh +53 -121
  227. package/.claude/skills/redis-coordination/tests/test_coordination_primitives.sh.deprecated +20 -0
  228. package/.claude/skills/redis-coordination/tests/test_utils.sh +49 -0
  229. package/.claude/skills/redis-coordination/v2_modularization/core_orchestration.sh +76 -0
  230. package/.claude/skills/redis-coordination/validate-parameters.sh +492 -0
  231. package/.claude/skills/retrospective-report/SKILL.md +31 -0
  232. package/.claude/skills/retrospective-report/generate-report.sh +101 -0
  233. package/.claude/skills/run-all-skill-tests.sh +124 -0
  234. package/.claude/skills/scope-simplifier/SKILL.md +37 -0
  235. package/.claude/skills/scope-simplifier/simplify-scope.sh +68 -0
  236. package/.claude/skills/simplified-agent-lifecycle/COST_ANALYSIS.md +49 -0
  237. package/.claude/skills/simplified-agent-lifecycle/DESIGN.md +98 -0
  238. package/.claude/skills/simplified-agent-lifecycle/MIGRATION_PLAN.md +74 -0
  239. package/.claude/skills/specialist-injection/SKILL.md +41 -0
  240. package/.claude/skills/specialist-injection/recommend-specialist.sh +57 -0
  241. package/.claude/skills/sprint-execution/SKILL.md +27 -0
  242. package/.claude/skills/sprint-execution/execute-sprint-task.sh +59 -0
  243. package/.claude/skills/sprint-execution/execute-sprint.sh +65 -0
  244. package/.claude/skills/sprint-planner/SKILL.md +37 -0
  245. package/.claude/skills/sprint-planner/plan-sprint.sh +85 -0
  246. package/.claude/skills/standardized-error-handling/SKILL.md +56 -0
  247. package/.claude/skills/standardized-error-handling/capture-agent-error.sh +87 -0
  248. package/.claude/skills/standardized-error-handling/test-error-handling.sh +166 -0
  249. package/.claude/skills/task-classifier/SKILL.md +94 -0
  250. package/.claude/skills/task-classifier/classify-task.sh +115 -0
  251. package/.claude/skills/validation-templates/SKILL.md +47 -0
  252. package/.claude/skills/validation-templates/content.json +38 -0
  253. package/.claude/skills/validation-templates/data.json +38 -0
  254. package/.claude/skills/validation-templates/design.json +38 -0
  255. package/.claude/skills/validation-templates/infrastructure.json +38 -0
  256. package/.claude/skills/validation-templates/research.json +38 -0
  257. package/.claude/skills/validation-templates/software.json +38 -0
  258. package/.claude/skills/webapp-testing/README.md +142 -0
  259. package/.claude/skills/webapp-testing/SCREENSHOT_NAMING_CONVENTION.md +547 -0
  260. package/.claude/skills/webapp-testing/SKILL.md +877 -0
  261. package/.claude/skills/webapp-testing/capture-screenshot.sh +238 -0
  262. package/.claude/skills/webapp-testing/cfn-loop-integration.sh +265 -0
  263. package/.claude/skills/webapp-testing/compare-screenshots.sh +199 -0
  264. package/.claude/skills/webapp-testing/init-storage.sh +150 -0
  265. package/.claude/skills/webapp-testing/set-baseline.sh +196 -0
  266. package/.claude/skills/webapp-testing/test-webapp-testing.sh +233 -0
  267. package/.claude/spawn-pattern-examples.md +3 -3
  268. package/CLAUDE.md +319 -45
  269. package/README.md +598 -251
  270. package/dist/agents/agent-loader.js +146 -165
  271. package/dist/agents/agent-loader.js.map +1 -1
  272. package/dist/cli/agent-command.js +2 -0
  273. package/dist/cli/agent-command.js.map +1 -1
  274. package/dist/cli/agent-definition-parser.js +7 -0
  275. package/dist/cli/agent-definition-parser.js.map +1 -1
  276. package/dist/cli/agent-executor.js +145 -11
  277. package/dist/cli/agent-executor.js.map +1 -1
  278. package/dist/cli/agent-prompt-builder.js +81 -1
  279. package/dist/cli/agent-prompt-builder.js.map +1 -1
  280. package/dist/cli/agent-spawn.js +10 -1
  281. package/dist/cli/agent-spawn.js.map +1 -1
  282. package/dist/cli/anthropic-client.js +192 -13
  283. package/dist/cli/anthropic-client.js.map +1 -1
  284. package/dist/cli/cfn-context.js +150 -0
  285. package/dist/cli/cfn-context.js.map +1 -1
  286. package/dist/cli/cfn-fork.js +159 -0
  287. package/dist/cli/cfn-fork.js.map +1 -0
  288. package/dist/cli/cli-agent-context.js +8 -3
  289. package/dist/cli/cli-agent-context.js.map +1 -1
  290. package/dist/cli/config-manager.js +109 -91
  291. package/dist/cli/config-manager.js.map +1 -1
  292. package/dist/cli/conversation-fork.js +201 -0
  293. package/dist/cli/conversation-fork.js.map +1 -0
  294. package/dist/cli/index.js +4 -0
  295. package/dist/cli/index.js.map +1 -1
  296. package/dist/cli/tool-definitions.js +263 -0
  297. package/dist/cli/tool-definitions.js.map +1 -0
  298. package/dist/cli/tool-executor.js +247 -0
  299. package/dist/cli/tool-executor.js.map +1 -0
  300. package/dist/hello.js +8 -0
  301. package/dist/hello.js.map +1 -0
  302. package/package.json +14 -6
  303. package/scripts/README.md +68 -0
  304. package/scripts/cfn-intervention-example.sh +21 -0
  305. package/scripts/migrate-test-infrastructure.sh +40 -0
  306. package/scripts/validate-test-migration.sh +49 -0
  307. package/scripts/verify-no-secrets.sh +55 -0
  308. package/.claude/agents/architecture/system-architect.md.backup +0 -603
  309. package/.claude/agents/code-booster.md +0 -131
  310. package/.claude/agents/consensus/performance-benchmarker.md +0 -101
  311. package/.claude/agents/consensus/security-manager.md +0 -107
  312. package/.claude/agents/context-curator.md +0 -167
  313. package/.claude/agents/context-reflector.md +0 -65
  314. package/.claude/agents/core-agents/cfn-loop-coordinator.md +0 -134
  315. package/.claude/agents/core-agents/code-quality-validator.md +0 -149
  316. package/.claude/agents/core-agents/context-curator.md +0 -452
  317. package/.claude/agents/core-agents/context-reflector.md +0 -273
  318. package/.claude/agents/core-agents/cost-savings-cfn-loop-coordinator.md +0 -235
  319. package/.claude/agents/core-agents/tester.md +0 -170
  320. package/.claude/agents/development/backend-dev.md +0 -165
  321. package/.claude/agents/devops/devops-engineer.md +0 -148
  322. package/.claude/agents/frontend/interaction-tester.md +0 -139
  323. package/.claude/agents/frontend/react-frontend-engineer.md +0 -9
  324. package/.claude/agents/personas/accessibility-advocate-persona.md +0 -107
  325. package/.claude/agents/testing/production-validator.md +0 -179
  326. package/.claude/agents/testing/tdd-london-swarm.md +0 -209
  327. package/.claude/agents/testing/unit/tdd-london-swarm.md +0 -43
  328. package/.claude/agents/testing/validation/production-validator.md +0 -43
  329. package/.claude/api-configs/config-current-zai-config.env +0 -62
  330. package/.claude/api-configs/config-test-zai-config.env +0 -62
  331. package/.claude/api-configs/env-backups/before-anthropic-20251020-025404.env +0 -62
  332. package/.claude/api-configs/env-backups/before-restore-20251020-025431.env +0 -62
  333. package/.claude/skills/redis-coordination/orchestrate-cfn-loop.sh.backup-1760949407 +0 -933
  334. package/dist/cli/cli-agent-context.test.js +0 -451
  335. package/dist/cli/cli-agent-context.test.js.map +0 -1
  336. package/dist/coordination/fleet-manager.test.js +0 -141
  337. package/dist/coordination/fleet-manager.test.js.map +0 -1
  338. package/dist/middleware/transparency-middleware.test.js +0 -184
  339. package/dist/middleware/transparency-middleware.test.js.map +0 -1
  340. /package/.claude/agents/{core-agents → developers}/researcher.md +0 -0
  341. /package/.claude/agents/{consensus → specialists}/crdt-synchronizer.md +0 -0
  342. /package/.claude/agents/{consensus → specialists}/quorum-manager.md +0 -0
  343. /package/.claude/agents/{consensus → specialists}/raft-manager.md +0 -0
  344. /package/.claude/{agents/core-agents → agents-ignore}/coordinator.md +0 -0
  345. /package/.claude/{agents/core-agents/cost-savings-coordinator.md → agents-ignore/cost-savings-coordinator.md.backup} +0 -0
  346. /package/.claude/skills/redis-coordination/{phase4-wake-queue-test-report.md → demos/phase4-wake-queue-test-report.md} +0 -0
  347. /package/.claude/skills/redis-coordination/{test-bzpopmin-fix.sh → demos/test-bzpopmin-fix.sh} +0 -0
  348. /package/.claude/skills/redis-coordination/{test-cancel-swarm.sh → demos/test-cancel-swarm.sh} +0 -0
  349. /package/.claude/skills/redis-coordination/{test-dlq.sh → demos/test-dlq.sh} +0 -0
  350. /package/.claude/skills/redis-coordination/{test-iteration-feedback.sh → demos/test-iteration-feedback.sh} +0 -0
  351. /package/.claude/skills/redis-coordination/{test-priority-wake-phase4-unix.sh → demos/test-priority-wake-phase4-unix.sh} +0 -0
  352. /package/.claude/skills/redis-coordination/{test-priority-wake-phase4.sh → demos/test-priority-wake-phase4.sh} +0 -0
  353. /package/.claude/skills/redis-coordination/{test-priority-wake.sh → demos/test-priority-wake.sh} +0 -0
  354. /package/.claude/skills/redis-coordination/{test-quick-fix.sh → demos/test-quick-fix.sh} +0 -0
  355. /package/.claude/skills/redis-coordination/{test-quorum-absolute.sh → demos/test-quorum-absolute.sh} +0 -0
  356. /package/.claude/skills/redis-coordination/{test-quorum-fallback.sh → demos/test-quorum-fallback.sh} +0 -0
  357. /package/.claude/skills/redis-coordination/{test-quorum-percentage.sh → demos/test-quorum-percentage.sh} +0 -0
  358. /package/.claude/skills/redis-coordination/{test-quorum-with-retry.sh → demos/test-quorum-with-retry.sh} +0 -0
  359. /package/.claude/skills/redis-coordination/{test-quorum.sh → demos/test-quorum.sh} +0 -0
  360. /package/.claude/skills/redis-coordination/{test-shutdown-handling.sh → demos/test-shutdown-handling.sh} +0 -0
  361. /package/.claude/skills/redis-coordination/{test-shutdown.sh → demos/test-shutdown.sh} +0 -0
  362. /package/.claude/skills/redis-coordination/{test-utils-unix.sh → demos/test-utils-unix.sh} +0 -0
  363. /package/.claude/skills/redis-coordination/{test-utils.sh → demos/test-utils.sh} +0 -0
  364. /package/.claude/skills/redis-coordination/{test-waiting-mode.sh → demos/test-waiting-mode.sh} +0 -0
@@ -0,0 +1,492 @@
1
+ #!/usr/bin/env bash
2
+
3
+ ##############################################################################
4
+ # Parameter Validation Helper for CFN Loop Orchestration
5
+ # Validates and standardizes orchestrator parameters
6
+ #
7
+ # Usage:
8
+ # ./validate-parameters.sh [options]
9
+ # Returns: 0 if valid, 1 if invalid
10
+ #
11
+ # Options:
12
+ # --task-id <id> Required: Unique task identifier
13
+ # --mode <mode> Required: mvp|standard|enterprise
14
+ # --loop3-agents <list> Required: Comma-separated agent IDs
15
+ # --loop2-agents <list> Required: Comma-separated agent IDs
16
+ # --product-owner <id> Required: Product owner agent ID
17
+ # --max-iterations <n> Optional: Maximum iterations (1-20)
18
+ # --min-quorum-loop3 <n> Optional: Minimum Loop 3 quorum
19
+ # --min-quorum-loop2 <n> Optional: Minimum Loop 2 quorum
20
+ # --epic-context <json> Optional: Epic context JSON
21
+ # --phase-context <json> Optional: Phase context JSON
22
+ # --success-criteria <json> Optional: Success criteria JSON
23
+ # --expected-files <list> Optional: Comma-separated expected files
24
+ # --phase-id <id> Optional: Phase identifier
25
+ # --verbose Enable verbose output
26
+ ##############################################################################
27
+
28
+ set -euo pipefail
29
+
30
+ # Variables
31
+ TASK_ID=""
32
+ MODE=""
33
+ LOOP3_AGENTS=""
34
+ LOOP2_AGENTS=""
35
+ PRODUCT_OWNER=""
36
+ MAX_ITERATIONS=""
37
+ MIN_QUORUM_LOOP3=""
38
+ MIN_QUORUM_LOOP2=""
39
+ EPIC_CONTEXT=""
40
+ PHASE_CONTEXT=""
41
+ SUCCESS_CRITERIA=""
42
+ EXPECTED_FILES=""
43
+ PHASE_ID=""
44
+ VERBOSE=0
45
+
46
+ # Validation result tracking
47
+ VALIDATION_ERRORS=()
48
+ VALIDATION_WARNINGS=()
49
+
50
+ # Colors for output
51
+ RED='\033[0;31m'
52
+ GREEN='\033[0;32m'
53
+ YELLOW='\033[1;33m'
54
+ NC='\033[0m' # No Color
55
+
56
+ ##############################################################################
57
+ # Utility Functions
58
+ ##############################################################################
59
+
60
+ log_error() {
61
+ VALIDATION_ERRORS+=("$1")
62
+ if [[ $VERBOSE -eq 1 ]]; then
63
+ echo -e "${RED}ERROR: $1${NC}" >&2
64
+ fi
65
+ }
66
+
67
+ log_warning() {
68
+ VALIDATION_WARNINGS+=("$1")
69
+ if [[ $VERBOSE -eq 1 ]]; then
70
+ echo -e "${YELLOW}WARNING: $1${NC}" >&2
71
+ fi
72
+ }
73
+
74
+ log_info() {
75
+ if [[ $VERBOSE -eq 1 ]]; then
76
+ echo -e "${GREEN}INFO: $1${NC}" >&2
77
+ fi
78
+ }
79
+
80
+ # Validate JSON structure
81
+ validate_json() {
82
+ local json_string="$1"
83
+ local field_name="$2"
84
+
85
+ if [[ -z "$json_string" ]]; then
86
+ return 0 # Empty JSON is valid (optional field)
87
+ fi
88
+
89
+ # Try to parse with jq
90
+ if ! echo "$json_string" | jq . >/dev/null 2>&1; then
91
+ log_error "$field_name: Invalid JSON format"
92
+ return 1
93
+ fi
94
+
95
+ log_info "$field_name: Valid JSON structure"
96
+ return 0
97
+ }
98
+
99
+ # Validate task ID format
100
+ validate_task_id() {
101
+ local task_id="$1"
102
+
103
+ if [[ -z "$task_id" ]]; then
104
+ log_error "task-id: Required parameter missing"
105
+ return 1
106
+ fi
107
+
108
+ # Check length (reasonable limits)
109
+ if [[ ${#task_id} -lt 3 ]]; then
110
+ log_error "task-id: Too short (minimum 3 characters)"
111
+ return 1
112
+ fi
113
+
114
+ if [[ ${#task_id} -gt 100 ]]; then
115
+ log_error "task-id: Too long (maximum 100 characters)"
116
+ return 1
117
+ fi
118
+
119
+ # Check for valid characters (alphanumeric, hyphens, underscores)
120
+ if [[ ! "$task_id" =~ ^[a-zA-Z0-9_-]+$ ]]; then
121
+ log_error "task-id: Invalid characters (only letters, numbers, hyphens, underscores allowed)"
122
+ return 1
123
+ fi
124
+
125
+ log_info "task-id: Valid format"
126
+ return 0
127
+ }
128
+
129
+ # Validate mode
130
+ validate_mode() {
131
+ local mode="$1"
132
+
133
+ if [[ -z "$mode" ]]; then
134
+ log_error "mode: Required parameter missing"
135
+ return 1
136
+ fi
137
+
138
+ case "$mode" in
139
+ mvp|standard|enterprise)
140
+ log_info "mode: Valid mode ($mode)"
141
+ return 0
142
+ ;;
143
+ *)
144
+ log_error "mode: Invalid mode (must be mvp, standard, or enterprise)"
145
+ return 1
146
+ ;;
147
+ esac
148
+ }
149
+
150
+ # Validate agent list
151
+ validate_agent_list() {
152
+ local agent_list="$1"
153
+ local field_name="$2"
154
+
155
+ if [[ -z "$agent_list" ]]; then
156
+ log_error "$field_name: Required parameter missing"
157
+ return 1
158
+ fi
159
+
160
+ # Split by comma and validate each agent ID
161
+ IFS=',' read -ra AGENTS <<< "$agent_list"
162
+ for agent in "${AGENTS[@]}"; do
163
+ agent=$(echo "$agent" | xargs) # Trim whitespace
164
+ if [[ -z "$agent" ]]; then
165
+ log_error "$field_name: Empty agent ID in list"
166
+ return 1
167
+ fi
168
+
169
+ if [[ ! "$agent" =~ ^[a-zA-Z0-9_-]+$ ]]; then
170
+ log_error "$field_name: Invalid agent ID format: $agent"
171
+ return 1
172
+ fi
173
+ done
174
+
175
+ log_info "$field_name: Valid agent list (${#AGENTS[@]} agents)"
176
+ return 0
177
+ }
178
+
179
+ # Validate numeric parameters
180
+ validate_numeric() {
181
+ local value="$1"
182
+ local field_name="$2"
183
+ local min_val="${3:-1}"
184
+ local max_val="${4:-100}"
185
+
186
+ if [[ -z "$value" ]]; then
187
+ return 0 # Optional parameter
188
+ fi
189
+
190
+ # Check if it's a valid number
191
+ if ! [[ "$value" =~ ^[0-9]+$ ]]; then
192
+ log_error "$field_name: Must be a positive integer"
193
+ return 1
194
+ fi
195
+
196
+ # Check range
197
+ if [[ $value -lt $min_val || $value -gt $max_val ]]; then
198
+ log_error "$field_name: Must be between $min_val and $max_val"
199
+ return 1
200
+ fi
201
+
202
+ log_info "$field_name: Valid numeric value ($value)"
203
+ return 0
204
+ }
205
+
206
+ # Validate quorum parameter (supports multiple formats)
207
+ validate_quorum() {
208
+ local quorum="$1"
209
+ local field_name="$2"
210
+
211
+ if [[ -z "$quorum" ]]; then
212
+ return 0 # Optional parameter
213
+ fi
214
+
215
+ # Check percentage format (e.g., "75%")
216
+ if [[ "$quorum" =~ ^[0-9]+%$ ]]; then
217
+ local percent="${quorum%\%}"
218
+ if [[ $percent -lt 1 || $percent -gt 100 ]]; then
219
+ log_error "$field_name: Percentage must be between 1% and 100%"
220
+ return 1
221
+ fi
222
+ log_info "$field_name: Valid percentage format ($quorum)"
223
+ return 0
224
+ fi
225
+
226
+ # Check decimal format (e.g., "0.75")
227
+ if [[ "$quorum" =~ ^0\.[0-9]+$ ]]; then
228
+ local decimal=$(echo "$quorum" | bc -l)
229
+ if (( $(echo "$decimal < 0.01 || $decimal > 1.0" | bc -l) )); then
230
+ log_error "$field_name: Decimal must be between 0.01 and 1.0"
231
+ return 1
232
+ fi
233
+ log_info "$field_name: Valid decimal format ($quorum)"
234
+ return 0
235
+ fi
236
+
237
+ # Check absolute number format (e.g., "3")
238
+ if [[ "$quorum" =~ ^[0-9]+$ ]]; then
239
+ if [[ $quorum -lt 1 || $quorum -gt 20 ]]; then
240
+ log_error "$field_name: Absolute number must be between 1 and 20"
241
+ return 1
242
+ fi
243
+ log_info "$field_name: Valid absolute format ($quorum)"
244
+ return 0
245
+ fi
246
+
247
+ log_error "$field_name: Invalid format (must be number, percentage, or decimal)"
248
+ return 1
249
+ }
250
+
251
+ # Validate file list
252
+ validate_file_list() {
253
+ local file_list="$1"
254
+ local field_name="$2"
255
+
256
+ if [[ -z "$file_list" ]]; then
257
+ return 0 # Optional parameter
258
+ fi
259
+
260
+ # Split by comma and validate each file path
261
+ IFS=',' read -ra FILES <<< "$file_list"
262
+ for file in "${FILES[@]}"; do
263
+ file=$(echo "$file" | xargs) # Trim whitespace
264
+ if [[ -z "$file" ]]; then
265
+ log_error "$field_name: Empty file path in list"
266
+ return 1
267
+ fi
268
+
269
+ # Basic path validation (no absolute paths, no directory traversal)
270
+ if [[ "$file" =~ ^/ ]] || [[ "$file" =~ \.\. ]]; then
271
+ log_warning "$field_name: Potentially unsafe path: $file"
272
+ fi
273
+ done
274
+
275
+ log_info "$field_name: Valid file list (${#FILES[@]} files)"
276
+ return 0
277
+ }
278
+
279
+ ##############################################################################
280
+ # Main Validation Functions
281
+ ##############################################################################
282
+
283
+ validate_required_parameters() {
284
+ local errors=0
285
+
286
+ validate_task_id "$TASK_ID" || ((errors++))
287
+ validate_mode "$MODE" || ((errors++))
288
+ validate_agent_list "$LOOP3_AGENTS" "loop3-agents" || ((errors++))
289
+ validate_agent_list "$LOOP2_AGENTS" "loop2-agents" || ((errors++))
290
+ validate_agent_list "$PRODUCT_OWNER" "product-owner" || ((errors++))
291
+
292
+ return $errors
293
+ }
294
+
295
+ validate_optional_parameters() {
296
+ local errors=0
297
+
298
+ validate_numeric "$MAX_ITERATIONS" "max-iterations" 1 20 || ((errors++))
299
+ validate_quorum "$MIN_QUORUM_LOOP3" "min-quorum-loop3" || ((errors++))
300
+ validate_quorum "$MIN_QUORUM_LOOP2" "min-quorum-loop2" || ((errors++))
301
+ validate_json "$EPIC_CONTEXT" "epic-context" || ((errors++))
302
+ validate_json "$PHASE_CONTEXT" "phase-context" || ((errors++))
303
+ validate_json "$SUCCESS_CRITERIA" "success-criteria" || ((errors++))
304
+ validate_file_list "$EXPECTED_FILES" "expected-files" || ((errors++))
305
+
306
+ # Validate phase ID (similar to task ID)
307
+ if [[ -n "$PHASE_ID" ]]; then
308
+ if [[ ! "$PHASE_ID" =~ ^[a-zA-Z0-9_-]+$ ]]; then
309
+ log_error "phase-id: Invalid format (only letters, numbers, hyphens, underscores allowed)"
310
+ ((errors++))
311
+ else
312
+ log_info "phase-id: Valid format"
313
+ fi
314
+ fi
315
+
316
+ return $errors
317
+ }
318
+
319
+ print_validation_summary() {
320
+ local total_errors=${#VALIDATION_ERRORS[@]}
321
+ local total_warnings=${#VALIDATION_WARNINGS[@]}
322
+
323
+ echo ""
324
+ echo "=== Parameter Validation Summary ==="
325
+
326
+ if [[ $total_errors -eq 0 ]]; then
327
+ echo -e "${GREEN}✅ All parameters are valid${NC}"
328
+ else
329
+ echo -e "${RED}❌ Validation failed with $total_errors error(s)${NC}"
330
+ if [[ $VERBOSE -eq 0 ]]; then
331
+ echo "Run with --verbose for detailed error messages"
332
+ fi
333
+ fi
334
+
335
+ if [[ $total_warnings -gt 0 ]]; then
336
+ echo -e "${YELLOW}⚠️ $total_warnings warning(s) found${NC}"
337
+ if [[ $VERBOSE -eq 0 ]]; then
338
+ echo "Run with --verbose for detailed warning messages"
339
+ fi
340
+ fi
341
+
342
+ echo ""
343
+
344
+ # Show errors in non-verbose mode
345
+ if [[ $VERBOSE -eq 0 && $total_errors -gt 0 ]]; then
346
+ echo "Errors:"
347
+ for error in "${VALIDATION_ERRORS[@]}"; do
348
+ echo " - $error"
349
+ done
350
+ echo ""
351
+ fi
352
+
353
+ # Show warnings in non-verbose mode
354
+ if [[ $VERBOSE -eq 0 && $total_warnings -gt 0 ]]; then
355
+ echo "Warnings:"
356
+ for warning in "${VALIDATION_WARNINGS[@]}"; do
357
+ echo " - $warning"
358
+ done
359
+ echo ""
360
+ fi
361
+ }
362
+
363
+ ##############################################################################
364
+ # Parse Arguments
365
+ ##############################################################################
366
+
367
+ while [[ $# -gt 0 ]]; do
368
+ case $1 in
369
+ --task-id)
370
+ TASK_ID="$2"
371
+ shift 2
372
+ ;;
373
+ --mode)
374
+ MODE="$2"
375
+ shift 2
376
+ ;;
377
+ --loop3-agents)
378
+ LOOP3_AGENTS="$2"
379
+ shift 2
380
+ ;;
381
+ --loop2-agents)
382
+ LOOP2_AGENTS="$2"
383
+ shift 2
384
+ ;;
385
+ --product-owner)
386
+ PRODUCT_OWNER="$2"
387
+ shift 2
388
+ ;;
389
+ --max-iterations)
390
+ MAX_ITERATIONS="$2"
391
+ shift 2
392
+ ;;
393
+ --min-quorum-loop3)
394
+ MIN_QUORUM_LOOP3="$2"
395
+ shift 2
396
+ ;;
397
+ --min-quorum-loop2)
398
+ MIN_QUORUM_LOOP2="$2"
399
+ shift 2
400
+ ;;
401
+ --epic-context)
402
+ EPIC_CONTEXT="$2"
403
+ shift 2
404
+ ;;
405
+ --phase-context)
406
+ PHASE_CONTEXT="$2"
407
+ shift 2
408
+ ;;
409
+ --success-criteria)
410
+ SUCCESS_CRITERIA="$2"
411
+ shift 2
412
+ ;;
413
+ --expected-files)
414
+ EXPECTED_FILES="$2"
415
+ shift 2
416
+ ;;
417
+ --phase-id)
418
+ PHASE_ID="$2"
419
+ shift 2
420
+ ;;
421
+ --verbose)
422
+ VERBOSE=1
423
+ shift
424
+ ;;
425
+ --help|-h)
426
+ echo "Usage: $0 [options]"
427
+ echo "Validates CFN Loop orchestrator parameters"
428
+ echo ""
429
+ echo "Required options:"
430
+ echo " --task-id <id> Unique task identifier"
431
+ echo " --mode <mode> Execution mode (mvp|standard|enterprise)"
432
+ echo " --loop3-agents <list> Comma-separated Loop 3 agent IDs"
433
+ echo " --loop2-agents <list> Comma-separated Loop 2 agent IDs"
434
+ echo " --product-owner <id> Product owner agent ID"
435
+ echo ""
436
+ echo "Optional options:"
437
+ echo " --max-iterations <n> Maximum iterations (1-20)"
438
+ echo " --min-quorum-loop3 <n> Loop 3 quorum (number|percentage|decimal)"
439
+ echo " --min-quorum-loop2 <n> Loop 2 quorum (number|percentage|decimal)"
440
+ echo " --epic-context <json> Epic context JSON"
441
+ echo " --phase-context <json> Phase context JSON"
442
+ echo " --success-criteria <json> Success criteria JSON"
443
+ echo " --expected-files <list> Comma-separated expected files"
444
+ echo " --phase-id <id> Phase identifier"
445
+ echo " --verbose Enable verbose output"
446
+ echo " --help Show this help message"
447
+ echo ""
448
+ echo "Exit codes:"
449
+ echo " 0 All parameters are valid"
450
+ echo " 1 Validation errors found"
451
+ exit 0
452
+ ;;
453
+ *)
454
+ echo "Unknown option: $1" >&2
455
+ echo "Use --help for usage information" >&2
456
+ exit 1
457
+ ;;
458
+ esac
459
+ done
460
+
461
+ ##############################################################################
462
+ # Main Execution
463
+ ##############################################################################
464
+
465
+ # If no parameters provided, show usage
466
+ if [[ $# -eq 0 && $VERBOSE -eq 0 ]]; then
467
+ echo "No parameters provided for validation" >&2
468
+ echo "Use --help for usage information" >&2
469
+ exit 1
470
+ fi
471
+
472
+ log_info "Starting parameter validation..."
473
+
474
+ # Validate required parameters
475
+ validate_required_parameters
476
+ required_errors=$?
477
+
478
+ # Validate optional parameters
479
+ validate_optional_parameters
480
+ optional_errors=$?
481
+
482
+ total_errors=$((required_errors + optional_errors))
483
+
484
+ # Print summary
485
+ print_validation_summary
486
+
487
+ # Exit with appropriate code
488
+ if [[ $total_errors -eq 0 ]]; then
489
+ exit 0
490
+ else
491
+ exit 1
492
+ fi
@@ -0,0 +1,31 @@
1
+ # Retrospective Report Generator Skill
2
+
3
+ ## Purpose
4
+ Generate comprehensive, human-readable retrospective reports from sprint data.
5
+
6
+ ## Key Features
7
+ - Transform JSON data into markdown
8
+ - Highlight key metrics and insights
9
+ - Provide structured, readable format
10
+ - Enable historical documentation
11
+
12
+ ## Report Components
13
+ - Sprint Overview
14
+ - Velocity Metrics
15
+ - Confidence Trajectory
16
+ - Agent Performance
17
+ - Bottlenecks and Challenges
18
+ - Successful Strategies
19
+ - Lessons Learned
20
+ - Recommendations
21
+
22
+ ## Output Targets
23
+ - Markdown documentation
24
+ - HTML reports (optional)
25
+ - Plain text summaries
26
+
27
+ ## Formatting Guidelines
28
+ - Consistent, professional layout
29
+ - Use of markdown formatting
30
+ - Emphasis on readability
31
+ - Include visual cues (emojis, formatting)
@@ -0,0 +1,101 @@
1
+ #!/bin/bash
2
+
3
+ # Retrospective Report Generator
4
+
5
+ set -euo pipefail
6
+
7
+ # Parse arguments
8
+ while [[ $# -gt 0 ]]; do
9
+ key="$1"
10
+ case $key in
11
+ --retrospective-json)
12
+ RETROSPECTIVE_JSON="$2"
13
+ shift 2
14
+ ;;
15
+ --output)
16
+ OUTPUT_FILE="$2"
17
+ shift 2
18
+ ;;
19
+ *)
20
+ echo "Unknown parameter: $1"
21
+ exit 1
22
+ ;;
23
+ esac
24
+ done
25
+
26
+ # Input validation
27
+ [[ -z "${RETROSPECTIVE_JSON:-}" ]] && { echo "Error: retrospective-json is required"; exit 1; }
28
+ [[ -z "${OUTPUT_FILE:-}" ]] && { echo "Error: output file is required"; exit 1; }
29
+
30
+ # Ensure output directory exists
31
+ mkdir -p "$(dirname "$OUTPUT_FILE")"
32
+
33
+ # Generate Markdown Report using jq and heredoc
34
+ generate_markdown() {
35
+ local json="$1"
36
+
37
+ # Extract key data using jq
38
+ sprint_name=$(echo "$json" | jq -r '.sprint_name // "Unnamed Sprint"')
39
+ sprint_num=$(echo "$json" | jq -r '.sprint_num // "N/A"')
40
+ task_type=$(echo "$json" | jq -r '.task_type // "Unspecified"')
41
+ total_iterations=$(echo "$json" | jq -r '.velocity.total_iterations // 0')
42
+ time_to_convergence=$(echo "$json" | jq -r '.velocity."time_to_convergence" // "Unknown"')
43
+ final_confidence=$(echo "$json" | jq -r '.confidence_trajectory["iteration_3"] // 0')
44
+ final_consensus=$(echo "$json" | jq '.confidence_trajectory["iteration_3"] // 0')
45
+
46
+ # Generate markdown
47
+ cat <<EOF
48
+ # Sprint Retrospective: ${sprint_name}
49
+
50
+ **Date:** $(date +%Y-%m-%d)
51
+ **Sprint Number:** ${sprint_num}
52
+ **Task Type:** ${task_type}
53
+ **Status:** SUCCEED
54
+
55
+ ## Metrics
56
+
57
+ - Total Iterations: ${total_iterations}
58
+ - Time to Convergence: ${time_to_convergence}
59
+ - Final Confidence: ${final_confidence}
60
+ - Final Consensus: ${final_consensus}
61
+
62
+ ## Confidence Trajectory
63
+
64
+ $(echo "$json" | jq -r '.confidence_trajectory | to_entries[] | "Iteration \(.key): \(.value) \(if .value >= 0.90 then "(PROCEED)" elif .value >= 0.75 then "(PASS)" else "(BELOW GATE)" end)"')
65
+
66
+ ## Agent Performance
67
+
68
+ Top Performers:
69
+ $(echo "$json" | jq -r '.agent_performance.top_performers[] | "- \(.agent): \(.avg_confidence) avg confidence"')
70
+
71
+ Synergies:
72
+ $(echo "$json" | jq -r '.agent_performance.synergies[] | "- \(.pair): \(.effectiveness)"')
73
+
74
+ ## Bottlenecks Identified
75
+
76
+ $(echo "$json" | jq -r '.bottlenecks[] | "1. \(.type) (Iteration \(.iteration))\n - \(.description)\n - Resolution: \(.resolution)"')
77
+
78
+ ## Successful Strategies
79
+
80
+ $(echo "$json" | jq -r '.successful_strategies[] | "- \(.)"')
81
+
82
+ ## Lessons Learned
83
+
84
+ $(echo "$json" | jq -r '.lessons_learned[] | "\(.)"')
85
+
86
+ ## Recommendations for Future
87
+
88
+ $(echo "$json" | jq -r '.playbook_recommendations[] | "- \(.task_pattern): Add \(.add_agent), Expected Improvement: \(.expected_improvement)"')
89
+
90
+ ## Playbook Updated
91
+
92
+ ✅ Task pattern stored in playbook for future reference
93
+ ✅ Agent performance metrics updated
94
+ ✅ Successful strategies recorded
95
+ EOF
96
+ }
97
+
98
+ # Generate the markdown and save
99
+ generate_markdown "$RETROSPECTIVE_JSON" > "$OUTPUT_FILE"
100
+
101
+ echo "Retrospective report generated: $OUTPUT_FILE"