dflow-sdd-ddd 0.2.0 → 0.4.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 (41) hide show
  1. package/CHANGELOG.md +971 -0
  2. package/README.en.md +345 -0
  3. package/README.md +213 -159
  4. package/docs/evaluating-dflow.en.md +238 -0
  5. package/docs/evaluating-dflow.md +94 -151
  6. package/docs/examples-by-stack.md +516 -0
  7. package/docs/migrating-to-dflow-v1.md +28 -10
  8. package/docs/release-versioning-policy.md +13 -0
  9. package/docs/using-with-claude-code.en.md +210 -0
  10. package/docs/using-with-claude-code.md +108 -124
  11. package/docs/using-with-codex.en.md +248 -0
  12. package/docs/using-with-codex.md +137 -157
  13. package/docs/using-with-gemini-cli.en.md +200 -0
  14. package/docs/using-with-gemini-cli.md +184 -0
  15. package/docs/using-with-github-copilot.en.md +136 -0
  16. package/docs/using-with-github-copilot.md +177 -0
  17. package/docs/why-ddd-for-ai.en.md +37 -0
  18. package/docs/why-ddd-for-ai.md +19 -17
  19. package/lib/init.js +187 -24
  20. package/package.json +1 -1
  21. package/templates/brownfield/scaffolding/AI-AGENT-GUIDE.md +2 -1
  22. package/templates/brownfield/scaffolding/CLAUDE-md-snippet.md +32 -22
  23. package/templates/brownfield/scaffolding/Git-principles-gitflow.md +1 -1
  24. package/templates/brownfield/scaffolding/Git-principles-trunk.md +1 -1
  25. package/templates/brownfield/scaffolding/_conventions.md +1 -1
  26. package/templates/brownfield/scaffolding/_overview.md +40 -29
  27. package/templates/brownfield/templates/CLAUDE.md +26 -18
  28. package/templates/brownfield/templates/context-definition.md +4 -4
  29. package/templates/brownfield/templates/context-map.md +1 -1
  30. package/templates/brownfield/templates/lightweight-spec.md +3 -1
  31. package/templates/brownfield/templates/models.md +1 -1
  32. package/templates/brownfield/templates/phase-spec.md +33 -28
  33. package/templates/brownfield/templates/tech-debt.md +2 -2
  34. package/templates/greenfield/scaffolding/AI-AGENT-GUIDE.md +2 -1
  35. package/templates/greenfield/scaffolding/CLAUDE-md-snippet.md +14 -13
  36. package/templates/greenfield/scaffolding/Git-principles-gitflow.md +2 -2
  37. package/templates/greenfield/scaffolding/Git-principles-trunk.md +2 -2
  38. package/templates/greenfield/scaffolding/_conventions.md +1 -1
  39. package/templates/greenfield/scaffolding/_overview.md +29 -11
  40. package/templates/greenfield/templates/CLAUDE.md +6 -6
  41. package/templates/greenfield/templates/phase-spec.md +24 -21
@@ -14,9 +14,9 @@
14
14
 
15
15
  ## How to use this snippet
16
16
 
17
- - New `npx dflow-sdd-ddd init` output uses
18
- `dflow/specs/shared/AI-AGENT-GUIDE.md` as the canonical guide and creates
19
- a thin `CLAUDE.md` shim that points back to it.
17
+ - New Dflow CLI init output (`dflow init`, or `npx dflow-sdd-ddd init` when
18
+ using the no-install path) uses `dflow/specs/shared/AI-AGENT-GUIDE.md` as
19
+ the canonical guide and creates a thin `CLAUDE.md` shim that points back to it.
20
20
  - Use this legacy snippet only if you intentionally want the older
21
21
  Claude-specific two-H2 layout in your project's root `CLAUDE.md`.
22
22
 
@@ -29,7 +29,7 @@ keeps every project's `CLAUDE.md` scannable for AI in the same shape.
29
29
  ## Snippet to merge into `CLAUDE.md`
30
30
 
31
31
  ```markdown
32
- # Project: {系統名稱} — ASP.NET Core + DDD
32
+ # Project: {系統名稱} — Clean Architecture + DDD
33
33
 
34
34
  **重要:所有開發工作都必須遵循本文件定義的流程。**
35
35
 
@@ -45,8 +45,8 @@ keeps every project's `CLAUDE.md` scannable for AI in the same shape.
45
45
  - **Users / Customers**: {使用者 / 客戶描述}
46
46
  - **Team**: {團隊組成;e.g. "全端工程團隊,3-5 人;DDD 經驗中等"}
47
47
  - **Dflow Adoption Context**: {新專案 greenfield / 既有系統導入 / 遷移等}
48
- - **Tech Stack**: ASP.NET Core {版本};EF Core / MediatR / {其他};
49
- .NET {版本}
48
+ - **Tech Stack**: {Framework} {Framework version};{ORM / persistence} {ORM version} / {Mediator} / {其他};
49
+ {Language}
50
50
 
51
51
  ### Architecture (Clean Architecture)
52
52
 
@@ -60,13 +60,13 @@ Presentation → Application → Domain ← Infrastructure
60
60
  |---|---|---|
61
61
  | Domain | 業務規則、Aggregate、Value Object、Domain Event | 依賴外部套件、存取資料庫、處理 HTTP |
62
62
  | Application | 編排領域操作、CQRS、驗證、DTO | 包含業務邏輯、直接存取資料庫 |
63
- | Infrastructure | EF Core、外部 API、檔案存取 | 包含業務邏輯 |
63
+ | Infrastructure | {ORM / persistence}、外部 API、檔案存取 | 包含業務邏輯 |
64
64
  | Presentation | HTTP 端點、Request/Response | 包含業務邏輯、直接操作 Domain 物件 |
65
65
 
66
66
  ### Project Structure
67
67
 
68
68
  完整 specs 目錄結構見 Dflow skill `SKILL.md` § "Project Structure"。
69
- 以下只列本專案當前狀態(`npx dflow-sdd-ddd init` 建立後可能還未全填):
69
+ 以下只列本專案當前狀態(Dflow CLI init 建立後可能還未全填):
70
70
 
71
71
  ```
72
72
  dflow/specs/
@@ -101,7 +101,7 @@ AI 的完整決策樹、Workflow Transparency、Ceremony Scaling 三層判準
101
101
  - `sdd-ddd-greenfield-skill/references/` 內各 flow 文件
102
102
 
103
103
  本專案採用的 Dflow entry points:
104
- - `npx dflow-sdd-ddd init` — 專案初始化(一次性,已執行過)
104
+ - Dflow CLI init command (`dflow init`, or `npx dflow-sdd-ddd init` when using the no-install path) — 專案初始化(一次性,已執行過)
105
105
  - `/dflow:new-feature` — 新功能
106
106
  - `/dflow:new-phase` — 既有 active feature 加新 phase
107
107
  - `/dflow:modify-existing` — 修改既有行為
@@ -120,7 +120,7 @@ AI 的完整決策樹、Workflow Transparency、Ceremony Scaling 三層判準
120
120
 
121
121
  ### Domain Layer Rules (Hard Invariants)
122
122
 
123
- - ❌ 不可有任何 NuGet 套件依賴(純 .NET 類型)
123
+ - ❌ 不可有任何外部套件依賴(語言純粹 types)
124
124
  - ❌ 不可有 ORM 屬性(`[Table]`、`[Column]` 等)
125
125
  - ❌ 不可有序列化屬性(`[JsonProperty]` 等)
126
126
  - ❌ 不可有 `DbContext`、`IConfiguration`、`HttpClient`
@@ -133,7 +133,7 @@ AI 的完整決策樹、Workflow Transparency、Ceremony Scaling 三層判準
133
133
 
134
134
  {此段由專案自行填入。例如:}
135
135
 
136
- - **本專案使用 MediatR 做 Command / Query dispatch**,Application 層
136
+ - **本專案使用 {Mediator} 做 Command / Query dispatch(若適用)**,Application 層
137
137
  Command / Query Handler 命名為 `{Name}CommandHandler` /
138
138
  `{Name}QueryHandler`
139
139
  - **整合測試使用 {Testcontainers / WebApplicationFactory / 其他}**;
@@ -165,5 +165,6 @@ AI 的完整決策樹、Workflow Transparency、Ceremony Scaling 三層判準
165
165
  - The snippet does NOT re-copy the Dflow decision tree, Ceremony
166
166
  Scaling criteria, or per-flow step details — those live in the
167
167
  skill and change when the skill evolves
168
- - Re-run `npx dflow-sdd-ddd init` will NOT overwrite an existing
169
- `CLAUDE.md`; if you want to re-sync, merge manually
168
+ - Re-running the Dflow CLI init command (`dflow init`, or `npx dflow-sdd-ddd init`
169
+ when using the no-install path) will NOT overwrite an existing `CLAUDE.md`;
170
+ if you want to re-sync, merge manually
@@ -174,7 +174,7 @@ Before making key Git operations:
174
174
  `context-map.md` reflect the feature's net changes
175
175
  - [ ] `dflow/specs/domain/glossary.md` updated with any new terms
176
176
  - [ ] `dflow/specs/architecture/tech-debt.md` updated with any debt discovered
177
- - [ ] Domain project has zero external NuGet dependencies
177
+ - [ ] Domain project has zero external package dependencies
178
178
  - [ ] No ORM / serialization attributes on Domain entities
179
179
  - [ ] Domain unit tests pass (invariants + value object equality)
180
180
 
@@ -334,7 +334,7 @@ exists, e.g. `.github/workflows/ci.yml` or `azure-pipelines.yml`.}
334
334
 
335
335
  ### Suggested CI gates for Clean Architecture
336
336
 
337
- - Verify Domain project has zero (or allow-listed) NuGet deps
337
+ - Verify Domain project has zero (or allow-listed) external package deps
338
338
  - Run Domain unit tests + Application tests on every PR
339
339
  - Run Integration tests on `develop` and `release/*` branches
340
340
  - Verify EF migrations build cleanly
@@ -249,7 +249,7 @@ Before making key Git operations:
249
249
  `context-map.md` reflect the feature's net changes
250
250
  - [ ] `dflow/specs/domain/glossary.md` updated with any new terms
251
251
  - [ ] `dflow/specs/architecture/tech-debt.md` updated with any debt discovered
252
- - [ ] Domain project has zero external NuGet dependencies
252
+ - [ ] Domain project has zero external package dependencies
253
253
  - [ ] No ORM / serialization attributes on Domain entities
254
254
  - [ ] Domain unit tests pass (invariants + value object equality)
255
255
  - [ ] CI is green (all required checks passing)
@@ -359,7 +359,7 @@ exists, e.g. `.github/workflows/ci.yml` or `azure-pipelines.yml`.}
359
359
 
360
360
  ### Suggested CI gates for Clean Architecture
361
361
 
362
- - Verify Domain project has zero (or allow-listed) NuGet deps
362
+ - Verify Domain project has zero (or allow-listed) external package deps
363
363
  - Run Domain unit tests + Application tests on every PR
364
364
  - Run Integration tests on `main` and pre-deploy
365
365
  - Verify EF migrations build cleanly
@@ -101,7 +101,7 @@ Project-specific guidance when filling these templates:
101
101
  descriptions (Mermaid state diagram or Given / When / Then + "And
102
102
  the Aggregate is in state X").
103
103
  - **CQRS split**: commands (write) vs queries (read) should be
104
- identified during Phase 4 (Implementation Planning). Commands
104
+ identified during Activity 4 (Implementation Planning). Commands
105
105
  generally map 1:1 to an Aggregate method; queries bypass the
106
106
  Domain layer and read projections.
107
107
 
@@ -30,19 +30,18 @@ delivers. Keep it non-technical enough that a new hire can skim it in
30
30
 
31
31
  ## Technical Architecture
32
32
 
33
- This project is an ASP.NET Core application built with **Clean
34
- Architecture** and **Domain-Driven Design (DDD)**. Dependencies flow
35
- inward only — the Domain layer is the core and depends on nothing.
33
+ This project follows **Clean Architecture** and **Domain-Driven Design
34
+ (DDD)**. Dependencies flow inward only — the Domain layer is the core
35
+ and depends on nothing.
36
36
 
37
37
  ### Stack
38
38
 
39
39
  | Item | Choice |
40
40
  |------|--------|
41
- | Runtime | .NET {version, e.g. 8} |
42
- | Language | C# {version, e.g. 12} |
43
- | Web framework | ASP.NET Core (Web API / Minimal API — {which}) |
44
- | ORM | Entity Framework Core {version} |
45
- | Mediator | {e.g. MediatR, internal CQRS dispatcher, or none} |
41
+ | Language | {Language} |
42
+ | Framework | {Framework} {Framework version} |
43
+ | ORM / persistence | {ORM / persistence} {ORM version} |
44
+ | Mediator | {Mediator} (or none) |
46
45
  | Validation | {e.g. FluentValidation} |
47
46
  | Database | {e.g. PostgreSQL 16, SQL Server 2022} |
48
47
  | Auth | {e.g. JWT bearer, OIDC via Azure AD, cookie auth} |
@@ -57,13 +56,32 @@ Presentation → Application → Domain ← Infrastructure
57
56
 
58
57
  | Layer | Responsibilities | Must NOT |
59
58
  |-------|------------------|----------|
60
- | Domain | Aggregates, Entities, Value Objects, Domain Events, Domain Services, repository interfaces | Depend on any NuGet package outside allowed list; know about EF Core, HTTP, DI containers |
59
+ | Domain | Aggregates, Entities, Value Objects, Domain Events, Domain Services, repository interfaces | Depend on package-manager libraries outside the project's allow-list; know about ORM/persistence frameworks, HTTP, DI containers |
61
60
  | Application | Commands / Queries (CQRS), Validators, DTOs, Event Handlers, orchestration | Contain business logic; access database directly |
62
- | Infrastructure | EF Core `DbContext` + configurations, repository implementations, external API clients | Contain business logic |
61
+ | Infrastructure | ORM / persistence configuration, repository implementations, external API clients | Contain business logic |
63
62
  | Presentation | HTTP endpoints, Request / Response mapping, auth + middleware | Contain business logic; expose Domain objects directly |
64
63
 
65
64
  ### Project Layout
66
65
 
66
+ > **Note**: The project layout below uses .NET/C# conventions —
67
+ > project-level namespaces like `{Project}.Domain` and a separate `.csproj`
68
+ > per layer. This is shown as a concrete example so you can see "what a
69
+ > real Clean Architecture layout looks like".
70
+ >
71
+ > If this project's stack is **not** .NET, this layout does **not**
72
+ > literally apply — translate to the conventions of your stack:
73
+ >
74
+ > - Java/Spring: `com.example.domain` / `com.example.application` packages, often a multi-module Maven/Gradle build
75
+ > - Node/TypeScript: `src/domain/` / `src/application/` folders, monorepo workspaces optional
76
+ > - Python: `domain/` / `application/` packages
77
+ > - Go: `internal/domain/` / `internal/application/`
78
+ > - PHP/Laravel: `app/Domain/` / `app/Application/`
79
+ >
80
+ > For full per-stack examples, see `docs/examples-by-stack.md`. If the
81
+ > convention for your stack is unclear, consult authoritative sources
82
+ > for the stack (e.g., its official project structure guide) or ask the
83
+ > developer before placing code.
84
+
67
85
  ```
68
86
  src/
69
87
  ├── {Project}.Domain/
@@ -147,7 +165,7 @@ format / MADR / other}.
147
165
  Initial ADRs that typically exist:
148
166
 
149
167
  - **ADR-0001** — Choice of ORM / persistence approach
150
- - **ADR-0002** — CQRS + MediatR vs direct handlers
168
+ - **ADR-0002** — CQRS + mediator/dispatcher vs direct handlers
151
169
  - **ADR-0003** — Auth strategy
152
170
 
153
171
  ---
@@ -1,4 +1,4 @@
1
- # Project: {系統名稱} — ASP.NET Core + DDD
1
+ # Project: {系統名稱} — Clean Architecture + DDD
2
2
 
3
3
  **重要:所有開發工作都必須遵循本文件定義的流程。**
4
4
 
@@ -10,7 +10,7 @@
10
10
 
11
11
  ### Background
12
12
 
13
- 這是一個使用 Clean Architecture 和 Domain-Driven Design 的 ASP.NET Core 系統。
13
+ 這是一個遵循 Clean Architecture 與 Domain-Driven Design 的新建專案;具體 stack 詳見 `dflow/specs/shared/_overview.md`。
14
14
  採用 SDD 流程,所有開發工作必須遵循本文件定義的流程。
15
15
 
16
16
  ### Architecture (Clean Architecture)
@@ -27,15 +27,15 @@ Presentation → Application → Domain ← Infrastructure
27
27
  |---|---|---|
28
28
  | Domain | 業務規則、Aggregate、Value Object、Domain Event | 依賴外部套件、存取資料庫、處理 HTTP |
29
29
  | Application | 編排領域操作、CQRS、驗證、DTO | 包含業務邏輯、直接存取資料庫 |
30
- | Infrastructure | EF Core、外部 API、檔案存取 | 包含業務邏輯 |
30
+ | Infrastructure | {ORM / persistence}、外部 API、檔案存取 | 包含業務邏輯 |
31
31
  | Presentation | HTTP 端點、Request/Response | 包含業務邏輯、直接操作 Domain 物件 |
32
32
 
33
33
  ### Project Structure
34
34
 
35
35
  ```
36
36
  dflow/specs/
37
- ├── shared/ # 專案級治理文件(由 npx dflow-sdd-ddd init 寫入)
38
- │ ├── _overview.md # 系統現況與遷移策略
37
+ ├── shared/ # 專案級治理文件(由 dflow init 寫入)
38
+ │ ├── _overview.md # 系統概覽與架構方向
39
39
  │ └── _conventions.md # 規格撰寫慣例
40
40
  ├── domain/
41
41
  │ ├── glossary.md
@@ -154,7 +154,7 @@ bugfix/{BUG-ID}-{short-description} # Bug 修復(SDD 必須)
154
154
 
155
155
  ### Domain Layer Rules
156
156
 
157
- - ❌ 不可有任何 NuGet 套件依賴(純 .NET 類型)
157
+ - ❌ 不可有任何外部套件依賴(語言純粹 types)
158
158
  - ❌ 不可有 ORM 屬性([Table], [Column] 等)
159
159
  - ❌ 不可有序列化屬性([JsonProperty] 等)
160
160
  - ❌ 不可有 DbContext、IConfiguration、HttpClient
@@ -19,17 +19,20 @@ Template note (for AI):
19
19
  `phase-spec-YYYY-MM-DD-{slug}.md` placed at
20
20
  `dflow/specs/features/active/{SPEC-ID}-{slug}/`.
21
21
 
22
- Each section below carries an HTML comment indicating its fill-in phase (Phase 1-4).
23
- These phase markers let /dflow:status and the completion checklist track progress.
24
- Phases correspond to SKILL.md § Guiding Questions by Phase:
25
- Phase 1 - Understanding (What & Why)
26
- Phase 2 - Domain Modeling (BC, Aggregate, VO, Events)
27
- Phase 3 - Spec Writing (Behavior + Rules + Edge Cases)
28
- Phase 4 - Implementation Planning (layer-by-layer)
29
- The "Implementation Tasks" section at the end is generated by AI after Phase 4 planning is done
22
+ Each section below carries an HTML comment indicating its fill-in activity (Activity 1-4).
23
+ These activity markers let /dflow:status and the completion checklist track progress.
24
+ Activities correspond to SKILL.md § Guiding Questions by Activity:
25
+ Activity 1: Understanding (What & Why)
26
+ Activity 2: Domain Modeling (BC, Aggregate, VO, Events)
27
+ Activity 3: Spec Writing (Behavior + Rules + Edge Cases)
28
+ Activity 4: Implementation Planning (layer-by-layer)
29
+ The "Implementation Tasks" section at the end is generated by AI after Activity 4 (Implementation Planning) is done
30
30
  (see new-feature-flow.md Step 5 end / new-phase-flow.md Step 4 end /
31
31
  modify-existing-flow.md Step 3 end).
32
32
 
33
+ Note: "phase 2+ specs" / "Phase 2+" in the BR and Delta sections below refers to
34
+ the N-th phase-spec of this feature (i.e. iteration unit), NOT an activity number.
35
+
33
36
  For phase 2+ specs in the same feature: only list BRs that are NEW or
34
37
  MODIFIED in this phase under "Business Rules"; do not re-copy unchanged BRs from
35
38
  prior phases. The cumulative state lives in the feature's `_index.md`
@@ -37,11 +40,11 @@ Template note (for AI):
37
40
  bounded context's `rules.md` / `behavior.md` (synced at /dflow:finish-feature).
38
41
  -->
39
42
 
40
- ## Problem Description <!-- Fill timing: Phase 1 -->
43
+ ## Problem Description <!-- Fill timing: Activity 1: Understanding -->
41
44
 
42
45
  > 用使用者的角度描述,避免技術用語。
43
46
 
44
- ## Domain Concepts <!-- Fill timing: Phase 2 -->
47
+ ## Domain Concepts <!-- Fill timing: Activity 2: Domain Modeling -->
45
48
 
46
49
  涉及的 Domain 概念(引用 `dflow/specs/domain/{context}/models.md`):
47
50
 
@@ -55,7 +58,7 @@ Template note (for AI):
55
58
  - [ ] `dflow/specs/domain/{context}/events.md` — Domain Events
56
59
 
57
60
  <!-- dflow:section behavior-scenarios -->
58
- ## Behavior Scenarios <!-- Fill timing: Phase 3 -->
61
+ ## Behavior Scenarios <!-- Fill timing: Activity 3: Spec Writing -->
59
62
 
60
63
  ### Main Success Scenario
61
64
 
@@ -76,7 +79,7 @@ Scenario: {替代情境}
76
79
  Then {不同結果}
77
80
  ```
78
81
 
79
- ## Business Rules <!-- Fill timing: Phase 3 -->
82
+ ## Business Rules <!-- Fill timing: Activity 3: Spec Writing -->
80
83
 
81
84
  > Phase 2+ 注意:本段僅列**本 phase 新增 / 修改到的 BR**;未變動的 BR 不重抄
82
85
  > (它們的當前狀態見 feature 的 `_index.md` Current BR Snapshot 表)。
@@ -86,7 +89,7 @@ Scenario: {替代情境}
86
89
  | BR-01 | {規則描述} | Domain: {Entity/VO/Service} |
87
90
  | BR-02 | {規則描述} | Domain: {Entity/VO/Service} |
88
91
 
89
- ## Delta from prior phases <!-- Fill timing: Phase 3; skip for the first phase -->
92
+ ## Delta from prior phases <!-- Fill timing: Activity 3: Spec Writing; skip for the first phase -->
90
93
 
91
94
  > 本段僅記**本 phase 相對前一 phase 的變化**,不累積歷史。歷史由 feature 目錄下
92
95
  > 各 phase-spec 的本段串接閱讀;feature 層的當前累積狀態見 `_index.md` 的
@@ -122,19 +125,19 @@ And {產生的 Domain Event}
122
125
  - BR-003 金額上限
123
126
  - BR-005 提交後不可修改
124
127
 
125
- ## Edge Cases <!-- Fill timing: Phase 3 -->
128
+ ## Edge Cases <!-- Fill timing: Activity 3: Spec Writing -->
126
129
 
127
130
  | ID | Case | Expected Handling |
128
131
  |---|---|---|
129
132
  | EC-01 | {邊界描述} | {處理方式} |
130
133
 
131
- ## Domain Events <!-- Fill timing: Phase 2-3; draft during design, finalized during spec writing -->
134
+ ## Domain Events <!-- Fill timing: Activity 2-3; draft during Domain Modeling, finalized during Spec Writing -->
132
135
 
133
136
  | Event | Trigger | Handler | Sync / Async |
134
137
  |---|---|---|---|
135
138
  | {EventName} | {何時觸發} | {Handler} | 同步/異步 |
136
139
 
137
- ## Implementation Plan (Layer by Layer) <!-- Fill timing: Phase 4 -->
140
+ ## Implementation Plan (Layer by Layer) <!-- Fill timing: Activity 4: Implementation Planning -->
138
141
 
139
142
  ### Domain Layer
140
143
  > Aggregate 設計、Value Objects、Events、Interfaces
@@ -148,13 +151,13 @@ And {產生的 Domain Event}
148
151
  ### Presentation Layer
149
152
  > API Endpoint 設計、Request/Response 模型
150
153
 
151
- ## Data Structure Changes <!-- Fill timing: Phase 4 -->
154
+ ## Data Structure Changes <!-- Fill timing: Activity 4: Implementation Planning -->
152
155
 
153
156
  | Table | Column | Change Type | Description |
154
157
  |---|---|---|---|
155
158
  | {Table} | {Column} | 新增/修改/刪除 | |
156
159
 
157
- ## Test Strategy <!-- Fill timing: Phase 4 -->
160
+ ## Test Strategy <!-- Fill timing: Activity 4: Implementation Planning -->
158
161
 
159
162
  ### Domain Unit Tests
160
163
  - [ ] {不變條件測試}
@@ -169,14 +172,14 @@ And {產生的 Domain Event}
169
172
  - [ ] {Repository 測試}
170
173
 
171
174
  <!-- dflow:section open-questions -->
172
- ## Open Questions <!-- Fill timing: Phase 1-4 -->
175
+ ## Open Questions <!-- Fill timing: Activity 1-4; any time during planning -->
173
176
 
174
177
  - {尚未釐清的需求、規則、資料或實作問題}
175
178
 
176
179
  <!-- dflow:section implementation-tasks -->
177
- ## Implementation Tasks <!-- Fill timing: generated by AI after Phase 4; all items should be checked at completion -->
180
+ ## Implementation Tasks <!-- Fill timing: generated by AI after Activity 4: Implementation Planning; all items should be checked at completion -->
178
181
 
179
- > AI 在 Phase 4 實作規劃完成後,根據「Implementation Plan (Layer by Layer)」產生的具體任務清單。
182
+ > AI 在 Activity 4 (Implementation Planning) 完成後,根據「Implementation Plan (Layer by Layer)」產生的具體任務清單。
180
183
  > 格式:`[LAYER]-[NUMBER]: 任務描述`
181
184
  > 分類標籤(Greenfield track,對應 Clean Architecture 各層):
182
185
  > - `DOMAIN` — Aggregate、Entity、VO、Domain Event、Domain Service、Repository Interface