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,179 @@
1
+ # PR Review Checklist
2
+
3
+ When reviewing code changes or discussing PRs, use this checklist to ensure
4
+ the SDD/DDD workflow was followed.
5
+
6
+ `/dflow:pr-review` enters this checklist starting from **Step 0**. Do not skip Step 0 — reviewing code without first understanding spec intent breaks the SDD feedback loop (all the upstream spec work loses its verification mechanism).
7
+
8
+ ## Step 0: Understand the Change Intent (before code review)
9
+
10
+ Ground yourself in the spec *before* looking at the diff. A feature
11
+ directory may contain multiple spec files; identify which ones this PR
12
+ touches and read them all.
13
+
14
+ - [ ] Locate the feature directory at
15
+ `dflow/specs/features/active/{SPEC-ID}-{slug}/` (or
16
+ `dflow/specs/features/completed/{SPEC-ID}-{slug}/` if the PR is the
17
+ closeout commit and the dir was already `git mv`d)
18
+ - [ ] Read `_index.md` first — it gives you the feature-level overview,
19
+ Current BR Snapshot, list of phase-specs, and Resume Pointer (where the
20
+ author left off)
21
+ - [ ] Identify which **phase-spec(s)** and / or **lightweight-spec(s)**
22
+ this PR diff touches. There may be:
23
+ - A new phase-spec being introduced (T1) — read in full
24
+ - An existing phase-spec being marked `completed` — verify its
25
+ Delta-from-prior-phases section reads correctly relative to the
26
+ prior phase
27
+ - A new lightweight-spec (T2) — read in full
28
+ - Just T3 inline rows added to `_index.md` Lightweight Changes (no
29
+ spec file changed) — confirm the row description is precise
30
+ - [ ] If a `Behavior Delta` / Delta-from-prior-phases section exists,
31
+ read **ADDED / MODIFIED / REMOVED / RENAMED**; note any
32
+ **UNCHANGED** scope declaration
33
+ - [ ] State in one sentence: "This PR intends to {change} because
34
+ {reason}." (If you can't, pause and ask the author.)
35
+ - [ ] Only then proceed to the code-review sections below
36
+
37
+ If the PR has no spec or no `_index.md`:
38
+ ```
39
+ "I don't see a feature directory or _index.md for this PR. Before I
40
+ review the code, can you point me to it, or run /dflow:new-feature
41
+ (or /dflow:bug-fix for a small fix) to create the feature directory
42
+ and at least a lightweight spec? SDD relies on the spec being the
43
+ review anchor."
44
+ ```
45
+
46
+ ## Spec Compliance
47
+
48
+ Per-feature checks:
49
+ - [ ] **Feature directory exists** with `_index.md` + at least one
50
+ phase-spec (or one lightweight-spec for a T2-only feature)
51
+ - [ ] **`_index.md` Current BR Snapshot is up to date** — reflects
52
+ the cumulative effect of all phase-specs / lightweight-specs in
53
+ the directory
54
+ - [ ] **`_index.md` Phase Specs table** — every row's referenced
55
+ phase-spec file exists and its `status` matches the row's claim
56
+ - [ ] **For follow-up features**: `_index.md` Metadata has `follow-up-of:
57
+ {原 SPEC-ID}` AND the original feature's `_index.md`
58
+ Follow-up Tracking row references this feature
59
+
60
+ Per-phase-spec / lightweight-spec checks (run for **each** spec file the
61
+ PR touches, not just one):
62
+ - [ ] **Spec matches code** — implementation matches Given/When/Then
63
+ - [ ] **Business rules covered** — all BR-* rules in this spec
64
+ implemented
65
+ - [ ] **Edge cases handled** — EC-* in this spec addressed
66
+ - [ ] **Delta integrity** (phase 2+ only) — the Delta-from-prior-phases
67
+ section's ADDED / MODIFIED / REMOVED / RENAMED entries actually
68
+ match the diff against the prior phase-spec's BR set
69
+
70
+ If the closeout commit is in this PR (`/dflow:finish-feature` was run):
71
+ - [ ] **BC layer sync landed** — `dflow/specs/domain/{context}/rules.md` and
72
+ `behavior.md` reflect the feature's net effect (compare against
73
+ `_index.md` Current BR Snapshot)
74
+ - [ ] **Whole feature directory `git mv`'d** to `completed/` — git
75
+ shows `renamed:` (not `deleted:` + `new file:`)
76
+ - [ ] **Integration Summary** was emitted to the conversation (not
77
+ written to a file — it's ephemeral)
78
+
79
+ If the spec is missing or incomplete:
80
+ ```
81
+ "I notice this PR doesn't have a matching feature directory / _index.md.
82
+ Let's create one retroactively — it'll help with documentation and
83
+ the target architecture. Can you describe what this change does?"
84
+ ```
85
+
86
+ ## Domain Layer Quality
87
+
88
+ - [ ] **No delivery-framework references in Domain** — `src/Domain/` must have zero dependencies on HTTP request/response objects, session/cookie context, job-runner context, CLI flag parsers, or ViewState equivalents
89
+ - [ ] **No direct DB access in Domain** — All data access through interfaces
90
+ - [ ] **No delivery-framework runtime context in Domain** — Pure business logic only
91
+ - [ ] **Testable without delivery infrastructure** — Could you unit test this without the web server, job runner, message broker, or CLI runtime?
92
+
93
+ Common violations to flag:
94
+ ```text
95
+ // BAD: Domain code depending on delivery framework runtime
96
+ deliveryFramework.request.currentUser
97
+ deliveryFramework.session["key"]
98
+ jobRunnerContext.retryState
99
+ cliFlags["mode"]
100
+
101
+ // BAD: Direct DB in Domain
102
+ databaseClient.openConnection(connectionString)
103
+
104
+ // GOOD: Interface-based
105
+ public class ExpenseService
106
+ {
107
+ private readonly IExpenseRepository _repo;
108
+ public ExpenseService(IExpenseRepository repo) => _repo = repo;
109
+ }
110
+ ```
111
+
112
+ ## Delivery/Entrypoint Thickness
113
+
114
+ Evaluate whether business logic embedded in delivery/entrypoint code
115
+ (presentation/UI layer, controllers, handlers, jobs, message consumers, data
116
+ pipelines, or stored procedures) has been kept appropriately thin:
117
+
118
+ **Acceptable delivery/entrypoint responsibilities:**
119
+ - Parse inputs (UI controls, HTTP payloads, message payloads, job parameters, CLI args)
120
+ - Call Domain layer services
121
+ - Bind or return results
122
+ - Handle delivery-specific events (page load, route handler, message received, job started)
123
+ - Delivery-level validation (required fields, request shape, command syntax)
124
+
125
+ **Should be in Domain layer instead:**
126
+ - Calculations (math, conversions, aggregations)
127
+ - Business validation (rules, constraints, limits)
128
+ - State transitions (status changes, workflow steps)
129
+ - Data transformations (business meaning, not UI formatting)
130
+
131
+ If delivery/entrypoint code is too thick:
132
+ ```
133
+ "This delivery/entrypoint code has [calculation/validation/transformation] logic
134
+ that could be extracted to src/Domain/{Context}/. Since we're already
135
+ reviewing this, should we extract it now or record it in tech-debt.md
136
+ for later?"
137
+ ```
138
+
139
+ ## Glossary Consistency
140
+
141
+ - [ ] **New terms documented** — Any new business concept added to glossary.md?
142
+ - [ ] **Consistent naming** — Do class/method/variable names match glossary terms?
143
+ - [ ] **No ambiguous terms** — Are domain-specific terms used precisely?
144
+
145
+ Example check:
146
+ ```
147
+ "I see you're using 'reimbursement' in the code but the glossary
148
+ uses '報銷 (Expense Claim)'. Should we align the naming?"
149
+ ```
150
+
151
+ ## Domain Documentation Updates
152
+
153
+ - [ ] **models.md updated** — New entities/VOs/services documented?
154
+ - [ ] **rules.md updated** — New or changed business rules recorded?
155
+ - [ ] **context.md boundaries respected** — Does this change stay within its context?
156
+
157
+ ## Tech Debt Awareness
158
+
159
+ - [ ] **New debt recorded** — Any shortcuts or compromises documented in tech-debt.md?
160
+ - [ ] **Existing debt not worsened** — Did this change make existing tech debt worse?
161
+ - [ ] **Debt reduced** — Did this change fix any existing tech-debt.md items? If so, check them off.
162
+
163
+ ## Migration Readiness Score
164
+
165
+ Rate the PR on a quick migration readiness scale:
166
+
167
+ - **A**: New business logic entirely in Domain layer, fully testable, spec complete
168
+ - **B**: Mostly in Domain layer, some minor coupling, spec exists
169
+ - **C**: Mixed — some extraction done, some logic still in delivery/entrypoint code
170
+ - **D**: All logic in delivery/entrypoint code, but at least documented in spec/tech-debt
171
+ - **F**: No spec, no extraction, no documentation — push back
172
+
173
+ Share the score with the developer constructively:
174
+ ```
175
+ "This PR is a solid B — the exchange rate logic is cleanly extracted
176
+ to Domain, and the spec covers the key scenarios. One thing that would
177
+ make it an A: the date parsing logic in the delivery/entrypoint layer could
178
+ move to a DateRange value object. Want to do that now or add it to tech-debt?"
179
+ ```
@@ -121,12 +121,39 @@ Recommend `docs/migrating-to-dflow-v1.md` for the manual migration
121
121
  checklist. Migration affects every spec the team has written; manual
122
122
  review is required.
123
123
 
124
+ ## Workflow Steps
125
+
126
+ This guide is the **command registry, routing rules, and project context**.
127
+ Executable workflow steps (Step 1→N, step gates, completion checklists) are
128
+ **not** defined here. They live in the vendored workflow bundle projected into
129
+ this project at:
130
+
131
+ - `dflow/specs/shared/dflow-workflows/`
132
+
133
+ When executing a `/dflow:*` command, read the matching flow file from that
134
+ directory first. For example:
135
+
136
+ | Command | Flow file |
137
+ |---|---|
138
+ | `/dflow:new-feature` | `dflow/specs/shared/dflow-workflows/references/new-feature-flow.md` |
139
+ | `/dflow:modify-existing` | `dflow/specs/shared/dflow-workflows/references/modify-existing-flow.md` |
140
+ | `/dflow:bug-fix` | `dflow/specs/shared/dflow-workflows/references/modify-existing-flow.md` (lightweight-ceremony branch) |
141
+ | `/dflow:new-phase` | `dflow/specs/shared/dflow-workflows/references/new-phase-flow.md` |
142
+ | `/dflow:finish-feature` | `dflow/specs/shared/dflow-workflows/references/finish-feature-flow.md` |
143
+ | `/dflow:verify` | `dflow/specs/shared/dflow-workflows/references/drift-verification.md` |
144
+ | `/dflow:pr-review` | `dflow/specs/shared/dflow-workflows/references/pr-review-checklist.md` |
145
+ | `/dflow:report-dflow-feedback` | `dflow/specs/shared/dflow-workflows/references/dflow-feedback-flow.md` |
146
+
147
+ Supporting files (templates, drift checklist) are also in
148
+ `dflow/specs/shared/dflow-workflows/` under the same relative paths used
149
+ by the flow files.
150
+
124
151
  ## Tool-Specific Notes
125
152
 
126
- This file is the canonical Dflow guide. Root-level files such as
127
- `AGENTS.md`, `CLAUDE.md`, and `.github/copilot-instructions.md`
153
+ This file is the canonical Dflow guide (registry + rules + router). Root-level
154
+ files such as `AGENTS.md`, `CLAUDE.md`, and `.github/copilot-instructions.md`
128
155
  should stay thin and point back here.
129
156
 
130
157
  If a tool does not support Dflow slash commands, treat the command names as
131
- plain workflow names. This guide contains the installed runtime behavior
132
- contract; execute the workflow semantics defined here directly.
158
+ plain workflow names and follow the matching flow file from the workflow bundle
159
+ at `dflow/specs/shared/dflow-workflows/`.
@@ -1,4 +1,4 @@
1
- <!-- Scaffolding template maintained alongside Dflow skill. See archive/proposals/PROPOSAL-010 for origin. -->
1
+ <!-- Seeded by Dflow. -->
2
2
 
3
3
  # CLAUDE.md Snippet — Dflow Adoption
4
4
 
@@ -11,10 +11,10 @@
11
11
  > - Use this legacy snippet only if you intentionally want the older
12
12
  > Claude-specific two-H2 layout in your project's root `CLAUDE.md`.
13
13
 
14
- The snippet follows the Dflow `templates/CLAUDE.md` H2 segmentation
15
- (established in PROPOSAL-007c): **System Context** (what the system is)
16
- and **Development Workflow** (how we work). Keep those two H2 sections as the backbone
17
- when merging into an existing `CLAUDE.md`.
14
+ The snippet follows the Dflow `templates/CLAUDE.md` H2 segmentation:
15
+ **System Context** (what the system is) and **Development Workflow**
16
+ (how we work). Keep those two H2 sections as the backbone when merging
17
+ into an existing `CLAUDE.md`.
18
18
 
19
19
  ---
20
20
 
@@ -97,11 +97,15 @@ src/
97
97
  3. **Ubiquitous Language** — 使用 `dflow/specs/domain/glossary.md` 中定義的術語
98
98
  4. **Migration Awareness** — 每個決策都要考慮 target architecture
99
99
 
100
- ### Dflow Skill — Canonical Decision Logic Lives in the Skill
100
+ ### Dflow Skill — Canonical Decision Logic Lives in the Project
101
101
 
102
102
  AI 的完整決策樹、Workflow Transparency、Ceremony Scaling 三層判準
103
- (T1/T2/T3)、各 `/dflow:` 命令的具體流程,**全部定義於 Dflow skill
104
- 本體**(`sdd-ddd-brownfield-skill/SKILL.md` 與 `references/*.md`)。
103
+ (T1/T2/T3)、各 `/dflow:` 命令的具體流程,**全部定義於本專案內
104
+ 的 Dflow 工件**(init 時投影):
105
+
106
+ - `dflow/specs/shared/AI-AGENT-GUIDE.md` — 決策樹 + Slash Commands 總表 + 路由規則
107
+ - `dflow/specs/shared/dflow-workflows/references/*.md` — 各 flow 執行步驟定義
108
+
105
109
  本 `CLAUDE.md` 不重述這些內容,避免雙份維護。
106
110
 
107
111
  當你作為 AI assistant 被呼叫時,若偵測到使用者需要 SDD/DDD 工作流
@@ -1,4 +1,4 @@
1
- <!-- Scaffolding template maintained alongside Dflow skill. See archive/proposals/PROPOSAL-010 for origin. -->
1
+ <!-- Seeded by Dflow. -->
2
2
 
3
3
  # Git Principles — Git Flow edition
4
4
 
@@ -124,8 +124,6 @@ Commits must tie back to a SPEC-ID:
124
124
  [{SPEC-ID}] {short description}
125
125
 
126
126
  {optional detailed body}
127
-
128
- Co-Authored-By: Claude <noreply@anthropic.com> ← suggested, not mandatory
129
127
  ```
130
128
 
131
129
  ### Type prefix (recommended)
@@ -299,19 +297,22 @@ Three categories:
299
297
  | `git stash` (local-only) |
300
298
  | `git branch` (listing only) |
301
299
 
302
- ### AI commit authorship (suggested, not enforced)
300
+ ### AI commit authorship
303
301
 
304
- When an AI assists in producing a commit, appending a `Co-Authored-By`
305
- line is **suggested** but not mandatory. The canonical form for
306
- Claude is:
302
+ How AI-made commits are marked is chosen once at `dflow init` and recorded in
303
+ `dflow/specs/shared/_conventions.md` § AI Commit Policy:
307
304
 
308
- ```
309
- Co-Authored-By: Claude <noreply@anthropic.com>
310
- ```
305
+ - `none` — AI commits carry no extra marker.
306
+ - `co-authored-by` — a `Co-Authored-By: dflow-ai <noreply@dflow.local>` trailer
307
+ (teams may customize the name / email).
308
+ - `prefix` — an `[ai-assisted]` commit-subject prefix.
311
309
 
312
- For other AI assistants, use the vendor-documented author line (or omit
313
- it). This is a project-level transparency convention, not a Dflow
314
- requirement.
310
+ This recorded setting is authoritative and the runtime does not re-ask. The AI
311
+ offers commits at lifecycle checkpoints (see `references/git-integration.md`
312
+ § Commit Checkpoints, Branch Gate & AI Commits) using your Git identity, and you
313
+ can always decline. If your team also wants vendor attribution, appending the
314
+ assistant's documented line (e.g. `Co-Authored-By: Claude
315
+ <noreply@anthropic.com>`) is an independent, optional convention on top.
315
316
 
316
317
  ---
317
318
 
@@ -1,4 +1,4 @@
1
- <!-- Scaffolding template maintained alongside Dflow skill. See archive/proposals/PROPOSAL-010 for origin. -->
1
+ <!-- Seeded by Dflow. -->
2
2
 
3
3
  # Git Principles — Trunk-based / GitHub Flow edition
4
4
 
@@ -72,8 +72,6 @@ Commits must tie back to a SPEC-ID:
72
72
  [{SPEC-ID}] {short description}
73
73
 
74
74
  {optional detailed body}
75
-
76
- Co-Authored-By: Claude <noreply@anthropic.com> ← suggested, not mandatory
77
75
  ```
78
76
 
79
77
  ### Conventional Commits style (recommended, optional)
@@ -170,8 +168,6 @@ Related BR-IDs:
170
168
  - REMOVED: (none)
171
169
 
172
170
  Related SPEC-IDs: {SPEC-ID}{, follow-up SPEC-IDs if any}
173
-
174
- Co-Authored-By: Claude <noreply@anthropic.com>
175
171
  ```
176
172
 
177
173
  Example:
@@ -191,8 +187,6 @@ Related BR-IDs:
191
187
  - MODIFIED: BR-03
192
188
 
193
189
  Related SPEC-IDs: SPEC-20260421-001
194
-
195
- Co-Authored-By: Claude <noreply@anthropic.com>
196
190
  ```
197
191
 
198
192
  ### 4.2 Rebase + merge (preserve feature commits on `main`)
@@ -281,19 +275,22 @@ Three categories:
281
275
  | `git branch` (listing only) |
282
276
  | `git rebase` on a private (not-yet-pushed) branch |
283
277
 
284
- ### AI commit authorship (suggested, not enforced)
278
+ ### AI commit authorship
285
279
 
286
- When an AI assists in producing a commit, appending a `Co-Authored-By`
287
- line is **suggested** but not mandatory. The canonical form for
288
- Claude is:
280
+ How AI-made commits are marked is chosen once at `dflow init` and recorded in
281
+ `dflow/specs/shared/_conventions.md` § AI Commit Policy:
289
282
 
290
- ```
291
- Co-Authored-By: Claude <noreply@anthropic.com>
292
- ```
283
+ - `none` — AI commits carry no extra marker.
284
+ - `co-authored-by` — a `Co-Authored-By: dflow-ai <noreply@dflow.local>` trailer
285
+ (teams may customize the name / email).
286
+ - `prefix` — an `[ai-assisted]` commit-subject prefix.
293
287
 
294
- For other AI assistants, use the vendor-documented author line (or omit
295
- it). This is a project-level transparency convention, not a Dflow
296
- requirement.
288
+ This recorded setting is authoritative and the runtime does not re-ask. The AI
289
+ offers commits at lifecycle checkpoints (see `references/git-integration.md`
290
+ § Commit Checkpoints, Branch Gate & AI Commits) using your Git identity, and you
291
+ can always decline. If your team also wants vendor attribution, appending the
292
+ assistant's documented line (e.g. `Co-Authored-By: Claude
293
+ <noreply@anthropic.com>`) is an independent, optional convention on top.
297
294
 
298
295
  ---
299
296
 
@@ -1,4 +1,4 @@
1
- <!-- Scaffolding template maintained alongside Dflow skill. See archive/proposals/PROPOSAL-010 for origin. -->
1
+ <!-- Seeded by Dflow. -->
2
2
 
3
3
  # Spec Writing Conventions — {System Name}
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Scaffolding template maintained alongside Dflow skill. See archive/proposals/PROPOSAL-010 for origin. -->
1
+ <!-- Seeded by Dflow. -->
2
2
 
3
3
  # System Overview — {System Name}
4
4
 
@@ -116,5 +116,5 @@ Link to any ADR or migration plan doc if one exists.}
116
116
  branching-strategy-specific file that matches this project
117
117
  - [Glossary](../domain/glossary.md)
118
118
  - [Tech debt backlog](../migration/tech-debt.md)
119
- - Dflow skill: see `CLAUDE.md` and the `sdd-ddd-brownfield-skill/` bundle
120
- for the full AI workflow guidance.
119
+ - Dflow skill: see `CLAUDE.md` and the in-project bundle at
120
+ `dflow/specs/shared/dflow-workflows/` for the full AI workflow guidance.
@@ -12,13 +12,14 @@ Template note (for AI):
12
12
  This is the **feature-level dashboard** (`_index.md`) for a feature
13
13
  directory. Place at `dflow/specs/features/active/{SPEC-ID}-{slug}/_index.md`.
14
14
 
15
- Six required sections (see below):
15
+ Seven required sections (see below):
16
16
  1. Metadata (YAML front matter above)
17
17
  2. Goals & Scope (prose)
18
18
  3. Phase Specs (T1 list)
19
19
  4. Current BR Snapshot (feature-level cumulative state)
20
20
  5. Lightweight Changes (T2 outbound link + T3 inline)
21
- 6. Resume Pointer
21
+ 6. Checkpoint Log (commit / skip timeline)
22
+ 7. Resume Pointer
22
23
 
23
24
  Optional section (append at end if applicable):
24
25
  - Follow-up Tracking (when this feature has follow-up features derived)
@@ -87,6 +88,23 @@ Template note (for AI):
87
88
  | {YYYY-MM-DD} | T2 | bug fix XYZ — 見 [`lightweight-{date}-{slug}.md`](./lightweight-{date}-{slug}.md) | {hash} |
88
89
  | {YYYY-MM-DD} | T3 | 按鈕顏色從藍改綠 `[cosmetic]` | {hash} |
89
90
 
91
+ <!-- dflow:section checkpoint-log -->
92
+ ## Checkpoint Log
93
+
94
+ > 生命週期 checkpoint 的 commit / skip 時間線(讓三週後回溯不必手動重建)。
95
+ > 每個 checkpoint 無論 commit 或 skip 都記一列。Tier 決定 checkpoint 數:
96
+ > T1 三點(spec 完 / impl 完 / closeout)、T2 兩點(spec+impl 合併 / closeout)、
97
+ > T3 單一 commit。
98
+ >
99
+ > commit hash 只在 commit 實際成功後填入;pre-commit hook reject 或 commit
100
+ > 失敗記 `failed`、不寫假 hash。
101
+
102
+ | Timestamp | Checkpoint | Result |
103
+ |---|---|---|
104
+ | {YYYY-MM-DD HH:MM} | spec-baseline | committed ({hash}) / skipped / failed |
105
+ | {YYYY-MM-DD HH:MM} | implementation | committed ({hash}) / skipped / failed |
106
+ | {YYYY-MM-DD HH:MM} | closeout | committed ({hash}) / skipped / failed |
107
+
90
108
  ## Resume Pointer
91
109
 
92
110
  > 一句話:目前進展到哪?下一個動作是什麼?
@@ -1,4 +1,4 @@
1
- <!-- Template maintained by Dflow. See archive/proposals/PROPOSAL-013 for origin. -->
1
+ <!-- Seeded by Dflow. -->
2
2
 
3
3
  # Context Map
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Template maintained by Dflow. See archive/proposals/PROPOSAL-013 for origin. -->
1
+ <!-- Seeded by Dflow. -->
2
2
 
3
3
  # Glossary
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Template maintained by Dflow. See archive/proposals/PROPOSAL-013 for origin. -->
1
+ <!-- Seeded by Dflow. -->
2
2
 
3
3
  # Domain Models
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Template maintained by Dflow. See archive/proposals/PROPOSAL-013 for origin. -->
1
+ <!-- Seeded by Dflow. -->
2
2
 
3
3
  # Business Rules
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Template maintained by Dflow. See archive/proposals/PROPOSAL-013 for origin. -->
1
+ <!-- Seeded by Dflow. -->
2
2
 
3
3
  # Migration Tech Debt
4
4
 
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: dflow
3
+ description: >
4
+ Dflow SDD/DDD workflow guardian for this project. PRIMARY: the canonical
5
+ /dflow:* commands (/dflow:new-feature, /dflow:modify-existing, /dflow:bug-fix,
6
+ /dflow:new-phase, /dflow:finish-feature, /dflow:pr-review, /dflow:verify,
7
+ /dflow:report-dflow-feedback, /dflow:status, /dflow:next, /dflow:cancel).
8
+ SECONDARY (auto-trigger safety net) — engage ONLY for: adding or changing
9
+ product/domain behavior, new requirements, a feature or bug-fix workflow, or
10
+ spec-impacting architecture/domain-model decisions. Do NOT engage for pure
11
+ refactors, infrastructure chores, formatting, or general code questions.
12
+ When engaged by natural language, DO NOT auto-enter a workflow: judge the
13
+ intent, suggest the matching /dflow: command, and wait for confirmation.
14
+ ---
15
+
16
+ <!-- dflow-generated: skill-adapter -->
17
+
18
+ # Dflow SDD/DDD Workflow Guardian
19
+
20
+ This project uses Dflow for spec-first AI-assisted development.
21
+
22
+ When this skill engages:
23
+
24
+ 1. Read `dflow/specs/shared/AI-AGENT-GUIDE.md` — command registry, routing
25
+ rules, and project context.
26
+ 2. Read the matching workflow flow file from the vendored bundle at
27
+ `dflow/specs/shared/dflow-workflows/references/<flow>.md` for the executable
28
+ step definitions (Step 1→N, step gates, completion checklists).
29
+
30
+ Do not duplicate or invent workflow steps — the flow files are the authoritative
31
+ source for executable steps; the guide is the registry and router.
32
+
33
+ If engaged by natural language (not an explicit `/dflow:` command): identify
34
+ which `/dflow:` command fits, suggest it, and wait for the developer to confirm
35
+ before entering any workflow.