@xenonbyte/da-vinci-workflow 0.1.18 → 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 +15 -0
- package/README.md +42 -4
- package/README.zh-CN.md +44 -6
- package/SKILL.md +7 -3
- package/commands/claude/dv/design.md +3 -2
- package/commands/codex/prompts/dv-design.md +3 -2
- package/commands/gemini/dv/design.toml +3 -2
- package/docs/codex-natural-language-usage.md +2 -0
- package/docs/dv-command-reference.md +1 -0
- package/docs/mode-use-cases.md +4 -4
- package/docs/pencil-rendering-workflow.md +63 -15
- package/docs/prompt-entrypoints.md +4 -1
- package/docs/prompt-presets/README.md +5 -4
- package/docs/prompt-presets/desktop-app.md +47 -7
- package/docs/prompt-presets/mobile-app.md +47 -7
- package/docs/prompt-presets/tablet-app.md +47 -7
- package/docs/prompt-presets/web-app.md +47 -7
- package/docs/visual-adapters.md +179 -1
- 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 +6 -3
- package/docs/workflow-overview.md +12 -0
- package/docs/zh-CN/codex-natural-language-usage.md +2 -0
- package/docs/zh-CN/dv-command-reference.md +1 -0
- package/docs/zh-CN/mode-use-cases.md +5 -5
- package/docs/zh-CN/pencil-rendering-workflow.md +63 -15
- package/docs/zh-CN/prompt-entrypoints.md +6 -1
- package/docs/zh-CN/prompt-presets/README.md +5 -4
- package/docs/zh-CN/prompt-presets/desktop-app.md +47 -7
- package/docs/zh-CN/prompt-presets/mobile-app.md +47 -7
- package/docs/zh-CN/prompt-presets/tablet-app.md +47 -7
- package/docs/zh-CN/prompt-presets/web-app.md +47 -7
- package/docs/zh-CN/visual-adapters.md +179 -1
- 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 +6 -3
- package/docs/zh-CN/workflow-overview.md +12 -0
- package/lib/audit.js +199 -0
- package/lib/pencil-lock.js +15 -4
- package/package.json +3 -1
- package/references/artifact-templates.md +19 -0
- package/references/checkpoints.md +28 -19
- package/references/modes.md +2 -2
- package/references/pencil-design-to-code.md +3 -3
- package/references/prompt-recipes.md +7 -2
- package/scripts/test-audit-design-supervisor.js +348 -0
- package/scripts/test-mode-consistency.js +134 -0
- package/scripts/test-pencil-lock.js +130 -0
|
@@ -9,7 +9,15 @@ Use this when the UI needs:
|
|
|
9
9
|
- stronger marketing-to-product bridge than a pure desktop tool
|
|
10
10
|
- responsive layout judgment
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Choose one of these `DA-VINCI.md` blocks.
|
|
13
|
+
|
|
14
|
+
### Variant 1: Adapter-Only
|
|
15
|
+
|
|
16
|
+
Use when:
|
|
17
|
+
|
|
18
|
+
- the product wants stronger responsive workspace composition
|
|
19
|
+
- no separate reviewer role is required
|
|
20
|
+
- normal structural gates are sufficient
|
|
13
21
|
|
|
14
22
|
```md
|
|
15
23
|
## Visual Assist
|
|
@@ -29,10 +37,88 @@ Recommended `DA-VINCI.md` block:
|
|
|
29
37
|
- false
|
|
30
38
|
```
|
|
31
39
|
|
|
32
|
-
|
|
40
|
+
### Variant 2: Advisory Supervisor Review
|
|
41
|
+
|
|
42
|
+
Use when:
|
|
43
|
+
|
|
44
|
+
- the project wants a final web style-quality readout
|
|
45
|
+
- the reviewer outcome should be recorded but not block completion by default
|
|
46
|
+
|
|
47
|
+
```md
|
|
48
|
+
## Visual Assist
|
|
49
|
+
- Preferred adapters:
|
|
50
|
+
- ui-ux-pro-max
|
|
51
|
+
- frontend-skill
|
|
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
|
|
63
|
+
- Scope:
|
|
64
|
+
- visual contract refinement
|
|
65
|
+
- page composition
|
|
66
|
+
- hierarchy and spacing
|
|
67
|
+
- responsive motion guidance
|
|
68
|
+
- anchor-surface composition
|
|
69
|
+
- Pencil design refinement
|
|
70
|
+
- Fallback:
|
|
71
|
+
- native-da-vinci
|
|
72
|
+
- Require Adapter:
|
|
73
|
+
- false
|
|
74
|
+
- Require Supervisor Review:
|
|
75
|
+
- false
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Variant 3: Required Supervisor Signoff
|
|
79
|
+
|
|
80
|
+
Use when:
|
|
81
|
+
|
|
82
|
+
- the web product is brand-critical or highly visible
|
|
83
|
+
- style quality must be signed off before expansion or implementation
|
|
84
|
+
- weak generic SaaS output would invalidate the redesign
|
|
85
|
+
|
|
86
|
+
```md
|
|
87
|
+
## Visual Assist
|
|
88
|
+
- Preferred adapters:
|
|
89
|
+
- frontend-skill
|
|
90
|
+
- ui-ux-pro-max
|
|
91
|
+
- Design-supervisor reviewers:
|
|
92
|
+
- frontend-skill
|
|
93
|
+
- ui-ux-pro-max
|
|
94
|
+
- Design-supervisor review mode:
|
|
95
|
+
- screenshot-and-theme
|
|
96
|
+
- Design-supervisor review inputs:
|
|
97
|
+
- screenshots
|
|
98
|
+
- pencil variables
|
|
99
|
+
- visual thesis
|
|
100
|
+
- content plan
|
|
101
|
+
- interaction thesis
|
|
102
|
+
- Scope:
|
|
103
|
+
- visual contract refinement
|
|
104
|
+
- page composition
|
|
105
|
+
- hierarchy and spacing
|
|
106
|
+
- responsive motion guidance
|
|
107
|
+
- anchor-surface composition
|
|
108
|
+
- Pencil design refinement
|
|
109
|
+
- Fallback:
|
|
110
|
+
- native-da-vinci
|
|
111
|
+
- Require Adapter:
|
|
112
|
+
- true
|
|
113
|
+
- Require Supervisor Review:
|
|
114
|
+
- true
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Notes for all variants:
|
|
33
118
|
|
|
34
119
|
- keep `ui-ux-pro-max` first for product surfaces, dashboards, and operational UI
|
|
35
120
|
- replace adapter names with the actual installed names for the current environment when they differ
|
|
121
|
+
- keep `Design-supervisor reviewers` separate from `Preferred adapters`; reviewers judge the final web style quality after the structural gates pass
|
|
36
122
|
- if the project is more brand-led than tool-led, swap the order and put `frontend-skill` first
|
|
37
123
|
- do not let responsive polish erase product clarity
|
|
38
124
|
- if the output feels like generic SaaS filler, switch `frontend-skill` to first and tighten the visual direction in `DA-VINCI.md`
|
|
@@ -84,8 +84,8 @@ Expected flow:
|
|
|
84
84
|
8. create new or updated Pencil pages from fresh composition rather than a recolor of the old UI, preferring persistence under `.da-vinci/designs/`
|
|
85
85
|
9. preflight non-trivial `batch_design` operation strings before sending them to Pencil, and keep anchor-surface batches small
|
|
86
86
|
10. if the same anchor surface rolls back twice, switch to micro-batches of 6 or fewer operations until a clean schema-safe pass succeeds
|
|
87
|
-
11.
|
|
88
|
-
12. during live design work,
|
|
87
|
+
11. 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
|
|
88
|
+
12. 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 ...`
|
|
89
89
|
13. verify the registered project-local `.pen` path becomes shell-visible immediately after the first successful Pencil write
|
|
90
90
|
14. run `da-vinci audit --mode integrity <project-path>` immediately after that first successful write
|
|
91
91
|
15. if Pencil MCP is active, run the MCP runtime gate and record it in `pencil-design.md`
|
|
@@ -103,6 +103,8 @@ Expected flow:
|
|
|
103
103
|
$da-vinci use redesign-from-code to redesign this existing Android app.
|
|
104
104
|
|
|
105
105
|
Existing code is the behavior source of truth, not the layout truth.
|
|
106
|
+
Treat this as full-delivery unless explicitly changed.
|
|
107
|
+
Do not stop after anchor-surface summaries, phase summaries, or tasks.md once the corresponding checkpoints pass.
|
|
106
108
|
Inventory activities, fragments, tabs, dialogs, bottom sheets, nested flows, and important states.
|
|
107
109
|
Decompose complex screens into separate design surfaces before Pencil work.
|
|
108
110
|
Use frontend-skill explicitly as the primary visual reasoning source.
|
|
@@ -116,7 +118,7 @@ Do not treat screenshot analysis as an automatic pass if it reports hierarchy, s
|
|
|
116
118
|
Before non-trivial `batch_design` calls, preflight the Pencil operations when shell access is available.
|
|
117
119
|
If the same anchor surface rolls back twice, switch to micro-batches of 6 or fewer operations until a clean schema-safe pass succeeds.
|
|
118
120
|
Use only Pencil-supported properties; do not use web-only props like flex or margin.
|
|
119
|
-
|
|
121
|
+
Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit.
|
|
120
122
|
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`.
|
|
121
123
|
Verify the registered project-local `.pen` file exists as a shell-visible file after the first Pencil write.
|
|
122
124
|
Run `da-vinci audit --mode integrity <project-path>` after that first successful Pencil write before broad expansion continues.
|
|
@@ -214,6 +216,7 @@ $da-vinci use intake for this existing Android project.
|
|
|
214
216
|
I need to globally replace the UI.
|
|
215
217
|
Existing code is the behavior source of truth.
|
|
216
218
|
HTML references are in /abs/path/to/mockups.
|
|
219
|
+
Treat this as full-delivery unless I explicitly narrow it to design-only.
|
|
217
220
|
```
|
|
218
221
|
|
|
219
222
|
When the project already has artifacts and needs to resume:
|
|
@@ -117,6 +117,7 @@ Anchor surfaces must:
|
|
|
117
117
|
- go through screenshot review
|
|
118
118
|
- satisfy the active form-factor layout-hygiene profile
|
|
119
119
|
- pass the design checkpoint before broad expansion
|
|
120
|
+
- run `design-supervisor review` when `DA-VINCI.md` configures `Design-supervisor reviewers`, and treat it as blocking only when `Require Supervisor Review: true`
|
|
120
121
|
|
|
121
122
|
After anchor approval, the workflow extracts shared primitives before broad page expansion.
|
|
122
123
|
|
|
@@ -174,6 +175,17 @@ Blocks:
|
|
|
174
175
|
- weak visual anchors
|
|
175
176
|
- ignored screenshot-review findings
|
|
176
177
|
|
|
178
|
+
### Design-Supervisor Review
|
|
179
|
+
|
|
180
|
+
When configured in `DA-VINCI.md`, this is the final style-quality gate after screenshot review, layout hygiene, and design checkpoint.
|
|
181
|
+
|
|
182
|
+
It checks:
|
|
183
|
+
|
|
184
|
+
- brand distinctiveness
|
|
185
|
+
- cross-screen coherence
|
|
186
|
+
- token-to-render alignment
|
|
187
|
+
- whether the approved anchors are visually strong enough to expand or implement from
|
|
188
|
+
|
|
177
189
|
### Design-Source Checkpoint
|
|
178
190
|
|
|
179
191
|
Confirms:
|
|
@@ -136,6 +136,8 @@ I need to globally replace the UI.
|
|
|
136
136
|
Existing Android code is the behavior source of truth.
|
|
137
137
|
UI reference directory: /abs/path/to/mockups
|
|
138
138
|
Treat the HTML files there as presentation references only, not behavior truth.
|
|
139
|
+
Open the HTML references in a real browser and wait 3-5 seconds, or until the visual state settles, before judging the final styling.
|
|
140
|
+
Inventory which pages and states the reference directory actually covers and which still need to be inferred from behavior truth.
|
|
139
141
|
Preserve business logic, navigation, permissions, integrations, validations, and state transitions unless explicitly required otherwise.
|
|
140
142
|
Inspect the real codebase first and determine whether the UI stack is Jetpack Compose, XML, or mixed.
|
|
141
143
|
Inventory all activities, fragments, composable destinations, nav graphs, dialogs, bottom sheets, tabs, nested flows, shared shells, subpages, and important states.
|
|
@@ -54,7 +54,7 @@ project/
|
|
|
54
54
|
|
|
55
55
|
4. `overhaul-from-code`
|
|
56
56
|
- 现有项目
|
|
57
|
-
-
|
|
57
|
+
- 当前代码是参考证据和迁移基线
|
|
58
58
|
- 流程、逻辑、信息架构或 UI 都要被大范围重写
|
|
59
59
|
|
|
60
60
|
5. `feature-change`
|
|
@@ -176,7 +176,7 @@ Da Vinci 应该:
|
|
|
176
176
|
- `design-registry.md` 里的首选 `.pen` 路径由工作流自动维护,不应该依赖用户手工填写
|
|
177
177
|
- 不要因为当前 Pencil 里正好打开了一个文档,就直接在那个文档上继续做重设计
|
|
178
178
|
- 不要把 interactive `save()` 当作可靠的持久化真相;应先 seed 项目内 `.pen`,然后从当前 MCP 可读快照重建并覆盖它,并通过 `da-vinci check-pen-sync` 做同步校验
|
|
179
|
-
- 如果支持 CLI
|
|
179
|
+
- 如果支持 CLI,自治运行必须走 `da-vinci pencil-session begin / persist / end`,不要再手拼 `ensure-pen + write-pen + lock`
|
|
180
180
|
- 如果 Pencil MCP 没有自动把登记路径的 `.pen` 文件落到磁盘,就应该先补写这个项目内文件,再把 mapping 或 implementation 视为完成
|
|
181
181
|
- `.da-vinci/designs/` 应该只作为 `.pen` 目录使用,不应该混入 inventory、proposal 之类的 markdown
|
|
182
182
|
- 截图 PNG 只是审查产物,不能替代登记好的 `.pen` 设计源
|
|
@@ -188,7 +188,7 @@ Da Vinci 应该:
|
|
|
188
188
|
|
|
189
189
|
- 已有产品,但不是单纯换 UI
|
|
190
190
|
- 旧系统里有一部分逻辑、流程或结构需要被整体重写
|
|
191
|
-
-
|
|
191
|
+
- 现有代码是参考证据和迁移基线,不是新系统最终行为真相
|
|
192
192
|
|
|
193
193
|
Da Vinci 应该:
|
|
194
194
|
|
|
@@ -218,7 +218,7 @@ Da Vinci 应该:
|
|
|
218
218
|
它和 `redesign-from-code` 的区别:
|
|
219
219
|
|
|
220
220
|
- `redesign-from-code` 默认保留旧代码行为真相
|
|
221
|
-
- `overhaul-from-code`
|
|
221
|
+
- `overhaul-from-code` 默认把旧代码当成参考证据和迁移基线
|
|
222
222
|
- `redesign-from-code` 更偏向广泛 UI 重设计
|
|
223
223
|
- `overhaul-from-code` 更偏向存量系统上的产品级重构
|
|
224
224
|
|
|
@@ -236,7 +236,7 @@ Da Vinci 应该:
|
|
|
236
236
|
4. 复用或更新 `design-registry.md`
|
|
237
237
|
- 如果已有项目内 `.pen` 文件,优先登记 `.da-vinci/designs/` 下的路径
|
|
238
238
|
5. 生成 `pencil-design.md` 增量
|
|
239
|
-
-
|
|
239
|
+
- 必须通过 `da-vinci pencil-session begin` 开始这轮设计,让登记路径先 seed 好并拿到锁
|
|
240
240
|
- 如果项目里原本已有 `.pen`,继续设计时先打开它,但发生实质性 live edit 后优先通过 `da-vinci pencil-session persist` 把当前 MCP 快照重新覆盖写回同一路径
|
|
241
241
|
6. 更新 `pencil-bindings.md`
|
|
242
242
|
7. 生成 `tasks.md`
|
|
@@ -28,7 +28,7 @@ PNG 只是审查产物,不是设计真相源。
|
|
|
28
28
|
|
|
29
29
|
## 会话模型
|
|
30
30
|
|
|
31
|
-
Da Vinci
|
|
31
|
+
Da Vinci 现在要求自治运行使用这组 session wrapper:
|
|
32
32
|
|
|
33
33
|
- `da-vinci pencil-session begin`
|
|
34
34
|
- `da-vinci pencil-session persist`
|
|
@@ -40,6 +40,8 @@ Da Vinci 现在优先使用这组 session wrapper:
|
|
|
40
40
|
- 串行化的 Pencil MCP 写权限
|
|
41
41
|
- 明确的 live-to-disk 持久化和同步校验
|
|
42
42
|
|
|
43
|
+
如果 `DA-VINCI.md` 配置了 `Design-supervisor reviewers`,Da Vinci 还会在结构性设计 gate 通过后运行一层最终风格质量审查。只有同时设置 `Require Supervisor Review: true` 时,它才是阻断性的硬门槛。
|
|
44
|
+
|
|
43
45
|
## 首次运行路径
|
|
44
46
|
|
|
45
47
|
如果项目里还没有登记好的 `.pen`:
|
|
@@ -91,7 +93,7 @@ Pencil MCP 的写操作通过全局锁串行化。
|
|
|
91
93
|
- `da-vinci pencil-lock acquire`
|
|
92
94
|
- `da-vinci pencil-lock release`
|
|
93
95
|
|
|
94
|
-
|
|
96
|
+
或者直接使用 session wrapper,让它自动管理锁。
|
|
95
97
|
|
|
96
98
|
这套锁的目的,是防止多个项目抢同一个 active editor。
|
|
97
99
|
|
|
@@ -143,6 +145,41 @@ Pencil MCP 的写操作通过全局锁串行化。
|
|
|
143
145
|
- 忽略 screenshot review 里的问题
|
|
144
146
|
- 仍然有明显 schema 不稳定
|
|
145
147
|
|
|
148
|
+
### Design-Supervisor Review
|
|
149
|
+
|
|
150
|
+
如果 `DA-VINCI.md` 配置了 `Design-supervisor reviewers`,就在 screenshot review、layout hygiene 和 design checkpoint 之后,对当前已批准的 anchor 集合再做一层 `design-supervisor review`。
|
|
151
|
+
|
|
152
|
+
如果 `Require Supervisor Review: true`,那么缺失、`BLOCK`、或未被接受的 `WARN` 都会阻断后续扩屏、实现交接和终态完成。若 `Require Supervisor Review: false`,则在配置了 reviewers 时仍应记录这层 review,但它是建议性的,不直接阻断 completion。
|
|
153
|
+
|
|
154
|
+
它主要判断:
|
|
155
|
+
|
|
156
|
+
- 风格质量
|
|
157
|
+
- 品牌感和识别度
|
|
158
|
+
- 多个 anchor 之间的视觉一致性
|
|
159
|
+
- token/theme 与最终画面的匹配程度
|
|
160
|
+
- 当前 anchor 是否足够成熟,能继续扩屏或进入实现规划
|
|
161
|
+
|
|
162
|
+
reviewers 和 `Preferred adapters` 是两套职责:
|
|
163
|
+
|
|
164
|
+
- adapters 负责引导设计生成
|
|
165
|
+
- reviewers 负责判断最终结果是否够格
|
|
166
|
+
|
|
167
|
+
建议输入:
|
|
168
|
+
|
|
169
|
+
- reviewed screenshots
|
|
170
|
+
- Pencil `get_variables()` 输出
|
|
171
|
+
- `visual-thesis.md`
|
|
172
|
+
- `content-plan.md`
|
|
173
|
+
- `interaction-thesis.md`
|
|
174
|
+
|
|
175
|
+
记录内容:
|
|
176
|
+
|
|
177
|
+
- reviewer 名称
|
|
178
|
+
- review inputs
|
|
179
|
+
- `PASS` / `WARN` / `BLOCK`
|
|
180
|
+
- issue list
|
|
181
|
+
- revision outcome
|
|
182
|
+
|
|
146
183
|
## 设计源门禁
|
|
147
184
|
|
|
148
185
|
active Pencil 工作一旦存在,就要跑 `design-source checkpoint`。
|
|
@@ -200,8 +237,10 @@ da-vinci audit --mode completion --change <change-id> <project-path>
|
|
|
200
237
|
2. Pencil MCP 编辑
|
|
201
238
|
3. `da-vinci pencil-session persist --project <project-path> --pen <path> --nodes-file <nodes.json> --variables-file <vars.json> --version <version>`
|
|
202
239
|
4. screenshot review + layout hygiene
|
|
203
|
-
5.
|
|
204
|
-
6.
|
|
240
|
+
5. design checkpoint
|
|
241
|
+
6. 如果配置了,就执行 design-supervisor review
|
|
242
|
+
7. `da-vinci pencil-session end --project <project-path> --pen <path> --nodes-file <nodes.json> --variables-file <vars.json> --version <version>`
|
|
243
|
+
8. `da-vinci audit --mode completion --change <change-id> <project-path>`
|
|
205
244
|
|
|
206
245
|
## 流程图
|
|
207
246
|
|
|
@@ -219,15 +258,24 @@ flowchart TD
|
|
|
219
258
|
H --> F
|
|
220
259
|
I --> J{Screenshot review 与 layout hygiene 通过?}
|
|
221
260
|
J -- 否 --> F
|
|
222
|
-
J -- 是 --> K
|
|
223
|
-
K
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
O --> P
|
|
230
|
-
P
|
|
231
|
-
|
|
232
|
-
Q
|
|
261
|
+
J -- 是 --> K{design checkpoint 通过?}
|
|
262
|
+
K -- 否 --> F
|
|
263
|
+
K -- 是 --> L{是否配置了 design-supervisor review?}
|
|
264
|
+
L -- 是 --> M[执行 design-supervisor review,结合 screenshots 与 theme inputs]
|
|
265
|
+
L -- 否 --> N[pencil-session persist 把 live MCP 快照写回 .pen]
|
|
266
|
+
M --> O{是否要求 Supervisor Review?}
|
|
267
|
+
O -- 否 --> N
|
|
268
|
+
O -- 是 --> P{review 为 PASS 或已接受 WARN?}
|
|
269
|
+
P -- 否 --> F
|
|
270
|
+
P -- 是 --> N
|
|
271
|
+
N --> Q[check-pen-sync 校验 live hash 与 persisted hash 一致]
|
|
272
|
+
Q --> R{design-source checkpoint 和 runtime gate 通过?}
|
|
273
|
+
R -- 否 --> F
|
|
274
|
+
R -- 是 --> S{是否还要继续设计?}
|
|
275
|
+
S -- 是 --> E
|
|
276
|
+
S -- 否 --> T[pencil-session end 释放锁]
|
|
277
|
+
T --> U[completion audit]
|
|
278
|
+
U --> V{completion audit 通过?}
|
|
279
|
+
V -- 否 --> F
|
|
280
|
+
V -- 是 --> W[design complete]
|
|
233
281
|
```
|
|
@@ -118,6 +118,9 @@ $da-vinci use intake for this existing Android project.
|
|
|
118
118
|
I need to globally replace the UI.
|
|
119
119
|
Existing code is the behavior source of truth.
|
|
120
120
|
HTML references are in /abs/path/to/mockups.
|
|
121
|
+
Treat the HTML directory as visual reference only, not behavior truth or final design-source truth.
|
|
122
|
+
Open the HTML references in a real browser and wait 3-5 seconds, or until the visual state settles, before judging the final styling.
|
|
123
|
+
Inventory which pages and states the HTML directory actually covers and which still need to be inferred from behavior truth.
|
|
121
124
|
```
|
|
122
125
|
|
|
123
126
|
预期输出:
|
|
@@ -126,6 +129,8 @@ HTML references are in /abs/path/to/mockups.
|
|
|
126
129
|
- 一条主执行提示词
|
|
127
130
|
- 一条更保守的 planning-first 版本
|
|
128
131
|
- 一条后续 continue 提示词
|
|
132
|
+
- 主执行提示词应在用户未明确要求 `design-only` 时,把 `full-delivery` 写清楚
|
|
133
|
+
- 主执行提示词不应允许流程停在 anchor-surface 总结或 `tasks.md`
|
|
129
134
|
|
|
130
135
|
## 示例:现有产品但流程和逻辑也要一起重做
|
|
131
136
|
|
|
@@ -133,7 +138,7 @@ HTML references are in /abs/path/to/mockups.
|
|
|
133
138
|
$da-vinci use intake for this existing product.
|
|
134
139
|
|
|
135
140
|
This is a large overhaul, not only a UI refresh.
|
|
136
|
-
Current codebase is
|
|
141
|
+
Current codebase is reference evidence and migration baseline, not the final target behavior truth.
|
|
137
142
|
We need to redefine flows, logic, and page structure while preserving selected integrations and constraints.
|
|
138
143
|
Generate the best executable Da Vinci workflow prompt for the next step.
|
|
139
144
|
```
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
4. 两者一起放进工作流设置
|
|
18
18
|
5. 只有在项目存在特殊真相源或平台约束时,再继续收紧提示词
|
|
19
19
|
6. 如果 Pencil MCP 可用,优先使用已经明确要求 MCP runtime gate 和 completion audit 的那版 redesign 提示词
|
|
20
|
-
7.
|
|
20
|
+
7. 如果项目要在自治运行里把 `.pen` 真正持久化到本地,必须使用要求 `da-vinci pencil-session begin / persist / end` 的提示词;只有 wrapper 确实不可用时再退回 `ensure-pen + write-pen + check-pen-sync`
|
|
21
21
|
|
|
22
22
|
可用模板:
|
|
23
23
|
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
|
|
39
39
|
- `Simple redesign`
|
|
40
40
|
- `Complex redesign`
|
|
41
|
+
- `Redesign with reference directory`
|
|
41
42
|
- `Design-only`
|
|
42
43
|
- `Continue`
|
|
43
44
|
|
|
@@ -45,7 +46,7 @@
|
|
|
45
46
|
|
|
46
47
|
这组模板不是按 surface 划分的 redesign 预设。
|
|
47
48
|
|
|
48
|
-
|
|
49
|
+
它们用于:项目已经存在,但目标流程或逻辑要重写,旧代码只能作为参考证据和迁移基线,不能再默认当成最终行为真相。
|
|
49
50
|
|
|
50
51
|
### 1. 进入大改版的 intake 提示词
|
|
51
52
|
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
$da-vinci use intake for this existing product.
|
|
60
61
|
|
|
61
62
|
This is a broad overhaul, not only a UI refresh.
|
|
62
|
-
Current codebase is
|
|
63
|
+
Current codebase is reference evidence and migration baseline, not the final target behavior truth.
|
|
63
64
|
We need to redefine flows, logic, page structure, and selected UI surfaces while preserving only the approved integrations, permissions, and constraints.
|
|
64
65
|
Recommend the best Da Vinci mode and generate the best executable next-step prompt.
|
|
65
66
|
```
|
|
@@ -97,7 +98,7 @@ $da-vinci use overhaul-from-code to design the new target product surfaces from
|
|
|
97
98
|
|
|
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.
|
|
99
100
|
Treat the new proposal and specs as the target behavior truth.
|
|
100
|
-
Treat the old codebase only as reference evidence and migration
|
|
101
|
+
Treat the old codebase only as reference evidence and migration baseline.
|
|
101
102
|
Design 1-3 anchor surfaces first, review screenshots, then expand.
|
|
102
103
|
Persist project-local Pencil files under .da-vinci/designs/.
|
|
103
104
|
Run the normal Pencil runtime gate and completion audit before terminal completion claims.
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
- `Simple redesign` 适合 workspace 不多、状态分支有限、结构相对收敛的项目。
|
|
21
21
|
- `Complex redesign` 适合多工作区、多侧栏、多 inspector、多 overlays、状态变化明显的项目。
|
|
22
|
+
- `Redesign with reference directory` 适合你手里有本地 HTML 或设计参考目录,但这些文件只能作为桌面视觉参考、不能当行为真相的项目。
|
|
22
23
|
- `Design-only` 适合先把设计链路和绑定做完,但暂时不改代码。
|
|
23
24
|
- `Continue` 适合已经有 `.da-vinci/` 工件,需要继续推进的项目。
|
|
24
25
|
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
$da-vinci use intake for this existing desktop product.
|
|
33
34
|
|
|
34
35
|
This is a broad overhaul, not only a UI refresh.
|
|
35
|
-
Current desktop codebase is
|
|
36
|
+
Current desktop codebase is reference evidence and migration baseline, not the final target behavior truth.
|
|
36
37
|
We need to redefine flows, workspace structure, interaction model, and selected UI 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 desktop surfaces from
|
|
|
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 desktop codebase only as reference evidence and migration
|
|
65
|
+
Treat the old desktop 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.
|
|
@@ -84,9 +85,11 @@ $da-vinci use redesign-from-code to redesign this existing desktop product.
|
|
|
84
85
|
|
|
85
86
|
Existing code is the behavior source of truth, not the layout truth.
|
|
86
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.
|
|
87
90
|
Inventory the current workspaces, dialogs, overlays, and important states before Pencil work.
|
|
88
91
|
Use the Visual Assist preferences declared in DA-VINCI.md.
|
|
89
|
-
在第一次 Pencil
|
|
92
|
+
在第一次 Pencil 编辑前,必须执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`,让登记好的项目内 `.pen` 先完成 seed 并持有全局 Pencil 锁;只有 session wrapper 不可用时,再退回 `da-vinci ensure-pen --output <path> --verify-open`。
|
|
90
93
|
如果 Pencil MCP 可用,在第一次成功写入 Pencil 后运行 MCP runtime gate,并把结果记录到 `pencil-design.md`。
|
|
91
94
|
在声明 `design complete` 或 `workflow complete` 之前,必须同时通过 MCP runtime gate 和 `da-vinci audit --mode completion --change <change-id> <project-path>`。
|
|
92
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.
|
|
@@ -100,6 +103,8 @@ $da-vinci use redesign-from-code to redesign this existing desktop product.
|
|
|
100
103
|
|
|
101
104
|
Existing code is the behavior source of truth, not the layout truth.
|
|
102
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.
|
|
103
108
|
Inventory primary workspaces, side panels, inspectors, dialogs, settings flows, overlays, and materially different states before broad Pencil work.
|
|
104
109
|
Decompose complex screens into primary surfaces, secondary surfaces, overlays, and implementation surfaces.
|
|
105
110
|
在开始第一个 anchor surface 之前,先把 discovery 和 design-source 工件写到标准路径。
|
|
@@ -113,15 +118,48 @@ Design 1-3 anchor surfaces first, review screenshots, then expand.
|
|
|
113
118
|
如果同一个 anchor surface 连续两次回滚,就切到每批不超过 6 个操作的微批次,直到拿到干净的 schema-safe pass。
|
|
114
119
|
在第一次成功写入 Pencil 后、继续大范围扩展前,先运行 `da-vinci audit --mode integrity <project-path>`。
|
|
115
120
|
如果 Pencil MCP 可用,在第一次成功写入 Pencil 后运行 MCP runtime gate,并把结果记录到 `pencil-design.md`。
|
|
116
|
-
在第一次 Pencil
|
|
121
|
+
在第一次 Pencil 编辑前,必须执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`;发生实质性 live edit 后,必须执行 `da-vinci pencil-session persist --project <project-path> --pen <path> ...`。只有 session wrapper 不可用时,才退回 `ensure-pen + write-pen + check-pen-sync` 这条底层链路。
|
|
117
122
|
截图导出只能写到 `.da-vinci/changes/<change-id>/exports/`,不能写进 `.da-vinci/designs/`。
|
|
118
123
|
截图审查必须记录明确的 `PASS` / `WARN` / `BLOCK`、问题列表和是否回改;“看起来很好”不算审查记录。
|
|
124
|
+
如果 `DA-VINCI.md` 配置了 `Design-supervisor reviewers`,就在 screenshot review、layout hygiene 和 design checkpoint 之后再做 `design-supervisor review`,输入要同时包含 screenshots、Pencil variables 和设计 thesis。若 `Require Supervisor Review: true`,那么缺失、`BLOCK`、或未被接受的 review 结果都要视为阻断。
|
|
119
125
|
如果登记的 `.pen` 设计源只存在于内存中,或只剩下导出的 PNG,就不能宣布完成。
|
|
120
126
|
在声明 `design complete` 或 `workflow complete` 之前,必须同时通过 MCP runtime gate 和 `da-vinci audit --mode completion --change <change-id> <project-path>`。
|
|
121
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.
|
|
122
128
|
Persist project-local Pencil files under .da-vinci/designs/.
|
|
123
129
|
```
|
|
124
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
|
+
Before broad Pencil work begins, inventory which workspaces, side panels, inspectors, dialogs, overlays, and materially different states are covered by the reference directory and which are not.
|
|
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
|
+
|
|
125
163
|
## Design-Only
|
|
126
164
|
|
|
127
165
|
```text
|
|
@@ -129,12 +167,14 @@ $da-vinci use redesign-from-code to redesign this existing desktop product.
|
|
|
129
167
|
|
|
130
168
|
Existing code is the behavior source of truth, not the layout truth.
|
|
131
169
|
Preserve current behavior, flows, and integrations.
|
|
170
|
+
Treat this as design-only, not full-delivery.
|
|
132
171
|
Inventory workspaces, side panels, dialogs, overlays, and important states.
|
|
133
172
|
Decompose complex screens into real design surfaces before Pencil work.
|
|
134
173
|
Use the Visual Assist preferences declared in DA-VINCI.md.
|
|
135
174
|
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
|
|
137
|
-
|
|
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
|
+
不要生成 `tasks.md`,除非用户明确把这轮交付意图从 `design-only` 提升到更后续的阶段。
|
|
177
|
+
在第一次 Pencil 编辑前,必须执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`,让登记好的项目内 `.pen` 先完成 seed 并持有锁;只有 session wrapper 不可用时,再退回 `da-vinci ensure-pen --output <path> --verify-open`。
|
|
138
178
|
如果 Pencil MCP 可用,在第一次成功写入 Pencil 后运行 MCP runtime gate,并把结果记录到 `pencil-design.md`。
|
|
139
179
|
在声明 `design complete` 之前,必须同时通过 MCP runtime gate 和 `da-vinci audit --mode completion --change <change-id> <project-path>`。
|
|
140
180
|
Do not start code changes yet.
|
|
@@ -147,7 +187,7 @@ $da-vinci use continue for this existing desktop-product redesign workflow.
|
|
|
147
187
|
|
|
148
188
|
Use the existing Da Vinci artifacts in this project.
|
|
149
189
|
Do not restart discovery unless an artifact is missing or clearly wrong.
|
|
150
|
-
把登记的项目内 Pencil 源保持在 `.da-vinci/designs/`
|
|
190
|
+
把登记的项目内 Pencil 源保持在 `.da-vinci/designs/` 下,作为设计真相源。如果继续这一轮会做 Pencil 编辑,必须先执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`,发生实质性 live edit 后再执行 `da-vinci pencil-session persist --project <project-path> --pen <path> ...`;只有 session wrapper 不可用时,才退回 `write-pen + check-pen-sync` 这条底层链路。
|
|
151
191
|
If the redesign is complex, continue from the approved anchor surfaces instead of restarting broad scaffolding.
|
|
152
192
|
如果 Pencil MCP 可用,且这一轮继续做了新的 Pencil 写入,就重新运行 MCP runtime gate,并把最新结果记录到 `pencil-design.md`。
|
|
153
193
|
在声明 `design complete` 或 `workflow complete` 之前,必须同时通过 MCP runtime gate 和 `da-vinci audit --mode completion --change <change-id> <project-path>`。
|