dflow-sdd-ddd 0.5.0 → 0.7.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 +68 -0
- package/README.en.md +53 -4
- package/README.md +31 -3
- package/bin/dflow.js +7 -3
- package/docs/evaluating-dflow.en.md +12 -6
- package/docs/evaluating-dflow.md +7 -3
- package/docs/npm-publish-checklist.md +8 -0
- package/docs/using-with-claude-code.en.md +125 -17
- package/docs/using-with-claude-code.md +101 -15
- package/docs/using-with-codex.en.md +49 -30
- package/docs/using-with-codex.md +41 -26
- package/docs/using-with-github-copilot.en.md +44 -9
- package/docs/using-with-github-copilot.md +35 -8
- package/lib/init.js +242 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,74 @@
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
## 0.7.0 — 2026-05-22 — Opt-in Claude skill adapter、自動清理舊 command adapter、發布前 lifecycle 機檢
|
|
10
|
+
|
|
11
|
+
**Proposals**:PROPOSAL-037(generated adapter commit 政策與升級流程)、PROPOSAL-038(選配 skill adapter)、PROPOSAL-035(lifecycle drift forcing-functions)
|
|
12
|
+
|
|
13
|
+
**新功能**:
|
|
14
|
+
|
|
15
|
+
- **`dflow configure-agents --skills`**(PROPOSAL-038):在已初始化的專案投影一個
|
|
16
|
+
edition-neutral 的「thin」skill 到 `.claude/skills/dflow/SKILL.md`,指向專案內既有
|
|
17
|
+
guide(不打包 SKILL.md 模板)。auto-trigger 描述刻意收窄,採 suggest-and-wait
|
|
18
|
+
契約;wrapper 帶 `<!-- dflow-generated: skill-adapter -->` 供覆寫保護。`--skills`
|
|
19
|
+
在未鎖定 Claude 時 warn 並 no-op。Claude skill 與 command adapter(`dflow:<id>`)
|
|
20
|
+
名稱不衝突,可共存(已於 real Claude Code 實測)。Codex 維持 AGENTS.md 文字觸發,
|
|
21
|
+
不提供 user-level skill。
|
|
22
|
+
|
|
23
|
+
**行為改善**:
|
|
24
|
+
|
|
25
|
+
- **`init` 自動移除前一版 stale command adapter**(PROPOSAL-037 Segment B):透過既有
|
|
26
|
+
plan / preview / confirm pipeline,依明確的 `LEGACY_COMMAND_ADAPTERS` 表(目前僅
|
|
27
|
+
v0.5.0)與 CRLF-normalized 精確指紋比對,apply 時再次 re-check;對使用者改過或
|
|
28
|
+
非 Dflow 產生的檔案 warn-but-keep,絕不使用 glob。**這把 0.6.0 需手動刪除舊
|
|
29
|
+
`.claude/commands/dflow/dflow-*.md` 的遷移步驟自動化了**。新生成的 wrapper 帶
|
|
30
|
+
`<!-- dflow-generated: command-adapter -->`。
|
|
31
|
+
|
|
32
|
+
**文件**:
|
|
33
|
+
|
|
34
|
+
- **generated adapter 的版控政策**(PROPOSAL-037 Segment A):README(zh + en)與各工具
|
|
35
|
+
guide 補上建議預設(gitignore + 重新生成)與「追蹤 adapter」的替代做法、條件式
|
|
36
|
+
`.gitignore` 片段與 glob 注意事項、`git rm --cached` 指引,並區分 adapter-refresh
|
|
37
|
+
與 canonical-guide-migration、加入 CLI 版本 pinning 說明。
|
|
38
|
+
|
|
39
|
+
**維護者工具**(不影響套件使用者):
|
|
40
|
+
|
|
41
|
+
- **lifecycle drift 機檢**(PROPOSAL-035):新增 `scripts/check-lifecycle.mjs`(dev-only,
|
|
42
|
+
不隨套件發布),硬斷言「`proposals/` 內無 terminal-status proposal」與「`archive/proposals/`
|
|
43
|
+
內皆為 terminal status」,並對引用已歸檔 proposal 的 active handoff 發出 warning;
|
|
44
|
+
接入 CI 與 npm 發布前 checklist。
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## 0.6.0 — 2026-05-21 — Command-adapter 命名修正
|
|
49
|
+
|
|
50
|
+
**Proposals**:PROPOSAL-036(修正 command-adapter 命名 + 各工具叫用現實對齊)
|
|
51
|
+
|
|
52
|
+
**變更**:
|
|
53
|
+
|
|
54
|
+
- **修正 opt-in command adapter 命名 bug**(PROPOSAL-036):0.5.0 的
|
|
55
|
+
`dflow configure-agents --command-adapters` 在 Claude 產生
|
|
56
|
+
`.claude/commands/dflow/dflow-<id>.md`;因 Claude Code 把子目錄 `dflow/`
|
|
57
|
+
當 namespace、再加上檔名的 `dflow-` 前綴,註冊出的指令名變成重複的
|
|
58
|
+
`/dflow:dflow-<id>`。改為產生 `.claude/commands/dflow/<id>.md`,指令名
|
|
59
|
+
回正為 `/dflow:<id>`。
|
|
60
|
+
- **各工具叫用方式對齊實測現實**:command adapter wrapper 與
|
|
61
|
+
`configure-agents` next-steps 文字改為說明三工具實際叫用名 —— Claude Code
|
|
62
|
+
`/dflow:<id>`、GitHub Copilot 選單 `/dflow-<id>`(或 canonical `/dflow:<id>`
|
|
63
|
+
純文字)、Codex CLI 不帶斜線的純文字(如 `dflow:status`)。Codex AGENTS.md
|
|
64
|
+
command-adapters snippet 補上「CLI 攔截斜線指令時改送不帶斜線文字」的指引。
|
|
65
|
+
`README` / `docs/using-with-*` / `docs/evaluating-dflow` / `tutorial`
|
|
66
|
+
同步更新。
|
|
67
|
+
|
|
68
|
+
**⚠️ Breaking change / 遷移**:
|
|
69
|
+
|
|
70
|
+
- 生成路徑重新命名。**從 0.5.0 升級、且曾跑過 `configure-agents
|
|
71
|
+
--command-adapters` 的專案**,須手動刪除舊的
|
|
72
|
+
`.claude/commands/dflow/dflow-*.md`,否則 Claude Code 會同時顯示新舊兩組
|
|
73
|
+
指令名。未使用 command adapters 的專案不受影響。
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
9
77
|
## 0.5.0 — 2026-05-20 — Guide control commands、opt-in command adapters、移除 Gemini
|
|
10
78
|
|
|
11
79
|
**Proposals**:PROPOSAL-032(AI-AGENT-GUIDE 補 status/next/cancel 行為語義 +
|
package/README.en.md
CHANGED
|
@@ -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
|
|
@@ -216,7 +234,38 @@ single source of truth, so teams can use multiple AI tools without maintaining
|
|
|
216
234
|
multiple copies of the workflow rules.
|
|
217
235
|
|
|
218
236
|
You can run `dflow configure-agents` later to add more tool shims as the team
|
|
219
|
-
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`.
|
|
239
|
+
|
|
240
|
+
### Version-Control Policy for Generated Artifacts (recommended default)
|
|
241
|
+
|
|
242
|
+
The command / prompt wrappers produced by `dflow configure-agents
|
|
243
|
+
--command-adapters` are **generated artifacts** projected from the canonical
|
|
244
|
+
guide. Dflow's **recommended default** is to treat them as regenerable output:
|
|
245
|
+
version-control the source, not the generated artifacts.
|
|
246
|
+
|
|
247
|
+
| File | Role | Recommended default |
|
|
248
|
+
|---|---|---|
|
|
249
|
+
| `dflow/` (canonical guide, specs, merge snippet) | source | **version-control** |
|
|
250
|
+
| Thin shims (`CLAUDE.md` / `AGENTS.md` / `.github/copilot-instructions.md`) | source | **version-control** |
|
|
251
|
+
| `.claude/commands/dflow/`, `.github/prompts/dflow-*.prompt.md` | generated | **recommended: do not version-control (gitignore)**; regenerate after clone with `configure-agents --command-adapters` |
|
|
252
|
+
|
|
253
|
+
This is a **recommendation**, not the only valid policy. If your team wants a
|
|
254
|
+
native `/` menu immediately after clone, or your CI / dev environment does not
|
|
255
|
+
install npm, **version-controlling the adapters** is a reasonable choice — the
|
|
256
|
+
trade-off is that when an upgrade renames commands you must re-project and
|
|
257
|
+
commit the removal of the old files. The key rule: **use one consistent policy
|
|
258
|
+
across all tools in a project**, rather than ignoring adapters for one tool and
|
|
259
|
+
tracking them for another.
|
|
260
|
+
|
|
261
|
+
After upgrading Dflow, re-running `dflow configure-agents --command-adapters`
|
|
262
|
+
re-projects adapters from the **new command registry**, but it does **not**
|
|
263
|
+
overwrite an existing `dflow/specs/shared/AI-AGENT-GUIDE.md` (an existing
|
|
264
|
+
canonical guide is kept). "Re-projecting adapters" and "migrating the canonical
|
|
265
|
+
guide" are two different things; re-project with the **same dflow CLI version**
|
|
266
|
+
to avoid a registry / guide version mismatch. Per-tool `.gitignore` snippets,
|
|
267
|
+
glob side effects, the `git rm --cached` switch-over step, and upgrade details
|
|
268
|
+
are covered in the per-tool guides.
|
|
220
269
|
|
|
221
270
|
For tool-specific walk-throughs of what `init` writes and how Dflow's
|
|
222
271
|
workflow commands appear in a given AI tool, see the per-tool guides under
|
package/README.md
CHANGED
|
@@ -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
|
|
|
@@ -188,7 +202,21 @@ Dflow 也會為你的 AI 程式設計助理建立或提供可合併的專案指
|
|
|
188
202
|
|
|
189
203
|
若這些檔案已存在,Dflow 不會覆蓋,改寫 merge snippet 到 `dflow/specs/shared/`。專案指南保持單一 source of truth,團隊就能用多個 AI 工具而不必維護多份 workflow 規則。
|
|
190
204
|
|
|
191
|
-
之後團隊採用新 AI 程式設計助理時,可隨時跑 `dflow configure-agents` 新增 shim
|
|
205
|
+
之後團隊採用新 AI 程式設計助理時,可隨時跑 `dflow configure-agents` 新增 shim;若需要 Claude / Copilot 的工具原生命令入口,改用 `dflow configure-agents --command-adapters`。
|
|
206
|
+
|
|
207
|
+
### 產生物的版控政策(建議預設)
|
|
208
|
+
|
|
209
|
+
`dflow configure-agents --command-adapters` 產生的命令 / prompt wrapper 是從 canonical guide 投影出來的**衍生物(generated artifact)**。Dflow 的**建議預設**是把它們當成可重生成的產物:版控 source、不版控衍生物。
|
|
210
|
+
|
|
211
|
+
| 檔案 | 角色 | 建議預設 |
|
|
212
|
+
|---|---|---|
|
|
213
|
+
| `dflow/`(canonical guide、規格、merge snippet) | source | **版控** |
|
|
214
|
+
| 薄 shim(`CLAUDE.md` / `AGENTS.md` / `.github/copilot-instructions.md`) | source | **版控** |
|
|
215
|
+
| `.claude/commands/dflow/`、`.github/prompts/dflow-*.prompt.md` | 衍生物 | **建議不版控(gitignore)**,clone 後重跑 `configure-agents --command-adapters` 重生成 |
|
|
216
|
+
|
|
217
|
+
這是**建議**,不是唯一正解。若團隊希望 clone 後立即有原生 `/` 選單、或 CI / 開發環境不裝 npm,**版控 adapter** 也是合理選擇——代價是升級若改了命名,要重投影並 commit 刪除舊檔。關鍵原則:**同一專案對所有工具採一致策略**,別像常見的踩雷一樣一邊 ignore、一邊版控。
|
|
218
|
+
|
|
219
|
+
升級 dflow 後重跑 `dflow configure-agents --command-adapters`,adapter 會用**新版的 command registry** 重投影;但**不會**覆寫已存在的 `dflow/specs/shared/AI-AGENT-GUIDE.md`(canonical guide 已存在則保留)。「重投影 adapter」與「升級 canonical guide」是兩件事;升級時請用**相同的 dflow CLI 版本**重投影,避免 registry 與 guide 版本錯位。各工具的 `.gitignore` 片段、glob 副作用、`git rm --cached` 切換步驟與升級細節見 per-tool 指南。
|
|
192
220
|
|
|
193
221
|
特定工具的 init 寫入內容與 Dflow workflow 命令呈現方式,見 `docs/` 內的 per-tool 指南:
|
|
194
222
|
|
package/bin/dflow.js
CHANGED
|
@@ -29,7 +29,7 @@ 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 [--command-adapters]
|
|
32
|
+
dflow configure-agents [--command-adapters] [--skills]
|
|
33
33
|
|
|
34
34
|
Adds AI agent instruction files to an existing Dflow project.
|
|
35
35
|
The command can create AGENTS.md, CLAUDE.md, and
|
|
@@ -38,6 +38,7 @@ dflow/specs/shared/AI-AGENT-GUIDE.md file.
|
|
|
38
38
|
|
|
39
39
|
Options:
|
|
40
40
|
--command-adapters Also generate tool-native thin wrappers for supported tools.
|
|
41
|
+
--skills Also generate a supported tool's skill adapter (currently Claude Code project skill, restores natural-language auto-trigger).
|
|
41
42
|
`);
|
|
42
43
|
}
|
|
43
44
|
|
|
@@ -95,7 +96,9 @@ async function main() {
|
|
|
95
96
|
}
|
|
96
97
|
|
|
97
98
|
const configureOptions = args.slice(1);
|
|
98
|
-
const unsupportedConfigureOptions = configureOptions.filter(
|
|
99
|
+
const unsupportedConfigureOptions = configureOptions.filter(
|
|
100
|
+
(arg) => arg !== '--command-adapters' && arg !== '--skills'
|
|
101
|
+
);
|
|
99
102
|
if (unsupportedConfigureOptions.length > 0) {
|
|
100
103
|
process.stderr.write(`Unsupported configure-agents option: ${unsupportedConfigureOptions.join(' ')}\n`);
|
|
101
104
|
return 1;
|
|
@@ -106,7 +109,8 @@ async function main() {
|
|
|
106
109
|
stdin: process.stdin,
|
|
107
110
|
stdout: process.stdout,
|
|
108
111
|
stderr: process.stderr,
|
|
109
|
-
commandAdapters: configureOptions.includes('--command-adapters')
|
|
112
|
+
commandAdapters: configureOptions.includes('--command-adapters'),
|
|
113
|
+
skills: configureOptions.includes('--skills')
|
|
110
114
|
});
|
|
111
115
|
}
|
|
112
116
|
|
|
@@ -64,13 +64,17 @@ Each shim points back to the canonical
|
|
|
64
64
|
|
|
65
65
|
- Multiple tools can be active in the same project without diverging
|
|
66
66
|
workflow rules.
|
|
67
|
-
- Switching or adding tools later does not require re-running `init`;
|
|
68
|
-
|
|
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.
|
|
69
71
|
- The project guide stays the single source of truth for Dflow workflow
|
|
70
72
|
behavior.
|
|
71
73
|
|
|
72
|
-
|
|
73
|
-
|
|
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
|
|
74
78
|
Markdown-based workflow material; it works with any AI agent that can read
|
|
75
79
|
project instructions and repository context.
|
|
76
80
|
|
|
@@ -144,8 +148,10 @@ real codebase.
|
|
|
144
148
|
- Brownfield: [`tutorial/02-brownfield/`](../tutorial/02-brownfield/walkthrough-00-setup.md)
|
|
145
149
|
|
|
146
150
|
5. **Optional: try one workflow command**. Open the sample project in your
|
|
147
|
-
AI tool and ask it to run
|
|
148
|
-
|
|
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/`.
|
|
149
155
|
|
|
150
156
|
6. **Decide and clean up**. If Dflow does not fit, delete the sample
|
|
151
157
|
directory. There is no global state to clean; nothing was installed
|
package/docs/evaluating-dflow.md
CHANGED
|
@@ -48,10 +48,14 @@ Dflow 支援多種 AI 程式設計助理。跑完 `init` 後,你選取一個
|
|
|
48
48
|
每個 shim 都指向 canonical 的 `dflow/specs/shared/AI-AGENT-GUIDE.md`。實際意義:
|
|
49
49
|
|
|
50
50
|
- 同一個專案可以同時啟用多個工具,而不會有 workflow 規則分歧。
|
|
51
|
-
- 之後切換或新增工具不需要重跑 `init`;執行 `dflow configure-agents` 即可新增 shim
|
|
51
|
+
- 之後切換或新增工具不需要重跑 `init`;執行 `dflow configure-agents` 即可新增 shim,或用 `dflow configure-agents --command-adapters` opt in 工具原生命令入口。
|
|
52
52
|
- 專案指南始終保持為 Dflow workflow 行為的單一 source of truth。
|
|
53
53
|
|
|
54
|
-
|
|
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 助理一起運作。
|
|
55
59
|
|
|
56
60
|
關於特定工具的 `init` 寫入內容與 slash command 在對話中的呈現方式,見各工具指南:
|
|
57
61
|
|
|
@@ -111,7 +115,7 @@ Dflow 支援多種 AI 程式設計助理。跑完 `init` 後,你選取一個
|
|
|
111
115
|
- Greenfield:[`tutorial/01-greenfield/`](../tutorial/01-greenfield/walkthrough-00-setup.md)
|
|
112
116
|
- Brownfield:[`tutorial/02-brownfield/`](../tutorial/02-brownfield/walkthrough-00-setup.md)
|
|
113
117
|
|
|
114
|
-
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/` 的內容。
|
|
115
119
|
|
|
116
120
|
6. **決定並清理**。若 Dflow 不適合,直接刪除範例目錄。沒有全域狀態需要清除;除了一次性的 `npx` 快取,什麼也沒有安裝。
|
|
117
121
|
|
|
@@ -13,6 +13,14 @@ Replace `<version>` with the version being published, for example `0.1.2`.
|
|
|
13
13
|
- [ ] Confirm `README.md` installation instructions match the release.
|
|
14
14
|
- [ ] Confirm Greenfield and Brownfield common flow changes are synchronized.
|
|
15
15
|
- [ ] Confirm generated templates match skill source where applicable.
|
|
16
|
+
- [ ] Run the lifecycle check in the development repo and confirm it is green,
|
|
17
|
+
so every proposal this release covers is terminal (`implemented` /
|
|
18
|
+
`rejected` / `superseded`) and already archived:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
node scripts/check-lifecycle.mjs
|
|
22
|
+
```
|
|
23
|
+
|
|
16
24
|
- [ ] Run:
|
|
17
25
|
|
|
18
26
|
```bash
|
|
@@ -81,17 +81,19 @@ custom project instructions you already had.
|
|
|
81
81
|
|
|
82
82
|
## Using Dflow Slash Commands in Claude Code
|
|
83
83
|
|
|
84
|
-
|
|
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,11 @@ 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
|
+
|
|
134
141
|
### Optional Command Adapters
|
|
135
142
|
|
|
136
143
|
If you want Claude Code to expose tool-native command entries, run this in an
|
|
@@ -143,14 +150,115 @@ dflow configure-agents --command-adapters
|
|
|
143
150
|
After you select Claude Code, Dflow projects thin wrappers from the command
|
|
144
151
|
registry inside the canonical guide:
|
|
145
152
|
|
|
146
|
-
- `.claude/commands/dflow
|
|
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, which make Claude Code show
|
|
160
|
+
both the old `/dflow:dflow-<id>` names and the new `/dflow:<id>` names. When you
|
|
161
|
+
re-run `dflow configure-agents --command-adapters`, Dflow **automatically
|
|
162
|
+
detects and removes** these 0.5.0-generated stale wrappers: the files to remove
|
|
163
|
+
are listed in the confirmation preview (marked `remove`) and deleted only after
|
|
164
|
+
you confirm. Dflow removes only files whose content **exactly matches** the
|
|
165
|
+
0.5.0 generated output; if you have edited the file, or it is one you placed in
|
|
166
|
+
the same namespace yourself, Dflow leaves it in place and prints a warning so
|
|
167
|
+
you can review it manually.
|
|
168
|
+
|
|
169
|
+
### Version Control and Upgrades for Generated Adapters
|
|
170
|
+
|
|
171
|
+
`.claude/commands/dflow/<id>.md` is a **generated artifact** projected from the
|
|
172
|
+
canonical guide. Dflow's **recommended default** is to not version-control it
|
|
173
|
+
and regenerate it after clone with `dflow configure-agents --command-adapters`;
|
|
174
|
+
teams that want a native command menu immediately after clone may instead
|
|
175
|
+
**version-control** it. Use one consistent policy across all tools in a project
|
|
176
|
+
(see the policy overview and ignore-vs-track trade-off in
|
|
177
|
+
[README "Files Created by Init"](../README.en.md#files-created-by-init)).
|
|
178
|
+
|
|
179
|
+
When using the gitignore default, add this to the project `.gitignore` (**only
|
|
180
|
+
if you reserve the `.claude/commands/dflow/` namespace for Dflow**):
|
|
181
|
+
|
|
182
|
+
```gitignore
|
|
183
|
+
.claude/commands/dflow/
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Note: this rule also ignores any custom commands you place in the same
|
|
187
|
+
directory. If the directory is **already version-controlled**, adding the
|
|
188
|
+
ignore rule does not remove it from version control automatically; first run:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
git rm --cached -r .claude/commands/dflow/
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
(`--cached` removes it from version control while keeping the working-tree
|
|
195
|
+
files.)
|
|
196
|
+
|
|
197
|
+
After upgrading Dflow, re-running `dflow configure-agents --command-adapters`
|
|
198
|
+
re-projects adapters from the **new registry**, but an existing
|
|
199
|
+
`dflow/specs/shared/AI-AGENT-GUIDE.md` is **not** overwritten — "re-projecting
|
|
200
|
+
adapters" is not the same as "migrating the canonical guide." Re-project with
|
|
201
|
+
the **same dflow CLI version** to avoid a registry / guide version mismatch.
|
|
202
|
+
|
|
203
|
+
### Optional Skill Adapter (Restore Natural-Language Auto-Trigger)
|
|
204
|
+
|
|
205
|
+
Command adapters give you a `/` menu entry, but they **do not auto-trigger** —
|
|
206
|
+
you have to invoke the command yourself. If you want to restore the "say 'I want
|
|
207
|
+
to add a feature' and it shows up automatically" experience, run this in an
|
|
208
|
+
initialized project:
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
dflow configure-agents --skills
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
After you select Claude Code, Dflow generates a thin skill:
|
|
147
215
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
216
|
+
- `.claude/skills/dflow/SKILL.md`
|
|
217
|
+
|
|
218
|
+
This skill does not copy workflow steps; its body only points to the canonical
|
|
219
|
+
`dflow/specs/shared/AI-AGENT-GUIDE.md`, which carries the real workflow content.
|
|
220
|
+
Its behavior:
|
|
221
|
+
|
|
222
|
+
- **Auto-triggers on** feature / bug-fix workflows, product/domain behavior
|
|
223
|
+
changes, new requirements, and spec-impacting architecture / domain-model
|
|
224
|
+
decisions.
|
|
225
|
+
- **Does not trigger on** pure refactors, infrastructure chores, formatting, or
|
|
226
|
+
general code questions.
|
|
227
|
+
- When engaged by natural language it **does not enter a workflow directly**: it
|
|
228
|
+
judges the intent, **suggests the matching `/dflow:` command, and waits for
|
|
229
|
+
your confirmation** before proceeding.
|
|
230
|
+
|
|
231
|
+
**The four combinations** (command adapters and the skill are each independently
|
|
232
|
+
opt-in):
|
|
233
|
+
|
|
234
|
+
| Installed | Entry behavior |
|
|
235
|
+
|---|---|
|
|
236
|
+
| Neither | Root shim only (CLAUDE.md points to the guide); no `/` menu, no auto-trigger |
|
|
237
|
+
| Command adapters only | `/dflow:*` appears in the `/` menu; no natural-language auto-trigger |
|
|
238
|
+
| Skill only | Natural-language auto-trigger (suggest-and-wait); no `/` menu |
|
|
239
|
+
| Both | `/` menu + natural-language safety net **may coexist** |
|
|
240
|
+
|
|
241
|
+
**Both may coexist with no mutex needed** (validated in a real Claude Code
|
|
242
|
+
environment): the skill name `dflow` does not collide with the command adapters'
|
|
243
|
+
`dflow:<id>` names, explicit commands load their own adapter precisely with no
|
|
244
|
+
double-fire; the skill acts as a natural-language safety net while command
|
|
245
|
+
adapters provide the `/` menu.
|
|
246
|
+
|
|
247
|
+
After installing, verify with `/skills` or by asking "What skills are
|
|
248
|
+
available?". Note: adding a new top-level skills directory may require
|
|
249
|
+
**restarting Claude Code** before it is watched. Also, a personal / enterprise
|
|
250
|
+
skill at `~/.claude/skills/dflow` can **override** the project skill (per the
|
|
251
|
+
Claude docs); use `/skills` to check which one is active.
|
|
252
|
+
|
|
253
|
+
**Version-control policy**: `.claude/skills/dflow/SKILL.md` is a **generated
|
|
254
|
+
artifact**, just like the command adapters, and follows the same default — do
|
|
255
|
+
not version-control it and regenerate it after clone with
|
|
256
|
+
`dflow configure-agents --skills` (`.claude/skills/dflow/` is already in the
|
|
257
|
+
recommended gitignore set); clone-ready teams may version-control it instead.
|
|
258
|
+
Re-running `--skills` is idempotent: an existing marker-stamped skill is
|
|
259
|
+
rewritten cleanly. If `.claude/skills/dflow/SKILL.md` is **not** Dflow-generated
|
|
260
|
+
(no `<!-- dflow-generated: skill-adapter -->` marker), Dflow leaves it unchanged
|
|
261
|
+
and prints a warning asking you to remove or rename it.
|
|
154
262
|
|
|
155
263
|
## Differences vs Other AI Tools
|
|
156
264
|
|
|
@@ -178,10 +286,10 @@ spec locations, or SDD constraints to `CLAUDE.md`, those belong in
|
|
|
178
286
|
`dflow/specs/shared/AI-AGENT-GUIDE.md` instead. The shim stays small so
|
|
179
287
|
that other tools' shims don't drift away from it.
|
|
180
288
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
run `dflow configure-agents --command-adapters`, the added files are thin
|
|
289
|
+
**`/dflow:*` is not a Claude Code Skill installation.** `init` does not
|
|
290
|
+
install anything into Claude Code's skill system. Without command adapters,
|
|
291
|
+
Dflow names are text triggers the AI recognizes from the workflow table. After
|
|
292
|
+
you run `dflow configure-agents --command-adapters`, the added files are thin
|
|
185
293
|
command wrappers, not a second workflow definition.
|
|
186
294
|
|
|
187
295
|
**Choose either legacy Claude skills or the installed adapter.** If the
|