dflow-sdd-ddd 0.7.0 → 0.9.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 +73 -0
- package/LICENSE +679 -21
- package/README.en.md +5 -4
- package/README.md +3 -3
- package/bin/dflow.js +3 -2
- package/docs/evaluating-dflow.en.md +14 -5
- package/docs/evaluating-dflow.md +14 -5
- package/docs/using-with-claude-code.en.md +17 -9
- package/docs/using-with-claude-code.md +15 -8
- package/docs/using-with-codex.en.md +12 -8
- package/docs/using-with-codex.md +8 -6
- package/lib/init.js +480 -87
- package/package.json +2 -2
- package/templates/brownfield/references/dflow-feedback-flow.md +251 -0
- package/templates/brownfield/references/drift-verification.md +183 -0
- package/templates/brownfield/references/finish-feature-flow.md +294 -0
- package/templates/brownfield/references/git-integration.md +371 -0
- package/templates/brownfield/references/init-project-flow.md +430 -0
- package/templates/brownfield/references/modify-existing-flow.md +448 -0
- package/templates/brownfield/references/new-feature-flow.md +382 -0
- package/templates/brownfield/references/new-phase-flow.md +274 -0
- package/templates/brownfield/references/pr-review-checklist.md +179 -0
- package/templates/brownfield/scaffolding/AI-AGENT-GUIDE.md +31 -4
- package/templates/brownfield/scaffolding/CLAUDE-md-snippet.md +12 -8
- package/templates/brownfield/scaffolding/Git-principles-gitflow.md +14 -13
- package/templates/brownfield/scaffolding/Git-principles-trunk.md +14 -17
- package/templates/brownfield/scaffolding/_conventions.md +1 -1
- package/templates/brownfield/scaffolding/_overview.md +3 -3
- package/templates/brownfield/templates/_index.md +20 -2
- package/templates/brownfield/templates/context-map.md +1 -1
- package/templates/brownfield/templates/glossary.md +1 -1
- package/templates/brownfield/templates/models.md +1 -1
- package/templates/brownfield/templates/rules.md +1 -1
- package/templates/brownfield/templates/tech-debt.md +1 -1
- package/templates/common/skill/SKILL.md +35 -0
- package/templates/greenfield/references/ddd-modeling-guide.md +351 -0
- package/templates/greenfield/references/dflow-feedback-flow.md +251 -0
- package/templates/greenfield/references/drift-verification.md +195 -0
- package/templates/greenfield/references/finish-feature-flow.md +314 -0
- package/templates/greenfield/references/git-integration.md +344 -0
- package/templates/greenfield/references/init-project-flow.md +464 -0
- package/templates/greenfield/references/modify-existing-flow.md +366 -0
- package/templates/greenfield/references/new-feature-flow.md +412 -0
- package/templates/greenfield/references/new-phase-flow.md +288 -0
- package/templates/greenfield/references/pr-review-checklist.md +130 -0
- package/templates/greenfield/scaffolding/AI-AGENT-GUIDE.md +31 -4
- package/templates/greenfield/scaffolding/CLAUDE-md-snippet.md +15 -13
- package/templates/greenfield/scaffolding/Git-principles-gitflow.md +14 -13
- package/templates/greenfield/scaffolding/Git-principles-trunk.md +14 -18
- package/templates/greenfield/scaffolding/_conventions.md +1 -1
- package/templates/greenfield/scaffolding/_overview.md +5 -3
- package/templates/greenfield/scaffolding/architecture-decisions-README.md +1 -1
- package/templates/greenfield/templates/_index.md +20 -2
- package/templates/greenfield/templates/context-map.md +1 -1
- package/templates/greenfield/templates/events.md +1 -1
- package/templates/greenfield/templates/glossary.md +1 -1
- package/templates/greenfield/templates/models.md +1 -1
- package/templates/greenfield/templates/rules.md +1 -1
- package/templates/greenfield/templates/tech-debt.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,79 @@
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
## 0.9.0 — 2026-05-28 — 執行當下對齊:feedback 逐欄產出、Codex trigger 注入、commit checkpoints + branch gate(含 breaking changes)
|
|
10
|
+
|
|
11
|
+
**Proposals**:PROPOSAL-048(feedback 輸出對齊目標 issue 表單)、PROPOSAL-046(Codex command-trigger 注入既有 AGENTS.md shim)、PROPOSAL-047(commit checkpoints、branch lifecycle 強制、AI commit 政策翻轉、init Git policy 升必選)
|
|
12
|
+
|
|
13
|
+
三者共享同一條 design line:**AI 在執行當下直接對齊目標狀態**(目標 issue schema / 目標檔案 / 團隊 Git policy 與良好開發習慣),取代「先產通用版 → 使用者事後手動翻譯 / 補做」的兩層結構。
|
|
14
|
+
|
|
15
|
+
### ⚠️ Breaking changes(PROPOSAL-047)
|
|
16
|
+
|
|
17
|
+
1. **AI commit 政策翻轉**:Dflow 既有原則「AI 不 commit、開發者自己 commit」改為「**AI 在生命週期 checkpoint 主動提議 commit,使用者隨時可拒絕(Y / N)**」。AI commit 使用開發者 git identity,標記方式由 init 選擇。翻轉後仍守「不讓 AI 越權」精神——使用者可拒絕、merge / push / PR 仍需明確同意、政策團隊擁有。牽動 `finish-feature-flow.md`、`git-integration.md`、各 flow 與 `Git-principles-*.md` 多檔。
|
|
18
|
+
|
|
19
|
+
2. **init Git policy 升為必選題**:0.9.0 起 `dflow init` 把 Git policy(GitFlow / Trunk 二選一)改為**必選**,不再是 optional starter file。沒選政策的團隊用不上 047 的 branch gate / commit checkpoint;必選排除此失效情境,且兩個選項對最輕量採用者都不過重(Trunk = GitHub Flow 短命 branch、merge 最自由)。
|
|
20
|
+
|
|
21
|
+
3. **init 新增 AI commit marker 必問**:None(預設)/ Co-Authored-By `dflow-ai <noreply@dflow.local>` / `[ai-assisted]` prefix 三選一,寫入 `dflow/specs/shared/_conventions.md` 的 `## AI Commit Policy` 段;runtime 不再重複問。
|
|
22
|
+
|
|
23
|
+
### Migration(0.8.0 → 0.9.0)
|
|
24
|
+
|
|
25
|
+
既有 0.8.0 專案需補(沒有既有 dflow 專案的新使用者不受影響,首次 `dflow init` 即為 0.9.0 行為):
|
|
26
|
+
|
|
27
|
+
- `dflow/specs/shared/Git-principles-{gitflow|trunk}.md`(擇一)——若 0.8.0 init 時未選 git-principles starter。
|
|
28
|
+
- `dflow/specs/shared/_conventions.md` 補 `## Git Policy` 與 `## AI Commit Policy` 兩段(記錄所選 policy 與 marker 模式)。
|
|
29
|
+
|
|
30
|
+
可手動補,或請 AI 依本 release note 協助補入。Dflow **不提供自動 migration 工具**(早期、採用者少)。
|
|
31
|
+
|
|
32
|
+
### 📜 授權變更(License Change)
|
|
33
|
+
|
|
34
|
+
從本 release 起 **`dflow-sdd-ddd` 改採 [AGPL-3.0-or-later](LICENSE)**(原 MIT)。npm 上已發布的 0.8.0 永遠保留 MIT(無法追溯);AGPL 從 0.9.0 起對新發布生效。Copyright holder 明確化為「Will Chuang」。LICENSE 採 FSF gnu.org 官方 AGPL-3.0 全文。
|
|
35
|
+
|
|
36
|
+
對一般使用者(學術圈、個人工程師、團隊內部以 dflow 引導開發)**無影響**——你寫的應用程式碼不受 AGPL 約束。AGPL 的 copyleft 約束的是**對 dflow skill / template 本身的修改與再散布**(含 SaaS 部署),目的是擋住「叫 AI 直接複製 skill 內容塞進私有專案規格」這類默默吸收的使用方式。
|
|
37
|
+
|
|
38
|
+
### 新功能 / 行為改善
|
|
39
|
+
|
|
40
|
+
- **feedback 輸出逐欄對齊目標 issue 表單**(PROPOSAL-048):`/dflow:report-dflow-feedback` 從「通用 Markdown 草稿 + 後置 Suggested Issue Body」改為**直接產出 schema-aligned 逐欄填寫稿**,使用者零翻譯逐塊貼上。schema 來源 priority chain(本地 `.github/ISSUE_TEMPLATE/*.yml` → bundled field map → generic fallback);涵蓋 GitHub Issue Forms 全欄位類型(input / textarea / dropdown / checkboxes / markdown / upload + attributes)、動態 fence escape、submitter 提交前自查 checklist。bundled field map 內嵌 4 份上游 issue form(Bug / Workflow change / Documentation / Question)。
|
|
41
|
+
|
|
42
|
+
- **Codex command-trigger 注入既有 AGENTS.md shim**(PROPOSAL-046):標準兩步 onboarding(`dflow init` → `configure-agents --command-adapters`)下,Codex 的 trigger 段原本必然淪為手動併(side snippet)。現在 `configure-agents` 對「未經改動的 dflow 生成 AGENTS.md」**直接注入帶 marker 的 trigger 段**(零手動合併);偵測用 normalized exact-template match(容忍 CRLF / IDE reformat、非 raw hash),同機制支援 idempotent re-projection;使用者改過的 AGENTS.md 安全降級為 snippet + warning。對齊既有 `SKILL_ADAPTER_GENERATED_MARKER` precedent。
|
|
43
|
+
|
|
44
|
+
- **commit checkpoints + branch gate + Checkpoint Log**(PROPOSAL-047):
|
|
45
|
+
- 生命週期 milestone 折入既有 Step Gate 的 commit checkpoint(選 Y / N 都記一列到 feature `_index.md` 新增的 **Checkpoint Log** 段);Tier 決定點數(T1 ×3 / T2 ×2 / T3 ×1);commit hash 僅在成功後寫入、失敗記 `failed`、不寫假 hash。
|
|
46
|
+
- **branch gate**:實作前檢查當前是否就在這份工作的 feature branch;不在才提議 create / switch(兩個 policy 都用 feature branch);override 記入 Checkpoint Log、連 3 次提示 reconfig。判斷只看「在不在對的 feature branch」,不需辨識 base branch。
|
|
47
|
+
- **finish-feature 拆兩段以支援離線**:Local-closeout gate(驗證 / 封存 / 可選 commit,離線可完成)+ Integration / PR gate(push / merge / PR,需 network;AI 只在使用者明確要求時才 `git push` / `gh pr create`)。
|
|
48
|
+
|
|
49
|
+
### 維護者工具 / 測試
|
|
50
|
+
|
|
51
|
+
- `test/smoke.mjs`:新增 046 注入矩陣(pristine 注入 / idempotent re-run / user-modified 降級 / CRLF reformat 仍注入 / 冷門路徑)、047 init 必選題(Git policy 兩分支 + AI commit marker)含 `_conventions.md` 政策段與 `_index.md` Checkpoint Log marker 斷言、048 feedback flow schema-aligned 守衛。
|
|
52
|
+
- `MAINTAINERS.md`:新增「Upstream Issue-Form Snapshot」release-time resync 提醒(048 的內嵌 field map 與 dist issue templates 同步)。
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 0.8.0 — 2026-05-24 — DDD set-based invariant 引導擴充、雙軌 skill 殼合一、user-projected bundle 內容 polish
|
|
57
|
+
|
|
58
|
+
**Proposals**:PROPOSAL-040(CLI papercuts + 文件補洞)、PROPOSAL-041(C0+C1:configure-agents idempotent bundle re-projection + 雙軌 skill 殼合一)、PROPOSAL-042(ddd-modeling-guide 補 set-based invariants 與 Phase-1 event dispatch 段)、PROPOSAL-044(user-projected bundle 內 maintainer-source path 清除)、PROPOSAL-045(user-projected bundle 內 maintainer-only provenance refs 清除)
|
|
59
|
+
|
|
60
|
+
**新功能 / 新引導內容**:
|
|
61
|
+
|
|
62
|
+
- **ddd-modeling-guide 補「Set-Based / Uniqueness Invariants」段**(PROPOSAL-042):明確說明 set-based invariants(「同 X 只能一筆 active」「email 跨 User 唯一」這類)**無論選哪種 aggregate 邊界**,in-memory check 在並發下都不夠保護,需 DB unique / partial index 或 optimistic concurrency token 配合。涵蓋兩種常見 aggregate 切法(拆獨立 + folded 為 child entity)的對策;指出 child entity 寫入需 bump root version;建議將並發衝突 translate 為業務語意 conflict(HTTP 409)。同 update 補 Common Mistakes #6 與 Phase-1 event dispatch lifecycle 段落。
|
|
63
|
+
|
|
64
|
+
**行為改善**:
|
|
65
|
+
|
|
66
|
+
- **`configure-agents` 自動補回 bundle**(PROPOSAL-041 C0):對 pre-039 既有專案再次跑 `configure-agents` 時,自動 re-project 缺失的 `dflow/specs/shared/dflow-workflows/` bundle(idempotent;第二次跑為 no-op)。順手關閉 PROPOSAL-039 follow-up (i)。
|
|
67
|
+
- **雙軌 skill 殼合一**(PROPOSAL-041 C1):兩份 `sdd-ddd-{green,brown}field-skill/SKILL.md` 統一為 `templates/common/skill/SKILL.md` thin shell;`lib/init.js` 從該檔讀。對 npm 使用者只是裝起來行為一致,無破壞性變更;對 maintainer 是 source-of-truth 收斂。
|
|
68
|
+
- **CLI papercuts 批次修**(PROPOSAL-040 group A):`init` / `configure-agents` 數個 CLI 摩擦點修補(issues #2/#11/#12)。
|
|
69
|
+
- **`init` 後續 step 文件補洞**(PROPOSAL-040 group B):slug 命名加 CI 相容性 caveat、`behavior.md` skeleton 註解明確(避免 user 以為 finish-feature 前就該填)、`configure-agents` 自動偵測既有 agent 配置(#13/#7)、`aggregate-design.md` 在 feature 目錄內的存放位置明文釘住。
|
|
70
|
+
|
|
71
|
+
**文件 / user-facing 內容 polish**:
|
|
72
|
+
|
|
73
|
+
- **user-projected bundle 內 `sdd-ddd-*-skill/` maintainer-source path 清除**(PROPOSAL-044):原本 `npm install` 後 user project 內的 flow / template 文件含 `sdd-ddd-greenfield-skill/scaffolding/...` 這類在 user 端不存在的路徑引用——user 讀到會誤判「我裝錯了?」。本 release 把該類引用全部清為 user 端可解析路徑或自足語句。涵蓋 12 個 source + 12 個 mirror。
|
|
74
|
+
- **user-projected bundle 內 maintainer-only provenance refs 清除**(PROPOSAL-045):原本 user 端會看到的 `<!-- ... PROPOSAL-013 ... -->` HTML 註解、`init-project-flow.md` 末段 `archive/reviews/...` 引用、references body 內 bare `PROPOSAL-NNN` 引用、brownfield `CLAUDE-md-snippet.md` 內 `(established in PROPOSAL-007c)` 標註等——這些是 maintainer-only 歷史佔位、user 看到只會困惑。本 release 全部清除或改寫為自足語句;HTML 註解保留為 `<!-- Seeded by Dflow. -->`(語意精準:user 取到檔後可自行客製化、dflow 並不持續維護該副本)。涵蓋 66 個 unique files。
|
|
75
|
+
|
|
76
|
+
**維護者工具**(不影響套件使用者):
|
|
77
|
+
|
|
78
|
+
- **`scripts/check-repo-consistency.sh` 新增 045 guard**:scoped git grep 對 `sdd-ddd-*-skill/{templates,scaffolding,references}/*.md` + `templates/{green,brown}field/**/*.md` 偵測 `(archive/|planning/|reviews/|proposals/|PROPOSAL-[0-9]{3})` 任一命中即 fail——防未來再引入 maintainer-only provenance refs。Pre-commit hook 不加。
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
9
82
|
## 0.7.0 — 2026-05-22 — Opt-in Claude skill adapter、自動清理舊 command adapter、發布前 lifecycle 機檢
|
|
10
83
|
|
|
11
84
|
**Proposals**:PROPOSAL-037(generated adapter commit 政策與升級流程)、PROPOSAL-038(選配 skill adapter)、PROPOSAL-035(lifecycle drift forcing-functions)
|