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,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
`/dflow:report-dflow-feedback` helps the developer turn a Dflow problem or
|
|
4
4
|
improvement observed during real project work into a high-quality upstream
|
|
5
|
-
feedback draft.
|
|
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.
|
|
6
7
|
|
|
7
8
|
This flow is **not** a project feature workflow and does not change the
|
|
8
9
|
application being built. It is a standalone governance/support flow for Dflow
|
|
@@ -48,13 +49,16 @@ turn it into a PR, or discard it.
|
|
|
48
49
|
|
|
49
50
|
## Step 1: Classify the Feedback
|
|
50
51
|
|
|
51
|
-
Classify the feedback as one of
|
|
52
|
+
Classify the feedback as one of the following. Each maps to one upstream issue
|
|
53
|
+
form (see "Upstream Issue Forms" below):
|
|
52
54
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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]: ` |
|
|
58
62
|
|
|
59
63
|
Capture:
|
|
60
64
|
|
|
@@ -88,92 +92,160 @@ Avoid:
|
|
|
88
92
|
|
|
89
93
|
## Step 3: Redaction Pass
|
|
90
94
|
|
|
91
|
-
Before writing
|
|
92
|
-
|
|
95
|
+
Before writing any field content, run a redaction check and use it as your own
|
|
96
|
+
gate. Confirm there are:
|
|
93
97
|
|
|
94
|
-
|
|
95
|
-
|
|
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
|
|
96
103
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
- [ ] No long proprietary source snippets
|
|
102
|
-
- [ ] Developer reviewed before submission
|
|
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
|
|
104
108
|
|
|
105
|
-
|
|
106
|
-
developer explicitly confirms it.
|
|
109
|
+
Submit upstream at: **https://github.com/weilung/dflow-sdd-ddd/issues/new/choose**
|
|
107
110
|
|
|
108
|
-
|
|
111
|
+
Resolve the field schema for the chosen form using this priority chain (it
|
|
112
|
+
avoids any network dependency at draft time):
|
|
109
113
|
|
|
110
|
-
|
|
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.
|
|
111
121
|
|
|
112
|
-
|
|
113
|
-
# Dflow Feedback Draft: {short-title}
|
|
122
|
+
## Step 5: Render the Draft Field by Field
|
|
114
123
|
|
|
115
|
-
|
|
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.
|
|
116
126
|
|
|
117
|
-
|
|
127
|
+
Per field-type rules:
|
|
118
128
|
|
|
119
|
-
|
|
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. |
|
|
120
137
|
|
|
121
|
-
|
|
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.
|
|
122
141
|
|
|
123
|
-
|
|
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`.
|
|
124
145
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
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.
|
|
129
151
|
|
|
130
|
-
|
|
152
|
+
Draft skeleton:
|
|
131
153
|
|
|
132
|
-
|
|
133
|
-
|
|
154
|
+
````markdown
|
|
155
|
+
# {Issue form name} — {short title}
|
|
134
156
|
|
|
135
|
-
##
|
|
157
|
+
## Where to submit
|
|
136
158
|
|
|
137
|
-
|
|
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}`.)
|
|
138
162
|
|
|
139
|
-
##
|
|
163
|
+
## Title
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
{prefix}{concise one-line summary}
|
|
167
|
+
```
|
|
140
168
|
|
|
141
|
-
{
|
|
169
|
+
## {Field label} (required)
|
|
142
170
|
|
|
143
|
-
|
|
171
|
+
```
|
|
172
|
+
{field content; copy the inner text only, not this fence}
|
|
173
|
+
```
|
|
144
174
|
|
|
145
|
-
|
|
175
|
+
... one block per field, in form order ...
|
|
146
176
|
|
|
147
|
-
##
|
|
177
|
+
## Before you submit (submitter self-check)
|
|
148
178
|
|
|
149
|
-
|
|
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
|
+
````
|
|
150
183
|
|
|
151
|
-
|
|
184
|
+
Keep the draft **submitter-facing only**: no maintainer tracking notes, no
|
|
185
|
+
internal references, no "for your friend / for yourself" audience switches.
|
|
152
186
|
|
|
153
|
-
|
|
187
|
+
## Upstream Issue Forms (bundled field map)
|
|
154
188
|
|
|
155
|
-
|
|
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.
|
|
156
192
|
|
|
157
|
-
|
|
193
|
+
### Bug report — title `[Bug]: `
|
|
158
194
|
|
|
159
|
-
|
|
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 |
|
|
160
205
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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.
|
|
168
242
|
|
|
169
|
-
## Step
|
|
243
|
+
## Step 7: Present Submission Options
|
|
170
244
|
|
|
171
|
-
After writing the draft,
|
|
245
|
+
After writing the draft, name the draft file path and whether any submitter
|
|
246
|
+
self-check items remain unchecked, then summarize the options:
|
|
172
247
|
|
|
173
|
-
-
|
|
174
|
-
- Use the optional PR plan as implementation guidance in a Dflow source
|
|
175
|
-
checkout.
|
|
248
|
+
- Open the chosen issue form and paste each field block.
|
|
176
249
|
- Discard the draft if it was only a local observation.
|
|
177
250
|
|
|
178
|
-
Do not submit anything automatically.
|
|
179
|
-
whether any redaction checklist items remain unchecked.
|
|
251
|
+
Do not submit anything automatically.
|
|
@@ -180,10 +180,7 @@ Recommended trigger points (not enforced — developer's judgment):
|
|
|
180
180
|
This command operates entirely within `dflow/specs/domain/{context}/` files
|
|
181
181
|
(`rules.md`, `behavior.md`, and the `events.md` bonus check). It does
|
|
182
182
|
**not** read from `dflow/specs/features/active/{SPEC-ID}-{slug}/` directories
|
|
183
|
-
— the feature directory layout is not part of verify's input.
|
|
184
|
-
command is ensuring `last-updated` dates in `behavior.md` are bumped at
|
|
185
|
-
`/dflow:finish-feature` time (so verify's mechanical drift guard stays
|
|
186
|
-
useful).
|
|
183
|
+
— the feature directory layout is not part of verify's input.
|
|
187
184
|
|
|
188
185
|
## Interaction with Other Commands
|
|
189
186
|
|
|
@@ -11,10 +11,18 @@ state, archives the feature directory, and emits a Git-strategy-neutral
|
|
|
11
11
|
**Integration Summary** for the developer's PR / merge / push step.
|
|
12
12
|
|
|
13
13
|
**Important boundaries**:
|
|
14
|
-
- This command **does not auto-merge
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
- This command **does not auto-merge** and never pushes or opens a PR on its
|
|
15
|
+
own. Merge strategy follows the team's selected Git policy (`gitflow` /
|
|
16
|
+
`trunk`, recorded in `dflow/specs/shared/_conventions.md` § Git Policy).
|
|
17
|
+
- Closeout is split into two gates so it works offline: a **Local-closeout
|
|
18
|
+
gate** (Steps 1–4: validation, status flip, BC sync, archive + an optional
|
|
19
|
+
commit checkpoint — all doable with no network) and an **Integration / PR
|
|
20
|
+
gate** (Step 5: push / merge / PR — needs network; the AI only runs
|
|
21
|
+
`git push` / `gh pr create` when you explicitly ask).
|
|
22
|
+
- At the archive checkpoint the AI may offer to commit using your Git identity;
|
|
23
|
+
you can always decline. The commit marker mode is read from `_conventions.md`
|
|
24
|
+
§ AI Commit Policy. This replaces Dflow's earlier "the AI never commits"
|
|
25
|
+
stance — the AI helps at natural checkpoints, you keep the final say.
|
|
18
26
|
- The BC-layer sync in Step 3 **reuses the existing Step 5.3 mechanism**
|
|
19
27
|
from `new-feature-flow` (Step 8.3) and `modify-existing-flow` (Step
|
|
20
28
|
5.3) — it does not introduce a new sync flow. Treat it as "lift Step
|
|
@@ -27,7 +35,7 @@ state, archives the feature directory, and emits a Git-strategy-neutral
|
|
|
27
35
|
- Step 5 → Step 6 (Integration Summary emitted → optional follow-up reverse-link)
|
|
28
36
|
|
|
29
37
|
All other step transitions are **step-internal**: announce "Step N complete,
|
|
30
|
-
entering Step N+1" and proceed without waiting. See
|
|
38
|
+
entering Step N+1" and proceed without waiting. See AI-AGENT-GUIDE.md § Workflow
|
|
31
39
|
Transparency for the full transparency protocol and confirmation signals.
|
|
32
40
|
|
|
33
41
|
## Step 1: Validate Phase Specs and `_index.md`
|
|
@@ -42,8 +50,8 @@ AI runs mechanical checks first. Report `✓` / `✗` for every item; if any
|
|
|
42
50
|
proceeding (do not flip status, do not archive, do not emit summary).
|
|
43
51
|
|
|
44
52
|
- [ ] Locate the feature directory at `dflow/specs/features/active/{SPEC-ID}-{slug}/`
|
|
45
|
-
- [ ] `_index.md` exists and parses (YAML front matter intact,
|
|
46
|
-
sections present)
|
|
53
|
+
- [ ] `_index.md` exists and parses (YAML front matter intact, seven required
|
|
54
|
+
sections present, including the Checkpoint Log)
|
|
47
55
|
- [ ] Every row in `_index.md` Phase Specs table has Status = `completed`
|
|
48
56
|
- [ ] Every phase-spec file referenced in the Phase Specs table exists at
|
|
49
57
|
the path the table claims
|
|
@@ -89,7 +97,7 @@ Also update the **Resume Pointer** to reflect closeout:
|
|
|
89
97
|
|
|
90
98
|
```
|
|
91
99
|
**Current Progress**: feature completed ({date}); all phase-specs status = completed.
|
|
92
|
-
**Next Action**: merge /
|
|
100
|
+
**Next Action**: integration — push / merge / PR per the selected Git policy.
|
|
93
101
|
```
|
|
94
102
|
|
|
95
103
|
**→ Transition (step-internal)**: Step 2 complete. Announce "Step 2 complete (status flipped). Entering Step 3: Sync BR Snapshot to BC layer." and continue.
|
|
@@ -119,6 +127,8 @@ For each row in Current BR Snapshot where Status = `active`:
|
|
|
119
127
|
`rules.md` (REMOVED rule)
|
|
120
128
|
- For any RENAMED BR-ID → rename the BR-ID in `rules.md` and update
|
|
121
129
|
`glossary.md` if the term itself changed
|
|
130
|
+
- For every BR-ID added, modified, or renamed above, set its `Last updated`
|
|
131
|
+
date in `rules.md`'s Rule Index to today
|
|
122
132
|
|
|
123
133
|
For `behavior.md`:
|
|
124
134
|
|
|
@@ -128,7 +138,6 @@ For `behavior.md`:
|
|
|
128
138
|
transitions and Domain Events as appropriate
|
|
129
139
|
- For REMOVED BR-IDs, delete the corresponding scenario section from
|
|
130
140
|
`behavior.md`
|
|
131
|
-
- Update the BR-ID anchor's `last-updated` date in `behavior.md` to today
|
|
132
141
|
|
|
133
142
|
For `events.md`:
|
|
134
143
|
- Add any new Domain Events introduced by phase-specs in this feature
|
|
@@ -187,11 +196,34 @@ the full rule set.
|
|
|
187
196
|
After the move, also `git add` any modified files from Step 3 (the
|
|
188
197
|
updated `rules.md`, `behavior.md`, `events.md`, `context-map.md`,
|
|
189
198
|
`glossary.md`, `architecture/tech-debt.md`, etc.) into the same stage.
|
|
190
|
-
AI **does not commit** — the developer commits in their own preferred
|
|
191
|
-
manner (and the project's Git-principles decide whether one commit or
|
|
192
|
-
several).
|
|
193
199
|
|
|
194
|
-
|
|
200
|
+
**Closeout commit checkpoint** (completes the offline Local-closeout gate):
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
✓ Feature archived to completed/ and closeout files staged
|
|
204
|
+
Commit this closeout now?
|
|
205
|
+
[Y] Yes — the AI commits with your Git identity (marker per _conventions.md § AI Commit Policy)
|
|
206
|
+
[N] No — skip; you commit yourself
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Whether you choose Y or N, record one row in the feature `_index.md`
|
|
210
|
+
Checkpoint Log (`closeout | committed ({hash})` or `closeout | skipped`). Only
|
|
211
|
+
write a hash after the commit actually succeeds; if a pre-commit hook rejects it
|
|
212
|
+
or the commit fails, record `failed` and surface the error — never write a fake
|
|
213
|
+
hash.
|
|
214
|
+
|
|
215
|
+
The Local-closeout gate is satisfied **only when the closeout is committed**:
|
|
216
|
+
closeout complete, Checkpoint Log updated, and the working tree clean (no
|
|
217
|
+
uncommitted changes). If you declined the commit (chose N) or it failed,
|
|
218
|
+
Local-closeout is **not** satisfied yet — commit the staged closeout yourself
|
|
219
|
+
before continuing; do not enter the Integration / PR gate with uncommitted
|
|
220
|
+
changes. Once committed, the gate stands on its own offline; integration happens
|
|
221
|
+
in Step 5 when you have network.
|
|
222
|
+
|
|
223
|
+
**→ Transition (step-internal)**: Step 4 complete. Branch on whether the closeout commit landed:
|
|
224
|
+
|
|
225
|
+
- **Closeout commit landed (working tree clean)** → announce "Step 4 complete (feature archived; Local-closeout gate satisfied). Entering Step 5: Integration / PR gate." and continue.
|
|
226
|
+
- **Closeout commit was declined (N) or failed** → **stop here.** Announce "Step 4 complete (feature archived), but the Local-closeout gate is not satisfied yet — the closeout is staged but uncommitted. Commit those changes (or address the failure), then resume to Step 5." Do **not** enter Step 5 with uncommitted closeout changes.
|
|
195
227
|
|
|
196
228
|
## Step 5: Emit Integration Summary (Git-strategy-neutral)
|
|
197
229
|
|
|
@@ -200,10 +232,10 @@ Produce a plain-text summary of what this feature did. The summary is
|
|
|
200
232
|
developer adapts to whichever merge strategy their project uses
|
|
201
233
|
(merge commit, squash, rebase, fast-forward — Dflow stays neutral).
|
|
202
234
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
235
|
+
The selected Git policy's `Git-principles-{gitflow|trunk}.md` (seeded at init
|
|
236
|
+
under `dflow/specs/shared/`) explains, in its "Integration Commit Message
|
|
237
|
+
Conventions" section, how to format the actual commit / merge message from this
|
|
238
|
+
summary.
|
|
207
239
|
|
|
208
240
|
Format:
|
|
209
241
|
|
|
@@ -233,10 +265,11 @@ Phase List:
|
|
|
233
265
|
- phase-2 ({date}): {phase-slug} — {1 line}
|
|
234
266
|
- ...
|
|
235
267
|
|
|
236
|
-
Next Steps (developer):
|
|
237
|
-
- Per the
|
|
238
|
-
squash / rebase / fast-forward) and execute
|
|
239
|
-
- Push to remote / open a PR
|
|
268
|
+
Next Steps (developer) — Integration / PR gate (needs network):
|
|
269
|
+
- Per the selected Git policy (`gitflow` / `trunk` in `_conventions.md`), choose
|
|
270
|
+
a merge strategy (merge commit / squash / rebase / fast-forward) and execute
|
|
271
|
+
- Push to remote / open a PR — the AI can run `git push` / `gh pr create` for
|
|
272
|
+
you, but only when you explicitly ask; it never pushes on its own
|
|
240
273
|
```
|
|
241
274
|
|
|
242
275
|
Print the summary to the conversation; do not write it to a file (it is
|
|
@@ -254,7 +287,9 @@ the developer:
|
|
|
254
287
|
If no `follow-up-of` field, skip Step 6 and announce closeout complete:
|
|
255
288
|
> "`/dflow:finish-feature` complete for `{SPEC-ID}-{slug}`. Feature
|
|
256
289
|
> directory is now at `dflow/specs/features/completed/{SPEC-ID}-{slug}/`.
|
|
257
|
-
>
|
|
290
|
+
> If you skipped the closeout commit, commit the staged changes first to
|
|
291
|
+
> finish the Local-closeout gate. Then integration — merge / push / PR —
|
|
292
|
+
> follows the selected Git policy, at your discretion."
|
|
258
293
|
|
|
259
294
|
## Step 6: Reverse-Update Follow-up Tracking (only if follow-up)
|
|
260
295
|
|
|
@@ -267,7 +302,7 @@ Follow-up Tracking table.
|
|
|
267
302
|
3. Flip Status → `completed`
|
|
268
303
|
|
|
269
304
|
```bash
|
|
270
|
-
# AI
|
|
305
|
+
# The AI makes the edit and may offer to commit it (Y / N), per the AI commit policy
|
|
271
306
|
```
|
|
272
307
|
|
|
273
308
|
After the update:
|
|
@@ -7,9 +7,10 @@ project's Git *branching strategy* (Git Flow, GitHub Flow, trunk-based,
|
|
|
7
7
|
etc.) — it only prescribes the feature-branch-per-feature convention
|
|
8
8
|
that SDD traceability depends on.
|
|
9
9
|
|
|
10
|
-
>
|
|
11
|
-
>
|
|
12
|
-
>
|
|
10
|
+
> Dflow does not pick `gitflow` vs `trunk` for you, but it now requires you to
|
|
11
|
+
> record one at `dflow init` so the runtime branch gate and finish-stage merge
|
|
12
|
+
> guidance can adapt. The selected policy's `Git-principles-{gitflow|trunk}.md`
|
|
13
|
+
> is seeded under `dflow/specs/shared/`.
|
|
13
14
|
|
|
14
15
|
## Branch-to-Workflow Mapping
|
|
15
16
|
|
|
@@ -104,6 +105,64 @@ This requirement is independent of the branching strategy — whether you
|
|
|
104
105
|
branch off `develop`, `main`, or something else, the feature-per-branch
|
|
105
106
|
convention stays.
|
|
106
107
|
|
|
108
|
+
## Commit Checkpoints, Branch Gate & AI Commits
|
|
109
|
+
|
|
110
|
+
Dflow actively helps keep the Git trace aligned with the workflow — the AI
|
|
111
|
+
reminds, can do the work, and leaves policy to the team.
|
|
112
|
+
|
|
113
|
+
### Branch gate
|
|
114
|
+
|
|
115
|
+
Before implementation starts (and before the first commit), the AI checks
|
|
116
|
+
whether the current branch is the feature / bugfix branch this work belongs to.
|
|
117
|
+
Both Git policies (`gitflow` / `trunk`, per `dflow/specs/shared/_conventions.md`
|
|
118
|
+
§ Git Policy) use a feature branch, so:
|
|
119
|
+
|
|
120
|
+
- **Already on the matching `feature/{SPEC-ID}-{slug}` (or
|
|
121
|
+
`bugfix/{BUG-ID}-{slug}`) branch** — e.g. continuing an active feature with
|
|
122
|
+
`new-phase`, `modify-existing`, or `bug-fix` — the gate is satisfied; nothing
|
|
123
|
+
is created or switched.
|
|
124
|
+
- **Not on this work's feature / bugfix branch** (you are on the base branch the
|
|
125
|
+
project cuts features from — `main` / `develop` / `trunk`, or whatever your
|
|
126
|
+
policy uses — or on an unrelated branch) — the AI offers to create and switch
|
|
127
|
+
to the correct branch, switch to an existing matching one, or override and
|
|
128
|
+
stay (recorded in the feature `_index.md` Checkpoint Log; three consecutive
|
|
129
|
+
overrides → the AI suggests re-running `dflow init`, never changing the
|
|
130
|
+
setting on its own).
|
|
131
|
+
|
|
132
|
+
Dflow does not need to identify your base branch to evaluate the gate — it only
|
|
133
|
+
checks whether you are on the right feature branch. The base branch matters only
|
|
134
|
+
when a new branch is actually created, and which base to cut from is your
|
|
135
|
+
project's decision (GitFlow → `develop`, Trunk / GitHub Flow → `main`).
|
|
136
|
+
|
|
137
|
+
### Commit checkpoints
|
|
138
|
+
|
|
139
|
+
At lifecycle milestones the AI offers a commit checkpoint, folded into the
|
|
140
|
+
existing Step Gate prompt (it does not add a separate question):
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
✓ {milestone} complete
|
|
144
|
+
Commit here?
|
|
145
|
+
[Y] Yes — the AI commits with your Git identity (marker per _conventions.md § AI Commit Policy)
|
|
146
|
+
[N] No — skip this checkpoint
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Tier sets how many checkpoints a change has: T1 three (spec / implementation /
|
|
150
|
+
closeout), T2 two (spec+implementation merged / closeout), T3 a single commit.
|
|
151
|
+
Whether you choose Y or N, the AI records one row in the feature `_index.md`
|
|
152
|
+
Checkpoint Log. A commit hash is written only after the commit succeeds; a hook
|
|
153
|
+
rejection or failed commit is recorded as `failed` (never a fake hash). After
|
|
154
|
+
several consecutive skips in a project the AI mentions you can turn checkpoints
|
|
155
|
+
off in config — it does not turn them off for you.
|
|
156
|
+
|
|
157
|
+
### AI commits
|
|
158
|
+
|
|
159
|
+
The AI may commit at these checkpoints using your Git identity; you can always
|
|
160
|
+
decline. How AI commits are marked is the `## AI Commit Policy` setting in
|
|
161
|
+
`_conventions.md` (`none` / `co-authored-by` / `prefix`), chosen once at init.
|
|
162
|
+
This is a deliberate reversal of Dflow's earlier "the AI never commits" stance:
|
|
163
|
+
the AI helps at natural break points, while merge / push / PR still follow the
|
|
164
|
+
team's policy and your explicit go-ahead.
|
|
165
|
+
|
|
107
166
|
## Directory Moves Must Use `git mv`
|
|
108
167
|
|
|
109
168
|
When you rename or move a directory or file that is tracked in Dflow
|
|
@@ -123,7 +182,6 @@ diff. That breaks:
|
|
|
123
182
|
- `git blame` on lines that crossed the rename boundary
|
|
124
183
|
- PR diff quality (reviewers see two unrelated big-blob changes
|
|
125
184
|
instead of one rename + small content diff)
|
|
126
|
-
- `/dflow:verify` and other tools that walk feature history
|
|
127
185
|
|
|
128
186
|
This is a known weakness of OpenSpec's directory-rename pattern; Dflow
|
|
129
187
|
deliberately avoids it by mandating `git mv`.
|
|
@@ -245,9 +303,9 @@ with the rule.
|
|
|
245
303
|
Domain
|
|
246
304
|
|
|
247
305
|
> The exact merge strategy (merge commit, squash, rebase, fast-forward)
|
|
248
|
-
>
|
|
249
|
-
>
|
|
250
|
-
>
|
|
306
|
+
> follows the team's selected Git policy. See the seeded
|
|
307
|
+
> `Git-principles-{gitflow|trunk}.md` under `dflow/specs/shared/` for that
|
|
308
|
+
> policy's integration commit conventions.
|
|
251
309
|
|
|
252
310
|
## Commit Message Convention
|
|
253
311
|
|