wdi-method 0.5.13 → 0.6.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 +436 -271
- package/bin/wdi-method.js +198 -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 +154 -83
- 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 +29 -16
- 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 +184 -169
- package/kit/.constitution/method/why/artifact-map.md +15 -13
- 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 -122
- package/kit/skills/wdi-component/SKILL.md +8 -6
- package/kit/skills/wdi-decision/SKILL.md +187 -183
- package/kit/skills/wdi-help/SKILL.md +8 -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 +2 -2
- 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
|
@@ -1,134 +1,199 @@
|
|
|
1
|
-
---
|
|
2
|
-
status: Accepted
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Decision Guide
|
|
6
|
-
|
|
7
|
-
**Loaded when:** opening, accepting, or applying a `DEC-`
|
|
8
|
-
|
|
9
|
-
A `DEC-` records a decision worth remembering. The old name was ADR — *Architecture Decision Record*
|
|
10
|
-
— and the word "Architecture" forced the wrong question at the moment of writing: *"is this
|
|
11
|
-
architectural?"*. That question throws away the decisions most worth keeping, the ones that sound
|
|
12
|
-
small: *"the filter works like this"*, *"this list is sorted that way"*.
|
|
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
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
1
|
+
---
|
|
2
|
+
status: Accepted
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Decision Guide
|
|
6
|
+
|
|
7
|
+
**Loaded when:** opening, accepting, or applying a `DEC-`
|
|
8
|
+
|
|
9
|
+
A `DEC-` records a decision worth remembering. The old name was ADR — *Architecture Decision Record*
|
|
10
|
+
— and the word "Architecture" forced the wrong question at the moment of writing: *"is this
|
|
11
|
+
architectural?"*. That question throws away the decisions most worth keeping, the ones that sound
|
|
12
|
+
small: *"the filter works like this"*, *"this list is sorted that way"*.
|
|
13
|
+
|
|
14
|
+
## A decision's first home is the document it governs
|
|
15
|
+
|
|
16
|
+
**Changing a document NEVER requires a `DEC-`.** A `DEC-` is not permission to edit, not a record that
|
|
17
|
+
an edit happened, and not a step between deciding and writing. Where the answer has a home in a design
|
|
18
|
+
document — an `FR` in the PRD, a rule in `business-rules.md`, a boundary in an SDD, a line in the brief —
|
|
19
|
+
**it is written there and nowhere else**, and there is nothing further to do.
|
|
20
|
+
|
|
21
|
+
A `DEC-` is what you write for a decision with **no such home**. That is the whole of its job, plus the
|
|
22
|
+
one mandatory case below.
|
|
23
|
+
|
|
24
|
+
| The answer is about | Where it goes |
|
|
25
|
+
|---|---|
|
|
26
|
+
| What the product promises, does, or forbids | The design document that carries it |
|
|
27
|
+
| How this repo builds — a convention, a stack choice | `.constitution/project/`, once code ratifies it |
|
|
28
|
+
| Accepting a risk, cutting a scope, choosing between two paths **that no document holds** | A `DEC-` |
|
|
29
|
+
| Contradicting an `AD-N` | A `DEC-`, mandatory |
|
|
30
|
+
|
|
31
|
+
This matters most **early**. At G1 a brief is still being formed and at G2 a PRD is still being written;
|
|
32
|
+
almost nothing there is homeless, so almost nothing there is a `DEC-`. Demanding one before the artifact
|
|
33
|
+
it would govern even exists is ceremony at the moment the project can least afford it.
|
|
34
|
+
|
|
35
|
+
## Then one test decides whether to record it at all
|
|
36
|
+
|
|
37
|
+
> **If someone asks in three months why it is like this, is the answer readable from the code?**
|
|
38
|
+
|
|
39
|
+
Yes → it MUST NOT be recorded. No → it is recorded.
|
|
40
|
+
|
|
41
|
+
**A `DEC-` records a state, never an event.** It answers *why is it like this* for someone about to
|
|
42
|
+
change it — forward-looking, present tense. It is not a record that something changed, not a record that
|
|
43
|
+
a document used to say otherwise, and not a record that a review found a conflict. Those are document
|
|
44
|
+
history, and `corpus-guide.md` § The corpus is written in the present tense says they go nowhere.
|
|
45
|
+
|
|
46
|
+
The practical form of the test: **would this file save the next person from a mistake they were about to
|
|
47
|
+
make?** If the honest answer is *"no, but it explains what happened"*, there is no file.
|
|
48
|
+
|
|
49
|
+
**Recording is not mandatory, and a decision nobody recorded is normal rather than negligence.** It
|
|
50
|
+
MUST NOT be logged as debt, raised as a finding, or backfilled later from memory. Without this
|
|
51
|
+
sentence, "not mandatory" is read as "mandatory but allowed to be late".
|
|
52
|
+
|
|
53
|
+
**No case is mandatory any more, and one guard survives all of them.** Three rules used to demand a
|
|
54
|
+
`DEC-` file. Each was protecting something real, and in each the protection was the **stop**, never the
|
|
55
|
+
document:
|
|
56
|
+
|
|
57
|
+
| Was | Is now |
|
|
58
|
+
|---|---|
|
|
59
|
+
| Contradicting an `AD-N` demanded a `DEC-` | It **stops and reaches the owner**. Nobody narrows an invariant silently. The record is the edited `AD-N`, present tense, plus the commit — a `DEC-` only if the reason cannot be read from the spine |
|
|
60
|
+
| `risk_accepted: high` on a sensitive component demanded a risk-acceptance `DEC-` | `risk_accepted_by` names **a person and a date**, in `components.yaml` where the risk is set. `high-risk-named` checks it, and still resolves a `DEC-` id if one is given |
|
|
61
|
+
| Cancelling >30% of a spec's tickets demanded a `DEC-` | The spec is **re-cut** rather than patched. `specs.yaml` is the record |
|
|
62
|
+
|
|
63
|
+
What each of those bought was that a human made the call. That is preserved. What each of them also
|
|
64
|
+
cost — a file, written at the moment the work was blocked — is not.
|
|
65
|
+
|
|
66
|
+
An `AD-N` change stopping is the one that MUST NOT be softened further: it is what stops an architecture
|
|
67
|
+
being narrowed twice by two passes neither of which thought it was doing anything.
|
|
68
|
+
|
|
69
|
+
**Nothing else stops the work at all.** Where a change contradicts an `FR`, a `UC`, a business rule,
|
|
70
|
+
or a document's wording, the agent states the consequence once and the owner decides. If they proceed the
|
|
71
|
+
documents are edited to match — `delivery-flow-guide.md` § When something settled has to change owns the
|
|
72
|
+
matrix, and the survey behind that warning is spent the moment the owner answers.
|
|
73
|
+
|
|
74
|
+
## `AD-N` and `DEC-NNN` are not the same thing
|
|
75
|
+
|
|
76
|
+
| | `AD-N` | `DEC-NNN` |
|
|
77
|
+
|---|---|---|
|
|
78
|
+
| Is | A **living rule** in `ARCHITECTURE-SPINE.md` | A **decision event** |
|
|
79
|
+
| Lives in | The spine | `.control/decisions/` |
|
|
80
|
+
| Changes by | Being edited in place | Never, once `applied` — a new `DEC-` supersedes it |
|
|
81
|
+
| Answers | What is forbidden from now on | What was chosen, and what it cost |
|
|
82
|
+
|
|
83
|
+
An `AD-N` usually has a `DEC-` behind it. Neither MUST be written in place of the other, and one MUST
|
|
84
|
+
NOT be converted into the other.
|
|
85
|
+
|
|
86
|
+
## Shape — three sections, and no more required
|
|
87
|
+
|
|
88
|
+
| Section | States | Required |
|
|
89
|
+
|---|---|---|
|
|
90
|
+
| **Decision** | One sentence, present tense, quotable into a rule | always |
|
|
91
|
+
| **Why** | The context that forced it, in a few lines | always |
|
|
92
|
+
| **Cost** | What becomes harder. A decision with only benefits was not thought through | always |
|
|
93
|
+
| Alternatives | What else was considered, and why each lost | see below |
|
|
94
|
+
| Reversal trigger | The observable condition that makes revisiting this correct | see below |
|
|
95
|
+
| Trace | Where it came from, and what it landed in | see below |
|
|
96
|
+
|
|
97
|
+
The last three MUST be present when the decision reaches a Product Component whose `risk_accepted`
|
|
98
|
+
is `low` in `components.yaml`. Everywhere else they are optional, and an empty one MUST be dropped
|
|
99
|
+
rather than left as a heading with nothing under it.
|
|
100
|
+
|
|
101
|
+
**A `DEC-` MUST NOT hold an open question.** Those belong to `.control/questions/`.
|
|
102
|
+
|
|
103
|
+
**One page, and that is a bound, not a target.** A `DEC-` records **what was chosen and what it cost** —
|
|
104
|
+
not how the answer was reached, not the transcript of the reasoning, not every reading of every clause
|
|
105
|
+
that was weighed on the way. One real decision reached **124 lines** to record that one invariant does not
|
|
106
|
+
reach one artifact; the sentence that mattered was one line and the cost was two.
|
|
107
|
+
|
|
108
|
+
Three things MUST NOT appear in a `DEC-`, and each of them is the derivation leaking in:
|
|
109
|
+
|
|
110
|
+
- The search that found the answer — which files were grepped, which clause was read first.
|
|
111
|
+
- A meta-note about the decision itself: whether it should have been a `DEC-` at all, whether some other
|
|
112
|
+
mechanism was considered and rejected. If that reasoning matters it is the **Why**; usually it does not
|
|
113
|
+
matter and it is nothing.
|
|
114
|
+
- A correction of an earlier draft of the same decision. Drafts are git's.
|
|
115
|
+
|
|
116
|
+
`Alternatives` is the one place a rejected option belongs, it is a **line each**, and it is required only
|
|
117
|
+
where the section table above says so.
|
|
118
|
+
|
|
119
|
+
## Frontmatter
|
|
120
|
+
|
|
121
|
+
| Field | Rule |
|
|
122
|
+
|---|---|
|
|
123
|
+
| `id` | `DEC-NNN`, allocated from `.control/registry/decisions.yaml`, globally. MUST NOT restart per component or per release |
|
|
124
|
+
| `status` | `draft` · `accepted` · `applied` · `superseded` · `rejected` |
|
|
125
|
+
| `touches` | Empty at `draft`. Filled **when the decision is applied**, with the files it actually changed |
|
|
126
|
+
| `type` | Free text, and optional. Written when it is useful — `risk-acceptance`, `course-correction` |
|
|
127
|
+
| `supersedes` · `superseded_by` | Both sides of a supersession MUST exist |
|
|
128
|
+
|
|
129
|
+
**There is no `layer:` and no `component:`.** Both were classifications demanded before anything was
|
|
130
|
+
known, and both were guessed as often as they were derived. `touches:` replaces them, and it is filled
|
|
131
|
+
from what happened rather than from what was predicted.
|
|
132
|
+
|
|
133
|
+
The filename is `DEC-NNN-<slug>.md`. It MUST NOT carry a component name — a decision that turns out to
|
|
134
|
+
reach a second component would otherwise need renaming, and the rename breaks every link to it.
|
|
135
|
+
Filenames MUST obey the cross-OS naming rules in `structure-guide.md`.
|
|
136
|
+
|
|
137
|
+
## Status — and why `applied` exists
|
|
138
|
+
|
|
139
|
+
`draft` → `accepted` → `applied`. A change of mind after that produces a **new** `DEC-`.
|
|
140
|
+
|
|
141
|
+
| Status | Means |
|
|
142
|
+
|---|---|
|
|
143
|
+
| `draft` | Being argued. It changes nothing, and that is the point — proposing is cheap |
|
|
144
|
+
| `accepted` | Ratified by the Product Owner. MAY still be corrected in place |
|
|
145
|
+
| `applied` | The documents it governs now say it. **Frozen from here** |
|
|
146
|
+
| `superseded` | Replaced. Names its replacement, and the replacement names it |
|
|
147
|
+
| `rejected` | Seriously considered and turned down. A real status, and it MUST be used — it is what stops the same argument being had twice |
|
|
148
|
+
|
|
149
|
+
**Applying is what freezes a decision, not accepting.** From `applied` onward nothing in the file MUST
|
|
150
|
+
be touched — not the Decision, not the Cost, not a typo in the Why. Documents cite it, and editing it
|
|
151
|
+
destroys the only evidence of what they were changed to match.
|
|
152
|
+
|
|
153
|
+
Before that, an `accepted` `DEC-` MAY be corrected in place. Nothing has been built on it, so there is
|
|
154
|
+
no divergent record to preserve, and **the correction is not recorded anywhere** — the file now reads
|
|
155
|
+
correctly and git holds the change. Logging it would be a second home for a fact git already has, and a
|
|
156
|
+
piece of document history that would save nobody.
|
|
157
|
+
|
|
158
|
+
An agent MUST NOT accept its own `DEC-`. When work is blocked waiting on one, the block is reported,
|
|
159
|
+
never resolved by self-approval.
|
|
160
|
+
|
|
161
|
+
## Finding a decision
|
|
162
|
+
|
|
163
|
+
`.control/generated/decisions.md` carries a flat table of every `DEC-` with its status and what it
|
|
164
|
+
touches. It is generated, and MUST NOT be written by hand.
|
|
165
|
+
|
|
166
|
+
Searching the memlog for decisions is **retired**. The memlog is a run log again — the record of *why*
|
|
167
|
+
while an artifact was written, and a source when writing a `DEC-`, never an index of them.
|
|
168
|
+
|
|
169
|
+
## Where decisions come from
|
|
170
|
+
|
|
171
|
+
| Trigger | Route |
|
|
172
|
+
|---|---|
|
|
173
|
+
| A meeting reached one | `wdi-log` intent `meeting` writes the minutes; the decision still needs its own `DEC-` |
|
|
174
|
+
| An open question was answered | `wdi-question` closes it; the answer becomes a `DEC-` when it binds |
|
|
175
|
+
| `wdi-systematic-debugging` found a root cause in the design | A `DEC-`. It MUST NOT be absorbed as a code patch |
|
|
176
|
+
| A planning assumption turned out to be void | `wdi-decision`, which wraps `bmad-correct-course`. The result is a `DEC-` of `type: course-correction` |
|
|
177
|
+
| A ticket contradicts an `AD-N` | The ticket stops. This is the one mandatory case |
|
|
178
|
+
| `wdi-reconcile` found two documents disagreeing with no clear winner | That is a decision, not drift |
|
|
179
|
+
|
|
180
|
+
Minutes MUST NOT be treated as a decision record. They say what was discussed; a `DEC-` says what was
|
|
181
|
+
chosen and what it cost.
|
|
182
|
+
|
|
183
|
+
**`SCP-` is retired.** A course correction is a decision, and it is a `DEC-` with
|
|
184
|
+
`type: course-correction`. No second code names the same thing.
|
|
185
|
+
|
|
186
|
+
## Rules
|
|
187
|
+
|
|
188
|
+
- A `DEC-` MUST be opened **before** the code that depends on it, never written afterwards to explain
|
|
189
|
+
code that already exists.
|
|
190
|
+
- The applying pass MUST NOT improvise. When an `accepted` `DEC-` does not say clearly what a document
|
|
191
|
+
has to change, the decision is incomplete and is sent back.
|
|
192
|
+
- Applying MUST NOT widen beyond what the decision says. A neighbouring paragraph that now looks wrong
|
|
193
|
+
is a finding to report.
|
|
194
|
+
- `applied-dec-touches` checks that every `applied` `DEC-` names a non-empty `touches`. It MUST NOT check that a decision
|
|
195
|
+
serves an `FR` or `NFR` — *"the filter works like this"* serves none, and it is exactly the kind of
|
|
196
|
+
decision this guide exists to keep.
|
|
197
|
+
- `ADR-NNN` written inside a document frozen before 2026-08-18 is a **retired alias** for `DEC-NNN`
|
|
198
|
+
with the same number. It MUST NOT be read as a second, missing record, and those documents MUST NOT
|
|
199
|
+
be rewritten to change the prefix.
|