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,240 @@
1
+ # Competitor Retention Analysis
2
+
3
+ **Load this when:** the user wants to understand how high-retention products implement specific mechanics, looking for concrete implementation patterns to borrow, or analyzing a competitor's retention strategy.
4
+
5
+ ---
6
+
7
+ ## Duolingo
8
+
9
+ **Retention profile:** ~50% DAU/MAU ratio (industry average for mobile apps: 15–20%). One of the highest DAU/MAU ratios of any consumer app at scale.
10
+
11
+ **Primary psychological levers:** Loss aversion, streak mechanics, social competition, variable rewards, gamification.
12
+
13
+ ### What they do
14
+
15
+ **Streak system**
16
+ The streak is Duolingo's most powerful retention mechanic. A daily lesson counter with a fire icon, milestone celebrations at 7/30/100/365 days, and two recovery mechanics:
17
+
18
+ - **Streak Freeze:** An in-app purchasable or earnable item that preserves your streak through one missed day. Dramatically reduces streak abandonment after single-miss events.
19
+ - **Weekend Amulet:** Removes the weekend streak requirement for premium users — addresses the common "missed Saturday, lost 60-day streak" churn event.
20
+
21
+ The "You're about to lose your streak" notification fires 2–4 hours before midnight and is one of Duolingo's highest-converting retention notifications. Loss framing at its most effective.
22
+
23
+ **XP and League System**
24
+ Users earn XP (experience points) per lesson, with a weekly leaderboard organized into competitive leagues (Bronze → Silver → Gold → ... → Diamond). The top performers in each league advance; the bottom performers are relegated.
25
+
26
+ Psychological basis:
27
+
28
+ - Competitive relatedness (SDT) — you're competing with peers, not an abstract system
29
+ - Variable reward (where will I rank this week?)
30
+ - Loss aversion (will I get relegated from Diamond League?)
31
+ - Social comparison with progress visible to others
32
+
33
+ **Bite-sized lessons**
34
+ Lessons are designed to complete in 3–5 minutes. This addresses the #1 ability barrier: "I don't have time to study a language today." When the minimum viable behavior is 3 minutes, motivation threshold drops to almost nothing (Fogg's ability lever).
35
+
36
+ **Personalized reminder timing**
37
+ Duolingo asks users when they want to be reminded and learns from their behavior (when do they actually open the app?) to optimize notification timing. Prompt fires at peak-motivation moment.
38
+
39
+ **Hearts system**
40
+ Users have a limited number of hearts (lives). Getting an answer wrong costs a heart. Running out of hearts requires waiting to regenerate (or paying to refill). This creates:
41
+
42
+ - Stakes and tension during lessons (competence challenge)
43
+ - Loss aversion (don't want to lose hearts)
44
+ - A premium upgrade opportunity (buy hearts to continue)
45
+
46
+ **Duo the Owl**
47
+ The Duolingo mascot sends notification messages in a voice that ranges from encouraging to passive-aggressive. "It's been 3 days since you practiced. The owl is disappointed." Internet culture made this a meme, generating enormous organic marketing. The parasocial relationship with the mascot also adds a belonging dimension to retention.
48
+
49
+ **Measurable outcome:** Duolingo's D30 retention is approximately 2–3× higher for users with established streaks vs. users without. The IPO S-1 (2021) cited daily active users as 27.3M with a 79% year-over-year growth rate.
50
+
51
+ ---
52
+
53
+ ## LinkedIn
54
+
55
+ **Retention profile:** Professional social network with 1B+ members. Weekly active usage is the primary metric. Key feature: members who are actively looking for jobs have near-100% weekly return; the challenge is retaining passive members.
56
+
57
+ **Primary psychological levers:** Endowed progress, social proof, variable rewards (search visibility), FOMO, professional identity investment.
58
+
59
+ ### What they do
60
+
61
+ **Profile completeness bar**
62
+ LinkedIn's profile strength indicator (All-Star, Expert, Intermediate, etc.) combined with a progress bar showing specific steps to complete. Levers:
63
+
64
+ - Endowed progress: starts at a non-zero baseline
65
+ - Zeigarnik Effect: the incomplete bar creates a persistent cognitive loop
66
+ - Each step has a specific benefit framed as gaining something you don't have yet
67
+
68
+ **"Your profile appeared in X searches this week"**
69
+ This notification frames search visibility as something the user already has — and gives them a number that could be higher. Loss aversion + social proof + professional vanity combine to drive profile improvement behavior.
70
+
71
+ **"People also viewed" / "Alumni you might know"**
72
+ Social proof + network growth triggers. The social graph is LinkedIn's investment mechanic — each connection added increases the value of the platform. Importantly, connections are visible to others, creating social proof of one's professional standing.
73
+
74
+ **Weekly email digest**
75
+ LinkedIn sends weekly emails with "What's happening in your network" — keeping users informed without requiring a login. This maintains product salience (keeps it in mind) and periodically reveals new content (variable reward) that drives re-engagement.
76
+
77
+ **Skills endorsements and recommendations**
78
+ Reciprocity mechanic (Cialdini, 1984): when someone endorses your skills, you feel social obligation to return the endorsement. This creates a bidirectional engagement loop between users. Each endorsement is also investment — content (reputation) stored in the product that makes the profile more valuable.
79
+
80
+ **Notifications: "Congratulate X on their new job"**
81
+ LinkedIn turns user life events into engagement triggers for the entire network. You receive a notification about a connection's career move; you feel social obligation to congratulate. This drives network engagement without requiring LinkedIn to create content.
82
+
83
+ ---
84
+
85
+ ## Slack
86
+
87
+ **Retention profile:** Teams that have exchanged 2,000+ messages have a 93% retention rate (Slack IPO S-1, 2019). Slack's challenge is reaching that threshold.
88
+
89
+ **Primary psychological levers:** Loss aversion (unreads), social accountability, investment (workspace history), switching costs, relatedness.
90
+
91
+ ### What they do
92
+
93
+ **Unread message counters**
94
+ The red badge count on channels creates obligation and loss aversion simultaneously. Leaving messages unread feels like leaving tasks incomplete (Zeigarnik Effect) and risks missing important communications. Users return to Slack to "clear" unread counts.
95
+
96
+ **Emoji reactions**
97
+ The reaction system reduces the friction to engage to near-zero (one click, zero typing). This increases the signal density in channels and makes users feel acknowledged with minimal effort on the responder's side. High engagement signal per unit of effort.
98
+
99
+ **Channels as communities**
100
+ Channels satisfy SDT's relatedness need — they create distinct communities within the workspace. Users who have active relationships within channels are retained by those social ties, not just by the product mechanics.
101
+
102
+ **Status indicators**
103
+ Presence indicators (online, away, DND) create mild FOMO and social accountability. Knowing that colleagues can see you're online creates soft social pressure to be responsive.
104
+
105
+ **Thread management**
106
+ Threading complex conversations reduces cognitive load (Fogg's brain cycles ability factor). When Slack becomes the tool that makes team communication clearer, switching becomes painful — investment in conversation history and workflow.
107
+
108
+ **App directory and integrations**
109
+ Third-party integrations (GitHub notifications, Jira updates, calendar, Zoom) create compound switching costs. Each integration adds value to the workspace and increases the cost of migrating to a competitor.
110
+
111
+ **The 2,000-message aha moment**
112
+ Slack's onboarding is optimized to get teams to exchange 2,000 messages as quickly as possible. Below that threshold, teams can easily imagine getting their communication needs met elsewhere. Above it, the workspace has become a repository of institutional knowledge and context that is genuinely painful to lose.
113
+
114
+ ---
115
+
116
+ ## Strava
117
+
118
+ **Retention profile:** Fitness activity logging app with strong social features. Used by cyclists, runners, and triathletes. Retention is driven by the intersection of sports habit and social accountability.
119
+
120
+ **Primary psychological levers:** Social accountability, competition, identity, variable rewards (kudos), habit anchoring.
121
+
122
+ ### What they do
123
+
124
+ **Activity feed creates social pressure**
125
+ Seeing friends' workouts in a feed creates gentle social accountability ("Alice ran 10 miles yesterday") without direct pressure. The social comparison is voluntary, but knowing others will see your activity log is motivating.
126
+
127
+ **Kudos (variable social reward)**
128
+ Kudos (Strava's "likes") are the variable reward mechanic. You don't know how many you'll receive or who will give them. This creates anticipatory reward for posting activities.
129
+
130
+ **Segments and leaderboards**
131
+ Strava's segment system (GPS-defined route sections with competitive timing) turns every outdoor workout into a competition. Comparing your time to others on the same segment satisfies SDT's competence need and creates repeated motivation to return and improve.
132
+
133
+ **Challenges with badges**
134
+ Monthly challenges (complete 100km of cycling in October, run every day for a week) create finite commitments with clear rewards (digital badges). The challenge window creates urgency; the badge is permanent investment in your Strava profile.
135
+
136
+ **Year in Sport recap**
137
+ Annual data visualization of your year's activity generates enormous organic sharing. Satisfies SDT's competence need (look how much I did) and relatedness (sharing identity with the community), while generating Strava marketing via social sharing.
138
+
139
+ **Clubs**
140
+ Group features (running clubs, cycling clubs) add strong social investment. If your club trains together on Strava, leaving Strava means losing contact with that community.
141
+
142
+ ---
143
+
144
+ ## Headspace / Calm
145
+
146
+ **Retention profile:** Meditation apps with very high churn risk (meditation requires sustained commitment against low-urgency internal motivation).
147
+
148
+ **Primary psychological levers:** Streak mechanics, personalization as identity, habit anchoring, competence progression.
149
+
150
+ ### What they do
151
+
152
+ **Streak for meditation sessions**
153
+ Daily meditation streak functions identically to Duolingo's language streak — creates loss aversion and habit formation around a daily behavior. The streak counter makes the habit visible and creates stakes.
154
+
155
+ **Personalized content as identity**
156
+ "Sleep sounds made for you", "A program for managing anxiety" — personalization frames the product as specifically designed for the user's unique situation. SDT autonomy need satisfied: this is my Headspace, not a generic app.
157
+
158
+ **Progress through structured programs**
159
+ The course structure (Basics 1, Basics 2, Relationships series) creates a clear competence progression. Users can see they are developing a skill — not just consuming content. SDT competence need satisfied.
160
+
161
+ **Sleep content creates daily ritual anchor**
162
+ Sleep sounds and sleep meditations create a nightly bedtime ritual anchor (Fogg's anchor in Tiny Habits). The product is linked to an existing universal routine, making the habit easy to maintain.
163
+
164
+ **Pack completion mechanics**
165
+ Structured 10-day or 30-day programs (packs) leverage commitment and consistency. Starting a pack creates an obligation to complete it; the finite duration makes the commitment feel manageable.
166
+
167
+ ---
168
+
169
+ ## Notion
170
+
171
+ **Retention profile:** Productivity and notes product with strong power-user loyalty. Retention challenge: most users never move beyond light note-taking; those who do become extremely retained.
172
+
173
+ **Primary psychological levers:** Investment (content created), identity expression, ability reduction (templates), switching costs.
174
+
175
+ ### What they do
176
+
177
+ **Templates reduce activation energy**
178
+ A new user creating their first Notion workspace faces decision paralysis (blank page problem). Notion's template gallery allows users to start with a full system for team wikis, personal journals, project management, etc. Addresses the ability barrier in Fogg's model: reduces the effort required to start.
179
+
180
+ **Public pages and portfolio building**
181
+ Notion users who build public pages (design portfolios, company wikis, personal websites) have created external-facing artifacts that are tied to the product. The investment is public and visible. Switching means migrating a web presence, not just personal notes.
182
+
183
+ **Collaborative features create social investment**
184
+ When teams build their documentation, knowledge bases, and project tracking in Notion together, leaving Notion means convincing the whole team to migrate. Social investment creates organizational switching costs.
185
+
186
+ **Daily journal templates create habit anchor**
187
+ Daily journal templates give users an anchor (daily journaling ritual) and a clear routine (fill in today's entry). Combined with Notion's calendar view, this creates a consistent usage pattern.
188
+
189
+ ---
190
+
191
+ ## Spotify
192
+
193
+ **Retention profile:** Music streaming with strong switching costs (playlist library) but competitive pressure from Apple Music, Amazon Music, YouTube Music. Key differentiators are discovery features and cultural moments.
194
+
195
+ **Primary psychological levers:** Variable rewards (discovery), identity narrative, social sharing, taste investment.
196
+
197
+ ### What they do
198
+
199
+ **Discover Weekly: personalization + surprise**
200
+ Monday morning, every user gets a new 30-song playlist of music they likely haven't heard but will probably love. Two retention mechanics combined:
201
+
202
+ - **Personalization** satisfies SDT autonomy need: this playlist was made for me
203
+ - **Variable reward**: will this week's list be as good as last week's? Anticipatory excitement every Monday
204
+
205
+ **Wrapped: annual identity narrative**
206
+ Spotify Wrapped turns listening data into a personal identity story ("Your top 5 artists of 2024", "You're in the top 1% of Radiohead listeners"). Mechanics:
207
+
208
+ - **Shareable:** drives enormous organic marketing via social sharing
209
+ - **Identity expression:** your music taste is part of your identity (SDT relatedness + autonomy)
210
+ - **Investment revelation:** shows you the value of the listening history you've accumulated
211
+
212
+ **Collaborative playlists and social features**
213
+ Shared playlists with friends or partners create social investment in the product. Leaving Spotify means disrupting a shared music collection.
214
+
215
+ **Podcast recommendations reduce churn risk**
216
+ Podcasts create daily or weekly check-in behavior anchored to release schedules. A user who follows 3 podcasts has multiple weekly triggers to open Spotify that aren't dependent on mood-driven music choices.
217
+
218
+ ---
219
+
220
+ ## Cross-product patterns and lessons
221
+
222
+ ### What all high-retention products have in common
223
+
224
+ 1. **A clearly defined aha moment** they optimize onboarding toward
225
+ 2. **At least one strong daily habit anchor** (streak, daily content, social feed)
226
+ 3. **Investment mechanics** that accumulate value over time (content, followers, history, settings)
227
+ 4. **Social features** that create switching costs beyond individual usage
228
+ 5. **Variable reward** in the core engagement loop
229
+ 6. **Loss aversion** framing in retention notifications (not gain framing)
230
+
231
+ ### Common implementation mistakes
232
+
233
+ | Mistake | Better approach |
234
+ | ----------------------------------------------- | -------------------------------------------------------------------------------------------- |
235
+ | Generic notifications ("Check out what's new!") | Behavioral triggers: "Alice commented on your post" |
236
+ | Predictable rewards (points for every action) | Variable rewards: occasional surprise bonuses |
237
+ | Progress bar at 0% | Endowed progress: start at 10–20% |
238
+ | Streak with no recovery mechanic | Add streak freeze to prevent one-miss churn |
239
+ | Gamification for already-intrinsic activities | Gamification for activation tasks and habit formation; keep intrinsic activities reward-free |
240
+ | Single retention mechanic | Layer 3+ complementary mechanics (streak + social + progress) |
@@ -0,0 +1,349 @@
1
+ # Psychology Models Reference
2
+
3
+ **Load this when:** designing a retention mechanic, auditing a product for psychological levers, explaining why a mechanic works or doesn't work, or choosing which model applies to a specific retention challenge.
4
+
5
+ ---
6
+
7
+ ## 1. BJ Fogg's Behavior Model (B=MAP)
8
+
9
+ **Source:** Fogg, B.J. (2009). "A Behavior Model for Persuasive Design." _Proceedings of the 4th International Conference on Persuasive Technology._ Also expanded in: Fogg, B.J. (2019). _Tiny Habits: The Small Changes That Change Everything._ Houghton Mifflin Harcourt.
10
+
11
+ ### The core equation
12
+
13
+ ```
14
+ B = MAP (at the same moment)
15
+ ```
16
+
17
+ A behavior (B) happens when **Motivation** (M), **Ability** (A), and **Prompt** (P) all converge simultaneously. Remove any one of the three and the behavior doesn't happen.
18
+
19
+ This is the most actionable model in product design because it gives you three distinct levers to pull.
20
+
21
+ ### Motivation
22
+
23
+ Fogg identifies three pairs of core motivators — each with a positive and negative pole:
24
+
25
+ | Motivator | Positive pole | Negative pole |
26
+ | ---------------- | ------------- | ------------- |
27
+ | **Sensation** | Pleasure | Pain |
28
+ | **Anticipation** | Hope | Fear |
29
+ | **Belonging** | Acceptance | Rejection |
30
+
31
+ These aren't manufactured — they're fundamental human drives. Effective products tap into at least one pair. The belonging motivator is particularly powerful for social products; anticipation motivators drive checking behaviors (checking email, refreshing feeds).
32
+
33
+ **Important:** Motivation is volatile. It spikes and crashes. You cannot design a product that relies on users always being highly motivated. High motivation at the wrong moment (no prompt, no ability) produces no behavior. Design for low-motivation states.
34
+
35
+ ### Ability
36
+
37
+ Ability is a function of simplicity. Fogg defines 6 factors that limit a person's ability to perform a behavior:
38
+
39
+ | Factor | What limits it | Design fix |
40
+ | ------------------- | ------------------------------ | -------------------------------------------------------------- |
41
+ | **Time** | Behavior takes too long | Reduce steps; auto-fill; sensible defaults |
42
+ | **Money** | Behavior has financial cost | Free tier; clear value before asking for payment |
43
+ | **Physical effort** | Behavior requires exertion | One-click actions; reduce taps/clicks |
44
+ | **Brain cycles** | Behavior requires thinking | Progressive disclosure; clear labeling; one decision at a time |
45
+ | **Social deviance** | Behavior feels weird to others | Social proof; normalize the behavior |
46
+ | **Non-routine** | Behavior is unfamiliar | Familiar patterns; contextual guidance |
47
+
48
+ The weakest factor determines overall ability. A behavior can be free, fast, and familiar but fail if it feels socially deviant.
49
+
50
+ **Key insight for retention:** Don't try to raise motivation — raise ability instead. It's more reliable and easier to control. If users aren't completing onboarding, the problem is almost never lack of motivation (they signed up!). The problem is ability — friction in the flow.
51
+
52
+ ### The Prompt (Trigger)
53
+
54
+ The prompt must arrive at exactly the right moment — when both motivation and ability are sufficient. There are three prompt types:
55
+
56
+ | Type | Works when | Example |
57
+ | ---------------------- | ------------------------------------- | ---------------------------------- |
58
+ | **Facilitator prompt** | Ability is high but motivation is low | "You're 80% done — one more step" |
59
+ | **Spark prompt** | Ability is low but motivation is high | Compelling case for why to act now |
60
+ | **Signal prompt** | Both M and A are high | Simple reminder at the right time |
61
+
62
+ Most apps use only signal prompts (push notifications, emails). Better retention comes from designing facilitator prompts: catching users mid-task, celebrating near-completion, and reducing the last 20% of friction.
63
+
64
+ ### Tiny Habits methodology
65
+
66
+ For designing new habits, Fogg's Tiny Habits framework uses the sequence:
67
+
68
+ ```
69
+ Anchor → Tiny Behavior → Celebration (immediate)
70
+ ```
71
+
72
+ - **Anchor:** An existing routine that reliably triggers at the desired time ("After I pour my morning coffee...")
73
+ - **Tiny Behavior:** A version of the target behavior made so small it's trivially easy ("...I will open the app and read one headline")
74
+ - **Celebration:** An immediate positive emotional signal ("Awesome! I did it!") — this wires the habit loop
75
+
76
+ **Application to product design:** Identify what existing routine (anchor) can trigger your product behavior. Make the initial behavior tiny enough that no motivation is required. Deliver immediate positive feedback. Once the anchor-behavior-celebration loop runs consistently, gradually expand the behavior.
77
+
78
+ ### Behavior grid
79
+
80
+ Fogg also distinguishes behavior types by duration and novelty:
81
+
82
+ | | New behavior | Familiar behavior |
83
+ | ------------ | ---------------------------- | ------------------------------------ |
84
+ | **One-time** | One-time new (e.g., setup) | One-time familiar |
85
+ | **Ongoing** | New ongoing (habit to build) | Familiar ongoing (habit to maintain) |
86
+ | **Increase** | — | Do it more often |
87
+ | **Decrease** | — | Do it less often |
88
+ | **Cease** | — | Stop doing it |
89
+
90
+ Most retention work is in the "new ongoing" or "familiar increase" categories. Each requires different design approaches.
91
+
92
+ ---
93
+
94
+ ## 2. Nir Eyal's Hook Model
95
+
96
+ **Source:** Eyal, N. (2014). _Hooked: How to Build Habit-Forming Products._ Portfolio/Penguin.
97
+
98
+ ### The four-phase loop
99
+
100
+ ```
101
+ Trigger → Action → Variable Reward → Investment → (next Trigger)
102
+ ```
103
+
104
+ Each completed loop increases the probability of the next loop firing faster and with less external prompting. The goal is to shrink the path from internal trigger to action until it becomes automatic.
105
+
106
+ ### Phase 1: Trigger
107
+
108
+ **External triggers** contain explicit information about what to do next:
109
+
110
+ - Paid triggers: advertisements, sponsored content
111
+ - Earned triggers: PR, word of mouth, viral content
112
+ - Relationship triggers: referrals, social sharing
113
+ - Owned triggers: email list, push notifications, bookmarks
114
+
115
+ **Internal triggers** are emotions or states that cue behavior without external prompting:
116
+
117
+ - Boredom → open Reddit/Twitter
118
+ - Loneliness → check Facebook/Instagram
119
+ - Uncertainty → search Google
120
+ - FOMO → check notifications
121
+ - Anxiety → procrastinate on email
122
+
123
+ The transition from external to internal triggers is the sign that a habit has formed. Products that never achieve internal triggers must continuously pay for external ones — expensive and fragile. Products that become emotionally associated ("I feel bored, I open Netflix") have achieved habit status.
124
+
125
+ **Design principle:** Which emotion or internal state do you want your product to "own"? Design the product experience to be associated with that state, and ensure the product reliably resolves it.
126
+
127
+ ### Phase 2: Action
128
+
129
+ The action is the simplest behavior in anticipation of the reward. Eyal adopts Fogg's ability framework here: reduce the action to its simplest possible form. The action should require:
130
+
131
+ - Minimum time
132
+ - Minimum cognitive effort
133
+ - Minimum social risk
134
+
135
+ Examples:
136
+
137
+ - Twitter: type up to 280 characters (low effort, low commitment)
138
+ - Instagram: double-tap to like (1 gesture, 0 cognitive load)
139
+ - Spotify: press play (1 tap to immediate reward)
140
+
141
+ **Design principle:** What is the one action that delivers the user to the reward? Eliminate every step between trigger and that action.
142
+
143
+ ### Phase 3: Variable Reward
144
+
145
+ This is the most psychologically powerful phase. Eyal builds on B.F. Skinner's operant conditioning research: variable ratio reward schedules produce the highest response rates and the greatest resistance to extinction (stopping the behavior).
146
+
147
+ Eyal categorizes three types of variable reward:
148
+
149
+ **Rewards of the Tribe (social)**
150
+
151
+ - Variable social validation: likes, comments, shares, upvotes
152
+ - Who liked my photo? Did anyone reply to my tweet?
153
+ - The variability comes from social unpredictability — you don't know how others will respond
154
+ - Examples: Instagram, Twitter, Reddit, Slack
155
+
156
+ **Rewards of the Hunt (resources)**
157
+
158
+ - Variable acquisition of useful information or resources
159
+ - Scrolling a feed: will the next post be interesting?
160
+ - Job board refreshes: will there be a new listing?
161
+ - News aggregators, email inbox, product feeds
162
+ - Examples: Pinterest, LinkedIn feed, Hacker News
163
+
164
+ **Rewards of the Self (mastery/completion)**
165
+
166
+ - Variable internal satisfaction from accomplishment
167
+ - Completing a level, mastering a skill, making progress
168
+ - The variability comes from difficulty — sometimes it's easy, sometimes hard
169
+ - Examples: Duolingo, games, fitness apps
170
+
171
+ **Critical design principle:** Rewards must be variable, not predictable. If a user can predict exactly what they'll get, dopamine release diminishes. The anticipation of a variable reward is neurologically more powerful than a fixed reward.
172
+
173
+ **Also critical:** Rewards should not constrain autonomy. If users feel manipulated or limited during the reward phase, the experience becomes aversive. Give users a sense of agency within the reward.
174
+
175
+ ### Phase 4: Investment
176
+
177
+ The investment phase is the most underutilized and most powerful for retention.
178
+
179
+ Users invest in products by storing value — value that increases over time:
180
+
181
+ - **Data:** personalization improves with use (Spotify recommendations, Netflix suggestions)
182
+ - **Content:** user-generated content that others consume (tweets, photos, posts)
183
+ - **Followers/following:** the social graph you've built (Twitter, LinkedIn)
184
+ - **Reputation:** reviews, ratings, badges, levels built over time
185
+ - **Skills/settings:** configurations that would be painful to recreate
186
+ - **History:** browsing history, purchase history, progress that would be lost
187
+
188
+ Investment increases switching costs. But more importantly, it makes the next trigger more effective: a user who has invested receives a more personalized, more relevant prompt that they're more likely to act on.
189
+
190
+ **Design principle:** After each usage session, has the user left something behind that makes the product more valuable on the next visit? If not, you're missing the investment phase.
191
+
192
+ ### Hook Model audit
193
+
194
+ To audit your product against the Hook Model:
195
+
196
+ | Phase | Questions to ask |
197
+ | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
198
+ | **Trigger** | What external triggers exist? What internal trigger are you targeting? Have users associated the product with that emotional state yet? |
199
+ | **Action** | What is the simplest behavior that delivers the reward? How many steps separate the trigger from that action? |
200
+ | **Variable Reward** | Which type of reward do you deliver (tribe/hunt/self)? Is it variable or predictable? Do users feel in control during the reward? |
201
+ | **Investment** | What does the user leave behind after each session? Does it increase value on the next visit? |
202
+
203
+ ---
204
+
205
+ ## 3. Charles Duhigg's Habit Loop
206
+
207
+ **Source:** Duhigg, C. (2012). _The Power of Habit: Why We Do What We Do in Life and Business._ Random House.
208
+
209
+ Also informed by neuroscience research: Graybiel, A.M. (2008). "Habits, Rituals, and the Evaluative Brain." _Annual Review of Neuroscience_, 31, 359–387.
210
+
211
+ ### The neurological loop
212
+
213
+ ```
214
+ Cue → Routine → Reward → (Craving builds → Cue)
215
+ ```
216
+
217
+ Once a habit is established:
218
+
219
+ - The **cue** triggers a craving for the reward
220
+ - The **routine** runs automatically (basal ganglia takes over from prefrontal cortex)
221
+ - The **reward** satisfies the craving
222
+ - Over time, the craving itself reinforces the cue's power
223
+
224
+ The key neuroscience finding (Graybiel's MIT lab experiments): when habits form, the brain's basal ganglia — which controls pattern recognition and routine behaviors — increasingly handles the routine, freeing the prefrontal cortex for other tasks. This is why habits feel effortless once formed.
225
+
226
+ ### Cue types
227
+
228
+ Habits are triggered by five cue categories:
229
+
230
+ 1. **Location** — where you are
231
+ 2. **Time** — time of day
232
+ 3. **Emotional state** — how you're feeling
233
+ 4. **Other people** — social context
234
+ 5. **Immediately preceding action** — what you just did
235
+
236
+ **Application:** Which of these five cue types can your product "own"? The most powerful are time-based cues (daily rituals like morning routines) and preceding-action cues (anchors in Fogg's Tiny Habits language).
237
+
238
+ ### The Golden Rule of Habit Change
239
+
240
+ To change an existing habit:
241
+
242
+ - Keep the **cue** the same
243
+ - Keep the **reward** the same
244
+ - Change the **routine**
245
+
246
+ This explains why habit replacement works better than habit elimination. You can't easily stop a habit; you can replace its routine while keeping the same cue and delivering the same reward.
247
+
248
+ **Product application:** If you're trying to replace a competitor's habit, target the same cue and promise the same reward (or better). Your product is the new routine. Examples:
249
+
250
+ - Slack replaced email for team communication: same cue (need to communicate), same reward (staying connected), new routine (channels instead of inbox)
251
+ - Spotify replaced iTunes: same cue (want music), same reward (listening), new routine (streaming instead of owning)
252
+
253
+ ### Keystone habits
254
+
255
+ Duhigg identifies "keystone habits" — single behaviors that trigger cascades of other positive habits. Exercise is the canonical example: people who start exercising tend to also improve their diet, sleep, and stress management, even without intending to.
256
+
257
+ **Application:** Identify the keystone habit in your product domain. What is the one behavior that, if done consistently, makes everything else in your product valuable? Design the entire onboarding experience around establishing that single keystone habit.
258
+
259
+ Examples:
260
+
261
+ - Duolingo: doing one lesson per day (keystone) → reinforces study habit → improves language skills → increases motivation
262
+ - Strava: logging one workout (keystone) → creates social accountability → improves athletic consistency
263
+ - LinkedIn: completing your profile (keystone) → enables network effects → creates value for other users
264
+
265
+ ### Habit strength indicators
266
+
267
+ A habit is forming when:
268
+
269
+ - Users perform the routine without external prompting
270
+ - The routine happens at consistent times/contexts
271
+ - Users report anxiety or discomfort when unable to perform the routine ("I feel weird when I haven't checked...")
272
+ - The routine requires less conscious decision-making over time
273
+
274
+ ---
275
+
276
+ ## 4. Self-Determination Theory (SDT)
277
+
278
+ **Sources:**
279
+
280
+ - Deci, E.L. & Ryan, R.M. (1985). _Intrinsic Motivation and Self-Determination in Human Behavior._ Plenum Press.
281
+ - Ryan, R.M. & Deci, E.L. (2000). "Self-Determination Theory and the Facilitation of Intrinsic Motivation, Social Development, and Well-Being." _American Psychologist_, 55(1), 68–78.
282
+ - Deci, E.L., Koestner, R., & Ryan, R.M. (1999). "A meta-analytic review of experiments examining the effects of extrinsic rewards on intrinsic motivation." _Psychological Bulletin_, 125(6), 627–668. (Meta-analysis of 128 studies.)
283
+
284
+ ### Three basic psychological needs
285
+
286
+ SDT proposes that humans have three innate psychological needs whose satisfaction predicts intrinsic motivation, well-being, and sustained engagement:
287
+
288
+ **Autonomy** — the experience of volition and self-direction
289
+
290
+ - Feeling that your actions are chosen, not coerced
291
+ - Having meaningful choices about how to engage
292
+ - Product design: customizable settings, multiple paths to the same goal, optional features, user control over notifications and recommendations
293
+
294
+ **Competence** — the experience of effectiveness and mastery
295
+
296
+ - Feeling that you can achieve goals and develop skills
297
+ - Seeing clear progress and skill development over time
298
+ - Product design: progressive disclosure of complexity, clear feedback on performance, visible skill progression, challenges calibrated to current ability (not too easy, not too hard)
299
+
300
+ **Relatedness** — the experience of connection to others
301
+
302
+ - Feeling that you are meaningfully connected to other people
303
+ - Caring about and being cared for by others in the product context
304
+ - Product design: social features, community, shared experiences, collaborative tools, seeing others' activity
305
+
306
+ Products that satisfy all three needs build deeply resilient retention. Users don't just use them because of habit or switching costs — they actively want to be there.
307
+
308
+ ### Cognitive Evaluation Theory (CET)
309
+
310
+ A sub-theory within SDT that addresses the effect of external rewards on intrinsic motivation:
311
+
312
+ **The undermining effect:** Providing external rewards (points, badges, money) for behaviors people already find intrinsically interesting can decrease their intrinsic motivation for those behaviors.
313
+
314
+ The mechanism: external rewards shift the "perceived locus of causality" from internal to external. The user no longer does the thing because they want to — they do it for the reward. When the reward is removed, the behavior stops.
315
+
316
+ **Classic study:** Lepper, Greene & Nisbett (1973). Children who expected a reward for drawing (which they loved) showed less interest in drawing after the reward period ended, compared to children who received unexpected rewards or no rewards.
317
+
318
+ **Design implication:** Be cautious about gamifying activities users already intrinsically enjoy. Adding points to reading, creativity, or learning can undermine the love of those activities.
319
+
320
+ **When external rewards work:** They're most effective for:
321
+
322
+ - Activities people don't intrinsically enjoy (onboarding steps, profile completion)
323
+ - Initial behavior establishment before intrinsic motivation can develop
324
+ - Unexpected rewards (which don't shift perceived locus of causality)
325
+ - Rewards that provide information and feedback (competence-satisfying) rather than just control
326
+
327
+ ### Applying SDT to retention design
328
+
329
+ | Need | Audit question | Design levers |
330
+ | --------------- | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
331
+ | **Autonomy** | Do users feel in control of their experience? | Customization, opt-in notifications, multiple paths, user-controlled recommendations |
332
+ | **Competence** | Do users see clear evidence of their progress and growing skills? | Progress visualization, skill trees, performance feedback, challenges at the right difficulty |
333
+ | **Relatedness** | Do users feel connected to other people through the product? | Activity feeds, collaborative features, community spaces, shared challenges |
334
+
335
+ A product that scores low on all three is retained only by switching costs and habit inertia — fragile when a better option appears. A product that scores high on all three is retained because users genuinely want to be there.
336
+
337
+ ---
338
+
339
+ ## Model selection guide
340
+
341
+ | Retention challenge | Best model | Why |
342
+ | ----------------------------------------- | ------------ | ------------------------------------------------------------ |
343
+ | Users don't complete onboarding | Fogg B=MAP | Find where motivation or ability is insufficient |
344
+ | Users sign up but don't return | Hook Model | External triggers not creating internal triggers |
345
+ | Users engage but don't form a daily habit | Habit Loop | Find the cue to anchor and make the routine automatic |
346
+ | Users churn after initial engagement | SDT | Check if autonomy, competence, and relatedness needs are met |
347
+ | Designing a new behavioral feature | Hook Model | Build the trigger→action→reward→investment loop first |
348
+ | Notifications feel spammy / users opt out | Fogg B=MAP | Prompts not aligned with motivation state |
349
+ | Users feel manipulated by gamification | SDT + Ethics | Extrinsic rewards undermining intrinsic motivation |