wdi-method 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +203 -0
  3. package/bin/wdi-method.js +906 -0
  4. package/kit/.constitution/README.md +66 -0
  5. package/kit/.constitution/codebase/brownfield-guide.md +18 -0
  6. package/kit/.constitution/codebase/conventions-guide.md +18 -0
  7. package/kit/.constitution/codebase/stack-guide.md +18 -0
  8. package/kit/.constitution/constitution.md +135 -0
  9. package/kit/.constitution/document/architecture-guide.md +209 -0
  10. package/kit/.constitution/document/bmad-guide.md +151 -0
  11. package/kit/.constitution/document/bmad-skill-register.md +71 -0
  12. package/kit/.constitution/document/brief-guide.md +94 -0
  13. package/kit/.constitution/document/corpus-guide.md +341 -0
  14. package/kit/.constitution/document/decision-guide.md +134 -0
  15. package/kit/.constitution/document/delivery-flow-guide.md +338 -0
  16. package/kit/.constitution/document/prd-guide.md +202 -0
  17. package/kit/.constitution/document/sdd-guide.md +206 -0
  18. package/kit/.constitution/document/srs-guide.md +147 -0
  19. package/kit/.constitution/document/templates/addendum.md +71 -0
  20. package/kit/.constitution/document/templates/architecture-spine.md +100 -0
  21. package/kit/.constitution/document/templates/brief.md +110 -0
  22. package/kit/.constitution/document/templates/c4.md +77 -0
  23. package/kit/.constitution/document/templates/contract.md +52 -0
  24. package/kit/.constitution/document/templates/cross-cutting.md +80 -0
  25. package/kit/.constitution/document/templates/decision.md +64 -0
  26. package/kit/.constitution/document/templates/design-system.md +67 -0
  27. package/kit/.constitution/document/templates/flow.md +51 -0
  28. package/kit/.constitution/document/templates/integration.md +69 -0
  29. package/kit/.constitution/document/templates/inventory.md +69 -0
  30. package/kit/.constitution/document/templates/lc.md +47 -0
  31. package/kit/.constitution/document/templates/lifecycle.md +52 -0
  32. package/kit/.constitution/document/templates/meeting.md +47 -0
  33. package/kit/.constitution/document/templates/model.md +55 -0
  34. package/kit/.constitution/document/templates/oq.md +45 -0
  35. package/kit/.constitution/document/templates/prd.md +226 -0
  36. package/kit/.constitution/document/templates/questions.md +75 -0
  37. package/kit/.constitution/document/templates/rtr.md +61 -0
  38. package/kit/.constitution/document/templates/rules.md +47 -0
  39. package/kit/.constitution/document/templates/scn.md +40 -0
  40. package/kit/.constitution/document/templates/sdd.md +146 -0
  41. package/kit/.constitution/document/templates/srs.md +149 -0
  42. package/kit/.constitution/document/templates/structure-codebase.md +129 -0
  43. package/kit/.constitution/document/templates/structure-document.md +90 -0
  44. package/kit/.constitution/document/templates/uc.md +69 -0
  45. package/kit/.constitution/document/templates/ux.md +77 -0
  46. package/kit/.constitution/document/ux-guide.md +99 -0
  47. package/kit/.constitution/language-guide.md +69 -0
  48. package/kit/.constitution/method/README.md +169 -0
  49. package/kit/.constitution/method/artifact-map.md +155 -0
  50. package/kit/.constitution/method/portability.md +91 -0
  51. package/kit/.constitution/method/rationale.md +246 -0
  52. package/kit/.constitution/method-glossary.md +169 -0
  53. package/kit/.constitution/project/README.md +68 -0
  54. package/kit/.constitution/repo-guide.md +97 -0
  55. package/kit/.constitution/scripts/inventory.py +527 -0
  56. package/kit/.constitution/scripts/timeline.py +665 -0
  57. package/kit/.constitution/scripts/validate.py +1579 -0
  58. package/kit/.constitution/structure-guide.md +202 -0
  59. package/kit/assets/bmad-custom/bmad-advanced-elicitation.toml +15 -0
  60. package/kit/assets/bmad-custom/bmad-architecture.toml +31 -0
  61. package/kit/assets/bmad-custom/bmad-build-auto.toml +10 -0
  62. package/kit/assets/bmad-custom/bmad-build.toml +52 -0
  63. package/kit/assets/bmad-custom/bmad-code-review.toml +12 -0
  64. package/kit/assets/bmad-custom/bmad-correct-course.toml +27 -0
  65. package/kit/assets/bmad-custom/bmad-deep-recon.toml +11 -0
  66. package/kit/assets/bmad-custom/bmad-prd.toml +42 -0
  67. package/kit/assets/bmad-custom/bmad-product-brief.toml +34 -0
  68. package/kit/assets/bmad-custom/bmad-retrospective.toml +9 -0
  69. package/kit/assets/bmad-custom/bmad-spec.toml +15 -0
  70. package/kit/assets/bmad-custom/bmad-ux.toml +19 -0
  71. package/kit/assets/bmad-custom/config.toml +6 -0
  72. package/kit/skills/wdi-blueprint/SKILL.md +203 -0
  73. package/kit/skills/wdi-build/SKILL.md +244 -0
  74. package/kit/skills/wdi-component/SKILL.md +172 -0
  75. package/kit/skills/wdi-decision/.gitkeep +0 -0
  76. package/kit/skills/wdi-decision/SKILL.md +183 -0
  77. package/kit/skills/wdi-help/.gitkeep +0 -0
  78. package/kit/skills/wdi-help/SKILL.md +98 -0
  79. package/kit/skills/wdi-init/SKILL.md +149 -0
  80. package/kit/skills/wdi-log/SKILL.md +107 -0
  81. package/kit/skills/wdi-problem/SKILL.md +90 -0
  82. package/kit/skills/wdi-product/SKILL.md +127 -0
  83. package/kit/skills/wdi-question/.gitkeep +0 -0
  84. package/kit/skills/wdi-question/SKILL.md +88 -0
  85. package/kit/skills/wdi-reconcile/.gitkeep +0 -0
  86. package/kit/skills/wdi-reconcile/SKILL.md +146 -0
  87. package/kit/skills/wdi-report/SKILL.md +205 -0
  88. package/kit/skills/wdi-review/SKILL.md +118 -0
  89. package/kit/skills/wdi-systematic-debugging/SKILL.md +193 -0
  90. package/kit/skills/wdi-systematic-debugging/references/condition-based-waiting.md +115 -0
  91. package/kit/skills/wdi-systematic-debugging/references/defense-in-depth.md +122 -0
  92. package/kit/skills/wdi-systematic-debugging/references/find-polluter.sh +72 -0
  93. package/kit/skills/wdi-systematic-debugging/references/root-cause-tracing.md +169 -0
  94. package/kit/skills/wdi-ux/SKILL.md +145 -0
  95. package/kit-overlay/AGENTS.md +196 -0
  96. package/kit-overlay/README.md +66 -0
  97. package/kit-overlay/constitution.md +135 -0
  98. package/kit-overlay/portability.md +91 -0
  99. package/kit-overlay/repo-guide.md +97 -0
  100. package/lib/agents-block.mjs +52 -0
  101. package/lib/identity.mjs +65 -0
  102. package/package.json +37 -0
  103. package/scaffold/.control/decisions/.gitkeep +0 -0
  104. package/scaffold/.control/generated/.gitkeep +2 -0
  105. package/scaffold/.control/meetings/.gitkeep +0 -0
  106. package/scaffold/.control/memlog/.gitkeep +0 -0
  107. package/scaffold/.control/product-glossary.md +21 -0
  108. package/scaffold/.control/project-non-technical-log.md +23 -0
  109. package/scaffold/.control/questions/answered.md +11 -0
  110. package/scaffold/.control/questions/assumptions.md +15 -0
  111. package/scaffold/.control/questions/blocking.md +21 -0
  112. package/scaffold/.control/questions/external.md +11 -0
  113. package/scaffold/.control/registry/components.yaml +21 -0
  114. package/scaffold/.control/registry/decisions.yaml +6 -0
  115. package/scaffold/.control/registry/defects.yaml +3 -0
  116. package/scaffold/.control/registry/index.yaml +46 -0
  117. package/scaffold/.control/registry/requirements.yaml +15 -0
  118. package/scaffold/.control/registry/risks.yaml +5 -0
  119. package/scaffold/.control/registry/usecases.yaml +6 -0
  120. package/scaffold/.control/registry/waves.yaml +5 -0
  121. package/scaffold/.control/structure-codebase.md +19 -0
  122. package/scaffold/.control/structure-document.md +25 -0
@@ -0,0 +1,99 @@
1
+ ---
2
+ status: Accepted
3
+ ---
4
+
5
+ # UX Guide
6
+
7
+ **Loaded when:** running `bmad-ux`, or placing its output
8
+
9
+ `bmad-ux` produces two documents that belong to **two different layers**. That split is the whole
10
+ reason this guide exists: everything else follows from getting it right.
11
+
12
+ ## Two outputs, two layers
13
+
14
+ | Output | Home | Layer | Answers |
15
+ |---|---|---|---|
16
+ | `EXPERIENCE.md` | `.what/<pc>/04-usecases/` | Promise | What the user experiences, and what they can get done |
17
+ | `DESIGN.md` | `.how/<pc>/01-ux/` | Build | Screens, states, components, and how they are put together |
18
+
19
+ The test is the usual one. If a sentence would still be true after a full redesign, it is experience
20
+ and belongs in `.what/`. If it names a layout, a component, or a token, it is design.
21
+
22
+ Getting this backwards is expensive in a specific way: a `DESIGN.md` filed under `.what/` makes the
23
+ promise layer freeze around one visual solution, and every later redesign then reads as a broken
24
+ promise.
25
+
26
+ ## The landing zone
27
+
28
+ `bmad-ux` is a **class B** skill: it writes to a neutral landing zone at `_bmad-output/ux/`, and
29
+ `wdi-ux` — which is what dispatched it — lands the output from there.
30
+
31
+ - Output MUST land in `_bmad-output/ux/` first. A UX run MUST NOT write directly into `.what/` or
32
+ `.how/`.
33
+ - Landing MUST go through `wdi-ux`, which owns `.what/<pc>/04-usecases/` and `.how/<pc>/01-ux/`. No
34
+ other skill MAY land these files.
35
+ - Nothing is placed until the run is finalised. Half-placed UX output is worse than unplaced output,
36
+ because it looks distributed.
37
+ - A run MAY finish before there is a `<pc>` to place it into — the slicing is born at the **tail of
38
+ G2**, and a UX run belongs to G2 itself. The output then waits in `_bmad-output/ux/`, and `wdi-ux` lands it once
39
+ the component exists. Waiting is the correct state; a home MUST NOT be invented to end it.
40
+
41
+ `doc_standards` on `bmad-ux` runs `bmad-review` over both documents **at finalize** — that is, before
42
+ `wdi-ux` lands them. Reviewing afterwards would mean reviewing two files that no longer sit together.
43
+
44
+ ## Registry consequences
45
+
46
+ Placement is not finished when the files have moved.
47
+
48
+ - **Every screen in `DESIGN.md` MUST be registered as an `LC` of type `ui-screen`** in
49
+ `.control/registry/components.yaml`, with its `container`. A screen that exists in the design and not
50
+ in the registry is a change nothing will trace, and V12 catches it **at wave close**.
51
+ - A composite that is reused across screens is an `LC` of type `ui-composite`, not a screen.
52
+ - Tokens and base components — colour, type scale, spacing, buttons, inputs — MUST go to
53
+ `.how/_platform/design-system.md`, not into any one component's `01-ux/`. They cross Product
54
+ Components by definition.
55
+
56
+ Registry conversion is part of placement, not a follow-up.
57
+
58
+ ## Vocabulary
59
+
60
+ Every user-facing noun in either document MUST already exist in `.control/product-glossary.md`, used
61
+ verbatim. A new domain noun introduced by a UX run MUST be added through `wdi-blueprint` intent
62
+ `catalog` in the same pass, which owns the glossary.
63
+
64
+ This is where vocabulary drift usually enters the corpus: UX writes the words the user actually sees,
65
+ and those words are the ones that stick. When the SRS says `Anggota` and the screen says `Pengguna`,
66
+ the screen wins in practice and the corpus starts lying.
67
+
68
+ ## What UX does not decide
69
+
70
+ - **Requirements.** A UX run that discovers a needed capability has found an `FR`, and it MUST go to
71
+ the PRD through `wdi-product` intent `update` before it is designed.
72
+ - **Behaviour.** How the system responds belongs to `SRS-<pc>.md`. `EXPERIENCE.md` says what the user
73
+ perceives, not what the system does internally.
74
+ - **Architecture.** A UX need that forces a technology choice MUST become a `DEC-`, not a note in
75
+ `DESIGN.md`.
76
+
77
+ ## Passing G2
78
+
79
+ `DESIGN.md` is an **attachment** at G2, not the document being read. What the Product Owner actually
80
+ reads is `prd.md` and `EXPERIENCE.md` — and G2 gets 45 minutes, twice any other gate, precisely
81
+ because it decides two things: what is built, and how it feels to use.
82
+
83
+ The gate question that catches a weak `EXPERIENCE.md` is checklist item 4: *can I retell the main UX
84
+ flow in five sentences without opening the document?* An experience that cannot be retold has not
85
+ been decided, only drawn.
86
+
87
+ Every `[ASSUMPTION]` left in either document at finalize MUST be registered through `wdi-question`
88
+ before the gate opens.
89
+
90
+ ## Rules
91
+
92
+ - You MUST NOT edit content while placing it. If the content needs changing to fit its new home, that
93
+ is a UX revision, and it goes back through `bmad-ux`.
94
+ - `EXPERIENCE.md` MUST reference use cases by ID where the chain matters. A journey that maps to no
95
+ `UC` is either a missing use case or a promise nobody made.
96
+ - Durable UX decisions — why a pattern was chosen, what was rejected — belong in a `DEC-` or in the
97
+ run's addendum, not as prose inside `DESIGN.md`.
98
+ - The UX run folder in `_bmad-output/ux/` MUST NOT be deleted after placement. Intent *update* reads
99
+ it again.
@@ -0,0 +1,69 @@
1
+ ---
2
+ status: Accepted
3
+ ---
4
+
5
+ # Language Guide
6
+
7
+ **Loaded when:** naming anything — a code identifier, a database field, a file, a folder.
8
+
9
+ Which language a name is written in, and nothing else. Case style → `codebase/conventions-guide.md`;
10
+ legal characters → `structure-guide.md`; the right domain word → `.control/product-glossary.md`.
11
+
12
+ ## Code MUST be English
13
+
14
+ Identifiers, code files and folders, database schema (tables, columns, indexes, constraints, enum
15
+ values, migrations), and machine-facing keys (API routes and fields, config keys, environment
16
+ variables, event names, CSS classes, design tokens). An identifier sits between English keywords and
17
+ English error messages, and a second language there is where misreadings happen.
18
+
19
+ Prose **inside** code — comments, commit messages, log messages — is not a name and is not governed
20
+ here.
21
+
22
+ **One exception:** an Indonesian administrative or legal thing — `kelurahan`, `npwp`. All three MUST
23
+ hold: it already has an entry in `.control/product-glossary.md`; only the domain noun is Indonesian
24
+ (`kelurahanCode`, MUST NOT be `kodeKelurahan`); one ASCII spelling in schema, API, and code alike. An
25
+ English word being longer or less familiar does not qualify.
26
+
27
+ ## Visitor-facing URL paths MUST be English
28
+
29
+ The path a person types or copies is a name. One exception: `/bisnis` and `/{code}/bisnis` — that
30
+ surface is named in Indonesian in the product, and `/business` would be a second name for the same
31
+ thing.
32
+
33
+ ## Two settings, and everything else is not a choice
34
+
35
+ The product picks two things, both in `.control/registry/index.yaml` under `policy:`, and both
36
+ defaulting to English:
37
+
38
+ | Setting | Governs |
39
+ |---|---|
40
+ | `doc_language` | The **prose** of working documents in `.what/` · `.how/` · `.control/` |
41
+ | `doc_filename_language` | The **slug** part of a document filename |
42
+
43
+ Nothing else about language is a setting, and a skill MUST NOT ask:
44
+
45
+ - **Method terminology** — `DEC` `SRS` `SDD` `UC` `FR` `AD`, the gate names, the values of `mode` and
46
+ `risk_accepted`. One thing, one name, in every repo the method is installed in.
47
+ - **Machine-facing markers** — `[NEEDS CONFIRMATION]` `[MISSING]` `[ASSUMED]` `[PARTIAL]`, and the
48
+ `yes`/`no` in a `critical` column. They are matched by scripts, which makes them keys rather than
49
+ prose, and the rule above on registry values already covers keys.
50
+ - **Code identifiers, database columns, config keys** — §Code MUST be English, above.
51
+
52
+ **A corpus written before these settings existed MUST NOT be migrated for them.** The readers accept
53
+ both languages — `validate.py` matches `yes|ya`, and V23's keyword set is the union of both — so an
54
+ existing document keeps working and a new one is written in the chosen language. Rewriting a hundred
55
+ documents so a regex looks tidier is a cost with no buyer.
56
+
57
+ ## Document filenames — the slug follows the setting
58
+
59
+ Three parts are **not** free, because the method reads them: layer and slot folder names, document code
60
+ prefixes (`DEC-`, `FR-`), and a `YYYY-MM-DD` prefix. Those are always English and always as written.
61
+ The slug after the code follows `doc_filename_language`.
62
+
63
+ Files under `.constitution/` MUST be English whatever the settings say — they are agent instructions,
64
+ and they travel to every repo through the `wdi-method` package.
65
+
66
+ ## A wrong name MUST NOT be fixed inside an unrelated change
67
+
68
+ A rename reaches the schema, the API, and every caller. It gets a change of its own, or a ratified
69
+ row in `codebase/brownfield-guide.md`. A **new** name MUST NOT copy a wrong neighbour.
@@ -0,0 +1,169 @@
1
+ ---
2
+ status: Reference
3
+ ---
4
+
5
+ # The WDI Method — orientation
6
+
7
+ **Opened when:** you have never seen this method before, or you have and want the shape back in one reading.
8
+
9
+ This file **explains**. It does not bind — `document/*-guide.md` does, and where the two disagree the guide
10
+ wins and the disagreement is a defect to report.
11
+
12
+ Five minutes. Three files in this folder: this one for orientation, `artifact-map.md` for *"where does this
13
+ file go"*, `rationale.md` for *"why is it like this"* — open that one before changing a rule, so you know
14
+ what you are about to break.
15
+
16
+ ## What the method is
17
+
18
+ Two methods joined. **WDI** owns the flow, the gates, and the artifacts nobody else writes. **BMad** owns
19
+ the writing skills where it has one. Every BMad skill is invoked through a WDI wrapper, never directly: the
20
+ wrapper is what checks position, verifies the result against the guide, and lands the memlog.
21
+
22
+ The whole thing rests on one sentence:
23
+
24
+ > Owner time is spent at five points. Between them, the agents work alone.
25
+
26
+ ## Five gates
27
+
28
+ A gate is named for **what is decided there**, never for the work before it.
29
+
30
+ | Gate | Decides | How often | Budget |
31
+ |---|---|---|---|
32
+ | **G1 Problem** | What the problem is, whose it is, why it earns work | once | 20' |
33
+ | **G2 Product** | What is built, and how it feels to use | once per PRD | 45' |
34
+ | **G3 Blueprint** | The whole portrait: which use cases, their entities, tables, endpoints, screens, and the invariants binding them | once per **product** | 45' |
35
+ | **G4 Component** | How one Product Component is built, and what the choice costs | once per **component** | 20–30' |
36
+ | **G5 Release** | Whether it is done and proven | once per wave | 10' |
37
+
38
+ **Only G4 changes shape.** The other four are always the same, whatever the settings — and that is what lets
39
+ the whole system be held in one head.
40
+
41
+ ## Two settings, and they control different things
42
+
43
+ | Setting | Where | Controls |
44
+ |---|---|---|
45
+ | `mode` | globally in `index.yaml`, per component in `components.yaml` | **Document depth**, and only that |
46
+ | `risk_accepted` | per component | **Review intensity**, and only that |
47
+
48
+ `mode` takes `catalog` · `outline` · `guarded` · `deep`, and the default is `catalog`. A component at
49
+ `catalog` **skips G4 entirely** — its control moved to G3, where its use cases, tables, endpoints, screens,
50
+ domain model, and C4 were all approved.
51
+
52
+ `risk_accepted` takes `low` · `medium` · `high`, and its direction reads off the name: `high` means *"I
53
+ accept a lot of risk here"*, so its review is the lightest.
54
+
55
+ Keeping them apart is what lets one component be **thin on purpose and reviewed the hardest**. Why that
56
+ matters is in `rationale.md`; what each value demands is in `document/delivery-flow-guide.md`.
57
+
58
+ ## The run, first time through
59
+
60
+ | # | Step | Run | Gate |
61
+ |---|---|---|---|
62
+ | 0 | Set up | `wdi-init` intent `setup` — registry scaffolded, global `mode` set, existing documents reported, structure maps derived | — |
63
+ | 1 | Discovery and brief | `wdi-problem` | **G1** |
64
+ | 2 | PRD, one per initiative | `wdi-product` intent `prd` | **G2** |
65
+ | 2b | UX — only when the interface is a large part of the promise | `wdi-ux` | with G2 |
66
+ | 3 | Birth the components, set `mode` and `risk_accepted` | `wdi-init` intent `component` | — (tail of G2) |
67
+ | 4 | Blueprint | `wdi-blueprint` intent `catalog`, then `platform` | **G3** |
68
+ | 5 | One component's depth | `wdi-component` — as deep as its `mode`; **skipped at `catalog`** | **G4** |
69
+ | 6 | Build | `wdi-build` — opens the wave, runs `bmad-spec`, ships each story, closes the wave | **G5** |
70
+
71
+ After step 6 the next component enters at **step 5**, not at the beginning. Steps 0–4 happen once in the
72
+ life of the product.
73
+
74
+ `SPEC.md` and story files are **not read by humans**. The human review surface stops at the PRD, `.what/`,
75
+ and `.how/`.
76
+
77
+ ## The run, every time after
78
+
79
+ | Situation | Run |
80
+ |---|---|
81
+ | The next component is being taken on | `wdi-init` intent `mode` or `risk` if either needs changing → `wdi-component` → **G4** → `wdi-build` → **G5** |
82
+ | That component is at `mode: catalog` | straight to `wdi-build`. G4 is skipped |
83
+ | A promise changes where a PRD already exists | `wdi-product` intent `update` — never a second PRD for the same area |
84
+ | A new initiative with a different reader | `wdi-product` intent `prd` → `wdi-init` intent `component` if it births components |
85
+ | A small fix touching no `FR`, `UC`, `AD-N`, or domain model | Fast Path: `bmad-build` directly. It **stops and becomes a wave `S`** the moment an `FR` is touched |
86
+ | A bug, a failing test, unexpected behaviour | `wdi-systematic-debugging`, **before** any fix is proposed |
87
+ | A planning assumption turned out void | `wdi-decision` — it wraps `bmad-correct-course`, proposes, and changes nothing itself |
88
+ | An estimate or a task list is needed | `wdi-report` intent `estimate` |
89
+ | You do not know where you are | `wdi-help` |
90
+
91
+ ## Fifteen skills
92
+
93
+ Named for the **gate they serve**, so *"which skill do I run"* is answered by *"which gate am I at"*.
94
+
95
+ **Moment-bound** — running them outside their point is wrong:
96
+
97
+ | Skill | Its moment |
98
+ |---|---|
99
+ | `wdi-init` intent `setup` | before G1, once per project |
100
+ | `wdi-problem` | G1 |
101
+ | `wdi-product` | G2 |
102
+ | `wdi-init` intent `component` | tail of G2, and whenever a new PRD births a component |
103
+ | `wdi-blueprint` | G3 |
104
+ | `wdi-component` | G4 |
105
+ | `wdi-build` | G5, one wave per run |
106
+
107
+ **Anytime** — run the moment the trigger appears, without waiting for a gate:
108
+
109
+ | Skill | Its trigger |
110
+ |---|---|
111
+ | `wdi-decision` | A decision worth remembering · a void assumption · an accepted decision to carry into documents |
112
+ | `wdi-question` | Something that cannot be decided now |
113
+ | `wdi-log` | A meeting finished, or a non-technical fact now binds |
114
+ | `wdi-help` | "Where am I, what next" |
115
+ | `wdi-reconcile` | Any time. Read-only — it reports, it never edits |
116
+ | `wdi-review` | Over any document, any time |
117
+ | `wdi-systematic-debugging` | A bug, a failed test, a failed build, unexpected behaviour |
118
+ | `wdi-report` | An estimate at the start · progress periodically · before a client update |
119
+ | `wdi-init` intents `mode` · `risk` · `structure` | Any time |
120
+ | `wdi-ux` | Any time after a PRD exists, if UX is being used |
121
+
122
+ ## Who writes what — WDI and BMad
123
+
124
+ | Artifact | Written by | Wrapped in |
125
+ |---|---|---|
126
+ | Product brief | `bmad-product-brief` | `wdi-problem` |
127
+ | PRD | `bmad-prd` | `wdi-product` |
128
+ | UX | `bmad-ux` | `wdi-ux` |
129
+ | Spine + C4 | `bmad-architecture` | `wdi-blueprint` |
130
+ | **UC catalogue · actors · entities · business rules** | **nothing in BMad** | `wdi-blueprint` writes it itself |
131
+ | **SRS and all of `.what/<pc>/`** | **nothing in BMad** | `wdi-component` writes it itself |
132
+ | **SDD and all of `.how/<pc>/`** | **nothing in BMad** | `wdi-component` writes it itself |
133
+ | `SPEC.md` + stories | `bmad-spec` | `wdi-build` |
134
+ | Code | `bmad-build` · `bmad-build-auto` | `wdi-build` |
135
+ | Retrospective | `bmad-retrospective` | `wdi-build` |
136
+ | Document review | `bmad-review` | `wdi-review` |
137
+ | Course correction | `bmad-correct-course` | `wdi-decision` |
138
+
139
+ **The bold rows are why this method exists.** BMad stops at the promise and starts again at the mechanism,
140
+ and every behaviour in between had no author. Three consequences stick to those artifacts and are handled
141
+ deliberately: no `doc_standards` fires a review, no memlog is born on its own, and no template enforces
142
+ itself.
143
+
144
+ ## Where things live
145
+
146
+ | The thing in your hand | Its folder |
147
+ |---|---|
148
+ | How we work — a rule, a guide, a template | `.constitution/` |
149
+ | What currently holds — a decision, a question, a registry, a map | `.control/` |
150
+ | What is promised — the brief, a PRD, a use case, a business rule | `.what/` |
151
+ | How it is built — the spine, C4, an inventory, an SDD, a contract | `.how/` |
152
+ | A skill run's working output | `_bmad-output/` |
153
+ | Scratch that empties when the task closes | `.work/` |
154
+ | The application | `src/` · `web/` |
155
+
156
+ The test that settles anything ambiguous: **is this file still correct after its wave has passed?** Yes →
157
+ the corpus. No → `_bmad-output/`. In doubt, `document/corpus-guide.md`.
158
+
159
+ ## Model choice
160
+
161
+ | Point | Model |
162
+ |---|---|
163
+ | Decisions — proposing a slicing, wording a `DEC-`, preparing a gate | `opus@high` |
164
+ | Writing, derivation, a review-fix pass | `sonnet@high` |
165
+ | Code review panel | Two different CLI families, and never the family that wrote the code |
166
+
167
+ In a derivation pass, quality comes from the input rather than the model. Running a "find the gap" lens with
168
+ the most careful model produces the most gaps, and each one becomes an open question — a cost nobody sees
169
+ until the question list has stopped being readable.
@@ -0,0 +1,155 @@
1
+ ---
2
+ status: Reference
3
+ ---
4
+
5
+ # Artifact Map — what exists, where, and who owns it
6
+
7
+ **Opened when:** someone asks *"where does this file go"*, or *"does this document exist at my `mode`"*.
8
+
9
+ This file **explains**. It does not bind — `document/*-guide.md` does, and where the two disagree the guide
10
+ wins and the disagreement is a defect to report.
11
+
12
+ It answers three questions and nothing else: which files exist at each `mode`, who owns each one, and how
13
+ the units of work line up. The **rules** about depth live in `document/delivery-flow-guide.md`; what is
14
+ here is the map.
15
+
16
+ ## The one thing to read first
17
+
18
+ Nine things exist at **every** `mode`, including `catalog`, because they belong to the blueprint at G3 and
19
+ the depth knob does not reach the blueprint:
20
+
21
+ > the use case list · the API list · the table list with its key columns · the screen list · the domain
22
+ > model · the actor list · the spine `AD-N` · C4 L1 + L2 + L3 · cross-component business rules
23
+
24
+ That is why nobody needs a fifth mode. The request behind wanting one is almost always *"I need at minimum
25
+ the use cases, the API, and the database"* — and all three are already in `catalog`.
26
+
27
+ ## What each mode gives you, cumulatively
28
+
29
+ | `mode` | What you hold |
30
+ |---|---|
31
+ | `catalog` | The nine above. **Zero extra files per component** |
32
+ | `outline` | + `Decision Summary` · the `LC` list per component · full flows for at most 3 use cases · local business rules |
33
+ | `guarded` | + `Failure Behaviour` for every boundary · `Inherited Constraints` · third-party integration documents · boundary `LC` registered |
34
+ | `deep` | + ABCE robustness analysis · five-lane contract spec per endpoint · data dictionary per column · flow diagrams · state machines · branch scenarios · every `critical` use case gets a full flow |
35
+
36
+ Marks used below: **always** = present at all four modes, born at G1, G2, or G3 · ✓ = written at that mode
37
+ · skeleton = the file exists carrying headings and frontmatter · — = not written at all.
38
+
39
+ ## `.what/`
40
+
41
+ | File | Holds | Born | `catalog` | `outline` | `guarded` | `deep` |
42
+ |---|---|---|---|---|---|---|
43
+ | `_product-brief/brief.md` | Problem, users, measure of success, non-goals | G1 | always | always | always | always |
44
+ | `_product-brief/addendum.md` | Depth that does not fit the brief's narrative | G1 | always | always | always | always |
45
+ | `_prd/<initiative>/prd.md` | `CAP` · `FR` · `NFR` · `UJ` · one proof of done per `FR` | G2 | always | always | always | always |
46
+ | `_prd/<initiative>/addendum.md` | Rejected alternatives, option matrices, sizing | G2 | always | always | always | always |
47
+ | `<pc>/04-usecases/EXPERIENCE.md` | The user-facing journey | G2, optional | optional | optional | optional | optional |
48
+ | `business-rules.md` | `BR-N` binding more than one component | G3 | always | always | always | always |
49
+ | **`<pc>/SRS-<pc>.md`** | § Actor Register · **§ UC Catalogue — this is the use case list** · Constraints · Non-Goals · Prerequisite · Assumptions/Risks/TBC | G3 | **always** | always | always | always |
50
+ | `<pc>/03-domain/domain-model.md` | Entities · relations · columns | G3 | always | always | always | always |
51
+ | `<pc>/02-rules/rules-<pc>.md` | Rules binding only this component | G4 | — | ✓ | ✓ | ✓ |
52
+ | `<pc>/04-usecases/UC-<n>-<slug>.md` | One full flow, at most eight steps | G4 | — | max **3** | max **3** | every `critical` UC |
53
+ | `<pc>/03-domain/state-machines.md` | The lifecycle of each multi-state entity | G4 | — | — | — | ✓ |
54
+ | `<pc>/05-scenarios/SCN-<nn>-<slug>.md` | A branch that does not fit its use case file | G4 | — | — | — | ✓ |
55
+
56
+ **So `SRS-<pc>.md` exists at `mode: catalog`.** It carries the actor list and the use case catalogue. What
57
+ is absent there is the `UC-<n>-<slug>.md` files — the step-by-step flows.
58
+
59
+ Repealed: `<pc>/01-requirements/` (permanently empty; `FR` live in the PRD and the SRS cites them) and
60
+ `<pc>/supplements/` (existed for `ANX-`).
61
+
62
+ ## `.how/`
63
+
64
+ | File | Holds | Born | `catalog` | `outline` | `guarded` | `deep` |
65
+ |---|---|---|---|---|---|---|
66
+ | `_platform/ARCHITECTURE-SPINE.md` | `AD-N` — Binds · Prevents · Rule. Invariants only | G3 | always | always | always | always |
67
+ | `_platform/c4-l1-system-context.md` | System, outside actors, outside systems | G3 | always | always | always | always |
68
+ | `_platform/c4-l2-containers.md` | Containers, their technology, their relations, and the PC × container matrix. **Owns the container list** | G3 | always | always | always | always |
69
+ | `_platform/c4-l3-<container>.md` | One file per `built: true` container holding more than one Product Component | G3 | always | always | always | always |
70
+ | **`_platform/inventory-db.md`** | **Table list**: `No` · table · owning component · what it holds · **key columns** | G3 | **always** | always | always | always |
71
+ | **`_platform/inventory-api.md`** | **Endpoint list**: `No` · method · path · owning component · description · status | G3 | **always** | always | always | always |
72
+ | **`_platform/inventory-screen.md`** | **Screen list**: `No` · screen · route · owning component · actor · `UC` served | G3 | **always** | always | always | always |
73
+ | `_platform/cross-cutting.md` | One error envelope for the whole product, and the rest of what is shared | G3 | always | always | always | always |
74
+ | `_platform/design-system.md` | Tokens and base elements | G2, optional | optional | optional | optional | optional |
75
+ | `<pc>/SDD-<pc>.md` § Decision Summary | What this component is built as, and the costliest choices reversed | G4 | skeleton | ✓ | ✓ | ✓ |
76
+ | `<pc>/SDD-<pc>.md` § Structure | The `LC` list and their dependency direction | G4 | skeleton | ✓ | ✓ | ✓ |
77
+ | `<pc>/SDD-<pc>.md` § Inherited Constraints | The `AD-N` binding this component, quoted not paraphrased | G4 | — | — | ✓ | ✓ |
78
+ | **`<pc>/SDD-<pc>.md` § Failure Behaviour** | Per boundary: the other side slow, absent, or lying | G4 | — | — | **✓ every boundary** | ✓ |
79
+ | `<pc>/SDD-<pc>.md` § Robustness Analysis | ABCE per `critical` use case | G4 | — | — | — | ✓ |
80
+ | `<pc>/03-integrations/<name>.md` | A third party: who owns it, and what happens when they change it | G4 | — | — | ✓ if any | ✓ |
81
+ | `<pc>/02-contracts/00-inventory.md` | This component's endpoints, stably numbered | G4 | — | — | — | ✓ |
82
+ | `<pc>/02-contracts/<nn>-<resource>.md` | One endpoint, five lanes: auth · validation · error · rate limit · idempotency | G4 | — | — | — | ✓ |
83
+ | `<pc>/04-components/<name>.md` | Services and jobs | G4 | — | — | — | ✓ |
84
+ | `<pc>/05-model/data-model.md` | Component ERD + **data dictionary per column** | G4 | — | — | — | ✓ |
85
+ | `<pc>/06-flows/<nn>-<flow>.md` | Sequence diagram, only for money, irreversible state, or a third party | G4 | — | — | — | ✓ |
86
+ | `<pc>/01-ux/<screen>.md` | Screens and composites, **field detail per form** | G4 | — | — | — | ✓, or earlier via `wdi-ux` |
87
+
88
+ Repealed: `_platform/architecture/` (one file does not earn a folder) and `<pc>/supplements/`.
89
+
90
+ ## Registry and derived files
91
+
92
+ | File | Holds | Present at |
93
+ |---|---|---|
94
+ | `.control/registry/requirements.yaml` | `BG` · `CAP` · `FR` · `NFR` · `UJ` | every mode |
95
+ | `.control/registry/usecases.yaml` | `UC-N` with `critical` and the `FR` it satisfies | every mode |
96
+ | `.control/registry/components.yaml` → `product_components` | Component · `mode` · `risk_accepted` · `risk_note` · `owns` · `g4_passed` | every mode |
97
+ | `.control/registry/components.yaml` → `containers` | The containers from C4 L2 | every mode |
98
+ | `.control/registry/components.yaml` → `platform_owns` | Entities no Product Component's promise explains. `_platform` is not a component and has no `mode` | every mode |
99
+ | `.control/registry/components.yaml` → `logical_components` | `LC` | boundary from `guarded`; boundary + control at `deep` |
100
+ | `.control/registry/decisions.yaml` · `waves.yaml` · `defects.yaml` · `risks.yaml` · `index.yaml` | Decisions · work · defects · risks · the global `mode` and gate map | every mode |
101
+ | `.control/generated/blueprint.md` | **The one-page roll-up reviewed at G3** | every mode |
102
+ | `.control/generated/decisions.md` | The flat index of every `DEC-` | every mode |
103
+ | `.control/generated/estimate.md` | The candidate task table | every mode |
104
+ | `.control/generated/rtm` · `status` · `dag` · `components` · `risks` | Traceability and progress | every mode |
105
+
106
+ ## Who owns each file
107
+
108
+ A skill lands the output of the layer it owns, and landing is part of producing it — never a follow-up
109
+ someone else performs. `document/corpus-guide.md` holds the binding version of this table.
110
+
111
+ | Owner | Writes |
112
+ |---|---|
113
+ | `wdi-init` | The registry scaffold, `mode`, `risk_accepted`, component birth, the `SRS`/`SDD` skeletons, the two structure maps |
114
+ | `wdi-problem` | `.what/_product-brief/` |
115
+ | `wdi-product` | `.what/_prd/<initiative>/` |
116
+ | `wdi-blueprint` | `.what/<pc>/` § Actor Register + § UC Catalogue + `03-domain/domain-model.md` · `.what/business-rules.md` · `.control/product-glossary.md` · all of `.how/_platform/` except `design-system.md` |
117
+ | `wdi-component` | `.what/<pc>/` slots `02`–`05` · `.how/<pc>/` except `01-ux/` |
118
+ | `wdi-ux` | `EXPERIENCE.md` · `.how/<pc>/01-ux/` · `.how/_platform/design-system.md` |
119
+ | `wdi-build` | `waves.yaml` · `_bmad-output/specs/` · `src/` · `web/` · `.control/reports/RTR-<wave>.md` |
120
+ | `wdi-decision` | `.control/decisions/` · `decisions.yaml`, and at apply time whatever `touches` names — through each file's owner |
121
+ | `wdi-question` | `.control/questions/` |
122
+ | `wdi-log` | `.control/meetings/` · `.control/project-non-technical-log.md` |
123
+ | `wdi-report` | `.control/reports/<period>.md` |
124
+ | a script | everything in `.control/generated/`, and the three inventories once code exists |
125
+
126
+ Four skills write **no file at all**, and that is deliberate: `wdi-reconcile`, `wdi-help`,
127
+ `wdi-report` intent `dispatch`, and `wdi-review` apart from one frontmatter block. What reports MUST NOT
128
+ also change things — otherwise there is nothing left to check with.
129
+
130
+ ## How the units of work line up
131
+
132
+ `FR` is a **promise** and permanent; a wave is a **unit of work** and temporary; `SPEC.md` is the machine
133
+ contract for one wave; a story is one piece one builder takes to a green PR.
134
+
135
+ One wave = one `SPEC` = one tracker Task, and Epic = Product Component, Sub-task = story. **`FR` is not a
136
+ Task** — it travels as a label, because one `FR` can be delivered by stories in two waves and one story can
137
+ satisfy part of two `FR`.
138
+
139
+ The binding version of all of this, including why a wave MAY cross components and what has to be true
140
+ first, is in `document/delivery-flow-guide.md`. It is not restated here.
141
+
142
+ ## What needs no template, and why
143
+
144
+ Stated so the next completeness audit does not report it again:
145
+
146
+ | File | Why it has no template |
147
+ |---|---|
148
+ | `.control/generated/*` | Script output. Its shape is code, not a template |
149
+ | `.control/reports/<period>.md` | Rendered by `timeline.py` |
150
+ | `.control/project-non-technical-log.md` | States its own entry shape in its own header, and there is exactly one such file |
151
+ | `SPEC.md` · story files | They belong to `bmad-spec`. WDI does not write their shape, and MUST NOT |
152
+ | Registry `*.yaml` | Their shape is the comment block at the head of each file, plus the validator |
153
+
154
+ Everything else in this map has a template in `document/templates/` — 27 of them, and every row above is
155
+ covered by one.
@@ -0,0 +1,91 @@
1
+ ---
2
+ status: Reference
3
+ ---
4
+
5
+ # Portability — what is method, what is product
6
+
7
+ **Opened when:** carrying a method change into the WDI Method package, or installing
8
+ the method in a product repo.
9
+
10
+ This file **explains**. It does not bind. Installing is the act, and that act lives in
11
+ the WDI Method package README plus `wdi-method` (`install` · `update` · `promote` ·
12
+ `verify`). Where this file and that README disagree, the README wins and the
13
+ disagreement is a defect.
14
+
15
+ It exists so that "promote the method, leave the product" is not a fresh re-reading of
16
+ fifty files every time.
17
+
18
+ ## The seam
19
+
20
+ Most of `.constitution/` is portable as it stands. A handful name **this product**, and in most of
21
+ them only an *example* does — not a rule.
22
+
23
+ | File | What is this product's | What to do when carrying it |
24
+ |---|---|---|
25
+ | `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
+ | `document/architecture-guide.md` | Seed examples of stack and tree shape | Re-point the examples. Every rule around them travels |
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
+ | `templates/design-system.md` | The pointer to wherever this project keeps its tokens | Re-point at that project's token file |
29
+ | `templates/oq.md` | One example of a bad question title | Cosmetic |
30
+
31
+ Everything else — the five gates, the two fields, the fifteen skills, the templates, `validate.py`,
32
+ `inventory.py`, `method-glossary.md`, and the three files beside this one — carries without edit.
33
+
34
+ ## What does NOT travel
35
+
36
+ | Stays behind | Why |
37
+ |---|---|
38
+ | `.control/` | This product's state. A new project scaffolds its own through `wdi-init` intent `setup`, or receives empty stubs on first `install` |
39
+ | `.what/` · `.how/` | This product's promises and build |
40
+ | `.constitution/codebase/*-guide.md` | Written by the **project**, not the method. They ship as empty `Draft` stubs |
41
+ | `_bmad-output/` | Run workspace |
42
+ | The `bmad-*` skills themselves | BMad's, installed by BMad. Only `_bmad/custom/*.toml` is ours |
43
+
44
+ ## What travels beside `.constitution/`
45
+
46
+ The method is not `.constitution/` alone. Three sets move together, and carrying one without the
47
+ others leaves a method that cannot run:
48
+
49
+ | Set | Note |
50
+ |---|---|
51
+ | `.constitution/` | Minus the product articles; `promote` / `install` handle the seam |
52
+ | `.claude/skills/wdi-*/` (and `.agents/skills/wdi-*/` when those agents are selected) | Every wrapper. A wrapper without its guide, or a guide without its wrapper, is half a method |
53
+ | `_bmad/custom/*.toml` | The one most likely to be forgotten. `*.user.toml` stays behind |
54
+ | `AGENTS.md` | The routing table is the method; from `## Code` down is the product. `install` / `update` MUST NOT overwrite an existing `AGENTS.md` |
55
+
56
+ ## Two directions
57
+
58
+ ```
59
+ a product repo with a newer working copy of the method
60
+ --promote-->
61
+ WDI Method (this package)
62
+ --install / update-->
63
+ product repos
64
+ ```
65
+
66
+ - **Promote** copies the method *up* once it has settled in a working copy.
67
+ - **Install / update** copies that snapshot *out* to a repo that consumes it.
68
+ - Do not run `update` against a repo you are about to promote from — that would overwrite the newer copy.
69
+ - There is no SHA lock and no per-file increment. The snapshot is the unit. The package version on npm / GitHub is the name of that snapshot.
70
+
71
+ ## Installing in a fresh repo
72
+
73
+ BMad first (`npx bmad-method install`), then WDI Method. There is no numbered install runbook:
74
+ the steps that a runbook used to carry are now `wdi-init` intent `setup`. The order the acts come in:
75
+
76
+ 1. `npx bmad-method install` in the product repo.
77
+ 2. `npx wdi-method install` (optionally `--agents …`).
78
+ 3. Set `product.name` in `.control/registry/index.yaml`. Rewrite `constitution.md` Articles 2 and 5.
79
+ 4. Merge the method routing into `AGENTS.md` if that file already existed.
80
+ 5. Run `wdi-init` intent `setup`.
81
+ 6. Sort what already existed. A file that is already the artifact one slot asks for goes into that
82
+ slot through the skill that owns it; everything else goes to `_bmad-output/prior-knowledge/`.
83
+ `corpus-guide.md` owns that test.
84
+ 7. Then G1 — which confirms `product.name` and writes the brief under that name.
85
+
86
+ **Two things a fresh install MUST NOT do:**
87
+
88
+ - Set `mode` and `risk_accepted` before the components exist. They are per-component fields, and the
89
+ components are born at the tail of G2.
90
+ - Fill `.control/generated/` by hand. It is script output, and a hand-written table there is the one
91
+ lie no validator catches.