@xenonbyte/da-vinci-workflow 0.1.7 → 0.1.8

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,16 @@
4
4
 
5
5
  - No unreleased changes yet.
6
6
 
7
+ ## v0.1.8 - 2026-03-27
8
+
9
+ ### Added
10
+ - Codex natural-language usage guides in `docs/codex-natural-language-usage.md` and `docs/zh-CN/codex-natural-language-usage.md`
11
+
12
+ ### Changed
13
+ - Codex workflow docs now standardize on `$da-vinci ...` natural-language entry patterns for `intake`, `prompt`, `continue`, and direct mode usage
14
+ - Da Vinci now documents `.da-vinci/designs/` as the default project-local location for persisted Pencil `.pen` files
15
+ - artifact templates, mode guides, and design references now record preferred project-local `.pen` paths in `design-registry.md`
16
+
7
17
  ## v0.1.7 - 2026-03-27
8
18
 
9
19
  ### Changed
package/README.md CHANGED
@@ -27,10 +27,13 @@ This workflow is intended for:
27
27
 
28
28
  Latest published npm package:
29
29
 
30
- - `@xenonbyte/da-vinci-workflow@0.1.7`
30
+ - `@xenonbyte/da-vinci-workflow@0.1.8`
31
31
 
32
32
  Release highlights:
33
33
 
34
+ - Codex natural-language usage is now documented explicitly, including `intake`, `prompt`, `continue`, and direct mode entry patterns
35
+ - project-local Pencil `.pen` files are now documented to persist under `.da-vinci/designs/`
36
+ - design registry and artifact templates now record preferred persisted `.pen` paths for project-local reuse
34
37
  - prompt-entry helper routes for `intake`, `prompt`, and `continue` are now published across Codex, Claude, and Gemini
35
38
  - Chinese companion docs are now intentionally limited to `README.zh-CN.md` and `docs/zh-CN/`
36
39
  - asset validation now covers the full shipped documentation set
@@ -87,7 +90,7 @@ Da Vinci runs in this order:
87
90
  1. select the active mode
88
91
  2. build the correct source artifacts
89
92
  3. detect or generate `DA-VINCI.md` as the project visual contract
90
- 4. collect design inputs and register design sources
93
+ 4. collect design inputs, prefer project-local `.pen` files under `.da-vinci/designs/`, and register design sources
91
94
  5. define or discover the project page map
92
95
  6. create or update Pencil designs
93
96
  7. bind implementation pages to Pencil pages
@@ -105,6 +108,7 @@ Depending on the mode, the workflow may use these artifacts:
105
108
  - `DA-VINCI.md`
106
109
  - `.da-vinci/changes/<change-id>/design-brief.md`
107
110
  - `.da-vinci/design-registry.md`
111
+ - `.da-vinci/designs/`
108
112
  - `.da-vinci/page-map.md`
109
113
  - `.da-vinci/changes/<change-id>/proposal.md`
110
114
  - `.da-vinci/changes/<change-id>/specs/<capability>/spec.md`
@@ -121,6 +125,7 @@ Depending on the mode, the workflow may use these artifacts:
121
125
  - `DA-VINCI.md`: project-level visual contract for theme, palette, typography direction, component tone, and page-consistency rules
122
126
  - `design-brief.md`: form factor, style, density, brand constraints, and layout preferences
123
127
  - `design-registry.md`: project-level `.pen` source inventory
128
+ - `.da-vinci/designs/`: project-local persisted Pencil sources such as `project-baseline.pen` or change-specific `.pen` files
124
129
  - `page-map.md`: canonical page list and page responsibilities
125
130
  - `proposal.md`: change scope and outcomes
126
131
  - `spec.md`: behavior, states, edge cases, and acceptance rules
@@ -146,6 +151,9 @@ project/
146
151
  └── .da-vinci/
147
152
  ├── project-inventory.md
148
153
  ├── design-registry.md
154
+ ├── designs/
155
+ │ ├── project-baseline.pen
156
+ │ └── <change-id>.pen
149
157
  ├── page-map.md
150
158
  └── changes/
151
159
  └── <change-id>/
@@ -165,6 +173,7 @@ Placement rules:
165
173
 
166
174
  - keep `DA-VINCI.md` at the project root
167
175
  - keep project-wide workflow files in `.da-vinci/`
176
+ - keep project-local Pencil files in `.da-vinci/designs/`
168
177
  - keep change-specific workflow files in `.da-vinci/changes/<change-id>/`
169
178
  - do not scatter `proposal.md`, `tasks.md`, and `verification.md` across the project root
170
179
 
@@ -217,21 +226,25 @@ Rules:
217
226
 
218
227
  - `DA-VINCI.md` is the project-level visual contract for cross-page consistency
219
228
  - `design-registry.md` is the project-level inventory of `.pen` sources
229
+ - `.da-vinci/designs/` is the default project-local location for persisted `.pen` files
220
230
  - `page-map.md` is the source of truth for implementation pages
221
231
  - `pencil-bindings.md` is the source of truth for implementation page -> Pencil page mapping
222
232
 
223
233
  When a relevant mapping already exists:
224
234
 
225
235
  - iterate on the mapped Pencil source
236
+ - prefer the project-local `.pen` path already registered in `design-registry.md`
226
237
 
227
238
  When mappings do not exist but local code exists:
228
239
 
229
240
  - reconstruct the baseline from the local project
230
241
  - rebuild inventory, page map, and design registry
242
+ - save or export the rebuilt Pencil baseline into `.da-vinci/designs/` when possible
231
243
 
232
244
  When neither mappings nor usable design sources exist:
233
245
 
234
246
  - create a new Pencil baseline from the current local source of truth
247
+ - persist that baseline under `.da-vinci/designs/` when possible and record the exact path in `design-registry.md`
235
248
 
236
249
  ## Design input collection
237
250
 
@@ -299,9 +312,9 @@ $da-vinci <request>
299
312
  Entry helpers:
300
313
 
301
314
  ```text
302
- /prompts:dv-intake
303
- /prompts:dv-prompt
304
- /prompts:dv-continue
315
+ $da-vinci use intake for <project situation>
316
+ $da-vinci use prompt for <known scenario>
317
+ $da-vinci use continue for <existing workflow state>
305
318
  ```
306
319
 
307
320
  ### Claude
@@ -382,13 +395,20 @@ $da-vinci use feature-change to add a billing page, generate the relevant Pencil
382
395
  ### Prompt intake for a complex redesign
383
396
 
384
397
  ```text
385
- /dv:intake I need to globally replace the UI of an existing Android project. Existing code is the behavior source of truth. HTML references are in /abs/path/to/mockups.
398
+ $da-vinci use intake for this existing Android project.
399
+
400
+ I need to globally replace the UI.
401
+ Existing Android code is the behavior source of truth.
402
+ HTML references are in /abs/path/to/mockups.
386
403
  ```
387
404
 
388
405
  ### Continue after inventory and spec work
389
406
 
390
407
  ```text
391
- /dv:continue Continue this redesign-from-code workflow into full-delivery using the existing Da Vinci artifacts.
408
+ $da-vinci use continue for this existing redesign-from-code workflow.
409
+
410
+ Use the existing Da Vinci artifacts.
411
+ Continue into full-delivery.
392
412
  ```
393
413
 
394
414
  ## Workflow examples
@@ -396,6 +416,7 @@ $da-vinci use feature-change to add a billing page, generate the relevant Pencil
396
416
  See:
397
417
 
398
418
  - `docs/prompt-entrypoints.md`
419
+ - `docs/codex-natural-language-usage.md`
399
420
  - `docs/workflow-examples.md`
400
421
  - `docs/mode-use-cases.md`
401
422
 
package/README.zh-CN.md CHANGED
@@ -29,10 +29,13 @@ Da Vinci 是一个把产品需求一路推进到结构化规格、Pencil 设计
29
29
 
30
30
  最新已发布 npm 包:
31
31
 
32
- - `@xenonbyte/da-vinci-workflow@0.1.7`
32
+ - `@xenonbyte/da-vinci-workflow@0.1.8`
33
33
 
34
34
  已发布版本重点:
35
35
 
36
+ - Codex 的自然语言用法现在有单独文档,明确说明 `intake`、`prompt`、`continue` 和直接 mode 调用方式
37
+ - 项目内 Pencil `.pen` 文件现在明确约定默认持久化到 `.da-vinci/designs/`
38
+ - 设计源登记和工件模板现在会记录项目内优先使用的 `.pen` 路径
36
39
  - `intake`、`prompt`、`continue` 三个提示词入口辅助路由已随 Codex、Claude、Gemini 一起发布
37
40
  - 中文配套文档现在刻意只保留 `README.zh-CN.md` 和 `docs/zh-CN/`
38
41
  - 资产校验现在覆盖完整的随包文档集合
@@ -92,7 +95,7 @@ Da Vinci 的默认顺序是:
92
95
  1. 选择 mode
93
96
  2. 生成正确的源工件
94
97
  3. 检测或生成 `DA-VINCI.md`
95
- 4. 收集设计输入并登记设计源
98
+ 4. 收集设计输入,优先使用 `.da-vinci/designs/` 下的项目内 `.pen` 文件,并登记设计源
96
99
  5. 定义或发现页面地图
97
100
  6. 创建或更新 Pencil 设计
98
101
  7. 绑定实现页面到 Pencil 页面
@@ -110,6 +113,7 @@ Da Vinci 的默认顺序是:
110
113
  - `DA-VINCI.md`
111
114
  - `.da-vinci/changes/<change-id>/design-brief.md`
112
115
  - `.da-vinci/design-registry.md`
116
+ - `.da-vinci/designs/`
113
117
  - `.da-vinci/page-map.md`
114
118
  - `.da-vinci/changes/<change-id>/proposal.md`
115
119
  - `.da-vinci/changes/<change-id>/specs/<capability>/spec.md`
@@ -126,6 +130,7 @@ Da Vinci 的默认顺序是:
126
130
  - `DA-VINCI.md`:项目级视觉契约
127
131
  - `design-brief.md`:设计方向、形态、密度、品牌和限制条件
128
132
  - `design-registry.md`:项目级 `.pen` 设计源登记
133
+ - `.da-vinci/designs/`:项目内持久化的 Pencil 设计源,例如 `project-baseline.pen` 或按 change 保存的 `.pen` 文件
129
134
  - `page-map.md`:页面、职责、状态和共享区域
130
135
  - `proposal.md`:范围、目标、非目标和成功标准
131
136
  - `spec.md`:行为、状态、边界和验收规则
@@ -135,6 +140,66 @@ Da Vinci 的默认顺序是:
135
140
  - `tasks.md`:任务分组和实施顺序
136
141
  - `verification.md`:覆盖度和漂移检查
137
142
 
143
+ ## 工件放置建议
144
+
145
+ 推荐结构:
146
+
147
+ ```text
148
+ project/
149
+ ├── DA-VINCI.md
150
+ └── .da-vinci/
151
+ ├── project-inventory.md
152
+ ├── design-registry.md
153
+ ├── designs/
154
+ │ ├── project-baseline.pen
155
+ │ └── <change-id>.pen
156
+ ├── page-map.md
157
+ └── changes/
158
+ └── <change-id>/
159
+ ├── brainstorm.md
160
+ ├── design-brief.md
161
+ ├── proposal.md
162
+ ├── design.md
163
+ ├── pencil-design.md
164
+ ├── pencil-bindings.md
165
+ ├── tasks.md
166
+ ├── verification.md
167
+ └── specs/
168
+ └── <capability>/spec.md
169
+ ```
170
+
171
+ 规则:
172
+
173
+ - `DA-VINCI.md` 放在项目根目录
174
+ - 项目级工作流工件放在 `.da-vinci/`
175
+ - 项目内持久化的 Pencil `.pen` 文件默认放在 `.da-vinci/designs/`
176
+ - change 级工件放在 `.da-vinci/changes/<change-id>/`
177
+
178
+ ## 设计源规则
179
+
180
+ - `DA-VINCI.md` 是跨页面视觉一致性的项目级视觉契约
181
+ - `design-registry.md` 用来登记项目中的 `.pen` 设计源
182
+ - `.da-vinci/designs/` 是项目内持久化 `.pen` 文件的默认位置
183
+ - `page-map.md` 是实现页面和状态的真相源
184
+ - `pencil-bindings.md` 是实现页面到 Pencil 页面绑定的真相源
185
+
186
+ 当已有页面映射存在时:
187
+
188
+ - 优先复用已绑定的 Pencil 设计源
189
+ - 如果 `design-registry.md` 里已经登记了 `.da-vinci/designs/` 下的本地 `.pen` 路径,优先使用它
190
+
191
+ 当已有代码存在但还没有映射时:
192
+
193
+ - 先从当前项目重建设计基线
194
+ - 重建 inventory、page-map、design-registry
195
+ - 在可行时把新的 Pencil 基线保存或导出到 `.da-vinci/designs/`
196
+
197
+ 当既没有映射也没有可用设计源时:
198
+
199
+ - 基于当前本地真相源创建新的 Pencil 基线
200
+ - 在可行时把基线保存到 `.da-vinci/designs/`
201
+ - 并在 `design-registry.md` 里记录准确路径
202
+
138
203
  ## 安装
139
204
 
140
205
  安装 npm 包:
@@ -177,9 +242,9 @@ $da-vinci <request>
177
242
  辅助入口:
178
243
 
179
244
  ```text
180
- /prompts:dv-intake
181
- /prompts:dv-prompt
182
- /prompts:dv-continue
245
+ $da-vinci use intake for <project situation>
246
+ $da-vinci use prompt for <known scenario>
247
+ $da-vinci use continue for <existing workflow state>
183
248
  ```
184
249
 
185
250
  ### Claude
@@ -243,19 +308,27 @@ $da-vinci use feature-change to add a billing page, generate the relevant Pencil
243
308
  ### 复杂重设计先做 intake
244
309
 
245
310
  ```text
246
- /dv:intake I need to globally replace the UI of an existing Android project. Existing code is the behavior source of truth. HTML references are in /abs/path/to/mockups.
311
+ $da-vinci use intake for this existing Android project.
312
+
313
+ I need to globally replace the UI.
314
+ Existing Android code is the behavior source of truth.
315
+ HTML references are in /abs/path/to/mockups.
247
316
  ```
248
317
 
249
318
  ### 已有工件后继续推进
250
319
 
251
320
  ```text
252
- /dv:continue Continue this redesign-from-code workflow into full-delivery using the existing Da Vinci artifacts.
321
+ $da-vinci use continue for this existing redesign-from-code workflow.
322
+
323
+ Use the existing Da Vinci artifacts.
324
+ Continue into full-delivery.
253
325
  ```
254
326
 
255
327
  ## 文档导航
256
328
 
257
329
  英文文档:
258
330
 
331
+ - `docs/codex-natural-language-usage.md`
259
332
  - `docs/prompt-entrypoints.md`
260
333
  - `docs/workflow-examples.md`
261
334
  - `docs/mode-use-cases.md`
package/SKILL.md CHANGED
@@ -70,7 +70,7 @@ Do not stop merely because:
70
70
 
71
71
  - some pages are still out of scope
72
72
  - a future follow-up spec may be needed for untouched behavior
73
- - a design source should also be saved or exported for better traceability
73
+ - a project-local `.pen` export is still pending for traceability, unless that missing file would make the active design source ambiguous
74
74
 
75
75
  Those are warnings unless they prevent safe implementation of the current in-scope work.
76
76
 
@@ -80,9 +80,12 @@ Canonical workflow name is `da-vinci`.
80
80
 
81
81
  - Codex preferred: `$da-vinci <request>`
82
82
  - Claude and Gemini preferred: `/da-vinci <request>` when platform adapters exist
83
- - Explicit action routes also exist for workflow entry help:
84
- - Codex: `/prompts:dv-intake`, `/prompts:dv-prompt`, `/prompts:dv-continue`
85
- - Claude and Gemini: `/dv:intake`, `/dv:prompt`, `/dv:continue`
83
+ - For Codex helper intents, prefer natural-language patterns:
84
+ - `$da-vinci use intake for <project situation>`
85
+ - `$da-vinci use prompt for <known scenario>`
86
+ - `$da-vinci use continue for <existing workflow state>`
87
+ - Claude and Gemini helper routes remain:
88
+ - `/dv:intake`, `/dv:prompt`, `/dv:continue`
86
89
  - Natural-language invocation remains the default path
87
90
 
88
91
  ## Prompt Entry Routes
@@ -184,7 +187,7 @@ Run the workflow in this order:
184
187
  1. Select the active mode
185
188
  2. Build the correct source artifacts for that mode
186
189
  3. Detect or generate `DA-VINCI.md` as the project visual contract
187
- 4. Collect design inputs and register available design sources
190
+ 4. Collect design inputs, prefer project-local `.pen` files under `.da-vinci/designs/`, and register available design sources
188
191
  5. Define or discover the project page map
189
192
  6. Create or update Pencil designs for the required pages
190
193
  7. Bind implementation pages to Pencil pages
@@ -221,14 +224,15 @@ Use these artifacts unless the project defines a different schema:
221
224
  3. `DA-VINCI.md`
222
225
  4. `.da-vinci/changes/<change-id>/design-brief.md`
223
226
  5. `.da-vinci/design-registry.md`
224
- 6. `.da-vinci/page-map.md`
225
- 7. `.da-vinci/changes/<change-id>/proposal.md`
226
- 8. `.da-vinci/changes/<change-id>/specs/<capability>/spec.md`
227
- 9. `.da-vinci/changes/<change-id>/design.md`
228
- 10. `.da-vinci/changes/<change-id>/pencil-design.md`
229
- 11. `.da-vinci/changes/<change-id>/pencil-bindings.md`
230
- 12. `.da-vinci/changes/<change-id>/tasks.md`
231
- 13. `.da-vinci/changes/<change-id>/verification.md`
227
+ 6. `.da-vinci/designs/`
228
+ 7. `.da-vinci/page-map.md`
229
+ 8. `.da-vinci/changes/<change-id>/proposal.md`
230
+ 9. `.da-vinci/changes/<change-id>/specs/<capability>/spec.md`
231
+ 10. `.da-vinci/changes/<change-id>/design.md`
232
+ 11. `.da-vinci/changes/<change-id>/pencil-design.md`
233
+ 12. `.da-vinci/changes/<change-id>/pencil-bindings.md`
234
+ 13. `.da-vinci/changes/<change-id>/tasks.md`
235
+ 14. `.da-vinci/changes/<change-id>/verification.md`
232
236
 
233
237
  Not every mode requires every artifact.
234
238
 
@@ -254,6 +258,7 @@ Optional artifacts:
254
258
  - `DA-VINCI.md`: project-level visual contract for theme, color system, surface treatment, typography direction, and cross-page style rules
255
259
  - `design-brief.md`: form factor, visual direction, density, brand constraints, and UI preferences
256
260
  - `design-registry.md`: project-level `.pen` file inventory and active design sources
261
+ - `.da-vinci/designs/`: project-local persisted Pencil sources such as `project-baseline.pen` or change-specific `.pen` files
257
262
  - `page-map.md`: canonical page list, page responsibilities, route mapping, and page states
258
263
  - `proposal.md`: scope, goal, non-goals, and success criteria
259
264
  - `spec.md`: behavior, states, inputs, outputs, edge cases, and acceptance rules
@@ -277,10 +282,17 @@ Keep this file at the project root so the visual contract is easy to discover an
277
282
 
278
283
  - `.da-vinci/project-inventory.md`
279
284
  - `.da-vinci/design-registry.md`
285
+ - `.da-vinci/designs/`
280
286
  - `.da-vinci/page-map.md`
281
287
 
282
288
  These files describe project-wide facts that can outlive any one change.
283
289
 
290
+ Recommended `.pen` persistence patterns:
291
+
292
+ - `.da-vinci/designs/project-baseline.pen`
293
+ - `.da-vinci/designs/<change-id>.pen`
294
+ - `.da-vinci/designs/<change-id>/main.pen`
295
+
284
296
  ### Change-level workflow directory
285
297
 
286
298
  - `.da-vinci/changes/<change-id>/brainstorm.md`
@@ -375,6 +387,8 @@ Do not split page-by-page unless the product is unusually fragmented. Prefer imp
375
387
 
376
388
  Use `design-registry.md` as the project-level inventory of `.pen` sources.
377
389
 
390
+ Use `.da-vinci/designs/` as the default project-local location for persisted Pencil files when the workflow creates or updates them.
391
+
378
392
  Use `DA-VINCI.md` as the project-level visual source of truth for:
379
393
 
380
394
  - theme and palette
@@ -386,6 +400,7 @@ Use `DA-VINCI.md` as the project-level visual source of truth for:
386
400
  When a relevant mapping already exists:
387
401
 
388
402
  - iterate on the mapped Pencil source
403
+ - prefer the project-local `.pen` file under `.da-vinci/designs/` when one is already registered
389
404
  - do not create a new design baseline unless there is a reason
390
405
 
391
406
  When `DA-VINCI.md` already exists:
@@ -396,6 +411,7 @@ When `DA-VINCI.md` already exists:
396
411
  When page-to-Pencil bindings already exist:
397
412
 
398
413
  - update the mapped Pencil page for the affected implementation page
414
+ - keep the exact `.pen` file path recorded in `design-registry.md`
399
415
 
400
416
  When project mappings do not exist but existing code exists:
401
417
 
@@ -404,12 +420,20 @@ When project mappings do not exist but existing code exists:
404
420
  - reconstruct `page-map.md`
405
421
  - create or rebuild `design-registry.md`
406
422
  - generate a new Pencil baseline only after the inventory is stable
423
+ - save or export that baseline into `.da-vinci/designs/` when possible
407
424
 
408
425
  When neither mappings nor usable design sources exist:
409
426
 
410
427
  - state that the project is entering baseline reconstruction
411
428
  - create a new Pencil baseline from the current local source of truth
412
429
  - generate `DA-VINCI.md` from inferred or user-provided design rules before generating many unrelated pages
430
+ - persist the resulting `.pen` file in `.da-vinci/designs/` when possible and record the path in `design-registry.md`
431
+
432
+ When a Pencil session cannot yet be exported locally:
433
+
434
+ - record the live or external source in `design-registry.md`
435
+ - record why local persistence is pending
436
+ - do not hide the lack of a project-local `.pen` path
413
437
 
414
438
  If the request is too vague to design or implement safely, ask a short clarification question before generating artifacts.
415
439
 
@@ -432,11 +456,13 @@ When multiple pages exist:
432
456
  - keep one canonical Pencil page or screen per implementation page
433
457
  - record the `.pen` file in `design-registry.md`
434
458
  - record the mapping in `pencil-bindings.md`
459
+ - persist the active `.pen` file into `.da-vinci/designs/` before closing design work when possible
435
460
 
436
461
  ## Pencil MCP Rules
437
462
 
438
463
  When Pencil is available through MCP:
439
464
 
465
+ - Prefer the project-local `.pen` file under `.da-vinci/designs/` when one is registered
440
466
  - Read the active `.pen` file and page structure before coding
441
467
  - read the bound Pencil page for the current implementation page
442
468
  - Use Pencil data to extract layout, text, hierarchy, panels, buttons, and content regions
@@ -0,0 +1,167 @@
1
+ # Codex Natural-Language Usage
2
+
3
+ Use this document when running Da Vinci from Codex through the natural-language skill entrypoint.
4
+
5
+ ## Core Rule
6
+
7
+ In Codex, use:
8
+
9
+ ```text
10
+ $da-vinci ...
11
+ ```
12
+
13
+ as the primary workflow entry.
14
+
15
+ The `$` prefix is a Codex skill invocation pattern inside the chat interface.
16
+ It is not a shell command.
17
+
18
+ ## Base Patterns
19
+
20
+ Use these patterns in Codex:
21
+
22
+ ### Start from a rough project situation
23
+
24
+ ```text
25
+ $da-vinci use intake for <project situation>
26
+ ```
27
+
28
+ Use this when:
29
+
30
+ - the project is complex
31
+ - the user does not know how to phrase the first workflow request
32
+ - there are multiple truth sources
33
+
34
+ ### Ask for prompt text only
35
+
36
+ ```text
37
+ $da-vinci use prompt for <known scenario>
38
+ ```
39
+
40
+ Use this when:
41
+
42
+ - the mode is already obvious
43
+ - the user only wants copy-ready prompt text
44
+
45
+ ### Resume an existing workflow
46
+
47
+ ```text
48
+ $da-vinci use continue for <existing workflow state>
49
+ ```
50
+
51
+ Use this when:
52
+
53
+ - `DA-VINCI.md` already exists
54
+ - `.da-vinci/` artifacts already exist
55
+ - the workflow paused and needs to resume
56
+
57
+ ### Run a mode directly
58
+
59
+ ```text
60
+ $da-vinci use <mode> to <goal>
61
+ ```
62
+
63
+ Supported modes:
64
+
65
+ - `greenfield-spec`
66
+ - `greenfield-brainstorm`
67
+ - `redesign-from-code`
68
+ - `feature-change`
69
+
70
+ ## Scenario Recipes
71
+
72
+ ### 1. New project with clear requirements
73
+
74
+ ```text
75
+ $da-vinci use greenfield-spec to break down a new product into specs, page map, Pencil-backed design work, implementation tasks, and final code.
76
+ ```
77
+
78
+ ### 2. New project with rough ideas
79
+
80
+ ```text
81
+ $da-vinci use greenfield-brainstorm to turn several rounds of rough product ideas into a stable proposal, specs, page map, Pencil-backed design work, and implementation tasks.
82
+ ```
83
+
84
+ ### 3. Existing product with broad UI redesign
85
+
86
+ ```text
87
+ $da-vinci use redesign-from-code to inventory the current product, preserve existing behavior, split the redesign into implementation-safe slices, and deliver the redesigned UI.
88
+ ```
89
+
90
+ ### 4. Existing product with one scoped change
91
+
92
+ ```text
93
+ $da-vinci use feature-change to add or update one scoped feature, generate any required Pencil design delta, and implement the change safely.
94
+ ```
95
+
96
+ ### 5. Existing Android project with global UI replacement
97
+
98
+ ```text
99
+ $da-vinci use intake for this existing Android project.
100
+
101
+ I need to globally replace the UI.
102
+ Existing Android code is the behavior source of truth.
103
+ Preserve business logic, navigation, permissions, integrations, validations, and state transitions unless explicitly required otherwise.
104
+ Inspect the real codebase first and determine whether the UI stack is Jetpack Compose, XML, or mixed.
105
+ Inventory all activities, fragments, composable destinations, nav graphs, dialogs, bottom sheets, tabs, nested flows, shared shells, subpages, and important states.
106
+ Split the redesign into implementation-safe slices.
107
+ Do not start code changes yet.
108
+ Generate the best executable Da Vinci workflow prompt for the next step.
109
+ ```
110
+
111
+ ### 6. Existing Android project with HTML references
112
+
113
+ ```text
114
+ $da-vinci use intake for this existing Android project.
115
+
116
+ I need to globally replace the UI.
117
+ Existing Android code is the behavior source of truth.
118
+ UI reference directory: /abs/path/to/mockups
119
+ Treat the HTML files there as presentation references only, not behavior truth.
120
+ Preserve business logic, navigation, permissions, integrations, validations, and state transitions unless explicitly required otherwise.
121
+ Inspect the real codebase first and determine whether the UI stack is Jetpack Compose, XML, or mixed.
122
+ Inventory all activities, fragments, composable destinations, nav graphs, dialogs, bottom sheets, tabs, nested flows, shared shells, subpages, and important states.
123
+ Split the redesign into implementation-safe slices.
124
+ Treat this as full-delivery.
125
+ ```
126
+
127
+ ### 7. Continue after inventory and spec work
128
+
129
+ ```text
130
+ $da-vinci use continue for this existing redesign-from-code workflow.
131
+
132
+ Use the existing Da Vinci artifacts in this project.
133
+ Existing code remains the behavior source of truth.
134
+ Do not restart discovery unless an artifact is missing or clearly wrong.
135
+ Do not stop at tasks.md.
136
+ Continue into implementation and verification.
137
+ ```
138
+
139
+ ### 8. Ask for a scenario-specific prompt only
140
+
141
+ ```text
142
+ $da-vinci use prompt for an existing Android project that needs a global UI replacement while keeping existing code behavior as the source of truth and using HTML files as presentation references.
143
+ ```
144
+
145
+ ## Practical Rule
146
+
147
+ Use this default sequence in Codex:
148
+
149
+ 1. start with `intake` when the project is complex
150
+ 2. execute the generated main workflow prompt
151
+ 3. use `continue` when artifacts already exist and the workflow needs to resume
152
+
153
+ If the mode is already obvious, skip `intake` and run the mode directly.
154
+
155
+ ## What To Avoid
156
+
157
+ Do not treat `$da-vinci` as a shell command.
158
+
159
+ Do not assume visual references can override behavior truth in existing projects.
160
+
161
+ Do not default complex existing-project work straight into `build`.
162
+
163
+ Prefer:
164
+
165
+ - `use intake` for unclear starts
166
+ - `use redesign-from-code` for broad UI replacement
167
+ - `use feature-change` for narrow existing-product work
@@ -19,6 +19,9 @@ project/
19
19
  └── .da-vinci/
20
20
  ├── project-inventory.md
21
21
  ├── design-registry.md
22
+ ├── designs/
23
+ │ ├── project-baseline.pen
24
+ │ └── <change-id>.pen
22
25
  ├── page-map.md
23
26
  └── changes/
24
27
  └── <change-id>/
@@ -38,6 +41,7 @@ Rule:
38
41
 
39
42
  - only `DA-VINCI.md` belongs at the project root
40
43
  - all other workflow outputs should stay under `.da-vinci/`
44
+ - persisted project-local Pencil files should stay under `.da-vinci/designs/`
41
45
 
42
46
  ## Quick mode selection
43
47
 
@@ -126,12 +130,14 @@ Generate DA-VINCI.md, proposal, specs, page map, Pencil-backed launch pages, bin
126
130
 
127
131
  6. create `design-registry.md`
128
132
  - register the active `.pen` source once Pencil work starts
133
+ - prefer a project-local `.pen` path under `.da-vinci/designs/`
129
134
 
130
135
  7. create `design.md`
131
136
  - define page structure and layout strategy
132
137
 
133
138
  8. create `pencil-design.md`
134
139
  - record the generated Pencil screens
140
+ - save or export the active `.pen` file into `.da-vinci/designs/` when possible
135
141
 
136
142
  9. create `pencil-bindings.md`
137
143
  - map implementation pages to Pencil pages
@@ -220,6 +226,7 @@ First synthesize the product direction, then generate DA-VINCI.md, specs, page m
220
226
  - `pencil-design.md`
221
227
  - `pencil-bindings.md`
222
228
  - `tasks.md`
229
+ - persist the active `.pen` file into `.da-vinci/designs/` when possible
223
230
 
224
231
  ### Where this mode differs from `greenfield-spec`
225
232
 
@@ -306,6 +313,7 @@ Register the design sources, extract DA-VINCI.md from them, bind covered pages,
306
313
 
307
314
  3. create or update `design-registry.md`
308
315
  - register old and new `.pen` sources
316
+ - mark the preferred project-local `.pen` file under `.da-vinci/designs/` when available
309
317
 
310
318
  4. create or update `page-map.md`
311
319
  - identify canonical implementation pages
@@ -315,6 +323,7 @@ Register the design sources, extract DA-VINCI.md from them, bind covered pages,
315
323
 
316
324
  6. create or update `pencil-design.md`
317
325
  - build the new redesign baseline in Pencil
326
+ - persist that baseline into `.da-vinci/designs/` when possible
318
327
 
319
328
  7. create or update `pencil-bindings.md`
320
329
  - bind pages to redesign screens
@@ -460,9 +469,11 @@ Keep the current behavior and project style baseline, update the affected page m
460
469
 
461
470
  5. update `design-registry.md`
462
471
  - if a new `.pen` source or screen is added
472
+ - record the preferred project-local `.pen` path under `.da-vinci/designs/` when available
463
473
 
464
474
  6. create `pencil-design.md` delta
465
475
  - only for the affected pages
476
+ - save or export the updated `.pen` file into `.da-vinci/designs/` when possible
466
477
 
467
478
  7. update `pencil-bindings.md`
468
479
  - bind the new or changed page
@@ -81,9 +81,9 @@ Do not default this sequence to `build`.
81
81
  Use:
82
82
 
83
83
  ```text
84
- /prompts:dv-intake
85
- /prompts:dv-prompt
86
- /prompts:dv-continue
84
+ $da-vinci use intake for <project situation>
85
+ $da-vinci use prompt for <known scenario>
86
+ $da-vinci use continue for <existing workflow state>
87
87
  ```
88
88
 
89
89
  ### Claude
@@ -111,7 +111,11 @@ Use:
111
111
  Use:
112
112
 
113
113
  ```text
114
- /dv:intake I need to globally replace the UI of an existing Android project. Existing code is the behavior source of truth. HTML references are in /abs/path/to/mockups.
114
+ $da-vinci use intake for this existing Android project.
115
+
116
+ I need to globally replace the UI.
117
+ Existing code is the behavior source of truth.
118
+ HTML references are in /abs/path/to/mockups.
115
119
  ```
116
120
 
117
121
  Expected outcome:
@@ -126,7 +130,10 @@ Expected outcome:
126
130
  Use:
127
131
 
128
132
  ```text
129
- /dv:continue Continue this redesign-from-code workflow into full-delivery using the existing Da Vinci artifacts.
133
+ $da-vinci use continue for this existing redesign-from-code workflow.
134
+
135
+ Use the existing Da Vinci artifacts.
136
+ Continue into full-delivery.
130
137
  ```
131
138
 
132
139
  Expected outcome:
@@ -121,11 +121,18 @@ And in every mode:
121
121
  When the user starts from a complex existing project and does not know how to phrase the first request:
122
122
 
123
123
  ```text
124
- /dv:intake I need to globally replace the UI of an existing Android project. Existing code is the behavior source of truth. HTML references are in /abs/path/to/mockups.
124
+ $da-vinci use intake for this existing Android project.
125
+
126
+ I need to globally replace the UI.
127
+ Existing code is the behavior source of truth.
128
+ HTML references are in /abs/path/to/mockups.
125
129
  ```
126
130
 
127
131
  When the project already has artifacts and needs to resume:
128
132
 
129
133
  ```text
130
- /dv:continue Continue this redesign-from-code workflow into full-delivery using the existing Da Vinci artifacts.
134
+ $da-vinci use continue for this existing redesign-from-code workflow.
135
+
136
+ Use the existing Da Vinci artifacts.
137
+ Continue into full-delivery.
131
138
  ```
@@ -0,0 +1,168 @@
1
+ # Codex 自然语言用法
2
+
3
+ > 中文配套文档。若与英文原文存在差异,请以 `docs/codex-natural-language-usage.md` 为准。
4
+
5
+ 这份文档专门说明在 Codex 里如何通过自然语言入口使用 Da Vinci。
6
+
7
+ ## 核心规则
8
+
9
+ 在 Codex 里,把:
10
+
11
+ ```text
12
+ $da-vinci ...
13
+ ```
14
+
15
+ 当成主工作流入口。
16
+
17
+ 这里的 `$` 是 Codex 对话里的 skill 调用前缀,不是终端 shell 命令。
18
+
19
+ ## 基本模式
20
+
21
+ 在 Codex 里优先用下面这些写法。
22
+
23
+ ### 从模糊项目起点进入
24
+
25
+ ```text
26
+ $da-vinci use intake for <project situation>
27
+ ```
28
+
29
+ 适用:
30
+
31
+ - 项目复杂
32
+ - 用户不知道第一条工作流请求该怎么写
33
+ - 存在多个真相源
34
+
35
+ ### 只需要提示词文本
36
+
37
+ ```text
38
+ $da-vinci use prompt for <known scenario>
39
+ ```
40
+
41
+ 适用:
42
+
43
+ - mode 已经明确
44
+ - 用户只需要可复制的提示词
45
+
46
+ ### 恢复已有工作流
47
+
48
+ ```text
49
+ $da-vinci use continue for <existing workflow state>
50
+ ```
51
+
52
+ 适用:
53
+
54
+ - 已经存在 `DA-VINCI.md`
55
+ - 已经存在 `.da-vinci/` 工件
56
+ - 工作流中途暂停,需要恢复
57
+
58
+ ### 直接运行某个 mode
59
+
60
+ ```text
61
+ $da-vinci use <mode> to <goal>
62
+ ```
63
+
64
+ 支持的 mode:
65
+
66
+ - `greenfield-spec`
67
+ - `greenfield-brainstorm`
68
+ - `redesign-from-code`
69
+ - `feature-change`
70
+
71
+ ## 场景模板
72
+
73
+ ### 1. 新项目,需求清晰
74
+
75
+ ```text
76
+ $da-vinci use greenfield-spec to break down a new product into specs, page map, Pencil-backed design work, implementation tasks, and final code.
77
+ ```
78
+
79
+ ### 2. 新项目,想法还比较发散
80
+
81
+ ```text
82
+ $da-vinci use greenfield-brainstorm to turn several rounds of rough product ideas into a stable proposal, specs, page map, Pencil-backed design work, and implementation tasks.
83
+ ```
84
+
85
+ ### 3. 已有产品,要做大范围 UI 重设计
86
+
87
+ ```text
88
+ $da-vinci use redesign-from-code to inventory the current product, preserve existing behavior, split the redesign into implementation-safe slices, and deliver the redesigned UI.
89
+ ```
90
+
91
+ ### 4. 已有产品,只做一个范围明确的改动
92
+
93
+ ```text
94
+ $da-vinci use feature-change to add or update one scoped feature, generate any required Pencil design delta, and implement the change safely.
95
+ ```
96
+
97
+ ### 5. 现有 Android 项目整体替换 UI
98
+
99
+ ```text
100
+ $da-vinci use intake for this existing Android project.
101
+
102
+ I need to globally replace the UI.
103
+ Existing Android code is the behavior source of truth.
104
+ Preserve business logic, navigation, permissions, integrations, validations, and state transitions unless explicitly required otherwise.
105
+ Inspect the real codebase first and determine whether the UI stack is Jetpack Compose, XML, or mixed.
106
+ Inventory all activities, fragments, composable destinations, nav graphs, dialogs, bottom sheets, tabs, nested flows, shared shells, subpages, and important states.
107
+ Split the redesign into implementation-safe slices.
108
+ Do not start code changes yet.
109
+ Generate the best executable Da Vinci workflow prompt for the next step.
110
+ ```
111
+
112
+ ### 6. 现有 Android 项目,同时带 HTML 参考稿
113
+
114
+ ```text
115
+ $da-vinci use intake for this existing Android project.
116
+
117
+ I need to globally replace the UI.
118
+ Existing Android code is the behavior source of truth.
119
+ UI reference directory: /abs/path/to/mockups
120
+ Treat the HTML files there as presentation references only, not behavior truth.
121
+ Preserve business logic, navigation, permissions, integrations, validations, and state transitions unless explicitly required otherwise.
122
+ Inspect the real codebase first and determine whether the UI stack is Jetpack Compose, XML, or mixed.
123
+ Inventory all activities, fragments, composable destinations, nav graphs, dialogs, bottom sheets, tabs, nested flows, shared shells, subpages, and important states.
124
+ Split the redesign into implementation-safe slices.
125
+ Treat this as full-delivery.
126
+ ```
127
+
128
+ ### 7. 盘点和 spec 完成后继续
129
+
130
+ ```text
131
+ $da-vinci use continue for this existing redesign-from-code workflow.
132
+
133
+ Use the existing Da Vinci artifacts in this project.
134
+ Existing code remains the behavior source of truth.
135
+ Do not restart discovery unless an artifact is missing or clearly wrong.
136
+ Do not stop at tasks.md.
137
+ Continue into implementation and verification.
138
+ ```
139
+
140
+ ### 8. 只让它生成某个场景的提示词
141
+
142
+ ```text
143
+ $da-vinci use prompt for an existing Android project that needs a global UI replacement while keeping existing code behavior as the source of truth and using HTML files as presentation references.
144
+ ```
145
+
146
+ ## 实用规则
147
+
148
+ 在 Codex 里,推荐默认顺序是:
149
+
150
+ 1. 起点复杂时先用 `intake`
151
+ 2. 执行它生成的主工作流提示词
152
+ 3. 工件已经存在、流程要恢复时再用 `continue`
153
+
154
+ 如果 mode 已经非常明确,可以跳过 `intake`,直接运行对应 mode。
155
+
156
+ ## 不要这样用
157
+
158
+ 不要把 `$da-vinci` 当成 shell 命令。
159
+
160
+ 不要在已有项目里让视觉参考覆盖行为真相。
161
+
162
+ 不要把复杂的存量项目一上来就直接导向 `build`。
163
+
164
+ 更稳的选择是:
165
+
166
+ - 起点不清晰时用 `use intake`
167
+ - 大范围 UI 替换时用 `use redesign-from-code`
168
+ - 范围明确的存量改动时用 `use feature-change`
@@ -12,6 +12,9 @@ project/
12
12
  └── .da-vinci/
13
13
  ├── project-inventory.md
14
14
  ├── design-registry.md
15
+ ├── designs/
16
+ │ ├── project-baseline.pen
17
+ │ └── <change-id>.pen
15
18
  ├── page-map.md
16
19
  └── changes/
17
20
  └── <change-id>/
@@ -31,6 +34,7 @@ project/
31
34
 
32
35
  - `DA-VINCI.md` 放根目录
33
36
  - 其他工作流工件放 `.da-vinci/`
37
+ - 项目内持久化的 Pencil `.pen` 文件默认放 `.da-vinci/designs/`
34
38
 
35
39
  ## 快速选 mode
36
40
 
@@ -82,8 +86,10 @@ Da Vinci 应该:
82
86
  4. 生成 `specs/<capability>/spec.md`
83
87
  5. 生成 `page-map.md`
84
88
  6. 生成 `design-registry.md`
89
+ - 优先登记 `.da-vinci/designs/` 下的本地 `.pen` 路径
85
90
  7. 生成 `design.md`
86
91
  8. 生成 `pencil-design.md`
92
+ - 在可行时把当前 `.pen` 文件保存或导出到 `.da-vinci/designs/`
87
93
  9. 生成 `pencil-bindings.md`
88
94
  10. 生成 `tasks.md`
89
95
  11. 进入实现
@@ -104,6 +110,7 @@ Da Vinci 应该:
104
110
  5. 生成 `specs/<capability>/spec.md`
105
111
  6. 生成 `page-map.md`
106
112
  7. 继续到设计、绑定、任务和实现
113
+ - 在可行时把当前 `.pen` 文件保存或导出到 `.da-vinci/designs/`
107
114
 
108
115
  ## 3. `redesign-from-code`
109
116
 
@@ -118,11 +125,13 @@ Da Vinci 应该:
118
125
  1. 先做 `project-inventory.md`
119
126
  2. 生成或对齐 `DA-VINCI.md`
120
127
  3. 生成 `design-registry.md`
128
+ - 如已有本地 `.pen` 文件,优先登记 `.da-vinci/designs/` 下的路径
121
129
  4. 生成 `proposal.md`
122
130
  5. 按 redesign slice 拆分 `specs/`
123
131
  6. 重建或更新 `page-map.md`
124
132
  7. 生成 `design.md`
125
133
  8. 生成 `pencil-design.md`
134
+ - 在可行时把新的 Pencil 基线持久化到 `.da-vinci/designs/`
126
135
  9. 生成 `pencil-bindings.md`
127
136
  10. 生成 `tasks.md`
128
137
  11. 进入实现
@@ -139,7 +148,9 @@ Da Vinci 应该:
139
148
  2. 写受影响行为到 `specs/<capability>/spec.md`
140
149
  3. 更新受影响的 `page-map.md`
141
150
  4. 复用或更新 `design-registry.md`
151
+ - 如果已有项目内 `.pen` 文件,优先登记 `.da-vinci/designs/` 下的路径
142
152
  5. 生成 `pencil-design.md` 增量
153
+ - 在可行时把更新后的 `.pen` 文件保存或导出到 `.da-vinci/designs/`
143
154
  6. 更新 `pencil-bindings.md`
144
155
  7. 生成 `tasks.md`
145
156
  8. 进入实现
@@ -80,9 +80,9 @@
80
80
  ### Codex
81
81
 
82
82
  ```text
83
- /prompts:dv-intake
84
- /prompts:dv-prompt
85
- /prompts:dv-continue
83
+ $da-vinci use intake for <project situation>
84
+ $da-vinci use prompt for <known scenario>
85
+ $da-vinci use continue for <existing workflow state>
86
86
  ```
87
87
 
88
88
  ### Claude
@@ -104,7 +104,11 @@
104
104
  ## 示例:已有 Android 项目全局换 UI
105
105
 
106
106
  ```text
107
- /dv:intake I need to globally replace the UI of an existing Android project. Existing code is the behavior source of truth. HTML references are in /abs/path/to/mockups.
107
+ $da-vinci use intake for this existing Android project.
108
+
109
+ I need to globally replace the UI.
110
+ Existing code is the behavior source of truth.
111
+ HTML references are in /abs/path/to/mockups.
108
112
  ```
109
113
 
110
114
  预期输出:
@@ -117,7 +121,10 @@
117
121
  ## 示例:盘点完成后继续
118
122
 
119
123
  ```text
120
- /dv:continue Continue this redesign-from-code workflow into full-delivery using the existing Da Vinci artifacts.
124
+ $da-vinci use continue for this existing redesign-from-code workflow.
125
+
126
+ Use the existing Da Vinci artifacts.
127
+ Continue into full-delivery.
121
128
  ```
122
129
 
123
130
  预期输出:
@@ -121,13 +121,20 @@ $da-vinci use feature-change to add a billing page, generate the Pencil design d
121
121
  如果用户起点是复杂的存量项目重设计,可以先这样:
122
122
 
123
123
  ```text
124
- /dv:intake I need to globally replace the UI of an existing Android project. Existing code is the behavior source of truth. HTML references are in /abs/path/to/mockups.
124
+ $da-vinci use intake for this existing Android project.
125
+
126
+ I need to globally replace the UI.
127
+ Existing code is the behavior source of truth.
128
+ HTML references are in /abs/path/to/mockups.
125
129
  ```
126
130
 
127
131
  如果工件已经存在,需要继续:
128
132
 
129
133
  ```text
130
- /dv:continue Continue this redesign-from-code workflow into full-delivery using the existing Da Vinci artifacts.
134
+ $da-vinci use continue for this existing redesign-from-code workflow.
135
+
136
+ Use the existing Da Vinci artifacts.
137
+ Continue into full-delivery.
131
138
  ```
132
139
 
133
140
  ## 跨模式共同规则
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xenonbyte/da-vinci-workflow",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
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"
@@ -10,6 +10,7 @@ Write artifacts into the target project using this rule:
10
10
 
11
11
  - keep `DA-VINCI.md` at the project root
12
12
  - keep project-level workflow files in `.da-vinci/`
13
+ - keep project-local Pencil `.pen` files in `.da-vinci/designs/`
13
14
  - keep change-level workflow files in `.da-vinci/changes/<change-id>/`
14
15
 
15
16
  Recommended placement:
@@ -20,6 +21,9 @@ project/
20
21
  └── .da-vinci/
21
22
  ├── project-inventory.md
22
23
  ├── design-registry.md
24
+ ├── designs/
25
+ │ ├── project-baseline.pen
26
+ │ └── <change-id>.pen
23
27
  ├── page-map.md
24
28
  └── changes/
25
29
  └── <change-id>/
@@ -212,11 +216,13 @@ Use this structure:
212
216
 
213
217
  ## Active Design Sources
214
218
  - `.pen` file path
219
+ - whether it lives under `.da-vinci/designs/`
215
220
  - status
216
221
  - purpose
217
222
 
218
223
  ## Preferred Design Source
219
224
  - Which `.pen` file is authoritative
225
+ - Why that file should be preferred over live-only or external sources
220
226
 
221
227
  ## Historical Or Secondary Sources
222
228
  - Legacy files
@@ -225,6 +231,7 @@ Use this structure:
225
231
  ## Notes
226
232
  - Why a source is active
227
233
  - Whether a source is safe to iterate
234
+ - Whether local export is still pending
228
235
  ```
229
236
 
230
237
  Use this artifact whenever a project can have one or more Pencil sources.
@@ -394,6 +401,7 @@ Use this structure:
394
401
 
395
402
  ## Source
396
403
  - `.pen` file path
404
+ - project-local persisted path under `.da-vinci/designs/` when available
397
405
  - Active pages
398
406
 
399
407
  ## Page Mapping
@@ -413,6 +421,7 @@ Use this structure:
413
421
 
414
422
  ## Implementation Notes
415
423
  - Important layout or styling constraints to preserve in code
424
+ - Persistence notes if the live Pencil source has not yet been exported locally
416
425
  ```
417
426
 
418
427
  Recommended path:
@@ -458,6 +467,7 @@ Use this structure:
458
467
 
459
468
  ## Source
460
469
  - `.pen` file path
470
+ - project-local persisted path under `.da-vinci/designs/` when available
461
471
 
462
472
  ## Bindings
463
473
  - implementation page or route -> Pencil page or screen
@@ -468,6 +478,7 @@ Use this structure:
468
478
  ## Notes
469
479
  - intentional deviations
470
480
  - pages without Pencil coverage yet
481
+ - whether bindings depend on a live-only source that still needs local export
471
482
  ```
472
483
 
473
484
  Use this artifact whenever implementation must trace back to Pencil pages.
@@ -4,9 +4,10 @@ Use this reference when collecting product form factor, UI direction, and design
4
4
 
5
5
  ## Visual Contract Detection
6
6
 
7
- Check for `DA-VINCI.md` first.
7
+ Check for `DA-VINCI.md` first, then check whether the project already has persisted Pencil files under `.da-vinci/designs/`.
8
8
 
9
9
  - if it exists, treat it as the project visual contract
10
+ - if `.da-vinci/designs/*.pen` exists, treat those files as project-local design inputs and record the exact preferred path in `design-registry.md`
10
11
  - if it does not exist, generate it from the best stable inputs before broad Pencil page generation
11
12
  - avoid re-deriving the visual language page by page
12
13
 
@@ -44,10 +45,11 @@ Collect or infer:
44
45
  Infer in this order:
45
46
 
46
47
  1. `DA-VINCI.md`
47
- 2. existing artifacts
48
- 3. existing codebase
49
- 4. user statements
50
- 5. direct clarification
48
+ 2. project-local `.pen` files under `.da-vinci/designs/`
49
+ 3. existing artifacts
50
+ 4. existing codebase
51
+ 5. user statements
52
+ 6. direct clarification
51
53
 
52
54
  ## When To Ask
53
55
 
@@ -64,3 +66,5 @@ Examples:
64
66
  Write stable answers into `design-brief.md`.
65
67
 
66
68
  If `DA-VINCI.md` did not already exist, generate it from those stable answers and save it as the project visual baseline.
69
+
70
+ 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`.
@@ -8,6 +8,8 @@ Treat `page-map.md` as the source of truth for implementation pages.
8
8
 
9
9
  Treat `design-registry.md` as the source of truth for available `.pen` sources.
10
10
 
11
+ Treat `.da-vinci/designs/` as the default project-local storage for persisted `.pen` files.
12
+
11
13
  Treat `pencil-bindings.md` as the source of truth for:
12
14
 
13
15
  - implementation page -> Pencil page
@@ -29,6 +31,12 @@ Use a simple mapping line:
29
31
  - `/settings/billing` -> `Billing Settings Screen`
30
32
  ```
31
33
 
34
+ If the binding depends on a specific project-local source, record that exact file in `design-registry.md`, for example:
35
+
36
+ ```md
37
+ - Preferred `.pen`: `.da-vinci/designs/project-baseline.pen`
38
+ ```
39
+
32
40
  For shared regions:
33
41
 
34
42
  ```md
@@ -40,6 +48,7 @@ For shared regions:
40
48
  Treat bindings as insufficient when:
41
49
 
42
50
  - no active `.pen` source is registered
51
+ - the only known Pencil source is a live or external session and no project-local persistence path is recorded
43
52
  - the implementation page has no Pencil source
44
53
  - the Pencil page exists but cannot be traced to a route or page responsibility
45
54
  - shared layout regions are undefined and implementation would guess too much
@@ -16,6 +16,7 @@ Do not infer behavior from appearance alone.
16
16
 
17
17
  When MCP is available, read:
18
18
 
19
+ - the preferred project-local `.pen` file under `.da-vinci/designs/` when one is registered
19
20
  - active `.pen` file
20
21
  - target page frame
21
22
  - child section hierarchy
@@ -25,12 +25,12 @@ Use this for:
25
25
  - Pencil page generation planning
26
26
  - design-to-code implementation
27
27
 
28
- Explicit helper routes:
28
+ Natural-language helper patterns:
29
29
 
30
30
  ```text
31
- /prompts:dv-intake
32
- /prompts:dv-prompt
33
- /prompts:dv-continue
31
+ $da-vinci use intake for <project situation>
32
+ $da-vinci use prompt for <known scenario>
33
+ $da-vinci use continue for <existing workflow state>
34
34
  ```
35
35
 
36
36
  Use them when: