dflow-sdd-ddd 0.4.0 → 0.5.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 +26 -0
- package/README.en.md +2 -4
- package/README.md +2 -4
- package/TEMPLATE-COVERAGE.md +1 -1
- package/bin/dflow.js +11 -5
- package/docs/evaluating-dflow.en.md +2 -5
- package/docs/evaluating-dflow.md +1 -3
- package/docs/migrating-to-dflow-v1.md +1 -1
- package/docs/using-with-claude-code.en.md +38 -8
- package/docs/using-with-claude-code.md +33 -7
- package/docs/using-with-codex.en.md +31 -5
- package/docs/using-with-codex.md +28 -5
- package/docs/using-with-github-copilot.en.md +29 -5
- package/docs/using-with-github-copilot.md +28 -5
- package/lib/init.js +250 -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,32 @@
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
## 0.5.0 — 2026-05-20 — Guide control commands、opt-in command adapters、移除 Gemini
|
|
10
|
+
|
|
11
|
+
**Proposals**:PROPOSAL-032(AI-AGENT-GUIDE 補 status/next/cancel 行為語義 +
|
|
12
|
+
scaffolding 單一來源化)、PROPOSAL-033(npm 版 installed 入口 + opt-in command
|
|
13
|
+
adapters)、PROPOSAL-034(移除 Gemini 支援)
|
|
14
|
+
|
|
15
|
+
**變更**:
|
|
16
|
+
|
|
17
|
+
- **`/dflow:status` / `/dflow:next` / `/dflow:cancel` 行為語義進入 canonical guide**
|
|
18
|
+
(PROPOSAL-032):四份 scaffolding `AI-AGENT-GUIDE.md`(brownfield / greenfield,
|
|
19
|
+
發佈用 templates 與 skill 副本)的 workflow 表補上這三個控制指令及其行為語義
|
|
20
|
+
(status 回報格式、next 確認語義、cancel 中止語義)。先前這些定義只存在於不被
|
|
21
|
+
npm 發佈的 `SKILL.md`,npm-installed 專案的 host AI 拿不到,導致 `/dflow:status`
|
|
22
|
+
形同失效。
|
|
23
|
+
- **`dflow configure-agents --command-adapters`**(PROPOSAL-033):新增 opt-in
|
|
24
|
+
選項,除 thin shim 外額外產生各工具原生的薄 command adapter(Claude
|
|
25
|
+
`.claude/commands/dflow/dflow-*.md`、Copilot `.github/prompts/dflow-*.prompt.md`,
|
|
26
|
+
Codex 取得 AGENTS.md command-adapters snippet),讓 `/dflow-*` 指令出現在工具
|
|
27
|
+
選單。預設不產生;canonical `/dflow:*` 名稱仍以 `AI-AGENT-GUIDE.md` 為準。
|
|
28
|
+
`docs/using-with-*` 同步更新。
|
|
29
|
+
- **移除 Gemini 支援**(PROPOSAL-034):`dflow init` / `dflow configure-agents`
|
|
30
|
+
不再提供 `GEMINI.md` 選項,並刪除 Gemini CLI per-tool docs 與 tutorial shim
|
|
31
|
+
fixture。
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
9
35
|
## 0.4.0 — 2026-05-19 — Language-agnostic templates and skill source
|
|
10
36
|
|
|
11
37
|
**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
|
|
|
@@ -208,7 +208,6 @@ files whose only job is to redirect the tool to the canonical guide):
|
|
|
208
208
|
|---|---|
|
|
209
209
|
| Codex / Copilot coding agent | `AGENTS.md` |
|
|
210
210
|
| Claude Code | `CLAUDE.md` |
|
|
211
|
-
| Gemini CLI | `GEMINI.md` |
|
|
212
211
|
| GitHub Copilot | `.github/copilot-instructions.md` |
|
|
213
212
|
|
|
214
213
|
If one of those files already exists, Dflow leaves it unchanged and writes a
|
|
@@ -225,7 +224,6 @@ workflow commands appear in a given AI tool, see the per-tool guides under
|
|
|
225
224
|
|
|
226
225
|
- [Using Dflow with Claude Code](docs/using-with-claude-code.en.md)
|
|
227
226
|
- [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
227
|
- [Using Dflow with GitHub Copilot](docs/using-with-github-copilot.en.md)
|
|
230
228
|
|
|
231
229
|
Init does not copy the `tutorial/` directory into your project. The
|
|
@@ -330,7 +328,7 @@ npm package is `0.2.0`, covering:
|
|
|
330
328
|
|
|
331
329
|
- Project initialization (`dflow init`)
|
|
332
330
|
- Workflow documentation (the `/dflow:*` flows)
|
|
333
|
-
- Multi-AI agent setup (CLAUDE.md / AGENTS.md /
|
|
331
|
+
- Multi-AI agent setup (CLAUDE.md / AGENTS.md / Copilot instructions shims)
|
|
334
332
|
- AI-agent-readable SDD/DDD guidance
|
|
335
333
|
- Public migration tooling: manual migration guide plus `dflow doctor` read-only health check
|
|
336
334
|
- 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
|
|
|
@@ -184,7 +184,6 @@ Dflow 也會為你的 AI 程式設計助理建立或提供可合併的專案指
|
|
|
184
184
|
|---|---|
|
|
185
185
|
| Codex / Copilot coding agent | `AGENTS.md` |
|
|
186
186
|
| Claude Code | `CLAUDE.md` |
|
|
187
|
-
| Gemini CLI | `GEMINI.md` |
|
|
188
187
|
| GitHub Copilot | `.github/copilot-instructions.md` |
|
|
189
188
|
|
|
190
189
|
若這些檔案已存在,Dflow 不會覆蓋,改寫 merge snippet 到 `dflow/specs/shared/`。專案指南保持單一 source of truth,團隊就能用多個 AI 工具而不必維護多份 workflow 規則。
|
|
@@ -195,7 +194,6 @@ Dflow 也會為你的 AI 程式設計助理建立或提供可合併的專案指
|
|
|
195
194
|
|
|
196
195
|
- [在 Claude Code 中使用 Dflow](docs/using-with-claude-code.md)
|
|
197
196
|
- [在 Codex CLI 中使用 Dflow](docs/using-with-codex.md)
|
|
198
|
-
- [在 Gemini CLI 中使用 Dflow](docs/using-with-gemini-cli.md)
|
|
199
197
|
- [在 GitHub Copilot 中使用 Dflow](docs/using-with-github-copilot.md)
|
|
200
198
|
|
|
201
199
|
Init 不會把 `tutorial/` 目錄複製進你的專案。[`tutorial/`](tutorial/README.md) 目錄存放在本 source repository,作為理解 Dflow 如何在 Greenfield / Brownfield 劇情中運作的評估材料。
|
|
@@ -292,7 +290,7 @@ Dflow 目前以 `dflow-sdd-ddd` 名稱發佈於 npm。最新發佈版本為 `0.2
|
|
|
292
290
|
|
|
293
291
|
- 專案初始化(`dflow init`)
|
|
294
292
|
- Workflow 文件(`/dflow:*` 流程)
|
|
295
|
-
- 多 AI agent 設定(CLAUDE.md / AGENTS.md /
|
|
293
|
+
- 多 AI agent 設定(CLAUDE.md / AGENTS.md / Copilot instructions shim)
|
|
296
294
|
- AI agent 可讀的 SDD/DDD 指引
|
|
297
295
|
- 公開 migration tooling:手動 migration guide 與 `dflow doctor` 唯讀健康檢查
|
|
298
296
|
- 公開 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
|
|
@@ -81,7 +79,6 @@ commands appear in conversation, see the per-tool guides:
|
|
|
81
79
|
|
|
82
80
|
- [Using Dflow with Claude Code](using-with-claude-code.en.md)
|
|
83
81
|
- [Using Dflow with Codex CLI](using-with-codex.en.md)
|
|
84
|
-
- [Using Dflow with Gemini CLI](using-with-gemini-cli.en.md)
|
|
85
82
|
- [Using Dflow with GitHub Copilot](using-with-github-copilot.en.md)
|
|
86
83
|
|
|
87
84
|
## Greenfield or Brownfield: Choosing a Track
|
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,7 +43,6 @@ 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`。實際意義:
|
|
@@ -58,7 +57,6 @@ Dflow 支援多種 AI 程式設計助理。跑完 `init` 後,你選取一個
|
|
|
58
57
|
|
|
59
58
|
- [在 Claude Code 中使用 Dflow](using-with-claude-code.md)
|
|
60
59
|
- [在 Codex CLI 中使用 Dflow](using-with-codex.md)
|
|
61
|
-
- [在 Gemini CLI 中使用 Dflow](using-with-gemini-cli.md)
|
|
62
60
|
- [在 GitHub Copilot 中使用 Dflow](using-with-github-copilot.md)
|
|
63
61
|
|
|
64
62
|
## Greenfield 或 Brownfield:選擇 Track
|
|
@@ -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,9 +81,9 @@ custom project instructions you already had.
|
|
|
81
81
|
|
|
82
82
|
## Using Dflow Slash Commands in Claude Code
|
|
83
83
|
|
|
84
|
-
Dflow's `/dflow:*` slash commands are workflow names
|
|
85
|
-
through the workflow table in `AI-AGENT-GUIDE.md`, not
|
|
86
|
-
built-in slash command system. You type them as plain chat:
|
|
84
|
+
By default, Dflow's canonical `/dflow:*` slash commands are workflow names
|
|
85
|
+
recognized by the AI through the workflow table in `AI-AGENT-GUIDE.md`, not
|
|
86
|
+
Claude Code's built-in slash command system. You type them as plain chat:
|
|
87
87
|
|
|
88
88
|
```text
|
|
89
89
|
/dflow:new-feature
|
|
@@ -131,6 +131,27 @@ If you forget a command name, ask Claude Code "what dflow workflows are
|
|
|
131
131
|
available?" — the answer comes from the workflow table it already has
|
|
132
132
|
loaded.
|
|
133
133
|
|
|
134
|
+
### Optional Command Adapters
|
|
135
|
+
|
|
136
|
+
If you want Claude Code to expose tool-native command entries, run this in an
|
|
137
|
+
initialized project:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
dflow configure-agents --command-adapters
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
After you select Claude Code, Dflow projects thin wrappers from the command
|
|
144
|
+
registry inside the canonical guide:
|
|
145
|
+
|
|
146
|
+
- `.claude/commands/dflow/dflow-<id>.md`
|
|
147
|
+
|
|
148
|
+
These wrappers use adapter-native names, for example `/dflow-new-feature`.
|
|
149
|
+
Their body only points to the canonical `/dflow:new-feature` workflow and
|
|
150
|
+
`dflow/specs/shared/AI-AGENT-GUIDE.md`; it does not copy workflow steps.
|
|
151
|
+
Dflow v1 does not promise that Claude Code's menu will expose the exact
|
|
152
|
+
colon form `/dflow:new-feature`. The canonical name remains in the guide and
|
|
153
|
+
wrapper body.
|
|
154
|
+
|
|
134
155
|
## Differences vs Other AI Tools
|
|
135
156
|
|
|
136
157
|
The canonical guide (`dflow/specs/shared/AI-AGENT-GUIDE.md`) is identical
|
|
@@ -140,7 +161,6 @@ across tools. Only the root-level shim differs:
|
|
|
140
161
|
|---|---|---|
|
|
141
162
|
| Claude Code | `CLAUDE.md` | `@dflow/specs/shared/AI-AGENT-GUIDE.md` Markdown import |
|
|
142
163
|
| 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
164
|
| GitHub Copilot | `.github/copilot-instructions.md` | Reads file content directly |
|
|
145
165
|
|
|
146
166
|
You can run `dflow configure-agents` later to add another tool's shim without
|
|
@@ -158,10 +178,20 @@ spec locations, or SDD constraints to `CLAUDE.md`, those belong in
|
|
|
158
178
|
`dflow/specs/shared/AI-AGENT-GUIDE.md` instead. The shim stays small so
|
|
159
179
|
that other tools' shims don't drift away from it.
|
|
160
180
|
|
|
161
|
-
|
|
162
|
-
install anything into Claude Code's skill system. The slash commands are
|
|
163
|
-
plain text patterns the AI recognizes from the workflow table.
|
|
164
|
-
|
|
181
|
+
**Default `/dflow:*` is not a Claude Code Skill installation.** `init` does
|
|
182
|
+
not install anything into Claude Code's skill system. The slash commands are
|
|
183
|
+
plain text patterns the AI recognizes from the workflow table. If you later
|
|
184
|
+
run `dflow configure-agents --command-adapters`, the added files are thin
|
|
185
|
+
command wrappers, not a second workflow definition.
|
|
186
|
+
|
|
187
|
+
**Choose either legacy Claude skills or the installed adapter.** If the
|
|
188
|
+
project still has legacy `.claude/skills/sdd-ddd-*` skills, choose either
|
|
189
|
+
those skills or `--command-adapters`. If they must temporarily coexist, use
|
|
190
|
+
Claude Code skill override / `disable-model-invocation` settings to prevent
|
|
191
|
+
the legacy skill from auto-triggering. Otherwise the same `/dflow:*` intent
|
|
192
|
+
may trigger both the legacy skill and the installed adapter. Installed
|
|
193
|
+
adapter wrappers must stay thin pointers and should not copy workflow
|
|
194
|
+
semantics.
|
|
165
195
|
|
|
166
196
|
**Permission gates and Dflow workflow gates are separate.** Claude Code may
|
|
167
197
|
ask permission to run a tool (e.g., write a file). Dflow's workflows have
|
|
@@ -73,9 +73,9 @@ source-of-truth 檔案路徑,以及核心 SDD/DDD 規則。`CLAUDE.md` shim
|
|
|
73
73
|
|
|
74
74
|
## 在 Claude Code 中使用 Dflow Slash Commands
|
|
75
75
|
|
|
76
|
-
Dflow 的 `/dflow:*` slash commands 是 AI 透過
|
|
77
|
-
workflow 表識別的 workflow 名稱,不是 Claude Code
|
|
78
|
-
|
|
76
|
+
預設情況下,Dflow 的 canonical `/dflow:*` slash commands 是 AI 透過
|
|
77
|
+
`AI-AGENT-GUIDE.md` 中的 workflow 表識別的 workflow 名稱,不是 Claude Code
|
|
78
|
+
內建的 slash command 系統。你以普通對話方式輸入它們:
|
|
79
79
|
|
|
80
80
|
```text
|
|
81
81
|
/dflow:new-feature
|
|
@@ -120,6 +120,25 @@ skill 檔案來執行它們。
|
|
|
120
120
|
如果你忘了指令名稱,問 Claude Code「what dflow workflows are available?」
|
|
121
121
|
即可 —— 答案會從它已載入的 workflow 表中給出。
|
|
122
122
|
|
|
123
|
+
### 選配 Command Adapters
|
|
124
|
+
|
|
125
|
+
如果想讓 Claude Code 看到工具原生的命令入口,可在已初始化的專案中執行:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
dflow configure-agents --command-adapters
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
選擇 Claude Code 後,Dflow 會從 canonical guide 內的 command registry
|
|
132
|
+
投影產生薄 wrapper:
|
|
133
|
+
|
|
134
|
+
- `.claude/commands/dflow/dflow-<id>.md`
|
|
135
|
+
|
|
136
|
+
這些 wrapper 使用 adapter-native 命名,例如 `/dflow-new-feature`。Wrapper
|
|
137
|
+
內容只指向 canonical `/dflow:new-feature` workflow 與
|
|
138
|
+
`dflow/specs/shared/AI-AGENT-GUIDE.md`,不複製 workflow 步驟。Dflow v1 不承諾
|
|
139
|
+
Claude Code 選單中一定會出現 exact `/dflow:new-feature` colon 形式;canonical
|
|
140
|
+
名稱仍保留在 guide 與 wrapper body 中。
|
|
141
|
+
|
|
123
142
|
## 與其他 AI 工具的差異
|
|
124
143
|
|
|
125
144
|
canonical 指南(`dflow/specs/shared/AI-AGENT-GUIDE.md`)在各工具之間是相同的。
|
|
@@ -129,7 +148,6 @@ canonical 指南(`dflow/specs/shared/AI-AGENT-GUIDE.md`)在各工具之間
|
|
|
129
148
|
|---|---|---|
|
|
130
149
|
| Claude Code | `CLAUDE.md` | `@dflow/specs/shared/AI-AGENT-GUIDE.md` Markdown import |
|
|
131
150
|
| Codex / Copilot coding agent | `AGENTS.md` | 啟動時直接讀取檔案內容 |
|
|
132
|
-
| Gemini CLI | `GEMINI.md` | `@dflow/specs/shared/AI-AGENT-GUIDE.md` Markdown import |
|
|
133
151
|
| GitHub Copilot | `.github/copilot-instructions.md` | 直接讀取檔案內容 |
|
|
134
152
|
|
|
135
153
|
你可以之後執行 `dflow configure-agents` 來新增另一個工具的 shim,而不需要重跑
|
|
@@ -146,9 +164,17 @@ SDD 約束加入 `CLAUDE.md`,這些內容應該放到
|
|
|
146
164
|
`dflow/specs/shared/AI-AGENT-GUIDE.md`。shim 保持精簡,其他工具的 shim 才不會
|
|
147
165
|
與它產生漂移(drift)。
|
|
148
166
|
|
|
149
|
-
|
|
150
|
-
系統中安裝任何東西。Slash commands 是 AI 從 workflow 表識別的純文字模式。
|
|
151
|
-
|
|
167
|
+
**預設 `/dflow:*` 不是安裝 Claude Code Skill。** `init` 不會在 Claude Code 的
|
|
168
|
+
skill 系統中安裝任何東西。Slash commands 是 AI 從 workflow 表識別的純文字模式。
|
|
169
|
+
若你之後執行 `dflow configure-agents --command-adapters`,新增的是薄 command
|
|
170
|
+
wrapper,不是 workflow 的第二份定義。
|
|
171
|
+
|
|
172
|
+
**legacy Claude skill 與 installed adapter 擇一。** 如果專案仍保留舊的
|
|
173
|
+
`.claude/skills/sdd-ddd-*` skill,請在 legacy skill 與 `--command-adapters`
|
|
174
|
+
之間擇一使用。若必須暫時共存,請用 Claude Code 的 skill override /
|
|
175
|
+
`disable-model-invocation` 設定避免 legacy skill 自動觸發,否則同一個
|
|
176
|
+
`/dflow:*` 意圖可能同時觸發 legacy skill 與 installed adapter。Installed
|
|
177
|
+
adapter wrapper 必須保持薄指標,不應複製 workflow 語義。
|
|
152
178
|
|
|
153
179
|
**Permission gates 與 Dflow workflow gates 是分開的。** Claude Code 可能會詢問
|
|
154
180
|
執行某個工具的權限(例如寫入檔案)。Dflow 的 workflow 有自己的審核關卡(例如
|
|
@@ -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
|
|
@@ -152,6 +152,26 @@ If you forget a workflow name, ask Codex to read
|
|
|
152
152
|
`dflow/specs/shared/AI-AGENT-GUIDE.md` and list the available Dflow
|
|
153
153
|
workflows.
|
|
154
154
|
|
|
155
|
+
### Codex Behavior With Optional Command Adapters
|
|
156
|
+
|
|
157
|
+
For Codex, `dflow configure-agents --command-adapters` strengthens text
|
|
158
|
+
triggers only. It does not create Codex command files and it does not add
|
|
159
|
+
`.agents/skills/dflow/SKILL.md`. Codex v1 has no Dflow command-file adapter
|
|
160
|
+
equivalent to Claude `.claude/commands` or Copilot `.github/prompts`.
|
|
161
|
+
|
|
162
|
+
When you select `AGENTS.md - Codex / Copilot coding agent` in
|
|
163
|
+
`--command-adapters` mode and Dflow can create a new `AGENTS.md` shim, the
|
|
164
|
+
shim includes a trigger list generated from the canonical command registry.
|
|
165
|
+
Those triggers are still plain text prompts, for example:
|
|
166
|
+
|
|
167
|
+
```text
|
|
168
|
+
Run the Dflow /dflow:new-feature workflow.
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
If the project already has a custom `AGENTS.md`, Dflow still preserves that
|
|
172
|
+
file; merge the Dflow pointer manually from the generated snippet or the
|
|
173
|
+
documentation guidance.
|
|
174
|
+
|
|
155
175
|
## Differences vs Other AI Tools
|
|
156
176
|
|
|
157
177
|
The canonical guide (`dflow/specs/shared/AI-AGENT-GUIDE.md`) is identical
|
|
@@ -161,12 +181,13 @@ across tools. Only the root-level shim differs:
|
|
|
161
181
|
|---|---|---|
|
|
162
182
|
| Claude Code | `CLAUDE.md` | `@dflow/specs/shared/AI-AGENT-GUIDE.md` Markdown import |
|
|
163
183
|
| 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
184
|
| GitHub Copilot | `.github/copilot-instructions.md` | Reads repository instructions directly |
|
|
166
185
|
|
|
167
186
|
You can run `dflow configure-agents` later to add another tool's shim
|
|
168
|
-
without re-running `init`.
|
|
169
|
-
|
|
187
|
+
without re-running `init`. If you need tool-native wrappers for Claude or
|
|
188
|
+
Copilot, opt in with `dflow configure-agents --command-adapters`. Codex
|
|
189
|
+
remains text-trigger-only in that mode. Multiple tools can be active in the
|
|
190
|
+
same project and stay synchronized via the canonical guide.
|
|
170
191
|
|
|
171
192
|
Codex also has its own project-instruction layering. It can read global
|
|
172
193
|
instructions from Codex home and project instructions from `AGENTS.md` files
|
|
@@ -196,6 +217,11 @@ chat instructions when raw slash input is intercepted or rejected. Raw
|
|
|
196
217
|
`/dflow:*` passthrough behavior should be verified with the maintainer for
|
|
197
218
|
the supported Codex version.
|
|
198
219
|
|
|
220
|
+
**Codex does not generate command files.** Even with `--command-adapters`,
|
|
221
|
+
Codex only strengthens text-trigger guidance in `AGENTS.md` / merge
|
|
222
|
+
snippets. Do not expect Codex-specific files under `.claude/commands`,
|
|
223
|
+
`.github/prompts`, or `.agents/skills/dflow/SKILL.md`.
|
|
224
|
+
|
|
199
225
|
**Do not confuse Codex `/init` with Dflow `init`.** Codex `/init` creates a
|
|
200
226
|
generic `AGENTS.md` scaffold for Codex. Dflow setup is `dflow init` (or
|
|
201
227
|
`npx dflow-sdd-ddd init` on the no-install path), and adding later tool shims
|
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,7 +67,7 @@ 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` 會在
|
|
@@ -139,6 +139,24 @@ finish-feature 漂移(drift)檢查。確切的流程取決於你進入的是
|
|
|
139
139
|
如果你忘了 workflow 名稱,請 Codex 讀取 `dflow/specs/shared/AI-AGENT-GUIDE.md`
|
|
140
140
|
並列出可用的 Dflow workflow 即可。
|
|
141
141
|
|
|
142
|
+
### 選配 Command Adapters 的 Codex 行為
|
|
143
|
+
|
|
144
|
+
`dflow configure-agents --command-adapters` 對 Codex 採文字 trigger 強化,不會建立
|
|
145
|
+
Codex 命令檔,也不會新增 `.agents/skills/dflow/SKILL.md`。Codex v1 沒有與
|
|
146
|
+
Claude `.claude/commands` 或 Copilot `.github/prompts` 對等的 Dflow command-file
|
|
147
|
+
adapter。
|
|
148
|
+
|
|
149
|
+
當你在 `--command-adapters` 模式下選擇 `AGENTS.md - Codex / Copilot coding agent`
|
|
150
|
+
且 Dflow 可以建立新的 `AGENTS.md` shim 時,shim 會加入從 canonical command
|
|
151
|
+
registry 產生的 trigger 清單。這些 trigger 仍是文字提示,例如:
|
|
152
|
+
|
|
153
|
+
```text
|
|
154
|
+
Run the Dflow /dflow:new-feature workflow.
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
如果專案已有自訂 `AGENTS.md`,Dflow 仍會保留既有檔案;請依產生的 merge snippet
|
|
158
|
+
或文件指引手動合併 Dflow 指標。
|
|
159
|
+
|
|
142
160
|
## 與其他 AI 工具的差異
|
|
143
161
|
|
|
144
162
|
canonical 指南(`dflow/specs/shared/AI-AGENT-GUIDE.md`)在各工具之間是相同的。
|
|
@@ -148,11 +166,12 @@ canonical 指南(`dflow/specs/shared/AI-AGENT-GUIDE.md`)在各工具之間
|
|
|
148
166
|
|---|---|---|
|
|
149
167
|
| Claude Code | `CLAUDE.md` | `@dflow/specs/shared/AI-AGENT-GUIDE.md` Markdown import |
|
|
150
168
|
| Codex / Copilot coding agent | `AGENTS.md` | 專案指示載入 shim;Codex 須跟著指標讀取指南 |
|
|
151
|
-
| Gemini CLI | `GEMINI.md` | `@dflow/specs/shared/AI-AGENT-GUIDE.md` Markdown import |
|
|
152
169
|
| GitHub Copilot | `.github/copilot-instructions.md` | 直接讀取 repository 指示 |
|
|
153
170
|
|
|
154
171
|
你可以之後執行 `dflow configure-agents` 來新增另一個工具的 shim,而不需要重跑
|
|
155
|
-
`init
|
|
172
|
+
`init`。若需要 Claude / Copilot 的工具原生命令 wrapper,可 opt in
|
|
173
|
+
`dflow configure-agents --command-adapters`。Codex 在此模式下仍是文字 trigger
|
|
174
|
+
only。同一個專案可以同時啟用多個工具,並透過 canonical 指南保持同步。
|
|
156
175
|
|
|
157
176
|
Codex 也有自己的專案指示分層機制。它可以從 Codex home 讀取全域指示、
|
|
158
177
|
從專案根目錄到當前工作目錄之間的 `AGENTS.md` 檔案讀取專案指示。
|
|
@@ -179,6 +198,10 @@ SDD 約束加入 `AGENTS.md`,這些內容應該放到
|
|
|
179
198
|
輸入 Dflow workflow 名稱。`/dflow:*` 的直通行為需依所用的 Codex 版本向
|
|
180
199
|
maintainer 確認。
|
|
181
200
|
|
|
201
|
+
**Codex 不產生命令檔。** 即使使用 `--command-adapters`,Codex 也只強化
|
|
202
|
+
`AGENTS.md` / merge snippet 中的文字 trigger 說明。不要期待 `.claude/commands`、
|
|
203
|
+
`.github/prompts` 或 `.agents/skills/dflow/SKILL.md` 形式的 Codex 專屬命令檔。
|
|
204
|
+
|
|
182
205
|
**不要混淆 Codex `/init` 與 Dflow `init`。** Codex `/init` 為 Codex 建立
|
|
183
206
|
通用的 `AGENTS.md` scaffold。Dflow 的設定是 `dflow init`(或免安裝路徑的
|
|
184
207
|
`npx dflow-sdd-ddd init`),之後新增工具 shim 則是 `dflow configure-agents`。
|
|
@@ -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,28 @@ 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 adapter-native names, for example `/dflow-new-feature` or
|
|
80
|
+
the matching IDE Quick Pick prompt name. Their body only points to the
|
|
81
|
+
canonical `/dflow:new-feature` workflow and
|
|
82
|
+
`dflow/specs/shared/AI-AGENT-GUIDE.md`; it does not copy workflow steps.
|
|
83
|
+
Dflow v1 does not promise that Copilot chat supports the exact colon form
|
|
84
|
+
`/dflow:new-feature`. The canonical name remains in the guide and prompt
|
|
85
|
+
body.
|
|
86
|
+
|
|
63
87
|
### Sample Conversation Flow
|
|
64
88
|
|
|
65
89
|
A typical Copilot Chat workflow looks like this:
|
|
@@ -107,13 +131,12 @@ The canonical guide (`dflow/specs/shared/AI-AGENT-GUIDE.md`) is the same across
|
|
|
107
131
|
|---|---|---|
|
|
108
132
|
| GitHub Copilot | `.github/copilot-instructions.md` | Reads repository instructions directly |
|
|
109
133
|
| 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
134
|
| Codex / Copilot coding agent | `AGENTS.md` | Reads file content directly when starting |
|
|
112
135
|
|
|
113
136
|
- 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
|
|
137
|
+
- 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
138
|
- 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: With CLI agents you may type `/dflow:*` to the agent process; with Copilot prefer plain-chat phrasing in the Copilot Chat or editor comments.
|
|
139
|
+
- Workflow invocation: With CLI agents you may type `/dflow:*` to the agent process; with Copilot prefer plain-chat phrasing in the Copilot Chat or editor comments by default. If you opt in to `--command-adapters`, use adapter-native prompt names such as `/dflow-new-feature`.
|
|
117
140
|
- 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
141
|
|
|
119
142
|
## Common Patterns and Gotchas
|
|
@@ -123,6 +146,7 @@ The canonical guide (`dflow/specs/shared/AI-AGENT-GUIDE.md`) is the same across
|
|
|
123
146
|
- Copilot's inline completions may suggest code without following Dflow workflows; explicitly request the workflow when you need spec-driven output.
|
|
124
147
|
- 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
148
|
- Use plain prose to name workflows when slash-prefixed forms are rejected by the IDE.
|
|
149
|
+
- Prompt adapters are thin wrappers generated from the canonical command registry; do not hand-write or copy Dflow workflow steps under `.github/prompts/`.
|
|
126
150
|
|
|
127
151
|
## Where to Go Next
|
|
128
152
|
|
|
@@ -133,4 +157,4 @@ The canonical guide (`dflow/specs/shared/AI-AGENT-GUIDE.md`) is the same across
|
|
|
133
157
|
|
|
134
158
|
---
|
|
135
159
|
|
|
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.
|
|
160
|
+
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 使用 adapter-native 命名,例如 `/dflow-new-feature` 或 IDE 的
|
|
88
|
+
Quick Pick prompt 名稱。Prompt 內容只指向 canonical `/dflow:new-feature`
|
|
89
|
+
workflow 與 `dflow/specs/shared/AI-AGENT-GUIDE.md`,不複製 workflow 步驟。
|
|
90
|
+
Dflow v1 不承諾 Copilot chat 一定支援 exact `/dflow:new-feature` colon 形式;
|
|
91
|
+
canonical 名稱仍保留在 guide 與 prompt body 中。
|
|
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
155
|
- Workflow 呼叫:使用 CLI agent 時可對 agent process 輸入 `/dflow:*`;使用
|
|
137
|
-
Copilot
|
|
156
|
+
Copilot 時,預設建議在 Copilot Chat 或 editor comment 中使用普通文字描述。
|
|
157
|
+
若已 opt in `--command-adapters`,則使用 adapter-native prompt 名稱,例如
|
|
158
|
+
`/dflow-new-feature`。
|
|
138
159
|
- Permission 模型:Copilot 依賴 IDE 的 permission 與 extension sandbox。它可能
|
|
139
160
|
受 editor-level approvals 管理;CLI 工具通常有明確的 sandbox flags 與獨立的
|
|
140
161
|
permission gates。
|
|
@@ -150,6 +171,8 @@ canonical 指南(`dflow/specs/shared/AI-AGENT-GUIDE.md`)在各工具之間
|
|
|
150
171
|
- Copilot Chat context 不一定會在所有 IDE 版本中自動包含 `.github/` 目錄下的
|
|
151
172
|
repository 指示檔;行為因 Copilot / IDE 版本而異(見頁尾說明)。
|
|
152
173
|
- 當 slash-prefixed forms 被 IDE 拒絕時,改用普通文字描述 workflow 名稱。
|
|
174
|
+
- Prompt adapter 是從 canonical command registry 產生的薄 wrapper;不要在
|
|
175
|
+
`.github/prompts/` 中手寫或複製 Dflow workflow 步驟。
|
|
153
176
|
|
|
154
177
|
## 下一步
|
|
155
178
|
|