code-ai-installer 4.0.0 → 4.0.1-b

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 (471) hide show
  1. package/README.md +83 -67
  2. package/dist/index.js +2 -0
  3. package/dist/mcp/audit_ledger.d.ts +12 -0
  4. package/dist/mcp/audit_ledger.js +82 -0
  5. package/dist/mcp/cli.js +7 -1
  6. package/dist/mcp/config.d.ts +23 -0
  7. package/dist/mcp/config.js +44 -6
  8. package/dist/mcp/index.d.ts +1 -2
  9. package/dist/mcp/index.js +1 -2
  10. package/dist/mcp/paths.d.ts +20 -2
  11. package/dist/mcp/paths.js +29 -5
  12. package/dist/mcp/proposal_dedup.d.ts +32 -0
  13. package/dist/mcp/proposal_dedup.js +102 -0
  14. package/dist/mcp/proposal_store.d.ts +18 -0
  15. package/dist/mcp/proposal_store.js +74 -0
  16. package/dist/mcp/scorecard.d.ts +140 -0
  17. package/dist/mcp/scorecard.js +103 -0
  18. package/dist/mcp/skill_invocations.d.ts +15 -0
  19. package/dist/mcp/skill_invocations.js +28 -0
  20. package/dist/mcp/task_state.d.ts +77 -2
  21. package/dist/mcp/tools/_subprocess.d.ts +16 -0
  22. package/dist/mcp/tools/_subprocess.js +56 -0
  23. package/dist/mcp/tools/advance_gate.js +2 -2
  24. package/dist/mcp/tools/aggregate_run_metrics.d.ts +19 -0
  25. package/dist/mcp/tools/aggregate_run_metrics.js +139 -0
  26. package/dist/mcp/tools/apply_diff.d.ts +2 -0
  27. package/dist/mcp/tools/apply_diff.js +29 -0
  28. package/dist/mcp/tools/audit_bilocale_parity.d.ts +2 -0
  29. package/dist/mcp/tools/audit_bilocale_parity.js +146 -0
  30. package/dist/mcp/tools/audit_budget_compliance.d.ts +35 -0
  31. package/dist/mcp/tools/audit_budget_compliance.js +172 -0
  32. package/dist/mcp/tools/build.d.ts +2 -0
  33. package/dist/mcp/tools/build.js +47 -0
  34. package/dist/mcp/tools/check_lint.d.ts +2 -0
  35. package/dist/mcp/tools/check_lint.js +23 -0
  36. package/dist/mcp/tools/classify_gate.js +2 -2
  37. package/dist/mcp/tools/current_gate.js +2 -2
  38. package/dist/mcp/tools/dependency_supply_chain.d.ts +2 -0
  39. package/dist/mcp/tools/dependency_supply_chain.js +59 -0
  40. package/dist/mcp/tools/docker_compose.d.ts +2 -0
  41. package/dist/mcp/tools/docker_compose.js +24 -0
  42. package/dist/mcp/tools/e2e_playwright.d.ts +2 -0
  43. package/dist/mcp/tools/e2e_playwright.js +88 -0
  44. package/dist/mcp/tools/get_skill.js +17 -0
  45. package/dist/mcp/tools/git_commit.d.ts +2 -0
  46. package/dist/mcp/tools/git_commit.js +30 -0
  47. package/dist/mcp/tools/list_proposals.d.ts +6 -0
  48. package/dist/mcp/tools/list_proposals.js +16 -0
  49. package/dist/mcp/tools/list_skills.js +9 -1
  50. package/dist/mcp/tools/load_role.d.ts +3 -4
  51. package/dist/mcp/tools/load_role.js +11 -13
  52. package/dist/mcp/tools/propose_change.d.ts +8 -0
  53. package/dist/mcp/tools/propose_change.js +36 -0
  54. package/dist/mcp/tools/record_decision.js +25 -25
  55. package/dist/mcp/tools/review_proposal.d.ts +17 -0
  56. package/dist/mcp/tools/review_proposal.js +99 -0
  57. package/dist/mcp/tools/run_drift_audit.d.ts +11 -0
  58. package/dist/mcp/tools/run_drift_audit.js +79 -0
  59. package/dist/mcp/tools/run_tests.d.ts +2 -0
  60. package/dist/mcp/tools/run_tests.js +92 -0
  61. package/dist/mcp/tools/sign_off.js +14 -2
  62. package/dist/mcp/tools/stubs.js +30 -9
  63. package/dist/mcp/tools/verify_claim.js +33 -6
  64. package/dist/mcp_setup.d.ts +14 -3
  65. package/dist/mcp_setup.js +15 -6
  66. package/dist/shared/frontmatter.d.ts +44 -2
  67. package/dist/shared/frontmatter.js +54 -6
  68. package/dist/shared/index.d.ts +0 -5
  69. package/dist/shared/index.js +0 -5
  70. package/dist/shared/persona.d.ts +2 -2
  71. package/dist/shared/persona.js +1 -1
  72. package/dist/shared/pipeline.d.ts +46 -1
  73. package/dist/shared/tools.d.ts +1382 -16
  74. package/dist/shared/tools.js +229 -0
  75. package/dist/shared/vocabulary.d.ts +99 -4
  76. package/dist/shared/vocabulary.js +94 -5
  77. package/domains/analytics/.agents/skills/ansoff-matrix/SKILL.md +316 -300
  78. package/domains/analytics/.agents/skills/bcg-matrix/SKILL.md +345 -329
  79. package/domains/analytics/.agents/skills/blue-ocean-strategy/SKILL.md +432 -416
  80. package/domains/analytics/.agents/skills/board/SKILL.md +22 -0
  81. package/domains/analytics/.agents/skills/cohort-analysis/SKILL.md +338 -322
  82. package/domains/analytics/.agents/skills/competitive-analysis/SKILL.md +413 -395
  83. package/domains/analytics/.agents/skills/customer-journey-mapping/SKILL.md +347 -331
  84. package/domains/analytics/.agents/skills/gates/SKILL.md +388 -366
  85. package/domains/analytics/.agents/skills/handoff/SKILL.md +402 -380
  86. package/domains/analytics/.agents/skills/html-pdf-report/SKILL.md +21 -289
  87. package/domains/analytics/.agents/skills/html-pdf-report-reference/SKILL.md +325 -0
  88. package/domains/analytics/.agents/skills/html-pdf-report-reference/agents/claude.json +17 -0
  89. package/domains/analytics/.agents/skills/html-pdf-report-reference/agents/copilot.json +17 -0
  90. package/domains/analytics/.agents/skills/html-pdf-report-reference/agents/gemini.json +17 -0
  91. package/domains/analytics/.agents/skills/html-pdf-report-reference/agents/kimi.yaml +15 -0
  92. package/domains/analytics/.agents/skills/html-pdf-report-reference/agents/openai.yaml +10 -0
  93. package/domains/analytics/.agents/skills/html-pdf-report-reference/agents/qwen.json +17 -0
  94. package/domains/analytics/.agents/skills/html-pdf-report-reference/agents/skill.yaml +23 -0
  95. package/domains/analytics/.agents/skills/icp-buyer-persona/SKILL.md +407 -390
  96. package/domains/analytics/.agents/skills/jtbd-analysis/SKILL.md +357 -341
  97. package/domains/analytics/.agents/skills/karpathy-guidelines/SKILL.md +32 -0
  98. package/domains/analytics/.agents/skills/pest-analysis/SKILL.md +324 -305
  99. package/domains/analytics/.agents/skills/porters-five-forces/SKILL.md +377 -361
  100. package/domains/analytics/.agents/skills/report-design/SKILL.md +416 -398
  101. package/domains/analytics/.agents/skills/rfm-analysis/SKILL.md +330 -314
  102. package/domains/analytics/.agents/skills/session-prompt-generator/SKILL.md +400 -378
  103. package/domains/analytics/.agents/skills/swot-analysis/SKILL.md +340 -324
  104. package/domains/analytics/.agents/skills/tam-sam-som/SKILL.md +329 -312
  105. package/domains/analytics/.agents/skills/trend-analysis/SKILL.md +347 -331
  106. package/domains/analytics/.agents/skills/unit-economics/SKILL.md +430 -413
  107. package/domains/analytics/.agents/skills/value-chain-analysis/SKILL.md +346 -330
  108. package/domains/analytics/.agents/skills/web-research/SKILL.md +323 -308
  109. package/domains/analytics/AGENTS.md +1 -0
  110. package/domains/analytics/agents/auditor.md +76 -0
  111. package/domains/analytics/agents/conductor.md +11 -0
  112. package/domains/analytics/agents/data_analyst.md +11 -0
  113. package/domains/analytics/agents/designer.md +11 -0
  114. package/domains/analytics/agents/interviewer.md +11 -0
  115. package/domains/analytics/agents/layouter.md +11 -0
  116. package/domains/analytics/agents/mediator.md +11 -0
  117. package/domains/analytics/agents/researcher.md +11 -0
  118. package/domains/analytics/agents/strategist.md +11 -0
  119. package/domains/analytics/locales/en/.agents/skills/ansoff-matrix/SKILL.md +316 -300
  120. package/domains/analytics/locales/en/.agents/skills/bcg-matrix/SKILL.md +345 -329
  121. package/domains/analytics/locales/en/.agents/skills/blue-ocean-strategy/SKILL.md +432 -416
  122. package/domains/analytics/locales/en/.agents/skills/board/SKILL.md +22 -0
  123. package/domains/analytics/locales/en/.agents/skills/cohort-analysis/SKILL.md +338 -322
  124. package/domains/analytics/locales/en/.agents/skills/competitive-analysis/SKILL.md +413 -395
  125. package/domains/analytics/locales/en/.agents/skills/customer-journey-mapping/SKILL.md +347 -331
  126. package/domains/analytics/locales/en/.agents/skills/gates/SKILL.md +388 -366
  127. package/domains/analytics/locales/en/.agents/skills/handoff/SKILL.md +402 -380
  128. package/domains/analytics/locales/en/.agents/skills/html-pdf-report/SKILL.md +21 -289
  129. package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/SKILL.md +325 -0
  130. package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/agents/claude.json +17 -0
  131. package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/agents/copilot.json +17 -0
  132. package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/agents/gemini.json +17 -0
  133. package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/agents/kimi.yaml +15 -0
  134. package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/agents/openai.yaml +10 -0
  135. package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/agents/qwen.json +17 -0
  136. package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/agents/skill.yaml +29 -0
  137. package/domains/analytics/locales/en/.agents/skills/icp-buyer-persona/SKILL.md +407 -390
  138. package/domains/analytics/locales/en/.agents/skills/jtbd-analysis/SKILL.md +357 -341
  139. package/domains/analytics/locales/en/.agents/skills/karpathy-guidelines/SKILL.md +32 -0
  140. package/domains/analytics/locales/en/.agents/skills/pest-analysis/SKILL.md +324 -305
  141. package/domains/analytics/locales/en/.agents/skills/porters-five-forces/SKILL.md +377 -361
  142. package/domains/analytics/locales/en/.agents/skills/report-design/SKILL.md +416 -398
  143. package/domains/analytics/locales/en/.agents/skills/rfm-analysis/SKILL.md +330 -314
  144. package/domains/analytics/locales/en/.agents/skills/session-prompt-generator/SKILL.md +400 -378
  145. package/domains/analytics/locales/en/.agents/skills/swot-analysis/SKILL.md +340 -324
  146. package/domains/analytics/locales/en/.agents/skills/tam-sam-som/SKILL.md +329 -312
  147. package/domains/analytics/locales/en/.agents/skills/trend-analysis/SKILL.md +347 -331
  148. package/domains/analytics/locales/en/.agents/skills/unit-economics/SKILL.md +430 -413
  149. package/domains/analytics/locales/en/.agents/skills/value-chain-analysis/SKILL.md +366 -350
  150. package/domains/analytics/locales/en/.agents/skills/web-research/SKILL.md +324 -309
  151. package/domains/analytics/locales/en/AGENTS.md +1 -0
  152. package/domains/analytics/locales/en/agents/auditor.md +76 -0
  153. package/domains/analytics/locales/en/agents/conductor.md +27 -0
  154. package/domains/analytics/locales/en/agents/data_analyst.md +29 -0
  155. package/domains/analytics/locales/en/agents/designer.md +27 -0
  156. package/domains/analytics/locales/en/agents/interviewer.md +11 -0
  157. package/domains/analytics/locales/en/agents/layouter.md +11 -0
  158. package/domains/analytics/locales/en/agents/mediator.md +11 -0
  159. package/domains/analytics/locales/en/agents/researcher.md +11 -0
  160. package/domains/analytics/locales/en/agents/strategist.md +11 -0
  161. package/domains/analytics/persona/persona-base.md +94 -0
  162. package/domains/analytics/pipeline.yaml +102 -0
  163. package/domains/content/.agents/skills/audience-analysis/SKILL.md +15 -0
  164. package/domains/content/.agents/skills/board/SKILL.md +20 -0
  165. package/domains/content/.agents/skills/brand-compliance/SKILL.md +15 -0
  166. package/domains/content/.agents/skills/brand-guidelines/SKILL.md +17 -0
  167. package/domains/content/.agents/skills/competitor-content-analysis/SKILL.md +15 -0
  168. package/domains/content/.agents/skills/content-brief/SKILL.md +15 -0
  169. package/domains/content/.agents/skills/content-calendar/SKILL.md +15 -0
  170. package/domains/content/.agents/skills/content-release-gate/SKILL.md +15 -0
  171. package/domains/content/.agents/skills/content-review-checklist/SKILL.md +15 -0
  172. package/domains/content/.agents/skills/cta-optimization/SKILL.md +15 -0
  173. package/domains/content/.agents/skills/data-storytelling/SKILL.md +15 -0
  174. package/domains/content/.agents/skills/email-copywriting/SKILL.md +15 -0
  175. package/domains/content/.agents/skills/email-engagement-tiers/SKILL.md +15 -0
  176. package/domains/content/.agents/skills/fact-checking/SKILL.md +15 -0
  177. package/domains/content/.agents/skills/gates/SKILL.md +20 -0
  178. package/domains/content/.agents/skills/google-stitch-content/SKILL.md +15 -0
  179. package/domains/content/.agents/skills/handoff/SKILL.md +24 -0
  180. package/domains/content/.agents/skills/headline-formulas/SKILL.md +15 -0
  181. package/domains/content/.agents/skills/image-prompt-engineering/SKILL.md +15 -0
  182. package/domains/content/.agents/skills/karpathy-guidelines/SKILL.md +28 -0
  183. package/domains/content/.agents/skills/mailerlite-email-ops/SKILL.md +15 -0
  184. package/domains/content/.agents/skills/marketing-psychology/SKILL.md +15 -0
  185. package/domains/content/.agents/skills/moodboard/SKILL.md +15 -0
  186. package/domains/content/.agents/skills/platform-compliance/SKILL.md +15 -0
  187. package/domains/content/.agents/skills/platform-strategy/SKILL.md +15 -0
  188. package/domains/content/.agents/skills/platform-visual-specs/SKILL.md +15 -0
  189. package/domains/content/.agents/skills/readability-scoring/SKILL.md +15 -0
  190. package/domains/content/.agents/skills/seo-copywriting/SKILL.md +15 -0
  191. package/domains/content/.agents/skills/social-media-formats/SKILL.md +15 -0
  192. package/domains/content/.agents/skills/source-verification/SKILL.md +15 -0
  193. package/domains/content/.agents/skills/storytelling-framework/SKILL.md +15 -0
  194. package/domains/content/.agents/skills/tone-of-voice/SKILL.md +15 -0
  195. package/domains/content/.agents/skills/topic-research/SKILL.md +15 -0
  196. package/domains/content/.agents/skills/trend-research/SKILL.md +15 -0
  197. package/domains/content/.agents/skills/visual-brief/SKILL.md +15 -0
  198. package/domains/content/AGENTS.md +4 -0
  199. package/domains/content/agents/auditor.md +76 -0
  200. package/domains/content/agents/conductor.md +11 -0
  201. package/domains/content/agents/copywriter.md +11 -0
  202. package/domains/content/agents/researcher.md +11 -0
  203. package/domains/content/agents/reviewer.md +11 -0
  204. package/domains/content/agents/strategist.md +11 -0
  205. package/domains/content/agents/visual_concept.md +11 -0
  206. package/domains/content/locales/en/.agents/skills/audience-analysis/SKILL.md +15 -0
  207. package/domains/content/locales/en/.agents/skills/board/SKILL.md +20 -0
  208. package/domains/content/locales/en/.agents/skills/brand-compliance/SKILL.md +15 -0
  209. package/domains/content/locales/en/.agents/skills/brand-guidelines/SKILL.md +17 -0
  210. package/domains/content/locales/en/.agents/skills/competitor-content-analysis/SKILL.md +15 -0
  211. package/domains/content/locales/en/.agents/skills/content-brief/SKILL.md +15 -0
  212. package/domains/content/locales/en/.agents/skills/content-calendar/SKILL.md +15 -0
  213. package/domains/content/locales/en/.agents/skills/content-release-gate/SKILL.md +15 -0
  214. package/domains/content/locales/en/.agents/skills/content-review-checklist/SKILL.md +15 -0
  215. package/domains/content/locales/en/.agents/skills/cta-optimization/SKILL.md +15 -0
  216. package/domains/content/locales/en/.agents/skills/data-storytelling/SKILL.md +15 -0
  217. package/domains/content/locales/en/.agents/skills/email-copywriting/SKILL.md +15 -0
  218. package/domains/content/locales/en/.agents/skills/email-engagement-tiers/SKILL.md +15 -0
  219. package/domains/content/locales/en/.agents/skills/fact-checking/SKILL.md +15 -0
  220. package/domains/content/locales/en/.agents/skills/gates/SKILL.md +20 -0
  221. package/domains/content/locales/en/.agents/skills/google-stitch-content/SKILL.md +15 -0
  222. package/domains/content/locales/en/.agents/skills/handoff/SKILL.md +24 -0
  223. package/domains/content/locales/en/.agents/skills/headline-formulas/SKILL.md +15 -0
  224. package/domains/content/locales/en/.agents/skills/image-prompt-engineering/SKILL.md +15 -0
  225. package/domains/content/locales/en/.agents/skills/karpathy-guidelines/SKILL.md +30 -1
  226. package/domains/content/locales/en/.agents/skills/mailerlite-email-ops/SKILL.md +15 -0
  227. package/domains/content/locales/en/.agents/skills/marketing-psychology/SKILL.md +15 -0
  228. package/domains/content/locales/en/.agents/skills/moodboard/SKILL.md +15 -0
  229. package/domains/content/locales/en/.agents/skills/platform-compliance/SKILL.md +15 -0
  230. package/domains/content/locales/en/.agents/skills/platform-strategy/SKILL.md +15 -0
  231. package/domains/content/locales/en/.agents/skills/platform-visual-specs/SKILL.md +15 -0
  232. package/domains/content/locales/en/.agents/skills/readability-scoring/SKILL.md +15 -0
  233. package/domains/content/locales/en/.agents/skills/seo-copywriting/SKILL.md +15 -0
  234. package/domains/content/locales/en/.agents/skills/social-media-formats/SKILL.md +15 -0
  235. package/domains/content/locales/en/.agents/skills/source-verification/SKILL.md +15 -0
  236. package/domains/content/locales/en/.agents/skills/storytelling-framework/SKILL.md +15 -0
  237. package/domains/content/locales/en/.agents/skills/tone-of-voice/SKILL.md +15 -0
  238. package/domains/content/locales/en/.agents/skills/topic-research/SKILL.md +15 -0
  239. package/domains/content/locales/en/.agents/skills/trend-research/SKILL.md +15 -0
  240. package/domains/content/locales/en/.agents/skills/visual-brief/SKILL.md +15 -0
  241. package/domains/content/locales/en/AGENTS.md +4 -0
  242. package/domains/content/locales/en/agents/auditor.md +76 -0
  243. package/domains/content/locales/en/agents/conductor.md +12 -0
  244. package/domains/content/locales/en/agents/copywriter.md +12 -0
  245. package/domains/content/locales/en/agents/researcher.md +12 -0
  246. package/domains/content/locales/en/agents/reviewer.md +12 -0
  247. package/domains/content/locales/en/agents/strategist.md +12 -0
  248. package/domains/content/locales/en/agents/visual_concept.md +12 -0
  249. package/domains/content/persona/persona-base.md +94 -0
  250. package/domains/content/pipeline.yaml +96 -0
  251. package/domains/development/.agents/skills/adr-log/SKILL.md +1 -0
  252. package/domains/development/.agents/skills/design-intake/SKILL.md +0 -4
  253. package/domains/development/.agents/skills/karpathy-guidelines/SKILL.md +2 -1
  254. package/domains/development/.agents/skills/lava-flow-legacy-detection/SKILL.md +15 -1
  255. package/domains/development/.agents/skills/mcp-integration/SKILL.md +211 -0
  256. package/domains/development/.agents/skills/mcp-integration/agents/claude.json +22 -0
  257. package/domains/development/.agents/skills/mcp-integration/agents/copilot.json +22 -0
  258. package/domains/development/.agents/skills/mcp-integration/agents/gemini.json +22 -0
  259. package/domains/development/.agents/skills/mcp-integration/agents/kimi.yaml +18 -0
  260. package/domains/development/.agents/skills/mcp-integration/agents/openai.yaml +8 -0
  261. package/domains/development/.agents/skills/mcp-integration/agents/qwen.json +22 -0
  262. package/domains/development/.agents/skills/mcp-integration/agents/skill.yaml +26 -0
  263. package/domains/development/.agents/skills/qa-ui-a11y-smoke/SKILL.md +1 -1
  264. package/domains/development/.agents/skills/ui-a11y-smoke-review/SKILL.md +1 -1
  265. package/domains/development/AGENTS.md +1 -0
  266. package/domains/development/AGENTS.yaml +1 -0
  267. package/domains/development/agents/architect.md +13 -1
  268. package/domains/development/agents/auditor.md +74 -0
  269. package/domains/development/agents/conductor.md +14 -3
  270. package/domains/development/agents/devops.md +8 -9
  271. package/domains/development/agents/reviewer.md +12 -0
  272. package/domains/development/agents/senior_full_stack.md +12 -0
  273. package/domains/development/agents/tester.md +10 -16
  274. package/domains/development/locales/en/.agents/skills/adr-log/SKILL.md +1 -0
  275. package/domains/development/locales/en/.agents/skills/current-state-analysis/SKILL.md +256 -172
  276. package/domains/development/locales/en/.agents/skills/karpathy-guidelines/SKILL.md +2 -1
  277. package/domains/development/locales/en/.agents/skills/lava-flow-legacy-detection/SKILL.md +15 -1
  278. package/domains/development/locales/en/.agents/skills/mcp-integration/SKILL.md +211 -0
  279. package/domains/development/locales/en/.agents/skills/mcp-integration/agents/claude.json +22 -0
  280. package/domains/development/locales/en/.agents/skills/mcp-integration/agents/copilot.json +22 -0
  281. package/domains/development/locales/en/.agents/skills/mcp-integration/agents/gemini.json +22 -0
  282. package/domains/development/locales/en/.agents/skills/mcp-integration/agents/kimi.yaml +18 -0
  283. package/domains/development/locales/en/.agents/skills/mcp-integration/agents/openai.yaml +8 -0
  284. package/domains/development/locales/en/.agents/skills/mcp-integration/agents/qwen.json +22 -0
  285. package/domains/development/locales/en/.agents/skills/mcp-integration/agents/skill.yaml +26 -0
  286. package/domains/development/locales/en/.agents/skills/qa-ui-a11y-smoke/SKILL.md +1 -1
  287. package/domains/development/locales/en/.agents/skills/ui-a11y-smoke-review/SKILL.md +1 -1
  288. package/domains/development/locales/en/AGENTS.md +5 -0
  289. package/domains/development/locales/en/AGENTS.yaml +1 -0
  290. package/domains/development/locales/en/agents/architect.md +13 -1
  291. package/domains/development/locales/en/agents/auditor.md +74 -0
  292. package/domains/development/locales/en/agents/conductor.md +14 -3
  293. package/domains/development/locales/en/agents/devops.md +8 -9
  294. package/domains/development/locales/en/agents/reviewer.md +12 -0
  295. package/domains/development/locales/en/agents/senior_full_stack.md +12 -0
  296. package/domains/development/locales/en/agents/tester.md +10 -16
  297. package/domains/development/persona/persona-base.md +94 -0
  298. package/domains/product/.agents/skills/aarrr-metrics/SKILL.md +451 -433
  299. package/domains/product/.agents/skills/ab-test-design/SKILL.md +428 -412
  300. package/domains/product/.agents/skills/acceptance-criteria/SKILL.md +422 -406
  301. package/domains/product/.agents/skills/assumption-mapping/SKILL.md +323 -307
  302. package/domains/product/.agents/skills/board/SKILL.md +24 -0
  303. package/domains/product/.agents/skills/design-brief/SKILL.md +433 -418
  304. package/domains/product/.agents/skills/epic-breakdown/SKILL.md +435 -420
  305. package/domains/product/.agents/skills/gates/SKILL.md +470 -446
  306. package/domains/product/.agents/skills/gtm-brief/SKILL.md +18 -321
  307. package/domains/product/.agents/skills/gtm-brief-reference/SKILL.md +348 -0
  308. package/domains/product/.agents/skills/gtm-brief-reference/agents/claude.json +17 -0
  309. package/domains/product/.agents/skills/gtm-brief-reference/agents/copilot.json +17 -0
  310. package/domains/product/.agents/skills/gtm-brief-reference/agents/gemini.json +17 -0
  311. package/domains/product/.agents/skills/gtm-brief-reference/agents/kimi.yaml +15 -0
  312. package/domains/product/.agents/skills/gtm-brief-reference/agents/openai.yaml +10 -0
  313. package/domains/product/.agents/skills/gtm-brief-reference/agents/qwen.json +17 -0
  314. package/domains/product/.agents/skills/gtm-brief-reference/agents/skill.yaml +22 -0
  315. package/domains/product/.agents/skills/handoff/SKILL.md +463 -439
  316. package/domains/product/.agents/skills/html-pdf-report/SKILL.md +21 -663
  317. package/domains/product/.agents/skills/html-pdf-report-reference/SKILL.md +699 -0
  318. package/domains/product/.agents/skills/html-pdf-report-reference/agents/claude.json +17 -0
  319. package/domains/product/.agents/skills/html-pdf-report-reference/agents/copilot.json +17 -0
  320. package/domains/product/.agents/skills/html-pdf-report-reference/agents/gemini.json +17 -0
  321. package/domains/product/.agents/skills/html-pdf-report-reference/agents/kimi.yaml +15 -0
  322. package/domains/product/.agents/skills/html-pdf-report-reference/agents/openai.yaml +10 -0
  323. package/domains/product/.agents/skills/html-pdf-report-reference/agents/qwen.json +17 -0
  324. package/domains/product/.agents/skills/html-pdf-report-reference/agents/skill.yaml +22 -0
  325. package/domains/product/.agents/skills/hypothesis-template/SKILL.md +484 -469
  326. package/domains/product/.agents/skills/jtbd-canvas/SKILL.md +274 -258
  327. package/domains/product/.agents/skills/kano-model/SKILL.md +370 -355
  328. package/domains/product/.agents/skills/karpathy-guidelines/SKILL.md +36 -0
  329. package/domains/product/.agents/skills/launch-checklist/SKILL.md +434 -419
  330. package/domains/product/.agents/skills/moscow-prioritization/SKILL.md +407 -392
  331. package/domains/product/.agents/skills/north-star-metric/SKILL.md +317 -301
  332. package/domains/product/.agents/skills/okr-framework/SKILL.md +299 -284
  333. package/domains/product/.agents/skills/opportunity-solution-tree/SKILL.md +472 -456
  334. package/domains/product/.agents/skills/prd-template/SKILL.md +18 -258
  335. package/domains/product/.agents/skills/prd-template-reference/SKILL.md +285 -0
  336. package/domains/product/.agents/skills/prd-template-reference/agents/claude.json +17 -0
  337. package/domains/product/.agents/skills/prd-template-reference/agents/copilot.json +17 -0
  338. package/domains/product/.agents/skills/prd-template-reference/agents/gemini.json +17 -0
  339. package/domains/product/.agents/skills/prd-template-reference/agents/kimi.yaml +16 -0
  340. package/domains/product/.agents/skills/prd-template-reference/agents/openai.yaml +10 -0
  341. package/domains/product/.agents/skills/prd-template-reference/agents/qwen.json +17 -0
  342. package/domains/product/.agents/skills/prd-template-reference/agents/skill.yaml +23 -0
  343. package/domains/product/.agents/skills/problem-statement/SKILL.md +327 -312
  344. package/domains/product/.agents/skills/product-roadmap/SKILL.md +320 -304
  345. package/domains/product/.agents/skills/product-vision/SKILL.md +409 -394
  346. package/domains/product/.agents/skills/release-notes/SKILL.md +18 -258
  347. package/domains/product/.agents/skills/release-notes-reference/SKILL.md +285 -0
  348. package/domains/product/.agents/skills/release-notes-reference/agents/claude.json +17 -0
  349. package/domains/product/.agents/skills/release-notes-reference/agents/copilot.json +17 -0
  350. package/domains/product/.agents/skills/release-notes-reference/agents/gemini.json +17 -0
  351. package/domains/product/.agents/skills/release-notes-reference/agents/kimi.yaml +15 -0
  352. package/domains/product/.agents/skills/release-notes-reference/agents/openai.yaml +10 -0
  353. package/domains/product/.agents/skills/release-notes-reference/agents/qwen.json +17 -0
  354. package/domains/product/.agents/skills/release-notes-reference/agents/skill.yaml +22 -0
  355. package/domains/product/.agents/skills/report-design/SKILL.md +17 -307
  356. package/domains/product/.agents/skills/report-design-reference/SKILL.md +331 -0
  357. package/domains/product/.agents/skills/report-design-reference/agents/claude.json +17 -0
  358. package/domains/product/.agents/skills/report-design-reference/agents/copilot.json +17 -0
  359. package/domains/product/.agents/skills/report-design-reference/agents/gemini.json +17 -0
  360. package/domains/product/.agents/skills/report-design-reference/agents/kimi.yaml +15 -0
  361. package/domains/product/.agents/skills/report-design-reference/agents/openai.yaml +10 -0
  362. package/domains/product/.agents/skills/report-design-reference/agents/qwen.json +17 -0
  363. package/domains/product/.agents/skills/report-design-reference/agents/skill.yaml +22 -0
  364. package/domains/product/.agents/skills/rice-scoring/SKILL.md +266 -251
  365. package/domains/product/.agents/skills/saas-metrics/SKILL.md +422 -404
  366. package/domains/product/.agents/skills/session-prompt-generator/SKILL.md +474 -450
  367. package/domains/product/.agents/skills/user-flow/SKILL.md +491 -476
  368. package/domains/product/.agents/skills/user-interview-script/SKILL.md +315 -298
  369. package/domains/product/.agents/skills/user-story/SKILL.md +401 -385
  370. package/domains/product/.agents/skills/wsjf-scoring/SKILL.md +333 -315
  371. package/domains/product/AGENTS.md +5 -0
  372. package/domains/product/AGENTS.yaml +1 -0
  373. package/domains/product/agents/auditor.md +76 -0
  374. package/domains/product/agents/conductor.md +11 -0
  375. package/domains/product/agents/data_analyst.md +11 -0
  376. package/domains/product/agents/designer.md +11 -0
  377. package/domains/product/agents/discovery.md +11 -0
  378. package/domains/product/agents/layouter.md +11 -0
  379. package/domains/product/agents/mediator.md +11 -0
  380. package/domains/product/agents/pm.md +11 -0
  381. package/domains/product/agents/product_strategist.md +11 -0
  382. package/domains/product/agents/tech_lead.md +11 -0
  383. package/domains/product/agents/ux_designer.md +11 -0
  384. package/domains/product/locales/en/.agents/skills/aarrr-metrics/SKILL.md +451 -433
  385. package/domains/product/locales/en/.agents/skills/ab-test-design/SKILL.md +428 -412
  386. package/domains/product/locales/en/.agents/skills/acceptance-criteria/SKILL.md +422 -406
  387. package/domains/product/locales/en/.agents/skills/assumption-mapping/SKILL.md +323 -307
  388. package/domains/product/locales/en/.agents/skills/board/SKILL.md +24 -0
  389. package/domains/product/locales/en/.agents/skills/design-brief/SKILL.md +433 -418
  390. package/domains/product/locales/en/.agents/skills/epic-breakdown/SKILL.md +435 -420
  391. package/domains/product/locales/en/.agents/skills/gates/SKILL.md +470 -446
  392. package/domains/product/locales/en/.agents/skills/gtm-brief/SKILL.md +18 -321
  393. package/domains/product/locales/en/.agents/skills/gtm-brief-reference/SKILL.md +348 -0
  394. package/domains/product/locales/en/.agents/skills/gtm-brief-reference/agents/claude.json +17 -0
  395. package/domains/product/locales/en/.agents/skills/gtm-brief-reference/agents/copilot.json +17 -0
  396. package/domains/product/locales/en/.agents/skills/gtm-brief-reference/agents/gemini.json +17 -0
  397. package/domains/product/locales/en/.agents/skills/gtm-brief-reference/agents/kimi.yaml +15 -0
  398. package/domains/product/locales/en/.agents/skills/gtm-brief-reference/agents/openai.yaml +10 -0
  399. package/domains/product/locales/en/.agents/skills/gtm-brief-reference/agents/qwen.json +17 -0
  400. package/domains/product/locales/en/.agents/skills/gtm-brief-reference/agents/skill.yaml +22 -0
  401. package/domains/product/locales/en/.agents/skills/handoff/SKILL.md +463 -439
  402. package/domains/product/locales/en/.agents/skills/html-pdf-report/SKILL.md +21 -663
  403. package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/SKILL.md +699 -0
  404. package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/agents/claude.json +17 -0
  405. package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/agents/copilot.json +17 -0
  406. package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/agents/gemini.json +17 -0
  407. package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/agents/kimi.yaml +15 -0
  408. package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/agents/openai.yaml +10 -0
  409. package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/agents/qwen.json +17 -0
  410. package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/agents/skill.yaml +22 -0
  411. package/domains/product/locales/en/.agents/skills/hypothesis-template/SKILL.md +484 -469
  412. package/domains/product/locales/en/.agents/skills/jtbd-canvas/SKILL.md +273 -257
  413. package/domains/product/locales/en/.agents/skills/kano-model/SKILL.md +370 -355
  414. package/domains/product/locales/en/.agents/skills/karpathy-guidelines/SKILL.md +36 -0
  415. package/domains/product/locales/en/.agents/skills/launch-checklist/SKILL.md +434 -419
  416. package/domains/product/locales/en/.agents/skills/moscow-prioritization/SKILL.md +407 -392
  417. package/domains/product/locales/en/.agents/skills/north-star-metric/SKILL.md +317 -301
  418. package/domains/product/locales/en/.agents/skills/okr-framework/SKILL.md +299 -284
  419. package/domains/product/locales/en/.agents/skills/opportunity-solution-tree/SKILL.md +472 -456
  420. package/domains/product/locales/en/.agents/skills/prd-template/SKILL.md +18 -258
  421. package/domains/product/locales/en/.agents/skills/prd-template-reference/SKILL.md +285 -0
  422. package/domains/product/locales/en/.agents/skills/prd-template-reference/agents/claude.json +16 -0
  423. package/domains/product/locales/en/.agents/skills/prd-template-reference/agents/copilot.json +16 -0
  424. package/domains/product/locales/en/.agents/skills/prd-template-reference/agents/gemini.json +16 -0
  425. package/domains/product/locales/en/.agents/skills/prd-template-reference/agents/kimi.yaml +15 -0
  426. package/domains/product/locales/en/.agents/skills/prd-template-reference/agents/openai.yaml +10 -0
  427. package/domains/product/locales/en/.agents/skills/prd-template-reference/agents/qwen.json +16 -0
  428. package/domains/product/locales/en/.agents/skills/prd-template-reference/agents/skill.yaml +22 -0
  429. package/domains/product/locales/en/.agents/skills/problem-statement/SKILL.md +327 -312
  430. package/domains/product/locales/en/.agents/skills/product-roadmap/SKILL.md +321 -305
  431. package/domains/product/locales/en/.agents/skills/product-vision/SKILL.md +410 -395
  432. package/domains/product/locales/en/.agents/skills/release-notes/SKILL.md +18 -258
  433. package/domains/product/locales/en/.agents/skills/release-notes-reference/SKILL.md +285 -0
  434. package/domains/product/locales/en/.agents/skills/release-notes-reference/agents/claude.json +16 -0
  435. package/domains/product/locales/en/.agents/skills/release-notes-reference/agents/copilot.json +16 -0
  436. package/domains/product/locales/en/.agents/skills/release-notes-reference/agents/gemini.json +16 -0
  437. package/domains/product/locales/en/.agents/skills/release-notes-reference/agents/kimi.yaml +14 -0
  438. package/domains/product/locales/en/.agents/skills/release-notes-reference/agents/openai.yaml +10 -0
  439. package/domains/product/locales/en/.agents/skills/release-notes-reference/agents/qwen.json +16 -0
  440. package/domains/product/locales/en/.agents/skills/release-notes-reference/agents/skill.yaml +21 -0
  441. package/domains/product/locales/en/.agents/skills/report-design/SKILL.md +17 -307
  442. package/domains/product/locales/en/.agents/skills/report-design-reference/SKILL.md +331 -0
  443. package/domains/product/locales/en/.agents/skills/report-design-reference/agents/claude.json +17 -0
  444. package/domains/product/locales/en/.agents/skills/report-design-reference/agents/copilot.json +17 -0
  445. package/domains/product/locales/en/.agents/skills/report-design-reference/agents/gemini.json +17 -0
  446. package/domains/product/locales/en/.agents/skills/report-design-reference/agents/kimi.yaml +15 -0
  447. package/domains/product/locales/en/.agents/skills/report-design-reference/agents/openai.yaml +10 -0
  448. package/domains/product/locales/en/.agents/skills/report-design-reference/agents/qwen.json +17 -0
  449. package/domains/product/locales/en/.agents/skills/report-design-reference/agents/skill.yaml +22 -0
  450. package/domains/product/locales/en/.agents/skills/rice-scoring/SKILL.md +266 -251
  451. package/domains/product/locales/en/.agents/skills/saas-metrics/SKILL.md +422 -404
  452. package/domains/product/locales/en/.agents/skills/session-prompt-generator/SKILL.md +474 -450
  453. package/domains/product/locales/en/.agents/skills/user-flow/SKILL.md +491 -476
  454. package/domains/product/locales/en/.agents/skills/user-interview-script/SKILL.md +314 -297
  455. package/domains/product/locales/en/.agents/skills/user-story/SKILL.md +401 -385
  456. package/domains/product/locales/en/.agents/skills/wsjf-scoring/SKILL.md +333 -315
  457. package/domains/product/locales/en/AGENTS.md +5 -0
  458. package/domains/product/locales/en/agents/auditor.md +76 -0
  459. package/domains/product/locales/en/agents/conductor.md +11 -0
  460. package/domains/product/locales/en/agents/data_analyst.md +11 -0
  461. package/domains/product/locales/en/agents/designer.md +11 -0
  462. package/domains/product/locales/en/agents/discovery.md +11 -0
  463. package/domains/product/locales/en/agents/layouter.md +11 -0
  464. package/domains/product/locales/en/agents/mediator.md +11 -0
  465. package/domains/product/locales/en/agents/pm.md +11 -0
  466. package/domains/product/locales/en/agents/product_strategist.md +11 -0
  467. package/domains/product/locales/en/agents/tech_lead.md +11 -0
  468. package/domains/product/locales/en/agents/ux_designer.md +11 -0
  469. package/domains/product/persona/persona-base.md +94 -0
  470. package/domains/product/pipeline.yaml +115 -0
  471. package/package.json +72 -70
@@ -1,476 +1,491 @@
1
- ---
2
- name: user-flow
3
- description: Documenting user flows — steps, decision points, happy path + error states
4
- ---
5
- # User Flow
6
-
7
- > **Category:** UX · **Slug:** `user-flow`
8
-
9
- ## When to Use
10
-
11
- - For every non-trivial multi-step flow in a PRD.
12
- - Before design — flows align the team on happy path + edges.
13
- - In specification — flows map to user stories.
14
- - For onboarding / activation analysis — identify drop-off points.
15
-
16
- ## Input
17
-
18
- | Field | Required | Description |
19
- |-------|:--------:|-------------|
20
- | User story / PRD | ✅ | What the flow should accomplish |
21
- | User persona | ✅ | For whom |
22
- | Entry points | ✅ | Where the user enters the flow |
23
- | Exit points | ✅ | Success vs abandon vs errors |
24
- | Existing flow (if modification) | ⬚ | Current state reference |
25
-
26
- ## Data Sources
27
-
28
- 1. User interviewshow they do it now.
29
- 2. Product analytics — drop-off data for existing flows.
30
- 3. Support tickets — pain points.
31
- 4. Competitor flows — baseline expectations.
32
-
33
- ### Related Skills
34
-
35
- | Skill | What we take | When to invoke |
36
- |-------|-------------|----------------|
37
- | `user-story` | Stories flow segments | Parent concept |
38
- | `acceptance-criteria` | AC edge / error cases in flow | After flow |
39
- | `design-brief` | Flow input for design | Before brief |
40
- | `jtbd-canvas` | Job context for flow trigger | For understanding entry |
41
-
42
- ## Flow Types
43
-
44
- 1. **Task flow**linear path (create account, submit form)
45
- 2. **Decision flow**branching (onboarding based on role)
46
- 3. **Error flow**what happens when things go wrong
47
- 4. **Recovery flow** — how user gets back on track
48
-
49
- ## User Flow Doc Structure
50
-
51
- 1. **Flow name + purpose**
52
- 2. **Actors** who uses this flow
53
- 3. **Preconditions**state required to enter
54
- 4. **Entry points** how user arrives
55
- 5. **Happy path** step-by-step
56
- 6. **Decision points** — branching
57
- 7. **Error states** — each failure mode
58
- 8. **Exit points** — success, abandon, fail
59
- 9. **Metrics** — what we'll measure
60
-
61
- ## Protocol
62
-
63
- ### Step 0 — Define Boundaries
64
-
65
- - Entry: where user flow starts (signup CTA, navigation click, email link)
66
- - Exit: where it ends (success state, error, abandonment)
67
- - Preconditions: auth state, permissions, data state
68
-
69
- ### Step 1Happy Path (Sequential Steps)
70
-
71
- Linear sequence from entry to successful exit. Steps user-visible actions + system responses.
72
-
73
- Notation:
74
- - **→** sequential step
75
- - **[Action]** user action
76
- - **(System)** system response
77
- - **{Data}** state change
78
-
79
- Example:
80
- ```
81
- [Click "Invite teammate"]
82
- (Modal opens with email field)
83
- [Type email + assign role] →
84
- [Click "Send invite"]
85
- {Invite record created} →
86
- (Email sent to recipient)
87
- (Success toast: «Invite sent») →
88
- Exit: invitation pending
89
- ```
90
-
91
- ### Step 2 — Decision Points
92
-
93
- Where flow branches based on:
94
- - User input (role selection, plan choice)
95
- - System state (feature availability, quota)
96
- - Data (existing user vs new, permissions)
97
-
98
- Diagram: use if/else or case statements:
99
-
100
- ```
101
- After [Enter email]:
102
- IF email is existing user:
103
- → Step: Existing user flow (add to team)
104
- ELIF email domain blocked by policy:
105
- → Error: «Domain not allowed by your org»
106
- ELSE:
107
- → Continue: Invite new user flow
108
- ```
109
-
110
- ### Step 3 Error States
111
-
112
- For each system failure mode:
113
- - **Trigger** what causes it
114
- - **User-visible message** — exact copy
115
- - **Recovery action** — what user can do
116
- - **System state** — logged? retryable?
117
-
118
- Common errors:
119
- - Network failure
120
- - Validation failure
121
- - Permission denied
122
- - Quota exceeded
123
- - 3rd party integration down
124
- - Stale data / concurrent modification
125
-
126
- ### Step 4 — Empty / Loading States
127
-
128
- - **Empty state:** first-time user, no data yet. What do they see?
129
- - **Loading state:** what during network calls?
130
- - **Partial state:** some data loaded, some loading?
131
-
132
- ### Step 5 — Exit Points
133
-
134
- Categorize all exits:
135
- - **Success:** task completed
136
- - **Intentional abandon:** user cancelled
137
- - **Implicit abandon:** user left without action (session timeout, closed tab)
138
- - **Failure:** hard error, unrecoverable
139
-
140
- For each exit:
141
- - What happens in system
142
- - What user feels
143
- - Can they re-enter flow?
144
-
145
- ### Step 6 Metrics Instrumentation
146
-
147
- Per flow step:
148
- - **Event name** (e.g., `invite_modal_opened`, `invite_sent_success`)
149
- - **Properties** (role, source, etc.)
150
- - **Conversion funnel** — start to success rate
151
- - **Drop-off per step**
152
-
153
- This feeds into AARRR + success metrics.
154
-
155
- ### Step 7 — Visualization
156
-
157
- Options:
158
- - **ASCII diagram** (for text-based docs)
159
- - **Mermaid** (GitHub renders inline)
160
- - **Figma / Whimsical / Miro** (for presentations)
161
-
162
- Mermaid example:
163
- ```mermaid
164
- flowchart TD
165
- A[Click Invite] --> B{User in system?}
166
- B -->|Yes| C[Add to team flow]
167
- B -->|No| D[Send invite]
168
- D --> E[Success toast]
169
- D --> F[Error: email invalid]
170
- F --> D
171
- ```
172
-
173
- ## Validation (Quality Gate)
174
-
175
- - [ ] Entry + exit points are explicit
176
- - [ ] Preconditions listed
177
- - [ ] Happy path step-by-step
178
- - [ ] ≥ 2 decision points (except trivially linear)
179
- - [ ] ≥ 3 error states with recovery
180
- - [ ] Empty / loading states covered
181
- - [ ] All exits categorized (success / abandon / fail)
182
- - [ ] Metric events defined per step
183
- - [ ] Visualized (diagram)
184
-
185
- ## Handoff
186
-
187
- The result is input for:
188
- - **`design-brief`** flow → screens needed
189
- - **UX Designer** → wireframes per step
190
- - **Engineering** API design per action
191
- - **Data Analyst** instrumentation plan
192
- - **QA** test scenarios per flow
193
-
194
- Format: user flow doc (markdown + Mermaid/diagram). Via `$handoff`.
195
-
196
- ## Anti-patterns
197
-
198
- | Error | Why it's bad | How to do it right |
199
- |-------|-------------|-------------------|
200
- | Happy path only | Production is edges | ≥ 3 error states |
201
- | No decision points | Linear ≠ reality | Explicit branching |
202
- | No empty state | First-time users confused | Always cover empty |
203
- | No metrics | Can't measure funnel | Events per step |
204
- | Text walls without diagram | Hard to follow | Visualize |
205
- | No recovery paths | Users stuck | Every error has recovery |
206
-
207
- ## Template
208
-
209
- ```markdown
210
- # User Flow: [Name]
211
-
212
- ## Purpose
213
- [What user accomplishes]
214
-
215
- ## Actors
216
- [Primary user + any secondary]
217
-
218
- ## Preconditions
219
- - Auth: [logged in as X]
220
- - State: [data state required]
221
-
222
- ## Entry Points
223
- 1. [Source A]
224
- 2. [Source B]
225
-
226
- ## Happy Path
227
- 1. [Action] → (System response)
228
- 2. ...
229
-
230
- ## Decision Points
231
- - After step X:
232
- - IF [condition] → [branch A]
233
- - ELSE → [branch B]
234
-
235
- ## Error States
236
- | # | Trigger | Message | Recovery |
237
- | 1 | Invalid email | «Email format invalid» | Re-enter |
238
-
239
- ## Empty / Loading States
240
- - Empty: [state]
241
- - Loading: [state]
242
-
243
- ## Exit Points
244
- - Success: [end state]
245
- - Abandon: [what happens]
246
- - Fail: [what happens]
247
-
248
- ## Metrics
249
- - Event: `flow_started` — when entering
250
- - Event: `flow_step_X_completed` — per step
251
- - Event: `flow_succeeded` success exit
252
- - Event: `flow_abandoned` abandon exit
253
- - Funnel: start → success conversion
254
-
255
- ## Diagram
256
- [Mermaid or link to Figma]
257
- ```
258
-
259
- ## Worked Example — TeamFlow AI-Enabled 1:1 Full Flow
260
-
261
- ```markdown
262
- # User Flow: AI-Enabled 1:1 (End-to-End)
263
-
264
- ## Purpose
265
- Manager conducts 1:1 with AI assistance from scheduling to reviewing AI-generated summary + action items.
266
- This covers Stories S1, S2, S3, S4, S5 end-to-end.
267
-
268
- ## Actors
269
- - **Primary:** People Manager (end-user, 5-15 direct reports)
270
- - **Secondary:** Direct Report (sees AI consent prompt, may view shared summary)
271
- - **Tertiary:** Admin (sets org-wide policy, affects defaults)
272
-
273
- ## Preconditions
274
- - **Auth:** Manager logged into TeamFlow, on Team Tier account
275
- - **State:** Manager has upcoming 1:1 scheduled, AI feature enabled at org level
276
- - **Data:** Report has TeamFlow account + consented to AI recording (one-time org-level or per-meeting)
277
- - **Browser:** Chrome/Edge/Safari/Firefox supporting MediaRecorder API
278
-
279
- ## Entry Points
280
- 1. Click on 1:1 in TeamFlow calendar view meeting details page
281
- 2. Email reminder «Your 1:1 with Sarah starts in 10 min» → click link
282
- 3. Slack integration notification (if enabled by user)
283
-
284
- ## Happy Path
285
-
286
- ### Before meeting (pre-start)
287
- ```
288
- 1. [Manager views 1:1 meeting page]
289
- (Page shows meeting info + attendees + previous summary)
290
-
291
- 2. [Manager toggles "Use AI this meeting" ON]
292
- {State: ai_enabled = true, saved to meeting record}
293
- → (Confirmation toast: "AI will generate summary after meeting ends")
294
-
295
- 3. [Manager clicks "Start meeting"]
296
- (System prompts for microphone permission if not granted)
297
- (Once granted: recording starts + AI transcription begins)
298
- → {Event: meeting_started with ai_enabled=true}
299
- ```
300
-
301
- ### During meeting
302
- ```
303
- 4. [Manager + Report converse normally]
304
- → (UI shows: recording indicator, duration timer, «AI is listening» subtle banner)
305
- → (Transcription accumulates in memory, not visible to user)
306
- (Report sees same indicators through own TeamFlow session)
307
-
308
- 5. Optional: [Manager clicks "pause AI" for sensitive topic]
309
- → {Transcription suspended}
310
- (UI shows: «AI paused — resume when ready»)
311
- After 30 sec or resume click transcription resumes
312
-
313
- 6. [Manager adds manual notes (optional) in parallel text area]
314
- → {Manual notes saved separately from AI transcript}
315
- ```
316
-
317
- ### End of meeting
318
- ```
319
- 7. [Manager clicks "End meeting"]
320
- {Event: meeting_ended with duration, manual_notes_length}
321
- → (Modal: "AI is generating summary you can close this or stay to review")
322
-
323
- 8. [System generates summary via LLM API]
324
- → {Latency target: <60s p95}
325
- → (Streaming UI: sections populate as generated)
326
- {Event: ai_summary_generated, ai_provider, latency, confidence_avg}
327
-
328
- 9. [Manager sees summary review interface]
329
- (Sections visible: Topics discussed, Decisions, Action items with confidence indicators)
330
- → (Auto-save of draft state)
331
- ```
332
-
333
- ### Review phase
334
- ```
335
- 10. [Manager reviews summary content]
336
- → (Can read, optionally scroll, decide to edit or approve)
337
-
338
- 11A. [Manager is satisfied clicks "Approve"]
339
- (Confirmation modal: "Approve summary? Action items will be tracked.")
340
- [Manager confirms]
341
- → {Event: ai_summary_approved, time_to_approve}
342
- → (Summary moves to «Approved», action items flow to tracking queue)
343
- (Redirect to 1:1 history view)
344
-
345
- 11B. [Manager wants edits → enters edit mode]
346
- → (Inline editor enabled for each section)
347
- → {State: editing_mode = true}
348
- ...continue to Scenario Edit
349
- ```
350
-
351
- ## Decision Points
352
-
353
- ```
354
- After Step 2 (AI toggle):
355
- IF org policy "AI disabled" toggle greyed out, tooltip «Contact admin»
356
- ELIF report not consented show consent prompt before manager can enable
357
- ELIF first-time user show quick onboarding tooltip
358
-
359
- After Step 3 (start meeting):
360
- IF microphone permission deniedfallback to manual-notes-only mode, AI disabled for meeting
361
- ELIF audio stream fails mid-meeting retry, if second fail warn manager, continue without AI
362
-
363
- After Step 8 (summary generation):
364
- IF LLM primary provider fails → failover to secondary (Anthropic) — transparent
365
- ELIF both providers fail → show fallback «AI summary unavailable — we'll email when ready»
366
- ELIF meeting duration <5 min → skip summary generation, show «Meeting too short» message
367
-
368
- After Step 10 (review):
369
- IF manager idle >7 days without action → email reminder «Don't forget to review»
370
- IF manager never reviewsauto-mark draft as "unreviewed" after 30 days (not auto-approve)
371
- ```
372
-
373
- ## Error States
374
-
375
- | # | Trigger | User-visible message | Recovery Action | System State |
376
- |---|---------|----------------------|-----------------|--------------|
377
- | 1 | Microphone permission denied | "AI needs microphone access — click here to allow, or continue without AI" | Re-request permission OR fallback to manual notes | Event `permission_denied` logged |
378
- | 2 | Audio stream interrupted >30s | Banner: "Audio connection lost. Reconnecting…" | Auto-retry 3× in 30s intervals; if still failing, end AI recording gracefully | Event `audio_stream_lost` |
379
- | 3 | LLM provider down | "Summary is taking longer than usual — we'll email you when ready (within 24h)" | Background job retries; email notification on success | Event `ai_summary_timeout_fallback` |
380
- | 4 | Both LLM providers down | "AI summary unavailable right now. Your manual notes are preserved." | Email within 24h when recovered: «Want to retry?» | Event `ai_summary_unavailable` |
381
- | 5 | Report revoked consent mid-meeting | "Sarah turned off AI recording. Switching to manual notes." | AI stops; manual notes mode continues | Event `ai_declined_by_participant` |
382
- | 6 | Summary quality low confidence | Warning banner: «This summary had low confidence — review carefully before approving» | User reviews carefully, or requests regeneration (once) | Event `ai_summary_low_confidence` |
383
-
384
- ## Empty States
385
-
386
- - **First-time user, no previous 1:1s:** Show onboarding tour (3 tooltips: what AI does, how to enable, how to review)
387
- - **No action items extracted:** "No action items identified" with explanatory tooltip «You can add manually»
388
- - **No summary sections populated:** «Meeting was very short — manual notes preserved, no AI summary» (skipped if <5 min)
389
-
390
- ## Loading States
391
-
392
- - **Step 3 (starting recording):** Button state: "Starting…" disabled "Recording" (red dot indicator)
393
- - **Step 8 (summary generation):**
394
- - 0-5s: No indicator (feels instant)
395
- - 5-30s: Progress bar appears («Generating summary…»)
396
- - 30-60s: Section-by-section streaming (topics first, action items last typically)
397
- - 60s+: Switch to async mode («Taking longerwe'll email you»)
398
- - **Step 10 (editor loading):** Skeleton screen with placeholder text in ~300ms
399
-
400
- ## Exit Points
401
-
402
- ### Success exits
403
- - **Approved summary** (Step 11A): redirects to 1:1 history view with green toast
404
- - **Saved draft and left** (Step 11B interrupt): state preserved, resumed via notification
405
-
406
- ### Abandon exits
407
- - **Closed meeting modal before summary ready** (Step 7-8): summary generates in background, user receives notification
408
- - **Left review without approving**: draft preserved; email reminder after 3 days
409
-
410
- ### Fail exits
411
- - **AI unavailable, fallback to manual** (error 4): user continues with manual notes workflow; meeting still counts
412
- - **Mic permission denied fallback** (error 1): manual notes only; no AI artifacts created
413
-
414
- ## Metrics Instrumentation
415
-
416
- ### Events per step
417
- - `ai_toggle_enabled` — Step 2: properties `{meeting_id, user_id, org_policy}`
418
- - `meeting_started` Step 3: `{ai_enabled, mic_permission_status}`
419
- - `meeting_ended` Step 7: `{duration, manual_notes_chars, participants_count}`
420
- - `ai_summary_generated` — Step 8: `{latency, provider, confidence_avg, summary_length}`
421
- - `summary_review_opened` — Step 9: `{time_from_meeting_end}`
422
- - `summary_edited` Step 11B: `{sections_edited, char_delta, time_in_edit}`
423
- - `summary_approved` Step 11A: `{time_to_approve, edit_count}`
424
-
425
- ### Funnel metrics
426
- ```
427
- Started AI meeting (Step 3) 100%
428
-
429
-
430
- Summary generated (Step 8) 92% (8% lost: mic denied, too short, stream fail)
431
-
432
-
433
- Summary reviewed (Step 10, opened) 87% (5% unreviewed after 7 days)
434
-
435
-
436
- Summary approved (Step 11A) 78% (9% left in draft, 82% of reviewed = approved)
437
- ```
438
-
439
- ### Quality metrics
440
- - **Edit rate** = summaries edited / summaries reviewed (target: 30-50%)
441
- - **Time-to-approve** = median time from generation to approval (target: ≤2 min)
442
- - **Error rate** = failed summaries / total attempts (target: <2%)
443
- - **P95 latency** = summary generation latency (target: ≤60s)
444
-
445
- ## Diagram (Mermaid)
446
-
447
- ```mermaid
448
- flowchart TD
449
- A[Manager views 1:1 page] --> B{AI toggle on?}
450
- B -->|No| Z1[Manual notes workflow]
451
- B -->|Yes, enabled| C{Report consented?}
452
- C -->|No| D[Show consent prompt]
453
- D --> E{Report accepts?}
454
- E -->|Yes| F
455
- E -->|No| Z1
456
- C -->|Yes| F{Mic permission?}
457
- F -->|Denied| G[Fallback: manual only]
458
- F -->|Granted| H[Start recording]
459
- H --> I[Meeting in progress]
460
- I --> J{End meeting}
461
- J --> K[Generate summary]
462
- K --> L{Provider available?}
463
- L -->|No, both fail| M[Email later fallback]
464
- L -->|Yes| N{Meeting >=5 min?}
465
- N -->|No| O[Skip summary]
466
- N -->|Yes| P[Show review UI]
467
- P --> Q{Manager action}
468
- Q -->|Edit + Approve| R[Action items tracked]
469
- Q -->|Approve direct| R
470
- Q -->|Leave draft| S[Reminder after 3d]
471
- Q -->|Abandon| T[Expires after 30d]
472
- R --> U[Next 1:1 reminder]
473
- ```
474
-
475
- > **user-flow lesson:** Comprehensive flow doc shows why **11 scenarios** exist in the AC for Story S2 — each decision point or error state is a scenario. Flow first, AC second — you can't write AC without understanding flow. **6 error states + 3 empty states + 3 loading states** for a single flow is normal for production B2B — users encounter edges more in the wild than you expect.
476
- ```
1
+ ---
2
+ name: user-flow
3
+ description: Documenting user flows — steps, decision points, happy path + error states
4
+ type: triggered
5
+ domain: product
6
+ owners:
7
+ - ux_designer
8
+ gates:
9
+ - UX_DESIGNER
10
+ tech: []
11
+ topic: []
12
+ triggers:
13
+ - "user-flow"
14
+ - "user flow"
15
+ - "пользовательский сценарий"
16
+ related: []
17
+ budget_lines: 491
18
+ schema_version: 1
19
+ ---
20
+ # User Flow
21
+
22
+ > **Category:** UX · **Slug:** `user-flow`
23
+
24
+ ## When to Use
25
+
26
+ - For every non-trivial multi-step flow in a PRD.
27
+ - Before design — flows align the team on happy path + edges.
28
+ - In specificationflows map to user stories.
29
+ - For onboarding / activation analysis identify drop-off points.
30
+
31
+ ## Input
32
+
33
+ | Field | Required | Description |
34
+ |-------|:--------:|-------------|
35
+ | User story / PRD | | What the flow should accomplish |
36
+ | User persona | ✅ | For whom |
37
+ | Entry points | | Where the user enters the flow |
38
+ | Exit points | | Success vs abandon vs errors |
39
+ | Existing flow (if modification) | | Current state reference |
40
+
41
+ ## Data Sources
42
+
43
+ 1. User interviews — how they do it now.
44
+ 2. Product analyticsdrop-off data for existing flows.
45
+ 3. Support ticketspain points.
46
+ 4. Competitor flowsbaseline expectations.
47
+
48
+ ### Related Skills
49
+
50
+ | Skill | What we take | When to invoke |
51
+ |-------|-------------|----------------|
52
+ | `user-story` | Stories flow segments | Parent concept |
53
+ | `acceptance-criteria` | AC edge / error cases in flow | After flow |
54
+ | `design-brief` | Flow input for design | Before brief |
55
+ | `jtbd-canvas` | Job context for flow trigger | For understanding entry |
56
+
57
+ ## Flow Types
58
+
59
+ 1. **Task flow** — linear path (create account, submit form)
60
+ 2. **Decision flow** — branching (onboarding based on role)
61
+ 3. **Error flow** — what happens when things go wrong
62
+ 4. **Recovery flow** — how user gets back on track
63
+
64
+ ## User Flow Doc Structure
65
+
66
+ 1. **Flow name + purpose**
67
+ 2. **Actors** who uses this flow
68
+ 3. **Preconditions** — state required to enter
69
+ 4. **Entry points**how user arrives
70
+ 5. **Happy path** — step-by-step
71
+ 6. **Decision points**branching
72
+ 7. **Error states** — each failure mode
73
+ 8. **Exit points** — success, abandon, fail
74
+ 9. **Metrics** what we'll measure
75
+
76
+ ## Protocol
77
+
78
+ ### Step 0 — Define Boundaries
79
+
80
+ - Entry: where user flow starts (signup CTA, navigation click, email link)
81
+ - Exit: where it ends (success state, error, abandonment)
82
+ - Preconditions: auth state, permissions, data state
83
+
84
+ ### Step 1 — Happy Path (Sequential Steps)
85
+
86
+ Linear sequence from entry to successful exit. Steps — user-visible actions + system responses.
87
+
88
+ Notation:
89
+ - **→** sequential step
90
+ - **[Action]** user action
91
+ - **(System)** system response
92
+ - **{Data}** state change
93
+
94
+ Example:
95
+ ```
96
+ [Click "Invite teammate"]
97
+ (Modal opens with email field) →
98
+ [Type email + assign role]
99
+ [Click "Send invite"] →
100
+ {Invite record created} →
101
+ (Email sent to recipient) →
102
+ (Success toast: «Invite sent»)
103
+ Exit: invitation pending
104
+ ```
105
+
106
+ ### Step 2 — Decision Points
107
+
108
+ Where flow branches based on:
109
+ - User input (role selection, plan choice)
110
+ - System state (feature availability, quota)
111
+ - Data (existing user vs new, permissions)
112
+
113
+ Diagram: use if/else or case statements:
114
+
115
+ ```
116
+ After [Enter email]:
117
+ IF email is existing user:
118
+ Step: Existing user flow (add to team)
119
+ ELIF email domain blocked by policy:
120
+ Error: «Domain not allowed by your org»
121
+ ELSE:
122
+ Continue: Invite new user flow
123
+ ```
124
+
125
+ ### Step 3 — Error States
126
+
127
+ For each system failure mode:
128
+ - **Trigger** what causes it
129
+ - **User-visible message** exact copy
130
+ - **Recovery action** what user can do
131
+ - **System state** — logged? retryable?
132
+
133
+ Common errors:
134
+ - Network failure
135
+ - Validation failure
136
+ - Permission denied
137
+ - Quota exceeded
138
+ - 3rd party integration down
139
+ - Stale data / concurrent modification
140
+
141
+ ### Step 4 Empty / Loading States
142
+
143
+ - **Empty state:** first-time user, no data yet. What do they see?
144
+ - **Loading state:** what during network calls?
145
+ - **Partial state:** some data loaded, some loading?
146
+
147
+ ### Step 5 — Exit Points
148
+
149
+ Categorize all exits:
150
+ - **Success:** task completed
151
+ - **Intentional abandon:** user cancelled
152
+ - **Implicit abandon:** user left without action (session timeout, closed tab)
153
+ - **Failure:** hard error, unrecoverable
154
+
155
+ For each exit:
156
+ - What happens in system
157
+ - What user feels
158
+ - Can they re-enter flow?
159
+
160
+ ### Step 6 Metrics Instrumentation
161
+
162
+ Per flow step:
163
+ - **Event name** (e.g., `invite_modal_opened`, `invite_sent_success`)
164
+ - **Properties** (role, source, etc.)
165
+ - **Conversion funnel** start to success rate
166
+ - **Drop-off per step**
167
+
168
+ This feeds into AARRR + success metrics.
169
+
170
+ ### Step 7 — Visualization
171
+
172
+ Options:
173
+ - **ASCII diagram** (for text-based docs)
174
+ - **Mermaid** (GitHub renders inline)
175
+ - **Figma / Whimsical / Miro** (for presentations)
176
+
177
+ Mermaid example:
178
+ ```mermaid
179
+ flowchart TD
180
+ A[Click Invite] --> B{User in system?}
181
+ B -->|Yes| C[Add to team flow]
182
+ B -->|No| D[Send invite]
183
+ D --> E[Success toast]
184
+ D --> F[Error: email invalid]
185
+ F --> D
186
+ ```
187
+
188
+ ## Validation (Quality Gate)
189
+
190
+ - [ ] Entry + exit points are explicit
191
+ - [ ] Preconditions listed
192
+ - [ ] Happy path step-by-step
193
+ - [ ] ≥ 2 decision points (except trivially linear)
194
+ - [ ] 3 error states with recovery
195
+ - [ ] Empty / loading states covered
196
+ - [ ] All exits categorized (success / abandon / fail)
197
+ - [ ] Metric events defined per step
198
+ - [ ] Visualized (diagram)
199
+
200
+ ## Handoff
201
+
202
+ The result is input for:
203
+ - **`design-brief`** flow screens needed
204
+ - **UX Designer** wireframes per step
205
+ - **Engineering** API design per action
206
+ - **Data Analyst** → instrumentation plan
207
+ - **QA** → test scenarios per flow
208
+
209
+ Format: user flow doc (markdown + Mermaid/diagram). Via `$handoff`.
210
+
211
+ ## Anti-patterns
212
+
213
+ | Error | Why it's bad | How to do it right |
214
+ |-------|-------------|-------------------|
215
+ | Happy path only | Production is edges | ≥ 3 error states |
216
+ | No decision points | Linear ≠ reality | Explicit branching |
217
+ | No empty state | First-time users confused | Always cover empty |
218
+ | No metrics | Can't measure funnel | Events per step |
219
+ | Text walls without diagram | Hard to follow | Visualize |
220
+ | No recovery paths | Users stuck | Every error has recovery |
221
+
222
+ ## Template
223
+
224
+ ```markdown
225
+ # User Flow: [Name]
226
+
227
+ ## Purpose
228
+ [What user accomplishes]
229
+
230
+ ## Actors
231
+ [Primary user + any secondary]
232
+
233
+ ## Preconditions
234
+ - Auth: [logged in as X]
235
+ - State: [data state required]
236
+
237
+ ## Entry Points
238
+ 1. [Source A]
239
+ 2. [Source B]
240
+
241
+ ## Happy Path
242
+ 1. [Action] → (System response)
243
+ 2. ...
244
+
245
+ ## Decision Points
246
+ - After step X:
247
+ - IF [condition] → [branch A]
248
+ - ELSE → [branch B]
249
+
250
+ ## Error States
251
+ | # | Trigger | Message | Recovery |
252
+ | 1 | Invalid email | «Email format invalid» | Re-enter |
253
+
254
+ ## Empty / Loading States
255
+ - Empty: [state]
256
+ - Loading: [state]
257
+
258
+ ## Exit Points
259
+ - Success: [end state]
260
+ - Abandon: [what happens]
261
+ - Fail: [what happens]
262
+
263
+ ## Metrics
264
+ - Event: `flow_started` — when entering
265
+ - Event: `flow_step_X_completed`per step
266
+ - Event: `flow_succeeded` success exit
267
+ - Event: `flow_abandoned` — abandon exit
268
+ - Funnel: start → success conversion
269
+
270
+ ## Diagram
271
+ [Mermaid or link to Figma]
272
+ ```
273
+
274
+ ## Worked Example TeamFlow AI-Enabled 1:1 Full Flow
275
+
276
+ ```markdown
277
+ # User Flow: AI-Enabled 1:1 (End-to-End)
278
+
279
+ ## Purpose
280
+ Manager conducts 1:1 with AI assistance from scheduling to reviewing AI-generated summary + action items.
281
+ This covers Stories S1, S2, S3, S4, S5 end-to-end.
282
+
283
+ ## Actors
284
+ - **Primary:** People Manager (end-user, 5-15 direct reports)
285
+ - **Secondary:** Direct Report (sees AI consent prompt, may view shared summary)
286
+ - **Tertiary:** Admin (sets org-wide policy, affects defaults)
287
+
288
+ ## Preconditions
289
+ - **Auth:** Manager logged into TeamFlow, on Team Tier account
290
+ - **State:** Manager has upcoming 1:1 scheduled, AI feature enabled at org level
291
+ - **Data:** Report has TeamFlow account + consented to AI recording (one-time org-level or per-meeting)
292
+ - **Browser:** Chrome/Edge/Safari/Firefox supporting MediaRecorder API
293
+
294
+ ## Entry Points
295
+ 1. Click on 1:1 in TeamFlow calendar view → meeting details page
296
+ 2. Email reminder «Your 1:1 with Sarah starts in 10 min» → click link
297
+ 3. Slack integration notification (if enabled by user)
298
+
299
+ ## Happy Path
300
+
301
+ ### Before meeting (pre-start)
302
+ ```
303
+ 1. [Manager views 1:1 meeting page]
304
+ → (Page shows meeting info + attendees + previous summary)
305
+
306
+ 2. [Manager toggles "Use AI this meeting" ON]
307
+ → {State: ai_enabled = true, saved to meeting record}
308
+ (Confirmation toast: "AI will generate summary after meeting ends")
309
+
310
+ 3. [Manager clicks "Start meeting"]
311
+ (System prompts for microphone permission if not granted)
312
+ → (Once granted: recording starts + AI transcription begins)
313
+ {Event: meeting_started with ai_enabled=true}
314
+ ```
315
+
316
+ ### During meeting
317
+ ```
318
+ 4. [Manager + Report converse normally]
319
+ (UI shows: recording indicator, duration timer, «AI is listening» subtle banner)
320
+ (Transcription accumulates in memory, not visible to user)
321
+ → (Report sees same indicators through own TeamFlow session)
322
+
323
+ 5. Optional: [Manager clicks "pause AI" for sensitive topic]
324
+ → {Transcription suspended}
325
+ → (UI shows: «AI paused resume when ready»)
326
+ After 30 sec or resume click → transcription resumes
327
+
328
+ 6. [Manager adds manual notes (optional) in parallel text area]
329
+ {Manual notes saved separately from AI transcript}
330
+ ```
331
+
332
+ ### End of meeting
333
+ ```
334
+ 7. [Manager clicks "End meeting"]
335
+ {Event: meeting_ended with duration, manual_notes_length}
336
+ → (Modal: "AI is generating summary you can close this or stay to review")
337
+
338
+ 8. [System generates summary via LLM API]
339
+ {Latency target: <60s p95}
340
+ (Streaming UI: sections populate as generated)
341
+ → {Event: ai_summary_generated, ai_provider, latency, confidence_avg}
342
+
343
+ 9. [Manager sees summary review interface]
344
+ → (Sections visible: Topics discussed, Decisions, Action items with confidence indicators)
345
+ (Auto-save of draft state)
346
+ ```
347
+
348
+ ### Review phase
349
+ ```
350
+ 10. [Manager reviews summary content]
351
+ (Can read, optionally scroll, decide to edit or approve)
352
+
353
+ 11A. [Manager is satisfied → clicks "Approve"]
354
+ (Confirmation modal: "Approve summary? Action items will be tracked.")
355
+ [Manager confirms]
356
+ {Event: ai_summary_approved, time_to_approve}
357
+ (Summary moves to «Approved», action items flow to tracking queue)
358
+ → (Redirect to 1:1 history view)
359
+
360
+ 11B. [Manager wants editsenters edit mode]
361
+ (Inline editor enabled for each section)
362
+ → {State: editing_mode = true}
363
+ ...continue to Scenario Edit
364
+ ```
365
+
366
+ ## Decision Points
367
+
368
+ ```
369
+ After Step 2 (AI toggle):
370
+ IF org policy "AI disabled" toggle greyed out, tooltip «Contact admin»
371
+ ELIF report not consented → show consent prompt before manager can enable
372
+ ELIF first-time user → show quick onboarding tooltip
373
+
374
+ After Step 3 (start meeting):
375
+ IF microphone permission denied fallback to manual-notes-only mode, AI disabled for meeting
376
+ ELIF audio stream fails mid-meeting → retry, if second fail → warn manager, continue without AI
377
+
378
+ After Step 8 (summary generation):
379
+ IF LLM primary provider fails failover to secondary (Anthropic) transparent
380
+ ELIF both providers fail show fallback «AI summary unavailable we'll email when ready»
381
+ ELIF meeting duration <5 min skip summary generation, show «Meeting too short» message
382
+
383
+ After Step 10 (review):
384
+ IF manager idle >7 days without action → email reminder «Don't forget to review»
385
+ IF manager never reviews → auto-mark draft as "unreviewed" after 30 days (not auto-approve)
386
+ ```
387
+
388
+ ## Error States
389
+
390
+ | # | Trigger | User-visible message | Recovery Action | System State |
391
+ |---|---------|----------------------|-----------------|--------------|
392
+ | 1 | Microphone permission denied | "AI needs microphone access — click here to allow, or continue without AI" | Re-request permission OR fallback to manual notes | Event `permission_denied` logged |
393
+ | 2 | Audio stream interrupted >30s | Banner: "Audio connection lost. Reconnecting…" | Auto-retry in 30s intervals; if still failing, end AI recording gracefully | Event `audio_stream_lost` |
394
+ | 3 | LLM provider down | "Summary is taking longer than usual — we'll email you when ready (within 24h)" | Background job retries; email notification on success | Event `ai_summary_timeout_fallback` |
395
+ | 4 | Both LLM providers down | "AI summary unavailable right now. Your manual notes are preserved." | Email within 24h when recovered: «Want to retry?» | Event `ai_summary_unavailable` |
396
+ | 5 | Report revoked consent mid-meeting | "Sarah turned off AI recording. Switching to manual notes." | AI stops; manual notes mode continues | Event `ai_declined_by_participant` |
397
+ | 6 | Summary quality low confidence | Warning banner: «This summary had low confidence review carefully before approving» | User reviews carefully, or requests regeneration (once) | Event `ai_summary_low_confidence` |
398
+
399
+ ## Empty States
400
+
401
+ - **First-time user, no previous 1:1s:** Show onboarding tour (3 tooltips: what AI does, how to enable, how to review)
402
+ - **No action items extracted:** "No action items identified" with explanatory tooltip «You can add manually»
403
+ - **No summary sections populated:** «Meeting was very short manual notes preserved, no AI summary» (skipped if <5 min)
404
+
405
+ ## Loading States
406
+
407
+ - **Step 3 (starting recording):** Button state: "Starting…" disabled "Recording" (red dot indicator)
408
+ - **Step 8 (summary generation):**
409
+ - 0-5s: No indicator (feels instant)
410
+ - 5-30s: Progress bar appears («Generating summary…»)
411
+ - 30-60s: Section-by-section streaming (topics first, action items last typically)
412
+ - 60s+: Switch to async mode («Taking longer we'll email you»)
413
+ - **Step 10 (editor loading):** Skeleton screen with placeholder text in ~300ms
414
+
415
+ ## Exit Points
416
+
417
+ ### Success exits
418
+ - **Approved summary** (Step 11A): redirects to 1:1 history view with green toast
419
+ - **Saved draft and left** (Step 11B interrupt): state preserved, resumed via notification
420
+
421
+ ### Abandon exits
422
+ - **Closed meeting modal before summary ready** (Step 7-8): summary generates in background, user receives notification
423
+ - **Left review without approving**: draft preserved; email reminder after 3 days
424
+
425
+ ### Fail exits
426
+ - **AI unavailable, fallback to manual** (error 4): user continues with manual notes workflow; meeting still counts
427
+ - **Mic permission denied fallback** (error 1): manual notes only; no AI artifacts created
428
+
429
+ ## Metrics Instrumentation
430
+
431
+ ### Events per step
432
+ - `ai_toggle_enabled` — Step 2: properties `{meeting_id, user_id, org_policy}`
433
+ - `meeting_started` Step 3: `{ai_enabled, mic_permission_status}`
434
+ - `meeting_ended` — Step 7: `{duration, manual_notes_chars, participants_count}`
435
+ - `ai_summary_generated` — Step 8: `{latency, provider, confidence_avg, summary_length}`
436
+ - `summary_review_opened` Step 9: `{time_from_meeting_end}`
437
+ - `summary_edited` — Step 11B: `{sections_edited, char_delta, time_in_edit}`
438
+ - `summary_approved` — Step 11A: `{time_to_approve, edit_count}`
439
+
440
+ ### Funnel metrics
441
+ ```
442
+ Started AI meeting (Step 3) 100%
443
+
444
+
445
+ Summary generated (Step 8) 92% (8% lost: mic denied, too short, stream fail)
446
+
447
+
448
+ Summary reviewed (Step 10, opened) 87% (5% unreviewed after 7 days)
449
+
450
+
451
+ Summary approved (Step 11A) 78% (9% left in draft, 82% of reviewed = approved)
452
+ ```
453
+
454
+ ### Quality metrics
455
+ - **Edit rate** = summaries edited / summaries reviewed (target: 30-50%)
456
+ - **Time-to-approve** = median time from generation to approval (target: ≤2 min)
457
+ - **Error rate** = failed summaries / total attempts (target: <2%)
458
+ - **P95 latency** = summary generation latency (target: ≤60s)
459
+
460
+ ## Diagram (Mermaid)
461
+
462
+ ```mermaid
463
+ flowchart TD
464
+ A[Manager views 1:1 page] --> B{AI toggle on?}
465
+ B -->|No| Z1[Manual notes workflow]
466
+ B -->|Yes, enabled| C{Report consented?}
467
+ C -->|No| D[Show consent prompt]
468
+ D --> E{Report accepts?}
469
+ E -->|Yes| F
470
+ E -->|No| Z1
471
+ C -->|Yes| F{Mic permission?}
472
+ F -->|Denied| G[Fallback: manual only]
473
+ F -->|Granted| H[Start recording]
474
+ H --> I[Meeting in progress]
475
+ I --> J{End meeting}
476
+ J --> K[Generate summary]
477
+ K --> L{Provider available?}
478
+ L -->|No, both fail| M[Email later fallback]
479
+ L -->|Yes| N{Meeting >=5 min?}
480
+ N -->|No| O[Skip summary]
481
+ N -->|Yes| P[Show review UI]
482
+ P --> Q{Manager action}
483
+ Q -->|Edit + Approve| R[Action items tracked]
484
+ Q -->|Approve direct| R
485
+ Q -->|Leave draft| S[Reminder after 3d]
486
+ Q -->|Abandon| T[Expires after 30d]
487
+ R --> U[Next 1:1 reminder]
488
+ ```
489
+
490
+ > **user-flow lesson:** Comprehensive flow doc shows why **11 scenarios** exist in the AC for Story S2 — each decision point or error state is a scenario. Flow first, AC second — you can't write AC without understanding flow. **6 error states + 3 empty states + 3 loading states** for a single flow is normal for production B2B — users encounter edges more in the wild than you expect.
491
+ ```