@xenonbyte/da-vinci-workflow 0.1.9 → 0.1.11
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 +16 -0
- package/README.md +88 -6
- package/README.zh-CN.md +84 -3
- package/SKILL.md +68 -8
- package/docs/codex-natural-language-usage.md +4 -0
- package/docs/mode-use-cases.md +32 -11
- package/docs/prompt-entrypoints.md +4 -0
- package/docs/prompt-presets/README.md +27 -0
- package/docs/prompt-presets/desktop-app.md +46 -0
- package/docs/prompt-presets/mobile-app.md +46 -0
- package/docs/prompt-presets/tablet-app.md +46 -0
- package/docs/prompt-presets/web-app.md +47 -0
- package/docs/visual-adapters.md +82 -0
- package/docs/visual-assist-presets/README.md +11 -0
- package/docs/visual-assist-presets/desktop-app.md +1 -0
- package/docs/visual-assist-presets/mobile-app.md +1 -0
- package/docs/visual-assist-presets/tablet-app.md +1 -0
- package/docs/visual-assist-presets/web-app.md +1 -0
- package/docs/workflow-examples.md +17 -5
- package/docs/zh-CN/codex-natural-language-usage.md +4 -0
- package/docs/zh-CN/mode-use-cases.md +17 -4
- package/docs/zh-CN/prompt-entrypoints.md +4 -0
- package/docs/zh-CN/prompt-presets/README.md +27 -0
- package/docs/zh-CN/prompt-presets/desktop-app.md +46 -0
- package/docs/zh-CN/prompt-presets/mobile-app.md +46 -0
- package/docs/zh-CN/prompt-presets/tablet-app.md +46 -0
- package/docs/zh-CN/prompt-presets/web-app.md +47 -0
- package/docs/zh-CN/visual-adapters.md +82 -0
- package/docs/zh-CN/visual-assist-presets/README.md +11 -0
- package/docs/zh-CN/visual-assist-presets/desktop-app.md +1 -0
- package/docs/zh-CN/visual-assist-presets/mobile-app.md +1 -0
- package/docs/zh-CN/visual-assist-presets/tablet-app.md +1 -0
- package/docs/zh-CN/visual-assist-presets/web-app.md +1 -0
- package/docs/zh-CN/workflow-examples.md +17 -5
- package/package.json +1 -1
- package/references/artifact-templates.md +19 -3
- package/references/checkpoints.md +35 -4
- package/references/design-inputs.md +30 -1
- package/references/page-mapping.md +12 -0
- package/references/pencil-design-to-code.md +7 -1
|
@@ -30,6 +30,15 @@ visual adapter 是可选的 presentation 质量增强层。
|
|
|
30
30
|
|
|
31
31
|
把 visual adapter 偏好写在 `DA-VINCI.md` 里。
|
|
32
32
|
|
|
33
|
+
可以先在下面两种配置里选一种:
|
|
34
|
+
|
|
35
|
+
- 平衡默认版
|
|
36
|
+
- 不阻塞交付
|
|
37
|
+
- 适合大多数 app 和 dashboard
|
|
38
|
+
- 设计质量优先版
|
|
39
|
+
- 主动抬高视觉门槛
|
|
40
|
+
- 适合之前结果很丑、很普通、或太像旧 UI 的场景
|
|
41
|
+
|
|
33
42
|
推荐结构:
|
|
34
43
|
|
|
35
44
|
```md
|
|
@@ -51,6 +60,56 @@ visual adapter 是可选的 presentation 质量增强层。
|
|
|
51
60
|
|
|
52
61
|
只有当你希望“本地没有对应 adapter 就必须停下”时,才把 `Require Adapter` 设成 `true`。
|
|
53
62
|
|
|
63
|
+
## 快速上手配置
|
|
64
|
+
|
|
65
|
+
平衡默认版:
|
|
66
|
+
|
|
67
|
+
```md
|
|
68
|
+
## Visual Assist
|
|
69
|
+
- Preferred adapters:
|
|
70
|
+
- ui-ux-pro-max
|
|
71
|
+
- frontend-skill
|
|
72
|
+
- Scope:
|
|
73
|
+
- visual contract refinement
|
|
74
|
+
- page composition
|
|
75
|
+
- hierarchy and spacing
|
|
76
|
+
- Pencil design refinement
|
|
77
|
+
- Fallback:
|
|
78
|
+
- native-da-vinci
|
|
79
|
+
- Require Adapter:
|
|
80
|
+
- false
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
适用场景:
|
|
84
|
+
|
|
85
|
+
- app、dashboard、桌面工具、高密度产品界面
|
|
86
|
+
- 想提升布局和层级,但本地没有 adapter 时工作流也应该继续
|
|
87
|
+
|
|
88
|
+
设计质量优先版:
|
|
89
|
+
|
|
90
|
+
```md
|
|
91
|
+
## Visual Assist
|
|
92
|
+
- Preferred adapters:
|
|
93
|
+
- frontend-skill
|
|
94
|
+
- ui-ux-pro-max
|
|
95
|
+
- Scope:
|
|
96
|
+
- visual contract refinement
|
|
97
|
+
- page composition
|
|
98
|
+
- hierarchy and spacing
|
|
99
|
+
- motion guidance
|
|
100
|
+
- Pencil design refinement
|
|
101
|
+
- Fallback:
|
|
102
|
+
- native-da-vinci
|
|
103
|
+
- Require Adapter:
|
|
104
|
+
- true
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
适用场景:
|
|
108
|
+
|
|
109
|
+
- 页面视觉要求高,或者面对 premium / brand-sensitive 场景
|
|
110
|
+
- 上一次重设计产出了通用卡片网格、弱锚点或只是旧 UI 换皮
|
|
111
|
+
- 你宁可停下,也不想在没有强本地设计辅助 skill 时继续
|
|
112
|
+
|
|
54
113
|
## 每个字段是什么意思
|
|
55
114
|
|
|
56
115
|
可以这样理解这些字段:
|
|
@@ -77,6 +136,27 @@ visual adapter 是可选的 presentation 质量增强层。
|
|
|
77
136
|
- 优先用 `Fallback: native-da-vinci`
|
|
78
137
|
- `Scope` 保持在视觉质量相关范围内
|
|
79
138
|
|
|
139
|
+
adapter 选择经验:
|
|
140
|
+
|
|
141
|
+
- 高密度 app、dashboard、admin 界面且视觉要求中等时,`ui-ux-pro-max` 更适合放第一位
|
|
142
|
+
- 更强调 art direction、构图质量和克制感时,`frontend-skill` 更适合放第一位
|
|
143
|
+
|
|
144
|
+
## 如果结果还是很丑怎么办
|
|
145
|
+
|
|
146
|
+
如果流程是通的,但 Pencil 结果仍然很平庸或很丑:
|
|
147
|
+
|
|
148
|
+
- 把 `frontend-skill` 提到 `Preferred adapters` 的第一位
|
|
149
|
+
- 在 `DA-VINCI.md` 里把视觉方向写得更明确,不要太宽泛
|
|
150
|
+
- 对设计质量要求很高的项目,可以接受把 `Require Adapter: true`
|
|
151
|
+
- 把 `Scope` 收紧到 composition、hierarchy、Pencil refinement 这些具体能力
|
|
152
|
+
- 在 design checkpoint 里把“堆卡片、弱视觉锚点、装饰性噪音”当成不过关条件
|
|
153
|
+
|
|
154
|
+
对于 `redesign-from-code`,还应该补三句:
|
|
155
|
+
|
|
156
|
+
- 重申 existing code 只是真相行为,不是真相布局
|
|
157
|
+
- 在大规模 Pencil 设计前先拆 activities、fragments、tabs、overlays 和明显不同的 states
|
|
158
|
+
- 明确要求 fresh composition,而不是旧 UI 改色或轻微挪位置
|
|
159
|
+
|
|
80
160
|
## 解析顺序
|
|
81
161
|
|
|
82
162
|
adapter 的解析顺序建议固定为:
|
|
@@ -165,6 +245,8 @@ Persist project-local Pencil files under .da-vinci/designs/.
|
|
|
165
245
|
- `native-da-vinci`
|
|
166
246
|
- 本地没有 adapter,或只需要 Da Vinci 自身规则时使用
|
|
167
247
|
|
|
248
|
+
如果你对设计质量要求很高,即使是 app 界面,也可以把 `frontend-skill` 放到第一位,并把 `native-da-vinci` 只当成兜底。
|
|
249
|
+
|
|
168
250
|
## 场景推荐配置
|
|
169
251
|
|
|
170
252
|
可直接复制的场景模板在这里:
|
|
@@ -9,6 +9,17 @@
|
|
|
9
9
|
- 清晰的作用范围
|
|
10
10
|
- 默认不阻塞工作流
|
|
11
11
|
|
|
12
|
+
建议搭配:
|
|
13
|
+
|
|
14
|
+
- `docs/zh-CN/prompt-presets/`
|
|
15
|
+
|
|
16
|
+
如果项目对设计质量要求很高,或者之前结果很普通、很丑、太像旧 UI:
|
|
17
|
+
|
|
18
|
+
- 仍然先选对应场景模板
|
|
19
|
+
- 把 `frontend-skill` 提到第一位
|
|
20
|
+
- 视情况把 `Require Adapter` 改成 `true`
|
|
21
|
+
- 在大规模 Pencil 设计前先把 design checkpoint 门槛抬高
|
|
22
|
+
|
|
12
23
|
可用模板:
|
|
13
24
|
|
|
14
25
|
- `mobile-app.md`
|
|
@@ -89,11 +89,23 @@ $da-vinci use redesign-from-code to inventory the current app, identify current
|
|
|
89
89
|
3. 在 `design-registry.md` 中登记现有设计源和 visual adapter 解析结果
|
|
90
90
|
4. 在 `proposal.md` 中定义重设计范围
|
|
91
91
|
5. 当范围过大时,把工作拆成多个 `specs/<slice>/spec.md`
|
|
92
|
-
6. 重建或细化 `page-map.md
|
|
93
|
-
7. 创建新的或更新后的 Pencil
|
|
94
|
-
8.
|
|
95
|
-
9.
|
|
96
|
-
10.
|
|
92
|
+
6. 重建或细化 `page-map.md`,把 subpage、overlay、重要 state 一起拆出来
|
|
93
|
+
7. 创建新的或更新后的 Pencil 页面,基于重新构图而不是旧 UI 换皮,并优先持久化到 `.da-vinci/designs/`
|
|
94
|
+
8. 运行 `design-source checkpoint`,确认登记的项目内 `.pen` 路径、当前 Pencil 设计源和 shell 可见文件是一致的
|
|
95
|
+
9. 绑定路由和 Pencil 页面
|
|
96
|
+
10. 生成和 redesign slice 对齐的任务
|
|
97
|
+
11. 实现并验证
|
|
98
|
+
|
|
99
|
+
### 复杂 Android 页面示例
|
|
100
|
+
|
|
101
|
+
```text
|
|
102
|
+
$da-vinci use redesign-from-code to redesign this existing Android app.
|
|
103
|
+
|
|
104
|
+
Existing code is the behavior source of truth, not the layout truth.
|
|
105
|
+
Inventory activities, fragments, tabs, dialogs, bottom sheets, nested flows, and important states.
|
|
106
|
+
Decompose complex screens into separate design surfaces before Pencil work.
|
|
107
|
+
Do not pass design checkpoint if the result is just a skin-swap of the old UI.
|
|
108
|
+
```
|
|
97
109
|
|
|
98
110
|
## 4. `feature-change`
|
|
99
111
|
|
package/package.json
CHANGED
|
@@ -230,12 +230,14 @@ Use this structure:
|
|
|
230
230
|
## Active Design Sources
|
|
231
231
|
- `.pen` file path
|
|
232
232
|
- whether it lives under `.da-vinci/designs/`
|
|
233
|
+
- whether the path is workflow-generated or external
|
|
233
234
|
- status
|
|
234
235
|
- purpose
|
|
235
236
|
|
|
236
237
|
## Preferred Design Source
|
|
237
238
|
- Which `.pen` file is authoritative
|
|
238
239
|
- Why that file should be preferred over live-only or external sources
|
|
240
|
+
- whether the active Pencil editor matches that same path
|
|
239
241
|
|
|
240
242
|
## Visual Adapter Resolution
|
|
241
243
|
- Requested adapters
|
|
@@ -252,7 +254,8 @@ Use this structure:
|
|
|
252
254
|
## Notes
|
|
253
255
|
- Why a source is active
|
|
254
256
|
- Whether a source is safe to iterate
|
|
255
|
-
- Whether
|
|
257
|
+
- Whether shell-visible filesystem persistence exists
|
|
258
|
+
- Whether the file had to be reconstructed from MCP-readable document data
|
|
256
259
|
```
|
|
257
260
|
|
|
258
261
|
Use this artifact whenever a project can have one or more Pencil sources.
|
|
@@ -273,6 +276,15 @@ Use this structure:
|
|
|
273
276
|
- Route or identifier
|
|
274
277
|
- Purpose
|
|
275
278
|
|
|
279
|
+
## Implementation Surfaces
|
|
280
|
+
- Activity / fragment / tab / dialog / sheet / overlay
|
|
281
|
+
- Which canonical page each surface belongs to
|
|
282
|
+
|
|
283
|
+
## Subpages And Overlays
|
|
284
|
+
- Subpage name
|
|
285
|
+
- Overlay name
|
|
286
|
+
- When each one appears
|
|
287
|
+
|
|
276
288
|
## States Per Page
|
|
277
289
|
- Empty
|
|
278
290
|
- Loading
|
|
@@ -293,6 +305,8 @@ Use this structure:
|
|
|
293
305
|
|
|
294
306
|
Use this artifact for every mode. It is the canonical page list.
|
|
295
307
|
|
|
308
|
+
For complex products, do not stop at route names. Record implementation surfaces, subpages, and overlays when they materially affect design work.
|
|
309
|
+
|
|
296
310
|
Recommended path:
|
|
297
311
|
|
|
298
312
|
- `.da-vinci/page-map.md`
|
|
@@ -423,6 +437,7 @@ Use this structure:
|
|
|
423
437
|
## Source
|
|
424
438
|
- `.pen` file path
|
|
425
439
|
- project-local persisted path under `.da-vinci/designs/` when available
|
|
440
|
+
- whether the active Pencil editor matched that same path
|
|
426
441
|
- Active pages
|
|
427
442
|
|
|
428
443
|
## Visual Adapter Use
|
|
@@ -448,7 +463,7 @@ Use this structure:
|
|
|
448
463
|
|
|
449
464
|
## Implementation Notes
|
|
450
465
|
- Important layout or styling constraints to preserve in code
|
|
451
|
-
- Persistence notes if the
|
|
466
|
+
- Persistence notes if the project-local `.pen` file had to be reconstructed from MCP-readable document data
|
|
452
467
|
```
|
|
453
468
|
|
|
454
469
|
Recommended path:
|
|
@@ -495,6 +510,7 @@ Use this structure:
|
|
|
495
510
|
## Source
|
|
496
511
|
- `.pen` file path
|
|
497
512
|
- project-local persisted path under `.da-vinci/designs/` when available
|
|
513
|
+
- whether the active Pencil editor matched that same path
|
|
498
514
|
|
|
499
515
|
## Bindings
|
|
500
516
|
- implementation page or route -> Pencil page or screen
|
|
@@ -505,7 +521,7 @@ Use this structure:
|
|
|
505
521
|
## Notes
|
|
506
522
|
- intentional deviations
|
|
507
523
|
- pages without Pencil coverage yet
|
|
508
|
-
- whether bindings depend on a live-only source that still needs
|
|
524
|
+
- whether bindings depend on a live-only source that still needs reconciliation
|
|
509
525
|
```
|
|
510
526
|
|
|
511
527
|
Use this artifact whenever implementation must trace back to Pencil pages.
|
|
@@ -36,6 +36,7 @@ Use the design checkpoint to confirm:
|
|
|
36
36
|
- `DA-VINCI.md` exists or has been intentionally generated for the current project
|
|
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
|
+
- `redesign-from-code` is not treating the old UI layout as the new design baseline
|
|
39
40
|
|
|
40
41
|
## `discovery checkpoint`
|
|
41
42
|
|
|
@@ -93,12 +94,37 @@ Check:
|
|
|
93
94
|
- major layout strategy matches the design artifact
|
|
94
95
|
- Pencil names and artifact names are aligned enough to implement from
|
|
95
96
|
- Pencil pages follow the current `DA-VINCI.md` visual contract
|
|
97
|
+
- each page has a clear visual anchor or primary working surface
|
|
98
|
+
- section hierarchy is readable without relying on decorative chrome
|
|
99
|
+
- the design does not collapse into generic card-grid or border-heavy filler UI
|
|
100
|
+
- motion ideas, if present, improve hierarchy or affordance instead of adding noise
|
|
101
|
+
- complex pages with multiple fragments, subpages, overlays, or materially different states are decomposed clearly enough to design and implement from
|
|
102
|
+
- `redesign-from-code` output is a fresh composition driven by page responsibility and state, not a skin-swap of the old UI
|
|
96
103
|
|
|
97
104
|
Result meanings:
|
|
98
105
|
|
|
99
106
|
- `PASS`: safe to generate implementation tasks
|
|
100
|
-
- `WARN`: minor design gaps exist
|
|
101
|
-
- `BLOCK`: design is not ready to drive implementation
|
|
107
|
+
- `WARN`: minor design gaps exist, but the visual direction is still coherent
|
|
108
|
+
- `BLOCK`: design is not ready to drive implementation, or the result is generic, cluttered, or materially below the intended visual bar
|
|
109
|
+
|
|
110
|
+
## `design-source checkpoint`
|
|
111
|
+
|
|
112
|
+
Run after `design-registry.md` resolves the preferred project-local `.pen` path and after active Pencil work exists, but before mapping is treated as safe.
|
|
113
|
+
|
|
114
|
+
Check:
|
|
115
|
+
|
|
116
|
+
- `design-registry.md` records one specific preferred project-local `.pen` path
|
|
117
|
+
- the preferred `.pen` path is workflow-owned state, not a hand-wavy placeholder
|
|
118
|
+
- the active Pencil editor path matches the preferred project-local `.pen` path, or the mismatch has been reconciled explicitly
|
|
119
|
+
- if the workflow created or edited Pencil work, the preferred project-local `.pen` file exists as a shell-visible file
|
|
120
|
+
- 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
|
|
121
|
+
- `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
|
|
122
|
+
|
|
123
|
+
Result meanings:
|
|
124
|
+
|
|
125
|
+
- `PASS`: safe to continue into mapping
|
|
126
|
+
- `WARN`: the workflow is intentionally staying on an older but still shell-visible baseline, or no new Pencil edits have happened yet
|
|
127
|
+
- `BLOCK`: the registered `.pen` path, the active Pencil work, and the shell-visible project-local file do not agree well enough to treat the design source as traceable
|
|
102
128
|
|
|
103
129
|
## `mapping checkpoint`
|
|
104
130
|
|
|
@@ -107,6 +133,9 @@ Run after `design-registry.md` and `pencil-bindings.md`.
|
|
|
107
133
|
Check:
|
|
108
134
|
|
|
109
135
|
- the correct `.pen` source is identified
|
|
136
|
+
- the preferred `.pen` path in `design-registry.md` is workflow-owned and specific, not hand-wavy
|
|
137
|
+
- the active Pencil editor path matches the preferred project-local `.pen` path, or the project-local file has been reconstructed explicitly
|
|
138
|
+
- the preferred project-local `.pen` file exists as a shell-visible file when the workflow created or edited Pencil work
|
|
110
139
|
- each implementation page has a Pencil page or an explicit exception
|
|
111
140
|
- shared layouts and shared regions are bound clearly enough to implement from
|
|
112
141
|
- route names and Pencil names are traceable
|
|
@@ -116,7 +145,7 @@ Result meanings:
|
|
|
116
145
|
|
|
117
146
|
- `PASS`: safe to generate implementation tasks
|
|
118
147
|
- `WARN`: some bindings are weak, but implementation can continue carefully
|
|
119
|
-
- `BLOCK`: implementation would guess too much without fixing bindings
|
|
148
|
+
- `BLOCK`: implementation would guess too much without fixing bindings, or the workflow edited Pencil work without producing the required project-local `.pen` source
|
|
120
149
|
|
|
121
150
|
## `task checkpoint`
|
|
122
151
|
|
|
@@ -147,12 +176,14 @@ Examples of `WARN`, not `BLOCK`:
|
|
|
147
176
|
|
|
148
177
|
- an additional follow-up spec may be needed for currently untouched behavior
|
|
149
178
|
- some legacy or out-of-scope surfaces remain intentionally excluded
|
|
150
|
-
- the
|
|
179
|
+
- the project intentionally remains on an older but still shell-visible `.pen` baseline while a new design pass is deferred
|
|
151
180
|
|
|
152
181
|
Examples of `BLOCK`:
|
|
153
182
|
|
|
154
183
|
- the implementation would invent new behavior that has no spec support
|
|
155
184
|
- page-to-Pencil bindings are too weak to know which redesign screen to follow
|
|
185
|
+
- `design-registry.md` points to a project-local `.pen` path, but the workflow actually edited a different live editor document and did not reconcile the mismatch
|
|
186
|
+
- the workflow created or edited Pencil pages but no shell-visible `.pen` file exists under the registered project-local path
|
|
156
187
|
- required permissions, environment access, or protected files are unavailable
|
|
157
188
|
- the implementation would overwrite the project baseline in a destructive way without an explicit go-ahead
|
|
158
189
|
|
|
@@ -12,6 +12,31 @@ Check for `DA-VINCI.md` first, then check whether the project already has persis
|
|
|
12
12
|
- if it does not exist, generate it from the best stable inputs before broad Pencil page generation
|
|
13
13
|
- avoid re-deriving the visual language page by page
|
|
14
14
|
|
|
15
|
+
## Project-Local `.pen` Path Resolution
|
|
16
|
+
|
|
17
|
+
The preferred `.pen` path in `design-registry.md` is workflow-owned state.
|
|
18
|
+
|
|
19
|
+
- it should be generated and maintained by Da Vinci
|
|
20
|
+
- it should not rely on the user manually typing a path into `design-registry.md`
|
|
21
|
+
- external references may influence source priority, but the project-local path should still be resolved explicitly
|
|
22
|
+
|
|
23
|
+
Use these defaults:
|
|
24
|
+
|
|
25
|
+
1. `.da-vinci/designs/project-baseline.pen`
|
|
26
|
+
2. `.da-vinci/designs/<change-id>.pen`
|
|
27
|
+
3. `.da-vinci/designs/<change-id>/main.pen` only when a nested design bundle is truly needed
|
|
28
|
+
|
|
29
|
+
Before broad Pencil work begins:
|
|
30
|
+
|
|
31
|
+
- resolve the exact project-local path
|
|
32
|
+
- record that path in `design-registry.md`
|
|
33
|
+
- treat that path as the required target for the active design pass
|
|
34
|
+
|
|
35
|
+
If Pencil MCP is currently pointing at a different active editor:
|
|
36
|
+
|
|
37
|
+
- switch to the registered project-local path when possible
|
|
38
|
+
- otherwise reconstruct the project-local `.pen` file from MCP-readable document data before treating the workflow as traceable
|
|
39
|
+
|
|
15
40
|
## Minimum Inputs
|
|
16
41
|
|
|
17
42
|
Collect or infer:
|
|
@@ -73,7 +98,11 @@ Write stable answers into `design-brief.md`.
|
|
|
73
98
|
|
|
74
99
|
If `DA-VINCI.md` did not already exist, generate it from those stable answers and save it as the project visual baseline.
|
|
75
100
|
|
|
76
|
-
If Pencil creates or updates a baseline during the workflow
|
|
101
|
+
If Pencil creates or updates a baseline during the workflow:
|
|
102
|
+
|
|
103
|
+
- register the exact project-local path in `design-registry.md`
|
|
104
|
+
- verify that the same path is readable through MCP and shell-visible in the project filesystem
|
|
105
|
+
- if Pencil MCP does not materialize the shell-visible file automatically, reconstruct and write the `.pen` file from MCP-readable document data before closing mapping or implementation work
|
|
77
106
|
|
|
78
107
|
If the project requests a visual adapter:
|
|
79
108
|
|
|
@@ -14,14 +14,17 @@ Treat `pencil-bindings.md` as the source of truth for:
|
|
|
14
14
|
|
|
15
15
|
- implementation page -> Pencil page
|
|
16
16
|
- route -> Pencil screen
|
|
17
|
+
- implementation surface -> Pencil surface
|
|
17
18
|
- shared region -> Pencil region
|
|
18
19
|
|
|
19
20
|
## Mapping Rules
|
|
20
21
|
|
|
21
22
|
- define one canonical implementation page name per page
|
|
23
|
+
- decompose complex pages into subpages, states, overlays, and implementation surfaces when layout changes materially
|
|
22
24
|
- define one canonical Pencil page or screen per implementation page when possible
|
|
23
25
|
- if multiple implementation pages share one Pencil page, record the reason
|
|
24
26
|
- if one implementation page needs multiple Pencil screens, record the sub-page or state split
|
|
27
|
+
- if one Android page hosts multiple fragments or tabs, map each meaningful surface separately instead of treating the container as one redesign target
|
|
25
28
|
|
|
26
29
|
## Minimum Binding Shape
|
|
27
30
|
|
|
@@ -43,6 +46,14 @@ For shared regions:
|
|
|
43
46
|
- `App sidebar` -> `Navigation Shell`
|
|
44
47
|
```
|
|
45
48
|
|
|
49
|
+
For complex surface decomposition:
|
|
50
|
+
|
|
51
|
+
```md
|
|
52
|
+
- `HomeActivity/HomeFragment[loaded]` -> `Home Loaded`
|
|
53
|
+
- `HomeActivity/HomeFragment[empty]` -> `Home Empty`
|
|
54
|
+
- `HomeActivity/FilterBottomSheet` -> `Home Filters Sheet`
|
|
55
|
+
```
|
|
56
|
+
|
|
46
57
|
## When To Block
|
|
47
58
|
|
|
48
59
|
Treat bindings as insufficient when:
|
|
@@ -50,6 +61,7 @@ Treat bindings as insufficient when:
|
|
|
50
61
|
- no active `.pen` source is registered
|
|
51
62
|
- the only known Pencil source is a live or external session and no project-local persistence path is recorded
|
|
52
63
|
- the implementation page has no Pencil source
|
|
64
|
+
- a complex page with multiple fragments, tabs, overlays, or materially different states has been flattened into one ambiguous design target
|
|
53
65
|
- the Pencil page exists but cannot be traced to a route or page responsibility
|
|
54
66
|
- shared layout regions are undefined and implementation would guess too much
|
|
55
67
|
|
|
@@ -17,7 +17,7 @@ Do not infer behavior from appearance alone.
|
|
|
17
17
|
When MCP is available, read:
|
|
18
18
|
|
|
19
19
|
- the preferred project-local `.pen` file under `.da-vinci/designs/` when one is registered
|
|
20
|
-
- active `.pen` file
|
|
20
|
+
- the active `.pen` file only after confirming it matches the registered project-local path
|
|
21
21
|
- target page frame
|
|
22
22
|
- child section hierarchy
|
|
23
23
|
- text content
|
|
@@ -28,6 +28,12 @@ When MCP is available, read:
|
|
|
28
28
|
|
|
29
29
|
Prefer structural reads over screenshots.
|
|
30
30
|
|
|
31
|
+
If the current active Pencil editor does not match the preferred path in `design-registry.md`:
|
|
32
|
+
|
|
33
|
+
- do not silently continue from the unrelated editor
|
|
34
|
+
- switch to the registered file when possible
|
|
35
|
+
- otherwise reconstruct the registered project-local `.pen` file from MCP-readable document data before implementation depends on it
|
|
36
|
+
|
|
31
37
|
## Visual Adapter Use
|
|
32
38
|
|
|
33
39
|
If the project resolved a visual adapter:
|