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
|
@@ -62,7 +62,7 @@ Two things matter when Codex starts in this project:
|
|
|
62
62
|
1. Codex CLI reads `AGENTS.md` as project instructions. This is Codex's
|
|
63
63
|
standard repository-instruction mechanism.
|
|
64
64
|
2. The Dflow shim does not include a Markdown import line. Unlike the
|
|
65
|
-
Claude Code
|
|
65
|
+
Claude Code shim, generated `AGENTS.md` does not contain
|
|
66
66
|
`@dflow/specs/shared/AI-AGENT-GUIDE.md`.
|
|
67
67
|
|
|
68
68
|
That means Codex sees the pointer immediately, but the canonical Dflow guide
|
|
@@ -76,7 +76,7 @@ The canonical guide is where the real workflow rules live: project context
|
|
|
76
76
|
(track, tech stack, prose language), the Dflow workflow table,
|
|
77
77
|
source-of-truth file paths, and core SDD/DDD rules. The `AGENTS.md` shim
|
|
78
78
|
stays small so the same canonical guide can serve Codex CLI, Claude Code,
|
|
79
|
-
|
|
79
|
+
GitHub Copilot, and other tools.
|
|
80
80
|
|
|
81
81
|
If an `AGENTS.md` already existed in the project, `init` does not overwrite
|
|
82
82
|
it. If the existing file does not already point to
|
|
@@ -84,40 +84,41 @@ it. If the existing file does not already point to
|
|
|
84
84
|
`dflow/specs/shared/AGENTS-md-snippet.md` that you can merge manually. This
|
|
85
85
|
avoids destroying custom project instructions you already had.
|
|
86
86
|
|
|
87
|
+
In the `dflow configure-agents --command-adapters` case, the corresponding
|
|
88
|
+
snippet path is `dflow/specs/shared/AGENTS-md-command-adapters-snippet.md`.
|
|
89
|
+
|
|
87
90
|
## Using Dflow Workflow Commands in Codex CLI
|
|
88
91
|
|
|
89
92
|
Codex CLI has its own built-in slash command layer for controlling the CLI
|
|
90
93
|
session. Commands such as `/permissions`, `/model`, `/status`, `/diff`,
|
|
91
94
|
`/review`, and `/init` are Codex CLI controls, not Dflow workflows.
|
|
92
95
|
|
|
93
|
-
Dflow's `/dflow:*` entries are workflow names recognized by the AI
|
|
94
|
-
`AI-AGENT-GUIDE.md`, not registered Codex CLI commands.
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
name the workflow as a plain chat instruction:
|
|
96
|
+
Dflow's canonical `/dflow:*` entries are workflow names recognized by the AI
|
|
97
|
+
through `AI-AGENT-GUIDE.md`, not registered Codex CLI commands. Codex handles
|
|
98
|
+
the leading `/` first, so the reliable form is to remove the leading slash and
|
|
99
|
+
send the same name as plain text:
|
|
98
100
|
|
|
99
101
|
```text
|
|
100
|
-
|
|
102
|
+
dflow:new-feature
|
|
101
103
|
```
|
|
102
104
|
|
|
103
|
-
|
|
104
|
-
model, this shorter form may also work (verify with maintainer):
|
|
105
|
+
Or use a plain chat instruction:
|
|
105
106
|
|
|
106
107
|
```text
|
|
107
|
-
|
|
108
|
+
Run the Dflow dflow:new-feature workflow.
|
|
108
109
|
```
|
|
109
110
|
|
|
110
|
-
If Codex reports an unknown slash command, re-send
|
|
111
|
+
If Codex reports an unknown slash command, re-send it without the slash:
|
|
111
112
|
|
|
112
113
|
```text
|
|
113
|
-
Treat
|
|
114
|
-
|
|
114
|
+
Treat dflow:new-feature as the canonical /dflow:new-feature Dflow workflow
|
|
115
|
+
name. Read dflow/specs/shared/AI-AGENT-GUIDE.md and start that workflow.
|
|
115
116
|
```
|
|
116
117
|
|
|
117
118
|
A typical conversation looks like:
|
|
118
119
|
|
|
119
120
|
```text
|
|
120
|
-
You:
|
|
121
|
+
You: dflow:new-feature
|
|
121
122
|
|
|
122
123
|
Codex CLI: I'll read dflow/specs/shared/AI-AGENT-GUIDE.md first, then use the
|
|
123
124
|
new-feature workflow. Please describe the user-visible capability or business
|
|
@@ -132,26 +133,50 @@ dflow/specs/features/active/. Before I do, I have a few clarifying questions.
|
|
|
132
133
|
|
|
133
134
|
The workflow then walks you through spec drafting, behavior examples,
|
|
134
135
|
implementation planning, and finish-feature drift checks. The exact
|
|
135
|
-
sequence depends on which workflow you entered (
|
|
136
|
-
|
|
136
|
+
sequence depends on which workflow you entered (`dflow:new-feature`,
|
|
137
|
+
`dflow:modify-existing`, `dflow:bug-fix`, etc.; the canonical guide records
|
|
138
|
+
these as `/dflow:*`).
|
|
137
139
|
|
|
138
140
|
Available workflow entry points:
|
|
139
141
|
|
|
140
|
-
|
|
|
142
|
+
| Codex input | Use when |
|
|
141
143
|
|---|---|
|
|
142
|
-
|
|
|
143
|
-
|
|
|
144
|
-
|
|
|
145
|
-
|
|
|
146
|
-
|
|
|
147
|
-
|
|
|
148
|
-
|
|
|
149
|
-
|
|
|
144
|
+
| `dflow:new-feature` | A new user-visible capability or business behavior is requested. |
|
|
145
|
+
| `dflow:modify-existing` | Existing behavior needs to change. |
|
|
146
|
+
| `dflow:bug-fix` | A defect can be described with expected vs actual behavior. |
|
|
147
|
+
| `dflow:new-phase` | An active feature needs another implementation slice. |
|
|
148
|
+
| `dflow:finish-feature` | Implementation is complete and needs drift closure. |
|
|
149
|
+
| `dflow:verify` | Specs, domain docs, implementation, and tests need consistency checks. |
|
|
150
|
+
| `dflow:pr-review` | A change is ready for SDD/DDD review. |
|
|
151
|
+
| `dflow:report-dflow-feedback` | You found a Dflow issue or improvement and want a sanitized upstream feedback draft. |
|
|
150
152
|
|
|
151
153
|
If you forget a workflow name, ask Codex to read
|
|
152
154
|
`dflow/specs/shared/AI-AGENT-GUIDE.md` and list the available Dflow
|
|
153
155
|
workflows.
|
|
154
156
|
|
|
157
|
+
### Codex Behavior With Optional Command Adapters
|
|
158
|
+
|
|
159
|
+
For Codex, `dflow configure-agents --command-adapters` strengthens text
|
|
160
|
+
triggers only. It does not create Codex command files and it does not add
|
|
161
|
+
`.agents/skills/dflow/SKILL.md`. Codex v1 has no Dflow command-file adapter
|
|
162
|
+
equivalent to Claude `.claude/commands` or Copilot `.github/prompts`.
|
|
163
|
+
|
|
164
|
+
When you select `AGENTS.md - Codex / Copilot coding agent` in
|
|
165
|
+
`--command-adapters` mode and Dflow can create a new `AGENTS.md` shim, the
|
|
166
|
+
shim includes a trigger list generated from the canonical command registry.
|
|
167
|
+
Those triggers are still plain text prompts, for example:
|
|
168
|
+
|
|
169
|
+
```text
|
|
170
|
+
dflow:new-feature
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
If the project already has a custom `AGENTS.md`, Dflow still preserves that
|
|
174
|
+
file; merge the Dflow pointer manually from the generated snippet or the
|
|
175
|
+
documentation guidance.
|
|
176
|
+
|
|
177
|
+
In this mode, the Codex-target merge snippet filename is
|
|
178
|
+
`dflow/specs/shared/AGENTS-md-command-adapters-snippet.md`.
|
|
179
|
+
|
|
155
180
|
## Differences vs Other AI Tools
|
|
156
181
|
|
|
157
182
|
The canonical guide (`dflow/specs/shared/AI-AGENT-GUIDE.md`) is identical
|
|
@@ -161,12 +186,13 @@ across tools. Only the root-level shim differs:
|
|
|
161
186
|
|---|---|---|
|
|
162
187
|
| Claude Code | `CLAUDE.md` | `@dflow/specs/shared/AI-AGENT-GUIDE.md` Markdown import |
|
|
163
188
|
| Codex / Copilot coding agent | `AGENTS.md` | Project instructions load the shim; Codex must follow the pointer and read the guide |
|
|
164
|
-
| Gemini CLI | `GEMINI.md` | `@dflow/specs/shared/AI-AGENT-GUIDE.md` Markdown import |
|
|
165
189
|
| GitHub Copilot | `.github/copilot-instructions.md` | Reads repository instructions directly |
|
|
166
190
|
|
|
167
191
|
You can run `dflow configure-agents` later to add another tool's shim
|
|
168
|
-
without re-running `init`.
|
|
169
|
-
|
|
192
|
+
without re-running `init`. If you need tool-native wrappers for Claude or
|
|
193
|
+
Copilot, opt in with `dflow configure-agents --command-adapters`. Codex
|
|
194
|
+
remains text-trigger-only in that mode. Multiple tools can be active in the
|
|
195
|
+
same project and stay synchronized via the canonical guide.
|
|
170
196
|
|
|
171
197
|
Codex also has its own project-instruction layering. It can read global
|
|
172
198
|
instructions from Codex home and project instructions from `AGENTS.md` files
|
|
@@ -190,11 +216,16 @@ Codex shim has a normal Markdown bullet pointing to the canonical guide, not
|
|
|
190
216
|
an `@...` import. Ask Codex to read `AI-AGENT-GUIDE.md` if it appears to be
|
|
191
217
|
working from the shim alone.
|
|
192
218
|
|
|
193
|
-
**`/dflow:*` is not a Codex CLI built-in slash command.** Codex slash
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
219
|
+
**`/dflow:*` is not a Codex CLI built-in slash command.** Codex slash commands
|
|
220
|
+
control the Codex session itself. When raw slash input is intercepted or
|
|
221
|
+
rejected, use the no-slash text form `dflow:<id>`, for example
|
|
222
|
+
`dflow:status`. The model should treat it as the canonical `/dflow:<id>`
|
|
223
|
+
workflow by reading `AI-AGENT-GUIDE.md`.
|
|
224
|
+
|
|
225
|
+
**Codex does not generate command files.** Even with `--command-adapters`,
|
|
226
|
+
Codex only strengthens text-trigger guidance in `AGENTS.md` / merge
|
|
227
|
+
snippets. Do not expect Codex-specific files under `.claude/commands`,
|
|
228
|
+
`.github/prompts`, or `.agents/skills/dflow/SKILL.md`.
|
|
198
229
|
|
|
199
230
|
**Do not confuse Codex `/init` with Dflow `init`.** Codex `/init` creates a
|
|
200
231
|
generic `AGENTS.md` scaffold for Codex. Dflow setup is `dflow init` (or
|
package/docs/using-with-codex.md
CHANGED
|
@@ -56,8 +56,8 @@ Codex 在這個專案中啟動時,有兩件事值得注意:
|
|
|
56
56
|
|
|
57
57
|
1. Codex CLI 將 `AGENTS.md` 作為專案指示讀取。這是 Codex 的
|
|
58
58
|
標準 repository 指示機制。
|
|
59
|
-
2. Dflow shim 不含 Markdown import 那一行。與 Claude Code
|
|
60
|
-
|
|
59
|
+
2. Dflow shim 不含 Markdown import 那一行。與 Claude Code 的 shim 不同,
|
|
60
|
+
產生的 `AGENTS.md` 不含 `@dflow/specs/shared/AI-AGENT-GUIDE.md`。
|
|
61
61
|
|
|
62
62
|
這意味著 Codex 能立即看到指標,但 canonical Dflow 指南不會由 shim 自動 inline 嵌入。
|
|
63
63
|
在規劃或編輯之前,Codex 應跟著指標讀取 `dflow/specs/shared/AI-AGENT-GUIDE.md`。
|
|
@@ -67,46 +67,47 @@ read and follow `dflow/specs/shared/AI-AGENT-GUIDE.md`.」
|
|
|
67
67
|
canonical 指南是實際 workflow 規則的所在:專案上下文(track、技術棧、
|
|
68
68
|
文章語言)、Dflow workflow 表、source-of-truth 檔案路徑,以及核心 SDD/DDD 規則。
|
|
69
69
|
`AGENTS.md` shim 刻意保持精簡,這樣 canonical 指南就能同時服務 Codex CLI、
|
|
70
|
-
Claude Code、
|
|
70
|
+
Claude Code、GitHub Copilot 與其他工具。
|
|
71
71
|
|
|
72
72
|
如果專案中已有 `AGENTS.md`,`init` 不會覆蓋它。若既有檔案尚未指向
|
|
73
73
|
`dflow/specs/shared/AI-AGENT-GUIDE.md`,`init` 會在
|
|
74
74
|
`dflow/specs/shared/AGENTS-md-snippet.md` 下寫入 merge snippet,
|
|
75
75
|
讓你手動合併。這樣可以避免破壞你已有的自訂專案指示。
|
|
76
76
|
|
|
77
|
+
若是 `dflow configure-agents --command-adapters` 情境,對應檔名為
|
|
78
|
+
`dflow/specs/shared/AGENTS-md-command-adapters-snippet.md`。
|
|
79
|
+
|
|
77
80
|
## 在 Codex CLI 中使用 Dflow Workflow 指令
|
|
78
81
|
|
|
79
82
|
Codex CLI 有自己的內建 slash command 層,用來控制 CLI session。
|
|
80
83
|
`/permissions`、`/model`、`/status`、`/diff`、`/review`、`/init` 等指令
|
|
81
84
|
都是 Codex CLI 控制項,不是 Dflow workflow。
|
|
82
85
|
|
|
83
|
-
Dflow 的 `/dflow:*` 項目是 AI 透過 `AI-AGENT-GUIDE.md` 識別的
|
|
84
|
-
名稱,不是已註冊的 Codex CLI
|
|
85
|
-
|
|
86
|
-
最可靠的方式是以普通對話指示輸入 workflow 名稱:
|
|
86
|
+
Dflow 的 canonical `/dflow:*` 項目是 AI 透過 `AI-AGENT-GUIDE.md` 識別的
|
|
87
|
+
workflow 名稱,不是已註冊的 Codex CLI 指令。Codex 會先處理 `/` 前綴,因此
|
|
88
|
+
最可靠的方式是移除開頭斜線,把同一個名稱當普通文字輸入:
|
|
87
89
|
|
|
88
90
|
```text
|
|
89
|
-
|
|
91
|
+
dflow:new-feature
|
|
90
92
|
```
|
|
91
93
|
|
|
92
|
-
|
|
93
|
-
較短形式(請先向 maintainer 確認):
|
|
94
|
+
或用一句普通對話指示:
|
|
94
95
|
|
|
95
96
|
```text
|
|
96
|
-
|
|
97
|
+
Run the Dflow dflow:new-feature workflow.
|
|
97
98
|
```
|
|
98
99
|
|
|
99
|
-
若 Codex 回報未知 slash command
|
|
100
|
+
若 Codex 回報未知 slash command,改以不帶斜線的純文字重新送出:
|
|
100
101
|
|
|
101
102
|
```text
|
|
102
|
-
Treat
|
|
103
|
-
|
|
103
|
+
Treat dflow:new-feature as the canonical /dflow:new-feature Dflow workflow
|
|
104
|
+
name. Read dflow/specs/shared/AI-AGENT-GUIDE.md and start that workflow.
|
|
104
105
|
```
|
|
105
106
|
|
|
106
107
|
典型的對話如下:
|
|
107
108
|
|
|
108
109
|
```text
|
|
109
|
-
You:
|
|
110
|
+
You: dflow:new-feature
|
|
110
111
|
|
|
111
112
|
Codex CLI: I'll read dflow/specs/shared/AI-AGENT-GUIDE.md first, then use the
|
|
112
113
|
new-feature workflow. Please describe the user-visible capability or business
|
|
@@ -121,24 +122,46 @@ dflow/specs/features/active/. Before I do, I have a few clarifying questions.
|
|
|
121
122
|
|
|
122
123
|
接著這個 workflow 會引導你完成 spec 起草、行為範例、實作計畫,以及
|
|
123
124
|
finish-feature 漂移(drift)檢查。確切的流程取決於你進入的是哪個 workflow
|
|
124
|
-
|
|
125
|
+
(`dflow:new-feature`、`dflow:modify-existing`、`dflow:bug-fix` 等;canonical
|
|
126
|
+
guide 中記為 `/dflow:*`)。
|
|
125
127
|
|
|
126
128
|
可用的 workflow 入口:
|
|
127
129
|
|
|
128
|
-
|
|
|
130
|
+
| Codex 輸入 | 適用情境 |
|
|
129
131
|
|---|---|
|
|
130
|
-
|
|
|
131
|
-
|
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
|
|
|
135
|
-
|
|
|
136
|
-
|
|
|
137
|
-
|
|
|
132
|
+
| `dflow:new-feature` | 需要新增一個使用者可見的功能或業務行為。 |
|
|
133
|
+
| `dflow:modify-existing` | 需要修改現有行為。 |
|
|
134
|
+
| `dflow:bug-fix` | 可以用預期行為 vs 實際行為描述的缺陷。 |
|
|
135
|
+
| `dflow:new-phase` | 進行中的 feature 需要另一個實作 slice。 |
|
|
136
|
+
| `dflow:finish-feature` | 實作完成後需要進行漂移(drift)收尾。 |
|
|
137
|
+
| `dflow:verify` | 需要對 spec、領域文件、實作與測試進行一致性檢查。 |
|
|
138
|
+
| `dflow:pr-review` | 變更已準備好進行 SDD/DDD review。 |
|
|
139
|
+
| `dflow:report-dflow-feedback` | 你發現了 Dflow 的問題或改進點,想要一份清理過的上游回饋草稿。 |
|
|
138
140
|
|
|
139
141
|
如果你忘了 workflow 名稱,請 Codex 讀取 `dflow/specs/shared/AI-AGENT-GUIDE.md`
|
|
140
142
|
並列出可用的 Dflow workflow 即可。
|
|
141
143
|
|
|
144
|
+
### 選配 Command Adapters 的 Codex 行為
|
|
145
|
+
|
|
146
|
+
`dflow configure-agents --command-adapters` 對 Codex 採文字 trigger 強化,不會建立
|
|
147
|
+
Codex 命令檔,也不會新增 `.agents/skills/dflow/SKILL.md`。Codex v1 沒有與
|
|
148
|
+
Claude `.claude/commands` 或 Copilot `.github/prompts` 對等的 Dflow command-file
|
|
149
|
+
adapter。
|
|
150
|
+
|
|
151
|
+
當你在 `--command-adapters` 模式下選擇 `AGENTS.md - Codex / Copilot coding agent`
|
|
152
|
+
且 Dflow 可以建立新的 `AGENTS.md` shim 時,shim 會加入從 canonical command
|
|
153
|
+
registry 產生的 trigger 清單。這些 trigger 仍是文字提示,例如:
|
|
154
|
+
|
|
155
|
+
```text
|
|
156
|
+
dflow:new-feature
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
如果專案已有自訂 `AGENTS.md`,Dflow 仍會保留既有檔案;請依產生的 merge snippet
|
|
160
|
+
或文件指引手動合併 Dflow 指標。
|
|
161
|
+
|
|
162
|
+
在這個模式下,Codex 目標的 merge snippet 檔名是
|
|
163
|
+
`dflow/specs/shared/AGENTS-md-command-adapters-snippet.md`。
|
|
164
|
+
|
|
142
165
|
## 與其他 AI 工具的差異
|
|
143
166
|
|
|
144
167
|
canonical 指南(`dflow/specs/shared/AI-AGENT-GUIDE.md`)在各工具之間是相同的。
|
|
@@ -148,11 +171,12 @@ canonical 指南(`dflow/specs/shared/AI-AGENT-GUIDE.md`)在各工具之間
|
|
|
148
171
|
|---|---|---|
|
|
149
172
|
| Claude Code | `CLAUDE.md` | `@dflow/specs/shared/AI-AGENT-GUIDE.md` Markdown import |
|
|
150
173
|
| Codex / Copilot coding agent | `AGENTS.md` | 專案指示載入 shim;Codex 須跟著指標讀取指南 |
|
|
151
|
-
| Gemini CLI | `GEMINI.md` | `@dflow/specs/shared/AI-AGENT-GUIDE.md` Markdown import |
|
|
152
174
|
| GitHub Copilot | `.github/copilot-instructions.md` | 直接讀取 repository 指示 |
|
|
153
175
|
|
|
154
176
|
你可以之後執行 `dflow configure-agents` 來新增另一個工具的 shim,而不需要重跑
|
|
155
|
-
`init
|
|
177
|
+
`init`。若需要 Claude / Copilot 的工具原生命令 wrapper,可 opt in
|
|
178
|
+
`dflow configure-agents --command-adapters`。Codex 在此模式下仍是文字 trigger
|
|
179
|
+
only。同一個專案可以同時啟用多個工具,並透過 canonical 指南保持同步。
|
|
156
180
|
|
|
157
181
|
Codex 也有自己的專案指示分層機制。它可以從 Codex home 讀取全域指示、
|
|
158
182
|
從專案根目錄到當前工作目錄之間的 `AGENTS.md` 檔案讀取專案指示。
|
|
@@ -175,9 +199,13 @@ SDD 約束加入 `AGENTS.md`,這些內容應該放到
|
|
|
175
199
|
若 Codex 看起來只從 shim 工作,請要求它讀取 `AI-AGENT-GUIDE.md`。
|
|
176
200
|
|
|
177
201
|
**`/dflow:*` 不是 Codex CLI 的內建 slash command。** Codex slash command 控制
|
|
178
|
-
的是 Codex session 本身。當 slash
|
|
179
|
-
|
|
180
|
-
|
|
202
|
+
的是 Codex session 本身。當 slash 輸入被攔截或拒絕時,改用不帶斜線的普通文字
|
|
203
|
+
`dflow:<id>`,例如 `dflow:status`。模型會依 `AI-AGENT-GUIDE.md` 把它視為
|
|
204
|
+
canonical `/dflow:<id>` workflow。
|
|
205
|
+
|
|
206
|
+
**Codex 不產生命令檔。** 即使使用 `--command-adapters`,Codex 也只強化
|
|
207
|
+
`AGENTS.md` / merge snippet 中的文字 trigger 說明。不要期待 `.claude/commands`、
|
|
208
|
+
`.github/prompts` 或 `.agents/skills/dflow/SKILL.md` 形式的 Codex 專屬命令檔。
|
|
181
209
|
|
|
182
210
|
**不要混淆 Codex `/init` 與 Dflow `init`。** Codex `/init` 為 Codex 建立
|
|
183
211
|
通用的 `AGENTS.md` scaffold。Dflow 的設定是 `dflow init`(或免安裝路徑的
|
|
@@ -42,7 +42,9 @@ Key points:
|
|
|
42
42
|
|
|
43
43
|
## Using Dflow Workflow Commands with GitHub Copilot
|
|
44
44
|
|
|
45
|
-
Copilot is an IDE-first assistant (chat panel + inline
|
|
45
|
+
By default, Copilot is an IDE-first assistant (chat panel + inline
|
|
46
|
+
completions), not a CLI tool. Treat Dflow workflow names as plain chat
|
|
47
|
+
instructions rather than CLI slash commands:
|
|
46
48
|
|
|
47
49
|
- In the Copilot Chat: "Run the Dflow /dflow:new-feature workflow" — Copilot should read the canonical guide and proceed.
|
|
48
50
|
- In code comments or editor chat, describe the workflow as plain text: `Run the Dflow /dflow:new-feature workflow.`
|
|
@@ -60,6 +62,27 @@ Available workflow entry points:
|
|
|
60
62
|
| `/dflow:pr-review` | A change is ready for SDD/DDD review. |
|
|
61
63
|
| `/dflow:report-dflow-feedback` | You found a Dflow issue or improvement and want a sanitized upstream feedback draft. |
|
|
62
64
|
|
|
65
|
+
### Optional Prompt Adapters
|
|
66
|
+
|
|
67
|
+
If you want tool-native entries in a Copilot / VS Code environment that
|
|
68
|
+
supports prompt files, run this in an initialized project:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
dflow configure-agents --command-adapters
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
After you select GitHub Copilot, Dflow projects thin prompt wrappers from the
|
|
75
|
+
command registry inside the canonical guide:
|
|
76
|
+
|
|
77
|
+
- `.github/prompts/dflow-<id>.prompt.md`
|
|
78
|
+
|
|
79
|
+
These prompts use `/dflow-<id>` in the Copilot / VS Code prompt menu, for
|
|
80
|
+
example `/dflow-new-feature`. Their body only points to the canonical
|
|
81
|
+
`/dflow:new-feature` workflow and `dflow/specs/shared/AI-AGENT-GUIDE.md`; it
|
|
82
|
+
does not copy workflow steps. Copilot's `/` parser behavior differs from
|
|
83
|
+
Claude and Codex: the prompt menu entry is `/dflow-<id>`, while chat text may
|
|
84
|
+
still name the canonical `/dflow:<id>` workflow.
|
|
85
|
+
|
|
63
86
|
### Sample Conversation Flow
|
|
64
87
|
|
|
65
88
|
A typical Copilot Chat workflow looks like this:
|
|
@@ -107,13 +130,12 @@ The canonical guide (`dflow/specs/shared/AI-AGENT-GUIDE.md`) is the same across
|
|
|
107
130
|
|---|---|---|
|
|
108
131
|
| GitHub Copilot | `.github/copilot-instructions.md` | Reads repository instructions directly |
|
|
109
132
|
| Claude Code | `CLAUDE.md` | `@dflow/specs/shared/AI-AGENT-GUIDE.md` Markdown import |
|
|
110
|
-
| Gemini CLI | `GEMINI.md` | `@dflow/specs/shared/AI-AGENT-GUIDE.md` Markdown import |
|
|
111
133
|
| Codex / Copilot coding agent | `AGENTS.md` | Reads file content directly when starting |
|
|
112
134
|
|
|
113
135
|
- Shim path: Copilot uses `.github/copilot-instructions.md` (not `AGENTS.md` or `CLAUDE.md`).
|
|
114
|
-
- Markdown import: Copilot shim has NO `@dflow/specs/shared/AI-AGENT-GUIDE.md` import. This contrasts with Claude
|
|
136
|
+
- Markdown import: Copilot shim has NO `@dflow/specs/shared/AI-AGENT-GUIDE.md` import. This contrasts with the Claude Code shim, which inlines via an `@` import.
|
|
115
137
|
- Tool model: Copilot is IDE-based (chat panel + inline completions); Codex/Claude Code are CLI-based agents. Copilot interacts through the editor UI rather than a command-line session.
|
|
116
|
-
- Workflow invocation:
|
|
138
|
+
- Workflow invocation: canonical `/dflow:*` is shared vocabulary, but each tool's `/` parser behaves differently. In Copilot chat text, name `/dflow:<id>`; if you opt in to `--command-adapters`, the VS Code prompt menu name is `/dflow-<id>`, such as `/dflow-new-feature`.
|
|
117
139
|
- Permission model: Copilot relies on the IDE's permission and extension sandbox. It may prompt for or be governed by editor-level approvals; CLI tools often have explicit sandbox flags and separate permission gates.
|
|
118
140
|
|
|
119
141
|
## Common Patterns and Gotchas
|
|
@@ -122,7 +144,8 @@ The canonical guide (`dflow/specs/shared/AI-AGENT-GUIDE.md`) is the same across
|
|
|
122
144
|
- If Copilot appears to be working only from the shim text, ask it to open or read `dflow/specs/shared/AI-AGENT-GUIDE.md` before continuing.
|
|
123
145
|
- Copilot's inline completions may suggest code without following Dflow workflows; explicitly request the workflow when you need spec-driven output.
|
|
124
146
|
- Copilot chat context may not automatically include repository instruction files from `.github/` in all IDE versions; behavior varies by Copilot / IDE version (see footer note).
|
|
125
|
-
- Use plain prose to name
|
|
147
|
+
- Use plain prose to name the canonical `/dflow:<id>` workflow when slash-prefixed forms are rejected by the IDE.
|
|
148
|
+
- Prompt adapters are thin wrappers generated from the canonical command registry; do not hand-write or copy Dflow workflow steps under `.github/prompts/`.
|
|
126
149
|
|
|
127
150
|
## Where to Go Next
|
|
128
151
|
|
|
@@ -133,4 +156,4 @@ The canonical guide (`dflow/specs/shared/AI-AGENT-GUIDE.md`) is the same across
|
|
|
133
156
|
|
|
134
157
|
---
|
|
135
158
|
|
|
136
|
-
Note on IDE behavior: Slash-command passthrough and automatic inclusion of `.github/` instruction files vary by Copilot / IDE version. Confirm with a maintainer before relying on exact semantics.
|
|
159
|
+
Note on IDE behavior: Slash-command passthrough and automatic inclusion of `.github/` instruction files vary by Copilot / IDE version. Confirm with a maintainer before relying on exact semantics.
|
|
@@ -49,8 +49,8 @@ Before planning or editing code, read and follow:
|
|
|
49
49
|
|
|
50
50
|
## 在 GitHub Copilot 中使用 Dflow Workflow 指令
|
|
51
51
|
|
|
52
|
-
Copilot 是 IDE 優先的助理(chat panel + inline completions),不是
|
|
53
|
-
|
|
52
|
+
預設情況下,Copilot 是 IDE 優先的助理(chat panel + inline completions),不是
|
|
53
|
+
CLI 工具。請把 Dflow workflow 名稱當成普通的對話指示,而非 CLI slash command:
|
|
54
54
|
|
|
55
55
|
- 在 Copilot Chat 中:「Run the Dflow /dflow:new-feature workflow」—— Copilot
|
|
56
56
|
應讀取 canonical 指南並繼續執行。
|
|
@@ -70,6 +70,26 @@ Copilot 是 IDE 優先的助理(chat panel + inline completions),不是 CL
|
|
|
70
70
|
| `/dflow:pr-review` | 變更已準備好進行 SDD/DDD review。 |
|
|
71
71
|
| `/dflow:report-dflow-feedback` | 你發現了 Dflow 的問題或改進點,想要一份清理過的上游回饋草稿。 |
|
|
72
72
|
|
|
73
|
+
### 選配 Prompt Adapters
|
|
74
|
+
|
|
75
|
+
如果想在支援 prompt files 的 Copilot / VS Code 環境中使用工具原生入口,可在
|
|
76
|
+
已初始化的專案中執行:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
dflow configure-agents --command-adapters
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
選擇 GitHub Copilot 後,Dflow 會從 canonical guide 內的 command registry
|
|
83
|
+
投影產生薄 prompt wrapper:
|
|
84
|
+
|
|
85
|
+
- `.github/prompts/dflow-<id>.prompt.md`
|
|
86
|
+
|
|
87
|
+
這些 prompt 在 Copilot / VS Code prompt 選單中使用 `/dflow-<id>` 形式,例如
|
|
88
|
+
`/dflow-new-feature`。Prompt 內容只指向 canonical `/dflow:new-feature`
|
|
89
|
+
workflow 與 `dflow/specs/shared/AI-AGENT-GUIDE.md`,不複製 workflow 步驟。
|
|
90
|
+
Copilot 的 `/` parser 行為與 Claude / Codex 不同:選單入口是 `/dflow-<id>`,
|
|
91
|
+
但在 chat 文字中也可以直接說 canonical `/dflow:<id>`。
|
|
92
|
+
|
|
73
93
|
### 對話範例
|
|
74
94
|
|
|
75
95
|
典型的 Copilot Chat workflow 如下:
|
|
@@ -123,18 +143,19 @@ canonical 指南(`dflow/specs/shared/AI-AGENT-GUIDE.md`)在各工具之間
|
|
|
123
143
|
|---|---|---|
|
|
124
144
|
| GitHub Copilot | `.github/copilot-instructions.md` | 直接讀取 repository 指示 |
|
|
125
145
|
| Claude Code | `CLAUDE.md` | `@dflow/specs/shared/AI-AGENT-GUIDE.md` Markdown import |
|
|
126
|
-
| Gemini CLI | `GEMINI.md` | `@dflow/specs/shared/AI-AGENT-GUIDE.md` Markdown import |
|
|
127
146
|
| Codex / Copilot coding agent | `AGENTS.md` | 啟動時直接讀取檔案內容 |
|
|
128
147
|
|
|
129
148
|
- Shim 路徑:Copilot 使用 `.github/copilot-instructions.md`(不是 `AGENTS.md`
|
|
130
149
|
或 `CLAUDE.md`)。
|
|
131
150
|
- Markdown import:Copilot shim 不含 `@dflow/specs/shared/AI-AGENT-GUIDE.md`
|
|
132
|
-
import。這點與 Claude Code
|
|
151
|
+
import。這點與 Claude Code 的 shim 透過 `@` import inline 嵌入不同。
|
|
133
152
|
- 工具模型:Copilot 是 IDE-based(chat panel + inline completions);
|
|
134
153
|
Codex / Claude Code 是 CLI-based agent。Copilot 透過編輯器 UI 互動,而非
|
|
135
154
|
command-line session。
|
|
136
|
-
- Workflow
|
|
137
|
-
Copilot
|
|
155
|
+
- Workflow 呼叫:canonical `/dflow:*` 是共同詞彙,但各工具 `/` parser 行為不同。
|
|
156
|
+
Copilot 可在 chat 文字中使用 `/dflow:<id>`,若已 opt in
|
|
157
|
+
`--command-adapters`,VS Code prompt 選單名則是 `/dflow-<id>`,例如
|
|
158
|
+
`/dflow-new-feature`。
|
|
138
159
|
- Permission 模型:Copilot 依賴 IDE 的 permission 與 extension sandbox。它可能
|
|
139
160
|
受 editor-level approvals 管理;CLI 工具通常有明確的 sandbox flags 與獨立的
|
|
140
161
|
permission gates。
|
|
@@ -149,7 +170,10 @@ canonical 指南(`dflow/specs/shared/AI-AGENT-GUIDE.md`)在各工具之間
|
|
|
149
170
|
需要 spec-driven 輸出時,請明確要求執行 workflow。
|
|
150
171
|
- Copilot Chat context 不一定會在所有 IDE 版本中自動包含 `.github/` 目錄下的
|
|
151
172
|
repository 指示檔;行為因 Copilot / IDE 版本而異(見頁尾說明)。
|
|
152
|
-
- 當 slash-prefixed forms 被 IDE 拒絕時,改用普通文字描述
|
|
173
|
+
- 當 slash-prefixed forms 被 IDE 拒絕時,改用普通文字描述 canonical
|
|
174
|
+
`/dflow:<id>` workflow 名稱。
|
|
175
|
+
- Prompt adapter 是從 canonical command registry 產生的薄 wrapper;不要在
|
|
176
|
+
`.github/prompts/` 中手寫或複製 Dflow workflow 步驟。
|
|
153
177
|
|
|
154
178
|
## 下一步
|
|
155
179
|
|