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
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
# Using Dflow with Claude Code
|
|
2
|
+
|
|
3
|
+
> [繁體中文](using-with-claude-code.md) | **English**
|
|
4
|
+
|
|
5
|
+
A walk-through of what Dflow looks like when your AI coding agent is
|
|
6
|
+
[Claude Code](https://claude.com/claude-code). About 10 minutes to read.
|
|
7
|
+
|
|
8
|
+
This guide focuses on the Claude Code experience specifically. For the
|
|
9
|
+
tool-neutral evaluation flow, see
|
|
10
|
+
[`docs/evaluating-dflow.en.md`](evaluating-dflow.en.md). For the full Get Started
|
|
11
|
+
and feature list, see [`README.md`](../README.en.md).
|
|
12
|
+
|
|
13
|
+
## Who This Guide Is For
|
|
14
|
+
|
|
15
|
+
You are using or evaluating Dflow with Claude Code as your AI coding agent.
|
|
16
|
+
This guide covers what Claude Code sees after `init`, how Dflow's slash
|
|
17
|
+
commands are recognized, and the small Claude-Code-specific patterns worth
|
|
18
|
+
knowing.
|
|
19
|
+
|
|
20
|
+
You do not need to read this before running `init`. It is most useful after
|
|
21
|
+
you have run `init` once and want to understand what Claude Code is
|
|
22
|
+
actually loading.
|
|
23
|
+
|
|
24
|
+
## Prerequisites
|
|
25
|
+
|
|
26
|
+
- Claude Code CLI installed (see [claude.ai/code](https://claude.com/claude-code)).
|
|
27
|
+
- Node.js / npm available (Dflow ships through npm). Install globally with
|
|
28
|
+
`npm install -g dflow-sdd-ddd`, or use `npx dflow-sdd-ddd` for the no-install path.
|
|
29
|
+
- A project directory you are comfortable initializing in. A branch or a
|
|
30
|
+
disposable sample project is recommended for first contact; see the
|
|
31
|
+
[evaluator guide playbook](evaluating-dflow.en.md#a-30-minute-evaluation-playbook).
|
|
32
|
+
|
|
33
|
+
You do not need a paid Claude Code plan to read this document. Running
|
|
34
|
+
`/dflow:*` workflows requires Claude Code itself; the workflows are
|
|
35
|
+
text-based and do not require additional API keys beyond Claude Code's own
|
|
36
|
+
auth.
|
|
37
|
+
|
|
38
|
+
## What Claude Code Sees After `init`
|
|
39
|
+
|
|
40
|
+
Running `dflow init` (or `npx dflow-sdd-ddd init` on the no-install path) and
|
|
41
|
+
selecting Claude Code as a target tool creates a thin shim at the project root:
|
|
42
|
+
|
|
43
|
+
```markdown
|
|
44
|
+
# CLAUDE.md - Dflow Project Instructions
|
|
45
|
+
|
|
46
|
+
This project uses Dflow for spec-first AI-assisted development.
|
|
47
|
+
|
|
48
|
+
Before planning or editing code, read and follow:
|
|
49
|
+
|
|
50
|
+
- `dflow/specs/shared/AI-AGENT-GUIDE.md`
|
|
51
|
+
|
|
52
|
+
Keep tool-specific instruction files small. The Dflow guide above is the
|
|
53
|
+
single source of truth for project workflow rules, slash-command behavior,
|
|
54
|
+
spec locations, and SDD/DDD constraints.
|
|
55
|
+
|
|
56
|
+
If your tool supports Markdown imports, the canonical guide is imported
|
|
57
|
+
below:
|
|
58
|
+
|
|
59
|
+
@dflow/specs/shared/AI-AGENT-GUIDE.md
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Two things happen when Claude Code starts in this project:
|
|
63
|
+
|
|
64
|
+
1. Claude Code automatically loads `CLAUDE.md` from the project root into
|
|
65
|
+
its context. This is Claude Code's standard project instructions
|
|
66
|
+
mechanism.
|
|
67
|
+
2. The trailing `@dflow/specs/shared/AI-AGENT-GUIDE.md` line uses Claude
|
|
68
|
+
Code's Markdown import syntax to inline the canonical Dflow guide. So
|
|
69
|
+
Claude Code effectively reads both files as one set of instructions.
|
|
70
|
+
|
|
71
|
+
The canonical guide (`dflow/specs/shared/AI-AGENT-GUIDE.md`) is where the
|
|
72
|
+
real workflow rules live: project context (track, tech stack, prose
|
|
73
|
+
language), the `/dflow:*` workflow table, source-of-truth file paths, and
|
|
74
|
+
core SDD/DDD rules. The `CLAUDE.md` shim stays small precisely so the
|
|
75
|
+
canonical guide can evolve without Claude-Code-specific edits.
|
|
76
|
+
|
|
77
|
+
If a `CLAUDE.md` already existed in the project, `init` does not overwrite
|
|
78
|
+
it. Instead it writes a merge snippet under `dflow/specs/shared/` that you
|
|
79
|
+
can paste into your existing `CLAUDE.md` manually. This avoids destroying
|
|
80
|
+
custom project instructions you already had.
|
|
81
|
+
|
|
82
|
+
## Using Dflow Slash Commands in Claude Code
|
|
83
|
+
|
|
84
|
+
Dflow's `/dflow:*` slash commands are workflow names recognized by the AI
|
|
85
|
+
through the workflow table in `AI-AGENT-GUIDE.md`, not Claude Code's
|
|
86
|
+
built-in slash command system. You type them as plain chat:
|
|
87
|
+
|
|
88
|
+
```text
|
|
89
|
+
/dflow:new-feature
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Claude Code treats this as input. Because it has the workflow table loaded
|
|
93
|
+
via `CLAUDE.md` import, it recognizes the prefix and enters the matching
|
|
94
|
+
workflow. A typical conversation looks like:
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
You: /dflow:new-feature
|
|
98
|
+
|
|
99
|
+
Claude Code: Entering new-feature workflow. Please describe the user-facing
|
|
100
|
+
capability or business behavior you want to add.
|
|
101
|
+
|
|
102
|
+
You: Allow expense submitters to attach a receipt image when filing an
|
|
103
|
+
expense.
|
|
104
|
+
|
|
105
|
+
Claude Code: I'll start by drafting a feature spec under
|
|
106
|
+
dflow/specs/features/active/. Before I do, I need a short answer on:
|
|
107
|
+
[clarifying questions about scope, owner, priority]
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
The workflow then walks you through spec drafting, behavior examples,
|
|
111
|
+
implementation planning, and finish-feature drift checks. The exact
|
|
112
|
+
sequence depends on which workflow you entered (`/dflow:new-feature`,
|
|
113
|
+
`/dflow:modify-existing`, `/dflow:bug-fix`, etc.). All workflow definitions
|
|
114
|
+
live under the Dflow skill source; Claude Code follows them by reading the
|
|
115
|
+
skill files when needed.
|
|
116
|
+
|
|
117
|
+
Available workflow entry points:
|
|
118
|
+
|
|
119
|
+
| Command | Use when |
|
|
120
|
+
|---|---|
|
|
121
|
+
| `/dflow:new-feature` | A new user-visible capability or business behavior is requested. |
|
|
122
|
+
| `/dflow:modify-existing` | Existing behavior needs to change. |
|
|
123
|
+
| `/dflow:bug-fix` | A defect can be described with expected vs actual behavior. |
|
|
124
|
+
| `/dflow:new-phase` | An active feature needs another implementation slice. |
|
|
125
|
+
| `/dflow:finish-feature` | Implementation is complete and needs drift closure. |
|
|
126
|
+
| `/dflow:verify` | Specs, domain docs, implementation, and tests need consistency checks. |
|
|
127
|
+
| `/dflow:pr-review` | A change is ready for SDD/DDD review. |
|
|
128
|
+
| `/dflow:report-dflow-feedback` | You found a Dflow issue or improvement and want a sanitized upstream feedback draft. |
|
|
129
|
+
|
|
130
|
+
If you forget a command name, ask Claude Code "what dflow workflows are
|
|
131
|
+
available?" — the answer comes from the workflow table it already has
|
|
132
|
+
loaded.
|
|
133
|
+
|
|
134
|
+
## Differences vs Other AI Tools
|
|
135
|
+
|
|
136
|
+
The canonical guide (`dflow/specs/shared/AI-AGENT-GUIDE.md`) is identical
|
|
137
|
+
across tools. Only the root-level shim differs:
|
|
138
|
+
|
|
139
|
+
| Tool | Generated shim | Loads canonical guide via |
|
|
140
|
+
|---|---|---|
|
|
141
|
+
| Claude Code | `CLAUDE.md` | `@dflow/specs/shared/AI-AGENT-GUIDE.md` Markdown import |
|
|
142
|
+
| Codex / Copilot coding agent | `AGENTS.md` | Reads file content directly when starting |
|
|
143
|
+
| Gemini CLI | `GEMINI.md` | `@dflow/specs/shared/AI-AGENT-GUIDE.md` Markdown import |
|
|
144
|
+
| GitHub Copilot | `.github/copilot-instructions.md` | Reads file content directly |
|
|
145
|
+
|
|
146
|
+
You can run `dflow configure-agents` later to add another tool's shim without
|
|
147
|
+
re-running `init`. Multiple tools can be active in the same project and stay
|
|
148
|
+
synchronized via the canonical guide.
|
|
149
|
+
|
|
150
|
+
If your team uses both Claude Code and Codex CLI on the same project (a
|
|
151
|
+
common setup), no extra coordination is needed. Both tools read the same
|
|
152
|
+
canonical guide; only the shim file differs.
|
|
153
|
+
|
|
154
|
+
## Common Patterns and Gotchas
|
|
155
|
+
|
|
156
|
+
**Keep `CLAUDE.md` thin.** If you find yourself adding workflow rules,
|
|
157
|
+
spec locations, or SDD constraints to `CLAUDE.md`, those belong in
|
|
158
|
+
`dflow/specs/shared/AI-AGENT-GUIDE.md` instead. The shim stays small so
|
|
159
|
+
that other tools' shims don't drift away from it.
|
|
160
|
+
|
|
161
|
+
**`/dflow:*` is not a Claude Code Skill installation.** `init` does not
|
|
162
|
+
install anything into Claude Code's skill system. The slash commands are
|
|
163
|
+
plain text patterns the AI recognizes from the workflow table. You can use
|
|
164
|
+
them immediately after `init` without any Claude Code configuration.
|
|
165
|
+
|
|
166
|
+
**Permission gates and Dflow workflow gates are separate.** Claude Code may
|
|
167
|
+
ask permission to run a tool (e.g., write a file). Dflow's workflows have
|
|
168
|
+
their own approval gates (e.g., "I drafted the spec — do you want me to
|
|
169
|
+
proceed to implementation?"). Both can fire on the same action; this is
|
|
170
|
+
expected and not a sign of misconfiguration.
|
|
171
|
+
|
|
172
|
+
**The `@` import is not recursive.** `CLAUDE.md` imports
|
|
173
|
+
`AI-AGENT-GUIDE.md`, but if `AI-AGENT-GUIDE.md` references other files
|
|
174
|
+
(e.g., feature specs), those are not auto-loaded — Claude Code reads them
|
|
175
|
+
on demand when entering the relevant workflow. This keeps context usage
|
|
176
|
+
proportional to active work.
|
|
177
|
+
|
|
178
|
+
**A pre-existing `CLAUDE.md` is preserved.** `init` will not overwrite your
|
|
179
|
+
existing project instructions. Look under `dflow/specs/shared/` for the
|
|
180
|
+
merge snippet `init` wrote and paste the relevant sections into your
|
|
181
|
+
existing `CLAUDE.md` manually.
|
|
182
|
+
|
|
183
|
+
**Cross-machine projects work.** `dflow/specs/` is plain Markdown checked
|
|
184
|
+
into your repo. Anyone cloning the repo and using Claude Code in it will
|
|
185
|
+
see the same Dflow setup automatically through the committed `CLAUDE.md`
|
|
186
|
+
shim and the canonical guide.
|
|
187
|
+
|
|
188
|
+
## Where to Go Next
|
|
189
|
+
|
|
190
|
+
If you have not run `init` yet:
|
|
191
|
+
|
|
192
|
+
- Follow the [evaluator guide playbook](evaluating-dflow.en.md#a-30-minute-evaluation-playbook)
|
|
193
|
+
to try it on a disposable sample project.
|
|
194
|
+
|
|
195
|
+
If you have run `init` and want to see end-to-end workflow examples:
|
|
196
|
+
|
|
197
|
+
- Read [`tutorial/01-greenfield/`](../tutorial/01-greenfield/walkthrough-00-setup.md) or
|
|
198
|
+
[`tutorial/02-brownfield/`](../tutorial/02-brownfield/walkthrough-00-setup.md). The
|
|
199
|
+
tutorial walk-throughs show conversation flows and the resulting
|
|
200
|
+
`dflow/specs/` outputs.
|
|
201
|
+
|
|
202
|
+
If you want to understand the design rationale:
|
|
203
|
+
|
|
204
|
+
- Read [`docs/why-ddd-for-ai.en.md`](why-ddd-for-ai.en.md).
|
|
205
|
+
|
|
206
|
+
If something does not work as described:
|
|
207
|
+
|
|
208
|
+
- File a docs feedback issue (see [`CONTRIBUTING.md`](../CONTRIBUTING.md)).
|
|
209
|
+
Per-tool documentation is new and feedback specifically about Claude Code
|
|
210
|
+
behavior is valuable.
|
|
@@ -1,41 +1,39 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 在 Claude Code 中使用 Dflow
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[Claude Code](https://claude.com/claude-code). About 10 minutes to read.
|
|
3
|
+
> **繁體中文** | [English](using-with-claude-code.en.md)
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
tool-neutral evaluation flow, see
|
|
8
|
-
[`docs/evaluating-dflow.md`](evaluating-dflow.md). For the full Get Started
|
|
9
|
-
and feature list, see [`README.md`](../README.md).
|
|
5
|
+
當你的 AI 程式設計助理是 [Claude Code](https://claude.com/claude-code) 時,Dflow 的使用體驗 walk-through。閱讀約需 10 分鐘。
|
|
10
6
|
|
|
11
|
-
|
|
7
|
+
本指南專注於 Claude Code 的具體使用體驗。工具中立的評估流程請見
|
|
8
|
+
[`docs/evaluating-dflow.md`](evaluating-dflow.md)。完整的 Get Started
|
|
9
|
+
與功能列表請見 [`README.md`](../README.md)。
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
This guide covers what Claude Code sees after `init`, how Dflow's slash
|
|
15
|
-
commands are recognized, and the small Claude-Code-specific patterns worth
|
|
16
|
-
knowing.
|
|
11
|
+
## 本指南的適用對象
|
|
17
12
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
你正在使用或評估以 Claude Code 作為 AI 程式設計助理的 Dflow。
|
|
14
|
+
本指南說明 `init` 之後 Claude Code 看到了什麼、Dflow 的 slash
|
|
15
|
+
commands 是如何被識別的,以及幾個值得了解的 Claude Code 專屬使用模式。
|
|
21
16
|
|
|
22
|
-
|
|
17
|
+
你不需要在執行 `init` 之前先讀本指南。它最適合在你執行過一次 `init` 之後、
|
|
18
|
+
想了解 Claude Code 實際載入什麼內容時閱讀。
|
|
23
19
|
|
|
24
|
-
|
|
25
|
-
- Node.js / npx available (Dflow ships through npm).
|
|
26
|
-
- A project directory you are comfortable initializing in. A branch or a
|
|
27
|
-
disposable sample project is recommended for first contact; see the
|
|
28
|
-
[evaluator guide playbook](evaluating-dflow.md#a-30-minute-evaluation-playbook).
|
|
20
|
+
## 前置條件
|
|
29
21
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
- 已安裝 Claude Code CLI(見 [claude.ai/code](https://claude.com/claude-code))。
|
|
23
|
+
- 已具備 Node.js / npm 環境(Dflow 透過 npm 發佈)。以
|
|
24
|
+
`npm install -g dflow-sdd-ddd` 全域安裝,或用 `npx dflow-sdd-ddd` 走免安裝路徑。
|
|
25
|
+
- 有一個你願意在其中執行 init 的專案目錄。首次嘗試建議先用 branch 或
|
|
26
|
+
可拋棄的範例專案;見
|
|
27
|
+
[評估者指南 Playbook](evaluating-dflow.md#30-分鐘評估-playbook)。
|
|
34
28
|
|
|
35
|
-
|
|
29
|
+
你不需要付費的 Claude Code 方案就能閱讀本文件。執行 `/dflow:*` workflow
|
|
30
|
+
需要 Claude Code 本身;這些 workflow 都是文字形式,不需要 Claude Code 授權以外的
|
|
31
|
+
額外 API 金鑰。
|
|
36
32
|
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
## `init` 之後 Claude Code 看到了什麼
|
|
34
|
+
|
|
35
|
+
執行 `dflow init`(或免安裝路徑的 `npx dflow-sdd-ddd init`)並選擇 Claude Code
|
|
36
|
+
作為目標工具後,會在專案根目錄建立一個薄 shim:
|
|
39
37
|
|
|
40
38
|
```markdown
|
|
41
39
|
# CLAUDE.md - Dflow Project Instructions
|
|
@@ -56,39 +54,35 @@ below:
|
|
|
56
54
|
@dflow/specs/shared/AI-AGENT-GUIDE.md
|
|
57
55
|
```
|
|
58
56
|
|
|
59
|
-
|
|
57
|
+
Claude Code 在這個專案中啟動時,會發生兩件事:
|
|
60
58
|
|
|
61
|
-
1. Claude Code
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
Claude Code effectively reads both files as one set of instructions.
|
|
59
|
+
1. Claude Code 自動從專案根目錄載入 `CLAUDE.md` 到它的 context 中。
|
|
60
|
+
這是 Claude Code 的標準專案指示機制。
|
|
61
|
+
2. 末尾的 `@dflow/specs/shared/AI-AGENT-GUIDE.md` 這行使用 Claude Code 的
|
|
62
|
+
Markdown import 語法,將 canonical Dflow 指南 inline 嵌入。因此 Claude Code
|
|
63
|
+
等效於把兩個檔案當成一組指示來讀取。
|
|
67
64
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
canonical guide can evolve without Claude-Code-specific edits.
|
|
65
|
+
canonical 指南(`dflow/specs/shared/AI-AGENT-GUIDE.md`)是實際 workflow
|
|
66
|
+
規則的所在:專案上下文(track、技術棧、文章語言)、`/dflow:*` workflow 表、
|
|
67
|
+
source-of-truth 檔案路徑,以及核心 SDD/DDD 規則。`CLAUDE.md` shim 刻意保持精簡,
|
|
68
|
+
這樣 canonical 指南就能在不需要 Claude Code 專屬修改的情況下持續演進。
|
|
73
69
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
custom project instructions you already had.
|
|
70
|
+
如果專案中已有 `CLAUDE.md`,`init` 不會覆蓋它。它改為在
|
|
71
|
+
`dflow/specs/shared/` 下寫入 merge snippet,讓你手動貼入現有的 `CLAUDE.md`。
|
|
72
|
+
這樣可以避免破壞你已有的自訂專案指示。
|
|
78
73
|
|
|
79
|
-
##
|
|
74
|
+
## 在 Claude Code 中使用 Dflow Slash Commands
|
|
80
75
|
|
|
81
|
-
Dflow
|
|
82
|
-
|
|
83
|
-
|
|
76
|
+
Dflow 的 `/dflow:*` slash commands 是 AI 透過 `AI-AGENT-GUIDE.md` 中的
|
|
77
|
+
workflow 表識別的 workflow 名稱,不是 Claude Code 內建的 slash command 系統。
|
|
78
|
+
你以普通對話方式輸入它們:
|
|
84
79
|
|
|
85
80
|
```text
|
|
86
81
|
/dflow:new-feature
|
|
87
82
|
```
|
|
88
83
|
|
|
89
|
-
Claude Code
|
|
90
|
-
|
|
91
|
-
workflow. A typical conversation looks like:
|
|
84
|
+
Claude Code 將此視為輸入。由於它已透過 `CLAUDE.md` import 載入了 workflow 表,
|
|
85
|
+
它會識別這個前綴並進入對應的 workflow。一次典型的對話如下:
|
|
92
86
|
|
|
93
87
|
```text
|
|
94
88
|
You: /dflow:new-feature
|
|
@@ -104,104 +98,94 @@ dflow/specs/features/active/. Before I do, I need a short answer on:
|
|
|
104
98
|
[clarifying questions about scope, owner, priority]
|
|
105
99
|
```
|
|
106
100
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
skill files when needed.
|
|
101
|
+
接著這個 workflow 會引導你完成 spec 起草、行為範例、實作計畫,以及
|
|
102
|
+
finish-feature 漂移(drift)檢查。確切的流程取決於你進入的是哪個 workflow
|
|
103
|
+
(`/dflow:new-feature`、`/dflow:modify-existing`、`/dflow:bug-fix` 等)。
|
|
104
|
+
所有 workflow 定義都存放在 Dflow skill source 中;Claude Code 在需要時讀取
|
|
105
|
+
skill 檔案來執行它們。
|
|
113
106
|
|
|
114
|
-
|
|
107
|
+
可用的 workflow 入口:
|
|
115
108
|
|
|
116
|
-
|
|
|
109
|
+
| 指令 | 適用情境 |
|
|
117
110
|
|---|---|
|
|
118
|
-
| `/dflow:new-feature` |
|
|
119
|
-
| `/dflow:modify-existing` |
|
|
120
|
-
| `/dflow:bug-fix` |
|
|
121
|
-
| `/dflow:new-phase` |
|
|
122
|
-
| `/dflow:finish-feature` |
|
|
123
|
-
| `/dflow:verify` |
|
|
124
|
-
| `/dflow:pr-review` |
|
|
125
|
-
| `/dflow:report-dflow-feedback` |
|
|
111
|
+
| `/dflow:new-feature` | 需要新增一個使用者可見的功能或業務行為。 |
|
|
112
|
+
| `/dflow:modify-existing` | 需要修改現有行為。 |
|
|
113
|
+
| `/dflow:bug-fix` | 可以用預期行為 vs 實際行為描述的缺陷。 |
|
|
114
|
+
| `/dflow:new-phase` | 進行中的 feature 需要另一個實作 slice。 |
|
|
115
|
+
| `/dflow:finish-feature` | 實作完成後需要進行漂移(drift)收尾。 |
|
|
116
|
+
| `/dflow:verify` | 需要對 spec、領域文件、實作與測試進行一致性檢查。 |
|
|
117
|
+
| `/dflow:pr-review` | 變更已準備好進行 SDD/DDD review。 |
|
|
118
|
+
| `/dflow:report-dflow-feedback` | 你發現了 Dflow 的問題或改進點,想要一份清理過的上游回饋草稿。 |
|
|
126
119
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
loaded.
|
|
120
|
+
如果你忘了指令名稱,問 Claude Code「what dflow workflows are available?」
|
|
121
|
+
即可 —— 答案會從它已載入的 workflow 表中給出。
|
|
130
122
|
|
|
131
|
-
##
|
|
123
|
+
## 與其他 AI 工具的差異
|
|
132
124
|
|
|
133
|
-
|
|
134
|
-
|
|
125
|
+
canonical 指南(`dflow/specs/shared/AI-AGENT-GUIDE.md`)在各工具之間是相同的。
|
|
126
|
+
只有根目錄層的 shim 有所不同:
|
|
135
127
|
|
|
136
|
-
|
|
|
128
|
+
| 工具 | 產生的 shim | 載入 canonical 指南的方式 |
|
|
137
129
|
|---|---|---|
|
|
138
130
|
| Claude Code | `CLAUDE.md` | `@dflow/specs/shared/AI-AGENT-GUIDE.md` Markdown import |
|
|
139
|
-
| Codex / Copilot coding agent | `AGENTS.md` |
|
|
131
|
+
| Codex / Copilot coding agent | `AGENTS.md` | 啟動時直接讀取檔案內容 |
|
|
140
132
|
| Gemini CLI | `GEMINI.md` | `@dflow/specs/shared/AI-AGENT-GUIDE.md` Markdown import |
|
|
141
|
-
| GitHub Copilot | `.github/copilot-instructions.md` |
|
|
133
|
+
| GitHub Copilot | `.github/copilot-instructions.md` | 直接讀取檔案內容 |
|
|
142
134
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
and stay synchronized via the canonical guide.
|
|
135
|
+
你可以之後執行 `dflow configure-agents` 來新增另一個工具的 shim,而不需要重跑
|
|
136
|
+
`init`。同一個專案可以同時啟用多個工具,並透過 canonical 指南保持同步。
|
|
146
137
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
138
|
+
如果你的團隊在同一個專案中同時使用 Claude Code 和 Codex CLI(這是一種常見的
|
|
139
|
+
配置),不需要額外的協調。兩個工具都讀取相同的 canonical 指南;只有 shim
|
|
140
|
+
檔案不同。
|
|
150
141
|
|
|
151
|
-
##
|
|
142
|
+
## 常見模式與注意事項
|
|
152
143
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
`dflow/specs/shared/AI-AGENT-GUIDE.md
|
|
156
|
-
|
|
144
|
+
**保持 `CLAUDE.md` 精簡。** 如果你發現自己在把 workflow 規則、spec 路徑或
|
|
145
|
+
SDD 約束加入 `CLAUDE.md`,這些內容應該放到
|
|
146
|
+
`dflow/specs/shared/AI-AGENT-GUIDE.md`。shim 保持精簡,其他工具的 shim 才不會
|
|
147
|
+
與它產生漂移(drift)。
|
|
157
148
|
|
|
158
|
-
**`/dflow:*`
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
them immediately after `init` without any Claude Code configuration.
|
|
149
|
+
**`/dflow:*` 不是安裝 Claude Code Skill。** `init` 不會在 Claude Code 的 skill
|
|
150
|
+
系統中安裝任何東西。Slash commands 是 AI 從 workflow 表識別的純文字模式。
|
|
151
|
+
你在 `init` 之後就可以立即使用它們,不需要任何 Claude Code 設定。
|
|
162
152
|
|
|
163
|
-
**Permission gates
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
expected and not a sign of misconfiguration.
|
|
153
|
+
**Permission gates 與 Dflow workflow gates 是分開的。** Claude Code 可能會詢問
|
|
154
|
+
執行某個工具的權限(例如寫入檔案)。Dflow 的 workflow 有自己的審核關卡(例如
|
|
155
|
+
「我已起草 spec —— 你要我繼續進入實作嗎?」)。兩者可能在同一個動作上同時觸發;
|
|
156
|
+
這是預期行為,不代表設定有誤。
|
|
168
157
|
|
|
169
|
-
|
|
170
|
-
`AI-AGENT-GUIDE.md
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
proportional to active work.
|
|
158
|
+
**`@` import 不是遞迴的。** `CLAUDE.md` import 了 `AI-AGENT-GUIDE.md`,但如果
|
|
159
|
+
`AI-AGENT-GUIDE.md` 引用了其他檔案(例如 feature spec),那些檔案不會被自動
|
|
160
|
+
載入 —— Claude Code 會在進入對應 workflow 時按需讀取它們。這樣可以讓 context
|
|
161
|
+
用量與正在進行的工作保持比例。
|
|
174
162
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
existing `CLAUDE.md` manually.
|
|
163
|
+
**既有的 `CLAUDE.md` 會被保留。** `init` 不會覆蓋你現有的專案指示。請到
|
|
164
|
+
`dflow/specs/shared/` 下找 `init` 寫入的 merge snippet,並手動將相關段落貼入
|
|
165
|
+
你現有的 `CLAUDE.md`。
|
|
179
166
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
shim and the canonical guide.
|
|
167
|
+
**跨機器專案可正常運作。** `dflow/specs/` 是純 Markdown,已 check in 到你的
|
|
168
|
+
repo。任何人 clone 該 repo 並在其中使用 Claude Code,都會透過已 commit 的
|
|
169
|
+
`CLAUDE.md` shim 與 canonical 指南自動看到相同的 Dflow 設定。
|
|
184
170
|
|
|
185
|
-
##
|
|
171
|
+
## 下一步
|
|
186
172
|
|
|
187
|
-
|
|
173
|
+
如果你還沒有執行 `init`:
|
|
188
174
|
|
|
189
|
-
-
|
|
190
|
-
|
|
175
|
+
- 按照[評估者指南 Playbook](evaluating-dflow.md#30-分鐘評估-playbook)
|
|
176
|
+
在可拋棄的範例專案中試用。
|
|
191
177
|
|
|
192
|
-
|
|
178
|
+
如果你已執行 `init` 且想查看端到端的 workflow 範例:
|
|
193
179
|
|
|
194
|
-
-
|
|
195
|
-
[`tutorial/02-brownfield/`](../tutorial/02-brownfield/00-setup.md)
|
|
196
|
-
tutorial walk-
|
|
197
|
-
`dflow/specs/` outputs.
|
|
180
|
+
- 閱讀 [`tutorial/01-greenfield/`](../tutorial/01-greenfield/walkthrough-00-setup.md) 或
|
|
181
|
+
[`tutorial/02-brownfield/`](../tutorial/02-brownfield/walkthrough-00-setup.md)。
|
|
182
|
+
tutorial walk-through 展示了對話流程與產生的 `dflow/specs/` 輸出。
|
|
198
183
|
|
|
199
|
-
|
|
184
|
+
如果你想了解設計理念:
|
|
200
185
|
|
|
201
|
-
-
|
|
186
|
+
- 閱讀[為什麼 AI 時代 DDD 更重要](why-ddd-for-ai.md)。
|
|
202
187
|
|
|
203
|
-
|
|
188
|
+
如果有任何行為與描述不符:
|
|
204
189
|
|
|
205
|
-
-
|
|
206
|
-
Per-tool
|
|
207
|
-
behavior is valuable.
|
|
190
|
+
- 開一個 docs feedback issue(見 [`CONTRIBUTING.md`](../CONTRIBUTING.md))。
|
|
191
|
+
Per-tool 文件是新內容,有關 Claude Code 行為的具體回饋非常有價值。
|