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,246 @@
1
+ ---
2
+ status: Reference
3
+ ---
4
+
5
+ # Rationale — why the method is shaped like this
6
+
7
+ **Opened when:** you are about to change a rule and need to know what you would break.
8
+
9
+ This file **explains**. It does not bind — `document/*-guide.md` does, and where the two disagree the guide
10
+ wins and the disagreement is a defect to report. **A rule MUST NOT be born here.** If this file notices a
11
+ rule that should exist, it says so as a finding and the rule is written in its guide.
12
+
13
+ ## What happened, and what fixed it
14
+
15
+ The previous version of this method was run in full on one real product as far as its third stage, then stopped by its
16
+ owner: `.what` had jammed, `.how` was being skipped, and coding was running straight from a `.what` that was
17
+ not finished. Six complaints, their causes, and where each is answered now:
18
+
19
+ | Complaint | Cause | Answered in |
20
+ |---|---|---|
21
+ | Open questions in floods — ids reached `OQ-146`; one review produced 200 findings, then another produced 90 | Three rules combined into a generator: the `edge-case-hunter` lens mandatory over a whole SRS at once; no route for *"take the assumption, record it, continue"*; no budget and no severity class | `document/decision-guide.md`, `.control/questions/` |
22
+ | Ceremony drift into the PRD; three corrections ended "reported but not fixed" | Correcting a *sentence* of an `FR` was treated as changing its *promise* — both had to go through the PRD skill | `document/prd-guide.md` |
23
+ | Gates failing repeatedly over unanswered questions | No rule said that only a **blocking** question holds a gate | `.control/questions/blocking.md` |
24
+ | The spine had to be updated every story | Invariants and inventories were mixed, and the tax was paid before the story, when the information was thinnest | `document/architecture-guide.md` |
25
+ | A large PRD made `.what` over-think — 41 of 56 use cases marked `critical` (73%) | Not the PRD's length. The stage's scope was the whole corpus at once, plus a `critical` definition with two elastic criteria that passed everything | `document/delivery-flow-guide.md` |
26
+ | Too slow for a small-to-medium application | A composite of the five above | all of it |
27
+
28
+ One cause was **not** the method: **model choice.** A "find the gap" lens with no upper bound, run by the
29
+ most careful model, produces the most gaps, and each gap became an open question. That is a policy question,
30
+ and its answer is in `README.md`.
31
+
32
+ ## Six principles
33
+
34
+ Every decision in this method traces to one of these. Anything that traced to none of them was left out.
35
+
36
+ 1. **The size of the application does not set the depth of the documents.** Size sets how many components
37
+ there are, not how deep each one goes.
38
+ 2. **Depth is set by the owner's preference, not by an objective threshold.** A preference is a legitimate
39
+ input and does not have to be justified.
40
+ 3. **Accepting risk must be cheap.** One recorded line, not a debate. If accepting risk is expensive, people
41
+ avoid it by writing documents they do not need.
42
+ 4. **Breadth once, depth per component.** The global portrait is born once and thin; depth is born when its
43
+ component is actually worked on.
44
+ 5. **What can be derived is not written by hand.** Inventories, structure maps, the decision index, the
45
+ global catalogue, story status.
46
+ 6. **Mandatory is a cost and must buy something.** A mandatory rule that prevents no concrete failure is
47
+ repealed, not loosened.
48
+
49
+ ## Why `mode` and `risk_accepted` are two fields
50
+
51
+ The most important separation in the method, and the easiest to undo by accident.
52
+
53
+ Documents and reviews are **two different mitigations.** Merging them makes one legitimate position
54
+ impossible to state:
55
+
56
+ > *"This part is risky, I know that, and I manage it with tests and review — not with prose."*
57
+
58
+ If depth were controlled by `risk_accepted`, the only route to a thin document would be raising
59
+ `risk_accepted` — which means **lying in the risk record** to buy the depth you wanted. And the entire reason
60
+ that field exists is to record what was accepted.
61
+
62
+ So a component may sit at `mode: catalog` and `risk_accepted: low` at the same time: thin on purpose, and
63
+ reviewed the hardest precisely there. No matrix can hold that position, and it is a position people actually
64
+ have.
65
+
66
+ The control over it is **disclosure, not veto**. The agent does not judge; it reads the `FR` that fall to
67
+ the component and names what is touched — money moving, personal data, an irreversible action, a contractual
68
+ promise, an un-rollbackable integration — and only then proposes values. The owner may always choose fast.
69
+ They may never choose it without knowing what is being staked.
70
+
71
+ One hard floor is not negotiable against preference: when an outside party — a regulator, an auditor, a
72
+ client through a contract — will demand the artifacts as a deliverable, the touched component goes to
73
+ `mode: deep` and `risk_accepted: low`. There the risk is not the owner's alone to accept.
74
+
75
+ ## Why `mode` has no third scope
76
+
77
+ `mode` cannot be overridden per wave or per `SPEC.md`. A wave MAY cross several components, so a per-wave
78
+ override would give one component two different depths depending on which wave touched it — while the
79
+ document is one, and living.
80
+
81
+ > Depth belongs to the component, not to the work.
82
+
83
+ ## Why the blueprint is bounded to lists
84
+
85
+ The most decisive boundary in the method. The previous run broke because "complete" was read as "fully
86
+ specified".
87
+
88
+ The blueprint carries **one line per thing**: one line per use case, per table, per endpoint, per screen.
89
+ Plus the entities, the actors, the spine, C4, and the rules that cross components. What it does **not**
90
+ carry is the flows, the failure behaviour, the contracts, the data dictionary — those are per component, at
91
+ G4, and only as deep as that component's `mode`.
92
+
93
+ Two consequences worth knowing:
94
+
95
+ - **The order stops being circular.** Blueprint content is untouched by `mode`, and `mode` is first needed at
96
+ G4 — by which point it has existed since the tail of G2.
97
+ - **Nobody needs a fifth mode.** The wish for one is almost always *"I need at minimum the use cases, the
98
+ API, and the database"*, and all three are in `catalog` already, because none of them is part of the knob.
99
+
100
+ **G3 is written per component and gated once**, and that is not a compromise. Writing parallelises with the
101
+ component as the key. The gate is one, because its whole value is seeing the picture entire before choosing
102
+ which component to build — gating per component means approving seven times, each time seeing a seventh.
103
+
104
+ What is reviewed at G3 is the **generated roll-up**, not seven files. The catalogue and the actor lists stay
105
+ in their component kernels as their permanent home. One fact, one home, one view.
106
+
107
+ ## Why `critical` was narrowed to three words
108
+
109
+ It used to mean: touches money, personal data, or an irreversible action; **or** is the reason the component
110
+ exists; **or** is expensive to discover late. With the last two, every use case passed — 41 of 56, 73%.
111
+
112
+ Both were repealed. What is left is the first clause, and the one-third sanity check that follows from it: if
113
+ more than a third of a component's use cases are marked, the definition was misapplied.
114
+
115
+ ## Why decisions stopped being mandatory, and stopped being called ADRs
116
+
117
+ The old name was ADR — *Architecture Decision Record* — and the word "Architecture" forced the wrong
118
+ question at the moment of writing: *"is this architectural?"*. That question discards exactly the decisions
119
+ most worth keeping, the ones that sound small: *"the filter works like this"*.
120
+
121
+ So the name is `DEC-`, and the test is memory rather than category:
122
+
123
+ > If someone asks in three months why it is like this, is the answer readable from the code?
124
+
125
+ Recording is **not mandatory**, with one exception: a decision that contradicts or changes an `AD-N`. And
126
+ one sentence has to be said out loud or "not mandatory" gets read as "mandatory but allowed to be late":
127
+
128
+ > A decision nobody recorded is normal, not negligence, and MUST NOT be logged as debt.
129
+
130
+ Three more things changed, each closing a hole that already existed:
131
+
132
+ - **`applied` became a status.** The old form already said that *applying* is what freezes a decision — but
133
+ there was no status for it, so "applied or not" was readable from nowhere.
134
+ - **`layer:` was repealed.** It was a classification demanded before anything was known, and it was guessed
135
+ as often as derived. `touches:`, filled from what actually changed, replaces it.
136
+ - **Finding a decision stopped going through the memlog.** A generated flat table does it. The memlog is a
137
+ run log again.
138
+
139
+ ## Why the folders stay `.what/` and `.how/`
140
+
141
+ Naming folders after the gates — `.problem/`, `.product/`, `.blueprint/`, `.component/`, `.release/` — was
142
+ weighed and **not taken**, for four reasons:
143
+
144
+ | Reason | Concretely |
145
+ |---|---|
146
+ | Two folders for two files | `.problem/` would hold one brief; `.product/` would hold PRDs. That is ceremony, not clarity |
147
+ | One folder with nothing in it | G5's output is code, tests, a PR, a green RTM — no document |
148
+ | **Time would become a folder axis** | A gate is a moment. One SRS would split across two homes — half written at G3, half at G4. One living document, two folders, divided by the calendar |
149
+ | **A mechanical guard would be lost** | Today a skill cannot write into a layer that is not its own, because the boundary is enforced **by path**. Put behaviour and mechanism in one folder and that boundary drops to prose |
150
+
151
+ So "Blueprint" and "Component" name a **gate and a skill** — not a document, not a folder. The split between
152
+ them is horizontal, not vertical: the blueprint holds the breadth of both layers, the component holds the
153
+ depth of both.
154
+
155
+ What actually answered the original complaint — that `.what`/`.how` feel abstract — is not a rename. It is
156
+ **one table in `AGENTS.md`**: the thing in your hand → its folder. Nobody has to reason about the abstraction
157
+ if the answer is already written where they are standing.
158
+
159
+ ## Why each skill exists, and why the merged ones merged
160
+
161
+ Twenty-one skills became fifteen. Skills are named for the **gate they serve** rather than the artifact they
162
+ write, so *"which skill do I run"* is answered by *"which gate am I at"*.
163
+
164
+ | Gone | Merged into | Why |
165
+ |---|---|---|
166
+ | `wdi-product-brief` | `wdi-problem` | Renamed to its gate |
167
+ | `wdi-analysis` | `wdi-blueprint` + `wdi-component` | It branched three ways in its own first step — the sign of two jobs in one skill. The split now falls exactly on the gate boundary |
168
+ | `wdi-architecture` | `wdi-blueprint` intent `platform` | Spine, C4, and the inventories are all G3 output |
169
+ | `wdi-design` | `wdi-component` intent `design` | Renamed to its gate |
170
+ | `wdi-glossary` | `wdi-blueprint` | It was already the first step of the writing order |
171
+ | `wdi-component` (old) | `wdi-init` intent `component` | Its work was a registry row and two skeletons. That is init |
172
+ | `wdi-structure` | `wdi-init` intent `structure` | Its scope widened to everything that must exist before work starts |
173
+ | `wdi-apply` | `wdi-decision` | Applying is part of a decision's life, and it is what writes `applied` |
174
+ | `wdi-correct-course` | `wdi-decision` | A course correction **is** a decision |
175
+ | `wdi-wave` · `wdi-ship-story` | `wdi-build` | One unit of work must not need four invocations, three of them bookkeeping |
176
+ | `wdi-project-log` | `wdi-log`, with `wdi-meeting` | Both record a fact that came from outside the code |
177
+ | — | **`wdi-product` was born** | `bmad-prd` was the only writer of a primary artifact with no wrapper, so nothing checked its position, verified its result, or landed its memlog |
178
+
179
+ **`wdi-ux` stands alone and was deliberately not merged.** It is the one skill that straddles: its decision
180
+ sits at G2 altitude — *how does this feel to use* — while its landing is per component. Merged into
181
+ `wdi-product` its landing home would be wrong; merged into `wdi-component` its decision altitude would be.
182
+ Left standing, it is more honest than either, and honesty beats the count.
183
+
184
+ ## Why fan-out has a rule
185
+
186
+ > Parallel fan-out is only for output with a natural key. Output that is a shared list with no key must be
187
+ > written by one agent that reads the whole input.
188
+
189
+ Not theory. In the previous run, 41 cross-component business rules from seven parallel agents had to be
190
+ merged and de-duplicated **serially**, because the target file had no key — and that merge was the most
191
+ expensive part of the pass.
192
+
193
+ Keys that exist: the Product Component, the inventory source, the endpoint number, the story, the wave.
194
+ Things with no key: the glossary, the cross-component rules, the spine.
195
+
196
+ ## Why nine ceremonies were repealed
197
+
198
+ Each cost something and bought nothing, and principle 6 says that is grounds for repeal rather than
199
+ loosening:
200
+
201
+ | Repealed | Because |
202
+ |---|---|
203
+ | The `ANX-` annex, its "referenced in ≥2 places" rule, and its `Verified` + SHA line | Zero annexes were ever born |
204
+ | The `No-op` lane rule on flow diagrams | A heavy convention for a folder that had never carried a file |
205
+ | `layer:` on a decision, and the whole `both`-versus-pair section | Replaced by `touches:`, filled from what happened |
206
+ | The double proof of done — a business sentence plus a technical restatement | The business one stays; the technical form is the test name, checked mechanically |
207
+ | The `SCP-` code | A course correction is a `DEC-`. No second code names the same thing |
208
+ | The 400-line threshold for splitting a slot | Dropped from mandatory to advice |
209
+ | Having to open a written decision at five different points | One is left: contradicting an `AD-N` |
210
+ | 21 of the 35 gate-checklist questions, at `mode: catalog` | They remain in the guide as material. Asking them is never wrong; requiring them was |
211
+ | Five of the eight story-closing items | They moved to **wave close**, where the information actually exists |
212
+
213
+ Two of those were leaks of a different kind, and naming the kind matters more than the two instances: the
214
+ `No-op` lane rule and the annex `Verified` line were both **how to do the work** written as **what binds**.
215
+ The test that separates them:
216
+
217
+ > If next year's model is twice as capable, does this rule still buy something? Yes → it belongs in a guide.
218
+ > No → it belongs in a template comment.
219
+
220
+ A guide carries the layer boundary, the required shape, the failure prevented, the acceptance test, and the
221
+ ownership. A template comment carries the phrasing, the examples, and the heuristics — and template comments
222
+ are already designed to be deleted, which makes them the right home for what ages.
223
+
224
+ ## Why a container is a runtime, not a folder
225
+
226
+ Three places in this repo used the word "container" for three different things with zero overlap, and the
227
+ argument that followed was not about which list was right. It was about a definition nobody had written, so
228
+ each place had quietly invented one. `DEC-017` settled it: a container runs its own code or stores its own
229
+ data, and can be replaced without rebuilding another. **Deploying two of them in one release does not merge
230
+ them** — that is a deployment choice, and reading it as an architectural one is what collapses a browser
231
+ bundle into "static assets of the web server", where it carries real behaviour with no owner and no NFR.
232
+
233
+ The part worth carrying is not the definition but **why one rule could not be obeyed**. The old rule said
234
+ every container heading in the codebase map must match the registry, and the next sentence said a container
235
+ with no code of ours gets no section. A database satisfies the second and cannot satisfy the first. Read as
236
+ symmetric, the rule demanded a section that would be empty or invented — and the way out was not an
237
+ exception but a field: `built` says whether the implementation is ours, and the match became one-directional.
238
+
239
+ **A definition left unwritten will be re-argued in the next corpus.** That is the general lesson, and it is
240
+ why `built` is checked by V25 rather than merely described here: prose that nothing verifies is prose that
241
+ gets contradicted by the first person in a hurry.
242
+
243
+ ## What is not here
244
+
245
+ The change plan that produced this shape — which guides changed, which templates were born, which folders
246
+ were deleted, in what order — was archaeology the moment the change landed. Its trace is in git.
@@ -0,0 +1,169 @@
1
+ ---
2
+ status: Accepted
3
+ ---
4
+
5
+ # Method Glossary
6
+
7
+ **Loaded when:** a method term is unclear, and before coining a new one.
8
+
9
+ The words this method uses for **itself**. What the product is about belongs to
10
+ `.control/product-glossary.md` instead. A term defined here MUST NOT be redefined there, and the
11
+ reverse holds too. The test: would this term still apply on a different product? Yes → here.
12
+
13
+ ## Layers
14
+
15
+ | Term | Means |
16
+ |---|---|
17
+ | **Corpus** | The four layers below. `_bmad-output/` is not part of it |
18
+ | **`.constitution/`** | How we work. Rules. Rarely changes |
19
+ | **`.control/`** | What currently holds and what has been decided. Facts. Changes often. Equals `{project_knowledge}` |
20
+ | **`.what/`** | What was promised |
21
+ | **`.how/`** | How it is built |
22
+ | **Workspace** | `_bmad-output/` — work in progress, committed but not curated |
23
+ | **Placement test** | Is this file still true after its wave has passed? Yes → corpus. No → workspace |
24
+
25
+ ## Units
26
+
27
+ | Term | Means |
28
+ |---|---|
29
+ | **Product Component** (PC) | A domain slice — the box at C4 L3. Lives in `.what/<pc>/` and `.how/<pc>/`, and its `containers:` says where it runs |
30
+ | **Logical Component** (LC) | One addressable unit of build. Registered in `components.yaml` with `type` · `container` · `owner` · `area` |
31
+ | **Container** | Something that **runs its own code or stores its own data** and can be replaced without rebuilding another one. The C4 L2 term, and the value of an LC's `container` field. Two questions decide it and both MUST be yes — `architecture-guide.md` owns the test. Shipping two containers in one release does **not** merge them |
32
+ | **`built`** | A container's one boolean. `true` when we write what is inside it, `false` when we deploy someone else's implementation. It decides whether the container gets an L3, an `LC`, and a heading in the codebase map — V25 checks all three |
33
+ | **External system** | Something the product talks to whose **runtime we do not deploy**. It belongs at C4 L1, and MUST NOT be a container, an `LC`'s `container`, or a heading in the codebase map. What we lean on it for lives in `cross-cutting.md` or an integration contract |
34
+ | **`_platform`** | **Not a component.** The home for what belongs to no Product Component: the spine, the C4 set, `cross-cutting.md`, the three inventories, and whatever it **owns**. A legitimate value in every position that asks which component owns something — `platform_owns`, an inventory row, an `LC`. Four kinds today: data · endpoint · job · screen. It carries no `mode`, no `risk_accepted`, and no G4 |
35
+ | **Library** | An includable artifact — compiled into or imported by something else, never run on its own. Not a container |
36
+ | **Slot** | A numbered sub-folder of a PC. `.what/<pc>/` 02–05 is reading order; `.how/<pc>/` 01–06 is ABCE classification. The two numberings do **not** mean the same thing |
37
+ | **Kernel** | The `SRS-<pc>.md` or `SDD-<pc>.md` file itself. Content SHOULD stay in it until it grows past roughly 400 lines — a suggestion, not a threshold |
38
+
39
+ A PC is not a container: a container runs, a PC is a domain. One container holds several PCs, and
40
+ one PC may appear in more than one container. Because they cross, neither list implies the other, and
41
+ the crossing MUST be written down rather than inferred — that is the PC × container matrix at C4 L2,
42
+ rendered from each PC's `containers:`.
43
+
44
+ ## Flow
45
+
46
+ There is no "stage". The five gates are the only flow vocabulary, and the word **area** is not used at all —
47
+ there is only Product Component.
48
+
49
+ | Term | Means |
50
+ |---|---|
51
+ | **Gate** | One of five decision points: G1 Problem · G2 Product · G3 Blueprint · G4 Component · G5 Release. Named after what is decided there, not after the work before it |
52
+ | **`mode`** | The one knob for **document depth**, and nothing else. `catalog` · `outline` · `guarded` · `deep`, default `catalog`. Two scopes — global in `index.yaml`, per component in `components.yaml`, and the per-component one wins. **No third scope** |
53
+ | **`risk_accepted`** | The one field for **review intensity**, and nothing else. `low` · `medium` · `high`. It MUST NOT be derived from `mode`, nor `mode` from it |
54
+ | **Blueprint** | The whole-product portrait decided once at G3: one line per use case, table, endpoint, and screen, plus entities, actors, the spine, C4, and cross-component rules. It names a **gate and a skill**, never a document or a folder |
55
+ | **Wave** | One unit of delivered work. Opens at G4 or G5, closes at G5, recorded in `waves.yaml` |
56
+ | **Release** | What a PRD promises. One release MAY span several waves; the relation is data, never inferred from numbering |
57
+ | **Wave size** | `S` ≤3 stories no new FR · `M` 4–12 · `L` >12 or a new container. MAY be raised mid-flight, MUST NOT be lowered. It does **not** choose which gates are active — that is `mode` |
58
+ | **Fast Path** | A fix that skips all gates: ≤1 story, no FR/UC/`AD-N`/domain-model change, no money, personal data, or third-party integration |
59
+ | **Step** | One of the five points inside `wdi-build`'s ship pipeline — plan · build · panel · publish · CI. It is **not** a gate and not a stage, and the word MUST NOT be used for anything at gate altitude |
60
+
61
+ ## Artifacts
62
+
63
+ | Term | Means |
64
+ |---|---|
65
+ | **Brief** | One problem, one user, one measure. Singleton, spans releases |
66
+ | **PRD** | What is promised for **one initiative**, across every release it touches. FR and NFR numbered from the registry |
67
+ | **SRS** | Per PC: what the system must do. `.what/` — slices space, while the PRD slices initiative. It **exists at every `mode`**, carrying the actor list and the use case catalogue |
68
+ | **SDD** | Per PC: how it is built. `.how/`. At `mode: catalog` it is a skeleton, and that is a finished state |
69
+ | **Inventory** | One of three living registers at product level — tables, endpoints, screens. Written as a plan when there is no code, **derived** from code once there is |
70
+ | **Architecture spine** | `ARCHITECTURE-SPINE.md` — invariants as `AD-N`, each carrying Binds · Prevents · Rule. It constrains; it does not describe |
71
+ | **C4** | L1 system context · L2 containers · L3 components, one file per container. L1+L2 together are what other methods call the HLD |
72
+ | **`DESIGN.md`** | UX per PC, in `.how/<pc>/01-ux/` |
73
+ | **`EXPERIENCE.md`** | The user-facing journey, in `.what/<pc>/04-usecases/` |
74
+ | **`DEC-`** | One decision worth remembering, numbered globally. Lives in `.control/decisions/`. Recording is **not mandatory**; it freezes at `applied`, not at `accepted` |
75
+ | **SPEC** | The machine contract for **one wave**. A projection of `.what/` + `.how/`, and MUST NOT contain anything new. Not read by humans |
76
+ | **Story** | One unit of build. Status is read from its own frontmatter, never copied elsewhere |
77
+ | **Structure map** | `.control/structure-codebase.md` and `structure-document.md` — where things actually are today |
78
+ | **Memlog** | The record of *why* while an artifact was written. Never copied into a document; a source when writing a `DEC-`. It is a **run log**, and it MUST NOT be searched as an index of decisions — `.control/generated/decisions.md` is that |
79
+
80
+ ## Identifiers
81
+
82
+ | Code | For |
83
+ |---|---|
84
+ | `BG-` · `FR-` · `NFR-` · `UJ-` | Business goal · functional requirement · non-functional requirement · user journey |
85
+ | `UC-` | Use case |
86
+ | `AD-` | An invariant in the architecture spine |
87
+ | `DEC-` | A decision |
88
+ | `LC-` | A Logical Component |
89
+ | `OQ-` | An open question |
90
+ | `RTR-` | An archived retrospective, in `.control/reports/` |
91
+ | `CAP-` | A capability — the planning unit |
92
+ | `NT-` | A non-technical fact |
93
+ | `BUG-` · `HOT-` | A defect · a hotfix |
94
+ | `V1`–`V25` | Validators. `V10` fell and its number is not reused |
95
+
96
+ IDs are allocated **globally** and never restart per document, per component, or per release. The chain
97
+ that must hold end to end: `BG → FR → UC → story → test`.
98
+
99
+ `ADR-` is **retired**. It was renamed to `DEC-` on 2026-08-18 with the numbers unchanged, so `ADR-004`
100
+ inside a document frozen before that date is an alias for `DEC-004`, and those documents MUST NOT be
101
+ rewritten for the prefix.
102
+
103
+ ## Registry and generated
104
+
105
+ | Term | Means |
106
+ |---|---|
107
+ | **Registry** | `.control/registry/` — the source of truth for IDs and plans. Written through `wdi-*` skills |
108
+ | **Generated** | `.control/generated/` — derived from the registry. Written by the generator only, by hand **never** |
109
+ | **RTM** | Requirements traceability matrix. Generated, never hand-maintained |
110
+ | **Validator** | A script that answers what can be counted. It does not replace a gate checklist, which answers what must be judged |
111
+
112
+ ## BMad terms
113
+
114
+ BMad terms live in a WDI glossary because WDI runs on BMad. Each is defined **as WDI uses it**;
115
+ where BMad's own meaning is wider, the narrower one here wins.
116
+
117
+ | Term | Means |
118
+ |---|---|
119
+ | **Stories mode** | The route this method uses: SRS + SDD + PRD → `SPEC.md` + `stories.yaml` → build |
120
+ | **Skill class** | `A` living document, straight to the corpus · `B` living but wrongly granular, lands neutral then is placed · `C` spent after its work · `D` no artifact |
121
+ | **Companion** | A side file a BMad skill produces next to its main output. The lasting ones are promoted by the distillation table |
122
+ | **Distillation** | Promoting what is durable out of `_bmad-output/` before a wave closes. What is not promoted dies with the folder |
123
+ | **`persistent_facts`** | Files a skill always reads. Routing alone does not achieve this |
124
+ | **`doc_standards`** | Rule files a skill checks its output against. Facts MUST NOT be installed here, and neither MUST anything at `status: Reference` |
125
+ | **`{project_knowledge}`** | The config variable pointing at `.control/` |
126
+ | **`_bmad/custom/`** | Where every BMad override lives. `.claude/skills/bmad-*/customize.toml` MUST NOT be edited — it is overwritten on update |
127
+
128
+ ## Retired — MUST NOT be used as current
129
+
130
+ | Retired | Instead |
131
+ |---|---|
132
+ | `ADR-` | `DEC-` — same numbers, new prefix |
133
+ | `ANX-`, and the annex concept | Nothing. Zero annexes were ever born |
134
+ | `SCP-` | A `DEC-` of `type: course-correction` |
135
+ | `layer:` on a decision | `touches:`, filled from what actually changed |
136
+ | "Stage 1"…"Stage 5" as flow vocabulary | The five gates |
137
+ | `epics.md` · `sprint-status.yaml` · `bmad-sprint-planning` · `bmad-create-epics-and-stories` | The stories route: `SPEC.md` + `stories.yaml`, status in story frontmatter |
138
+ | Validator `V10` | Nothing. Its number is not reused |
139
+ | `bmad-help` as the answer to "where am I" | `wdi-help` |
140
+ | The skills `wdi-analysis` · `wdi-architecture` · `wdi-design` · `wdi-glossary` · `wdi-structure` · `wdi-apply` · `wdi-correct-course` · `wdi-wave` · `wdi-ship-story` · `wdi-product-brief` · `wdi-meeting` · `wdi-project-log` | The fifteen in `method/README.md`. `method/rationale.md` says which absorbed which, and why |
141
+ | An Indonesian synonym for a `mode` value — *ringkas*, *terjaga*, *katalog* as prose | The English value, used as written: `catalog` · `outline` · `guarded` · `deep` |
142
+
143
+ ## Synonyms that MUST NOT be coined
144
+
145
+ A synonym for a term that already has an entry is drift, and `wdi-reconcile` hunts for it.
146
+
147
+ | Do not say | Say | Because |
148
+ |---|---|---|
149
+ | application · app · service, for a deployable | **container** | The term is already defined at C4 L2 and carried by every LC |
150
+ | infrastructure · third-party · dependency, for something inside the boundary | **container** with `built: false` | Calling it something else is how a container ends up with no row, no owner, and no NFR |
151
+ | container, for something whose runtime we do not deploy | **external system** | It has no `built`, no L3, and no heading. Registering it as a container promises a section of the codebase map that will never exist |
152
+ | module · package, for a unit of build | **Logical Component** | `components.yaml` names it, and V12 resolves against that name |
153
+ | epic · sprint, for a batch of work | **wave** | Both belong to the sprint route this method dropped |
154
+ | area, for a domain slice | **Product Component** | The word "area" is not used anywhere in this method |
155
+ | platform, for a Product Component | **`_platform`**, and only for what is not one | Registering `_platform` as a PC gives it a `mode`, an SRS, and a G4 it has no use for |
156
+ | profile · tier · level, for document depth | **`mode`** | One knob, four values, and no matrix behind it |
157
+ | feature, for a domain slice | **Product Component** | A feature is a promise; a PC is a folder pair with an owner |
158
+ | requirements document | **PRD** or **SRS** | They cut different axes — time versus space — and merging the names merges the documents |
159
+
160
+ ## Rules
161
+
162
+ - A new method term MUST be added here in the same pass it first appears, not defined where it is
163
+ used. Adding one is a change to the **method itself** — `wdi-blueprint` MAY propose it and MUST NOT
164
+ write it, because a method term binds every project the method is installed in.
165
+ - One term MUST NOT have two entries. Two meanings mean two terms.
166
+ - A domain term MUST go to `.control/product-glossary.md` instead. If it is unclear which, ask whether the
167
+ term would survive being applied to a different product: yes → here, no → there.
168
+ - Common technical terms stay in English when the industry name is the one that matches the code,
169
+ the error message, or the reader's expectation.
@@ -0,0 +1,68 @@
1
+ ---
2
+ status: Accepted
3
+ scope: project-room
4
+ ---
5
+
6
+ # `.constitution/project/` — this product's custom rules
7
+
8
+ **This folder belongs to the product, not to the method.** It is seeded once at install, and after
9
+ that `wdi-method update` **never** writes over a file in it. `wdi-method promote` **skips it entirely**,
10
+ so nothing you write here can reach the public package.
11
+
12
+ This README is the one exception: it is authored in the package and `promote` never carries it home.
13
+ You MAY edit it, but the edit will not survive the next install elsewhere — so **your rules MUST be
14
+ other files.**
15
+
16
+ ## What goes here
17
+
18
+ Normative rules that hold **only in this product**, and are not code conventions:
19
+
20
+ - a review policy a client requires
21
+ - a process rule that came out of a contract
22
+ - a naming or language policy that differs from the method default
23
+ - a prohibition or obligation specific to this domain
24
+
25
+ ## What does not
26
+
27
+ | The thing | Its home |
28
+ |---|---|
29
+ | Product or client name | `.control/registry/index.yaml` → `product:` |
30
+ | Code conventions, stack, brownfield patterns | `.constitution/codebase/*-guide.md` — already protected once `Accepted` |
31
+ | Scope, method ownership, repo checklist | `constitution.md` Articles 1, 2, 5 — already protected |
32
+ | Agent instructions for this product | `AGENTS.md`, **outside** the marked `wdi-method` block |
33
+ | BMad overrides for this product | `_bmad/custom/*.user.toml` |
34
+ | State, promises, design | `.control/` · `.what/` · `.how/` |
35
+
36
+ **A generic rule MUST NOT be moved here.** If it holds in any project, it belongs to the package — fix
37
+ it there, then `promote`. Using this room to bypass the package is how a method stops being generic
38
+ with nobody deciding it, and **an empty room is a valid state**: filling it so that it gets used is the
39
+ very failure this rule prevents.
40
+
41
+ ## The shape of a file here
42
+
43
+ Frontmatter is required, and `V27` checks it:
44
+
45
+ ```yaml
46
+ ---
47
+ scope: project # REQUIRED, and exactly this value
48
+ purpose: "" # REQUIRED, one line: what this rule protects
49
+ overrides: null # optional: the kit file it narrows or contradicts
50
+ decision: null # REQUIRED when `overrides:` is set — the DEC- that decided it
51
+ ---
52
+ ```
53
+
54
+ - A file here MAY **narrow** or **add to** a generic rule with no `overrides:` at all.
55
+ - To **contradict** a generic rule it MUST name that rule in `overrides:` and carry `decision:`.
56
+ Without both, this room becomes the place where generic rules are broken with no trace — and that is
57
+ what stops a method being trustworthy in the next repo.
58
+ - An `overrides:` pointing at a file that does not exist is a finding, not a typo: it means the rule
59
+ being contradicted is gone, and the contradiction may no longer have a reason.
60
+
61
+ ## Why whole files, and not marked blocks
62
+
63
+ `AGENTS.md` uses a marked block because it is **one** file. `.constitution/` has fifty-odd, and marked
64
+ blocks inside them would make `update` perform surgery in every file — one broken marker and either
65
+ the product's rule is erased, or the generic rule freezes forever.
66
+
67
+ Whole files in their own room avoid both, and they keep a product's rules **readable in one place**
68
+ instead of scattered inside fifty files that belong to somebody else.
@@ -0,0 +1,97 @@
1
+ ---
2
+ status: Accepted
3
+ ---
4
+
5
+ # Repo Guide
6
+
7
+ **Loaded when:** adding a file that is neither code nor corpus, or unsure whether something may be
8
+ kept in this repo
9
+
10
+ Every other guide answers *where in the corpus does this go*. This one answers the question that
11
+ comes before it: **does it belong in this repository at all?**
12
+
13
+ ## What this repository is
14
+
15
+ One product, built for one owner. It holds what is needed to build and run that product, and
16
+ nothing that merely relates to it commercially or organisationally.
17
+
18
+ | MAY be here | MUST NOT be here |
19
+ |---|---|
20
+ | Application code, configuration, migrations, tests | Proposals, contracts, meeting notes with the client |
21
+ | The corpus — `.constitution/` `.control/` `.what/` `.how/` | Contract values, pricing strategy, margins, rate cards |
22
+ | Technical documentation, ADR, diagrams | Real customer data, production credentials, tokens |
23
+ | Synthetic seed data | Anything whose leak would harm a bargaining position |
24
+ | Built deliverables | An archive of commercial documents |
25
+
26
+ The test is not "is it secret". It is **what changes when this file changes** — a commitment, or how
27
+ the thing is built. Only the second belongs here.
28
+
29
+ ## Two failure modes, and why the second is worse
30
+
31
+ The obvious one is a credential in a commit. It is loud, it is caught, and it has a known remedy.
32
+
33
+ The quiet one is a **commercial fact restated as a technical one** — a limit that exists because of
34
+ what was negotiated, written into an ADR as though it were an engineering constraint. It survives
35
+ every scan, it is never noticed as a leak, and it teaches the next reader that the boundary is
36
+ soft.
37
+
38
+ When a technical decision genuinely follows from a commercial one, the ADR MUST state the technical
39
+ fact and MUST NOT state the commercial one. *"Retention is 90 days"* is a technical fact.
40
+ *"Retention is 90 days because the client would not pay for more"* is a commercial one wearing a
41
+ technical coat.
42
+
43
+ ## `.work/` — scratch that is committed
44
+
45
+ `.work/` holds work in progress that has no home yet: notes while reading an unfamiliar system,
46
+ drafts, exploratory output, a working paper for a change spanning several sessions.
47
+
48
+ It is **committed**, so that a session picked up on another machine finds it, and so a reviewer can
49
+ see what a change was actually reasoning about.
50
+
51
+ It is **ephemeral**, and the two together are what make its rules matter:
52
+
53
+ - Any durable outcome MUST be moved out before the task closes — to the corpus if it is truth, to
54
+ `_bmad-output/` if it is a run's byproduct.
55
+ - Obsolete scratch MUST be deleted when its task closes. `.work/` that only grows stops being
56
+ scratch and becomes a second, unindexed corpus that nobody trusts and nobody deletes.
57
+ - Secrets and commercial figures MUST NOT be written here. Being scratch is not an exemption; it is
58
+ the reason people assume it is one.
59
+ - Nothing MUST be read from `.work/` as authority. If something there is right, it belongs
60
+ somewhere with an owner.
61
+
62
+ `.work/` MUST NOT be confused with `_bmad-output/`. That folder holds the output of skill runs, is
63
+ never curated, and is cited by path. `.work/` holds what a human or agent wrote by hand while
64
+ working, and is meant to empty out.
65
+
66
+ ## Referring to things outside this repository
67
+
68
+ Engagement context — who the client is, what was agreed, what is due — lives elsewhere. This repo
69
+ MUST work without it. An agent MUST be able to act on the rules stated here without opening any
70
+ other repository.
71
+
72
+ When an artifact genuinely needs external context:
73
+
74
+ - MUST state the technical fact locally, in full.
75
+ - MAY name the external source by **repository and path**, as provenance.
76
+ - MUST NOT paste the external content in, and MUST NOT replace a technical statement with a pointer
77
+ to a commercial document.
78
+
79
+ A pointer where a specification should be is the failure this rule exists to stop: the reader who
80
+ cannot open that path is left with nothing, and the reader who can is reading the wrong kind of
81
+ document.
82
+
83
+ ## How the method arrives
84
+
85
+ Method files in `.constitution/` (except this product's Articles 1, 2, and 5, `codebase/*-guide.md`
86
+ once `Accepted`, and any extra file this repo added), the `wdi-*` skills, and `_bmad/custom/*.toml`
87
+ arrive from the public WDI Method package via `npx wdi-method install` / `update`.
88
+
89
+ At **read time** this repo is self-contained: every file the rules need is here, readable with the
90
+ repo alone. At **change time** the method has one published writer — the WDI Method package. Two
91
+ rules follow:
92
+
93
+ - A method file MUST NOT be invented or patched here to improve the method. If a rule is wrong, it
94
+ is fixed in the WDI Method package, then brought here with `update`.
95
+ - A rule particular to this repo MUST be written out in full, and MUST NOT be replaced by a pointer
96
+ into another repository.
97
+