autodoc-agent-kit 1.0.0

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 (187) hide show
  1. package/README.md +362 -0
  2. package/package.json +49 -0
  3. package/src/core/module.yaml +5 -0
  4. package/src/modules/design/module.yaml +9 -0
  5. package/src/modules/design/skills/brand-guidelines/LICENSE.txt +202 -0
  6. package/src/modules/design/skills/brand-guidelines/SKILL.md +73 -0
  7. package/src/modules/design/skills/frontend-design/LICENSE.txt +177 -0
  8. package/src/modules/design/skills/frontend-design/SKILL.md +42 -0
  9. package/src/modules/design/skills/web-artifacts-builder/SKILL.md +229 -0
  10. package/src/modules/devops/module.yaml +10 -0
  11. package/src/modules/devops/skills/devops-helper/SKILL.md +60 -0
  12. package/src/modules/devops/skills/k8s-helm/SKILL.md +360 -0
  13. package/src/modules/devops/skills/monitoring-observability/SKILL.md +240 -0
  14. package/src/modules/devops/skills/security-auditor/SKILL.md +105 -0
  15. package/src/modules/engineering/module.yaml +22 -0
  16. package/src/modules/engineering/skills/ai-sdk/SKILL.md +314 -0
  17. package/src/modules/engineering/skills/api-designer/SKILL.md +77 -0
  18. package/src/modules/engineering/skills/code-reviewer/SKILL.md +71 -0
  19. package/src/modules/engineering/skills/db-architect/SKILL.md +50 -0
  20. package/src/modules/engineering/skills/debugger/SKILL.md +59 -0
  21. package/src/modules/engineering/skills/docs-generator/SKILL.md +51 -0
  22. package/src/modules/engineering/skills/git-workflow/SKILL.md +258 -0
  23. package/src/modules/engineering/skills/mcp-builder/LICENSE.txt +202 -0
  24. package/src/modules/engineering/skills/mcp-builder/SKILL.md +236 -0
  25. package/src/modules/engineering/skills/mcp-builder/reference/evaluation.md +602 -0
  26. package/src/modules/engineering/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
  27. package/src/modules/engineering/skills/mcp-builder/reference/node_mcp_server.md +970 -0
  28. package/src/modules/engineering/skills/mcp-builder/reference/python_mcp_server.md +719 -0
  29. package/src/modules/engineering/skills/mcp-builder/scripts/connections.py +151 -0
  30. package/src/modules/engineering/skills/mcp-builder/scripts/evaluation.py +373 -0
  31. package/src/modules/engineering/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
  32. package/src/modules/engineering/skills/mcp-builder/scripts/requirements.txt +2 -0
  33. package/src/modules/engineering/skills/nextjs-15/SKILL.md +312 -0
  34. package/src/modules/engineering/skills/perf-optimizer/SKILL.md +60 -0
  35. package/src/modules/engineering/skills/react-19/SKILL.md +257 -0
  36. package/src/modules/engineering/skills/refactorer/SKILL.md +60 -0
  37. package/src/modules/engineering/skills/skill-authoring-workflow/SKILL.md +183 -0
  38. package/src/modules/engineering/skills/skill-creator/LICENSE.txt +202 -0
  39. package/src/modules/engineering/skills/skill-creator/SKILL.md +356 -0
  40. package/src/modules/engineering/skills/skill-creator/references/output-patterns.md +82 -0
  41. package/src/modules/engineering/skills/skill-creator/references/workflows.md +28 -0
  42. package/src/modules/engineering/skills/skill-creator/scripts/__pycache__/quick_validate.cpython-313.pyc +0 -0
  43. package/src/modules/engineering/skills/skill-creator/scripts/init_skill.py +303 -0
  44. package/src/modules/engineering/skills/skill-creator/scripts/package_skill.py +110 -0
  45. package/src/modules/engineering/skills/skill-creator/scripts/quick_validate.py +95 -0
  46. package/src/modules/engineering/skills/typescript/SKILL.md +231 -0
  47. package/src/modules/engineering/skills/zod-4/SKILL.md +223 -0
  48. package/src/modules/product/module.yaml +51 -0
  49. package/src/modules/product/skills/acquisition-channel-advisor/SKILL.md +643 -0
  50. package/src/modules/product/skills/acquisition-channel-advisor/examples/conversation-flow.md +531 -0
  51. package/src/modules/product/skills/ai-shaped-readiness-advisor/SKILL.md +923 -0
  52. package/src/modules/product/skills/altitude-horizon-framework/SKILL.md +250 -0
  53. package/src/modules/product/skills/altitude-horizon-framework/examples/sample.md +85 -0
  54. package/src/modules/product/skills/business-health-diagnostic/SKILL.md +783 -0
  55. package/src/modules/product/skills/company-research/SKILL.md +385 -0
  56. package/src/modules/product/skills/company-research/examples/sample.md +164 -0
  57. package/src/modules/product/skills/company-research/template.md +60 -0
  58. package/src/modules/product/skills/context-engineering-advisor/SKILL.md +763 -0
  59. package/src/modules/product/skills/customer-journey-map/SKILL.md +346 -0
  60. package/src/modules/product/skills/customer-journey-map/examples/meta-product-manager-skills.md +40 -0
  61. package/src/modules/product/skills/customer-journey-map/examples/sample.md +33 -0
  62. package/src/modules/product/skills/customer-journey-map/template.md +28 -0
  63. package/src/modules/product/skills/customer-journey-mapping-workshop/SKILL.md +523 -0
  64. package/src/modules/product/skills/director-readiness-advisor/SKILL.md +351 -0
  65. package/src/modules/product/skills/director-readiness-advisor/examples/conversation-flow.md +96 -0
  66. package/src/modules/product/skills/discovery-interview-prep/SKILL.md +410 -0
  67. package/src/modules/product/skills/discovery-process/SKILL.md +504 -0
  68. package/src/modules/product/skills/discovery-process/examples/sample.md +60 -0
  69. package/src/modules/product/skills/discovery-process/template.md +39 -0
  70. package/src/modules/product/skills/eol-message/SKILL.md +348 -0
  71. package/src/modules/product/skills/eol-message/examples/sample.md +87 -0
  72. package/src/modules/product/skills/eol-message/template.md +74 -0
  73. package/src/modules/product/skills/epic-breakdown-advisor/SKILL.md +665 -0
  74. package/src/modules/product/skills/epic-hypothesis/SKILL.md +277 -0
  75. package/src/modules/product/skills/epic-hypothesis/examples/sample.md +104 -0
  76. package/src/modules/product/skills/epic-hypothesis/template.md +30 -0
  77. package/src/modules/product/skills/executive-onboarding-playbook/SKILL.md +280 -0
  78. package/src/modules/product/skills/executive-onboarding-playbook/examples/sample.md +116 -0
  79. package/src/modules/product/skills/feature-investment-advisor/SKILL.md +639 -0
  80. package/src/modules/product/skills/feature-investment-advisor/examples/conversation-flow.md +538 -0
  81. package/src/modules/product/skills/finance-based-pricing-advisor/SKILL.md +763 -0
  82. package/src/modules/product/skills/finance-metrics-quickref/SKILL.md +309 -0
  83. package/src/modules/product/skills/jobs-to-be-done/SKILL.md +370 -0
  84. package/src/modules/product/skills/jobs-to-be-done/examples/sample.md +80 -0
  85. package/src/modules/product/skills/jobs-to-be-done/template.md +65 -0
  86. package/src/modules/product/skills/lean-ux-canvas/SKILL.md +561 -0
  87. package/src/modules/product/skills/lean-ux-canvas/examples/sample.md +88 -0
  88. package/src/modules/product/skills/lean-ux-canvas/template.md +32 -0
  89. package/src/modules/product/skills/opportunity-solution-tree/SKILL.md +420 -0
  90. package/src/modules/product/skills/opportunity-solution-tree/examples/sample.md +104 -0
  91. package/src/modules/product/skills/opportunity-solution-tree/template.md +33 -0
  92. package/src/modules/product/skills/pestel-analysis/SKILL.md +376 -0
  93. package/src/modules/product/skills/pestel-analysis/examples/sample.md +143 -0
  94. package/src/modules/product/skills/pestel-analysis/template.md +53 -0
  95. package/src/modules/product/skills/pol-probe/SKILL.md +217 -0
  96. package/src/modules/product/skills/pol-probe/examples/sample.md +136 -0
  97. package/src/modules/product/skills/pol-probe/template.md +59 -0
  98. package/src/modules/product/skills/pol-probe-advisor/SKILL.md +492 -0
  99. package/src/modules/product/skills/positioning-statement/SKILL.md +230 -0
  100. package/src/modules/product/skills/positioning-statement/examples/sample.md +51 -0
  101. package/src/modules/product/skills/positioning-statement/template.md +25 -0
  102. package/src/modules/product/skills/positioning-workshop/SKILL.md +424 -0
  103. package/src/modules/product/skills/prd-development/SKILL.md +655 -0
  104. package/src/modules/product/skills/prd-development/examples/sample.md +43 -0
  105. package/src/modules/product/skills/prd-development/template.md +55 -0
  106. package/src/modules/product/skills/press-release/SKILL.md +269 -0
  107. package/src/modules/product/skills/press-release/examples/sample.md +73 -0
  108. package/src/modules/product/skills/press-release/template.md +39 -0
  109. package/src/modules/product/skills/prioritization-advisor/SKILL.md +448 -0
  110. package/src/modules/product/skills/problem-framing-canvas/SKILL.md +466 -0
  111. package/src/modules/product/skills/problem-framing-canvas/examples/sample.md +58 -0
  112. package/src/modules/product/skills/problem-framing-canvas/template.md +22 -0
  113. package/src/modules/product/skills/problem-statement/SKILL.md +246 -0
  114. package/src/modules/product/skills/problem-statement/examples/sample.md +82 -0
  115. package/src/modules/product/skills/problem-statement/template.md +37 -0
  116. package/src/modules/product/skills/product-strategy-session/SKILL.md +426 -0
  117. package/src/modules/product/skills/product-strategy-session/examples/sample.md +67 -0
  118. package/src/modules/product/skills/product-strategy-session/template.md +38 -0
  119. package/src/modules/product/skills/proto-persona/SKILL.md +326 -0
  120. package/src/modules/product/skills/proto-persona/examples/sample.md +97 -0
  121. package/src/modules/product/skills/proto-persona/template.md +45 -0
  122. package/src/modules/product/skills/recommendation-canvas/SKILL.md +375 -0
  123. package/src/modules/product/skills/recommendation-canvas/examples/sample.md +94 -0
  124. package/src/modules/product/skills/recommendation-canvas/template.md +86 -0
  125. package/src/modules/product/skills/roadmap-planning/SKILL.md +505 -0
  126. package/src/modules/product/skills/roadmap-planning/examples/sample.md +62 -0
  127. package/src/modules/product/skills/roadmap-planning/template.md +30 -0
  128. package/src/modules/product/skills/saas-economics-efficiency-metrics/SKILL.md +694 -0
  129. package/src/modules/product/skills/saas-economics-efficiency-metrics/examples/cash-trap.md +365 -0
  130. package/src/modules/product/skills/saas-economics-efficiency-metrics/examples/healthy-unit-economics.md +279 -0
  131. package/src/modules/product/skills/saas-economics-efficiency-metrics/template.md +263 -0
  132. package/src/modules/product/skills/saas-revenue-growth-metrics/SKILL.md +630 -0
  133. package/src/modules/product/skills/saas-revenue-growth-metrics/examples/healthy-saas.md +131 -0
  134. package/src/modules/product/skills/saas-revenue-growth-metrics/examples/warning-signs.md +229 -0
  135. package/src/modules/product/skills/saas-revenue-growth-metrics/template.md +192 -0
  136. package/src/modules/product/skills/storyboard/SKILL.md +252 -0
  137. package/src/modules/product/skills/storyboard/examples/sample.md +71 -0
  138. package/src/modules/product/skills/storyboard/template.md +41 -0
  139. package/src/modules/product/skills/tam-sam-som-calculator/SKILL.md +392 -0
  140. package/src/modules/product/skills/tam-sam-som-calculator/examples/sample.md +142 -0
  141. package/src/modules/product/skills/tam-sam-som-calculator/scripts/market-sizing.py +95 -0
  142. package/src/modules/product/skills/tam-sam-som-calculator/template.md +35 -0
  143. package/src/modules/product/skills/user-story/SKILL.md +272 -0
  144. package/src/modules/product/skills/user-story/examples/sample.md +110 -0
  145. package/src/modules/product/skills/user-story/scripts/user-story-template.py +65 -0
  146. package/src/modules/product/skills/user-story/template.md +32 -0
  147. package/src/modules/product/skills/user-story-mapping/SKILL.md +285 -0
  148. package/src/modules/product/skills/user-story-mapping/examples/sample.md +77 -0
  149. package/src/modules/product/skills/user-story-mapping/template.md +41 -0
  150. package/src/modules/product/skills/user-story-mapping-workshop/SKILL.md +477 -0
  151. package/src/modules/product/skills/user-story-mapping-workshop/template.md +28 -0
  152. package/src/modules/product/skills/user-story-splitting/SKILL.md +303 -0
  153. package/src/modules/product/skills/user-story-splitting/examples/sample.md +147 -0
  154. package/src/modules/product/skills/user-story-splitting/template.md +37 -0
  155. package/src/modules/product/skills/vp-cpo-readiness-advisor/SKILL.md +409 -0
  156. package/src/modules/product/skills/vp-cpo-readiness-advisor/examples/conversation-flow.md +95 -0
  157. package/src/modules/product/skills/workshop-facilitation/SKILL.md +87 -0
  158. package/src/modules/productivity/module.yaml +9 -0
  159. package/src/modules/productivity/skills/doc-coauthoring/SKILL.md +375 -0
  160. package/src/modules/productivity/skills/internal-comms/LICENSE.txt +202 -0
  161. package/src/modules/productivity/skills/internal-comms/SKILL.md +32 -0
  162. package/src/modules/productivity/skills/internal-comms/examples/3p-updates.md +47 -0
  163. package/src/modules/productivity/skills/internal-comms/examples/company-newsletter.md +65 -0
  164. package/src/modules/productivity/skills/internal-comms/examples/faq-answers.md +30 -0
  165. package/src/modules/productivity/skills/internal-comms/examples/general-comms.md +16 -0
  166. package/src/modules/productivity/skills/technical-writing/SKILL.md +266 -0
  167. package/src/modules/qa/module.yaml +9 -0
  168. package/src/modules/qa/skills/test-strategy/SKILL.md +263 -0
  169. package/src/modules/qa/skills/test-writer/SKILL.md +57 -0
  170. package/src/modules/qa/skills/webapp-testing/LICENSE.txt +202 -0
  171. package/src/modules/qa/skills/webapp-testing/SKILL.md +96 -0
  172. package/src/modules/qa/skills/webapp-testing/examples/console_logging.py +35 -0
  173. package/src/modules/qa/skills/webapp-testing/examples/element_discovery.py +40 -0
  174. package/src/modules/qa/skills/webapp-testing/examples/static_html_automation.py +33 -0
  175. package/src/modules/qa/skills/webapp-testing/scripts/with_server.py +106 -0
  176. package/tools/autodoc-npx-wrapper.js +34 -0
  177. package/tools/cli/autodoc-cli.js +55 -0
  178. package/tools/cli/commands/install.js +36 -0
  179. package/tools/cli/commands/status.js +35 -0
  180. package/tools/cli/commands/uninstall.js +60 -0
  181. package/tools/cli/installers/lib/core/installer.js +164 -0
  182. package/tools/cli/installers/lib/core/manifest.js +49 -0
  183. package/tools/cli/installers/lib/ide/manager.js +112 -0
  184. package/tools/cli/installers/lib/ide/platform-codes.yaml +207 -0
  185. package/tools/cli/installers/lib/modules/manager.js +59 -0
  186. package/tools/cli/lib/ui.js +199 -0
  187. package/tools/cli/lib/welcome.js +82 -0
@@ -0,0 +1,272 @@
1
+ ---
2
+ name: user-story
3
+ description: Create user stories with Mike Cohn format and Gherkin acceptance criteria. Use when turning user needs into development-ready work with clear outcomes and testable conditions.
4
+ intent: >-
5
+ Create clear, concise user stories that combine Mike Cohn's user story format with Gherkin-style acceptance criteria. Use this to translate user needs into actionable development work that focuses on outcomes, ensures shared understanding between product and engineering, and provides testable success criteria.
6
+ type: component
7
+ theme: pm-artifacts
8
+ best_for:
9
+ - "Writing user stories with proper acceptance criteria"
10
+ - "Converting requirements into development-ready stories"
11
+ - "Establishing story quality standards across your team"
12
+ scenarios:
13
+ - "I need to write a user story for a new notification system in our B2B SaaS app"
14
+ - "Convert this PRD requirement into a properly formatted user story with Gherkin acceptance criteria"
15
+ estimated_time: "5-10 min"
16
+ ---
17
+
18
+
19
+ ## Purpose
20
+ Create clear, concise user stories that combine Mike Cohn's user story format with Gherkin-style acceptance criteria. Use this to translate user needs into actionable development work that focuses on outcomes, ensures shared understanding between product and engineering, and provides testable success criteria.
21
+
22
+ This is not a feature spec—it's a conversation starter that captures *who* benefits, *what* they're trying to do, *why* it matters, and *how* you'll know it works.
23
+
24
+ ## Key Concepts
25
+
26
+ ### The Mike Cohn + Gherkin Format
27
+ A user story combines:
28
+
29
+ **Use Case (Mike Cohn format):**
30
+ - **As a** [user persona/role]
31
+ - **I want to** [action to achieve outcome]
32
+ - **so that** [desired outcome]
33
+
34
+ **Acceptance Criteria (Gherkin format):**
35
+ - **Scenario:** [Brief description of the scenario]
36
+ - **Given:** [Initial context or preconditions]
37
+ - **and Given:** [Additional preconditions]
38
+ - **When:** [Event that triggers the action]
39
+ - **Then:** [Expected outcome]
40
+
41
+ ### Why This Structure Works
42
+ - **User-centric:** Forces focus on who benefits and why
43
+ - **Outcome-focused:** "So that" emphasizes the value delivered, not just the action
44
+ - **Testable:** Gherkin acceptance criteria are concrete and verifiable
45
+ - **Conversational:** Story is the opening for discussion, not the final spec
46
+ - **Shared language:** Product, engineering, and QA all understand the format
47
+
48
+ ### Anti-Patterns (What This Is NOT)
49
+ - **Not a task:** "As a developer, I want to refactor the database" (this is a tech task, not user value)
50
+ - **Not a feature list:** "I want dashboards, reports, and analytics" (this is too big—needs splitting)
51
+ - **Not vague:** "I want a better experience" (unmeasurable, no clear outcome)
52
+ - **Not a contract:** Stories are placeholders for conversation, not locked-in specs
53
+
54
+ ### When to Use This
55
+ - Translating user needs into development work
56
+ - Backlog grooming and sprint planning
57
+ - Communicating value to engineering and design
58
+ - Ensuring testable acceptance criteria exist before development
59
+
60
+ ### When NOT to Use This
61
+ - For pure technical debt or refactoring (use engineering tasks instead)
62
+ - When stories are too large (split first—see `skills/user-story-splitting/SKILL.md`)
63
+ - Before understanding the user problem (write a problem statement first)
64
+
65
+ ---
66
+
67
+ ## Application
68
+
69
+ ### Step 1: Gather Context
70
+ Before writing a story, ensure you have:
71
+ - **User persona:** Who is this for? (reference `skills/proto-persona/SKILL.md`)
72
+ - **Problem understanding:** What need does this address? (reference `skills/problem-statement/SKILL.md`)
73
+ - **Desired outcome:** What does success look like?
74
+ - **Constraints:** Technical, time, or scope limitations
75
+
76
+ **If missing context:** Run discovery interviews or problem validation work first.
77
+
78
+ ---
79
+
80
+ ### Optional Helper Script (Template Generator)
81
+
82
+ If you want a consistent Markdown stub, you can generate one from CLI inputs. This script is deterministic and does not fetch data or write files.
83
+
84
+ ```bash
85
+ python3 scripts/user-story-template.py --persona \"trial user\" --action \"log in with Google\" --outcome \"access the app without creating a new password\"
86
+ ```
87
+
88
+ ---
89
+
90
+ ### Step 2: Write the Use Case
91
+
92
+ Use `template.md` for the full fill-in structure.
93
+
94
+ Fill in the template:
95
+
96
+ ```markdown
97
+ ### User Story [ID]:
98
+
99
+ - **Summary:** [Brief, memorable title focused on value to the user]
100
+
101
+ #### Use Case:
102
+ - **As a** [user name if available, otherwise persona, otherwise role]
103
+ - **I want to** [action user takes to get to outcome]
104
+ - **so that** [desired outcome]
105
+ ```
106
+
107
+ **Quality checks:**
108
+ - **"As a" specificity:** Is this a specific persona (e.g., "trial user") or generic ("user")?
109
+ - **"I want to" clarity:** Is this an action the user takes, or a feature you're building?
110
+ - **"So that" outcome:** Does this explain the user's motivation? Or is it just restating the action?
111
+
112
+ **Common mistakes:**
113
+ - ❌ "As a user, I want a login button, so that I can log in" (restating the action)
114
+ - ✅ "As a trial user, I want to log in with Google, so that I can access the app without creating a new password"
115
+
116
+ ---
117
+
118
+ ### Step 3: Write the Acceptance Criteria
119
+
120
+ Fill in the template:
121
+
122
+ ```markdown
123
+ #### Acceptance Criteria:
124
+
125
+ - **Scenario:** [Brief, human-readable scenario describing value]
126
+ - **Given:** [Initial context or precondition]
127
+ - **and Given:** [Additional context or preconditions]
128
+ - **and Given:** [Additional context as needed]
129
+ - **and Given:** [UI-focused context ensuring 'When' can happen]
130
+ - **and Given:** [Outcomes-focused context ensuring 'Then' is delivered]
131
+ - **When:** [Event that triggers the action—aligns with 'I want to']
132
+ - **Then:** [Expected outcome—aligns with 'so that']
133
+ ```
134
+
135
+ **Quality checks:**
136
+ - **Multiple Givens are okay:** Preconditions stack up (e.g., "Given I'm logged in" + "Given I have items in my cart")
137
+ - **Only one When:** If you need multiple "When" statements, you likely have multiple stories—split them
138
+ - **Only one Then:** If you need multiple "Then" statements, you likely have multiple stories—split them
139
+ - **Alignment:** Does "When" match "I want to"? Does "Then" match "so that"?
140
+
141
+ **Red flags:**
142
+ - **Multiple Whens/Thens:** Sign of scope creep—split the story (reference `skills/user-story-splitting/SKILL.md`)
143
+ - **Vague Thens:** "Then I see improved performance" (unmeasurable—make it specific)
144
+
145
+ ---
146
+
147
+ ### Step 4: Add a Summary
148
+
149
+ Write a short, memorable summary that captures the story's value:
150
+
151
+ ```markdown
152
+ - **Summary:** [Brief, human-readable title]
153
+ ```
154
+
155
+ **Examples:**
156
+ - ✅ "Enable Google login for trial users to reduce signup friction"
157
+ - ✅ "Bulk delete items to save time for power users"
158
+ - ❌ "Add delete button" (feature-centric, not value-centric)
159
+
160
+ ---
161
+
162
+ ### Step 5: Validate and Refine
163
+
164
+ - **Read aloud to the team:** Does everyone understand who, what, why?
165
+ - **Test acceptance criteria:** Can QA write test cases from this?
166
+ - **Check for splitting:** If the story feels too big, use `skills/user-story-splitting/SKILL.md`
167
+ - **Ensure testability:** Can you prove "Then" happened?
168
+
169
+ ---
170
+
171
+ ## Examples
172
+
173
+ See `examples/sample.md` for full examples (good, bad, and split-needed stories).
174
+
175
+ Mini example excerpt:
176
+
177
+ ```markdown
178
+ ### User Story 042:
179
+
180
+ - **Summary:** Enable Google login for trial users to reduce signup friction
181
+
182
+ #### Use Case:
183
+ - **As a** trial user visiting the app for the first time
184
+ - **I want to** log in using my Google account
185
+ - **so that** I can access the app without creating and remembering a new password
186
+
187
+ #### Acceptance Criteria:
188
+ - **Scenario:** First-time trial user logs in via Google OAuth
189
+ - **Given:** I am on the login page
190
+ - **and Given:** I have a login account
191
+ - **When:** I click the "Sign in with Google" button and authorize the app
192
+ - **Then:** I am logged into the app and redirected to the onboarding flow
193
+ ```
194
+
195
+ ---
196
+
197
+ ## Common Pitfalls
198
+
199
+ ### Pitfall 1: Technical Tasks Disguised as User Stories
200
+ **Symptom:** "As a developer, I want to refactor the API, so that the code is cleaner"
201
+
202
+ **Consequence:** This is an engineering task, not a user story. No user value is delivered.
203
+
204
+ **Fix:** If there's no user outcome, it's not a user story—use an engineering task or tech debt ticket instead.
205
+
206
+ ---
207
+
208
+ ### Pitfall 2: "As a User" (Too Generic)
209
+ **Symptom:** Every story starts with "As a user"
210
+
211
+ **Consequence:** No persona clarity. Different users have different needs.
212
+
213
+ **Fix:** Use specific personas: "As a trial user," "As a paid subscriber," "As an admin," etc. (reference `skills/proto-persona/SKILL.md`)
214
+
215
+ ---
216
+
217
+ ### Pitfall 3: "So That" Restates "I Want To"
218
+ **Symptom:** "I want to click the save button, so that I can save my work"
219
+
220
+ **Consequence:** No insight into *why* the user cares. Just restating the action.
221
+
222
+ **Fix:** Dig into the motivation: "so that I don't lose my progress if the page crashes" (real outcome).
223
+
224
+ ---
225
+
226
+ ### Pitfall 4: Multiple When/Then Statements
227
+ **Symptom:** Acceptance criteria with 5 "When" statements and 5 "Then" statements
228
+
229
+ **Consequence:** Story is too big. Likely multiple features bundled together.
230
+
231
+ **Fix:** Split the story using `skills/user-story-splitting/SKILL.md`. Each When/Then pair should be its own story (or at least evaluated for splitting).
232
+
233
+ ---
234
+
235
+ ### Pitfall 5: Untestable Acceptance Criteria
236
+ **Symptom:** "Then the user has a better experience" or "Then it's faster"
237
+
238
+ **Consequence:** QA can't verify success. Ambiguous definition of "done."
239
+
240
+ **Fix:** Make it measurable: "Then the page loads in under 2 seconds" or "Then the user sees a success confirmation message."
241
+
242
+ ---
243
+
244
+ ## References
245
+
246
+ ### Related Skills
247
+ - `skills/user-story-splitting/SKILL.md` — How to break large stories into smaller ones
248
+ - `skills/proto-persona/SKILL.md` — Defines the "As a [persona]" section
249
+ - `skills/problem-statement/SKILL.md` — Stories should address validated problems
250
+ - `skills/epic-hypothesis/SKILL.md` — Epics decompose into user stories
251
+
252
+ ### Optional Helpers
253
+ - `skills/user-story/scripts/user-story-template.py` — Deterministic Markdown stub generator (no network access)
254
+
255
+ ### External Frameworks
256
+ - Mike Cohn, *User Stories Applied* (2004) — Origin of the "As a / I want / so that" format
257
+ - Gherkin (Cucumber) — "Given/When/Then" acceptance criteria format
258
+ - INVEST criteria (Independent, Negotiable, Valuable, Estimable, Small, Testable)
259
+
260
+ ### Dean's Work
261
+ - [Link to relevant Dean Peters' Substack articles if applicable]
262
+
263
+ ### Provenance
264
+ - Adapted from `prompts/user-story-prompt-template.md` in the `https://github.com/deanpeters/product-manager-prompts` repo.
265
+
266
+ ---
267
+
268
+ **Skill type:** Component
269
+ **Suggested filename:** `user-story.md`
270
+ **Suggested placement:** `/skills/components/`
271
+ **Dependencies:** References `skills/proto-persona/SKILL.md`, `skills/problem-statement/SKILL.md`
272
+ **Used by:** `skills/user-story-splitting/SKILL.md`, `skills/epic-hypothesis/SKILL.md`
@@ -0,0 +1,110 @@
1
+ # User Story Examples
2
+
3
+ ## Example 1: Good User Story
4
+
5
+ ```markdown
6
+ ### User Story 042:
7
+
8
+ - **Summary:** Enable Google login for trial users to reduce signup friction
9
+
10
+ #### Use Case:
11
+ - **As a** trial user visiting the app for the first time
12
+ - **I want to** log in using my Google account
13
+ - **so that** I can access the app without creating and remembering a new password
14
+
15
+ #### Acceptance Criteria:
16
+
17
+ - **Scenario:** First-time trial user logs in via Google OAuth
18
+ - **Given:** I am on the login page
19
+ - **and Given:** I have a Google account
20
+ - **and Given:** The "Sign in with Google" button is visible
21
+ - **When:** I click the "Sign in with Google" button and authorize the app
22
+ - **Then:** I am logged into the app and redirected to the onboarding flow
23
+ ```
24
+
25
+ **Why this works:**
26
+ - Persona is specific ("trial user visiting for the first time")
27
+ - Action is clear ("log in using my Google account")
28
+ - Outcome explains motivation ("without creating a new password")
29
+ - Acceptance criteria are testable (QA can verify each step)
30
+ - Only one When, one Then (appropriately scoped)
31
+
32
+ ---
33
+
34
+ ## Example 2: Bad User Story (Too Vague)
35
+
36
+ ```markdown
37
+ ### User Story 999:
38
+
39
+ - **Summary:** Improve login experience
40
+
41
+ #### Use Case:
42
+ - **As a** user
43
+ - **I want to** better login
44
+ - **so that** I can use the app
45
+
46
+ #### Acceptance Criteria:
47
+
48
+ - **Scenario:** User logs in
49
+ - **Given:** I want to log in
50
+ - **and Given:** I have an active account
51
+ - **When:** I log in
52
+ - **Then:** It works better
53
+ ```
54
+
55
+ **Why this fails:**
56
+ - "User" is too generic (trial user? returning user? admin?)
57
+ - "Better login" is not an action (what specifically?)
58
+ - "Use the app" is not a specific outcome (everyone wants to use the app)
59
+ - Acceptance criteria are untestable ("works better" = unmeasurable)
60
+
61
+ **How to fix it:**
62
+ - Narrow the persona: "trial user," "returning user without password manager," etc.
63
+ - Define the action: "log in using Google," "reset my password via email," etc.
64
+ - Specify the outcome: "without remembering a new password," "in under 30 seconds," etc.
65
+ - Make acceptance criteria falsifiable: "Then I am redirected to the dashboard within 2 seconds"
66
+
67
+ ---
68
+
69
+ ## Example 3: Story That Needs Splitting
70
+
71
+ ```markdown
72
+ ### User Story 100:
73
+
74
+ - **Summary:** Manage shopping cart
75
+
76
+ #### Use Case:
77
+ - **As a** shopper
78
+ - **I want to** add items, remove items, update quantities, apply coupons, and checkout
79
+ - **so that** I can complete my purchase
80
+
81
+ #### Acceptance Criteria:
82
+
83
+ - **Scenario:** Shopping cart management
84
+ - **Given:** I have items in my cart
85
+ - **When:** I add an item
86
+ - **Then:** It appears in the cart
87
+ - **When:** I remove an item
88
+ - **Then:** It disappears from the cart
89
+ - **When:** I update quantity
90
+ - **Then:** The quantity changes
91
+ - **When:** I apply a coupon
92
+ - **Then:** The discount is applied
93
+ - **When:** I checkout
94
+ - **Then:** I proceed to payment
95
+ ```
96
+
97
+ **Why this needs splitting:**
98
+ - Multiple "When" statements = multiple stories
99
+ - Scope is too large for a single sprint
100
+ - Different outcomes aren't related (adding items ≠ applying coupons)
101
+
102
+ **How to split it:**
103
+ Use `skills/user-story-splitting/SKILL.md` to break this into:
104
+ 1. "Add items to cart"
105
+ 2. "Remove items from cart"
106
+ 3. "Update item quantities"
107
+ 4. "Apply discount coupons"
108
+ 5. "Checkout and proceed to payment"
109
+
110
+ Each becomes its own story with focused acceptance criteria.
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env python3
2
+ """Generate a user story Markdown snippet from CLI inputs.
3
+
4
+ No network access. Prints to stdout.
5
+ """
6
+
7
+ import argparse
8
+ import sys
9
+
10
+
11
+ def parse_args() -> argparse.Namespace:
12
+ parser = argparse.ArgumentParser(
13
+ description="Generate a user story with Gherkin-style acceptance criteria.",
14
+ )
15
+ parser.add_argument("--summary", help="Short summary/title for the story.")
16
+ parser.add_argument("--persona", help='Persona or role for "As a".')
17
+ parser.add_argument("--action", help='Action for "I want to".')
18
+ parser.add_argument("--outcome", help='Outcome for "so that".')
19
+ parser.add_argument("--scenario", help="Scenario description.")
20
+ parser.add_argument("--given", action="append", default=[], help="Given precondition (repeatable).")
21
+ parser.add_argument("--when", dest="when", help="When trigger.")
22
+ parser.add_argument("--then", dest="then", help="Then outcome.")
23
+ return parser.parse_args()
24
+
25
+
26
+ def normalize(value: str, placeholder: str) -> str:
27
+ if value and value.strip():
28
+ return value.strip()
29
+ return placeholder
30
+
31
+
32
+ def main() -> int:
33
+ args = parse_args()
34
+
35
+ summary = normalize(args.summary, "[Brief, memorable title focused on value]")
36
+ persona = normalize(args.persona, "[persona or role]")
37
+ action = normalize(args.action, "[action user takes to get to outcome]")
38
+ outcome = normalize(args.outcome, "[desired outcome]")
39
+ scenario = normalize(args.scenario, "[Brief, human-readable scenario describing value]")
40
+ whens = normalize(args.when, "[Event that triggers the action]")
41
+ thens = normalize(args.then, "[Expected outcome]")
42
+
43
+ givens = args.given or ["[Initial context or precondition]"]
44
+
45
+ print("### User Story [ID]:\n")
46
+ print(f"- **Summary:** {summary}\n")
47
+ print("#### Use Case:")
48
+ print(f"- **As a** {persona}")
49
+ print(f"- **I want to** {action}")
50
+ print(f"- **so that** {outcome}\n")
51
+ print("#### Acceptance Criteria:\n")
52
+ print(f"- **Scenario:** {scenario}")
53
+
54
+ for index, given in enumerate(givens):
55
+ label = "Given" if index == 0 else "and Given"
56
+ print(f"- **{label}:** {given}")
57
+
58
+ print(f"- **When:** {whens}")
59
+ print(f"- **Then:** {thens}")
60
+
61
+ return 0
62
+
63
+
64
+ if __name__ == "__main__":
65
+ raise SystemExit(main())
@@ -0,0 +1,32 @@
1
+ # User Story Template
2
+
3
+ Use this template to write a single user story with Gherkin-style acceptance criteria.
4
+
5
+ ## Provenance
6
+ Adapted from `prompts/user-story-prompt-template.md` in the `https://github.com/deanpeters/product-manager-prompts` repo.
7
+
8
+ ## Template
9
+ ```markdown
10
+ ### User Story [ID]:
11
+
12
+ - **Summary:** [Brief, memorable title focused on user value]
13
+
14
+ #### Use Case:
15
+ - **As a** [user name if available, otherwise persona, otherwise role]
16
+ - **I want to** [action the user takes to get to the outcome]
17
+ - **so that** [desired outcome for the user]
18
+
19
+ #### Acceptance Criteria:
20
+ - **Scenario:** [Brief, human-readable scenario describing value]
21
+ - **Given:** [Initial context or precondition]
22
+ - **and Given:** [Additional context or preconditions]
23
+ - **and Given:** [Additional context as needed]
24
+ - **and Given:** [UI-focused context ensuring the When can happen]
25
+ - **and Given:** [Outcomes-focused context ensuring the Then is delivered]
26
+ - **When:** [Event that triggers the action]
27
+ - **Then:** [Expected outcome aligned to "so that"]
28
+ ```
29
+
30
+ ## Notes
31
+ - Use only one **When** and one **Then**. Multiple When/Then pairs usually mean the story should be split.
32
+ - If you need multiple outcomes, split the story with `skills/user-story-splitting/SKILL.md`.