wdi-method 0.5.0 → 0.5.3
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 +15 -8
- package/bin/wdi-method.js +1276 -1121
- package/kit/.constitution/method/README.md +24 -17
- package/kit/.constitution/method/document/architecture-guide.md +209 -209
- package/kit/.constitution/method/document/corpus-guide.md +3 -3
- package/kit/.constitution/method/document/templates/cross-cutting.md +1 -1
- package/kit/.constitution/method/method-glossary.md +169 -169
- package/kit/.constitution/method/repo-guide.md +120 -110
- package/kit/.constitution/method/scripts/validate.py +54 -5
- package/kit/.constitution/method/why/portability.md +6 -6
- package/kit/.constitution/project/README.md +68 -68
- package/kit/.constitution/project/constitution.md +9 -8
- package/kit/skills/wdi-blueprint/SKILL.md +203 -203
- package/kit-overlay/AGENTS.md +13 -9
- package/kit-overlay/portability.md +2 -2
- package/kit-overlay/repo-guide.md +8 -0
- package/package.json +43 -37
- package/scaffold/.control/questions/blocking.md +1 -1
|
@@ -1,203 +1,203 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: wdi-blueprint
|
|
3
|
-
description: Use at G3 Blueprint — the one whole-product portrait, written once. Two intents, catalog and platform. Owns the use case catalogue, actors, domain model, cross-component business rules, the glossary, the spine, C4, cross-cutting, and the three inventories. Never writes a single component's depth.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# WDI Blueprint
|
|
7
|
-
|
|
8
|
-
G3 decides **the whole portrait of the system**: which use cases exist, their entities, their tables, their
|
|
9
|
-
endpoints, their screens, and the invariants that bind everything built from them. Once per product.
|
|
10
|
-
|
|
11
|
-
Two intents, run in this order:
|
|
12
|
-
|
|
13
|
-
| Intent | Writes | Wraps |
|
|
14
|
-
|---|---|---|
|
|
15
|
-
| `catalog` | Per `<pc>`: § Actor Register · § UC Catalogue · `03-domain/domain-model.md`. Product level: `.what/business-rules.md` · `.control/product-glossary.md` · `usecases.yaml` | — |
|
|
16
|
-
| `platform` | `.how/_platform/`: the spine · C4 L1/L2/L3 · `cross-cutting.md` · the three inventories. Registry: `containers` | `bmad-architecture` |
|
|
17
|
-
|
|
18
|
-
**Blueprint content is untouched by `mode` and by `risk_accepted`.** Everything above exists at every mode,
|
|
19
|
-
including `catalog`. That is what keeps the order non-circular: `mode` is first needed at G4.
|
|
20
|
-
|
|
21
|
-
You MUST NOT write a single component's depth — full UC flows, local rules, failure behaviour, contracts. All
|
|
22
|
-
of that is `wdi-component` at G4. You MUST NOT write a promise; when the blueprint proves a PRD wrong, that is
|
|
23
|
-
`wdi-product`, not a quiet edit here.
|
|
24
|
-
|
|
25
|
-
## Inputs
|
|
26
|
-
|
|
27
|
-
| Source | What it answers |
|
|
28
|
-
|---|---|
|
|
29
|
-
| `.what/_product-brief/brief.md` | The problem, the primary user, the boundary the portrait MUST respect |
|
|
30
|
-
| `.what/_prd/*/prd.md` — **every one** | Every promise made: the `FR`/`NFR` the portrait has to cover |
|
|
31
|
-
| `.control/registry/components.yaml` | Which components exist, and their `owns:` |
|
|
32
|
-
| `.control/product-glossary.md` | Terms already fixed |
|
|
33
|
-
| `.control/decisions/` | `accepted` and `applied` decisions an `AD-N` usually sits behind |
|
|
34
|
-
| `src/` · `web/` | What actually runs, when this is not a new project |
|
|
35
|
-
| `.constitution/method/document/srs-guide.md` · `architecture-guide.md` | The rules the result is checked against |
|
|
36
|
-
|
|
37
|
-
## Step 1 — Position
|
|
38
|
-
|
|
39
|
-
- The components MUST already exist. If `components.yaml` holds no `product_components`, route to `wdi-init`
|
|
40
|
-
intent `component` — the slicing is born at the tail of G2, from the brief plus every PRD.
|
|
41
|
-
- `catalog` runs before `platform`. The spine is written against a portrait that exists.
|
|
42
|
-
- If the spine and C4 set already exist, `platform` is an **amendment**, never a create. A second create
|
|
43
|
-
overwrites what three waves of annotation put there.
|
|
44
|
-
- If the ask is one component's mechanism or its full flows, route to `wdi-component`.
|
|
45
|
-
- If the ask is what the product promises, route to `wdi-product` — an invariant is not a promise.
|
|
46
|
-
|
|
47
|
-
## Step 2 — Intent `catalog`, in order
|
|
48
|
-
|
|
49
|
-
The order is binding, and each step is the input to the next. Writing them out of order produces use cases
|
|
50
|
-
whose nouns nobody defined.
|
|
51
|
-
|
|
52
|
-
1. **Glossary.** Every domain noun, into `.control/product-glossary.md`, alphabetically, each citing the
|
|
53
|
-
document and section its definition came from. You MUST NOT invent a definition — cite a source, or route
|
|
54
|
-
the term to `wdi-question`. Two words meaning one thing is **drift**, and it MUST be resolved to one word
|
|
55
|
-
in the same pass, with the losing synonym corrected in the documents that use it.
|
|
56
|
-
2. **UC Catalogue**, per component. One line per use case: `UC-N` · title · actor · the `FR` it satisfies ·
|
|
57
|
-
`critical` yes/no. A title MUST be a sentence a user would say, not a system term.
|
|
58
|
-
3. **Actor Register**, per component. It stays in the SRS kernel; it is the SSOT the SDD mirrors.
|
|
59
|
-
4. **Domain model** — entities, relations, columns — into `.what/<pc>/03-domain/domain-model.md`. Conceptual;
|
|
60
|
-
database column types belong to `.how/`.
|
|
61
|
-
5. **Cross-component business rules** into `.what/business-rules.md`. A rule binding only one component is
|
|
62
|
-
G4 work and MUST NOT be written here.
|
|
63
|
-
|
|
64
|
-
`critical` means the use case touches **money, personal data, or an irreversible action**. Nothing else. If
|
|
65
|
-
the count passes a third of a component's use cases, derive it again — `delivery-flow-guide.md` owns the rule
|
|
66
|
-
and it MUST NOT be negotiated.
|
|
67
|
-
|
|
68
|
-
**A method term MUST NOT be written into `.constitution/method/method-glossary.md`.** A product term binds one
|
|
69
|
-
project; a method term binds every project the method is installed in. Raise it as a proposal, state where it
|
|
70
|
-
appeared and why the existing vocabulary does not cover it, and hand it to the owner.
|
|
71
|
-
|
|
72
|
-
## Step 3 — Parallel where there is a key, serial where there is not
|
|
73
|
-
|
|
74
|
-
This is not theory. In the previous run, 41 cross-component business rules from seven parallel agents had to
|
|
75
|
-
be merged and de-duplicated **serially**, because the target file had no key — and that merge was the most
|
|
76
|
-
expensive part of the pass.
|
|
77
|
-
|
|
78
|
-
> Parallel fan-out is only for output with a natural key. Output that is a shared list with no key MUST be
|
|
79
|
-
> written by one agent that reads the whole input.
|
|
80
|
-
|
|
81
|
-
| Work | Parallel? | Key |
|
|
82
|
-
|---|---|---|
|
|
83
|
-
| UC catalogue, actors, entities per component | yes | Product Component |
|
|
84
|
-
| Glossary, cross-component business rules, the spine | **no** | there is none |
|
|
85
|
-
| The three inventories | yes, one agent per source | table · endpoint · screen |
|
|
86
|
-
|
|
87
|
-
Three guards when running parallel: each agent writes only its own keyed file; shared files are written in one
|
|
88
|
-
serial pass afterwards; the owner reviews the merged result, not N agent reports. Open questions from N agents
|
|
89
|
-
arrive as **one** ranked batch.
|
|
90
|
-
|
|
91
|
-
## Step 4 — Intent `platform`
|
|
92
|
-
|
|
93
|
-
Dispatch `bmad-architecture` at **initiative** altitude for the spine. Do not restate the rules to it — they
|
|
94
|
-
arrive through `persistent_facts` in `_bmad/custom/bmad-architecture.toml`, which installs
|
|
95
|
-
`architecture-guide.md` there rather than as `doc_standards` deliberately.
|
|
96
|
-
|
|
97
|
-
Then verify and land:
|
|
98
|
-
|
|
99
|
-
| # | Check | Fails when |
|
|
100
|
-
|---|---|---|
|
|
101
|
-
| 1 | Home | The spine landed anywhere but `.how/_platform/ARCHITECTURE-SPINE.md` |
|
|
102
|
-
| 2 | Every `AD-N` carries Binds, Prevents, and Rule | One is blank — an `AD-N` with no Prevents is a preference |
|
|
103
|
-
| 3 | Every `AD-N` is an invariant | Breaking it in one component would not break another. It is a seed, and MUST be marked as one |
|
|
104
|
-
| 4 | Stack, tree, and data shapes marked as seeds | Written as contracts, which makes the spine wrong at the first upgrade |
|
|
105
|
-
| 5 | No alternatives or cost in the spine | Those live in the `DEC-` behind it; a second copy drifts |
|
|
106
|
-
| 6 | Nothing but invariants | A statement affecting one component only — that is its SDD |
|
|
107
|
-
| 7 | Memlog at `.control/memlog/spine.md` | A `.memlog.md` appeared inside `.how/` — `--workspace` was used |
|
|
108
|
-
|
|
109
|
-
Check 7 MUST be fixed immediately. V16 rejects a memlog inside the corpus.
|
|
110
|
-
|
|
111
|
-
**Land the C4 set by amending, never overwriting.** The files are living and already carry annotations,
|
|
112
|
-
including a pre-method provenance note that MUST survive. When the incoming set contradicts an annotation
|
|
113
|
-
already there, you MUST stop and report it, and MUST NOT resolve it by preferring the newer drawing. Where a
|
|
114
|
-
C4 file and the spine disagree, the spine wins and the disagreement MUST be reported. One
|
|
115
|
-
`c4-l3-<container>.md` per `built: true` container **holding more than one Product Component**. A
|
|
116
|
-
`built: false` container gets no L3 at all, and a one-PC container needs none because the L2 matrix already
|
|
117
|
-
places it. **Not one of the three waits for a wave** — `architecture-guide.md` owns that.
|
|
118
|
-
|
|
119
|
-
**Register the containers** in `containers:` in `components.yaml`, in the same act as landing the L2. It is
|
|
120
|
-
not a follow-up, and it unblocks everyone else: an `LC` MUST name its container.
|
|
121
|
-
|
|
122
|
-
Each container MUST carry `built:` — `true` when we write what is inside it, `false` when we deploy
|
|
123
|
-
someone else's implementation. It decides whether the container gets an L3, an `LC`, and a heading in the
|
|
124
|
-
codebase map (V25). Something whose **runtime we do not deploy** is an external system: it belongs at L1,
|
|
125
|
-
and registering it here promises a codebase-map section that will never exist.
|
|
126
|
-
|
|
127
|
-
**Fill each PC's `containers:` in the same act, and land the matrix at L2** — the registry is the SSOT and
|
|
128
|
-
the L2 table renders it. A PC MUST list every `built: true` container it lives in; listing only the main
|
|
129
|
-
one is the error the matrix exists to catch. Complete for every PC at G3, untouched by `mode`.
|
|
130
|
-
|
|
131
|
-
You MUST NOT register a
|
|
132
|
-
`product_component` or a `logical_component`.
|
|
133
|
-
|
|
134
|
-
**Register what `_platform` owns** in the same pass — a domain entity through `platform_owns`, an inventory
|
|
135
|
-
row through that inventory's `platform_rows:`, an `LC` through its `component:`. The test is in
|
|
136
|
-
`corpus-guide.md` and both halves MUST hold. Each one MUST then be described under `##
|
|
137
|
-
`cross-cutting.md`, in the same act: V21 checks that second half, because owning something without
|
|
138
|
-
documenting it is taking ownership without taking responsibility.
|
|
139
|
-
|
|
140
|
-
A judgement the pattern cannot derive MUST live in the artifact it governs, not in a script and not in a
|
|
141
|
-
skill: an inventory's `platform_rows:` and `states:` are declared in that inventory's own frontmatter, so
|
|
142
|
-
re-derivation preserves them. Anywhere else, the next run deletes the owner's decision.
|
|
143
|
-
|
|
144
|
-
`_platform` is **not** a Product Component. You MUST NOT give it a `mode`, a `risk_accepted`, an SRS, or a
|
|
145
|
-
G4, and you MUST NOT move an entity there because its owner is hard to decide.
|
|
146
|
-
|
|
147
|
-
## Step 5 — The three inventories
|
|
148
|
-
|
|
149
|
-
They land in `.how/_platform/` with **one owner: this skill.** No negotiation with `wdi-ux`, and no second
|
|
150
|
-
copy inside any SDD.
|
|
151
|
-
|
|
152
|
-
| State | How each is born |
|
|
153
|
-
|---|---|
|
|
154
|
-
| No code yet | Written as a **plan** — the tables, endpoints, and screens intended. Nothing can be derived, because there is no source |
|
|
155
|
-
| Code exists | **Derived first** by `.constitution/method/scripts/inventory.py` — migrations for tables, route registration for endpoints, pages for screens — then compared with the plan. The difference is a **finding**, not hand work |
|
|
156
|
-
|
|
157
|
-
An inventory MUST NOT be assembled from a README or from route names that look plausible. Numbers are stable:
|
|
158
|
-
a new row takes the next number, never a renumber.
|
|
159
|
-
|
|
160
|
-
## Step 6 — The roll-up, and what the owner actually reads
|
|
161
|
-
|
|
162
|
-
Regenerate `.control/generated/blueprint.md` with `validate.py --generate`. It assembles the UC catalogue, the
|
|
163
|
-
actor lists, the domain model, and the three inventories into **one page**.
|
|
164
|
-
|
|
165
|
-
**That page is what G3 reviews** — not seven files. The catalogue and actors stay in their component kernels as
|
|
166
|
-
their permanent home; the roll-up is a view. One fact, one home, one view.
|
|
167
|
-
|
|
168
|
-
You MUST NOT hand-write anything under `.control/generated/`.
|
|
169
|
-
|
|
170
|
-
## Step 7 — Review and questions
|
|
171
|
-
|
|
172
|
-
- No `doc_standards` fires for an SRS or for the spine. Dispatch `wdi-review`, which reads the lens set from
|
|
173
|
-
each component's `risk_accepted`.
|
|
174
|
-
- You MUST NOT open G3 on a portrait that has not been through it.
|
|
175
|
-
- Every unresolved to-be-confirmed MUST be filed through `wdi-question`, in **one** ranked batch — into
|
|
176
|
-
`assumptions.md` by default, `blocking.md` only through its three tests.
|
|
177
|
-
- A decision surfacing while writing goes to `wdi-decision`, never into the document as a parenthetical.
|
|
178
|
-
- An `AD-N` that reverses or narrows an earlier one MUST go through `wdi-decision` first. Editing an `AD-N` in
|
|
179
|
-
place is how a reversal happens with nobody deciding it.
|
|
180
|
-
|
|
181
|
-
## Step 8 — A PRD that arrives after G3
|
|
182
|
-
|
|
183
|
-
The blueprint is **living and amended**, not repeated. `wdi-init` intent `component` births the new
|
|
184
|
-
components, this skill adds their rows to the catalogue and the three inventories, and **G3 reopens over the
|
|
185
|
-
delta only**. The 45-minute session does not run again for one additional initiative.
|
|
186
|
-
|
|
187
|
-
## Rules
|
|
188
|
-
|
|
189
|
-
- You MUST NOT write into `.how/<pc>/`, and `design-system.md` in `_platform/` belongs to `wdi-ux`.
|
|
190
|
-
- You MUST NOT regenerate the C4 set from scratch. The loss of annotations is invisible in a diff that reads
|
|
191
|
-
as a rewrite.
|
|
192
|
-
- You MUST NOT raise `status:`. Status is a stage; the `reviewed:` block is an event.
|
|
193
|
-
- You MUST NOT write a definition into `.constitution/` at all — not the method glossary, not a guide.
|
|
194
|
-
- When the portrait cannot be drawn because a PRD has not settled what it must cover, say so and stop.
|
|
195
|
-
- Memlog: one per Product Component at `.control/memlog/<pc>.md`, plus `.control/memlog/spine.md` for
|
|
196
|
-
`platform`, through `memlog.py --path`. `--workspace` MUST NOT be used.
|
|
197
|
-
|
|
198
|
-
## Output
|
|
199
|
-
|
|
200
|
-
Intents run · the catalogue and inventories as counts, per component · glossary terms written, proposed, and
|
|
201
|
-
rejected with the rule that rejected each · the `AD-N` that are new or changed · what was amended in the C4
|
|
202
|
-
set and what contradicted it · containers registered · plan-versus-code differences reported · whether the
|
|
203
|
-
roll-up regenerated and `wdi-review` ran · the one ranked batch of questions.
|
|
1
|
+
---
|
|
2
|
+
name: wdi-blueprint
|
|
3
|
+
description: Use at G3 Blueprint — the one whole-product portrait, written once. Two intents, catalog and platform. Owns the use case catalogue, actors, domain model, cross-component business rules, the glossary, the spine, C4, cross-cutting, and the three inventories. Never writes a single component's depth.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# WDI Blueprint
|
|
7
|
+
|
|
8
|
+
G3 decides **the whole portrait of the system**: which use cases exist, their entities, their tables, their
|
|
9
|
+
endpoints, their screens, and the invariants that bind everything built from them. Once per product.
|
|
10
|
+
|
|
11
|
+
Two intents, run in this order:
|
|
12
|
+
|
|
13
|
+
| Intent | Writes | Wraps |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| `catalog` | Per `<pc>`: § Actor Register · § UC Catalogue · `03-domain/domain-model.md`. Product level: `.what/business-rules.md` · `.control/product-glossary.md` · `usecases.yaml` | — |
|
|
16
|
+
| `platform` | `.how/_platform/`: the spine · C4 L1/L2/L3 · `cross-cutting.md` · the three inventories. Registry: `containers` | `bmad-architecture` |
|
|
17
|
+
|
|
18
|
+
**Blueprint content is untouched by `mode` and by `risk_accepted`.** Everything above exists at every mode,
|
|
19
|
+
including `catalog`. That is what keeps the order non-circular: `mode` is first needed at G4.
|
|
20
|
+
|
|
21
|
+
You MUST NOT write a single component's depth — full UC flows, local rules, failure behaviour, contracts. All
|
|
22
|
+
of that is `wdi-component` at G4. You MUST NOT write a promise; when the blueprint proves a PRD wrong, that is
|
|
23
|
+
`wdi-product`, not a quiet edit here.
|
|
24
|
+
|
|
25
|
+
## Inputs
|
|
26
|
+
|
|
27
|
+
| Source | What it answers |
|
|
28
|
+
|---|---|
|
|
29
|
+
| `.what/_product-brief/brief.md` | The problem, the primary user, the boundary the portrait MUST respect |
|
|
30
|
+
| `.what/_prd/*/prd.md` — **every one** | Every promise made: the `FR`/`NFR` the portrait has to cover |
|
|
31
|
+
| `.control/registry/components.yaml` | Which components exist, and their `owns:` |
|
|
32
|
+
| `.control/product-glossary.md` | Terms already fixed |
|
|
33
|
+
| `.control/decisions/` | `accepted` and `applied` decisions an `AD-N` usually sits behind |
|
|
34
|
+
| `src/` · `web/` | What actually runs, when this is not a new project |
|
|
35
|
+
| `.constitution/method/document/srs-guide.md` · `architecture-guide.md` | The rules the result is checked against |
|
|
36
|
+
|
|
37
|
+
## Step 1 — Position
|
|
38
|
+
|
|
39
|
+
- The components MUST already exist. If `components.yaml` holds no `product_components`, route to `wdi-init`
|
|
40
|
+
intent `component` — the slicing is born at the tail of G2, from the brief plus every PRD.
|
|
41
|
+
- `catalog` runs before `platform`. The spine is written against a portrait that exists.
|
|
42
|
+
- If the spine and C4 set already exist, `platform` is an **amendment**, never a create. A second create
|
|
43
|
+
overwrites what three waves of annotation put there.
|
|
44
|
+
- If the ask is one component's mechanism or its full flows, route to `wdi-component`.
|
|
45
|
+
- If the ask is what the product promises, route to `wdi-product` — an invariant is not a promise.
|
|
46
|
+
|
|
47
|
+
## Step 2 — Intent `catalog`, in order
|
|
48
|
+
|
|
49
|
+
The order is binding, and each step is the input to the next. Writing them out of order produces use cases
|
|
50
|
+
whose nouns nobody defined.
|
|
51
|
+
|
|
52
|
+
1. **Glossary.** Every domain noun, into `.control/product-glossary.md`, alphabetically, each citing the
|
|
53
|
+
document and section its definition came from. You MUST NOT invent a definition — cite a source, or route
|
|
54
|
+
the term to `wdi-question`. Two words meaning one thing is **drift**, and it MUST be resolved to one word
|
|
55
|
+
in the same pass, with the losing synonym corrected in the documents that use it.
|
|
56
|
+
2. **UC Catalogue**, per component. One line per use case: `UC-N` · title · actor · the `FR` it satisfies ·
|
|
57
|
+
`critical` yes/no. A title MUST be a sentence a user would say, not a system term.
|
|
58
|
+
3. **Actor Register**, per component. It stays in the SRS kernel; it is the SSOT the SDD mirrors.
|
|
59
|
+
4. **Domain model** — entities, relations, columns — into `.what/<pc>/03-domain/domain-model.md`. Conceptual;
|
|
60
|
+
database column types belong to `.how/`.
|
|
61
|
+
5. **Cross-component business rules** into `.what/business-rules.md`. A rule binding only one component is
|
|
62
|
+
G4 work and MUST NOT be written here.
|
|
63
|
+
|
|
64
|
+
`critical` means the use case touches **money, personal data, or an irreversible action**. Nothing else. If
|
|
65
|
+
the count passes a third of a component's use cases, derive it again — `delivery-flow-guide.md` owns the rule
|
|
66
|
+
and it MUST NOT be negotiated.
|
|
67
|
+
|
|
68
|
+
**A method term MUST NOT be written into `.constitution/method/method-glossary.md`.** A product term binds one
|
|
69
|
+
project; a method term binds every project the method is installed in. Raise it as a proposal, state where it
|
|
70
|
+
appeared and why the existing vocabulary does not cover it, and hand it to the owner.
|
|
71
|
+
|
|
72
|
+
## Step 3 — Parallel where there is a key, serial where there is not
|
|
73
|
+
|
|
74
|
+
This is not theory. In the previous run, 41 cross-component business rules from seven parallel agents had to
|
|
75
|
+
be merged and de-duplicated **serially**, because the target file had no key — and that merge was the most
|
|
76
|
+
expensive part of the pass.
|
|
77
|
+
|
|
78
|
+
> Parallel fan-out is only for output with a natural key. Output that is a shared list with no key MUST be
|
|
79
|
+
> written by one agent that reads the whole input.
|
|
80
|
+
|
|
81
|
+
| Work | Parallel? | Key |
|
|
82
|
+
|---|---|---|
|
|
83
|
+
| UC catalogue, actors, entities per component | yes | Product Component |
|
|
84
|
+
| Glossary, cross-component business rules, the spine | **no** | there is none |
|
|
85
|
+
| The three inventories | yes, one agent per source | table · endpoint · screen |
|
|
86
|
+
|
|
87
|
+
Three guards when running parallel: each agent writes only its own keyed file; shared files are written in one
|
|
88
|
+
serial pass afterwards; the owner reviews the merged result, not N agent reports. Open questions from N agents
|
|
89
|
+
arrive as **one** ranked batch.
|
|
90
|
+
|
|
91
|
+
## Step 4 — Intent `platform`
|
|
92
|
+
|
|
93
|
+
Dispatch `bmad-architecture` at **initiative** altitude for the spine. Do not restate the rules to it — they
|
|
94
|
+
arrive through `persistent_facts` in `_bmad/custom/bmad-architecture.toml`, which installs
|
|
95
|
+
`architecture-guide.md` there rather than as `doc_standards` deliberately.
|
|
96
|
+
|
|
97
|
+
Then verify and land:
|
|
98
|
+
|
|
99
|
+
| # | Check | Fails when |
|
|
100
|
+
|---|---|---|
|
|
101
|
+
| 1 | Home | The spine landed anywhere but `.how/_platform/ARCHITECTURE-SPINE.md` |
|
|
102
|
+
| 2 | Every `AD-N` carries Binds, Prevents, and Rule | One is blank — an `AD-N` with no Prevents is a preference |
|
|
103
|
+
| 3 | Every `AD-N` is an invariant | Breaking it in one component would not break another. It is a seed, and MUST be marked as one |
|
|
104
|
+
| 4 | Stack, tree, and data shapes marked as seeds | Written as contracts, which makes the spine wrong at the first upgrade |
|
|
105
|
+
| 5 | No alternatives or cost in the spine | Those live in the `DEC-` behind it; a second copy drifts |
|
|
106
|
+
| 6 | Nothing but invariants | A statement affecting one component only — that is its SDD |
|
|
107
|
+
| 7 | Memlog at `.control/memlog/spine.md` | A `.memlog.md` appeared inside `.how/` — `--workspace` was used |
|
|
108
|
+
|
|
109
|
+
Check 7 MUST be fixed immediately. V16 rejects a memlog inside the corpus.
|
|
110
|
+
|
|
111
|
+
**Land the C4 set by amending, never overwriting.** The files are living and already carry annotations,
|
|
112
|
+
including a pre-method provenance note that MUST survive. When the incoming set contradicts an annotation
|
|
113
|
+
already there, you MUST stop and report it, and MUST NOT resolve it by preferring the newer drawing. Where a
|
|
114
|
+
C4 file and the spine disagree, the spine wins and the disagreement MUST be reported. One
|
|
115
|
+
`c4-l3-<container>.md` per `built: true` container **holding more than one Product Component**. A
|
|
116
|
+
`built: false` container gets no L3 at all, and a one-PC container needs none because the L2 matrix already
|
|
117
|
+
places it. **Not one of the three waits for a wave** — `architecture-guide.md` owns that.
|
|
118
|
+
|
|
119
|
+
**Register the containers** in `containers:` in `components.yaml`, in the same act as landing the L2. It is
|
|
120
|
+
not a follow-up, and it unblocks everyone else: an `LC` MUST name its container.
|
|
121
|
+
|
|
122
|
+
Each container MUST carry `built:` — `true` when we write what is inside it, `false` when we deploy
|
|
123
|
+
someone else's implementation. It decides whether the container gets an L3, an `LC`, and a heading in the
|
|
124
|
+
codebase map (V25). Something whose **runtime we do not deploy** is an external system: it belongs at L1,
|
|
125
|
+
and registering it here promises a codebase-map section that will never exist.
|
|
126
|
+
|
|
127
|
+
**Fill each PC's `containers:` in the same act, and land the matrix at L2** — the registry is the SSOT and
|
|
128
|
+
the L2 table renders it. A PC MUST list every `built: true` container it lives in; listing only the main
|
|
129
|
+
one is the error the matrix exists to catch. Complete for every PC at G3, untouched by `mode`.
|
|
130
|
+
|
|
131
|
+
You MUST NOT register a
|
|
132
|
+
`product_component` or a `logical_component`.
|
|
133
|
+
|
|
134
|
+
**Register what `_platform` owns** in the same pass — a domain entity through `platform_owns`, an inventory
|
|
135
|
+
row through that inventory's `platform_rows:`, an `LC` through its `component:`. The test is in
|
|
136
|
+
`corpus-guide.md` and both halves MUST hold. Each one MUST then be described under `## Platform-owned` in
|
|
137
|
+
`cross-cutting.md`, in the same act: V21 checks that second half, because owning something without
|
|
138
|
+
documenting it is taking ownership without taking responsibility.
|
|
139
|
+
|
|
140
|
+
A judgement the pattern cannot derive MUST live in the artifact it governs, not in a script and not in a
|
|
141
|
+
skill: an inventory's `platform_rows:` and `states:` are declared in that inventory's own frontmatter, so
|
|
142
|
+
re-derivation preserves them. Anywhere else, the next run deletes the owner's decision.
|
|
143
|
+
|
|
144
|
+
`_platform` is **not** a Product Component. You MUST NOT give it a `mode`, a `risk_accepted`, an SRS, or a
|
|
145
|
+
G4, and you MUST NOT move an entity there because its owner is hard to decide.
|
|
146
|
+
|
|
147
|
+
## Step 5 — The three inventories
|
|
148
|
+
|
|
149
|
+
They land in `.how/_platform/` with **one owner: this skill.** No negotiation with `wdi-ux`, and no second
|
|
150
|
+
copy inside any SDD.
|
|
151
|
+
|
|
152
|
+
| State | How each is born |
|
|
153
|
+
|---|---|
|
|
154
|
+
| No code yet | Written as a **plan** — the tables, endpoints, and screens intended. Nothing can be derived, because there is no source |
|
|
155
|
+
| Code exists | **Derived first** by `.constitution/method/scripts/inventory.py` — migrations for tables, route registration for endpoints, pages for screens — then compared with the plan. The difference is a **finding**, not hand work |
|
|
156
|
+
|
|
157
|
+
An inventory MUST NOT be assembled from a README or from route names that look plausible. Numbers are stable:
|
|
158
|
+
a new row takes the next number, never a renumber.
|
|
159
|
+
|
|
160
|
+
## Step 6 — The roll-up, and what the owner actually reads
|
|
161
|
+
|
|
162
|
+
Regenerate `.control/generated/blueprint.md` with `validate.py --generate`. It assembles the UC catalogue, the
|
|
163
|
+
actor lists, the domain model, and the three inventories into **one page**.
|
|
164
|
+
|
|
165
|
+
**That page is what G3 reviews** — not seven files. The catalogue and actors stay in their component kernels as
|
|
166
|
+
their permanent home; the roll-up is a view. One fact, one home, one view.
|
|
167
|
+
|
|
168
|
+
You MUST NOT hand-write anything under `.control/generated/`.
|
|
169
|
+
|
|
170
|
+
## Step 7 — Review and questions
|
|
171
|
+
|
|
172
|
+
- No `doc_standards` fires for an SRS or for the spine. Dispatch `wdi-review`, which reads the lens set from
|
|
173
|
+
each component's `risk_accepted`.
|
|
174
|
+
- You MUST NOT open G3 on a portrait that has not been through it.
|
|
175
|
+
- Every unresolved to-be-confirmed MUST be filed through `wdi-question`, in **one** ranked batch — into
|
|
176
|
+
`assumptions.md` by default, `blocking.md` only through its three tests.
|
|
177
|
+
- A decision surfacing while writing goes to `wdi-decision`, never into the document as a parenthetical.
|
|
178
|
+
- An `AD-N` that reverses or narrows an earlier one MUST go through `wdi-decision` first. Editing an `AD-N` in
|
|
179
|
+
place is how a reversal happens with nobody deciding it.
|
|
180
|
+
|
|
181
|
+
## Step 8 — A PRD that arrives after G3
|
|
182
|
+
|
|
183
|
+
The blueprint is **living and amended**, not repeated. `wdi-init` intent `component` births the new
|
|
184
|
+
components, this skill adds their rows to the catalogue and the three inventories, and **G3 reopens over the
|
|
185
|
+
delta only**. The 45-minute session does not run again for one additional initiative.
|
|
186
|
+
|
|
187
|
+
## Rules
|
|
188
|
+
|
|
189
|
+
- You MUST NOT write into `.how/<pc>/`, and `design-system.md` in `_platform/` belongs to `wdi-ux`.
|
|
190
|
+
- You MUST NOT regenerate the C4 set from scratch. The loss of annotations is invisible in a diff that reads
|
|
191
|
+
as a rewrite.
|
|
192
|
+
- You MUST NOT raise `status:`. Status is a stage; the `reviewed:` block is an event.
|
|
193
|
+
- You MUST NOT write a definition into `.constitution/` at all — not the method glossary, not a guide.
|
|
194
|
+
- When the portrait cannot be drawn because a PRD has not settled what it must cover, say so and stop.
|
|
195
|
+
- Memlog: one per Product Component at `.control/memlog/<pc>.md`, plus `.control/memlog/spine.md` for
|
|
196
|
+
`platform`, through `memlog.py --path`. `--workspace` MUST NOT be used.
|
|
197
|
+
|
|
198
|
+
## Output
|
|
199
|
+
|
|
200
|
+
Intents run · the catalogue and inventories as counts, per component · glossary terms written, proposed, and
|
|
201
|
+
rejected with the rule that rejected each · the `AD-N` that are new or changed · what was amended in the C4
|
|
202
|
+
set and what contradicted it · containers registered · plan-versus-code differences reported · whether the
|
|
203
|
+
roll-up regenerated and `wdi-review` ran · the one ranked batch of questions.
|
package/kit-overlay/AGENTS.md
CHANGED
|
@@ -72,9 +72,9 @@ Read this instead of reasoning about what `.what/` and `.how/` mean.
|
|
|
72
72
|
|
|
73
73
|
| The thing in your hand | Its folder |
|
|
74
74
|
|---|---|
|
|
75
|
-
| A rule, a guide, a template — how we work | `.constitution/` |
|
|
75
|
+
| A rule, a guide, a template — how we work | `.constitution/method/` — **overwritten in full by `update`** |
|
|
76
76
|
| A rule that binds **only this product** | `.constitution/project/` — `update` never writes over it, `promote` never publishes it |
|
|
77
|
-
| The explanation of a rule, never a rule itself | `.constitution/method/` |
|
|
77
|
+
| The explanation of a rule, never a rule itself | `.constitution/method/why/` |
|
|
78
78
|
| A decision, an open question, a registry, a structure map, minutes | `.control/` |
|
|
79
79
|
| The brief, a PRD, a use case, a business rule — what is promised | `.what/` |
|
|
80
80
|
| The spine, C4, an inventory, an SDD, a contract — how it is built | `.how/` |
|
|
@@ -94,7 +94,7 @@ Read this instead of reasoning about what `.what/` and `.how/` mean.
|
|
|
94
94
|
| `.work/` | Scratch; emptied when a task closes | Secrets, commercial figures, anything meant as authority |
|
|
95
95
|
|
|
96
96
|
The placement test: **is this file still correct after its wave has passed?** Yes → the corpus. No →
|
|
97
|
-
`_bmad-output/`. In doubt →
|
|
97
|
+
`_bmad-output/`. In doubt → `.constitution/method/document/corpus-guide.md`.
|
|
98
98
|
|
|
99
99
|
The method does not use a `docs/` layer for corpus or rules. A leftover `docs/` folder is inventory
|
|
100
100
|
to sort, not a second home.
|
|
@@ -109,7 +109,8 @@ to sort, not a second home.
|
|
|
109
109
|
Per-component `mode` wins over global, and there is no third scope — `mode` MUST NOT be overridden per
|
|
110
110
|
wave or per `SPEC.md`. A component at `mode: catalog` **skips G4 entirely**. Neither field MUST be
|
|
111
111
|
derived from the other: one component MAY be thin on purpose and reviewed the hardest.
|
|
112
|
-
|
|
112
|
+
`.constitution/method/document/delivery-flow-guide.md` owns both;
|
|
113
|
+
`.constitution/method/why/rationale.md` says why they are separate.
|
|
113
114
|
|
|
114
115
|
## The five gates and the fifteen skills
|
|
115
116
|
|
|
@@ -142,9 +143,10 @@ verifies the result, and lands the memlog.
|
|
|
142
143
|
re-derives them.
|
|
143
144
|
- A `DEC-` with status `applied` MUST NOT be edited, except to record its supersession — status moves
|
|
144
145
|
to `superseded` and names its replacement. A change of mind produces a new `DEC-`.
|
|
145
|
-
- A file in `.constitution/method/` MUST NOT be cited as the reason to reject a change. It is
|
|
146
|
+
- A file in `.constitution/method/why/` MUST NOT be cited as the reason to reject a change. It is
|
|
146
147
|
`status: Reference` — it explains, it does not bind, and where it disagrees with a guide the guide
|
|
147
|
-
wins and the disagreement is a defect.
|
|
148
|
+
wins and the disagreement is a defect. This covers `why/` ONLY: a guide in
|
|
149
|
+
`.constitution/method/document/` is `status: Accepted` and it binds.
|
|
148
150
|
- More than the component's `mode` demands MUST NOT be written. Exceeding the depth the owner set is
|
|
149
151
|
not diligence.
|
|
150
152
|
- `.claude/skills/bmad-*/customize.toml` MUST NOT be edited — it is overwritten on every BMad update;
|
|
@@ -165,7 +167,7 @@ verifies the result, and lands the memlog.
|
|
|
165
167
|
| Naming anything — a code identifier, a file, a database column | `.constitution/method/language-guide.md` |
|
|
166
168
|
| Asking "which gate now, what next" | `.constitution/method/document/delivery-flow-guide.md` · skill `wdi-help` |
|
|
167
169
|
| Setting or changing `mode` or `risk_accepted` | `.constitution/method/document/delivery-flow-guide.md` · skill `wdi-init` |
|
|
168
|
-
| Invoking a BMad skill | `.constitution/method/document/bmad-guide.md` ·
|
|
170
|
+
| Invoking a BMad skill | `.constitution/method/document/bmad-guide.md` · `.constitution/method/document/bmad-skill-register.md` |
|
|
169
171
|
| Writing or reviewing a product brief | `.constitution/method/document/brief-guide.md` |
|
|
170
172
|
| Writing or reviewing a PRD | `.constitution/method/document/prd-guide.md` |
|
|
171
173
|
| Writing or reviewing UX | `.constitution/method/document/ux-guide.md` |
|
|
@@ -176,13 +178,15 @@ verifies the result, and lands the memlog.
|
|
|
176
178
|
| Writing or reading a structure map | `.constitution/method/structure-guide.md` |
|
|
177
179
|
| Looking for where code lives, or placing new code | `.control/structure-codebase.md` |
|
|
178
180
|
| Looking for where a document lives | `.control/structure-document.md` |
|
|
179
|
-
| Writing or reviewing code | `.constitution/project/codebase-stack-guide.md` ·
|
|
181
|
+
| Writing or reviewing code | `.constitution/project/codebase-stack-guide.md` · `.constitution/project/codebase-conventions-guide.md` · `.constitution/project/codebase-brownfield-guide.md` |
|
|
180
182
|
|
|
181
183
|
All three `.constitution/project/codebase-*-guide.md` start as `status: Draft`. While they are, their contents MAY be read
|
|
182
184
|
as guidance but MUST NOT be used to reject a change.
|
|
183
185
|
|
|
184
186
|
The two structure maps MUST NOT be installed as `doc_standards` — they are facts, not standards. Nor
|
|
185
|
-
MUST anything in `.constitution/method/`; `status: Reference` forbids it.
|
|
187
|
+
MUST anything in `.constitution/method/why/`; `status: Reference` forbids it. A guide in
|
|
188
|
+
`.constitution/method/document/` MAY be installed that way, and several already are — see
|
|
189
|
+
`_bmad/custom/bmad-prd.toml`.
|
|
186
190
|
|
|
187
191
|
## Bugs, decisions, questions
|
|
188
192
|
|
|
@@ -22,7 +22,7 @@ them only an *example* does — not a rule.
|
|
|
22
22
|
|
|
23
23
|
| File | What is this product's | What to do when carrying it |
|
|
24
24
|
|---|---|---|
|
|
25
|
-
|
|
|
25
|
+
| `../../project/constitution.md` | Articles 1, 2, and 5 | **Rewrite 2 and 5.** Article 1 cites `index.yaml` `product.name`. Articles 3, 4, 6, 7 travel unchanged. `wdi-method promote` already replaces this file with the kit template |
|
|
26
26
|
| `../document/architecture-guide.md` | Seed examples of stack and tree shape | Re-point the examples. Every rule around them travels |
|
|
27
27
|
| `../document/corpus-guide.md` | Worked examples of `_platform` ownership | Re-point the examples. **Keep both kinds**: they teach the trap better than the rule alone |
|
|
28
28
|
| `templates/design-system.md` | The pointer to wherever this project keeps its tokens | Re-point at that project's token file |
|
|
@@ -75,7 +75,7 @@ the steps that a runbook used to carry are now `wdi-init` intent `setup`. The or
|
|
|
75
75
|
|
|
76
76
|
1. `npx bmad-method install` in the product repo.
|
|
77
77
|
2. `npx wdi-method install` (optionally `--agents …`).
|
|
78
|
-
3. Set `product.name` in `.control/registry/index.yaml`. Rewrite
|
|
78
|
+
3. Set `product.name` in `.control/registry/index.yaml`. Rewrite `../../project/constitution.md` Articles 2 and 5.
|
|
79
79
|
4. Merge the method routing into `AGENTS.md` if that file already existed.
|
|
80
80
|
5. Run `wdi-init` intent `setup`.
|
|
81
81
|
6. Sort what already existed. A file that is already the artifact one slot asks for goes into that
|
|
@@ -96,6 +96,14 @@ Everything in the room is yours: `project/constitution.md` (Articles 1, 2, 5),
|
|
|
96
96
|
`project/codebase-*-guide.md` (stack, conventions, brownfield — protected at **any** `status:`,
|
|
97
97
|
including `Draft`, which is when they are actually written), and any rule file you add.
|
|
98
98
|
|
|
99
|
+
**A file this product adds belongs in `project/`.** `.constitution/` holds two folders and nothing
|
|
100
|
+
else the method knows about, so a loose `.md` at its root is in a state no rule describes: `update`
|
|
101
|
+
leaves it (it is not the method's) and no guide names it. Migration deliberately does NOT move one —
|
|
102
|
+
it may already be pointed at by its current path from `AGENTS.md` or an editor rule the installer
|
|
103
|
+
cannot see — so it prints the filename and leaves the choice to you. Either move it into `project/`
|
|
104
|
+
and fix those pointers, or name it from Article 2 so the next reader knows why it is there. Leaving
|
|
105
|
+
it unnamed is the only wrong answer.
|
|
106
|
+
|
|
99
107
|
The seam is the **folder**, never a marked region inside a generic file. `AGENTS.md` uses a marked
|
|
100
108
|
block because it is one file with no alternative; `.constitution/` has fifty-odd, and blocks inside
|
|
101
109
|
them would make every update perform surgery in every file. Prose has no merge algebra — only a path
|
package/package.json
CHANGED
|
@@ -1,37 +1,43 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "wdi-method",
|
|
3
|
-
"version": "0.5.
|
|
4
|
-
"description": "WDI Method — software delivery method that wraps BMad",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"wdi-method": "bin/wdi-method.js"
|
|
8
|
-
},
|
|
9
|
-
"files": [
|
|
10
|
-
"bin/",
|
|
11
|
-
"lib/",
|
|
12
|
-
"kit/",
|
|
13
|
-
"kit-overlay/",
|
|
14
|
-
"scaffold/",
|
|
15
|
-
"README.md",
|
|
16
|
-
"LICENSE"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "wdi-method",
|
|
3
|
+
"version": "0.5.3",
|
|
4
|
+
"description": "WDI Method — software delivery method that wraps BMad",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"wdi-method": "bin/wdi-method.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin/",
|
|
11
|
+
"lib/",
|
|
12
|
+
"kit/",
|
|
13
|
+
"kit-overlay/",
|
|
14
|
+
"scaffold/",
|
|
15
|
+
"README.md",
|
|
16
|
+
"LICENSE",
|
|
17
|
+
"!**/__pycache__",
|
|
18
|
+
"!**/*.pyc"
|
|
19
|
+
],
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=20"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"test": "node --test tests/*.test.mjs",
|
|
25
|
+
"prepublishOnly": "node --test tests/*.test.mjs",
|
|
26
|
+
"overlay": "node scripts/apply-overlay.mjs",
|
|
27
|
+
"pretest": "node scripts/apply-overlay.mjs && node scripts/clean-kit.mjs",
|
|
28
|
+
"prepack": "node scripts/clean-kit.mjs",
|
|
29
|
+
"clean": "node scripts/clean-kit.mjs"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@clack/prompts": "^0.11.0"
|
|
33
|
+
},
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "git+https://github.com/wiradigitalid/wdi-method.git"
|
|
38
|
+
},
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/wiradigitalid/wdi-method/issues"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/wiradigitalid/wdi-method#readme"
|
|
43
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**Loaded when:** every gate.
|
|
4
4
|
|
|
5
5
|
Only this file holds a gate. Written through `wdi-question`, never by hand directly; the row shape
|
|
6
|
-
lives in `.constitution/document/templates/questions.md`.
|
|
6
|
+
lives in `.constitution/method/document/templates/questions.md`.
|
|
7
7
|
|
|
8
8
|
Target **<=3 rows per Product Component**. A question rises to here only through three tests, one is
|
|
9
9
|
enough:
|