agileflow 4.0.0-alpha.2 → 4.0.0-alpha.21

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 (372) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/content/plugins/accessibility/plugin.yaml +14 -0
  3. package/content/plugins/accessibility/skills/agileflow-accessibility/SKILL.md +392 -0
  4. package/content/plugins/accessibility/skills/agileflow-accessibility/references/aria-patterns.md +528 -0
  5. package/content/plugins/accessibility/skills/agileflow-accessibility/references/testing-checklist.md +457 -0
  6. package/content/plugins/accessibility/skills/agileflow-accessibility/references/wcag-guide.md +683 -0
  7. package/content/plugins/accessibility/skills/agileflow-accessibility/workflows/audit-page.md +310 -0
  8. package/content/plugins/accessibility/skills/agileflow-accessibility/workflows/implement-accessible-component.md +479 -0
  9. package/content/plugins/ads/agents/ads-audit-budget.md +185 -0
  10. package/content/plugins/ads/agents/ads-audit-compliance.md +171 -0
  11. package/content/plugins/ads/agents/ads-audit-creative.md +168 -0
  12. package/content/plugins/ads/agents/ads-audit-google.md +227 -0
  13. package/content/plugins/ads/agents/ads-audit-meta.md +184 -0
  14. package/content/plugins/ads/agents/ads-audit-tracking.md +205 -0
  15. package/content/plugins/ads/agents/ads-consensus.md +410 -0
  16. package/content/plugins/ads/agents/ads-generate.md +152 -0
  17. package/content/plugins/ads/agents/ads-performance-tracker.md +212 -0
  18. package/content/plugins/ads/plugin.yaml +23 -4
  19. package/content/plugins/ads/skills/agileflow-ads/SKILL.md +218 -0
  20. package/content/plugins/ads/skills/agileflow-ads/references/ad-copy-formula-guide.md +131 -0
  21. package/content/plugins/ads/skills/agileflow-ads/references/audience-targeting-guide.md +137 -0
  22. package/content/plugins/ads/skills/agileflow-ads/references/bid-strategy-guide.md +115 -0
  23. package/content/plugins/ads/skills/agileflow-ads/references/platform-benchmarks.md +100 -0
  24. package/content/plugins/ads/skills/agileflow-ads/workflows/audit.md +118 -0
  25. package/content/plugins/ads/skills/agileflow-ads/workflows/generate.md +84 -0
  26. package/content/plugins/audit/agents/a11y-analyzer-aria.md +173 -0
  27. package/content/plugins/audit/agents/a11y-analyzer-forms.md +173 -0
  28. package/content/plugins/audit/agents/a11y-analyzer-keyboard.md +183 -0
  29. package/content/plugins/audit/agents/a11y-analyzer-semantic.md +169 -0
  30. package/content/plugins/audit/agents/a11y-analyzer-visual.md +172 -0
  31. package/content/plugins/audit/agents/a11y-consensus.md +249 -0
  32. package/content/plugins/audit/agents/accessibility.md +558 -0
  33. package/content/plugins/audit/agents/api-quality-analyzer-conventions.md +156 -0
  34. package/content/plugins/audit/agents/api-quality-analyzer-docs.md +184 -0
  35. package/content/plugins/audit/agents/api-quality-analyzer-errors.md +191 -0
  36. package/content/plugins/audit/agents/api-quality-analyzer-pagination.md +179 -0
  37. package/content/plugins/audit/agents/api-quality-analyzer-versioning.md +150 -0
  38. package/content/plugins/audit/agents/api-quality-consensus.md +217 -0
  39. package/content/plugins/audit/agents/api-validator.md +191 -0
  40. package/content/plugins/audit/agents/arch-analyzer-circular.md +156 -0
  41. package/content/plugins/audit/agents/arch-analyzer-complexity.md +193 -0
  42. package/content/plugins/audit/agents/arch-analyzer-coupling.md +152 -0
  43. package/content/plugins/audit/agents/arch-analyzer-layering.md +160 -0
  44. package/content/plugins/audit/agents/arch-analyzer-patterns.md +210 -0
  45. package/content/plugins/audit/agents/arch-consensus.md +228 -0
  46. package/content/plugins/audit/agents/browser-qa.md +342 -0
  47. package/content/plugins/audit/agents/code-reviewer.md +298 -0
  48. package/content/plugins/audit/agents/completeness-analyzer-api.md +199 -0
  49. package/content/plugins/audit/agents/completeness-analyzer-conditional.md +211 -0
  50. package/content/plugins/audit/agents/completeness-analyzer-handlers.md +166 -0
  51. package/content/plugins/audit/agents/completeness-analyzer-imports.md +165 -0
  52. package/content/plugins/audit/agents/completeness-analyzer-routes.md +190 -0
  53. package/content/plugins/audit/agents/completeness-analyzer-state.md +196 -0
  54. package/content/plugins/audit/agents/completeness-analyzer-stubs.md +206 -0
  55. package/content/plugins/audit/agents/completeness-consensus.md +295 -0
  56. package/content/plugins/audit/agents/error-analyzer.md +213 -0
  57. package/content/plugins/audit/agents/flow-analyzer-authorization.md +182 -0
  58. package/content/plugins/audit/agents/flow-analyzer-discovery.md +174 -0
  59. package/content/plugins/audit/agents/flow-analyzer-errors.md +186 -0
  60. package/content/plugins/audit/agents/flow-analyzer-feedback.md +185 -0
  61. package/content/plugins/audit/agents/flow-analyzer-navigation.md +177 -0
  62. package/content/plugins/audit/agents/flow-analyzer-persistence.md +193 -0
  63. package/content/plugins/audit/agents/flow-analyzer-wiring.md +169 -0
  64. package/content/plugins/audit/agents/flow-consensus.md +237 -0
  65. package/content/plugins/audit/agents/legal-analyzer-a11y.md +114 -0
  66. package/content/plugins/audit/agents/legal-analyzer-ai.md +121 -0
  67. package/content/plugins/audit/agents/legal-analyzer-consumer.md +114 -0
  68. package/content/plugins/audit/agents/legal-analyzer-content.md +117 -0
  69. package/content/plugins/audit/agents/legal-analyzer-international.md +119 -0
  70. package/content/plugins/audit/agents/legal-analyzer-licensing.md +119 -0
  71. package/content/plugins/audit/agents/legal-analyzer-privacy.md +112 -0
  72. package/content/plugins/audit/agents/legal-analyzer-security.md +116 -0
  73. package/content/plugins/audit/agents/legal-analyzer-terms.md +115 -0
  74. package/content/plugins/audit/agents/legal-consensus.md +250 -0
  75. package/content/plugins/audit/agents/logic-analyzer-edge.md +179 -0
  76. package/content/plugins/audit/agents/logic-analyzer-flow.md +264 -0
  77. package/content/plugins/audit/agents/logic-analyzer-invariant.md +215 -0
  78. package/content/plugins/audit/agents/logic-analyzer-race.md +280 -0
  79. package/content/plugins/audit/agents/logic-analyzer-type.md +227 -0
  80. package/content/plugins/audit/agents/logic-consensus.md +259 -0
  81. package/content/plugins/audit/agents/perf-analyzer-assets.md +182 -0
  82. package/content/plugins/audit/agents/perf-analyzer-bundle.md +173 -0
  83. package/content/plugins/audit/agents/perf-analyzer-caching.md +170 -0
  84. package/content/plugins/audit/agents/perf-analyzer-compute.md +173 -0
  85. package/content/plugins/audit/agents/perf-analyzer-memory.md +193 -0
  86. package/content/plugins/audit/agents/perf-analyzer-network.md +165 -0
  87. package/content/plugins/audit/agents/perf-analyzer-queries.md +162 -0
  88. package/content/plugins/audit/agents/perf-analyzer-rendering.md +168 -0
  89. package/content/plugins/audit/agents/perf-consensus.md +287 -0
  90. package/content/plugins/audit/agents/qa.md +820 -0
  91. package/content/plugins/audit/agents/quality-analyzer-comments.md +159 -0
  92. package/content/plugins/audit/agents/quality-analyzer-duplication.md +184 -0
  93. package/content/plugins/audit/agents/quality-analyzer-naming.md +160 -0
  94. package/content/plugins/audit/agents/quality-consensus.md +241 -0
  95. package/content/plugins/audit/agents/schema-validator.md +473 -0
  96. package/content/plugins/audit/agents/security-analyzer-api.md +210 -0
  97. package/content/plugins/audit/agents/security-analyzer-auth.md +169 -0
  98. package/content/plugins/audit/agents/security-analyzer-authz.md +180 -0
  99. package/content/plugins/audit/agents/security-analyzer-deps.md +153 -0
  100. package/content/plugins/audit/agents/security-analyzer-infra.md +184 -0
  101. package/content/plugins/audit/agents/security-analyzer-injection.md +155 -0
  102. package/content/plugins/audit/agents/security-analyzer-input.md +201 -0
  103. package/content/plugins/audit/agents/security-analyzer-secrets.md +183 -0
  104. package/content/plugins/audit/agents/security-consensus.md +283 -0
  105. package/content/plugins/audit/agents/test-analyzer-assertions.md +188 -0
  106. package/content/plugins/audit/agents/test-analyzer-coverage.md +189 -0
  107. package/content/plugins/audit/agents/test-analyzer-fragility.md +193 -0
  108. package/content/plugins/audit/agents/test-analyzer-integration.md +161 -0
  109. package/content/plugins/audit/agents/test-analyzer-maintenance.md +180 -0
  110. package/content/plugins/audit/agents/test-analyzer-mocking.md +188 -0
  111. package/content/plugins/audit/agents/test-analyzer-patterns.md +196 -0
  112. package/content/plugins/audit/agents/test-analyzer-structure.md +184 -0
  113. package/content/plugins/audit/agents/test-consensus.md +301 -0
  114. package/content/plugins/audit/agents/testing.md +561 -0
  115. package/content/plugins/audit/agents/ui-validator.md +344 -0
  116. package/content/plugins/audit/plugin.yaml +186 -5
  117. package/content/plugins/audit/skills/agileflow-audit/SKILL.md +113 -0
  118. package/content/plugins/audit/skills/agileflow-audit/references/audit-depth-guide.md +151 -0
  119. package/content/plugins/audit/skills/agileflow-audit/references/dependency-risk-guide.md +139 -0
  120. package/content/plugins/audit/skills/agileflow-audit/references/owasp-top10.md +120 -0
  121. package/content/plugins/audit/skills/agileflow-audit/references/performance-budget-guide.md +143 -0
  122. package/content/plugins/audit/skills/agileflow-audit/references/wcag-criteria.md +117 -0
  123. package/content/plugins/audit/skills/agileflow-audit/workflows/run-audit.md +52 -0
  124. package/content/plugins/audit/skills/agileflow-audit/workflows/tdd.md +66 -0
  125. package/content/plugins/core/agents/adr-writer.md +521 -0
  126. package/content/plugins/core/agents/epic-planner.md +520 -0
  127. package/content/plugins/core/agents/mentor.md +709 -0
  128. package/content/plugins/core/agents/orchestrator.md +776 -0
  129. package/content/plugins/core/agents/team-coordinator.md +334 -0
  130. package/content/plugins/core/agents/team-lead.md +181 -0
  131. package/content/plugins/core/agents/workspace-orchestrator.md +146 -0
  132. package/content/plugins/core/hooks/context-loader.js +31 -4
  133. package/content/plugins/core/hooks/damage-control-bash.js +10 -2
  134. package/content/plugins/core/hooks/damage-control-edit.js +4 -1
  135. package/content/plugins/core/hooks/damage-control-patterns.yaml +1 -1
  136. package/content/plugins/core/hooks/damage-control-write.js +4 -1
  137. package/content/plugins/core/hooks/{pre-compact-state.js → post-compact-state.js} +25 -8
  138. package/content/plugins/core/hooks/preferences-injector.js +352 -0
  139. package/content/plugins/core/plugin.yaml +24 -28
  140. package/content/plugins/core/skills/agileflow-adr/SKILL.md +34 -8
  141. package/content/plugins/core/skills/agileflow-adr/references/madr-format-guide.md +86 -0
  142. package/content/plugins/core/skills/agileflow-adr/workflows/write-adr.md +57 -0
  143. package/content/plugins/core/skills/agileflow-babysit-mentor/SKILL.md +94 -27
  144. package/content/plugins/core/skills/agileflow-babysit-mentor/references/mentor-decision-guide.md +81 -0
  145. package/content/plugins/core/skills/agileflow-babysit-mentor/workflows/mentor-session.md +79 -0
  146. package/content/plugins/core/skills/agileflow-epic-planner/SKILL.md +37 -7
  147. package/content/plugins/core/skills/agileflow-epic-planner/references/epic-sizing-guide.md +81 -0
  148. package/content/plugins/core/skills/agileflow-epic-planner/workflows/plan-epic.md +55 -0
  149. package/content/plugins/core/skills/agileflow-status-updater/SKILL.md +36 -20
  150. package/content/plugins/core/skills/agileflow-status-updater/references/status-transitions.md +89 -0
  151. package/content/plugins/core/skills/agileflow-status-updater/workflows/update-status.md +56 -0
  152. package/content/plugins/core/skills/agileflow-story-writer/SKILL.md +39 -114
  153. package/content/plugins/core/skills/agileflow-story-writer/references/estimation-reference.md +36 -0
  154. package/content/plugins/core/skills/agileflow-story-writer/references/story-template.md +92 -0
  155. package/content/plugins/core/skills/agileflow-story-writer/workflows/write-story.md +138 -0
  156. package/content/plugins/council/agents/council-advocate.md +223 -0
  157. package/content/plugins/council/agents/council-analyst.md +278 -0
  158. package/content/plugins/council/agents/council-compounder.md +204 -0
  159. package/content/plugins/council/agents/council-contrarian.md +217 -0
  160. package/content/plugins/council/agents/council-moonshot.md +217 -0
  161. package/content/plugins/council/agents/council-optimist.md +185 -0
  162. package/content/plugins/council/agents/council-revenue.md +200 -0
  163. package/content/plugins/council/agents/council-technical.md +218 -0
  164. package/content/plugins/council/agents/multi-expert.md +334 -0
  165. package/content/plugins/council/plugin.yaml +23 -4
  166. package/content/plugins/council/skills/agileflow-council/SKILL.md +102 -0
  167. package/content/plugins/council/skills/agileflow-council/references/decision-log-template.md +109 -0
  168. package/content/plugins/council/skills/agileflow-council/references/perspective-guide.md +104 -0
  169. package/content/plugins/council/skills/agileflow-council/references/when-to-convene-guide.md +112 -0
  170. package/content/plugins/council/skills/agileflow-council/workflows/convene.md +73 -0
  171. package/content/plugins/council/skills/agileflow-council/workflows/multi-expert.md +75 -0
  172. package/content/plugins/database/plugin.yaml +14 -0
  173. package/content/plugins/database/skills/agileflow-database/SKILL.md +284 -0
  174. package/content/plugins/database/skills/agileflow-database/references/indexing-guide.md +313 -0
  175. package/content/plugins/database/skills/agileflow-database/references/migration-guide.md +328 -0
  176. package/content/plugins/database/skills/agileflow-database/references/schema-design-guide.md +467 -0
  177. package/content/plugins/database/skills/agileflow-database/workflows/design-schema.md +213 -0
  178. package/content/plugins/database/skills/agileflow-database/workflows/optimize-query.md +253 -0
  179. package/content/plugins/debugging/plugin.yaml +14 -0
  180. package/content/plugins/debugging/skills/agileflow-debug/SKILL.md +236 -0
  181. package/content/plugins/debugging/skills/agileflow-debug/references/common-patterns.md +350 -0
  182. package/content/plugins/debugging/skills/agileflow-debug/references/debugging-strategies.md +328 -0
  183. package/content/plugins/debugging/skills/agileflow-debug/workflows/debug-issue.md +187 -0
  184. package/content/plugins/debugging/skills/agileflow-debug/workflows/reproduce-bug.md +194 -0
  185. package/content/plugins/delivery/agents/ci.md +547 -0
  186. package/content/plugins/delivery/agents/devops.md +789 -0
  187. package/content/plugins/delivery/plugin.yaml +19 -0
  188. package/content/plugins/delivery/skills/agileflow-delivery/SKILL.md +111 -0
  189. package/content/plugins/delivery/skills/agileflow-delivery/references/changelog-format-guide.md +133 -0
  190. package/content/plugins/delivery/skills/agileflow-delivery/references/ci-pipeline-guide.md +158 -0
  191. package/content/plugins/delivery/skills/agileflow-delivery/references/pr-checklist-guide.md +133 -0
  192. package/content/plugins/delivery/skills/agileflow-delivery/references/release-checklist.md +142 -0
  193. package/content/plugins/delivery/skills/agileflow-delivery/workflows/changelog.md +72 -0
  194. package/content/plugins/delivery/skills/agileflow-delivery/workflows/deploy.md +74 -0
  195. package/content/plugins/delivery/skills/agileflow-delivery/workflows/pr.md +75 -0
  196. package/content/plugins/docs/agents/documentation.md +544 -0
  197. package/content/plugins/docs/agents/readme-updater.md +640 -0
  198. package/content/plugins/docs/plugin.yaml +19 -0
  199. package/content/plugins/docs/skills/agileflow-docs/SKILL.md +106 -0
  200. package/content/plugins/docs/skills/agileflow-docs/references/api-doc-template.md +167 -0
  201. package/content/plugins/docs/skills/agileflow-docs/references/doc-types-guide.md +141 -0
  202. package/content/plugins/docs/skills/agileflow-docs/references/readme-template.md +156 -0
  203. package/content/plugins/docs/skills/agileflow-docs/workflows/readme-sync.md +57 -0
  204. package/content/plugins/docs/skills/agileflow-docs/workflows/sync.md +64 -0
  205. package/content/plugins/engineering/agents/api.md +718 -0
  206. package/content/plugins/engineering/agents/codebase-query.md +285 -0
  207. package/content/plugins/engineering/agents/compliance.md +559 -0
  208. package/content/plugins/engineering/agents/database.md +644 -0
  209. package/content/plugins/engineering/agents/integrations.md +644 -0
  210. package/content/plugins/engineering/agents/mobile.md +552 -0
  211. package/content/plugins/engineering/agents/monitoring.md +585 -0
  212. package/content/plugins/engineering/agents/performance.md +529 -0
  213. package/content/plugins/engineering/agents/refactor.md +592 -0
  214. package/content/plugins/engineering/agents/security.md +524 -0
  215. package/content/plugins/engineering/agents/ui.md +1336 -0
  216. package/content/plugins/engineering/plugin.yaml +37 -0
  217. package/content/plugins/engineering/skills/agileflow-engineering/SKILL.md +127 -0
  218. package/content/plugins/engineering/skills/agileflow-engineering/references/code-review-guide.md +126 -0
  219. package/content/plugins/engineering/skills/agileflow-engineering/references/domain-routing-guide.md +89 -0
  220. package/content/plugins/engineering/skills/agileflow-engineering/references/refactoring-guide.md +136 -0
  221. package/content/plugins/engineering/skills/agileflow-engineering/workflows/diagnose.md +63 -0
  222. package/content/plugins/engineering/skills/agileflow-engineering/workflows/impact.md +60 -0
  223. package/content/plugins/ideation/agents/brainstorm-analyzer-features.md +179 -0
  224. package/content/plugins/ideation/agents/brainstorm-analyzer-growth.md +169 -0
  225. package/content/plugins/ideation/agents/brainstorm-analyzer-integration.md +181 -0
  226. package/content/plugins/ideation/agents/brainstorm-analyzer-market.md +150 -0
  227. package/content/plugins/ideation/agents/brainstorm-analyzer-ux.md +180 -0
  228. package/content/plugins/ideation/agents/brainstorm-consensus.md +245 -0
  229. package/content/plugins/ideation/agents/design.md +568 -0
  230. package/content/plugins/ideation/agents/product.md +582 -0
  231. package/content/plugins/ideation/plugin.yaml +31 -0
  232. package/content/plugins/ideation/skills/agileflow-ideation/SKILL.md +109 -0
  233. package/content/plugins/ideation/skills/agileflow-ideation/references/brainstorm-techniques.md +138 -0
  234. package/content/plugins/ideation/skills/agileflow-ideation/references/competitive-analysis-template.md +148 -0
  235. package/content/plugins/ideation/skills/agileflow-ideation/references/feature-prioritization-guide.md +147 -0
  236. package/content/plugins/ideation/skills/agileflow-ideation/references/user-story-patterns.md +152 -0
  237. package/content/plugins/ideation/skills/agileflow-ideation/workflows/features.md +65 -0
  238. package/content/plugins/ideation/skills/agileflow-ideation/workflows/ideate.md +54 -0
  239. package/content/plugins/migration/agents/datamigration.md +757 -0
  240. package/content/plugins/migration/plugin.yaml +17 -0
  241. package/content/plugins/migration/skills/agileflow-migration/SKILL.md +106 -0
  242. package/content/plugins/migration/skills/agileflow-migration/references/data-validation-checklist.md +154 -0
  243. package/content/plugins/migration/skills/agileflow-migration/references/migration-patterns.md +209 -0
  244. package/content/plugins/migration/skills/agileflow-migration/references/rollback-playbook.md +171 -0
  245. package/content/plugins/migration/skills/agileflow-migration/references/version-compatibility-matrix.md +155 -0
  246. package/content/plugins/migration/skills/agileflow-migration/workflows/plan.md +73 -0
  247. package/content/plugins/migration/skills/agileflow-migration/workflows/validate.md +71 -0
  248. package/content/plugins/performance/plugin.yaml +14 -0
  249. package/content/plugins/performance/skills/agileflow-performance/SKILL.md +224 -0
  250. package/content/plugins/performance/skills/agileflow-performance/references/optimization-patterns.md +554 -0
  251. package/content/plugins/performance/skills/agileflow-performance/references/profiling-guide.md +383 -0
  252. package/content/plugins/performance/skills/agileflow-performance/references/web-vitals-guide.md +360 -0
  253. package/content/plugins/performance/skills/agileflow-performance/workflows/improve-web-vitals.md +344 -0
  254. package/content/plugins/performance/skills/agileflow-performance/workflows/profile-and-fix.md +254 -0
  255. package/content/plugins/planning/agents/analytics.md +670 -0
  256. package/content/plugins/planning/agents/rlm-subcore.md +215 -0
  257. package/content/plugins/planning/plugin.yaml +19 -0
  258. package/content/plugins/planning/skills/agileflow-planning/SKILL.md +111 -0
  259. package/content/plugins/planning/skills/agileflow-planning/references/estimation-guide.md +114 -0
  260. package/content/plugins/planning/skills/agileflow-planning/references/rpi-workflow.md +119 -0
  261. package/content/plugins/planning/skills/agileflow-planning/references/sprint-planning-guide.md +145 -0
  262. package/content/plugins/planning/skills/agileflow-planning/workflows/impact.md +63 -0
  263. package/content/plugins/planning/skills/agileflow-planning/workflows/rpi.md +104 -0
  264. package/content/plugins/psychology/plugin.yaml +14 -0
  265. package/content/plugins/psychology/skills/agileflow-retention/SKILL.md +252 -0
  266. package/content/plugins/psychology/skills/agileflow-retention/references/competitor-analysis.md +240 -0
  267. package/content/plugins/psychology/skills/agileflow-retention/references/psychology-models.md +349 -0
  268. package/content/plugins/psychology/skills/agileflow-retention/references/retention-patterns.md +279 -0
  269. package/content/plugins/psychology/skills/agileflow-retention/workflows/design-retention-feature.md +287 -0
  270. package/content/plugins/psychology/skills/agileflow-retention/workflows/retention-audit.md +259 -0
  271. package/content/plugins/refactoring/plugin.yaml +14 -0
  272. package/content/plugins/refactoring/skills/agileflow-refactor/SKILL.md +235 -0
  273. package/content/plugins/refactoring/skills/agileflow-refactor/references/refactoring-patterns.md +405 -0
  274. package/content/plugins/refactoring/skills/agileflow-refactor/references/safety-checks.md +177 -0
  275. package/content/plugins/refactoring/skills/agileflow-refactor/workflows/extract-module.md +226 -0
  276. package/content/plugins/refactoring/skills/agileflow-refactor/workflows/safe-refactor.md +169 -0
  277. package/content/plugins/research/agents/research.md +503 -0
  278. package/content/plugins/research/plugin.yaml +17 -0
  279. package/content/plugins/research/skills/agileflow-research/SKILL.md +110 -0
  280. package/content/plugins/research/skills/agileflow-research/references/knowledge-decay-guide.md +121 -0
  281. package/content/plugins/research/skills/agileflow-research/references/research-prompt-guide.md +141 -0
  282. package/content/plugins/research/skills/agileflow-research/references/synthesis-template.md +154 -0
  283. package/content/plugins/research/skills/agileflow-research/workflows/analyze.md +60 -0
  284. package/content/plugins/research/skills/agileflow-research/workflows/ask.md +64 -0
  285. package/content/plugins/research/skills/agileflow-research/workflows/import.md +66 -0
  286. package/content/plugins/research/skills/agileflow-research/workflows/synthesize.md +66 -0
  287. package/content/plugins/reviews/plugin.yaml +14 -0
  288. package/content/plugins/reviews/skills/agileflow-pr-reviewer/SKILL.md +241 -0
  289. package/content/plugins/reviews/skills/agileflow-pr-reviewer/references/review-checklist.md +200 -0
  290. package/content/plugins/reviews/skills/agileflow-pr-reviewer/references/security-patterns.md +328 -0
  291. package/content/plugins/reviews/skills/agileflow-pr-reviewer/workflows/review-pr.md +153 -0
  292. package/content/plugins/reviews/skills/agileflow-pr-reviewer/workflows/security-review.md +177 -0
  293. package/content/plugins/seo/agents/seo-analyzer-content.md +169 -0
  294. package/content/plugins/seo/agents/seo-analyzer-images.md +198 -0
  295. package/content/plugins/seo/agents/seo-analyzer-performance.md +217 -0
  296. package/content/plugins/seo/agents/seo-analyzer-schema.md +184 -0
  297. package/content/plugins/seo/agents/seo-analyzer-sitemap.md +177 -0
  298. package/content/plugins/seo/agents/seo-analyzer-technical.md +151 -0
  299. package/content/plugins/seo/agents/seo-consensus.md +304 -0
  300. package/content/plugins/seo/plugin.yaml +19 -4
  301. package/content/plugins/seo/skills/agileflow-seo/SKILL.md +188 -0
  302. package/content/plugins/seo/skills/agileflow-seo/references/cwv-thresholds.md +110 -0
  303. package/content/plugins/seo/skills/agileflow-seo/references/eeat-framework.md +144 -0
  304. package/content/plugins/seo/skills/agileflow-seo/references/keyword-research-guide.md +125 -0
  305. package/content/plugins/seo/skills/agileflow-seo/references/schema-types.md +139 -0
  306. package/content/plugins/seo/skills/agileflow-seo/references/technical-seo-checklist.md +139 -0
  307. package/content/plugins/seo/skills/agileflow-seo/workflows/audit.md +98 -0
  308. package/content/plugins/seo/skills/agileflow-seo/workflows/page.md +118 -0
  309. package/content/plugins/testing/plugin.yaml +16 -0
  310. package/content/plugins/testing/skills/agileflow-test-writer/SKILL.md +260 -0
  311. package/content/plugins/testing/skills/agileflow-test-writer/references/coverage-targets.md +239 -0
  312. package/content/plugins/testing/skills/agileflow-test-writer/references/test-patterns.md +420 -0
  313. package/content/plugins/testing/skills/agileflow-test-writer/workflows/add-coverage.md +154 -0
  314. package/content/plugins/testing/skills/agileflow-test-writer/workflows/write-tests-from-ac.md +225 -0
  315. package/package.json +2 -2
  316. package/src/cli/commands/doctor.js +818 -30
  317. package/src/cli/commands/hook.js +17 -14
  318. package/src/cli/commands/launch.js +1454 -0
  319. package/src/cli/commands/learn.js +149 -0
  320. package/src/cli/commands/plugins.js +113 -0
  321. package/src/cli/commands/setup.js +455 -110
  322. package/src/cli/commands/skills.js +324 -0
  323. package/src/cli/commands/status.js +8 -10
  324. package/src/cli/commands/update.js +76 -15
  325. package/src/cli/index.js +90 -26
  326. package/src/cli/wizard/babysit-mode-picker.js +192 -0
  327. package/src/cli/wizard/behaviors-picker.js +208 -54
  328. package/src/cli/wizard/ide-picker.js +40 -28
  329. package/src/cli/wizard/install-scope-picker.js +57 -0
  330. package/src/cli/wizard/launch-alias-picker.js +50 -0
  331. package/src/cli/wizard/launch-cli-picker.js +129 -0
  332. package/src/cli/wizard/launch-tmux-picker.js +133 -0
  333. package/src/cli/wizard/learnings-picker.js +40 -0
  334. package/src/cli/wizard/plugin-picker.js +47 -16
  335. package/src/lib/brand.js +116 -0
  336. package/src/lib/errors.js +120 -0
  337. package/src/lib/path-check.js +39 -0
  338. package/src/runtime/config/defaults.js +22 -17
  339. package/src/runtime/config/loader.js +77 -8
  340. package/src/runtime/config/schema.json +43 -16
  341. package/src/runtime/config/writer.js +3 -1
  342. package/src/runtime/ide/babysit-skill.js +202 -0
  343. package/src/runtime/ide/capabilities.js +84 -29
  344. package/src/runtime/ide/claude-code-content.js +177 -0
  345. package/src/runtime/ide/claude-code-settings.js +67 -29
  346. package/src/runtime/ide/claude-code-skills.js +47 -32
  347. package/src/runtime/ide/codex-config.js +295 -0
  348. package/src/runtime/installer/install.js +252 -24
  349. package/src/runtime/launch/alias-installer.js +191 -0
  350. package/src/runtime/launch/cli-resume.js +244 -0
  351. package/src/runtime/launch/closed-windows.js +338 -0
  352. package/src/runtime/launch/defaults.js +66 -0
  353. package/src/runtime/launch/detect-clis.js +69 -0
  354. package/src/runtime/launch/doctor.js +464 -0
  355. package/src/runtime/launch/exec-wrapper.js +114 -0
  356. package/src/runtime/launch/parallel-session.js +247 -0
  357. package/src/runtime/launch/prefs.js +211 -0
  358. package/src/runtime/launch/project-prefs.js +234 -0
  359. package/src/runtime/launch/resolve-cli.js +56 -0
  360. package/src/runtime/launch/restore.js +152 -0
  361. package/src/runtime/launch/schema.json +75 -0
  362. package/src/runtime/launch/session-lifecycle.js +313 -0
  363. package/src/runtime/launch/session-registry.js +401 -0
  364. package/src/runtime/launch/spawn.js +103 -0
  365. package/src/runtime/launch/tabs.js +350 -0
  366. package/src/runtime/launch/tmux.js +764 -0
  367. package/src/runtime/launch/worktree.js +260 -0
  368. package/src/runtime/plugins/registry.js +16 -11
  369. package/src/runtime/plugins/validator.js +57 -43
  370. package/src/runtime/skills/learnings.js +308 -0
  371. package/content/plugins/core/hooks/babysit-mentor-injector.js +0 -55
  372. package/src/cli/wizard/personalization.js +0 -64
@@ -0,0 +1,192 @@
1
+ /**
2
+ * Babysit mode picker with plain labels and short hints.
3
+ */
4
+ const prompts = require("@clack/prompts");
5
+ const chalk = require("chalk");
6
+ const { optionLabel, questionMessage } = require("../../lib/brand.js");
7
+
8
+ const MODES = [
9
+ {
10
+ value: "full",
11
+ label: optionLabel(
12
+ "Full guidance",
13
+ "Uses the most interactive flow available for the selected IDEs.",
14
+ ),
15
+ hint: chalk.dim(
16
+ "Uses the most interactive flow available for the selected IDEs.",
17
+ ),
18
+ },
19
+ {
20
+ value: "light",
21
+ label: optionLabel(
22
+ "Guided mode",
23
+ "Keeps prompts short and only interrupts when needed.",
24
+ ),
25
+ hint: "Keeps the mentor flow on, but asks less often.",
26
+ },
27
+ {
28
+ value: "minimal",
29
+ label: optionLabel("Minimal mode", "Stays terse and avoids extra prompts."),
30
+ hint: "Stays terse and avoids extra prompts.",
31
+ },
32
+ {
33
+ value: "custom",
34
+ label: optionLabel(
35
+ "Customize",
36
+ "Choose exactly which mentor behaviors are enabled.",
37
+ ),
38
+ hint: "Pick the behaviors you want.",
39
+ },
40
+ ];
41
+
42
+ const CUSTOM_FEATURES = [
43
+ {
44
+ value: "askQuestions",
45
+ label: "Ask questions",
46
+ hint: "Ask at decision points with specific options.",
47
+ },
48
+ {
49
+ value: "planMode",
50
+ label: "Plan mode",
51
+ hint: "Plan before non-trivial implementation.",
52
+ },
53
+ {
54
+ value: "delegation",
55
+ label: "Delegation",
56
+ hint: "Use subagents when work splits cleanly.",
57
+ },
58
+ {
59
+ value: "taskTracking",
60
+ label: "Task tracking",
61
+ hint: "Use visible task lists for multi-step work.",
62
+ },
63
+ {
64
+ value: "progressUpdates",
65
+ label: "Progress updates",
66
+ hint: "Send short status updates while working.",
67
+ },
68
+ {
69
+ value: "auditAll",
70
+ label: "Audit everything",
71
+ hint: "Run all enabled audits after every implementation, not just when relevant.",
72
+ },
73
+ {
74
+ value: "logicAudit",
75
+ label: "Logic audit",
76
+ hint: "Suggest after implementation.",
77
+ },
78
+ {
79
+ value: "flowAudit",
80
+ label: "Flow audit",
81
+ hint: "Suggest after implementation when user-facing flows changed.",
82
+ },
83
+ {
84
+ value: "securityAudit",
85
+ label: "Security audit",
86
+ hint: "Suggest after implementation when auth, APIs, or sensitive data involved.",
87
+ },
88
+ {
89
+ value: "performanceAudit",
90
+ label: "Performance audit",
91
+ hint: "Suggest after implementation when queries, rendering, or data size involved.",
92
+ },
93
+ {
94
+ value: "accessibilityAudit",
95
+ label: "Accessibility audit",
96
+ hint: "Suggest after implementation when UI components changed.",
97
+ },
98
+ {
99
+ value: "legalAudit",
100
+ label: "Legal audit",
101
+ hint: "Suggest after implementation when data handling, privacy, or compliance involved.",
102
+ },
103
+ {
104
+ value: "strictMode",
105
+ label: "Strict gates",
106
+ hint: "Require tests and review to pass before commit.",
107
+ },
108
+ {
109
+ value: "tddMode",
110
+ label: "TDD mode",
111
+ hint: "Enforce RED → GREEN → REFACTOR phases.",
112
+ },
113
+ ];
114
+
115
+ const DEFAULT_CUSTOM_FEATURES = {
116
+ askQuestions: true,
117
+ planMode: true,
118
+ delegation: true,
119
+ taskTracking: true,
120
+ progressUpdates: true,
121
+ auditAll: false,
122
+ logicAudit: true,
123
+ flowAudit: true,
124
+ securityAudit: true,
125
+ performanceAudit: false,
126
+ accessibilityAudit: false,
127
+ legalAudit: false,
128
+ strictMode: false,
129
+ tddMode: false,
130
+ };
131
+
132
+ /**
133
+ * @param {string | { mode?: string, features?: Record<string, boolean> } | undefined} current
134
+ * @returns {Promise<{ mode: 'full' | 'light' | 'minimal' | 'custom', features?: Record<string, boolean> }>}
135
+ */
136
+ async function pickBabysitMode(current = "light") {
137
+ const currentMode =
138
+ typeof current === "string" ? current : current && current.mode;
139
+ const option = await prompts.select({
140
+ message: questionMessage("How should AgileFlow guide babysit work?"),
141
+ options: MODES,
142
+ initialValue: MODES.some((m) => m.value === currentMode)
143
+ ? currentMode
144
+ : "light",
145
+ });
146
+
147
+ if (prompts.isCancel(option)) {
148
+ prompts.cancel("Setup cancelled. No changes made.");
149
+ process.exit(1);
150
+ }
151
+
152
+ if (option !== "custom") {
153
+ return { mode: /** @type {'full' | 'light' | 'minimal'} */ (option) };
154
+ }
155
+
156
+ const currentFeatures =
157
+ current && typeof current === "object" && current.features
158
+ ? current.features
159
+ : {};
160
+ const initialFeatures = { ...DEFAULT_CUSTOM_FEATURES, ...currentFeatures };
161
+ const picked = await prompts.multiselect({
162
+ message: questionMessage("Customize guidance behaviors"),
163
+ options: CUSTOM_FEATURES,
164
+ initialValues: CUSTOM_FEATURES.filter((f) => initialFeatures[f.value]).map(
165
+ (f) => f.value,
166
+ ),
167
+ required: false,
168
+ });
169
+
170
+ if (prompts.isCancel(picked)) {
171
+ prompts.cancel("Setup cancelled. No changes made.");
172
+ process.exit(1);
173
+ }
174
+
175
+ const selected = new Set(/** @type {string[]} */ (picked));
176
+ return {
177
+ mode: "custom",
178
+ features: Object.fromEntries(
179
+ CUSTOM_FEATURES.map((feature) => [
180
+ feature.value,
181
+ selected.has(feature.value),
182
+ ]),
183
+ ),
184
+ };
185
+ }
186
+
187
+ module.exports = {
188
+ MODES,
189
+ CUSTOM_FEATURES,
190
+ DEFAULT_CUSTOM_FEATURES,
191
+ pickBabysitMode,
192
+ };
@@ -1,14 +1,19 @@
1
1
  /**
2
- * Behaviors picker — curated multiselect for the 4 hook-driven presets.
2
+ * Behaviors picker — one prompt per behavior so each gets its own
3
+ * decision point, plus a sub-multiselect for damage-control tools so
4
+ * users can keep Bash blocking while loosening Edit/Write (or vice
5
+ * versa).
3
6
  *
4
- * Behaviors map 1:N to hooks declared in plugin manifests via the
5
- * `behavior: <key>` field. Disabling a behavior here excludes its hooks
6
- * from the generated `.agileflow/hook-manifest.yaml` at install time.
7
+ * Each behavior maps 1:N to hooks declared in plugin manifests via
8
+ * `behavior: <key>`. Disabling a behavior excludes its hooks from the
9
+ * generated `.agileflow/hook-manifest.yaml` at install time.
7
10
  *
8
11
  * Pure logic lives in `buildBehaviorsMap()` so it can be unit-tested
9
12
  * without spawning a TTY.
10
13
  */
11
14
  const prompts = require("@clack/prompts");
15
+ const chalk = require("chalk");
16
+ const { questionMessage } = require("../../lib/brand.js");
12
17
 
13
18
  /**
14
19
  * @typedef {import('../../runtime/config/defaults.js').Behaviors} Behaviors
@@ -18,91 +23,240 @@ const prompts = require("@clack/prompts");
18
23
  const BEHAVIOR_OPTIONS = [
19
24
  {
20
25
  key: "loadContext",
21
- label: "Load project context at session start",
22
- hint: "SessionStart hook prints stories, dirty files, and recent commits so Claude has project context immediately.",
26
+ label: "Load project context",
27
+ hint: "Show stories, dirty files, and recent commits at session start.",
23
28
  },
24
29
  {
25
30
  key: "babysitDefault",
26
- label: "Activate Babysit mentor by default",
27
- hint: "SessionStart hook injects the mentor pattern so Claude defaults to mentor mode without /agileflow:babysit.",
31
+ label: "Enable guidance on start",
32
+ hint: "Inject your configured guidance preferences at the start of every session.",
28
33
  },
29
34
  {
30
- key: "damageControl",
31
- label: "Damage control on Bash, Edit, Write",
32
- hint: "PreToolUse hooks block dangerous commands (rm -rf /, fork bombs) and risky writes (.env, .ssh/) — fail-closed.",
35
+ key: "preCompactState",
36
+ label: "Preserve context on start",
37
+ hint: "Re-inject story, command, and git state after compaction so nothing is lost.",
33
38
  },
39
+ ];
40
+
41
+ const DAMAGE_CONTROL_TOOLS = [
34
42
  {
35
- key: "preCompactState",
36
- label: "Save context before compaction",
37
- hint: "PreCompact hook dumps active stories, current command, and dirty git state so they survive compaction.",
43
+ key: "damageControlBash",
44
+ label: "Bash",
45
+ hint: "Block risky shell commands.",
46
+ },
47
+ {
48
+ key: "damageControlEdit",
49
+ label: "Edit",
50
+ hint: "Block edits to sensitive paths.",
51
+ },
52
+ {
53
+ key: "damageControlWrite",
54
+ label: "Write",
55
+ hint: "Block writes to sensitive paths.",
38
56
  },
39
57
  ];
40
58
 
41
59
  /**
42
- * Build a complete Behaviors map from a set of selected keys, falling
43
- * back to current values for any key not represented in the selection
44
- * input. Missing keys default to `false` (the user actively saw the
45
- * option and chose not to enable it).
60
+ * Build a complete Behaviors map from a partial set of toggles. Missing
61
+ * keys fall back to `false` (the user actively saw the option and chose
62
+ * not to enable it).
46
63
  *
47
- * @param {Iterable<string>} selectedKeys
64
+ * @param {Partial<Behaviors>} input
48
65
  * @returns {Behaviors}
49
66
  */
50
- function buildBehaviorsMap(selectedKeys) {
51
- const set = new Set(selectedKeys);
52
- /** @type {Behaviors} */
53
- const result = {
54
- loadContext: set.has("loadContext"),
55
- babysitDefault: set.has("babysitDefault"),
56
- damageControl: set.has("damageControl"),
57
- preCompactState: set.has("preCompactState"),
67
+ function buildBehaviorsMap(input) {
68
+ return {
69
+ loadContext: Boolean(input.loadContext),
70
+ babysitDefault: Boolean(input.babysitDefault),
71
+ damageControlBash: Boolean(input.damageControlBash),
72
+ damageControlEdit: Boolean(input.damageControlEdit),
73
+ damageControlWrite: Boolean(input.damageControlWrite),
74
+ preCompactState: Boolean(input.preCompactState),
58
75
  };
59
- return result;
60
76
  }
61
77
 
62
78
  /**
63
- * Pre-check options whose keys are currently enabled (or when no
64
- * existing config fall back to the preset's enabledByDefault). The
65
- * default-on shape lives in `defaults.js`; this just reads it.
79
+ * Initial value lookup: respect existing config, else fall back to
80
+ * "default-on"every behavior is enabled out of the box.
66
81
  *
67
- * @param {Partial<Behaviors>} [current]
68
- * @returns {string[]}
82
+ * @param {Partial<Behaviors>|undefined} current
83
+ * @param {string} key
84
+ * @returns {boolean}
69
85
  */
70
- function initialSelectedKeys(current) {
71
- if (!current) return BEHAVIOR_OPTIONS.map((o) => o.key);
72
- return BEHAVIOR_OPTIONS.filter((o) => current[o.key] !== false).map(
73
- (o) => o.key,
74
- );
86
+ function initialFor(current, key) {
87
+ if (!current) return true;
88
+ return current[key] !== false;
89
+ }
90
+
91
+ /**
92
+ * @param {Set<string>|string[]|undefined} supportedHookEvents
93
+ * @param {string} event
94
+ * @returns {boolean}
95
+ */
96
+ function supportsEvent(supportedHookEvents, event) {
97
+ if (!supportedHookEvents) return true;
98
+ if (Array.isArray(supportedHookEvents))
99
+ return supportedHookEvents.includes(event);
100
+ return supportedHookEvents.has(event);
75
101
  }
76
102
 
77
103
  /**
78
- * Interactive picker. Returns a complete Behaviors object.
104
+ * Normalize a behaviors object against the supported hook events for the
105
+ * active IDE targets.
79
106
  *
80
- * @param {Partial<Behaviors>} [currentBehaviors]
81
- * @returns {Promise<Behaviors>}
107
+ * Unsupported behaviors are forced to false so the resulting config does
108
+ * not advertise hooks the selected IDEs cannot run.
109
+ *
110
+ * @param {Partial<Behaviors>} input
111
+ * @param {Set<string>|string[]|undefined} supportedHookEvents
112
+ * @returns {Behaviors}
82
113
  */
83
- async function pickBehaviors(currentBehaviors) {
84
- const picked = await prompts.multiselect({
85
- message: "Which behaviors should AgileFlow run? (Recommended: all)",
86
- options: BEHAVIOR_OPTIONS.map((o) => ({
87
- value: o.key,
88
- label: o.label,
89
- hint: o.hint,
90
- })),
91
- initialValues: initialSelectedKeys(currentBehaviors),
92
- required: false,
114
+ function normalizeBehaviorsForEvents(input, supportedHookEvents) {
115
+ return buildBehaviorsMap({
116
+ loadContext: supportsEvent(supportedHookEvents, "SessionStart")
117
+ ? input.loadContext
118
+ : false,
119
+ babysitDefault: supportsEvent(supportedHookEvents, "SessionStart")
120
+ ? input.babysitDefault
121
+ : false,
122
+ damageControlBash: supportsEvent(supportedHookEvents, "PreToolUse")
123
+ ? input.damageControlBash
124
+ : false,
125
+ damageControlEdit: supportsEvent(supportedHookEvents, "PreToolUse")
126
+ ? input.damageControlEdit
127
+ : false,
128
+ damageControlWrite: supportsEvent(supportedHookEvents, "PreToolUse")
129
+ ? input.damageControlWrite
130
+ : false,
131
+ preCompactState: supportsEvent(supportedHookEvents, "PostCompact")
132
+ ? input.preCompactState
133
+ : false,
93
134
  });
135
+ }
94
136
 
95
- if (prompts.isCancel(picked)) {
137
+ /**
138
+ * Wrap each Clack prompt to handle Ctrl+C / Esc consistently.
139
+ *
140
+ * @template T
141
+ * @param {T | symbol} value
142
+ * @returns {T}
143
+ */
144
+ function ensureNotCancelled(value) {
145
+ if (prompts.isCancel(value)) {
96
146
  prompts.cancel("Setup cancelled. No changes made.");
97
147
  process.exit(1);
98
148
  }
149
+ return /** @type {T} */ (value);
150
+ }
151
+
152
+ /**
153
+ * Interactive picker. Asks one question per behavior, with a follow-up
154
+ * multiselect for damage control when enabled.
155
+ *
156
+ * @param {Partial<Behaviors>} [currentBehaviors]
157
+ * @param {Set<string>|string[]} [supportedHookEvents]
158
+ * @returns {Promise<Behaviors>}
159
+ */
160
+ async function pickBehaviors(currentBehaviors, supportedHookEvents) {
161
+ /** @type {Partial<Behaviors>} */
162
+ const result = {};
163
+
164
+ const supportsSessionStart = supportsEvent(
165
+ supportedHookEvents,
166
+ "SessionStart",
167
+ );
168
+ const supportsPreCompact = supportsEvent(supportedHookEvents, "PostCompact");
169
+ const supportsPreToolUse = supportsEvent(supportedHookEvents, "PreToolUse");
170
+
171
+ if (supportsSessionStart) {
172
+ for (const opt of BEHAVIOR_OPTIONS.filter(
173
+ (o) => o.key !== "preCompactState",
174
+ )) {
175
+ const choice = ensureNotCancelled(
176
+ await prompts.confirm({
177
+ message: questionMessage(opt.label, opt.hint),
178
+ initialValue: initialFor(currentBehaviors, opt.key),
179
+ }),
180
+ );
181
+ result[opt.key] = Boolean(choice);
182
+ }
183
+ } else {
184
+ result.loadContext = false;
185
+ result.babysitDefault = false;
186
+ }
187
+
188
+ if (supportsPreCompact) {
189
+ const opt = BEHAVIOR_OPTIONS.find((o) => o.key === "preCompactState");
190
+ const choice = ensureNotCancelled(
191
+ await prompts.confirm({
192
+ message: questionMessage(opt.label, opt.hint),
193
+ initialValue: initialFor(currentBehaviors, opt.key),
194
+ }),
195
+ );
196
+ result[opt.key] = Boolean(choice);
197
+ } else {
198
+ result.preCompactState = false;
199
+ }
200
+
201
+ if (supportsPreToolUse) {
202
+ // Damage control: master toggle, then per-tool sub-toggles when on.
203
+ const anyDamageOn =
204
+ initialFor(currentBehaviors, "damageControlBash") ||
205
+ initialFor(currentBehaviors, "damageControlEdit") ||
206
+ initialFor(currentBehaviors, "damageControlWrite");
207
+
208
+ const damageOn = ensureNotCancelled(
209
+ await prompts.confirm({
210
+ message: questionMessage(
211
+ "Enable damage control hooks",
212
+ "Block risky Bash, Edit, and Write actions before they run.",
213
+ ),
214
+ initialValue: anyDamageOn,
215
+ }),
216
+ );
217
+
218
+ if (!damageOn) {
219
+ result.damageControlBash = false;
220
+ result.damageControlEdit = false;
221
+ result.damageControlWrite = false;
222
+ } else {
223
+ const initialTools = DAMAGE_CONTROL_TOOLS.filter((t) =>
224
+ initialFor(currentBehaviors, t.key),
225
+ ).map((t) => t.key);
226
+
227
+ const picked = ensureNotCancelled(
228
+ await prompts.multiselect({
229
+ message: questionMessage("Which tools should be guarded?"),
230
+ options: DAMAGE_CONTROL_TOOLS.map((t) => ({
231
+ value: t.key,
232
+ label: chalk.bold(t.label),
233
+ hint: t.hint,
234
+ })),
235
+ initialValues: initialTools.length
236
+ ? initialTools
237
+ : DAMAGE_CONTROL_TOOLS.map((t) => t.key),
238
+ required: false,
239
+ }),
240
+ );
241
+ const set = new Set(/** @type {string[]} */ (picked));
242
+ for (const t of DAMAGE_CONTROL_TOOLS) {
243
+ result[t.key] = set.has(t.key);
244
+ }
245
+ }
246
+ } else {
247
+ result.damageControlBash = false;
248
+ result.damageControlEdit = false;
249
+ result.damageControlWrite = false;
250
+ }
99
251
 
100
- return buildBehaviorsMap(/** @type {string[]} */ (picked));
252
+ return normalizeBehaviorsForEvents(result, supportedHookEvents);
101
253
  }
102
254
 
103
255
  module.exports = {
104
256
  pickBehaviors,
105
257
  buildBehaviorsMap,
106
- initialSelectedKeys,
107
258
  BEHAVIOR_OPTIONS,
259
+ DAMAGE_CONTROL_TOOLS,
260
+ supportsEvent,
261
+ normalizeBehaviorsForEvents,
108
262
  };
@@ -1,57 +1,69 @@
1
1
  /**
2
- * IDE / CLI picker — Clack select prompt.
2
+ * IDE / CLI picker — Clack multiselect prompt.
3
3
  *
4
- * Asks the user which agentic IDE or CLI they're targeting. Defaults to
5
- * Claude Code (the full-feature target). The choice is persisted to
6
- * `agileflow.config.json` at `ide.primary` and gates which plugin
7
- * content the installer writes (hooks, skills, etc. see
8
- * `runtime/ide/capabilities.js`).
4
+ * Asks the user which agentic IDEs / CLIs to install AgileFlow into.
5
+ * Multiple selections are supported (space toggles); the result is
6
+ * persisted to `agileflow.config.json` at `ide.targets`. The installer
7
+ * mirrors skills into each selected IDE's dotdir and writes hooks /
8
+ * settings only into IDEs whose capability map declares them.
9
9
  */
10
- const prompts = require('@clack/prompts');
10
+ const prompts = require("@clack/prompts");
11
11
  const {
12
12
  IDE_CAPABILITIES,
13
13
  SUPPORTED_IDES,
14
14
  capabilitiesFor,
15
- } = require('../../runtime/ide/capabilities.js');
15
+ } = require("../../runtime/ide/capabilities.js");
16
+ const { questionMessage } = require("../../lib/brand.js");
16
17
 
17
18
  /**
18
- * @param {string} currentIde - existing config's ide.primary
19
- * @returns {Promise<string>} selected ide id
19
+ * @param {string[]} currentTargets - existing config's ide.targets
20
+ * @returns {Promise<string[]>} selected ide ids (>=1)
20
21
  */
21
- async function pickIde(currentIde) {
22
- const initialValue = SUPPORTED_IDES.includes(currentIde) ? currentIde : 'claude-code';
22
+ async function pickIdes(currentTargets) {
23
+ const valid = (currentTargets || []).filter((id) =>
24
+ SUPPORTED_IDES.includes(id),
25
+ );
26
+ const initialValues = valid.length ? valid : ["claude-code"];
23
27
 
24
- const choice = await prompts.select({
25
- message: 'Which IDE / CLI are you using?',
28
+ const choice = await prompts.multiselect({
29
+ message: questionMessage(
30
+ "Which IDEs / CLIs should AgileFlow install into?",
31
+ ),
26
32
  options: SUPPORTED_IDES.map((id) => {
27
33
  const caps = IDE_CAPABILITIES[id];
28
- const featureList = ['hooks', 'skills', 'commands', 'agents', 'mcp']
34
+ const features = ["hooks", "skills", "agents"]
29
35
  .filter((f) => caps[f])
30
- .join(', ');
36
+ .join(", ");
31
37
  return {
32
38
  value: id,
33
39
  label: caps.description,
34
- hint: featureList ? `enables: ${featureList}` : '(very limited support)',
40
+ hint: features || "(limited)",
35
41
  };
36
42
  }),
37
- initialValue,
43
+ initialValues,
44
+ required: true,
38
45
  });
39
46
 
40
47
  if (prompts.isCancel(choice)) {
41
- prompts.cancel('Setup cancelled. No changes made.');
48
+ prompts.cancel("Setup cancelled. No changes made.");
42
49
  process.exit(1);
43
50
  }
44
51
 
45
- const caps = capabilitiesFor(/** @type {string} */ (choice));
46
- const disabled = ['hooks', 'skills', 'commands', 'agents']
47
- .filter((f) => !caps[f]);
48
- if (disabled.length) {
49
- prompts.log.warn(
50
- `${choice}: ${disabled.join(', ')} won't be installed (not supported by this IDE).`,
51
- );
52
+ const targets = /** @type {string[]} */ (choice);
53
+
54
+ // Surface what each target won't get — so a user picking only Cursor
55
+ // isn't surprised that hooks/agents weren't installed.
56
+ for (const id of targets) {
57
+ const caps = capabilitiesFor(id);
58
+ const disabled = ["hooks", "skills", "agents"].filter((f) => !caps[f]);
59
+ if (disabled.length) {
60
+ prompts.log.warn(
61
+ `${caps.description}: ${disabled.join(", ")} are not available here.`,
62
+ );
63
+ }
52
64
  }
53
65
 
54
- return /** @type {string} */ (choice);
66
+ return targets;
55
67
  }
56
68
 
57
- module.exports = { pickIde };
69
+ module.exports = { pickIdes };
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Install scope picker — choose project-local or user-global install roots.
3
+ */
4
+ const prompts = require("@clack/prompts");
5
+ const { optionLabel, questionMessage } = require("../../lib/brand.js");
6
+
7
+ const INSTALL_SCOPE_OPTIONS = [
8
+ {
9
+ value: "project",
10
+ label: optionLabel(
11
+ "Project install",
12
+ "Writes AgileFlow into this repository only.",
13
+ ),
14
+ hint: "Best when each repo has its own plugins, hooks, and state.",
15
+ },
16
+ {
17
+ value: "global",
18
+ label: optionLabel(
19
+ "Global install",
20
+ "Writes AgileFlow once under your home directory.",
21
+ ),
22
+ hint: "Best when you want the same commands and agents available everywhere.",
23
+ },
24
+ ];
25
+
26
+ /**
27
+ * @param {string | undefined} currentScope
28
+ * @returns {'project' | 'global'}
29
+ */
30
+ function initialInstallScope(currentScope) {
31
+ return currentScope === "global" ? "global" : "project";
32
+ }
33
+
34
+ /**
35
+ * @param {string | undefined} currentScope
36
+ * @returns {Promise<'project' | 'global'>}
37
+ */
38
+ async function pickInstallScope(currentScope = "project") {
39
+ const choice = await prompts.select({
40
+ message: questionMessage("Where should AgileFlow install?"),
41
+ options: INSTALL_SCOPE_OPTIONS,
42
+ initialValue: initialInstallScope(currentScope),
43
+ });
44
+
45
+ if (prompts.isCancel(choice)) {
46
+ prompts.cancel("Setup cancelled. No changes made.");
47
+ process.exit(1);
48
+ }
49
+
50
+ return /** @type {'project' | 'global'} */ (choice);
51
+ }
52
+
53
+ module.exports = {
54
+ INSTALL_SCOPE_OPTIONS,
55
+ initialInstallScope,
56
+ pickInstallScope,
57
+ };