@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.1.19 - 2026-03-28
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- `design-supervisor review` as a documented final style-quality gate that stays distinct from `Preferred adapters`
|
|
7
|
+
- `scripts/test-audit-design-supervisor.js` to cover advisory versus required reviewer branches, missing review records, and malformed review records
|
|
8
|
+
- `scripts/test-pencil-lock.js` to verify blocking lock waits and timeout behavior after removing the old busy-wait loop
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- `Visual Assist` guidance now explains `Design-supervisor reviewers`, `Require Supervisor Review`, gate order, gate judging criteria, and per-gate branching in both English and Chinese
|
|
12
|
+
- `visual-assist-presets` for mobile, desktop, web, and tablet now ship three explicit variants: adapter-only, advisory reviewer, and required reviewer signoff
|
|
13
|
+
- completion and integrity audit now treat `Require Supervisor Review: true` as the actual hard-gate switch instead of forcing all configured reviewers into a blocking path
|
|
14
|
+
- design-supervisor review records now require explicit status, issue list, and revision outcome before they count as valid audit evidence
|
|
15
|
+
- Pencil lock waiting now uses blocking sleep via `Atomics.wait(...)` instead of CPU-burning busy waits while preserving the synchronous CLI call graph
|
|
16
|
+
- Chinese `visual-assist-presets` now match the English three-variant structure without extra duplicated configuration blocks
|
|
17
|
+
|
|
3
18
|
## v0.1.18 - 2026-03-28
|
|
4
19
|
|
|
5
20
|
### Added
|
package/README.md
CHANGED
|
@@ -28,10 +28,16 @@ This workflow is intended for:
|
|
|
28
28
|
|
|
29
29
|
Latest published npm package:
|
|
30
30
|
|
|
31
|
-
- `@xenonbyte/da-vinci-workflow@0.1.
|
|
31
|
+
- `@xenonbyte/da-vinci-workflow@0.1.19`
|
|
32
32
|
|
|
33
33
|
Release highlights:
|
|
34
34
|
|
|
35
|
+
- `design-supervisor review` is now a first-class final style-quality gate with explicit advisory versus required behavior controlled by `Require Supervisor Review`
|
|
36
|
+
- `Visual Assist` docs now explain gate order, gate judging criteria, and branching across screenshot review, layout hygiene, design checkpoint, and design-supervisor review
|
|
37
|
+
- `visual-assist-presets` for mobile, desktop, web, and tablet now ship three explicit variants: adapter-only, advisory reviewer, and required reviewer signoff in both English and Chinese
|
|
38
|
+
- completion and integrity audit now respect `Require Supervisor Review: true` as the actual hard-gate switch instead of treating every configured reviewer as automatically blocking
|
|
39
|
+
- design-supervisor review records now require explicit status, issue list, and revision outcome before they count as valid audit evidence
|
|
40
|
+
- Pencil lock waiting now sleeps without busy-spinning, reducing CPU waste while preserving the synchronous CLI/session contract
|
|
35
41
|
- project-local `.pen` persistence now uses an MCP-snapshot-to-disk path instead of relying on headless interactive `save()`
|
|
36
42
|
- redesign runs now seed a registered project-local `.pen` before the first Pencil edit and record persisted snapshot hashes for later sync checks
|
|
37
43
|
- `da-vinci write-pen` now atomically writes workflow-owned `.pen` files from MCP-readable node and variable payloads with optional reopen verification
|
|
@@ -124,6 +130,17 @@ Recommended default:
|
|
|
124
130
|
- Preferred adapters:
|
|
125
131
|
- ui-ux-pro-max
|
|
126
132
|
- frontend-skill
|
|
133
|
+
- Design-supervisor reviewers:
|
|
134
|
+
- frontend-skill
|
|
135
|
+
- ui-ux-pro-max
|
|
136
|
+
- Design-supervisor review mode:
|
|
137
|
+
- screenshot-and-theme
|
|
138
|
+
- Design-supervisor review inputs:
|
|
139
|
+
- screenshots
|
|
140
|
+
- pencil variables
|
|
141
|
+
- visual thesis
|
|
142
|
+
- content plan
|
|
143
|
+
- interaction thesis
|
|
127
144
|
- Scope:
|
|
128
145
|
- visual contract refinement
|
|
129
146
|
- page composition
|
|
@@ -134,6 +151,8 @@ Recommended default:
|
|
|
134
151
|
- native-da-vinci
|
|
135
152
|
- Require Adapter:
|
|
136
153
|
- false
|
|
154
|
+
- Require Supervisor Review:
|
|
155
|
+
- false
|
|
137
156
|
```
|
|
138
157
|
|
|
139
158
|
Use this when:
|
|
@@ -149,6 +168,17 @@ Quality-first redesign configuration:
|
|
|
149
168
|
- Preferred adapters:
|
|
150
169
|
- frontend-skill
|
|
151
170
|
- ui-ux-pro-max
|
|
171
|
+
- Design-supervisor reviewers:
|
|
172
|
+
- frontend-skill
|
|
173
|
+
- ui-ux-pro-max
|
|
174
|
+
- Design-supervisor review mode:
|
|
175
|
+
- screenshot-and-theme
|
|
176
|
+
- Design-supervisor review inputs:
|
|
177
|
+
- screenshots
|
|
178
|
+
- pencil variables
|
|
179
|
+
- visual thesis
|
|
180
|
+
- content plan
|
|
181
|
+
- interaction thesis
|
|
152
182
|
- Scope:
|
|
153
183
|
- visual contract refinement
|
|
154
184
|
- page composition
|
|
@@ -160,6 +190,8 @@ Quality-first redesign configuration:
|
|
|
160
190
|
- native-da-vinci
|
|
161
191
|
- Require Adapter:
|
|
162
192
|
- true
|
|
193
|
+
- Require Supervisor Review:
|
|
194
|
+
- true
|
|
163
195
|
```
|
|
164
196
|
|
|
165
197
|
Use this when:
|
|
@@ -187,6 +219,9 @@ Selection rules:
|
|
|
187
219
|
- use only Pencil-supported properties; do not rely on web-only props such as `flex` or `margin`
|
|
188
220
|
- keep `Fallback: native-da-vinci` unless you explicitly want missing adapters to block the workflow
|
|
189
221
|
- keep `Require Adapter: false` by default and raise it to `true` only for design-critical work
|
|
222
|
+
- keep `Design-supervisor reviewers` separate from `Preferred adapters`; adapters lead first-pass composition, reviewers judge final style maturity
|
|
223
|
+
- keep `Require Supervisor Review: false` unless reviewer-backed style signoff is itself a delivery requirement
|
|
224
|
+
- `Require Supervisor Review: true` means missing, blocked, or unaccepted reviewer results should block broad expansion, implementation-task handoff, and terminal completion
|
|
190
225
|
- keep `Scope` limited to presentation quality; do not use it to delegate behavior, routes, or state truth
|
|
191
226
|
|
|
192
227
|
## Core workflow
|
|
@@ -341,7 +376,7 @@ Rules:
|
|
|
341
376
|
- `page-map.md` is the source of truth for implementation pages
|
|
342
377
|
- `pencil-bindings.md` is the source of truth for implementation page -> Pencil page mapping
|
|
343
378
|
- in `redesign-from-code`, existing code is behavior truth, not layout truth
|
|
344
|
-
- in `overhaul-from-code`, existing code is reference evidence and migration baseline, not
|
|
379
|
+
- in `overhaul-from-code`, existing code is reference evidence and migration baseline, not the final target behavior truth
|
|
345
380
|
- complex pages should be decomposed into subpages, states, overlays, and implementation surfaces before Pencil redesign is treated as final
|
|
346
381
|
- the preferred `.pen` path recorded in `design-registry.md` is workflow-owned state, not user-authored config
|
|
347
382
|
- when Pencil work starts, Da Vinci should use or create that exact project-local `.pen` path instead of relying on whichever Pencil document happens to be active
|
|
@@ -456,16 +491,18 @@ Both modes check the most common workflow-integrity failures in a project:
|
|
|
456
491
|
- warns when anchor-surface batches are too large and should be split before retrying
|
|
457
492
|
|
|
458
493
|
When Pencil MCP is active, Da Vinci now also expects an MCP runtime gate record in `pencil-design.md` before terminal completion claims. That runtime gate checks live editor/source convergence separately from filesystem audit.
|
|
459
|
-
During active redesign work,
|
|
494
|
+
During active redesign work, run `da-vinci audit --mode integrity <project-path>` immediately after the first successful Pencil write, then use `da-vinci preflight-pencil` plus smaller follow-up batches if the same anchor surface rolls back twice.
|
|
460
495
|
|
|
461
496
|
Project-local `.pen` persistence now has two supported paths:
|
|
462
497
|
|
|
463
498
|
- first-run path: seed the registered project-local `.pen` with `da-vinci ensure-pen --output <path> --verify-open`, open that exact path, then persist later MCP snapshot writes back to the same file
|
|
464
499
|
- resume path: if a registered project-local `.pen` already exists, reopen it for continuity, but after material live edits persist a fresh live MCP snapshot back to that same path and run `da-vinci check-pen-sync`
|
|
465
500
|
|
|
501
|
+
On autonomous redesign runs, the session wrapper is required when it is available. Lower-level helpers remain available only when the wrapper truly cannot be used.
|
|
502
|
+
|
|
466
503
|
Persistence helpers:
|
|
467
504
|
|
|
468
|
-
-
|
|
505
|
+
- required wrapper on autonomous runs:
|
|
469
506
|
- `da-vinci pencil-session begin --project <project-path> --pen <path>`
|
|
470
507
|
- `da-vinci pencil-session persist --project <project-path> --pen <path> --nodes-file <batch-get-json> --variables-file <get-variables-json> --version <version>`
|
|
471
508
|
- `da-vinci pencil-session end --project <project-path> --pen <path> --nodes-file <batch-get-json> --variables-file <get-variables-json> --version <version>`
|
|
@@ -592,6 +629,7 @@ $da-vinci use intake for this existing Android project.
|
|
|
592
629
|
I need to globally replace the UI.
|
|
593
630
|
Existing Android code is the behavior source of truth.
|
|
594
631
|
HTML references are in /abs/path/to/mockups.
|
|
632
|
+
Treat this as full-delivery unless I explicitly narrow it to design-only.
|
|
595
633
|
```
|
|
596
634
|
|
|
597
635
|
### Continue after inventory and spec work
|
package/README.zh-CN.md
CHANGED
|
@@ -30,10 +30,16 @@ Da Vinci 是一个把产品需求一路推进到结构化规格、Pencil 设计
|
|
|
30
30
|
|
|
31
31
|
最新已发布 npm 包:
|
|
32
32
|
|
|
33
|
-
- `@xenonbyte/da-vinci-workflow@0.1.
|
|
33
|
+
- `@xenonbyte/da-vinci-workflow@0.1.19`
|
|
34
34
|
|
|
35
35
|
已发布版本重点:
|
|
36
36
|
|
|
37
|
+
- `design-supervisor review` 现在成为正式的最终风格质量 gate,并通过 `Require Supervisor Review` 明确区分“建议性”与“硬门槛”
|
|
38
|
+
- `Visual Assist` 文档现在补全了 gate 顺序、每层 gate 怎么审,以及 screenshot review、layout hygiene、design checkpoint、design-supervisor review 之间的分叉规则
|
|
39
|
+
- 移动端、桌面端、Web、平板四套 `visual-assist-presets` 现在都提供三种明确变体:只有 adapter、reviewer 建议性审查、reviewer 硬签字,中英文一致
|
|
40
|
+
- completion / integrity audit 现在真正以 `Require Supervisor Review: true` 作为硬门槛开关,而不是只要配置 reviewer 就一律阻断
|
|
41
|
+
- `design-supervisor review` 记录现在必须有明确状态、问题列表和回改结果,才算有效审查证据
|
|
42
|
+
- Pencil 锁等待现在改成阻塞 sleep,不再 busy wait 空转 CPU,同时保留同步 CLI/session 的调用语义
|
|
37
43
|
- 项目内 `.pen` 持久化现在改为“从 MCP 快照写回磁盘”的正式路径,不再依赖 headless interactive `save()`
|
|
38
44
|
- 重设计流程现在要求在第一次 Pencil 编辑前先 seed 一个登记好的项目内 `.pen`,并记录后续持久化快照 hash 以便做同步校验
|
|
39
45
|
- `da-vinci write-pen` 现在可以把 MCP 可读的节点和变量快照原子写成工作流管理的 `.pen` 文件,并可选地做 reopen 校验
|
|
@@ -89,7 +95,7 @@ Da Vinci 当前支持五种模式:
|
|
|
89
95
|
|
|
90
96
|
### `overhaul-from-code`
|
|
91
97
|
|
|
92
|
-
|
|
98
|
+
已有项目,但目标是做系统级大改版;现有代码是参考证据和迁移基线,不是新系统最终行为真相。
|
|
93
99
|
|
|
94
100
|
### `feature-change`
|
|
95
101
|
|
|
@@ -129,6 +135,17 @@ Da Vinci 当前支持五种模式:
|
|
|
129
135
|
- Preferred adapters:
|
|
130
136
|
- ui-ux-pro-max
|
|
131
137
|
- frontend-skill
|
|
138
|
+
- Design-supervisor reviewers:
|
|
139
|
+
- frontend-skill
|
|
140
|
+
- ui-ux-pro-max
|
|
141
|
+
- Design-supervisor review mode:
|
|
142
|
+
- screenshot-and-theme
|
|
143
|
+
- Design-supervisor review inputs:
|
|
144
|
+
- screenshots
|
|
145
|
+
- pencil variables
|
|
146
|
+
- visual thesis
|
|
147
|
+
- content plan
|
|
148
|
+
- interaction thesis
|
|
132
149
|
- Scope:
|
|
133
150
|
- visual contract refinement
|
|
134
151
|
- page composition
|
|
@@ -139,6 +156,8 @@ Da Vinci 当前支持五种模式:
|
|
|
139
156
|
- native-da-vinci
|
|
140
157
|
- Require Adapter:
|
|
141
158
|
- false
|
|
159
|
+
- Require Supervisor Review:
|
|
160
|
+
- false
|
|
142
161
|
```
|
|
143
162
|
|
|
144
163
|
适用场景:
|
|
@@ -154,6 +173,17 @@ Da Vinci 当前支持五种模式:
|
|
|
154
173
|
- Preferred adapters:
|
|
155
174
|
- frontend-skill
|
|
156
175
|
- ui-ux-pro-max
|
|
176
|
+
- Design-supervisor reviewers:
|
|
177
|
+
- frontend-skill
|
|
178
|
+
- ui-ux-pro-max
|
|
179
|
+
- Design-supervisor review mode:
|
|
180
|
+
- screenshot-and-theme
|
|
181
|
+
- Design-supervisor review inputs:
|
|
182
|
+
- screenshots
|
|
183
|
+
- pencil variables
|
|
184
|
+
- visual thesis
|
|
185
|
+
- content plan
|
|
186
|
+
- interaction thesis
|
|
157
187
|
- Scope:
|
|
158
188
|
- visual contract refinement
|
|
159
189
|
- page composition
|
|
@@ -165,6 +195,8 @@ Da Vinci 当前支持五种模式:
|
|
|
165
195
|
- native-da-vinci
|
|
166
196
|
- Require Adapter:
|
|
167
197
|
- true
|
|
198
|
+
- Require Supervisor Review:
|
|
199
|
+
- true
|
|
168
200
|
```
|
|
169
201
|
|
|
170
202
|
适用场景:
|
|
@@ -192,6 +224,9 @@ Da Vinci 当前支持五种模式:
|
|
|
192
224
|
- 只使用 Pencil 支持的属性,不要继续使用 `flex`、`margin` 这类 Web 属性
|
|
193
225
|
- 默认保留 `Fallback: native-da-vinci`
|
|
194
226
|
- `Require Adapter` 默认保持 `false`,只有设计要求很高时再改成 `true`
|
|
227
|
+
- 把 `Design-supervisor reviewers` 和 `Preferred adapters` 分开;adapter 负责首轮设计引导,reviewer 负责最终风格质量把关
|
|
228
|
+
- `Require Supervisor Review` 默认保持 `false`,只有“reviewer 签字本身就是交付门槛”时才改成 `true`
|
|
229
|
+
- `Require Supervisor Review: true` 表示只要缺失、阻断、或未被接受的 reviewer 结果,就不能扩屏、交接实现或宣告完成
|
|
195
230
|
- `Scope` 只管 presentation 质量,不要拿它去定义 behavior、route 或 state truth
|
|
196
231
|
|
|
197
232
|
## 核心工作流顺序
|
|
@@ -291,7 +326,7 @@ project/
|
|
|
291
326
|
- `page-map.md` 是实现页面和状态的真相源
|
|
292
327
|
- `pencil-bindings.md` 是实现页面到 Pencil 页面绑定的真相源
|
|
293
328
|
- 在 `redesign-from-code` 里,现有代码只是真相行为,不是真相布局
|
|
294
|
-
- 在 `overhaul-from-code`
|
|
329
|
+
- 在 `overhaul-from-code` 里,现有代码是参考证据和迁移基线,不是新系统最终行为真相
|
|
295
330
|
- 复杂页面在 Pencil 重设计前应该先拆成 subpage、state、overlay 和 implementation surface
|
|
296
331
|
- `design-registry.md` 里登记的首选 `.pen` 路径属于工作流自动维护的状态,不应该依赖用户手工填写
|
|
297
332
|
- 一旦进入 Pencil 设计,Da Vinci 应该使用或创建这个项目内 `.pen` 路径,而不是继续沿用当前随手打开的 Pencil 文档
|
|
@@ -383,16 +418,18 @@ da-vinci uninstall --platform codex,claude,gemini
|
|
|
383
418
|
- 当 anchor-surface 批次太大时给出拆批警告,避免继续大块回滚
|
|
384
419
|
|
|
385
420
|
当 Pencil MCP 可用时,Da Vinci 现在还要求在终态完成声明前,把 MCP runtime gate 结果记录到 `pencil-design.md`。这层 gate 负责检查 live editor/source convergence,与 filesystem audit 分工不同。
|
|
386
|
-
|
|
421
|
+
在重设计进行中,如果有 shell 能力,应在第一次成功写入 Pencil 后立即运行 `da-vinci audit --mode integrity <project-path>`;如果同一个 anchor surface 连续回滚,则继续配合 `da-vinci preflight-pencil` 和更小的 follow-up batch。
|
|
387
422
|
|
|
388
423
|
项目内 `.pen` 持久化现在分成两条受支持路径:
|
|
389
424
|
|
|
390
425
|
- 首次运行路径:先用 `da-vinci ensure-pen --output <path> --verify-open` seed 登记好的项目内 `.pen`,打开这个精确路径,然后把后续 MCP 快照持续写回同一个文件
|
|
391
426
|
- 继续迭代路径:如果项目里原本已有登记的 `.pen`,先打开它继续工作;但发生实质性 live edit 后,要把当前 live MCP 快照重新持久化回同一路径,并运行 `da-vinci check-pen-sync`
|
|
392
427
|
|
|
393
|
-
|
|
428
|
+
如果是自治运行,session wrapper 只要可用就必须使用。只有 wrapper 确实不可用时,才退回底层 helper。
|
|
429
|
+
|
|
430
|
+
持久化命令:
|
|
394
431
|
|
|
395
|
-
-
|
|
432
|
+
- 自治运行必须使用的 session 命令:
|
|
396
433
|
- `da-vinci pencil-session begin --project <project-path> --pen <path>`
|
|
397
434
|
- `da-vinci pencil-session persist --project <project-path> --pen <path> --nodes-file <batch-get-json> --variables-file <get-variables-json> --version <version>`
|
|
398
435
|
- `da-vinci pencil-session end --project <project-path> --pen <path> --nodes-file <batch-get-json> --variables-file <get-variables-json> --version <version>`
|
|
@@ -502,6 +539,7 @@ $da-vinci use intake for this existing Android project.
|
|
|
502
539
|
I need to globally replace the UI.
|
|
503
540
|
Existing Android code is the behavior source of truth.
|
|
504
541
|
HTML references are in /abs/path/to/mockups.
|
|
542
|
+
Treat this as full-delivery unless I explicitly narrow it to design-only.
|
|
505
543
|
```
|
|
506
544
|
|
|
507
545
|
### 已有工件后继续推进
|
package/SKILL.md
CHANGED
|
@@ -16,7 +16,7 @@ Keep these rules fixed:
|
|
|
16
16
|
- Tasks decide implementation order.
|
|
17
17
|
- Code must follow both requirements and Pencil data.
|
|
18
18
|
- Existing code is behavior truth, not layout truth, during `redesign-from-code`.
|
|
19
|
-
- Existing code is reference evidence and migration baseline, not
|
|
19
|
+
- Existing code is reference evidence and migration baseline, not the final target behavior truth, during `overhaul-from-code`.
|
|
20
20
|
- When requirements and Pencil drift apart, stop and update the source artifacts before continuing implementation.
|
|
21
21
|
|
|
22
22
|
## Execution Policy
|
|
@@ -253,7 +253,7 @@ During active Pencil work:
|
|
|
253
253
|
- when shell access is available, preflight non-trivial `batch_design` operation strings before sending them to Pencil
|
|
254
254
|
- prefer 12 or fewer operations on anchor-surface batches; if the same anchor surface rolls back twice, switch to micro-batches of 6 or fewer operations until a clean schema-safe pass succeeds
|
|
255
255
|
- do not rely on headless interactive `save()` as the persistence truth; when live MCP edits exist, persist project-local `.pen` files from MCP-readable document snapshots
|
|
256
|
-
-
|
|
256
|
+
- use the session wrapper commands on autonomous runs:
|
|
257
257
|
`da-vinci pencil-session begin --project <project-path> --pen <path>`
|
|
258
258
|
`da-vinci pencil-session persist --project <project-path> --pen <path> --nodes-file <batch-get-json> --variables-file <get-variables-json> --version <version>`
|
|
259
259
|
`da-vinci pencil-session end --project <project-path> --pen <path> --nodes-file <batch-get-json> --variables-file <get-variables-json> --version <version>`
|
|
@@ -277,6 +277,10 @@ During active Pencil work:
|
|
|
277
277
|
- exported screenshots are review artifacts only; place them under `.da-vinci/changes/<change-id>/exports/` and never treat them as a substitute for the project-local `.pen` source
|
|
278
278
|
- screenshot review is binding: if the review calls out hierarchy, spacing, clarity, inconsistency, or unresolved-placeholder issues, revise the screen before treating the checkpoint as `PASS`
|
|
279
279
|
- screenshot review must record an explicit `PASS`, `WARN`, or `BLOCK` plus the concrete issue list and revision outcome; phrases such as "looks good" do not count as review evidence
|
|
280
|
+
- if `DA-VINCI.md` declares `Design-supervisor reviewers`, run `design-supervisor review` after screenshot review, layout hygiene, and design checkpoint for the approved anchor set
|
|
281
|
+
- keep `Design-supervisor reviewers` separate from `Preferred adapters`; adapters lead the design pass, reviewers judge whether the final style quality is strong enough to expand or implement
|
|
282
|
+
- when `design-supervisor review` is active, review screenshots together with Pencil theme variables, `visual-thesis.md`, `content-plan.md`, and `interaction-thesis.md`, then record an explicit `PASS`, `WARN`, or `BLOCK` plus issue list and revision outcome in `pencil-design.md`
|
|
283
|
+
- if `DA-VINCI.md` sets `Require Supervisor Review: true`, treat missing, blocked, or unaccepted `design-supervisor review` as a blocker before broad expansion, implementation-task handoff, or terminal completion
|
|
280
284
|
|
|
281
285
|
## Load References On Demand
|
|
282
286
|
|
|
@@ -438,7 +442,7 @@ If the active mode is `redesign-from-code`:
|
|
|
438
442
|
If the active mode is `overhaul-from-code`:
|
|
439
443
|
|
|
440
444
|
- inventory current routes, pages, modules, key flows, integrations, and permission boundaries before redefining the target product
|
|
441
|
-
- treat existing code as reference evidence and migration baseline rather than
|
|
445
|
+
- treat existing code as reference evidence and migration baseline rather than the final target behavior truth
|
|
442
446
|
- classify current system areas into `preserve`, `revise`, `retire`, and `unknown` in `migration-contract.md`
|
|
443
447
|
- stabilize new `proposal.md` and `specs/` before broad Pencil design or implementation
|
|
444
448
|
- update `page-map.md` to reflect the new target page set, not only the old route tree
|
|
@@ -20,10 +20,11 @@ Create or update:
|
|
|
20
20
|
Run the `design checkpoint` before locking implementation tasks.
|
|
21
21
|
Before non-trivial `batch_design` calls, preflight the Pencil operations when shell access is available.
|
|
22
22
|
If the same anchor surface rolls back twice, switch to micro-batches of 6 or fewer operations until a clean schema-safe pass succeeds.
|
|
23
|
-
|
|
24
|
-
Before the first Pencil edit,
|
|
23
|
+
Require the session wrapper commands on autonomous runs: `da-vinci pencil-session begin`, `da-vinci pencil-session persist`, and `da-vinci pencil-session end`.
|
|
24
|
+
Before the first Pencil edit, require `da-vinci pencil-session begin` so the registered project-local `.pen` is seeded and locked before editing starts.
|
|
25
25
|
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 `pencil-session persist` after material edits.
|
|
26
26
|
After the first successful Pencil write, run `da-vinci audit --mode integrity <project-path>` before broad expansion continues.
|
|
27
27
|
If Pencil MCP is active, run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
|
|
28
28
|
Screenshot review must record an explicit `PASS`, `WARN`, or `BLOCK` plus the issue list and revision outcome; "looks good" is not a valid review record.
|
|
29
|
+
If `DA-VINCI.md` declares `Design-supervisor reviewers`, run `design-supervisor review` after screenshot review, layout hygiene, and design checkpoint, then record the reviewers, inputs, status, issue list, and revision outcome in `pencil-design.md`. If `Require Supervisor Review: true`, treat missing, blocked, or unaccepted review results as blocking before broad expansion or terminal completion.
|
|
29
30
|
Before reporting `design complete` or `workflow complete`, run `da-vinci audit --mode completion --change <change-id> <project-path>` and treat any failure as blocking.
|
|
@@ -14,10 +14,11 @@ Output should move the work toward:
|
|
|
14
14
|
Use Pencil-backed structure as the design source when available.
|
|
15
15
|
Before non-trivial `batch_design` calls, preflight the Pencil operations when shell access is available.
|
|
16
16
|
If the same anchor surface rolls back twice, switch to micro-batches of 6 or fewer operations until a clean schema-safe pass succeeds.
|
|
17
|
-
|
|
18
|
-
Before the first Pencil edit,
|
|
17
|
+
Require the session wrapper commands on autonomous runs: `da-vinci pencil-session begin`, `da-vinci pencil-session persist`, and `da-vinci pencil-session end`.
|
|
18
|
+
Before the first Pencil edit, require `da-vinci pencil-session begin` so the registered project-local `.pen` is seeded and locked before editing starts.
|
|
19
19
|
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 `pencil-session persist` after material edits.
|
|
20
20
|
After the first successful Pencil write, run `da-vinci audit --mode integrity <project-path>` before broad expansion continues.
|
|
21
21
|
If Pencil MCP is active, run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
|
|
22
22
|
Screenshot review must record an explicit `PASS`, `WARN`, or `BLOCK` plus the issue list and revision outcome; "looks good" is not a valid review record.
|
|
23
|
+
If `DA-VINCI.md` declares `Design-supervisor reviewers`, run `design-supervisor review` after screenshot review, layout hygiene, and design checkpoint, then record the reviewers, inputs, status, issue list, and revision outcome in `pencil-design.md`. If `Require Supervisor Review: true`, treat missing, blocked, or unaccepted review results as blocking before broad expansion or terminal completion.
|
|
23
24
|
Before claiming `design complete` or `workflow complete`, run `da-vinci audit --mode completion --change <change-id> <project-path>` and treat any failure as blocking.
|
|
@@ -13,11 +13,12 @@ Create or update:
|
|
|
13
13
|
Use Pencil-backed page coverage as the source of presentation truth.
|
|
14
14
|
Before non-trivial `batch_design` calls, preflight the Pencil operations when shell access is available.
|
|
15
15
|
If the same anchor surface rolls back twice, switch to micro-batches of 6 or fewer operations until a clean schema-safe pass succeeds.
|
|
16
|
-
|
|
17
|
-
Before the first Pencil edit,
|
|
16
|
+
Require the session wrapper commands on autonomous runs: `da-vinci pencil-session begin`, `da-vinci pencil-session persist`, and `da-vinci pencil-session end`.
|
|
17
|
+
Before the first Pencil edit, require `da-vinci pencil-session begin` so the registered project-local `.pen` is seeded and locked before editing starts.
|
|
18
18
|
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 `pencil-session persist` after material edits.
|
|
19
19
|
After the first successful Pencil write, run `da-vinci audit --mode integrity <project-path>` before broad expansion continues.
|
|
20
20
|
If Pencil MCP is active, run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
|
|
21
21
|
Screenshot review must record an explicit `PASS`, `WARN`, or `BLOCK` plus the issue list and revision outcome; "looks good" is not a valid review record.
|
|
22
|
+
If `DA-VINCI.md` declares `Design-supervisor reviewers`, run `design-supervisor review` after screenshot review, layout hygiene, and design checkpoint, then record the reviewers, inputs, status, issue list, and revision outcome in `pencil-design.md`. If `Require Supervisor Review: true`, treat missing, blocked, or unaccepted review results as blocking before broad expansion or terminal completion.
|
|
22
23
|
Before reporting `design complete` or `workflow complete`, run `da-vinci audit --mode completion --change <change-id> <project-path>` and treat any failure as blocking.
|
|
23
24
|
"""
|
|
@@ -135,6 +135,8 @@ I need to globally replace the UI.
|
|
|
135
135
|
Existing Android code is the behavior source of truth.
|
|
136
136
|
UI reference directory: /abs/path/to/mockups
|
|
137
137
|
Treat the HTML files there as presentation references only, not behavior truth.
|
|
138
|
+
Open the HTML references in a real browser and wait 3-5 seconds, or until the visual state settles, before judging the final styling.
|
|
139
|
+
Inventory which pages and states the reference directory actually covers and which still need to be inferred from behavior truth.
|
|
138
140
|
Preserve business logic, navigation, permissions, integrations, validations, and state transitions unless explicitly required otherwise.
|
|
139
141
|
Inspect the real codebase first and determine whether the UI stack is Jetpack Compose, XML, or mixed.
|
|
140
142
|
Inventory all activities, fragments, composable destinations, nav graphs, dialogs, bottom sheets, tabs, nested flows, shared shells, subpages, and important states.
|
package/docs/mode-use-cases.md
CHANGED
|
@@ -63,7 +63,7 @@ Choose the mode by project start condition:
|
|
|
63
63
|
|
|
64
64
|
4. `overhaul-from-code`
|
|
65
65
|
- project already exists
|
|
66
|
-
- current code is
|
|
66
|
+
- current code is reference evidence and migration baseline
|
|
67
67
|
- flows, logic, information architecture, or UI are being broadly redefined
|
|
68
68
|
|
|
69
69
|
5. `feature-change`
|
|
@@ -143,7 +143,7 @@ Generate DA-VINCI.md, proposal, specs, page map, Pencil-backed launch pages, bin
|
|
|
143
143
|
|
|
144
144
|
8. create `pencil-design.md`
|
|
145
145
|
- record the generated Pencil screens
|
|
146
|
-
-
|
|
146
|
+
- require `da-vinci pencil-session begin` before the first Pencil edit so the registered `.pen` is seeded and locked up front
|
|
147
147
|
- if a registered project-local `.pen` already exists, reopen it for continuity but overwrite it from the current live MCP snapshot through `da-vinci pencil-session persist` after material live edits
|
|
148
148
|
- keep screenshot exports under `.da-vinci/changes/<change-id>/exports/` rather than `.da-vinci/designs/`
|
|
149
149
|
|
|
@@ -502,7 +502,7 @@ Goal:
|
|
|
502
502
|
|
|
503
503
|
```text
|
|
504
504
|
$da-vinci use overhaul-from-code to overhaul this existing product.
|
|
505
|
-
Treat current code as
|
|
505
|
+
Treat current code as reference evidence and migration baseline, not the final target behavior truth.
|
|
506
506
|
Inventory the current system, define preserve/revise/retire/unknown boundaries, rewrite the target flows and specs, then generate Pencil-backed design work and implementation tasks.
|
|
507
507
|
```
|
|
508
508
|
|
|
@@ -544,7 +544,7 @@ Inventory the current system, define preserve/revise/retire/unknown boundaries,
|
|
|
544
544
|
### Where this mode differs from `redesign-from-code`
|
|
545
545
|
|
|
546
546
|
- `redesign-from-code` keeps old code as behavior truth
|
|
547
|
-
- `overhaul-from-code` treats old code as reference
|
|
547
|
+
- `overhaul-from-code` treats old code as reference evidence and migration baseline
|
|
548
548
|
- `redesign-from-code` is mainly for broad UI replacement
|
|
549
549
|
- `overhaul-from-code` is for broad product rewrites on top of an existing system
|
|
550
550
|
|
|
@@ -26,7 +26,7 @@ PNG exports are review artifacts only. They are not the design source of truth.
|
|
|
26
26
|
|
|
27
27
|
## Session Model
|
|
28
28
|
|
|
29
|
-
Da Vinci now
|
|
29
|
+
Da Vinci now requires the session wrapper on autonomous runs:
|
|
30
30
|
|
|
31
31
|
- `da-vinci pencil-session begin`
|
|
32
32
|
- `da-vinci pencil-session persist`
|
|
@@ -38,6 +38,8 @@ This wrapper exists to make three things mandatory:
|
|
|
38
38
|
- serialized Pencil MCP write access
|
|
39
39
|
- explicit live-to-disk persistence and sync verification
|
|
40
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
|
+
|
|
41
43
|
## First-Run Path
|
|
42
44
|
|
|
43
45
|
When the project does not yet have a registered `.pen`:
|
|
@@ -89,7 +91,7 @@ Use:
|
|
|
89
91
|
- `da-vinci pencil-lock acquire`
|
|
90
92
|
- `da-vinci pencil-lock release`
|
|
91
93
|
|
|
92
|
-
or
|
|
94
|
+
or use the session wrapper, which manages the lock for you.
|
|
93
95
|
|
|
94
96
|
This prevents multiple projects from competing for the same active editor.
|
|
95
97
|
|
|
@@ -141,6 +143,41 @@ The render output cannot pass if:
|
|
|
141
143
|
- it ignores screenshot-review findings
|
|
142
144
|
- it still shows repeated schema-instability
|
|
143
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
|
+
|
|
144
181
|
## Design-Source Gate
|
|
145
182
|
|
|
146
183
|
After active Pencil work exists, Da Vinci runs `design-source checkpoint`.
|
|
@@ -198,8 +235,10 @@ Typical autonomous chain:
|
|
|
198
235
|
2. Pencil MCP edits
|
|
199
236
|
3. `da-vinci pencil-session persist --project <project-path> --pen <path> --nodes-file <nodes.json> --variables-file <vars.json> --version <version>`
|
|
200
237
|
4. screenshot review + layout hygiene
|
|
201
|
-
5.
|
|
202
|
-
6.
|
|
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>`
|
|
203
242
|
|
|
204
243
|
## Flow Diagram
|
|
205
244
|
|
|
@@ -217,15 +256,24 @@ flowchart TD
|
|
|
217
256
|
H --> F
|
|
218
257
|
I --> J{Screenshot review and layout hygiene pass?}
|
|
219
258
|
J -- No --> F
|
|
220
|
-
J -- Yes --> K
|
|
221
|
-
K
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
O --> P
|
|
228
|
-
P
|
|
229
|
-
|
|
230
|
-
Q
|
|
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]
|
|
231
279
|
```
|
|
@@ -125,6 +125,9 @@ $da-vinci use intake for this existing Android project.
|
|
|
125
125
|
I need to globally replace the UI.
|
|
126
126
|
Existing code is the behavior source of truth.
|
|
127
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.
|
|
128
131
|
```
|
|
129
132
|
|
|
130
133
|
Expected outcome:
|
|
@@ -159,7 +162,7 @@ Use:
|
|
|
159
162
|
$da-vinci use intake for this existing product.
|
|
160
163
|
|
|
161
164
|
This is a large overhaul, not only a UI refresh.
|
|
162
|
-
Current codebase is
|
|
165
|
+
Current codebase is reference evidence and migration baseline, not the final target behavior truth.
|
|
163
166
|
We need to redefine flows, logic, and page structure while preserving selected integrations and constraints.
|
|
164
167
|
Generate the best executable Da Vinci workflow prompt for the next step.
|
|
165
168
|
```
|
|
@@ -17,7 +17,7 @@ Recommended flow:
|
|
|
17
17
|
4. copy both into your workflow setup
|
|
18
18
|
5. tighten the prompt further only when the project has unusual truth sources or platform constraints
|
|
19
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
|
|
20
|
-
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
|
|
21
21
|
|
|
22
22
|
Available presets:
|
|
23
23
|
|
|
@@ -38,6 +38,7 @@ Each scene preset should now include:
|
|
|
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 @@ Each scene preset should now include:
|
|
|
45
46
|
|
|
46
47
|
These are not surface-specific redesign presets.
|
|
47
48
|
|
|
48
|
-
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
|
|
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.
|
|
49
50
|
|
|
50
51
|
### 1. Intake For A Broad Existing-Product Overhaul
|
|
51
52
|
|
|
@@ -59,7 +60,7 @@ Use when:
|
|
|
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.
|