@xenonbyte/da-vinci-workflow 0.1.18 → 0.1.20

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 (58) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +61 -4
  3. package/README.zh-CN.md +57 -6
  4. package/SKILL.md +11 -3
  5. package/commands/claude/dv/continue.md +4 -0
  6. package/commands/claude/dv/design.md +3 -2
  7. package/commands/codex/prompts/dv-continue.md +4 -0
  8. package/commands/codex/prompts/dv-design.md +3 -2
  9. package/commands/gemini/dv/continue.toml +4 -0
  10. package/commands/gemini/dv/design.toml +3 -2
  11. package/docs/codex-natural-language-usage.md +5 -0
  12. package/docs/dv-command-reference.md +4 -0
  13. package/docs/mode-use-cases.md +6 -4
  14. package/docs/pencil-rendering-workflow.md +79 -15
  15. package/docs/prompt-entrypoints.md +11 -1
  16. package/docs/prompt-presets/README.md +7 -4
  17. package/docs/prompt-presets/desktop-app.md +51 -7
  18. package/docs/prompt-presets/mobile-app.md +51 -7
  19. package/docs/prompt-presets/tablet-app.md +51 -7
  20. package/docs/prompt-presets/web-app.md +51 -7
  21. package/docs/visual-adapters.md +179 -1
  22. package/docs/visual-assist-presets/README.md +28 -5
  23. package/docs/visual-assist-presets/desktop-app.md +88 -2
  24. package/docs/visual-assist-presets/mobile-app.md +89 -2
  25. package/docs/visual-assist-presets/tablet-app.md +88 -2
  26. package/docs/visual-assist-presets/web-app.md +88 -2
  27. package/docs/workflow-examples.md +8 -3
  28. package/docs/workflow-overview.md +23 -0
  29. package/docs/zh-CN/codex-natural-language-usage.md +5 -0
  30. package/docs/zh-CN/dv-command-reference.md +4 -0
  31. package/docs/zh-CN/mode-use-cases.md +7 -5
  32. package/docs/zh-CN/pencil-rendering-workflow.md +79 -15
  33. package/docs/zh-CN/prompt-entrypoints.md +13 -1
  34. package/docs/zh-CN/prompt-presets/README.md +7 -4
  35. package/docs/zh-CN/prompt-presets/desktop-app.md +50 -7
  36. package/docs/zh-CN/prompt-presets/mobile-app.md +50 -7
  37. package/docs/zh-CN/prompt-presets/tablet-app.md +50 -7
  38. package/docs/zh-CN/prompt-presets/web-app.md +50 -7
  39. package/docs/zh-CN/visual-adapters.md +179 -1
  40. package/docs/zh-CN/visual-assist-presets/README.md +28 -5
  41. package/docs/zh-CN/visual-assist-presets/desktop-app.md +88 -1
  42. package/docs/zh-CN/visual-assist-presets/mobile-app.md +89 -2
  43. package/docs/zh-CN/visual-assist-presets/tablet-app.md +89 -2
  44. package/docs/zh-CN/visual-assist-presets/web-app.md +88 -1
  45. package/docs/zh-CN/workflow-examples.md +8 -3
  46. package/docs/zh-CN/workflow-overview.md +23 -0
  47. package/lib/audit.js +654 -0
  48. package/lib/pencil-lock.js +15 -4
  49. package/package.json +4 -1
  50. package/references/artifact-templates.md +57 -0
  51. package/references/checkpoints.md +44 -19
  52. package/references/modes.md +2 -2
  53. package/references/pencil-design-to-code.md +3 -3
  54. package/references/prompt-recipes.md +12 -2
  55. package/scripts/test-audit-context-delta.js +446 -0
  56. package/scripts/test-audit-design-supervisor.js +348 -0
  57. package/scripts/test-mode-consistency.js +134 -0
  58. package/scripts/test-pencil-lock.js +130 -0
@@ -19,6 +19,7 @@ Use this when the workflow needs:
19
19
 
20
20
  - Use `Simple redesign` when the tablet surface is limited, mostly single-flow, or only lightly adapted from a phone layout.
21
21
  - Use `Complex redesign` when the product has split panes, orientation changes, expanded canvases, overlays, or many materially different surfaces.
22
+ - Use `Redesign with reference directory` when you have a local HTML or mockup directory that should guide tablet composition as a visual reference only.
22
23
  - Use `Design-only` when you want the design chain and bindings but no code changes yet.
23
24
  - Use `Continue` when the workflow already created artifacts and needs to resume.
24
25
 
@@ -32,7 +33,7 @@ Use these templates when the tablet product already exists, but split-pane behav
32
33
  $da-vinci use intake for this existing tablet product.
33
34
 
34
35
  This is a broad overhaul, not only a UI refresh.
35
- Current tablet codebase is important reference evidence and migration baseline, but it should not be treated as the final target behavior truth.
36
+ Current tablet codebase is reference evidence and migration baseline, not the final target behavior truth.
36
37
  We need to redefine flows, orientation-aware structure, page responsibilities, and selected surfaces while preserving only approved integrations, permissions, and constraints.
37
38
  Recommend the best Da Vinci mode and generate the best executable next-step prompt.
38
39
  ```
@@ -61,7 +62,7 @@ $da-vinci use overhaul-from-code to design the new target tablet surfaces from t
61
62
 
62
63
  Use the existing .da-vinci/project-inventory.md, proposal.md, migration-contract.md, target specs, page-map.md, DA-VINCI.md, and design-registry.md.
63
64
  Treat the new proposal and specs as the target behavior truth.
64
- Treat the old tablet codebase only as reference evidence and migration context.
65
+ Treat the old tablet codebase only as reference evidence and migration baseline.
65
66
  Design 1-3 anchor surfaces first, review screenshots, then expand.
66
67
  Persist project-local Pencil files under .da-vinci/designs/.
67
68
  Run the normal Pencil runtime gate and completion audit before terminal completion claims.
@@ -74,6 +75,8 @@ $da-vinci use continue for this existing overhaul-from-code tablet workflow.
74
75
 
75
76
  Use the existing Da Vinci artifacts.
76
77
  Detect whether the workflow should return to breakdown, continue with design, generate tasks, continue implementation, or verify drift.
78
+ Determine routing from artifact and checkpoint truth first, then use contextual checkpoint deltas only as auxiliary recovery notes.
79
+ If a contextual delta conflicts with current artifacts, ignore that delta and record the conflict before continuing.
77
80
  Prefer the artifact-backed next safe stage instead of restarting the overhaul from scratch.
78
81
  ```
79
82
 
@@ -84,9 +87,11 @@ $da-vinci use redesign-from-code to redesign this existing tablet product.
84
87
 
85
88
  Existing code is the behavior source of truth, not the layout truth.
86
89
  Preserve current behavior, permissions, integrations, validations, and state transitions unless explicitly required otherwise.
90
+ Treat this as full-delivery unless explicitly changed.
91
+ Do not stop after discovery, anchor surfaces, phase summaries, or task generation; continue through tasks, build, and verify once the corresponding checkpoints pass.
87
92
  Inventory the current tablet surfaces and important states before Pencil work.
88
93
  Use the Visual Assist preferences declared in DA-VINCI.md.
89
- Before the first Pencil edit, prefer `da-vinci pencil-session begin --project <project-path> --pen <path>` so the registered project-local `.pen` is seeded and the global Pencil lock is held; fall back to `da-vinci ensure-pen --output <path> --verify-open` only when the session wrapper cannot be used.
94
+ Before the first Pencil edit, require `da-vinci pencil-session begin --project <project-path> --pen <path>` so the registered project-local `.pen` is seeded and the global Pencil lock is held; fall back to `da-vinci ensure-pen --output <path> --verify-open` only when the session wrapper cannot be used.
90
95
  If Pencil MCP is active, run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
91
96
  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.
92
97
  Do not pass design checkpoint if the result ignores tablet-scale composition or collapses into a stretched phone layout.
@@ -100,6 +105,8 @@ $da-vinci use redesign-from-code to redesign this existing tablet product.
100
105
 
101
106
  Existing code is the behavior source of truth, not the layout truth.
102
107
  Preserve current behavior, permissions, integrations, validations, and state transitions unless explicitly required otherwise.
108
+ Treat this as full-delivery unless explicitly changed.
109
+ Do not stop after discovery, anchor surfaces, phase summaries, or task generation; continue through tasks, build, and verify once the corresponding checkpoints pass.
103
110
  Inventory split-pane regions, sidebars, expanded canvases, dialogs, sheets, orientation-driven changes, and materially different states before broad Pencil work.
104
111
  Decompose complex pages into multi-region surfaces, overlays, materially different states, and implementation surfaces.
105
112
  Create the required discovery and design-source artifacts in their standard locations before the first anchor surface.
@@ -113,15 +120,48 @@ Before non-trivial `batch_design` calls, preflight the Pencil operations when sh
113
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.
114
121
  Run `da-vinci audit --mode integrity <project-path>` after the first successful Pencil write before broad expansion continues.
115
122
  If Pencil MCP is active, run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
116
- Prefer `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 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.
117
124
  Write exported screenshots under `.da-vinci/changes/<change-id>/exports/` only.
118
125
  Record screenshot review with explicit `PASS` / `WARN` / `BLOCK`, issue list, and revision outcome; "looks good" is not enough.
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.
119
127
  Do not report completion if the registered `.pen` source exists only in memory or only as exported PNGs.
120
128
  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
129
  Do not pass design checkpoint if the result collapses into a stretched phone layout, repeated placeholders, or weak multi-region hierarchy.
122
130
  Persist project-local Pencil files under .da-vinci/designs/.
123
131
  ```
124
132
 
133
+ ## Redesign With Reference Directory
134
+
135
+ ```text
136
+ $da-vinci use redesign-from-code to redesign this existing tablet product.
137
+
138
+ Existing code is the behavior source of truth, not the layout truth.
139
+ Preserve current behavior, permissions, integrations, validations, and state transitions unless explicitly required otherwise.
140
+ Treat this as full-delivery unless explicitly changed.
141
+ Do not stop after discovery, anchor surfaces, phase summaries, or task generation; continue through tasks, build, and verify once the corresponding checkpoints pass.
142
+
143
+ Use <reference-directory> as the local HTML design-reference directory.
144
+ Treat that directory as visual reference material only, not as behavior truth, route truth, or final design-source truth.
145
+ Inventory which split-pane regions, sidebars, expanded canvases, dialogs, sheets, orientation-driven changes, and materially different states are covered by the reference directory and which are not before broad Pencil work begins.
146
+ For uncovered states or surfaces, derive the design from the approved anchor surfaces, the project visual contract, and the existing behavior truth.
147
+
148
+ If browser access is available, open the HTML reference screens in a real browser and wait 3-5 seconds, or until the visual state settles, before judging hierarchy, spacing, styling, or component treatment.
149
+ Do not review the initial unhydrated or partially rendered state.
150
+ If a reference screen visibly changes after load, use the settled state as the visual reference baseline and record that delayed settling was required.
151
+
152
+ Use the HTML reference screens only as composition and styling input where they are relevant and stable.
153
+ Do not mechanically clone them when they conflict with behavior truth, missing states, or implementation reality.
154
+
155
+ Design 1-3 anchor surfaces first, review screenshots, then expand.
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
+
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.
160
+ Run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
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
+ Persist project-local Pencil files under .da-vinci/designs/.
163
+ ```
164
+
125
165
  ## Design-Only
126
166
 
127
167
  ```text
@@ -129,12 +169,14 @@ $da-vinci use redesign-from-code to redesign this existing tablet product.
129
169
 
130
170
  Existing code is the behavior source of truth, not the layout truth.
131
171
  Preserve current behavior, permissions, integrations, and state transitions.
172
+ Treat this as design-only, not full-delivery.
132
173
  Inventory split-pane regions, sidebars, dialogs, sheets, orientation changes, and important states.
133
174
  Decompose complex pages into real design surfaces before Pencil work.
134
175
  Use the Visual Assist preferences declared in DA-VINCI.md.
135
176
  If the product is complex, design 1-3 anchor surfaces first, review screenshots, then expand.
136
- Stop after DA-VINCI.md, design-registry.md, page-map.md, proposal.md, specs, design.md, pencil-design.md, pencil-bindings.md, and tasks.md.
137
- Before the first Pencil edit, prefer `da-vinci pencil-session begin --project <project-path> --pen <path>` so the registered project-local `.pen` is seeded and locked; fall back to `da-vinci ensure-pen --output <path> --verify-open` only when the session wrapper cannot be used.
177
+ Stop after DA-VINCI.md, design-registry.md, page-map.md, proposal.md, specs, design.md, pencil-design.md, and pencil-bindings.md.
178
+ Do not generate `tasks.md` unless the user explicitly changes the delivery intent beyond design-only.
179
+ Before the first Pencil edit, require `da-vinci pencil-session begin --project <project-path> --pen <path>` so the registered project-local `.pen` is seeded and locked; fall back to `da-vinci ensure-pen --output <path> --verify-open` only when the session wrapper cannot be used.
138
180
  If Pencil MCP is active, run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
139
181
  Before reporting `design complete`, require both the MCP runtime gate and `da-vinci audit --mode completion --change <change-id> <project-path>` to pass.
140
182
  Do not start code changes yet.
@@ -147,7 +189,9 @@ $da-vinci use continue for this existing tablet-product redesign workflow.
147
189
 
148
190
  Use the existing Da Vinci artifacts in this project.
149
191
  Do not restart discovery unless an artifact is missing or clearly wrong.
150
- Keep the registered project-local Pencil source under .da-vinci/designs/ as the design source of truth. Prefer `da-vinci pencil-session begin --project <project-path> --pen <path>` when resuming, 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.
192
+ Determine continuation routing from current artifact and checkpoint truth first, then use contextual checkpoint deltas only as auxiliary recovery notes.
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.
151
195
  If the redesign is complex, continue from the approved anchor surfaces instead of restarting broad scaffolding.
152
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`.
153
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.
@@ -19,6 +19,7 @@ Use this when the workflow needs:
19
19
 
20
20
  - Use `Simple redesign` when the web product has a limited product surface or only a few major pages.
21
21
  - Use `Complex redesign` when the product mixes marketing, auth, onboarding, app surfaces, dialogs, drawers, and materially different states.
22
+ - Use `Redesign with reference directory` when you have a local HTML or mockup directory that should guide visual treatment without becoming route or behavior truth.
22
23
  - Use `Design-only` when you want the design chain and bindings but no code changes yet.
23
24
  - Use `Continue` when the workflow already has artifacts and needs to resume.
24
25
 
@@ -32,7 +33,7 @@ Use these templates when the web product already exists, but routes, flow logic,
32
33
  $da-vinci use intake for this existing web product.
33
34
 
34
35
  This is a broad overhaul, not only a UI refresh.
35
- Current web codebase is important reference evidence and migration baseline, but it should not be treated as the final target behavior truth.
36
+ Current web codebase is reference evidence and migration baseline, not the final target behavior truth.
36
37
  We need to redefine flows, route structure, page responsibilities, and selected surfaces while preserving only approved integrations, permissions, and constraints.
37
38
  Recommend the best Da Vinci mode and generate the best executable next-step prompt.
38
39
  ```
@@ -61,7 +62,7 @@ $da-vinci use overhaul-from-code to design the new target web surfaces from the
61
62
 
62
63
  Use the existing .da-vinci/project-inventory.md, proposal.md, migration-contract.md, target specs, page-map.md, DA-VINCI.md, and design-registry.md.
63
64
  Treat the new proposal and specs as the target behavior truth.
64
- Treat the old web codebase only as reference evidence and migration context.
65
+ Treat the old web codebase only as reference evidence and migration baseline.
65
66
  Design 1-3 anchor surfaces first, review screenshots, then expand.
66
67
  Persist project-local Pencil files under .da-vinci/designs/.
67
68
  Run the normal Pencil runtime gate and completion audit before terminal completion claims.
@@ -74,6 +75,8 @@ $da-vinci use continue for this existing overhaul-from-code web workflow.
74
75
 
75
76
  Use the existing Da Vinci artifacts.
76
77
  Detect whether the workflow should return to breakdown, continue with design, generate tasks, continue implementation, or verify drift.
78
+ Determine routing from artifact and checkpoint truth first, then use contextual checkpoint deltas only as auxiliary recovery notes.
79
+ If a contextual delta conflicts with current artifacts, ignore that delta and record the conflict before continuing.
77
80
  Prefer the artifact-backed next safe stage instead of restarting the overhaul from scratch.
78
81
  ```
79
82
 
@@ -84,9 +87,11 @@ $da-vinci use redesign-from-code to redesign this existing web product.
84
87
 
85
88
  Existing code is the behavior source of truth, not the layout truth.
86
89
  Preserve current business logic, routes, permissions, integrations, validations, and state transitions unless explicitly required otherwise.
90
+ Treat this as full-delivery unless explicitly changed.
91
+ Do not stop after discovery, anchor surfaces, phase summaries, or task generation; continue through tasks, build, and verify once the corresponding checkpoints pass.
87
92
  Inventory the current product surfaces and important states before Pencil work.
88
93
  Use the Visual Assist preferences declared in DA-VINCI.md.
89
- Before the first Pencil edit, prefer `da-vinci pencil-session begin --project <project-path> --pen <path>` so the registered project-local `.pen` is seeded and the global Pencil lock is held; fall back to `da-vinci ensure-pen --output <path> --verify-open` only when the session wrapper cannot be used.
94
+ Before the first Pencil edit, require `da-vinci pencil-session begin --project <project-path> --pen <path>` so the registered project-local `.pen` is seeded and the global Pencil lock is held; fall back to `da-vinci ensure-pen --output <path> --verify-open` only when the session wrapper cannot be used.
90
95
  If Pencil MCP is active, run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
91
96
  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.
92
97
  Do not pass design checkpoint if the result is a generic SaaS card grid or a recolor of the old interface.
@@ -100,6 +105,8 @@ $da-vinci use redesign-from-code to redesign this existing web product.
100
105
 
101
106
  Existing code is the behavior source of truth, not the layout truth.
102
107
  Preserve current business logic, routes, permissions, integrations, validations, and state transitions unless explicitly required otherwise.
108
+ Treat this as full-delivery unless explicitly changed.
109
+ Do not stop after discovery, anchor surfaces, phase summaries, or task generation; continue through tasks, build, and verify once the corresponding checkpoints pass.
103
110
  Inventory responsive product surfaces, marketing surfaces, authenticated areas, settings pages, dialogs, drawers, overlays, and materially different states before broad Pencil work.
104
111
  Separate marketing-style surfaces from product-workflow surfaces when they require different visual treatment.
105
112
  Decompose complex pages into subpages, overlays, materially different states, and implementation surfaces.
@@ -114,15 +121,48 @@ Before non-trivial `batch_design` calls, preflight the Pencil operations when sh
114
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.
115
122
  Run `da-vinci audit --mode integrity <project-path>` after the first successful Pencil write before broad expansion continues.
116
123
  If Pencil MCP is active, run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
117
- Prefer `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 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.
118
125
  Write exported screenshots under `.da-vinci/changes/<change-id>/exports/` only.
119
126
  Record screenshot review with explicit `PASS` / `WARN` / `BLOCK`, issue list, and revision outcome; "looks good" is not enough.
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.
120
128
  Do not report completion if the registered `.pen` source exists only in memory or only as exported PNGs.
121
129
  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.
122
130
  Do not pass design checkpoint if the result is a generic SaaS card grid, repeated placeholder scaffolds, or a recolor of the old interface.
123
131
  Persist project-local Pencil files under .da-vinci/designs/.
124
132
  ```
125
133
 
134
+ ## Redesign With Reference Directory
135
+
136
+ ```text
137
+ $da-vinci use redesign-from-code to redesign this existing web product.
138
+
139
+ Existing code is the behavior source of truth, not the layout truth.
140
+ Preserve current business logic, routes, permissions, integrations, validations, and state transitions unless explicitly required otherwise.
141
+ Treat this as full-delivery unless explicitly changed.
142
+ Do not stop after discovery, anchor surfaces, phase summaries, or task generation; continue through tasks, build, and verify once the corresponding checkpoints pass.
143
+
144
+ Use <reference-directory> as the local HTML design-reference directory.
145
+ Treat that directory as visual reference material only, not as behavior truth, route truth, or final design-source truth.
146
+ Inventory which routes, auth surfaces, dialogs, drawers, overlays, responsive shells, and materially different states are covered by the reference directory and which are not before broad Pencil work begins.
147
+ For uncovered states or surfaces, derive the design from the approved anchor surfaces, the project visual contract, and the existing behavior truth.
148
+
149
+ If browser access is available, open the HTML reference screens in a real browser and wait 3-5 seconds, or until the visual state settles, before judging hierarchy, spacing, styling, or component treatment.
150
+ Do not review the initial unhydrated or partially rendered state.
151
+ If a reference screen visibly changes after load, use the settled state as the visual reference baseline and record that delayed settling was required.
152
+
153
+ Use the HTML reference screens only as composition and styling input where they are relevant and stable.
154
+ Do not mechanically clone them when they conflict with behavior truth, missing states, or implementation reality.
155
+
156
+ Design 1-3 anchor surfaces first, review screenshots, then expand.
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
+
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.
161
+ Run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
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
+ Persist project-local Pencil files under .da-vinci/designs/.
164
+ ```
165
+
126
166
  ## Design-Only
127
167
 
128
168
  ```text
@@ -130,12 +170,14 @@ $da-vinci use redesign-from-code to redesign this existing web product.
130
170
 
131
171
  Existing code is the behavior source of truth, not the layout truth.
132
172
  Preserve current behavior, routes, permissions, integrations, and state transitions.
173
+ Treat this as design-only, not full-delivery.
133
174
  Inventory product surfaces, marketing surfaces, overlays, and important states.
134
175
  Decompose complex pages into real design surfaces before Pencil work.
135
176
  Use the Visual Assist preferences declared in DA-VINCI.md.
136
177
  If the product is complex, design 1-3 anchor surfaces first, review screenshots, then expand.
137
- Stop after DA-VINCI.md, design-registry.md, page-map.md, proposal.md, specs, design.md, pencil-design.md, pencil-bindings.md, and tasks.md.
138
- Before the first Pencil edit, prefer `da-vinci pencil-session begin --project <project-path> --pen <path>` so the registered project-local `.pen` is seeded and locked; fall back to `da-vinci ensure-pen --output <path> --verify-open` only when the session wrapper cannot be used.
178
+ Stop after DA-VINCI.md, design-registry.md, page-map.md, proposal.md, specs, design.md, pencil-design.md, and pencil-bindings.md.
179
+ Do not generate `tasks.md` unless the user explicitly changes the delivery intent beyond design-only.
180
+ Before the first Pencil edit, require `da-vinci pencil-session begin --project <project-path> --pen <path>` so the registered project-local `.pen` is seeded and locked; fall back to `da-vinci ensure-pen --output <path> --verify-open` only when the session wrapper cannot be used.
139
181
  If Pencil MCP is active, run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
140
182
  Before reporting `design complete`, require both the MCP runtime gate and `da-vinci audit --mode completion --change <change-id> <project-path>` to pass.
141
183
  Do not start code changes yet.
@@ -148,7 +190,9 @@ $da-vinci use continue for this existing web-product redesign workflow.
148
190
 
149
191
  Use the existing Da Vinci artifacts in this project.
150
192
  Do not restart discovery unless an artifact is missing or clearly wrong.
151
- Keep the registered project-local Pencil source under .da-vinci/designs/ as the design source of truth. Prefer `da-vinci pencil-session begin --project <project-path> --pen <path>` when resuming, 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.
193
+ Determine continuation routing from current artifact and checkpoint truth first, then use contextual checkpoint deltas only as auxiliary recovery notes.
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.
152
196
  If the redesign is complex, continue from the approved anchor surfaces instead of restarting broad scaffolding.
153
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`.
154
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.
@@ -49,6 +49,17 @@ Recommended shape:
49
49
  - Preferred adapters:
50
50
  - frontend-skill
51
51
  - ui-ux-pro-max
52
+ - Design-supervisor reviewers:
53
+ - frontend-skill
54
+ - ui-ux-pro-max
55
+ - Design-supervisor review mode:
56
+ - screenshot-and-theme
57
+ - Design-supervisor review inputs:
58
+ - screenshots
59
+ - pencil variables
60
+ - visual thesis
61
+ - content plan
62
+ - interaction thesis
52
63
  - Scope:
53
64
  - visual contract refinement
54
65
  - page composition
@@ -60,6 +71,8 @@ Recommended shape:
60
71
  - native-da-vinci
61
72
  - Require Adapter:
62
73
  - false
74
+ - Require Supervisor Review:
75
+ - false
63
76
  ```
64
77
 
65
78
  Use `Require Adapter: true` only when the workflow must stop if the preferred adapter is unavailable locally.
@@ -73,6 +86,17 @@ Balanced default:
73
86
  - Preferred adapters:
74
87
  - ui-ux-pro-max
75
88
  - frontend-skill
89
+ - Design-supervisor reviewers:
90
+ - frontend-skill
91
+ - ui-ux-pro-max
92
+ - Design-supervisor review mode:
93
+ - screenshot-and-theme
94
+ - Design-supervisor review inputs:
95
+ - screenshots
96
+ - pencil variables
97
+ - visual thesis
98
+ - content plan
99
+ - interaction thesis
76
100
  - Scope:
77
101
  - visual contract refinement
78
102
  - page composition
@@ -83,6 +107,8 @@ Balanced default:
83
107
  - native-da-vinci
84
108
  - Require Adapter:
85
109
  - false
110
+ - Require Supervisor Review:
111
+ - false
86
112
  ```
87
113
 
88
114
  Use this when:
@@ -97,6 +123,17 @@ Quality-first redesign:
97
123
  - Preferred adapters:
98
124
  - frontend-skill
99
125
  - ui-ux-pro-max
126
+ - Design-supervisor reviewers:
127
+ - frontend-skill
128
+ - ui-ux-pro-max
129
+ - Design-supervisor review mode:
130
+ - screenshot-and-theme
131
+ - Design-supervisor review inputs:
132
+ - screenshots
133
+ - pencil variables
134
+ - visual thesis
135
+ - content plan
136
+ - interaction thesis
100
137
  - Scope:
101
138
  - visual contract refinement
102
139
  - page composition
@@ -108,6 +145,8 @@ Quality-first redesign:
108
145
  - native-da-vinci
109
146
  - Require Adapter:
110
147
  - true
148
+ - Require Supervisor Review:
149
+ - false
111
150
  ```
112
151
 
113
152
  Use this when:
@@ -116,6 +155,78 @@ Use this when:
116
155
  - the previous redesign attempt produced generic card grids, weak anchors, or a skin-swap of the old UI
117
156
  - you would rather stop than silently continue without a strong local design helper
118
157
 
158
+ ## Gate Order And Branching
159
+
160
+ `Visual Assist` participates in the design flow, but it does not replace the workflow gates.
161
+
162
+ The review order is:
163
+
164
+ 1. screenshot review
165
+ 2. layout hygiene
166
+ 3. design checkpoint
167
+ 4. design-supervisor review when configured
168
+
169
+ Each layer has a different job:
170
+
171
+ - screenshot review
172
+ - checks whether the reviewed surface has obvious hierarchy, spacing, clarity, or consistency problems
173
+ - layout hygiene
174
+ - checks whether the screen is structurally healthy for its form factor
175
+ - design checkpoint
176
+ - checks whether the approved anchor set is strong enough to expand from
177
+ - design-supervisor review
178
+ - checks whether the final style quality is mature enough to expand or implement from
179
+
180
+ How each gate judges:
181
+
182
+ - screenshot review
183
+ - review the exported or captured surface itself
184
+ - require an explicit `PASS` / `WARN` / `BLOCK`
185
+ - require an issue list and revision outcome
186
+ - treat unresolved hierarchy, spacing, clarity, consistency, or placeholder issues as a stop signal before expansion
187
+ - layout hygiene
188
+ - review the same surface against form-factor-specific structural rules
189
+ - check top chrome alignment, edge pressure, clipping, region balance, density, and footer/body conflict
190
+ - block when the screen is structurally unhealthy even if the style direction looks promising
191
+ - design checkpoint
192
+ - review the approved anchor set, not just one isolated screenshot
193
+ - block skin-swaps of the old UI, generic card mosaics, repeated placeholder scaffolds, and weak visual anchors
194
+ - only pass when the anchor set is strong enough to define shared primitives and support broad page expansion
195
+ - design-supervisor review
196
+ - review screenshots plus the configured theme and thesis inputs
197
+ - require reviewer names, explicit status, issue list, and revision outcome in `pencil-design.md`
198
+ - use this gate to judge final style maturity, brand fit, and genericness risk after the structural gates have already passed
199
+
200
+ Branching rules:
201
+
202
+ - if `Design-supervisor reviewers` are omitted
203
+ - no supervisor review runs
204
+ - the workflow still depends on the structural gates above
205
+ - if reviewers are configured and `Require Supervisor Review: false`
206
+ - run and record supervisor review
207
+ - the review is advisory
208
+ - missing or weak reviewer results should not silently override the earlier structural gates
209
+ - if reviewers are configured and `Require Supervisor Review: true`
210
+ - supervisor review becomes a hard gate
211
+ - missing review, `BLOCK`, or unaccepted `WARN` should stop broad expansion, implementation-task handoff, and terminal completion
212
+
213
+ Result branching by gate:
214
+
215
+ - screenshot review `BLOCK`
216
+ - revise the reviewed surface before layout hygiene or broader expansion continues
217
+ - layout hygiene `BLOCK`
218
+ - revise structure for the target form factor before treating the screen as approved
219
+ - design checkpoint `BLOCK`
220
+ - stop broad generation and reset from the anchor set instead of layering more screens on top
221
+ - design-supervisor review `WARN` with `Require Supervisor Review: false`
222
+ - record the warning and decide whether to refine before expansion
223
+ - design-supervisor review `WARN` with `Require Supervisor Review: true`
224
+ - treat as blocking unless the warning is explicitly accepted and the acceptance is recorded
225
+ - design-supervisor review `BLOCK`
226
+ - stop expansion, task handoff, and terminal completion until the visual-quality issues are resolved
227
+
228
+ Reviewer outcomes never override blocker-level screenshot-review or layout-hygiene failures.
229
+
119
230
  ## What Each Field Means
120
231
 
121
232
  Use the fields like this:
@@ -125,22 +236,82 @@ Use the fields like this:
125
236
  - order matters
126
237
  - if multiple listed skills are available, Da Vinci should still resolve one primary adapter
127
238
  - do not assume cross-platform equivalence between near-name adapters such as `frontend-skill` and `frontend-design`; resolve the actual installed adapter names for the current environment
239
+ - typical use:
240
+ - put `ui-ux-pro-max` first for dense product surfaces
241
+ - put `frontend-skill` first when art direction and composition quality matter more
242
+ - `Design-supervisor reviewers`
243
+ - the priority list of local skills you want Da Vinci to use for final style-quality review after structural design gates pass
244
+ - keep this distinct from `Preferred adapters` even when the same installed skill appears in both lists
245
+ - reviewers judge the approved result; they do not lead first-pass composition
246
+ - omit this field when the project does not need a final reviewer role
247
+ - `Design-supervisor review mode`
248
+ - how the final review should evaluate the work
249
+ - use `screenshot-and-theme` when reviewers should inspect screenshots plus Pencil variables and design theses together
250
+ - recommended default: `screenshot-and-theme`
251
+ - `Design-supervisor review inputs`
252
+ - the evidence reviewers must use
253
+ - prefer screenshots, Pencil variables, `visual-thesis.md`, `content-plan.md`, and `interaction-thesis.md`
254
+ - minimum useful set:
255
+ - screenshots
256
+ - Pencil variables
257
+ - full recommended set:
258
+ - screenshots
259
+ - Pencil variables
260
+ - `visual-thesis.md`
261
+ - `content-plan.md`
262
+ - `interaction-thesis.md`
128
263
  - `Scope`
129
264
  - the only areas where adapters are allowed to influence the workflow
130
265
  - keep this limited to presentation-quality work such as composition, spacing, and Pencil refinement
131
266
  - include anchor-surface composition when the redesign depends on a strong first-pass visual direction
132
267
  - do not use this field to delegate behavior, routes, or state truth
268
+ - good scope entries:
269
+ - visual contract refinement
270
+ - page or workspace composition
271
+ - hierarchy and spacing
272
+ - anchor-surface composition
273
+ - Pencil design refinement
133
274
  - `Fallback`
134
275
  - what Da Vinci should do if the preferred adapters are unavailable locally
135
276
  - `native-da-vinci` means continue with the built-in rules instead of stopping
277
+ - keep `native-da-vinci` unless the team has a documented alternate fallback policy
136
278
  - `Require Adapter`
137
279
  - whether adapter availability is a hard requirement
138
280
  - `false` means adapter use is optional and should not block delivery
139
281
  - `true` means the workflow should stop if no acceptable adapter is available
282
+ - keep this `false` for most work
283
+ - `Require Supervisor Review`
284
+ - whether `design-supervisor review` is a hard gate
285
+ - when `true`, missing, blocked, or unaccepted review results should block broad expansion, implementation-task handoff, and terminal completion
286
+ - keep it `false` unless the project explicitly requires a reviewer-backed style signoff
287
+ - this field only matters when `Design-supervisor reviewers` are configured
288
+ - `false` means the review still runs when configured, but remains advisory
289
+ - `true` means the review becomes a delivery gate
290
+
291
+ ## Recommended Combinations
292
+
293
+ Use these combinations:
294
+
295
+ - adapter-only
296
+ - `Preferred adapters`: set
297
+ - `Design-supervisor reviewers`: omit
298
+ - `Require Adapter`: `false`
299
+ - `Require Supervisor Review`: omit
300
+ - balanced with advisory reviewer
301
+ - `Preferred adapters`: set
302
+ - `Design-supervisor reviewers`: set
303
+ - `Require Adapter`: `false`
304
+ - `Require Supervisor Review`: `false`
305
+ - high-control redesign with hard reviewer signoff
306
+ - `Preferred adapters`: set
307
+ - `Design-supervisor reviewers`: set
308
+ - `Require Adapter`: `true` or `false` depending on adapter strictness
309
+ - `Require Supervisor Review`: `true`
140
310
 
141
311
  Recommended default:
142
312
 
143
313
  - use `Require Adapter: false`
314
+ - use `Require Supervisor Review: false`
144
315
  - use `Fallback: native-da-vinci`
145
316
  - keep `Scope` narrowly focused on visual-quality decisions
146
317
 
@@ -167,7 +338,7 @@ For `redesign-from-code`, also do this:
167
338
 
168
339
  For `overhaul-from-code`, also do this:
169
340
 
170
- - restate that existing code is reference evidence and migration baseline, not automatic final behavior truth
341
+ - restate that existing code is reference evidence and migration baseline, not the final target behavior truth
171
342
  - stabilize `proposal.md`, `migration-contract.md`, target `specs/`, and `page-map.md` before broad Pencil work
172
343
  - make sure anchor surfaces express the new flow and information architecture instead of cosmetically repainting the legacy shell
173
344
 
@@ -238,6 +409,13 @@ For complex redesigns:
238
409
  - define a small shared primitive family from the approved anchor surfaces before broad page expansion
239
410
  - if the output is still placeholder-heavy or repetitious, mark `design checkpoint` as `BLOCK` and reset from the anchor surfaces instead of layering more screens on top
240
411
 
412
+ If `Design-supervisor reviewers` are configured:
413
+
414
+ - run `design-supervisor review` after screenshot review, layout hygiene, and design checkpoint on the approved anchor set
415
+ - if `Require Supervisor Review: true`, treat missing, blocked, or unaccepted review results as blocking before expansion or implementation handoff
416
+ - do not let reviewers override blocker-level layout-hygiene or screenshot-review failures
417
+ - record reviewer names, inputs, `PASS` / `WARN` / `BLOCK`, issue list, and revision outcome in `pencil-design.md`
418
+
241
419
  Record the outcome in `pencil-design.md`.
242
420
 
243
421
  Recommended fields:
@@ -5,10 +5,20 @@ Use these presets as starting points for the `## Visual Assist` section inside `
5
5
  Each preset is intentionally conservative:
6
6
 
7
7
  - one primary adapter direction
8
+ - one separate reviewer direction
8
9
  - one fallback direction
9
10
  - clear scope boundaries
10
11
  - non-blocking behavior by default
11
12
 
13
+ Each surface preset should now be read as a family of three variants:
14
+
15
+ - adapter-only
16
+ - use when the project wants design-generation help but no final reviewer role
17
+ - advisory reviewer
18
+ - use when the project wants a recorded final style readout but does not want review status to block completion
19
+ - required reviewer signoff
20
+ - use when the project needs reviewer-backed style approval before broad expansion or implementation handoff
21
+
12
22
  Use them together with:
13
23
 
14
24
  - `docs/prompt-presets/`
@@ -23,6 +33,7 @@ If the project is design-critical or previous outputs were weak, generic, or too
23
33
  - keep the same preset family
24
34
  - move `frontend-skill` to the first slot
25
35
  - consider `Require Adapter: true`
36
+ - consider `Require Supervisor Review: true` only when the project truly needs reviewer-backed style signoff
26
37
  - raise the design checkpoint bar before broad Pencil generation
27
38
  - switch to anchor-first generation: design 1-3 anchor surfaces, review screenshots, then expand
28
39
  - update `Preferred adapters` to the actual installed names for the current environment instead of assuming cross-platform aliases
@@ -37,8 +48,20 @@ Available presets:
37
48
  How to use them:
38
49
 
39
50
  1. choose the preset closest to the product surface
40
- 2. copy the `## Visual Assist` block into `DA-VINCI.md`
41
- 3. adjust adapter order only if the project clearly needs a different visual bias
42
- 4. replace adapter names with the actual installed names for the current environment when they differ
43
- 5. keep `Require Adapter: false` unless the project truly must stop without a specific local skill
44
- 6. for complex redesigns, do not treat the preset alone as enough; pair it with anchor-first Pencil generation and screenshot review
51
+ 2. choose the correct variant inside that preset:
52
+ - adapter-only
53
+ - advisory reviewer
54
+ - required reviewer signoff
55
+ 3. copy the selected `## Visual Assist` block into `DA-VINCI.md`
56
+ 4. adjust adapter order only if the project clearly needs a different visual bias
57
+ 5. replace adapter names with the actual installed names for the current environment when they differ
58
+ 6. keep `Require Adapter: false` unless the project truly must stop without a specific local skill
59
+ 7. keep `Design-supervisor reviewers` separate from `Preferred adapters`, even if the same installed skill appears in both lists
60
+ 8. keep `Require Supervisor Review: false` unless the project truly needs reviewer-backed style signoff
61
+ 9. for complex redesigns, do not treat the preset alone as enough; pair it with anchor-first Pencil generation, screenshot review, and `design-supervisor review` when configured
62
+
63
+ Variant-selection rule of thumb:
64
+
65
+ - choose adapter-only for routine product work where structural gates are enough
66
+ - choose advisory reviewer for most redesigns where you want stronger quality feedback recorded
67
+ - choose required reviewer signoff only when visual quality itself is a delivery gate