dflow-sdd-ddd 0.13.0 → 0.15.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 (96) hide show
  1. package/CHANGELOG.md +824 -1
  2. package/CONTRIBUTING.md +16 -10
  3. package/README.en.md +156 -200
  4. package/README.md +89 -144
  5. package/TEMPLATE-COVERAGE.md +15 -8
  6. package/TEMPLATE-LANGUAGE-GLOSSARY.md +15 -1
  7. package/bin/dflow.js +36 -4
  8. package/docs/commands.en.md +110 -0
  9. package/docs/commands.md +101 -0
  10. package/docs/doctor-uncertainty.en.md +212 -0
  11. package/docs/doctor-uncertainty.md +212 -0
  12. package/docs/evaluating-dflow.en.md +29 -11
  13. package/docs/evaluating-dflow.md +8 -6
  14. package/docs/npm-publish-checklist.md +3 -1
  15. package/docs/release-versioning-policy.md +8 -2
  16. package/docs/upgrading.en.md +196 -0
  17. package/docs/upgrading.md +197 -0
  18. package/docs/using-with-claude-code.en.md +25 -10
  19. package/docs/using-with-claude-code.md +20 -7
  20. package/docs/using-with-codex.en.md +18 -6
  21. package/docs/using-with-codex.md +16 -5
  22. package/docs/using-with-github-copilot.en.md +25 -10
  23. package/docs/using-with-github-copilot.md +21 -8
  24. package/lib/doc-shapes.json +997 -0
  25. package/lib/doctor-checks.js +2654 -0
  26. package/lib/init.js +3583 -107
  27. package/lib/render-diagrams.js +1474 -0
  28. package/lib/render.js +865 -49
  29. package/package.json +2 -2
  30. package/templates/brownfield/references/drift-verification.md +4 -0
  31. package/templates/brownfield/references/finish-feature-flow.md +635 -88
  32. package/templates/brownfield/references/finish-feature-follow-up.md +60 -0
  33. package/templates/brownfield/references/finish-feature-minimal-host.md +406 -0
  34. package/templates/brownfield/references/finish-feature-post-hoc-hotfix.md +95 -0
  35. package/templates/brownfield/references/git-integration.md +160 -15
  36. package/templates/brownfield/references/init-project-flow.md +26 -4
  37. package/templates/brownfield/references/modify-existing-flow.md +412 -87
  38. package/templates/brownfield/references/modify-existing-follow-up.md +121 -0
  39. package/templates/brownfield/references/modify-existing-post-hoc-hotfix.md +82 -0
  40. package/templates/brownfield/references/new-feature-flow.md +61 -6
  41. package/templates/brownfield/references/new-phase-flow.md +57 -7
  42. package/templates/brownfield/references/pr-review-checklist.md +303 -10
  43. package/templates/brownfield/scaffolding/AI-AGENT-GUIDE.md +158 -34
  44. package/templates/brownfield/scaffolding/CLAUDE-md-snippet.md +1 -1
  45. package/templates/brownfield/scaffolding/Git-principles-gitflow.md +75 -6
  46. package/templates/brownfield/scaffolding/Git-principles-trunk.md +82 -8
  47. package/templates/brownfield/scaffolding/_conventions.md +50 -28
  48. package/templates/brownfield/scaffolding/_overview.md +1 -0
  49. package/templates/brownfield/templates/_index.md +151 -7
  50. package/templates/brownfield/templates/analysis.md +79 -0
  51. package/templates/brownfield/templates/behavior.md +1 -0
  52. package/templates/brownfield/templates/context-definition.md +1 -0
  53. package/templates/brownfield/templates/context-map.md +2 -1
  54. package/templates/brownfield/templates/glossary.md +1 -0
  55. package/templates/brownfield/templates/lightweight-spec.md +154 -11
  56. package/templates/brownfield/templates/models.md +1 -0
  57. package/templates/brownfield/templates/phase-spec.md +9 -1
  58. package/templates/brownfield/templates/rules.md +1 -0
  59. package/templates/brownfield/templates/tech-debt.md +1 -0
  60. package/templates/common/references/ddd-modeling-guide.md +33 -16
  61. package/templates/{greenfield → common}/references/dflow-feedback-flow.md +2 -1
  62. package/templates/common/references/flow-rationale-registry.md +130 -0
  63. package/templates/common/skill/SKILL.md +13 -11
  64. package/templates/greenfield/references/drift-verification.md +4 -0
  65. package/templates/greenfield/references/finish-feature-flow.md +625 -89
  66. package/templates/greenfield/references/finish-feature-follow-up.md +60 -0
  67. package/templates/greenfield/references/finish-feature-minimal-host.md +363 -0
  68. package/templates/greenfield/references/finish-feature-post-hoc-hotfix.md +95 -0
  69. package/templates/greenfield/references/git-integration.md +148 -15
  70. package/templates/greenfield/references/init-project-flow.md +28 -8
  71. package/templates/greenfield/references/modify-existing-flow.md +378 -85
  72. package/templates/greenfield/references/modify-existing-follow-up.md +103 -0
  73. package/templates/greenfield/references/modify-existing-post-hoc-hotfix.md +82 -0
  74. package/templates/greenfield/references/new-feature-flow.md +67 -4
  75. package/templates/greenfield/references/new-phase-flow.md +56 -7
  76. package/templates/greenfield/references/pr-review-checklist.md +287 -8
  77. package/templates/greenfield/scaffolding/AI-AGENT-GUIDE.md +153 -32
  78. package/templates/greenfield/scaffolding/CLAUDE-md-snippet.md +5 -2
  79. package/templates/greenfield/scaffolding/Git-principles-gitflow.md +74 -6
  80. package/templates/greenfield/scaffolding/Git-principles-trunk.md +88 -12
  81. package/templates/greenfield/scaffolding/_conventions.md +50 -28
  82. package/templates/greenfield/scaffolding/_overview.md +6 -2
  83. package/templates/greenfield/templates/_index.md +137 -7
  84. package/templates/greenfield/templates/aggregate-design.md +1 -0
  85. package/templates/greenfield/templates/analysis.md +79 -0
  86. package/templates/greenfield/templates/behavior.md +1 -0
  87. package/templates/greenfield/templates/context-definition.md +1 -0
  88. package/templates/greenfield/templates/context-map.md +2 -1
  89. package/templates/greenfield/templates/events.md +4 -1
  90. package/templates/greenfield/templates/glossary.md +1 -0
  91. package/templates/greenfield/templates/lightweight-spec.md +154 -11
  92. package/templates/greenfield/templates/models.md +1 -0
  93. package/templates/greenfield/templates/phase-spec.md +9 -1
  94. package/templates/greenfield/templates/rules.md +1 -0
  95. package/templates/greenfield/templates/tech-debt.md +1 -0
  96. package/templates/brownfield/references/dflow-feedback-flow.md +0 -251
@@ -1,251 +0,0 @@
1
- # Dflow Feedback Draft Flow
2
-
3
- `/dflow:report-dflow-feedback` helps the developer turn a Dflow problem or
4
- improvement observed during real project work into a high-quality upstream
5
- feedback draft. The draft is rendered **field by field to match the upstream
6
- GitHub issue form**, so the developer pastes each field with no reformatting.
7
-
8
- This flow is **not** a project feature workflow and does not change the
9
- application being built. It is a standalone governance/support flow for Dflow
10
- itself.
11
-
12
- ## Hard Boundaries
13
-
14
- - Do not submit anything to GitHub automatically.
15
- - Do not run `gh issue create`, `gh pr create`, `git push`, or any networked
16
- submission command from this flow.
17
- - Do not expose private project details, business rules, customer data,
18
- secrets, tokens, internal URLs, or proprietary source snippets.
19
- - Always show the draft to the developer before anything leaves the local
20
- machine.
21
- - If the developer later asks to submit through GitHub CLI, stop and treat that
22
- as a separate explicit task with fresh permission and environment checks.
23
-
24
- ## Trigger Conditions
25
-
26
- Enter this flow when:
27
-
28
- - The developer explicitly runs `/dflow:report-dflow-feedback`.
29
- - The developer says the Dflow process, template, generated file, or docs seem
30
- wrong or improvable.
31
- - The AI notices a clear contradiction or gap in Dflow guidance and asks:
32
- "This looks like a possible Dflow upstream issue. Should I draft feedback for
33
- you to review?"
34
-
35
- Do not interrupt normal development for minor preference differences. If the
36
- observation is speculative, ask before drafting.
37
-
38
- ## Output Location
39
-
40
- Write the draft to:
41
-
42
- ```text
43
- dflow/feedback/dflow-feedback-YYYY-MM-DD-{slug}.md
44
- ```
45
-
46
- Create `dflow/feedback/` if it does not exist. The file is local project
47
- working material; the developer decides whether to copy it into a GitHub issue,
48
- turn it into a PR, or discard it.
49
-
50
- ## Step 1: Classify the Feedback
51
-
52
- Classify the feedback as one of the following. Each maps to one upstream issue
53
- form (see "Upstream Issue Forms" below):
54
-
55
- | Classification | Upstream issue form | Title prefix |
56
- |---|---|---|
57
- | Bug report | Bug report | `[Bug]: ` |
58
- | Workflow change request | Workflow change request | `[Workflow]: ` |
59
- | Documentation feedback | Documentation feedback | `[Docs]: ` |
60
- | Question / unclear usage | Question | `[Question]: ` |
61
- | Maintainer release/process feedback | Workflow change request (closest form; the upstream repo disables blank issues) | `[Workflow]: ` |
62
-
63
- Capture:
64
-
65
- - Observed during which flow or command
66
- - Affected Dflow track: Greenfield, Brownfield, both, or unknown
67
- - Affected area: CLI, generated template, scaffolding, skill reference,
68
- tutorial, README/docs, release/governance
69
- - Whether the issue blocks current project work
70
-
71
- ## Step 2: Capture Evidence Safely
72
-
73
- Collect only the evidence needed to explain the Dflow issue.
74
-
75
- Allowed evidence:
76
-
77
- - Dflow command name
78
- - Dflow version if known
79
- - Template or reference file name
80
- - Generic project type, such as "existing brownfield app" or "legacy batch-processing system"
81
- - Minimal paraphrased symptom
82
- - Short sanitized snippets from Dflow-owned files
83
-
84
- Avoid:
85
-
86
- - Internal business rules
87
- - Customer or tenant names
88
- - Private repository names or URLs
89
- - Secrets, tokens, credentials, or auth headers
90
- - Long proprietary code snippets
91
- - Full logs containing private paths or environment data
92
-
93
- ## Step 3: Redaction Pass
94
-
95
- Before writing any field content, run a redaction check and use it as your own
96
- gate. Confirm there are:
97
-
98
- - No secrets, tokens, credentials, or auth headers
99
- - No customer, tenant, or private organization names
100
- - No proprietary business rules beyond a sanitized paraphrase
101
- - No private repository URLs or internal hostnames
102
- - No long proprietary source snippets
103
-
104
- The draft ends with a short submitter self-check (Step 5); leave its items
105
- unchecked unless the developer explicitly confirms them.
106
-
107
- ## Step 4: Resolve the Target Issue Form
108
-
109
- Submit upstream at: **https://github.com/weilung/dflow-sdd-ddd/issues/new/choose**
110
-
111
- Resolve the field schema for the chosen form using this priority chain (it
112
- avoids any network dependency at draft time):
113
-
114
- 1. **Live upstream schema** — if you can read the target repo's
115
- `.github/ISSUE_TEMPLATE/*.yml` (for example you are working inside a
116
- `dflow-sdd-ddd` checkout), use that file; it is authoritative.
117
- 2. **Bundled field map** — otherwise use the field map in "Upstream Issue
118
- Forms" below. It is a snapshot of the upstream forms shipped with Dflow.
119
- 3. **Generic fallback** — only if the feedback matches none of the forms, use
120
- Step 6.
121
-
122
- ## Step 5: Render the Draft Field by Field
123
-
124
- Write the draft as one block per upstream field, in the form's field order, so
125
- the developer copies each block straight into the matching field.
126
-
127
- Per field-type rules:
128
-
129
- | Field type | How to render |
130
- |---|---|
131
- | `input` | One short line inside a fenced block. |
132
- | `textarea` | Multi-line content inside a fenced block. If the field sets a non-empty `render:` attribute, do **not** add an extra fence (the form already code-blocks it). |
133
- | `dropdown` | State the **recommended option** plus a one-line reason. If `multiple: true`, list the chosen options. |
134
- | `checkboxes` | List every option as `- [x]` / `- [ ]`; mark any option whose schema sets `required: true`. |
135
- | `markdown` | Display-only text in the form — produce **no** field block for it. |
136
- | upload / attachment | Emit a manual step ("drag the relevant screenshot / log into the issue editor"); do not try to handle the file. |
137
-
138
- Always start with a **Title** block: the form's title prefix plus a concise
139
- one-line summary. GitHub pre-fills the prefix in the title box; the developer
140
- can paste the full line over it.
141
-
142
- Attribute handling: bring `value` / `default` in as starting content; surface
143
- `placeholder` as a hint; append "(required)" to the block heading when the
144
- field sets `required: true`.
145
-
146
- **Fence escaping (dynamic).** Wrap each field's content in a backtick fence
147
- whose length is *(longest backtick run in the content) + 1*, minimum 3. The
148
- fence is only a local wrapper so the content survives in the draft file — when
149
- pasting into the issue form, the developer copies the **inner** content, not
150
- the fence. State this in the draft.
151
-
152
- Draft skeleton:
153
-
154
- ````markdown
155
- # {Issue form name} — {short title}
156
-
157
- ## Where to submit
158
-
159
- https://github.com/weilung/dflow-sdd-ddd/issues/new/choose → choose
160
- **"{Issue form name}"**. (A GitHub account is all you need; the title is
161
- auto-prefixed with `{prefix}`.)
162
-
163
- ## Title
164
-
165
- ```
166
- {prefix}{concise one-line summary}
167
- ```
168
-
169
- ## {Field label} (required)
170
-
171
- ```
172
- {field content; copy the inner text only, not this fence}
173
- ```
174
-
175
- ... one block per field, in form order ...
176
-
177
- ## Before you submit (submitter self-check)
178
-
179
- - [ ] Any real file names / customer names / internal project code names to redact?
180
- - [ ] If you attach screenshots, do they show sensitive content (internal systems, tokens, passwords)?
181
- - [ ] Is opening a public issue within what your organization allows?
182
- ````
183
-
184
- Keep the draft **submitter-facing only**: no maintainer tracking notes, no
185
- internal references, no "for your friend / for yourself" audience switches.
186
-
187
- ## Upstream Issue Forms (bundled field map)
188
-
189
- > Snapshot of the `weilung/dflow-sdd-ddd` issue forms. If the live `.yml` is
190
- > reachable (Step 4 priority 1), prefer it. Resync this map when the upstream
191
- > forms change.
192
-
193
- ### Bug report — title `[Bug]: `
194
-
195
- | Field | Type | Required | Notes |
196
- |---|---|---|---|
197
- | Dflow version | input | yes | placeholder `0.2.0` |
198
- | Node.js version | input | yes | from `node --version` |
199
- | Project track | dropdown | yes | Greenfield / Brownfield / Not sure |
200
- | Command or workflow | textarea | yes | the command or `/dflow:*` workflow used |
201
- | Expected behavior | textarea | yes | |
202
- | Actual behavior | textarea | yes | include relevant output |
203
- | Reproduction steps | textarea | yes | smallest steps that reproduce |
204
- | Additional context | textarea | no | screenshots / snippets / environment |
205
-
206
- ### Workflow change request — title `[Workflow]: `
207
-
208
- | Field | Type | Required | Notes |
209
- |---|---|---|---|
210
- | Problem | textarea | yes | |
211
- | Proposed change | textarea | yes | |
212
- | Affected track | dropdown | yes | Greenfield / Brownfield / Both / Not sure |
213
- | Affected area | checkboxes | no | CLI command / Generated template / Generated scaffolding / Skill workflow guidance / Tutorial or examples / Documentation only |
214
- | Compatibility risk | textarea | yes | |
215
- | Alternatives considered | textarea | no | |
216
-
217
- ### Documentation feedback — title `[Docs]: `
218
-
219
- | Field | Type | Required | Notes |
220
- |---|---|---|---|
221
- | Affected page or file | input | yes | placeholder `README.md` |
222
- | Reader goal | textarea | yes | what you were trying to understand or do |
223
- | What was confusing? | textarea | yes | the missing, unclear, or misleading part |
224
- | Suggested improvement | textarea | no | optional wording or structure |
225
-
226
- ### Question — title `[Question]: `
227
-
228
- | Field | Type | Required | Notes |
229
- |---|---|---|---|
230
- | Project type | dropdown | yes | New project / Existing project / Not sure |
231
- | Dflow track you are considering | dropdown | yes | Greenfield / Brownfield / Not sure |
232
- | What are you trying to do? | textarea | yes | the workflow or decision you need help with |
233
- | Project context | textarea | no | framework, team workflow, AI agent, constraints |
234
-
235
- ## Step 6: Generic Fallback
236
-
237
- Use this only when the feedback matches none of the forms above. The upstream
238
- repo disables blank issues, so direct the developer to pick the closest form at
239
- `https://github.com/weilung/dflow-sdd-ddd/issues/new/choose` and adapt. Emit
240
- two paste-ready blocks — a `Title` and a `Body` — plus the URL. Do **not** fall
241
- back to a generic `## Problem` / `## Evidence` Markdown draft.
242
-
243
- ## Step 7: Present Submission Options
244
-
245
- After writing the draft, name the draft file path and whether any submitter
246
- self-check items remain unchecked, then summarize the options:
247
-
248
- - Open the chosen issue form and paste each field block.
249
- - Discard the draft if it was only a local observation.
250
-
251
- Do not submit anything automatically.