@xenonbyte/da-vinci-workflow 0.1.17 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/README.md +73 -4
- package/README.zh-CN.md +72 -5
- package/SKILL.md +64 -2
- package/commands/claude/da-vinci.md +1 -0
- package/commands/claude/dv/continue.md +2 -0
- package/commands/claude/dv/design.md +3 -2
- package/commands/claude/dv/intake.md +2 -0
- package/commands/codex/prompts/da-vinci.md +1 -0
- package/commands/codex/prompts/dv-continue.md +2 -0
- package/commands/codex/prompts/dv-design.md +3 -2
- package/commands/codex/prompts/dv-intake.md +2 -1
- package/commands/gemini/da-vinci.toml +1 -0
- package/commands/gemini/dv/continue.toml +2 -0
- package/commands/gemini/dv/design.toml +3 -2
- package/commands/gemini/dv/intake.toml +2 -0
- package/docs/codex-natural-language-usage.md +10 -0
- package/docs/dv-command-reference.md +402 -0
- package/docs/mode-use-cases.md +95 -3
- package/docs/pencil-rendering-workflow.md +279 -0
- package/docs/prompt-entrypoints.md +28 -0
- package/docs/prompt-presets/README.md +82 -1
- package/docs/prompt-presets/desktop-app.md +103 -5
- package/docs/prompt-presets/mobile-app.md +103 -5
- package/docs/prompt-presets/tablet-app.md +103 -5
- package/docs/prompt-presets/web-app.md +103 -5
- package/docs/visual-adapters.md +190 -0
- package/docs/visual-assist-presets/README.md +28 -5
- package/docs/visual-assist-presets/desktop-app.md +88 -2
- package/docs/visual-assist-presets/mobile-app.md +89 -2
- package/docs/visual-assist-presets/tablet-app.md +88 -2
- package/docs/visual-assist-presets/web-app.md +88 -2
- package/docs/workflow-examples.md +31 -4
- package/docs/workflow-overview.md +243 -0
- package/docs/zh-CN/codex-natural-language-usage.md +10 -0
- package/docs/zh-CN/dv-command-reference.md +402 -0
- package/docs/zh-CN/mode-use-cases.md +49 -4
- package/docs/zh-CN/pencil-rendering-workflow.md +281 -0
- package/docs/zh-CN/prompt-entrypoints.md +28 -0
- package/docs/zh-CN/prompt-presets/README.md +82 -1
- package/docs/zh-CN/prompt-presets/desktop-app.md +103 -5
- package/docs/zh-CN/prompt-presets/mobile-app.md +103 -5
- package/docs/zh-CN/prompt-presets/tablet-app.md +103 -5
- package/docs/zh-CN/prompt-presets/web-app.md +103 -5
- package/docs/zh-CN/visual-adapters.md +190 -0
- package/docs/zh-CN/visual-assist-presets/README.md +28 -5
- package/docs/zh-CN/visual-assist-presets/desktop-app.md +88 -1
- package/docs/zh-CN/visual-assist-presets/mobile-app.md +89 -2
- package/docs/zh-CN/visual-assist-presets/tablet-app.md +89 -2
- package/docs/zh-CN/visual-assist-presets/web-app.md +88 -1
- package/docs/zh-CN/workflow-examples.md +34 -4
- package/docs/zh-CN/workflow-overview.md +245 -0
- package/lib/audit.js +199 -0
- package/lib/pencil-lock.js +15 -4
- package/package.json +4 -1
- package/references/artifact-templates.md +65 -0
- package/references/checkpoints.md +43 -19
- package/references/design-inputs.md +6 -0
- package/references/modes.md +34 -0
- package/references/page-mapping.md +58 -0
- package/references/pencil-design-to-code.md +8 -2
- package/references/platform-adapters.md +1 -0
- package/references/prompt-recipes.md +44 -0
- package/scripts/test-audit-design-supervisor.js +348 -0
- package/scripts/test-mode-consistency.js +289 -0
- package/scripts/test-pencil-lock.js +130 -0
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
# Pencil Rendering Workflow
|
|
2
|
+
|
|
3
|
+
This document describes the dedicated Pencil rendering lifecycle inside Da Vinci.
|
|
4
|
+
|
|
5
|
+
Use it when you need the exact rules for:
|
|
6
|
+
|
|
7
|
+
- seeding a project-local `.pen`
|
|
8
|
+
- editing through Pencil MCP
|
|
9
|
+
- persisting live changes
|
|
10
|
+
- screenshot review
|
|
11
|
+
- runtime gates and filesystem audits
|
|
12
|
+
|
|
13
|
+
Use [dv-command-reference.md](/Users/xubo/x-skills/da-vinci/docs/dv-command-reference.md) when you need the route-level `dv:` command sequence and rollback behavior across `design`, `tasks`, `build`, and `verify`.
|
|
14
|
+
|
|
15
|
+
## Rendering Truth Model
|
|
16
|
+
|
|
17
|
+
Da Vinci treats these as distinct sources:
|
|
18
|
+
|
|
19
|
+
- live truth: the current Pencil MCP editor
|
|
20
|
+
- disk truth: the registered project-local `.pen`
|
|
21
|
+
- review truth: screenshot exports under `.da-vinci/changes/<change-id>/exports/`
|
|
22
|
+
|
|
23
|
+
PNG exports are review artifacts only. They are not the design source of truth.
|
|
24
|
+
|
|
25
|
+
`.da-vinci/designs/` is reserved for `.pen` files only.
|
|
26
|
+
|
|
27
|
+
## Session Model
|
|
28
|
+
|
|
29
|
+
Da Vinci now requires the session wrapper on autonomous runs:
|
|
30
|
+
|
|
31
|
+
- `da-vinci pencil-session begin`
|
|
32
|
+
- `da-vinci pencil-session persist`
|
|
33
|
+
- `da-vinci pencil-session end`
|
|
34
|
+
|
|
35
|
+
This wrapper exists to make three things mandatory:
|
|
36
|
+
|
|
37
|
+
- seeded `.pen` ownership
|
|
38
|
+
- serialized Pencil MCP write access
|
|
39
|
+
- explicit live-to-disk persistence and sync verification
|
|
40
|
+
|
|
41
|
+
If `DA-VINCI.md` declares `Design-supervisor reviewers`, Da Vinci also runs a final style-quality review after the structural design gates pass. It becomes a blocking gate only when `DA-VINCI.md` sets `Require Supervisor Review: true`.
|
|
42
|
+
|
|
43
|
+
## First-Run Path
|
|
44
|
+
|
|
45
|
+
When the project does not yet have a registered `.pen`:
|
|
46
|
+
|
|
47
|
+
1. Begin a Pencil session.
|
|
48
|
+
2. Seed the registered project-local `.pen`.
|
|
49
|
+
3. Acquire the global Pencil lock.
|
|
50
|
+
4. Open that exact `.pen` path.
|
|
51
|
+
5. Start Pencil edits.
|
|
52
|
+
|
|
53
|
+
The workflow should not begin anchor rendering in `new`.
|
|
54
|
+
|
|
55
|
+
## Resume Path
|
|
56
|
+
|
|
57
|
+
When the project already has a registered `.pen`:
|
|
58
|
+
|
|
59
|
+
1. Begin a Pencil session against the existing path.
|
|
60
|
+
2. Reopen that exact `.pen` for continuity.
|
|
61
|
+
3. Perform live MCP edits.
|
|
62
|
+
4. Persist a fresh MCP snapshot back to the same path after material edits.
|
|
63
|
+
|
|
64
|
+
Da Vinci does not assume live MCP edits were flushed automatically.
|
|
65
|
+
|
|
66
|
+
## Persistence Rule
|
|
67
|
+
|
|
68
|
+
Da Vinci does not treat headless interactive `save()` as authoritative persistence truth.
|
|
69
|
+
|
|
70
|
+
Instead, the persistence step is:
|
|
71
|
+
|
|
72
|
+
1. read MCP-readable node snapshot data
|
|
73
|
+
2. read MCP-readable variable snapshot data
|
|
74
|
+
3. write the project-local `.pen`
|
|
75
|
+
4. reopen-verify it
|
|
76
|
+
5. compare live snapshot and persisted snapshot hashes
|
|
77
|
+
|
|
78
|
+
Relevant commands:
|
|
79
|
+
|
|
80
|
+
- `da-vinci write-pen`
|
|
81
|
+
- `da-vinci check-pen-sync`
|
|
82
|
+
|
|
83
|
+
`da-vinci snapshot-pen` is disk-to-disk only. It is not the live-edit persistence path.
|
|
84
|
+
|
|
85
|
+
## Locking Rule
|
|
86
|
+
|
|
87
|
+
Pencil MCP writes are serialized by a global lock.
|
|
88
|
+
|
|
89
|
+
Use:
|
|
90
|
+
|
|
91
|
+
- `da-vinci pencil-lock acquire`
|
|
92
|
+
- `da-vinci pencil-lock release`
|
|
93
|
+
|
|
94
|
+
or use the session wrapper, which manages the lock for you.
|
|
95
|
+
|
|
96
|
+
This prevents multiple projects from competing for the same active editor.
|
|
97
|
+
|
|
98
|
+
## Batch Discipline
|
|
99
|
+
|
|
100
|
+
Before writing non-trivial `batch_design` payloads:
|
|
101
|
+
|
|
102
|
+
- run `da-vinci preflight-pencil --ops-file <path>` when shell access is available
|
|
103
|
+
- keep anchor batches small
|
|
104
|
+
- prefer 12 or fewer operations on anchor surfaces
|
|
105
|
+
- if the same anchor surface rolls back twice, switch to micro-batches of 6 or fewer operations
|
|
106
|
+
|
|
107
|
+
Repeated schema rollbacks are not acceptable forward progress.
|
|
108
|
+
|
|
109
|
+
## Review Gates
|
|
110
|
+
|
|
111
|
+
### Screenshot Review
|
|
112
|
+
|
|
113
|
+
Each approved surface needs explicit screenshot review:
|
|
114
|
+
|
|
115
|
+
- `PASS`
|
|
116
|
+
- `WARN`
|
|
117
|
+
- `BLOCK`
|
|
118
|
+
|
|
119
|
+
Each review record must include:
|
|
120
|
+
|
|
121
|
+
- issue list
|
|
122
|
+
- revision outcome
|
|
123
|
+
|
|
124
|
+
Self-affirming prose such as "looks good" does not count.
|
|
125
|
+
|
|
126
|
+
### Layout Hygiene
|
|
127
|
+
|
|
128
|
+
Each reviewed surface must also satisfy the active form-factor-specific layout-hygiene profile:
|
|
129
|
+
|
|
130
|
+
- mobile
|
|
131
|
+
- tablet
|
|
132
|
+
- desktop
|
|
133
|
+
- web
|
|
134
|
+
|
|
135
|
+
This is separate from `Visual Assist`.
|
|
136
|
+
|
|
137
|
+
### Design Checkpoint
|
|
138
|
+
|
|
139
|
+
The render output cannot pass if:
|
|
140
|
+
|
|
141
|
+
- it is a skin-swap
|
|
142
|
+
- it is mostly placeholder scaffolding
|
|
143
|
+
- it ignores screenshot-review findings
|
|
144
|
+
- it still shows repeated schema-instability
|
|
145
|
+
|
|
146
|
+
### Design-Supervisor Review
|
|
147
|
+
|
|
148
|
+
When `DA-VINCI.md` declares `Design-supervisor reviewers`, run a final `design-supervisor review` after screenshot review, layout hygiene, and design checkpoint for the currently approved anchor set.
|
|
149
|
+
|
|
150
|
+
When `Require Supervisor Review: true`, missing, blocked, or unaccepted review results block broad expansion, implementation-task handoff, and terminal completion. When `Require Supervisor Review: false`, still record the review when configured, but treat it as advisory rather than completion-blocking.
|
|
151
|
+
|
|
152
|
+
Use it to judge:
|
|
153
|
+
|
|
154
|
+
- style quality
|
|
155
|
+
- brand distinctiveness
|
|
156
|
+
- cross-screen visual coherence
|
|
157
|
+
- token-to-render alignment
|
|
158
|
+
- whether the approved anchors are strong enough to expand or implement from
|
|
159
|
+
|
|
160
|
+
Reviewers are separate from `Preferred adapters`.
|
|
161
|
+
|
|
162
|
+
- adapters lead the design pass
|
|
163
|
+
- reviewers judge the approved result
|
|
164
|
+
|
|
165
|
+
Recommended inputs:
|
|
166
|
+
|
|
167
|
+
- reviewed screenshots
|
|
168
|
+
- Pencil `get_variables()` output
|
|
169
|
+
- `visual-thesis.md`
|
|
170
|
+
- `content-plan.md`
|
|
171
|
+
- `interaction-thesis.md`
|
|
172
|
+
|
|
173
|
+
Record:
|
|
174
|
+
|
|
175
|
+
- reviewer names
|
|
176
|
+
- review inputs
|
|
177
|
+
- `PASS` / `WARN` / `BLOCK`
|
|
178
|
+
- issue list
|
|
179
|
+
- revision outcome
|
|
180
|
+
|
|
181
|
+
## Design-Source Gate
|
|
182
|
+
|
|
183
|
+
After active Pencil work exists, Da Vinci runs `design-source checkpoint`.
|
|
184
|
+
|
|
185
|
+
It verifies:
|
|
186
|
+
|
|
187
|
+
- `design-registry.md` points to one specific `.pen`
|
|
188
|
+
- the active editor matches that `.pen`
|
|
189
|
+
- the shell-visible file exists
|
|
190
|
+
- the registered `.pen` is not still only in memory
|
|
191
|
+
- `.da-vinci/designs/` is not polluted by markdown or PNG files
|
|
192
|
+
|
|
193
|
+
## MCP Runtime Gate
|
|
194
|
+
|
|
195
|
+
When Pencil MCP is active, Da Vinci records a runtime gate result in `pencil-design.md`.
|
|
196
|
+
|
|
197
|
+
It verifies:
|
|
198
|
+
|
|
199
|
+
- the active editor is not `new`
|
|
200
|
+
- the workflow is not using empty `filePath` after registration
|
|
201
|
+
- claimed anchor ids exist in the active editor
|
|
202
|
+
- reviewed screenshot targets exist in the active editor
|
|
203
|
+
- live snapshot hash matches the persisted snapshot hash at completion stage
|
|
204
|
+
|
|
205
|
+
## Filesystem Audits
|
|
206
|
+
|
|
207
|
+
### Integrity Audit
|
|
208
|
+
|
|
209
|
+
Run during active work:
|
|
210
|
+
|
|
211
|
+
```text
|
|
212
|
+
da-vinci audit --mode integrity <project-path>
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Recommended timing:
|
|
216
|
+
|
|
217
|
+
- immediately after the first successful Pencil write
|
|
218
|
+
- before broad expansion beyond approved anchor surfaces
|
|
219
|
+
|
|
220
|
+
### Completion Audit
|
|
221
|
+
|
|
222
|
+
Run before any terminal completion claim:
|
|
223
|
+
|
|
224
|
+
```text
|
|
225
|
+
da-vinci audit --mode completion --change <change-id> <project-path>
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
This audit now also expects `.da-vinci/state/pencil-session.json` to reflect the latest persisted `.pen` hash.
|
|
229
|
+
|
|
230
|
+
## Preferred Command Chain
|
|
231
|
+
|
|
232
|
+
Typical autonomous chain:
|
|
233
|
+
|
|
234
|
+
1. `da-vinci pencil-session begin --project <project-path> --pen <path>`
|
|
235
|
+
2. Pencil MCP edits
|
|
236
|
+
3. `da-vinci pencil-session persist --project <project-path> --pen <path> --nodes-file <nodes.json> --variables-file <vars.json> --version <version>`
|
|
237
|
+
4. screenshot review + layout hygiene
|
|
238
|
+
5. design checkpoint
|
|
239
|
+
6. design-supervisor review when configured
|
|
240
|
+
7. `da-vinci pencil-session end --project <project-path> --pen <path> --nodes-file <nodes.json> --variables-file <vars.json> --version <version>`
|
|
241
|
+
8. `da-vinci audit --mode completion --change <change-id> <project-path>`
|
|
242
|
+
|
|
243
|
+
## Flow Diagram
|
|
244
|
+
|
|
245
|
+
```mermaid
|
|
246
|
+
flowchart TD
|
|
247
|
+
A[Start Pencil work] --> B{Registered .pen exists?}
|
|
248
|
+
B -- No --> C[pencil-session begin seeds .pen and acquires global lock]
|
|
249
|
+
B -- Yes --> D[pencil-session begin reopens existing .pen and acquires global lock]
|
|
250
|
+
C --> E[Preflight non-trivial batch_design payloads]
|
|
251
|
+
D --> E
|
|
252
|
+
E --> F[Render or update anchor surface]
|
|
253
|
+
F --> G{Batch rolled back twice?}
|
|
254
|
+
G -- Yes --> H[Switch to micro-batches of 6 or fewer ops]
|
|
255
|
+
G -- No --> I[Capture screenshot and review]
|
|
256
|
+
H --> F
|
|
257
|
+
I --> J{Screenshot review and layout hygiene pass?}
|
|
258
|
+
J -- No --> F
|
|
259
|
+
J -- Yes --> K{Design checkpoint pass?}
|
|
260
|
+
K -- No --> F
|
|
261
|
+
K -- Yes --> L{Design-supervisor review configured?}
|
|
262
|
+
L -- Yes --> M[Run design-supervisor review on screenshots plus theme inputs]
|
|
263
|
+
L -- No --> N[pencil-session persist writes live MCP snapshot back to .pen]
|
|
264
|
+
M --> O{Require Supervisor Review?}
|
|
265
|
+
O -- No --> N
|
|
266
|
+
O -- Yes --> P{Review PASS or accepted WARN?}
|
|
267
|
+
P -- No --> F
|
|
268
|
+
P -- Yes --> N
|
|
269
|
+
N --> Q[check-pen-sync verifies live hash equals persisted hash]
|
|
270
|
+
Q --> R{design-source checkpoint and runtime gate pass?}
|
|
271
|
+
R -- No --> F
|
|
272
|
+
R -- Yes --> S{More design work needed?}
|
|
273
|
+
S -- Yes --> E
|
|
274
|
+
S -- No --> T[pencil-session end releases lock]
|
|
275
|
+
T --> U[completion audit]
|
|
276
|
+
U --> V{completion audit pass?}
|
|
277
|
+
V -- No --> F
|
|
278
|
+
V -- Yes --> W[design complete]
|
|
279
|
+
```
|
|
@@ -74,6 +74,11 @@ Do not default this sequence to `build`.
|
|
|
74
74
|
|
|
75
75
|
`build` is still valid, but it is an expert route for workflows that are already implementation-ready.
|
|
76
76
|
|
|
77
|
+
State rule:
|
|
78
|
+
|
|
79
|
+
- if design is done but `tasks.md` does not exist yet, the next recommended route should usually be `tasks`, not `build`
|
|
80
|
+
- only recommend `build` as the primary next step once tasks and implementation readiness are already clear
|
|
81
|
+
|
|
77
82
|
## Platform Syntax
|
|
78
83
|
|
|
79
84
|
For ready-to-copy surface-specific starting prompts, see:
|
|
@@ -120,6 +125,9 @@ $da-vinci use intake for this existing Android project.
|
|
|
120
125
|
I need to globally replace the UI.
|
|
121
126
|
Existing code is the behavior source of truth.
|
|
122
127
|
HTML references are in /abs/path/to/mockups.
|
|
128
|
+
Treat the HTML directory as visual reference only, not behavior truth or final design-source truth.
|
|
129
|
+
Open the HTML references in a real browser and wait 3-5 seconds, or until the visual state settles, before judging the final styling.
|
|
130
|
+
Inventory which pages and states the HTML directory actually covers and which still need to be inferred from behavior truth.
|
|
123
131
|
```
|
|
124
132
|
|
|
125
133
|
Expected outcome:
|
|
@@ -146,6 +154,26 @@ Expected outcome:
|
|
|
146
154
|
- identified next safe stage
|
|
147
155
|
- one executable continuation prompt
|
|
148
156
|
|
|
157
|
+
## Example: Existing Product With Flow And Logic Overhaul
|
|
158
|
+
|
|
159
|
+
Use:
|
|
160
|
+
|
|
161
|
+
```text
|
|
162
|
+
$da-vinci use intake for this existing product.
|
|
163
|
+
|
|
164
|
+
This is a large overhaul, not only a UI refresh.
|
|
165
|
+
Current codebase is reference evidence and migration baseline, not the final target behavior truth.
|
|
166
|
+
We need to redefine flows, logic, and page structure while preserving selected integrations and constraints.
|
|
167
|
+
Generate the best executable Da Vinci workflow prompt for the next step.
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Expected outcome:
|
|
171
|
+
|
|
172
|
+
- recommended mode: `overhaul-from-code`
|
|
173
|
+
- one executable main workflow prompt
|
|
174
|
+
- one more conservative planning-first prompt
|
|
175
|
+
- one continuation prompt for later resume
|
|
176
|
+
|
|
149
177
|
## Design Rule
|
|
150
178
|
|
|
151
179
|
These routes are workflow-entry helpers.
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Use these presets when you want a copy-ready starting prompt for a specific product surface.
|
|
4
4
|
|
|
5
|
+
These presets primarily target screen-design work once the workflow mode is already clear.
|
|
6
|
+
For broad existing-product rewrites where flows or logic are also changing, prefer `overhaul-from-code` plus `intake`/custom prompt setup first, then reuse the relevant design-oriented preset after `proposal.md`, `migration-contract.md`, and target `specs/` stabilize.
|
|
7
|
+
|
|
5
8
|
These presets are designed to pair with:
|
|
6
9
|
|
|
7
10
|
- `docs/visual-assist-presets/`
|
|
@@ -14,7 +17,7 @@ Recommended flow:
|
|
|
14
17
|
4. copy both into your workflow setup
|
|
15
18
|
5. tighten the prompt further only when the project has unusual truth sources or platform constraints
|
|
16
19
|
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
|
|
17
|
-
7. for project-local `.pen` persistence,
|
|
20
|
+
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
|
|
18
21
|
|
|
19
22
|
Available presets:
|
|
20
23
|
|
|
@@ -35,5 +38,83 @@ Each scene preset should now include:
|
|
|
35
38
|
|
|
36
39
|
- `Simple redesign`
|
|
37
40
|
- `Complex redesign`
|
|
41
|
+
- `Redesign with reference directory`
|
|
38
42
|
- `Design-only`
|
|
39
43
|
- `Continue`
|
|
44
|
+
|
|
45
|
+
## `overhaul-from-code` Prompt Templates
|
|
46
|
+
|
|
47
|
+
These are not surface-specific redesign presets.
|
|
48
|
+
|
|
49
|
+
Use them when the project already exists, but the target flows or logic are being rewritten and the old codebase should be treated as reference evidence and migration baseline.
|
|
50
|
+
|
|
51
|
+
### 1. Intake For A Broad Existing-Product Overhaul
|
|
52
|
+
|
|
53
|
+
Use when:
|
|
54
|
+
|
|
55
|
+
- the repo already exists
|
|
56
|
+
- the user knows a large rewrite is needed
|
|
57
|
+
- the new target behavior is not yet stabilized
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
$da-vinci use intake for this existing product.
|
|
61
|
+
|
|
62
|
+
This is a broad overhaul, not only a UI refresh.
|
|
63
|
+
Current codebase is reference evidence and migration baseline, not the final target behavior truth.
|
|
64
|
+
We need to redefine flows, logic, page structure, and selected UI surfaces while preserving only the approved integrations, permissions, and constraints.
|
|
65
|
+
Recommend the best Da Vinci mode and generate the best executable next-step prompt.
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### 2. Breakdown / Spec Stabilization For `overhaul-from-code`
|
|
69
|
+
|
|
70
|
+
Use when:
|
|
71
|
+
|
|
72
|
+
- the mode is already clear
|
|
73
|
+
- you need to inventory the old system and define migration boundaries before design
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
$da-vinci use overhaul-from-code to inventory the current product, define preserve/revise/retire/unknown boundaries, and stabilize the new target requirements before broad design.
|
|
77
|
+
|
|
78
|
+
Current codebase is reference evidence and migration baseline, not the final target behavior truth.
|
|
79
|
+
Create or update:
|
|
80
|
+
- .da-vinci/project-inventory.md
|
|
81
|
+
- .da-vinci/changes/<change-id>/proposal.md
|
|
82
|
+
- .da-vinci/changes/<change-id>/migration-contract.md
|
|
83
|
+
- .da-vinci/changes/<change-id>/specs/
|
|
84
|
+
- .da-vinci/page-map.md
|
|
85
|
+
|
|
86
|
+
Do not start broad Pencil work until the new proposal, migration contract, target specs, and page map are stable enough to drive design.
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### 3. Design Handoff After Overhaul Specs Stabilize
|
|
90
|
+
|
|
91
|
+
Use when:
|
|
92
|
+
|
|
93
|
+
- `proposal.md`, `migration-contract.md`, target `specs/`, and `page-map.md` already exist
|
|
94
|
+
- you are ready to produce Pencil-backed overhaul pages
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
$da-vinci use overhaul-from-code to design the new target product surfaces from the approved overhaul artifacts.
|
|
98
|
+
|
|
99
|
+
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.
|
|
100
|
+
Treat the new proposal and specs as the target behavior truth.
|
|
101
|
+
Treat the old codebase only as reference evidence and migration baseline.
|
|
102
|
+
Design 1-3 anchor surfaces first, review screenshots, then expand.
|
|
103
|
+
Persist project-local Pencil files under .da-vinci/designs/.
|
|
104
|
+
Run the normal Pencil runtime gate and completion audit before terminal completion claims.
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### 4. Continue An Existing `overhaul-from-code` Workflow
|
|
108
|
+
|
|
109
|
+
Use when:
|
|
110
|
+
|
|
111
|
+
- the repo already has overhaul artifacts
|
|
112
|
+
- the workflow needs to resume from the current truth state
|
|
113
|
+
|
|
114
|
+
```text
|
|
115
|
+
$da-vinci use continue for this existing overhaul-from-code workflow.
|
|
116
|
+
|
|
117
|
+
Use the existing Da Vinci artifacts.
|
|
118
|
+
Detect whether the workflow should return to breakdown, continue with design, generate tasks, continue implementation, or verify drift.
|
|
119
|
+
Prefer the artifact-backed next safe stage instead of restarting the overhaul from scratch.
|
|
120
|
+
```
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Recommended when the product is a desktop-first tool or workspace.
|
|
4
4
|
|
|
5
|
+
These prompt variants are primarily for design-heavy `redesign-from-code` work after the workflow mode is already clear.
|
|
6
|
+
If the active mode is `overhaul-from-code`, first stabilize `proposal.md`, `migration-contract.md`, and target `specs/`, then adapt the relevant preset instead of treating it as a direct drop-in.
|
|
7
|
+
|
|
5
8
|
Pair with:
|
|
6
9
|
|
|
7
10
|
- `docs/visual-assist-presets/desktop-app.md`
|
|
@@ -16,9 +19,65 @@ Use this when the workflow needs:
|
|
|
16
19
|
|
|
17
20
|
- Use `Simple redesign` when the desktop surface is narrow, mostly single-workspace, or has limited state branching.
|
|
18
21
|
- Use `Complex redesign` when the product has multiple workspaces, side panels, overlays, inspectors, or materially different states.
|
|
22
|
+
- Use `Redesign with reference directory` when you have a local HTML or mockup directory that should guide desktop composition as a visual reference only.
|
|
19
23
|
- Use `Design-only` when you want the design chain and task readiness without code changes yet.
|
|
20
24
|
- Use `Continue` when the workflow already created artifacts and needs to resume.
|
|
21
25
|
|
|
26
|
+
## Overhaul From Code
|
|
27
|
+
|
|
28
|
+
Use these templates when the desktop product already exists, but workspace model, flow logic, navigation, or information architecture are being rewritten rather than only visually refreshed.
|
|
29
|
+
|
|
30
|
+
### Overhaul Intake
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
$da-vinci use intake for this existing desktop product.
|
|
34
|
+
|
|
35
|
+
This is a broad overhaul, not only a UI refresh.
|
|
36
|
+
Current desktop codebase is reference evidence and migration baseline, not the final target behavior truth.
|
|
37
|
+
We need to redefine flows, workspace structure, interaction model, and selected UI surfaces while preserving only approved integrations, permissions, and constraints.
|
|
38
|
+
Recommend the best Da Vinci mode and generate the best executable next-step prompt.
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Overhaul Breakdown
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
$da-vinci use overhaul-from-code to inventory the current desktop product, define preserve/revise/retire/unknown boundaries, and stabilize the new target requirements before broad design.
|
|
45
|
+
|
|
46
|
+
Current desktop codebase is reference evidence and migration baseline, not the final target behavior truth.
|
|
47
|
+
Create or update:
|
|
48
|
+
- .da-vinci/project-inventory.md
|
|
49
|
+
- .da-vinci/changes/<change-id>/proposal.md
|
|
50
|
+
- .da-vinci/changes/<change-id>/migration-contract.md
|
|
51
|
+
- .da-vinci/changes/<change-id>/specs/
|
|
52
|
+
- .da-vinci/page-map.md
|
|
53
|
+
|
|
54
|
+
Inventory workspaces, side panels, inspectors, dialogs, overlays, and materially different states before broad Pencil work.
|
|
55
|
+
Do not start broad Pencil work until the new proposal, migration contract, target specs, and page map are stable enough to drive design.
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Overhaul Design
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
$da-vinci use overhaul-from-code to design the new target desktop surfaces from the approved overhaul artifacts.
|
|
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.
|
|
64
|
+
Treat the new proposal and specs as the target behavior truth.
|
|
65
|
+
Treat the old desktop codebase only as reference evidence and migration baseline.
|
|
66
|
+
Design 1-3 anchor surfaces first, review screenshots, then expand.
|
|
67
|
+
Persist project-local Pencil files under .da-vinci/designs/.
|
|
68
|
+
Run the normal Pencil runtime gate and completion audit before terminal completion claims.
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Overhaul Continue
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
$da-vinci use continue for this existing overhaul-from-code desktop workflow.
|
|
75
|
+
|
|
76
|
+
Use the existing Da Vinci artifacts.
|
|
77
|
+
Detect whether the workflow should return to breakdown, continue with design, generate tasks, continue implementation, or verify drift.
|
|
78
|
+
Prefer the artifact-backed next safe stage instead of restarting the overhaul from scratch.
|
|
79
|
+
```
|
|
80
|
+
|
|
22
81
|
## Simple Redesign
|
|
23
82
|
|
|
24
83
|
```text
|
|
@@ -26,9 +85,11 @@ $da-vinci use redesign-from-code to redesign this existing desktop product.
|
|
|
26
85
|
|
|
27
86
|
Existing code is the behavior source of truth, not the layout truth.
|
|
28
87
|
Preserve current behavior, flows, integrations, and validation rules unless explicitly required otherwise.
|
|
88
|
+
Treat this as full-delivery unless explicitly changed.
|
|
89
|
+
Do not stop after discovery, anchor surfaces, phase summaries, or task generation; continue through tasks, build, and verify once the corresponding checkpoints pass.
|
|
29
90
|
Inventory the current workspaces, dialogs, overlays, and important states before Pencil work.
|
|
30
91
|
Use the Visual Assist preferences declared in DA-VINCI.md.
|
|
31
|
-
Before the first Pencil edit,
|
|
92
|
+
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.
|
|
32
93
|
If Pencil MCP is active, run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
|
|
33
94
|
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.
|
|
34
95
|
Do not pass design checkpoint if the result is just a boxed-up recolor of the old UI or if workspace hierarchy remains unclear.
|
|
@@ -42,6 +103,8 @@ $da-vinci use redesign-from-code to redesign this existing desktop product.
|
|
|
42
103
|
|
|
43
104
|
Existing code is the behavior source of truth, not the layout truth.
|
|
44
105
|
Preserve current behavior, flows, integrations, and validation rules unless explicitly required otherwise.
|
|
106
|
+
Treat this as full-delivery unless explicitly changed.
|
|
107
|
+
Do not stop after discovery, anchor surfaces, phase summaries, or task generation; continue through tasks, build, and verify once the corresponding checkpoints pass.
|
|
45
108
|
Inventory primary workspaces, side panels, inspectors, dialogs, settings flows, overlays, and materially different states before broad Pencil work.
|
|
46
109
|
Decompose complex screens into primary surfaces, secondary surfaces, overlays, and implementation surfaces.
|
|
47
110
|
Create the required discovery and design-source artifacts in their standard locations before the first anchor surface.
|
|
@@ -55,15 +118,48 @@ Before non-trivial `batch_design` calls, preflight the Pencil operations when sh
|
|
|
55
118
|
If the same anchor surface rolls back twice, switch to micro-batches of 6 or fewer operations until a clean schema-safe pass succeeds.
|
|
56
119
|
Run `da-vinci audit --mode integrity <project-path>` after the first successful Pencil write before broad expansion continues.
|
|
57
120
|
If Pencil MCP is active, run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
|
|
58
|
-
|
|
121
|
+
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.
|
|
59
122
|
Write exported screenshots under `.da-vinci/changes/<change-id>/exports/` only.
|
|
60
123
|
Record screenshot review with explicit `PASS` / `WARN` / `BLOCK`, issue list, and revision outcome; "looks good" is not enough.
|
|
124
|
+
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.
|
|
61
125
|
Do not report completion if the registered `.pen` source exists only in memory or only as exported PNGs.
|
|
62
126
|
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.
|
|
63
127
|
Do not pass design checkpoint if the result is a repeated placeholder scaffold, flat panel soup, or a recolor of the old desktop shell.
|
|
64
128
|
Persist project-local Pencil files under .da-vinci/designs/.
|
|
65
129
|
```
|
|
66
130
|
|
|
131
|
+
## Redesign With Reference Directory
|
|
132
|
+
|
|
133
|
+
```text
|
|
134
|
+
$da-vinci use redesign-from-code to redesign this existing desktop product.
|
|
135
|
+
|
|
136
|
+
Existing code is the behavior source of truth, not the layout truth.
|
|
137
|
+
Preserve current behavior, flows, integrations, and validation rules unless explicitly required otherwise.
|
|
138
|
+
Treat this as full-delivery unless explicitly changed.
|
|
139
|
+
Do not stop after discovery, anchor surfaces, phase summaries, or task generation; continue through tasks, build, and verify once the corresponding checkpoints pass.
|
|
140
|
+
|
|
141
|
+
Use <reference-directory> as the local HTML design-reference directory.
|
|
142
|
+
Treat that directory as visual reference material only, not as behavior truth, workspace truth, or final design-source truth.
|
|
143
|
+
Inventory which workspaces, side panels, inspectors, dialogs, overlays, and materially different states are covered by the reference directory and which are not before broad Pencil work begins.
|
|
144
|
+
For uncovered states or surfaces, derive the design from the approved anchor surfaces, the project visual contract, and the existing behavior truth.
|
|
145
|
+
|
|
146
|
+
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.
|
|
147
|
+
Do not review the initial unhydrated or partially rendered state.
|
|
148
|
+
If a reference screen visibly changes after load, use the settled state as the visual reference baseline and record that delayed settling was required.
|
|
149
|
+
|
|
150
|
+
Use the HTML reference screens only as composition and styling input where they are relevant and stable.
|
|
151
|
+
Do not mechanically clone them when they conflict with behavior truth, missing states, or implementation reality.
|
|
152
|
+
|
|
153
|
+
Design 1-3 anchor surfaces first, review screenshots, then expand.
|
|
154
|
+
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.
|
|
155
|
+
|
|
156
|
+
Before non-trivial `batch_design` calls, preflight the Pencil operations when shell access is available.
|
|
157
|
+
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.
|
|
158
|
+
Run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
|
|
159
|
+
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.
|
|
160
|
+
Persist project-local Pencil files under .da-vinci/designs/.
|
|
161
|
+
```
|
|
162
|
+
|
|
67
163
|
## Design-Only
|
|
68
164
|
|
|
69
165
|
```text
|
|
@@ -71,12 +167,14 @@ $da-vinci use redesign-from-code to redesign this existing desktop product.
|
|
|
71
167
|
|
|
72
168
|
Existing code is the behavior source of truth, not the layout truth.
|
|
73
169
|
Preserve current behavior, flows, and integrations.
|
|
170
|
+
Treat this as design-only, not full-delivery.
|
|
74
171
|
Inventory workspaces, side panels, dialogs, overlays, and important states.
|
|
75
172
|
Decompose complex screens into real design surfaces before Pencil work.
|
|
76
173
|
Use the Visual Assist preferences declared in DA-VINCI.md.
|
|
77
174
|
If the product is complex, design 1-3 anchor surfaces first, review screenshots, then expand.
|
|
78
|
-
Stop after DA-VINCI.md, design-registry.md, page-map.md, proposal.md, specs, design.md, pencil-design.md, pencil-bindings.md
|
|
79
|
-
|
|
175
|
+
Stop after DA-VINCI.md, design-registry.md, page-map.md, proposal.md, specs, design.md, pencil-design.md, and pencil-bindings.md.
|
|
176
|
+
Do not generate `tasks.md` unless the user explicitly changes the delivery intent beyond design-only.
|
|
177
|
+
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.
|
|
80
178
|
If Pencil MCP is active, run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
|
|
81
179
|
Before reporting `design complete`, require both the MCP runtime gate and `da-vinci audit --mode completion --change <change-id> <project-path>` to pass.
|
|
82
180
|
Do not start code changes yet.
|
|
@@ -89,7 +187,7 @@ $da-vinci use continue for this existing desktop-product redesign workflow.
|
|
|
89
187
|
|
|
90
188
|
Use the existing Da Vinci artifacts in this project.
|
|
91
189
|
Do not restart discovery unless an artifact is missing or clearly wrong.
|
|
92
|
-
Keep the registered project-local Pencil source under .da-vinci/designs/ as the design source of truth.
|
|
190
|
+
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.
|
|
93
191
|
If the redesign is complex, continue from the approved anchor surfaces instead of restarting broad scaffolding.
|
|
94
192
|
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`.
|
|
95
193
|
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.
|