dflow-sdd-ddd 0.3.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 +118 -0
- package/README.en.md +7 -9
- package/README.md +10 -12
- 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/examples-by-stack.md +516 -0
- package/docs/migrating-to-dflow-v1.md +1 -1
- package/docs/release-versioning-policy.md +13 -0
- 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 +437 -46
- package/package.json +1 -1
- package/templates/brownfield/scaffolding/AI-AGENT-GUIDE.md +42 -3
- package/templates/brownfield/scaffolding/CLAUDE-md-snippet.md +25 -15
- package/templates/brownfield/scaffolding/Git-principles-gitflow.md +1 -1
- package/templates/brownfield/scaffolding/Git-principles-trunk.md +1 -1
- package/templates/brownfield/scaffolding/_conventions.md +1 -1
- package/templates/brownfield/scaffolding/_overview.md +40 -29
- package/templates/brownfield/templates/CLAUDE.md +25 -17
- package/templates/brownfield/templates/context-definition.md +4 -4
- package/templates/brownfield/templates/context-map.md +1 -1
- package/templates/brownfield/templates/lightweight-spec.md +3 -1
- package/templates/brownfield/templates/models.md +1 -1
- package/templates/brownfield/templates/phase-spec.md +10 -8
- package/templates/brownfield/templates/tech-debt.md +2 -2
- package/templates/greenfield/scaffolding/AI-AGENT-GUIDE.md +42 -3
- package/templates/greenfield/scaffolding/CLAUDE-md-snippet.md +7 -6
- package/templates/greenfield/scaffolding/Git-principles-gitflow.md +2 -2
- package/templates/greenfield/scaffolding/Git-principles-trunk.md +2 -2
- package/templates/greenfield/scaffolding/_overview.md +29 -11
- package/templates/greenfield/templates/CLAUDE.md +5 -5
- 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,124 @@
|
|
|
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
|
+
|
|
35
|
+
## 0.4.0 — 2026-05-19 — Language-agnostic templates and skill source
|
|
36
|
+
|
|
37
|
+
**Proposals**:PROPOSAL-030(language-agnostic templates and skill source;
|
|
38
|
+
post-v0.3.0 follow-up; cross-model reviewed with Codex CLI)
|
|
39
|
+
|
|
40
|
+
**變更**:
|
|
41
|
+
|
|
42
|
+
- **`lib/init.js` canonical placeholders + backward-compat aliases**(PROPOSAL-030 Group 1):
|
|
43
|
+
- 新增 canonical placeholders:`{Language}` / `{Framework}` /
|
|
44
|
+
`{Framework version}` / `{ORM / persistence}` / `{ORM version}` /
|
|
45
|
+
`{Mediator}`(與既有 `{Test framework}` 對齊)
|
|
46
|
+
- 既有 .NET-specific placeholder(`{ASP.NET Core version}` /
|
|
47
|
+
`{EF Core version}` / `{MediatR version}` / `{ASP.NET WebForms version}` /
|
|
48
|
+
`{.NET Framework version}` / `{ORM / Data Access}`)保留為 backward-compat
|
|
49
|
+
alias,substitute 同 canonical 值
|
|
50
|
+
- `extractTechStackPlaceholders` regex 擴充:Spring Boot / NestJS /
|
|
51
|
+
Fastify / Express / Django / FastAPI / Flask / Gin / Echo / Laravel
|
|
52
|
+
framework;EF Core / Hibernate / Spring Data JPA / SQLAlchemy /
|
|
53
|
+
Prisma / TypeORM / MikroORM / GORM / Eloquent / Doctrine ORM;JUnit /
|
|
54
|
+
Vitest / Jest / Mocha / pytest / unittest / go test / PHPUnit / Pest
|
|
55
|
+
test framework;C# / TypeScript / JavaScript / Kotlin / Java /
|
|
56
|
+
Python / Go / PHP / Ruby language
|
|
57
|
+
- `detectProjectSignals` 加 `stackHints`(從 `pom.xml` / `package.json` /
|
|
58
|
+
`pyproject.toml` / `go.mod` / `Cargo.toml` / `composer.json` / `Gemfile`
|
|
59
|
+
fingerprint)— **不**自動推 `trackHint`,user 選擇仍主導
|
|
60
|
+
- `printNextSteps` 加 `docs/examples-by-stack.md` pointer
|
|
61
|
+
- **Brownfield skill source + templates language-agnostic**(Group 2 + Group 2 follow-up):
|
|
62
|
+
- `Code-Behind` → umbrella `business logic embedded in delivery/entrypoint
|
|
63
|
+
code`,context 簡寫 `presentation-layer logic` (web/UI/API) 或
|
|
64
|
+
`entrypoint-layer logic` (CLI/batch/pipeline)
|
|
65
|
+
- `ASP.NET Core migration` / `future ASP.NET Core migration` →
|
|
66
|
+
`target architecture`
|
|
67
|
+
- `No System.Web references` → `No delivery-framework references`,明列
|
|
68
|
+
HTTP req/resp、session/cookie、job-runner context、CLI flag parser、
|
|
69
|
+
ViewState equivalents 等多 stack 示例
|
|
70
|
+
- `純 C# class` → `framework-pure class`
|
|
71
|
+
- Layer tag `PAGE` → `DELIVERY`(含 lightweight-spec 的 layer tags
|
|
72
|
+
說明擴及 web/CLI/job/pipeline)
|
|
73
|
+
- SKILL.md 新增 `## Scope: When Dflow Brownfield Applies` 段,明標適用
|
|
74
|
+
business-rule-bearing legacy systems / 不適用純 infra script 或無
|
|
75
|
+
domain model pipeline
|
|
76
|
+
- 目錄樹 `src/Pages/` → `src/Delivery/`(與 umbrella term 對齊)
|
|
77
|
+
- SKILL.md / templates/CLAUDE.md / scaffolding/CLAUDE-md-snippet.md /
|
|
78
|
+
scaffolding/_overview.md 在 directory tree 前加 stack-adapt callout
|
|
79
|
+
- **Greenfield skill source + templates language-agnostic**(Group 3 + Group 3 follow-up):
|
|
80
|
+
- 檔案標題 `# Project — ASP.NET Core + DDD` →
|
|
81
|
+
`# Project — Clean Architecture + DDD`
|
|
82
|
+
- `# X Workflow — ASP.NET Core` → `# X Workflow — Greenfield Clean Architecture`
|
|
83
|
+
- Cross-edition `Same as WebForms version` → `Same as Brownfield edition`
|
|
84
|
+
- `_overview.md` stack table 全用 canonical placeholders
|
|
85
|
+
- `init-project-flow.md` Q2 prompt + substitution table 改 canonical
|
|
86
|
+
- Project Layout `{Project}.Domain` `.NET` 慣例保留 + 加詳細 callout
|
|
87
|
+
列 Java/Spring、Node/TS、Python、Go、PHP/Laravel 對應
|
|
88
|
+
- `PRACTICE_PLAN_tw.md` 開頭加 disclaimer:練習以 .NET 為示例、
|
|
89
|
+
Dflow 本身 language-agnostic
|
|
90
|
+
- Git-principles-{gitflow,trunk} 的 `NuGet dependencies` →
|
|
91
|
+
`external package dependencies`
|
|
92
|
+
- **`docs/examples-by-stack.md` 新增**(Group 4):520 行 public
|
|
93
|
+
appendix,列 7 stack 段(.NET ASP.NET Core greenfield / .NET WebForms
|
|
94
|
+
brownfield / Java Spring Boot / Node TypeScript NestJS / Python FastAPI /
|
|
95
|
+
Go Gin / PHP Laravel),每段:substituted stack table + project
|
|
96
|
+
layout + per-stack domain purity check + test framework + run
|
|
97
|
+
command。`README.md` / `README.en.md` 在 Project Tracks 段加 link。
|
|
98
|
+
- **`planning/init-contract-spec.md` 同步**(Group 1):placeholder
|
|
99
|
+
inventory + alias table + detectProjectSignals stackHints 文件對齊
|
|
100
|
+
|
|
101
|
+
**Breaking / migration notes**:
|
|
102
|
+
|
|
103
|
+
- **無 runtime API 破壞**:v0.3.0 寫入 user project 的 `CLAUDE.md` /
|
|
104
|
+
`_overview.md` 等檔案 Dflow 不會自動覆蓋;backward-compat alias 只保護
|
|
105
|
+
future init 動作的 placeholder 替換不破壞,不主動 migrate 既有檔案
|
|
106
|
+
- 若要對齊新風格,請參考 `docs/examples-by-stack.md` 對既有 init 產出的
|
|
107
|
+
檔案手動修改
|
|
108
|
+
- AI agent 對話中讀 skill source 會自動切到新術語(Code-Behind →
|
|
109
|
+
delivery/entrypoint code、ASP.NET Core migration → target architecture);
|
|
110
|
+
若 user 有自製 prompt / shortcut 用到舊術語,建議同步更新但**不強制**
|
|
111
|
+
|
|
112
|
+
**驗證**:
|
|
113
|
+
|
|
114
|
+
- `npm test`(含新增 Java/Spring Boot greenfield init e2e,assert 不殘留 .NET literals)
|
|
115
|
+
- `scripts/check-repo-consistency.sh`(source ↔ packaged mirror diff clean)
|
|
116
|
+
- 全 repo grep `Code-Behind` / `ASP.NET` / `WebForms` / `NuGet` 在 active skill / template surface 範圍內無殘留(archive/ 與 test fixture 刻意保留)
|
|
117
|
+
|
|
118
|
+
**邊界**:
|
|
119
|
+
|
|
120
|
+
- Tutorial 目錄 `tutorial/**` scenario prose 為教學劇情 artifact,明確
|
|
121
|
+
out of scope(PROPOSAL-030 §影響範圍 已宣告)
|
|
122
|
+
- `test/smoke.mjs` 既有 .NET fixture 保留作為 brownfield init 測試輸入
|
|
123
|
+
- Dist projection 在所有 Group merge 完後一次性 export(Director-only)
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
9
127
|
## 0.3.0 — 2026-05-18 — Workflow flow completion, terminology disambiguation, bilingual public docs
|
|
10
128
|
|
|
11
129
|
**Proposals**:PROPOSAL-022(CLI install 推薦路徑)、PROPOSAL-023(line-ending normalization)、PROPOSAL-024(README zh-TW + migration reframing)、PROPOSAL-025(Phase 術語拆解:Step Gate / Activity)、PROPOSAL-026(`/dflow:new-phase` 補 implementation / verification)、PROPOSAL-027(handoff lifecycle,dev-only)、PROPOSAL-028(`docs/*.md` 雙語化)、PROPOSAL-029(tutorial 檔名 align)。
|
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
|
|
|
@@ -113,15 +113,15 @@ Greenfield and Brownfield workflows with worked spec outputs, see the
|
|
|
113
113
|
| **Greenfield** | You are starting a new system or a new bounded area with room to shape architecture and domain model early. | Clean spec baseline, domain model ownership, feature-by-feature implementation through SDD. |
|
|
114
114
|
| **Brownfield** | You are adding or changing behavior in an existing codebase where business rules may already be scattered. | Progressive domain extraction, safer change planning, and migration-ready domain knowledge. |
|
|
115
115
|
|
|
116
|
-
These tracks
|
|
116
|
+
These tracks distinguish the project's starting state (new vs existing codebase), not a framework choice; the design makes no assumption about language or stack. Dflow should be read as a workflow system for software teams that want AI assistance without giving up domain clarity.
|
|
117
117
|
|
|
118
|
-
|
|
118
|
+
Filled-in examples for common stacks (.NET, Java/Spring, Node/TypeScript, Python, Go, PHP/Laravel) are in [`docs/examples-by-stack.md`](./docs/examples-by-stack.md).
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
### Track Choice and Migration
|
|
121
121
|
|
|
122
|
-
Track is fixed at `dflow init` time and **cannot be switched in-place** (there is no `/dflow:switch-to-greenfield` command). Brownfield is by design a preparation path toward Greenfield:
|
|
122
|
+
Track is fixed at `dflow init` time and **cannot be switched in-place** (there is no `/dflow:switch-to-greenfield` command). Brownfield is by design a preparation path toward Greenfield: domain code extracted into the project's domain layer (e.g., `src/Domain/`) and the domain documents under `dflow/specs/domain/` (glossary, rules, models, events) are all migration-ready assets — at the eventual rewrite (a new project + fresh `dflow init` with Greenfield track), they can be lifted directly. `dflow/specs/migration/tech-debt.md` is the brownfield-specific migration debt log.
|
|
123
123
|
|
|
124
|
-
Per-BC migration is also supported — once a Bounded Context's logic is fully extracted into
|
|
124
|
+
Per-BC migration is also supported — once a Bounded Context's business logic is fully extracted into the domain layer and the presentation layer is reduced to UI binding, that BC is already in a Clean Architecture state; the whole system doesn't have to switch in one go. The brownfield `/dflow:modify-existing`'s "assess presentation-layer business logic" step becomes a no-op for that BC naturally.
|
|
125
125
|
|
|
126
126
|
## Workflow Model
|
|
127
127
|
|
|
@@ -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
|
|
|
@@ -83,24 +83,24 @@ dflow doctor
|
|
|
83
83
|
|
|
84
84
|
第一次採用建議用 branch 或一次性試用專案,讓團隊先檢視產生的 `dflow/specs/` 工作區,再把流程引入正式程式碼。
|
|
85
85
|
|
|
86
|
-
完整評估流程(init 產生哪些檔案、AI
|
|
86
|
+
完整評估流程(init 產生哪些檔案、AI 工具支援、模式選擇、30 分鐘試用 playbook)見 [評估 Dflow](docs/evaluating-dflow.md)。Greenfield 與 Brownfield 端到端劇情走完與規格範例見 [`tutorial/`](tutorial/README.md) 索引。
|
|
87
87
|
|
|
88
|
-
##
|
|
88
|
+
## 專案模式
|
|
89
89
|
|
|
90
|
-
|
|
|
90
|
+
| 模式 | 何時用 | 主要產出 |
|
|
91
91
|
|---|---|---|
|
|
92
92
|
| **Greenfield** | 新系統或新 bounded area,有空間早期塑形架構與領域模型 | 乾淨的規格 baseline、領域模型歸屬、feature-by-feature SDD 實作 |
|
|
93
93
|
| **Brownfield** | 在既有 codebase 增加或修改行為,業務規則可能已散落各處 | 漸進的領域抽出、更安全的變更規劃、可遷移的領域知識 |
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
兩種模式區分的是專案起始狀態(新建 vs 既有 codebase),不是 framework 品牌;Dflow 對語言與 stack 不做假設,workflow、tier 制與文件模型可套用任何技術組合。本質是給「希望 AI 協助、又不願放棄領域清晰度」的軟體團隊使用的 workflow 系統。
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
各 stack(.NET / Java-Spring / Node-TS / Python / Go / PHP-Laravel)的填好範例見 [`docs/examples-by-stack.md`](./docs/examples-by-stack.md)。
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
### 模式選擇與遷移
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
模式在 `dflow init` 時選定、之後**不能 in-place 切換**(沒有 `/dflow:switch-to-greenfield` 之類的指令)。Brownfield 設計上是 Greenfield 的前置準備:抽出到專案 domain 層(例如 `src/Domain/`)的領域程式碼,與 `dflow/specs/domain/` 內的領域文件(術語、規則、模型、事件),都是 migration-ready 資產 — 未來要 rewrite 時(建新專案 + 新 `dflow init` 選 Greenfield),可以直接搬過去。`dflow/specs/migration/tech-debt.md` 是 brownfield 專用的遷移債紀錄。
|
|
102
102
|
|
|
103
|
-
也支援「逐 BC(Bounded Context)遷移」— 某個 BC
|
|
103
|
+
也支援「逐 BC(Bounded Context)遷移」— 某個 BC 的業務邏輯已純化到 domain 層、表現層只剩 UI 綁定後,這個 BC 就已是 Clean Architecture 狀態,不必整個 system 一次性切。Brownfield 的 `/dflow:modify-existing` 內「評估表現層業務邏輯」步驟對該 BC 自然會變 no-op。
|
|
104
104
|
|
|
105
105
|
## Workflow 模型
|
|
106
106
|
|
|
@@ -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
|