@xenonbyte/da-vinci-workflow 0.1.12 → 0.1.13

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 CHANGED
@@ -4,6 +4,14 @@
4
4
 
5
5
  - No unreleased changes yet.
6
6
 
7
+ ## v0.1.13 - 2026-03-27
8
+
9
+ ### Changed
10
+ - visual-adapter execution now requires explicit runtime declaration of the resolved primary adapter, available and unavailable requested adapters, and pre-anchor thesis writing instead of relying on artifact metadata alone
11
+ - redesign guidance now requires anchor-surface structural-delta notes, shared primitives before broad page expansion, and screenshot review that cannot auto-pass when analysis reports hierarchy, spacing, clarity, or inconsistency issues
12
+ - `.da-vinci/designs/` is now documented more strictly as a `.pen`-only directory, and design-source guidance now expects shell-visible `.pen` persistence immediately after the first successful Pencil write
13
+ - Pencil workflow guidance now explicitly rejects web-only properties such as `flex` and `margin`, and platform-adapter docs now warn against assuming cross-platform equivalence between near-name visual adapters
14
+
7
15
  ## v0.1.12 - 2026-03-27
8
16
 
9
17
  ### Changed
package/README.md CHANGED
@@ -27,10 +27,17 @@ This workflow is intended for:
27
27
 
28
28
  Latest published npm package:
29
29
 
30
- - `@xenonbyte/da-vinci-workflow@0.1.12`
30
+ - `@xenonbyte/da-vinci-workflow@0.1.13`
31
31
 
32
32
  Release highlights:
33
33
 
34
+ - visual-adapter execution now requires explicit runtime declaration of the resolved primary adapter and any unavailable requested adapters
35
+ - cross-platform near-name adapters such as `frontend-skill` and `frontend-design` are now treated as distinct unless the current environment explicitly resolves them
36
+ - complex `redesign-from-code` runs now require a visual thesis, content plan, interaction thesis, and anchor-surface structural-delta notes before broad Pencil generation
37
+ - screenshot review is now documented as a binding gate; analysis that reports hierarchy, spacing, clarity, or inconsistency issues cannot be treated as an automatic pass
38
+ - `.da-vinci/designs/` is now documented more strictly as a `.pen`-only directory, and project-local `.pen` persistence must be verified as shell-visible immediately after the first Pencil write
39
+ - multi-surface redesign guidance now requires a shared primitive family to be defined from approved anchor surfaces before broad page expansion
40
+ - Pencil generation guidance now explicitly rejects web-only properties such as `flex` and `margin`
34
41
  - visual-adapter resolution now requires the resolved primary adapter to actively lead the first design pass
35
42
  - complex redesigns now default to anchor-first Pencil generation: design 1-3 anchor surfaces, review screenshots, then expand
36
43
  - design checkpoint now explicitly blocks placeholder-heavy repeated scaffolds and premature broad multi-screen generation
@@ -152,8 +159,16 @@ Selection rules:
152
159
  - keep `ui-ux-pro-max` first for dense app and dashboard surfaces when the visual bar is moderate
153
160
  - move `frontend-skill` to the first slot when art direction, composition quality, and premium visual hierarchy matter more
154
161
  - when `Preferred adapters` are configured, the resolved primary adapter should actively lead the first design pass instead of being recorded only for traceability
162
+ - state the resolved primary adapter explicitly at runtime and name any requested adapters that are unavailable
163
+ - do not assume cross-platform equivalence between near-name adapters
164
+ - write a visual thesis, content plan, and interaction thesis before the first anchor surface
155
165
  - use Pencil guides as platform/buildability constraints, not as the main art-direction source
156
166
  - on complex redesigns, design 1-3 anchor surfaces first and review screenshots before broad multi-screen generation
167
+ - for each anchor surface, explain how the new composition differs structurally from the current layout
168
+ - do not auto-pass screenshot review when analysis reports hierarchy, spacing, clarity, inconsistency, or unresolved-placeholder issues
169
+ - define shared primitives from the approved anchor surfaces before broad page expansion
170
+ - keep `.da-vinci/designs/` reserved for `.pen` files only and verify the registered `.pen` path is shell-visible after the first Pencil write
171
+ - use only Pencil-supported properties; do not rely on web-only props such as `flex` or `margin`
157
172
  - keep `Fallback: native-da-vinci` unless you explicitly want missing adapters to block the workflow
158
173
  - keep `Require Adapter: false` by default and raise it to `true` only for design-critical work
159
174
  - keep `Scope` limited to presentation quality; do not use it to delegate behavior, routes, or state truth
package/README.zh-CN.md CHANGED
@@ -29,10 +29,17 @@ Da Vinci 是一个把产品需求一路推进到结构化规格、Pencil 设计
29
29
 
30
30
  最新已发布 npm 包:
31
31
 
32
- - `@xenonbyte/da-vinci-workflow@0.1.12`
32
+ - `@xenonbyte/da-vinci-workflow@0.1.13`
33
33
 
34
34
  已发布版本重点:
35
35
 
36
+ - visual adapter 的执行现在要求在运行时明确声明解析出来的主 adapter,以及哪些请求的 adapter 当前不可用
37
+ - `frontend-skill`、`frontend-design` 这类跨平台近名 adapter 现在明确视为不同能力源,除非当前环境真的解析到了它们
38
+ - 复杂 `redesign-from-code` 现在要求在大规模 Pencil 设计前先写 visual thesis、content plan、interaction thesis 和 anchor surface 的 structural-delta 说明
39
+ - screenshot review 现在被明确强调为硬闸门;只要分析指出 hierarchy、spacing、clarity 或 inconsistency 问题,就不能自动判通过
40
+ - `.da-vinci/designs/` 现在更明确只用于放 `.pen` 文件,而且第一次 Pencil 写入后就要验证对应 `.pen` 已经成为 shell 可见文件
41
+ - 多 surface 重设计现在要求先从已通过的 anchor surface 中抽出 shared primitive family,再扩展更多页面
42
+ - Pencil 生成规则现在明确拒绝 `flex`、`margin` 这类 Web 属性
36
43
  - visual adapter 解析现在要求“解析出来的主 adapter 必须真正主导首轮设计”,而不是只登记在工件里
37
44
  - 复杂重设计现在默认采用 anchor-first 的 Pencil 生成策略:先做 1 到 3 个 anchor surface,截图审查后再扩展
38
45
  - design checkpoint 现在会明确拦截大量空占位、重复模板和过早的大批量多页面脚手架
@@ -157,8 +164,16 @@ Da Vinci V2 支持四种模式:
157
164
  - 高密度 app、dashboard、工具型界面,且视觉要求中等时,优先把 `ui-ux-pro-max` 放第一位
158
165
  - 如果更重视 art direction、构图和高级感,就把 `frontend-skill` 放第一位
159
166
  - 一旦配置了 `Preferred adapters`,解析出来的主 adapter 应该真正主导首轮设计,而不是只登记在工件里
167
+ - 运行时必须明确写出解析出来的主 adapter,以及哪些请求的 adapter 当前不可用
168
+ - 不要默认把跨平台的近名 adapter 当成同一个能力源
169
+ - 在第一个 anchor surface 之前,先写 visual thesis、content plan 和 interaction thesis
160
170
  - Pencil 的 guide 只应该约束平台布局和可实现性,不应该替代主 adapter 成为设计方向来源
161
171
  - 面对复杂重设计时,先做 1 到 3 个 anchor surface,并完成截图审查,再扩展到更多页面
172
+ - 对每个 anchor surface,都要说明“新的构图和当前布局结构相比,具体改了什么”
173
+ - 如果截图分析指出 hierarchy、spacing、clarity、inconsistency 或 unresolved placeholder 问题,就不能自动判通过
174
+ - 在扩展更多页面前,先从已通过的 anchor surface 中抽出 shared primitives
175
+ - `.da-vinci/designs/` 只应该放 `.pen` 文件,并且第一次 Pencil 写入后就要验证登记路径已经成为 shell 可见文件
176
+ - 只使用 Pencil 支持的属性,不要继续使用 `flex`、`margin` 这类 Web 属性
162
177
  - 默认保留 `Fallback: native-da-vinci`
163
178
  - `Require Adapter` 默认保持 `false`,只有设计要求很高时再改成 `true`
164
179
  - `Scope` 只管 presentation 质量,不要拿它去定义 behavior、route 或 state truth
package/SKILL.md CHANGED
@@ -185,7 +185,10 @@ Do not repeatedly ask for inputs that are already stable in the artifacts.
185
185
  Treat visual adapters as optional design-assist layers.
186
186
 
187
187
  - resolve them from the user request first, then `DA-VINCI.md`, then locally available skills
188
+ - do not assume cross-platform equivalence between near-name adapters such as `frontend-skill` and `frontend-design`; only resolve adapters that are explicitly named and actually installed in the current environment
189
+ - record which requested adapters were available, which were unavailable, and which adapter became the resolved primary adapter
188
190
  - when `DA-VINCI.md` or the request declares `Preferred adapters`, the resolved primary adapter must actively lead first-pass design reasoning instead of being recorded only for traceability
191
+ - when a resolved primary adapter is available, state that runtime resolution explicitly before the first anchor-screen design pass and let it drive the visual thesis, content plan, and interaction thesis
189
192
  - use them to improve visual contract quality, composition, hierarchy, spacing, and motion guidance
190
193
  - use Pencil guides and platform constraints as buildability aids only; they must not replace the resolved primary adapter as the art-direction source
191
194
  - do not let them redefine behavior, page truth, route truth, or acceptance rules
@@ -213,6 +216,17 @@ Default completion rule:
213
216
  - if the request is `design-only`, stop after design artifacts and bindings
214
217
  - otherwise assume `full-delivery` and continue through implementation and verification
215
218
 
219
+ ## Pencil Generation Rules
220
+
221
+ During active Pencil work:
222
+
223
+ - keep `.da-vinci/designs/` reserved for project-local `.pen` files; do not write workflow markdown such as inventories, proposals, or checkpoints into that directory
224
+ - on `redesign-from-code`, write a short structural-delta note for each anchor surface explaining how the new composition differs from the current XML or layout grouping
225
+ - after the first successful Pencil write, verify that the registered project-local `.pen` path exists as a shell-visible file before treating the design source as persistent
226
+ - use only Pencil-supported properties; do not emit web- or CSS-only layout properties such as `flex` or `margin`
227
+ - on complex redesigns, turn approved anchor surfaces into a small shared primitive family before broad page expansion
228
+ - 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`
229
+
216
230
  ## Load References On Demand
217
231
 
218
232
  Load only the reference that matches the current step:
@@ -22,6 +22,9 @@ Notes:
22
22
  - Requirements decide behavior.
23
23
  - Pencil decides presentation.
24
24
  - Code must follow both.
25
+ - If `Visual Assist` is configured, resolve and state the actual primary visual adapter for this environment instead of assuming cross-platform skill equivalence.
26
+ - Keep `.da-vinci/designs/` reserved for `.pen` files only.
27
+ - On complex redesigns, design 1-3 anchor surfaces first and treat screenshot review as a binding gate before broad expansion.
25
28
  - Use `intake` when the user needs help phrasing the first workflow request.
26
29
  - Use `continue` when `.da-vinci/` artifacts already exist and the workflow must resume.
27
30
  - Keep workflow semantics shared across Codex, Claude, and Gemini.
@@ -21,6 +21,9 @@ Available routes:
21
21
 
22
22
  Important:
23
23
  - Treat `/prompts:*` as action selectors in Codex.
24
+ - If `Visual Assist` is configured, resolve and state the actual primary visual adapter for this environment instead of assuming cross-platform skill equivalence.
25
+ - Keep `.da-vinci/designs/` reserved for `.pen` files only.
26
+ - On complex redesigns, design 1-3 anchor surfaces first and treat screenshot review as a binding gate before broad expansion.
24
27
  - Use `intake` when the user does not know how to phrase the first request.
25
28
  - Use `continue` when `.da-vinci/` artifacts already exist and the workflow must resume.
26
29
  - If details are still needed after route selection, provide them in the next message.
@@ -24,6 +24,9 @@ Notes:
24
24
  - Requirements decide behavior.
25
25
  - Pencil decides presentation.
26
26
  - Code must follow both.
27
+ - If `Visual Assist` is configured, resolve and state the actual primary visual adapter for this environment instead of assuming cross-platform skill equivalence.
28
+ - Keep `.da-vinci/designs/` reserved for `.pen` files only.
29
+ - On complex redesigns, design 1-3 anchor surfaces first and treat screenshot review as a binding gate before broad expansion.
27
30
  - Use `intake` when the user needs help phrasing the first workflow request.
28
31
  - Use `continue` when `.da-vinci/` artifacts already exist and the workflow must resume.
29
32
  - Keep workflow semantics shared across Claude, Codex, and Gemini.
@@ -42,6 +42,7 @@ Rule:
42
42
  - only `DA-VINCI.md` belongs at the project root
43
43
  - all other workflow outputs should stay under `.da-vinci/`
44
44
  - persisted project-local Pencil files should stay under `.da-vinci/designs/`
45
+ - `.da-vinci/designs/` should contain `.pen` files only, not workflow markdown
45
46
 
46
47
  ## Quick mode selection
47
48
 
@@ -324,9 +325,11 @@ Register the design sources, extract DA-VINCI.md from them, bind covered pages,
324
325
 
325
326
  6. create or update `pencil-design.md`
326
327
  - build the new redesign baseline in Pencil
328
+ - write the visual thesis, content plan, interaction thesis, and structural-delta notes before broad anchor generation
327
329
  - design 1-3 anchor surfaces first before broad multi-screen expansion
328
330
  - let the resolved primary visual adapter lead that first pass
329
331
  - persist that baseline into the registered `.da-vinci/designs/` file
332
+ - verify that registered `.pen` path is shell-visible immediately after the first successful Pencil write
330
333
 
331
334
  7. create or update `pencil-bindings.md`
332
335
  - bind pages to redesign screens
@@ -342,9 +345,16 @@ Register the design sources, extract DA-VINCI.md from them, bind covered pages,
342
345
  ### Critical rule in this mode
343
346
 
344
347
  - treat the resolved primary visual adapter as the first-pass design lead when `Preferred adapters` are configured
348
+ - state the resolved primary adapter explicitly at runtime, including which requested adapters were unavailable
349
+ - do not assume cross-platform equivalence between near-name adapters; resolve the installed adapter names for the current environment
350
+ - when a primary adapter is active, write the visual thesis, content plan, and interaction thesis before the first anchor screen
345
351
  - do not let Pencil guides or generic style packs replace that adapter as the art-direction source
346
352
  - do not start broad redesign work by scaffolding many empty screens
347
353
  - for complex products, get 1-3 anchor surfaces through screenshot review before expanding the rest of the redesign
354
+ - for each anchor surface, explain briefly how the new composition differs from the current layout grouping
355
+ - do not auto-pass screenshot review if the analysis reports hierarchy, spacing, clarity, inconsistency, or unresolved-placeholder issues
356
+ - define a small shared primitive family from the approved anchor surfaces before broad page expansion
357
+ - use only Pencil-supported properties; do not rely on web-only props such as `flex` or `margin`
348
358
 
349
359
  For redesign work:
350
360
 
@@ -362,6 +372,7 @@ Fresh-layout rule:
362
372
  Project-local `.pen` rule:
363
373
 
364
374
  - the preferred `.pen` path in `design-registry.md` is owned by the workflow, not by user hand-editing
375
+ - keep `.da-vinci/designs/` reserved for `.pen` files rather than workflow markdown
365
376
  - do not keep redesign work inside an unrelated active Pencil editor just because it is currently open
366
377
  - if Pencil MCP does not materialize the registered shell-visible file automatically, reconstruct and write that `.pen` file before mapping or implementation is treated as complete
367
378
 
@@ -43,9 +43,17 @@ Inventory activities, fragments, tabs, dialogs, bottom sheets, nested flows, ove
43
43
  Decompose complex screens into subpages, overlays, materially different states, and implementation surfaces.
44
44
  Use the Visual Assist preferences declared in DA-VINCI.md.
45
45
  Treat the resolved primary visual adapter as the first-pass design lead.
46
+ State the resolved primary visual adapter explicitly in the log and name any requested adapters that are unavailable.
47
+ Before the first anchor surface, write a visual thesis, content plan, and interaction thesis.
46
48
  Use Pencil guides only as layout constraints, not as the design direction.
47
49
  Do not start with broad multi-screen scaffolding.
48
50
  Design 1-3 anchor surfaces first, review screenshots, then expand.
51
+ For each anchor surface, explain how the new composition differs structurally from the current layout.
52
+ Do not treat screenshot analysis as an automatic pass if it reports hierarchy, spacing, clarity, or inconsistency issues.
53
+ Use only Pencil-supported properties; do not use web-only props like flex or margin.
54
+ Verify the registered project-local `.pen` file exists as a shell-visible file after the first Pencil write.
55
+ Keep non-`.pen` workflow artifacts out of `.da-vinci/designs/`.
56
+ Define shared primitives from the approved anchor surfaces before broad page expansion.
49
57
  Do not pass design checkpoint if the result is a skin-swap of the old UI, a generic card grid, repeated placeholder templates, or weak visual anchors.
50
58
  Persist project-local Pencil files under .da-vinci/designs/.
51
59
  ```
@@ -116,6 +116,7 @@ Use the fields like this:
116
116
  - the priority list of local skills you want Da Vinci to try first
117
117
  - order matters
118
118
  - if multiple listed skills are available, Da Vinci should still resolve one primary adapter
119
+ - do not assume cross-platform equivalence between near-name adapters such as `frontend-skill` and `frontend-design`; resolve the actual installed adapter names for the current environment
119
120
  - `Scope`
120
121
  - the only areas where adapters are allowed to influence the workflow
121
122
  - keep this limited to presentation-quality work such as composition, spacing, and Pencil refinement
@@ -178,9 +179,12 @@ Recommended fields:
178
179
  ```md
179
180
  ## Visual Adapter Resolution
180
181
  - Requested adapters: frontend-skill, ui-ux-pro-max
182
+ - Available requested adapters: frontend-skill
183
+ - Unavailable requested adapters: none
181
184
  - Resolved primary adapter: frontend-skill
182
185
  - Secondary helpers: none
183
186
  - Status: active
187
+ - Runtime declaration: explicitly stated before first anchor pass
184
188
  - Scope: DA-VINCI.md, design.md, pencil-design.md
185
189
  - Fallback reason if native Da Vinci rules were used: none
186
190
  ```
@@ -203,6 +207,8 @@ When a visual adapter is active:
203
207
 
204
208
  - use it before or during Pencil work to sharpen composition and hierarchy
205
209
  - treat the resolved primary adapter as the art-direction lead for the first pass, not as a note that merely gets copied into `design-registry.md`
210
+ - explicitly state the resolved primary adapter in the runtime log before the first anchor-screen pass
211
+ - write a visual thesis, content plan, and interaction thesis before the first anchor-screen pass under that adapter's lead
206
212
  - keep page names and states aligned with `page-map.md`
207
213
  - keep final `.pen` decisions grounded in Pencil, not in adapter prose
208
214
 
@@ -211,7 +217,10 @@ For complex redesigns:
211
217
  - do not start by scaffolding many screens with empty placeholders
212
218
  - design 1-3 anchor surfaces first
213
219
  - make each anchor surface fully composed before broad expansion
220
+ - for each anchor surface, explain briefly how the new composition differs structurally from the current layout
214
221
  - use screenshot review on each anchor surface before cloning variants or expanding the rest of the product
222
+ - do not treat screenshot analysis as an automatic pass; if the review flags hierarchy, spacing, clarity, inconsistency, or unresolved-placeholder issues, revise before expanding
223
+ - define a small shared primitive family from the approved anchor surfaces before broad page expansion
215
224
  - if the output is still placeholder-heavy or repetitious, mark `design checkpoint` as `BLOCK` and reset from the anchor surfaces instead of layering more screens on top
216
225
 
217
226
  Record the outcome in `pencil-design.md`.
@@ -80,11 +80,13 @@ Expected flow:
80
80
  4. define redesign scope in `proposal.md`
81
81
  5. split broad redesign work into `specs/<slice>/spec.md` files when one large `ui-refresh` spec would be too coarse
82
82
  6. rebuild or refine `page-map.md`, including subpages, overlays, and materially different states
83
- 7. create new or updated Pencil pages from fresh composition rather than a recolor of the old UI, preferring persistence under `.da-vinci/designs/`
84
- 8. run `design-source checkpoint` to confirm the registered project-local `.pen` path, the active Pencil source, and the shell-visible file all agree
85
- 9. bind routes and pages to Pencil screens
86
- 10. generate tasks aligned to the redesign slices
87
- 11. build and verify
83
+ 7. write the visual thesis, content plan, interaction thesis, and structural-delta notes for the anchor surfaces
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
+ 9. verify the registered project-local `.pen` path becomes shell-visible immediately after the first successful Pencil write
86
+ 10. run `design-source checkpoint` to confirm the registered project-local `.pen` path, the active Pencil source, and the shell-visible file all agree
87
+ 11. bind routes and pages to Pencil screens
88
+ 12. generate tasks aligned to the redesign slices
89
+ 13. build and verify
88
90
 
89
91
  ### Complex Android example
90
92
 
@@ -95,8 +97,16 @@ Existing code is the behavior source of truth, not the layout truth.
95
97
  Inventory activities, fragments, tabs, dialogs, bottom sheets, nested flows, and important states.
96
98
  Decompose complex screens into separate design surfaces before Pencil work.
97
99
  Use frontend-skill explicitly as the primary visual reasoning source.
100
+ State the resolved primary visual adapter explicitly in the log before the first anchor surface.
101
+ Write a visual thesis, content plan, and interaction thesis before the first anchor surface.
102
+ Use Pencil guides only as layout constraints, not as the design direction.
98
103
  Do not start with broad multi-screen scaffolding.
99
104
  Design 1-3 anchor surfaces first, review screenshots, then expand.
105
+ For each anchor surface, explain how the new composition differs structurally from the current layout.
106
+ Do not treat screenshot analysis as an automatic pass if it reports hierarchy, spacing, clarity, or inconsistency issues.
107
+ Use only Pencil-supported properties; do not use web-only props like flex or margin.
108
+ Verify the registered project-local `.pen` file exists as a shell-visible file after the first Pencil write.
109
+ Keep `.da-vinci/designs/` reserved for `.pen` files only.
100
110
  Do not pass design checkpoint if the result is just a skin-swap of the old UI.
101
111
  ```
102
112
 
@@ -35,6 +35,7 @@ project/
35
35
  - `DA-VINCI.md` 放根目录
36
36
  - 其他工作流工件放 `.da-vinci/`
37
37
  - 项目内持久化的 Pencil `.pen` 文件默认放 `.da-vinci/designs/`
38
+ - `.da-vinci/designs/` 里只应该放 `.pen` 文件,不应该混入工作流 markdown
38
39
 
39
40
  ## 快速选 mode
40
41
 
@@ -134,9 +135,11 @@ Da Vinci 应该:
134
135
  - 把复杂页面拆成 subpage、state、overlay、fragment surface
135
136
  7. 生成 `design.md`
136
137
  8. 生成 `pencil-design.md`
138
+ - 在大规模 anchor 设计前,先写 visual thesis、content plan、interaction thesis 和 structural-delta 说明
137
139
  - 先做 1 到 3 个 anchor surface,再扩展更多页面
138
140
  - 首轮设计由解析出来的主 visual adapter 主导
139
141
  - 把新的 Pencil 基线真正落到登记好的 `.da-vinci/designs/` 路径
142
+ - 在第一次成功写入 Pencil 后,立即验证登记的 `.pen` 路径已经成为 shell 可见文件
140
143
  9. 生成 `pencil-bindings.md`
141
144
  10. 生成 `tasks.md`
142
145
  11. 进入实现
@@ -147,13 +150,21 @@ Da Vinci 应该:
147
150
  - `redesign-from-code` 默认应该基于页面职责和状态重新构图
148
151
  - 不能把“旧页面换个配色、换点间距、挪一点位置”当成真正的重设计
149
152
  - 一旦配置了 `Preferred adapters`,解析出来的主 adapter 应该主导首轮设计,而不是只登记不使用
153
+ - 运行时必须明确声明解析出来的主 adapter,以及哪些请求的 adapter 当前不可用
154
+ - 不要把跨平台的近名 adapter 默认当成同一个能力源,应该按当前环境里真实安装的名字解析
155
+ - 当主 adapter 生效时,先写 visual thesis、content plan 和 interaction thesis,再开始第一个 anchor screen
150
156
  - 不要让 Pencil 的 guide 或样式模板取代主 adapter 成为设计方向来源
151
157
  - 不要一上来就批量搭很多空 screen
152
158
  - 对复杂产品,先把 1 到 3 个 anchor surface 做到通过截图审查,再扩展其他页面
159
+ - 对每个 anchor surface,都要说明“新的构图与当前布局结构相比具体改了什么”
160
+ - 只要截图分析指出 hierarchy、spacing、clarity、inconsistency 或 unresolved placeholder 问题,就不能自动判通过
161
+ - 在扩展更多页面前,先从已通过的 anchor surface 中抽出一组 shared primitives
162
+ - 只使用 Pencil 支持的属性,不要继续使用 `flex`、`margin` 这类 Web/CSS 属性
153
163
  - 一个实现页如果包含多个 Fragment、多个 tab、多个状态或多个 overlay,应该拆成多个设计 surface
154
164
  - `design-registry.md` 里的首选 `.pen` 路径由工作流自动维护,不应该依赖用户手工填写
155
165
  - 不要因为当前 Pencil 里正好打开了一个文档,就直接在那个文档上继续做重设计
156
166
  - 如果 Pencil MCP 没有自动把登记路径的 `.pen` 文件落到磁盘,就应该先补写这个项目内文件,再把 mapping 或 implementation 视为完成
167
+ - `.da-vinci/designs/` 应该只作为 `.pen` 目录使用,不应该混入 inventory、proposal 之类的 markdown
157
168
 
158
169
  ## 4. `feature-change`
159
170
 
@@ -43,9 +43,17 @@ Inventory activities, fragments, tabs, dialogs, bottom sheets, nested flows, ove
43
43
  Decompose complex screens into subpages, overlays, materially different states, and implementation surfaces.
44
44
  Use the Visual Assist preferences declared in DA-VINCI.md.
45
45
  Treat the resolved primary visual adapter as the first-pass design lead.
46
+ State the resolved primary visual adapter explicitly in the log and name any requested adapters that are unavailable.
47
+ Before the first anchor surface, write a visual thesis, content plan, and interaction thesis.
46
48
  Use Pencil guides only as layout constraints, not as the design direction.
47
49
  Do not start with broad multi-screen scaffolding.
48
50
  Design 1-3 anchor surfaces first, review screenshots, then expand.
51
+ For each anchor surface, explain how the new composition differs structurally from the current layout.
52
+ Do not treat screenshot analysis as an automatic pass if it reports hierarchy, spacing, clarity, or inconsistency issues.
53
+ Use only Pencil-supported properties; do not use web-only props like flex or margin.
54
+ Verify the registered project-local `.pen` file exists as a shell-visible file after the first Pencil write.
55
+ Keep non-`.pen` workflow artifacts out of `.da-vinci/designs/`.
56
+ Define shared primitives from the approved anchor surfaces before broad page expansion.
49
57
  Do not pass design checkpoint if the result is a skin-swap of the old UI, a generic card grid, repeated placeholder templates, or weak visual anchors.
50
58
  Persist project-local Pencil files under .da-vinci/designs/.
51
59
  ```
@@ -118,6 +118,7 @@ visual adapter 是可选的 presentation 质量增强层。
118
118
  - 你希望 Da Vinci 优先尝试的本地 skill 列表
119
119
  - 顺序有意义
120
120
  - 即使多个 skill 都可用,最终也应该收敛出一个 primary adapter
121
+ - 不要把不同平台上的近名 adapter(例如 `frontend-skill` 和 `frontend-design`)默认当成同一个能力源,应该按当前环境里真实已安装、真实命名的 adapter 来解析
121
122
  - `Scope`
122
123
  - adapter 被允许影响的范围
123
124
  - 应该限制在构图、层级、spacing、Pencil refinement 这类 presentation 质量问题
@@ -180,9 +181,12 @@ adapter 的解析顺序建议固定为:
180
181
  ```md
181
182
  ## Visual Adapter Resolution
182
183
  - Requested adapters: frontend-skill, ui-ux-pro-max
184
+ - Available requested adapters: frontend-skill
185
+ - Unavailable requested adapters: none
183
186
  - Resolved primary adapter: frontend-skill
184
187
  - Secondary helpers: none
185
188
  - Status: active
189
+ - Runtime declaration: explicitly stated before first anchor pass
186
190
  - Scope: DA-VINCI.md, design.md, pencil-design.md
187
191
  - Fallback reason if native Da Vinci rules were used: none
188
192
  ```
@@ -205,6 +209,8 @@ adapter 的解析顺序建议固定为:
205
209
 
206
210
  - 在 Pencil 设计前或设计过程中,用它来增强构图和层级判断
207
211
  - 解析出来的主 adapter 应该成为首轮设计的 art direction 主导,而不是只登记在 `design-registry.md` 里
212
+ - 在第一个 anchor screen 设计前,必须在运行日志里明确写出解析结果
213
+ - 在第一个 anchor screen 之前,先在这个 adapter 的主导下写出 visual thesis、content plan 和 interaction thesis
208
214
  - 页面命名和状态覆盖仍然要服从 `page-map.md`
209
215
  - 最终 presentation 真相仍然落在 Pencil `.pen` 数据里,而不是 adapter 的文字建议里
210
216
 
@@ -213,7 +219,10 @@ adapter 的解析顺序建议固定为:
213
219
  - 不要一开始就批量搭很多空 screen
214
220
  - 先做 1 到 3 个 anchor surface
215
221
  - 每个 anchor surface 都要先做成完整构图,再扩展更多页面
222
+ - 对每个 anchor surface,都要简短说明“新的构图与当前布局结构相比,具体改了什么”
216
223
  - 每做完一个 anchor surface 都先截图审查,再决定是否 clone 变体或继续扩展
224
+ - 不要把截图分析结果自动当作通过;只要它指出 hierarchy、spacing、clarity、inconsistency 或 unresolved placeholder 问题,就应该先修再继续
225
+ - 在扩展更多页面前,先从已通过的 anchor surface 中抽出一组 shared primitives
217
226
  - 如果结果仍然大量是占位块或重复模板,直接把 `design checkpoint` 判成 `BLOCK`,不要在坏底稿上继续叠更多页面
218
227
 
219
228
  把结果记录到 `pencil-design.md`。
@@ -91,11 +91,13 @@ $da-vinci use redesign-from-code to inventory the current app, identify current
91
91
  4. 在 `proposal.md` 中定义重设计范围
92
92
  5. 当范围过大时,把工作拆成多个 `specs/<slice>/spec.md`
93
93
  6. 重建或细化 `page-map.md`,把 subpage、overlay、重要 state 一起拆出来
94
- 7. 创建新的或更新后的 Pencil 页面,基于重新构图而不是旧 UI 换皮,并优先持久化到 `.da-vinci/designs/`
95
- 8. 运行 `design-source checkpoint`,确认登记的项目内 `.pen` 路径、当前 Pencil 设计源和 shell 可见文件是一致的
96
- 9. 绑定路由和 Pencil 页面
97
- 10. 生成和 redesign slice 对齐的任务
98
- 11. 实现并验证
94
+ 7. 先写出 anchor surface visual thesis、content plan、interaction thesis 和 structural-delta 说明
95
+ 8. 创建新的或更新后的 Pencil 页面,基于重新构图而不是旧 UI 换皮,并优先持久化到 `.da-vinci/designs/`
96
+ 9. 在第一次成功写入 Pencil 后,立即验证登记的项目内 `.pen` 路径已经成为 shell 可见文件
97
+ 10. 运行 `design-source checkpoint`,确认登记的项目内 `.pen` 路径、当前 Pencil 设计源和 shell 可见文件是一致的
98
+ 11. 绑定路由和 Pencil 页面
99
+ 12. 生成和 redesign slice 对齐的任务
100
+ 13. 实现并验证
99
101
 
100
102
  ### 复杂 Android 页面示例
101
103
 
@@ -106,8 +108,16 @@ Existing code is the behavior source of truth, not the layout truth.
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.
111
+ State the resolved primary visual adapter explicitly in the log before the first anchor surface.
112
+ Write a visual thesis, content plan, and interaction thesis before the first anchor surface.
113
+ Use Pencil guides only as layout constraints, not as the design direction.
109
114
  Do not start with broad multi-screen scaffolding.
110
115
  Design 1-3 anchor surfaces first, review screenshots, then expand.
116
+ For each anchor surface, explain how the new composition differs structurally from the current layout.
117
+ Do not treat screenshot analysis as an automatic pass if it reports hierarchy, spacing, clarity, or inconsistency issues.
118
+ Use only Pencil-supported properties; do not use web-only props like flex or margin.
119
+ Verify the registered project-local `.pen` file exists as a shell-visible file after the first Pencil write.
120
+ Keep `.da-vinci/designs/` reserved for `.pen` files only.
111
121
  Do not pass design checkpoint if the result is just a skin-swap of the old UI.
112
122
  ```
113
123
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xenonbyte/da-vinci-workflow",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "Requirement-to-design-to-code workflow skill for Codex, Claude, and Gemini",
5
5
  "bin": {
6
6
  "da-vinci": "bin/da-vinci.js"
@@ -11,6 +11,7 @@ Write artifacts into the target project using this rule:
11
11
  - keep `DA-VINCI.md` at the project root
12
12
  - keep project-level workflow files in `.da-vinci/`
13
13
  - keep project-local Pencil `.pen` files in `.da-vinci/designs/`
14
+ - keep workflow markdown out of `.da-vinci/designs/`; that directory is reserved for `.pen` sources only
14
15
  - keep change-level workflow files in `.da-vinci/changes/<change-id>/`
15
16
 
16
17
  Recommended placement:
@@ -86,6 +87,10 @@ Use this structure:
86
87
  - Route
87
88
  - Page purpose
88
89
 
90
+ ## Implementation Surfaces
91
+ - Activity / fragment / tab / dialog / sheet / overlay
92
+ - Materially different states
93
+
89
94
  ## UI Regions
90
95
  - Shared layout regions
91
96
  - Repeated page patterns
@@ -241,9 +246,12 @@ Use this structure:
241
246
 
242
247
  ## Visual Adapter Resolution
243
248
  - Requested adapters
249
+ - Available requested adapters
250
+ - Unavailable requested adapters
244
251
  - Resolved primary adapter
245
252
  - Secondary helpers
246
253
  - Status: active / fallback / unavailable
254
+ - Whether runtime execution explicitly declared the resolved primary adapter
247
255
  - Scope
248
256
  - Fallback reason if native Da Vinci rules were used
249
257
 
@@ -255,6 +263,7 @@ Use this structure:
255
263
  - Why a source is active
256
264
  - Whether a source is safe to iterate
257
265
  - Whether shell-visible filesystem persistence exists
266
+ - Whether shell-visible persistence was verified immediately after the first Pencil write
258
267
  - Whether the file had to be reconstructed from MCP-readable document data
259
268
  ```
260
269
 
@@ -399,9 +408,23 @@ Use this structure:
399
408
  ```md
400
409
  # Design
401
410
 
411
+ ## Visual Thesis
412
+ - One-sentence art-direction statement
413
+
414
+ ## Content Plan
415
+ - Primary anchor
416
+ - Supporting rail
417
+ - Action lane
418
+
419
+ ## Interaction Thesis
420
+ - Motion or presence ideas that affect hierarchy or affordance
421
+
402
422
  ## Page Map
403
423
  - Pages and sections
404
424
 
425
+ ## Structural Delta From Current Layout
426
+ - For each anchor surface, how the new composition differs from the current XML or layout grouping
427
+
405
428
  ## Interaction Model
406
429
  - Primary actions
407
430
  - Secondary actions
@@ -415,6 +438,12 @@ Use this structure:
415
438
  - Reusable blocks
416
439
  - Page-specific blocks
417
440
 
441
+ ## Shared Primitive Plan
442
+ - Top bar
443
+ - Segmented tabs
444
+ - Metric rails
445
+ - Tiles, rows, trays, overlays
446
+
418
447
  ## Content Notes
419
448
  - Key text
420
449
  - Priority order
@@ -442,16 +471,26 @@ Use this structure:
442
471
 
443
472
  ## Visual Adapter Use
444
473
  - Resolved primary adapter
474
+ - Available requested adapters
475
+ - Unavailable requested adapters
445
476
  - Secondary helpers
477
+ - Whether runtime execution explicitly declared the resolved primary adapter
446
478
  - Whether the primary adapter actively led the first-pass composition
447
479
  - How it affected composition, hierarchy, or motion guidance
448
480
  - Whether native Da Vinci fallback was used
449
481
 
450
482
  ## Anchor Surfaces
451
483
  - Which 1-3 anchor screens were designed first
484
+ - Structural-delta summary for each anchor surface
452
485
  - Screenshot review status for each anchor
486
+ - Whether screenshot review found hierarchy, spacing, clarity, or inconsistency issues
487
+ - Whether each anchor was revised after screenshot review
453
488
  - Whether broad multi-screen expansion is approved yet
454
489
 
490
+ ## Shared Primitives
491
+ - Reusable UI family extracted from the approved anchors
492
+ - Whether broad page expansion happened before or after the primitive family was defined
493
+
455
494
  ## Page Mapping
456
495
  - Requirement -> Pencil page
457
496
 
@@ -470,6 +509,7 @@ Use this structure:
470
509
  ## Implementation Notes
471
510
  - Important layout or styling constraints to preserve in code
472
511
  - Persistence notes if the project-local `.pen` file had to be reconstructed from MCP-readable document data
512
+ - Confirmation that `.da-vinci/designs/` was used only for `.pen` files
473
513
  ```
474
514
 
475
515
  Recommended path:
@@ -37,6 +37,7 @@ Use the design checkpoint to confirm:
37
37
  - the current Pencil pages follow the same visual baseline
38
38
  - later pages are not re-inventing the product style from scratch
39
39
  - `redesign-from-code` is not treating the old UI layout as the new design baseline
40
+ - non-design workflow markdown is not being written into `.da-vinci/designs/`, which should stay reserved for project-local `.pen` sources
40
41
 
41
42
  ## `discovery checkpoint`
42
43
 
@@ -49,6 +50,7 @@ Check:
49
50
  - product form factor and visual direction are known, inferred, or explicitly deferred
50
51
  - candidate pages or current pages are clear enough to move into `page-map.md`
51
52
  - open questions are explicitly tracked
53
+ - workflow artifacts are being written to standard locations, especially keeping `.da-vinci/designs/` for `.pen` files rather than markdown notes
52
54
 
53
55
  Result meanings:
54
56
 
@@ -94,12 +96,16 @@ Check:
94
96
  - major layout strategy matches the design artifact
95
97
  - Pencil names and artifact names are aligned enough to implement from
96
98
  - Pencil pages follow the current `DA-VINCI.md` visual contract
99
+ - runtime logs or artifacts explicitly name the requested adapters, which were available, which were unavailable, and which adapter was resolved as primary
97
100
  - if visual adapters were requested, the resolved primary adapter clearly shaped the first design pass instead of being recorded only as metadata
101
+ - when a primary adapter is active, the workflow wrote a visual thesis, content plan, and interaction thesis before broad anchor-surface generation
98
102
  - complex redesigns have 1-3 fully composed anchor surfaces reviewed before broad multi-screen expansion
103
+ - each anchor surface includes a short explanation of how its composition differs structurally from the current layout truth
99
104
  - each page has a clear visual anchor or primary working surface
100
105
  - section hierarchy is readable without relying on decorative chrome
101
106
  - the design does not collapse into generic card-grid or border-heavy filler UI
102
107
  - the design is not placeholder-heavy or built from repeated empty templates masquerading as finished screens
108
+ - shared primitives or a reusable component family are identified before the workflow expands a multi-surface redesign from the anchor pages
103
109
  - motion ideas, if present, improve hierarchy or affordance instead of adding noise
104
110
  - complex pages with multiple fragments, subpages, overlays, or materially different states are decomposed clearly enough to design and implement from
105
111
  - `redesign-from-code` output is a fresh composition driven by page responsibility and state, not a skin-swap of the old UI
@@ -115,6 +121,8 @@ Automatic failures:
115
121
  - if broad Pencil generation starts before anchor surfaces are compositionally stable, treat the design checkpoint as `BLOCK`
116
122
  - if more than roughly 20% of a screen's primary content area is unresolved placeholder scaffolding, treat the design checkpoint as `BLOCK`
117
123
  - if multiple screens are effectively the same scaffold with title changes, treat the design checkpoint as `BLOCK`
124
+ - if screenshot review or image analysis calls out hierarchy, spacing, clarity, inconsistency, or unresolved-placeholder issues and the workflow marks the screen as passed without revision, treat the design checkpoint as `BLOCK`
125
+ - if a redesign screen materially mirrors the current XML grouping with only recolor, spacing tweaks, or minor rearrangement, treat the design checkpoint as `BLOCK`
118
126
 
119
127
  ## `design-source checkpoint`
120
128
 
@@ -125,8 +133,9 @@ Check:
125
133
  - `design-registry.md` records one specific preferred project-local `.pen` path
126
134
  - the preferred `.pen` path is workflow-owned state, not a hand-wavy placeholder
127
135
  - the active Pencil editor path matches the preferred project-local `.pen` path, or the mismatch has been reconciled explicitly
128
- - if the workflow created or edited Pencil work, the preferred project-local `.pen` file exists as a shell-visible file
136
+ - if the workflow created or edited Pencil work, the preferred project-local `.pen` file exists as a shell-visible file immediately after the first successful Pencil write, not just at workflow close
129
137
  - if Pencil MCP only exposed a live document, the workflow reconstructed and wrote the registered project-local `.pen` file from MCP-readable document data before continuing
138
+ - `.da-vinci/designs/` is being used cleanly for project-local `.pen` files rather than mixed with workflow markdown
130
139
  - `design-registry.md`, `pencil-design.md`, and `pencil-bindings.md` describe the same active project-local `.pen` source clearly enough to map and implement from
131
140
 
132
141
  Result meanings:
@@ -9,6 +9,7 @@ Check for `DA-VINCI.md` first, then check whether the project already has persis
9
9
  - if it exists, treat it as the project visual contract
10
10
  - if `DA-VINCI.md` declares preferred visual adapters, treat them as optional design-assist preferences
11
11
  - if `.da-vinci/designs/*.pen` exists, treat those files as project-local design inputs and record the exact preferred path in `design-registry.md`
12
+ - treat non-`.pen` files inside `.da-vinci/designs/` as artifact-placement drift that must be corrected instead of as valid design inputs
12
13
  - if it does not exist, generate it from the best stable inputs before broad Pencil page generation
13
14
  - avoid re-deriving the visual language page by page
14
15
 
@@ -107,9 +108,16 @@ If Pencil creates or updates a baseline during the workflow:
107
108
  If the project requests a visual adapter:
108
109
 
109
110
  - try to resolve it from locally available skills
111
+ - do not assume that near-name adapters on different platforms are equivalent; resolve only adapters that are explicitly named and installed in the current environment unless the project intentionally maps them
110
112
  - choose one primary adapter when multiple helpers are available
111
- - record the requested adapters, resolved primary adapter, any secondary helpers, and fallback result in `design-registry.md`
113
+ - record the requested adapters, which were available, which were unavailable, the resolved primary adapter, any secondary helpers, and fallback result in `design-registry.md`
112
114
  - treat the resolved primary adapter as the design lead for the first Pencil pass, especially for anchor screens and other quality-critical surfaces
115
+ - if the resolved primary adapter is active, state that resolution explicitly in the runtime log before the first anchor-screen pass and let it shape the visual thesis, content plan, and interaction thesis
113
116
  - use Pencil guides or style helpers only as platform and buildability constraints, not as the art-direction source
114
117
  - if `Require Adapter: true` and the requested adapter is unavailable, block instead of silently downgrading the visual bar
115
118
  - if no adapter is available, continue with native Da Vinci design rules unless the user explicitly required a specific adapter
119
+
120
+ For `redesign-from-code` on complex products:
121
+
122
+ - write a short structural-delta note for each anchor surface explaining how the new composition differs from the current layout grouping
123
+ - keep those notes in `design.md` or `pencil-design.md` before broad multi-screen generation begins
@@ -40,10 +40,28 @@ If the project resolved a visual adapter:
40
40
 
41
41
  - use it to lead early composition, hierarchy, spacing discipline, and motion suggestions before or during Pencil design work
42
42
  - on complex redesigns, apply it first to 1-3 anchor surfaces before expanding the rest of the screen set
43
+ - if it is active, make that resolution explicit in the runtime log and let it shape the visual thesis, content plan, and interaction thesis before the first anchor screen
43
44
  - do not let Pencil guides, generic style packs, or repeated scaffolding override the resolved primary adapter's role in the first-pass art direction
44
45
  - do not let it override behavior, route truth, or page-state truth
45
46
  - treat it as a presentation-quality assistant, not as a replacement for Pencil or requirements
46
47
 
48
+ For `redesign-from-code`:
49
+
50
+ - preserve behavior from the current codebase, not the current layout grouping
51
+ - write a short structural-delta note for each anchor surface explaining how the new composition differs from the current XML or screen grouping
52
+ - if the result still mirrors the old layout with only recolor or spacing tweaks, treat it as a failed redesign pass
53
+
54
+ ## Pencil Operation Discipline
55
+
56
+ When generating or editing Pencil data:
57
+
58
+ - use only Pencil-supported properties and layout concepts
59
+ - do not emit web- or CSS-only properties such as `flex` or `margin`
60
+ - prefer smaller, schema-safe batches on anchor screens so errors do not roll back large composition chunks
61
+ - verify the registered project-local `.pen` path becomes shell-visible immediately after the first successful Pencil write
62
+ - keep workflow markdown out of `.da-vinci/designs/`; reserve that directory for `.pen` files only
63
+ - after the first approved anchor surfaces, extract a shared primitive family before broad page expansion
64
+
47
65
  ## Map Pencil To Frontend
48
66
 
49
67
  Use these default mappings:
@@ -78,4 +96,5 @@ Before treating the code as complete:
78
96
  - compare major sections against Pencil
79
97
  - compare headline and CTA hierarchy against Pencil
80
98
  - compare panel grouping against Pencil
99
+ - compare the implemented structure against the approved structural-delta notes for anchor surfaces
81
100
  - note any intentional deviations
@@ -93,3 +93,9 @@ Keep these stable:
93
93
  - prompt helper semantics
94
94
 
95
95
  Platform adapters may differ in command syntax, but not in workflow semantics.
96
+
97
+ Visual-adapter names may differ across platforms.
98
+
99
+ - do not assume that near-name adapters such as `frontend-skill` and `frontend-design` are equivalent
100
+ - resolve the actual installed adapter names for the current environment
101
+ - record the requested adapters, available adapters, unavailable adapters, and resolved primary adapter explicitly in runtime artifacts