wdi-method 0.5.13 → 0.6.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 (87) hide show
  1. package/README.md +436 -271
  2. package/bin/wdi-method.js +198 -5
  3. package/kit/.constitution/method/README.md +76 -75
  4. package/kit/.constitution/method/constitution.md +2 -1
  5. package/kit/.constitution/method/document/architecture-guide.md +10 -10
  6. package/kit/.constitution/method/document/bmad-guide.md +50 -16
  7. package/kit/.constitution/method/document/bmad-skill-register.md +74 -71
  8. package/kit/.constitution/method/document/brief-guide.md +42 -11
  9. package/kit/.constitution/method/document/corpus-guide.md +146 -11
  10. package/kit/.constitution/method/document/decision-guide.md +199 -134
  11. package/kit/.constitution/method/document/delivery-flow-guide.md +154 -83
  12. package/kit/.constitution/method/document/prd-guide.md +63 -20
  13. package/kit/.constitution/method/document/sdd-guide.md +5 -4
  14. package/kit/.constitution/method/document/srs-guide.md +150 -147
  15. package/kit/.constitution/method/document/templates/addendum.md +70 -71
  16. package/kit/.constitution/method/document/templates/architecture-spine.md +6 -4
  17. package/kit/.constitution/method/document/templates/brief.md +132 -110
  18. package/kit/.constitution/method/document/templates/c4.md +11 -11
  19. package/kit/.constitution/method/document/templates/contract.md +51 -52
  20. package/kit/.constitution/method/document/templates/cross-cutting.md +1 -2
  21. package/kit/.constitution/method/document/templates/design-system.md +0 -1
  22. package/kit/.constitution/method/document/templates/integration.md +68 -69
  23. package/kit/.constitution/method/document/templates/inventory.md +0 -1
  24. package/kit/.constitution/method/document/templates/lc.md +49 -47
  25. package/kit/.constitution/method/document/templates/lifecycle.md +51 -52
  26. package/kit/.constitution/method/document/templates/model.md +68 -55
  27. package/kit/.constitution/method/document/templates/oq.md +45 -45
  28. package/kit/.constitution/method/document/templates/prd.md +244 -226
  29. package/kit/.constitution/method/document/templates/questions.md +100 -76
  30. package/kit/.constitution/method/document/templates/rules.md +46 -47
  31. package/kit/.constitution/method/document/templates/sdd.md +26 -11
  32. package/kit/.constitution/method/document/templates/srs.md +46 -25
  33. package/kit/.constitution/method/document/templates/uc.md +1 -1
  34. package/kit/.constitution/method/document/templates/ux.md +76 -77
  35. package/kit/.constitution/method/document/ux-guide.md +115 -99
  36. package/kit/.constitution/method/language-guide.md +1 -1
  37. package/kit/.constitution/method/method-glossary.md +29 -16
  38. package/kit/.constitution/method/scripts/timeline.py +663 -665
  39. package/kit/.constitution/method/scripts/validate.py +1143 -362
  40. package/kit/.constitution/method/structure-guide.md +3 -3
  41. package/kit/.constitution/method/why/README.md +184 -169
  42. package/kit/.constitution/method/why/artifact-map.md +15 -13
  43. package/kit/.constitution/method/why/mode-risk-map.md +140 -0
  44. package/kit/.constitution/method/why/portability.md +1 -1
  45. package/kit/.constitution/method/why/rationale.md +12 -5
  46. package/kit/.constitution/project/README.md +2 -2
  47. package/kit/.constitution/project/codebase-brownfield-guide.md +18 -18
  48. package/kit/.constitution/project/codebase-conventions-guide.md +18 -18
  49. package/kit/.constitution/project/codebase-stack-guide.md +18 -18
  50. package/kit/assets/bmad-custom/bmad-architecture.toml +1 -1
  51. package/kit/assets/bmad-custom/bmad-correct-course.toml +5 -5
  52. package/kit/assets/bmad-custom/bmad-prd.toml +9 -3
  53. package/kit/assets/bmad-custom/bmad-product-brief.toml +6 -2
  54. package/kit/skills/wdi-blueprint/SKILL.md +71 -10
  55. package/kit/skills/wdi-build/SKILL.md +233 -122
  56. package/kit/skills/wdi-component/SKILL.md +8 -6
  57. package/kit/skills/wdi-decision/SKILL.md +187 -183
  58. package/kit/skills/wdi-help/SKILL.md +8 -7
  59. package/kit/skills/wdi-init/SKILL.md +20 -6
  60. package/kit/skills/wdi-problem/SKILL.md +31 -13
  61. package/kit/skills/wdi-product/SKILL.md +30 -17
  62. package/kit/skills/wdi-question/SKILL.md +170 -88
  63. package/kit/skills/wdi-reconcile/SKILL.md +33 -10
  64. package/kit/skills/wdi-report/SKILL.md +77 -25
  65. package/kit/skills/wdi-review/SKILL.md +201 -118
  66. package/kit/skills/wdi-systematic-debugging/SKILL.md +7 -7
  67. package/kit/skills/wdi-upgrade/SKILL.md +179 -0
  68. package/kit/skills/wdi-ux/SKILL.md +35 -11
  69. package/kit-overlay/AGENTS.md +2 -2
  70. package/kit-overlay/README.md +76 -75
  71. package/kit-overlay/constitution.md +2 -1
  72. package/kit-overlay/portability.md +1 -1
  73. package/package.json +43 -43
  74. package/scaffold/.control/product-glossary.md +1 -1
  75. package/scaffold/.control/registry/goals.yaml +25 -0
  76. package/scaffold/.control/registry/index.yaml +5 -5
  77. package/scaffold/.control/registry/specs.yaml +5 -0
  78. package/scaffold/.control/structure-codebase.md +19 -19
  79. package/scaffold/.control/structure-document.md +25 -25
  80. package/kit/.constitution/method/document/templates/rtr.md +0 -61
  81. package/kit/assets/bmad-custom/bmad-build-auto.toml +0 -10
  82. package/kit/assets/bmad-custom/bmad-build.toml +0 -52
  83. package/kit/assets/bmad-custom/bmad-code-review.toml +0 -13
  84. package/kit/assets/bmad-custom/bmad-retrospective.toml +0 -9
  85. package/kit/assets/bmad-custom/bmad-spec.toml +0 -16
  86. package/scaffold/.control/registry/requirements.yaml +0 -15
  87. package/scaffold/.control/registry/waves.yaml +0 -5
@@ -1,226 +1,244 @@
1
- # PRD Template
2
-
3
- ## Essential Spine *(almost always present)*
4
-
5
- ```markdown
6
- ---
7
- title: {Initiative Name}
8
- initiative: {slug}
9
- created: {YYYY-MM-DD}
10
- updated: {YYYY-MM-DD}
11
- ---
12
-
13
- # PRD: {Initiative Name}
14
- *Working title — confirm.*
15
-
16
- ## Revision History
17
-
18
- | Date | What changed | Why | Releases affected |
19
- |---|---|---|---|
20
- | {YYYY-MM-DD} | Initial version | — | {target release} |
21
-
22
- [One row per Update run, newest last. Written for an outside reader — a client or sponsor who was
23
- not in the room so state what the promise now is, not which section was edited. This table is not
24
- the memlog: the memlog records every decision inside a run and is an audit trail; this records what
25
- changed for the reader. Neither replaces the other.]
26
-
27
- ## 0. Document Purpose
28
- [1 paragraph: who this PRD is for (PM, stakeholders, downstream workflow owners), how it's structured (Glossary-anchored vocabulary, features grouped with FRs nested, assumptions tagged inline and indexed). If UX work or other inputs already exist, name them here and reference where they live — this PRD builds on them, it does not duplicate.]
29
-
30
- ## 1. Vision
31
- [2-3 paragraphs: what this is, what it does for the user, why it matters. Compelling enough to stand alone.]
32
-
33
- ## 2. Target User
34
-
35
- ### 2.1 Jobs To Be Done
36
- [Bulleted. Emotional, social, functional, contextual whichever apply. Even "this is for me as the builder" is a valid framing for a hobby project.]
37
-
38
- ### 2.2 Non-Users (v1) *(add when the audience boundary is non-obvious)*
39
- [Who this is explicitly not for in v1.]
40
-
41
- ### 2.3 Key User Journeys
42
- *Named-persona narratives the product enables. Numbered globally as UJ-1 through UJ-N. FRs reference journeys by ID inline ("realizes UJ-3"); SMs may also cross-reference. If a UX doc already exists, mirror its UJ IDs here and point to the source.*
43
-
44
- **Default shape:** a named scene with entry state, path, climax, and resolution. Each beat forces specificity the team would otherwise leave implicit — auth assumptions, screen order, what tells the user value landed. Read together as a short narrative; the example below shows the form.
45
-
46
- - **UJ-1. {One-line title — persona doing the thing.}**
47
- - **Persona + context:** one line, grounded enough to explain the *why*.
48
- - **Entry state:** authenticated? which surface? coming from where?
49
- - **Path:** 3-5 concrete beats — taps, screens, decisions.
50
- - **Climax:** the moment value is delivered and how the user knows.
51
- - **Resolution:** state they're left in, what's next.
52
- - **Edge case** *(optional)*: one real failure mode and what the user does next.
53
-
54
- *Written out, that becomes:*
55
- > **UJ-3. Priya checks the trip damage before she's even home.**
56
- > Priya, budgeting on a single income with a new baby, finishes a grocery run and gets in the car. Already authenticated via biometric on a previous session. She opens the app, taps the FAB camera, and scans the receipt. The app OCRs the total and shows a single-screen overlay: this trip $84.20, weekly cap $250, $172.10 remaining, three days left in the week. She closes the app and drives home. **Edge case:** if she scanned a receipt earlier today, the app asks whether this replaces or adds to that trip before counting it against the cap.
57
-
58
- - **UJ-2. ...**
59
-
60
- **Scope dial:**
61
- - **Lighter** hobby/solo, library/CLI, or when the UJ is essentially a JTBD restated: a single sentence works (`{Persona}, {context}, {what they do and why}.`).
62
- - **Heavier** — auth, multi-device handoff, complex navigation, or anything feeding downstream UX/architecture: add a numbered Flow, an Edge cases list, and a capability → FR mapping (`The system must {capability}. → FR-N`).
63
-
64
- ## 3. Glossary
65
- *Downstream workflows and readers must use these terms exactly. FRs, UJs, and SMs use Glossary terms verbatim; introducing a synonym anywhere in the PRD is a discipline violation. If §4 introduces a new domain noun, add it to the Glossary in the same pass.*
66
-
67
- - **Term** Definition. Relationships to other Glossary terms. Cardinality where relevant.
68
- - **Term**...
69
-
70
- [Every domain noun the rest of the document uses. Defined once. No synonyms anywhere else in the PRD.]
71
-
72
- ## 4. Features
73
- *Each subsection is a coherent feature: behavioral description first, FRs nested under it, optional feature-specific NFRs and notes. FRs are numbered globally (FR-1 through FR-N) so downstream artifacts have stable references even if features get reorganized. Reference user journeys by ID inline ("realizes UJ-2") where the chain matters.*
74
-
75
- ### 4.1 {Feature Name}
76
- **Capability:** CAP-N — serves BG-N. *(WDI. One feature is one capability; both IDs come from `requirements.yaml`. This is the link that makes the feature schedulable — size, priority, owner, target release, and dependencies on other capabilities all live on the `CAP` entry, not here.)*
77
-
78
- **Description:** [Behavioral narrative — how this feature works, who uses it, the user experience, edge cases. Realizes UJ-X, UJ-Y. Use Glossary terms exactly. Embed inline `[ASSUMPTION: ...]` tags where you inferred without confirmation.]
79
-
80
- **Functional Requirements:**
81
-
82
- #### FR-1: {Short capability name}
83
-
84
- [Actor] can [capability] [under conditions]. Realizes UJ-X.
85
-
86
- **Proof of done:** *(WDI, required)* [One sentence a Product Owner can check without opening the code. Business language, no HTTP codes and no table names. This is the sentence that lets one FR become one testable unit of work — it is not the same as the technical consequences below, and one MUST NOT be written in place of the other.]
87
-
88
- **Consequences (testable):**
89
- - {Specific testable condition, e.g. "System returns HTTP 429 when request rate exceeds 100/sec per merchant."}
90
- - {Another testable condition.}
91
-
92
- **Out of Scope:** *(optional — what this FR explicitly does NOT cover)*
93
- - {bound}
94
-
95
- #### FR-2: ...
96
-
97
- **Feature-specific NFRs:** *(only if any apply uniquely to this feature)*
98
- - Performance / security / accessibility / etc. specific to this feature.
99
-
100
- **Notes:** *(optional open questions specific to this feature, `[NOTE FOR PM]` callouts)*
101
-
102
- ### 4.2 {Feature Name}
103
- ...
104
-
105
- ## 5. Non-Goals (Explicit)
106
- [Bulleted. What this product is *not* and what it will *not* do in v1. Does outsized work for downstream readers and workflows — prevents the "let me also add this nearby thing" failure mode at every level (epic, ticket, code). Inline `[NON-GOAL for MVP]` callouts within §4 Features cover deferred items within features; this section captures the broader "we are not building X / we are not becoming Y" statements.]
107
-
108
- ## 6. MVP Scope
109
-
110
- ### 6.1 In Scope
111
- [Bulleted, crisp.]
112
-
113
- ### 6.2 Out of Scope for MVP
114
- [Bulleted. Each item with a one-line reason if the reason matters. Mark items deferred to v2/v3 explicitly. Add `[NOTE FOR PM]` callouts where a deferred item is emotionally load-bearing — flags it for revisit if timeline permits.]
115
-
116
- ## 7. Success Metrics
117
-
118
- *Each SM cross-references the FR(s) it validates. Counter-metrics counterbalance specific primary or secondary metrics.*
119
-
120
- **Primary**
121
- - **SM-1**: Metricdefinition, target. Validates FR-X, FR-Y.
122
-
123
- **Secondary**
124
- - **SM-2**: Metric — definition, target. Validates FR-Z.
125
-
126
- **Counter-metrics (do not optimize)**
127
- - **SM-C1**: Metric — why this should *not* be optimized. Counterbalances SM-1.
128
-
129
- [Length scales with stakes. Hobby/utility PRD: a single sentence may be enough ("Success: I use this weekly and don't abandon it after a month"). Public launch / enterprise: full quantitative breakdown with measurement methods. Counter-metrics are as load-bearing as primary metrics — they prevent the architect from optimizing the wrong thing and the dev from gaming the wrong target.]
130
-
131
- ## 8. Open Questions
132
- [Numbered. Things still unknown — they become future tickets or follow-up research, not silent gaps.]
133
-
134
- ## 9. Assumptions Index
135
- *Every `[ASSUMPTION]` from the document, surfaced for explicit confirmation:*
136
- - Inline assumption from §X.Y — short description.
137
- - ...
138
- ```
139
-
140
- ---
141
-
142
- ## Adapt-In Menu *(add the clusters the product calls for)*
143
-
144
- ### Cross-cutting quality and shape *(most non-trivial PRDs)*
145
- - **Cross-Cutting NFRs** — system-wide non-functional requirements not tied to a single feature (performance, security, reliability, observability). Add when system-wide quality attributes are meaningful.
146
- - **Constraints and Guardrails** — Safety, Privacy, Cost. Subsection per cluster. Add when any of these are real concerns.
147
- - **Why Now** — add when timing is load-bearing (a market shift, a technology enabler, a regulatory deadline). Drop when timing is incidental.
148
-
149
- ### Consumer / branded products
150
- - **Aesthetic and Tone** — visual references, anti-references, voice/tone for any product-generated text.
151
- - **Information Architecture** top-level surfaces, navigation, screens.
152
- - **Monetization** — free vs. paid, pricing assumptions, ads policy.
153
- - **Platform** — web, mobile, PWA, native, v1 vs. v2+.
154
-
155
- ### Enterprise initiatives
156
- - **Stakeholders and Approvals** — who must sign off, at what stage.
157
- - **Risk and Mitigations** — operational, security, business, reputational risk register.
158
- - **ROI / Business Case** — quantified benefit, cost, payback period.
159
- - **Operational Requirements** — SLAs, RTO/RPO, support tier, on-call expectations.
160
- - **Integration and Dependencies** — SSO, existing enterprise systems, data sources, downstream consumers.
161
- - **Rollout and Change Management** — phased rollout plan, training, internal communication.
162
- - **Data Governance** — residency, sovereignty, classification, retention.
163
- - **Audit Trail / Decision Provenance** — formal documentation requirements for regulated environments.
164
-
165
- ### Regulated domains
166
- - **Compliance and Regulatory** — HIPAA, PCI-DSS, GDPR, SOX, SOC 2, Section 508 / WCAG 2.1 AA, FedRAMP, etc. — whichever apply. If any item needs depth, add a `[NOTE FOR PM]` callout to revisit or move to an addendum.
167
-
168
- ### Developer products (libraries, APIs, CLIs, SDKs)
169
- - **API Contracts / Public Surface** — endpoint shapes, breaking change policy.
170
- - **Versioning and Deprecation Policy**.
171
- - **Performance Budgets** — latency, throughput, resource use.
172
- - **Language / Runtime Targets and Dependency Policy**.
173
-
174
- ### Embedded / hardware
175
- - **Hardware Constraints** — memory, power, form factor.
176
- - **Deployment and Update Mechanism** — OTA, manual, image-based.
177
- - **Environmental and Reliability Requirements**.
178
-
179
- ### Small-scope all-inclusive *(use when scope is 1-2 stories' worth and the user wants a single captured artifact — chosen during the Right-skill check in Discovery)*
180
- - **Stories** — story-level specs listed inline at the end of the doc. Each story: *"As a [persona], I can [action] [under conditions]. Acceptance: [testable criteria]."* Numbered Story-1, Story-2, ... for reference. Pair with very lean §1 Vision, §2 Target User (often just JTBD + one UJ), §3 Glossary (handful of terms), §4 Features (often a single feature), §6 MVP Scope (in/out very tight). The whole doc fits on a page or two and captures intent + implementable stories in one place. If the user doesn't want the captured artifact at all, `bmad-build` is the better path — this cluster is only for "I want a doc *and* the stories."
181
-
182
-
183
- ---
184
-
185
- ## Project overrides — WDI
186
-
187
- These rules replace the corresponding BMad defaults for this project. They are additive to the
188
- shape above; nothing in the shape is removed.
189
-
190
- - **Scope.** One PRD per **initiative / functional area** — not per product, not per component, and
191
- not per release. It is a **living document** and is never frozen.
192
- - **Change.** A behaviour change, a correction, or a new feature closely tied to what is already
193
- here MUST land through `bmad-prd` intent *Update* on this same file. A second PRD MUST NOT be
194
- created because the release changed; create one only when the functional area is genuinely
195
- different and would not read well merged in.
196
- - **Revision History.** Every Update run MUST add exactly one row, written for an outside reader.
197
- It is what preserves "what did we promise back then" now that the document is not frozen.
198
- - **Release.** Carried by `CAP.target_release` in `.control/registry/requirements.yaml` the only
199
- place a promise's release is written — and by `release` in `waves.yaml` for the execution side. It
200
- MUST NOT be expressed through this document's folder name or title, and an `FR` MUST NOT carry a
201
- release of its own; it inherits one from its capability. Naming a release in prose as context MAY
202
- happen; the registry is what binds.
203
- - **Numbering.** `FR-N`, `NFR-N`, `UJ-N`, and `CAP-N` MUST be allocated from
204
- `.control/registry/requirements.yaml`. They MUST NOT restart at 1 in a new PRD the sequence is
205
- global to the product, and a later PRD continues the earlier one.
206
- - **Two Adapt-In clusters are not optional here.** `Cross-Cutting NFRs` and `Constraints and
207
- Guardrails` MUST be present. G2 passes on numbered FR **and NFR**, so a PRD with no NFR section
208
- cannot clear it; and a constraint discovered at G4 costs a decision that a sentence here would
209
- have prevented. Every other Adapt-In cluster stays conditional as BMad intends.
210
- - **Constraints state the delta.** Product-wide constraints already live in
211
- `.what/_product-brief/brief.md`. This section MUST carry only what binds *this initiative* beyond
212
- them, and MUST say "none beyond the brief" when there is nothing an absent section reads as
213
- "not checked".
214
- - **Prerequisites are not written here.** An initiative that cannot start until another one ships is
215
- a `depends_on` between `CAP` entries in `requirements.yaml`. Restating it in prose creates a
216
- second home that will drift.
217
- - **§2 MUST name which stakeholders from the brief this initiative serves**, using the same role
218
- names. A PRD that invents its own user labels breaks the trace back to `BG-N`.
219
- - **Vocabulary.** Every domain noun MUST already exist in `.control/product-glossary.md`, used verbatim. A
220
- new noun introduced here MUST be added to the Glossary in the same pass, not defined inline.
221
- - **Boundary.** This document promises; it MUST NOT design. Behaviour of the system belongs to
222
- `SRS-<pc>.md`, and solution shape to `SDD-<pc>.md`.
223
- - **Assumptions.** Every `[ASSUMPTION]` left unresolved at Finalize MUST be registered through
224
- `wdi-question` before this PRD passes G2.
225
- - **Memlog.** Written to `.control/memlog/prd-<slug>.md` via `--path`, never beside this file. The
226
- slug matches this PRD's folder.
1
+ # PRD Template
2
+
3
+ **The PRD states the current promise. It is not a history of itself** — with one deliberate exception:
4
+ Revision History, which is written for a reader who was not in the room and MUST NOT be collapsed into
5
+ the corpus's present-tense rule. Everywhere else, see `corpus-guide.md` § The corpus is written in the
6
+ present tense.
7
+
8
+ **A derived fact has exactly one home, and it is never this document.** `FR`/`NFR`/`CAP` statements
9
+ live in `.control/registry/requirements-<slug>.yaml`; this PRD cites their ids under each feature, never their
10
+ text. The Glossary, Open Questions, and Assumptions Index are not sections here — see the WDI overrides
11
+ below for where each actually lives. See `corpus-guide.md` § A derived fact has exactly one home.
12
+
13
+ ## Essential Spine *(almost always present)*
14
+
15
+ ```markdown
16
+ ---
17
+ title: {Initiative Name}
18
+ initiative: {slug}
19
+ created: {YYYY-MM-DD}
20
+ ---
21
+
22
+ # PRD: {Initiative Name}
23
+ *Working titleconfirm.*
24
+
25
+ > **This is the working PRD.** It cites requirement ids instead of repeating their text, so §3 lists
26
+ > `FR`/`NFR` by id, and there is no Glossary, Non-Goals, Open Questions, or Assumptions Index section
27
+ > here each of those facts has its own home.
28
+ >
29
+ > **To read or hand over one complete, self-contained document, run `/wdi-report render prd`.**
30
+ > It writes `.what-rendered/_prd/<slug>/prd.md` with the capabilities, the requirement statements and
31
+ > proofs of done, the glossary terms this PRD uses, the non-goals, and the open questions filled in
32
+ > from their own homes. That file is regenerated, never hand-edited.
33
+
34
+ ## Revision History
35
+
36
+ | Date | What changed | Why | Releases affected |
37
+ |---|---|---|---|
38
+ | {YYYY-MM-DD} | Initial version | | {target release} |
39
+
40
+ [One row per Update run, newest last. Written for an outside reader — a client or sponsor who was
41
+ not in the room — so state what the promise now is, not which section was edited. This table is not
42
+ the memlog: the memlog records every decision inside a run and is an audit trail; this records what
43
+ changed for the reader. Neither replaces the other.]
44
+
45
+ ## 1. Why This Initiative
46
+
47
+ [ONE paragraph, stated as a DELTA against the product's `Why` in `.what/_product-brief/brief.md`:
48
+ what does THIS initiative change, add, or unlock that the brief's narrative does not already say? For
49
+ a product with a single initiative, this MAY be a single sentence pointing back to the brief — "This
50
+ initiative IS the product's Why; see brief.md." It MUST NOT restate the product's vision from scratch.]
51
+
52
+ ## 2. Target User
53
+
54
+ ### 2.1 Jobs To Be Done
55
+ [Bulleted. Emotional, social, functional, contextual — whichever apply. Even "this is for me as the builder" is a valid framing for a hobby project.]
56
+
57
+ ### 2.2 Non-Users (v1) *(add when the audience boundary is non-obvious)*
58
+ [Who this is explicitly not for in v1.]
59
+
60
+ ### 2.3 Key User Journeys
61
+ *Named-persona narratives the product enables. Numbered globally as UJ-1 through UJ-N. FRs reference journeys by ID inline ("realizes UJ-3"); SMs may also cross-reference. If a UX doc already exists, mirror its UJ IDs here and point to the source.*
62
+
63
+ **Default shape:** a named scene with entry state, path, climax, and resolution. Each beat forces specificity the team would otherwise leave implicit — auth assumptions, screen order, what tells the user value landed. Read together as a short narrative; the example below shows the form.
64
+
65
+ - **UJ-1. {One-line title persona doing the thing.}**
66
+ - **Persona + context:** one line, grounded enough to explain the *why*.
67
+ - **Entry state:** authenticated? which surface? coming from where?
68
+ - **Path:** 3-5 concrete beats taps, screens, decisions.
69
+ - **Climax:** the moment value is delivered and how the user knows.
70
+ - **Resolution:** state they're left in, what's next.
71
+ - **Edge case** *(optional)*: one real failure mode and what the user does next.
72
+
73
+ *Written out, that becomes:*
74
+ > **UJ-3. Priya checks the trip damage before she's even home.**
75
+ > Priya, budgeting on a single income with a new baby, finishes a grocery run and gets in the car. Already authenticated via biometric on a previous session. She opens the app, taps the FAB camera, and scans the receipt. The app OCRs the total and shows a single-screen overlay: this trip $84.20, weekly cap $250, $172.10 remaining, three days left in the week. She closes the app and drives home. **Edge case:** if she scanned a receipt earlier today, the app asks whether this replaces or adds to that trip before counting it against the cap.
76
+
77
+ - **UJ-2. ...**
78
+
79
+ **Scope dial:**
80
+ - **Lighter** — hobby/solo, library/CLI, or when the UJ is essentially a JTBD restated: a single sentence works (`{Persona}, {context}, {what they do and why}.`).
81
+ - **Heavier** — auth, multi-device handoff, complex navigation, or anything feeding downstream UX/architecture: add a numbered Flow, an Edge cases list, and a capability → FR mapping (`The system must {capability}. → FR-N`).
82
+
83
+ ## 3. Features
84
+ *Each subsection is a coherent feature: behavioral description first, requirement ids nested under it,
85
+ optional feature-specific NFRs and notes. Reference user journeys by ID inline ("realizes UJ-2") where
86
+ the chain matters.*
87
+
88
+ ### 3.1 {Feature Name}
89
+ **Capability:** CAP-N serves BG-N. *(One feature is one capability; both IDs come from
90
+ `requirements-<slug>.yaml`. This is the link that makes the feature schedulable — size, priority, owner,
91
+ target release, and dependencies on other capabilities all live on the `CAP` entry, not here.)*
92
+
93
+ **Description:** [Behavioral narrative — how this feature works, who uses it, the user experience, edge cases. Realizes UJ-X, UJ-Y. Use Glossary terms exactly. Embed inline `[ASSUMPTION: ...]` tags where you inferred without confirmation.]
94
+
95
+ **Realizes:** FR-1, FR-2, NFR-3
96
+
97
+ [The statement, proof of done, and enforcer for each id above live in `requirements-<slug>.yaml`, landed there
98
+ by `wdi-product` as part of producing this PRD landing the registry row is part of writing the
99
+ feature, not a follow-up. Do NOT write a full FR block here; the registry entry is the only copy. If a
100
+ requirement needs a longer technical restatement, that belongs in `addendum.md` or the SDD, never a
101
+ second proof of done.]
102
+
103
+ **Feature-specific NFRs:** *(only if any apply uniquely to this feature — cite the id; see §6)*
104
+
105
+ **Notes:** *(optional open questions specific to this feature, `[NOTE FOR PM]` callouts)*
106
+
107
+ ### 3.2 {Feature Name}
108
+ ...
109
+
110
+ ## 4. MVP Scope
111
+
112
+ ### 4.1 In Scope
113
+ [Bulleted, crisp.]
114
+
115
+ ### 4.2 Out of Scope for MVP
116
+ [Bulleted. Each item with a one-line reason if the reason matters. Mark items deferred to v2/v3 explicitly. Add `[NOTE FOR PM]` callouts where a deferred item is emotionally load-bearing — flags it for revisit if timeline permits.]
117
+
118
+ ## 5. Success Metrics
119
+
120
+ *Each SM cross-references the FR(s) it validates, and the primary metric MUST relate back to the
121
+ brief's Success Criteriaeither the same figure narrowed to this initiative, or a stated reason it
122
+ diverges. Counter-metrics counterbalance specific primary or secondary metrics.*
123
+
124
+ **Primary**
125
+ - **SM-1**: Metric — definition, target. Validates FR-X, FR-Y. Relates to the brief's Success Criteria: {how}.
126
+
127
+ **Secondary**
128
+ - **SM-2**: Metric — definition, target. Validates FR-Z.
129
+
130
+ **Counter-metrics (do not optimize)**
131
+ - **SM-C1**: Metric — why this should *not* be optimized. Counterbalances SM-1.
132
+
133
+ [Length scales with stakes. Hobby/utility PRD: a single sentence may be enough ("Success: I use this weekly and don't abandon it after a month"). Public launch / enterprise: full quantitative breakdown with measurement methods. Counter-metrics are as load-bearing as primary metrics — they prevent the architect from optimizing the wrong thing and the dev from gaming the wrong target.]
134
+
135
+ ## 6. Cross-Cutting NFRs
136
+
137
+ [System-wide non-functional requirements not tied to a single feature — cite the `NFR-N` id; the
138
+ statement and `enforced_by` live in `requirements-<slug>.yaml`, same as any other NFR.]
139
+
140
+ ## 7. Constraints and Guardrails
141
+
142
+ [MUST state only the delta beyond `.what/_product-brief/brief.md` what binds THIS initiative beyond
143
+ the product's own constraints. MUST say "none beyond the brief" when there is nothing; an absent
144
+ section reads as "not checked."]
145
+ ```
146
+
147
+ ---
148
+
149
+ ## Adapt-In Menu *(add the clusters the product calls for)*
150
+
151
+ ### Consumer / branded products
152
+ - **Aesthetic and Tone** — visual references, anti-references, voice/tone for any product-generated text.
153
+ - **Information Architecture** — top-level surfaces, navigation, screens.
154
+ - **Monetization** — free vs. paid, pricing assumptions, ads policy.
155
+ - **Platform** — web, mobile, PWA, native, v1 vs. v2+.
156
+
157
+ ### Enterprise initiatives
158
+ - **Stakeholders and Approvals** — who must sign off, at what stage.
159
+ - **Risk and Mitigations** — operational, security, business, reputational risk register.
160
+ - **ROI / Business Case** — quantified benefit, cost, payback period.
161
+ - **Operational Requirements** — SLAs, RTO/RPO, support tier, on-call expectations.
162
+ - **Integration and Dependencies** — SSO, existing enterprise systems, data sources, downstream consumers.
163
+ - **Rollout and Change Management** — phased rollout plan, training, internal communication.
164
+ - **Data Governance** — residency, sovereignty, classification, retention.
165
+ - **Audit Trail / Decision Provenance** — formal documentation requirements for regulated environments.
166
+
167
+ ### Regulated domains
168
+ - **Compliance and Regulatory** — HIPAA, PCI-DSS, GDPR, SOX, SOC 2, Section 508 / WCAG 2.1 AA, FedRAMP, etc. — whichever apply. If any item needs depth, add a `[NOTE FOR PM]` callout to revisit or move to an addendum.
169
+
170
+ ### Developer products (libraries, APIs, CLIs, SDKs)
171
+ - **API Contracts / Public Surface** — endpoint shapes, breaking change policy.
172
+ - **Versioning and Deprecation Policy**.
173
+ - **Performance Budgets** — latency, throughput, resource use.
174
+ - **Language / Runtime Targets and Dependency Policy**.
175
+
176
+ ### Embedded / hardware
177
+ - **Hardware Constraints** memory, power, form factor.
178
+ - **Deployment and Update Mechanism** — OTA, manual, image-based.
179
+ - **Environmental and Reliability Requirements**.
180
+
181
+ ### Small-scope all-inclusive *(use when scope is 1-2 tickets' worth and the user wants a single captured artifact — chosen during the Right-skill check in Discovery)*
182
+ - **Tickets** — ticket-level detail listed inline at the end of the doc. Each ticket: *"As a [persona], I can [action] [under conditions]. Acceptance: [testable criteria]."* Numbered Ticket-1, Ticket-2, ... for reference. Pair with very lean §1 Why, §2 Target User (often just JTBD + one UJ), §3 Features (often a single feature), §4 MVP Scope (in/out very tight). The whole doc fits on a page or two and captures intent + implementable tickets in one place. If the user doesn't want the captured artifact at all, running `/to-tickets` straight from the conversation is the better path — this cluster is only for "I want a doc *and* the tickets."
183
+
184
+
185
+ ---
186
+
187
+ ## Project overrides WDI
188
+
189
+ These rules replace the corresponding BMad defaults for this project.
190
+
191
+ - **Scope.** One PRD per **initiative / functional area** not per product, not per component, and
192
+ not per release. It is a **living document** and is never frozen.
193
+ - **Change.** A behaviour change, a correction, or a new feature closely tied to what is already
194
+ here MUST land through `bmad-prd` intent *Update* on this same file. A second PRD MUST NOT be
195
+ created because the release changed; create one only when the functional area is genuinely
196
+ different and would not read well merged in.
197
+ - **Revision History.** Every Update run MUST add exactly one row, written for an outside reader.
198
+ It is what preserves "what did we promise back then" now that the document is not frozen. This is
199
+ the one place in this template where history is written on purpose nowhere else in the PRD is.
200
+ - **§1 Why This Initiative is a delta, not a restatement.** BMad's default §1 Vision writes the
201
+ product's vision from scratch; that duplicates the brief's `Why` on the first PRD a product ever
202
+ gets. This section states only what changes, or points back to the brief when nothing does.
203
+ - **§3 carries requirement IDs, not requirement text.** `FR-N`/`NFR-N` statement and proof of done
204
+ are authored straight into `requirements-<slug>.yaml` by `wdi-product` landing the registry row is part
205
+ of writing the feature. A full FR block (statement, consequences, proof of done) MUST NOT be
206
+ written in this document; it is the registry's only copy.
207
+ - **No Document Purpose section.** BMad's §0 explains what a PRD is in general true of every PRD
208
+ in every project, so it carries no information specific to this one. Dropped.
209
+ - **No Glossary section.** Every domain noun MUST already exist in `.control/product-glossary.md`,
210
+ used verbatim. A new noun this PRD needs MUST be raised through `wdi-question` in the same pass —
211
+ it is NOT added to a PRD-local glossary, which `wdi-blueprint` does not read at G3.
212
+ - **No Non-Goals section.** What this PRD does not promise is either the product's own Scope Out
213
+ (already in the brief) or this release's Out of Scope for MVP (§4.2) — a third list restating both
214
+ is the same fact twice. The generated deliverable assembles both under one heading for a reader.
215
+ - **No Open Questions section.** An unresolved question goes through `wdi-question` into
216
+ `.control/questions/` the moment it is found, not batched into a section read once at Finalize.
217
+ - **No Assumptions Index.** Every `[ASSUMPTION]` tag is a marker for the conversation that produced
218
+ it, not an index entry it MUST be registered through `wdi-question` into `assumptions.md` before
219
+ this PRD passes G2, and the tag is then just prose color, not a second bookkeeping copy.
220
+ - **Release.** Carried by `CAP.target_release` in `.control/registry/requirements-<slug>.yaml` the only
221
+ place a promise's release is written and by `release` in `specs.yaml` for the execution side. It
222
+ MUST NOT be expressed through this document's folder name or title, and an `FR` MUST NOT carry a
223
+ release of its own; it inherits one from its capability. Naming a release in prose as context MAY
224
+ happen; the registry is what binds.
225
+ - **Numbering.** `FR-N`, `NFR-N`, `UJ-N`, and `CAP-N` MUST be allocated from
226
+ `.control/registry/requirements-<slug>.yaml`, and `BG-N` from `goals.yaml`. They MUST NOT restart at 1 in a new PRD — the sequence is
227
+ global to the product, and a later PRD continues the earlier one.
228
+ - **Two Adapt-In clusters are not optional here.** `Cross-Cutting NFRs` (§6) and `Constraints and
229
+ Guardrails` (§7) MUST be present — they are in the Essential Spine above, not conditional. G2
230
+ passes on numbered FR **and** NFR, so a PRD with no NFR cited cannot clear it; and a constraint
231
+ discovered at G4 costs a decision that a sentence here would have prevented.
232
+ - **Constraints state the delta.** Product-wide constraints already live in
233
+ `.what/_product-brief/brief.md`. §7 MUST carry only what binds *this initiative* beyond
234
+ them, and MUST say "none beyond the brief" when there is nothing — an absent section reads as
235
+ "not checked".
236
+ - **Prerequisites are not written here.** An initiative that cannot start until another one ships is
237
+ a `depends_on` between `CAP` entries, which MAY point at a capability in another initiative's file. Restating it in prose creates a
238
+ second home that will drift.
239
+ - **§2 MUST name which stakeholders from the brief this initiative serves**, using the same role
240
+ names. A PRD that invents its own user labels breaks the trace back to `BG-N`.
241
+ - **Boundary.** This document promises; it MUST NOT design. Behaviour of the system belongs to
242
+ `SRS-<pc>.md`, and solution shape to `SDD-<pc>.md`.
243
+ - **Memlog.** Written to `.control/memlog/prd-<slug>.md` via `--path`, never beside this file. The
244
+ slug matches this PRD's folder.