@deksden-com/dd-flow-cli 0.3.0 → 0.3.1

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 (37) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +74 -5
  3. package/dist/build-info.json +5 -5
  4. package/dist/cli/help.js +103 -15
  5. package/dist/cli/run-cli.js +307 -27
  6. package/dist/schemas/compatibility.schema.json +81 -2
  7. package/dist/schemas/engine-manifest.schema.json +61 -0
  8. package/dist/schemas/flow-guidance.schema.json +17 -0
  9. package/dist/schemas/global-dashboard-data.schema.json +60 -2
  10. package/dist/schemas/mb-upgrade-migration-report.schema.json +93 -0
  11. package/dist/schemas/project-dashboard-data.schema.json +26 -2
  12. package/dist/schemas/project-summary.schema.json +73 -0
  13. package/dist/schemas/protocol-dashboard-data.schema.json +25 -2
  14. package/dist/schemas/status-report.schema.json +4 -2
  15. package/dist/services/cleanup.js +31 -0
  16. package/dist/services/cli-operation-classifier.js +104 -0
  17. package/dist/services/compatibility-preflight.js +124 -0
  18. package/dist/services/config.js +6 -0
  19. package/dist/services/dashboard-targets.js +95 -0
  20. package/dist/services/dashboard.js +376 -59
  21. package/dist/services/engines.js +532 -0
  22. package/dist/services/flow-guidance.js +8 -1
  23. package/dist/services/hooks.js +1 -1
  24. package/dist/services/lanes.js +333 -1
  25. package/dist/services/merge-queue.js +97 -15
  26. package/dist/services/merge-worker.js +36 -2
  27. package/dist/services/migrations.js +231 -0
  28. package/dist/services/project-summary.js +122 -0
  29. package/dist/services/projects.js +41 -6
  30. package/dist/services/protocol-lifecycle.js +144 -0
  31. package/dist/services/protocols.js +29 -7
  32. package/dist/services/sessions.js +21 -4
  33. package/dist/services/status.js +10 -0
  34. package/dist/services/version-status.js +39 -15
  35. package/dist/storage/database.js +25 -0
  36. package/dist/storage/paths.js +12 -0
  37. package/package.json +3 -2
package/CHANGELOG.md ADDED
@@ -0,0 +1,43 @@
1
+ # @deksden-com/dd-flow-cli
2
+
3
+ ## 0.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 16f68a3: Add router-native engine snapshot commands and routed project-command dispatch.
8
+
9
+ Also include the runtime/dashboard compatibility wave needed by the current Memory Bank canon:
10
+ - target-based dashboard `open`/`refresh` commands and related-command help;
11
+ - persisted FIFO lane waiters and merge wait-acquire specialization;
12
+ - `migration plan/report/verify` evidence helpers for controlled `mb-upgrade` runtime migrations;
13
+ - `dd-flow/project-summary@1` publication and global dashboard aggregation from project summaries.
14
+ - active npm release runbook notes for Changesets-generated changelogs, strict Memory Bank canon build metadata, token-safe publish, local global link and post-publish compatibility verification.
15
+
16
+ ## 0.3.0
17
+
18
+ ### Minor Changes
19
+
20
+ - Add CLI version preflight support with `dd-flow version`, `dd-flow --version`, `dd-flow version --json`, Memory Bank compatibility verdicts in `dd-flow status`, and an explicit cached npm registry check through `dd-flow status --check-registry`.
21
+ - 565c601: Add static HTML dashboard rendering for global, project, and protocol dashboard pages.
22
+
23
+ The dashboard command family now supports `--format html`, a `dashboard data` command, adjacent JSON data files, protocol pages, bundled dashboard schemas, and compatibility with existing markdown dashboards.
24
+
25
+ - Add `flow_guidance` to status-like protocol/run/project/merge outputs so agents can see current stage, allowed next stages, recommended prompt/action, guard status and missing predecessor evidence without moving semantic planning into the CLI.
26
+ - Store new `RUN-*` artifacts in DD Flow home under `~/.dd-flow/projects/<PRJ-ID>/runs/<RUN-ID>/`, while keeping legacy project `.tasks/dd-flow-runs/<RUN-ID>/` readable as compatibility input.
27
+ - Add protocol-set continuation support: protocol dependency blockers, `protocol ready`, safe `protocol-implement` guidance, blocked-protocol start guards and compact set status data for dashboards.
28
+ - Add `mb-sdlc-review` / `review` flow-kind support, bundled `mb-sdlc-review-report` schema validation, semantic review-report checks and dashboard counters for review runs.
29
+ - Extend dashboard data/rendering for protocol sets, review runs and home-run stage artifacts.
30
+
31
+ ### Patch Changes
32
+
33
+ - Keep merge queue, protocol runtime and run status in sync when a merge job completes, so agents can verify `closed` protocol state, `merged` queue state and `done/merged` run state without stale `claimed` diagnostics.
34
+
35
+ ## 0.2.0
36
+
37
+ ### Minor Changes
38
+
39
+ - Expose canonical Memory Bank version visibility in `dd-flow status`, including CLI build metadata, resolved canon metadata, project Memory Bank markers, project flow pack manifest state, drift diagnostics, and the `dd-flow/status-report@1` schema.
40
+
41
+ ### Patch Changes
42
+
43
+ - 322cae9: Add canonical Memory Bank discovery commands and runtime status output.
package/README.md CHANGED
@@ -97,6 +97,28 @@ dd-flow codex home --help
97
97
  dd-flow worktree --help
98
98
  ```
99
99
 
100
+ ## Engine Router
101
+
102
+ `dd-flow` is the stable router command. The router keeps immutable engine snapshots in `DD_FLOW_HOME/engines` and selects the compatible engine for project-scoped commands.
103
+
104
+ Router-native engine commands do not mutate project runtime:
105
+
106
+ ```bash
107
+ dd-flow engine install --json
108
+ dd-flow engine list --json
109
+ dd-flow engine info --json
110
+ dd-flow engine resolve --project-root "$PWD" --json
111
+ dd-flow engine doctor --project-root "$PWD" --json
112
+ ```
113
+
114
+ Old installable engines are installed from the matching published package version without replacing the global router:
115
+
116
+ ```bash
117
+ npx @deksden-com/dd-flow-cli@<version> engine install
118
+ ```
119
+
120
+ Project commands keep using `dd-flow ...`; agents should not call snapshot entrypoints directly.
121
+
100
122
  ## Lanes And Locks
101
123
 
102
124
  A lane is a named shared operational workspace inside a project. A lane lock is a time-bound ownership lease on that workspace. The CLI enforces one active non-expired lock per project/lane; prompts decide whether a task should use a feature worktree, `direct-main`, or `merge`.
@@ -121,10 +143,20 @@ Inspect lane state:
121
143
  ```bash
122
144
  dd-flow lane status --project-root "$PROJECT_ROOT" --json
123
145
  dd-flow lane lock status --project-root "$PROJECT_ROOT" --lane merge --json
146
+ dd-flow lane waiters --project-root "$PROJECT_ROOT" --lane merge --json
124
147
  ```
125
148
 
126
149
  Branch checks are factual diagnostics. Lock mutation and merge queue claiming validate the registered workspace path mechanically. A mismatch can help a prompt or operator notice the wrong checkout, but the CLI does not decide whether the route is semantically allowed.
127
150
 
151
+ Persisted lane waiters let agents wait for exclusive lane ownership without token-level polling:
152
+
153
+ ```bash
154
+ dd-flow lane lock wait-acquire --project-root "$PROJECT_ROOT" --lane merge --worker-id "$WORKER_ID" --path "$WORKSPACE" --timeout 300 --poll-interval 10 --ttl 300 --reason "merge worker" --json
155
+ dd-flow lane waiter cancel --project-root "$PROJECT_ROOT" --lane merge --worker-id "$WORKER_ID" --reason "session stopped" --json
156
+ ```
157
+
158
+ `wait-acquire` creates one queued waiter per `project/lane/worker-id`, preserves FIFO acquisition order, treats same-worker retries idempotently, returns `timed_out` for the command's own timeout, and leaves stale queued waiters for `cleanup scan/apply`.
159
+
128
160
  ## Direct Main Recipe
129
161
 
130
162
  Use `direct-main` only after the prompt or operator has chosen direct integration work for a small, low-risk task.
@@ -164,7 +196,9 @@ For supervisor-style waiting outside model tokens:
164
196
  dd-flow merge-queue wait-next --project-root "$PROJECT_ROOT" --worker-id "$WORKER_ID" --path "$MERGE_WORKSPACE" --timeout 1200 --poll-interval 10 --acquire-lock true --json
165
197
  ```
166
198
 
167
- With `--acquire-lock true`, `wait-next` heartbeats the merge lane lock while it waits and releases a lock it acquired itself when the wait times out. Live merge workers should prefer long waits, for example 1200 seconds / 20 minutes, so the agent sleeps inside the CLI process instead of spending model tokens on frequent polling.
199
+ With `--acquire-lock true`, `wait-next` first uses the generic FIFO lane waiter path for `lane=merge`, then heartbeats the merge lane lock while it waits and releases a lock it acquired itself when the wait times out. Live merge workers should prefer long waits, for example 1200 seconds / 20 minutes, so the agent sleeps inside the CLI process instead of spending model tokens on frequent polling.
200
+
201
+ Merge queue JSON uses `queue_item`, `protocol`, and `claim` as the primary queued/claimed protocol contract. The legacy `job` field remains as a compatibility alias during the migration window.
168
202
 
169
203
  Complete or fail the claimed job:
170
204
 
@@ -206,6 +240,32 @@ dd-flow protocol cancel PRT-... --reason "replaced by fresh run" --close-session
206
240
 
207
241
  For a stale disposable feature checkout, use `--worktree remove`. The command removes the git worktree recorded either in `worktree_records` or in stable runtime `state.workspace`; with `--force`, it also force-deletes the local feature branch when present. It refuses dirty worktrees without `--force` and refuses to remove the stable project root or the current process working directory.
208
242
 
243
+ ## mb-upgrade Runtime Migrations
244
+
245
+ Normal `dd-flow` commands do not migrate project runtime or home data just because a newer router/engine can read an older project. Runtime/home data migrations belong to the explicit canonical `mb-upgrade` contour and need backup evidence, an adjacent migration chain, active-state handling and post-upgrade verification.
246
+
247
+ Use migration evidence helpers from `mb-upgrade`:
248
+
249
+ ```bash
250
+ dd-flow migration plan --project-root "$PROJECT_ROOT" --source-version "$OLD_MB" --target-version "$NEW_MB" --run "$RUN_ID" --backup-path "$BACKUP" --json
251
+ dd-flow migration report --project-root "$PROJECT_ROOT" --source-version "$OLD_MB" --target-version "$NEW_MB" --run "$RUN_ID" --backup-path "$BACKUP" --json
252
+ dd-flow migration verify --file "$RUN_HOME/03-upgrade/migration-report.json" --json
253
+ ```
254
+
255
+ The report contract is `dd-flow/mb-upgrade-migration-report@1`. A blocked report is valid evidence that upgrade cannot safely mutate runtime yet; it is not permission to bypass active protocols, active runs, merge queue items or lane locks.
256
+
257
+ ## Project Summaries
258
+
259
+ Global dashboard data should consume compact project summaries instead of scanning deep project runtime directly. Publish the current project's read model with:
260
+
261
+ ```bash
262
+ dd-flow project summary --project-root "$PROJECT_ROOT" --json
263
+ ```
264
+
265
+ The summary is written to `~/.dd-flow/projects/<project-id>/summary/project-summary.json` and uses `dd-flow/project-summary@1`. `dashboard refresh --project <project>` also publishes the summary before rendering dashboards. Use `--write false` to inspect the payload without writing it.
266
+
267
+ Global dashboard data reads published project summaries and builds one prepared JSON model for the renderer. Compatible summaries become project cards; missing, unreadable or unsupported summaries are listed in `unsupported_projects` with a reason, summary path and install/refresh hint when available. The global dashboard also exposes `supported_summary_versions` and `summary_version_groups` so agents can see which local projects are represented by each summary contract version.
268
+
209
269
  ## Cleanup
210
270
 
211
271
  Use cleanup when local runtime state is stale after a crash, abandoned rerun, or removed feature worktree. `cleanup scan` is read-only. `cleanup apply` requires an explicit plan file and reason, reports requested/applied/changed/skipped action results, and dirty/destructive worktree actions require `--force --reason`. Worktree record cleanup marks a checkout `removed` only when the path is already absent; if the checkout still exists, the record is closed as `kept` rather than silently deleting files.
@@ -224,6 +284,8 @@ Dashboard markdown is rendered state, not source of truth. Successful state-chan
224
284
 
225
285
  The dashboard is intentionally compact: it shows the last update time, active protocols/sessions, merge queue summary, active locks, recent outcomes, and missing project roots without dumping full hook payloads into the main view.
226
286
 
287
+ Dashboard JSON separates protocol lifecycle from resource coordination. New consumers should read `lifecycle`, `lifecycle_summary`, `resource_summary`, `queued_protocols`, `queue_item`, and `claim` when present. Legacy fields such as `current_stage`, `raw_stage`, `raw_status`, `merge_queue`, and `job` remain available as compatibility aliases or diagnostics during the migration window.
288
+
227
289
  Defaults:
228
290
 
229
291
  ```text
@@ -236,12 +298,19 @@ protocol HTML: ~/.dd-flow/projects/<PRJ-ID>/dashboard/protocols/<PRT-ID>.htm
236
298
  Useful commands:
237
299
 
238
300
  ```bash
239
- dd-flow dashboard render --project-root "$PROJECT_ROOT" --json
240
- dd-flow dashboard render-global --json
241
- dd-flow dashboard refresh --project-root "$PROJECT_ROOT" --open false --json
242
- dd-flow dashboard open --project-root "$PROJECT_ROOT" --viewer cmux --json
301
+ dd-flow dashboard open --json
302
+ dd-flow dashboard refresh --json
303
+ dd-flow dashboard refresh --all --json
304
+ dd-flow dashboard refresh --project PRJ-001 --open false --json
305
+ dd-flow dashboard open --project PRJ-001 --viewer cmux --json
306
+ dd-flow dashboard data --project PRJ-001 --json
243
307
  ```
244
308
 
309
+ Compatibility forms remain available for older prompts and scripts: `refresh-global`,
310
+ `render-global`, `--project-root`, and `data --global`. Prefer the target-based
311
+ commands above for new automation. `--project` accepts a full project id, short
312
+ id, slug, or registered project root path.
313
+
245
314
  Config keys:
246
315
 
247
316
  ```bash
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "cli_package": "@deksden-com/dd-flow-cli",
3
- "cli_version": "0.3.0",
4
- "cli_commit": "059594c2096e080548d470e789f594e20a1a8ebd",
5
- "built_at": "2026-06-30T20:32:13.018Z",
3
+ "cli_version": "0.3.1",
4
+ "cli_commit": "b677e824e7d3b1e6553e7963eeceeb1db02e86db",
5
+ "built_at": "2026-07-03T20:02:54.356Z",
6
6
  "built_with_canon": {
7
- "version": "2.8.0",
8
- "commit": "f549c33bd73d8d18b5cb07d9737b02fe638e61b8",
7
+ "version": "2.9.0",
8
+ "commit": "7e8b51c1321e290d18df3572d6ab26ed32b85403",
9
9
  "flow_contract": "dd-flow-canonical-2026-06",
10
10
  "repo_root": "/Users/deksden/Documents/_Projects/dd-memorybank",
11
11
  "memorybank_root": "/Users/deksden/Documents/_Projects/dd-memorybank/.memory-bank",
package/dist/cli/help.js CHANGED
@@ -11,11 +11,14 @@ Usage:
11
11
  Core commands:
12
12
  version Print the installed dd-flow CLI package version.
13
13
  status Inspect dd-flow runtime, project and canon roots.
14
+ engine install/list/info Manage locally installed dd-flow engine snapshots.
15
+ engine resolve/doctor Inspect router engine selection and health.
14
16
  canon register/status/resolve Register and resolve the canonical Memory Bank.
15
- project register/status Register a project and inspect runtime state.
17
+ project register/status/summary Register a project, inspect state, and publish project summaries.
16
18
  project resolve/archive Resolve typed ids and archive stale project roots.
17
19
  project migrate-ids Migrate old project ids.
18
20
  protocol register/status/transition Register, inspect, transition and repair protocol state.
21
+ migration plan/report/verify Prepare and verify mb-upgrade runtime migration evidence.
19
22
  cleanup scan/apply Detect and repair stale local runtime state.
20
23
  run start/status/list Track concrete flow executions and stage artifacts.
21
24
  id next Preview next typed ids for protocol or run allocation.
@@ -25,7 +28,7 @@ Core commands:
25
28
  merge-worker status/start/stop Manage long-lived project merge workers.
26
29
  merge-queue status/next Claim, wait for, complete, or fail merge jobs.
27
30
  session register/status/stop Register flow sessions and stop workers.
28
- dashboard data/render/open/refresh Render markdown or HTML project/global dashboards.
31
+ dashboard data/render/open/refresh Render, refresh, open, and inspect project/global dashboards.
29
32
  schema validate Validate canonical dd-flow JSON data contracts.
30
33
  memory permissions preflight Check Memory Bank write/read permissions.
31
34
  integration cmux status Inspect optional cmux integration.
@@ -35,6 +38,8 @@ Core commands:
35
38
  Examples:
36
39
  dd-flow project register --root "$PWD"
37
40
  dd-flow version
41
+ dd-flow engine install --json
42
+ dd-flow engine resolve --project-root "$PWD" --json
38
43
  dd-flow status --project-root "$PWD" --json
39
44
  dd-flow canon register --root "$DD_MEMORYBANK" --json
40
45
  dd-flow canon resolve --json
@@ -68,6 +73,29 @@ version reports the installed dd-flow CLI package version from package metadata.
68
73
  Examples:
69
74
  dd-flow version
70
75
  dd-flow version --json`
76
+ ],
77
+ [
78
+ "engine",
79
+ `dd-flow engine - manage router-installed engine snapshots
80
+
81
+ Usage:
82
+ dd-flow engine install [--force] --json
83
+ dd-flow engine list --json
84
+ dd-flow engine info [--package <name>] [--version <version>] --json
85
+ dd-flow engine resolve [--project-root <root>] --json
86
+ dd-flow engine doctor [--project-root <root>] --json
87
+
88
+ The globally invoked dd-flow command is the stable router surface. Engine snapshots live under DD_FLOW_HOME/engines and are selected by project Memory Bank compatibility data. Running an old package through npx can install that package's own engine without replacing the global router:
89
+
90
+ npx @deksden-com/dd-flow-cli@<version> engine install
91
+
92
+ Router-native engine commands never mutate project runtime data. Normal project commands are routed to a compatible engine or fail closed with a missing-engine diagnostic.
93
+
94
+ Examples:
95
+ dd-flow engine install --json
96
+ dd-flow engine list --json
97
+ dd-flow engine resolve --project-root "$PWD" --json
98
+ dd-flow engine doctor --project-root "$PWD" --json`
71
99
  ],
72
100
  [
73
101
  "status",
@@ -174,12 +202,29 @@ Prefer dd-flow protocol transition in new prompts and scripts. This top-level al
174
202
  Usage:
175
203
  dd-flow project register --root <root> --json
176
204
  dd-flow project status --root <root> --json
205
+ dd-flow project summary --project-root <root> [--write true|false] --json
177
206
  dd-flow project resolve <PRJ-ID|PRJ-NNN> --json
178
207
  dd-flow project archive <PRJ-ID|PRJ-NNN> --reason <text> --json
179
208
  dd-flow project archive --root <previous-root-path> --reason <text> --json
180
209
  dd-flow project migrate-ids --root <root> [--apply] --json
181
210
 
182
- New registrations use full typed ids such as PRJ-001-dd-flow-playground and short aliases such as PRJ-001. project resolve accepts full id or unique short alias. project archive removes stale or deleted project roots from active dashboards without deleting history. Re-registering an existing root reactivates it. migrate-ids is the explicit transition path for old hash-based local project ids; without --apply it returns a dry-run plan.`
211
+ New registrations use full typed ids such as PRJ-001-dd-flow-playground and short aliases such as PRJ-001. project resolve accepts full id or unique short alias. project summary writes dd-flow/project-summary@1 to the project's home summary directory by default; use --write false to inspect the payload without writing. project archive removes stale or deleted project roots from active dashboards without deleting history. Re-registering an existing root reactivates it. migrate-ids is the explicit transition path for old hash-based local project ids; without --apply it returns a dry-run plan.`
212
+ ],
213
+ [
214
+ "migration",
215
+ `dd-flow migration - plan and verify mb-upgrade runtime/home data migrations
216
+
217
+ Usage:
218
+ dd-flow migration plan --project-root <root> [--source-version <version>] [--target-version <version>] [--run <RUN-ID>] [--backup-path <path>] [--backup-created-at <iso>] [--allow-active true|false] --json
219
+ dd-flow migration report --project-root <root> [--source-version <version>] [--target-version <version>] [--run <RUN-ID>] [--backup-path <path>] [--backup-created-at <iso>] [--allow-active true|false] --json
220
+ dd-flow migration verify --file <mb-upgrade-migration-report.json> --json
221
+
222
+ Migration commands are evidence and guardrail helpers for canonical mb-upgrade. They do not silently migrate runtime/home data during ordinary CLI use. Applying migrations remains an explicit mb-upgrade contour with backup, adjacent migration chain, active-state handling, derived artifact regeneration and post-upgrade verification.
223
+
224
+ Related commands:
225
+ dd-flow status --project-root <root> --json
226
+ dd-flow memory permissions preflight --root <root> --memory-bank .memory-bank --flow mb-upgrade --mode write --json
227
+ dd-flow dashboard refresh --project <project> --json`
183
228
  ],
184
229
  [
185
230
  "lane",
@@ -187,13 +232,16 @@ New registrations use full typed ids such as PRJ-001-dd-flow-playground and shor
187
232
 
188
233
  Usage:
189
234
  dd-flow lane status --project-root <root> --json
235
+ dd-flow lane waiters --project-root <root> [--lane <name>] --json
190
236
  dd-flow lane workspace <action> [options] --json
191
237
  dd-flow lane lock <action> [options] --json
238
+ dd-flow lane waiter <action> [options] --json
192
239
 
193
240
  Use lanes when multiple agents might edit or merge through the same workspace. The CLI enforces mechanical ownership only; prompts decide whether a route should use merge, direct-main, or a feature worktree.
194
241
 
195
242
  Examples:
196
243
  dd-flow lane status --project-root "$PWD" --json
244
+ dd-flow lane waiters --project-root "$PWD" --lane merge --json
197
245
  dd-flow lane workspace set --project-root "$PWD" --lane direct-main --path "$PWD" --branch main --json
198
246
  dd-flow lane lock status --project-root "$PWD" --lane direct-main --json`
199
247
  ],
@@ -221,13 +269,30 @@ Usage:
221
269
  dd-flow lane lock release --project-root <root> --lane <name> --worker-id <id> [--path <workspace>] [--lease-token <token>] --reason <text> --json
222
270
  dd-flow lane lock status --project-root <root> --lane <name> --json
223
271
  dd-flow lane lock wait --project-root <root> --lane <name> --worker-id <id> [--path <workspace>] --timeout <seconds> --poll-interval <seconds> --json
272
+ dd-flow lane lock wait-acquire --project-root <root> --lane <name> --worker-id <id> [--path <workspace>] --timeout <seconds> --poll-interval <seconds> [--ttl 300] --reason <text> --json
224
273
 
225
- Lock mutation commands validate that --path, or the current working directory when --path is omitted, matches the registered lane workspace. Only the owner can heartbeat or release an active lease. Expired leases can be taken over mechanically and are recorded in audit.
274
+ Lock mutation commands validate that --path, or the current working directory when --path is omitted, matches the registered lane workspace. Only the owner can heartbeat or release an active lease. wait-acquire creates a persisted FIFO waiter before acquiring the lock. Expired leases and stale waiters are recorded in audit.
226
275
 
227
276
  Examples:
228
277
  dd-flow lane lock acquire --project-root "$PWD" --lane merge --worker-id worker-1 --path "$PWD" --ttl 300 --reason "merge worker" --json
278
+ dd-flow lane lock wait-acquire --project-root "$PWD" --lane merge --worker-id worker-1 --path "$PWD" --timeout 300 --poll-interval 10 --reason "merge worker" --json
229
279
  dd-flow lane lock heartbeat --project-root "$PWD" --lane merge --worker-id worker-1 --path "$PWD" --lease-token "$TOKEN" --json
230
280
  dd-flow lane lock release --project-root "$PWD" --lane merge --worker-id worker-1 --path "$PWD" --lease-token "$TOKEN" --reason done --json`
281
+ ],
282
+ [
283
+ "lane waiter",
284
+ `dd-flow lane waiter - inspect and cancel persisted lane waiters
285
+
286
+ Usage:
287
+ dd-flow lane waiters --project-root <root> [--lane <name>] --json
288
+ dd-flow lane waiter cancel --project-root <root> --lane <name> --worker-id <id> --reason <text> --json
289
+
290
+ Waiters are runtime coordination records, not protocols or domain jobs. Use waiters to coordinate fair access to exclusive lanes before a worker owns the lane lock.
291
+
292
+ Related lane commands:
293
+ dd-flow lane lock wait-acquire --project-root "$PWD" --lane merge --worker-id worker-1 --path "$PWD" --timeout 300 --poll-interval 10 --reason "merge worker" --json
294
+ dd-flow lane lock status --project-root "$PWD" --lane merge --json
295
+ dd-flow lane waiter cancel --project-root "$PWD" --lane merge --worker-id worker-1 --reason "session stopped" --json`
231
296
  ],
232
297
  [
233
298
  "merge",
@@ -237,7 +302,7 @@ Usage:
237
302
  dd-flow merge status --project-root <root> --json
238
303
  dd-flow merge one-shot --project-root <root> --worker-id <id> [--path <workspace>] --json
239
304
 
240
- merge status reports active merge worker, claimed jobs, active merge lane lock and queue state. merge one-shot is status-only when a long-lived worker, claimed job or active lock exists; otherwise it acquires the merge lane, claims at most one ready job, and returns that job for the shared merge job prompt. If no job is ready, it releases the lock and returns job: null.`
305
+ merge status reports active merge worker, claimed protocols, active merge lane lock and queue state. merge one-shot is status-only when a long-lived worker, claimed protocol or active lock exists; otherwise it acquires the merge lane, claims at most one ready protocol, and returns queue_item/protocol/claim plus legacy job for the shared merge job prompt. If no protocol is ready, it releases the lock and returns queue_item: null and job: null.`
241
306
  ],
242
307
  [
243
308
  "merge-worker",
@@ -263,7 +328,7 @@ Usage:
263
328
  dd-flow merge-queue fail <protocol-id> --worker-id <id> [--path <workspace>] --reason <text> --requeue true|false --json
264
329
  dd-flow merge-queue cancel <protocol-id> --reason <text> [--worker-id <id>] [--path <workspace>] [--force] --json
265
330
 
266
- The worker must own the merge lane from the registered merge workspace before claiming, completing, or failing jobs. note updates the final completion summary after post-complete cleanup and does not require a lane lock. --path defaults to the current working directory. Use --worker-id as the owner identity.
331
+ The worker must own the merge lane from the registered merge workspace before claiming, completing, or failing queued protocols. Outputs use queue_item/protocol/claim as the primary contract and retain job as a compatibility alias. note updates the final completion summary after post-complete cleanup and does not require a lane lock. --path defaults to the current working directory. Use --worker-id as the owner identity.
267
332
 
268
333
  Examples:
269
334
  dd-flow merge-queue wait-next --project-root "$PWD" --worker-id merge-worker --path "$PWD" --timeout 1200 --poll-interval 10 --acquire-lock true --json
@@ -282,12 +347,12 @@ cleanup scan is read-only and returns deterministic findings plus plan.actions.
282
347
  ],
283
348
  [
284
349
  "merge-queue wait-next",
285
- `dd-flow merge-queue wait-next - wait for the next ready merge job
350
+ `dd-flow merge-queue wait-next - wait for the next ready merge protocol
286
351
 
287
352
  Usage:
288
353
  dd-flow merge-queue wait-next --project-root <root> --worker-id <id> [--path <workspace>] --timeout <seconds> --poll-interval <seconds> [--acquire-lock true] --json
289
354
 
290
- Use this from a shell or supervisor to wait outside model tokens. Live merge workers should prefer long waits, for example --timeout 1200 --poll-interval 10, so the agent sleeps inside the CLI process instead of spending model tokens on frequent polling. If --acquire-lock true is used, the merge lock is heartbeated while waiting and a lock acquired by this command is released on timeout. If a job is ready, it is claimed atomically. If no job appears before the timeout, the command returns a structured timeout result.
355
+ Use this from a shell or supervisor to wait outside model tokens. Live merge workers should prefer long waits, for example --timeout 1200 --poll-interval 10, so the agent sleeps inside the CLI process instead of spending model tokens on frequent polling. If --acquire-lock true is used, wait-next first enters the generic FIFO lane waiter path (lane lock wait-acquire --lane merge), then heartbeats the merge lock while waiting for a ready protocol. A lock acquired by this command is released on timeout. If a protocol is ready, it is claimed atomically. If no protocol appears before the timeout, the command returns outcome: wait_timeout with queue_item: null and legacy job: null.
291
356
 
292
357
  Examples:
293
358
  dd-flow merge-queue wait-next --project-root "$PWD" --worker-id supervisor --path "$PWD" --timeout 1200 --poll-interval 10 --acquire-lock true --json`
@@ -332,18 +397,41 @@ Usage:
332
397
  ],
333
398
  [
334
399
  "dashboard",
335
- `dd-flow dashboard - render or open markdown and HTML dashboards
400
+ `dd-flow dashboard - render, refresh, open, and inspect markdown/HTML dashboards
336
401
 
337
402
  Usage:
338
- dd-flow dashboard data --project-root <root> [--protocol <PRT-ID>] --json
339
- dd-flow dashboard data --global --json
340
- dd-flow dashboard render --project-root <root> [--format markdown|html] [--protocol <PRT-ID>] [--output <path>] --json
403
+ dd-flow dashboard open [--viewer cmux] [--format html|markdown] --json
404
+ dd-flow dashboard refresh [--format html|markdown] --json
405
+ dd-flow dashboard refresh --all [--format html|markdown] --json
406
+ dd-flow dashboard refresh --project <project> [--format html|markdown] [--protocol <PRT-ID>] [--open auto|true|false] --json
407
+ dd-flow dashboard open --project <project> [--protocol <PRT-ID>] [--viewer cmux] [--format html] --json
408
+ dd-flow dashboard data [--project <project>] [--protocol <PRT-ID>] --json
409
+ dd-flow dashboard render [--project <project>] [--format html|markdown] [--protocol <PRT-ID>] [--output <path>] --json
410
+
411
+ Compatibility aliases and explicit low-level forms:
412
+ dd-flow dashboard refresh-global [--format markdown|html] [--output <path>] --json
413
+ Preferred: dd-flow dashboard refresh
341
414
  dd-flow dashboard render-global [--format markdown|html] [--output <path>] --json
342
- dd-flow dashboard open --project-root <root> [--format markdown|html] [--viewer cmux] --json
415
+ Preferred: dd-flow dashboard render
343
416
  dd-flow dashboard refresh --project-root <root> [--format markdown|html] [--protocol <PRT-ID>] [--open auto|true|false] --json
344
- dd-flow dashboard refresh-global [--format markdown|html] [--output <path>] --json
417
+ Preferred: dd-flow dashboard refresh --project <project>
418
+ dd-flow dashboard open --project-root <root> [--format markdown|html] [--viewer cmux] --json
419
+ Preferred: dd-flow dashboard open --project <project>
420
+ dd-flow dashboard render --project-root <root> [--format markdown|html] [--protocol <PRT-ID>] [--output <path>] --json
421
+ Preferred: dd-flow dashboard render --project <project>
422
+ dd-flow dashboard data --global --json
423
+ Preferred: dd-flow dashboard data
424
+
425
+ Project accepts full id, short id, slug, or registered project root path.
426
+
427
+ Related dashboard commands:
428
+ dd-flow dashboard open
429
+ dd-flow dashboard refresh
430
+ dd-flow dashboard refresh --all
431
+ dd-flow dashboard open --project <project>
432
+ dd-flow dashboard data --project <project> --json
345
433
 
346
- Dashboards are rendered views of dd-flow state. Markdown remains the compatibility fallback. HTML dashboards write JSON next to self-contained local HTML: global under DD_FLOW_HOME/dashboard/ and project/protocol pages under DD_FLOW_HOME/projects/<PRJ-ID-slug>/dashboard/. State-changing commands still auto-refresh markdown during the transition. cmux is used only by explicit open/refresh commands and only according to project config.`
434
+ Dashboards are rendered views of dd-flow state. Markdown remains the compatibility fallback. HTML dashboards write JSON next to self-contained local HTML: global under DD_FLOW_HOME/dashboard/ and project/protocol pages under DD_FLOW_HOME/projects/<PRJ-ID-slug>/dashboard/. Dashboard JSON uses lifecycle/resource/claim fields as the primary contract when present; current_stage/raw_stage/raw_status/merge_queue/job are compatibility or diagnostic fields. Global dashboard data consumes published project summaries, exposes supported_summary_versions and summary_version_groups, and lists missing/unreadable/unsupported project summaries under unsupported_projects instead of silently hiding those projects. State-changing commands still auto-refresh markdown during the transition. cmux is used only by explicit open/refresh commands and only according to project config. JSON mode writes machine-readable output only.`
347
435
  ],
348
436
  [
349
437
  "schema",