wdi-method 0.3.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 (122) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +203 -0
  3. package/bin/wdi-method.js +906 -0
  4. package/kit/.constitution/README.md +66 -0
  5. package/kit/.constitution/codebase/brownfield-guide.md +18 -0
  6. package/kit/.constitution/codebase/conventions-guide.md +18 -0
  7. package/kit/.constitution/codebase/stack-guide.md +18 -0
  8. package/kit/.constitution/constitution.md +135 -0
  9. package/kit/.constitution/document/architecture-guide.md +209 -0
  10. package/kit/.constitution/document/bmad-guide.md +151 -0
  11. package/kit/.constitution/document/bmad-skill-register.md +71 -0
  12. package/kit/.constitution/document/brief-guide.md +94 -0
  13. package/kit/.constitution/document/corpus-guide.md +341 -0
  14. package/kit/.constitution/document/decision-guide.md +134 -0
  15. package/kit/.constitution/document/delivery-flow-guide.md +338 -0
  16. package/kit/.constitution/document/prd-guide.md +202 -0
  17. package/kit/.constitution/document/sdd-guide.md +206 -0
  18. package/kit/.constitution/document/srs-guide.md +147 -0
  19. package/kit/.constitution/document/templates/addendum.md +71 -0
  20. package/kit/.constitution/document/templates/architecture-spine.md +100 -0
  21. package/kit/.constitution/document/templates/brief.md +110 -0
  22. package/kit/.constitution/document/templates/c4.md +77 -0
  23. package/kit/.constitution/document/templates/contract.md +52 -0
  24. package/kit/.constitution/document/templates/cross-cutting.md +80 -0
  25. package/kit/.constitution/document/templates/decision.md +64 -0
  26. package/kit/.constitution/document/templates/design-system.md +67 -0
  27. package/kit/.constitution/document/templates/flow.md +51 -0
  28. package/kit/.constitution/document/templates/integration.md +69 -0
  29. package/kit/.constitution/document/templates/inventory.md +69 -0
  30. package/kit/.constitution/document/templates/lc.md +47 -0
  31. package/kit/.constitution/document/templates/lifecycle.md +52 -0
  32. package/kit/.constitution/document/templates/meeting.md +47 -0
  33. package/kit/.constitution/document/templates/model.md +55 -0
  34. package/kit/.constitution/document/templates/oq.md +45 -0
  35. package/kit/.constitution/document/templates/prd.md +226 -0
  36. package/kit/.constitution/document/templates/questions.md +75 -0
  37. package/kit/.constitution/document/templates/rtr.md +61 -0
  38. package/kit/.constitution/document/templates/rules.md +47 -0
  39. package/kit/.constitution/document/templates/scn.md +40 -0
  40. package/kit/.constitution/document/templates/sdd.md +146 -0
  41. package/kit/.constitution/document/templates/srs.md +149 -0
  42. package/kit/.constitution/document/templates/structure-codebase.md +129 -0
  43. package/kit/.constitution/document/templates/structure-document.md +90 -0
  44. package/kit/.constitution/document/templates/uc.md +69 -0
  45. package/kit/.constitution/document/templates/ux.md +77 -0
  46. package/kit/.constitution/document/ux-guide.md +99 -0
  47. package/kit/.constitution/language-guide.md +69 -0
  48. package/kit/.constitution/method/README.md +169 -0
  49. package/kit/.constitution/method/artifact-map.md +155 -0
  50. package/kit/.constitution/method/portability.md +91 -0
  51. package/kit/.constitution/method/rationale.md +246 -0
  52. package/kit/.constitution/method-glossary.md +169 -0
  53. package/kit/.constitution/project/README.md +68 -0
  54. package/kit/.constitution/repo-guide.md +97 -0
  55. package/kit/.constitution/scripts/inventory.py +527 -0
  56. package/kit/.constitution/scripts/timeline.py +665 -0
  57. package/kit/.constitution/scripts/validate.py +1579 -0
  58. package/kit/.constitution/structure-guide.md +202 -0
  59. package/kit/assets/bmad-custom/bmad-advanced-elicitation.toml +15 -0
  60. package/kit/assets/bmad-custom/bmad-architecture.toml +31 -0
  61. package/kit/assets/bmad-custom/bmad-build-auto.toml +10 -0
  62. package/kit/assets/bmad-custom/bmad-build.toml +52 -0
  63. package/kit/assets/bmad-custom/bmad-code-review.toml +12 -0
  64. package/kit/assets/bmad-custom/bmad-correct-course.toml +27 -0
  65. package/kit/assets/bmad-custom/bmad-deep-recon.toml +11 -0
  66. package/kit/assets/bmad-custom/bmad-prd.toml +42 -0
  67. package/kit/assets/bmad-custom/bmad-product-brief.toml +34 -0
  68. package/kit/assets/bmad-custom/bmad-retrospective.toml +9 -0
  69. package/kit/assets/bmad-custom/bmad-spec.toml +15 -0
  70. package/kit/assets/bmad-custom/bmad-ux.toml +19 -0
  71. package/kit/assets/bmad-custom/config.toml +6 -0
  72. package/kit/skills/wdi-blueprint/SKILL.md +203 -0
  73. package/kit/skills/wdi-build/SKILL.md +244 -0
  74. package/kit/skills/wdi-component/SKILL.md +172 -0
  75. package/kit/skills/wdi-decision/.gitkeep +0 -0
  76. package/kit/skills/wdi-decision/SKILL.md +183 -0
  77. package/kit/skills/wdi-help/.gitkeep +0 -0
  78. package/kit/skills/wdi-help/SKILL.md +98 -0
  79. package/kit/skills/wdi-init/SKILL.md +149 -0
  80. package/kit/skills/wdi-log/SKILL.md +107 -0
  81. package/kit/skills/wdi-problem/SKILL.md +90 -0
  82. package/kit/skills/wdi-product/SKILL.md +127 -0
  83. package/kit/skills/wdi-question/.gitkeep +0 -0
  84. package/kit/skills/wdi-question/SKILL.md +88 -0
  85. package/kit/skills/wdi-reconcile/.gitkeep +0 -0
  86. package/kit/skills/wdi-reconcile/SKILL.md +146 -0
  87. package/kit/skills/wdi-report/SKILL.md +205 -0
  88. package/kit/skills/wdi-review/SKILL.md +118 -0
  89. package/kit/skills/wdi-systematic-debugging/SKILL.md +193 -0
  90. package/kit/skills/wdi-systematic-debugging/references/condition-based-waiting.md +115 -0
  91. package/kit/skills/wdi-systematic-debugging/references/defense-in-depth.md +122 -0
  92. package/kit/skills/wdi-systematic-debugging/references/find-polluter.sh +72 -0
  93. package/kit/skills/wdi-systematic-debugging/references/root-cause-tracing.md +169 -0
  94. package/kit/skills/wdi-ux/SKILL.md +145 -0
  95. package/kit-overlay/AGENTS.md +196 -0
  96. package/kit-overlay/README.md +66 -0
  97. package/kit-overlay/constitution.md +135 -0
  98. package/kit-overlay/portability.md +91 -0
  99. package/kit-overlay/repo-guide.md +97 -0
  100. package/lib/agents-block.mjs +52 -0
  101. package/lib/identity.mjs +65 -0
  102. package/package.json +37 -0
  103. package/scaffold/.control/decisions/.gitkeep +0 -0
  104. package/scaffold/.control/generated/.gitkeep +2 -0
  105. package/scaffold/.control/meetings/.gitkeep +0 -0
  106. package/scaffold/.control/memlog/.gitkeep +0 -0
  107. package/scaffold/.control/product-glossary.md +21 -0
  108. package/scaffold/.control/project-non-technical-log.md +23 -0
  109. package/scaffold/.control/questions/answered.md +11 -0
  110. package/scaffold/.control/questions/assumptions.md +15 -0
  111. package/scaffold/.control/questions/blocking.md +21 -0
  112. package/scaffold/.control/questions/external.md +11 -0
  113. package/scaffold/.control/registry/components.yaml +21 -0
  114. package/scaffold/.control/registry/decisions.yaml +6 -0
  115. package/scaffold/.control/registry/defects.yaml +3 -0
  116. package/scaffold/.control/registry/index.yaml +46 -0
  117. package/scaffold/.control/registry/requirements.yaml +15 -0
  118. package/scaffold/.control/registry/risks.yaml +5 -0
  119. package/scaffold/.control/registry/usecases.yaml +6 -0
  120. package/scaffold/.control/registry/waves.yaml +5 -0
  121. package/scaffold/.control/structure-codebase.md +19 -0
  122. package/scaffold/.control/structure-document.md +25 -0
@@ -0,0 +1,206 @@
1
+ ---
2
+ status: Accepted
3
+ ---
4
+
5
+ # SDD Guide
6
+
7
+ **Loaded when:** writing, changing, or validating the SDD of a Product Component
8
+
9
+ An SDD states how one Product Component is **built**. `SRS-<pc>.md` fixed the behaviour; this decides the
10
+ shape that delivers it, and MUST NOT introduce behaviour — a promise appearing here first is a promise
11
+ nobody agreed to.
12
+
13
+ ## Which sections exist, and when
14
+
15
+ Every section names the **minimum `mode` that demands it**. Below that minimum it MUST NOT be written to
16
+ fill a slot; above it, it is required.
17
+
18
+ | Section | Minimum `mode` |
19
+ |---|---|
20
+ | § Decision Summary — what this component is built as, and the one or two most expensive choices reversed | `outline` |
21
+ | § Structure — the `LC` list and the direction of their dependencies | `outline` |
22
+ | § Inherited Constraints — every `AD-N` binding this component, **quoted** | `guarded` |
23
+ | § Failure Behaviour — per boundary | `guarded` |
24
+ | `03-integrations/<name>.md` | `guarded`, when the component has one |
25
+ | § Robustness Analysis — ABCE | `deep` |
26
+ | `02-contracts/` · `04-components/` · `05-model/data-model.md` · `06-flows/` | `deep` |
27
+ | `01-ux/<screen>.md` | `deep`, or earlier through `wdi-ux` |
28
+
29
+ At `mode: catalog` the SDD is a **skeleton** — frontmatter and headings, born from `templates/sdd.md` by
30
+ `wdi-init` intent `component`. That is a finished state, not an unfinished one: G4 is skipped there, and the
31
+ code is written from the blueprint.
32
+
33
+ Review lenses are read from `risk_accepted`, never from `mode`. Both fields are defined in
34
+ `delivery-flow-guide.md`.
35
+
36
+ ## No BMad skill writes this either
37
+
38
+ The same three consequences as the SRS apply — no `doc_standards` fires, no memlog is created, no template
39
+ enforces itself — and they are stated in `srs-guide.md` rather than repeated. `bmad-architecture` writes the
40
+ **spine**, not this.
41
+
42
+ ## Home and life cycle
43
+
44
+ - `.how/<pc>/SDD-<pc>.md`, with slots `01-ux/` … `06-flows/`.
45
+ - Living and amended, exactly like its SRS. It MUST NOT be versioned or frozen.
46
+ - The slot numbers are an **ABCE classification**, not a reading order — `corpus-guide.md` owns that rule.
47
+ - `supplements/` is **repealed** along with the `ANX-` concept it existed for.
48
+
49
+ ## Inherited constraints
50
+
51
+ From `guarded` up, every `AD-N` in `ARCHITECTURE-SPINE.md` that reaches this component MUST be listed under
52
+ **Inherited Constraints**, quoted rather than paraphrased — a paraphrase drifts, and the drift is invisible
53
+ because both texts read reasonably.
54
+
55
+ A design that must deviate does not argue here. It goes through `wdi-decision`, and either the spine changes
56
+ or the design does. An SDD contradicting an `AD-N` in prose is the failure the spine exists to prevent.
57
+
58
+ ## Failure Behaviour — it stands on its own
59
+
60
+ **`Failure Behaviour` does not need ABCE**, and this is the change that makes `guarded` worth having. The
61
+ boundary list already exists: `.how/_platform/inventory-api.md` names the endpoints and
62
+ `inventory-screen.md` names the screens, each with an owning-component column. Nothing has to be derived
63
+ again.
64
+
65
+ For each boundary, state what happens when the thing on the other side is slow, absent, or lying: timeout,
66
+ retry policy, what the user sees, what gets logged. "Returns an error" is not an answer.
67
+
68
+ When a failure mode turns out to be a promise — a refund path, a partial save — it becomes a scenario on the
69
+ `.what` side, and it MUST go to the SRS first.
70
+
71
+ ## Object identification — the ABCE pass, at `deep` only
72
+
73
+ This is the Robustness Analysis. It MUST NOT have appeared in the SRS, and at `outline` and `guarded` it MUST
74
+ NOT be written at all.
75
+
76
+ | Class | What it is | Slot |
77
+ |---|---|---|
78
+ | **Boundary** | Where the component meets something outside it — screens, endpoints, adapters, file drops | `01-ux/` · `02-contracts/` · `03-integrations/` |
79
+ | **Control** | What coordinates a use case from start to finish | `04-components/` |
80
+ | **Entity** | The things that persist, and their shape | `05-model/` |
81
+ | Behaviour | How the three move together, per use case | `06-flows/` |
82
+
83
+ From `guarded` up, every Boundary object MUST correspond to an `LC` in `.control/registry/components.yaml`;
84
+ at `deep`, Control objects too. Registration is checked **when the wave closes** — V12 — not before a story
85
+ is `ready-for-dev`.
86
+
87
+ Flows **into and out of** each boundary MUST be stated, not just the boundary. A boundary listed without its
88
+ direction of call is a name, not a design.
89
+
90
+ Flow diagrams in `06-flows/` are written only for a flow touching money, irreversible state, or a third
91
+ party. The lane order is the project's to fix, once, in `codebase/conventions-guide.md`. **The `No-op` lane
92
+ rule is repealed** — it was a heavy convention for a folder that had never carried a file, and it belongs to
93
+ how a diagram is drawn rather than to what binds.
94
+
95
+ ## The three inventories are derived, not authored
96
+
97
+ `.how/_platform/inventory-db.md`, `inventory-api.md`, and `inventory-screen.md` belong to `wdi-blueprint`,
98
+ and they are born at G3. This document MUST NOT keep a second copy of any of them.
99
+
100
+ | State | How the inventory comes to exist |
101
+ |---|---|
102
+ | No code yet | Written as a **plan** by `wdi-blueprint` intent `platform`. Nothing can be derived, because there is no source |
103
+ | Code exists | **Derived** from the code first — migrations for tables, route registration for endpoints, pages for screens — then compared with the plan. The difference is a finding, not hand work |
104
+
105
+ `.control/generated/` and `inventory.py` own the refresh. A discrepancy between plan and reality surfaces as
106
+ a validator finding; it MUST NOT become hand work that someone can forget.
107
+
108
+ `02-contracts/00-inventory.md` at `deep` is a different thing: the endpoints **this component** owns, with
109
+ numbers stable enough to carry into filenames. A new endpoint takes the next number, never a renumber —
110
+ renumbering renames every file after it and breaks every link.
111
+
112
+ ## Contracts and data model — `deep` only
113
+
114
+ | Artifact | Where | Rule |
115
+ |---|---|---|
116
+ | API contract per endpoint | `02-contracts/` | One file per endpoint or per resource, never one for the whole surface |
117
+ | External integration | `03-integrations/` | MUST name the owner outside the team, and what happens when they change it. Required from `guarded` |
118
+ | Data model | `05-model/` | Diagram **and** a data dictionary — a diagram alone does not say what a column means |
119
+
120
+ ### The five lanes every contract answers
121
+
122
+ Each contract spec MUST answer all five, and MUST say so explicitly when one does not apply:
123
+
124
+ | Lane | States |
125
+ |---|---|
126
+ | Authentication | Who may call it, and what happens when they may not |
127
+ | Validation | What is rejected before any work happens |
128
+ | Error handling | Which failures are expected and which are exceptional |
129
+ | **Rate limiting** | The limit, or `none` with a reason |
130
+ | **Idempotency** | Whether a repeated call is safe, and what makes it so |
131
+
132
+ The last two are the ones always skipped, and the two that hurt in production. `none` is an acceptable
133
+ answer; silence is not — silence reads as "not considered".
134
+
135
+ **One error envelope, referenced not repeated.** Its shape is defined once in
136
+ `.how/_platform/cross-cutting.md`. Every contract MUST reference it rather than restate it, and MUST
137
+ document 4xx and 5xx in that envelope — that is how a system ends up with four different error formats, each
138
+ of which looked reasonable on its own page.
139
+
140
+ ## Evidence discipline
141
+
142
+ Every technical claim about code that already exists MUST be traceable to something in the repository — a
143
+ source file, a config, a schema, a manifest. Naming the file is the trace; "the service handles retries"
144
+ without one is not design, it is rumour.
145
+
146
+ This is not only a brownfield rule. **Raising a component's `mode` after its code runs** produces an
147
+ as-built record, and the labels are mandatory there for the same reason.
148
+
149
+ | Label | Meaning |
150
+ |---|---|
151
+ | `[ASSUMED]` | We decided to believe it; nothing was read that confirms it |
152
+ | `[PARTIAL]` | Verified for part of the surface, not all of it |
153
+ | `[NEEDS CONFIRMATION]` | A question with an owner, filed through `wdi-question` |
154
+ | `[MISSING]` | **Checked, and the thing described is not there** |
155
+
156
+ An unlabelled claim is read as verified. That is why the labels are mandatory and not a courtesy.
157
+
158
+ ### Status is raised, never assumed
159
+
160
+ - A claim is raised to verified only after the evidence it names has actually been read. Reading the
161
+ controller does not verify the repository.
162
+ - The raise MUST record **what was read**. "Verified against `src/internal/referral/pool.go` and its
163
+ integration test" is a raise; "verified" is not.
164
+ - `[PARTIAL]` MUST state what is **not** covered. A partial that only says "partial" is an unlabelled claim
165
+ wearing a label.
166
+ - A claim MUST NOT be raised because it has survived several readings. Familiarity is not evidence.
167
+
168
+ ### `[MISSING]` — negative knowledge, and why it MUST NOT be deleted
169
+
170
+ The first three labels state a degree of **not knowing**; this one states the opposite — it was checked, and
171
+ it is not there. `[ASSUMED]` means nobody looked.
172
+
173
+ The instinct is to delete the sentence, and that MUST NOT be done. Deleting it throws away the fact that
174
+ somebody once believed the thing existed, and that belief came from somewhere: a cancelled plan, a rename
175
+ the document never followed, a feature removed without a trace.
176
+
177
+ Each MUST be resolved into exactly one of three, with the disposition recorded beside it:
178
+
179
+ | If | Then |
180
+ |---|---|
181
+ | The code should have it | A `BUG-` in `defects.yaml`, with `root_cause` set and `violates` naming what it breaks |
182
+ | The document was wrong | Correct the claim, and say in the same pass what it used to assert |
183
+ | It is real but not built yet | A planned line with an owner — a `CAP` or an `FR`, never a bare note |
184
+
185
+ An unresolved `[MISSING]` MUST NOT pass G4.
186
+
187
+ ## The boundary against promising
188
+
189
+ If a sentence here would surprise the Product Owner who approved the PRD, it is a promise and MUST travel
190
+ back — PRD or SRS first, this document second. A technology choice a second component will have to follow
191
+ belongs to the spine, as an `AD-N` through `wdi-decision`.
192
+
193
+ ## Passing G4
194
+
195
+ Only what this component's `mode` demands, and nothing beyond it:
196
+
197
+ - From `outline`: Decision Summary and the `LC` list present.
198
+ - From `guarded`: Inherited Constraints complete, quoted, and contradicted nowhere in the document; Failure
199
+ Behaviour present for **every** boundary named in the API and screen inventories.
200
+ - At `deep`: Robustness Analysis done; every `critical` use case mirrored at the technical altitude under
201
+ the same ids; contract specs answering all five lanes; the data dictionary present.
202
+ - Always: unresolved `[NEEDS CONFIRMATION]` filed through `wdi-question`, no unresolved `[MISSING]`, and
203
+ `wdi-review` run with the lens set `risk_accepted` names.
204
+
205
+ The spine comes first and `bmad-spec` comes last. An SDD written before the spine will be rewritten; a SPEC
206
+ written before the SDD has nothing to project.
@@ -0,0 +1,147 @@
1
+ ---
2
+ status: Accepted
3
+ ---
4
+
5
+ # SRS Guide
6
+
7
+ **Loaded when:** writing, changing, or validating the SRS of a Product Component
8
+
9
+ An SRS states how the system must **behave** for one Product Component. The PRD promised something to a
10
+ user; this says what the system does so that promise holds. It MUST NOT say how the thing is built —
11
+ that is `SDD-<pc>.md`.
12
+
13
+ ## Two skills write it, at two gates
14
+
15
+ | Section | Written at | By |
16
+ |---|---|---|
17
+ | § Actor Register · § UC Catalogue | G3 Blueprint | `wdi-blueprint` intent `catalog` |
18
+ | Everything below, per the component's `mode` | G4 Component | `wdi-component` intent `behaviour` |
19
+
20
+ **The SRS therefore exists at `mode: catalog`.** It carries the actor list and the use case catalogue,
21
+ because both are born at G3 and `mode` does not touch the blueprint. What does not exist at `catalog` is
22
+ `04-usecases/UC-<n>-<slug>.md` — the step-by-step flow. Reading "no SRS at `catalog`" is wrong, and it
23
+ was an artefact of an earlier table that showed only what varies.
24
+
25
+ Depth is **read from `mode`**, never computed. Review lenses are **read from `risk_accepted`**, never from
26
+ `mode`. Both fields are defined in `delivery-flow-guide.md` and MUST NOT be redefined here.
27
+
28
+ ## No BMad skill writes this
29
+
30
+ `bmad-prd` writes the PRD, `bmad-architecture` writes the spine, `bmad-spec` writes SPEC. Nothing in BMad
31
+ writes an SRS. Three consequences follow, and each MUST be handled deliberately:
32
+
33
+ | Consequence | What follows |
34
+ |---|---|
35
+ | No `doc_standards` can fire | `bmad-review` MUST be invoked through `wdi-review`, with the lens set `risk_accepted` names |
36
+ | No memlog is created | A decision taken while writing MUST land as a `DEC-` through `wdi-decision`, not as a parenthetical |
37
+ | No template enforcement | The shape comes from `templates/srs.md`, applied by `wdi-init` intent `component` at birth |
38
+
39
+ `bmad-advanced-elicitation` and `bmad-party-mode` MAY be used as thinking aids. They produce no artifact
40
+ and MUST NOT be treated as authors.
41
+
42
+ ## Home and life cycle
43
+
44
+ - `.what/<pc>/SRS-<pc>.md`, with slots `02-rules/` · `03-domain/` · `04-usecases/` · `05-scenarios/`.
45
+ - **Living, amended forever.** An SRS MUST NOT be versioned, frozen, or superseded. A component does not
46
+ stop existing because a release shipped.
47
+ - `01-requirements/` and `supplements/` are **repealed**. The first was permanently empty — `FR` live in
48
+ the PRD and the SRS cites them. The second existed for `ANX-`, and that concept is gone.
49
+
50
+ ## Writing order
51
+
52
+ Binding, and each step is the input to the next. The first four happen at G3, the rest at G4:
53
+
54
+ 1. **Glossary** — every domain noun this component uses, into `.control/product-glossary.md`. Never
55
+ defined inline here.
56
+ 2. **UC Catalogue** — one line per use case: `UC-N` · title · actor · the `FR` it satisfies · `critical`
57
+ yes/no.
58
+ 3. **Actor Register**.
59
+ 4. **Domain Model** — entities, relations, columns. A business rule binding a second component goes to
60
+ `.what/business-rules.md`.
61
+ 5. **UC Specification** — full flows, per `mode`.
62
+ 6. **Local business rules**, then **State Lifecycle**, then **branch scenarios** — per `mode`.
63
+
64
+ Writing these out of order produces use cases whose nouns nobody defined. When the pass covers several
65
+ components, the order binds **within** each one, not across them.
66
+
67
+ ## Which use cases get a full flow
68
+
69
+ | `mode` | Full flows |
70
+ |---|---|
71
+ | `catalog` | none — the catalogue line is the whole record |
72
+ | `outline` · `guarded` | the use cases the component exists for, **at most 3** |
73
+ | `deep` | every `critical` use case |
74
+
75
+ A use case is `critical` when it touches **money, personal data, or an irreversible action**. That is the
76
+ whole definition; `delivery-flow-guide.md` owns it, including the one-third sanity check.
77
+
78
+ ## Use cases at two altitudes
79
+
80
+ The same `UC-N` MAY appear twice in the corpus, and the two MUST NOT be merged or made to duplicate each
81
+ other:
82
+
83
+ | | Here, in the SRS | There, in the SDD at `deep` |
84
+ |---|---|---|
85
+ | Written for | Someone who uses the product | Someone who builds it |
86
+ | Basic Flow | **At most eight steps** | As long as the design needs |
87
+ | May name | Actors, screens the user sees, domain nouns | Classes, endpoints, tables, transports |
88
+ | Answers | What happens | How it happens |
89
+
90
+ The eight-step cap is not style. A flow needing more steps is either two use cases, or it has started
91
+ describing implementation — and the cap makes that visible while it is still cheap to fix.
92
+
93
+ Branches MUST go to `05-scenarios/` rather than making the UC file fat, and only at `deep`.
94
+
95
+ ## Actor Register is the SSOT
96
+
97
+ It MUST stay in the SRS kernel, never moved to a slot. The SDD MAY carry a **mirror** of it, and the mirror
98
+ MUST NOT be edited on the SDD side. A `System` actor MAY be decomposed into the internal components that
99
+ play it, but that decomposition belongs to the SDD.
100
+
101
+ ## Business rules — two homes, one test
102
+
103
+ | Rule | Home | Born at |
104
+ |---|---|---|
105
+ | Binds more than one Product Component | `.what/business-rules.md` | G3 |
106
+ | Binds only this component | `.what/<pc>/02-rules/rules-<pc>.md` | G4, from `outline` up |
107
+
108
+ The test is not importance, it is **reach**. A rule written in one component that turns out to bind a
109
+ second MUST be promoted, not copied. Two copies of one rule is how components start disagreeing about the
110
+ same policy.
111
+
112
+ ## Sections the shape requires
113
+
114
+ `templates/srs.md` carries the full list. Four MUST NOT be dropped even when they feel thin, because each
115
+ is the one that is silently skipped:
116
+
117
+ | Section | Why it MUST stay |
118
+ |---|---|
119
+ | **Constraints** | Inherited from the spine's `AD-N` and from the PRD. A constraint discovered at G4 costs a decision |
120
+ | **Non-Goals** | What this component explicitly does not do. Absent, it will be assumed to do it |
121
+ | **Prerequisite** | What MUST already exist before this component can behave as described |
122
+ | **Assumptions, Risks, and To Be Confirmed** | Three separate lists. An assumption is something we decided to believe; a risk may go wrong; a to-be-confirmed is a question with an owner. Collapsing them loses the owner |
123
+
124
+ Every unresolved to-be-confirmed MUST be filed through `wdi-question` before G3 opens — into
125
+ `assumptions.md` by default, and into `blocking.md` only through the three tests that file states.
126
+
127
+ ## The boundary against solution shape
128
+
129
+ Solution shape MUST NOT appear here. Concretely, the SRS MUST NOT name a framework, a database table, an
130
+ HTTP endpoint, a class, a queue, or a file path. Robustness analysis belongs to the SDD, at `deep`.
131
+
132
+ When writing behaviour surfaces a design decision that cannot wait, it goes to `wdi-decision` — not into
133
+ this document as a parenthetical.
134
+
135
+ The reverse also holds. When G4 or the build discovers behaviour nobody specified, it MUST come back here
136
+ **before** the code that implements it; the change-control matrix in `delivery-flow-guide.md` says which
137
+ artifacts move.
138
+
139
+ ## Passing the gate
140
+
141
+ - At **G3**: the actor list, the UC catalogue, and the domain model complete for every component, and the
142
+ roll-up in `.control/generated/blueprint.md` regenerated. V1, V2, V6, and V15 green — V2 is the ★
143
+ question: every `FR` has at least one `UC`, unless it carries `no_uc:` with a stated reason.
144
+ - At **G4**: whatever this component's `mode` requires, and nothing beyond it.
145
+ - `wdi-review` MUST have run with the lens set `risk_accepted` names. The `reviewed:` trace is stamped only
146
+ on components at `risk_accepted` `low` or `medium` — V13.
147
+ - A `UC` that exists but is wrong passes V2 and fails `wdi-reconcile`. Run it before the gate, not after.
@@ -0,0 +1,71 @@
1
+ ---
2
+ type: addendum
3
+ parent: '{brief | prd}' # which document this sits beside
4
+ initiative: '{slug}' # omit when parent: brief
5
+ status: draft # draft · reviewed · locked · superseded
6
+ created: '{YYYY-MM-DD}'
7
+ updated: '{YYYY-MM-DD}'
8
+ ---
9
+
10
+ # Addendum — {product brief | PRD: initiative}
11
+
12
+ <!-- TEMPLATE GUIDE — act on these comments, then delete them.
13
+
14
+ Two homes, one shape:
15
+ .what/_product-brief/addendum.md beside the brief, born at G1
16
+ .what/_prd/<initiative>/addendum.md beside a PRD, born at G2
17
+
18
+ Both already existed in this corpus and both were born without a template, which is why the one
19
+ rule that governs them lived only in prd-guide.md prose.
20
+
21
+ THAT RULE, STATED WHERE IT BELONGS: an addendum is NOT a change log. Revision History in the
22
+ parent document is the change log. This holds depth that earned its place but does not fit the
23
+ narrative — and putting a change record here means the client-facing document stops carrying its
24
+ own history.
25
+
26
+ WHAT GOES HERE: rejected-alternative rationale · options matrices · mechanism and transport
27
+ thinking · technical how · in-depth personas · sizing data · anything the owner volunteered that
28
+ would derail the narrative.
29
+
30
+ WHAT MUST NOT: audit and override information — that is the memlog. A commercial fact — that is
31
+ refused outright, per repo-guide.md. A promise — a promise stated only here is a promise nobody
32
+ approved, because the gate reads the parent document.
33
+
34
+ CAPTURED DURING THE CONVERSATION, not swept here at Finalize. Content moved here at the end is
35
+ content nobody will find, because the reader was already told the parent was complete.
36
+
37
+ WHAT BINDS LATER MOVES OUT. Something in here that turns out to bind a downstream document MUST
38
+ be written into that document by the skill owning its layer, rather than cited from here forever.
39
+ A citation into an addendum is a dependency on a file that was explicitly not gated. -->
40
+
41
+ ## Rejected alternatives
42
+
43
+ <!-- One per subsection or one row each, and each MUST say why it lost. "We considered X" with no
44
+ reason preserves nothing — the reason is the part memory loses first, and it is why the same
45
+ option gets proposed again next quarter.
46
+
47
+ A rejection that is expensive to revisit is a DEC-, not a row here. -->
48
+
49
+ | Option | Why it lost |
50
+ | --- | --- |
51
+
52
+ ## Options weighed
53
+
54
+ <!-- Matrices, comparisons, and scoring that would swamp the parent document. State the criteria
55
+ before the scores; a matrix whose criteria appeared after the winner is a justification. -->
56
+
57
+ ## Mechanism and transport
58
+
59
+ <!-- Technical thinking that surfaced while deciding a promise. It is not a design — the SDD owns
60
+ that — and it MUST NOT be cited as one. If a builder would be right to follow it, it belongs in
61
+ .how/ and it has to get there through the skill that owns the layer. -->
62
+
63
+ ## Sizing
64
+
65
+ <!-- Numbers behind an estimate: counts, throughput assumptions, mandays reasoning. Each MUST name
66
+ where the figure came from. An unsourced number here reappears as a commitment somewhere else. -->
67
+
68
+ ## Personas and research detail
69
+
70
+ <!-- Depth beyond what the parent needs. Raw research output MUST NOT be folded in — it stays in
71
+ _bmad-output/ and is cited by path, which is stable because that folder is committed. -->
@@ -0,0 +1,100 @@
1
+ ---
2
+ name: '{name}'
3
+ type: architecture-spine
4
+ purpose: build-substrate # build-substrate (default) · discussion · report · deck
5
+ altitude: feature # initiative (keeps features) · feature (keeps epics) · epic (keeps stories)
6
+ paradigm: '{named design pattern, e.g. hexagonal, layered, pipes-and-filters, actor}'
7
+ scope: '{what this spine governs}'
8
+ status: draft # draft · final
9
+ created: '{date}'
10
+ updated: '{date}'
11
+ binds: [] # capability / unit IDs governed (from the driving spec; at epic altitude, also the inherited parent AD ids)
12
+ sources: []
13
+ companions: []
14
+ reviewed: # V13. Diisi hanya setelah bmad-review benar-benar dijalankan
15
+ date: '' # '{YYYY-MM-DD}'
16
+ sha: '' # commit it was reviewed at; without the SHA, staleness cannot be measured
17
+ lenses: [] # structure · prose · edge-case-hunter · adversarial · verification-gap
18
+ ---
19
+
20
+ # Architecture Spine — {name}
21
+
22
+ <!-- TEMPLATE GUIDE — act on these comments, then delete them; never emit a comment in the finished spine. This is a shape, not a script: keep only the sections this spine needs and cut the rest (no empty headers). A small intent may be just paradigm + a few ADs + conventions; a platform earns more. An inherited epic spine is usually mostly Inherited Invariants + a thin Deferred. Decisions, not rationale (rationale lives in the memlog). Carry shape in diagrams; prose only where it must. -->
23
+
24
+ ## Design Paradigm
25
+
26
+ <!-- Name the pattern (a known one loads a whole model for free) and map its layers to namespaces/directories. The smallest, most durable thing here. -->
27
+
28
+ ## Inherited Invariants
29
+
30
+ <!-- Only when this spine inherits a higher-altitude parent. The parent's ADs/conventions/paradigm that bind here, by their ORIGINAL ids — read-only, never renumbered, not re-derived. A local decision that contradicts one is a conflict to surface, not an override. Cut this section otherwise. -->
31
+
32
+ | Inherited | From parent | Binds here |
33
+ | --- | --- | --- |
34
+ | {AD-id / convention} | {parent spine} | {what it constrains in this scope} |
35
+
36
+ ## Invariants & Rules
37
+
38
+ <!-- The durable heart: calls a future builder can't read off compliant code. One block per decision: stable ascending id (never reused/renumbered), Binds, Prevents (the divergence), Rule (enforceable). Tag [ADOPTED] when the user or existing reality settled it. Include a dependency-direction diagram (who may depend on whom) — it IS a rule; author it as valid mermaid, never an empty graph. -->
39
+
40
+ ### AD-1 — {decision}
41
+
42
+ - **Binds:** {capability / unit ids / fr/nfr's, areas, or `all`}
43
+ - **Prevents:** {the divergence this stops}
44
+ - **Rule:** {the constraint downstream must follow}
45
+
46
+ ## Consistency Conventions
47
+
48
+ <!-- Defaults that bind where independent builders would drift. Cut rows that don't apply; add rows the project needs. -->
49
+
50
+ | Concern | Convention |
51
+ | --- | --- |
52
+ | Naming (entities, files, interfaces, events) | |
53
+ | Data & formats (ids, dates, error shapes, envelopes) | |
54
+ | State & cross-cutting (mutation, errors, logging, config, auth) | |
55
+
56
+ ## Stack
57
+
58
+ <!-- SEED — verified current at authoring; the code owns this once it exists. Name + version only; the why lives in the memlog. One row per language, framework, key dependency, platform, or chain that's pinned. -->
59
+
60
+ | Name | Version |
61
+ | --- | --- |
62
+ | {language / framework / key dep / platform / chain} | {pinned version} |
63
+
64
+ ## Structural Seed
65
+
66
+ <!-- The shapes worth fixing at cold-start — not a fixed list. Include only what's non-obvious at this altitude, and use as many diagrams as convey it, each as VALID mermaid (never a placeholder or empty graph). Candidates: system/container/context view; DEPLOYMENT & ENVIRONMENTS and external provider/infra topology (cover the operational envelope here when this altitude owns it — don't let it fall through); core-entity ERD (names + relationships only; an attribute that's itself an invariant is an AD, not a diagram); a minimal source tree. The code owns the detail — this is scaffold, not a mirror to maintain. -->
67
+
68
+ ```text
69
+ {root}/
70
+ {dir}/ # {what lives here}
71
+ ```
72
+
73
+ ## Capability → Architecture Map
74
+
75
+ <!-- Present when a spec drove this run. Bridges the spec's capabilities to where they live + what governs them; the consistency auditor's checklist. Cut otherwise. -->
76
+
77
+ | Capability / Area | Lives in | Governed by |
78
+ | --- | --- | --- |
79
+ | {CAP-id / area} | {component / module} | {AD-id, convention, paradigm} |
80
+
81
+ ## Deferred
82
+
83
+ <!-- Decisions intentionally pushed down, each with the reason it can wait — including whole dimensions this altitude doesn't own yet. The half of the contract that keeps the spine lean. -->
84
+
85
+ ---
86
+
87
+ ## Project overrides — WDI
88
+
89
+ - **Altitude.** This project authors the `initiative` spine only, at `.how/_platform/architecture/`.
90
+ Component-level design belongs to `SDD-<pc>.md`, written by `wdi-component`, not to a `feature`
91
+ spine.
92
+ - **This is not an HLD.** The spine constrains; it does not describe. What the system consists of
93
+ belongs to `c4-l1-system-context.md` and `c4-l2-containers.md`. Deployment topology has no home
94
+ in this corpus at all — it lives in the devops repository and is referenced from C4 L2.
95
+ - **`AD-N` versus `DEC-NNN`.** An `AD-N` here is a living rule, edited in place. A `DEC-NNN` in
96
+ `.control/decisions/` is one decision event, never edited and replaced by a `superseded` pointer.
97
+ The two MUST NOT be interchanged.
98
+ - **Ordering.** The spine is authored before `bmad-spec` runs, and `bmad-spec` adopts it as a
99
+ companion — never the reverse.
100
+ - **Memlog.** Written to `.control/memlog/spine.md` via `--path`.
@@ -0,0 +1,110 @@
1
+ # Product Brief Template
2
+
3
+ A flexible starting structure for the executive product brief. Adapt aggressively to the product, the purpose, and the domain. Drop sections that do not earn their place, add sections the product needs, reorder freely. The brief serves the product's story, not the template's shape.
4
+
5
+ ## Default Structure
6
+
7
+ ```markdown
8
+ # Product Brief: {Product Name}
9
+
10
+ ## Executive Summary
11
+
12
+ [2-3 paragraph narrative: what this is, what problem it solves, why it matters, why now. Compelling enough to stand alone — if someone reads only this section, they should understand the vision.]
13
+
14
+ ## The Problem
15
+
16
+ [What pain exists, who feels it, how they cope today, the cost of the status quo. Be specific: real scenarios, real frustrations, real consequences.]
17
+
18
+ ## The Solution
19
+
20
+ [What is being built, how it solves the problem. Focus on the experience and the outcome, not the implementation.]
21
+
22
+ ## What Makes This Different
23
+
24
+ [Key differentiators. Why this approach over alternatives, what is the unfair advantage. Be honest. If the moat is execution speed, say so. Do not fabricate technical moats.]
25
+
26
+ ## Who This Serves
27
+
28
+ [Primary users — vivid but brief. Who they are, what they need, what success looks like for them. Secondary users if relevant.]
29
+
30
+ | Role | Need | Tier |
31
+ |---|---|---|
32
+ | {role} | {what they need from this product} | **primary** |
33
+ | {role} | {…} | secondary |
34
+ | {role} | {…} | secondary |
35
+
36
+ [Exactly one row MUST be `primary`. Every user and stakeholder who touches the product belongs in this table — including the ones who never open it, but pay for it, approve it, or are accountable for it. Shared goals that cut across roles go in a line under the table.]
37
+
38
+ ## Goals
39
+
40
+ [What the product is trying to achieve, one line each. Number them `BG-1`, `BG-2`, … — `BG` is the first link of the traceability chain `BG → CAP → FR/NFR → UC → DEC → Story → Test`, so these IDs are cited downstream and MUST stay stable once written.]
41
+
42
+ - **BG-1** — core value: [the goal that justifies the product existing at all]
43
+ - **BG-2**: [...]
44
+
45
+ [MUST NOT be numbered `G1`, `G2` — `G1`–`G5` already name the five gates.]
46
+
47
+ ## Success Criteria
48
+
49
+ [How we know this is working. Mix of user success signals and business objectives. Measurable.]
50
+
51
+ ## Scope
52
+
53
+ [Boundary document, not a feature list. Keep both lists tight.]
54
+
55
+ ### Scope In
56
+
57
+ [What is in for the first version.]
58
+
59
+ ### Scope Out
60
+
61
+ [What is explicitly out, written as items. MUST NOT be left to be inferred from absence — the value of this list is that it names what someone will otherwise assume is coming. Per-release MVP scope belongs in the PRD; this is the product boundary.]
62
+
63
+ ## Constraints
64
+
65
+ [What is fixed before design starts and cannot be traded away: platform scope, integration boundary, regulatory limit, milestone boundary, a timeline that is genuinely immovable. One line each, and each MUST say what it forbids.]
66
+
67
+ [Technical constraints that only shape implementation belong in `addendum.md`, not here. A constraint that emerges from a design decision becomes `AD-N` in the architecture spine — MUST NOT be appended to this list later.]
68
+
69
+ ## Assumptions
70
+
71
+ [What is believed true but not verified, and that the brief would be wrong without. State each so it could be proven false.]
72
+
73
+ [An assumption that starts to wobble MUST be promoted to a row in `.control/registry/risks.yaml` with an owner. An assumption nobody would act differently about is not worth listing.]
74
+
75
+ ## Prerequisites
76
+
77
+ [What MUST exist or be granted before work can start: access, accounts, data, an upstream system, a decision someone else owns.]
78
+
79
+ [Any prerequisite not yet satisfied MUST have a matching row in `.control/questions/external.md` naming who is being waited on and by when.]
80
+
81
+ ## Vision
82
+
83
+ [Where this goes if it succeeds. What it becomes in 2-3 years. Inspiring but grounded.]
84
+ ```
85
+
86
+ ---
87
+
88
+ ## Project overrides — WDI
89
+
90
+ - **Home.** `.what/_product-brief/brief.md`, with `addendum.md` beside it. Set through
91
+ `run_folder_pattern = "_product-brief"`; both filenames are fixed by the skill and MUST NOT be
92
+ expected to change.
93
+ - **Singleton.** One brief per product, spanning every release. A second product MUST get its own
94
+ repository rather than a second brief.
95
+ - **Decision Summary.** MUST name exactly one problem, one **primary** user, and one measure of
96
+ success. Secondary users and stakeholders are listed, not ranked away. If the primary cannot be
97
+ chosen, the discovery is not finished.
98
+ - **Six sections above the BMad default.** `Who This Serves` carries a full stakeholder table;
99
+ `Scope` is split into In and Out; and `Goals`, `Constraints`, `Assumptions`, and `Prerequisites`
100
+ are added. The last three have no home anywhere else in the corpus.
101
+ - **No Product Component list.** The slicing is born at the tail of G2 through `wdi-init` intent
102
+ `component`, which reads
103
+ the brief and every PRD once a domain model exists. A list guessed at G1 is a guess made before
104
+ there is anything to guess from.
105
+ - **Raw material stays out.** Research, brainstorming, and pressure-test output live in
106
+ `_bmad-output/` and stay there. It MUST NOT be folded in, and MUST NOT be promoted into `.what/` —
107
+ a `DEC-` or the PRD cites it by path instead.
108
+ - **Dying cheap is a pass.** A brief that concludes the idea is not worth building is a valid G1
109
+ outcome, and the most profitable one.
110
+ - **Memlog.** Written to `.control/memlog/brief.md` via `--path`.