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.
- package/CHANGELOG.md +824 -1
- package/CONTRIBUTING.md +16 -10
- package/README.en.md +156 -200
- package/README.md +89 -144
- package/TEMPLATE-COVERAGE.md +15 -8
- package/TEMPLATE-LANGUAGE-GLOSSARY.md +15 -1
- package/bin/dflow.js +36 -4
- package/docs/commands.en.md +110 -0
- package/docs/commands.md +101 -0
- package/docs/doctor-uncertainty.en.md +212 -0
- package/docs/doctor-uncertainty.md +212 -0
- package/docs/evaluating-dflow.en.md +29 -11
- package/docs/evaluating-dflow.md +8 -6
- package/docs/npm-publish-checklist.md +3 -1
- package/docs/release-versioning-policy.md +8 -2
- package/docs/upgrading.en.md +196 -0
- package/docs/upgrading.md +197 -0
- package/docs/using-with-claude-code.en.md +25 -10
- package/docs/using-with-claude-code.md +20 -7
- package/docs/using-with-codex.en.md +18 -6
- package/docs/using-with-codex.md +16 -5
- package/docs/using-with-github-copilot.en.md +25 -10
- package/docs/using-with-github-copilot.md +21 -8
- package/lib/doc-shapes.json +997 -0
- package/lib/doctor-checks.js +2654 -0
- package/lib/init.js +3583 -107
- package/lib/render-diagrams.js +1474 -0
- package/lib/render.js +865 -49
- package/package.json +2 -2
- package/templates/brownfield/references/drift-verification.md +4 -0
- package/templates/brownfield/references/finish-feature-flow.md +635 -88
- package/templates/brownfield/references/finish-feature-follow-up.md +60 -0
- package/templates/brownfield/references/finish-feature-minimal-host.md +406 -0
- package/templates/brownfield/references/finish-feature-post-hoc-hotfix.md +95 -0
- package/templates/brownfield/references/git-integration.md +160 -15
- package/templates/brownfield/references/init-project-flow.md +26 -4
- package/templates/brownfield/references/modify-existing-flow.md +412 -87
- package/templates/brownfield/references/modify-existing-follow-up.md +121 -0
- package/templates/brownfield/references/modify-existing-post-hoc-hotfix.md +82 -0
- package/templates/brownfield/references/new-feature-flow.md +61 -6
- package/templates/brownfield/references/new-phase-flow.md +57 -7
- package/templates/brownfield/references/pr-review-checklist.md +303 -10
- package/templates/brownfield/scaffolding/AI-AGENT-GUIDE.md +158 -34
- package/templates/brownfield/scaffolding/CLAUDE-md-snippet.md +1 -1
- package/templates/brownfield/scaffolding/Git-principles-gitflow.md +75 -6
- package/templates/brownfield/scaffolding/Git-principles-trunk.md +82 -8
- package/templates/brownfield/scaffolding/_conventions.md +50 -28
- package/templates/brownfield/scaffolding/_overview.md +1 -0
- package/templates/brownfield/templates/_index.md +151 -7
- package/templates/brownfield/templates/analysis.md +79 -0
- package/templates/brownfield/templates/behavior.md +1 -0
- package/templates/brownfield/templates/context-definition.md +1 -0
- package/templates/brownfield/templates/context-map.md +2 -1
- package/templates/brownfield/templates/glossary.md +1 -0
- package/templates/brownfield/templates/lightweight-spec.md +154 -11
- package/templates/brownfield/templates/models.md +1 -0
- package/templates/brownfield/templates/phase-spec.md +9 -1
- package/templates/brownfield/templates/rules.md +1 -0
- package/templates/brownfield/templates/tech-debt.md +1 -0
- package/templates/common/references/ddd-modeling-guide.md +33 -16
- package/templates/{greenfield → common}/references/dflow-feedback-flow.md +2 -1
- package/templates/common/references/flow-rationale-registry.md +130 -0
- package/templates/common/skill/SKILL.md +13 -11
- package/templates/greenfield/references/drift-verification.md +4 -0
- package/templates/greenfield/references/finish-feature-flow.md +625 -89
- package/templates/greenfield/references/finish-feature-follow-up.md +60 -0
- package/templates/greenfield/references/finish-feature-minimal-host.md +363 -0
- package/templates/greenfield/references/finish-feature-post-hoc-hotfix.md +95 -0
- package/templates/greenfield/references/git-integration.md +148 -15
- package/templates/greenfield/references/init-project-flow.md +28 -8
- package/templates/greenfield/references/modify-existing-flow.md +378 -85
- package/templates/greenfield/references/modify-existing-follow-up.md +103 -0
- package/templates/greenfield/references/modify-existing-post-hoc-hotfix.md +82 -0
- package/templates/greenfield/references/new-feature-flow.md +67 -4
- package/templates/greenfield/references/new-phase-flow.md +56 -7
- package/templates/greenfield/references/pr-review-checklist.md +287 -8
- package/templates/greenfield/scaffolding/AI-AGENT-GUIDE.md +153 -32
- package/templates/greenfield/scaffolding/CLAUDE-md-snippet.md +5 -2
- package/templates/greenfield/scaffolding/Git-principles-gitflow.md +74 -6
- package/templates/greenfield/scaffolding/Git-principles-trunk.md +88 -12
- package/templates/greenfield/scaffolding/_conventions.md +50 -28
- package/templates/greenfield/scaffolding/_overview.md +6 -2
- package/templates/greenfield/templates/_index.md +137 -7
- package/templates/greenfield/templates/aggregate-design.md +1 -0
- package/templates/greenfield/templates/analysis.md +79 -0
- package/templates/greenfield/templates/behavior.md +1 -0
- package/templates/greenfield/templates/context-definition.md +1 -0
- package/templates/greenfield/templates/context-map.md +2 -1
- package/templates/greenfield/templates/events.md +4 -1
- package/templates/greenfield/templates/glossary.md +1 -0
- package/templates/greenfield/templates/lightweight-spec.md +154 -11
- package/templates/greenfield/templates/models.md +1 -0
- package/templates/greenfield/templates/phase-spec.md +9 -1
- package/templates/greenfield/templates/rules.md +1 -0
- package/templates/greenfield/templates/tech-debt.md +1 -0
- package/templates/brownfield/references/dflow-feedback-flow.md +0 -251
package/CONTRIBUTING.md
CHANGED
|
@@ -13,8 +13,8 @@ Please read:
|
|
|
13
13
|
document structure.
|
|
14
14
|
- `TEMPLATE-LANGUAGE-GLOSSARY.md` before changing template headings or field
|
|
15
15
|
labels.
|
|
16
|
-
- The relevant Greenfield or Brownfield
|
|
17
|
-
behavior.
|
|
16
|
+
- The relevant Greenfield or Brownfield workflow content under `templates/`
|
|
17
|
+
when changing workflow behavior.
|
|
18
18
|
|
|
19
19
|
The public source is kept intentionally smaller than the development workspace.
|
|
20
20
|
Internal planning notes, proposal handoffs, and review artifacts are maintainer
|
|
@@ -71,13 +71,10 @@ GitHub Actions runs the same verification commands on every pull request to
|
|
|
71
71
|
`main` and on every push to `main`. The CI is verification-only — it does not
|
|
72
72
|
publish releases, change versions, or create tags.
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
- packaged templates under `templates/greenfield/` or `templates/brownfield/`
|
|
79
|
-
|
|
80
|
-
If you are unsure which surface to edit, describe that uncertainty in the PR.
|
|
74
|
+
Templates and scaffolding live under `templates/greenfield/`,
|
|
75
|
+
`templates/brownfield/`, and `templates/common/` — the single content source
|
|
76
|
+
read by the CLI. Edit them directly; there is no separate mirror to keep in
|
|
77
|
+
sync.
|
|
81
78
|
|
|
82
79
|
## Greenfield and Brownfield Synchronization
|
|
83
80
|
|
|
@@ -87,18 +84,27 @@ intentionally track-specific.
|
|
|
87
84
|
|
|
88
85
|
Common shared flows include:
|
|
89
86
|
|
|
90
|
-
- `dflow-feedback-flow.md`
|
|
91
87
|
- `init-project-flow.md`
|
|
92
88
|
- `new-feature-flow.md`
|
|
93
89
|
- `modify-existing-flow.md`
|
|
94
90
|
- `new-phase-flow.md`
|
|
95
91
|
- `finish-feature-flow.md`
|
|
92
|
+
- `finish-feature-follow-up.md`
|
|
93
|
+
- `finish-feature-minimal-host.md`
|
|
94
|
+
- `finish-feature-post-hoc-hotfix.md`
|
|
95
|
+
- `modify-existing-follow-up.md`
|
|
96
|
+
- `modify-existing-post-hoc-hotfix.md`
|
|
96
97
|
- `drift-verification.md`
|
|
97
98
|
- `pr-review-checklist.md`
|
|
98
99
|
- `git-integration.md`
|
|
99
100
|
|
|
100
101
|
Track-specific behavior is fine, but it should be named explicitly in the PR.
|
|
101
102
|
|
|
103
|
+
Anything under `templates/common/references/` is outside that pairing: it lives
|
|
104
|
+
once there and is projected into both editions, so you edit it in one place; the
|
|
105
|
+
repository consistency check fails if a per-track copy reappears.
|
|
106
|
+
`dflow-feedback-flow.md` is one of them.
|
|
107
|
+
|
|
102
108
|
## Template and Heading Changes
|
|
103
109
|
|
|
104
110
|
Dflow templates use canonical English structure so AI agents can locate sections
|
package/README.en.md
CHANGED
|
@@ -9,23 +9,51 @@
|
|
|
9
9
|
>
|
|
10
10
|
> In other words: not whether the AI can do DDD, but whether you can trust it when it does.
|
|
11
11
|
|
|
12
|
-
Concretely, it is a spec-first workflow kit for AI-assisted software development
|
|
13
|
-
|
|
14
|
-
The goal is not the process itself, but repeatable software change with clearer meaning, fewer scattered rules, and less prompt-dependent behavior.
|
|
12
|
+
Concretely, it is a spec-first workflow kit for AI-assisted software development: change requests become structured specs, domain language, and implementation plans first, and code only after alignment — instead of the round-trip where AI jumps from an ambiguous prompt straight to code and has to be redirected after the wrong direction lands. The goal is not the process itself, but repeatable software change with clearer meaning, fewer scattered rules, and less prompt-dependent behavior.
|
|
15
13
|
|
|
16
14
|
## Key Features
|
|
17
15
|
|
|
18
16
|
| Feature | What it gives engineering teams |
|
|
19
17
|
|---|---|
|
|
20
|
-
| **
|
|
21
|
-
| **
|
|
22
|
-
| **
|
|
23
|
-
| **
|
|
24
|
-
| **Three-layer documentation model** |
|
|
25
|
-
| **
|
|
26
|
-
| **
|
|
27
|
-
| **
|
|
28
|
-
| **
|
|
18
|
+
| **Greenfield and Brownfield tracks** | New projects get room to shape architecture and the domain model early; existing codebases skip the big-bang refactor and extract scattered domain rules progressively while changing behavior. |
|
|
19
|
+
| **AI-guided — no commands to learn first** | Say what you want to do and the AI works out which workflow to run and how much spec it needs, then starts it; name a flow yourself if you prefer. Either way it pauses at every key decision — the AI stays on track without turning every step into overhead. |
|
|
20
|
+
| **DDD semantic backbone** | Write the domain language, boundaries, and rules down first, so AI fills in details under project constraints instead of inventing plausible-but-wrong business rules — the kind review rarely catches by eye. |
|
|
21
|
+
| **Anti-overdesign built into the guidance** | Once guided into DDD, AI tends to apply rich models and heavyweight patterns everywhere; Dflow writes reverse criteria at the common overshoot points — where deeper modeling isn't worth it, when to stop at the simplest rung. |
|
|
22
|
+
| **Three-layer documentation model** | phase (one propose-implement cycle) / feature (the whole branch's running state) / system (cross-feature long-term knowledge), matching how feature branches actually evolve. Detailed below. |
|
|
23
|
+
| **The part DDD’s models and rules have no place for (`analysis.md`)** | `models.md` holds what is stored, `rules.md` holds one rule, `behavior.md` holds one scenario — **nothing holds how it moves**. `analysis.md` is that file, in six sections: the ordered handoffs between contexts (`FL-nn`), the lifecycle of one status field (`LC-nn`), a figure that is computed rather than stored (`RM-nn`), a mechanism no single rule explains (`MX-nn`), an index of who can reach which function, and the hotspots that keep being worked around. Every entry names its provenance (code, data, who confirmed it, inference or assumption). This knowledge no longer lives only in a conversation or freezes when a feature closes out; a project adopting Dflow midway uses it to rebuild the picture of the system piece by piece. |
|
|
24
|
+
| **Change-depth-based tiers (T1/T2/T3)** | AI scales specification and verification by change depth: a color/typo tweak hosted under a feature takes one inline `_index.md` row, functional bug fixes take a lightweight spec (a T3 display-copy defect is still one inline row), and new features or bounded-context-level changes go through a full phase-spec. Small changes aren't dragged down by process. |
|
|
25
|
+
| **Drift verification** | `/dflow:verify` cross-checks specs, domain documents, implementation, tests, and debt records to surface the "documentation still describes the old behavior" drift that PR review by eye usually misses. |
|
|
26
|
+
| **Specs humans can read, not just AI (md → HTML)** | `dflow render` mirrors the AI-facing dense Markdown specs into browsable static HTML. Status lifecycles and cross-context flows in `analysis.md` are drawn as diagrams: which state loops back, where a lifecycle ends, and how a handover moves between contexts show at a glance; other tables become cards and markers become badges (side-by-side screenshots below). Markdown stays the AI-facing source of truth. |
|
|
27
|
+
| **Multi-AI-tool rule sharing** | A canonical project guide plus thin per-tool shims (`CLAUDE.md` / `AGENTS.md` / Copilot instructions) — no duplicate rule copies when switching between Claude, Codex, and Copilot; all three share one agentskills.io project-level skill with natural-language auto-trigger (Copilot CLI summons it via `/dflow`). |
|
|
28
|
+
|
|
29
|
+
## You Don't Need to Learn the Commands First
|
|
30
|
+
|
|
31
|
+
Just say what you want to do. The AI works out which workflow to run and how much
|
|
32
|
+
spec the change needs:
|
|
33
|
+
|
|
34
|
+
| You say | Where the AI takes it |
|
|
35
|
+
|---|---|
|
|
36
|
+
| "Add expense-report approval" | New feature → full spec cycle (T1) |
|
|
37
|
+
| "This field is calculating the wrong total" | Bug fix → tier judged, usually a lightweight spec (T2) |
|
|
38
|
+
| "Make this button blue" | Display-layer trivia (T3) → one row in `_index.md` |
|
|
39
|
+
|
|
40
|
+
`/dflow:new-feature`, `/dflow:modify-existing` and `/dflow:bug-fix` are names **you never
|
|
41
|
+
have to remember** — and the last two run the same flow document anyway, so picking the
|
|
42
|
+
wrong one costs nothing.
|
|
43
|
+
|
|
44
|
+
The diagram below is what happens after you describe the change. Every green row is a point
|
|
45
|
+
where the AI **stops and waits for you** (a Step Gate). A commit badge on a green row means
|
|
46
|
+
that Step Gate also asks whether to commit; a badge on a blue row means that step asks on its
|
|
47
|
+
own — **it does stop, it is just not a Step Gate**. ⚠ **How many Step Gates you meet depends on both
|
|
48
|
+
the flow and the tier**: flows differ; inside one flow a lighter tier skips some (a
|
|
49
|
+
`/dflow:modify-existing` change judged T3 does not run the DDD-impact gate); and a T1 can
|
|
50
|
+
escalate the whole change to `/dflow:new-feature` / `/dflow:new-phase`. The route drawn is
|
|
51
|
+
`new-feature`’s four, plus `finish-feature`’s own two.
|
|
52
|
+
|
|
53
|
+

|
|
54
|
+
|
|
55
|
+
To name a flow directly, correct the one the AI picked, or take stock of what Dflow
|
|
56
|
+
covers, see the [Command Reference](docs/commands.en.md).
|
|
29
57
|
|
|
30
58
|
## Get Started
|
|
31
59
|
|
|
@@ -50,12 +78,11 @@ When AI tools were selected, init also installs the project-level skill for
|
|
|
50
78
|
them (Claude, Codex, and GitHub Copilot) **by default** — the source of
|
|
51
79
|
natural-language auto-trigger (you say "I want to add a feature" and the AI
|
|
52
80
|
suggests the matching workflow; Copilot CLI summons it via `/dflow`). On an
|
|
53
|
-
interactive terminal it asks one `(Y/n)` question —
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
below).
|
|
81
|
+
interactive terminal it asks one `(Y/n)` question — press Enter to install;
|
|
82
|
+
scripted (non-interactive) runs install by default, so existing automation
|
|
83
|
+
runs unchanged. Skill files are Dflow-generated derivatives: the recommended
|
|
84
|
+
default is to gitignore them and re-project after cloning (see the
|
|
85
|
+
version-control table below).
|
|
59
86
|
|
|
60
87
|
If the project is already initialized and you later add another AI coding
|
|
61
88
|
tool, run:
|
|
@@ -65,22 +92,19 @@ dflow configure-agents
|
|
|
65
92
|
```
|
|
66
93
|
|
|
67
94
|
It asks the same default-yes skill question for newly selected tools that have
|
|
68
|
-
no skill yet
|
|
69
|
-
|
|
70
|
-
|
|
95
|
+
no skill yet, so tools added later don't miss auto-trigger either. To
|
|
96
|
+
force-regenerate the skills for all selected tools (for example to refresh
|
|
97
|
+
them after upgrading Dflow), use `--skills`:
|
|
71
98
|
|
|
72
99
|
```bash
|
|
73
100
|
dflow configure-agents --skills
|
|
74
101
|
```
|
|
75
102
|
|
|
76
|
-
Answering `n`
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
triggering to the tool's native matching mechanism (the skill's trigger
|
|
82
|
-
description sits in front of the model every turn), making it dependable. You
|
|
83
|
-
can add it any time later with `dflow configure-agents --skills`.
|
|
103
|
+
Answering `n` does not leave the AI trigger-blind — the project instructions
|
|
104
|
+
init writes already tell it to suggest the matching workflow — but reliability
|
|
105
|
+
differs: the skill hands triggering to the tool's native matching mechanism,
|
|
106
|
+
which is steadier than the model remembering instructions mid-session. You can
|
|
107
|
+
add it any time later with `dflow configure-agents --skills`.
|
|
84
108
|
|
|
85
109
|
If you also want tool-native `/` command / prompt menus, add `--command-adapters`
|
|
86
110
|
(it composes with `--skills`):
|
|
@@ -96,32 +120,19 @@ yourself.
|
|
|
96
120
|
|
|
97
121
|
### Start using the Dflow workflow
|
|
98
122
|
|
|
99
|
-
After init,
|
|
123
|
+
After init, just tell your AI coding agent what you want to do:
|
|
100
124
|
|
|
101
125
|
```text
|
|
102
|
-
|
|
103
|
-
/dflow:modify-existing
|
|
104
|
-
/dflow:bug-fix
|
|
105
|
-
/dflow:new-phase
|
|
106
|
-
/dflow:finish-feature
|
|
107
|
-
/dflow:verify
|
|
108
|
-
/dflow:pr-review
|
|
126
|
+
Add expense-report approval
|
|
109
127
|
```
|
|
110
128
|
|
|
111
|
-
|
|
112
|
-
|
|
129
|
+
The AI works out which workflow to run, starts it, and stops at every decision point to
|
|
130
|
+
confirm direction with you — the flow is drawn above in
|
|
131
|
+
[You Don't Need to Learn the Commands First](#you-dont-need-to-learn-the-commands-first).
|
|
113
132
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
| GitHub Copilot (VS Code Chat) | Command entry is `/dflow-<id>` (hyphen, needs `--command-adapters`); natural language also auto-triggers. `/dflow:<id>` (colon) is only a text reference, not a command |
|
|
118
|
-
| GitHub Copilot CLI | No per-id command; type `/dflow` to summon the skill, then describe the workflow in natural language |
|
|
119
|
-
| Codex CLI | no-slash plain text `dflow:<id>`, for example `dflow:new-feature` |
|
|
120
|
-
|
|
121
|
-
If your tool does not support custom slash commands, use the workflow name as
|
|
122
|
-
a plain instruction in chat. Dflow is Markdown-based workflow material plus a
|
|
123
|
-
scaffolding CLI, so it can be used with AI coding agents that can read project
|
|
124
|
-
instructions and repository context.
|
|
133
|
+
To name a flow yourself (when you already know this is a new feature, say), or to see
|
|
134
|
+
everything Dflow covers, read the [Command Reference](docs/commands.en.md): the 11
|
|
135
|
+
workflows, how to type them in each AI tool, and the four `dflow` CLI commands.
|
|
125
136
|
|
|
126
137
|
For the first adoption pass, use a branch or disposable sample project so your
|
|
127
138
|
team can inspect the generated `dflow/specs/` workspace before bringing the
|
|
@@ -131,7 +142,7 @@ For a guided evaluation walk-through — what `init` creates, AI tool support,
|
|
|
131
142
|
track choice, and a 30-minute sample-project playbook — see [Evaluating
|
|
132
143
|
Dflow](docs/evaluating-dflow.en.md). For end-to-end scenario walk-throughs of
|
|
133
144
|
Greenfield and Brownfield workflows with worked spec outputs, see the
|
|
134
|
-
[`tutorial/`](tutorial/README.md) index.
|
|
145
|
+
[`tutorial/`](https://github.com/weilung/dflow-sdd-ddd/blob/main/tutorial/README.md) index (in the source repository; it is not installed with the npm package).
|
|
135
146
|
|
|
136
147
|
### Render the specs as human-readable HTML
|
|
137
148
|
|
|
@@ -144,10 +155,23 @@ dflow render
|
|
|
144
155
|
|
|
145
156
|
It mirrors `dflow/specs/` into a static HTML tree (default output
|
|
146
157
|
`dflow-specs-html/`; adjust with `--src` / `--out` / `--title`): record-style
|
|
147
|
-
tables become one card per row, AI-facing comment markers become badges
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
158
|
+
tables become one card per row, AI-facing comment markers become badges,
|
|
159
|
+
gherkin blocks get keyword highlighting, and in-tree links are rewritten to
|
|
160
|
+
the matching HTML pages; the filled lifecycle and flow tables in
|
|
161
|
+
`analysis.md` are also drawn as diagrams above their cards. Open the output
|
|
162
|
+
directory's `index.html` in a browser (`file://` works; no server needed):
|
|
163
|
+
the front page is a grouped directory — Features, Domain, architecture and
|
|
164
|
+
migration, shared documents, and the rest — each group collapsed until you
|
|
165
|
+
open it (a lone group starts open), with a one-line purpose and a "how to
|
|
166
|
+
read these documents" note;
|
|
167
|
+
Domain lists one row per context, and features one row per directory.
|
|
168
|
+
Wall-length narrative crammed into a single cell renders more readably: the
|
|
169
|
+
card spans the full row and extra-long fields collapse behind a pure-CSS
|
|
170
|
+
"expand" toggle (printing always fully expands). The `features/completed/`
|
|
171
|
+
archive never flattens into the root index — the root carries year links
|
|
172
|
+
only, one standalone page per year, so a growing archive never bloats the
|
|
173
|
+
front page. When `--src` is not a Dflow specs root (it has no
|
|
174
|
+
`shared/_conventions.md`), the front page is a plain file tree by path.
|
|
151
175
|
|
|
152
176
|
The same spec, read two ways — left: the AI-facing Markdown source (dense
|
|
153
177
|
tables plus AI-only markers like `<!-- phase-2 ADDED -->`); right: the HTML
|
|
@@ -155,18 +179,23 @@ tables plus AI-only markers like `<!-- phase-2 ADDED -->`); right: the HTML
|
|
|
155
179
|
|
|
156
180
|

|
|
157
181
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
182
|
+
A lifecycle in `analysis.md`, read the same two ways — left: its state table
|
|
183
|
+
and transition table; right: the diagram render draws above the cards (the
|
|
184
|
+
`Rejected` → `Draft` rework loop and the `Approved` end state show at a
|
|
185
|
+
glance):
|
|
186
|
+
|
|
187
|
+

|
|
188
|
+
|
|
189
|
+
Both examples come from this repo's Expense tutorial specs
|
|
190
|
+
([`tutorial/01-greenfield/outputs`](https://github.com/weilung/dflow-sdd-ddd/tree/main/tutorial/01-greenfield/outputs)); after
|
|
191
|
+
cloning and running `npm install`, reproduce them with
|
|
161
192
|
`node bin/dflow.js render --src tutorial/01-greenfield/outputs/dflow/specs`.
|
|
162
193
|
|
|
163
194
|
The division of labor: **Markdown is the AI-facing source of truth; HTML is
|
|
164
195
|
the human-reading projection.** Re-run `dflow render` whenever the specs
|
|
165
196
|
change (every run is a full rebuild). The output directory is managed by
|
|
166
|
-
render
|
|
167
|
-
|
|
168
|
-
generate are never touched — it is a regenerable derived artifact, so add it
|
|
169
|
-
to `.gitignore`:
|
|
197
|
+
render and **files render did not generate are never touched** — it is a
|
|
198
|
+
regenerable derived artifact, so add it to `.gitignore`:
|
|
170
199
|
|
|
171
200
|
```gitignore
|
|
172
201
|
dflow-specs-html/
|
|
@@ -199,8 +228,8 @@ Dflow uses a hybrid design with three layers of user-AI interaction:
|
|
|
199
228
|
|
|
200
229
|
| Layer | Purpose |
|
|
201
230
|
|---|---|
|
|
202
|
-
| **
|
|
203
|
-
| **
|
|
231
|
+
| **Natural-language entry (the default)** | You describe the change; the AI works out whether it implies a feature, phase, bug fix, verification or review, and starts the matching flow. Most of the time this is all there is to it. |
|
|
232
|
+
| **Command entry (when you want to name it)** | Already know which flow you want? Run `/dflow:new-feature`, `/dflow:modify-existing` and friends directly. The names, and how to type them in each tool, are in the [Command Reference](docs/commands.en.md). |
|
|
204
233
|
| **Transparent decision checkpoints** | At key moments (flow entry, Step Gates between major steps, important internal steps), the AI stops to announce what it is about to do and waits for the developer to approve direction, preventing autopilot drift. |
|
|
205
234
|
|
|
206
235
|
### Workflow Internal Structure
|
|
@@ -218,13 +247,19 @@ Dflow scales specification, implementation planning, and verification by the dep
|
|
|
218
247
|
|
|
219
248
|
| Tier | Typical use | Expected weight |
|
|
220
249
|
|---|---|---|
|
|
221
|
-
| **T1 Heavy** | New feature, new phase, new Aggregate / Bounded Context, architectural change, new business rule | Full phase-spec, domain modeling, behavior examples, implementation plan, verification and completion checks |
|
|
222
|
-
| **T2 Light** | Bug fix (logic error), UI input validation tweak, narrow change with a BR (business rule) delta | Lightweight spec, focused verification, confirm the fix lands in the correct architectural layer |
|
|
223
|
-
| **T3 Trivial** |
|
|
250
|
+
| **T1 Heavy** | New feature, new phase, new Aggregate / Bounded Context, architectural change, new business rule, data-structure change (table / column / relation / index), and any contract change that breaks a caller (API / event, or a required env var / CLI flag / exit code) | Full phase-spec, domain modeling, behavior examples, implementation plan, verification and completion checks |
|
|
251
|
+
| **T2 Light** | Bug fix (logic error), UI input validation tweak, narrow change with a BR (business rule) delta, non-breaking contract change, performance-only work | Lightweight spec, focused verification, confirm the fix lands in the correct architectural layer |
|
|
252
|
+
| **T3 Trivial** | A local, meaning-preserving display copy / appearance tweak (button color, copy typo / wording, layout polish) — **no business rule, Domain concept, or data-structure change**, and not high-consequence content. "Local" means **element level on a single screen / component, or a single independently-consumed page / file** (a public README, an API reference page): a whole-screen rewrite, or one sweep across several screens, escalates to T2, and so does a cross-page sweep | Hosted under its feature: one inline row in that `_index.md`, no separate spec file. If no owning feature exists, `/dflow:modify-existing` opens a minimal (zero-phase) host and records the row there |
|
|
253
|
+
|
|
254
|
+
> This table is a **summary** for reading speed. The one source that decides an
|
|
255
|
+
> actual change is `AI-AGENT-GUIDE.md` § Ceremony Scaling — the ordered cascade,
|
|
256
|
+
> steps 0–4, first match wins. The boundary cases (new work versus a
|
|
257
|
+
> modification, what genuinely stays outside Dflow, how far a T3 may reach, how
|
|
258
|
+
> contracts are judged) are settled there.
|
|
224
259
|
|
|
225
260
|
Tier choice is not always up to the developer — `/dflow:new-feature` and `/dflow:new-phase` always default to T1, while `/dflow:modify-existing` and `/dflow:bug-fix` let the AI judge T1/T2/T3 based on the actual change.
|
|
226
261
|
|
|
227
|
-
**Not every change goes through Dflow**: pure
|
|
262
|
+
**Not every change goes through Dflow**: pure formatting commits (e.g. `prettier` / `dotnet format` autoruns), internal comments, and internal-doc typos don't even need a T3 inline row — `git commit` directly (a user-visible typo goes through the cascade: T3 on a single screen or a single independently-consumed page, T2 once it sweeps several or touches high-consequence content). The reverse also holds — **invisible does not mean untracked**: machine-consumed contracts (structured logs, export fields, APIs, events), security / CVE and compliance work, and deliberate runtime performance / resource / SLA changes all stay inside Dflow.
|
|
228
263
|
|
|
229
264
|
Transparent decision checkpoints and the Tier system are related but separate: checkpoints govern how the AI communicates the workflow; tiers govern how much specification, implementation planning, and verification the change needs.
|
|
230
265
|
|
|
@@ -236,7 +271,7 @@ In practice a feature branch usually goes through several propose → implement
|
|
|
236
271
|
|---|---|---|---|
|
|
237
272
|
| **Phase Delta** | `phase-spec-{date}-{slug}.md` (or a lightweight spec) | Records what this cycle changes, why, and how it will be implemented and verified | A milestone slice inside a feature branch |
|
|
238
273
|
| **Feature Snapshot** | `_index.md` (one per feature directory) | Feature-level dashboard: phase list, cumulative BR Snapshot, Resume Pointer | The feature branch's own "current state" |
|
|
239
|
-
| **System State** | `rules.md` / `behavior.md` / `glossary.md` / `context-map.md` | Cross-feature long-term knowledge: glossary, business rules, models, conventions, tech debt | The accumulated "what the system actually is right now" on main / trunk |
|
|
274
|
+
| **System State** | `rules.md` / `behavior.md` / `glossary.md` / `context-map.md` / `analysis.md` | Cross-feature long-term knowledge: glossary, business rules, models, flows and lifecycles, conventions, tech debt | The accumulated "what the system actually is right now" on main / trunk |
|
|
240
275
|
|
|
241
276
|
`_index.md` is the key middle layer. Many spec tools only ship phase + system, but feature branches that span multiple phases are the norm, and without a middle layer three problems show up:
|
|
242
277
|
|
|
@@ -246,6 +281,12 @@ In practice a feature branch usually goes through several propose → implement
|
|
|
246
281
|
|
|
247
282
|
Dflow solves these with `_index.md`: the Current BR Snapshot regenerates after each completed phase, the Resume Pointer carries continuation instructions, and the whole feature directory is the natural archival unit. At `/dflow:finish-feature`, Dflow reconciles the BR Snapshot into `rules.md` / `behavior.md` (promoting the feature layer into the system layer) and then `git mv`s the whole feature directory to `completed/`.
|
|
248
283
|
|
|
284
|
+
### Completed features are frozen history
|
|
285
|
+
|
|
286
|
+
Once `/dflow:finish-feature` moves a feature directory into `completed/`, **no direct writes are allowed** — not new phase-specs, not lightweight-specs, not even inline rows in `_index.md` (the one sanctioned exception: the Follow-up Tracking section's derived metadata — when a follow-up feature links back, its reverse-link row flips from `in-progress` to `completed`; specs, the BR Snapshot, and inline change history stay frozen). To change anything later, you build a **follow-up feature**: a new feature directory with a fresh SPEC-ID and `follow-up-of: {original SPEC-ID}` metadata pointing back to the original.
|
|
287
|
+
|
|
288
|
+
Why: "completed = frozen history" is a core Dflow guarantee. Accepting post-completion edits would erase the feature-lifecycle endpoint and make `_index.md`'s BR Snapshot unreliable. `/dflow:modify-existing` detects when the target is a completed feature and prompts the developer with three choices: A — follow-up; B — independent concern (**T1** goes to `/dflow:new-feature`; **T2 / T3** stay in `/dflow:modify-existing` and open a standalone minimal host); C (refused, re-directed to A).
|
|
289
|
+
|
|
249
290
|
## Files Created by Init
|
|
250
291
|
|
|
251
292
|
A typical initialized project receives a `dflow/` workspace:
|
|
@@ -267,6 +308,11 @@ dflow/
|
|
|
267
308
|
└── completed/
|
|
268
309
|
```
|
|
269
310
|
|
|
311
|
+
`analysis.md` is not created by init: what crosses contexts goes in
|
|
312
|
+
`domain/analysis.md`, what one context owns in `domain/{context}/analysis.md`,
|
|
313
|
+
and each is created from its template the first time there is something to
|
|
314
|
+
record.
|
|
315
|
+
|
|
270
316
|
Dflow also creates or updates a project instruction file for your AI coding
|
|
271
317
|
agent. The exact file depends on the target tool and existing project setup;
|
|
272
318
|
Dflow avoids overwriting custom content in existing project instructions.
|
|
@@ -282,24 +328,23 @@ files whose only job is to redirect the tool to the canonical guide):
|
|
|
282
328
|
| Claude Code | `CLAUDE.md` |
|
|
283
329
|
| GitHub Copilot | `.github/copilot-instructions.md` |
|
|
284
330
|
|
|
285
|
-
If one of those files already exists, Dflow
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
331
|
+
If one of those files already exists, Dflow does not rewrite your custom
|
|
332
|
+
content. An existing file that does not yet point at the canonical guide gets
|
|
333
|
+
a managed block wrapped in `<!-- dflow-generated: agent-shim START/END -->`
|
|
334
|
+
markers appended at the end after you confirm the overall preview (re-running
|
|
335
|
+
refreshes that same block in place, without duplicating it). **A file you
|
|
336
|
+
wrote yourself that already points at the guide is left untouched by init (it
|
|
337
|
+
only warns)** — an interactive `dflow configure-agents` run later offers
|
|
338
|
+
marker adoption (default No), and non-interactive runs always skip with a
|
|
339
|
+
warning. The full file-state matrix (pristine shims, how each kind of damaged
|
|
340
|
+
marker is handled, and more) is in the
|
|
341
|
+
[Upgrading guide](docs/upgrading.en.md). The project guide stays the
|
|
342
|
+
single source of truth, so teams can use multiple AI tools without maintaining
|
|
343
|
+
multiple copies of the workflow rules.
|
|
295
344
|
|
|
296
345
|
You can run `dflow configure-agents` later to add more tool shims as the team
|
|
297
|
-
adopts additional AI coding agents
|
|
298
|
-
|
|
299
|
-
default), so auto-trigger is not missed. If you need Claude / Copilot
|
|
300
|
-
tool-native command entries, use `dflow configure-agents --command-adapters`.
|
|
301
|
-
To force-regenerate the skills for all selected tools (for example after
|
|
302
|
-
upgrading Dflow), use `dflow configure-agents --skills`.
|
|
346
|
+
adopts additional AI coding agents; how skills and tool-native command entries
|
|
347
|
+
are added is covered in [Get Started](#get-started) above.
|
|
303
348
|
|
|
304
349
|
### Version-Control Policy for Generated Artifacts (recommended default)
|
|
305
350
|
|
|
@@ -323,28 +368,17 @@ commit the removal of the old files. The key rule: **use one consistent policy
|
|
|
323
368
|
across all tools in a project**, rather than ignoring adapters for one tool and
|
|
324
369
|
tracking them for another.
|
|
325
370
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
adapters, and the marked block inside existing agent files). It does **not**
|
|
338
|
-
refresh the canonical guide (`AI-AGENT-GUIDE.md`) or the other user-owned layers
|
|
339
|
-
(such as `_conventions.md` or the prose outside a shim's markers) — those become
|
|
340
|
-
project-owned right after init and are deliberately left untouched. The trade-off:
|
|
341
|
-
when a new release adds content into the canonical guide, an existing project does
|
|
342
|
-
not pick it up automatically and can silently drift from that release's canonical
|
|
343
|
-
shape. After upgrading an existing project, reconcile manually and use a fresh
|
|
344
|
-
comparison baseline — run a **brand-new `dflow init` with the same edition and the
|
|
345
|
-
same answers** elsewhere, then diff it file-by-file against your project: every
|
|
346
|
-
difference should classify as either "your user content" or "known
|
|
347
|
-
outside-the-markers", otherwise it is a missed update.
|
|
371
|
+
**Upgrading an existing project**: `configure-agents` re-projects only the
|
|
372
|
+
layers Dflow itself owns — the workflow bundle and the marked regions in agent
|
|
373
|
+
files and the canonical guide (command adapters and existing skills each need
|
|
374
|
+
`--command-adapters` / `--skills` to regenerate); content you authored is never
|
|
375
|
+
migrated automatically. After upgrading, run `dflow doctor` first — a
|
|
376
|
+
read-only first pass that reports drift (stale version line, broken
|
|
377
|
+
references, format drift). For thorough verification, the baseline is a
|
|
378
|
+
brand-new `dflow init` elsewhere with the same edition and the same answers,
|
|
379
|
+
diffed file-by-file against your project. Full details — the per-surface
|
|
380
|
+
ownership and flag table, the file-state matrix, and step-by-step verification
|
|
381
|
+
— are in the [Upgrading guide](docs/upgrading.en.md).
|
|
348
382
|
|
|
349
383
|
For tool-specific walk-throughs of what `init` writes and how Dflow's
|
|
350
384
|
workflow commands appear in a given AI tool, see the per-tool guides under
|
|
@@ -354,91 +388,19 @@ workflow commands appear in a given AI tool, see the per-tool guides under
|
|
|
354
388
|
- [Using Dflow with Codex CLI](docs/using-with-codex.en.md)
|
|
355
389
|
- [Using Dflow with GitHub Copilot](docs/using-with-github-copilot.en.md)
|
|
356
390
|
|
|
357
|
-
Init does not copy the `tutorial/` directory into your project
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
## Main Flows
|
|
363
|
-
|
|
364
|
-
Dflow commands fall into four categories by role. A "what should I run?" cheat sheet appears at the end.
|
|
365
|
-
|
|
366
|
-
### Entry commands (start a workflow)
|
|
367
|
-
|
|
368
|
-
Start a Workflow run; can be invoked without any pre-existing feature. The three are independent — none is a prerequisite for the others.
|
|
369
|
-
|
|
370
|
-
| Flow | When to use it | Typical outputs |
|
|
371
|
-
|---|---|---|
|
|
372
|
-
| `/dflow:new-feature` | A completely new feature, or a new piece of business logic the system needs to support | Feature directory + `_index.md` + first phase-spec (always T1) |
|
|
373
|
-
| `/dflow:modify-existing` | Change to existing behavior — **when you're not sure which category the change belongs to**, AI dispatches internally | T1 → escalates to new-phase / new-feature; T2 → lightweight-spec; T3 → inline row in `_index.md` |
|
|
374
|
-
| `/dflow:bug-fix` | A defect where expected behavior can be stated narrowly | AI judges tier (typically T2 lightweight-spec). Orphan bugs build a minimal feature directory automatically |
|
|
375
|
-
|
|
376
|
-
### Feature-internal commands (active feature only)
|
|
377
|
-
|
|
378
|
-
Usable only inside an already-started active feature. Targets pointing at `completed/` are refused.
|
|
379
|
-
|
|
380
|
-
| Flow | When to use it | Typical outputs |
|
|
381
|
-
|---|---|---|
|
|
382
|
-
| `/dflow:new-phase` | An active feature needs another implementation slice | New `phase-spec-{date}-{slug}.md` + Implementation Tasks + implementation / verification + phase marked completed (always T1) |
|
|
383
|
-
| `/dflow:finish-feature` | All phases of a feature are done and need closure | `git mv` the whole feature directory to `completed/`, sync BR Snapshot into the BC layer, emit an Integration Summary (does not auto-merge) |
|
|
384
|
-
|
|
385
|
-
### Workflow control (manage an in-progress workflow run)
|
|
386
|
-
|
|
387
|
-
| Flow | When to use it |
|
|
388
|
-
|---|---|
|
|
389
|
-
| `/dflow:status` | See which workflow / Step / progress you are at |
|
|
390
|
-
| `/dflow:next` | Confirm to pass a Step Gate (equivalent to natural-language "OK" / "continue") |
|
|
391
|
-
| `/dflow:cancel` | Abort the current workflow run and return to free conversation. Artifacts created so far are kept |
|
|
392
|
-
|
|
393
|
-
### Standalone tools (callable any time, not tied to any feature or workflow)
|
|
394
|
-
|
|
395
|
-
| Flow | When to use it | Typical outputs |
|
|
396
|
-
|---|---|---|
|
|
397
|
-
| `/dflow:verify` | Need to confirm docs, code, tests, and tech-debt records are still in sync | Drift report across spec, domain docs, implementation, tests, and debt records |
|
|
398
|
-
| `/dflow:pr-review` | A change is ready for review | SDD/DDD compliance review checklist with risks, gaps, and follow-up items |
|
|
399
|
-
| `/dflow:report-dflow-feedback` | You or the AI found a Dflow issue or improvement while using it | Sanitized local draft rendered field-by-field for the upstream issue form, ready to paste; nothing is submitted automatically |
|
|
400
|
-
|
|
401
|
-
### What should I run? (rule of thumb)
|
|
402
|
-
|
|
403
|
-
| What I want to do | Run |
|
|
404
|
-
|---|---|
|
|
405
|
-
| Completely new feature (unrelated to any existing feature) | `/dflow:new-feature` |
|
|
406
|
-
| Add the next planned phase to an active feature | `/dflow:new-phase` |
|
|
407
|
-
| Fix a specific bug | `/dflow:bug-fix` |
|
|
408
|
-
| **Not sure** what category — just changing existing behavior | `/dflow:modify-existing` |
|
|
409
|
-
| All phases of a feature are done, need closure | `/dflow:finish-feature` |
|
|
410
|
-
| Run a change review | `/dflow:pr-review` |
|
|
411
|
-
| Check doc vs code drift | `/dflow:verify` |
|
|
412
|
-
|
|
413
|
-
### Completed features are frozen history
|
|
414
|
-
|
|
415
|
-
Once `/dflow:finish-feature` moves a feature directory into `completed/`, **no direct writes are allowed** — not new phase-specs, not lightweight-specs, not even inline rows in `_index.md`. To change anything later, you build a **follow-up feature**: a new feature directory with a fresh SPEC-ID and `follow-up-of: {original SPEC-ID}` metadata pointing back to the original.
|
|
416
|
-
|
|
417
|
-
Why: "completed = frozen history" is a core Dflow guarantee. Accepting post-completion edits would erase the feature-lifecycle endpoint and make `_index.md`'s BR Snapshot unreliable. `/dflow:modify-existing` detects when the target is a completed feature and prompts the developer with three choices: A — follow-up; B — independent new feature via `/dflow:new-feature`; C (refused, re-directed to A).
|
|
391
|
+
Init does not copy the `tutorial/` directory into your project, and the npm
|
|
392
|
+
package does not contain it either. The
|
|
393
|
+
[`tutorial/`](https://github.com/weilung/dflow-sdd-ddd/blob/main/tutorial/README.md)
|
|
394
|
+
directory lives in the source repository as evaluation material for
|
|
395
|
+
understanding how Dflow works on Greenfield and Brownfield scenarios.
|
|
418
396
|
|
|
419
397
|
## Why DDD Matters More with AI
|
|
420
398
|
|
|
421
|
-
AI agents are strong at filling in missing details. When the missing detail is
|
|
422
|
-
|
|
423
|
-
Dflow treats DDD as the semantic structure behind the spec. Ubiquitous language keeps names consistent. Bounded contexts keep meanings from leaking across areas. Domain rules define what is correct, allowed, or forbidden before implementation starts.
|
|
424
|
-
|
|
425
|
-
In a code-first workflow, design often appears after the fact in classes, handlers, and tests. In an AI-assisted workflow, the spec must become the precondition for generation. The practical flow becomes:
|
|
426
|
-
|
|
427
|
-
```text
|
|
428
|
-
Domain meaning -> Structured spec -> AI implementation -> Code as output
|
|
429
|
-
```
|
|
430
|
-
|
|
431
|
-
For a longer explanation, see [Why DDD Matters More with AI](docs/why-ddd-for-ai.en.md).
|
|
399
|
+
AI agents are strong at filling in missing details. When the missing detail is derivable from rules or patterns (naming conventions, boilerplate syntax), that is useful; when it is **business meaning** — what a "valid" discount looks like, what an account should not be allowed to do — the model can invent a rule that looks reasonable and is wrong, and review rarely catches it by eye. Dflow treats DDD as the semantic structure behind the spec: ubiquitous language keeps names consistent, bounded contexts keep meanings from leaking across areas, and domain rules define what is correct, allowed, or forbidden before implementation starts. For the full argument, see [Why DDD Matters More with AI](docs/why-ddd-for-ai.en.md).
|
|
432
400
|
|
|
433
401
|
## Why Dflow (Even When AI Already Knows DDD)
|
|
434
402
|
|
|
435
|
-
A common objection: "AI already understands DDD —
|
|
436
|
-
|
|
437
|
-
And Dflow's guidance is fed back from real blind spots — and once it is added, the model actually reuses it. One example: modeling on its own, the same model guarded a "only one active at a time" uniqueness rule with just an in-memory check inside the aggregate — textbook-correct, but under concurrency two requests each pass the check and break the invariant (modeling-correct, production-broken); after that blind spot was encoded as a section of Dflow guidance, re-run on a different domain, the same model proactively cited it and added DB-level protection (a unique index + a concurrency token + a 409). That is the value: Dflow turns "the blind spots AI misses on its own" into reusable guidance it actually follows.
|
|
438
|
-
|
|
439
|
-
For audit-sensitive domains (medical, finance, compliance, anything where a production failure is expensive), the difference is a deal-breaker. The cost has two sides. *Producing* the DDD documents is no longer the pre-AI era of DDD by hand — the AI generates the specs, the decision record, and the domain model for you, so the marginal cost is mainly a few more tokens and running the workflow; and just being constrained by the domain model during generation already makes the output steadier (as in the concurrency blind spot above), which you get even if you never read the record closely. But cashing in the further "reviewable" value still takes a person actually reviewing that record — that is the cost in human attention and discipline. So the trade-off stands: when stakes are high, an audit is needed, or a team maintains it long-term, the investment clearly pays off; when you won't review it, the cost of failure is low, and iteration is fast, AI alone may still be the more practical choice.
|
|
440
|
-
|
|
441
|
-
For the full loop (how a blind spot becomes guidance, and why the flip points to the guidance content rather than the domain or framing change), a few more "Dflow forces it on the record, AI tends to miss it on its own" observations, and the steps to verify it yourself, see [Why Dflow](docs/why-dflow.en.md).
|
|
403
|
+
A common objection: "AI already understands DDD — adding a process layer is over-engineering." That is half right — the AI can state the correct DDD answer, but stating the right answer and letting you see how it got there — and check what it missed — at review are two different things; the comparison is not "AI tool vs process" but **AI alone vs AI + scaffold** — not a smarter AI, a **more reviewable AI**. One example we observed (first-party observation, small sample): modeling on its own, a model guarded a "only one active at a time" uniqueness rule with just an in-memory check — textbook-correct, broken under concurrency; after that blind spot was written into Dflow's guidance and the exercise was re-run on a different domain, that run proactively cited the section and added DB-level protection. The guidance also doesn't only push toward doing more: at several common overshoot points Dflow writes the reverse criteria — where deeper modeling isn't worth it, when to stop at the simplest rung of a pattern, when to question the existing model — guarding against blind spots and guarding against over-design are two sides of the same guidance. For the full loop, the cost trade-off, the limitations, and the steps to verify it yourself, see [Why Dflow](docs/why-dflow.en.md).
|
|
442
404
|
|
|
443
405
|
## Repository Layout
|
|
444
406
|
|
|
@@ -446,10 +408,9 @@ For the full loop (how a blind spot becomes guidance, and why the flip points to
|
|
|
446
408
|
|---|---|
|
|
447
409
|
| `bin/` | CLI entrypoint. |
|
|
448
410
|
| `lib/` | CLI runtime implementation (init / configure-agents / doctor / render). |
|
|
449
|
-
| `templates/` |
|
|
411
|
+
| `templates/` | The single source of workflow content; `dflow init` / `dflow configure-agents` project from here into your project. |
|
|
450
412
|
| `test/` | Smoke tests for generated output. |
|
|
451
413
|
| `tutorial/` | Guided learning scenarios and expected outputs. |
|
|
452
|
-
| `sdd-ddd-*-skill/` | Source workflow material consumed by AI coding agents. |
|
|
453
414
|
|
|
454
415
|
## Contributing and Releases
|
|
455
416
|
|
|
@@ -462,20 +423,15 @@ Publish Checklist](docs/npm-publish-checklist.md).
|
|
|
462
423
|
## Status
|
|
463
424
|
|
|
464
425
|
Dflow is currently published as `dflow-sdd-ddd` on npm. The latest published
|
|
465
|
-
npm package is `0.
|
|
466
|
-
|
|
467
|
-
- Project
|
|
468
|
-
- Workflow documentation (the `/dflow:*` flows) plus
|
|
469
|
-
-
|
|
470
|
-
-
|
|
471
|
-
- Optional tool-native command entries (`--command-adapters`); `--skills` backfills / force-regenerates the skill
|
|
472
|
-
- `dflow render`: specs Markdown → a browsable static HTML mirror (for human reading; opens via `file://`, no server; 0.13)
|
|
473
|
-
- AI-agent-readable SDD/DDD guidance, including deepened DDD tactical-modeling guidance and a closed model-lifecycle loop (long-running flows and model re-review; 0.11–0.12)
|
|
474
|
-
- `dflow doctor` read-only project health check
|
|
475
|
-
- Public onboarding: evaluator guide and per-tool walkthroughs for Claude Code, Codex CLI, and GitHub Copilot
|
|
426
|
+
npm package is `0.15.0`, providing:
|
|
427
|
+
|
|
428
|
+
- Project scaffolding and upgrades: `dflow init` (initialization), `dflow configure-agents` (idempotent upgrade re-projection), `dflow doctor` (read-only health check with drift detection), `dflow render` (specs → human-readable HTML)
|
|
429
|
+
- Workflow documentation (the 11 `/dflow:*` flows) plus the project-vendored workflow bundle and multi-AI-tool setup (canonical guide, thin per-tool shims, project-level skill installed by default)
|
|
430
|
+
- Public evaluation material inside the package: evaluator guide and per-tool walkthroughs for Claude Code / Codex CLI / GitHub Copilot (all under `docs/`)
|
|
431
|
+
- Greenfield / Brownfield scenario tutorials and worked spec examples: **in the source repository, not in the npm package** (the tarball does not include `tutorial/`) — see [`tutorial/`](https://github.com/weilung/dflow-sdd-ddd/tree/main/tutorial)
|
|
476
432
|
- A verification-only CI workflow (it does not execute publish)
|
|
477
433
|
|
|
478
|
-
The GitHub source may include post-`0.
|
|
434
|
+
The GitHub source may include post-`0.15.0` repository changes before the
|
|
479
435
|
next npm release is published. See [CHANGELOG.md](CHANGELOG.md) for full
|
|
480
436
|
release history.
|
|
481
437
|
|