dflow-sdd-ddd 0.7.0 → 0.9.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 (59) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/LICENSE +679 -21
  3. package/README.en.md +5 -4
  4. package/README.md +3 -3
  5. package/bin/dflow.js +3 -2
  6. package/docs/evaluating-dflow.en.md +14 -5
  7. package/docs/evaluating-dflow.md +14 -5
  8. package/docs/using-with-claude-code.en.md +17 -9
  9. package/docs/using-with-claude-code.md +15 -8
  10. package/docs/using-with-codex.en.md +12 -8
  11. package/docs/using-with-codex.md +8 -6
  12. package/lib/init.js +480 -87
  13. package/package.json +2 -2
  14. package/templates/brownfield/references/dflow-feedback-flow.md +251 -0
  15. package/templates/brownfield/references/drift-verification.md +183 -0
  16. package/templates/brownfield/references/finish-feature-flow.md +294 -0
  17. package/templates/brownfield/references/git-integration.md +371 -0
  18. package/templates/brownfield/references/init-project-flow.md +430 -0
  19. package/templates/brownfield/references/modify-existing-flow.md +448 -0
  20. package/templates/brownfield/references/new-feature-flow.md +382 -0
  21. package/templates/brownfield/references/new-phase-flow.md +274 -0
  22. package/templates/brownfield/references/pr-review-checklist.md +179 -0
  23. package/templates/brownfield/scaffolding/AI-AGENT-GUIDE.md +31 -4
  24. package/templates/brownfield/scaffolding/CLAUDE-md-snippet.md +12 -8
  25. package/templates/brownfield/scaffolding/Git-principles-gitflow.md +14 -13
  26. package/templates/brownfield/scaffolding/Git-principles-trunk.md +14 -17
  27. package/templates/brownfield/scaffolding/_conventions.md +1 -1
  28. package/templates/brownfield/scaffolding/_overview.md +3 -3
  29. package/templates/brownfield/templates/_index.md +20 -2
  30. package/templates/brownfield/templates/context-map.md +1 -1
  31. package/templates/brownfield/templates/glossary.md +1 -1
  32. package/templates/brownfield/templates/models.md +1 -1
  33. package/templates/brownfield/templates/rules.md +1 -1
  34. package/templates/brownfield/templates/tech-debt.md +1 -1
  35. package/templates/common/skill/SKILL.md +35 -0
  36. package/templates/greenfield/references/ddd-modeling-guide.md +351 -0
  37. package/templates/greenfield/references/dflow-feedback-flow.md +251 -0
  38. package/templates/greenfield/references/drift-verification.md +195 -0
  39. package/templates/greenfield/references/finish-feature-flow.md +314 -0
  40. package/templates/greenfield/references/git-integration.md +344 -0
  41. package/templates/greenfield/references/init-project-flow.md +464 -0
  42. package/templates/greenfield/references/modify-existing-flow.md +366 -0
  43. package/templates/greenfield/references/new-feature-flow.md +412 -0
  44. package/templates/greenfield/references/new-phase-flow.md +288 -0
  45. package/templates/greenfield/references/pr-review-checklist.md +130 -0
  46. package/templates/greenfield/scaffolding/AI-AGENT-GUIDE.md +31 -4
  47. package/templates/greenfield/scaffolding/CLAUDE-md-snippet.md +15 -13
  48. package/templates/greenfield/scaffolding/Git-principles-gitflow.md +14 -13
  49. package/templates/greenfield/scaffolding/Git-principles-trunk.md +14 -18
  50. package/templates/greenfield/scaffolding/_conventions.md +1 -1
  51. package/templates/greenfield/scaffolding/_overview.md +5 -3
  52. package/templates/greenfield/scaffolding/architecture-decisions-README.md +1 -1
  53. package/templates/greenfield/templates/_index.md +20 -2
  54. package/templates/greenfield/templates/context-map.md +1 -1
  55. package/templates/greenfield/templates/events.md +1 -1
  56. package/templates/greenfield/templates/glossary.md +1 -1
  57. package/templates/greenfield/templates/models.md +1 -1
  58. package/templates/greenfield/templates/rules.md +1 -1
  59. package/templates/greenfield/templates/tech-debt.md +1 -1
@@ -0,0 +1,464 @@
1
+ # Init Project Flow — Greenfield Track
2
+
3
+ Internal flow spec for `npx dflow-sdd-ddd init` after the CLI selects the
4
+ Greenfield track. It also serves as the manual reference for environments
5
+ where Node.js/npm is unavailable.
6
+
7
+ This is not a skill slash command. Do not describe or invoke it as one.
8
+
9
+ This is a **one-time project bootstrap** flow. It sets up the `dflow/specs/`
10
+ directory structure, seeds project-level governance files from the packaged
11
+ `scaffolding/` template set, and points the developer at `/dflow:new-feature`
12
+ as the natural next command.
13
+
14
+ The V1 CLI clean cut does not migrate or dual-read a legacy root `specs/`
15
+ directory. If root `specs/` exists, warn that new Dflow files will be created
16
+ under `dflow/specs/`.
17
+
18
+ **Confirmations** in this flow:
19
+ - Step 2 → Step 3: information collected → present file-list preview
20
+ - Step 3 → Step 4: file-list confirmed → write
21
+
22
+ In the CLI, use ordinary yes/no confirmation. In the manual AI fallback,
23
+ ask for explicit confirmation in natural language; do not require
24
+ the workflow next command for init.
25
+
26
+ **Ceremony**: this flow is **meta-level** — it sets up the infrastructure
27
+ that subsequent T1 / T2 / T3 work will live in. It does not itself produce
28
+ a SPEC-ID, feature directory, or branch. It does not count against Ceremony
29
+ Scaling.
30
+
31
+ ---
32
+
33
+ ## Step 1: Current-State Inventory
34
+
35
+ The CLI inspects the project root before prompting.
36
+
37
+ **Read** (using the Read / Glob / LS tools):
38
+ - Is there a `.git` directory? → repo exists
39
+ - Is there an existing non-empty `dflow/specs/` directory? → Dflow already initialized; abort
40
+ - Is there an empty `dflow/specs/` directory? → continue with existing-file protection
41
+ - Is there an existing root `specs/` directory? → legacy / other-tool warning only; do not read, copy, move, or rewrite it
42
+ - Is there an existing `CLAUDE.md` at the repo root? → project already
43
+ has AI-collab rules
44
+ - Is there an existing `src/*.Domain` project (or similar Clean-
45
+ Architecture layout)? → project is at least partially structured
46
+
47
+ Report findings plainly:
48
+
49
+ > "Repo inventory:
50
+ > - `.git`: present
51
+ > - `dflow/specs/`: not yet present → greenfield Dflow setup
52
+ > - `specs/`: present → legacy / other-tool directory; Dflow V1 will not
53
+ > migrate or modify it
54
+ > - `src/`: contains `MyApp.Domain`, `MyApp.Application`,
55
+ > `MyApp.Infrastructure`, `MyApp.WebAPI` → Clean Architecture layout
56
+ > detected
57
+ > - `CLAUDE.md`: present → will not overwrite; I'll offer a snippet
58
+ > to merge into it"
59
+
60
+ Or:
61
+
62
+ > "Repo inventory:
63
+ > - `dflow/specs/`: already contains files
64
+ > - `CLAUDE.md`: not present
65
+ >
66
+ > Dflow already appears initialized here. I will stop rather than risk
67
+ > mixing bootstrap versions."
68
+
69
+ Classify the scenario:
70
+ - **Greenfield**: no `dflow/specs/` at all → create full baseline
71
+ - **Empty Dflow namespace**: `dflow/specs/` exists but contains no files → continue
72
+ - **Already initialized**: non-empty `dflow/specs/` exists → abort cleanly
73
+
74
+ **→ Transition (step-internal)**: Step 1 complete. Announce
75
+ > "Step 1 complete (current-state inventory). Entering Step 2: Project
76
+ > Information."
77
+
78
+ and continue.
79
+
80
+ ---
81
+
82
+ ## Step 2: Project Information (track-specific intake)
83
+
84
+ Ask these questions naturally — not as a checklist dump. Skip any
85
+ question where Step 1 already gave a confident answer.
86
+
87
+ ### Q1. Project type
88
+
89
+ > "Is this project greenfield (fresh start with Dflow + Clean
90
+ > Architecture + DDD) or brownfield (existing code, now adopting
91
+ > Dflow)?"
92
+
93
+ Used to tune `_overview.md` and `_conventions.md` — brownfield projects
94
+ typically need extra emphasis on migration-like framing even when they
95
+ choose the Greenfield track for a new bounded area.
96
+
97
+ ### Q2. Tech stack confirmation
98
+
99
+ > "Confirm the tech stack so I populate the right scaffolding
100
+ > variables: Framework + version (e.g. ASP.NET Core 9 / Spring Boot 3.3 /
101
+ > NestJS 10 / Django 5 / FastAPI 0.115)? Persistence layer (e.g.
102
+ > EF Core / Hibernate/JPA / Prisma / SQLAlchemy / GORM / Eloquent)?
103
+ > Mediator (e.g. MediatR / pipeline behavior — optional)? Test framework
104
+ > (e.g. xUnit / NUnit / JUnit / Jest / pytest / go test / PHPUnit)?"
105
+
106
+ Used to substitute `{Framework version}` / `{ORM version}` /
107
+ `{Mediator}` / `{Test framework}` placeholders in `_overview.md`.
108
+
109
+ ### Q3. Migration background
110
+
111
+ > "Was this project ported / migrated from a prior stack (e.g. legacy
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?"
115
+
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.
119
+
120
+ ### Q4. Project prose language
121
+
122
+ > "Project prose language for generated spec content? Choose an explicit
123
+ > language tag: `zh-TW`, `en`, `ja-JP`, or another BCP-47 tag."
124
+
125
+ Used to write `dflow/specs/shared/_conventions.md` under `## Prose
126
+ Language`. This value is required. Do not accept `any`, `skip`, `later`,
127
+ blank input, or prose descriptions such as "Traditional Chinese". Dflow
128
+ templates keep canonical English structural language; this setting controls
129
+ free prose inside generated spec sections.
130
+
131
+ ### Q5. Git policy (mandatory — pick one)
132
+
133
+ > "Which Git policy does the team follow? This drives the runtime branch gate
134
+ > and the finish-stage merge guidance, so it is required:
135
+ >
136
+ > 1. GitFlow — long-lived develop / release branches
137
+ > 2. Trunk / GitHub Flow — short-lived feature branches (lightest; the
138
+ > default for most GitHub / GitLab teams)"
139
+
140
+ Required — do not accept a skip. Both policies use feature branches; the choice
141
+ only changes finish-stage merge guidance. The selected policy seeds exactly one
142
+ `dflow/specs/shared/Git-principles-{gitflow|trunk}.md` (**mandatory, not
143
+ optional**) and is recorded in `_conventions.md` under `## Git Policy`.
144
+
145
+ ### Q6. AI commit marker (mandatory — default None)
146
+
147
+ > "How should AI-made commits be marked? The AI offers to commit at lifecycle
148
+ > checkpoints (you can always decline); this sets how those commits are tagged:
149
+ >
150
+ > 1. None (default) — AI commits look like any other commit
151
+ > 2. Co-Authored-By trailer (`dflow-ai <noreply@dflow.local>`) — filterable
152
+ > 3. `[ai-assisted]` commit-subject prefix — visible at a glance"
153
+
154
+ Recorded in `_conventions.md` under `## AI Commit Policy`; the runtime does not
155
+ re-ask.
156
+
157
+ ### Q7. Optional starter files (multi-select)
158
+
159
+ > "Besides the mandatory baseline, which optional starter files do you want me
160
+ > to seed?
161
+ >
162
+ > - [ ] `dflow/specs/shared/_overview.md` — system overview template"
163
+
164
+ Wait for answers.
165
+
166
+ ### Q8. AI coding agents (multi-select)
167
+
168
+ > "Which AI coding agents should Dflow configure?
169
+ >
170
+ > - [ ] `AGENTS.md` — Codex / Copilot coding agent
171
+ > - [ ] `CLAUDE.md` — Claude Code
172
+ > - [ ] `.github/copilot-instructions.md` — GitHub Copilot
173
+ >
174
+ > If you select any agent, Dflow will create
175
+ > `dflow/specs/shared/AI-AGENT-GUIDE.md` as the canonical guide. Root-level
176
+ > tool files stay thin and point back to that guide. Existing tool files are
177
+ > never overwritten; Dflow writes merge snippets under `dflow/specs/shared/`
178
+ > instead."
179
+
180
+ **→ Transition (step-internal)**: Step 2 complete. Announce
181
+ > "Step 2 complete (project information captured). Entering Step 3:
182
+ > File-list preview."
183
+
184
+ and continue.
185
+
186
+ ---
187
+
188
+ ## Step 3: File-list Preview
189
+
190
+ Compute the full list of files that will be created / skipped, based on
191
+ Step 1 (current state) + Step 2 (developer choices).
192
+
193
+ ### 3.1 Mandatory baseline (Greenfield track)
194
+
195
+ These files / directories are **always part of the baseline** — they
196
+ are what every Dflow-adopting Greenfield project is expected to have before
197
+ `/dflow:new-feature` runs cleanly:
198
+
199
+ ```
200
+ dflow/specs/
201
+ ├── features/
202
+ │ ├── active/ # directory (empty)
203
+ │ ├── completed/ # directory (empty)
204
+ │ └── backlog/ # directory (empty)
205
+ ├── domain/
206
+ │ ├── glossary.md # ← templates/glossary.md
207
+ │ └── context-map.md # ← templates/context-map.md
208
+ ├── shared/
209
+ │ └── _conventions.md # ← scaffolding/_conventions.md (mandatory)
210
+ └── architecture/
211
+ ├── tech-debt.md # ← templates/tech-debt.md
212
+ └── decisions/ # directory for ADRs
213
+ └── README.md # ← scaffolding/architecture-decisions-README.md
214
+ ```
215
+
216
+ Key Greenfield-track notes:
217
+ - `dflow/specs/architecture/tech-debt.md` (not `dflow/specs/migration/tech-debt.md`)
218
+ — Greenfield track uses `architecture/` as the cross-cutting directory.
219
+ The Brownfield track uses `migration/` instead; this split is an
220
+ F-05 decision from R7 review.
221
+ - `dflow/specs/domain/context-map.md` IS mandatory in the Greenfield track. Greenfield
222
+ projects typically plan bounded contexts up-front; the context-map
223
+ is where those relationships are captured. (Brownfield track treats
224
+ contexts as emergent and does not mandate this file.)
225
+ - `dflow/specs/architecture/decisions/` is a **directory**, with a short
226
+ README explaining the ADR naming convention
227
+ (`ADR-NNNN-{slug}.md` / dated / numbered). This gives future ADRs
228
+ a home without forcing a first ADR on Day 0.
229
+ - **`behavior.md` is NOT generated here.** Per F-05, per-context
230
+ `behavior.md` files are created by `/dflow:new-feature` Step 8.3
231
+ (completion flow) or by the P007a baseline-capture flow at the
232
+ moment the first bounded context is established. Creating empty
233
+ `behavior.md` files here would create stale placeholders.
234
+
235
+ ### 3.2 Optional files (from Step 2 Q7)
236
+
237
+ Use the packaged scaffolding templates listed below; their project-local
238
+ outputs are under `dflow/specs/shared/` (the scaffolding root, not the
239
+ vendored workflow bundle). Compute the destination path:
240
+
241
+ | Scaffolding source | Destination in project |
242
+ |---|---|
243
+ | `scaffolding/_overview.md` | `dflow/specs/shared/_overview.md` |
244
+ | `scaffolding/_conventions.md` | `dflow/specs/shared/_conventions.md` (mandatory baseline) |
245
+ | `scaffolding/Git-principles-gitflow.md` | `dflow/specs/shared/Git-principles-gitflow.md` |
246
+ | `scaffolding/Git-principles-trunk.md` | `dflow/specs/shared/Git-principles-trunk.md` |
247
+ | `scaffolding/AI-AGENT-GUIDE.md` | `dflow/specs/shared/AI-AGENT-GUIDE.md` when at least one AI agent is selected |
248
+ | generated tool shim | `AGENTS.md`, `CLAUDE.md`, or `.github/copilot-instructions.md` when selected and missing |
249
+ | generated merge snippet | `dflow/specs/shared/*-snippet.md` when the selected tool file already exists |
250
+
251
+ ### 3.3 Present the preview
252
+
253
+ Present the complete file list as two tables, separating create vs
254
+ skip, and wait for developer confirmation:
255
+
256
+ > "Based on Step 1 inventory + Step 2 answers, here is what I'll do:
257
+ >
258
+ > **Will create ({N} files):**
259
+ >
260
+ > | Path | Source |
261
+ > |---|---|
262
+ > | `dflow/specs/features/active/.gitkeep` | (directory placeholder) |
263
+ > | `dflow/specs/features/completed/.gitkeep` | (directory placeholder) |
264
+ > | `dflow/specs/features/backlog/.gitkeep` | (directory placeholder) |
265
+ > | `dflow/specs/domain/glossary.md` | `templates/glossary.md` (mandatory baseline) |
266
+ > | `dflow/specs/domain/context-map.md` | `templates/context-map.md` (mandatory baseline) |
267
+ > | `dflow/specs/shared/_conventions.md` | `scaffolding/_conventions.md` (mandatory baseline) |
268
+ > | `dflow/specs/architecture/tech-debt.md` | `templates/tech-debt.md` (mandatory baseline) |
269
+ > | `dflow/specs/architecture/decisions/README.md` | `scaffolding/architecture-decisions-README.md` (mandatory baseline) |
270
+ > | `dflow/specs/shared/_overview.md` | optional (you picked it) |
271
+ > | `dflow/specs/shared/Git-principles-trunk.md` | mandatory (selected Git policy) |
272
+ > | `dflow/specs/shared/AI-AGENT-GUIDE.md` | selected AI agent guide |
273
+ > | `CLAUDE.md` | selected tool shim because repo has no CLAUDE.md |
274
+ >
275
+ > **Will skip ({M} files — already present):**
276
+ >
277
+ > | Path | Reason |
278
+ > |---|---|
279
+ > | `dflow/specs/domain/glossary.md` | already exists (47 lines) |
280
+ >
281
+ > **Not creating** (per F-05 decision):
282
+ > - No `dflow/specs/domain/{context}/behavior.md` files. These are created
283
+ > later by `/dflow:new-feature` Step 8.3 or P007a when the first
284
+ > bounded context is established.
285
+ > - No pre-seeded ADR files in `dflow/specs/architecture/decisions/`. Write
286
+ > ADRs as architecture decisions come up; Day-0 is too early.
287
+ >
288
+ > Looks good? Reply 'yes' to proceed with the writes, or tell me what to
289
+ > adjust."
290
+
291
+ **→ Step Gate: Step 3 → Step 4**
292
+
293
+ Wait for explicit confirmation. If the developer asks to change the
294
+ selection, go back to the relevant Step 2 question (Q5–Q8) and re-run Step 3.
295
+
296
+ ---
297
+
298
+ ## Step 4: Write Files (placeholder fill-in + existing-file protection)
299
+
300
+ Execute the write plan agreed in Step 3. Use the Write tool (or
301
+ mkdir-equivalent for directories).
302
+
303
+ ### 4.1 Existing-file protection (strict)
304
+
305
+ Before every single write, re-check: does the target path already
306
+ exist? If yes, **skip** — do not overwrite. Announce the skip:
307
+
308
+ > "Skipped `dflow/specs/domain/glossary.md` — already exists (unchanged)."
309
+
310
+ Only overwrite if the developer said explicitly "overwrite X" in
311
+ Step 2 (rare; usually a conscious reset during early adoption).
312
+
313
+ ### 4.2 Placeholder substitution
314
+
315
+ When writing from `scaffolding/` sources, substitute the placeholders
316
+ captured in Step 2:
317
+
318
+ | Placeholder | Substitution source |
319
+ |---|---|
320
+ | `{YYYY-MM-DD}` | Today's date (ISO format) |
321
+ | `{System Name}` / `{系統名稱}` | From Step 2 or repo folder name |
322
+ | `{業務領域}` | From Step 2 Q1 / Q2 context |
323
+ | `{Language}` | From Step 2 Q2 |
324
+ | `{Framework}` | From Step 2 Q2 |
325
+ | `{Framework version}` | From Step 2 Q2 |
326
+ | `{ORM / persistence}` | From Step 2 Q2 |
327
+ | `{ORM version}` | From Step 2 Q2 |
328
+ | `{Mediator}` | From Step 2 Q2 |
329
+ | `{Test framework}` | From Step 2 Q2 |
330
+ | `{prose-language}` | From Step 2 Q4 |
331
+
332
+ For placeholders the developer did not provide, keep the `{placeholder}`
333
+ token in the emitted file and add a one-line TODO comment so they
334
+ notice:
335
+
336
+ ```markdown
337
+ <!-- TODO: fill in 業務領域 on next review -->
338
+ ```
339
+
340
+ ### 4.3 Special case — AI agent instruction files
341
+
342
+ If the developer selected any AI coding agent in Q8, create
343
+ `dflow/specs/shared/AI-AGENT-GUIDE.md` as the canonical Dflow project
344
+ guide.
345
+
346
+ For each selected tool-specific file (`AGENTS.md`, `CLAUDE.md`,
347
+ `.github/copilot-instructions.md`):
348
+
349
+ - if the target file does not exist, create a small shim at the target
350
+ path that points to `dflow/specs/shared/AI-AGENT-GUIDE.md`
351
+ - if the target file already exists, do not overwrite it; write a merge
352
+ snippet under `dflow/specs/shared/` and report that the developer
353
+ should merge it manually
354
+
355
+ ### 4.4 Directory-only entries
356
+
357
+ For directories that Git otherwise wouldn't track (empty `active/` /
358
+ `completed/` / `backlog/`), seed a `.gitkeep` file so the directory
359
+ persists across clones.
360
+
361
+ For `dflow/specs/architecture/decisions/`, seed a short `README.md` describing
362
+ the ADR naming convention (`ADR-NNNN-{slug}.md`) rather than a
363
+ `.gitkeep` — this serves as in-directory documentation for future
364
+ writers.
365
+
366
+ **→ Transition (step-internal)**: Step 4 complete. Announce
367
+ > "Step 4 complete (files written). Entering Step 5: Results + next
368
+ > steps."
369
+
370
+ and continue.
371
+
372
+ ---
373
+
374
+ ## Step 5: Results Report + Next-step Recommendation
375
+
376
+ Summarise what actually happened and point at the next command.
377
+
378
+ ### 5.1 Summary report
379
+
380
+ ```
381
+ Init complete. Summary:
382
+
383
+ Created ({N} files):
384
+ ✓ dflow/specs/features/active/.gitkeep
385
+ ✓ dflow/specs/features/completed/.gitkeep
386
+ ✓ dflow/specs/features/backlog/.gitkeep
387
+ ✓ dflow/specs/domain/glossary.md
388
+ ✓ dflow/specs/domain/context-map.md
389
+ ✓ dflow/specs/shared/_conventions.md
390
+ ✓ dflow/specs/architecture/tech-debt.md
391
+ ✓ dflow/specs/architecture/decisions/README.md
392
+ ✓ dflow/specs/shared/_overview.md
393
+ ✓ dflow/specs/shared/Git-principles-trunk.md
394
+ ✓ CLAUDE.md (seeded from scaffolding snippet)
395
+
396
+ Skipped ({M} files already present):
397
+ - (none this run)
398
+
399
+ Deferred (not created here by design):
400
+ - dflow/specs/domain/{context}/behavior.md — created by /dflow:new-feature
401
+ Step 8.3 or P007a baseline capture
402
+ - dflow/specs/architecture/decisions/ADR-*.md — write ADRs as
403
+ architecture decisions come up, not speculatively
404
+ ```
405
+
406
+ ### 5.2 Next-step recommendation
407
+
408
+ Tailor the recommendation to the Step 1 scenario:
409
+
410
+ **Greenfield**:
411
+
412
+ > "Structure is ready. Recommended next step:
413
+ > - Run `/dflow:new-feature` to start your first feature
414
+ > (this will create `dflow/specs/features/active/{SPEC-ID}-{slug}/` and
415
+ > walk you through spec → Aggregate design → implementation plan)
416
+ > - Your first feature will also establish your first bounded context;
417
+ > the completion flow will baseline `dflow/specs/domain/{context}/` at
418
+ > that point."
419
+
420
+ **Brownfield**:
421
+
422
+ > "Structure is ready. Recommended next step:
423
+ > - First, fill in `dflow/specs/shared/_overview.md` — especially the
424
+ > 'Current System State' and 'Known Issues' sections. Also
425
+ > pre-populate `dflow/specs/domain/context-map.md` if you already have a
426
+ > working understanding of your bounded contexts; otherwise let it
427
+ > emerge as features land.
428
+ > - Then run `/dflow:modify-existing` to work from an incoming change
429
+ > request (most common Brownfield entry), or `/dflow:new-feature`
430
+ > for a fresh piece of work.
431
+ > - When you touch a domain concept for the first time, the completion
432
+ > flow will prompt you to baseline it into
433
+ > `dflow/specs/domain/{context}/` — don't try to pre-fill everything
434
+ > up front."
435
+
436
+ **Already fully set up (Step 1 showed nothing to do)**:
437
+
438
+ > "Your project already has a complete Dflow layout — nothing to do.
439
+ > If you were expecting changes, let me know which file you wanted
440
+ > refreshed and I'll skip the safety-net."
441
+
442
+ ### 5.3 Optional: review project-level files
443
+
444
+ Remind the developer to review files that have `{placeholder}` tokens
445
+ still in them:
446
+
447
+ > "A few files still have `{placeholder}` tokens that need your input:
448
+ > - `dflow/specs/shared/_overview.md`: `{業務領域}`, `{團隊}`,
449
+ > `{使用者規模}`
450
+ > - `dflow/specs/domain/context-map.md`: context list and relationships
451
+ > - `CLAUDE.md`: `{業務領域}`
452
+ >
453
+ > These are fine to leave for now; fill them in during your next
454
+ > review pass."
455
+
456
+ ---
457
+
458
+ ## Notes & references
459
+
460
+ - Scaffolding templates: packaged in the Dflow tarball; project-local
461
+ outputs land under `dflow/specs/shared/`
462
+ - `_index.md` feature template: `dflow/specs/shared/dflow-workflows/templates/_index.md`
463
+ (used by `/dflow:new-feature`, NOT by this flow)
464
+ - Git integration rules: `dflow/specs/shared/dflow-workflows/references/git-integration.md`