dflow-sdd-ddd 0.14.0 → 0.16.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.
Files changed (100) hide show
  1. package/CHANGELOG.md +915 -0
  2. package/CONTRIBUTING.md +11 -1
  3. package/README.en.md +160 -212
  4. package/README.md +93 -147
  5. package/TEMPLATE-COVERAGE.md +13 -6
  6. package/TEMPLATE-LANGUAGE-GLOSSARY.md +15 -1
  7. package/bin/dflow.js +90 -4
  8. package/docs/closeout-check.en.md +204 -0
  9. package/docs/closeout-check.md +204 -0
  10. package/docs/commands.en.md +112 -0
  11. package/docs/commands.md +103 -0
  12. package/docs/doctor-uncertainty.en.md +212 -0
  13. package/docs/doctor-uncertainty.md +212 -0
  14. package/docs/evaluating-dflow.en.md +29 -11
  15. package/docs/evaluating-dflow.md +8 -6
  16. package/docs/release-versioning-policy.md +6 -0
  17. package/docs/upgrading.en.md +196 -0
  18. package/docs/upgrading.md +197 -0
  19. package/docs/using-with-claude-code.en.md +13 -4
  20. package/docs/using-with-claude-code.md +13 -4
  21. package/docs/using-with-codex.en.md +13 -4
  22. package/docs/using-with-codex.md +13 -4
  23. package/docs/using-with-github-copilot.en.md +13 -4
  24. package/docs/using-with-github-copilot.md +13 -4
  25. package/lib/closeout-check.js +690 -0
  26. package/lib/doc-shapes.json +1195 -0
  27. package/lib/doctor-checks.js +2500 -24
  28. package/lib/init.js +2861 -143
  29. package/lib/render-diagrams.js +1474 -0
  30. package/lib/render.js +865 -49
  31. package/package.json +2 -2
  32. package/templates/brownfield/references/drift-verification.md +4 -0
  33. package/templates/brownfield/references/finish-feature-flow.md +648 -98
  34. package/templates/brownfield/references/finish-feature-follow-up.md +60 -0
  35. package/templates/brownfield/references/finish-feature-minimal-host.md +427 -0
  36. package/templates/brownfield/references/finish-feature-post-hoc-hotfix.md +95 -0
  37. package/templates/brownfield/references/finish-feature-record-correction.md +45 -0
  38. package/templates/brownfield/references/git-integration.md +205 -26
  39. package/templates/brownfield/references/init-project-flow.md +23 -3
  40. package/templates/brownfield/references/modify-existing-flow.md +439 -88
  41. package/templates/brownfield/references/modify-existing-follow-up.md +122 -0
  42. package/templates/brownfield/references/modify-existing-post-hoc-hotfix.md +200 -0
  43. package/templates/brownfield/references/new-feature-flow.md +110 -37
  44. package/templates/brownfield/references/new-phase-flow.md +59 -9
  45. package/templates/brownfield/references/pr-review-checklist.md +328 -10
  46. package/templates/brownfield/scaffolding/AI-AGENT-GUIDE.md +151 -34
  47. package/templates/brownfield/scaffolding/CLAUDE-md-snippet.md +1 -1
  48. package/templates/brownfield/scaffolding/Git-principles-gitflow.md +85 -8
  49. package/templates/brownfield/scaffolding/Git-principles-trunk.md +88 -10
  50. package/templates/brownfield/scaffolding/_conventions.md +50 -28
  51. package/templates/brownfield/scaffolding/_overview.md +1 -0
  52. package/templates/brownfield/templates/_index.md +158 -10
  53. package/templates/brownfield/templates/analysis.md +79 -0
  54. package/templates/brownfield/templates/behavior.md +1 -0
  55. package/templates/brownfield/templates/context-definition.md +1 -0
  56. package/templates/brownfield/templates/context-map.md +2 -1
  57. package/templates/brownfield/templates/glossary.md +1 -0
  58. package/templates/brownfield/templates/lightweight-spec.md +154 -11
  59. package/templates/brownfield/templates/models.md +1 -0
  60. package/templates/brownfield/templates/phase-spec.md +9 -1
  61. package/templates/brownfield/templates/rules.md +1 -0
  62. package/templates/brownfield/templates/tech-debt.md +1 -0
  63. package/templates/common/references/ddd-modeling-guide.md +33 -16
  64. package/templates/{greenfield → common}/references/dflow-feedback-flow.md +2 -1
  65. package/templates/common/references/flow-rationale-registry.md +146 -0
  66. package/templates/common/skill/SKILL.md +13 -11
  67. package/templates/greenfield/references/drift-verification.md +4 -0
  68. package/templates/greenfield/references/finish-feature-flow.md +639 -100
  69. package/templates/greenfield/references/finish-feature-follow-up.md +60 -0
  70. package/templates/greenfield/references/finish-feature-minimal-host.md +383 -0
  71. package/templates/greenfield/references/finish-feature-post-hoc-hotfix.md +95 -0
  72. package/templates/greenfield/references/finish-feature-record-correction.md +45 -0
  73. package/templates/greenfield/references/git-integration.md +193 -26
  74. package/templates/greenfield/references/init-project-flow.md +23 -3
  75. package/templates/greenfield/references/modify-existing-flow.md +395 -87
  76. package/templates/greenfield/references/modify-existing-follow-up.md +104 -0
  77. package/templates/greenfield/references/modify-existing-post-hoc-hotfix.md +200 -0
  78. package/templates/greenfield/references/new-feature-flow.md +116 -35
  79. package/templates/greenfield/references/new-phase-flow.md +58 -9
  80. package/templates/greenfield/references/pr-review-checklist.md +311 -8
  81. package/templates/greenfield/scaffolding/AI-AGENT-GUIDE.md +146 -32
  82. package/templates/greenfield/scaffolding/CLAUDE-md-snippet.md +5 -2
  83. package/templates/greenfield/scaffolding/Git-principles-gitflow.md +84 -8
  84. package/templates/greenfield/scaffolding/Git-principles-trunk.md +94 -14
  85. package/templates/greenfield/scaffolding/_conventions.md +50 -28
  86. package/templates/greenfield/scaffolding/_overview.md +6 -2
  87. package/templates/greenfield/templates/_index.md +145 -10
  88. package/templates/greenfield/templates/aggregate-design.md +1 -0
  89. package/templates/greenfield/templates/analysis.md +79 -0
  90. package/templates/greenfield/templates/behavior.md +1 -0
  91. package/templates/greenfield/templates/context-definition.md +1 -0
  92. package/templates/greenfield/templates/context-map.md +2 -1
  93. package/templates/greenfield/templates/events.md +4 -1
  94. package/templates/greenfield/templates/glossary.md +1 -0
  95. package/templates/greenfield/templates/lightweight-spec.md +154 -11
  96. package/templates/greenfield/templates/models.md +1 -0
  97. package/templates/greenfield/templates/phase-spec.md +9 -1
  98. package/templates/greenfield/templates/rules.md +1 -0
  99. package/templates/greenfield/templates/tech-debt.md +1 -0
  100. package/templates/brownfield/references/dflow-feedback-flow.md +0 -251
@@ -36,8 +36,17 @@ domain behavior, a new requirement, or a bug-fix workflow — read and follow:
36
36
  - `dflow/specs/shared/AI-AGENT-GUIDE.md` — command registry, routing rules, and project context.
37
37
  - `dflow/specs/shared/dflow-workflows/` — vendored workflow bundle with executable step definitions.
38
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.
39
+ For routine work (refactors, renames, chores, formatting, routine dependency
40
+ bumps, or general code questions), proceed normally; you need not read the guide
41
+ first. **Routine is narrower than it sounds** — it excludes anything a product
42
+ audience perceives (UI, email, exports, public docs such as a product README or
43
+ API reference, and operator surfaces like dashboard labels and alerts), where
44
+ **size is not the test**: a single-element wording or appearance change still
45
+ counts. It also excludes anything touching architecture, data structure, a
46
+ machine-consumed contract, a BR-ID, operational semantics (security / CVE,
47
+ safety, resilience, compliance, payment), or deliberate performance / resource /
48
+ SLA work. When unsure, read the guide's § Ceremony Scaling —
49
+ it decides, not this page.
41
50
 
42
51
  Keep tool-specific instruction files small. The guide and workflow bundle are
43
52
  the authoritative sources for Dflow workflow rules, slash-command behavior,
@@ -66,8 +75,8 @@ only how you invoke them differs):
66
75
 
67
76
  | Command | Use when |
68
77
  |---|---|
69
- | `/dflow:new-feature` | A new user-visible capability or business behavior is requested. |
70
- | `/dflow:modify-existing` | Existing behavior needs to change. |
78
+ | `/dflow:new-feature` | A genuinely new feature, page, or capability — a **newly created** navigable surface (its own route and its own content tree), a new user-executable domain operation, or a new independently-consumable output. Adding a control to an existing surface — or a menu entry pointing at a route that already exists — is modify-existing. |
79
+ | `/dflow:modify-existing` | Existing behavior or an existing surface changes — including adding a presentation / interaction control (copy button, filter, sort, quick-view) to an existing screen. |
71
80
  | `/dflow:bug-fix` | A defect can be described with expected vs actual behavior. |
72
81
  | `/dflow:new-phase` | An active feature needs another implementation slice. |
73
82
  | `/dflow:finish-feature` | Implementation is complete and needs drift closure. |
@@ -45,8 +45,17 @@ domain behavior, a new requirement, or a bug-fix workflow — read and follow:
45
45
  - `dflow/specs/shared/AI-AGENT-GUIDE.md` — command registry, routing rules, and project context.
46
46
  - `dflow/specs/shared/dflow-workflows/` — vendored workflow bundle with executable step definitions.
47
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.
48
+ For routine work (refactors, renames, chores, formatting, routine dependency
49
+ bumps, or general code questions), proceed normally; you need not read the guide
50
+ first. **Routine is narrower than it sounds** — it excludes anything a product
51
+ audience perceives (UI, email, exports, public docs such as a product README or
52
+ API reference, and operator surfaces like dashboard labels and alerts), where
53
+ **size is not the test**: a single-element wording or appearance change still
54
+ counts. It also excludes anything touching architecture, data structure, a
55
+ machine-consumed contract, a BR-ID, operational semantics (security / CVE,
56
+ safety, resilience, compliance, payment), or deliberate performance / resource /
57
+ SLA work. When unsure, read the guide's § Ceremony Scaling —
58
+ it decides, not this page.
50
59
 
51
60
  Keep tool-specific instruction files small. The guide and workflow bundle are
52
61
  the authoritative sources for Dflow workflow rules, slash-command behavior,
@@ -72,8 +81,8 @@ GitHub Copilot 有兩個介面,Dflow 在兩者的觸發與命令行為不同
72
81
 
73
82
  | 指令 | 適用情境 |
74
83
  |---|---|
75
- | `/dflow:new-feature` | 需要新增一個使用者可見的功能或業務行為。 |
76
- | `/dflow:modify-existing` | 需要修改現有行為。 |
84
+ | `/dflow:new-feature` | 真正新的功能、頁面或能力——**新建**的可導航介面(自有 route 且自有內容樹)、新的使用者可執行 domain 操作、或新的獨立可消費產出;對既有介面加控制項、或為既有 route 加選單入口,都屬 modify-existing。 |
85
+ | `/dflow:modify-existing` | 既有行為或既有介面要改——含對既有畫面加呈現/互動控制項(copy 按鈕、filter、排序、quick-view)。 |
77
86
  | `/dflow:bug-fix` | 可以用預期行為 vs 實際行為描述的缺陷。 |
78
87
  | `/dflow:new-phase` | 進行中的 feature 需要另一個實作 slice。 |
79
88
  | `/dflow:finish-feature` | 實作完成後需要進行漂移(drift)收尾。 |