@xenonbyte/da-vinci-workflow 0.2.1 → 0.2.3

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 (57) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +33 -12
  3. package/README.zh-CN.md +34 -12
  4. package/bin/da-vinci-tui.js +8 -0
  5. package/commands/claude/dv/breakdown.md +8 -0
  6. package/commands/claude/dv/build.md +11 -0
  7. package/commands/claude/dv/design.md +5 -2
  8. package/commands/claude/dv/tasks.md +8 -0
  9. package/commands/claude/dv/verify.md +9 -0
  10. package/commands/codex/prompts/dv-breakdown.md +8 -0
  11. package/commands/codex/prompts/dv-build.md +11 -0
  12. package/commands/codex/prompts/dv-design.md +5 -2
  13. package/commands/codex/prompts/dv-tasks.md +8 -0
  14. package/commands/codex/prompts/dv-verify.md +8 -0
  15. package/commands/gemini/dv/breakdown.toml +8 -0
  16. package/commands/gemini/dv/build.toml +11 -0
  17. package/commands/gemini/dv/design.toml +5 -2
  18. package/commands/gemini/dv/tasks.toml +8 -0
  19. package/commands/gemini/dv/verify.toml +8 -0
  20. package/docs/dv-command-reference.md +47 -0
  21. package/docs/execution-chain-plan.md +10 -3
  22. package/docs/mode-use-cases.md +2 -1
  23. package/docs/pencil-rendering-workflow.md +15 -12
  24. package/docs/prompt-entrypoints.md +2 -0
  25. package/docs/prompt-presets/README.md +1 -1
  26. package/docs/prompt-presets/desktop-app.md +3 -3
  27. package/docs/prompt-presets/mobile-app.md +3 -3
  28. package/docs/prompt-presets/tablet-app.md +3 -3
  29. package/docs/prompt-presets/web-app.md +3 -3
  30. package/docs/skill-usage.md +224 -0
  31. package/docs/workflow-examples.md +16 -13
  32. package/docs/workflow-overview.md +3 -0
  33. package/docs/zh-CN/dv-command-reference.md +47 -0
  34. package/docs/zh-CN/mode-use-cases.md +2 -1
  35. package/docs/zh-CN/pencil-rendering-workflow.md +15 -12
  36. package/docs/zh-CN/prompt-entrypoints.md +2 -0
  37. package/docs/zh-CN/prompt-presets/README.md +1 -1
  38. package/docs/zh-CN/prompt-presets/desktop-app.md +3 -3
  39. package/docs/zh-CN/prompt-presets/mobile-app.md +3 -3
  40. package/docs/zh-CN/prompt-presets/tablet-app.md +3 -3
  41. package/docs/zh-CN/prompt-presets/web-app.md +3 -3
  42. package/docs/zh-CN/skill-usage.md +224 -0
  43. package/docs/zh-CN/workflow-examples.md +15 -13
  44. package/docs/zh-CN/workflow-overview.md +3 -0
  45. package/examples/greenfield-spec-markupflow/.da-vinci/state/execution-signals/demo__lint-tasks.json +16 -0
  46. package/lib/audit-parsers.js +18 -9
  47. package/lib/audit.js +3 -26
  48. package/lib/cli.js +72 -0
  49. package/lib/design-source-registry.js +146 -0
  50. package/lib/save-current-design.js +790 -0
  51. package/lib/supervisor-review.js +1 -1
  52. package/lib/workflow-bootstrap.js +2 -13
  53. package/lib/workflow-persisted-state.js +3 -1
  54. package/lib/workflow-state.js +51 -3
  55. package/package.json +4 -2
  56. package/tui/catalog.js +1293 -0
  57. package/tui/index.js +2583 -0
@@ -29,7 +29,7 @@ PNG exports are review artifacts only. They are not the design source of truth.
29
29
  Da Vinci now requires the session wrapper on autonomous runs:
30
30
 
31
31
  - `da-vinci pencil-session begin`
32
- - `da-vinci pencil-session persist`
32
+ - `da-vinci save-current-design`
33
33
  - `da-vinci pencil-session end`
34
34
 
35
35
  This wrapper exists to make three things mandatory:
@@ -75,18 +75,21 @@ When resuming from existing artifacts:
75
75
 
76
76
  Da Vinci does not treat headless interactive `save()` as authoritative persistence truth.
77
77
 
78
- Instead, the persistence step is:
78
+ Instead, the primary persistence step is:
79
79
 
80
- 1. read MCP-readable node snapshot data
81
- 2. read MCP-readable variable snapshot data
82
- 3. write the project-local `.pen`
83
- 4. reopen-verify it
84
- 5. compare live snapshot and persisted snapshot hashes
80
+ 1. run `da-vinci save-current-design --project <project-path>`
81
+ 2. require one explicit result envelope: `saved`, `blocked`, or `unavailable`
82
+ 3. treat only `saved` as persisted success
83
+ 4. treat `blocked` as save-time source/lock/payload contract failure
84
+ 5. treat `unavailable` as MCP bridge/runtime capture absence (never as a successful save)
85
85
 
86
86
  Relevant commands:
87
87
 
88
- - `da-vinci write-pen`
89
- - `da-vinci check-pen-sync`
88
+ - high-level: `da-vinci save-current-design`
89
+ - low-level fallback: `da-vinci pencil-session persist`, `da-vinci write-pen`, `da-vinci check-pen-sync`
90
+
91
+ The MVP safety guarantee is source-path convergence only: registered `.pen`, session `penPath`, and active editor path must converge.
92
+ Exact window-instance identity remains out of scope until MCP exposes stable window/editor identifiers.
90
93
 
91
94
  `da-vinci snapshot-pen` is disk-to-disk only. It is not the live-edit persistence path.
92
95
 
@@ -251,7 +254,7 @@ Typical autonomous chain:
251
254
  1. `da-vinci pencil-session begin --project <project-path> --pen <path>`
252
255
  2. if external/secondary `.pen` files exist, run `da-vinci check-pen-baseline --pen <project-pen> --baseline <other-pen>` before edits; if diverged, sync the preferred source into `<project-pen>` first
253
256
  3. Pencil MCP edits
254
- 4. `da-vinci pencil-session persist --project <project-path> --pen <path> --nodes-file <nodes.json> --variables-file <vars.json> --version <version>`
257
+ 4. `da-vinci save-current-design --project <project-path>`
255
258
  5. screenshot review + layout hygiene
256
259
  6. design checkpoint
257
260
  7. design-supervisor review when configured
@@ -278,13 +281,13 @@ flowchart TD
278
281
  K -- No --> F
279
282
  K -- Yes --> L{Design-supervisor review configured?}
280
283
  L -- Yes --> M[Run design-supervisor review on screenshots plus theme inputs]
281
- L -- No --> N[pencil-session persist writes live MCP snapshot back to .pen]
284
+ L -- No --> N[save-current-design persists bound live snapshot back to .pen]
282
285
  M --> O{Require Supervisor Review?}
283
286
  O -- No --> N
284
287
  O -- Yes --> P{Review PASS or accepted WARN?}
285
288
  P -- No --> F
286
289
  P -- Yes --> N
287
- N --> Q[check-pen-sync verifies live hash equals persisted hash]
290
+ N --> Q[save-current-design returns saved or a terminal blocker/unavailable result]
288
291
  Q --> R{design-source checkpoint and runtime gate pass?}
289
292
  R -- No --> F
290
293
  R -- Yes --> S{More design work needed?}
@@ -85,6 +85,8 @@ Use this default sequence:
85
85
 
86
86
  Do not default this sequence to `build`.
87
87
 
88
+ If command recall becomes the main friction, launch `da-vinci tui` and use the grouped workflow surfaces from the terminal UI instead of memorizing each CLI surface manually.
89
+
88
90
  `build` is still valid, but it is an expert route for workflows that are already implementation-ready.
89
91
 
90
92
  State rule:
@@ -21,7 +21,7 @@ Recommended flow:
21
21
  4. copy both into your workflow setup
22
22
  5. tighten the prompt further only when the project has unusual truth sources or platform constraints
23
23
  6. when Pencil MCP is active, prefer the redesign prompts that explicitly require an MCP runtime gate plus a completion audit before terminal completion claims
24
- 7. for project-local `.pen` persistence on autonomous runs, require prompts that drive `da-vinci pencil-session begin / persist / end`; fall back to the lower-level `ensure-pen + write-pen + check-pen-sync` chain only when the wrapper truly cannot be used
24
+ 7. for project-local `.pen` persistence on autonomous runs, require prompts that drive `da-vinci pencil-session begin / save-current-design / end`; treat `saved`, `blocked`, and `unavailable` as distinct outcomes, and only fall back to lower-level payload persistence when high-level save is unavailable
25
25
 
26
26
  Available presets:
27
27
 
@@ -120,7 +120,7 @@ Before non-trivial `batch_design` calls, preflight the Pencil operations when sh
120
120
  If the same anchor surface rolls back twice, switch to micro-batches of 6 or fewer operations until a clean schema-safe pass succeeds.
121
121
  Run `da-vinci audit --mode integrity <project-path>` after the first successful Pencil write before broad expansion continues.
122
122
  If Pencil MCP is active, run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
123
- Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci pencil-session persist --project <project-path> --pen <path> ...` after material live edits. Fall back to the lower-level `ensure-pen + write-pen + check-pen-sync` chain only when the session wrapper cannot be used.
123
+ Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci save-current-design --project <project-path>` after material live edits. Treat `saved`, `blocked`, and `unavailable` as distinct outcomes; fall back to `pencil-session persist --nodes-file/--variables-file` only when the high-level save bridge is unavailable.
124
124
  Write exported screenshots under `.da-vinci/changes/<change-id>/exports/` only.
125
125
  Record screenshot review with explicit `PASS` / `WARN` / `BLOCK`, issue list, and revision outcome; "looks good" is not enough.
126
126
  If `DA-VINCI.md` configures `Design-supervisor reviewers`, run `design-supervisor review` after screenshot review, layout hygiene, and design checkpoint, using screenshots plus Pencil variables and the design theses as inputs. If `Require Supervisor Review: true`, treat missing, blocked, or unaccepted review results as blocking before broad expansion or terminal completion.
@@ -156,7 +156,7 @@ Design 1-3 anchor surfaces first, review screenshots, then expand.
156
156
  For each anchor surface, explain how the new composition differs structurally from the current layout and whether it is primarily HTML-referenced, partially HTML-referenced, or inferred.
157
157
 
158
158
  Before non-trivial `batch_design` calls, preflight the Pencil operations when shell access is available.
159
- Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci pencil-session persist --project <project-path> --pen <path> ...` after material live edits.
159
+ Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci save-current-design --project <project-path>` after material live edits. Treat `saved`, `blocked`, and `unavailable` as distinct outcomes.
160
160
  Run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
161
161
  Before reporting `design complete` or `workflow complete`, require both the MCP runtime gate and `da-vinci audit --mode completion --change <change-id> <project-path>` to pass.
162
162
  Persist project-local Pencil files under .da-vinci/designs/.
@@ -191,7 +191,7 @@ Use the existing Da Vinci artifacts in this project.
191
191
  Do not restart discovery unless an artifact is missing or clearly wrong.
192
192
  Determine continuation routing from current artifact and checkpoint truth first, then use contextual checkpoint deltas only as auxiliary recovery notes.
193
193
  If a contextual delta conflicts with current artifacts, ignore that delta and record the conflict before continuing.
194
- Keep the registered project-local Pencil source under .da-vinci/designs/ as the design source of truth. If the resumed session will perform Pencil edits, require `da-vinci pencil-session begin --project <project-path> --pen <path>`, then use `da-vinci pencil-session persist --project <project-path> --pen <path> ...` after material live edits; fall back to the lower-level `write-pen + check-pen-sync` path only when the session wrapper cannot be used.
194
+ Keep the registered project-local Pencil source under .da-vinci/designs/ as the design source of truth. If the resumed session will perform Pencil edits, require `da-vinci pencil-session begin --project <project-path> --pen <path>`, then use `da-vinci save-current-design --project <project-path>` after material live edits. Treat `saved`, `blocked`, and `unavailable` as distinct outcomes; only fall back to lower-level payload persistence when the high-level save bridge is unavailable.
195
195
  If the redesign is complex, continue from the approved anchor surfaces instead of restarting broad scaffolding.
196
196
  If Pencil MCP is active and this session performs new Pencil writes, rerun the MCP runtime gate and record the refreshed result in `pencil-design.md`.
197
197
  Before reporting `design complete` or `workflow complete`, require both the MCP runtime gate and `da-vinci audit --mode completion --change <change-id> <project-path>` to pass.
@@ -126,7 +126,7 @@ Use only Pencil-supported properties; do not use web-only props like flex or mar
126
126
  Verify the registered project-local `.pen` file exists as a shell-visible file after the first Pencil write.
127
127
  Run `da-vinci audit --mode integrity <project-path>` after that first successful Pencil write before broad expansion continues.
128
128
  If Pencil MCP is active, run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
129
- Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci pencil-session persist --project <project-path> --pen <path> ...` after material live edits. Fall back to the lower-level `ensure-pen + write-pen + check-pen-sync` chain only when the session wrapper cannot be used.
129
+ Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci save-current-design --project <project-path>` after material live edits. Treat `saved`, `blocked`, and `unavailable` as distinct outcomes; fall back to `pencil-session persist --nodes-file/--variables-file` only when the high-level save bridge is unavailable.
130
130
  Keep non-`.pen` workflow artifacts out of `.da-vinci/designs/`.
131
131
  Write exported screenshots under `.da-vinci/changes/<change-id>/exports/` only.
132
132
  Record screenshot review with explicit `PASS` / `WARN` / `BLOCK`, issue list, and revision outcome; "looks good" is not enough.
@@ -164,7 +164,7 @@ Design 1-3 anchor surfaces first, review screenshots, then expand.
164
164
  For each anchor surface, explain how the new composition differs structurally from the current layout and whether it is primarily HTML-referenced, partially HTML-referenced, or inferred.
165
165
 
166
166
  Before non-trivial `batch_design` calls, preflight the Pencil operations when shell access is available.
167
- Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci pencil-session persist --project <project-path> --pen <path> ...` after material live edits.
167
+ Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci save-current-design --project <project-path>` after material live edits. Treat `saved`, `blocked`, and `unavailable` as distinct outcomes.
168
168
  Run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
169
169
  Before reporting `design complete` or `workflow complete`, require both the MCP runtime gate and `da-vinci audit --mode completion --change <change-id> <project-path>` to pass.
170
170
  Persist project-local Pencil files under .da-vinci/designs/.
@@ -199,7 +199,7 @@ Use the existing Da Vinci artifacts in this project.
199
199
  Do not restart discovery unless an artifact is missing or clearly wrong.
200
200
  Determine continuation routing from current artifact and checkpoint truth first, then use contextual checkpoint deltas only as auxiliary recovery notes.
201
201
  If a contextual delta conflicts with current artifacts, ignore that delta and record the conflict before continuing.
202
- Keep the registered project-local Pencil source under .da-vinci/designs/ as the design source of truth. If the resumed session will perform Pencil edits, require `da-vinci pencil-session begin --project <project-path> --pen <path>`, then use `da-vinci pencil-session persist --project <project-path> --pen <path> ...` after material live edits; fall back to the lower-level `write-pen + check-pen-sync` path only when the session wrapper cannot be used.
202
+ Keep the registered project-local Pencil source under .da-vinci/designs/ as the design source of truth. If the resumed session will perform Pencil edits, require `da-vinci pencil-session begin --project <project-path> --pen <path>`, then use `da-vinci save-current-design --project <project-path>` after material live edits. Treat `saved`, `blocked`, and `unavailable` as distinct outcomes; only fall back to lower-level payload persistence when the high-level save bridge is unavailable.
203
203
  If the redesign is complex, keep the anchor-first flow until the design checkpoint passes.
204
204
  If Pencil MCP is active and this session performs new Pencil writes, rerun the MCP runtime gate and record the refreshed result in `pencil-design.md`.
205
205
  Before reporting `design complete` or `workflow complete`, require both the MCP runtime gate and `da-vinci audit --mode completion --change <change-id> <project-path>` to pass.
@@ -120,7 +120,7 @@ Before non-trivial `batch_design` calls, preflight the Pencil operations when sh
120
120
  If the same anchor surface rolls back twice, switch to micro-batches of 6 or fewer operations until a clean schema-safe pass succeeds.
121
121
  Run `da-vinci audit --mode integrity <project-path>` after the first successful Pencil write before broad expansion continues.
122
122
  If Pencil MCP is active, run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
123
- Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci pencil-session persist --project <project-path> --pen <path> ...` after material live edits. Fall back to the lower-level `ensure-pen + write-pen + check-pen-sync` chain only when the session wrapper cannot be used.
123
+ Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci save-current-design --project <project-path>` after material live edits. Treat `saved`, `blocked`, and `unavailable` as distinct outcomes; fall back to `pencil-session persist --nodes-file/--variables-file` only when the high-level save bridge is unavailable.
124
124
  Write exported screenshots under `.da-vinci/changes/<change-id>/exports/` only.
125
125
  Record screenshot review with explicit `PASS` / `WARN` / `BLOCK`, issue list, and revision outcome; "looks good" is not enough.
126
126
  If `DA-VINCI.md` configures `Design-supervisor reviewers`, run `design-supervisor review` after screenshot review, layout hygiene, and design checkpoint, using screenshots plus Pencil variables and the design theses as inputs. If `Require Supervisor Review: true`, treat missing, blocked, or unaccepted review results as blocking before broad expansion or terminal completion.
@@ -156,7 +156,7 @@ Design 1-3 anchor surfaces first, review screenshots, then expand.
156
156
  For each anchor surface, explain how the new composition differs structurally from the current layout and whether it is primarily HTML-referenced, partially HTML-referenced, or inferred.
157
157
 
158
158
  Before non-trivial `batch_design` calls, preflight the Pencil operations when shell access is available.
159
- Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci pencil-session persist --project <project-path> --pen <path> ...` after material live edits.
159
+ Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci save-current-design --project <project-path>` after material live edits. Treat `saved`, `blocked`, and `unavailable` as distinct outcomes.
160
160
  Run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
161
161
  Before reporting `design complete` or `workflow complete`, require both the MCP runtime gate and `da-vinci audit --mode completion --change <change-id> <project-path>` to pass.
162
162
  Persist project-local Pencil files under .da-vinci/designs/.
@@ -191,7 +191,7 @@ Use the existing Da Vinci artifacts in this project.
191
191
  Do not restart discovery unless an artifact is missing or clearly wrong.
192
192
  Determine continuation routing from current artifact and checkpoint truth first, then use contextual checkpoint deltas only as auxiliary recovery notes.
193
193
  If a contextual delta conflicts with current artifacts, ignore that delta and record the conflict before continuing.
194
- Keep the registered project-local Pencil source under .da-vinci/designs/ as the design source of truth. If the resumed session will perform Pencil edits, require `da-vinci pencil-session begin --project <project-path> --pen <path>`, then use `da-vinci pencil-session persist --project <project-path> --pen <path> ...` after material live edits; fall back to the lower-level `write-pen + check-pen-sync` path only when the session wrapper cannot be used.
194
+ Keep the registered project-local Pencil source under .da-vinci/designs/ as the design source of truth. If the resumed session will perform Pencil edits, require `da-vinci pencil-session begin --project <project-path> --pen <path>`, then use `da-vinci save-current-design --project <project-path>` after material live edits. Treat `saved`, `blocked`, and `unavailable` as distinct outcomes; only fall back to lower-level payload persistence when the high-level save bridge is unavailable.
195
195
  If the redesign is complex, continue from the approved anchor surfaces instead of restarting broad scaffolding.
196
196
  If Pencil MCP is active and this session performs new Pencil writes, rerun the MCP runtime gate and record the refreshed result in `pencil-design.md`.
197
197
  Before reporting `design complete` or `workflow complete`, require both the MCP runtime gate and `da-vinci audit --mode completion --change <change-id> <project-path>` to pass.
@@ -121,7 +121,7 @@ Before non-trivial `batch_design` calls, preflight the Pencil operations when sh
121
121
  If the same anchor surface rolls back twice, switch to micro-batches of 6 or fewer operations until a clean schema-safe pass succeeds.
122
122
  Run `da-vinci audit --mode integrity <project-path>` after the first successful Pencil write before broad expansion continues.
123
123
  If Pencil MCP is active, run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
124
- Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci pencil-session persist --project <project-path> --pen <path> ...` after material live edits. Fall back to the lower-level `ensure-pen + write-pen + check-pen-sync` chain only when the session wrapper cannot be used.
124
+ Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci save-current-design --project <project-path>` after material live edits. Treat `saved`, `blocked`, and `unavailable` as distinct outcomes; fall back to `pencil-session persist --nodes-file/--variables-file` only when the high-level save bridge is unavailable.
125
125
  Write exported screenshots under `.da-vinci/changes/<change-id>/exports/` only.
126
126
  Record screenshot review with explicit `PASS` / `WARN` / `BLOCK`, issue list, and revision outcome; "looks good" is not enough.
127
127
  If `DA-VINCI.md` configures `Design-supervisor reviewers`, run `design-supervisor review` after screenshot review, layout hygiene, and design checkpoint, using screenshots plus Pencil variables and the design theses as inputs. If `Require Supervisor Review: true`, treat missing, blocked, or unaccepted review results as blocking before broad expansion or terminal completion.
@@ -157,7 +157,7 @@ Design 1-3 anchor surfaces first, review screenshots, then expand.
157
157
  For each anchor surface, explain how the new composition differs structurally from the current layout and whether it is primarily HTML-referenced, partially HTML-referenced, or inferred.
158
158
 
159
159
  Before non-trivial `batch_design` calls, preflight the Pencil operations when shell access is available.
160
- Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci pencil-session persist --project <project-path> --pen <path> ...` after material live edits.
160
+ Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci save-current-design --project <project-path>` after material live edits. Treat `saved`, `blocked`, and `unavailable` as distinct outcomes.
161
161
  Run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
162
162
  Before reporting `design complete` or `workflow complete`, require both the MCP runtime gate and `da-vinci audit --mode completion --change <change-id> <project-path>` to pass.
163
163
  Persist project-local Pencil files under .da-vinci/designs/.
@@ -192,7 +192,7 @@ Use the existing Da Vinci artifacts in this project.
192
192
  Do not restart discovery unless an artifact is missing or clearly wrong.
193
193
  Determine continuation routing from current artifact and checkpoint truth first, then use contextual checkpoint deltas only as auxiliary recovery notes.
194
194
  If a contextual delta conflicts with current artifacts, ignore that delta and record the conflict before continuing.
195
- Keep the registered project-local Pencil source under .da-vinci/designs/ as the design source of truth. If the resumed session will perform Pencil edits, require `da-vinci pencil-session begin --project <project-path> --pen <path>`, then use `da-vinci pencil-session persist --project <project-path> --pen <path> ...` after material live edits; fall back to the lower-level `write-pen + check-pen-sync` path only when the session wrapper cannot be used.
195
+ Keep the registered project-local Pencil source under .da-vinci/designs/ as the design source of truth. If the resumed session will perform Pencil edits, require `da-vinci pencil-session begin --project <project-path> --pen <path>`, then use `da-vinci save-current-design --project <project-path>` after material live edits. Treat `saved`, `blocked`, and `unavailable` as distinct outcomes; only fall back to lower-level payload persistence when the high-level save bridge is unavailable.
196
196
  If the redesign is complex, continue from the approved anchor surfaces instead of restarting broad scaffolding.
197
197
  If Pencil MCP is active and this session performs new Pencil writes, rerun the MCP runtime gate and record the refreshed result in `pencil-design.md`.
198
198
  Before reporting `design complete` or `workflow complete`, require both the MCP runtime gate and `da-vinci audit --mode completion --change <change-id> <project-path>` to pass.
@@ -0,0 +1,224 @@
1
+ # Skill Usage Guide
2
+
3
+ Use this document when you want the operator-facing workflow rather than the lower-level command reference.
4
+
5
+ This guide focuses on:
6
+
7
+ - how to enter the Da Vinci workflow the first time
8
+ - how to move between requirement, design, task, and implementation phases
9
+ - how to resume safely after pausing midway
10
+ - how to use the TUI instead of memorizing many CLI surfaces
11
+
12
+ ## Core Rule
13
+
14
+ Da Vinci should be resumed from artifact truth, not from chat memory.
15
+
16
+ That means:
17
+
18
+ - `spec.md` and related requirement artifacts stay the behavior truth
19
+ - the project-local `.pen` stays the design truth
20
+ - `tasks.md`, `verification.md`, and execution signals explain what has or has not been implemented yet
21
+
22
+ ## First Entry
23
+
24
+ Use these entry helpers:
25
+
26
+ - `intake`
27
+ - choose this when the project is complex, the mode is unclear, or there are multiple truth sources
28
+ - `prompt`
29
+ - choose this when the mode is already known and you only need a good executable starting prompt
30
+ - `continue`
31
+ - choose this when `DA-VINCI.md` or `.da-vinci/` artifacts already exist and you are resuming work
32
+
33
+ For Codex, the usual first requests are:
34
+
35
+ ```text
36
+ $da-vinci use intake for <project situation>
37
+ $da-vinci use prompt for <known scenario>
38
+ $da-vinci use continue for <existing workflow state>
39
+ ```
40
+
41
+ Default recommendation:
42
+
43
+ 1. use `intake` on the first pass through a non-trivial project
44
+ 2. execute the generated main workflow prompt
45
+ 3. when work pauses, come back through `continue`
46
+
47
+ Do not default directly to `build` unless the project is already implementation-ready.
48
+
49
+ ## Real Workflow
50
+
51
+ The normal delivery flow is:
52
+
53
+ 1. choose the mode
54
+ 2. create or stabilize discovery and scope artifacts
55
+ 3. register the preferred project-local `.pen` source
56
+ 4. design 1 to 3 anchor surfaces first
57
+ 5. reconcile the live Pencil session with the registered `.pen`
58
+ 6. write `pencil-bindings.md`
59
+ 7. generate or refine `tasks.md`
60
+ 8. implement
61
+ 9. verify
62
+
63
+ The artifact spine usually looks like this:
64
+
65
+ - `DA-VINCI.md`
66
+ - `.da-vinci/design-registry.md`
67
+ - `.da-vinci/page-map.md`
68
+ - `.da-vinci/changes/<change-id>/proposal.md`
69
+ - `.da-vinci/changes/<change-id>/specs/*/spec.md`
70
+ - `.da-vinci/changes/<change-id>/design.md`
71
+ - `.da-vinci/changes/<change-id>/pencil-design.md`
72
+ - `.da-vinci/changes/<change-id>/pencil-bindings.md`
73
+ - `.da-vinci/changes/<change-id>/tasks.md`
74
+ - `.da-vinci/changes/<change-id>/verification.md`
75
+
76
+ ## Before Implementation
77
+
78
+ When design is mostly ready and implementation is next, use these checks:
79
+
80
+ - `da-vinci workflow-status`
81
+ - confirm the active stage and blockers first
82
+ - `da-vinci next-step`
83
+ - confirm whether the next move should still be `design`, `tasks`, or `build`
84
+ - `da-vinci lint-spec`
85
+ - use this when runtime spec quality is still uncertain
86
+ - `da-vinci scope-check`
87
+ - use this when page/state propagation across planning artifacts looks ambiguous
88
+
89
+ If you are already inside the project root directory, `--project` is optional because the CLI falls back to `cwd`.
90
+
91
+ Examples:
92
+
93
+ ```bash
94
+ da-vinci workflow-status
95
+ da-vinci next-step
96
+ da-vinci lint-spec
97
+ da-vinci scope-check
98
+ ```
99
+
100
+ ## After Pausing Midway
101
+
102
+ The safest resume order is:
103
+
104
+ 1. `da-vinci workflow-status [--change <id>] --json`
105
+ 2. `da-vinci next-step [--change <id>]`
106
+ 3. if spec quality is unclear, run `da-vinci lint-spec`
107
+ 4. if planning propagation is unclear, run `da-vinci scope-check`
108
+ 5. if planning artifacts changed since the last stable snapshot, run `da-vinci generate-sidecars` and `da-vinci diff-spec`
109
+ 6. before terminal completion, run `da-vinci verify-bindings` and `da-vinci verify-coverage`
110
+
111
+ Resume should follow the artifacts, not old conversation state:
112
+
113
+ - if design artifacts exist but `tasks.md` does not, resume into `tasks`
114
+ - if `tasks.md` exists but design gates are still unresolved, resume into design cleanup rather than `build`
115
+ - only resume into `build` when implementation readiness is already clear
116
+
117
+ ## How `change-id` Works
118
+
119
+ `change-id` is the directory name under `.da-vinci/changes/<change-id>/`.
120
+
121
+ Practical rules:
122
+
123
+ - if the project only has one non-empty change directory, most workflow commands can infer it automatically
124
+ - if the project has multiple non-empty change directories, pass `--change <id>` explicitly
125
+ - keep one active change per branch when possible to reduce routing friction
126
+
127
+ Use `da-vinci workflow-status` when you forget which change is active. In multi-change cases it reports the available ids and the latest inferred one for context.
128
+
129
+ ## TUI Quick Start
130
+
131
+ If remembering many command surfaces is the main friction, use the terminal UI instead of typing commands from memory.
132
+
133
+ Launch it with either:
134
+
135
+ ```bash
136
+ da-vinci tui
137
+ da-vinci-tui
138
+ ```
139
+
140
+ Or through `npx` without installing globally:
141
+
142
+ ```bash
143
+ npx -p @xenonbyte/da-vinci-workflow da-vinci tui
144
+ npx -p @xenonbyte/da-vinci-workflow da-vinci-tui
145
+ ```
146
+
147
+ The TUI provides:
148
+
149
+ - a scene-first landing screen with `Install & Uninstall`, `Current Status`, `Switch Work Item`, `Design Ops`, `Pre-Implementation Checks`, `Pre-Acceptance Checks`, and `Settings`
150
+ - guided compound flows for resume, implementation readiness, and completion validation
151
+ - `Design Ops` focuses on practical design operations (`Save Current Design`, `Sync Icon Library`, and `Visual Assist Preset`)
152
+ - `Install & Uninstall` provides three actions: `Status` (show `da-vinci status`), `Install` (install all supported platforms), and `Uninstall` (uninstall all supported platforms)
153
+ - English and Chinese chrome while keeping emitted Visual Assist content in canonical English
154
+ - project/change context in the header with minimal persistent chrome
155
+ - `Settings` keeps only `Language` and `Logs`
156
+ - project-local daily diagnostics under `Settings > Logs` (`.da-vinci/logs/YYYY-MM-DD.ndjson`)
157
+
158
+ ### TUI Scene Map
159
+
160
+ ```mermaid
161
+ flowchart TD
162
+ A[Launch da-vinci tui] --> B[Set project path and change context]
163
+ B --> C[Install & Uninstall<br/>status + install-all + uninstall-all]
164
+ B --> D[Current Status<br/>workflow-status + next-step summary]
165
+ B --> E[Switch Work Item<br/>pick an existing change]
166
+ B --> F[Design Ops<br/>icon sync + visual assist preset]
167
+ B --> G[Pre-Implementation Checks<br/>implementation readiness gate]
168
+ B --> H[Pre-Acceptance Checks<br/>verify-* chain]
169
+ B --> I[Settings<br/>language + logs]
170
+ ```
171
+
172
+ Use this as the quick mental model:
173
+
174
+ - start from the scene that matches the current operator moment
175
+ - let the scene entrypoints orchestrate the common checks first
176
+ - use `Current Status` when a workflow pauses or the next route is unclear
177
+ - finish only after `Pre-Acceptance Checks` is clear
178
+
179
+ Visual Assist Preset mapping (`Design Ops > Visual Assist Preset`):
180
+
181
+ - `Masterpiece` => `required reviewer signoff`
182
+ - `High Quality` => `advisory reviewer`
183
+ - `Normal` => `adapter-only`
184
+
185
+ Managed Visual Assist behavior:
186
+
187
+ - select platform first, then select one of 3 quality levels
188
+ - write canonical English output from `docs/visual-assist-presets/`
189
+ - replace only `## Visual Assist` in project-root `DA-VINCI.md`
190
+ - preserve unrelated sections and avoid duplicate `## Visual Assist` blocks
191
+
192
+ Main keys:
193
+
194
+ - `Up/Down` or `j/k`: move selection
195
+ - `Enter` or `r`: open selected scene / action
196
+ - `u/d`: page up / page down in long content views
197
+ - `g/G`: jump to top / bottom in long content views
198
+ - `p`: change project path context
199
+ - `c`: change or clear change-id context
200
+ - `l`: toggle English / Chinese
201
+ - `t`: cycle between theme modes when auto-detection is wrong
202
+ - `s`: toggle `--strict`
203
+ - `J`: toggle `--json`
204
+ - `e`: toggle `--continue-on-error`
205
+ - `?`: open help
206
+ - `Ctrl-C`: emergency exit
207
+
208
+ Recommended TUI usage:
209
+
210
+ 1. launch the TUI from the project root
211
+ 2. pick the workflow scene that matches your current moment
212
+ 3. set or confirm project path and change-id in the header
213
+ 4. use the scene entrypoints first (`Switch Work Item`, `Pre-Implementation Checks`, `Install & Uninstall`, `Pre-Acceptance Checks`) and use `Current Status` as the direct re-entry summary
214
+ 5. use `Design Ops > Visual Assist Preset` to select platform + quality and write managed `Visual Assist` blocks
215
+ 6. use `Install & Uninstall > Status` to inspect installation state, or run `Install`/`Uninstall` for all supported platforms in one step
216
+ 7. inspect/copy diagnostics from `Settings > Logs` when troubleshooting; keep logs as evidence only, not routing truth
217
+
218
+ ## Practical Shortcuts
219
+
220
+ - inside the project root, you usually do not need `--project`
221
+ - with one active change, you often do not need `--change`
222
+ - use `workflow-status` and `next-step` as the standard re-entry pair after any pause
223
+ - use the TUI when command recall is the main problem
224
+ - use direct CLI commands when you already know the exact surface and want faster scripting
@@ -99,17 +99,19 @@ Expected flow:
99
99
  11. if the same anchor surface rolls back twice, switch to micro-batches of 6 or fewer operations until a clean schema-safe pass succeeds
100
100
  12. require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit so the registered `.pen` is seeded and the global Pencil lock is held
101
101
  13. when external or secondary `.pen` sources exist, run `da-vinci check-pen-baseline --pen <project-pen> --baseline <other-pen>` before the new session write phase; if diverged, sync the chosen source into `<project-pen>` first
102
- 14. during live design work, use `da-vinci pencil-session persist --project <project-path> --pen <path> ...` after material edits, then end with `da-vinci pencil-session end ...`
103
- 15. verify the registered project-local `.pen` path becomes shell-visible immediately after the first successful Pencil write
104
- 16. run `da-vinci audit --mode integrity <project-path>` immediately after that first successful write
105
- 17. if Pencil MCP is active, run the MCP runtime gate and record it in `pencil-design.md`
106
- 18. run `design-source checkpoint` to confirm the registered project-local `.pen` path, the active Pencil source, and the shell-visible file all agree
107
- 19. export screenshots only under `.da-vinci/changes/<change-id>/exports/`, never into `.da-vinci/designs/`
108
- 20. record screenshot review with explicit `PASS` / `WARN` / `BLOCK`, issue list, and revision outcome before broad expansion
109
- 21. bind routes and pages to Pencil screens
110
- 22. generate tasks aligned to the redesign slices
111
- 23. run `da-vinci audit --mode completion --change <change-id> <project-path>` before any terminal completion claim
112
- 24. build and verify only after the completion gate can eventually pass
102
+ 14. during live design work, use `da-vinci save-current-design --project <project-path>` after material edits, then end with `da-vinci pencil-session end ...`
103
+ 15. treat `saved`, `blocked`, and `unavailable` as distinct outcomes; only `saved` means the design source was persisted
104
+ 16. if save returns `unavailable`, do not claim success; use the lower-level `pencil-session persist --nodes-file/--variables-file` path only when the high-level bridge is unavailable
105
+ 17. verify the registered project-local `.pen` path becomes shell-visible immediately after the first successful Pencil write
106
+ 18. run `da-vinci audit --mode integrity <project-path>` immediately after that first successful write
107
+ 19. if Pencil MCP is active, run the MCP runtime gate and record it in `pencil-design.md`
108
+ 20. run `design-source checkpoint` to confirm the registered project-local `.pen` path, the active Pencil source, and the shell-visible file all agree
109
+ 21. export screenshots only under `.da-vinci/changes/<change-id>/exports/`, never into `.da-vinci/designs/`
110
+ 22. record screenshot review with explicit `PASS` / `WARN` / `BLOCK`, issue list, and revision outcome before broad expansion
111
+ 23. bind routes and pages to Pencil screens
112
+ 24. generate tasks aligned to the redesign slices
113
+ 25. run `da-vinci audit --mode completion --change <change-id> <project-path>` before any terminal completion claim
114
+ 26. build and verify only after the completion gate can eventually pass
113
115
 
114
116
  ### Complex Android example
115
117
 
@@ -134,7 +136,8 @@ If the same anchor surface rolls back twice, switch to micro-batches of 6 or few
134
136
  Use only Pencil-supported properties; do not use web-only props like flex or margin.
135
137
  Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit.
136
138
  When external or secondary `.pen` files exist, run `da-vinci check-pen-baseline --pen <project-pen> --baseline <other-pen>` first; if hashes diverge, sync the preferred source into `<project-pen>` before editing.
137
- If a registered project-local `.pen` already exists, reopen it for continuity but persist a fresh live MCP snapshot back to that same path through `da-vinci pencil-session persist`.
139
+ If a registered project-local `.pen` already exists, reopen it for continuity and save through `da-vinci save-current-design --project <project-path>`.
140
+ Treat `saved`, `blocked`, and `unavailable` as distinct outcomes. If `unavailable`, do not claim success and only then fall back to the lower-level `pencil-session persist` payload path.
138
141
  Verify the registered project-local `.pen` file exists as a shell-visible file after the first Pencil write.
139
142
  Run `da-vinci audit --mode integrity <project-path>` after that first successful Pencil write before broad expansion continues.
140
143
  Keep `.da-vinci/designs/` reserved for `.pen` files only.
@@ -201,7 +204,7 @@ If frontend-skill is available, use it as the primary visual adapter.
201
204
  If it is unavailable, fall back to native Da Vinci design rules and continue.
202
205
  Persist project-local Pencil files under .da-vinci/designs/.
203
206
  If no registered project-local `.pen` exists yet, seed it there before the first Pencil edit and keep subsequent live edits bound to that exact path.
204
- If a registered project-local `.pen` already exists, reopen it for continuity but overwrite it from the current MCP snapshot after material live edits.
207
+ If a registered project-local `.pen` already exists, reopen it for continuity and persist after material live edits through `da-vinci save-current-design --project <project-path>`.
205
208
  ```
206
209
 
207
210
  ## Icon-library helper example
@@ -14,6 +14,7 @@ Use [pencil-rendering-workflow.md](/Users/xubo/x-skills/da-vinci/docs/pencil-ren
14
14
  Use [dv-command-reference.md](/Users/xubo/x-skills/da-vinci/docs/dv-command-reference.md) when you need route-by-route `dv:` command behavior, next-step recommendations, and verify rollback handling.
15
15
  Use [constraint-files.md](/Users/xubo/x-skills/da-vinci/docs/constraint-files.md) when you need a single map for project constraint files, hard-gate fields, and advisory guidance sections.
16
16
  Use [execution-chain-migration.md](/Users/xubo/x-skills/da-vinci/docs/execution-chain-migration.md) for sidecar, enforcement, persisted-state fallback, and scaffold migration guidance.
17
+ Use [skill-usage.md](/Users/xubo/x-skills/da-vinci/docs/skill-usage.md) for an operator-facing guide to starting, pausing, resuming, and using the TUI.
17
18
 
18
19
  ## Core Contract
19
20
 
@@ -156,6 +157,7 @@ Before mapping or implementation are treated as safe, Da Vinci runs:
156
157
 
157
158
  - `design-source checkpoint`
158
159
  - `MCP runtime gate` when Pencil MCP is active
160
+ - `da-vinci save-current-design --project <project-path>` after material live edits (high-level bound-source save path)
159
161
  - `da-vinci audit --mode integrity <project-path>` during active work
160
162
  - checkpoint-adjacent `Context Delta` notes in existing change artifacts
161
163
 
@@ -165,6 +167,7 @@ These checks verify that:
165
167
  - the active editor is the correct source
166
168
  - the shell-visible `.pen` exists
167
169
  - live snapshot and persisted snapshot are in sync
170
+ - high-level save outcomes are handled honestly (`saved` / `blocked` / `unavailable`)
168
171
  - recent execution context is recoverable without replacing artifact truth as the routing authority
169
172
 
170
173
  ### 6. Mapping
@@ -39,6 +39,10 @@ Da Vinci 期望它们遵循工作流状态。
39
39
 
40
40
  这些命令不会替代 `dv:` 选路,但能显著提升设计执行质量:
41
41
 
42
+ - `da-vinci tui [--project <path>] [--change <id>] [--lang en|zh]`
43
+ - 打开面向工作流的终端 UI,按阶段组织命令,并在执行前先展示生成出的 CLI 预览
44
+ - 也可以用独立 bin `da-vinci-tui`,或在没全局安装时用 `npx -p @xenonbyte/da-vinci-workflow da-vinci tui`
45
+ - 当真正难记的是命令面而不是流程本身时,优先用它
42
46
  - `da-vinci workflow-status --project <path> [--change <id>] [--json]`
43
47
  - 从工件和 checkpoint 真相推导当前 workflow 阶段
44
48
  - 报告 blocker、warning、handoff gate 状态,以及主推荐路由
@@ -97,6 +101,11 @@ Da Vinci 期望它们遵循工作流状态。
97
101
  - `da-vinci sync-pen-source --from <preferred-source> --to <project-pen>`
98
102
  - 把被选中的最新 `.pen` 来源同步到项目内 `.pen` 路径,并刷新 Da Vinci state 元数据
99
103
  - 当外部备份是最新基线时,在 `pencil-session begin` 前先执行
104
+ - `da-vinci save-current-design --project <path> [--json] [--continue-on-error]`
105
+ - 运行高层绑定源保存流程,作为 guided 设计持久化主路径
106
+ - 持久化前必须确认 registered `.pen`、session `penPath`、active editor path 收敛到同一来源
107
+ - 统一返回 `saved` / `blocked` / `unavailable`
108
+ - `blocked` 表示保存契约失败(来源/锁/载荷);`unavailable` 表示 MCP bridge 或 runtime 抓取不可达
100
109
 
101
110
  建议在 `/dv:design` 阶段使用,尤其是在 anchor surface 的图标定稿前。
102
111
 
@@ -170,6 +179,14 @@ Da Vinci 期望它们遵循工作流状态。
170
179
 
171
180
  这一层负责塑造行为真相。
172
181
 
182
+ 需求拆解阶段自检:
183
+
184
+ - 在把 requirements 交给设计前,先跑 `da-vinci workflow-status --project <path> [--change <id>] --json`
185
+ - 再跑 `da-vinci next-step --project <path> [--change <id>]`
186
+ - 跑 `da-vinci lint-spec --project <path> [--change <id>] --strict`
187
+ - 把命令结果当成门禁,不要把 `BLOCK` 或非零退出码解释成软建议
188
+ - 如果主推荐路由仍然是 `/dv:breakdown`,就继续修 `proposal.md` 和 specs,不要硬推进到 `/dv:design`
189
+
173
190
  ### `/dv:design`
174
191
 
175
192
  适合:
@@ -206,6 +223,14 @@ Da Vinci 期望它们遵循工作流状态。
206
223
 
207
224
  这一层只做实现拆解,不写代码。
208
225
 
226
+ 任务阶段自检:
227
+
228
+ - 在把工作移交给实现前,先跑 `task checkpoint`
229
+ - 有 shell 能力时,跑 `da-vinci lint-tasks --project <path> [--change <id>]`
230
+ - 如果 `pencil-design.md` 和 `pencil-bindings.md` 都存在,再跑 `da-vinci lint-bindings --project <path> [--change <id>]`
231
+ - 把命令结果当成门禁,不要把 `BLOCK` 或非零退出码降级成软提示
232
+ - 只要任务覆盖或 bindings 就绪度仍然阻塞,就不要推进到 `/dv:build`
233
+
209
234
  ### `/dv:build`
210
235
 
211
236
  适合:
@@ -221,6 +246,18 @@ Da Vinci 期望它们遵循工作流状态。
221
246
 
222
247
  这一层才是真正的执行阶段。
223
248
 
249
+ 实现阶段自检:
250
+
251
+ - 在大范围实现前,先跑 `da-vinci workflow-status --project <path> [--change <id>] --json`
252
+ - 再跑 `da-vinci next-step --project <path> [--change <id>]`
253
+ - 如果主推荐路由不是 `/dv:build`,就停止并回到那个路由,而不是硬做实现
254
+ - 跑 `da-vinci lint-spec --project <path> [--change <id>]`
255
+ - 跑 `da-vinci scope-check --project <path> [--change <id>]`
256
+ - 如果 `tasks.md` 已存在,跑 `da-vinci lint-tasks --project <path> [--change <id>]`
257
+ - 如果 `pencil-design.md` 和 `pencil-bindings.md` 都存在,跑 `da-vinci lint-bindings --project <path> [--change <id>]`
258
+ - 把命令结果当成门禁,不要把 `BLOCK` 或非零退出码降级成软提示
259
+ - 只要还有 `BLOCK` 或缺少必要 planning/design 工件,就不要进入大范围实现
260
+
224
261
  完成判定规则:
225
262
 
226
263
  - `BUILD SUCCESSFUL` 只代表可编译,不代表 workflow 完成
@@ -241,6 +278,16 @@ Da Vinci 期望它们遵循工作流状态。
241
278
 
242
279
  这一层是 truth reconciliation 阶段。
243
280
 
281
+ 验证阶段自检:
282
+
283
+ - 有 shell 能力时,跑 `da-vinci verify-bindings --project <path> [--change <id>]`
284
+ - 跑 `da-vinci verify-implementation --project <path> [--change <id>]`
285
+ - 跑 `da-vinci verify-structure --project <path> [--change <id>]`
286
+ - 跑 `da-vinci verify-coverage --project <path> [--change <id>]`
287
+ - 把命令结果当成门禁,不要把 `BLOCK` 或 `FAIL` 降级成软提示
288
+ - 只要任何验证面仍然是 `BLOCK` 或 `FAIL`,就继续停留在验证阶段并记录 drift,而不是宣称成功
289
+ - 如果要声称终态完成,先要求 `da-vinci audit --mode completion --change <change-id> <project-path>` 通过
290
+
244
291
  ## 基于状态的下一步规则
245
292
 
246
293
  这就是当前应该给用户的推荐逻辑。
@@ -239,7 +239,8 @@ Da Vinci 应该:
239
239
  - 如果已有项目内 `.pen` 文件,优先登记 `.da-vinci/designs/` 下的路径
240
240
  5. 生成 `pencil-design.md` 增量
241
241
  - 必须通过 `da-vinci pencil-session begin` 开始这轮设计,让登记路径先 seed 好并拿到锁
242
- - 如果项目里原本已有 `.pen`,继续设计时先打开它,但发生实质性 live edit 后优先通过 `da-vinci pencil-session persist` 把当前 MCP 快照重新覆盖写回同一路径
242
+ - 如果项目里原本已有 `.pen`,继续设计时先打开它,但发生实质性 live edit 后优先执行 `da-vinci save-current-design --project <project-path>`
243
+ - 必须区分 `saved`、`blocked`、`unavailable` 三类结果;只有高层桥接 `unavailable` 时,才退回 `pencil-session persist --nodes-file/--variables-file` 的底层链路
243
244
  6. 更新 `pencil-bindings.md`
244
245
  7. 生成 `tasks.md`
245
246
  8. 进入实现