wdi-method 0.5.14 → 0.6.1
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.
- package/README.md +436 -271
- package/bin/wdi-method.js +199 -5
- package/kit/.constitution/method/README.md +76 -75
- package/kit/.constitution/method/constitution.md +2 -1
- package/kit/.constitution/method/document/architecture-guide.md +10 -10
- package/kit/.constitution/method/document/bmad-guide.md +50 -16
- package/kit/.constitution/method/document/bmad-skill-register.md +74 -71
- package/kit/.constitution/method/document/brief-guide.md +42 -11
- package/kit/.constitution/method/document/corpus-guide.md +146 -11
- package/kit/.constitution/method/document/decision-guide.md +199 -134
- package/kit/.constitution/method/document/delivery-flow-guide.md +153 -82
- package/kit/.constitution/method/document/prd-guide.md +63 -20
- package/kit/.constitution/method/document/sdd-guide.md +5 -4
- package/kit/.constitution/method/document/srs-guide.md +150 -147
- package/kit/.constitution/method/document/templates/addendum.md +70 -71
- package/kit/.constitution/method/document/templates/architecture-spine.md +6 -4
- package/kit/.constitution/method/document/templates/brief.md +132 -110
- package/kit/.constitution/method/document/templates/c4.md +11 -11
- package/kit/.constitution/method/document/templates/contract.md +51 -52
- package/kit/.constitution/method/document/templates/cross-cutting.md +1 -2
- package/kit/.constitution/method/document/templates/design-system.md +0 -1
- package/kit/.constitution/method/document/templates/integration.md +68 -69
- package/kit/.constitution/method/document/templates/inventory.md +0 -1
- package/kit/.constitution/method/document/templates/lc.md +49 -47
- package/kit/.constitution/method/document/templates/lifecycle.md +51 -52
- package/kit/.constitution/method/document/templates/model.md +68 -55
- package/kit/.constitution/method/document/templates/oq.md +45 -45
- package/kit/.constitution/method/document/templates/prd.md +244 -226
- package/kit/.constitution/method/document/templates/questions.md +100 -76
- package/kit/.constitution/method/document/templates/rules.md +46 -47
- package/kit/.constitution/method/document/templates/sdd.md +26 -11
- package/kit/.constitution/method/document/templates/srs.md +46 -25
- package/kit/.constitution/method/document/templates/uc.md +1 -1
- package/kit/.constitution/method/document/templates/ux.md +76 -77
- package/kit/.constitution/method/document/ux-guide.md +115 -99
- package/kit/.constitution/method/language-guide.md +1 -1
- package/kit/.constitution/method/method-glossary.md +30 -17
- package/kit/.constitution/method/scripts/timeline.py +663 -665
- package/kit/.constitution/method/scripts/validate.py +1143 -362
- package/kit/.constitution/method/structure-guide.md +3 -3
- package/kit/.constitution/method/why/README.md +185 -169
- package/kit/.constitution/method/why/artifact-map.md +16 -14
- package/kit/.constitution/method/why/mode-risk-map.md +140 -0
- package/kit/.constitution/method/why/portability.md +1 -1
- package/kit/.constitution/method/why/rationale.md +12 -5
- package/kit/.constitution/project/README.md +2 -2
- package/kit/.constitution/project/codebase-brownfield-guide.md +18 -18
- package/kit/.constitution/project/codebase-conventions-guide.md +18 -18
- package/kit/.constitution/project/codebase-stack-guide.md +18 -18
- package/kit/assets/bmad-custom/bmad-architecture.toml +1 -1
- package/kit/assets/bmad-custom/bmad-correct-course.toml +5 -5
- package/kit/assets/bmad-custom/bmad-prd.toml +9 -3
- package/kit/assets/bmad-custom/bmad-product-brief.toml +6 -2
- package/kit/skills/wdi-blueprint/SKILL.md +71 -10
- package/kit/skills/wdi-build/SKILL.md +233 -123
- package/kit/skills/wdi-component/SKILL.md +8 -6
- package/kit/skills/wdi-decision/SKILL.md +187 -183
- package/kit/skills/wdi-explain-to-me/SKILL.md +84 -0
- package/kit/skills/wdi-help/SKILL.md +9 -7
- package/kit/skills/wdi-init/SKILL.md +20 -6
- package/kit/skills/wdi-problem/SKILL.md +31 -13
- package/kit/skills/wdi-product/SKILL.md +30 -17
- package/kit/skills/wdi-question/SKILL.md +170 -88
- package/kit/skills/wdi-reconcile/SKILL.md +33 -10
- package/kit/skills/wdi-report/SKILL.md +77 -25
- package/kit/skills/wdi-review/SKILL.md +201 -118
- package/kit/skills/wdi-systematic-debugging/SKILL.md +7 -7
- package/kit/skills/wdi-upgrade/SKILL.md +179 -0
- package/kit/skills/wdi-ux/SKILL.md +35 -11
- package/kit-overlay/AGENTS.md +4 -3
- package/kit-overlay/README.md +76 -75
- package/kit-overlay/constitution.md +2 -1
- package/kit-overlay/portability.md +1 -1
- package/package.json +43 -43
- package/scaffold/.control/product-glossary.md +1 -1
- package/scaffold/.control/registry/goals.yaml +25 -0
- package/scaffold/.control/registry/index.yaml +5 -5
- package/scaffold/.control/registry/specs.yaml +5 -0
- package/scaffold/.control/structure-codebase.md +19 -19
- package/scaffold/.control/structure-document.md +25 -25
- package/kit/.constitution/method/document/templates/rtr.md +0 -61
- package/kit/assets/bmad-custom/bmad-build-auto.toml +0 -10
- package/kit/assets/bmad-custom/bmad-build.toml +0 -52
- package/kit/assets/bmad-custom/bmad-code-review.toml +0 -13
- package/kit/assets/bmad-custom/bmad-retrospective.toml +0 -9
- package/kit/assets/bmad-custom/bmad-spec.toml +0 -16
- package/scaffold/.control/registry/requirements.yaml +0 -15
- package/scaffold/.control/registry/waves.yaml +0 -5
package/README.md
CHANGED
|
@@ -1,271 +1,436 @@
|
|
|
1
|
-
# WDI Method
|
|
2
|
-
|
|
3
|
-
**The review layer BMad leaves thin — documents a human reads to check a decision before code gets written, sized to what the change actually deserves.**
|
|
4
|
-
|
|
5
|
-
[BMad](https://github.com/bmad-code-org/BMAD-METHOD) decides *what* to build and *how* to build it well. WDI Method wraps it — it does not replace it — and adds the part between those two decisions and the code: inventories, a use case catalogue, a component design record, and a way to choose how much of that a given change actually needs.
|
|
6
|
-
|
|
7
|
-
> This repository is **public and generic**. It MUST NOT carry a client name, a product name, or a
|
|
8
|
-
> link to a private repository — product identity lives entirely in the repo that installs it.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
##
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
| `
|
|
110
|
-
|
|
111
|
-
| `
|
|
112
|
-
| `
|
|
113
|
-
| `
|
|
114
|
-
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
a
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
and
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
1
|
+
# WDI Method
|
|
2
|
+
|
|
3
|
+
**The review layer BMad leaves thin — documents a human reads to check a decision before code gets written, sized to what the change actually deserves.**
|
|
4
|
+
|
|
5
|
+
[BMad](https://github.com/bmad-code-org/BMAD-METHOD) decides *what* to build and *how* to build it well. WDI Method wraps it — it does not replace it — and adds the part between those two decisions and the code: inventories, a use case catalogue, a component design record, and a way to choose how much of that a given change actually needs.
|
|
6
|
+
|
|
7
|
+
> This repository is **public and generic**. It MUST NOT carry a client name, a product name, or a
|
|
8
|
+
> link to a private repository — product identity lives entirely in the repo that installs it.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Prerequisites — two engines, and which gates need them
|
|
13
|
+
|
|
14
|
+
| Engine | What it does here | Needed from | Source |
|
|
15
|
+
|---|---|---|---|
|
|
16
|
+
| **BMad Method** | Writes the documents behind G1–G4 — brief, PRD, architecture, UX | the first skill | [github.com/bmad-code-org/BMAD-METHOD](https://github.com/bmad-code-org/BMAD-METHOD) |
|
|
17
|
+
| **mattpocock/skills** | Cuts the work at G5 — `to-spec`, `to-tickets`; runs the Fast Path — `implement` | `wdi-build` | [github.com/mattpocock/skills](https://github.com/mattpocock/skills) |
|
|
18
|
+
|
|
19
|
+
No engine skill is invoked on its own. Each has a wrapper (`wdi-*`) that checks where the project is,
|
|
20
|
+
runs the engine, verifies what came back, and records it. The engine is the pen; the wrapper knows what
|
|
21
|
+
page it is on.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
Three steps, in this order. The first is required before step 3 will run; the second can wait until
|
|
28
|
+
you reach G5, but doing it now means nothing stops you later.
|
|
29
|
+
|
|
30
|
+
**1. BMad Method** — in the product repo, picking the same agents you will give this installer:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
cd /path/to/your/product-repo
|
|
34
|
+
npx bmad-method install
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**2. mattpocock/skills** — one of the two paths, not both (both leaves every skill twice):
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Claude Code — a managed bundle that updates when its author ships
|
|
41
|
+
claude plugins install mattpocock-skills # or, inside a session: /plugin install mattpocock-skills
|
|
42
|
+
|
|
43
|
+
# Codex, Cursor, OpenCode, other agents — copies the skills into this repo; keep setup-matt-pocock-skills selected
|
|
44
|
+
npx skills@latest add mattpocock/skills
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Then, once, inside your agent, run `/setup-matt-pocock-skills`: it asks which issue tracker `to-tickets`
|
|
48
|
+
should publish to (local files, GitHub, Linear, …).
|
|
49
|
+
|
|
50
|
+
**3. WDI Method:**
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npx wdi-method
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
This opens a TUI: it checks BMad, reports whether it found the ticket engines, detects install versus
|
|
57
|
+
update, asks the product name and the document language, lets you pick agents, shows what it will
|
|
58
|
+
write, and prints what to do next.
|
|
59
|
+
|
|
60
|
+
**Every field arrives with an answer already in it, and Enter accepts it.** On an update that answer is
|
|
61
|
+
what the repo already says; on a first install the product name is the folder name made readable —
|
|
62
|
+
`acme-billing-portal` offers `Acme Billing Portal`. Nothing is validated as required: a prompt that
|
|
63
|
+
refuses an empty submission while already holding a sensible default is asking you to retype something
|
|
64
|
+
the installer knows.
|
|
65
|
+
|
|
66
|
+
A value only changes when you actually answer. A run that does not mention language keeps the language the
|
|
67
|
+
repo already chose, and says so.
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npx wdi-method@latest update # later, to take a newer method — @latest, or npx may reuse a cached one
|
|
71
|
+
npx wdi-method verify # check the method files are all present
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Upgrading from 0.5.x to 0.6** is two halves. `update` does the mechanical one — overwrites the kit,
|
|
75
|
+
renames files whose content needs no judgment, seeds what is new — and then prints an `upgrade` line
|
|
76
|
+
naming what is still in the old shape: a single `requirements.yaml`, a 14-section brief, a PRD carrying
|
|
77
|
+
its FR text. The second half is a decision about content, so it belongs to a skill:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npx wdi-method@latest update --yes # 1 — mechanical; read the `upgrade` line it prints
|
|
81
|
+
# 2 — in your agent, run the wdi-upgrade skill: it moves every sentence into its new home, word for
|
|
82
|
+
# word, invents nothing, reports what it could not place, and ends in one commit.
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Run the skill before any other skill. `wdi-help` and the validators read the new shape; a corpus half
|
|
86
|
+
in the old one answers them wrongly.
|
|
87
|
+
|
|
88
|
+
Non-interactive, for CI:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npx wdi-method install --yes --agents claude,codex --product "Your Product" \
|
|
92
|
+
--doc-language "Bahasa Indonesia"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Then invoke the **`wdi-help`** skill and ask what to do next. It reads where the project actually is and
|
|
96
|
+
answers with the gate you are at, not with a menu.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## How to use it — the walk
|
|
101
|
+
|
|
102
|
+
A gate is a moment where a human reads **one page** and decides. Between gates the AI works in a
|
|
103
|
+
pointer-heavy working set it does not need you to read. So the walk is: run a skill, read the page it
|
|
104
|
+
renders, decide — advance or refine.
|
|
105
|
+
|
|
106
|
+
| # | You run | You read | You decide |
|
|
107
|
+
|---|---|---|---|
|
|
108
|
+
| 0 | `wdi-init` intent `setup` | — | the global `mode`: how deep this product goes by default |
|
|
109
|
+
| 1 | `wdi-problem` | `.what-rendered/_product-brief/brief.md` | **G1** — is this the problem, whose is it, and does it earn the work? |
|
|
110
|
+
| 2 | `wdi-product` intent `prd` — `wdi-ux` first when the interface *is* the promise | `.what-rendered/_prd/<slug>/prd.md` | **G2** — is this what we build, and how does it feel? |
|
|
111
|
+
| 3 | `wdi-init` intent `component` | the rows it adds to `components.yaml` | each component's `mode` and `risk_accepted` |
|
|
112
|
+
| 4 | `wdi-blueprint` — `catalog`, then `platform` | `.how-rendered/blueprint.md` | **G3** — does the whole hold together? **Once per product** |
|
|
113
|
+
| 5 | `wdi-component` — one component | `.how-rendered/<pc>/SDD-<pc>.md` | **G4** — is this how we build it? **Skipped at `mode: catalog`** |
|
|
114
|
+
| 6 | `wdi-report` intent `estimate` | `.control/generated/estimate.md` | which candidate row becomes the next spec |
|
|
115
|
+
| 7 | `wdi-build` — for that row | nothing: tickets are machine contracts. You answer `to-tickets`' quiz on granularity and blocking edges | **G5** — is it done and proven? Once per spec |
|
|
116
|
+
| 8 | `wdi-report` intent `progress` | the report it writes | what has moved, what is late, what is proven |
|
|
117
|
+
|
|
118
|
+
**Refine, do not advance.** When a page does not convince you, run the same skill again and say what is
|
|
119
|
+
wrong — it updates the document it owns. Nothing downstream exists yet, so nothing breaks. Advancing past a
|
|
120
|
+
page you did not believe is how every later page inherits the doubt.
|
|
121
|
+
|
|
122
|
+
**After the first pass**, steps 0–4 never run again for that product. The next component enters at step 5
|
|
123
|
+
(or 6, at `catalog`); a new initiative enters at step 2; a small fix touching no `FR`, `UC`, `AD-N`, or
|
|
124
|
+
domain model skips every gate and runs `/implement` directly — and **stops to become a spec `S`** the
|
|
125
|
+
moment it touches an `FR`. `wdi-help` tells you which of these you are in; it reads the registry, not you.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Why the steps are in this order
|
|
130
|
+
|
|
131
|
+
- **One question per gate.** The brief answers *why*, the PRD *what*, the blueprint *the whole*, the SDD
|
|
132
|
+
*how one part*, the spec *is it done*. Every document that grew unreadable did so by answering a
|
|
133
|
+
neighbour's question too. A gate that asks one question can be passed in ten minutes.
|
|
134
|
+
- **The page you read is rendered; the page the AI edits points.** A goal lives once, in
|
|
135
|
+
`goals.yaml`; the working brief says `Goals — see goals.yaml`; the rendered brief shows the goals in
|
|
136
|
+
full. So the human gets a complete document and the corpus has no copies — and the validators check
|
|
137
|
+
**drift against the code**, never whether two copies agree, because there are none to compare.
|
|
138
|
+
- **Cost follows the unit of change.** G3 is once per product because the portrait is one thing. G4 is per
|
|
139
|
+
component because that is what changes when you build. G5 is per spec because that is what ships.
|
|
140
|
+
Repeating the blueprint per component was the single largest waste the earlier shape carried.
|
|
141
|
+
- **Two knobs that never merge.** `mode` decides which gates *exist* for a component (`catalog` skips G4
|
|
142
|
+
outright); `risk_accepted` decides how much *proof* a gate demands. Merged into one "rigor" dial, a
|
|
143
|
+
low-risk component either drowns in ceremony or a high-risk one escapes it.
|
|
144
|
+
- **Estimate before build.** Step 6 derives the candidate tasks from the promises already made —
|
|
145
|
+
`CAP` and `FR` — so nobody invents a backlog. One candidate row becomes one spec, three neighbours
|
|
146
|
+
may merge into one, and the estimate page says so about itself: it is forward-looking, never a record.
|
|
147
|
+
- **The engine cuts; the wrapper frames.** `to-spec` and `to-tickets` are the best ticket-cutting
|
|
148
|
+
engine we found: vertical tracer-bullet slices, blocking edges, a quiz with the owner. What a cutter
|
|
149
|
+
cannot know, `wdi-build` supplies: that every component the spec touches passed G4; that every ticket
|
|
150
|
+
names the `UC` it `satisfies`, so `FR → UC → ticket → test` stays one chain; that a spec restates
|
|
151
|
+
promises and never makes new ones; that code is judged by the test suite going red then green, from a
|
|
152
|
+
fresh context per step, never by a builder's report; and that a closed spec leaves the registry caught
|
|
153
|
+
up and the inventories re-derived from code.
|
|
154
|
+
- **Documents follow the code.** At spec close the inventories are regenerated from what was built and
|
|
155
|
+
the difference is *reported*, never patched into agreement. A record that contradicts the code is
|
|
156
|
+
corrected; code is never changed to match a record.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## The file tree, and why
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
.constitution/
|
|
164
|
+
method/ the method — overwritten by every update; never edit here
|
|
165
|
+
project/ your own rules and readers — kept by every update
|
|
166
|
+
.control/
|
|
167
|
+
registry/ SSOT for every ROW: goals.yaml · requirements-<slug>.yaml · components.yaml
|
|
168
|
+
usecases.yaml · specs.yaml · risks.yaml · defects.yaml · index.yaml
|
|
169
|
+
questions/ open questions, assumptions, external prerequisites — one row each
|
|
170
|
+
decisions/ DEC-N files; frozen once applied
|
|
171
|
+
generated/ machine tables: rtm · dag · status · estimate · timeline — regenerated, never edited
|
|
172
|
+
.what/ what is PROMISED — the AI's working set, pointer-heavy, few files
|
|
173
|
+
_product-brief/brief.md
|
|
174
|
+
_prd/<slug>/prd.md · addendum.md
|
|
175
|
+
<pc>/SRS-<pc>.md + 02-rules · 03-domain · 04-usecases · 05-scenarios
|
|
176
|
+
.how/ how it is BUILT — same discipline
|
|
177
|
+
_platform/ ARCHITECTURE-SPINE.md · c4-l2-containers.md · inventories
|
|
178
|
+
<pc>/SDD-<pc>.md + 01-ux · 02-contracts · 04-components · 05-model · 06-flows
|
|
179
|
+
.what-rendered/ the human's tree: brief · _prd/<slug>/prd.md · <pc>/SRS-<pc>.md — one complete page each
|
|
180
|
+
.how-rendered/ blueprint.md (root — it spans every component) · <pc>/SDD-<pc>.md
|
|
181
|
+
_bmad-output/ a skill run's working output; empties as its spec closes
|
|
182
|
+
.work/ scratch; empties when the task closes
|
|
183
|
+
<spec_folder>/issues/ one file per ticket — the tracker's payload, not yours to read
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Three layers, and the rule that keeps them honest:
|
|
187
|
+
|
|
188
|
+
| Layer | Holds | Who writes | Who reads |
|
|
189
|
+
|---|---|---|---|
|
|
190
|
+
| **Registry** | every row — a goal, a requirement, a component, a ticket index | the skill that owns the gate | validators, renderers, every other skill |
|
|
191
|
+
| **Working documents** (`.what/`, `.how/`) | the prose that reasons — why, boundaries, what makes it different — and **pointers** at the rows | the owning skill | the AI |
|
|
192
|
+
| **Rendered pages** (`*-rendered/`) | one complete page per gate, rows filled in from their homes | `validate.py --generate`, never a hand | the human, and the client |
|
|
193
|
+
|
|
194
|
+
Why split the human's tree from the AI's: a document that is both the AI's working surface and the
|
|
195
|
+
human's deliverable ends up serving neither — too long to point, too gappy to hand over. Why the
|
|
196
|
+
registry is per initiative (`requirements-<slug>.yaml`) but goals are per product: a capability is
|
|
197
|
+
declared by one feature in one PRD; a goal belongs to the product before any PRD exists. Why
|
|
198
|
+
`blueprint.md` sits at the root of `.how-rendered/` and not under `_platform/`: `_platform` means
|
|
199
|
+
"belongs to no component"; the blueprint spans all of them. Why rendered pages are never a skill's
|
|
200
|
+
input: a skill that read a projection would be reading a copy, and the copy would start to drift the
|
|
201
|
+
day someone edited it. A test in this package fails if any `SKILL.md` lists a `-rendered` path as an
|
|
202
|
+
Input.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Why WDI Method?
|
|
207
|
+
|
|
208
|
+
- **Depth separate from scrutiny.** `mode` sets how much gets written; `risk_accepted` sets how hard it
|
|
209
|
+
gets reviewed. Neither is derived from the other, so a component MAY be thin on purpose and reviewed the
|
|
210
|
+
hardest.
|
|
211
|
+
- **Ground truth over plan.** Once code exists, the tables, endpoints, and screens are **derived from it**
|
|
212
|
+
— the gap between plan and reality is a finding to resolve, not an argument to have.
|
|
213
|
+
- **Containers that match what actually ships.** C4's containers follow deployability, not folders, and a
|
|
214
|
+
component view is drawn for every container that carries more than one Product Component.
|
|
215
|
+
- **A gate that can be skipped honestly.** `mode: catalog` skips the component gate entirely — a fast
|
|
216
|
+
default is fast because the work is genuinely gone, not nominally trimmed.
|
|
217
|
+
- **Decisions that don't rot.** A `DEC-` is recorded only when the reason would not survive reading the
|
|
218
|
+
code, and it freezes the moment it is applied — a change of mind writes a new one rather than editing
|
|
219
|
+
the old.
|
|
220
|
+
- **Wraps BMad, never forks it.** Every `wdi-*` skill is a wrapper around a BMad skill. Upgrading BMad
|
|
221
|
+
does not strand you, and no BMad skill is meant to be invoked directly.
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## The gap this fills
|
|
226
|
+
|
|
227
|
+
A gate is only as good as the artifact it reads. Between *"the architecture is decided"* and *"the code
|
|
228
|
+
is written"* there is a set of questions that decide whether a build goes straight or crooked, and they
|
|
229
|
+
are all **list-shaped**:
|
|
230
|
+
|
|
231
|
+
- Which use cases exist, and which of them touch money, personal data, or something irreversible?
|
|
232
|
+
- Which tables exist, and which component is allowed to **write** each one?
|
|
233
|
+
- Which endpoints exist, on which host, and which promise does each serve?
|
|
234
|
+
- Which screens exist, in which application?
|
|
235
|
+
- When a boundary fails halfway — the other side slow, absent, or lying — what does the user see?
|
|
236
|
+
|
|
237
|
+
Those questions have answers inside an architecture document and a build spec. What they usually do not
|
|
238
|
+
have is a **place where a person can read all of one kind at once** and notice the row that is missing,
|
|
239
|
+
the table with two owners, or the endpoint nobody promised.
|
|
240
|
+
|
|
241
|
+
WDI Method's whole contribution is that place, plus the discipline that keeps it honest:
|
|
242
|
+
|
|
243
|
+
| | |
|
|
244
|
+
|---|---|
|
|
245
|
+
| **Inventories** | Tables, endpoints, and screens as three flat lists — **derived from the code**, not hand-written, so the difference between plan and reality is a finding rather than an argument |
|
|
246
|
+
| **Use case catalogue** | One line per use case with its actor, the requirement it satisfies, and whether it is `critical` |
|
|
247
|
+
| **SRS / SDD** | What a component promises, and how it is built — one pair per component, in human language |
|
|
248
|
+
| **C4** | Context, containers, and one component view per container that carries more than one domain slice |
|
|
249
|
+
| **Robustness** | For the deepest mode: boundary, control, and entity objects per critical use case, before code |
|
|
250
|
+
| **Invariants** | A spine of `AD-N` rules that constrain every component, separate from the decisions that produced them |
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Two knobs, never merged
|
|
255
|
+
|
|
256
|
+
The reason a method like this usually fails is that it asks for the same depth everywhere, so people
|
|
257
|
+
either drown in it or abandon it. WDI splits depth from scrutiny into **two independent fields**:
|
|
258
|
+
|
|
259
|
+
| Field | Controls | Values |
|
|
260
|
+
|---|---|---|
|
|
261
|
+
| `mode` | **Document depth**, and nothing else | `catalog` · `outline` · `guarded` · `deep` |
|
|
262
|
+
| `risk_accepted` | **Review intensity**, and nothing else | `low` · `medium` · `high` |
|
|
263
|
+
|
|
264
|
+
| `mode` | What is written per component | G4 |
|
|
265
|
+
|---|---|---|
|
|
266
|
+
| `catalog` | Nothing. Code is written from the use case catalogue, the three inventories, and C4 | **skipped** |
|
|
267
|
+
| `outline` | + a decision summary and the component list in the SDD, full flows for at most 3 use cases, local rules | 20 min |
|
|
268
|
+
| `guarded` | + **failure behaviour for every boundary**, inherited invariants quoted verbatim, integration documents | 20 min |
|
|
269
|
+
| `deep` | + robustness analysis, a contract per endpoint, data dictionary, flow diagrams, state machines | 30 min |
|
|
270
|
+
|
|
271
|
+
Neither field is derived from the other, and that is the point: **a component MAY be thin on purpose and
|
|
272
|
+
reviewed the hardest.** A component at `catalog` skips the component gate entirely — which is what makes
|
|
273
|
+
a shallow default genuinely fast rather than nominally fast.
|
|
274
|
+
|
|
275
|
+
Depth is a preference and needs no defence. Accepting risk on something that touches money, personal
|
|
276
|
+
data, or an irreversible action is **not** free: it requires a recorded decision, and a validator checks
|
|
277
|
+
that the decision exists.
|
|
278
|
+
|
|
279
|
+
All twelve combinations are legal. The installed kit carries
|
|
280
|
+
`.constitution/method/why/mode-risk-map.md`, which puts them side by side — what each cell costs at G4,
|
|
281
|
+
which review lenses run, and which review traces a validator will demand.
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
## Five gates, seventeen skills
|
|
286
|
+
|
|
287
|
+
| Gate | Decides | Skill |
|
|
288
|
+
|---|---|---|
|
|
289
|
+
| **G1 Problem** | What the problem is, whose it is, why it earns work | `wdi-problem` |
|
|
290
|
+
| **G2 Product** | What is built, and how it feels to use | `wdi-product` · optional `wdi-ux` |
|
|
291
|
+
| **G3 Blueprint** | The whole portrait, once per product | `wdi-blueprint` |
|
|
292
|
+
| **G4 Component** | How one component is built — **skipped at `catalog`** | `wdi-component` |
|
|
293
|
+
| **G5 Release** | Whether it is done and proven | `wdi-build` |
|
|
294
|
+
|
|
295
|
+
Around them: `wdi-init` (scaffold, component birth, depth and risk settings, structure maps),
|
|
296
|
+
`wdi-decision`, `wdi-question`, `wdi-log`, `wdi-help`, `wdi-explain-to-me`, `wdi-reconcile`, `wdi-review`, `wdi-report`,
|
|
297
|
+
`wdi-systematic-debugging`, and `wdi-upgrade` (moves a corpus written under an older kit into the current
|
|
298
|
+
shape — content moves, nothing is invented).
|
|
299
|
+
|
|
300
|
+
**No BMad skill is invoked directly.** Each has a wrapper, and the wrapper is what checks position,
|
|
301
|
+
verifies the result, and records what happened.
|
|
302
|
+
|
|
303
|
+
### Decisions, not ADRs
|
|
304
|
+
|
|
305
|
+
A decision is a `DEC-`, and **recording one is not mandatory.** The test is one sentence: *if somebody
|
|
306
|
+
asks in three months why it is like this, is the answer readable from the code?* If yes, it MUST NOT be
|
|
307
|
+
recorded — a register nobody trusts is worse than no register. One case is mandatory: contradicting an
|
|
308
|
+
invariant on the spine.
|
|
309
|
+
|
|
310
|
+
A `DEC-` freezes when it is applied. A change of mind produces a new one; it never edits the old.
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## The mechanical half
|
|
315
|
+
|
|
316
|
+
`validate.py` runs twenty-six named validators — `goal-has-fr`, `cites-resolve`, `no-cycles`,
|
|
317
|
+
`id-allocated-once`, and the rest, each named for the thing it checks — over the registries and the
|
|
318
|
+
corpus, and `inventory.py` derives the three inventories from code and reports the difference against the
|
|
319
|
+
plan without patching either side. There is no validator that compares two copies of one fact, because
|
|
320
|
+
the corpus keeps no copies.
|
|
321
|
+
|
|
322
|
+
The validators exist because prose that nothing checks is prose that gets contradicted by the first
|
|
323
|
+
person in a hurry. Every one of them also states **the state in which it does not apply** — a rule that
|
|
324
|
+
demands a trace before the trace can exist is a rule that gets switched off, and a validator nobody
|
|
325
|
+
reads guards nothing.
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
## What is generic, and where your own rules live
|
|
330
|
+
|
|
331
|
+
`.constitution/` holds **exactly two folders**, and the folder is the whole answer to who owns a file:
|
|
332
|
+
|
|
333
|
+
| Folder | Owner | `update` | `promote` |
|
|
334
|
+
|---|---|---|---|
|
|
335
|
+
| `.constitution/method/` | the method | **overwritten** in full | carries it into the package |
|
|
336
|
+
| **`.constitution/project/`** | you | **never touched** — seeded once when absent | never carries it, so your rules cannot be published |
|
|
337
|
+
|
|
338
|
+
Everything in the room is yours: `project/constitution.md` (Articles 1, 2, 5 — scope, repo checklist,
|
|
339
|
+
method ownership), `project/codebase-*-guide.md` (stack, conventions, brownfield, protected at **any**
|
|
340
|
+
`status:` — `Draft` is when they actually get written), and any rule file you add.
|
|
341
|
+
|
|
342
|
+
**The seam is a folder, never a marked region inside a generic file.** Prose has no merge algebra: you
|
|
343
|
+
cannot "merge" your paragraph with the method's, so only a path can say unambiguously whose a file is.
|
|
344
|
+
`AGENTS.md` is the one exception, and only because it is a single file with nowhere else to go.
|
|
345
|
+
|
|
346
|
+
Two more things are yours, outside `.constitution/`:
|
|
347
|
+
|
|
348
|
+
| Yours | Because |
|
|
349
|
+
|---|---|
|
|
350
|
+
| `.control/registry/index.yaml` → `product:` | The product and client name live in exactly one place |
|
|
351
|
+
| `_bmad/custom/*.user.toml` | Your BMad overrides — TOML, so these genuinely merge: a string replaces, a list appends, a table merges per key |
|
|
352
|
+
|
|
353
|
+
`.control/` `.what/` `.how/` are never touched by an update at all — they are your state, your promises,
|
|
354
|
+
and your design.
|
|
355
|
+
|
|
356
|
+
The custom room takes whole files, not marked blocks inside generic ones: `AGENTS.md` can use a marked
|
|
357
|
+
block because it is *one* file, while `.constitution/` has fifty-odd, and blocks inside them would make
|
|
358
|
+
an update perform surgery in every file. A file there declares `scope: project` and a one-line
|
|
359
|
+
`purpose:`; to **contradict** a generic rule it must name that rule and carry the decision that allowed
|
|
360
|
+
it. **An empty room is a valid state** — filling it so that it gets used is the failure the rule prevents.
|
|
361
|
+
|
|
362
|
+
### Language
|
|
363
|
+
|
|
364
|
+
Two settings, both free text, both defaulting to English:
|
|
365
|
+
|
|
366
|
+
```yaml
|
|
367
|
+
policy:
|
|
368
|
+
doc_language: "English" # prose of working documents
|
|
369
|
+
doc_filename_language: "English" # the slug part of a document filename
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
Write whatever names the language — `English`, `Bahasa Indonesia`, `id`. What reads the value is a model,
|
|
373
|
+
and a model does not need a lookup table.
|
|
374
|
+
|
|
375
|
+
Always English, and never asked: method terminology, document code prefixes (`UC-`, `DEC-`), machine
|
|
376
|
+
markers (`[NEEDS CONFIRMATION]`, `[MISSING]`), and code identifiers. `.constitution/` itself is always
|
|
377
|
+
English, whatever the settings say — it travels to every repo through this package.
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
## What update does
|
|
382
|
+
|
|
383
|
+
| | |
|
|
384
|
+
|---|---|
|
|
385
|
+
| Overwrites | everything in `.constitution/method/` · the seventeen wrappers · `_bmad/custom/*.toml` · the marked block in `AGENTS.md` |
|
|
386
|
+
| Renames | a file whose content needs no judgment to move — `waves.yaml` → `specs.yaml`, the pre-0.5 registry names. Content is never rewritten |
|
|
387
|
+
| Removes | Wrappers the method has retired — a `wdi-*` folder with a `SKILL.md` that is no longer one of the seventeen. Each removal is printed |
|
|
388
|
+
| Reports | what is still in the OLD shape, as an `upgrade` line — and names `wdi-upgrade` as the next step. The installer does not move content; that is a decision, and the skill's |
|
|
389
|
+
| Keeps | All of `.constitution/project/`, plus your initiative slug and your language choice. A setting somebody already chose is not the installer's to change behind their back |
|
|
390
|
+
| Never resurrects | A folder you retired. On update, absence is treated as a decision |
|
|
391
|
+
|
|
392
|
+
It prints the version it replaced, what it wrote, what it kept, and what to do next.
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
## Changing the method
|
|
397
|
+
|
|
398
|
+
**This repository is where a method change is authored** — a guide, a template, a skill wrapper, a
|
|
399
|
+
validator. It is proven here before publishing, against a fixture corpus the three registry scripts
|
|
400
|
+
actually run against:
|
|
401
|
+
|
|
402
|
+
```bash
|
|
403
|
+
npm test # includes validate.py, timeline.py and inventory.py over tests/fixture/
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
The fixture is small but complete, and kept **green**, so a new finding is a regression rather than
|
|
407
|
+
noise. One test plants a defect in a copy and requires the matching validator to name it — a green
|
|
408
|
+
baseline is worthless if it is green because every check is broken.
|
|
409
|
+
|
|
410
|
+
A consuming repo then takes the change with `npx wdi-method update`, and that is where the judgement
|
|
411
|
+
half gets tested: whether a guide actually helps a person at G3 is only provable in use.
|
|
412
|
+
|
|
413
|
+
`promote` — pulling the method back out of a consumer — is a **rescue tool**, not the workflow. It
|
|
414
|
+
overwrites the whole kit from one copy, so it refuses to run without `--rescue`.
|
|
415
|
+
[`CONTRIBUTING.md`](CONTRIBUTING.md) records why the direction was reversed and what it cost.
|
|
416
|
+
|
|
417
|
+
**Patch releases are routine; minor and major are the maintainer's call.** This package overwrites files
|
|
418
|
+
in repos that already hold months of work, and the version is the only signal a reader has for how
|
|
419
|
+
carefully to read the diff. [`CONTRIBUTING.md`](CONTRIBUTING.md) has the detail, and
|
|
420
|
+
[`AGENTS.md`](AGENTS.md) states it for agents working on the package.
|
|
421
|
+
|
|
422
|
+
---
|
|
423
|
+
|
|
424
|
+
## Support and Contributing
|
|
425
|
+
|
|
426
|
+
Open an [issue](https://github.com/wiradigitalid/wdi-method/issues) for a bug or a proposal. Read
|
|
427
|
+
[`CONTRIBUTING.md`](CONTRIBUTING.md) before sending a pull request — it explains where a change belongs,
|
|
428
|
+
how versioning works here, and what to check before publishing.
|
|
429
|
+
|
|
430
|
+
## License
|
|
431
|
+
|
|
432
|
+
MIT — see [LICENSE](LICENSE). Requires Node 20+ and [uv](https://docs.astral.sh/uv/) for the Python
|
|
433
|
+
scripts.
|
|
434
|
+
|
|
435
|
+
[](https://www.npmjs.com/package/wdi-method)
|
|
436
|
+
[](LICENSE)
|