claude-flow-novice 2.15.11 → 2.16.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 (741) hide show
  1. package/.claude/cfn-extras/agents/cfn-v3-coordinator.md +517 -0
  2. package/.claude/cfn-extras/skills/GOOGLE_SHEETS_SKILLS_README.md +1 -1
  3. package/.claude/cfn-extras/skills/google-sheets-api-coordinator/SKILL.md +1 -1
  4. package/.claude/cfn-extras/skills/google-sheets-formula-builder/SKILL.md +1 -1
  5. package/.claude/cfn-extras/skills/google-sheets-progress/SKILL.md +1 -1
  6. package/.claude/commands/CFN_LOOP_FRONTEND.md +1 -1
  7. package/.claude/commands/cfn-loop-cli.md +214 -442
  8. package/.claude/commands/cfn-loop-frontend.md +1 -1
  9. package/.claude/commands/cfn-loop-task.md +2 -2
  10. package/.claude/commands/cfn-loop-trigger.md +114 -0
  11. package/.claude/commands/deprecated/cfn-loop.md +2 -2
  12. package/.claude/hooks/cfn-invoke-post-edit-ts.sh +100 -0
  13. package/.claude/hooks/cfn-invoke-post-edit-ts.sh.backup +78 -0
  14. package/.claude/hooks/cfn-invoke-post-edit.sh +53 -5
  15. package/.claude/hooks/cfn-invoke-post-edit.sh.backup +87 -0
  16. package/.claude/hooks/cfn-invoke-pre-edit-ts.sh +116 -0
  17. package/.claude/hooks/cfn-invoke-pre-edit-ts.sh.backup +94 -0
  18. package/.claude/hooks/cfn-invoke-pre-edit.sh +22 -0
  19. package/.claude/hooks/cfn-invoke-pre-edit.sh.backup +88 -0
  20. package/.claude/hooks/cfn-post-edit.config.json +9 -2
  21. package/.claude/root-claude-distribute/CFN-CLAUDE.md +1 -1
  22. package/.claude/skills/cfn-agent-spawning/SKILL.md +48 -1
  23. package/.claude/skills/cfn-agent-spawning/SKILL.md.backup +135 -0
  24. package/.claude/skills/cfn-agent-spawning/TYPESCRIPT_MIGRATION.md +567 -0
  25. package/.claude/skills/cfn-agent-spawning/check-dependencies.sh +22 -0
  26. package/.claude/skills/{cfn-redis-coordination/check-dependencies.sh → cfn-agent-spawning/check-dependencies.sh.backup} +3 -5
  27. package/.claude/skills/cfn-agent-spawning/get-agent-provider-env.sh +22 -0
  28. package/.claude/skills/cfn-agent-spawning/get-agent-provider-env.sh.backup +127 -0
  29. package/.claude/skills/cfn-agent-spawning/parse-agent-provider.sh +22 -0
  30. package/.claude/skills/cfn-agent-spawning/parse-agent-provider.sh.backup +59 -0
  31. package/.claude/skills/cfn-agent-spawning/spawn-agent-wrapper.sh +63 -0
  32. package/.claude/skills/cfn-agent-spawning/spawn-agent-wrapper.sh.backup +41 -0
  33. package/.claude/skills/cfn-agent-spawning/spawn-agent.sh +26 -1
  34. package/.claude/skills/cfn-agent-spawning/spawn-templates.sh +22 -0
  35. package/.claude/skills/cfn-agent-spawning/spawn-templates.sh.backup +613 -0
  36. package/.claude/skills/cfn-agent-spawning/spawn-worker.sh +22 -0
  37. package/.claude/skills/cfn-agent-spawning/spawn-worker.sh.backup +176 -0
  38. package/.claude/skills/cfn-backlog-management/SKILL.md +1 -1
  39. package/.claude/skills/cfn-loop-orchestration/.backups/unknown/1763619700_33aff4a69b99159e4e849107ebc4d09f/metadata.json +8 -0
  40. package/.claude/skills/cfn-loop-orchestration/.backups/unknown/1763619700_33aff4a69b99159e4e849107ebc4d09f/original +271 -0
  41. package/.claude/skills/cfn-loop-orchestration/.backups/unknown/1763619700_33aff4a69b99159e4e849107ebc4d09f/revert.sh +7 -0
  42. package/.claude/skills/cfn-loop-orchestration/.backups/unknown/1763671642_06496e8c399a79db08167cc00ed4b31e/metadata.json +8 -0
  43. package/.claude/skills/cfn-loop-orchestration/.backups/unknown/1763671642_06496e8c399a79db08167cc00ed4b31e/original +325 -0
  44. package/.claude/skills/cfn-loop-orchestration/.backups/unknown/1763671642_06496e8c399a79db08167cc00ed4b31e/revert.sh +7 -0
  45. package/.claude/skills/cfn-loop-orchestration/CLI_IMPLEMENTATION_SUMMARY.md +330 -0
  46. package/.claude/skills/cfn-loop-orchestration/CONFIGURATION_IMPROVEMENTS.md +318 -0
  47. package/.claude/skills/cfn-loop-orchestration/CONTEXT_LOOKUP_MIGRATION.md +308 -0
  48. package/.claude/skills/cfn-loop-orchestration/CONTEXT_LOOKUP_QUICK_START.md +378 -0
  49. package/.claude/skills/cfn-loop-orchestration/E2E_VALIDATION_REPORT.md +262 -0
  50. package/.claude/skills/cfn-loop-orchestration/IMPLEMENTATION_SUMMARY.md +319 -519
  51. package/.claude/skills/cfn-loop-orchestration/NORTH_STAR_E2E_REPORT.md +299 -0
  52. package/.claude/skills/cfn-loop-orchestration/NORTH_STAR_EXECUTION_SUMMARY.md +403 -0
  53. package/.claude/skills/cfn-loop-orchestration/NORTH_STAR_INDEX.md +323 -0
  54. package/.claude/skills/cfn-loop-orchestration/SKILL.md +159 -48
  55. package/.claude/skills/cfn-loop-orchestration/SPAWN_AGENTS_IMPLEMENTATION.md +188 -0
  56. package/.claude/skills/cfn-loop-orchestration/TEST_COVERAGE_REPORT.md +335 -0
  57. package/.claude/skills/cfn-loop-orchestration/TEST_COVERAGE_SUMMARY.md +456 -0
  58. package/.claude/skills/cfn-loop-orchestration/TYPESCRIPT_INTEGRATION_REPORT.md +709 -0
  59. package/.claude/skills/cfn-loop-orchestration/TYPESCRIPT_INTEGRATION_SUMMARY.md +257 -0
  60. package/.claude/skills/cfn-loop-orchestration/VALIDATION_REPORT.md +572 -0
  61. package/.claude/skills/cfn-loop-orchestration/VALIDATION_SUMMARY.txt +196 -0
  62. package/.claude/skills/cfn-loop-orchestration/VALIDATOR_MODULE_GUIDE.md +526 -0
  63. package/.claude/skills/cfn-loop-orchestration/archive/legacy-bash/README.md +167 -0
  64. package/.claude/skills/cfn-loop-orchestration/archive/legacy-bash/orchestrate-enhanced.sh +548 -0
  65. package/.claude/skills/cfn-loop-orchestration/{orchestrate-wrapper.sh → archive/legacy-bash/orchestrate-wrapper.sh} +11 -1
  66. package/.claude/skills/cfn-loop-orchestration/archive/legacy-bash/orchestrate.sh +182 -0
  67. package/.claude/skills/cfn-loop-orchestration/e2e-validation-fixed.js +240 -0
  68. package/.claude/skills/cfn-loop-orchestration/e2e-validation.js +213 -0
  69. package/.claude/skills/cfn-loop-orchestration/package-lock.json +3 -0
  70. package/.claude/skills/cfn-loop-orchestration/package.json +4 -0
  71. package/.claude/skills/cfn-loop-orchestration/run-north-star-e2e.ts +210 -0
  72. package/.claude/skills/cfn-loop-orchestration/src/cli/orchestrator-cli.ts +396 -0
  73. package/.claude/skills/cfn-loop-orchestration/src/helpers/CONFIDENCE_AGGREGATOR.md +564 -0
  74. package/.claude/skills/cfn-loop-orchestration/src/helpers/CONFIDENCE_AGGREGATOR_QUICK_REF.md +241 -0
  75. package/.claude/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_IMPLEMENTATION.md +375 -0
  76. package/.claude/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_QUICK_REFERENCE.md +362 -0
  77. package/.claude/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_README.md +307 -0
  78. package/.claude/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_USAGE_GUIDE.md +508 -0
  79. package/.claude/skills/cfn-loop-orchestration/src/helpers/confidence-aggregator.ts +473 -0
  80. package/.claude/skills/cfn-loop-orchestration/src/helpers/consensus.ts +1 -1
  81. package/.claude/skills/cfn-loop-orchestration/src/helpers/context-injector.ts +349 -0
  82. package/.claude/skills/cfn-loop-orchestration/src/helpers/context-lookup.ts +486 -0
  83. package/.claude/skills/cfn-loop-orchestration/src/helpers/deliverable-verifier.ts +6 -2
  84. package/.claude/skills/cfn-loop-orchestration/src/helpers/gate-check.ts +1 -1
  85. package/.claude/skills/cfn-loop-orchestration/src/helpers/product-owner-decision.ts +316 -0
  86. package/.claude/skills/cfn-loop-orchestration/src/helpers/spawn-agents.ts +357 -0
  87. package/.claude/skills/cfn-loop-orchestration/src/helpers/validator.ts +276 -0
  88. package/.claude/skills/cfn-loop-orchestration/src/index.ts +2 -0
  89. package/.claude/skills/cfn-loop-orchestration/src/orchestrate.ts +743 -2
  90. package/.claude/skills/cfn-loop-orchestration/src/types.ts +56 -0
  91. package/.claude/skills/cfn-loop-orchestration/test-cli.sh +92 -0
  92. package/.claude/skills/cfn-loop-orchestration/test-typescript-integration.sh +442 -0
  93. package/.claude/skills/cfn-loop-orchestration/tests/agent-spawner.test.ts +124 -0
  94. package/.claude/skills/cfn-loop-orchestration/tests/confidence-aggregator.test.ts +604 -0
  95. package/.claude/skills/cfn-loop-orchestration/tests/context-injector.test.ts +561 -0
  96. package/.claude/skills/cfn-loop-orchestration/tests/context-lookup.test.ts +661 -0
  97. package/.claude/skills/cfn-loop-orchestration/tests/deliverable-verifier.test.ts +2 -2
  98. package/.claude/skills/cfn-loop-orchestration/tests/gate-check-edge-cases.test.ts +422 -0
  99. package/.claude/skills/cfn-loop-orchestration/tests/gate-checker.test.ts +276 -0
  100. package/.claude/skills/cfn-loop-orchestration/tests/logger.test.ts +291 -0
  101. package/.claude/skills/cfn-loop-orchestration/tests/north-star-e2e.test.ts +334 -0
  102. package/.claude/skills/cfn-loop-orchestration/tests/redis-coordinator.test.ts +321 -0
  103. package/.claude/skills/cfn-loop-orchestration/tests/spawn-agents.test.ts +284 -0
  104. package/.claude/skills/cfn-loop-orchestration/tests/validator.test.ts +643 -0
  105. package/.claude/skills/cfn-loop-validation/IMPLEMENTATION_SUMMARY.md +672 -0
  106. package/.claude/skills/cfn-loop-validation/INDEX.md +531 -0
  107. package/.claude/skills/cfn-loop-validation/README_TYPESCRIPT.md +454 -0
  108. package/.claude/skills/cfn-loop-validation/SKILL.md +48 -1
  109. package/.claude/skills/cfn-loop-validation/SKILL.md.backup +353 -0
  110. package/.claude/skills/cfn-loop-validation/SKILL_TYPESCRIPT.md +782 -0
  111. package/.claude/skills/cfn-loop-validation/VAPOR_DETECTION_EXAMPLES.md +598 -0
  112. package/.claude/skills/cfn-loop-validation/check-dependencies.sh +22 -0
  113. package/{claude-assets/skills/cfn-redis-coordination/check-dependencies.sh → .claude/skills/cfn-loop-validation/check-dependencies.sh.backup} +4 -5
  114. package/.claude/skills/cfn-loop-validation/detect-vapor.sh +59 -0
  115. package/.claude/skills/cfn-loop-validation/detect-vapor.sh.backup +37 -0
  116. package/.claude/skills/cfn-loop-validation/dist/.tsbuildinfo +1 -0
  117. package/.claude/skills/cfn-loop-validation/dist/cli/detect-vapor.d.ts +14 -0
  118. package/.claude/skills/cfn-loop-validation/dist/cli/detect-vapor.d.ts.map +1 -0
  119. package/.claude/skills/cfn-loop-validation/dist/cli/detect-vapor.js +185 -0
  120. package/.claude/skills/cfn-loop-validation/dist/cli/detect-vapor.js.map +1 -0
  121. package/.claude/skills/cfn-loop-validation/dist/cli/validate-deliverables.d.ts +14 -0
  122. package/.claude/skills/cfn-loop-validation/dist/cli/validate-deliverables.d.ts.map +1 -0
  123. package/.claude/skills/cfn-loop-validation/dist/cli/validate-deliverables.js +176 -0
  124. package/.claude/skills/cfn-loop-validation/dist/cli/validate-deliverables.js.map +1 -0
  125. package/.claude/skills/cfn-loop-validation/dist/cli/validate-gate.d.ts +19 -0
  126. package/.claude/skills/cfn-loop-validation/dist/cli/validate-gate.d.ts.map +1 -0
  127. package/.claude/skills/cfn-loop-validation/dist/cli/validate-gate.js +123 -0
  128. package/.claude/skills/cfn-loop-validation/dist/cli/validate-gate.js.map +1 -0
  129. package/.claude/skills/cfn-loop-validation/dist/types.d.ts +156 -0
  130. package/.claude/skills/cfn-loop-validation/dist/types.d.ts.map +1 -0
  131. package/.claude/skills/cfn-loop-validation/dist/types.js +66 -0
  132. package/.claude/skills/cfn-loop-validation/dist/types.js.map +1 -0
  133. package/.claude/skills/cfn-loop-validation/dist/validator.d.ts +85 -0
  134. package/.claude/skills/cfn-loop-validation/dist/validator.d.ts.map +1 -0
  135. package/.claude/skills/cfn-loop-validation/dist/validator.js +411 -0
  136. package/.claude/skills/cfn-loop-validation/dist/validator.js.map +1 -0
  137. package/.claude/skills/cfn-loop-validation/orchestrate-cfn-loop.sh +22 -0
  138. package/.claude/skills/cfn-loop-validation/orchestrate-cfn-loop.sh.backup +252 -0
  139. package/.claude/skills/cfn-loop-validation/package.json +93 -0
  140. package/.claude/skills/cfn-loop-validation/src/cli/detect-vapor.ts +177 -0
  141. package/.claude/skills/cfn-loop-validation/src/cli/validate-deliverables.ts +161 -0
  142. package/.claude/skills/cfn-loop-validation/src/cli/validate-gate.ts +139 -0
  143. package/.claude/skills/cfn-loop-validation/src/types.ts +215 -0
  144. package/.claude/skills/cfn-loop-validation/src/validator.ts +503 -0
  145. package/.claude/skills/cfn-loop-validation/tests/validator.test.ts +537 -0
  146. package/.claude/skills/{cfn-redis-coordination → cfn-loop-validation}/tsconfig.json +34 -31
  147. package/.claude/skills/cfn-loop-validation/validate-deliverables.sh +59 -0
  148. package/.claude/skills/cfn-loop-validation/validate-deliverables.sh.backup +37 -0
  149. package/.claude/skills/cfn-loop-validation/validate-gate.sh +63 -0
  150. package/.claude/skills/cfn-loop-validation/validate-gate.sh.backup +41 -0
  151. package/.claude/skills/cfn-loop-validation/validate-iteration.sh +22 -0
  152. package/.claude/skills/cfn-loop-validation/validate-iteration.sh.backup +134 -0
  153. package/.claude/skills/cfn-product-owner-decision/SKILL.md +479 -147
  154. package/.claude/skills/cfn-product-owner-decision/TYPESCRIPT_IMPLEMENTATION.md +653 -0
  155. package/.claude/skills/cfn-product-owner-decision/{execute-decision.sh → archive/legacy-bash/execute-decision.sh} +24 -2
  156. package/.claude/skills/pre-edit-backup/SKILL.md +324 -0
  157. package/.claude/skills/pre-edit-backup/SKILL.md.backup +277 -0
  158. package/.claude/skills/pre-edit-backup/backup.sh +22 -0
  159. package/.claude/skills/pre-edit-backup/backup.sh.backup +107 -0
  160. package/claude-assets/agents/cfn-dev-team/analysts/root-cause-analyst.md +2 -2
  161. package/claude-assets/agents/cfn-dev-team/architecture/base-template-generator.md +1 -1
  162. package/claude-assets/agents/cfn-dev-team/coordinators/cfn-frontend-coordinator.md +3 -2
  163. package/claude-assets/agents/cfn-dev-team/coordinators/consensus-builder.md +1 -0
  164. package/claude-assets/agents/cfn-dev-team/coordinators/handoff-coordinator.md +2 -1
  165. package/claude-assets/agents/cfn-dev-team/coordinators/multi-sprint-coordinator.md +1 -0
  166. package/claude-assets/agents/cfn-dev-team/dev-ops/devops-engineer.md +11 -1
  167. package/claude-assets/agents/cfn-dev-team/dev-ops/docker-specialist.md +58 -35
  168. package/claude-assets/agents/cfn-dev-team/dev-ops/github-commit-agent.md +2 -2
  169. package/claude-assets/agents/cfn-dev-team/dev-ops/kubernetes-specialist.md +47 -37
  170. package/claude-assets/agents/cfn-dev-team/developers/api-gateway-specialist.md +18 -18
  171. package/claude-assets/agents/cfn-dev-team/developers/backend-developer.md +40 -58
  172. package/claude-assets/agents/cfn-dev-team/developers/data/data-engineer.md +19 -21
  173. package/claude-assets/agents/cfn-dev-team/developers/database/database-architect.md +20 -29
  174. package/claude-assets/agents/cfn-dev-team/developers/frontend/mobile-dev.md +15 -19
  175. package/claude-assets/agents/cfn-dev-team/developers/frontend/react-frontend-engineer.md +15 -10
  176. package/claude-assets/agents/cfn-dev-team/developers/frontend/typescript-specialist.md +16 -11
  177. package/claude-assets/agents/cfn-dev-team/developers/frontend/ui-designer.md +16 -26
  178. package/claude-assets/agents/cfn-dev-team/developers/graphql-specialist.md +18 -22
  179. package/claude-assets/agents/cfn-dev-team/developers/rust-developer.md +17 -21
  180. package/claude-assets/agents/cfn-dev-team/documentation/pseudocode.md +1 -1
  181. package/claude-assets/agents/cfn-dev-team/product-owners/accessibility-advocate-persona.md +1 -1
  182. package/claude-assets/agents/cfn-dev-team/product-owners/cto-agent.md +1 -1
  183. package/claude-assets/agents/cfn-dev-team/product-owners/power-user-persona.md +1 -1
  184. package/claude-assets/agents/cfn-dev-team/product-owners/product-owner.md +1 -5
  185. package/claude-assets/agents/cfn-dev-team/reviewers/code-reviewer.md +20 -51
  186. package/claude-assets/agents/cfn-dev-team/reviewers/quality/code-quality-validator.md +22 -71
  187. package/claude-assets/agents/cfn-dev-team/reviewers/quality/perf-analyzer.md +21 -64
  188. package/claude-assets/agents/cfn-dev-team/reviewers/quality/performance-benchmarker.md +22 -67
  189. package/claude-assets/agents/cfn-dev-team/reviewers/quality/security-specialist.md +24 -68
  190. package/claude-assets/agents/cfn-dev-team/testers/api-testing-specialist.md +8 -36
  191. package/claude-assets/agents/cfn-dev-team/testers/chaos-engineering-specialist.md +9 -38
  192. package/claude-assets/agents/cfn-dev-team/testers/contract-tester.md +17 -55
  193. package/claude-assets/agents/cfn-dev-team/testers/e2e/playwright-tester.md +1 -1
  194. package/claude-assets/agents/cfn-dev-team/testers/integration-tester.md +18 -56
  195. package/claude-assets/agents/cfn-dev-team/testers/interaction-tester.md +9 -37
  196. package/claude-assets/agents/cfn-dev-team/testers/load-testing-specialist.md +18 -56
  197. package/claude-assets/agents/cfn-dev-team/testers/mutation-testing-specialist.md +18 -49
  198. package/claude-assets/agents/cfn-dev-team/testers/playwright-tester.md +8 -37
  199. package/claude-assets/agents/cfn-dev-team/testers/tester.md +7 -27
  200. package/claude-assets/agents/cfn-dev-team/testers/unit/tdd-london-unit-swarm.md +1 -1
  201. package/claude-assets/agents/cfn-dev-team/utility/agent-builder.md +11 -0
  202. package/claude-assets/agents/cfn-dev-team/utility/analyst.md +13 -29
  203. package/claude-assets/agents/cfn-dev-team/utility/claude-code-expert.md +1 -1
  204. package/claude-assets/agents/cfn-dev-team/utility/code-booster.md +13 -13
  205. package/claude-assets/agents/cfn-dev-team/utility/context-curator.md +7 -2
  206. package/claude-assets/agents/cfn-dev-team/utility/epic-creator.md +6 -11
  207. package/claude-assets/agents/cfn-dev-team/utility/memory-leak-specialist.md +121 -715
  208. package/claude-assets/agents/cfn-dev-team/utility/researcher.md +13 -22
  209. package/claude-assets/agents/cfn-dev-team/utility/z-ai-specialist.md +147 -573
  210. package/claude-assets/agents/custom/cfn-docker-expert.md +103 -0
  211. package/claude-assets/agents/custom/cfn-loops-cli-expert.md +438 -0
  212. package/claude-assets/agents/custom/cfn-redis-operations.md +529 -529
  213. package/claude-assets/agents/custom/cfn-system-expert.md +1 -1
  214. package/claude-assets/agents/custom/trigger-dev-expert.md +369 -0
  215. package/claude-assets/agents/docker-team/micro-sprint-planner.md +747 -747
  216. package/claude-assets/agents/project-only-agents/npm-package-specialist.md +1 -1
  217. package/claude-assets/cfn-extras/agents/cfn-v3-coordinator.md +517 -0
  218. package/claude-assets/cfn-extras/skills/GOOGLE_SHEETS_SKILLS_README.md +1 -1
  219. package/claude-assets/cfn-extras/skills/google-sheets-api-coordinator/SKILL.md +1 -1
  220. package/claude-assets/cfn-extras/skills/google-sheets-formula-builder/SKILL.md +1 -1
  221. package/claude-assets/cfn-extras/skills/google-sheets-progress/SKILL.md +1 -1
  222. package/claude-assets/commands/CFN_LOOP_FRONTEND.md +1 -1
  223. package/claude-assets/commands/cfn-loop-cli.md +214 -442
  224. package/claude-assets/commands/cfn-loop-frontend.md +1 -1
  225. package/claude-assets/commands/cfn-loop-task.md +2 -2
  226. package/claude-assets/commands/cfn-loop-trigger.md +114 -0
  227. package/claude-assets/commands/deprecated/cfn-loop.md +2 -2
  228. package/claude-assets/hooks/GIT-HOOKS-USAGE-EXAMPLES.md +116 -0
  229. package/claude-assets/hooks/README-GIT-HOOKS.md +443 -0
  230. package/claude-assets/hooks/SKILL.md +518 -0
  231. package/claude-assets/hooks/SKILL.md.backup +471 -0
  232. package/claude-assets/hooks/cfn-invoke-post-edit-ts.sh +100 -0
  233. package/claude-assets/hooks/cfn-invoke-post-edit-ts.sh.backup +78 -0
  234. package/claude-assets/hooks/cfn-invoke-post-edit.sh +53 -5
  235. package/claude-assets/hooks/cfn-invoke-post-edit.sh.backup +87 -0
  236. package/claude-assets/hooks/cfn-invoke-pre-edit-ts.sh +116 -0
  237. package/claude-assets/hooks/cfn-invoke-pre-edit-ts.sh.backup +94 -0
  238. package/claude-assets/hooks/cfn-invoke-pre-edit.sh +22 -0
  239. package/claude-assets/hooks/cfn-invoke-pre-edit.sh.backup +88 -0
  240. package/claude-assets/hooks/cfn-post-edit.config.json +9 -2
  241. package/claude-assets/hooks/install-git-hooks.sh +243 -0
  242. package/claude-assets/hooks/subagent-start.sh +98 -0
  243. package/claude-assets/hooks/subagent-stop.sh +93 -0
  244. package/claude-assets/hooks/validators/credential-scanner.sh +172 -0
  245. package/claude-assets/root-claude-distribute/CFN-CLAUDE.md +1 -1
  246. package/claude-assets/skills/cfn-agent-selection-with-fallback/DELIVERABLES.md +409 -0
  247. package/claude-assets/skills/cfn-agent-selection-with-fallback/IMPLEMENTATION_SUMMARY.md +396 -0
  248. package/claude-assets/skills/cfn-agent-selection-with-fallback/INTEGRATION_GUIDE.md +308 -0
  249. package/claude-assets/skills/cfn-agent-selection-with-fallback/QUICK_REFERENCE.md +239 -0
  250. package/claude-assets/skills/cfn-agent-selection-with-fallback/SKILL.md +107 -1
  251. package/claude-assets/skills/cfn-agent-selection-with-fallback/SKILL.md.backup +302 -0
  252. package/claude-assets/skills/cfn-agent-selection-with-fallback/TYPESCRIPT_MIGRATION.md +295 -0
  253. package/claude-assets/skills/cfn-agent-selection-with-fallback/dist/agent-selector.cjs +297 -0
  254. package/claude-assets/skills/cfn-agent-selection-with-fallback/dist/agent-selector.js +297 -0
  255. package/claude-assets/skills/cfn-agent-selection-with-fallback/dist/cli.cjs +96 -0
  256. package/claude-assets/skills/cfn-agent-selection-with-fallback/dist/cli.js +96 -0
  257. package/claude-assets/skills/cfn-agent-selection-with-fallback/select-agents-ts.sh +45 -0
  258. package/claude-assets/skills/cfn-agent-selection-with-fallback/select-agents-ts.sh.backup +23 -0
  259. package/claude-assets/skills/cfn-agent-selection-with-fallback/select-agents.sh +22 -0
  260. package/claude-assets/skills/cfn-agent-selection-with-fallback/select-agents.sh.backup +173 -0
  261. package/claude-assets/skills/cfn-agent-selection-with-fallback/src/agent-selector.test.ts +357 -0
  262. package/claude-assets/skills/cfn-agent-selection-with-fallback/src/agent-selector.ts +350 -0
  263. package/claude-assets/skills/cfn-agent-selection-with-fallback/src/cli.ts +74 -0
  264. package/claude-assets/skills/cfn-agent-selection-with-fallback/task-classifier.sh +22 -0
  265. package/claude-assets/skills/cfn-agent-selection-with-fallback/task-classifier.sh.backup +71 -0
  266. package/claude-assets/skills/cfn-agent-selection-with-fallback/tsconfig.json +18 -0
  267. package/claude-assets/skills/cfn-agent-spawning/SKILL.md +48 -1
  268. package/claude-assets/skills/cfn-agent-spawning/SKILL.md.backup +135 -0
  269. package/claude-assets/skills/cfn-agent-spawning/TYPESCRIPT_MIGRATION.md +567 -0
  270. package/claude-assets/skills/cfn-agent-spawning/check-dependencies.sh +22 -0
  271. package/claude-assets/skills/cfn-agent-spawning/check-dependencies.sh.backup +30 -0
  272. package/claude-assets/skills/cfn-agent-spawning/get-agent-provider-env.sh +22 -0
  273. package/claude-assets/skills/cfn-agent-spawning/get-agent-provider-env.sh.backup +127 -0
  274. package/claude-assets/skills/cfn-agent-spawning/parse-agent-provider.sh +22 -0
  275. package/claude-assets/skills/cfn-agent-spawning/parse-agent-provider.sh.backup +59 -0
  276. package/claude-assets/skills/cfn-agent-spawning/spawn-agent-wrapper.sh +63 -0
  277. package/claude-assets/skills/cfn-agent-spawning/spawn-agent-wrapper.sh.backup +41 -0
  278. package/claude-assets/skills/cfn-agent-spawning/spawn-agent.sh +26 -1
  279. package/claude-assets/skills/cfn-agent-spawning/spawn-templates.sh +22 -0
  280. package/claude-assets/skills/cfn-agent-spawning/spawn-templates.sh.backup +613 -0
  281. package/claude-assets/skills/cfn-agent-spawning/spawn-worker.sh +22 -0
  282. package/claude-assets/skills/cfn-agent-spawning/spawn-worker.sh.backup +176 -0
  283. package/claude-assets/skills/cfn-backlog-management/SKILL.md +1 -1
  284. package/claude-assets/skills/cfn-coordination/agent-completion.sh.backup +36 -0
  285. package/claude-assets/skills/cfn-coordination/coordination-signal.sh.backup +36 -0
  286. package/claude-assets/skills/cfn-coordination/coordination-wait.sh.backup +36 -0
  287. package/claude-assets/skills/cfn-dependency-ingestion/README.md +101 -0
  288. package/claude-assets/skills/cfn-dependency-ingestion/SKILL.md +397 -0
  289. package/claude-assets/skills/cfn-dependency-ingestion/build.sh +23 -0
  290. package/claude-assets/skills/cfn-dependency-ingestion/dist/ingest-dependencies.js +478 -0
  291. package/claude-assets/skills/cfn-dependency-ingestion/ingest-dependencies.sh +295 -0
  292. package/claude-assets/skills/cfn-dependency-ingestion/ingest.sh +237 -0
  293. package/claude-assets/skills/cfn-dependency-ingestion/manifests/cli-mode-dependencies.txt +73 -0
  294. package/claude-assets/skills/cfn-dependency-ingestion/manifests/shared-dependencies.txt +57 -0
  295. package/claude-assets/skills/cfn-dependency-ingestion/manifests/trigger-dev-dependencies.txt +82 -0
  296. package/claude-assets/skills/cfn-dependency-ingestion/manifests/trigger-mode-dependencies.txt +80 -0
  297. package/claude-assets/skills/cfn-dependency-ingestion/src/ingest-dependencies.ts +563 -0
  298. package/claude-assets/skills/cfn-environment-sanitization/sanitize-environment.sh +14 -4
  299. package/claude-assets/skills/cfn-loop-orchestration/.backups/unknown/1763619700_33aff4a69b99159e4e849107ebc4d09f/metadata.json +8 -0
  300. package/claude-assets/skills/cfn-loop-orchestration/.backups/unknown/1763619700_33aff4a69b99159e4e849107ebc4d09f/original +271 -0
  301. package/claude-assets/skills/cfn-loop-orchestration/.backups/unknown/1763619700_33aff4a69b99159e4e849107ebc4d09f/revert.sh +7 -0
  302. package/claude-assets/skills/cfn-loop-orchestration/.backups/unknown/1763671642_06496e8c399a79db08167cc00ed4b31e/metadata.json +8 -0
  303. package/claude-assets/skills/cfn-loop-orchestration/.backups/unknown/1763671642_06496e8c399a79db08167cc00ed4b31e/original +325 -0
  304. package/claude-assets/skills/cfn-loop-orchestration/.backups/unknown/1763671642_06496e8c399a79db08167cc00ed4b31e/revert.sh +7 -0
  305. package/claude-assets/skills/cfn-loop-orchestration/CLI_IMPLEMENTATION_SUMMARY.md +330 -0
  306. package/claude-assets/skills/cfn-loop-orchestration/CONFIGURATION_IMPROVEMENTS.md +318 -0
  307. package/claude-assets/skills/cfn-loop-orchestration/CONTEXT_LOOKUP_MIGRATION.md +308 -0
  308. package/claude-assets/skills/cfn-loop-orchestration/CONTEXT_LOOKUP_QUICK_START.md +378 -0
  309. package/claude-assets/skills/cfn-loop-orchestration/E2E_VALIDATION_REPORT.md +262 -0
  310. package/claude-assets/skills/cfn-loop-orchestration/IMPLEMENTATION_SUMMARY.md +319 -519
  311. package/claude-assets/skills/cfn-loop-orchestration/NORTH_STAR_E2E_REPORT.md +299 -0
  312. package/claude-assets/skills/cfn-loop-orchestration/NORTH_STAR_EXECUTION_SUMMARY.md +403 -0
  313. package/claude-assets/skills/cfn-loop-orchestration/NORTH_STAR_INDEX.md +323 -0
  314. package/claude-assets/skills/cfn-loop-orchestration/SKILL.md +159 -48
  315. package/claude-assets/skills/cfn-loop-orchestration/SPAWN_AGENTS_IMPLEMENTATION.md +188 -0
  316. package/claude-assets/skills/cfn-loop-orchestration/TEST_COVERAGE_REPORT.md +335 -0
  317. package/claude-assets/skills/cfn-loop-orchestration/TEST_COVERAGE_SUMMARY.md +456 -0
  318. package/claude-assets/skills/cfn-loop-orchestration/TYPESCRIPT_INTEGRATION_REPORT.md +709 -0
  319. package/claude-assets/skills/cfn-loop-orchestration/TYPESCRIPT_INTEGRATION_SUMMARY.md +257 -0
  320. package/claude-assets/skills/cfn-loop-orchestration/VALIDATION_REPORT.md +572 -0
  321. package/claude-assets/skills/cfn-loop-orchestration/VALIDATION_SUMMARY.txt +196 -0
  322. package/claude-assets/skills/cfn-loop-orchestration/VALIDATOR_MODULE_GUIDE.md +526 -0
  323. package/claude-assets/skills/cfn-loop-orchestration/archive/legacy-bash/README.md +167 -0
  324. package/claude-assets/skills/cfn-loop-orchestration/archive/legacy-bash/orchestrate-enhanced.sh +548 -0
  325. package/claude-assets/skills/cfn-loop-orchestration/{orchestrate-wrapper.sh → archive/legacy-bash/orchestrate-wrapper.sh} +11 -1
  326. package/claude-assets/skills/cfn-loop-orchestration/archive/legacy-bash/orchestrate.sh +182 -0
  327. package/claude-assets/skills/cfn-loop-orchestration/e2e-validation-fixed.js +240 -0
  328. package/claude-assets/skills/cfn-loop-orchestration/e2e-validation.js +213 -0
  329. package/claude-assets/skills/cfn-loop-orchestration/package-lock.json +3 -0
  330. package/claude-assets/skills/cfn-loop-orchestration/package.json +4 -0
  331. package/claude-assets/skills/cfn-loop-orchestration/run-north-star-e2e.ts +210 -0
  332. package/claude-assets/skills/cfn-loop-orchestration/src/cli/orchestrator-cli.ts +396 -0
  333. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/CONFIDENCE_AGGREGATOR.md +564 -0
  334. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/CONFIDENCE_AGGREGATOR_QUICK_REF.md +241 -0
  335. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_IMPLEMENTATION.md +375 -0
  336. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_QUICK_REFERENCE.md +362 -0
  337. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_README.md +307 -0
  338. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_USAGE_GUIDE.md +508 -0
  339. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/confidence-aggregator.ts +473 -0
  340. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/consensus.ts +1 -1
  341. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/context-injector.ts +349 -0
  342. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/context-lookup.ts +486 -0
  343. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/deliverable-verifier.ts +6 -2
  344. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/gate-check.ts +1 -1
  345. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/product-owner-decision.ts +316 -0
  346. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/spawn-agents.ts +357 -0
  347. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/validator.ts +276 -0
  348. package/claude-assets/skills/cfn-loop-orchestration/src/index.ts +2 -0
  349. package/claude-assets/skills/cfn-loop-orchestration/src/orchestrate.ts +743 -2
  350. package/claude-assets/skills/cfn-loop-orchestration/src/types.ts +56 -0
  351. package/claude-assets/skills/cfn-loop-orchestration/test-cli.sh +92 -0
  352. package/claude-assets/skills/cfn-loop-orchestration/test-typescript-integration.sh +442 -0
  353. package/claude-assets/skills/cfn-loop-orchestration/tests/agent-spawner.test.ts +124 -0
  354. package/claude-assets/skills/cfn-loop-orchestration/tests/confidence-aggregator.test.ts +604 -0
  355. package/claude-assets/skills/cfn-loop-orchestration/tests/context-injector.test.ts +561 -0
  356. package/claude-assets/skills/cfn-loop-orchestration/tests/context-lookup.test.ts +661 -0
  357. package/claude-assets/skills/cfn-loop-orchestration/tests/deliverable-verifier.test.ts +2 -2
  358. package/claude-assets/skills/cfn-loop-orchestration/tests/gate-check-edge-cases.test.ts +422 -0
  359. package/claude-assets/skills/cfn-loop-orchestration/tests/gate-checker.test.ts +276 -0
  360. package/claude-assets/skills/cfn-loop-orchestration/tests/logger.test.ts +291 -0
  361. package/claude-assets/skills/cfn-loop-orchestration/tests/north-star-e2e.test.ts +334 -0
  362. package/claude-assets/skills/cfn-loop-orchestration/tests/redis-coordinator.test.ts +321 -0
  363. package/claude-assets/skills/cfn-loop-orchestration/tests/spawn-agents.test.ts +284 -0
  364. package/claude-assets/skills/cfn-loop-orchestration/tests/validator.test.ts +643 -0
  365. package/claude-assets/skills/cfn-loop-output-processing/.eslintrc.json +33 -0
  366. package/claude-assets/skills/cfn-loop-output-processing/DELIVERY_SUMMARY.txt +462 -0
  367. package/claude-assets/skills/cfn-loop-output-processing/DEPRECATION_NOTICE.md +183 -0
  368. package/claude-assets/skills/cfn-loop-output-processing/EXAMPLES.md +609 -0
  369. package/claude-assets/skills/cfn-loop-output-processing/IMPLEMENTATION_SUMMARY.md +418 -0
  370. package/claude-assets/skills/cfn-loop-output-processing/INDEX.md +531 -0
  371. package/claude-assets/skills/cfn-loop-output-processing/MIGRATION.md +362 -0
  372. package/claude-assets/skills/cfn-loop-output-processing/README.md +114 -0
  373. package/claude-assets/skills/cfn-loop-output-processing/SKILL.md +633 -0
  374. package/{.claude/skills/cfn-docker-redis-coordination → claude-assets/skills/cfn-loop-output-processing}/jest.config.js +7 -15
  375. package/claude-assets/skills/cfn-loop-output-processing/package.json +50 -0
  376. package/claude-assets/skills/cfn-loop-output-processing/src/cli/process-loop2.ts +195 -0
  377. package/claude-assets/skills/cfn-loop-output-processing/src/cli/process-loop3.ts +157 -0
  378. package/claude-assets/skills/cfn-loop-output-processing/src/output-processor.ts +632 -0
  379. package/claude-assets/skills/cfn-loop-output-processing/tests/output-processor.test.ts +617 -0
  380. package/claude-assets/skills/{cfn-docker-redis-coordination → cfn-loop-output-processing}/tsconfig.json +16 -7
  381. package/claude-assets/skills/cfn-loop-validation/IMPLEMENTATION_SUMMARY.md +672 -0
  382. package/claude-assets/skills/cfn-loop-validation/INDEX.md +531 -0
  383. package/claude-assets/skills/cfn-loop-validation/README_TYPESCRIPT.md +454 -0
  384. package/claude-assets/skills/cfn-loop-validation/SKILL.md +48 -1
  385. package/claude-assets/skills/cfn-loop-validation/SKILL.md.backup +353 -0
  386. package/claude-assets/skills/cfn-loop-validation/SKILL_TYPESCRIPT.md +782 -0
  387. package/claude-assets/skills/cfn-loop-validation/VAPOR_DETECTION_EXAMPLES.md +598 -0
  388. package/claude-assets/skills/cfn-loop-validation/check-dependencies.sh +22 -0
  389. package/claude-assets/skills/cfn-loop-validation/check-dependencies.sh.backup +31 -0
  390. package/claude-assets/skills/cfn-loop-validation/detect-vapor.sh +59 -0
  391. package/claude-assets/skills/cfn-loop-validation/detect-vapor.sh.backup +37 -0
  392. package/claude-assets/skills/cfn-loop-validation/dist/.tsbuildinfo +1 -0
  393. package/claude-assets/skills/cfn-loop-validation/dist/cli/detect-vapor.d.ts +14 -0
  394. package/claude-assets/skills/cfn-loop-validation/dist/cli/detect-vapor.d.ts.map +1 -0
  395. package/claude-assets/skills/cfn-loop-validation/dist/cli/detect-vapor.js +185 -0
  396. package/claude-assets/skills/cfn-loop-validation/dist/cli/detect-vapor.js.map +1 -0
  397. package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-deliverables.d.ts +14 -0
  398. package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-deliverables.d.ts.map +1 -0
  399. package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-deliverables.js +176 -0
  400. package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-deliverables.js.map +1 -0
  401. package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-gate.d.ts +19 -0
  402. package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-gate.d.ts.map +1 -0
  403. package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-gate.js +123 -0
  404. package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-gate.js.map +1 -0
  405. package/claude-assets/skills/cfn-loop-validation/dist/types.d.ts +156 -0
  406. package/claude-assets/skills/cfn-loop-validation/dist/types.d.ts.map +1 -0
  407. package/claude-assets/skills/cfn-loop-validation/dist/types.js +66 -0
  408. package/claude-assets/skills/cfn-loop-validation/dist/types.js.map +1 -0
  409. package/claude-assets/skills/cfn-loop-validation/dist/validator.d.ts +85 -0
  410. package/claude-assets/skills/cfn-loop-validation/dist/validator.d.ts.map +1 -0
  411. package/claude-assets/skills/cfn-loop-validation/dist/validator.js +411 -0
  412. package/claude-assets/skills/cfn-loop-validation/dist/validator.js.map +1 -0
  413. package/claude-assets/skills/cfn-loop-validation/orchestrate-cfn-loop.sh +22 -0
  414. package/claude-assets/skills/cfn-loop-validation/orchestrate-cfn-loop.sh.backup +252 -0
  415. package/claude-assets/skills/cfn-loop-validation/package.json +93 -0
  416. package/claude-assets/skills/cfn-loop-validation/src/cli/detect-vapor.ts +177 -0
  417. package/claude-assets/skills/cfn-loop-validation/src/cli/validate-deliverables.ts +161 -0
  418. package/claude-assets/skills/cfn-loop-validation/src/cli/validate-gate.ts +139 -0
  419. package/claude-assets/skills/cfn-loop-validation/src/types.ts +215 -0
  420. package/claude-assets/skills/cfn-loop-validation/src/validator.ts +503 -0
  421. package/claude-assets/skills/cfn-loop-validation/tests/validator.test.ts +537 -0
  422. package/claude-assets/skills/{cfn-redis-coordination → cfn-loop-validation}/tsconfig.json +34 -31
  423. package/claude-assets/skills/cfn-loop-validation/validate-deliverables.sh +59 -0
  424. package/claude-assets/skills/cfn-loop-validation/validate-deliverables.sh.backup +37 -0
  425. package/claude-assets/skills/cfn-loop-validation/validate-gate.sh +63 -0
  426. package/claude-assets/skills/cfn-loop-validation/validate-gate.sh.backup +41 -0
  427. package/claude-assets/skills/cfn-loop-validation/validate-iteration.sh +22 -0
  428. package/claude-assets/skills/cfn-loop-validation/validate-iteration.sh.backup +134 -0
  429. package/claude-assets/skills/cfn-product-owner-decision/SKILL.md +479 -147
  430. package/claude-assets/skills/cfn-product-owner-decision/TYPESCRIPT_IMPLEMENTATION.md +653 -0
  431. package/claude-assets/skills/cfn-product-owner-decision/{execute-decision.sh → archive/legacy-bash/execute-decision.sh} +24 -2
  432. package/claude-assets/skills/cfn-provider-routing/README.md +129 -0
  433. package/claude-assets/skills/cfn-provider-routing/SKILL.md +215 -0
  434. package/claude-assets/skills/cfn-provider-routing/resolve-provider-model.ts +223 -0
  435. package/claude-assets/skills/docker-build/build.sh +1 -1
  436. package/claude-assets/skills/pre-edit-backup/SKILL.md +324 -0
  437. package/claude-assets/skills/pre-edit-backup/SKILL.md.backup +277 -0
  438. package/claude-assets/skills/pre-edit-backup/backup.sh +22 -0
  439. package/claude-assets/skills/pre-edit-backup/backup.sh.backup +107 -0
  440. package/dist/agent/skill-mcp-selector.js +2 -1
  441. package/dist/agent/skill-mcp-selector.js.map +1 -1
  442. package/dist/api/auth-endpoints.js +415 -0
  443. package/dist/api/auth-endpoints.js.map +1 -0
  444. package/dist/api/task-endpoints.js +562 -0
  445. package/dist/api/task-endpoints.js.map +1 -0
  446. package/dist/backend/server.js +418 -0
  447. package/dist/backend/server.js.map +1 -0
  448. package/dist/cfn-loop/product-owner/decision-parser.js +356 -0
  449. package/dist/cfn-loop/product-owner/decision-parser.js.map +1 -0
  450. package/dist/cfn-loop/product-owner/index.js +1 -0
  451. package/dist/cfn-loop/product-owner/index.js.map +1 -1
  452. package/dist/cli/agent-command.js +1 -1
  453. package/dist/cli/agent-command.js.map +1 -1
  454. package/dist/cli/agent-completion.js +273 -0
  455. package/dist/cli/agent-completion.js.map +1 -0
  456. package/dist/cli/agent-executor.js +470 -26
  457. package/dist/cli/agent-executor.js.map +1 -1
  458. package/dist/cli/agent-prompt-builder.js +83 -48
  459. package/dist/cli/agent-prompt-builder.js.map +1 -1
  460. package/dist/cli/agent-spawn.js +7 -4
  461. package/dist/cli/agent-spawn.js.map +1 -1
  462. package/dist/cli/agent-spawner.js +546 -0
  463. package/dist/cli/agent-spawner.js.map +1 -0
  464. package/dist/cli/agent-token-manager.js +2 -1
  465. package/dist/cli/agent-token-manager.js.map +1 -1
  466. package/dist/cli/anthropic-client.js +127 -14
  467. package/dist/cli/anthropic-client.js.map +1 -1
  468. package/dist/cli/cfn-context.js +2 -1
  469. package/dist/cli/cfn-context.js.map +1 -1
  470. package/dist/cli/cfn-metrics.js +2 -1
  471. package/dist/cli/cfn-metrics.js.map +1 -1
  472. package/dist/cli/cfn-redis.js +2 -1
  473. package/dist/cli/cfn-redis.js.map +1 -1
  474. package/dist/cli/cli-agent-context.js +2 -0
  475. package/dist/cli/cli-agent-context.js.map +1 -1
  476. package/dist/cli/config-manager.js +90 -356
  477. package/dist/cli/config-manager.js.map +1 -1
  478. package/dist/cli/conversation-fork-cleanup.js +2 -1
  479. package/dist/cli/conversation-fork-cleanup.js.map +1 -1
  480. package/dist/cli/conversation-fork.js +2 -1
  481. package/dist/cli/conversation-fork.js.map +1 -1
  482. package/dist/cli/coordination/agent-messaging.js +415 -0
  483. package/dist/cli/coordination/agent-messaging.js.map +1 -0
  484. package/dist/cli/coordination/wait-for-threshold.js +232 -0
  485. package/dist/cli/coordination/wait-for-threshold.js.map +1 -0
  486. package/dist/cli/index.js +11 -0
  487. package/dist/cli/index.js.map +1 -1
  488. package/dist/cli/iteration-history.js +2 -1
  489. package/dist/cli/iteration-history.js.map +1 -1
  490. package/dist/cli/parse-decision-cli.js +268 -0
  491. package/dist/cli/parse-decision-cli.js.map +1 -0
  492. package/dist/cli/post-edit-hook.js +83 -0
  493. package/dist/cli/post-edit-hook.js.map +1 -0
  494. package/dist/cli/pre-edit-hook.js +77 -0
  495. package/dist/cli/pre-edit-hook.js.map +1 -0
  496. package/dist/cli/process-lifecycle.js +5 -1
  497. package/dist/cli/process-lifecycle.js.map +1 -1
  498. package/dist/cli/spawn-agent-cli.js +244 -0
  499. package/dist/cli/spawn-agent-cli.js.map +1 -0
  500. package/dist/coordination/coordination-wrapper.js +383 -0
  501. package/dist/coordination/coordination-wrapper.js.map +1 -0
  502. package/dist/coordination/redis-waiting-mode.js +4 -0
  503. package/dist/coordination/redis-waiting-mode.js.map +1 -1
  504. package/dist/coordination/store-success-criteria.js +68 -0
  505. package/dist/coordination/store-success-criteria.js.map +1 -0
  506. package/dist/coordination/store-task-context.js +65 -0
  507. package/dist/coordination/store-task-context.js.map +1 -0
  508. package/dist/hooks/backup-manager.js +273 -0
  509. package/dist/hooks/backup-manager.js.map +1 -0
  510. package/dist/hooks/post-edit-validator.js +388 -0
  511. package/dist/hooks/post-edit-validator.js.map +1 -0
  512. package/dist/integration/index.js +19 -0
  513. package/dist/integration/index.js.map +1 -0
  514. package/dist/integration/task-mode-adapter.js +297 -0
  515. package/dist/integration/task-mode-adapter.js.map +1 -0
  516. package/dist/integration/trigger-dev-client.js +253 -0
  517. package/dist/integration/trigger-dev-client.js.map +1 -0
  518. package/dist/integration/trigger-dev-webhooks.js +362 -0
  519. package/dist/integration/trigger-dev-webhooks.js.map +1 -0
  520. package/dist/lib/artifact-registry.js +4 -0
  521. package/dist/lib/artifact-registry.js.map +1 -1
  522. package/dist/lib/connection-pool.js +390 -0
  523. package/dist/lib/connection-pool.js.map +1 -0
  524. package/dist/lib/environment-contract.js +258 -0
  525. package/dist/lib/environment-contract.js.map +1 -0
  526. package/dist/lib/path-validator.js +14 -5
  527. package/dist/lib/path-validator.js.map +1 -1
  528. package/dist/lib/query-optimizer.js +388 -0
  529. package/dist/lib/query-optimizer.js.map +1 -0
  530. package/dist/lib/redis-queue-manager.js +5 -1
  531. package/dist/lib/redis-queue-manager.js.map +1 -1
  532. package/dist/lib/result-cache.js +285 -0
  533. package/dist/lib/result-cache.js.map +1 -0
  534. package/dist/mcp/auth-middleware.js +2 -1
  535. package/dist/mcp/auth-middleware.js.map +1 -1
  536. package/dist/mcp/playwright-mcp-server-auth.js +2 -1
  537. package/dist/mcp/playwright-mcp-server-auth.js.map +1 -1
  538. package/dist/middleware/authentication.js +317 -0
  539. package/dist/middleware/authentication.js.map +1 -0
  540. package/dist/services/authentication.js +669 -0
  541. package/dist/services/authentication.js.map +1 -0
  542. package/dist/services/session-management.js +436 -0
  543. package/dist/services/session-management.js.map +1 -0
  544. package/dist/services/skill-deployment.js +8 -6
  545. package/dist/services/skill-deployment.js.map +1 -1
  546. package/dist/services/user-service.js +710 -0
  547. package/dist/services/user-service.js.map +1 -0
  548. package/dist/types/trigger-dev-events.d.js +10 -0
  549. package/dist/types/trigger-dev-events.d.js.map +1 -0
  550. package/docs/README.md +240 -0
  551. package/package.json +15 -4
  552. package/scripts/build-agent-image.sh +1 -1
  553. package/scripts/compare-workflow-performance.sh +556 -0
  554. package/scripts/cost-allocation-tracker.sh +632 -0
  555. package/scripts/docker-rebuild-all-agents.sh +2 -2
  556. package/scripts/migrate-to-optimized-workflows.sh +438 -0
  557. package/scripts/organize-docs.sh +338 -0
  558. package/scripts/reorganize-tests.sh +280 -0
  559. package/scripts/trigger-dev-setup.sh +279 -0
  560. package/tests/README.md +45 -0
  561. package/.claude/commands/cost-savings-status.md +0 -34
  562. package/.claude/commands/metrics-summary.md +0 -58
  563. package/.claude/skills/cfn-docker-redis-coordination/MIGRATION_SUMMARY.md +0 -348
  564. package/.claude/skills/cfn-docker-redis-coordination/README.md +0 -294
  565. package/.claude/skills/cfn-docker-redis-coordination/SKILL.md +0 -435
  566. package/.claude/skills/cfn-docker-redis-coordination/coordinate.sh +0 -650
  567. package/.claude/skills/cfn-docker-redis-coordination/coordinate.sh.backup-1763145142 +0 -641
  568. package/.claude/skills/cfn-docker-redis-coordination/package-lock.json +0 -5259
  569. package/.claude/skills/cfn-docker-redis-coordination/package.json +0 -40
  570. package/.claude/skills/cfn-docker-redis-coordination/src/coordinator.ts +0 -801
  571. package/.claude/skills/cfn-docker-redis-coordination/src/index.ts +0 -42
  572. package/.claude/skills/cfn-docker-redis-coordination/src/types.ts +0 -351
  573. package/.claude/skills/cfn-docker-redis-coordination/tests/coordinator.test.ts +0 -1464
  574. package/.claude/skills/cfn-docker-redis-coordination/tsconfig.json +0 -30
  575. package/.claude/skills/cfn-loop-orchestration/helpers/auto-tune-timeouts.sh +0 -228
  576. package/.claude/skills/cfn-loop-orchestration/helpers/consensus-ts.sh +0 -104
  577. package/.claude/skills/cfn-loop-orchestration/helpers/consensus.sh +0 -94
  578. package/.claude/skills/cfn-loop-orchestration/helpers/context-injection.sh +0 -142
  579. package/.claude/skills/cfn-loop-orchestration/helpers/context-lookup.sh +0 -359
  580. package/.claude/skills/cfn-loop-orchestration/helpers/deliverable-verifier-ts.sh +0 -123
  581. package/.claude/skills/cfn-loop-orchestration/helpers/deliverable-verifier.sh +0 -71
  582. package/.claude/skills/cfn-loop-orchestration/helpers/gate-check.sh +0 -56
  583. package/.claude/skills/cfn-loop-orchestration/helpers/iteration-manager-ts.sh +0 -89
  584. package/.claude/skills/cfn-loop-orchestration/helpers/iteration-manager.sh +0 -87
  585. package/.claude/skills/cfn-loop-orchestration/helpers/orchestrate-ts.sh +0 -104
  586. package/.claude/skills/cfn-loop-orchestration/helpers/parse-test-results.sh +0 -56
  587. package/.claude/skills/cfn-loop-orchestration/helpers/spawn-agents.sh +0 -290
  588. package/.claude/skills/cfn-loop-orchestration/helpers/timeout-calculator-ts.sh +0 -47
  589. package/.claude/skills/cfn-loop-orchestration/helpers/timeout-calculator.sh +0 -51
  590. package/.claude/skills/cfn-loop-orchestration/orchestrate.sh +0 -1345
  591. package/.claude/skills/cfn-redis-coordination/AGENT_LOGGING.md +0 -280
  592. package/.claude/skills/cfn-redis-coordination/BZPOPMIN_FIX_SUMMARY.md +0 -209
  593. package/.claude/skills/cfn-redis-coordination/CENTRALIZED_REDIS_WRAPPER.md +0 -319
  594. package/.claude/skills/cfn-redis-coordination/agent-log.sh.bak +0 -124
  595. package/.claude/skills/cfn-redis-coordination/config.json +0 -61
  596. package/.claude/skills/cfn-redis-coordination/demos/phase4-wake-queue-test-report.md +0 -82
  597. package/.claude/skills/cfn-redis-coordination/demos/test-bzpopmin-fix.sh +0 -274
  598. package/.claude/skills/cfn-redis-coordination/demos/test-cancel-swarm.sh +0 -0
  599. package/.claude/skills/cfn-redis-coordination/docs/migration/PHASE_3_REDIS_COORDINATION_COMPLETION_REPORT.md +0 -553
  600. package/.claude/skills/cfn-redis-coordination/jest.config.js +0 -23
  601. package/.claude/skills/cfn-redis-coordination/package-lock.json +0 -5272
  602. package/.claude/skills/cfn-redis-coordination/package.json +0 -45
  603. package/.claude/skills/cfn-redis-coordination/src/agent-logger.ts +0 -446
  604. package/.claude/skills/cfn-redis-coordination/src/agent-recovery.ts +0 -454
  605. package/.claude/skills/cfn-redis-coordination/src/completion-reporter.ts +0 -396
  606. package/.claude/skills/cfn-redis-coordination/src/context-manager.ts +0 -327
  607. package/.claude/skills/cfn-redis-coordination/src/index.ts +0 -82
  608. package/.claude/skills/cfn-redis-coordination/src/mode-detector.ts +0 -155
  609. package/.claude/skills/cfn-redis-coordination/src/redis/redis-client.ts +0 -305
  610. package/.claude/skills/cfn-redis-coordination/src/redis/redis-functions.ts +0 -283
  611. package/.claude/skills/cfn-redis-coordination/src/redis-client.ts +0 -654
  612. package/.claude/skills/cfn-redis-coordination/src/result-collector.ts +0 -437
  613. package/.claude/skills/cfn-redis-coordination/src/swarm-manager.ts +0 -494
  614. package/.claude/skills/cfn-redis-coordination/src/task-analyzer.ts +0 -404
  615. package/.claude/skills/cfn-redis-coordination/src/task-executor.ts +0 -423
  616. package/.claude/skills/cfn-redis-coordination/src/types.ts +0 -235
  617. package/.claude/skills/cfn-redis-coordination/src/waiting-coordinator.ts +0 -587
  618. package/.claude/skills/cfn-redis-coordination/store-success-criteria.sh +0 -85
  619. package/.claude/skills/cfn-redis-coordination/test-connection-attempts.js +0 -70
  620. package/.claude/skills/cfn-redis-coordination/test-mode-simple.js +0 -121
  621. package/.claude/skills/cfn-redis-coordination/test-redis-check.js +0 -84
  622. package/.claude/skills/cfn-redis-coordination/test-task-mode-redis.cjs +0 -391
  623. package/.claude/skills/cfn-redis-coordination/tests/coordination.test.ts +0 -788
  624. package/.claude/skills/cfn-redis-coordination/update-all-scripts.sh +0 -67
  625. package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md +0 -980
  626. package/claude-assets/agents/cfn-dev-team/dev-ops/monitoring-specialist.md +0 -759
  627. package/claude-assets/agents/custom/test-mcp-access.md +0 -24
  628. package/claude-assets/agents/typescript-specialist.md +0 -280
  629. package/claude-assets/commands/cost-savings-status.md +0 -34
  630. package/claude-assets/commands/metrics-summary.md +0 -58
  631. package/claude-assets/skills/cfn-docker-redis-coordination/MIGRATION_SUMMARY.md +0 -348
  632. package/claude-assets/skills/cfn-docker-redis-coordination/README.md +0 -294
  633. package/claude-assets/skills/cfn-docker-redis-coordination/SKILL.md +0 -435
  634. package/claude-assets/skills/cfn-docker-redis-coordination/coordinate.sh +0 -650
  635. package/claude-assets/skills/cfn-docker-redis-coordination/coordinate.sh.backup-1763145142 +0 -641
  636. package/claude-assets/skills/cfn-docker-redis-coordination/jest.config.js +0 -37
  637. package/claude-assets/skills/cfn-docker-redis-coordination/package-lock.json +0 -5259
  638. package/claude-assets/skills/cfn-docker-redis-coordination/package.json +0 -40
  639. package/claude-assets/skills/cfn-docker-redis-coordination/src/coordinator.ts +0 -801
  640. package/claude-assets/skills/cfn-docker-redis-coordination/src/index.ts +0 -42
  641. package/claude-assets/skills/cfn-docker-redis-coordination/src/types.ts +0 -351
  642. package/claude-assets/skills/cfn-docker-redis-coordination/tests/coordinator.test.ts +0 -1464
  643. package/claude-assets/skills/cfn-loop-orchestration/helpers/auto-tune-timeouts.sh +0 -228
  644. package/claude-assets/skills/cfn-loop-orchestration/helpers/consensus-ts.sh +0 -104
  645. package/claude-assets/skills/cfn-loop-orchestration/helpers/consensus.sh +0 -94
  646. package/claude-assets/skills/cfn-loop-orchestration/helpers/context-injection.sh +0 -142
  647. package/claude-assets/skills/cfn-loop-orchestration/helpers/context-lookup.sh +0 -359
  648. package/claude-assets/skills/cfn-loop-orchestration/helpers/deliverable-verifier-ts.sh +0 -123
  649. package/claude-assets/skills/cfn-loop-orchestration/helpers/deliverable-verifier.sh +0 -71
  650. package/claude-assets/skills/cfn-loop-orchestration/helpers/gate-check.sh +0 -56
  651. package/claude-assets/skills/cfn-loop-orchestration/helpers/iteration-manager-ts.sh +0 -89
  652. package/claude-assets/skills/cfn-loop-orchestration/helpers/iteration-manager.sh +0 -87
  653. package/claude-assets/skills/cfn-loop-orchestration/helpers/orchestrate-ts.sh +0 -104
  654. package/claude-assets/skills/cfn-loop-orchestration/helpers/parse-test-results.sh +0 -56
  655. package/claude-assets/skills/cfn-loop-orchestration/helpers/spawn-agents.sh +0 -290
  656. package/claude-assets/skills/cfn-loop-orchestration/helpers/timeout-calculator-ts.sh +0 -47
  657. package/claude-assets/skills/cfn-loop-orchestration/helpers/timeout-calculator.sh +0 -51
  658. package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh +0 -1345
  659. package/claude-assets/skills/cfn-redis-cleanup/cleanup-redis.sh +0 -130
  660. package/claude-assets/skills/cfn-redis-coordination/AGENT_LOGGING.md +0 -280
  661. package/claude-assets/skills/cfn-redis-coordination/BZPOPMIN_FIX_SUMMARY.md +0 -209
  662. package/claude-assets/skills/cfn-redis-coordination/CENTRALIZED_REDIS_WRAPPER.md +0 -319
  663. package/claude-assets/skills/cfn-redis-coordination/agent-log.sh.bak +0 -124
  664. package/claude-assets/skills/cfn-redis-coordination/config.json +0 -61
  665. package/claude-assets/skills/cfn-redis-coordination/demos/phase4-wake-queue-test-report.md +0 -82
  666. package/claude-assets/skills/cfn-redis-coordination/demos/test-bzpopmin-fix.sh +0 -274
  667. package/claude-assets/skills/cfn-redis-coordination/demos/test-cancel-swarm.sh +0 -0
  668. package/claude-assets/skills/cfn-redis-coordination/docs/migration/PHASE_3_REDIS_COORDINATION_COMPLETION_REPORT.md +0 -553
  669. package/claude-assets/skills/cfn-redis-coordination/jest.config.js +0 -23
  670. package/claude-assets/skills/cfn-redis-coordination/package-lock.json +0 -5272
  671. package/claude-assets/skills/cfn-redis-coordination/package.json +0 -45
  672. package/claude-assets/skills/cfn-redis-coordination/src/agent-logger.ts +0 -446
  673. package/claude-assets/skills/cfn-redis-coordination/src/agent-recovery.ts +0 -454
  674. package/claude-assets/skills/cfn-redis-coordination/src/completion-reporter.ts +0 -396
  675. package/claude-assets/skills/cfn-redis-coordination/src/context-manager.ts +0 -327
  676. package/claude-assets/skills/cfn-redis-coordination/src/index.ts +0 -82
  677. package/claude-assets/skills/cfn-redis-coordination/src/mode-detector.ts +0 -155
  678. package/claude-assets/skills/cfn-redis-coordination/src/redis/redis-client.ts +0 -305
  679. package/claude-assets/skills/cfn-redis-coordination/src/redis/redis-functions.ts +0 -283
  680. package/claude-assets/skills/cfn-redis-coordination/src/redis-client.ts +0 -654
  681. package/claude-assets/skills/cfn-redis-coordination/src/result-collector.ts +0 -437
  682. package/claude-assets/skills/cfn-redis-coordination/src/swarm-manager.ts +0 -494
  683. package/claude-assets/skills/cfn-redis-coordination/src/task-analyzer.ts +0 -404
  684. package/claude-assets/skills/cfn-redis-coordination/src/task-executor.ts +0 -423
  685. package/claude-assets/skills/cfn-redis-coordination/src/types.ts +0 -235
  686. package/claude-assets/skills/cfn-redis-coordination/src/waiting-coordinator.ts +0 -587
  687. package/claude-assets/skills/cfn-redis-coordination/store-success-criteria.sh +0 -85
  688. package/claude-assets/skills/cfn-redis-coordination/test-connection-attempts.js +0 -70
  689. package/claude-assets/skills/cfn-redis-coordination/test-mode-simple.js +0 -121
  690. package/claude-assets/skills/cfn-redis-coordination/test-redis-check.js +0 -84
  691. package/claude-assets/skills/cfn-redis-coordination/test-task-mode-redis.cjs +0 -391
  692. package/claude-assets/skills/cfn-redis-coordination/tests/coordination.test.ts +0 -788
  693. package/claude-assets/skills/cfn-redis-coordination/update-all-scripts.sh +0 -67
  694. package/claude-assets/skills/cfn-redis-data-extraction/SKILL.md +0 -442
  695. package/claude-assets/skills/cfn-redis-data-extraction/extract.sh +0 -306
  696. package/dist/coordination/index.js +0 -25
  697. package/dist/coordination/index.js.map +0 -1
  698. package/docs/BUG_19_MEMORY_LEAK_TASK_MODE.md +0 -405
  699. package/docs/MEMORY_CLEANUP_GUIDE.md +0 -358
  700. package/docs/MEMORY_LEAK_FIX_SUMMARY.md +0 -322
  701. package/docs/REDIS_CLEANUP_EXECUTIVE_SUMMARY.md +0 -319
  702. package/docs/REDIS_CLEANUP_VERIFICATION_REPORT.md +0 -574
  703. package/tests/test-memory-leak-task-mode.sh +0 -435
  704. /package/.claude/skills/cfn-loop-orchestration/{inject-loop-context.sh → archive/legacy-bash/inject-loop-context.sh} +0 -0
  705. /package/.claude/skills/cfn-loop-orchestration/{monitor-execution.sh → archive/legacy-bash/monitor-execution.sh} +0 -0
  706. /package/.claude/skills/cfn-redis-coordination/{agent-log.sh → agent-log.sh.backup} +0 -0
  707. /package/.claude/skills/cfn-redis-coordination/{agent-recovery.sh → agent-recovery.sh.backup} +0 -0
  708. /package/.claude/skills/cfn-redis-coordination/{analyze-task-complexity.sh → analyze-task-complexity.sh.backup} +0 -0
  709. /package/.claude/skills/cfn-redis-coordination/bash-wrappers/{store-context.sh → store-context.sh.backup} +0 -0
  710. /package/.claude/skills/cfn-redis-coordination/{cancel-swarm.sh → cancel-swarm.sh.backup} +0 -0
  711. /package/.claude/skills/cfn-redis-coordination/{cfn-loop-exec.sh → cfn-loop-exec.sh.backup} +0 -0
  712. /package/.claude/skills/cfn-redis-coordination/{cfn-loop-relaunch.sh → cfn-loop-relaunch.sh.backup} +0 -0
  713. /package/.claude/skills/cfn-redis-coordination/{collect-confidence-scores.sh → collect-confidence-scores.sh.backup} +0 -0
  714. /package/.claude/skills/cfn-redis-coordination/{collect-results.sh → collect-results.sh.backup} +0 -0
  715. /package/.claude/skills/cfn-redis-coordination/{complete-swarm.sh → complete-swarm.sh.backup} +0 -0
  716. /package/.claude/skills/cfn-redis-coordination/{get-context.sh → get-context.sh.backup} +0 -0
  717. /package/.claude/skills/cfn-redis-coordination/{get-success-criteria.sh → get-success-criteria.sh.backup} +0 -0
  718. /package/.claude/skills/cfn-redis-coordination/{invoke-waiting-mode.sh → invoke-waiting-mode.sh.backup} +0 -0
  719. /package/.claude/skills/cfn-redis-coordination/{redis-cli-wrapper.sh → redis-cli-wrapper.sh.backup} +0 -0
  720. /package/.claude/skills/cfn-redis-coordination/{redis-functions.sh → redis-functions.sh.backup} +0 -0
  721. /package/.claude/skills/cfn-redis-coordination/{report-completion.sh → report-completion.sh.backup} +0 -0
  722. /package/.claude/skills/cfn-redis-coordination/{store-context.sh → store-context.sh.backup} +0 -0
  723. /package/claude-assets/skills/cfn-loop-orchestration/{inject-loop-context.sh → archive/legacy-bash/inject-loop-context.sh} +0 -0
  724. /package/claude-assets/skills/cfn-loop-orchestration/{monitor-execution.sh → archive/legacy-bash/monitor-execution.sh} +0 -0
  725. /package/claude-assets/skills/cfn-redis-coordination/{agent-log.sh → agent-log.sh.backup} +0 -0
  726. /package/claude-assets/skills/cfn-redis-coordination/{agent-recovery.sh → agent-recovery.sh.backup} +0 -0
  727. /package/claude-assets/skills/cfn-redis-coordination/{analyze-task-complexity.sh → analyze-task-complexity.sh.backup} +0 -0
  728. /package/claude-assets/skills/cfn-redis-coordination/bash-wrappers/{store-context.sh → store-context.sh.backup} +0 -0
  729. /package/claude-assets/skills/cfn-redis-coordination/{cancel-swarm.sh → cancel-swarm.sh.backup} +0 -0
  730. /package/claude-assets/skills/cfn-redis-coordination/{cfn-loop-exec.sh → cfn-loop-exec.sh.backup} +0 -0
  731. /package/claude-assets/skills/cfn-redis-coordination/{cfn-loop-relaunch.sh → cfn-loop-relaunch.sh.backup} +0 -0
  732. /package/claude-assets/skills/cfn-redis-coordination/{collect-confidence-scores.sh → collect-confidence-scores.sh.backup} +0 -0
  733. /package/claude-assets/skills/cfn-redis-coordination/{collect-results.sh → collect-results.sh.backup} +0 -0
  734. /package/claude-assets/skills/cfn-redis-coordination/{complete-swarm.sh → complete-swarm.sh.backup} +0 -0
  735. /package/claude-assets/skills/cfn-redis-coordination/{get-context.sh → get-context.sh.backup} +0 -0
  736. /package/claude-assets/skills/cfn-redis-coordination/{get-success-criteria.sh → get-success-criteria.sh.backup} +0 -0
  737. /package/claude-assets/skills/cfn-redis-coordination/{invoke-waiting-mode.sh → invoke-waiting-mode.sh.backup} +0 -0
  738. /package/claude-assets/skills/cfn-redis-coordination/{redis-cli-wrapper.sh → redis-cli-wrapper.sh.backup} +0 -0
  739. /package/claude-assets/skills/cfn-redis-coordination/{redis-functions.sh → redis-functions.sh.backup} +0 -0
  740. /package/claude-assets/skills/cfn-redis-coordination/{report-completion.sh → report-completion.sh.backup} +0 -0
  741. /package/claude-assets/skills/cfn-redis-coordination/{store-context.sh → store-context.sh.backup} +0 -0
@@ -0,0 +1,388 @@
1
+ /**
2
+ * Post-Edit Validator - File validation after modifications
3
+ * Runs syntax, formatting, and linting checks on edited files
4
+ */ import * as fs from 'fs/promises';
5
+ import * as path from 'path';
6
+ import { spawn } from 'child_process';
7
+ export class PostEditValidator {
8
+ config;
9
+ projectRoot;
10
+ configPath;
11
+ constructor(projectRoot = process.cwd()){
12
+ this.projectRoot = projectRoot;
13
+ this.configPath = path.join(projectRoot, '.claude/hooks/cfn-post-edit.config.json');
14
+ this.config = {
15
+ checkSyntax: true,
16
+ checkFormatting: true,
17
+ checkDuplication: false,
18
+ blockingValidation: false
19
+ };
20
+ }
21
+ /**
22
+ * Load validation config from JSON file
23
+ */ async loadConfig() {
24
+ try {
25
+ const configContent = await fs.readFile(this.configPath, 'utf-8');
26
+ const rawConfig = JSON.parse(configContent);
27
+ // Merge with defaults
28
+ this.config = {
29
+ checkSyntax: rawConfig.validation?.syntax?.enabled ?? true,
30
+ checkFormatting: rawConfig.validation?.formatting?.enabled ?? true,
31
+ checkDuplication: rawConfig.validation?.duplication?.enabled ?? false,
32
+ blockingValidation: rawConfig.blocking ?? false,
33
+ typescript: rawConfig.validation?.typescript ?? {
34
+ enabled: true,
35
+ noEmit: true,
36
+ skipLibCheck: true
37
+ },
38
+ bash: rawConfig.validation?.bash ?? {
39
+ enabled: true,
40
+ validators: [
41
+ 'pipe-safety',
42
+ 'dependency-checker',
43
+ 'line-endings'
44
+ ],
45
+ timeout: 5000
46
+ }
47
+ };
48
+ return this.config;
49
+ } catch (error) {
50
+ // Return defaults if config not found
51
+ return this.config;
52
+ }
53
+ }
54
+ /**
55
+ * Get file extension to determine file type
56
+ */ getFileExtension(filePath) {
57
+ return path.extname(filePath).toLowerCase();
58
+ }
59
+ /**
60
+ * Validate TypeScript/JavaScript files
61
+ */ async validateTypeScript(filePath) {
62
+ const startTime = Date.now();
63
+ const result = {
64
+ passed: true,
65
+ errors: [],
66
+ warnings: [],
67
+ suggestions: [],
68
+ timestamp: new Date().toISOString(),
69
+ filePath,
70
+ executionTime: 0
71
+ };
72
+ try {
73
+ // Check if tsc is available
74
+ const tscPath = path.join(this.projectRoot, 'node_modules/.bin/tsc');
75
+ await fs.stat(tscPath);
76
+ return await this.runTypeScriptCheck(filePath, result);
77
+ } catch {
78
+ // TypeScript not available, skip
79
+ result.warnings.push('TypeScript compiler not available, skipping type checking');
80
+ }
81
+ result.executionTime = Date.now() - startTime;
82
+ return result;
83
+ }
84
+ /**
85
+ * Run TypeScript compilation check
86
+ */ runTypeScriptCheck(filePath, result) {
87
+ return new Promise((resolve)=>{
88
+ try {
89
+ const tsc = spawn('npx', [
90
+ 'tsc',
91
+ '--noEmit',
92
+ filePath
93
+ ], {
94
+ cwd: this.projectRoot,
95
+ timeout: 10000
96
+ });
97
+ let stderr = '';
98
+ let stdout = '';
99
+ tsc.stdout?.on('data', (data)=>{
100
+ stdout += data.toString();
101
+ });
102
+ tsc.stderr?.on('data', (data)=>{
103
+ stderr += data.toString();
104
+ });
105
+ tsc.on('close', (code)=>{
106
+ if (code !== 0 && stdout) {
107
+ result.passed = false;
108
+ result.errors.push(`TypeScript compilation failed:\n${stdout}`);
109
+ }
110
+ result.executionTime = Date.now() - new Date(result.timestamp).getTime();
111
+ resolve(result);
112
+ });
113
+ tsc.on('error', (error)=>{
114
+ result.warnings.push(`TypeScript check skipped: ${error.message}`);
115
+ result.executionTime = Date.now() - new Date(result.timestamp).getTime();
116
+ resolve(result);
117
+ });
118
+ } catch (error) {
119
+ result.warnings.push(`Failed to run TypeScript check: ${error}`);
120
+ result.executionTime = Date.now() - new Date(result.timestamp).getTime();
121
+ resolve(result);
122
+ }
123
+ });
124
+ }
125
+ /**
126
+ * Validate Bash scripts
127
+ */ async validateBash(filePath) {
128
+ const startTime = Date.now();
129
+ const result = {
130
+ passed: true,
131
+ errors: [],
132
+ warnings: [],
133
+ suggestions: [],
134
+ timestamp: new Date().toISOString(),
135
+ filePath,
136
+ executionTime: 0
137
+ };
138
+ try {
139
+ // Run basic bash syntax check with bash -n
140
+ const content = await fs.readFile(filePath, 'utf-8');
141
+ // Check for common bash issues
142
+ if (content.includes('[ -z')) {
143
+ result.warnings.push('Consider using [[ -z instead of [ -z for more robust string checking');
144
+ }
145
+ if (content.match(/\|\s*while.*read/)) {
146
+ result.warnings.push('Pipe to while-read can cause issues with variable scope, consider using process substitution');
147
+ }
148
+ if (!content.includes('set -euo pipefail')) {
149
+ result.suggestions.push('Add "set -euo pipefail" at the top of the script for safety');
150
+ }
151
+ // Check for unquoted variables
152
+ const unquotedVars = content.match(/\$\w+(?![\w"}])/g) || [];
153
+ if (unquotedVars.length > 0) {
154
+ result.warnings.push(`Found ${unquotedVars.length} potentially unquoted variables - consider quoting them`);
155
+ }
156
+ result.executionTime = Date.now() - startTime;
157
+ return result;
158
+ } catch (error) {
159
+ result.errors.push(`Bash validation failed: ${error}`);
160
+ result.passed = false;
161
+ result.executionTime = Date.now() - startTime;
162
+ return result;
163
+ }
164
+ }
165
+ /**
166
+ * Validate JSON files
167
+ */ async validateJSON(filePath) {
168
+ const startTime = Date.now();
169
+ const result = {
170
+ passed: true,
171
+ errors: [],
172
+ warnings: [],
173
+ suggestions: [],
174
+ timestamp: new Date().toISOString(),
175
+ filePath,
176
+ executionTime: 0
177
+ };
178
+ try {
179
+ const content = await fs.readFile(filePath, 'utf-8');
180
+ JSON.parse(content);
181
+ } catch (error) {
182
+ result.passed = false;
183
+ result.errors.push(`JSON validation failed: ${error}`);
184
+ }
185
+ result.executionTime = Date.now() - startTime;
186
+ return result;
187
+ }
188
+ /**
189
+ * Check for code duplication
190
+ */ async checkDuplication(filePath) {
191
+ const startTime = Date.now();
192
+ const result = {
193
+ passed: true,
194
+ errors: [],
195
+ warnings: [],
196
+ suggestions: [],
197
+ timestamp: new Date().toISOString(),
198
+ filePath,
199
+ executionTime: 0
200
+ };
201
+ try {
202
+ const content = await fs.readFile(filePath, 'utf-8');
203
+ const lines = content.split('\n');
204
+ // Check for duplicate consecutive lines
205
+ const seenLines = new Map();
206
+ for(let i = 0; i < lines.length; i++){
207
+ const line = lines[i].trim();
208
+ if (line && line.length > 20) {
209
+ // Only check non-trivial lines
210
+ const count = seenLines.get(line) || 0;
211
+ if (count > 0) {
212
+ result.suggestions.push(`Duplicate line found at line ${i + 1}: "${line.substring(0, 50)}..."`);
213
+ }
214
+ seenLines.set(line, count + 1);
215
+ }
216
+ }
217
+ } catch (error) {
218
+ result.warnings.push(`Duplication check skipped: ${error}`);
219
+ }
220
+ result.executionTime = Date.now() - startTime;
221
+ return result;
222
+ }
223
+ /**
224
+ * Check file formatting consistency
225
+ */ async checkFormatting(filePath) {
226
+ const startTime = Date.now();
227
+ const result = {
228
+ passed: true,
229
+ errors: [],
230
+ warnings: [],
231
+ suggestions: [],
232
+ timestamp: new Date().toISOString(),
233
+ filePath,
234
+ executionTime: 0
235
+ };
236
+ try {
237
+ const content = await fs.readFile(filePath, 'utf-8');
238
+ const lines = content.split('\n');
239
+ // Check for mixed line endings
240
+ const hasWindowsLineEndings = content.includes('\r\n');
241
+ const hasUnixLineEndings = content.includes('\n');
242
+ if (hasWindowsLineEndings && hasUnixLineEndings) {
243
+ result.warnings.push('Mixed line endings detected (CRLF and LF)');
244
+ }
245
+ // Check for trailing whitespace
246
+ let trailingWhitespaceCount = 0;
247
+ for (const line of lines){
248
+ if (line !== line.trimRight()) {
249
+ trailingWhitespaceCount++;
250
+ }
251
+ }
252
+ if (trailingWhitespaceCount > 0) {
253
+ result.suggestions.push(`${trailingWhitespaceCount} lines have trailing whitespace`);
254
+ }
255
+ // Check for tabs vs spaces
256
+ const hasTabs = content.includes('\t');
257
+ const hasSpaces = /^ +/.test(content);
258
+ if (hasTabs && hasSpaces) {
259
+ result.warnings.push('Mixed tabs and spaces detected');
260
+ }
261
+ } catch (error) {
262
+ result.warnings.push(`Formatting check skipped: ${error}`);
263
+ }
264
+ result.executionTime = Date.now() - startTime;
265
+ return result;
266
+ }
267
+ /**
268
+ * Run full validation pipeline on a file
269
+ */ async validateFile(filePath, agentId) {
270
+ try {
271
+ await this.loadConfig();
272
+ // Validate file exists
273
+ await fs.stat(filePath);
274
+ } catch {
275
+ return {
276
+ passed: false,
277
+ errors: [
278
+ `File does not exist: ${filePath}`
279
+ ],
280
+ warnings: [],
281
+ suggestions: [],
282
+ timestamp: new Date().toISOString(),
283
+ filePath,
284
+ executionTime: 0
285
+ };
286
+ }
287
+ // Run validation pipeline
288
+ return await this.runValidationPipeline(filePath);
289
+ }
290
+ /**
291
+ * Execute complete validation pipeline
292
+ */ async runValidationPipeline(filePath) {
293
+ const startTime = Date.now();
294
+ const ext = this.getFileExtension(filePath);
295
+ const aggregatedResult = {
296
+ passed: true,
297
+ errors: [],
298
+ warnings: [],
299
+ suggestions: [],
300
+ timestamp: new Date().toISOString(),
301
+ filePath,
302
+ executionTime: 0
303
+ };
304
+ try {
305
+ // Run type-specific validation
306
+ let typeValidation;
307
+ if ([
308
+ '.ts',
309
+ '.tsx'
310
+ ].includes(ext)) {
311
+ if (this.config.typescript?.enabled) {
312
+ typeValidation = await this.validateTypeScript(filePath);
313
+ this.mergeResults(aggregatedResult, typeValidation);
314
+ }
315
+ } else if ([
316
+ '.js',
317
+ '.jsx'
318
+ ].includes(ext)) {
319
+ // Basic JS validation would go here
320
+ } else if ([
321
+ '.json'
322
+ ].includes(ext)) {
323
+ typeValidation = await this.validateJSON(filePath);
324
+ this.mergeResults(aggregatedResult, typeValidation);
325
+ } else if ([
326
+ '.sh',
327
+ '.bash'
328
+ ].includes(ext)) {
329
+ if (this.config.bash?.enabled) {
330
+ typeValidation = await this.validateBash(filePath);
331
+ this.mergeResults(aggregatedResult, typeValidation);
332
+ }
333
+ }
334
+ // Run common checks
335
+ if (this.config.checkFormatting) {
336
+ const formattingResult = await this.checkFormatting(filePath);
337
+ this.mergeResults(aggregatedResult, formattingResult);
338
+ }
339
+ if (this.config.checkDuplication) {
340
+ const duplicationResult = await this.checkDuplication(filePath);
341
+ this.mergeResults(aggregatedResult, duplicationResult);
342
+ }
343
+ aggregatedResult.executionTime = Date.now() - startTime;
344
+ return aggregatedResult;
345
+ } catch (error) {
346
+ aggregatedResult.errors.push(`Validation pipeline failed: ${error}`);
347
+ aggregatedResult.passed = false;
348
+ aggregatedResult.executionTime = Date.now() - startTime;
349
+ return aggregatedResult;
350
+ }
351
+ }
352
+ /**
353
+ * Merge validation results
354
+ */ mergeResults(target, source) {
355
+ target.errors.push(...source.errors);
356
+ target.warnings.push(...source.warnings);
357
+ target.suggestions.push(...source.suggestions);
358
+ if (!source.passed) {
359
+ target.passed = false;
360
+ }
361
+ }
362
+ /**
363
+ * Get validation feedback summary
364
+ */ getValidationSummary(result) {
365
+ const lines = [];
366
+ if (result.passed) {
367
+ lines.push('✅ Validation passed');
368
+ } else {
369
+ lines.push('❌ Validation failed');
370
+ }
371
+ if (result.errors.length > 0) {
372
+ lines.push(`\nErrors (${result.errors.length}):`);
373
+ result.errors.forEach((error)=>lines.push(` - ${error}`));
374
+ }
375
+ if (result.warnings.length > 0) {
376
+ lines.push(`\nWarnings (${result.warnings.length}):`);
377
+ result.warnings.forEach((warning)=>lines.push(` - ${warning}`));
378
+ }
379
+ if (result.suggestions.length > 0) {
380
+ lines.push(`\nSuggestions (${result.suggestions.length}):`);
381
+ result.suggestions.forEach((suggestion)=>lines.push(` - ${suggestion}`));
382
+ }
383
+ lines.push(`\nExecution time: ${result.executionTime}ms`);
384
+ return lines.join('\n');
385
+ }
386
+ }
387
+
388
+ //# sourceMappingURL=post-edit-validator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/post-edit-validator.ts"],"sourcesContent":["/**\r\n * Post-Edit Validator - File validation after modifications\r\n * Runs syntax, formatting, and linting checks on edited files\r\n */\r\n\r\nimport * as fs from 'fs/promises';\r\nimport * as path from 'path';\r\nimport { spawn } from 'child_process';\r\n\r\ninterface ValidationConfig {\r\n checkSyntax: boolean;\r\n checkFormatting: boolean;\r\n checkDuplication: boolean;\r\n blockingValidation: boolean;\r\n typescript?: {\r\n enabled: boolean;\r\n noEmit: boolean;\r\n skipLibCheck: boolean;\r\n };\r\n bash?: {\r\n enabled: boolean;\r\n validators: string[];\r\n timeout: number;\r\n };\r\n}\r\n\r\ninterface ValidationResult {\r\n passed: boolean;\r\n errors: string[];\r\n warnings: string[];\r\n suggestions: string[];\r\n timestamp: string;\r\n filePath: string;\r\n executionTime: number;\r\n}\r\n\r\nexport class PostEditValidator {\r\n private config: ValidationConfig;\r\n private projectRoot: string;\r\n private configPath: string;\r\n\r\n constructor(projectRoot: string = process.cwd()) {\r\n this.projectRoot = projectRoot;\r\n this.configPath = path.join(projectRoot, '.claude/hooks/cfn-post-edit.config.json');\r\n this.config = {\r\n checkSyntax: true,\r\n checkFormatting: true,\r\n checkDuplication: false,\r\n blockingValidation: false,\r\n };\r\n }\r\n\r\n /**\r\n * Load validation config from JSON file\r\n */\r\n async loadConfig(): Promise<ValidationConfig> {\r\n try {\r\n const configContent = await fs.readFile(this.configPath, 'utf-8');\r\n const rawConfig = JSON.parse(configContent);\r\n\r\n // Merge with defaults\r\n this.config = {\r\n checkSyntax: rawConfig.validation?.syntax?.enabled ?? true,\r\n checkFormatting: rawConfig.validation?.formatting?.enabled ?? true,\r\n checkDuplication: rawConfig.validation?.duplication?.enabled ?? false,\r\n blockingValidation: rawConfig.blocking ?? false,\r\n typescript: rawConfig.validation?.typescript ?? {\r\n enabled: true,\r\n noEmit: true,\r\n skipLibCheck: true,\r\n },\r\n bash: rawConfig.validation?.bash ?? {\r\n enabled: true,\r\n validators: ['pipe-safety', 'dependency-checker', 'line-endings'],\r\n timeout: 5000,\r\n },\r\n };\r\n\r\n return this.config;\r\n } catch (error) {\r\n // Return defaults if config not found\r\n return this.config;\r\n }\r\n }\r\n\r\n /**\r\n * Get file extension to determine file type\r\n */\r\n private getFileExtension(filePath: string): string {\r\n return path.extname(filePath).toLowerCase();\r\n }\r\n\r\n /**\r\n * Validate TypeScript/JavaScript files\r\n */\r\n private async validateTypeScript(filePath: string): Promise<ValidationResult> {\r\n const startTime = Date.now();\r\n const result: ValidationResult = {\r\n passed: true,\r\n errors: [],\r\n warnings: [],\r\n suggestions: [],\r\n timestamp: new Date().toISOString(),\r\n filePath,\r\n executionTime: 0,\r\n };\r\n\r\n try {\r\n // Check if tsc is available\r\n const tscPath = path.join(this.projectRoot, 'node_modules/.bin/tsc');\r\n await fs.stat(tscPath);\r\n\r\n return await this.runTypeScriptCheck(filePath, result);\r\n } catch {\r\n // TypeScript not available, skip\r\n result.warnings.push('TypeScript compiler not available, skipping type checking');\r\n }\r\n\r\n result.executionTime = Date.now() - startTime;\r\n return result;\r\n }\r\n\r\n /**\r\n * Run TypeScript compilation check\r\n */\r\n private runTypeScriptCheck(\r\n filePath: string,\r\n result: ValidationResult\r\n ): Promise<ValidationResult> {\r\n return new Promise((resolve) => {\r\n try {\r\n const tsc = spawn('npx', ['tsc', '--noEmit', filePath], {\r\n cwd: this.projectRoot,\r\n timeout: 10000,\r\n });\r\n\r\n let stderr = '';\r\n let stdout = '';\r\n\r\n tsc.stdout?.on('data', (data) => {\r\n stdout += data.toString();\r\n });\r\n\r\n tsc.stderr?.on('data', (data) => {\r\n stderr += data.toString();\r\n });\r\n\r\n tsc.on('close', (code) => {\r\n if (code !== 0 && stdout) {\r\n result.passed = false;\r\n result.errors.push(`TypeScript compilation failed:\\n${stdout}`);\r\n }\r\n result.executionTime = Date.now() - new Date(result.timestamp).getTime();\r\n resolve(result);\r\n });\r\n\r\n tsc.on('error', (error) => {\r\n result.warnings.push(`TypeScript check skipped: ${error.message}`);\r\n result.executionTime = Date.now() - new Date(result.timestamp).getTime();\r\n resolve(result);\r\n });\r\n } catch (error) {\r\n result.warnings.push(`Failed to run TypeScript check: ${error}`);\r\n result.executionTime = Date.now() - new Date(result.timestamp).getTime();\r\n resolve(result);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Validate Bash scripts\r\n */\r\n private async validateBash(filePath: string): Promise<ValidationResult> {\r\n const startTime = Date.now();\r\n const result: ValidationResult = {\r\n passed: true,\r\n errors: [],\r\n warnings: [],\r\n suggestions: [],\r\n timestamp: new Date().toISOString(),\r\n filePath,\r\n executionTime: 0,\r\n };\r\n\r\n try {\r\n // Run basic bash syntax check with bash -n\r\n const content = await fs.readFile(filePath, 'utf-8');\r\n\r\n // Check for common bash issues\r\n if (content.includes('[ -z')) {\r\n result.warnings.push(\r\n 'Consider using [[ -z instead of [ -z for more robust string checking'\r\n );\r\n }\r\n\r\n if (content.match(/\\|\\s*while.*read/)) {\r\n result.warnings.push(\r\n 'Pipe to while-read can cause issues with variable scope, consider using process substitution'\r\n );\r\n }\r\n\r\n if (!content.includes('set -euo pipefail')) {\r\n result.suggestions.push('Add \"set -euo pipefail\" at the top of the script for safety');\r\n }\r\n\r\n // Check for unquoted variables\r\n const unquotedVars = content.match(/\\$\\w+(?![\\w\"}])/g) || [];\r\n if (unquotedVars.length > 0) {\r\n result.warnings.push(\r\n `Found ${unquotedVars.length} potentially unquoted variables - consider quoting them`\r\n );\r\n }\r\n\r\n result.executionTime = Date.now() - startTime;\r\n return result;\r\n } catch (error) {\r\n result.errors.push(`Bash validation failed: ${error}`);\r\n result.passed = false;\r\n result.executionTime = Date.now() - startTime;\r\n return result;\r\n }\r\n }\r\n\r\n /**\r\n * Validate JSON files\r\n */\r\n private async validateJSON(filePath: string): Promise<ValidationResult> {\r\n const startTime = Date.now();\r\n const result: ValidationResult = {\r\n passed: true,\r\n errors: [],\r\n warnings: [],\r\n suggestions: [],\r\n timestamp: new Date().toISOString(),\r\n filePath,\r\n executionTime: 0,\r\n };\r\n\r\n try {\r\n const content = await fs.readFile(filePath, 'utf-8');\r\n JSON.parse(content);\r\n } catch (error) {\r\n result.passed = false;\r\n result.errors.push(`JSON validation failed: ${error}`);\r\n }\r\n\r\n result.executionTime = Date.now() - startTime;\r\n return result;\r\n }\r\n\r\n /**\r\n * Check for code duplication\r\n */\r\n private async checkDuplication(filePath: string): Promise<ValidationResult> {\r\n const startTime = Date.now();\r\n const result: ValidationResult = {\r\n passed: true,\r\n errors: [],\r\n warnings: [],\r\n suggestions: [],\r\n timestamp: new Date().toISOString(),\r\n filePath,\r\n executionTime: 0,\r\n };\r\n\r\n try {\r\n const content = await fs.readFile(filePath, 'utf-8');\r\n const lines = content.split('\\n');\r\n\r\n // Check for duplicate consecutive lines\r\n const seenLines = new Map<string, number>();\r\n\r\n for (let i = 0; i < lines.length; i++) {\r\n const line = lines[i].trim();\r\n\r\n if (line && line.length > 20) {\r\n // Only check non-trivial lines\r\n const count = seenLines.get(line) || 0;\r\n\r\n if (count > 0) {\r\n result.suggestions.push(\r\n `Duplicate line found at line ${i + 1}: \"${line.substring(0, 50)}...\"`\r\n );\r\n }\r\n\r\n seenLines.set(line, count + 1);\r\n }\r\n }\r\n } catch (error) {\r\n result.warnings.push(`Duplication check skipped: ${error}`);\r\n }\r\n\r\n result.executionTime = Date.now() - startTime;\r\n return result;\r\n }\r\n\r\n /**\r\n * Check file formatting consistency\r\n */\r\n private async checkFormatting(filePath: string): Promise<ValidationResult> {\r\n const startTime = Date.now();\r\n const result: ValidationResult = {\r\n passed: true,\r\n errors: [],\r\n warnings: [],\r\n suggestions: [],\r\n timestamp: new Date().toISOString(),\r\n filePath,\r\n executionTime: 0,\r\n };\r\n\r\n try {\r\n const content = await fs.readFile(filePath, 'utf-8');\r\n const lines = content.split('\\n');\r\n\r\n // Check for mixed line endings\r\n const hasWindowsLineEndings = content.includes('\\r\\n');\r\n const hasUnixLineEndings = content.includes('\\n');\r\n\r\n if (hasWindowsLineEndings && hasUnixLineEndings) {\r\n result.warnings.push('Mixed line endings detected (CRLF and LF)');\r\n }\r\n\r\n // Check for trailing whitespace\r\n let trailingWhitespaceCount = 0;\r\n for (const line of lines) {\r\n if (line !== line.trimRight()) {\r\n trailingWhitespaceCount++;\r\n }\r\n }\r\n\r\n if (trailingWhitespaceCount > 0) {\r\n result.suggestions.push(\r\n `${trailingWhitespaceCount} lines have trailing whitespace`\r\n );\r\n }\r\n\r\n // Check for tabs vs spaces\r\n const hasTabs = content.includes('\\t');\r\n const hasSpaces = /^ +/.test(content);\r\n\r\n if (hasTabs && hasSpaces) {\r\n result.warnings.push('Mixed tabs and spaces detected');\r\n }\r\n } catch (error) {\r\n result.warnings.push(`Formatting check skipped: ${error}`);\r\n }\r\n\r\n result.executionTime = Date.now() - startTime;\r\n return result;\r\n }\r\n\r\n /**\r\n * Run full validation pipeline on a file\r\n */\r\n async validateFile(filePath: string, agentId?: string): Promise<ValidationResult> {\r\n try {\r\n await this.loadConfig();\r\n\r\n // Validate file exists\r\n await fs.stat(filePath);\r\n } catch {\r\n return {\r\n passed: false,\r\n errors: [`File does not exist: ${filePath}`],\r\n warnings: [],\r\n suggestions: [],\r\n timestamp: new Date().toISOString(),\r\n filePath,\r\n executionTime: 0,\r\n };\r\n }\r\n\r\n // Run validation pipeline\r\n return await this.runValidationPipeline(filePath);\r\n }\r\n\r\n /**\r\n * Execute complete validation pipeline\r\n */\r\n async runValidationPipeline(filePath: string): Promise<ValidationResult> {\r\n const startTime = Date.now();\r\n const ext = this.getFileExtension(filePath);\r\n const aggregatedResult: ValidationResult = {\r\n passed: true,\r\n errors: [],\r\n warnings: [],\r\n suggestions: [],\r\n timestamp: new Date().toISOString(),\r\n filePath,\r\n executionTime: 0,\r\n };\r\n\r\n try {\r\n // Run type-specific validation\r\n let typeValidation: ValidationResult;\r\n\r\n if (['.ts', '.tsx'].includes(ext)) {\r\n if (this.config.typescript?.enabled) {\r\n typeValidation = await this.validateTypeScript(filePath);\r\n this.mergeResults(aggregatedResult, typeValidation);\r\n }\r\n } else if (['.js', '.jsx'].includes(ext)) {\r\n // Basic JS validation would go here\r\n } else if (['.json'].includes(ext)) {\r\n typeValidation = await this.validateJSON(filePath);\r\n this.mergeResults(aggregatedResult, typeValidation);\r\n } else if (['.sh', '.bash'].includes(ext)) {\r\n if (this.config.bash?.enabled) {\r\n typeValidation = await this.validateBash(filePath);\r\n this.mergeResults(aggregatedResult, typeValidation);\r\n }\r\n }\r\n\r\n // Run common checks\r\n if (this.config.checkFormatting) {\r\n const formattingResult = await this.checkFormatting(filePath);\r\n this.mergeResults(aggregatedResult, formattingResult);\r\n }\r\n\r\n if (this.config.checkDuplication) {\r\n const duplicationResult = await this.checkDuplication(filePath);\r\n this.mergeResults(aggregatedResult, duplicationResult);\r\n }\r\n\r\n aggregatedResult.executionTime = Date.now() - startTime;\r\n return aggregatedResult;\r\n } catch (error) {\r\n aggregatedResult.errors.push(`Validation pipeline failed: ${error}`);\r\n aggregatedResult.passed = false;\r\n aggregatedResult.executionTime = Date.now() - startTime;\r\n return aggregatedResult;\r\n }\r\n }\r\n\r\n /**\r\n * Merge validation results\r\n */\r\n private mergeResults(target: ValidationResult, source: ValidationResult): void {\r\n target.errors.push(...source.errors);\r\n target.warnings.push(...source.warnings);\r\n target.suggestions.push(...source.suggestions);\r\n\r\n if (!source.passed) {\r\n target.passed = false;\r\n }\r\n }\r\n\r\n /**\r\n * Get validation feedback summary\r\n */\r\n getValidationSummary(result: ValidationResult): string {\r\n const lines: string[] = [];\r\n\r\n if (result.passed) {\r\n lines.push('✅ Validation passed');\r\n } else {\r\n lines.push('❌ Validation failed');\r\n }\r\n\r\n if (result.errors.length > 0) {\r\n lines.push(`\\nErrors (${result.errors.length}):`);\r\n result.errors.forEach((error) => lines.push(` - ${error}`));\r\n }\r\n\r\n if (result.warnings.length > 0) {\r\n lines.push(`\\nWarnings (${result.warnings.length}):`);\r\n result.warnings.forEach((warning) => lines.push(` - ${warning}`));\r\n }\r\n\r\n if (result.suggestions.length > 0) {\r\n lines.push(`\\nSuggestions (${result.suggestions.length}):`);\r\n result.suggestions.forEach((suggestion) => lines.push(` - ${suggestion}`));\r\n }\r\n\r\n lines.push(`\\nExecution time: ${result.executionTime}ms`);\r\n\r\n return lines.join('\\n');\r\n }\r\n}\r\n"],"names":["fs","path","spawn","PostEditValidator","config","projectRoot","configPath","process","cwd","join","checkSyntax","checkFormatting","checkDuplication","blockingValidation","loadConfig","configContent","readFile","rawConfig","JSON","parse","validation","syntax","enabled","formatting","duplication","blocking","typescript","noEmit","skipLibCheck","bash","validators","timeout","error","getFileExtension","filePath","extname","toLowerCase","validateTypeScript","startTime","Date","now","result","passed","errors","warnings","suggestions","timestamp","toISOString","executionTime","tscPath","stat","runTypeScriptCheck","push","Promise","resolve","tsc","stderr","stdout","on","data","toString","code","getTime","message","validateBash","content","includes","match","unquotedVars","length","validateJSON","lines","split","seenLines","Map","i","line","trim","count","get","substring","set","hasWindowsLineEndings","hasUnixLineEndings","trailingWhitespaceCount","trimRight","hasTabs","hasSpaces","test","validateFile","agentId","runValidationPipeline","ext","aggregatedResult","typeValidation","mergeResults","formattingResult","duplicationResult","target","source","getValidationSummary","forEach","warning","suggestion"],"mappings":"AAAA;;;CAGC,GAED,YAAYA,QAAQ,cAAc;AAClC,YAAYC,UAAU,OAAO;AAC7B,SAASC,KAAK,QAAQ,gBAAgB;AA6BtC,OAAO,MAAMC;IACHC,OAAyB;IACzBC,YAAoB;IACpBC,WAAmB;IAE3B,YAAYD,cAAsBE,QAAQC,GAAG,EAAE,CAAE;QAC/C,IAAI,CAACH,WAAW,GAAGA;QACnB,IAAI,CAACC,UAAU,GAAGL,KAAKQ,IAAI,CAACJ,aAAa;QACzC,IAAI,CAACD,MAAM,GAAG;YACZM,aAAa;YACbC,iBAAiB;YACjBC,kBAAkB;YAClBC,oBAAoB;QACtB;IACF;IAEA;;GAEC,GACD,MAAMC,aAAwC;QAC5C,IAAI;YACF,MAAMC,gBAAgB,MAAMf,GAAGgB,QAAQ,CAAC,IAAI,CAACV,UAAU,EAAE;YACzD,MAAMW,YAAYC,KAAKC,KAAK,CAACJ;YAE7B,sBAAsB;YACtB,IAAI,CAACX,MAAM,GAAG;gBACZM,aAAaO,UAAUG,UAAU,EAAEC,QAAQC,WAAW;gBACtDX,iBAAiBM,UAAUG,UAAU,EAAEG,YAAYD,WAAW;gBAC9DV,kBAAkBK,UAAUG,UAAU,EAAEI,aAAaF,WAAW;gBAChET,oBAAoBI,UAAUQ,QAAQ,IAAI;gBAC1CC,YAAYT,UAAUG,UAAU,EAAEM,cAAc;oBAC9CJ,SAAS;oBACTK,QAAQ;oBACRC,cAAc;gBAChB;gBACAC,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C,CAAC,IAAI,EAAEpB,OAAO;QAC5D;QAEA,IAAIS,OAAOG,QAAQ,CAACyB,MAAM,GAAG,GAAG;YAC9BE,MAAMnB,IAAI,CAAC,CAAC,YAAY,EAAEX,OAAOG,QAAQ,CAACyB,MAAM,CAAC,EAAE,CAAC;YACpD5B,OAAOG,QAAQ,CAACyD,OAAO,CAAC,CAACC,UAAY/B,MAAMnB,IAAI,CAAC,CAAC,IAAI,EAAEkD,SAAS;QAClE;QAEA,IAAI7D,OAAOI,WAAW,CAACwB,MAAM,GAAG,GAAG;YACjCE,MAAMnB,IAAI,CAAC,CAAC,eAAe,EAAEX,OAAOI,WAAW,CAACwB,MAAM,CAAC,EAAE,CAAC;YAC1D5B,OAAOI,WAAW,CAACwD,OAAO,CAAC,CAACE,aAAehC,MAAMnB,IAAI,CAAC,CAAC,IAAI,EAAEmD,YAAY;QAC3E;QAEAhC,MAAMnB,IAAI,CAAC,CAAC,kBAAkB,EAAEX,OAAOO,aAAa,CAAC,EAAE,CAAC;QAExD,OAAOuB,MAAM9D,IAAI,CAAC;IACpB;AACF"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Integration Module - Trigger.dev and Task Mode Adapters
3
+ *
4
+ * Exports all integration classes and utilities for CFN Loop orchestration:
5
+ * - TriggerDevClient: Type-safe trigger.dev API wrapper
6
+ * - TriggerDevWebhooks: Express webhook handlers
7
+ * - TaskModeCoordinator: In-memory and hybrid coordination
8
+ * - TaskModeEventQueue: Event queue for task mode
9
+ *
10
+ * Type exports from trigger-dev-events.d.ts are available via:
11
+ * import type { ... } from '../types/trigger-dev-events.js'
12
+ */ // TriggerDevClient exports
13
+ export { TriggerDevClient, TriggerDevError, createTriggerDevClient } from './trigger-dev-client.js';
14
+ // TriggerDevWebhooks exports
15
+ export { TriggerDevWebhooks, WebhookValidationError, createWebhookRouter } from './trigger-dev-webhooks.js';
16
+ // TaskModeAdapter exports
17
+ export { TaskModeCoordinator, TaskModeEventQueue, createTaskModeCoordinator, getTaskModeCoordinator } from './task-mode-adapter.js';
18
+
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/integration/index.ts"],"sourcesContent":["/**\r\n * Integration Module - Trigger.dev and Task Mode Adapters\r\n *\r\n * Exports all integration classes and utilities for CFN Loop orchestration:\r\n * - TriggerDevClient: Type-safe trigger.dev API wrapper\r\n * - TriggerDevWebhooks: Express webhook handlers\r\n * - TaskModeCoordinator: In-memory and hybrid coordination\r\n * - TaskModeEventQueue: Event queue for task mode\r\n *\r\n * Type exports from trigger-dev-events.d.ts are available via:\r\n * import type { ... } from '../types/trigger-dev-events.js'\r\n */\r\n\r\n// TriggerDevClient exports\r\nexport {\r\n TriggerDevClient,\r\n TriggerDevError,\r\n createTriggerDevClient,\r\n type RunFilterOptions,\r\n type TriggerDevConfig,\r\n} from './trigger-dev-client.js';\r\n\r\n// TriggerDevWebhooks exports\r\nexport {\r\n TriggerDevWebhooks,\r\n WebhookValidationError,\r\n createWebhookRouter,\r\n type WebhookConfig,\r\n type WebhookHandler,\r\n} from './trigger-dev-webhooks.js';\r\n\r\n// TaskModeAdapter exports\r\nexport {\r\n TaskModeCoordinator,\r\n TaskModeEventQueue,\r\n createTaskModeCoordinator,\r\n getTaskModeCoordinator,\r\n type TaskModeCoordinationResult,\r\n} from './task-mode-adapter.js';\r\n\r\n// Re-export types from trigger-dev-events for convenience\r\nexport type {\r\n RunStatusType,\r\n RunStatusResponse,\r\n AgentType,\r\n AgentCompletePayload,\r\n GateResultPayload,\r\n ConsensusResultPayload,\r\n PODecisionPayload,\r\n CFNLoopPayload,\r\n Run,\r\n WebhookVerificationOptions,\r\n WebhookContext,\r\n WebhookHandlerResult,\r\n TaskModeEvent,\r\n TaskModeSpawnRequest,\r\n TaskModeAgentResult,\r\n} from '../types/trigger-dev-events.js';\r\n"],"names":["TriggerDevClient","TriggerDevError","createTriggerDevClient","TriggerDevWebhooks","WebhookValidationError","createWebhookRouter","TaskModeCoordinator","TaskModeEventQueue","createTaskModeCoordinator","getTaskModeCoordinator"],"mappings":"AAAA;;;;;;;;;;;CAWC,GAED,2BAA2B;AAC3B,SACEA,gBAAgB,EAChBC,eAAe,EACfC,sBAAsB,QAGjB,0BAA0B;AAEjC,6BAA6B;AAC7B,SACEC,kBAAkB,EAClBC,sBAAsB,EACtBC,mBAAmB,QAGd,4BAA4B;AAEnC,0BAA0B;AAC1B,SACEC,mBAAmB,EACnBC,kBAAkB,EAClBC,yBAAyB,EACzBC,sBAAsB,QAEjB,yBAAyB"}