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,146 @@
1
+ ---
2
+ type: sdd
3
+ component: '{pc}'
4
+ status: draft # draft · reviewed · locked · superseded
5
+ created: '{YYYY-MM-DD}'
6
+ updated: '{YYYY-MM-DD}'
7
+ realizes: [] # UC ids this design realizes, from usecases.yaml
8
+ binds: [] # AD ids from the spine that bind here
9
+ reviewed: # V13. Diisi hanya setelah bmad-review benar-benar dijalankan
10
+ date: '' # '{YYYY-MM-DD}'
11
+ sha: '' # commit it was reviewed at; without the SHA, staleness cannot be measured
12
+ lenses: [] # the set risk_accepted names — NOT a fixed list
13
+ ---
14
+
15
+ # SDD — {Product Component}
16
+
17
+ <!-- TEMPLATE GUIDE — act on these comments, then delete them. Never emit a comment in a finished
18
+ SDD. Headings stay English; prose is Bahasa Indonesia with technical terms left in English. -->
19
+
20
+ <!-- NOT an HLD, and NOT a one-shot LLD. What the system consists of belongs to C4 L1-L2; architecture
21
+ constraints belong to ARCHITECTURE-SPINE.md; deployment topology belongs to the devops repository.
22
+ This document is LIVING: one per Product Component, amended every wave. -->
23
+
24
+ <!-- EVERY SECTION MARKS THE MINIMUM `mode` THAT DEMANDS IT. Below that minimum it MUST NOT be written
25
+ to fill a slot; above it, it is required. Read the component's mode from its row in
26
+ components.yaml, falling back to `mode:` in index.yaml.
27
+
28
+ At mode: catalog this file is a SKELETON — this frontmatter and these headings, and nothing else.
29
+ That is a FINISHED state, not an unfinished one: G4 is skipped at catalog, and the code is written
30
+ from the use case catalogue, the three inventories, and C4.
31
+
32
+ `reviewed.lenses` MUST match what risk_accepted names, NOT what `mode` says. One component MAY sit
33
+ at catalog and still be reviewed the hardest. -->
34
+
35
+ ## Decision Summary · [outline]
36
+
37
+ <!-- <=1 page, business language. What this component is built as, and the one or two choices that cost
38
+ the most to reverse. This is what the Product Owner reads at G4. -->
39
+
40
+ ## Structure · [outline]
41
+
42
+ <!-- The Logical Components and how they depend on each other. Carry the dependency direction — it IS a
43
+ rule, not decoration.
44
+
45
+ Every LC named here MUST be registered in .control/registry/components.yaml, and the registration
46
+ is checked WHEN THE WAVE CLOSES — V12 — not before a story is ready-for-dev. The old timing
47
+ demanded the answer at the moment the information was thinnest. -->
48
+
49
+ | LC | type | Responsibility |
50
+ | --- | --- | --- |
51
+
52
+ ## Inherited Constraints · [guarded]
53
+
54
+ <!-- Every AD-N from ARCHITECTURE-SPINE.md that reaches this component, QUOTED VERBATIM under its
55
+ ORIGINAL id. A paraphrase drifts, and the drift is invisible because both texts read reasonably.
56
+
57
+ A local choice contradicting one is a conflict to surface through wdi-decision, never an override
58
+ made here. Below `guarded` this section is absent and the AD-N still binds — an invariant does not
59
+ stop holding because a document is thin. -->
60
+
61
+ | AD | Quoted rule | How it lands here |
62
+ | --- | --- | --- |
63
+
64
+ ## Failure Behaviour · [guarded]
65
+
66
+ <!-- PER BOUNDARY, and every boundary. This section STANDS WITHOUT the ABCE pass below, and that is
67
+ what makes `guarded` worth having: the boundary list already exists in
68
+ .how/_platform/inventory-api.md and inventory-screen.md, each with an owning-component column.
69
+ Do not derive it again.
70
+
71
+ For each: what happens when the thing on the other side is slow, absent, or lying. "Returns an
72
+ error" is not an answer. G4 asks this as a starred question from guarded up.
73
+
74
+ A failure mode that turns out to be a PROMISE — a refund path, a partial save — goes to the SRS
75
+ first, and becomes a scenario on the .what side. -->
76
+
77
+ | Boundary | Slow | Absent | Lying | What the user sees | What is logged |
78
+ | --- | --- | --- | --- | --- | --- |
79
+
80
+ ## Robustness Analysis · [deep]
81
+
82
+ <!-- The ABCE pass, in order: Boundary -> Control -> Entity -> Behaviour. For every UC marked
83
+ `critical` in the paired SRS.
84
+
85
+ It MUST NOT have appeared in the SRS, and below `deep` it MUST NOT be written at all. Failure
86
+ Behaviour above does not need it. -->
87
+
88
+ ## Design Notes
89
+
90
+ <!-- Only what a builder cannot read off compliant code. Rationale lives in the memlog and in DEC-;
91
+ restating it here creates a second version that drifts. Cut this section when it is empty. -->
92
+
93
+ ## Evidence
94
+
95
+ <!-- Required whenever this document describes code that ALREADY EXISTS — brownfield, and equally when
96
+ a component's `mode` was raised after its code was running. What is written then is an AS-BUILT
97
+ RECORD, not a design.
98
+
99
+ Every technical claim MUST name the file that proves it. Four labels, and they are mandatory:
100
+ [ASSUMED] we decided to believe it; nothing was read that confirms it
101
+ [PARTIAL] verified for part of the surface — and it MUST say which part is not
102
+ [NEEDS CONFIRMATION] a question with an owner, filed through wdi-question
103
+ [MISSING] checked, and the thing described is NOT there
104
+
105
+ An unlabelled claim is read as verified. A claim MUST NOT be raised because it survived several
106
+ readings — familiarity is not evidence.
107
+
108
+ [MISSING] MUST NOT be deleted. It is the only surviving evidence that somebody once believed the
109
+ thing existed. Each is dispositioned as a BUG-, a correction, or planned work, and an unresolved
110
+ one MUST NOT pass G4. -->
111
+
112
+ | Claim | Label | Read to decide | Disposition |
113
+ | --- | --- | --- | --- |
114
+
115
+ ---
116
+
117
+ ## Slots
118
+
119
+ <!-- The numbers are ABCE CLASSIFICATION — Boundary, Control, Entity, behaviour — NOT reading order.
120
+ This is the opposite of .what/<pc>/. The two MUST NOT be conflated.
121
+
122
+ Content SHOULD stay in this kernel until the file grows past roughly 400 lines — a suggestion, not
123
+ a threshold.
124
+
125
+ 01-ux/ [deep], or earlier through wdi-ux. Screens and composites; LC types ui-screen,
126
+ ui-composite. This slot belongs to wdi-ux, not to wdi-component.
127
+ Base tokens and elements do NOT land here — .how/_platform/design-system.md
128
+ 02-contracts/ [deep]. 00-inventory.md FIRST, then one spec per endpoint carrying its stable
129
+ number. Every spec answers all five lanes — auth, validation, error, rate
130
+ limiting, idempotency — with `none` and a reason where one does not apply.
131
+ Error responses reference the envelope in _platform/cross-cutting.md, never
132
+ restate it. LC type gateway
133
+ 03-integrations/ [guarded], when the component consumes a third party. From templates/
134
+ integration.md. LC type gateway
135
+ 04-components/ [deep]. Services and jobs. LC types service, job
136
+ 05-model/ [deep]. Schema and storage, INCLUDING the data dictionary per column — a diagram
137
+ alone does not say what a column means. LC type store
138
+ 06-flows/ [deep]. Sequence diagrams ONLY for flows involving money, irreversible state, or
139
+ a third party. Lane order is fixed once for the project in
140
+ codebase/conventions-guide.md; the No-op lane rule is REPEALED
141
+
142
+ supplements/ is REPEALED along with the ANX- concept it existed for. -->
143
+
144
+ ## Open Items
145
+
146
+ <!-- Unresolved design questions, each pointing at its row in .control/questions/. -->
@@ -0,0 +1,149 @@
1
+ ---
2
+ type: srs
3
+ component: '{pc}'
4
+ status: draft # draft · reviewed · locked · superseded
5
+ created: '{YYYY-MM-DD}'
6
+ updated: '{YYYY-MM-DD}'
7
+ satisfies: [] # FR / NFR ids this component carries, from requirements.yaml
8
+ reviewed: # V13. Diisi hanya setelah bmad-review benar-benar dijalankan
9
+ date: '' # '{YYYY-MM-DD}'
10
+ sha: '' # commit it was reviewed at; without the SHA, staleness cannot be measured
11
+ lenses: [] # the set risk_accepted names — NOT a fixed list
12
+ ---
13
+
14
+ # SRS — {Product Component}
15
+
16
+ <!-- TEMPLATE GUIDE — act on these comments, then delete them. Never emit a comment in a finished
17
+ SRS. Section headings stay English; the prose inside is Bahasa Indonesia, with technical terms
18
+ left in English per the controlled vocabulary. -->
19
+
20
+ <!-- NOT a one-shot document. Despite the IEEE name, this SRS is LIVING: one per Product Component,
21
+ amended every wave, never signed off and frozen. -->
22
+
23
+ <!-- TWO SKILLS WRITE IT, AT TWO GATES, and every section below says which:
24
+ [G3] wdi-blueprint intent `catalog`. Exists at EVERY mode, including catalog
25
+ [G4] wdi-component intent `behaviour`, only as deep as the component's mode
26
+
27
+ So this file EXISTS at mode: catalog. It carries the actor list and the use case catalogue, and
28
+ what is absent there is 04-usecases/UC-<n>-<slug>.md — the step-by-step flows.
29
+
30
+ `reviewed.lenses` MUST match what this component's risk_accepted names in components.yaml —
31
+ edge-case-hunter at low and medium, structure + prose at high. It is NOT read off `mode`. -->
32
+
33
+ ## Decision Summary · [G3]
34
+
35
+ <!-- <=1 page, business language, no jargon lacking a Glossary entry. What the Product Owner reads.
36
+ A summary that cannot be read inside the gate's time budget IS the finding. -->
37
+
38
+ ## Why · [G3]
39
+
40
+ <!-- Why this component exists as a separate thing. One paragraph. If it reads the same as another
41
+ component's Why, the boundary is wrong. -->
42
+
43
+ ## Actor Register · [G3]
44
+
45
+ <!-- SSOT for actors, referenced by the SDD. MUST stay in this kernel, never split into a slot. Two
46
+ actors that turn out to be the same person MUST be merged, and G3 asks exactly this.
47
+
48
+ A variant of one actor that differs only in what is shown to them is NOT a second actor. -->
49
+
50
+ | Actor | Who they are | What they may do |
51
+ | --- | --- | --- |
52
+
53
+ ## UC Catalogue · [G3]
54
+
55
+ <!-- THE use case list, and at mode: catalog it is the whole use-case record. One line each, and the
56
+ line is the artifact — not a placeholder waiting for a file.
57
+
58
+ A title MUST be a sentence a user would say, never a system term. G3 asks this as a starred
59
+ question.
60
+
61
+ `critical` is yes ONLY when the use case touches money, personal data, or an irreversible action.
62
+ Nothing else. If more than a third of this component's use cases are marked, the definition was
63
+ misapplied — derive it again rather than negotiating it.
64
+
65
+ `critical` decides something only at mode: deep, where every critical UC gets a full flow. -->
66
+
67
+ | id | Use case | Actor | Satisfies | critical |
68
+ | --- | --- | --- | --- | --- |
69
+ | UC-{n} | {a sentence a user would say} | {from the Actor Register} | {FR-n} | tidak |
70
+
71
+ ## Constraints · [G3]
72
+
73
+ <!-- What this component MUST work within, and where each comes from — a business rule, a regulation,
74
+ an external system, an applied DEC-, an AD-N. A constraint with no source is an assumption in
75
+ disguise; file it through wdi-question instead. -->
76
+
77
+ ## Non-Goals · [G3]
78
+
79
+ <!-- What this component explicitly does NOT do, and which component does it instead. This does more
80
+ work than it looks: it is what stops the next builder adding a nearby thing here. -->
81
+
82
+ ## Prerequisite · [G3]
83
+
84
+ <!-- What MUST already exist before this component can behave as described — another component, an
85
+ external system, a dataset, a credential. A prerequisite waiting on somebody outside belongs in
86
+ .control/questions/external.md, and that file holds go-live only, never a design gate. -->
87
+
88
+ ## Success Signal · [G3]
89
+
90
+ <!-- How we will know this component works — observable, not aspirational. Scales with stakes: a
91
+ sentence for a small component, a measure with a target for one touching money or personal data. -->
92
+
93
+ ## Assumptions, Risks, and To Be Confirmed · [G3]
94
+
95
+ <!-- THREE separate lists, and collapsing them loses the owner. An assumption is something we decided
96
+ to believe; a risk is something that may go wrong; a to-be-confirmed is a question with an owner.
97
+
98
+ Every to-be-confirmed MUST be filed through wdi-question before the gate opens — into
99
+ assumptions.md by default, blocking.md only through the three tests that file states. -->
100
+
101
+ ### Assumptions
102
+
103
+ ### Risks
104
+
105
+ ### To Be Confirmed
106
+
107
+ ## Gate Checklist · [G3]
108
+
109
+ <!-- The gate questions as they apply to THIS component, answered ya / tidak / ubah. The full list
110
+ lives in delivery-flow-guide.md and MUST NOT be copied here. At mode: catalog only the starred
111
+ questions are asked. -->
112
+
113
+ ## Design Reference · [G3]
114
+
115
+ <!-- One line pointing at the paired SDD, plus any AD-N or applied DEC- that binds this component.
116
+ Nothing else — solution shape MUST NOT appear in this document: no framework, no table, no
117
+ endpoint, no class, no queue, no file path. -->
118
+
119
+ ---
120
+
121
+ ## Slots
122
+
123
+ <!-- All slot content is [G4], written by wdi-component intent `behaviour` and only as deep as the
124
+ component's mode. At catalog every slot stays empty, and that is a finished state.
125
+
126
+ Content SHOULD stay in this kernel until the file grows past roughly 400 lines — a suggestion,
127
+ not a threshold. When it must split, the FIRST slot broken out SHOULD be 04-usecases/.
128
+
129
+ The numbers are READING ORDER, not classification. This is the opposite of .how/<pc>/, where
130
+ 01-06 classify by ABCE. The two MUST NOT be conflated.
131
+
132
+ 02-rules/ rules-<pc>.md — business rules binding ONLY this component. From mode: outline.
133
+ A rule that turns out to bind a second component is PROMOTED to
134
+ .what/business-rules.md through wdi-blueprint, never copied
135
+ 03-domain/ domain-model.md — entities, relations, columns. [G3], exists at every mode.
136
+ state-machines.md — from mode: deep only.
137
+ NOT a database schema; column types MUST NOT appear here
138
+ 04-usecases/ UC-<n>-<slug>.md, one file per full flow. At most 3 at outline and guarded;
139
+ every critical UC at deep. At most EIGHT steps each — a flow needing more is
140
+ either two use cases or has started describing implementation
141
+ 05-scenarios/ SCN-<nn>-<slug>.md, long branches hanging off one UC. From mode: deep only
142
+
143
+ 01-requirements/ and supplements/ are REPEALED. The first was permanently empty — FR live in the
144
+ PRD and this document cites them by id. The second existed for the ANX- concept, which is gone. -->
145
+
146
+ ## Open Items
147
+
148
+ <!-- Anything still unresolved, each pointing at its row in .control/questions/. An assumption left
149
+ here with no id is the failure wdi-question exists to prevent. -->
@@ -0,0 +1,129 @@
1
+ ---
2
+ type: structure
3
+ scope: codebase
4
+ verified: '{YYYY-MM-DD}' # the day the tree was actually read
5
+ commit: '{sha}' # the commit it was read at — staleness is measured against this
6
+ ---
7
+
8
+ # Codebase Structure
9
+
10
+ <!-- TEMPLATE GUIDE — act on these comments, then delete them.
11
+
12
+ This file is DESCRIPTIVE. It states what the code tree looks like today. It MUST NOT carry
13
+ naming rules (conventions-guide.md), versions (stack-guide.md), or ratified legacy shapes
14
+ (brownfield-guide.md) — reference them instead.
15
+
16
+ Written and refreshed only by `wdi-init` intent `structure`, never by hand. Rules for both maps live in
17
+ .constitution/structure-guide.md.
18
+
19
+ THE SHAPE: annotated trees, not prose. Folders are complete; files are marked ★ inline and only
20
+ when they earn it. A tree that lists every file is unmaintainable, and an unmaintainable map
21
+ stops being read — that is how every source-tree document before this one died.
22
+
23
+ THREE SECTIONS, and the split is by DEPLOYABILITY, not by size or importance:
24
+ Top level every base folder in the repo root
25
+ Container runs or deploys on its own — the same word C4 L2 and components.yaml use
26
+ Library an includable artifact — compiled or imported into something else, never run
27
+
28
+ "Container" is the kit's word, defined in templates/c4.md and carried by every LC's `container`
29
+ field. It MUST NOT be swapped for "application", "service", or "app" here — a synonym for a
30
+ term that already has a glossary entry is drift, and `wdi-reconcile` hunts for it. It does not
31
+ mean a Docker image; packaging is a separate question.
32
+
33
+ A unit that is neither is not a unit; it stays a line in Top level. When a unit stops being
34
+ separately deployable, it MUST move sections rather than keep its old heading. -->
35
+
36
+ ## Verified
37
+
38
+ <!-- One line: date, commit SHA, and how the tree was read. If the commit is no longer an ancestor
39
+ of HEAD, this map is stale and MUST be refreshed before a gate reads it. -->
40
+
41
+ ## Top level
42
+
43
+ <!-- Every base folder in the repo root, COMPLETE — including the dull ones. An unlisted folder is
44
+ the one people misuse, because nothing told them what it was for. Tag each entry so the two
45
+ sections below are predictable: [container] · [lib] · [docs] · [tooling] · [generated]. One
46
+ line of purpose per entry; no second line. -->
47
+
48
+ ```text
49
+ {repo-root}/
50
+ ├── {unit}/ # [container] what it is answerable for
51
+ ├── {unit}/ # [lib] ...
52
+ └── {folder}/ # [docs] ...
53
+ ```
54
+
55
+ ## Containers
56
+
57
+ <!-- One subsection per unit that runs or deploys on its own. Repeat the block below verbatim per
58
+ unit; if there is only one, there is still a subsection — a repo grows a second container
59
+ without warning.
60
+
61
+ Heading names MUST match the `container` values used in components.yaml, so an LC's container
62
+ can be checked against this map instead of trusted. A container with no code in this repo MUST
63
+ NOT get a subsection — it belongs to c4-l2-containers.md. A folder that builds more than one
64
+ container MUST say which. -->
65
+
66
+ ### {container}
67
+
68
+ <!-- One line: what it is, and how it ships. Then the tree: folder convention first, ★ on the files
69
+ that earn it. Descend only until directories stop carrying distinct roles, and describe a
70
+ repeating shape ONCE with a placeholder such as <feature>/ rather than per instance. -->
71
+
72
+ ```text
73
+ {container}/
74
+ ├── {entry-file} # ★ ENTRY: what execution actually does first
75
+ ├── {folder}/ # convention: what belongs here
76
+ │ └── {file} # ★ why this one is key
77
+ └── {folder}/<feature>/ # the shape every feature repeats
78
+ ├── {sub}/ # what goes in it
79
+ └── {sub}/ # ...
80
+ ```
81
+
82
+ <!-- One line, only when the unit has one: the authoritative call direction through those folders.
83
+ A builder who gets this wrong writes code that works and is still wrong. Cut if there is none;
84
+ do not invent one to fill the slot. -->
85
+
86
+ **Flow:** {layer} → {layer} → {layer}
87
+
88
+ ## Libraries
89
+
90
+ <!-- One subsection per includable artifact — compiled into or imported by something else, never
91
+ deployed on its own. A library is deliberately NOT a container, and MUST NOT appear at C4 L2.
92
+
93
+ Same block shape as a container, minus the entry point: a library that has one is a container
94
+ wearing the wrong label. -->
95
+
96
+ ### {library}
97
+
98
+ <!-- One line: what it holds, and who consumes it. Then the annotated tree. -->
99
+
100
+ ```text
101
+ {library}/
102
+ ├── {folder}/ # convention: what belongs here
103
+ │ └── {file} # ★ why this one is key
104
+ └── {folder}/
105
+ ```
106
+
107
+ **Consumed by:** {units}
108
+
109
+ ## Generated
110
+
111
+ <!-- Anything not written by hand, with its generator: codegen output, vendored trees, migration
112
+ snapshots. A generated folder edited by hand is a defect, so it MUST be named here even when it
113
+ looks like ordinary source. Cut the section if there is none. -->
114
+
115
+ | Path | Generated by |
116
+ | --- | --- |
117
+
118
+ ## Unclaimed
119
+
120
+ <!-- Folders that exist but no one can state a purpose for. These are findings, not layout. Leave
121
+ them here, named, until they are claimed or deleted — inventing a purpose to empty this section
122
+ is the failure mode it exists to catch. Cut the section only when it is genuinely empty. -->
123
+
124
+ ---
125
+
126
+ <!-- Keep this legend last, and keep it one line. -->
127
+
128
+ ★ = key file: entry point, wiring root, the single place a rule is enforced, or a file that must be
129
+ opened before behaviour in its folder can be changed.
@@ -0,0 +1,90 @@
1
+ ---
2
+ type: structure
3
+ scope: document
4
+ verified: '{YYYY-MM-DD}' # the day the tree was actually read
5
+ commit: '{sha}' # the commit it was read at — staleness is measured against this
6
+ ---
7
+
8
+ # Document Structure
9
+
10
+ <!-- TEMPLATE GUIDE — act on these comments, then delete them.
11
+
12
+ This file is DESCRIPTIVE. It states which parts of the corpus actually carry content today.
13
+ The layers themselves, the placement test, the naming scheme, and slot numbering all belong to
14
+ corpus-guide.md and MUST NOT be restated here.
15
+
16
+ Written and refreshed only by `wdi-init` intent `structure`, never by hand. Rules for both maps live in
17
+ .constitution/structure-guide.md.
18
+
19
+ Same shape as the codebase map: annotated trees, folders complete, ★ inline on the documents
20
+ that earn it. What differs is the split — the codebase map splits by deployability, this one
21
+ splits by LAYER, because that is the axis a reader is lost on.
22
+
23
+ The five roots are fixed, so the top-level tree is not a discovery. Which sub-folders carry
24
+ content, which Product Component folders exist, and which slots have been split out of a kernel
25
+ ARE, and that is what this map is for. -->
26
+
27
+ ## Verified
28
+
29
+ <!-- One line: date, commit SHA, and how the tree was read. If the commit is no longer an ancestor
30
+ of HEAD, this map is stale and MUST be refreshed before a gate reads it. -->
31
+
32
+ ## Top level
33
+
34
+ <!-- The five roots, one line each, with the state of each: populated, or still empty. Mark an empty
35
+ root as empty rather than dropping it — a dropped root reads as a root that does not exist. -->
36
+
37
+ ```text
38
+ .constitution/ # how we work — {state}
39
+ .control/ # what currently holds — {state}
40
+ .what/ # what was promised — {state}
41
+ .how/ # how it is built — {state}
42
+ _bmad-output/ # work in progress, not curated — {state}
43
+ ```
44
+
45
+ ## Per layer
46
+
47
+ <!-- One subsection per root that carries content. Annotated tree: sub-folders complete, ★ on the
48
+ single-copy documents a reader must find first. Per-Product-Component folders are NOT expanded
49
+ here — the table below owns them, and expanding both means maintaining both. -->
50
+
51
+ ### {layer}
52
+
53
+ ```text
54
+ {layer}/
55
+ ├── {folder}/ # what belongs here
56
+ │ └── {file} # ★ why this one is key
57
+ └── {folder}/ # {state}
58
+ ```
59
+
60
+ ## Product Components
61
+
62
+ <!-- One row per PC that actually exists. Both sides are expected: a PC with an SRS and no SDD, or
63
+ the reverse, is drift and MUST be listed under Findings rather than normalised here. List only
64
+ the slots that have been split out of a kernel; empty slots stay unlisted. -->
65
+
66
+ | Product Component | `.what/<pc>/` | `.how/<pc>/` | Slots split out |
67
+ | --- | --- | --- | --- |
68
+
69
+ ## Registries and generated
70
+
71
+ <!-- Which registry files carry entries and which are still empty skeletons, and which generated
72
+ tables have been produced. Generated output is never written by hand; naming it here is what
73
+ makes a hand edit visible. -->
74
+
75
+ | File | State |
76
+ | --- | --- |
77
+
78
+ ## Findings
79
+
80
+ <!-- Drift this map surfaced while being derived: a PC on one side only, a supplement with no
81
+ citation, a folder outside the five roots, a document whose home contradicts corpus-guide.md.
82
+ Findings are reported, never fixed here — fixing them is `wdi-reconcile` work, or the owning
83
+ skill's.
84
+ Cut the section only when it is genuinely empty. -->
85
+
86
+ ---
87
+
88
+ <!-- Keep this legend last, and keep it one line. -->
89
+
90
+ ★ = key document: single-copy, referenced from elsewhere, or the first thing a reader must find.
@@ -0,0 +1,69 @@
1
+ ---
2
+ type: uc
3
+ id: UC-{NN} # allocated from .control/registry/usecases.yaml
4
+ component: '{pc}'
5
+ satisfies: [] # FR ids — V2 checks every FR has at least one UC
6
+ critical: false # true ONLY when it touches money, personal data, or an irreversible
7
+ # action. Nothing else — the two elastic criteria are repealed
8
+ created: '{YYYY-MM-DD}'
9
+ ---
10
+
11
+ # UC-{NN} — {a sentence the user would say}
12
+
13
+ <!-- TEMPLATE GUIDE — act on these comments, then delete them.
14
+
15
+ THE TITLE RULE, and G3 asks it as a starred question: the title MUST be a sentence a user would
16
+ actually say — "Mendaftar lewat tautan sponsor" — and MUST NOT be a system term — "Referral
17
+ attribution handler". A system-shaped title means the functional analysis has already leaked
18
+ into design.
19
+
20
+ WHICH USE CASES GET ONE OF THESE FILES IS DECIDED BY `mode`, NOT BY `critical`:
21
+ catalog none. The catalogue line in the SRS is the whole record
22
+ outline · guarded the use cases the component exists for, AT MOST 3
23
+ deep every UC marked `critical`
24
+ `critical` therefore decides something only at `deep`. Everywhere else it is a label the estimate
25
+ and the review read, and it MUST NOT be used to justify writing a file the mode does not ask for.
26
+
27
+ At most EIGHT steps in the Basic Flow. A flow needing more is either two use cases, or it has
28
+ started describing implementation. -->
29
+
30
+ ## Trigger
31
+
32
+ <!-- What starts this. An actor doing something, a schedule, or an external event. -->
33
+
34
+ ## Precondition
35
+
36
+ <!-- What MUST already be true. Authentication state, prior data, prior status. -->
37
+
38
+ ## Main Flow
39
+
40
+ <!-- Numbered, one step per line, alternating actor and system. Keep to the happy path — branches
41
+ go below or, if long, into a SCN- file in 05-scenarios/. No screen names, no endpoints, no
42
+ table names: this is behaviour, not design. -->
43
+
44
+ 1.
45
+ 2.
46
+
47
+ ## Alternate Flows
48
+
49
+ <!-- Branches that still end in success. Reference the main-flow step they leave from. -->
50
+
51
+ | From step | Condition | What happens |
52
+ | --- | --- | --- |
53
+
54
+ ## Failure Flows
55
+
56
+ <!-- Branches that end without the goal. For a `critical` UC this section MUST answer "what happens
57
+ if it fails halfway" — the paired SDD carries the technical side of the same question. -->
58
+
59
+ | From step | Failure | What the system does | What the user is left with |
60
+ | --- | --- | --- | --- |
61
+
62
+ ## Outcome
63
+
64
+ <!-- The state the system and the user are left in when the main flow completes. -->
65
+
66
+ ## Business Rules
67
+
68
+ <!-- BR ids that govern this use case, referenced not restated. The rules themselves live in
69
+ 02-rules/. -->
@@ -0,0 +1,77 @@
1
+ ---
2
+ type: ux
3
+ component: '{pc}'
4
+ document: design # design (.how/<pc>/01-ux/) · experience (.what/<pc>/04-usecases/)
5
+ created: '{YYYY-MM-DD}'
6
+ updated: '{YYYY-MM-DD}'
7
+ ---
8
+
9
+ # {DESIGN | EXPERIENCE} — {Product Component}
10
+
11
+ <!-- TEMPLATE GUIDE — act on these comments, then delete them.
12
+
13
+ bmad-ux produces TWO documents, and they fall in two different layers. This template covers
14
+ both; set `document` and keep only that half.
15
+
16
+ DESIGN.md → .how/<pc>/01-ux/ visual: tokens, components, layout
17
+ EXPERIENCE.md → .what/<pc>/04-usecases/ behaviour: IA, states, journeys, accessibility
18
+
19
+ Keeping them in one file — as most projects do — makes a button-colour change and a flow change
20
+ look equally weighty. They are not.
21
+
22
+ Neither lands by itself. bmad-ux writes to _bmad-output/ux/ and wdi-ux lands it. Base
23
+ tokens and shared elements do NOT stay per-component; they go to
24
+ .how/_platform/design-system.md. -->
25
+
26
+ ## DESIGN — visual
27
+
28
+ <!-- Keep only when document: design. -->
29
+
30
+ ### Tokens
31
+
32
+ <!-- What is component-specific. Anything reusable MUST be promoted to design-system.md instead —
33
+ a token defined twice is a token that will diverge. -->
34
+
35
+ ### Screens
36
+
37
+ <!-- One row per screen. Each MUST be registered as an LC of type ui-screen in components.yaml —
38
+ wdi-ux does this in the same act as landing the screen, and V12 checks it at wave close. -->
39
+
40
+ | Screen | LC | Purpose |
41
+ | --- | --- | --- |
42
+
43
+ ### Layout and states
44
+
45
+ <!-- Per screen: the states it can be in — empty, loading, error, populated. The empty and error
46
+ states are the ones that get skipped and the ones users hit first. -->
47
+
48
+ ---
49
+
50
+ ## EXPERIENCE — behaviour
51
+
52
+ <!-- Keep only when document: experience. This half is WHAT, not HOW: it says what the user can do
53
+ and what the system answers, in human language, with no visual detail. -->
54
+
55
+ ### Information architecture
56
+
57
+ <!-- Top-level surfaces and how someone moves between them. -->
58
+
59
+ ### Journeys
60
+
61
+ <!-- Reference UJ-N from the PRD rather than restating them; add only what the PRD left implicit —
62
+ screen order, entry state, what tells the user the value landed. -->
63
+
64
+ ### Behaviour per surface
65
+
66
+ | Surface | User can | System answers |
67
+ | --- | --- | --- |
68
+
69
+ ### Accessibility
70
+
71
+ <!-- What MUST hold: contrast, focus order, target size, screen-reader labelling, motion. State the
72
+ standard being met, not the intention to meet one. -->
73
+
74
+ ### Edge cases
75
+
76
+ <!-- Real failure moments and what the user does next. One per row; the ones worth writing are the
77
+ ones a designer would rather not think about. -->