dflow-sdd-ddd 0.8.0 → 0.10.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 +100 -0
- package/LICENSE +679 -21
- package/README.en.md +24 -12
- package/README.md +15 -8
- package/TEMPLATE-COVERAGE.md +0 -1
- package/bin/dflow.js +4 -3
- package/docs/evaluating-dflow.en.md +11 -7
- package/docs/evaluating-dflow.md +9 -4
- package/docs/migrating-to-dflow-v1.md +7 -3
- package/docs/using-with-claude-code.en.md +40 -23
- package/docs/using-with-claude-code.md +34 -23
- package/docs/using-with-codex.en.md +135 -48
- package/docs/using-with-codex.md +99 -38
- package/docs/using-with-github-copilot.en.md +135 -34
- package/docs/using-with-github-copilot.md +120 -43
- package/lib/init.js +943 -145
- package/package.json +3 -3
- package/templates/brownfield/references/dflow-feedback-flow.md +135 -63
- package/templates/brownfield/references/drift-verification.md +1 -4
- package/templates/brownfield/references/finish-feature-flow.md +59 -23
- package/templates/brownfield/references/git-integration.md +65 -7
- package/templates/brownfield/references/init-project-flow.md +67 -36
- package/templates/brownfield/references/modify-existing-flow.md +10 -38
- package/templates/brownfield/references/new-feature-flow.md +28 -11
- package/templates/brownfield/references/new-phase-flow.md +16 -1
- package/templates/brownfield/scaffolding/AI-AGENT-GUIDE.md +253 -2
- package/templates/brownfield/scaffolding/CLAUDE-md-snippet.md +5 -8
- package/templates/brownfield/scaffolding/Git-principles-gitflow.md +13 -12
- package/templates/brownfield/scaffolding/Git-principles-trunk.md +13 -16
- package/templates/brownfield/scaffolding/_conventions.md +10 -9
- package/templates/brownfield/templates/_index.md +21 -3
- package/templates/brownfield/templates/lightweight-spec.md +1 -1
- package/templates/brownfield/templates/phase-spec.md +1 -1
- package/templates/common/skill/SKILL.md +9 -6
- package/templates/greenfield/references/dflow-feedback-flow.md +135 -63
- package/templates/greenfield/references/drift-verification.md +1 -4
- package/templates/greenfield/references/finish-feature-flow.md +58 -23
- package/templates/greenfield/references/git-integration.md +65 -7
- package/templates/greenfield/references/init-project-flow.md +67 -36
- package/templates/greenfield/references/modify-existing-flow.md +9 -7
- package/templates/greenfield/references/new-feature-flow.md +29 -12
- package/templates/greenfield/references/new-phase-flow.md +16 -1
- package/templates/greenfield/scaffolding/AI-AGENT-GUIDE.md +222 -2
- package/templates/greenfield/scaffolding/CLAUDE-md-snippet.md +10 -15
- package/templates/greenfield/scaffolding/Git-principles-gitflow.md +13 -12
- package/templates/greenfield/scaffolding/Git-principles-trunk.md +14 -18
- package/templates/greenfield/scaffolding/_conventions.md +9 -8
- package/templates/greenfield/templates/_index.md +21 -3
- package/templates/greenfield/templates/lightweight-spec.md +1 -1
- package/templates/greenfield/templates/phase-spec.md +1 -1
- package/templates/brownfield/templates/CLAUDE.md +0 -165
- package/templates/greenfield/templates/CLAUDE.md +0 -172
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
> [繁體中文](using-with-github-copilot.md) | **English**
|
|
4
4
|
|
|
5
|
-
A walk-through of what Dflow looks like when your AI coding agent is GitHub Copilot (IDE chat + inline completions). About 10 minutes to read.
|
|
5
|
+
A walk-through of what Dflow looks like when your AI coding agent is GitHub Copilot. GitHub Copilot has two surfaces — **VS Code Copilot Chat** (the in-IDE chat panel + inline completions) and **GitHub Copilot CLI** (the terminal) — and they trigger Dflow and invoke commands differently, so this guide covers them separately. About 10 minutes to read.
|
|
6
6
|
|
|
7
7
|
This guide focuses on the Copilot experience specifically. For the tool-neutral evaluation flow, see [`docs/evaluating-dflow.en.md`](evaluating-dflow.en.md). For the full Get Started and feature list, see [`README.md`](../README.en.md).
|
|
8
8
|
|
|
9
9
|
## Who This Guide Is For
|
|
10
10
|
|
|
11
|
-
You are using or evaluating Dflow with GitHub Copilot in
|
|
11
|
+
You are using or evaluating Dflow with GitHub Copilot, in either VS Code Copilot Chat or the GitHub Copilot CLI. This guide covers what Copilot sees after `init`, the repository shim location, how to invoke Dflow workflows on each surface, and Copilot-specific UX and permission patterns worth knowing.
|
|
12
12
|
|
|
13
13
|
## Prerequisites
|
|
14
14
|
|
|
@@ -30,26 +30,39 @@ Example generated shim:
|
|
|
30
30
|
|
|
31
31
|
This project uses Dflow for spec-first AI-assisted development.
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
For spec-impacting work — a new feature, a change to product, user-facing, or
|
|
34
|
+
domain behavior, a new requirement, or a bug-fix workflow — read and follow:
|
|
34
35
|
|
|
35
|
-
- `dflow/specs/shared/AI-AGENT-GUIDE.md`
|
|
36
|
+
- `dflow/specs/shared/AI-AGENT-GUIDE.md` — command registry, routing rules, and project context.
|
|
37
|
+
- `dflow/specs/shared/dflow-workflows/` — vendored workflow bundle with executable step definitions.
|
|
38
|
+
|
|
39
|
+
For routine work (refactors, renames, chores, formatting, dependency bumps, or
|
|
40
|
+
general code questions), proceed normally; you need not read the guide first.
|
|
41
|
+
|
|
42
|
+
Keep tool-specific instruction files small. The guide and workflow bundle are
|
|
43
|
+
the authoritative sources for Dflow workflow rules, slash-command behavior,
|
|
44
|
+
spec locations, and SDD/DDD constraints.
|
|
36
45
|
```
|
|
37
46
|
|
|
38
47
|
Key points:
|
|
39
48
|
|
|
40
49
|
- The Copilot shim is located at `.github/copilot-instructions.md` (see `lib/init.js` mapping).
|
|
41
|
-
- The Copilot shim
|
|
50
|
+
- The Copilot shim is a thin pointer to the canonical guide by path. Readers must open `dflow/specs/shared/AI-AGENT-GUIDE.md` explicitly.
|
|
42
51
|
|
|
43
52
|
## Using Dflow Workflow Commands with GitHub Copilot
|
|
44
53
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
instructions rather than CLI slash commands:
|
|
54
|
+
GitHub Copilot has two surfaces, and Dflow triggering and command behavior
|
|
55
|
+
differ between them — sort out which one you are on first:
|
|
48
56
|
|
|
49
|
-
-
|
|
50
|
-
-
|
|
57
|
+
- **VS Code Copilot Chat** (the in-IDE chat panel): natural language **does
|
|
58
|
+
auto-trigger** Dflow's skill; if you opt in to prompt adapters, the
|
|
59
|
+
tool-native command `/dflow-<id>` (hyphen) is also available.
|
|
60
|
+
- **GitHub Copilot CLI** (the terminal): there is **no** natural-language
|
|
61
|
+
auto-trigger; you first type `/dflow` to **manually engage** the skill and let
|
|
62
|
+
it guide you; the per-id `/dflow-<id>` command is **not available** in the CLI.
|
|
51
63
|
|
|
52
|
-
|
|
64
|
+
Both surfaces share the same set of workflow entry points (same vocabulary;
|
|
65
|
+
only how you invoke them differs):
|
|
53
66
|
|
|
54
67
|
| Command | Use when |
|
|
55
68
|
|---|---|
|
|
@@ -62,10 +75,54 @@ Available workflow entry points:
|
|
|
62
75
|
| `/dflow:pr-review` | A change is ready for SDD/DDD review. |
|
|
63
76
|
| `/dflow:report-dflow-feedback` | You found a Dflow issue or improvement and want a sanitized upstream feedback draft. |
|
|
64
77
|
|
|
78
|
+
> **Syntax note**: in the table, `/dflow:<id>` (**colon**) is Dflow's canonical
|
|
79
|
+
> vocabulary and the **actual command** syntax for Claude / Codex. Copilot's
|
|
80
|
+
> prompt-adapter command uses `/dflow-<id>` (**hyphen**) instead, and only in VS
|
|
81
|
+
> Code; do not type the colon form literally as a command in Copilot (the
|
|
82
|
+
> Copilot CLI parses `/dflow:new-feature` down to `/dflow`). The two
|
|
83
|
+
> sub-sections below cover how to invoke on each surface.
|
|
84
|
+
|
|
85
|
+
### Surface A: VS Code Copilot Chat
|
|
86
|
+
|
|
87
|
+
- **Auto-trigger**: yes. Describe what you want in plain natural language in chat
|
|
88
|
+
(e.g., "I want to add CSV export for users") and Dflow's skill engages on its
|
|
89
|
+
own, picks the matching workflow, and starts in **suggest-and-wait** mode (it
|
|
90
|
+
proposes a command and waits for your confirmation) rather than running the
|
|
91
|
+
whole workflow unprompted.
|
|
92
|
+
- **Command**: `/dflow-<id>` (**hyphen**) works, but first run
|
|
93
|
+
`dflow configure-agents --command-adapters` in the project to project
|
|
94
|
+
`.github/prompts/dflow-<id>.prompt.md` (see the next section); then pick
|
|
95
|
+
`/dflow-new-feature` from the prompt menu.
|
|
96
|
+
- **Plain text also works**: you can also describe the workflow in plain chat
|
|
97
|
+
text (e.g., `Run the Dflow /dflow:new-feature workflow.`) — here
|
|
98
|
+
`/dflow:new-feature` is just a **text reference**, not something parsed as a
|
|
99
|
+
command.
|
|
100
|
+
|
|
101
|
+
### Surface B: GitHub Copilot CLI
|
|
102
|
+
|
|
103
|
+
- **Auto-trigger**: **none**. Sending plain natural language does **not** engage
|
|
104
|
+
Dflow's skill.
|
|
105
|
+
- **How to engage**: type `/dflow` (no id suffix) to **manually engage** the
|
|
106
|
+
skill; once engaged it lists the available workflows / asks what you want to
|
|
107
|
+
do, and you then continue with a **natural-language description** (e.g., "I
|
|
108
|
+
want to add CSV export") or by replying to the options it lists. It also runs
|
|
109
|
+
in suggest-and-wait mode.
|
|
110
|
+
- **Command**: the per-id `/dflow-<id>` is **not available** in the CLI —
|
|
111
|
+
`.github/prompts/dflow-<id>.prompt.md` is VS Code Chat-specific and the **CLI
|
|
112
|
+
does not read it**, so `/dflow-new-feature` returns Unknown; the colon form
|
|
113
|
+
`/dflow:new-feature` is parsed down to `/dflow`. The CLI has no per-id command
|
|
114
|
+
entry; use the "`/dflow` to engage → describe in conversation" path instead.
|
|
115
|
+
- **What about the command the skill suggests**: once engaged, the skill may
|
|
116
|
+
suggest a `/dflow:<id>` (that is the canonical form written for Claude /
|
|
117
|
+
Codex). In Copilot you do **not** need to type that command string literally —
|
|
118
|
+
in the CLI the skill is already engaged, so just describe the workflow you want
|
|
119
|
+
in conversation or confirm; in VS Code, use the `/dflow-<id>` (hyphen)
|
|
120
|
+
prompt-menu entry instead.
|
|
121
|
+
|
|
65
122
|
### Optional Prompt Adapters
|
|
66
123
|
|
|
67
|
-
If you want tool-native entries in a
|
|
68
|
-
supports prompt files, run this in an initialized project:
|
|
124
|
+
If you want tool-native **command** entries in a VS Code Copilot environment
|
|
125
|
+
that supports prompt files, run this in an initialized project:
|
|
69
126
|
|
|
70
127
|
```bash
|
|
71
128
|
dflow configure-agents --command-adapters
|
|
@@ -76,12 +133,32 @@ command registry inside the canonical guide:
|
|
|
76
133
|
|
|
77
134
|
- `.github/prompts/dflow-<id>.prompt.md`
|
|
78
135
|
|
|
79
|
-
These prompts
|
|
80
|
-
example `/dflow-new-feature
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
136
|
+
These prompts work **only in the VS Code Copilot Chat prompt menu** (as
|
|
137
|
+
`/dflow-<id>`, for example `/dflow-new-feature`); the **Copilot CLI does not
|
|
138
|
+
read** `.github/prompts/`, so this command path is unavailable in the CLI (see
|
|
139
|
+
"Surface B" above). Their body only points to the canonical `/dflow:new-feature`
|
|
140
|
+
workflow and `dflow/specs/shared/AI-AGENT-GUIDE.md`; it does not copy workflow
|
|
141
|
+
steps. Note the command syntax uses the **hyphen** `/dflow-<id>`, not the
|
|
142
|
+
canonical **colon** `/dflow:<id>` — the colon form is Claude / Codex's command
|
|
143
|
+
syntax and in Copilot can only be a text reference, never typed as a command.
|
|
144
|
+
|
|
145
|
+
### The `--skills` Flag and Skill Triggering on Copilot
|
|
146
|
+
|
|
147
|
+
`dflow configure-agents --skills` projects the same tool-neutral thin skill for
|
|
148
|
+
**Claude Code, Codex, and GitHub Copilot**, each at its own project-level skill
|
|
149
|
+
path; Copilot's is `.github/skills/dflow/SKILL.md`. Testing (2026-06-05) confirmed
|
|
150
|
+
Copilot discovers and runs the skill from its own native `.github/skills/` path
|
|
151
|
+
(it still works with the cross-read `.claude`/`.agents` paths removed); the
|
|
152
|
+
trigger differs by surface — **VS Code Chat auto-triggers on natural language**,
|
|
153
|
+
while the **Copilot CLI needs a `/dflow` to manually engage** it (details in
|
|
154
|
+
Surfaces A / B above).
|
|
155
|
+
|
|
156
|
+
> Note: Copilot also cross-reads `.claude/skills` and `.agents/skills`; if you
|
|
157
|
+
> select Copilot alongside Claude / Codex in the same project, the same `dflow`
|
|
158
|
+
> skill may surface from more than one path. The copies Dflow *generates* are
|
|
159
|
+
> byte-identical (same `name`), so they behave the same; but a pre-existing
|
|
160
|
+
> non-Dflow `dflow` skill at one of those paths is left untouched and could
|
|
161
|
+
> differ — remove or rename it to avoid a divergent same-name duplicate.
|
|
85
162
|
|
|
86
163
|
### Version Control and Upgrades for Generated Adapters
|
|
87
164
|
|
|
@@ -145,17 +222,40 @@ Copilot: Got it. I'll create the feature spec at dflow/specs/features/active/
|
|
|
145
222
|
|
|
146
223
|
### Pre-Existing Repository Instructions
|
|
147
224
|
|
|
148
|
-
If a `.github/copilot-instructions.md` file already exists in your project,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
225
|
+
If a `.github/copilot-instructions.md` file already exists in your project,
|
|
226
|
+
`init` does not overwrite custom content. A Dflow-generated shim is refreshed
|
|
227
|
+
in place; another file that already points to
|
|
228
|
+
`dflow/specs/shared/AI-AGENT-GUIDE.md` is skipped. If the file does not yet
|
|
229
|
+
point to the guide, Dflow shows the change in the confirmation preview and
|
|
230
|
+
appends a marked `<!-- dflow-generated: agent-shim START/END -->` block at the
|
|
231
|
+
end of the file; re-running refreshes that same block in place without
|
|
232
|
+
duplicating it. This avoids destroying custom Copilot instructions you already
|
|
233
|
+
had. If you delete the block, the next `init` / `configure-agents` run appends
|
|
234
|
+
it again.
|
|
235
|
+
|
|
236
|
+
Look for the fallback merge snippet
|
|
237
|
+
`dflow/specs/shared/copilot-instructions-snippet.md` only when Dflow reports
|
|
238
|
+
conflicting or malformed markers, then resolve it manually in your existing
|
|
239
|
+
`.github/copilot-instructions.md`.
|
|
240
|
+
|
|
241
|
+
### Can You Type `/dflow:<id>` (the Colon Form) Directly?
|
|
242
|
+
|
|
243
|
+
The canonical `/dflow:<id>` (colon) is Claude / Codex's command syntax. In
|
|
244
|
+
Copilot, **do not type it literally as a command on either surface**:
|
|
245
|
+
|
|
246
|
+
- **VS Code Chat**: as a text reference it is fine (Copilot understands which
|
|
247
|
+
workflow you mean); for a command entry, use the prompt-adapter `/dflow-<id>`
|
|
248
|
+
(hyphen).
|
|
249
|
+
- **Copilot CLI**: typing `/dflow:new-feature` is parsed down to `/dflow` (it
|
|
250
|
+
only engages the skill, without the id). Type `/dflow` to engage, then describe
|
|
251
|
+
the workflow you want.
|
|
252
|
+
|
|
253
|
+
On any surface, whenever a slash form is not recognized, re-send the request as
|
|
254
|
+
plain prose:
|
|
155
255
|
|
|
156
256
|
```text
|
|
157
|
-
You:
|
|
158
|
-
|
|
257
|
+
You: Please help me start a new Dflow feature workflow. Read
|
|
258
|
+
dflow/specs/shared/AI-AGENT-GUIDE.md first.
|
|
159
259
|
```
|
|
160
260
|
|
|
161
261
|
## Differences vs Other AI Tools
|
|
@@ -165,13 +265,13 @@ The canonical guide (`dflow/specs/shared/AI-AGENT-GUIDE.md`) is the same across
|
|
|
165
265
|
| Tool | Generated shim | Loads canonical guide via |
|
|
166
266
|
|---|---|---|
|
|
167
267
|
| GitHub Copilot | `.github/copilot-instructions.md` | Reads repository instructions directly |
|
|
168
|
-
| Claude Code | `CLAUDE.md` |
|
|
268
|
+
| Claude Code | `CLAUDE.md` | Reads file content directly when starting |
|
|
169
269
|
| Codex / Copilot coding agent | `AGENTS.md` | Reads file content directly when starting |
|
|
170
270
|
|
|
171
271
|
- Shim path: Copilot uses `.github/copilot-instructions.md` (not `AGENTS.md` or `CLAUDE.md`).
|
|
172
|
-
-
|
|
173
|
-
- Tool model: Copilot
|
|
174
|
-
- Workflow invocation: canonical `/dflow:*` is shared vocabulary, but each tool's `/` parser behaves differently.
|
|
272
|
+
- Loading: the Copilot shim is a thin pointer that does not inline the guide (same as the other tools now); the canonical guide is loaded on demand.
|
|
273
|
+
- Tool model: Copilot has two surfaces — VS Code Chat (chat panel + inline completions) and the Copilot CLI (terminal); Codex/Claude Code are CLI-based agents. The two Copilot surfaces interact with Dflow differently (see Surfaces A / B above).
|
|
274
|
+
- Workflow invocation: canonical `/dflow:*` is shared vocabulary, but each tool's `/` parser behaves differently. Claude / Codex take `/dflow:<id>` (colon) directly as a command; Copilot does **not** — in VS Code the command entry is the prompt-adapter `/dflow-<id>` (hyphen, requires `--command-adapters`), while the Copilot CLI has no per-id command and instead uses `/dflow` to engage the skill (see Surfaces A / B above).
|
|
175
275
|
- 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.
|
|
176
276
|
|
|
177
277
|
## Common Patterns and Gotchas
|
|
@@ -180,7 +280,8 @@ The canonical guide (`dflow/specs/shared/AI-AGENT-GUIDE.md`) is the same across
|
|
|
180
280
|
- 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.
|
|
181
281
|
- Copilot's inline completions may suggest code without following Dflow workflows; explicitly request the workflow when you need spec-driven output.
|
|
182
282
|
- 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).
|
|
183
|
-
-
|
|
283
|
+
- Sort out the surface first: VS Code Chat auto-triggers on natural language and uses `/dflow-<id>` for commands; the Copilot CLI has no auto-trigger, engage with `/dflow` first, and has no per-id command (see Surfaces A / B above).
|
|
284
|
+
- When a slash form is not recognized (occasional in VS Code Chat, or `/dflow-<id>` returning Unknown in the Copilot CLI), describe the workflow in plain prose, or in the CLI type `/dflow` to engage the skill first.
|
|
184
285
|
- Prompt adapters are thin wrappers generated from the canonical command registry; do not hand-write or copy Dflow workflow steps under `.github/prompts/`.
|
|
185
286
|
|
|
186
287
|
## Where to Go Next
|
|
@@ -192,4 +293,4 @@ The canonical guide (`dflow/specs/shared/AI-AGENT-GUIDE.md`) is the same across
|
|
|
192
293
|
|
|
193
294
|
---
|
|
194
295
|
|
|
195
|
-
Note on
|
|
296
|
+
Note on behavior: the surface differences described here (VS Code Chat auto-triggers on natural language, the Copilot CLI engages manually via `/dflow`, prompt adapters are VS Code-only) reflect 2026-06-05 testing; automatic inclusion of `.github/` instruction files and each surface's `/` command parsing may still vary by Copilot / IDE version. Confirm with a maintainer before relying on exact semantics.
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
> **繁體中文** | [English](using-with-github-copilot.en.md)
|
|
4
4
|
|
|
5
|
-
當你的 AI 程式設計助理是 GitHub Copilot
|
|
5
|
+
當你的 AI 程式設計助理是 GitHub Copilot 時,Dflow 的使用體驗 walk-through。GitHub
|
|
6
|
+
Copilot 有兩個介面——**VS Code Copilot Chat**(IDE 內的 chat panel + inline
|
|
7
|
+
completions)與 **GitHub Copilot CLI**(終端機)——兩者觸發 Dflow 與調用命令的方式
|
|
8
|
+
不同,本指南會分開說明。閱讀約需 10 分鐘。
|
|
6
9
|
|
|
7
10
|
本指南專注於 GitHub Copilot 的具體使用體驗。工具中立的評估流程請見
|
|
8
11
|
[`docs/evaluating-dflow.md`](evaluating-dflow.md)。完整的 Get Started
|
|
@@ -12,8 +15,8 @@
|
|
|
12
15
|
|
|
13
16
|
你正在使用或評估以 GitHub Copilot 作為 AI 程式設計助理的 Dflow。
|
|
14
17
|
本指南說明 `init` 之後 Copilot 看到了什麼、repository shim 的位置、
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
如何在 VS Code Copilot Chat 與 Copilot CLI 兩個介面呼叫 Dflow workflow,
|
|
19
|
+
以及幾個值得了解的 Copilot 專屬使用模式與 permission 行為。
|
|
17
20
|
|
|
18
21
|
## 前置條件
|
|
19
22
|
|
|
@@ -36,28 +39,36 @@
|
|
|
36
39
|
|
|
37
40
|
This project uses Dflow for spec-first AI-assisted development.
|
|
38
41
|
|
|
39
|
-
|
|
42
|
+
For spec-impacting work — a new feature, a change to product, user-facing, or
|
|
43
|
+
domain behavior, a new requirement, or a bug-fix workflow — read and follow:
|
|
40
44
|
|
|
41
|
-
- `dflow/specs/shared/AI-AGENT-GUIDE.md`
|
|
45
|
+
- `dflow/specs/shared/AI-AGENT-GUIDE.md` — command registry, routing rules, and project context.
|
|
46
|
+
- `dflow/specs/shared/dflow-workflows/` — vendored workflow bundle with executable step definitions.
|
|
47
|
+
|
|
48
|
+
For routine work (refactors, renames, chores, formatting, dependency bumps, or
|
|
49
|
+
general code questions), proceed normally; you need not read the guide first.
|
|
50
|
+
|
|
51
|
+
Keep tool-specific instruction files small. The guide and workflow bundle are
|
|
52
|
+
the authoritative sources for Dflow workflow rules, slash-command behavior,
|
|
53
|
+
spec locations, and SDD/DDD constraints.
|
|
42
54
|
```
|
|
43
55
|
|
|
44
56
|
重點說明:
|
|
45
57
|
|
|
46
58
|
- Copilot shim 位於 `.github/copilot-instructions.md`(見 `lib/init.js` mapping)。
|
|
47
|
-
- Copilot shim
|
|
59
|
+
- Copilot shim 是薄指標,只透過路徑指向 canonical 指南;讀取
|
|
48
60
|
`dflow/specs/shared/AI-AGENT-GUIDE.md` 時需明確開啟該檔案。
|
|
49
61
|
|
|
50
62
|
## 在 GitHub Copilot 中使用 Dflow Workflow 指令
|
|
51
63
|
|
|
52
|
-
|
|
53
|
-
CLI 工具。請把 Dflow workflow 名稱當成普通的對話指示,而非 CLI slash command:
|
|
64
|
+
GitHub Copilot 有兩個介面,Dflow 在兩者的觸發與命令行為不同,先分清楚再用:
|
|
54
65
|
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
-
|
|
58
|
-
|
|
66
|
+
- **VS Code Copilot Chat**(IDE 內的 chat panel):自然語言**會自動觸發** Dflow
|
|
67
|
+
的 skill;若你 opt in prompt adapters,工具原生命令 `/dflow-<id>`(連字號)也可用。
|
|
68
|
+
- **GitHub Copilot CLI**(終端機):**沒有**自然語言自動觸發;要先打 `/dflow`
|
|
69
|
+
**手動喚起** skill 再由它引導;per-id 的 `/dflow-<id>` 命令在 CLI **不可用**。
|
|
59
70
|
|
|
60
|
-
|
|
71
|
+
兩介面共用同一組 workflow 入口(詞彙相同,差別只在怎麼喚起):
|
|
61
72
|
|
|
62
73
|
| 指令 | 適用情境 |
|
|
63
74
|
|---|---|
|
|
@@ -70,9 +81,43 @@ CLI 工具。請把 Dflow workflow 名稱當成普通的對話指示,而非 CL
|
|
|
70
81
|
| `/dflow:pr-review` | 變更已準備好進行 SDD/DDD review。 |
|
|
71
82
|
| `/dflow:report-dflow-feedback` | 你發現了 Dflow 的問題或改進點,想要一份清理過的上游回饋草稿。 |
|
|
72
83
|
|
|
84
|
+
> **語法提醒**:表中 `/dflow:<id>`(**冒號**)是 Dflow 的 canonical 詞彙,也是
|
|
85
|
+
> Claude / Codex 的**實際命令**語法。Copilot 的 prompt-adapter 命令改用
|
|
86
|
+
> `/dflow-<id>`(**連字號**),且只在 VS Code 活;在 Copilot 裡不要照字面把冒號
|
|
87
|
+
> 形式當命令輸入(Copilot CLI 會把 `/dflow:new-feature` 斷成 `/dflow`)。下面分介面
|
|
88
|
+
> 說明各自怎麼呼叫。
|
|
89
|
+
|
|
90
|
+
### 介面 A:VS Code Copilot Chat
|
|
91
|
+
|
|
92
|
+
- **自動觸發**:有。在 chat 直接用自然語言描述要做的事(例:「I want to add CSV
|
|
93
|
+
export for users」),Dflow 的 skill 會自動 engage、判斷對應 workflow,並以
|
|
94
|
+
**suggest-and-wait**(建議命令、等你確認)開始,不會擅自跑完整個 workflow。
|
|
95
|
+
- **命令**:`/dflow-<id>`(**連字號**)可用,但需先在專案跑
|
|
96
|
+
`dflow configure-agents --command-adapters` 投影
|
|
97
|
+
`.github/prompts/dflow-<id>.prompt.md`(見下節),之後在 prompt 選單選
|
|
98
|
+
`/dflow-new-feature` 即可。
|
|
99
|
+
- **純文字也行**:你也可以在 chat 用普通文字描述 workflow(例:`Run the Dflow
|
|
100
|
+
/dflow:new-feature workflow.`)——此時 `/dflow:new-feature` 只是被當成**文字
|
|
101
|
+
稱呼**,不是被當命令解析。
|
|
102
|
+
|
|
103
|
+
### 介面 B:GitHub Copilot CLI
|
|
104
|
+
|
|
105
|
+
- **自動觸發**:**無**。直接送自然語言**不會** engage Dflow 的 skill。
|
|
106
|
+
- **喚起方式**:先打 `/dflow`(無 id 後綴)**手動喚起** skill;skill engage 後會
|
|
107
|
+
列出可用的 workflow / 問你要做什麼,接著你用**自然語言描述**(例:「I want to
|
|
108
|
+
add CSV export」)或回覆它列的選項即可繼續。它一樣以 suggest-and-wait 運作。
|
|
109
|
+
- **命令**:per-id 的 `/dflow-<id>` 在 CLI **不可用**——
|
|
110
|
+
`.github/prompts/dflow-<id>.prompt.md` 是 VS Code Chat 專屬、**CLI 不讀取**,
|
|
111
|
+
輸入 `/dflow-new-feature` 會得到 Unknown;冒號形式 `/dflow:new-feature` 則被
|
|
112
|
+
CLI 斷成 `/dflow`。CLI 沒有 per-id 命令入口,統一走「`/dflow` 喚起 → 會話描述」。
|
|
113
|
+
- **skill 建議的命令怎麼辦**:skill engage 後可能會建議你用某個 `/dflow:<id>`
|
|
114
|
+
(這是給 Claude / Codex 的 canonical 寫法)。在 Copilot **不必照字面輸入那串
|
|
115
|
+
命令**——CLI 裡 skill 已經 engage,直接在會話用文字描述要的 workflow、或回覆
|
|
116
|
+
確認即可;VS Code 裡則改用 prompt 選單的 `/dflow-<id>`(連字號)。
|
|
117
|
+
|
|
73
118
|
### 選配 Prompt Adapters
|
|
74
119
|
|
|
75
|
-
如果想在支援 prompt files 的
|
|
120
|
+
如果想在支援 prompt files 的 VS Code Copilot 環境中使用工具原生**命令**入口,可在
|
|
76
121
|
已初始化的專案中執行:
|
|
77
122
|
|
|
78
123
|
```bash
|
|
@@ -84,11 +129,28 @@ dflow configure-agents --command-adapters
|
|
|
84
129
|
|
|
85
130
|
- `.github/prompts/dflow-<id>.prompt.md`
|
|
86
131
|
|
|
87
|
-
這些 prompt
|
|
88
|
-
`/dflow-new-feature
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
132
|
+
這些 prompt **只在 VS Code Copilot Chat 的 prompt 選單**生效(形式為
|
|
133
|
+
`/dflow-<id>`,例如 `/dflow-new-feature`);**Copilot CLI 不讀取**
|
|
134
|
+
`.github/prompts/`,所以這條命令路徑在 CLI 不可用(見上方「介面 B」)。Prompt
|
|
135
|
+
內容只指向 canonical `/dflow:new-feature` workflow 與
|
|
136
|
+
`dflow/specs/shared/AI-AGENT-GUIDE.md`,不複製 workflow 步驟。注意命令語法用
|
|
137
|
+
**連字號** `/dflow-<id>`,不是 canonical 的**冒號** `/dflow:<id>`——後者是
|
|
138
|
+
Claude / Codex 的命令寫法,在 Copilot 只能當文字稱呼、不能當命令輸入。
|
|
139
|
+
|
|
140
|
+
### `--skills` flag 與 Copilot 的 skill 觸發
|
|
141
|
+
|
|
142
|
+
`dflow configure-agents --skills` 會為 **Claude Code、Codex 與 GitHub Copilot**
|
|
143
|
+
各自投影同一份工具中立的 thin skill 到它們的 project-level skill 路徑;Copilot 的是
|
|
144
|
+
`.github/skills/dflow/SKILL.md`。實測(2026-06-05)確認 Copilot 會從**自己原生的
|
|
145
|
+
`.github/skills/`** 探索並運作(即使移除 `.claude`/`.agents` 的跨讀路徑也成立),
|
|
146
|
+
觸發方式依介面而異——**VS Code Chat 自然語言自動觸發**、**Copilot CLI 需打 `/dflow`
|
|
147
|
+
手動喚起**(細節見上方介面 A / B)。
|
|
148
|
+
|
|
149
|
+
> 註:Copilot 也會跨讀 `.claude/skills` 與 `.agents/skills`;若你同一專案同時選了
|
|
150
|
+
> Copilot 與 Claude / Codex,同一份 `dflow` skill 可能從多條路徑被看到。Dflow **產生**
|
|
151
|
+
> 的各份內容逐字相同(同 `name`),所以正常情況一致;但若你在某條路徑已有自己的
|
|
152
|
+
> (非 Dflow)`dflow` skill,Dflow 會原地保留、不覆寫——它可能與原生那份內容不同,
|
|
153
|
+
> 建議移除或改名以免同名重複。
|
|
92
154
|
|
|
93
155
|
### 產生物的版控政策與升級
|
|
94
156
|
|
|
@@ -142,22 +204,33 @@ Copilot: Got it. I'll create the feature spec at dflow/specs/features/active/
|
|
|
142
204
|
|
|
143
205
|
### 既有的 Repository 指示
|
|
144
206
|
|
|
145
|
-
如果你的專案中已有 `.github/copilot-instructions.md`,`init`
|
|
146
|
-
|
|
147
|
-
|
|
207
|
+
如果你的專案中已有 `.github/copilot-instructions.md`,`init` 不會覆蓋自訂內容。
|
|
208
|
+
已是 Dflow-generated shim 的檔案會原地刷新;其他已指向
|
|
209
|
+
`dflow/specs/shared/AI-AGENT-GUIDE.md` 的檔案會略過。若既有檔案尚未指向 guide,
|
|
210
|
+
Dflow 會在確認 preview 顯示並於檔案末尾附加帶有
|
|
211
|
+
`<!-- dflow-generated: agent-shim START/END -->` markers 的 Dflow block;重跑會
|
|
212
|
+
原地更新同一段,不會重複。這樣可以避免破壞你已有的自訂 Copilot 指示。若你刪除
|
|
213
|
+
該 block,下一次 `init` / `configure-agents` 會再附加它。
|
|
214
|
+
|
|
215
|
+
只有遇到衝突或 malformed Dflow markers 時,才到
|
|
216
|
+
`dflow/specs/shared/copilot-instructions-snippet.md` 找 fallback merge snippet,
|
|
217
|
+
再手動處理你現有的 `.github/copilot-instructions.md`。
|
|
218
|
+
|
|
219
|
+
### `/dflow:<id>`(冒號形式)能不能直接輸入?
|
|
148
220
|
|
|
149
|
-
|
|
150
|
-
|
|
221
|
+
canonical 的 `/dflow:<id>`(冒號)是給 Claude / Codex 的命令寫法。在 Copilot
|
|
222
|
+
**兩個介面都不要把它當命令字面輸入**:
|
|
151
223
|
|
|
152
|
-
|
|
224
|
+
- **VS Code Chat**:當文字稱呼可以(Copilot 會理解你指的 workflow);要命令入口
|
|
225
|
+
請用 prompt-adapter 的 `/dflow-<id>`(連字號)。
|
|
226
|
+
- **Copilot CLI**:輸入 `/dflow:new-feature` 會被斷成 `/dflow`(只喚起 skill、不帶
|
|
227
|
+
id)。直接打 `/dflow` 喚起後,用文字描述要的 workflow 即可。
|
|
153
228
|
|
|
154
|
-
|
|
155
|
-
IDE 整合方式與 Copilot 版本。若 Copilot 無法識別以 slash 為前綴的 workflow
|
|
156
|
-
名稱,以普通文字重新送出請求:
|
|
229
|
+
任何介面只要 slash 形式沒被識別,就改用普通文字重新送出請求:
|
|
157
230
|
|
|
158
231
|
```text
|
|
159
|
-
You:
|
|
160
|
-
|
|
232
|
+
You: Please help me start a new Dflow feature workflow. Read
|
|
233
|
+
dflow/specs/shared/AI-AGENT-GUIDE.md first.
|
|
161
234
|
```
|
|
162
235
|
|
|
163
236
|
## 與其他 AI 工具的差異
|
|
@@ -168,20 +241,20 @@ canonical 指南(`dflow/specs/shared/AI-AGENT-GUIDE.md`)在各工具之間
|
|
|
168
241
|
| 工具 | 產生的 shim | 載入 canonical 指南的方式 |
|
|
169
242
|
|---|---|---|
|
|
170
243
|
| GitHub Copilot | `.github/copilot-instructions.md` | 直接讀取 repository 指示 |
|
|
171
|
-
| Claude Code | `CLAUDE.md` |
|
|
244
|
+
| Claude Code | `CLAUDE.md` | 啟動時直接讀取檔案內容 |
|
|
172
245
|
| Codex / Copilot coding agent | `AGENTS.md` | 啟動時直接讀取檔案內容 |
|
|
173
246
|
|
|
174
247
|
- Shim 路徑:Copilot 使用 `.github/copilot-instructions.md`(不是 `AGENTS.md`
|
|
175
248
|
或 `CLAUDE.md`)。
|
|
176
|
-
-
|
|
177
|
-
|
|
178
|
-
- 工具模型:Copilot
|
|
179
|
-
Codex / Claude Code 是 CLI-based agent
|
|
180
|
-
|
|
249
|
+
- 載入方式:Copilot shim 是薄指標、不 inline 指南(與其他工具一致);
|
|
250
|
+
canonical 指南按需載入。
|
|
251
|
+
- 工具模型:Copilot 有兩個介面——VS Code Chat(chat panel + inline completions)
|
|
252
|
+
與 Copilot CLI(終端機);Codex / Claude Code 是 CLI-based agent。兩個 Copilot
|
|
253
|
+
介面與 Dflow 的互動方式不同(見上方介面 A / B)。
|
|
181
254
|
- Workflow 呼叫:canonical `/dflow:*` 是共同詞彙,但各工具 `/` parser 行為不同。
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
`/dflow
|
|
255
|
+
Claude / Codex 直接吃 `/dflow:<id>`(冒號)當命令;Copilot **不行**——VS Code
|
|
256
|
+
的命令入口是 prompt-adapter 的 `/dflow-<id>`(連字號,需 `--command-adapters`),
|
|
257
|
+
Copilot CLI 則沒有 per-id 命令、改打 `/dflow` 喚起 skill(見上方介面 A / B)。
|
|
185
258
|
- Permission 模型:Copilot 依賴 IDE 的 permission 與 extension sandbox。它可能
|
|
186
259
|
受 editor-level approvals 管理;CLI 工具通常有明確的 sandbox flags 與獨立的
|
|
187
260
|
permission gates。
|
|
@@ -196,8 +269,10 @@ canonical 指南(`dflow/specs/shared/AI-AGENT-GUIDE.md`)在各工具之間
|
|
|
196
269
|
需要 spec-driven 輸出時,請明確要求執行 workflow。
|
|
197
270
|
- Copilot Chat context 不一定會在所有 IDE 版本中自動包含 `.github/` 目錄下的
|
|
198
271
|
repository 指示檔;行為因 Copilot / IDE 版本而異(見頁尾說明)。
|
|
199
|
-
-
|
|
200
|
-
`/dflow
|
|
272
|
+
- 先分清楚介面:VS Code Chat 自然語言自動觸發、命令用 `/dflow-<id>`;Copilot CLI
|
|
273
|
+
無自動觸發、先打 `/dflow` 喚起、沒有 per-id 命令(見上方介面 A / B)。
|
|
274
|
+
- 當 slash 形式沒被識別(VS Code Chat 偶發、或 Copilot CLI 的 `/dflow-<id>`
|
|
275
|
+
Unknown)時,改用普通文字描述 workflow,或在 CLI 先打 `/dflow` 喚起 skill。
|
|
201
276
|
- Prompt adapter 是從 canonical command registry 產生的薄 wrapper;不要在
|
|
202
277
|
`.github/prompts/` 中手寫或複製 Dflow workflow 步驟。
|
|
203
278
|
|
|
@@ -223,5 +298,7 @@ canonical 指南(`dflow/specs/shared/AI-AGENT-GUIDE.md`)在各工具之間
|
|
|
223
298
|
|
|
224
299
|
---
|
|
225
300
|
|
|
226
|
-
|
|
227
|
-
|
|
301
|
+
行為說明:本指南描述的介面差異(VS Code Chat 自然語言自動觸發、Copilot CLI 以
|
|
302
|
+
`/dflow` 手動喚起、prompt adapters 僅 VS Code)依 2026-06-05 實測;`.github/`
|
|
303
|
+
指示檔的自動包含與各介面的 `/` 命令解析仍可能因 Copilot / IDE 版本而異,依賴確切
|
|
304
|
+
語意前請向 maintainer 確認。
|