@xenonbyte/da-vinci-workflow 0.1.10 → 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 CHANGED
@@ -4,6 +4,14 @@
4
4
 
5
5
  - No unreleased changes yet.
6
6
 
7
+ ## v0.1.11 - 2026-03-27
8
+
9
+ ### Changed
10
+ - Da Vinci now documents `design-source checkpoint` between design review and page-to-Pencil mapping so project-local `.pen` persistence is verified before implementation work proceeds
11
+ - project-local `.pen` paths in `design-registry.md` are now defined more explicitly as workflow-owned state rather than user-authored config
12
+ - Pencil workflow guidance now requires the registered `.pen` path, the active editor source, and the shell-visible project file to reconcile before mapping or implementation is treated as safe
13
+ - workflow examples and mode guides now show project-local `.pen` reconciliation as part of redesign execution rather than an optional cleanup step
14
+
7
15
  ## v0.1.10 - 2026-03-27
8
16
 
9
17
  ### Changed
package/README.md CHANGED
@@ -252,9 +252,10 @@ Da Vinci uses these checkpoints:
252
252
  1. `discovery checkpoint`
253
253
  2. `spec checkpoint`
254
254
  3. `design checkpoint`
255
- 4. `mapping checkpoint`
256
- 5. `task checkpoint`
257
- 6. `execution checkpoint`
255
+ 4. `design-source checkpoint`
256
+ 5. `mapping checkpoint`
257
+ 6. `task checkpoint`
258
+ 7. `execution checkpoint`
258
259
 
259
260
  Checkpoint outcomes:
260
261
 
@@ -299,6 +300,10 @@ Rules:
299
300
  - `pencil-bindings.md` is the source of truth for implementation page -> Pencil page mapping
300
301
  - in `redesign-from-code`, existing code is behavior truth, not layout truth
301
302
  - complex pages should be decomposed into subpages, states, overlays, and implementation surfaces before Pencil redesign is treated as final
303
+ - the preferred `.pen` path recorded in `design-registry.md` is workflow-owned state, not user-authored config
304
+ - 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
305
+ - if Pencil MCP edits a live document but does not materialize the shell-visible project file automatically, the workflow should reconstruct and write the `.pen` file under the registered path before treating the design pass as traceable
306
+ - before `pencil-bindings.md` or implementation tasks are treated as safe, `design-source checkpoint` should confirm that the registered path, the active Pencil source, and the shell-visible `.pen` file converge on the same project-local source
302
307
 
303
308
  Optional visual-adapter policy:
304
309
 
@@ -318,18 +323,19 @@ When a relevant mapping already exists:
318
323
 
319
324
  - iterate on the mapped Pencil source
320
325
  - prefer the project-local `.pen` path already registered in `design-registry.md`
326
+ - do not silently switch to a different active editor path without reconciling `design-registry.md`
321
327
 
322
328
  When mappings do not exist but local code exists:
323
329
 
324
330
  - reconstruct the baseline from the local project
325
331
  - rebuild inventory, page map, and design registry
326
332
  - decompose complex containers into real design surfaces before broad Pencil generation
327
- - save or export the rebuilt Pencil baseline into `.da-vinci/designs/` when possible
333
+ - resolve an exact project-local `.pen` target and materialize that file under `.da-vinci/designs/`
328
334
 
329
335
  When neither mappings nor usable design sources exist:
330
336
 
331
337
  - create a new Pencil baseline from the current local source of truth
332
- - persist that baseline under `.da-vinci/designs/` when possible and record the exact path in `design-registry.md`
338
+ - persist that baseline under `.da-vinci/designs/` and record the exact path in `design-registry.md`
333
339
 
334
340
  ## Design input collection
335
341
 
@@ -508,6 +514,7 @@ Continue into full-delivery.
508
514
  See:
509
515
 
510
516
  - `docs/prompt-entrypoints.md`
517
+ - `docs/prompt-presets/`
511
518
  - `docs/codex-natural-language-usage.md`
512
519
  - `docs/visual-adapters.md`
513
520
  - `docs/visual-assist-presets/`
@@ -519,6 +526,7 @@ See:
519
526
  Chinese companion documents are included in this repository:
520
527
 
521
528
  - `README.zh-CN.md`
529
+ - `docs/zh-CN/prompt-presets/`
522
530
  - `docs/zh-CN/visual-adapters.md`
523
531
  - `docs/zh-CN/visual-assist-presets/`
524
532
  - `docs/zh-CN/`
package/README.zh-CN.md CHANGED
@@ -252,6 +252,10 @@ project/
252
252
  - `pencil-bindings.md` 是实现页面到 Pencil 页面绑定的真相源
253
253
  - 在 `redesign-from-code` 里,现有代码只是真相行为,不是真相布局
254
254
  - 复杂页面在 Pencil 重设计前应该先拆成 subpage、state、overlay 和 implementation surface
255
+ - `design-registry.md` 里登记的首选 `.pen` 路径属于工作流自动维护的状态,不应该依赖用户手工填写
256
+ - 一旦进入 Pencil 设计,Da Vinci 应该使用或创建这个项目内 `.pen` 路径,而不是继续沿用当前随手打开的 Pencil 文档
257
+ - 如果 Pencil MCP 修改了 live 文档但没有自动把项目内 `.pen` 文件落到磁盘,工作流应该先把该 `.pen` 文件补写到登记路径,再把这轮设计当成可追踪结果
258
+ - 在进入 `pencil-bindings.md` 和实现任务前,应该先通过 `design-source checkpoint`,确认登记路径、当前设计源和 shell 可见 `.pen` 文件已经收敛成同一个项目级来源
255
259
 
256
260
  可选 visual adapter 规则:
257
261
 
@@ -271,18 +275,19 @@ project/
271
275
 
272
276
  - 优先复用已绑定的 Pencil 设计源
273
277
  - 如果 `design-registry.md` 里已经登记了 `.da-vinci/designs/` 下的本地 `.pen` 路径,优先使用它
278
+ - 不要在没有同步 `design-registry.md` 的情况下,悄悄切到另一个当前活动编辑器路径继续设计
274
279
 
275
280
  当已有代码存在但还没有映射时:
276
281
 
277
282
  - 先从当前项目重建设计基线
278
283
  - 重建 inventory、page-map、design-registry
279
284
  - 先把复杂容器拆成真实的设计 surface,再进入大规模 Pencil 设计
280
- - 在可行时把新的 Pencil 基线保存或导出到 `.da-vinci/designs/`
285
+ - 先解析出明确的项目内 `.pen` 目标路径,再把新的 Pencil 基线真正落到 `.da-vinci/designs/`
281
286
 
282
287
  当既没有映射也没有可用设计源时:
283
288
 
284
289
  - 基于当前本地真相源创建新的 Pencil 基线
285
- - 在可行时把基线保存到 `.da-vinci/designs/`
290
+ - 把基线落到 `.da-vinci/designs/`
286
291
  - 并在 `design-registry.md` 里记录准确路径
287
292
 
288
293
  如果项目声明了 visual adapter:
@@ -422,6 +427,7 @@ Continue into full-delivery.
422
427
 
423
428
  - `docs/codex-natural-language-usage.md`
424
429
  - `docs/prompt-entrypoints.md`
430
+ - `docs/prompt-presets/`
425
431
  - `docs/visual-adapters.md`
426
432
  - `docs/visual-assist-presets/`
427
433
  - `docs/workflow-examples.md`
@@ -431,6 +437,7 @@ Continue into full-delivery.
431
437
  中文文档:
432
438
 
433
439
  - `README.zh-CN.md`
440
+ - `docs/zh-CN/prompt-presets/`
434
441
  - `docs/zh-CN/visual-adapters.md`
435
442
  - `docs/zh-CN/visual-assist-presets/`
436
443
  - `docs/zh-CN/`
package/SKILL.md CHANGED
@@ -400,6 +400,18 @@ Use `design-registry.md` as the project-level inventory of `.pen` sources.
400
400
 
401
401
  Use `.da-vinci/designs/` as the default project-local location for persisted Pencil files when the workflow creates or updates them.
402
402
 
403
+ Treat the project-local `.pen` path recorded in `design-registry.md` as workflow-owned state.
404
+
405
+ - users may provide external references or existing `.pen` files
406
+ - the workflow, not the user, resolves and maintains the preferred project-local `.pen` path
407
+ - do not treat `design-registry.md` as a user-authored config file
408
+
409
+ Resolve one exact project-local target before broad Pencil work begins:
410
+
411
+ - `.da-vinci/designs/project-baseline.pen` for shared baseline reconstruction
412
+ - `.da-vinci/designs/<change-id>.pen` for change-specific redesign work
413
+ - `.da-vinci/designs/<change-id>/main.pen` only when the project truly needs a nested design bundle
414
+
403
415
  Use `DA-VINCI.md` as the project-level visual source of truth for:
404
416
 
405
417
  - theme and palette
@@ -420,6 +432,7 @@ When a relevant mapping already exists:
420
432
  - iterate on the mapped Pencil source
421
433
  - prefer the project-local `.pen` file under `.da-vinci/designs/` when one is already registered
422
434
  - do not create a new design baseline unless there is a reason
435
+ - do not silently keep designing in an unrelated active Pencil document when `design-registry.md` already names a preferred path
423
436
 
424
437
  When `DA-VINCI.md` already exists:
425
438
 
@@ -431,6 +444,7 @@ When page-to-Pencil bindings already exist:
431
444
 
432
445
  - update the mapped Pencil page for the affected implementation page
433
446
  - keep the exact `.pen` file path recorded in `design-registry.md`
447
+ - if the active Pencil editor path differs from that recorded path, switch to the recorded path or explicitly reconstruct the project-local file before continuing
434
448
 
435
449
  When project mappings do not exist but existing code exists:
436
450
 
@@ -438,21 +452,22 @@ When project mappings do not exist but existing code exists:
438
452
  - reconstruct `project-inventory.md`
439
453
  - reconstruct `page-map.md`
440
454
  - create or rebuild `design-registry.md`
455
+ - resolve the exact project-local `.pen` target path before broad Pencil work starts
441
456
  - generate a new Pencil baseline only after the inventory is stable
442
- - save or export that baseline into `.da-vinci/designs/` when possible
457
+ - materialize that baseline into the resolved `.da-vinci/designs/` path and record the exact file in `design-registry.md`
443
458
 
444
459
  When neither mappings nor usable design sources exist:
445
460
 
446
461
  - state that the project is entering baseline reconstruction
447
462
  - create a new Pencil baseline from the current local source of truth
448
463
  - generate `DA-VINCI.md` from inferred or user-provided design rules before generating many unrelated pages
449
- - persist the resulting `.pen` file in `.da-vinci/designs/` when possible and record the path in `design-registry.md`
464
+ - persist the resulting `.pen` file at the resolved `.da-vinci/designs/` path and record that exact path in `design-registry.md`
450
465
 
451
466
  When a Pencil session cannot yet be exported locally:
452
467
 
453
468
  - record the live or external source in `design-registry.md`
454
- - record why local persistence is pending
455
- - do not hide the lack of a project-local `.pen` path
469
+ - reconstruct and write the project-local `.pen` file from MCP-readable document data before closing mapping or implementation work
470
+ - if the project-local file still cannot be materialized, record the reason and treat the missing file as a checkpoint issue instead of silently continuing
456
471
 
457
472
  When visual adapters are requested:
458
473
 
@@ -499,6 +514,8 @@ When creating or editing Pencil designs:
499
514
  - Build the pages required by the current scope, not an abstract moodboard
500
515
  - follow `page-map.md` as the canonical page list
501
516
  - follow `design-brief.md` for form factor and visual direction when it exists
517
+ - use the workflow-owned `.pen` path from `design-registry.md` as the active design target
518
+ - do not keep designing in whichever Pencil document happens to be open unless it already matches the registered project-local path
502
519
  - use the resolved visual adapter, when available, for composition, hierarchy, restraint, and motion guidance
503
520
  - before broad page generation, write a visual thesis, a content plan, and an interaction thesis for the current surface
504
521
  - Keep page names, section names, and labels aligned with the specs
@@ -513,18 +530,24 @@ When multiple pages exist:
513
530
  - keep one canonical Pencil page or screen per implementation page
514
531
  - record the `.pen` file in `design-registry.md`
515
532
  - record the mapping in `pencil-bindings.md`
516
- - persist the active `.pen` file into `.da-vinci/designs/` before closing design work when possible
533
+ - ensure the active Pencil design is materialized into the registered `.da-vinci/designs/` file before closing design work
517
534
 
518
535
  ## Pencil MCP Rules
519
536
 
520
537
  When Pencil is available through MCP:
521
538
 
522
539
  - Prefer the project-local `.pen` file under `.da-vinci/designs/` when one is registered
540
+ - Treat the registered `.pen` path as authoritative; do not rely on the current active editor if its path does not match `design-registry.md`
541
+ - If the registered file exists, read and edit that exact file
542
+ - If the registered file does not yet exist, create or reconstruct the project-local file before treating the design pass as traceable
523
543
  - Read the active `.pen` file and page structure before coding
524
544
  - read the bound Pencil page for the current implementation page
525
545
  - Use Pencil data to extract layout, text, hierarchy, panels, buttons, and content regions
526
546
  - Use screenshots only as a secondary visual check
527
547
  - Treat Pencil as the design data source for presentation, spacing, and layout grouping
548
+ - Before mapping or implementation closes, verify both:
549
+ - the `.pen` path is readable through MCP
550
+ - the same path exists as a shell-visible file inside the project
528
551
 
529
552
  When Pencil is not available:
530
553
 
@@ -564,15 +587,19 @@ Run these checkpoints:
564
587
  - after Pencil design exists, before implementation tasks are locked
565
588
  - verify the design covers the required pages, states, and key interactions
566
589
 
567
- 4. `mapping checkpoint`
590
+ 4. `design-source checkpoint`
591
+ - after `design-registry.md` resolves the preferred project-local `.pen` path and active Pencil work exists
592
+ - verify the registered `.pen` path, the active Pencil editor, and shell-visible persistence agree before mapping continues
593
+
594
+ 5. `mapping checkpoint`
568
595
  - after `design-registry.md` and `pencil-bindings.md`
569
596
  - verify implementation pages and Pencil pages are bound correctly
570
597
 
571
- 5. `task checkpoint`
598
+ 6. `task checkpoint`
572
599
  - before implementation starts
573
600
  - verify tasks cover both requirements and Pencil-backed UI work
574
601
 
575
- 6. `execution checkpoint`
602
+ 7. `execution checkpoint`
576
603
  - after each top-level task group during implementation
577
604
  - verify code still matches requirements and Pencil structure
578
605
 
@@ -69,6 +69,10 @@ Supported modes:
69
69
 
70
70
  ## Scenario Recipes
71
71
 
72
+ For surface-specific prompt starting points, also see:
73
+
74
+ - `docs/prompt-presets/`
75
+
72
76
  ### 1. New project with clear requirements
73
77
 
74
78
  ```text
@@ -129,7 +129,7 @@ Generate DA-VINCI.md, proposal, specs, page map, Pencil-backed launch pages, bin
129
129
  - define the canonical pages and page responsibilities
130
130
 
131
131
  6. create `design-registry.md`
132
- - register the active `.pen` source once Pencil work starts
132
+ - resolve the workflow-owned project-local `.pen` path once Pencil work starts
133
133
  - prefer a project-local `.pen` path under `.da-vinci/designs/`
134
134
 
135
135
  7. create `design.md`
@@ -137,7 +137,7 @@ Generate DA-VINCI.md, proposal, specs, page map, Pencil-backed launch pages, bin
137
137
 
138
138
  8. create `pencil-design.md`
139
139
  - record the generated Pencil screens
140
- - save or export the active `.pen` file into `.da-vinci/designs/` when possible
140
+ - ensure the active design is materialized into the registered `.pen` path under `.da-vinci/designs/`
141
141
 
142
142
  9. create `pencil-bindings.md`
143
143
  - map implementation pages to Pencil pages
@@ -226,7 +226,7 @@ First synthesize the product direction, then generate DA-VINCI.md, specs, page m
226
226
  - `pencil-design.md`
227
227
  - `pencil-bindings.md`
228
228
  - `tasks.md`
229
- - persist the active `.pen` file into `.da-vinci/designs/` when possible
229
+ - persist the active design into the registered `.pen` path under `.da-vinci/designs/`
230
230
 
231
231
  ### Where this mode differs from `greenfield-spec`
232
232
 
@@ -313,6 +313,7 @@ Register the design sources, extract DA-VINCI.md from them, bind covered pages,
313
313
 
314
314
  3. create or update `design-registry.md`
315
315
  - register old and new `.pen` sources
316
+ - resolve one workflow-owned project-local `.pen` path for the redesign
316
317
  - mark the preferred project-local `.pen` file under `.da-vinci/designs/` when available
317
318
 
318
319
  4. create or update `page-map.md`
@@ -323,7 +324,7 @@ Register the design sources, extract DA-VINCI.md from them, bind covered pages,
323
324
 
324
325
  6. create or update `pencil-design.md`
325
326
  - build the new redesign baseline in Pencil
326
- - persist that baseline into `.da-vinci/designs/` when possible
327
+ - persist that baseline into the registered `.da-vinci/designs/` file
327
328
 
328
329
  7. create or update `pencil-bindings.md`
329
330
  - bind pages to redesign screens
@@ -351,6 +352,12 @@ Fresh-layout rule:
351
352
  - do not treat the old UI as the design baseline unless the user explicitly asks to preserve the layout skeleton
352
353
  - a recolor, light rearrangement, or minor spacing pass on the old UI is not enough for a true redesign
353
354
 
355
+ Project-local `.pen` rule:
356
+
357
+ - the preferred `.pen` path in `design-registry.md` is owned by the workflow, not by user hand-editing
358
+ - do not keep redesign work inside an unrelated active Pencil editor just because it is currently open
359
+ - 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
360
+
354
361
  Complex-surface rule:
355
362
 
356
363
  - if one screen contains multiple fragments, tabs, overlays, or materially different states, split it into multiple design surfaces
@@ -76,6 +76,10 @@ Do not default this sequence to `build`.
76
76
 
77
77
  ## Platform Syntax
78
78
 
79
+ For ready-to-copy surface-specific starting prompts, see:
80
+
81
+ - `docs/prompt-presets/`
82
+
79
83
  ### Codex
80
84
 
81
85
  Use:
@@ -0,0 +1,27 @@
1
+ # Prompt Presets
2
+
3
+ Use these presets when you want a copy-ready starting prompt for a specific product surface.
4
+
5
+ These presets are designed to pair with:
6
+
7
+ - `docs/visual-assist-presets/`
8
+
9
+ Recommended flow:
10
+
11
+ 1. choose the prompt preset closest to the product surface
12
+ 2. choose the matching `Visual Assist` preset
13
+ 3. copy both into your workflow setup
14
+ 4. tighten the prompt further only when the project has unusual truth sources or platform constraints
15
+
16
+ Available presets:
17
+
18
+ - `mobile-app.md`
19
+ - `desktop-app.md`
20
+ - `web-app.md`
21
+ - `tablet-app.md`
22
+
23
+ Design rule:
24
+
25
+ - prompt presets define workflow intent, decomposition rules, and truth-source handling
26
+ - visual-assist presets define UI-design helper preferences
27
+ - use both together for the strongest result
@@ -0,0 +1,46 @@
1
+ # Desktop App Prompt Preset
2
+
3
+ Recommended when the product is a desktop-first tool or workspace.
4
+
5
+ Pair with:
6
+
7
+ - `docs/visual-assist-presets/desktop-app.md`
8
+
9
+ Use this when the workflow needs:
10
+
11
+ - dense workspace hierarchy
12
+ - clear tool panels and primary working surfaces
13
+ - disciplined modal and secondary-panel treatment
14
+ - decomposition of complex screens into meaningful surfaces
15
+
16
+ Recommended prompt:
17
+
18
+ ```text
19
+ $da-vinci use redesign-from-code to redesign this existing desktop product.
20
+
21
+ Existing code is the behavior source of truth, not the layout truth.
22
+ Preserve behavior, flows, integrations, and validation rules unless explicitly required otherwise.
23
+ Inventory primary workspaces, side panels, secondary panels, dialogs, settings flows, overlays, and important states before broad Pencil work.
24
+ Decompose complex screens into primary surfaces, secondary surfaces, overlays, and materially different states.
25
+ Use the Visual Assist preferences declared in DA-VINCI.md.
26
+ Do not pass design checkpoint if the result is just a boxed-up recolor of the old UI or if panel hierarchy remains unclear.
27
+ Persist project-local Pencil files under .da-vinci/designs/.
28
+ ```
29
+
30
+ When to switch to `intake` first:
31
+
32
+ - the desktop architecture is large
33
+ - modules and workspace boundaries are unclear
34
+ - there are multiple existing design references or mixed product surfaces
35
+
36
+ `intake` variant:
37
+
38
+ ```text
39
+ $da-vinci use intake for this existing desktop product.
40
+
41
+ I need to redesign the UI while preserving current behavior.
42
+ Existing code is the behavior source of truth, not the layout truth.
43
+ Inventory workspaces, panels, dialogs, overlays, settings flows, and important states.
44
+ Decompose complex screens before Pencil work.
45
+ Generate the best executable Da Vinci workflow prompt for the next step.
46
+ ```
@@ -0,0 +1,46 @@
1
+ # Mobile App Prompt Preset
2
+
3
+ Recommended when the project is a phone-first product surface.
4
+
5
+ Pair with:
6
+
7
+ - `docs/visual-assist-presets/mobile-app.md`
8
+
9
+ Use this when the workflow needs:
10
+
11
+ - app-first hierarchy
12
+ - touch-first interaction surfaces
13
+ - strong state decomposition
14
+ - clear treatment of sheets, dialogs, tabs, and nested navigation
15
+
16
+ Recommended prompt:
17
+
18
+ ```text
19
+ $da-vinci use redesign-from-code to redesign this existing mobile app.
20
+
21
+ Existing code is the behavior source of truth, not the layout truth.
22
+ Preserve business logic, navigation, permissions, integrations, validations, and state transitions unless explicitly required otherwise.
23
+ Inventory routes, screens, tabs, dialogs, bottom sheets, nested flows, and important states before broad Pencil work.
24
+ Decompose complex screens into subpages, overlays, materially different states, and implementation surfaces.
25
+ Use the Visual Assist preferences declared in DA-VINCI.md.
26
+ Do not pass design checkpoint if the result is a skin-swap of the old UI, a generic card grid, or a weak mobile hierarchy.
27
+ Persist project-local Pencil files under .da-vinci/designs/.
28
+ ```
29
+
30
+ When to switch to `intake` first:
31
+
32
+ - the project has multiple truth sources
33
+ - the UI stack is unclear
34
+ - the redesign spans many modules and the first workflow prompt is hard to phrase
35
+
36
+ `intake` variant:
37
+
38
+ ```text
39
+ $da-vinci use intake for this existing mobile app.
40
+
41
+ I need to redesign the UI while preserving current behavior.
42
+ Existing code is the behavior source of truth, not the layout truth.
43
+ Inventory screens, tabs, dialogs, bottom sheets, nested flows, and important states.
44
+ Decompose complex screens before Pencil work.
45
+ Generate the best executable Da Vinci workflow prompt for the next step.
46
+ ```
@@ -0,0 +1,46 @@
1
+ # Tablet App Prompt Preset
2
+
3
+ Recommended when the product is tablet-first or relies on expanded touch surfaces.
4
+
5
+ Pair with:
6
+
7
+ - `docs/visual-assist-presets/tablet-app.md`
8
+
9
+ Use this when the workflow needs:
10
+
11
+ - split-pane or multi-column composition
12
+ - orientation-aware design thinking
13
+ - decomposition of tool surfaces, side regions, and overlays
14
+ - treatment of both touch-first and canvas-first interaction patterns
15
+
16
+ Recommended prompt:
17
+
18
+ ```text
19
+ $da-vinci use redesign-from-code to redesign this existing tablet product.
20
+
21
+ Existing code is the behavior source of truth, not the layout truth.
22
+ Preserve behavior, permissions, integrations, validations, and state transitions unless explicitly required otherwise.
23
+ Inventory split-pane regions, sidebars, expanded canvases, dialogs, sheets, orientation-driven changes, and important states before broad Pencil work.
24
+ Decompose complex pages into multi-region surfaces, overlays, materially different states, and implementation surfaces.
25
+ Use the Visual Assist preferences declared in DA-VINCI.md.
26
+ Do not pass design checkpoint if the result ignores tablet-scale composition or collapses into a stretched phone layout.
27
+ Persist project-local Pencil files under .da-vinci/designs/.
28
+ ```
29
+
30
+ When to switch to `intake` first:
31
+
32
+ - the product has both phone and tablet surfaces
33
+ - orientation or multi-pane logic is complicated
34
+ - the design references do not map cleanly to the real implementation surfaces
35
+
36
+ `intake` variant:
37
+
38
+ ```text
39
+ $da-vinci use intake for this existing tablet product.
40
+
41
+ I need to redesign the UI while preserving current behavior.
42
+ Existing code is the behavior source of truth, not the layout truth.
43
+ Inventory split-pane regions, sidebars, dialogs, sheets, orientation changes, and important states.
44
+ Decompose complex pages before Pencil work.
45
+ Generate the best executable Da Vinci workflow prompt for the next step.
46
+ ```
@@ -0,0 +1,47 @@
1
+ # Web App Prompt Preset
2
+
3
+ Recommended when the product is a browser-based application or product website with app-like surfaces.
4
+
5
+ Pair with:
6
+
7
+ - `docs/visual-assist-presets/web-app.md`
8
+
9
+ Use this when the workflow needs:
10
+
11
+ - responsive page hierarchy
12
+ - separation between marketing and product surfaces
13
+ - careful handling of empty, loading, error, and authenticated states
14
+ - decomposition of complex flows into real surfaces instead of one oversized page
15
+
16
+ Recommended prompt:
17
+
18
+ ```text
19
+ $da-vinci use redesign-from-code to redesign this existing web product.
20
+
21
+ Existing code is the behavior source of truth, not the layout truth.
22
+ Preserve current business logic, routes, permissions, integrations, validations, and state transitions unless explicitly required otherwise.
23
+ Inventory responsive surfaces, authenticated areas, settings pages, dialogs, drawers, overlays, and important states before broad Pencil work.
24
+ Separate marketing-style surfaces from product-workflow surfaces when they require different visual treatment.
25
+ Decompose complex pages into subpages, overlays, materially different states, and implementation surfaces.
26
+ Use the Visual Assist preferences declared in DA-VINCI.md.
27
+ Do not pass design checkpoint if the result is a generic SaaS card grid or a recolor of the old interface.
28
+ Persist project-local Pencil files under .da-vinci/designs/.
29
+ ```
30
+
31
+ When to switch to `intake` first:
32
+
33
+ - the product mixes marketing, auth, onboarding, and app surfaces
34
+ - the first workflow prompt is hard to phrase cleanly
35
+ - there are external design references that must stay subordinate to existing behavior
36
+
37
+ `intake` variant:
38
+
39
+ ```text
40
+ $da-vinci use intake for this existing web product.
41
+
42
+ I need to redesign the UI while preserving current behavior.
43
+ Existing code is the behavior source of truth, not the layout truth.
44
+ Inventory product surfaces, marketing surfaces, overlays, and important states.
45
+ Decompose complex pages before Pencil work.
46
+ Generate the best executable Da Vinci workflow prompt for the next step.
47
+ ```
@@ -9,6 +9,10 @@ Each preset is intentionally conservative:
9
9
  - clear scope boundaries
10
10
  - non-blocking behavior by default
11
11
 
12
+ Use them together with:
13
+
14
+ - `docs/prompt-presets/`
15
+
12
16
  If the project is design-critical or previous outputs were weak, generic, or too close to the old UI:
13
17
 
14
18
  - keep the same preset family
@@ -80,9 +80,10 @@ Expected flow:
80
80
  5. split broad redesign work into `specs/<slice>/spec.md` files when one large `ui-refresh` spec would be too coarse
81
81
  6. rebuild or refine `page-map.md`, including subpages, overlays, and materially different states
82
82
  7. create new or updated Pencil pages from fresh composition rather than a recolor of the old UI, preferring persistence under `.da-vinci/designs/`
83
- 8. bind routes and pages to Pencil screens
84
- 9. generate tasks aligned to the redesign slices
85
- 10. build and verify
83
+ 8. run `design-source checkpoint` to confirm the registered project-local `.pen` path, the active Pencil source, and the shell-visible file all agree
84
+ 9. bind routes and pages to Pencil screens
85
+ 10. generate tasks aligned to the redesign slices
86
+ 11. build and verify
86
87
 
87
88
  ### Complex Android example
88
89
 
@@ -70,6 +70,10 @@ $da-vinci use <mode> to <goal>
70
70
 
71
71
  ## 场景模板
72
72
 
73
+ 如果你想直接按产品形态选提示词,也可以看:
74
+
75
+ - `docs/zh-CN/prompt-presets/`
76
+
73
77
  ### 1. 新项目,需求清晰
74
78
 
75
79
  ```text
@@ -86,10 +86,11 @@ Da Vinci 应该:
86
86
  4. 生成 `specs/<capability>/spec.md`
87
87
  5. 生成 `page-map.md`
88
88
  6. 生成 `design-registry.md`
89
+ - 先解析出工作流自动维护的项目内 `.pen` 路径
89
90
  - 优先登记 `.da-vinci/designs/` 下的本地 `.pen` 路径
90
91
  7. 生成 `design.md`
91
92
  8. 生成 `pencil-design.md`
92
- - 在可行时把当前 `.pen` 文件保存或导出到 `.da-vinci/designs/`
93
+ - 确保当前设计真正落到登记好的 `.da-vinci/designs/` 路径
93
94
  9. 生成 `pencil-bindings.md`
94
95
  10. 生成 `tasks.md`
95
96
  11. 进入实现
@@ -110,7 +111,7 @@ Da Vinci 应该:
110
111
  5. 生成 `specs/<capability>/spec.md`
111
112
  6. 生成 `page-map.md`
112
113
  7. 继续到设计、绑定、任务和实现
113
- - 在可行时把当前 `.pen` 文件保存或导出到 `.da-vinci/designs/`
114
+ - 把当前设计真正落到登记好的 `.da-vinci/designs/` 路径
114
115
 
115
116
  ## 3. `redesign-from-code`
116
117
 
@@ -126,13 +127,14 @@ Da Vinci 应该:
126
127
  2. 生成或对齐 `DA-VINCI.md`
127
128
  3. 生成 `design-registry.md`
128
129
  - 如已有本地 `.pen` 文件,优先登记 `.da-vinci/designs/` 下的路径
130
+ - 为这次重设计解析一个工作流自动维护的项目内 `.pen` 路径
129
131
  4. 生成 `proposal.md`
130
132
  5. 按 redesign slice 拆分 `specs/`
131
133
  6. 重建或更新 `page-map.md`
132
134
  - 把复杂页面拆成 subpage、state、overlay、fragment surface
133
135
  7. 生成 `design.md`
134
136
  8. 生成 `pencil-design.md`
135
- - 在可行时把新的 Pencil 基线持久化到 `.da-vinci/designs/`
137
+ - 把新的 Pencil 基线真正落到登记好的 `.da-vinci/designs/` 路径
136
138
  9. 生成 `pencil-bindings.md`
137
139
  10. 生成 `tasks.md`
138
140
  11. 进入实现
@@ -143,6 +145,9 @@ Da Vinci 应该:
143
145
  - `redesign-from-code` 默认应该基于页面职责和状态重新构图
144
146
  - 不能把“旧页面换个配色、换点间距、挪一点位置”当成真正的重设计
145
147
  - 一个实现页如果包含多个 Fragment、多个 tab、多个状态或多个 overlay,应该拆成多个设计 surface
148
+ - `design-registry.md` 里的首选 `.pen` 路径由工作流自动维护,不应该依赖用户手工填写
149
+ - 不要因为当前 Pencil 里正好打开了一个文档,就直接在那个文档上继续做重设计
150
+ - 如果 Pencil MCP 没有自动把登记路径的 `.pen` 文件落到磁盘,就应该先补写这个项目内文件,再把 mapping 或 implementation 视为完成
146
151
 
147
152
  ## 4. `feature-change`
148
153
 
@@ -158,7 +163,7 @@ Da Vinci 应该:
158
163
  4. 复用或更新 `design-registry.md`
159
164
  - 如果已有项目内 `.pen` 文件,优先登记 `.da-vinci/designs/` 下的路径
160
165
  5. 生成 `pencil-design.md` 增量
161
- - 在可行时把更新后的 `.pen` 文件保存或导出到 `.da-vinci/designs/`
166
+ - 把更新后的 `.pen` 文件真正落到登记好的 `.da-vinci/designs/` 路径
162
167
  6. 更新 `pencil-bindings.md`
163
168
  7. 生成 `tasks.md`
164
169
  8. 进入实现
@@ -77,6 +77,10 @@
77
77
 
78
78
  ## 平台语法
79
79
 
80
+ 如果你只想直接复制不同场景的起始提示词,也可以看:
81
+
82
+ - `docs/zh-CN/prompt-presets/`
83
+
80
84
  ### Codex
81
85
 
82
86
  ```text
@@ -0,0 +1,27 @@
1
+ # 场景提示词模板
2
+
3
+ 这些模板用于在不同产品形态下,快速拿到可直接执行的起始提示词。
4
+
5
+ 它们建议和下面这组文档配合使用:
6
+
7
+ - `docs/zh-CN/visual-assist-presets/`
8
+
9
+ 推荐使用方式:
10
+
11
+ 1. 先选最接近产品形态的提示词模板
12
+ 2. 再选对应的 `Visual Assist` 模板
13
+ 3. 两者一起放进工作流设置
14
+ 4. 只有在项目存在特殊真相源或平台约束时,再继续收紧提示词
15
+
16
+ 可用模板:
17
+
18
+ - `mobile-app.md`
19
+ - `desktop-app.md`
20
+ - `web-app.md`
21
+ - `tablet-app.md`
22
+
23
+ 设计规则:
24
+
25
+ - 提示词模板负责定义工作流意图、拆分规则和真相源处理方式
26
+ - `Visual Assist` 模板负责定义 UI 设计增强偏好
27
+ - 两者一起使用,结果通常更稳
@@ -0,0 +1,46 @@
1
+ # 桌面端应用提示词模板
2
+
3
+ 适用于桌面优先的工具型或工作台型产品。
4
+
5
+ 建议搭配:
6
+
7
+ - `docs/zh-CN/visual-assist-presets/desktop-app.md`
8
+
9
+ 适合这种需求:
10
+
11
+ - 高密度工作区层级
12
+ - 明确的工具面板和主工作面
13
+ - 克制的 modal 和 secondary panel 处理
14
+ - 把复杂页面拆成真正有意义的 surface
15
+
16
+ 推荐提示词:
17
+
18
+ ```text
19
+ $da-vinci use redesign-from-code to redesign this existing desktop product.
20
+
21
+ Existing code is the behavior source of truth, not the layout truth.
22
+ Preserve behavior, flows, integrations, and validation rules unless explicitly required otherwise.
23
+ Inventory primary workspaces, side panels, secondary panels, dialogs, settings flows, overlays, and important states before broad Pencil work.
24
+ Decompose complex screens into primary surfaces, secondary surfaces, overlays, and materially different states.
25
+ Use the Visual Assist preferences declared in DA-VINCI.md.
26
+ Do not pass design checkpoint if the result is just a boxed-up recolor of the old UI or if panel hierarchy remains unclear.
27
+ Persist project-local Pencil files under .da-vinci/designs/.
28
+ ```
29
+
30
+ 什么时候先走 `intake`:
31
+
32
+ - 桌面端架构较大
33
+ - 模块和 workspace 边界不够清晰
34
+ - 存在多个设计参考源或混合产品形态
35
+
36
+ `intake` 版本:
37
+
38
+ ```text
39
+ $da-vinci use intake for this existing desktop product.
40
+
41
+ I need to redesign the UI while preserving current behavior.
42
+ Existing code is the behavior source of truth, not the layout truth.
43
+ Inventory workspaces, panels, dialogs, overlays, settings flows, and important states.
44
+ Decompose complex screens before Pencil work.
45
+ Generate the best executable Da Vinci workflow prompt for the next step.
46
+ ```
@@ -0,0 +1,46 @@
1
+ # 移动端 App 提示词模板
2
+
3
+ 适用于以手机为主的产品界面。
4
+
5
+ 建议搭配:
6
+
7
+ - `docs/zh-CN/visual-assist-presets/mobile-app.md`
8
+
9
+ 适合这种需求:
10
+
11
+ - app-first 的层级结构
12
+ - touch-first 的交互界面
13
+ - 强状态拆分
14
+ - 明确处理 sheets、dialogs、tabs 和 nested navigation
15
+
16
+ 推荐提示词:
17
+
18
+ ```text
19
+ $da-vinci use redesign-from-code to redesign this existing mobile app.
20
+
21
+ Existing code is the behavior source of truth, not the layout truth.
22
+ Preserve business logic, navigation, permissions, integrations, validations, and state transitions unless explicitly required otherwise.
23
+ Inventory routes, screens, tabs, dialogs, bottom sheets, nested flows, and important states before broad Pencil work.
24
+ Decompose complex screens into subpages, overlays, materially different states, and implementation surfaces.
25
+ Use the Visual Assist preferences declared in DA-VINCI.md.
26
+ Do not pass design checkpoint if the result is a skin-swap of the old UI, a generic card grid, or a weak mobile hierarchy.
27
+ Persist project-local Pencil files under .da-vinci/designs/.
28
+ ```
29
+
30
+ 什么时候先走 `intake`:
31
+
32
+ - 项目有多个真相源
33
+ - UI 栈不清晰
34
+ - 重设计跨度大,第一条提示词很难一次说对
35
+
36
+ `intake` 版本:
37
+
38
+ ```text
39
+ $da-vinci use intake for this existing mobile app.
40
+
41
+ I need to redesign the UI while preserving current behavior.
42
+ Existing code is the behavior source of truth, not the layout truth.
43
+ Inventory screens, tabs, dialogs, bottom sheets, nested flows, and important states.
44
+ Decompose complex screens before Pencil work.
45
+ Generate the best executable Da Vinci workflow prompt for the next step.
46
+ ```
@@ -0,0 +1,46 @@
1
+ # 平板应用提示词模板
2
+
3
+ 适用于平板优先,或强依赖扩展触控区域的产品。
4
+
5
+ 建议搭配:
6
+
7
+ - `docs/zh-CN/visual-assist-presets/tablet-app.md`
8
+
9
+ 适合这种需求:
10
+
11
+ - split-pane 或 multi-column 构图
12
+ - orientation-aware 的设计思路
13
+ - 拆分工具区、侧边区域和 overlays
14
+ - 同时考虑 touch-first 和 canvas-first 的交互
15
+
16
+ 推荐提示词:
17
+
18
+ ```text
19
+ $da-vinci use redesign-from-code to redesign this existing tablet product.
20
+
21
+ Existing code is the behavior source of truth, not the layout truth.
22
+ Preserve behavior, permissions, integrations, validations, and state transitions unless explicitly required otherwise.
23
+ Inventory split-pane regions, sidebars, expanded canvases, dialogs, sheets, orientation-driven changes, and important states before broad Pencil work.
24
+ Decompose complex pages into multi-region surfaces, overlays, materially different states, and implementation surfaces.
25
+ Use the Visual Assist preferences declared in DA-VINCI.md.
26
+ Do not pass design checkpoint if the result ignores tablet-scale composition or collapses into a stretched phone layout.
27
+ Persist project-local Pencil files under .da-vinci/designs/.
28
+ ```
29
+
30
+ 什么时候先走 `intake`:
31
+
32
+ - 产品同时有 phone 和 tablet surface
33
+ - orientation 或 multi-pane 逻辑很复杂
34
+ - 设计参考与真实实现 surface 对不上
35
+
36
+ `intake` 版本:
37
+
38
+ ```text
39
+ $da-vinci use intake for this existing tablet product.
40
+
41
+ I need to redesign the UI while preserving current behavior.
42
+ Existing code is the behavior source of truth, not the layout truth.
43
+ Inventory split-pane regions, sidebars, dialogs, sheets, orientation changes, and important states.
44
+ Decompose complex pages before Pencil work.
45
+ Generate the best executable Da Vinci workflow prompt for the next step.
46
+ ```
@@ -0,0 +1,47 @@
1
+ # Web 应用提示词模板
2
+
3
+ 适用于浏览器中的产品型界面,或带有 app surface 的 Web 产品。
4
+
5
+ 建议搭配:
6
+
7
+ - `docs/zh-CN/visual-assist-presets/web-app.md`
8
+
9
+ 适合这种需求:
10
+
11
+ - responsive 页面层级
12
+ - marketing 与 product surface 的区分
13
+ - 明确处理 empty、loading、error、authenticated states
14
+ - 把复杂流程拆成真实的设计 surface,而不是一个大页面
15
+
16
+ 推荐提示词:
17
+
18
+ ```text
19
+ $da-vinci use redesign-from-code to redesign this existing web product.
20
+
21
+ Existing code is the behavior source of truth, not the layout truth.
22
+ Preserve current business logic, routes, permissions, integrations, validations, and state transitions unless explicitly required otherwise.
23
+ Inventory responsive surfaces, authenticated areas, settings pages, dialogs, drawers, overlays, and important states before broad Pencil work.
24
+ Separate marketing-style surfaces from product-workflow surfaces when they require different visual treatment.
25
+ Decompose complex pages into subpages, overlays, materially different states, and implementation surfaces.
26
+ Use the Visual Assist preferences declared in DA-VINCI.md.
27
+ Do not pass design checkpoint if the result is a generic SaaS card grid or a recolor of the old interface.
28
+ Persist project-local Pencil files under .da-vinci/designs/.
29
+ ```
30
+
31
+ 什么时候先走 `intake`:
32
+
33
+ - 同时混合 marketing、auth、onboarding 和 app surfaces
34
+ - 第一条提示词很难一次说清
35
+ - 存在外部设计参考,但它们必须服从现有行为真相
36
+
37
+ `intake` 版本:
38
+
39
+ ```text
40
+ $da-vinci use intake for this existing web product.
41
+
42
+ I need to redesign the UI while preserving current behavior.
43
+ Existing code is the behavior source of truth, not the layout truth.
44
+ Inventory product surfaces, marketing surfaces, overlays, and important states.
45
+ Decompose complex pages before Pencil work.
46
+ Generate the best executable Da Vinci workflow prompt for the next step.
47
+ ```
@@ -9,6 +9,10 @@
9
9
  - 清晰的作用范围
10
10
  - 默认不阻塞工作流
11
11
 
12
+ 建议搭配:
13
+
14
+ - `docs/zh-CN/prompt-presets/`
15
+
12
16
  如果项目对设计质量要求很高,或者之前结果很普通、很丑、太像旧 UI:
13
17
 
14
18
  - 仍然先选对应场景模板
@@ -91,9 +91,10 @@ $da-vinci use redesign-from-code to inventory the current app, identify current
91
91
  5. 当范围过大时,把工作拆成多个 `specs/<slice>/spec.md`
92
92
  6. 重建或细化 `page-map.md`,把 subpage、overlay、重要 state 一起拆出来
93
93
  7. 创建新的或更新后的 Pencil 页面,基于重新构图而不是旧 UI 换皮,并优先持久化到 `.da-vinci/designs/`
94
- 8. 绑定路由和 Pencil 页面
95
- 9. 生成和 redesign slice 对齐的任务
96
- 10. 实现并验证
94
+ 8. 运行 `design-source checkpoint`,确认登记的项目内 `.pen` 路径、当前 Pencil 设计源和 shell 可见文件是一致的
95
+ 9. 绑定路由和 Pencil 页面
96
+ 10. 生成和 redesign slice 对齐的任务
97
+ 11. 实现并验证
97
98
 
98
99
  ### 复杂 Android 页面示例
99
100
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xenonbyte/da-vinci-workflow",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
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"
@@ -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 local export is still pending
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.
@@ -434,6 +437,7 @@ Use this structure:
434
437
  ## Source
435
438
  - `.pen` file path
436
439
  - project-local persisted path under `.da-vinci/designs/` when available
440
+ - whether the active Pencil editor matched that same path
437
441
  - Active pages
438
442
 
439
443
  ## Visual Adapter Use
@@ -459,7 +463,7 @@ Use this structure:
459
463
 
460
464
  ## Implementation Notes
461
465
  - Important layout or styling constraints to preserve in code
462
- - Persistence notes if the live Pencil source has not yet been exported locally
466
+ - Persistence notes if the project-local `.pen` file had to be reconstructed from MCP-readable document data
463
467
  ```
464
468
 
465
469
  Recommended path:
@@ -506,6 +510,7 @@ Use this structure:
506
510
  ## Source
507
511
  - `.pen` file path
508
512
  - project-local persisted path under `.da-vinci/designs/` when available
513
+ - whether the active Pencil editor matched that same path
509
514
 
510
515
  ## Bindings
511
516
  - implementation page or route -> Pencil page or screen
@@ -516,7 +521,7 @@ Use this structure:
516
521
  ## Notes
517
522
  - intentional deviations
518
523
  - pages without Pencil coverage yet
519
- - whether bindings depend on a live-only source that still needs local export
524
+ - whether bindings depend on a live-only source that still needs reconciliation
520
525
  ```
521
526
 
522
527
  Use this artifact whenever implementation must trace back to Pencil pages.
@@ -107,6 +107,25 @@ Result meanings:
107
107
  - `WARN`: minor design gaps exist, but the visual direction is still coherent
108
108
  - `BLOCK`: design is not ready to drive implementation, or the result is generic, cluttered, or materially below the intended visual bar
109
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
128
+
110
129
  ## `mapping checkpoint`
111
130
 
112
131
  Run after `design-registry.md` and `pencil-bindings.md`.
@@ -114,6 +133,9 @@ Run after `design-registry.md` and `pencil-bindings.md`.
114
133
  Check:
115
134
 
116
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
117
139
  - each implementation page has a Pencil page or an explicit exception
118
140
  - shared layouts and shared regions are bound clearly enough to implement from
119
141
  - route names and Pencil names are traceable
@@ -123,7 +145,7 @@ Result meanings:
123
145
 
124
146
  - `PASS`: safe to generate implementation tasks
125
147
  - `WARN`: some bindings are weak, but implementation can continue carefully
126
- - `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
127
149
 
128
150
  ## `task checkpoint`
129
151
 
@@ -154,12 +176,14 @@ Examples of `WARN`, not `BLOCK`:
154
176
 
155
177
  - an additional follow-up spec may be needed for currently untouched behavior
156
178
  - some legacy or out-of-scope surfaces remain intentionally excluded
157
- - the active Pencil source should also be saved or exported for stronger repository traceability
179
+ - the project intentionally remains on an older but still shell-visible `.pen` baseline while a new design pass is deferred
158
180
 
159
181
  Examples of `BLOCK`:
160
182
 
161
183
  - the implementation would invent new behavior that has no spec support
162
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
163
187
  - required permissions, environment access, or protected files are unavailable
164
188
  - the implementation would overwrite the project baseline in a destructive way without an explicit go-ahead
165
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, save or export the `.pen` file into `.da-vinci/designs/` when possible and register that exact path in `design-registry.md`.
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
 
@@ -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: