wdi-method 0.4.6 → 0.5.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.
- package/README.md +264 -252
- package/bin/wdi-method.js +1121 -1030
- package/kit/.constitution/method/README.md +66 -169
- package/kit/.constitution/{constitution.md → method/constitution.md} +10 -56
- package/kit/.constitution/{document → method/document}/architecture-guide.md +1 -1
- package/kit/.constitution/{document → method/document}/corpus-guide.md +2 -2
- package/kit/.constitution/{document → method/document}/delivery-flow-guide.md +338 -338
- package/kit/.constitution/{document → method/document}/sdd-guide.md +1 -1
- package/kit/.constitution/{document → method/document}/templates/cross-cutting.md +1 -1
- package/kit/.constitution/{document → method/document}/templates/design-system.md +67 -67
- package/kit/.constitution/{document → method/document}/templates/inventory.md +69 -69
- package/kit/.constitution/{document → method/document}/templates/sdd.md +1 -1
- package/kit/.constitution/{document → method/document}/templates/structure-codebase.md +129 -129
- package/kit/.constitution/{document → method/document}/templates/structure-document.md +90 -90
- package/kit/.constitution/{language-guide.md → method/language-guide.md} +2 -2
- package/kit/.constitution/{repo-guide.md → method/repo-guide.md} +16 -3
- package/kit/.constitution/{scripts → method/scripts}/timeline.py +2 -2
- package/kit/.constitution/{scripts → method/scripts}/validate.py +1599 -1581
- package/kit/.constitution/{structure-guide.md → method/structure-guide.md} +3 -3
- package/kit/.constitution/method/why/README.md +169 -0
- package/kit/.constitution/method/{artifact-map.md → why/artifact-map.md} +5 -5
- package/kit/.constitution/method/{rationale.md → why/rationale.md} +5 -5
- package/kit/.constitution/project/constitution.md +63 -0
- package/kit/assets/bmad-custom/bmad-advanced-elicitation.toml +15 -15
- package/kit/assets/bmad-custom/bmad-architecture.toml +33 -33
- package/kit/assets/bmad-custom/bmad-code-review.toml +13 -13
- package/kit/assets/bmad-custom/bmad-correct-course.toml +28 -28
- package/kit/assets/bmad-custom/bmad-prd.toml +42 -42
- package/kit/assets/bmad-custom/bmad-product-brief.toml +34 -34
- package/kit/assets/bmad-custom/bmad-retrospective.toml +9 -9
- package/kit/assets/bmad-custom/bmad-spec.toml +16 -16
- package/kit/assets/bmad-custom/bmad-ux.toml +19 -19
- package/kit/skills/wdi-blueprint/SKILL.md +3 -3
- package/kit/skills/wdi-build/SKILL.md +244 -244
- package/kit/skills/wdi-component/SKILL.md +1 -1
- package/kit/skills/wdi-help/SKILL.md +98 -98
- package/kit/skills/wdi-init/SKILL.md +1 -1
- package/kit/skills/wdi-problem/SKILL.md +90 -90
- package/kit/skills/wdi-product/SKILL.md +127 -127
- package/kit/skills/wdi-reconcile/SKILL.md +2 -2
- package/kit/skills/wdi-report/SKILL.md +205 -205
- package/kit/skills/wdi-systematic-debugging/SKILL.md +193 -193
- package/kit/skills/wdi-ux/SKILL.md +145 -145
- package/kit-overlay/AGENTS.md +20 -20
- package/kit-overlay/README.md +24 -17
- package/kit-overlay/constitution.md +10 -56
- package/kit-overlay/portability.md +6 -6
- package/kit-overlay/repo-guide.md +112 -97
- package/package.json +37 -37
- package/kit/.constitution/README.md +0 -66
- /package/kit/.constitution/{document → method/document}/bmad-guide.md +0 -0
- /package/kit/.constitution/{document → method/document}/bmad-skill-register.md +0 -0
- /package/kit/.constitution/{document → method/document}/brief-guide.md +0 -0
- /package/kit/.constitution/{document → method/document}/decision-guide.md +0 -0
- /package/kit/.constitution/{document → method/document}/prd-guide.md +0 -0
- /package/kit/.constitution/{document → method/document}/srs-guide.md +0 -0
- /package/kit/.constitution/{document → method/document}/templates/addendum.md +0 -0
- /package/kit/.constitution/{document → method/document}/templates/architecture-spine.md +0 -0
- /package/kit/.constitution/{document → method/document}/templates/brief.md +0 -0
- /package/kit/.constitution/{document → method/document}/templates/c4.md +0 -0
- /package/kit/.constitution/{document → method/document}/templates/contract.md +0 -0
- /package/kit/.constitution/{document → method/document}/templates/decision.md +0 -0
- /package/kit/.constitution/{document → method/document}/templates/flow.md +0 -0
- /package/kit/.constitution/{document → method/document}/templates/integration.md +0 -0
- /package/kit/.constitution/{document → method/document}/templates/lc.md +0 -0
- /package/kit/.constitution/{document → method/document}/templates/lifecycle.md +0 -0
- /package/kit/.constitution/{document → method/document}/templates/meeting.md +0 -0
- /package/kit/.constitution/{document → method/document}/templates/model.md +0 -0
- /package/kit/.constitution/{document → method/document}/templates/oq.md +0 -0
- /package/kit/.constitution/{document → method/document}/templates/prd.md +0 -0
- /package/kit/.constitution/{document → method/document}/templates/questions.md +0 -0
- /package/kit/.constitution/{document → method/document}/templates/rtr.md +0 -0
- /package/kit/.constitution/{document → method/document}/templates/rules.md +0 -0
- /package/kit/.constitution/{document → method/document}/templates/scn.md +0 -0
- /package/kit/.constitution/{document → method/document}/templates/srs.md +0 -0
- /package/kit/.constitution/{document → method/document}/templates/uc.md +0 -0
- /package/kit/.constitution/{document → method/document}/templates/ux.md +0 -0
- /package/kit/.constitution/{document → method/document}/ux-guide.md +0 -0
- /package/kit/.constitution/{method-glossary.md → method/method-glossary.md} +0 -0
- /package/kit/.constitution/{scripts → method/scripts}/inventory.py +0 -0
- /package/kit/.constitution/method/{portability.md → why/portability.md} +0 -0
- /package/kit/.constitution/{codebase/brownfield-guide.md → project/codebase-brownfield-guide.md} +0 -0
- /package/kit/.constitution/{codebase/conventions-guide.md → project/codebase-conventions-guide.md} +0 -0
- /package/kit/.constitution/{codebase/stack-guide.md → project/codebase-stack-guide.md} +0 -0
package/README.md
CHANGED
|
@@ -1,252 +1,264 @@
|
|
|
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
|
-
## Install
|
|
13
|
-
|
|
14
|
-
BMad first, then this. The wrappers call BMad skills; without BMad they cannot run.
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
cd /path/to/your/product-repo
|
|
18
|
-
npx bmad-method install
|
|
19
|
-
npx wdi-method
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
The second command opens a TUI: it checks BMad, detects install versus update, asks the product name and
|
|
23
|
-
the document language, lets you pick agents, shows what it will write, and prints what to do next.
|
|
24
|
-
|
|
25
|
-
**Every field arrives with an answer already in it, and Enter accepts it.** On an update that answer is
|
|
26
|
-
what the repo already says; on a first install the product name is the folder name made readable —
|
|
27
|
-
`acme-billing-portal` offers `Acme Billing Portal`. Nothing is validated as required: a prompt that
|
|
28
|
-
refuses an empty submission while already holding a sensible default is asking you to retype something
|
|
29
|
-
the installer knows.
|
|
30
|
-
|
|
31
|
-
A value only changes when you actually answer. A run that does not mention language keeps the language the
|
|
32
|
-
repo already chose, and says so.
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
npx wdi-method update # later, to take a newer method
|
|
36
|
-
npx wdi-method verify # check the method files are all present
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Non-interactive, for CI:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
npx wdi-method install --yes --agents claude,codex --product "Your Product" \
|
|
43
|
-
--doc-language "Bahasa Indonesia"
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Then invoke the **`wdi-help`** skill and ask what to do next. It reads where the project actually is and
|
|
47
|
-
answers with the gate you are at, not with a menu.
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## Why WDI Method?
|
|
52
|
-
|
|
53
|
-
- **Depth separate from scrutiny.** `mode` sets how much gets written; `risk_accepted` sets how hard it
|
|
54
|
-
gets reviewed. Neither is derived from the other, so a component MAY be thin on purpose and reviewed the
|
|
55
|
-
hardest.
|
|
56
|
-
- **Ground truth over plan.** Once code exists, the tables, endpoints, and screens are **derived from it**
|
|
57
|
-
— the gap between plan and reality is a finding to resolve, not an argument to have.
|
|
58
|
-
- **Containers that match what actually ships.** C4's containers follow deployability, not folders, and a
|
|
59
|
-
component view is drawn for every container that carries more than one Product Component.
|
|
60
|
-
- **A gate that can be skipped honestly.** `mode: catalog` skips the component gate entirely — a fast
|
|
61
|
-
default is fast because the work is genuinely gone, not nominally trimmed.
|
|
62
|
-
- **Decisions that don't rot.** A `DEC-` is recorded only when the reason would not survive reading the
|
|
63
|
-
code, and it freezes the moment it is applied — a change of mind writes a new one rather than editing
|
|
64
|
-
the old.
|
|
65
|
-
- **Wraps BMad, never forks it.** Every `wdi-*` skill is a wrapper around a BMad skill. Upgrading BMad
|
|
66
|
-
does not strand you, and no BMad skill is meant to be invoked directly.
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
## The gap this fills
|
|
71
|
-
|
|
72
|
-
A gate is only as good as the artifact it reads. Between *"the architecture is decided"* and *"the code
|
|
73
|
-
is written"* there is a set of questions that decide whether a build goes straight or crooked, and they
|
|
74
|
-
are all **list-shaped**:
|
|
75
|
-
|
|
76
|
-
- Which use cases exist, and which of them touch money, personal data, or something irreversible?
|
|
77
|
-
- Which tables exist, and which component is allowed to **write** each one?
|
|
78
|
-
- Which endpoints exist, on which host, and which promise does each serve?
|
|
79
|
-
- Which screens exist, in which application?
|
|
80
|
-
- When a boundary fails halfway — the other side slow, absent, or lying — what does the user see?
|
|
81
|
-
|
|
82
|
-
Those questions have answers inside an architecture document and a build spec. What they usually do not
|
|
83
|
-
have is a **place where a person can read all of one kind at once** and notice the row that is missing,
|
|
84
|
-
the table with two owners, or the endpoint nobody promised.
|
|
85
|
-
|
|
86
|
-
WDI Method's whole contribution is that place, plus the discipline that keeps it honest:
|
|
87
|
-
|
|
88
|
-
| | |
|
|
89
|
-
|---|---|
|
|
90
|
-
| **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 |
|
|
91
|
-
| **Use case catalogue** | One line per use case with its actor, the requirement it satisfies, and whether it is `critical` |
|
|
92
|
-
| **SRS / SDD** | What a component promises, and how it is built — one pair per component, in human language |
|
|
93
|
-
| **C4** | Context, containers, and one component view per container that carries more than one domain slice |
|
|
94
|
-
| **Robustness** | For the deepest mode: boundary, control, and entity objects per critical use case, before code |
|
|
95
|
-
| **Invariants** | A spine of `AD-N` rules that constrain every component, separate from the decisions that produced them |
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
## Two knobs, never merged
|
|
100
|
-
|
|
101
|
-
The reason a method like this usually fails is that it asks for the same depth everywhere, so people
|
|
102
|
-
either drown in it or abandon it. WDI splits depth from scrutiny into **two independent fields**:
|
|
103
|
-
|
|
104
|
-
| Field | Controls | Values |
|
|
105
|
-
|---|---|---|
|
|
106
|
-
| `mode` | **Document depth**, and nothing else | `catalog` · `outline` · `guarded` · `deep` |
|
|
107
|
-
| `risk_accepted` | **Review intensity**, and nothing else | `low` · `medium` · `high` |
|
|
108
|
-
|
|
109
|
-
| `mode` | What is written per component | G4 |
|
|
110
|
-
|---|---|---|
|
|
111
|
-
| `catalog` | Nothing. Code is written from the use case catalogue, the three inventories, and C4 | **skipped** |
|
|
112
|
-
| `outline` | + a decision summary and the component list in the SDD, full flows for at most 3 use cases, local rules | 20 min |
|
|
113
|
-
| `guarded` | + **failure behaviour for every boundary**, inherited invariants quoted verbatim, integration documents | 20 min |
|
|
114
|
-
| `deep` | + robustness analysis, a contract per endpoint, data dictionary, flow diagrams, state machines | 30 min |
|
|
115
|
-
|
|
116
|
-
Neither field is derived from the other, and that is the point: **a component MAY be thin on purpose and
|
|
117
|
-
reviewed the hardest.** A component at `catalog` skips the component gate entirely — which is what makes
|
|
118
|
-
a shallow default genuinely fast rather than nominally fast.
|
|
119
|
-
|
|
120
|
-
Depth is a preference and needs no defence. Accepting risk on something that touches money, personal
|
|
121
|
-
data, or an irreversible action is **not** free: it requires a recorded decision, and a validator checks
|
|
122
|
-
that the decision exists.
|
|
123
|
-
|
|
124
|
-
---
|
|
125
|
-
|
|
126
|
-
## Five gates, fifteen skills
|
|
127
|
-
|
|
128
|
-
| Gate | Decides | Skill |
|
|
129
|
-
|---|---|---|
|
|
130
|
-
| **G1 Problem** | What the problem is, whose it is, why it earns work | `wdi-problem` |
|
|
131
|
-
| **G2 Product** | What is built, and how it feels to use | `wdi-product` · optional `wdi-ux` |
|
|
132
|
-
| **G3 Blueprint** | The whole portrait, once per product | `wdi-blueprint` |
|
|
133
|
-
| **G4 Component** | How one component is built — **skipped at `catalog`** | `wdi-component` |
|
|
134
|
-
| **G5 Release** | Whether it is done and proven | `wdi-build` |
|
|
135
|
-
|
|
136
|
-
Around them: `wdi-init` (scaffold, component birth, depth and risk settings, structure maps),
|
|
137
|
-
`wdi-decision`, `wdi-question`, `wdi-log`, `wdi-help`, `wdi-reconcile`, `wdi-review`, `wdi-report`, and
|
|
138
|
-
`wdi-systematic-debugging`.
|
|
139
|
-
|
|
140
|
-
**No BMad skill is invoked directly.** Each has a wrapper, and the wrapper is what checks position,
|
|
141
|
-
verifies the result, and records what happened.
|
|
142
|
-
|
|
143
|
-
### Decisions, not ADRs
|
|
144
|
-
|
|
145
|
-
A decision is a `DEC-`, and **recording one is not mandatory.** The test is one sentence: *if somebody
|
|
146
|
-
asks in three months why it is like this, is the answer readable from the code?* If yes, it MUST NOT be
|
|
147
|
-
recorded — a register nobody trusts is worse than no register. One case is mandatory: contradicting an
|
|
148
|
-
invariant on the spine.
|
|
149
|
-
|
|
150
|
-
A `DEC-` freezes when it is applied. A change of mind produces a new one; it never edits the old.
|
|
151
|
-
|
|
152
|
-
---
|
|
153
|
-
|
|
154
|
-
## The mechanical half
|
|
155
|
-
|
|
156
|
-
`validate.py` runs **V1–V27** over the registries and the corpus, and `inventory.py` derives the three
|
|
157
|
-
inventories from code and reports the difference against the plan without patching either side.
|
|
158
|
-
|
|
159
|
-
The validators exist because prose that nothing checks is prose that gets contradicted by the first
|
|
160
|
-
person in a hurry. Every one of them also states **the state in which it does not apply** — a rule that
|
|
161
|
-
demands a trace before the trace can exist is a rule that gets switched off, and a validator nobody
|
|
162
|
-
reads guards nothing.
|
|
163
|
-
|
|
164
|
-
---
|
|
165
|
-
|
|
166
|
-
## What is generic, and where your own rules live
|
|
167
|
-
|
|
168
|
-
`.constitution/`
|
|
169
|
-
|
|
170
|
-
|
|
|
171
|
-
|
|
172
|
-
| `.
|
|
173
|
-
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
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
|
-
|
|
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
|
+
## Install
|
|
13
|
+
|
|
14
|
+
BMad first, then this. The wrappers call BMad skills; without BMad they cannot run.
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
cd /path/to/your/product-repo
|
|
18
|
+
npx bmad-method install
|
|
19
|
+
npx wdi-method
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The second command opens a TUI: it checks BMad, detects install versus update, asks the product name and
|
|
23
|
+
the document language, lets you pick agents, shows what it will write, and prints what to do next.
|
|
24
|
+
|
|
25
|
+
**Every field arrives with an answer already in it, and Enter accepts it.** On an update that answer is
|
|
26
|
+
what the repo already says; on a first install the product name is the folder name made readable —
|
|
27
|
+
`acme-billing-portal` offers `Acme Billing Portal`. Nothing is validated as required: a prompt that
|
|
28
|
+
refuses an empty submission while already holding a sensible default is asking you to retype something
|
|
29
|
+
the installer knows.
|
|
30
|
+
|
|
31
|
+
A value only changes when you actually answer. A run that does not mention language keeps the language the
|
|
32
|
+
repo already chose, and says so.
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx wdi-method update # later, to take a newer method
|
|
36
|
+
npx wdi-method verify # check the method files are all present
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Non-interactive, for CI:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npx wdi-method install --yes --agents claude,codex --product "Your Product" \
|
|
43
|
+
--doc-language "Bahasa Indonesia"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Then invoke the **`wdi-help`** skill and ask what to do next. It reads where the project actually is and
|
|
47
|
+
answers with the gate you are at, not with a menu.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Why WDI Method?
|
|
52
|
+
|
|
53
|
+
- **Depth separate from scrutiny.** `mode` sets how much gets written; `risk_accepted` sets how hard it
|
|
54
|
+
gets reviewed. Neither is derived from the other, so a component MAY be thin on purpose and reviewed the
|
|
55
|
+
hardest.
|
|
56
|
+
- **Ground truth over plan.** Once code exists, the tables, endpoints, and screens are **derived from it**
|
|
57
|
+
— the gap between plan and reality is a finding to resolve, not an argument to have.
|
|
58
|
+
- **Containers that match what actually ships.** C4's containers follow deployability, not folders, and a
|
|
59
|
+
component view is drawn for every container that carries more than one Product Component.
|
|
60
|
+
- **A gate that can be skipped honestly.** `mode: catalog` skips the component gate entirely — a fast
|
|
61
|
+
default is fast because the work is genuinely gone, not nominally trimmed.
|
|
62
|
+
- **Decisions that don't rot.** A `DEC-` is recorded only when the reason would not survive reading the
|
|
63
|
+
code, and it freezes the moment it is applied — a change of mind writes a new one rather than editing
|
|
64
|
+
the old.
|
|
65
|
+
- **Wraps BMad, never forks it.** Every `wdi-*` skill is a wrapper around a BMad skill. Upgrading BMad
|
|
66
|
+
does not strand you, and no BMad skill is meant to be invoked directly.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## The gap this fills
|
|
71
|
+
|
|
72
|
+
A gate is only as good as the artifact it reads. Between *"the architecture is decided"* and *"the code
|
|
73
|
+
is written"* there is a set of questions that decide whether a build goes straight or crooked, and they
|
|
74
|
+
are all **list-shaped**:
|
|
75
|
+
|
|
76
|
+
- Which use cases exist, and which of them touch money, personal data, or something irreversible?
|
|
77
|
+
- Which tables exist, and which component is allowed to **write** each one?
|
|
78
|
+
- Which endpoints exist, on which host, and which promise does each serve?
|
|
79
|
+
- Which screens exist, in which application?
|
|
80
|
+
- When a boundary fails halfway — the other side slow, absent, or lying — what does the user see?
|
|
81
|
+
|
|
82
|
+
Those questions have answers inside an architecture document and a build spec. What they usually do not
|
|
83
|
+
have is a **place where a person can read all of one kind at once** and notice the row that is missing,
|
|
84
|
+
the table with two owners, or the endpoint nobody promised.
|
|
85
|
+
|
|
86
|
+
WDI Method's whole contribution is that place, plus the discipline that keeps it honest:
|
|
87
|
+
|
|
88
|
+
| | |
|
|
89
|
+
|---|---|
|
|
90
|
+
| **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 |
|
|
91
|
+
| **Use case catalogue** | One line per use case with its actor, the requirement it satisfies, and whether it is `critical` |
|
|
92
|
+
| **SRS / SDD** | What a component promises, and how it is built — one pair per component, in human language |
|
|
93
|
+
| **C4** | Context, containers, and one component view per container that carries more than one domain slice |
|
|
94
|
+
| **Robustness** | For the deepest mode: boundary, control, and entity objects per critical use case, before code |
|
|
95
|
+
| **Invariants** | A spine of `AD-N` rules that constrain every component, separate from the decisions that produced them |
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Two knobs, never merged
|
|
100
|
+
|
|
101
|
+
The reason a method like this usually fails is that it asks for the same depth everywhere, so people
|
|
102
|
+
either drown in it or abandon it. WDI splits depth from scrutiny into **two independent fields**:
|
|
103
|
+
|
|
104
|
+
| Field | Controls | Values |
|
|
105
|
+
|---|---|---|
|
|
106
|
+
| `mode` | **Document depth**, and nothing else | `catalog` · `outline` · `guarded` · `deep` |
|
|
107
|
+
| `risk_accepted` | **Review intensity**, and nothing else | `low` · `medium` · `high` |
|
|
108
|
+
|
|
109
|
+
| `mode` | What is written per component | G4 |
|
|
110
|
+
|---|---|---|
|
|
111
|
+
| `catalog` | Nothing. Code is written from the use case catalogue, the three inventories, and C4 | **skipped** |
|
|
112
|
+
| `outline` | + a decision summary and the component list in the SDD, full flows for at most 3 use cases, local rules | 20 min |
|
|
113
|
+
| `guarded` | + **failure behaviour for every boundary**, inherited invariants quoted verbatim, integration documents | 20 min |
|
|
114
|
+
| `deep` | + robustness analysis, a contract per endpoint, data dictionary, flow diagrams, state machines | 30 min |
|
|
115
|
+
|
|
116
|
+
Neither field is derived from the other, and that is the point: **a component MAY be thin on purpose and
|
|
117
|
+
reviewed the hardest.** A component at `catalog` skips the component gate entirely — which is what makes
|
|
118
|
+
a shallow default genuinely fast rather than nominally fast.
|
|
119
|
+
|
|
120
|
+
Depth is a preference and needs no defence. Accepting risk on something that touches money, personal
|
|
121
|
+
data, or an irreversible action is **not** free: it requires a recorded decision, and a validator checks
|
|
122
|
+
that the decision exists.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Five gates, fifteen skills
|
|
127
|
+
|
|
128
|
+
| Gate | Decides | Skill |
|
|
129
|
+
|---|---|---|
|
|
130
|
+
| **G1 Problem** | What the problem is, whose it is, why it earns work | `wdi-problem` |
|
|
131
|
+
| **G2 Product** | What is built, and how it feels to use | `wdi-product` · optional `wdi-ux` |
|
|
132
|
+
| **G3 Blueprint** | The whole portrait, once per product | `wdi-blueprint` |
|
|
133
|
+
| **G4 Component** | How one component is built — **skipped at `catalog`** | `wdi-component` |
|
|
134
|
+
| **G5 Release** | Whether it is done and proven | `wdi-build` |
|
|
135
|
+
|
|
136
|
+
Around them: `wdi-init` (scaffold, component birth, depth and risk settings, structure maps),
|
|
137
|
+
`wdi-decision`, `wdi-question`, `wdi-log`, `wdi-help`, `wdi-reconcile`, `wdi-review`, `wdi-report`, and
|
|
138
|
+
`wdi-systematic-debugging`.
|
|
139
|
+
|
|
140
|
+
**No BMad skill is invoked directly.** Each has a wrapper, and the wrapper is what checks position,
|
|
141
|
+
verifies the result, and records what happened.
|
|
142
|
+
|
|
143
|
+
### Decisions, not ADRs
|
|
144
|
+
|
|
145
|
+
A decision is a `DEC-`, and **recording one is not mandatory.** The test is one sentence: *if somebody
|
|
146
|
+
asks in three months why it is like this, is the answer readable from the code?* If yes, it MUST NOT be
|
|
147
|
+
recorded — a register nobody trusts is worse than no register. One case is mandatory: contradicting an
|
|
148
|
+
invariant on the spine.
|
|
149
|
+
|
|
150
|
+
A `DEC-` freezes when it is applied. A change of mind produces a new one; it never edits the old.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## The mechanical half
|
|
155
|
+
|
|
156
|
+
`validate.py` runs **V1–V27** over the registries and the corpus, and `inventory.py` derives the three
|
|
157
|
+
inventories from code and reports the difference against the plan without patching either side.
|
|
158
|
+
|
|
159
|
+
The validators exist because prose that nothing checks is prose that gets contradicted by the first
|
|
160
|
+
person in a hurry. Every one of them also states **the state in which it does not apply** — a rule that
|
|
161
|
+
demands a trace before the trace can exist is a rule that gets switched off, and a validator nobody
|
|
162
|
+
reads guards nothing.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## What is generic, and where your own rules live
|
|
167
|
+
|
|
168
|
+
`.constitution/` holds **exactly two folders**, and the folder is the whole answer to who owns a file:
|
|
169
|
+
|
|
170
|
+
| Folder | Owner | `update` | `promote` |
|
|
171
|
+
|---|---|---|---|
|
|
172
|
+
| `.constitution/method/` | the method | **overwritten** in full | carries it into the package |
|
|
173
|
+
| **`.constitution/project/`** | you | **never touched** — seeded once when absent | never carries it, so your rules cannot be published |
|
|
174
|
+
|
|
175
|
+
Everything in the room is yours: `project/constitution.md` (Articles 1, 2, 5 — scope, repo checklist,
|
|
176
|
+
method ownership), `project/codebase-*-guide.md` (stack, conventions, brownfield, protected at **any**
|
|
177
|
+
`status:` — `Draft` is when they actually get written), and any rule file you add.
|
|
178
|
+
|
|
179
|
+
**The seam is a folder, never a marked region inside a generic file.** Prose has no merge algebra: you
|
|
180
|
+
cannot "merge" your paragraph with the method's, so only a path can say unambiguously whose a file is.
|
|
181
|
+
`AGENTS.md` is the one exception, and only because it is a single file with nowhere else to go.
|
|
182
|
+
|
|
183
|
+
Two more things are yours, outside `.constitution/`:
|
|
184
|
+
|
|
185
|
+
| Yours | Because |
|
|
186
|
+
|---|---|
|
|
187
|
+
| `.control/registry/index.yaml` → `product:` | The product and client name live in exactly one place |
|
|
188
|
+
| `_bmad/custom/*.user.toml` | Your BMad overrides — TOML, so these genuinely merge: a string replaces, a list appends, a table merges per key |
|
|
189
|
+
|
|
190
|
+
`.control/` `.what/` `.how/` are never touched by an update at all — they are your state, your promises,
|
|
191
|
+
and your design.
|
|
192
|
+
|
|
193
|
+
The custom room takes whole files, not marked blocks inside generic ones: `AGENTS.md` can use a marked
|
|
194
|
+
block because it is *one* file, while `.constitution/` has fifty-odd, and blocks inside them would make
|
|
195
|
+
an update perform surgery in every file. A file there declares `scope: project` and a one-line
|
|
196
|
+
`purpose:`; to **contradict** a generic rule it must name that rule and carry the decision that allowed
|
|
197
|
+
it. **An empty room is a valid state** — filling it so that it gets used is the failure the rule prevents.
|
|
198
|
+
|
|
199
|
+
### Language
|
|
200
|
+
|
|
201
|
+
Two settings, both free text, both defaulting to English:
|
|
202
|
+
|
|
203
|
+
```yaml
|
|
204
|
+
policy:
|
|
205
|
+
doc_language: "English" # prose of working documents
|
|
206
|
+
doc_filename_language: "English" # the slug part of a document filename
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Write whatever names the language — `English`, `Bahasa Indonesia`, `id`. What reads the value is a model,
|
|
210
|
+
and a model does not need a lookup table.
|
|
211
|
+
|
|
212
|
+
Always English, and never asked: method terminology, document code prefixes (`UC-`, `DEC-`), machine
|
|
213
|
+
markers (`[NEEDS CONFIRMATION]`, `[MISSING]`), and code identifiers. `.constitution/` itself is always
|
|
214
|
+
English, whatever the settings say — it travels to every repo through this package.
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## What update does
|
|
219
|
+
|
|
220
|
+
| | |
|
|
221
|
+
|---|---|
|
|
222
|
+
| Overwrites | everything in `.constitution/method/` · the fifteen wrappers · `_bmad/custom/*.toml` · the marked block in `AGENTS.md` |
|
|
223
|
+
| Removes | Wrappers the method has retired — a `wdi-*` folder with a `SKILL.md` that is no longer one of the fifteen. Each removal is printed |
|
|
224
|
+
| 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 |
|
|
225
|
+
| Never resurrects | A folder you retired. On update, absence is treated as a decision |
|
|
226
|
+
|
|
227
|
+
It prints the version it replaced, what it wrote, what it kept, and what to do next.
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## Carrying a change back into this package
|
|
232
|
+
|
|
233
|
+
The published source is this repository. A product repo that holds a newer working copy of the method
|
|
234
|
+
promotes it here before the change counts as published:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
npx wdi-method promote /path/to/the/product-repo
|
|
238
|
+
npm test
|
|
239
|
+
git commit && git push
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
`promote` copies the portable method, replaces product-named files with their generic versions, scrubs
|
|
243
|
+
initiative slugs, and **skips `.constitution/project/`** so a product's own rules can never be published.
|
|
244
|
+
|
|
245
|
+
**Patch releases are routine; minor and major are the maintainer's call.** This package overwrites files
|
|
246
|
+
in repos that already hold months of work, and the version is the only signal a reader has for how
|
|
247
|
+
carefully to read the diff. [`CONTRIBUTING.md`](CONTRIBUTING.md) has the detail, and
|
|
248
|
+
[`AGENTS.md`](AGENTS.md) states it for agents working on the package.
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## Support and Contributing
|
|
253
|
+
|
|
254
|
+
Open an [issue](https://github.com/wiradigitalid/wdi-method/issues) for a bug or a proposal. Read
|
|
255
|
+
[`CONTRIBUTING.md`](CONTRIBUTING.md) before sending a pull request — it explains where a change belongs,
|
|
256
|
+
how versioning works here, and what to check before publishing.
|
|
257
|
+
|
|
258
|
+
## License
|
|
259
|
+
|
|
260
|
+
MIT — see [LICENSE](LICENSE). Requires Node 20+ and [uv](https://docs.astral.sh/uv/) for the Python
|
|
261
|
+
scripts.
|
|
262
|
+
|
|
263
|
+
[](https://www.npmjs.com/package/wdi-method)
|
|
264
|
+
[](LICENSE)
|