dflow-sdd-ddd 0.12.0 → 0.14.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 (42) hide show
  1. package/CHANGELOG.md +155 -0
  2. package/CONTRIBUTING.md +6 -9
  3. package/README.en.md +117 -40
  4. package/README.md +47 -15
  5. package/TEMPLATE-COVERAGE.md +3 -2
  6. package/bin/dflow.js +80 -3
  7. package/docs/evaluating-dflow.en.md +21 -2
  8. package/docs/evaluating-dflow.md +17 -3
  9. package/docs/npm-publish-checklist.md +3 -1
  10. package/docs/release-versioning-policy.md +3 -2
  11. package/docs/using-with-claude-code.en.md +35 -22
  12. package/docs/using-with-claude-code.md +27 -17
  13. package/docs/using-with-codex.en.md +20 -10
  14. package/docs/using-with-codex.md +13 -8
  15. package/docs/using-with-github-copilot.en.md +20 -9
  16. package/docs/using-with-github-copilot.md +14 -7
  17. package/lib/doctor-checks.js +178 -0
  18. package/lib/init.js +894 -36
  19. package/lib/render.js +1263 -0
  20. package/package.json +5 -2
  21. package/templates/brownfield/references/init-project-flow.md +46 -2
  22. package/templates/brownfield/scaffolding/AI-AGENT-GUIDE.md +13 -1
  23. package/templates/brownfield/templates/_index.md +2 -0
  24. package/templates/brownfield/templates/context-definition.md +2 -0
  25. package/templates/brownfield/templates/context-map.md +1 -0
  26. package/templates/brownfield/templates/glossary.md +1 -0
  27. package/templates/brownfield/templates/models.md +1 -0
  28. package/templates/brownfield/templates/phase-spec.md +2 -0
  29. package/templates/brownfield/templates/rules.md +1 -0
  30. package/templates/brownfield/templates/tech-debt.md +1 -0
  31. package/templates/greenfield/references/init-project-flow.md +48 -6
  32. package/templates/greenfield/scaffolding/AI-AGENT-GUIDE.md +13 -1
  33. package/templates/greenfield/templates/_index.md +2 -0
  34. package/templates/greenfield/templates/aggregate-design.md +2 -0
  35. package/templates/greenfield/templates/context-definition.md +2 -0
  36. package/templates/greenfield/templates/context-map.md +1 -0
  37. package/templates/greenfield/templates/events.md +1 -0
  38. package/templates/greenfield/templates/glossary.md +1 -0
  39. package/templates/greenfield/templates/models.md +1 -0
  40. package/templates/greenfield/templates/phase-spec.md +2 -0
  41. package/templates/greenfield/templates/rules.md +1 -0
  42. package/templates/greenfield/templates/tech-debt.md +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dflow-sdd-ddd",
3
- "version": "0.12.0",
3
+ "version": "0.14.0",
4
4
  "description": "Spec-first SDD/DDD workflow kit for AI-assisted development",
5
5
  "type": "commonjs",
6
6
  "bin": {
@@ -39,10 +39,13 @@
39
39
  },
40
40
  "homepage": "https://github.com/weilung/dflow-sdd-ddd#readme",
41
41
  "scripts": {
42
- "test": "node test/smoke.mjs && node test/registry-parity.mjs && node test/agent-inject.mjs && node test/bundle-guards.mjs"
42
+ "test": "node test/smoke.mjs && node test/skill-default.mjs && node test/registry-parity.mjs && node test/agent-inject.mjs && node test/upgrade-drift.mjs && node test/bundle-guards.mjs && node test/render.mjs"
43
43
  },
44
44
  "license": "AGPL-3.0-or-later",
45
45
  "publishConfig": {
46
46
  "access": "public"
47
+ },
48
+ "dependencies": {
49
+ "marked": "18.0.5"
47
50
  }
48
51
  }
@@ -104,7 +104,9 @@ Used to substitute `{Framework}` / `{Framework version}` / `{Language}` /
104
104
  If yes → `_overview.md` "Target Architecture Strategy" section is emphasised and
105
105
  `migration/tech-debt.md` is prioritised. If no → the scaffolding still
106
106
  mentions the principles (Migration Awareness / Domain Extraction /
107
- Dual-Track Parallel / Pragmatic First) but framed as forward-option.
107
+ Dual-Track Parallel / Pragmatic First) but framed as forward-option. Either
108
+ way the answer is recorded in the `Migration / legacy context` row of the AI
109
+ agent guide's `## Project Context` table.
108
110
 
109
111
  ### Q4. Project prose language
110
112
 
@@ -167,6 +169,32 @@ Wait for answers.
167
169
  > and refreshes it in place on re-run. Merge snippets under
168
170
  > `dflow/specs/shared/` are used only if Dflow markers conflict."
169
171
 
172
+ Wait for answers.
173
+
174
+ ### Q9. Project-level skill (agent-gated, default yes)
175
+
176
+ Asked only when Q8 selected at least one agent — with no agents there is no
177
+ projection target and this question is skipped entirely.
178
+
179
+ > "Install the project-level Dflow skill for natural-language auto-trigger?
180
+ > (Y/n)
181
+ >
182
+ > The skill is what makes requests like 'I want to add a feature' surface the
183
+ > matching workflow automatically; without it, triggering relies on the
184
+ > instruction files alone and degrades in long sessions. Skill files are
185
+ > Dflow-generated derivatives — the recommended default is to gitignore them
186
+ > and re-project after cloning."
187
+
188
+ Wait for the answer. **Blank defaults to yes.** On `n`, tell the developer:
189
+
190
+ > "Skipped the project-level skill; add it later with
191
+ > `dflow configure-agents --skills`."
192
+
193
+ CLI note: the CLI asks this question only on an interactive terminal. A
194
+ non-interactive (piped) `dflow init` never reads an extra stdin answer for it
195
+ — existing scripted answer sequences keep their structure and keep working —
196
+ and installs the skill for the selected agents by default.
197
+
170
198
  **→ Transition (step-internal)**: Step 2 complete. Announce
171
199
  > "Step 2 complete (project information captured). Entering Step 3:
172
200
  > File-list preview."
@@ -274,7 +302,7 @@ skip, and wait for developer confirmation:
274
302
  **→ Step Gate: Step 3 → Step 4**
275
303
 
276
304
  Wait for explicit confirmation. If the developer asks to change the
277
- selection, go back to the relevant Step 2 question (Q5–Q8) and re-run Step 3.
305
+ selection, go back to the relevant Step 2 question (Q5–Q9) and re-run Step 3.
278
306
 
279
307
  ---
280
308
 
@@ -346,6 +374,22 @@ For each selected tool-specific file (`AGENTS.md`, `CLAUDE.md`,
346
374
  in the preview, and refresh that same block on re-run. If the developer later
347
375
  deletes the block, a later `init` / `configure-agents` run appends it again
348
376
 
377
+ If the developer chose to install the project-level skill (Q9), the CLI also
378
+ creates the skill file for each selected tool at its native project-level
379
+ path:
380
+
381
+ - `.claude/skills/dflow/SKILL.md` — Claude Code
382
+ - `.agents/skills/dflow/SKILL.md` — Codex
383
+ - `.github/skills/dflow/SKILL.md` — GitHub Copilot
384
+
385
+ All three are the same edition-neutral thin skill projected from the single
386
+ canonical source in the npm package. An existing file at one of those paths
387
+ that is **not** Dflow-generated (missing the
388
+ `<!-- dflow-generated: skill-adapter -->` marker) is left unchanged with a
389
+ warning. Manual AI fallback (no npm available): do **not** hand-write SKILL.md
390
+ content — report that the skill install is deferred and the developer should
391
+ run `dflow configure-agents --skills` once npm is available.
392
+
349
393
  ### 4.4 Directory-only entries
350
394
 
351
395
  For directories that Git otherwise wouldn't track (empty `active/` /
@@ -13,6 +13,11 @@ This project uses Dflow for spec-first AI-assisted development.
13
13
  | Migration / legacy context | {migration-context} |
14
14
  | Prose language | {prose-language} |
15
15
 
16
+ <!-- dflow-generated: guide-canonical START -->
17
+ <!-- Everything between these markers is Dflow-managed canonical guide content.
18
+ `dflow configure-agents` refreshes it in place on upgrade. Put project-specific
19
+ notes in "## Project Context" above (or outside the markers), not in here. -->
20
+
16
21
  ## Why This Matters
17
22
 
18
23
  This project has business logic embedded in delivery/entrypoint code
@@ -108,6 +113,11 @@ input like this (supporting files live in the workflow bundle at
108
113
  is written with Greenfield artifact names; see its **Edition note** for where
109
114
  Brownfield records the same decisions (`models.md` / `rules.md` /
110
115
  `behavior.md` / `migration/tech-debt.md`).
116
+ - **"Turn the specs into HTML" / "make the specs easier to read"** → run the
117
+ CLI command `dflow render` (a human-readability tool, not a `/dflow:*`
118
+ workflow). It mirrors `dflow/specs/` into a browsable static HTML tree
119
+ (default output: `dflow-specs-html/`); re-run it after specs change —
120
+ Markdown stays the AI-facing source of truth.
111
121
  - **"Dflow seems wrong" / "this template is confusing"** (or you notice Dflow
112
122
  guidance drift) → suggest `/dflow:report-dflow-feedback`; never submit
113
123
  anything upstream automatically.
@@ -295,7 +305,7 @@ needed). The criteria below apply when `/dflow:modify-existing` or
295
305
  | Tier | Scenario | Output | Command / Trigger |
296
306
  |---|---|---|---|
297
307
  | **T1 Heavy** | New feature, new phase, architectural change, new BR | Independent `phase-spec-YYYY-MM-DD-{slug}.md` placed in the feature directory + `_index.md` Phase Specs row + refresh BR Snapshot | `/dflow:new-feature` / `/dflow:new-phase` |
298
- | **T2 Light** | Bug fix, UI input validation tweak, flow branch change — has BR Delta | Independent `lightweight-{YYYY-MM-DD}-{slug}.md` (or `BUG-{NUMBER}-{slug}.md`) inside the feature directory + `_index.md` Lightweight Changes row (outbound link) + refresh BR Snapshot | `/dflow:bug-fix` or `/dflow:modify-existing` (lightweight branch) |
308
+ | **T2 Light** | Bug fix, UI input validation tweak, flow branch change — has BR Delta | Independent `lightweight-YYYY-MM-DD-{slug}.md` (or `BUG-{NUMBER}-{slug}.md`) inside the feature directory + `_index.md` Lightweight Changes row (outbound link) + refresh BR Snapshot | `/dflow:bug-fix` or `/dflow:modify-existing` (lightweight branch) |
299
309
  | **T3 Trivial** | Button colour, copy/text fix, typo, formatting, pure comments — **no BR change, no Domain concept change, no data structure change** | **Inline row in `_index.md` Lightweight Changes only** (no independent spec file) | `/dflow:modify-existing` (`_index-only` branch) |
300
310
 
301
311
  **T3 criteria** (the AI must satisfy **all four** before classifying T3):
@@ -421,3 +431,5 @@ should stay thin and point back here.
421
431
  If a tool does not support Dflow slash commands, treat the command names as
422
432
  plain workflow names and follow the matching flow file from the workflow bundle
423
433
  at `dflow/specs/shared/dflow-workflows/`.
434
+
435
+ <!-- dflow-generated: guide-canonical END -->
@@ -39,6 +39,8 @@ Template note (for AI):
39
39
  initial BR Snapshot + Resume Pointer. The other sections can stay empty.
40
40
  -->
41
41
 
42
+ <!-- Formatting convention: keep table cells concise. When one cell holds multiple short items (invariants, rules, steps), separate them with <br> so each renders on its own line - never chain them into one line with ;/; separators. Long narrative detail does not belong in a table cell: keep the cell to a concise summary and put extended detail in an existing section of this document when one fits, or give each item its own row. -->
43
+
42
44
  # {Feature Title}
43
45
 
44
46
  ## Goals & Scope
@@ -5,6 +5,8 @@ owner: {負責的開發者或團隊}
5
5
  created: {YYYY-MM-DD}
6
6
  ---
7
7
 
8
+ <!-- Formatting convention: keep table cells concise. When one cell holds multiple short items (invariants, rules, steps), separate them with <br> so each renders on its own line - never chain them into one line with ;/; separators. Long narrative detail does not belong in a table cell: keep the cell to a concise summary and put extended detail in an existing section of this document when one fits, or give each item its own row. -->
9
+
8
10
  # {ContextName} Bounded Context
9
11
 
10
12
  ## Responsibilities
@@ -1,4 +1,5 @@
1
1
  <!-- Seeded by Dflow. -->
2
+ <!-- Formatting convention: keep table cells concise. When one cell holds multiple short items (invariants, rules, steps), separate them with <br> so each renders on its own line - never chain them into one line with ;/; separators. Long narrative detail does not belong in a table cell: keep the cell to a concise summary and put extended detail in an existing section of this document when one fits, or give each item its own row. -->
2
3
 
3
4
  # Context Map
4
5
 
@@ -1,4 +1,5 @@
1
1
  <!-- Seeded by Dflow. -->
2
+ <!-- Formatting convention: keep table cells concise. When one cell holds multiple short items (invariants, rules, steps), separate them with <br> so each renders on its own line - never chain them into one line with ;/; separators. Long narrative detail does not belong in a table cell: keep the cell to a concise summary and put extended detail in an existing section of this document when one fits, or give each item its own row. -->
2
3
 
3
4
  # Glossary
4
5
 
@@ -1,4 +1,5 @@
1
1
  <!-- Seeded by Dflow. -->
2
+ <!-- Formatting convention: keep table cells concise. When one cell holds multiple short items (invariants, rules, steps), separate them with <br> so each renders on its own line - never chain them into one line with ;/; separators. Long narrative detail does not belong in a table cell: keep the cell to a concise summary and put extended detail in an existing section of this document when one fits, or give each item its own row. -->
2
3
 
3
4
  # Domain Models
4
5
 
@@ -8,6 +8,8 @@ author: {developer-name}
8
8
  branch: feature/{SPEC-ID}-{slug}
9
9
  ---
10
10
 
11
+ <!-- Formatting convention: keep table cells concise. When one cell holds multiple short items (invariants, rules, steps), separate them with <br> so each renders on its own line - never chain them into one line with ;/; separators. Long narrative detail does not belong in a table cell: keep the cell to a concise summary and put extended detail in an existing section of this document when one fits, or give each item its own row. -->
12
+
11
13
  # {Feature Title}
12
14
 
13
15
  <!--
@@ -1,4 +1,5 @@
1
1
  <!-- Seeded by Dflow. -->
2
+ <!-- Formatting convention: keep table cells concise. When one cell holds multiple short items (invariants, rules, steps), separate them with <br> so each renders on its own line - never chain them into one line with ;/; separators. Long narrative detail does not belong in a table cell: keep the cell to a concise summary and put extended detail in an existing section of this document when one fits, or give each item its own row. -->
2
3
 
3
4
  # Business Rules
4
5
 
@@ -1,4 +1,5 @@
1
1
  <!-- Seeded by Dflow. -->
2
+ <!-- Formatting convention: keep table cells concise. When one cell holds multiple short items (invariants, rules, steps), separate them with <br> so each renders on its own line - never chain them into one line with ;/; separators. Long narrative detail does not belong in a table cell: keep the cell to a concise summary and put extended detail in an existing section of this document when one fits, or give each item its own row. -->
2
3
 
3
4
  # Migration Tech Debt
4
5
 
@@ -110,12 +110,12 @@ Used to substitute `{Framework version}` / `{ORM version}` /
110
110
 
111
111
  > "Was this project ported / migrated from a prior stack (e.g. legacy
112
112
  > presentation framework, monolith), or is it new-build on the chosen
113
- > framework? If migrated, is there any legacy concern you'd like the
114
- > overview to flag?"
113
+ > framework? If migrated, is there any legacy concern you'd like noted?"
115
114
 
116
- If migrated → `_overview.md` can carry a short migration-context note.
117
- Otherwise skip. In the Greenfield track, migration is not the first-class
118
- concern, but noting origin is still useful.
115
+ If migrated → the answer is recorded in the `Migration / legacy context` row
116
+ of the AI agent guide's `## Project Context` table. If not migrated, skip —
117
+ the row records `none`. In the Greenfield track, migration is not the
118
+ first-class concern, but noting origin is still useful.
119
119
 
120
120
  ### Q4. Project prose language
121
121
 
@@ -178,6 +178,32 @@ Wait for answers.
178
178
  > and refreshes it in place on re-run. Merge snippets under
179
179
  > `dflow/specs/shared/` are used only if Dflow markers conflict."
180
180
 
181
+ Wait for answers.
182
+
183
+ ### Q9. Project-level skill (agent-gated, default yes)
184
+
185
+ Asked only when Q8 selected at least one agent — with no agents there is no
186
+ projection target and this question is skipped entirely.
187
+
188
+ > "Install the project-level Dflow skill for natural-language auto-trigger?
189
+ > (Y/n)
190
+ >
191
+ > The skill is what makes requests like 'I want to add a feature' surface the
192
+ > matching workflow automatically; without it, triggering relies on the
193
+ > instruction files alone and degrades in long sessions. Skill files are
194
+ > Dflow-generated derivatives — the recommended default is to gitignore them
195
+ > and re-project after cloning."
196
+
197
+ Wait for the answer. **Blank defaults to yes.** On `n`, tell the developer:
198
+
199
+ > "Skipped the project-level skill; add it later with
200
+ > `dflow configure-agents --skills`."
201
+
202
+ CLI note: the CLI asks this question only on an interactive terminal. A
203
+ non-interactive (piped) `dflow init` never reads an extra stdin answer for it
204
+ — existing scripted answer sequences keep their structure and keep working —
205
+ and installs the skill for the selected agents by default.
206
+
181
207
  **→ Transition (step-internal)**: Step 2 complete. Announce
182
208
  > "Step 2 complete (project information captured). Entering Step 3:
183
209
  > File-list preview."
@@ -293,7 +319,7 @@ skip, and wait for developer confirmation:
293
319
  **→ Step Gate: Step 3 → Step 4**
294
320
 
295
321
  Wait for explicit confirmation. If the developer asks to change the
296
- selection, go back to the relevant Step 2 question (Q5–Q8) and re-run Step 3.
322
+ selection, go back to the relevant Step 2 question (Q5–Q9) and re-run Step 3.
297
323
 
298
324
  ---
299
325
 
@@ -367,6 +393,22 @@ For each selected tool-specific file (`AGENTS.md`, `CLAUDE.md`,
367
393
  in the preview, and refresh that same block on re-run. If the developer later
368
394
  deletes the block, a later `init` / `configure-agents` run appends it again
369
395
 
396
+ If the developer chose to install the project-level skill (Q9), the CLI also
397
+ creates the skill file for each selected tool at its native project-level
398
+ path:
399
+
400
+ - `.claude/skills/dflow/SKILL.md` — Claude Code
401
+ - `.agents/skills/dflow/SKILL.md` — Codex
402
+ - `.github/skills/dflow/SKILL.md` — GitHub Copilot
403
+
404
+ All three are the same edition-neutral thin skill projected from the single
405
+ canonical source in the npm package. An existing file at one of those paths
406
+ that is **not** Dflow-generated (missing the
407
+ `<!-- dflow-generated: skill-adapter -->` marker) is left unchanged with a
408
+ warning. Manual AI fallback (no npm available): do **not** hand-write SKILL.md
409
+ content — report that the skill install is deferred and the developer should
410
+ run `dflow configure-agents --skills` once npm is available.
411
+
370
412
  ### 4.4 Directory-only entries
371
413
 
372
414
  For directories that Git otherwise wouldn't track (empty `active/` /
@@ -13,6 +13,11 @@ This project uses Dflow for spec-first AI-assisted development.
13
13
  | Migration / legacy context | {migration-context} |
14
14
  | Prose language | {prose-language} |
15
15
 
16
+ <!-- dflow-generated: guide-canonical START -->
17
+ <!-- Everything between these markers is Dflow-managed canonical guide content.
18
+ `dflow configure-agents` refreshes it in place on upgrade. Put project-specific
19
+ notes in "## Project Context" above (or outside the markers), not in here. -->
20
+
16
21
  ## Before Editing Code
17
22
 
18
23
  Do not jump from a request directly to code. First identify the matching
@@ -64,6 +69,11 @@ input like this (supporting files live in the workflow bundle at
64
69
  - **"Quick question about..." / "How does X work?"** → check
65
70
  `dflow/specs/domain/` first and answer from the documented domain knowledge.
66
71
  - **"I'm creating a branch"** → read `references/git-integration.md`.
72
+ - **"Turn the specs into HTML" / "make the specs easier to read"** → run the
73
+ CLI command `dflow render` (a human-readability tool, not a `/dflow:*`
74
+ workflow). It mirrors `dflow/specs/` into a browsable static HTML tree
75
+ (default output: `dflow-specs-html/`); re-run it after specs change —
76
+ Markdown stays the AI-facing source of truth.
67
77
  - **"Dflow seems wrong" / "this template is confusing"** (or you notice Dflow
68
78
  guidance drift) → suggest `/dflow:report-dflow-feedback`; never submit
69
79
  anything upstream automatically.
@@ -253,7 +263,7 @@ judgement needed). The criteria below apply when `/dflow:modify-existing` or
253
263
  | Tier | Scenario | Output | Command / Trigger |
254
264
  |---|---|---|---|
255
265
  | **T1 Heavy** | New feature, new phase, new Aggregate / BC, architectural change, new BR | Independent `phase-spec-YYYY-MM-DD-{slug}.md` placed in the feature directory + `_index.md` Phase Specs row + refresh BR Snapshot. For a new Aggregate / BC also create an `aggregate-design.md` from `templates/aggregate-design.md` **in the feature directory** (working worksheet; the durable summary stays in `models.md`) + update `context-map.md` + `events.md`. | `/dflow:new-feature` / `/dflow:new-phase` |
256
- | **T2 Light** | Bug fix (logic error), UI input validation tweak, flow branch change — has BR Delta | Independent `lightweight-{YYYY-MM-DD}-{slug}.md` (or `BUG-{NUMBER}-{slug}.md`) inside the feature directory + `_index.md` Lightweight Changes row (outbound link) + refresh BR Snapshot. Confirm the fix lands in the correct architectural layer. | `/dflow:bug-fix` or `/dflow:modify-existing` (lightweight branch) |
266
+ | **T2 Light** | Bug fix (logic error), UI input validation tweak, flow branch change — has BR Delta | Independent `lightweight-YYYY-MM-DD-{slug}.md` (or `BUG-{NUMBER}-{slug}.md`) inside the feature directory + `_index.md` Lightweight Changes row (outbound link) + refresh BR Snapshot. Confirm the fix lands in the correct architectural layer. | `/dflow:bug-fix` or `/dflow:modify-existing` (lightweight branch) |
257
267
  | **T3 Trivial** | Button colour, copy/text fix, typo, formatting, pure comments — **no BR change, no Domain concept change, no data structure change** | **Inline row in `_index.md` Lightweight Changes only** (no independent spec file) | `/dflow:modify-existing` (`_index-only` branch) |
258
268
 
259
269
  **T3 criteria** (the AI must satisfy **all four** before classifying T3):
@@ -384,3 +394,5 @@ should stay thin and point back here.
384
394
  If a tool does not support Dflow slash commands, treat the command names as
385
395
  plain workflow names and follow the matching flow file from the workflow bundle
386
396
  at `dflow/specs/shared/dflow-workflows/`.
397
+
398
+ <!-- dflow-generated: guide-canonical END -->
@@ -46,6 +46,8 @@ Template note (for AI):
46
46
  initial BR Snapshot + Resume Pointer. The other sections can stay empty.
47
47
  -->
48
48
 
49
+ <!-- Formatting convention: keep table cells concise. When one cell holds multiple short items (invariants, rules, steps), separate them with <br> so each renders on its own line - never chain them into one line with ;/; separators. Long narrative detail does not belong in a table cell: keep the cell to a concise summary and put extended detail in an existing section of this document when one fits, or give each item its own row. -->
50
+
49
51
  # {Feature Title}
50
52
 
51
53
  ## Goals & Scope
@@ -4,6 +4,8 @@ bounded-context: {ContextName}
4
4
  created: {YYYY-MM-DD}
5
5
  ---
6
6
 
7
+ <!-- Formatting convention: keep table cells concise. When one cell holds multiple short items (invariants, rules, steps), separate them with <br> so each renders on its own line - never chain them into one line with ;/; separators. Long narrative detail does not belong in a table cell: keep the cell to a concise summary and put extended detail in an existing section of this document when one fits, or give each item its own row. -->
8
+
7
9
  # {AggregateName} Aggregate
8
10
 
9
11
  ## Purpose
@@ -5,6 +5,8 @@ owner: {負責的開發者或團隊}
5
5
  created: {YYYY-MM-DD}
6
6
  ---
7
7
 
8
+ <!-- Formatting convention: keep table cells concise. When one cell holds multiple short items (invariants, rules, steps), separate them with <br> so each renders on its own line - never chain them into one line with ;/; separators. Long narrative detail does not belong in a table cell: keep the cell to a concise summary and put extended detail in an existing section of this document when one fits, or give each item its own row. -->
9
+
8
10
  # {ContextName} Bounded Context
9
11
 
10
12
  ## Responsibilities
@@ -1,4 +1,5 @@
1
1
  <!-- Seeded by Dflow. -->
2
+ <!-- Formatting convention: keep table cells concise. When one cell holds multiple short items (invariants, rules, steps), separate them with <br> so each renders on its own line - never chain them into one line with ;/; separators. Long narrative detail does not belong in a table cell: keep the cell to a concise summary and put extended detail in an existing section of this document when one fits, or give each item its own row. -->
2
3
 
3
4
  # Context Map
4
5
 
@@ -1,4 +1,5 @@
1
1
  <!-- Seeded by Dflow. -->
2
+ <!-- Formatting convention: keep table cells concise. When one cell holds multiple short items (invariants, rules, steps), separate them with <br> so each renders on its own line - never chain them into one line with ;/; separators. Long narrative detail does not belong in a table cell: keep the cell to a concise summary and put extended detail in an existing section of this document when one fits, or give each item its own row. -->
2
3
 
3
4
  # Domain Events
4
5
 
@@ -1,4 +1,5 @@
1
1
  <!-- Seeded by Dflow. -->
2
+ <!-- Formatting convention: keep table cells concise. When one cell holds multiple short items (invariants, rules, steps), separate them with <br> so each renders on its own line - never chain them into one line with ;/; separators. Long narrative detail does not belong in a table cell: keep the cell to a concise summary and put extended detail in an existing section of this document when one fits, or give each item its own row. -->
2
3
 
3
4
  # Glossary
4
5
 
@@ -1,4 +1,5 @@
1
1
  <!-- Seeded by Dflow. -->
2
+ <!-- Formatting convention: keep table cells concise. When one cell holds multiple short items (invariants, rules, steps), separate them with <br> so each renders on its own line - never chain them into one line with ;/; separators. Long narrative detail does not belong in a table cell: keep the cell to a concise summary and put extended detail in an existing section of this document when one fits, or give each item its own row. -->
2
3
 
3
4
  # Domain Models
4
5
 
@@ -8,6 +8,8 @@ author: {developer-name}
8
8
  branch: feature/{SPEC-ID}-{slug}
9
9
  ---
10
10
 
11
+ <!-- Formatting convention: keep table cells concise. When one cell holds multiple short items (invariants, rules, steps), separate them with <br> so each renders on its own line - never chain them into one line with ;/; separators. Long narrative detail does not belong in a table cell: keep the cell to a concise summary and put extended detail in an existing section of this document when one fits, or give each item its own row. -->
12
+
11
13
  # {功能標題}
12
14
 
13
15
  <!--
@@ -1,4 +1,5 @@
1
1
  <!-- Seeded by Dflow. -->
2
+ <!-- Formatting convention: keep table cells concise. When one cell holds multiple short items (invariants, rules, steps), separate them with <br> so each renders on its own line - never chain them into one line with ;/; separators. Long narrative detail does not belong in a table cell: keep the cell to a concise summary and put extended detail in an existing section of this document when one fits, or give each item its own row. -->
2
3
 
3
4
  # Business Rules
4
5
 
@@ -1,4 +1,5 @@
1
1
  <!-- Seeded by Dflow. -->
2
+ <!-- Formatting convention: keep table cells concise. When one cell holds multiple short items (invariants, rules, steps), separate them with <br> so each renders on its own line - never chain them into one line with ;/; separators. Long narrative detail does not belong in a table cell: keep the cell to a concise summary and put extended detail in an existing section of this document when one fits, or give each item its own row. -->
2
3
 
3
4
  # Architecture Tech Debt
4
5