dflow-sdd-ddd 0.2.0 → 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.
- package/CHANGELOG.md +879 -0
- package/README.en.md +345 -0
- package/README.md +213 -159
- package/docs/evaluating-dflow.en.md +238 -0
- package/docs/evaluating-dflow.md +94 -151
- package/docs/migrating-to-dflow-v1.md +28 -10
- package/docs/using-with-claude-code.en.md +210 -0
- package/docs/using-with-claude-code.md +108 -124
- package/docs/using-with-codex.en.md +248 -0
- package/docs/using-with-codex.md +137 -157
- package/docs/using-with-gemini-cli.en.md +200 -0
- package/docs/using-with-gemini-cli.md +184 -0
- package/docs/using-with-github-copilot.en.md +136 -0
- package/docs/using-with-github-copilot.md +177 -0
- package/docs/why-ddd-for-ai.en.md +37 -0
- package/docs/why-ddd-for-ai.md +19 -17
- package/package.json +1 -1
- package/templates/brownfield/scaffolding/AI-AGENT-GUIDE.md +2 -1
- package/templates/brownfield/scaffolding/CLAUDE-md-snippet.md +7 -7
- package/templates/brownfield/templates/CLAUDE.md +1 -1
- package/templates/brownfield/templates/phase-spec.md +23 -20
- package/templates/greenfield/scaffolding/AI-AGENT-GUIDE.md +2 -1
- package/templates/greenfield/scaffolding/CLAUDE-md-snippet.md +8 -7
- package/templates/greenfield/scaffolding/_conventions.md +1 -1
- package/templates/greenfield/templates/CLAUDE.md +1 -1
- package/templates/greenfield/templates/phase-spec.md +24 -21
|
@@ -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
|
|
23
|
-
These
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
The "Implementation Tasks" section at the end is generated by AI after
|
|
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:
|
|
43
|
+
## Problem Description <!-- Fill timing: Activity 1: Understanding -->
|
|
41
44
|
|
|
42
45
|
> 用使用者的角度描述,避免技術用語。
|
|
43
46
|
|
|
44
|
-
## Domain Concepts <!-- Fill timing:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
|
180
|
+
## Implementation Tasks <!-- Fill timing: generated by AI after Activity 4: Implementation Planning; all items should be checked at completion -->
|
|
178
181
|
|
|
179
|
-
> AI 在
|
|
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
|