dflow-sdd-ddd 0.4.0 → 0.6.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 +55 -0
- package/README.en.md +25 -8
- package/README.md +19 -7
- package/TEMPLATE-COVERAGE.md +1 -1
- package/bin/dflow.js +11 -5
- package/docs/evaluating-dflow.en.md +14 -11
- package/docs/evaluating-dflow.md +8 -6
- package/docs/migrating-to-dflow-v1.md +1 -1
- package/docs/using-with-claude-code.en.md +49 -10
- package/docs/using-with-claude-code.md +43 -9
- package/docs/using-with-codex.en.md +65 -34
- package/docs/using-with-codex.md +58 -30
- package/docs/using-with-github-copilot.en.md +29 -6
- package/docs/using-with-github-copilot.md +31 -7
- package/lib/init.js +255 -22
- package/package.json +1 -1
- package/templates/brownfield/scaffolding/AI-AGENT-GUIDE.md +42 -3
- package/templates/greenfield/scaffolding/AI-AGENT-GUIDE.md +42 -3
- package/templates/greenfield/scaffolding/CLAUDE-md-snippet.md +1 -0
- package/docs/using-with-gemini-cli.en.md +0 -200
- package/docs/using-with-gemini-cli.md +0 -184
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,61 @@
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
## 0.6.0 — 2026-05-21 — Command-adapter 命名修正
|
|
10
|
+
|
|
11
|
+
**Proposals**:PROPOSAL-036(修正 command-adapter 命名 + 各工具叫用現實對齊)
|
|
12
|
+
|
|
13
|
+
**變更**:
|
|
14
|
+
|
|
15
|
+
- **修正 opt-in command adapter 命名 bug**(PROPOSAL-036):0.5.0 的
|
|
16
|
+
`dflow configure-agents --command-adapters` 在 Claude 產生
|
|
17
|
+
`.claude/commands/dflow/dflow-<id>.md`;因 Claude Code 把子目錄 `dflow/`
|
|
18
|
+
當 namespace、再加上檔名的 `dflow-` 前綴,註冊出的指令名變成重複的
|
|
19
|
+
`/dflow:dflow-<id>`。改為產生 `.claude/commands/dflow/<id>.md`,指令名
|
|
20
|
+
回正為 `/dflow:<id>`。
|
|
21
|
+
- **各工具叫用方式對齊實測現實**:command adapter wrapper 與
|
|
22
|
+
`configure-agents` next-steps 文字改為說明三工具實際叫用名 —— Claude Code
|
|
23
|
+
`/dflow:<id>`、GitHub Copilot 選單 `/dflow-<id>`(或 canonical `/dflow:<id>`
|
|
24
|
+
純文字)、Codex CLI 不帶斜線的純文字(如 `dflow:status`)。Codex AGENTS.md
|
|
25
|
+
command-adapters snippet 補上「CLI 攔截斜線指令時改送不帶斜線文字」的指引。
|
|
26
|
+
`README` / `docs/using-with-*` / `docs/evaluating-dflow` / `tutorial`
|
|
27
|
+
同步更新。
|
|
28
|
+
|
|
29
|
+
**⚠️ Breaking change / 遷移**:
|
|
30
|
+
|
|
31
|
+
- 生成路徑重新命名。**從 0.5.0 升級、且曾跑過 `configure-agents
|
|
32
|
+
--command-adapters` 的專案**,須手動刪除舊的
|
|
33
|
+
`.claude/commands/dflow/dflow-*.md`,否則 Claude Code 會同時顯示新舊兩組
|
|
34
|
+
指令名。未使用 command adapters 的專案不受影響。
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 0.5.0 — 2026-05-20 — Guide control commands、opt-in command adapters、移除 Gemini
|
|
39
|
+
|
|
40
|
+
**Proposals**:PROPOSAL-032(AI-AGENT-GUIDE 補 status/next/cancel 行為語義 +
|
|
41
|
+
scaffolding 單一來源化)、PROPOSAL-033(npm 版 installed 入口 + opt-in command
|
|
42
|
+
adapters)、PROPOSAL-034(移除 Gemini 支援)
|
|
43
|
+
|
|
44
|
+
**變更**:
|
|
45
|
+
|
|
46
|
+
- **`/dflow:status` / `/dflow:next` / `/dflow:cancel` 行為語義進入 canonical guide**
|
|
47
|
+
(PROPOSAL-032):四份 scaffolding `AI-AGENT-GUIDE.md`(brownfield / greenfield,
|
|
48
|
+
發佈用 templates 與 skill 副本)的 workflow 表補上這三個控制指令及其行為語義
|
|
49
|
+
(status 回報格式、next 確認語義、cancel 中止語義)。先前這些定義只存在於不被
|
|
50
|
+
npm 發佈的 `SKILL.md`,npm-installed 專案的 host AI 拿不到,導致 `/dflow:status`
|
|
51
|
+
形同失效。
|
|
52
|
+
- **`dflow configure-agents --command-adapters`**(PROPOSAL-033):新增 opt-in
|
|
53
|
+
選項,除 thin shim 外額外產生各工具原生的薄 command adapter(Claude
|
|
54
|
+
`.claude/commands/dflow/dflow-*.md`、Copilot `.github/prompts/dflow-*.prompt.md`,
|
|
55
|
+
Codex 取得 AGENTS.md command-adapters snippet),讓 `/dflow-*` 指令出現在工具
|
|
56
|
+
選單。預設不產生;canonical `/dflow:*` 名稱仍以 `AI-AGENT-GUIDE.md` 為準。
|
|
57
|
+
`docs/using-with-*` 同步更新。
|
|
58
|
+
- **移除 Gemini 支援**(PROPOSAL-034):`dflow init` / `dflow configure-agents`
|
|
59
|
+
不再提供 `GEMINI.md` 選項,並刪除 Gemini CLI per-tool docs 與 tutorial shim
|
|
60
|
+
fixture。
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
9
64
|
## 0.4.0 — 2026-05-19 — Language-agnostic templates and skill source
|
|
10
65
|
|
|
11
66
|
**Proposals**:PROPOSAL-030(language-agnostic templates and skill source;
|
package/README.en.md
CHANGED
|
@@ -20,7 +20,7 @@ The goal is not the process itself, but repeatable software change with clearer
|
|
|
20
20
|
| **Three-layer documentation model** | Matches how feature branches actually evolve: phase (one propose-implement-archive cycle) / feature (the whole branch's running state and resume pointer) / system (cross-feature long-term knowledge). Many spec tools only ship phase + system, which breaks down when a feature branch spans multiple phases. Detailed below. |
|
|
21
21
|
| **Change-depth-based tiers (T1/T2/T3)** | AI scales specification and verification by change depth: color/typo gets one inline row in `_index.md`; bug fixes get a lightweight spec plus focused verification; new features or bounded-context-level changes go through a full phase-spec plus layer-by-layer implementation planning / verification. Small changes don't get dragged down by the process. |
|
|
22
22
|
| **Drift verification** | `/dflow:verify` cross-checks specs, domain documents, implementation, tests, and tech-debt records to surface the "documentation still describes the old behavior" drift that PR review by eye usually misses. |
|
|
23
|
-
| **Multi-AI-tool rule sharing** | A canonical project guide plus thin tool-specific shims (`CLAUDE.md` / `AGENTS.md` /
|
|
23
|
+
| **Multi-AI-tool rule sharing** | A canonical project guide plus thin tool-specific shims (`CLAUDE.md` / `AGENTS.md` / Copilot instructions) — teams switching between Claude, Codex, and Copilot don't have to maintain multiple copies of workflow rules. |
|
|
24
24
|
|
|
25
25
|
## Get Started
|
|
26
26
|
|
|
@@ -47,8 +47,14 @@ tool, run:
|
|
|
47
47
|
dflow configure-agents
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
If you also want tool-native command / prompt wrappers, use the opt-in mode:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
dflow configure-agents --command-adapters
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
This command only configures AI instruction files and optional command
|
|
57
|
+
adapters. It does not rerun project initialization or touch existing specs.
|
|
52
58
|
|
|
53
59
|
### Alternative: try without installing
|
|
54
60
|
|
|
@@ -94,7 +100,19 @@ After init, start work through the Dflow workflow in your AI coding agent:
|
|
|
94
100
|
/dflow:pr-review
|
|
95
101
|
```
|
|
96
102
|
|
|
97
|
-
|
|
103
|
+
`/dflow:*` is Dflow's canonical shared vocabulary; each AI tool's `/` parser
|
|
104
|
+
behaves differently. Use these practical invocation forms:
|
|
105
|
+
|
|
106
|
+
| Tool | Recommended invocation |
|
|
107
|
+
|---|---|
|
|
108
|
+
| Claude Code after `--command-adapters` | `/dflow:<id>`, for example `/dflow:new-feature` |
|
|
109
|
+
| GitHub Copilot | `/dflow:<id>` as chat text; `/dflow-<id>` in the VS Code prompt menu |
|
|
110
|
+
| Codex CLI | no-slash plain text `dflow:<id>`, for example `dflow:new-feature` |
|
|
111
|
+
|
|
112
|
+
If your tool does not support custom slash commands, use the workflow name as
|
|
113
|
+
a plain instruction in chat. Dflow is Markdown-based workflow material plus a
|
|
114
|
+
scaffolding CLI, so it can be used with AI coding agents that can read project
|
|
115
|
+
instructions and repository context.
|
|
98
116
|
|
|
99
117
|
For the first adoption pass, use a branch or disposable sample project so your
|
|
100
118
|
team can inspect the generated `dflow/specs/` workspace before bringing the
|
|
@@ -208,7 +226,6 @@ files whose only job is to redirect the tool to the canonical guide):
|
|
|
208
226
|
|---|---|
|
|
209
227
|
| Codex / Copilot coding agent | `AGENTS.md` |
|
|
210
228
|
| Claude Code | `CLAUDE.md` |
|
|
211
|
-
| Gemini CLI | `GEMINI.md` |
|
|
212
229
|
| GitHub Copilot | `.github/copilot-instructions.md` |
|
|
213
230
|
|
|
214
231
|
If one of those files already exists, Dflow leaves it unchanged and writes a
|
|
@@ -217,7 +234,8 @@ single source of truth, so teams can use multiple AI tools without maintaining
|
|
|
217
234
|
multiple copies of the workflow rules.
|
|
218
235
|
|
|
219
236
|
You can run `dflow configure-agents` later to add more tool shims as the team
|
|
220
|
-
adopts additional AI coding agents.
|
|
237
|
+
adopts additional AI coding agents. If you need Claude / Copilot tool-native
|
|
238
|
+
command entries, use `dflow configure-agents --command-adapters`.
|
|
221
239
|
|
|
222
240
|
For tool-specific walk-throughs of what `init` writes and how Dflow's
|
|
223
241
|
workflow commands appear in a given AI tool, see the per-tool guides under
|
|
@@ -225,7 +243,6 @@ workflow commands appear in a given AI tool, see the per-tool guides under
|
|
|
225
243
|
|
|
226
244
|
- [Using Dflow with Claude Code](docs/using-with-claude-code.en.md)
|
|
227
245
|
- [Using Dflow with Codex CLI](docs/using-with-codex.en.md)
|
|
228
|
-
- [Using Dflow with Gemini CLI](docs/using-with-gemini-cli.en.md)
|
|
229
246
|
- [Using Dflow with GitHub Copilot](docs/using-with-github-copilot.en.md)
|
|
230
247
|
|
|
231
248
|
Init does not copy the `tutorial/` directory into your project. The
|
|
@@ -330,7 +347,7 @@ npm package is `0.2.0`, covering:
|
|
|
330
347
|
|
|
331
348
|
- Project initialization (`dflow init`)
|
|
332
349
|
- Workflow documentation (the `/dflow:*` flows)
|
|
333
|
-
- Multi-AI agent setup (CLAUDE.md / AGENTS.md /
|
|
350
|
+
- Multi-AI agent setup (CLAUDE.md / AGENTS.md / Copilot instructions shims)
|
|
334
351
|
- AI-agent-readable SDD/DDD guidance
|
|
335
352
|
- Public migration tooling: manual migration guide plus `dflow doctor` read-only health check
|
|
336
353
|
- Public onboarding: evaluator guide and per-tool walkthroughs for Claude Code and Codex CLI
|
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ Dflow 是一套 spec-first 的工作流程工具集,專為 AI 輔助軟體開
|
|
|
20
20
|
| **三層文件模型** | 對應 feature branch 的實際節奏:phase(單次提案-實作循環)/ feature(整條 branch 的累積狀態與接續指引)/ system(跨 feature 的長期知識)。許多 spec 工具只有 phase + system 兩層,多次迭代的 feature branch 跨多個 phase 時就會失真。下方有完整說明。 |
|
|
21
21
|
| **依改動深淺的 Tier 制(T1/T2/T3)** | AI 依改動深淺自動決定規格與驗證量級:改顏色 / typo 只需 `_index.md` 一行;bug fix 用 lightweight spec + 聚焦驗證;新 feature 或動到 bounded context 才走完整 phase-spec + 分層實作計畫 / 驗證。小修改不會被流程拖累。 |
|
|
22
22
|
| **漂移驗證** | `/dflow:verify` 把規格、領域文件、實作、測試、技術債紀錄做交叉比對,找出 PR review 人眼看不出來的「文件還在描述舊行為」漂移。 |
|
|
23
|
-
| **多 AI 工具共用一份規則** | Canonical 專案指南 + 各工具薄 shim(`CLAUDE.md` / `AGENTS.md` /
|
|
23
|
+
| **多 AI 工具共用一份規則** | Canonical 專案指南 + 各工具薄 shim(`CLAUDE.md` / `AGENTS.md` / Copilot instructions),團隊在 Claude / Codex / Copilot 之間切換時不必維護多份 workflow 規則。 |
|
|
24
24
|
|
|
25
25
|
## 開始使用
|
|
26
26
|
|
|
@@ -41,7 +41,13 @@ init 流程會詢問是 greenfield 或 brownfield,接著預覽即將建立的
|
|
|
41
41
|
dflow configure-agents
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
若想同時建立工具原生的命令 / prompt wrapper,使用 opt-in 模式:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
dflow configure-agents --command-adapters
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
此指令只設定 AI 指示檔與選配 command adapters,不會重跑專案初始化,也不會動到既有 specs。
|
|
45
51
|
|
|
46
52
|
### 替代路徑:不安裝直接試用
|
|
47
53
|
|
|
@@ -79,7 +85,15 @@ dflow doctor
|
|
|
79
85
|
/dflow:pr-review
|
|
80
86
|
```
|
|
81
87
|
|
|
82
|
-
|
|
88
|
+
`/dflow:*` 是 Dflow 的 canonical 共同詞彙;各 AI 工具的 `/` parser 行為不同。實際輸入方式如下:
|
|
89
|
+
|
|
90
|
+
| 工具 | 建議叫法 |
|
|
91
|
+
|---|---|
|
|
92
|
+
| Claude Code(安裝 `--command-adapters` 後) | `/dflow:<id>`,例如 `/dflow:new-feature` |
|
|
93
|
+
| GitHub Copilot | chat 文字可用 `/dflow:<id>`;VS Code prompt 選單使用 `/dflow-<id>` |
|
|
94
|
+
| Codex CLI | 不帶斜線的純文字 `dflow:<id>`,例如 `dflow:new-feature` |
|
|
95
|
+
|
|
96
|
+
若你的工具不支援自訂 slash command,把 workflow 名稱當成普通對話訊息輸入即可。Dflow 是 Markdown-based 的 workflow 材料加一個 scaffolding CLI,能與任何可讀專案指示與 repo 上下文的 AI 程式設計助理一起運作。
|
|
83
97
|
|
|
84
98
|
第一次採用建議用 branch 或一次性試用專案,讓團隊先檢視產生的 `dflow/specs/` 工作區,再把流程引入正式程式碼。
|
|
85
99
|
|
|
@@ -184,18 +198,16 @@ Dflow 也會為你的 AI 程式設計助理建立或提供可合併的專案指
|
|
|
184
198
|
|---|---|
|
|
185
199
|
| Codex / Copilot coding agent | `AGENTS.md` |
|
|
186
200
|
| Claude Code | `CLAUDE.md` |
|
|
187
|
-
| Gemini CLI | `GEMINI.md` |
|
|
188
201
|
| GitHub Copilot | `.github/copilot-instructions.md` |
|
|
189
202
|
|
|
190
203
|
若這些檔案已存在,Dflow 不會覆蓋,改寫 merge snippet 到 `dflow/specs/shared/`。專案指南保持單一 source of truth,團隊就能用多個 AI 工具而不必維護多份 workflow 規則。
|
|
191
204
|
|
|
192
|
-
之後團隊採用新 AI 程式設計助理時,可隨時跑 `dflow configure-agents` 新增 shim
|
|
205
|
+
之後團隊採用新 AI 程式設計助理時,可隨時跑 `dflow configure-agents` 新增 shim;若需要 Claude / Copilot 的工具原生命令入口,改用 `dflow configure-agents --command-adapters`。
|
|
193
206
|
|
|
194
207
|
特定工具的 init 寫入內容與 Dflow workflow 命令呈現方式,見 `docs/` 內的 per-tool 指南:
|
|
195
208
|
|
|
196
209
|
- [在 Claude Code 中使用 Dflow](docs/using-with-claude-code.md)
|
|
197
210
|
- [在 Codex CLI 中使用 Dflow](docs/using-with-codex.md)
|
|
198
|
-
- [在 Gemini CLI 中使用 Dflow](docs/using-with-gemini-cli.md)
|
|
199
211
|
- [在 GitHub Copilot 中使用 Dflow](docs/using-with-github-copilot.md)
|
|
200
212
|
|
|
201
213
|
Init 不會把 `tutorial/` 目錄複製進你的專案。[`tutorial/`](tutorial/README.md) 目錄存放在本 source repository,作為理解 Dflow 如何在 Greenfield / Brownfield 劇情中運作的評估材料。
|
|
@@ -292,7 +304,7 @@ Dflow 目前以 `dflow-sdd-ddd` 名稱發佈於 npm。最新發佈版本為 `0.2
|
|
|
292
304
|
|
|
293
305
|
- 專案初始化(`dflow init`)
|
|
294
306
|
- Workflow 文件(`/dflow:*` 流程)
|
|
295
|
-
- 多 AI agent 設定(CLAUDE.md / AGENTS.md /
|
|
307
|
+
- 多 AI agent 設定(CLAUDE.md / AGENTS.md / Copilot instructions shim)
|
|
296
308
|
- AI agent 可讀的 SDD/DDD 指引
|
|
297
309
|
- 公開 migration tooling:手動 migration guide 與 `dflow doctor` 唯讀健康檢查
|
|
298
310
|
- 公開 onboarding:evaluator 指南、Claude Code / Codex CLI 的 per-tool walkthrough
|
package/TEMPLATE-COVERAGE.md
CHANGED
|
@@ -24,7 +24,7 @@ The matrix lists Brownfield / Greenfield logical template parity so reviewers ca
|
|
|
24
24
|
| Tech debt | Brownfield: `dflow/specs/migration/tech-debt.md`; Greenfield: `dflow/specs/architecture/tech-debt.md` | `templates/tech-debt.md` | `templates/tech-debt.md` | Same backlog intent | Brownfield migration focus; Greenfield architecture focus | - |
|
|
25
25
|
| ADR guide | `dflow/specs/architecture/decisions/README.md` | n/a | `scaffolding/architecture-decisions-README.md` | Greenfield only | Brownfield not applicable | - |
|
|
26
26
|
| Project AI guide | `dflow/specs/shared/AI-AGENT-GUIDE.md` when at least one AI agent is selected during init | `scaffolding/AI-AGENT-GUIDE.md` | `scaffolding/AI-AGENT-GUIDE.md` | Same canonical tool-neutral workflow guide and source-of-truth pointers | Track-specific seeded values and available source-of-truth paths may differ | - |
|
|
27
|
-
| AI tool shims | `AGENTS.md`, `CLAUDE.md`,
|
|
27
|
+
| AI tool shims | `AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, or merge snippets under `dflow/specs/shared/` | generated by CLI | generated by CLI | Thin files must point back to `dflow/specs/shared/AI-AGENT-GUIDE.md`; existing files are not overwritten | Tool-specific import hints differ | - |
|
|
28
28
|
| Legacy Claude guide template | `<project root>/CLAUDE.md` | `templates/CLAUDE.md` | `templates/CLAUDE.md` | H2 navigation and H3 structural headings aligned (canonical English, per F-01 Path A) | Greenfield includes Aggregate / Architecture Decisions and other Greenfield-specific H3 sections | - |
|
|
29
29
|
|
|
30
30
|
## Reference Flow Parity
|
package/bin/dflow.js
CHANGED
|
@@ -29,12 +29,15 @@ optional starter files, and AI coding agents before showing a full file preview.
|
|
|
29
29
|
|
|
30
30
|
function printConfigureAgentsHelp() {
|
|
31
31
|
process.stdout.write(`Usage:
|
|
32
|
-
dflow configure-agents
|
|
32
|
+
dflow configure-agents [--command-adapters]
|
|
33
33
|
|
|
34
34
|
Adds AI agent instruction files to an existing Dflow project.
|
|
35
|
-
The command can create AGENTS.md, CLAUDE.md,
|
|
35
|
+
The command can create AGENTS.md, CLAUDE.md, and
|
|
36
36
|
.github/copilot-instructions.md shims that point to the canonical
|
|
37
37
|
dflow/specs/shared/AI-AGENT-GUIDE.md file.
|
|
38
|
+
|
|
39
|
+
Options:
|
|
40
|
+
--command-adapters Also generate tool-native thin wrappers for supported tools.
|
|
38
41
|
`);
|
|
39
42
|
}
|
|
40
43
|
|
|
@@ -91,8 +94,10 @@ async function main() {
|
|
|
91
94
|
return 0;
|
|
92
95
|
}
|
|
93
96
|
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
const configureOptions = args.slice(1);
|
|
98
|
+
const unsupportedConfigureOptions = configureOptions.filter((arg) => arg !== '--command-adapters');
|
|
99
|
+
if (unsupportedConfigureOptions.length > 0) {
|
|
100
|
+
process.stderr.write(`Unsupported configure-agents option: ${unsupportedConfigureOptions.join(' ')}\n`);
|
|
96
101
|
return 1;
|
|
97
102
|
}
|
|
98
103
|
|
|
@@ -100,7 +105,8 @@ async function main() {
|
|
|
100
105
|
cwd: process.cwd(),
|
|
101
106
|
stdin: process.stdin,
|
|
102
107
|
stdout: process.stdout,
|
|
103
|
-
stderr: process.stderr
|
|
108
|
+
stderr: process.stderr,
|
|
109
|
+
commandAdapters: configureOptions.includes('--command-adapters')
|
|
104
110
|
});
|
|
105
111
|
}
|
|
106
112
|
|
|
@@ -37,9 +37,8 @@ in your project's `dflow/specs/` directory and AI instruction files.
|
|
|
37
37
|
for the full tree.
|
|
38
38
|
- A canonical project guide at `dflow/specs/shared/AI-AGENT-GUIDE.md`.
|
|
39
39
|
- Mergeable AI agent instruction files for the tools you select (e.g.,
|
|
40
|
-
`CLAUDE.md`, `AGENTS.md`, `
|
|
41
|
-
|
|
42
|
-
canonical guide.
|
|
40
|
+
`CLAUDE.md`, `AGENTS.md`, `.github/copilot-instructions.md`). Each is a
|
|
41
|
+
thin pointer to the canonical guide.
|
|
43
42
|
|
|
44
43
|
`init` does **not**:
|
|
45
44
|
|
|
@@ -58,7 +57,6 @@ or more tools and Dflow writes the corresponding shim:
|
|
|
58
57
|
|---|---|
|
|
59
58
|
| Codex / Copilot coding agent | `AGENTS.md` |
|
|
60
59
|
| Claude Code | `CLAUDE.md` |
|
|
61
|
-
| Gemini CLI | `GEMINI.md` |
|
|
62
60
|
| GitHub Copilot | `.github/copilot-instructions.md` |
|
|
63
61
|
|
|
64
62
|
Each shim points back to the canonical
|
|
@@ -66,13 +64,17 @@ Each shim points back to the canonical
|
|
|
66
64
|
|
|
67
65
|
- Multiple tools can be active in the same project without diverging
|
|
68
66
|
workflow rules.
|
|
69
|
-
- Switching or adding tools later does not require re-running `init`;
|
|
70
|
-
|
|
67
|
+
- Switching or adding tools later does not require re-running `init`; run
|
|
68
|
+
`dflow configure-agents` to add another shim, or
|
|
69
|
+
`dflow configure-agents --command-adapters` to opt in to tool-native command
|
|
70
|
+
entries.
|
|
71
71
|
- The project guide stays the single source of truth for Dflow workflow
|
|
72
72
|
behavior.
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
`/dflow:*` is the canonical shared vocabulary, but each tool's `/` parser
|
|
75
|
+
behaves differently: Claude Code command adapters use `/dflow:<id>`, the
|
|
76
|
+
GitHub Copilot prompt menu uses `/dflow-<id>` (chat text can still name
|
|
77
|
+
`/dflow:<id>`), and Codex CLI uses no-slash text `dflow:<id>`. Dflow is
|
|
76
78
|
Markdown-based workflow material; it works with any AI agent that can read
|
|
77
79
|
project instructions and repository context.
|
|
78
80
|
|
|
@@ -81,7 +83,6 @@ commands appear in conversation, see the per-tool guides:
|
|
|
81
83
|
|
|
82
84
|
- [Using Dflow with Claude Code](using-with-claude-code.en.md)
|
|
83
85
|
- [Using Dflow with Codex CLI](using-with-codex.en.md)
|
|
84
|
-
- [Using Dflow with Gemini CLI](using-with-gemini-cli.en.md)
|
|
85
86
|
- [Using Dflow with GitHub Copilot](using-with-github-copilot.en.md)
|
|
86
87
|
|
|
87
88
|
## Greenfield or Brownfield: Choosing a Track
|
|
@@ -147,8 +148,10 @@ real codebase.
|
|
|
147
148
|
- Brownfield: [`tutorial/02-brownfield/`](../tutorial/02-brownfield/walkthrough-00-setup.md)
|
|
148
149
|
|
|
149
150
|
5. **Optional: try one workflow command**. Open the sample project in your
|
|
150
|
-
AI tool and ask it to run
|
|
151
|
-
|
|
151
|
+
AI tool and ask it to run the new-feature workflow using that tool's
|
|
152
|
+
invocation form (`/dflow:new-feature` in Claude Code with adapters,
|
|
153
|
+
`/dflow-<id>` from the Copilot prompt menu, or `dflow:new-feature` in
|
|
154
|
+
Codex CLI). Inspect what it writes to `dflow/specs/`.
|
|
152
155
|
|
|
153
156
|
6. **Decide and clean up**. If Dflow does not fit, delete the sample
|
|
154
157
|
directory. There is no global state to clean; nothing was installed
|
package/docs/evaluating-dflow.md
CHANGED
|
@@ -26,7 +26,7 @@ Dflow 是 Markdown-based 的 workflow 材料加上一個 scaffolding CLI。它
|
|
|
26
26
|
- `dflow/specs/` workspace(概覽、慣例、領域詞彙表、context map、架構 / 技術債、功能 active/completed)。完整目錄樹見
|
|
27
27
|
[`README.md` "Init 產生的檔案"](../README.md#init-產生的檔案)。
|
|
28
28
|
- 位於 `dflow/specs/shared/AI-AGENT-GUIDE.md` 的 canonical 專案指南。
|
|
29
|
-
- 你所選工具的可合併 AI 指示檔(例如 `CLAUDE.md`、`AGENTS.md
|
|
29
|
+
- 你所選工具的可合併 AI 指示檔(例如 `CLAUDE.md`、`AGENTS.md`、`.github/copilot-instructions.md`)。每個都是指向 canonical 指南的薄 shim。
|
|
30
30
|
|
|
31
31
|
`init` **不會**:
|
|
32
32
|
|
|
@@ -43,22 +43,24 @@ Dflow 支援多種 AI 程式設計助理。跑完 `init` 後,你選取一個
|
|
|
43
43
|
|---|---|
|
|
44
44
|
| Codex / Copilot coding agent | `AGENTS.md` |
|
|
45
45
|
| Claude Code | `CLAUDE.md` |
|
|
46
|
-
| Gemini CLI | `GEMINI.md` |
|
|
47
46
|
| GitHub Copilot | `.github/copilot-instructions.md` |
|
|
48
47
|
|
|
49
48
|
每個 shim 都指向 canonical 的 `dflow/specs/shared/AI-AGENT-GUIDE.md`。實際意義:
|
|
50
49
|
|
|
51
50
|
- 同一個專案可以同時啟用多個工具,而不會有 workflow 規則分歧。
|
|
52
|
-
- 之後切換或新增工具不需要重跑 `init`;執行 `dflow configure-agents` 即可新增 shim
|
|
51
|
+
- 之後切換或新增工具不需要重跑 `init`;執行 `dflow configure-agents` 即可新增 shim,或用 `dflow configure-agents --command-adapters` opt in 工具原生命令入口。
|
|
53
52
|
- 專案指南始終保持為 Dflow workflow 行為的單一 source of truth。
|
|
54
53
|
|
|
55
|
-
|
|
54
|
+
`/dflow:*` 是 canonical 共同詞彙,但各工具的 `/` parser 行為不同:Claude Code
|
|
55
|
+
command adapters 使用 `/dflow:<id>`,GitHub Copilot prompt 選單使用
|
|
56
|
+
`/dflow-<id>`(chat 文字仍可說 `/dflow:<id>`),Codex CLI 使用不帶斜線的
|
|
57
|
+
`dflow:<id>`。Dflow 是 Markdown-based 的 workflow 材料,能與任何可讀專案指示與
|
|
58
|
+
repo 上下文的 AI 助理一起運作。
|
|
56
59
|
|
|
57
60
|
關於特定工具的 `init` 寫入內容與 slash command 在對話中的呈現方式,見各工具指南:
|
|
58
61
|
|
|
59
62
|
- [在 Claude Code 中使用 Dflow](using-with-claude-code.md)
|
|
60
63
|
- [在 Codex CLI 中使用 Dflow](using-with-codex.md)
|
|
61
|
-
- [在 Gemini CLI 中使用 Dflow](using-with-gemini-cli.md)
|
|
62
64
|
- [在 GitHub Copilot 中使用 Dflow](using-with-github-copilot.md)
|
|
63
65
|
|
|
64
66
|
## Greenfield 或 Brownfield:選擇 Track
|
|
@@ -113,7 +115,7 @@ Dflow 支援多種 AI 程式設計助理。跑完 `init` 後,你選取一個
|
|
|
113
115
|
- Greenfield:[`tutorial/01-greenfield/`](../tutorial/01-greenfield/walkthrough-00-setup.md)
|
|
114
116
|
- Brownfield:[`tutorial/02-brownfield/`](../tutorial/02-brownfield/walkthrough-00-setup.md)
|
|
115
117
|
|
|
116
|
-
5. **選用:試跑一個 workflow 指令**。在你的 AI
|
|
118
|
+
5. **選用:試跑一個 workflow 指令**。在你的 AI 工具中開啟範例專案,依工具叫法執行 new-feature workflow(Claude Code adapters 用 `/dflow:new-feature`、Copilot prompt 選單用 `/dflow-<id>`、Codex CLI 用 `dflow:new-feature`)。檢查它寫入 `dflow/specs/` 的內容。
|
|
117
119
|
|
|
118
120
|
6. **決定並清理**。若 Dflow 不適合,直接刪除範例目錄。沒有全域狀態需要清除;除了一次性的 `npx` 快取,什麼也沒有安裝。
|
|
119
121
|
|
|
@@ -163,7 +163,7 @@ shell command instead.
|
|
|
163
163
|
V1 separates the canonical project guide from each per-tool
|
|
164
164
|
instruction file (PROPOSAL-020). The canonical guide lives at
|
|
165
165
|
`dflow/specs/shared/AI-AGENT-GUIDE.md`. Per-tool files (`AGENTS.md`,
|
|
166
|
-
`CLAUDE.md`,
|
|
166
|
+
`CLAUDE.md`, `.github/copilot-instructions.md`) are thin
|
|
167
167
|
shims pointing at the canonical guide.
|
|
168
168
|
|
|
169
169
|
If your project's `CLAUDE.md` (or equivalent) was generated by an
|
|
@@ -81,17 +81,19 @@ custom project instructions you already had.
|
|
|
81
81
|
|
|
82
82
|
## Using Dflow Slash Commands in Claude Code
|
|
83
83
|
|
|
84
|
-
Dflow's `/dflow:*`
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
Dflow's canonical `/dflow:*` names are the shared workflow vocabulary across
|
|
85
|
+
tools. Each tool has different `/` parser behavior, and Claude Code accepts
|
|
86
|
+
`/dflow:<id>` only when that slash command has been registered. Install the
|
|
87
|
+
command adapters below, then invoke the Claude Code registered name:
|
|
87
88
|
|
|
88
89
|
```text
|
|
89
90
|
/dflow:new-feature
|
|
90
91
|
```
|
|
91
92
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
workflow. A typical conversation looks
|
|
93
|
+
After adapters are installed, Claude Code registers
|
|
94
|
+
`.claude/commands/dflow/<id>.md` as `/dflow:<id>`. The wrapper points back to
|
|
95
|
+
the canonical workflow in `AI-AGENT-GUIDE.md`. A typical conversation looks
|
|
96
|
+
like:
|
|
95
97
|
|
|
96
98
|
```text
|
|
97
99
|
You: /dflow:new-feature
|
|
@@ -131,6 +133,34 @@ If you forget a command name, ask Claude Code "what dflow workflows are
|
|
|
131
133
|
available?" — the answer comes from the workflow table it already has
|
|
132
134
|
loaded.
|
|
133
135
|
|
|
136
|
+
If command adapters are not installed yet, or if Claude Code treats a
|
|
137
|
+
slash-prefixed input as an unknown command, resend it as plain text, for
|
|
138
|
+
example `dflow:new-feature` or `Run the Dflow /dflow:new-feature workflow.`,
|
|
139
|
+
so the model can follow the canonical guide.
|
|
140
|
+
|
|
141
|
+
### Optional Command Adapters
|
|
142
|
+
|
|
143
|
+
If you want Claude Code to expose tool-native command entries, run this in an
|
|
144
|
+
initialized project:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
dflow configure-agents --command-adapters
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
After you select Claude Code, Dflow projects thin wrappers from the command
|
|
151
|
+
registry inside the canonical guide:
|
|
152
|
+
|
|
153
|
+
- `.claude/commands/dflow/<id>.md`
|
|
154
|
+
|
|
155
|
+
These wrappers use Claude Code's directory namespace names, for example
|
|
156
|
+
`/dflow:new-feature`. Their body only points to the canonical
|
|
157
|
+
`/dflow:new-feature` workflow and `dflow/specs/shared/AI-AGENT-GUIDE.md`; it
|
|
158
|
+
does not copy workflow steps. Projects upgraded from Dflow 0.5.0 may still
|
|
159
|
+
have old `.claude/commands/dflow/dflow-*.md` files. Dflow does not delete user
|
|
160
|
+
files automatically; remove those old wrappers manually so Claude Code does
|
|
161
|
+
not show both the old `/dflow:dflow-<id>` names and the new `/dflow:<id>`
|
|
162
|
+
names.
|
|
163
|
+
|
|
134
164
|
## Differences vs Other AI Tools
|
|
135
165
|
|
|
136
166
|
The canonical guide (`dflow/specs/shared/AI-AGENT-GUIDE.md`) is identical
|
|
@@ -140,7 +170,6 @@ across tools. Only the root-level shim differs:
|
|
|
140
170
|
|---|---|---|
|
|
141
171
|
| Claude Code | `CLAUDE.md` | `@dflow/specs/shared/AI-AGENT-GUIDE.md` Markdown import |
|
|
142
172
|
| 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
173
|
| GitHub Copilot | `.github/copilot-instructions.md` | Reads file content directly |
|
|
145
174
|
|
|
146
175
|
You can run `dflow configure-agents` later to add another tool's shim without
|
|
@@ -159,9 +188,19 @@ spec locations, or SDD constraints to `CLAUDE.md`, those belong in
|
|
|
159
188
|
that other tools' shims don't drift away from it.
|
|
160
189
|
|
|
161
190
|
**`/dflow:*` is not a Claude Code Skill installation.** `init` does not
|
|
162
|
-
install anything into Claude Code's skill system.
|
|
163
|
-
|
|
164
|
-
|
|
191
|
+
install anything into Claude Code's skill system. Without command adapters,
|
|
192
|
+
Dflow names are text triggers the AI recognizes from the workflow table. After
|
|
193
|
+
you run `dflow configure-agents --command-adapters`, the added files are thin
|
|
194
|
+
command wrappers, not a second workflow definition.
|
|
195
|
+
|
|
196
|
+
**Choose either legacy Claude skills or the installed adapter.** If the
|
|
197
|
+
project still has legacy `.claude/skills/sdd-ddd-*` skills, choose either
|
|
198
|
+
those skills or `--command-adapters`. If they must temporarily coexist, use
|
|
199
|
+
Claude Code skill override / `disable-model-invocation` settings to prevent
|
|
200
|
+
the legacy skill from auto-triggering. Otherwise the same `/dflow:*` intent
|
|
201
|
+
may trigger both the legacy skill and the installed adapter. Installed
|
|
202
|
+
adapter wrappers must stay thin pointers and should not copy workflow
|
|
203
|
+
semantics.
|
|
165
204
|
|
|
166
205
|
**Permission gates and Dflow workflow gates are separate.** Claude Code may
|
|
167
206
|
ask permission to run a tool (e.g., write a file). Dflow's workflows have
|
|
@@ -73,16 +73,18 @@ source-of-truth 檔案路徑,以及核心 SDD/DDD 規則。`CLAUDE.md` shim
|
|
|
73
73
|
|
|
74
74
|
## 在 Claude Code 中使用 Dflow Slash Commands
|
|
75
75
|
|
|
76
|
-
Dflow 的 `/dflow:*`
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
Dflow 的 canonical `/dflow:*` 名稱是跨工具共用的 workflow 詞彙;各工具的
|
|
77
|
+
`/` parser 行為不同,Claude Code 需要註冊過的 slash command 才能接受
|
|
78
|
+
`/dflow:<id>` 形式。建議先安裝下方的 command adapters,然後以 Claude Code
|
|
79
|
+
實際註冊的名稱輸入:
|
|
79
80
|
|
|
80
81
|
```text
|
|
81
82
|
/dflow:new-feature
|
|
82
83
|
```
|
|
83
84
|
|
|
84
|
-
Claude Code
|
|
85
|
-
|
|
85
|
+
安裝 adapter 後,Claude Code 會把 `.claude/commands/dflow/<id>.md` 註冊成
|
|
86
|
+
`/dflow:<id>`。Wrapper 會指回 `AI-AGENT-GUIDE.md` 中的 canonical workflow。
|
|
87
|
+
一次典型的對話如下:
|
|
86
88
|
|
|
87
89
|
```text
|
|
88
90
|
You: /dflow:new-feature
|
|
@@ -120,6 +122,31 @@ skill 檔案來執行它們。
|
|
|
120
122
|
如果你忘了指令名稱,問 Claude Code「what dflow workflows are available?」
|
|
121
123
|
即可 —— 答案會從它已載入的 workflow 表中給出。
|
|
122
124
|
|
|
125
|
+
若尚未安裝 command adapters,或 Claude Code 將 slash-prefixed 輸入判定為
|
|
126
|
+
Unknown command,請改用普通文字,例如 `dflow:new-feature` 或
|
|
127
|
+
`Run the Dflow /dflow:new-feature workflow.`,讓模型依 canonical guide 執行。
|
|
128
|
+
|
|
129
|
+
### 選配 Command Adapters
|
|
130
|
+
|
|
131
|
+
如果想讓 Claude Code 看到工具原生的命令入口,可在已初始化的專案中執行:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
dflow configure-agents --command-adapters
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
選擇 Claude Code 後,Dflow 會從 canonical guide 內的 command registry
|
|
138
|
+
投影產生薄 wrapper:
|
|
139
|
+
|
|
140
|
+
- `.claude/commands/dflow/<id>.md`
|
|
141
|
+
|
|
142
|
+
這些 wrapper 使用 Claude Code 的目錄 namespace 命名,例如
|
|
143
|
+
`/dflow:new-feature`。Wrapper 內容只指向 canonical `/dflow:new-feature`
|
|
144
|
+
workflow 與 `dflow/specs/shared/AI-AGENT-GUIDE.md`,不複製 workflow 步驟。
|
|
145
|
+
從 Dflow 0.5.0 升級的專案可能仍保留舊檔
|
|
146
|
+
`.claude/commands/dflow/dflow-*.md`;Dflow 不會擅自刪除 user 檔,請手動刪除
|
|
147
|
+
這些舊 wrapper,避免 Claude Code 同時顯示舊的 `/dflow:dflow-<id>` 與新的
|
|
148
|
+
`/dflow:<id>`。
|
|
149
|
+
|
|
123
150
|
## 與其他 AI 工具的差異
|
|
124
151
|
|
|
125
152
|
canonical 指南(`dflow/specs/shared/AI-AGENT-GUIDE.md`)在各工具之間是相同的。
|
|
@@ -129,7 +156,6 @@ canonical 指南(`dflow/specs/shared/AI-AGENT-GUIDE.md`)在各工具之間
|
|
|
129
156
|
|---|---|---|
|
|
130
157
|
| Claude Code | `CLAUDE.md` | `@dflow/specs/shared/AI-AGENT-GUIDE.md` Markdown import |
|
|
131
158
|
| Codex / Copilot coding agent | `AGENTS.md` | 啟動時直接讀取檔案內容 |
|
|
132
|
-
| Gemini CLI | `GEMINI.md` | `@dflow/specs/shared/AI-AGENT-GUIDE.md` Markdown import |
|
|
133
159
|
| GitHub Copilot | `.github/copilot-instructions.md` | 直接讀取檔案內容 |
|
|
134
160
|
|
|
135
161
|
你可以之後執行 `dflow configure-agents` 來新增另一個工具的 shim,而不需要重跑
|
|
@@ -146,9 +172,17 @@ SDD 約束加入 `CLAUDE.md`,這些內容應該放到
|
|
|
146
172
|
`dflow/specs/shared/AI-AGENT-GUIDE.md`。shim 保持精簡,其他工具的 shim 才不會
|
|
147
173
|
與它產生漂移(drift)。
|
|
148
174
|
|
|
149
|
-
**`/dflow:*` 不是安裝 Claude Code Skill。** `init` 不會在 Claude Code 的
|
|
150
|
-
|
|
151
|
-
|
|
175
|
+
**`/dflow:*` 不是安裝 Claude Code Skill。** `init` 不會在 Claude Code 的
|
|
176
|
+
skill 系統中安裝任何東西。未安裝 command adapters 時,Dflow 名稱只是 AI 從
|
|
177
|
+
workflow 表識別的文字 trigger;安裝 `dflow configure-agents --command-adapters`
|
|
178
|
+
後,新增的是薄 command wrapper,不是 workflow 的第二份定義。
|
|
179
|
+
|
|
180
|
+
**legacy Claude skill 與 installed adapter 擇一。** 如果專案仍保留舊的
|
|
181
|
+
`.claude/skills/sdd-ddd-*` skill,請在 legacy skill 與 `--command-adapters`
|
|
182
|
+
之間擇一使用。若必須暫時共存,請用 Claude Code 的 skill override /
|
|
183
|
+
`disable-model-invocation` 設定避免 legacy skill 自動觸發,否則同一個
|
|
184
|
+
`/dflow:*` 意圖可能同時觸發 legacy skill 與 installed adapter。Installed
|
|
185
|
+
adapter wrapper 必須保持薄指標,不應複製 workflow 語義。
|
|
152
186
|
|
|
153
187
|
**Permission gates 與 Dflow workflow gates 是分開的。** Claude Code 可能會詢問
|
|
154
188
|
執行某個工具的權限(例如寫入檔案)。Dflow 的 workflow 有自己的審核關卡(例如
|