@xenonbyte/da-vinci-workflow 0.1.20 → 0.1.22
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 +29 -0
- package/README.md +40 -54
- package/README.zh-CN.md +40 -54
- package/commands/claude/dv/build.md +6 -0
- package/commands/claude/dv/continue.md +1 -0
- package/commands/codex/prompts/dv-build.md +4 -0
- package/commands/codex/prompts/dv-continue.md +1 -0
- package/commands/gemini/dv/build.toml +4 -0
- package/commands/gemini/dv/continue.toml +1 -0
- package/docs/constraint-files.md +109 -0
- package/docs/dv-command-reference.md +24 -0
- package/docs/visual-adapters.md +24 -80
- package/docs/visual-assist-presets/desktop-app.md +20 -68
- package/docs/visual-assist-presets/mobile-app.md +20 -68
- package/docs/visual-assist-presets/tablet-app.md +20 -68
- package/docs/visual-assist-presets/web-app.md +20 -68
- package/docs/workflow-examples.md +29 -13
- package/docs/workflow-overview.md +2 -0
- package/docs/zh-CN/constraint-files.md +111 -0
- package/docs/zh-CN/dv-command-reference.md +24 -0
- package/docs/zh-CN/visual-adapters.md +24 -80
- package/docs/zh-CN/visual-assist-presets/desktop-app.md +20 -68
- package/docs/zh-CN/visual-assist-presets/mobile-app.md +20 -68
- package/docs/zh-CN/visual-assist-presets/tablet-app.md +20 -68
- package/docs/zh-CN/visual-assist-presets/web-app.md +20 -68
- package/docs/zh-CN/workflow-examples.md +29 -13
- package/docs/zh-CN/workflow-overview.md +2 -0
- package/examples/greenfield-spec-markupflow/DA-VINCI.md +13 -13
- package/examples/greenfield-spec-markupflow/README.md +7 -0
- package/examples/greenfield-spec-markupflow/pencil-design.md +5 -0
- package/lib/cli.js +194 -2
- package/lib/icon-aliases.js +165 -0
- package/lib/icon-search.js +370 -0
- package/lib/icon-sync.js +361 -0
- package/lib/pencil-session.js +6 -0
- package/package.json +5 -2
- package/references/artifact-templates.md +24 -0
- package/references/icon-aliases.example.json +12 -0
- package/scripts/fixtures/mock-pencil.js +49 -0
- package/scripts/test-icon-aliases.js +87 -0
- package/scripts/test-icon-search.js +72 -0
- package/scripts/test-icon-sync.js +178 -0
- package/scripts/test-mode-consistency.js +50 -0
- package/scripts/test-pen-persistence.js +7 -3
- package/scripts/test-pencil-session.js +40 -0
- package/scripts/test-persistence-flows.js +31 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.1.22 - 2026-03-29
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- `da-vinci icon-sync` to fetch official icon-name catalogs for Material Symbols, Lucide, Feather, and Phosphor into a local cache
|
|
7
|
+
- `lib/icon-sync.js` and `scripts/test-icon-sync.js` for catalog sync, parsing, and offline validation coverage
|
|
8
|
+
- `lib/icon-aliases.js` and `scripts/test-icon-aliases.js` for project/business semantic alias expansion via `~/.da-vinci/icon-aliases.json`
|
|
9
|
+
- `references/icon-aliases.example.json` as a starter alias mapping template
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- `da-vinci icon-search` now supports `--aliases <path>` and automatically expands query terms using alias mappings
|
|
13
|
+
- icon search now merges synced catalog entries with built-in fallback entries, preserving availability even when sync data is missing
|
|
14
|
+
- `da-vinci icon-sync` now reports explicit sync health (`OK` vs `DEGRADED`) and supports `--strict` for optional hard-gate behavior in CI
|
|
15
|
+
- `scripts/test-pen-persistence.js` now uses a local mock Pencil binary fixture to keep reopen-verification tests deterministic in sandboxed/no-network environments
|
|
16
|
+
- README, command-reference docs, workflow examples, and constraint-file docs (English and Chinese) now document the sync + search + alias icon workflow consistently
|
|
17
|
+
- `examples/greenfield-spec-markupflow/*` now include advisory icon-system guidance and icon-usage notes
|
|
18
|
+
- package version is aligned to `0.1.22`
|
|
19
|
+
|
|
20
|
+
## v0.1.21 - 2026-03-29
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
- `scripts/test-mode-consistency.js` coverage for `build` completion-audit discipline and `continue` build-recommendation gate behavior
|
|
24
|
+
- `scripts/test-pencil-session.js` coverage requiring live snapshot input for `pencil-session end` unless `--force` is used
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- `da-vinci pencil-session end` now requires `--nodes-file` (and optional variables/version payload) unless `--force` is explicitly provided
|
|
28
|
+
- `build` prompts across Codex, Claude, and Gemini now treat compile success as non-terminal and require completion-audit pass before terminal completion claims
|
|
29
|
+
- `continue` prompts across Codex, Claude, and Gemini now block build recommendation while unresolved design gates exist
|
|
30
|
+
- command reference docs (English and Chinese) now reflect the stricter build/continue routing discipline and completion gate expectations
|
|
31
|
+
|
|
3
32
|
## v0.1.20 - 2026-03-29
|
|
4
33
|
|
|
5
34
|
### Added
|
package/README.md
CHANGED
|
@@ -28,10 +28,14 @@ This workflow is intended for:
|
|
|
28
28
|
|
|
29
29
|
Latest published npm package:
|
|
30
30
|
|
|
31
|
-
- `@xenonbyte/da-vinci-workflow@0.1.
|
|
31
|
+
- `@xenonbyte/da-vinci-workflow@0.1.21`
|
|
32
32
|
|
|
33
33
|
Release highlights:
|
|
34
34
|
|
|
35
|
+
- `da-vinci pencil-session end` now requires live snapshot input (`--nodes-file`) unless `--force` is used, preventing silent session close while live MCP and disk are out of sync
|
|
36
|
+
- `build` route discipline now treats compile success as non-terminal and requires `da-vinci audit --mode completion --change <change-id> <project-path>` before reporting terminal completion
|
|
37
|
+
- `continue` route guidance now blocks `build` recommendation whenever core design gates remain unresolved (missing project-local `.pen`, active session, runtime/design-source BLOCK, or required design-supervisor BLOCK)
|
|
38
|
+
- added regression coverage for session-end sync guards and prompt-level build/continue gate discipline
|
|
35
39
|
- continue-routing and recovery guidance now consistently prioritize artifact/checkpoint truth first, with contextual deltas treated as auxiliary notes only
|
|
36
40
|
- context-delta audit now uses tighter expectation signals, status-mismatch wording, and `supersedes` validation with timestamp normalization
|
|
37
41
|
- context-delta expectation checks are now automatic for checkpoint-bearing artifacts and allow explicit opt-in (`Context Delta Required`) only for edge cases
|
|
@@ -133,32 +137,14 @@ Recommended default:
|
|
|
133
137
|
|
|
134
138
|
```md
|
|
135
139
|
## Visual Assist
|
|
136
|
-
- Preferred adapters:
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
- Design-supervisor
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
-
|
|
143
|
-
|
|
144
|
-
- Design-supervisor review inputs:
|
|
145
|
-
- screenshots
|
|
146
|
-
- pencil variables
|
|
147
|
-
- visual thesis
|
|
148
|
-
- content plan
|
|
149
|
-
- interaction thesis
|
|
150
|
-
- Scope:
|
|
151
|
-
- visual contract refinement
|
|
152
|
-
- page composition
|
|
153
|
-
- hierarchy and spacing
|
|
154
|
-
- anchor-surface composition
|
|
155
|
-
- Pencil design refinement
|
|
156
|
-
- Fallback:
|
|
157
|
-
- native-da-vinci
|
|
158
|
-
- Require Adapter:
|
|
159
|
-
- false
|
|
160
|
-
- Require Supervisor Review:
|
|
161
|
-
- false
|
|
140
|
+
- Preferred adapters: ui-ux-pro-max, frontend-skill
|
|
141
|
+
- Design-supervisor reviewers: frontend-skill, ui-ux-pro-max
|
|
142
|
+
- Design-supervisor review mode: screenshot-and-theme
|
|
143
|
+
- Design-supervisor review inputs: screenshots, pencil variables, visual thesis, content plan, interaction thesis
|
|
144
|
+
- Scope: visual contract refinement, page composition, hierarchy and spacing, anchor-surface composition, Pencil design refinement
|
|
145
|
+
- Fallback: native-da-vinci
|
|
146
|
+
- Require Adapter: false
|
|
147
|
+
- Require Supervisor Review: false
|
|
162
148
|
```
|
|
163
149
|
|
|
164
150
|
Use this when:
|
|
@@ -171,33 +157,14 @@ Quality-first redesign configuration:
|
|
|
171
157
|
|
|
172
158
|
```md
|
|
173
159
|
## Visual Assist
|
|
174
|
-
- Preferred adapters:
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
- Design-supervisor
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
-
|
|
181
|
-
|
|
182
|
-
- Design-supervisor review inputs:
|
|
183
|
-
- screenshots
|
|
184
|
-
- pencil variables
|
|
185
|
-
- visual thesis
|
|
186
|
-
- content plan
|
|
187
|
-
- interaction thesis
|
|
188
|
-
- Scope:
|
|
189
|
-
- visual contract refinement
|
|
190
|
-
- page composition
|
|
191
|
-
- hierarchy and spacing
|
|
192
|
-
- motion guidance
|
|
193
|
-
- anchor-surface composition
|
|
194
|
-
- Pencil design refinement
|
|
195
|
-
- Fallback:
|
|
196
|
-
- native-da-vinci
|
|
197
|
-
- Require Adapter:
|
|
198
|
-
- true
|
|
199
|
-
- Require Supervisor Review:
|
|
200
|
-
- true
|
|
160
|
+
- Preferred adapters: frontend-skill, ui-ux-pro-max
|
|
161
|
+
- Design-supervisor reviewers: frontend-skill, ui-ux-pro-max
|
|
162
|
+
- Design-supervisor review mode: screenshot-and-theme
|
|
163
|
+
- Design-supervisor review inputs: screenshots, pencil variables, visual thesis, content plan, interaction thesis
|
|
164
|
+
- Scope: visual contract refinement, page composition, hierarchy and spacing, motion guidance, anchor-surface composition, Pencil design refinement
|
|
165
|
+
- Fallback: native-da-vinci
|
|
166
|
+
- Require Adapter: true
|
|
167
|
+
- Require Supervisor Review: true
|
|
201
168
|
```
|
|
202
169
|
|
|
203
170
|
Use this when:
|
|
@@ -479,6 +446,9 @@ da-vinci status
|
|
|
479
446
|
da-vinci validate-assets
|
|
480
447
|
da-vinci audit --mode integrity /abs/path/to/project
|
|
481
448
|
da-vinci audit --mode completion --change <change-id> /abs/path/to/project
|
|
449
|
+
da-vinci icon-sync # tolerant by default; add --strict for hard gating
|
|
450
|
+
cp references/icon-aliases.example.json ~/.da-vinci/icon-aliases.json
|
|
451
|
+
da-vinci icon-search --query "settings lock" --family material --top 8
|
|
482
452
|
da-vinci preflight-pencil --ops-file /abs/path/to/ops.txt
|
|
483
453
|
da-vinci uninstall --platform codex,claude,gemini
|
|
484
454
|
```
|
|
@@ -509,6 +479,20 @@ Both modes check the most common workflow-integrity failures in a project:
|
|
|
509
479
|
- flags common schema drift such as bad `padding`, invalid hex colors, `flex`, `margin`, and `overflow`
|
|
510
480
|
- warns when anchor-surface batches are too large and should be split before retrying
|
|
511
481
|
|
|
482
|
+
`da-vinci icon-search` helps pick `icon_font` names before rendering:
|
|
483
|
+
|
|
484
|
+
- run `da-vinci icon-sync` first to fetch official icon names into `~/.da-vinci/icon-catalog.json`
|
|
485
|
+
- default catalog scope is user-level (under current HOME), so one sync is reusable across this user's projects
|
|
486
|
+
- run `da-vinci icon-sync` again when upstream icon libraries change or when you need newly added icons
|
|
487
|
+
- `icon-sync` is non-blocking on partial upstream failures by default (`Status: DEGRADED`); use `da-vinci icon-sync --strict` when CI must fail on any source error
|
|
488
|
+
- use `--catalog <path>` to keep an isolated project-level catalog when needed
|
|
489
|
+
- optionally create `~/.da-vinci/icon-aliases.json` (start from `references/icon-aliases.example.json`) for domain terms like `保险箱`, `解密`, `重试`
|
|
490
|
+
- supports mixed English/Chinese query terms
|
|
491
|
+
- supports family filtering (`material`, `rounded`, `outlined`, `sharp`, `lucide`, `feather`, `phosphor`)
|
|
492
|
+
- automatically expands query terms with alias mappings during ranking
|
|
493
|
+
- returns ranked candidates with ready-to-use `icon_font` node payload hints
|
|
494
|
+
- for a copy-ready `Icon System Guidance (Advisory)` template, see `docs/constraint-files.md` and `references/artifact-templates.md`
|
|
495
|
+
|
|
512
496
|
When Pencil MCP is active, Da Vinci now also expects an MCP runtime gate record in `pencil-design.md` before terminal completion claims. That runtime gate checks live editor/source convergence separately from filesystem audit.
|
|
513
497
|
During active redesign work, run `da-vinci audit --mode integrity <project-path>` immediately after the first successful Pencil write, then use `da-vinci preflight-pencil` plus smaller follow-up batches if the same anchor surface rolls back twice.
|
|
514
498
|
|
|
@@ -679,6 +663,7 @@ See:
|
|
|
679
663
|
- includes `Simple redesign`, `Complex redesign`, `Design-only`, and `Continue` variants in each surface file
|
|
680
664
|
- `docs/workflow-overview.md`
|
|
681
665
|
- `docs/pencil-rendering-workflow.md`
|
|
666
|
+
- `docs/constraint-files.md`
|
|
682
667
|
- `docs/codex-natural-language-usage.md`
|
|
683
668
|
- `docs/visual-adapters.md`
|
|
684
669
|
- `docs/visual-assist-presets/`
|
|
@@ -695,6 +680,7 @@ Chinese companion documents are included in this repository:
|
|
|
695
680
|
- each surface file also includes `Simple redesign`, `Complex redesign`, `Design-only`, and `Continue`
|
|
696
681
|
- `docs/zh-CN/workflow-overview.md`
|
|
697
682
|
- `docs/zh-CN/pencil-rendering-workflow.md`
|
|
683
|
+
- `docs/zh-CN/constraint-files.md`
|
|
698
684
|
- `docs/zh-CN/visual-adapters.md`
|
|
699
685
|
- `docs/zh-CN/visual-assist-presets/`
|
|
700
686
|
- `docs/zh-CN/`
|
package/README.zh-CN.md
CHANGED
|
@@ -30,10 +30,14 @@ Da Vinci 是一个把产品需求一路推进到结构化规格、Pencil 设计
|
|
|
30
30
|
|
|
31
31
|
最新已发布 npm 包:
|
|
32
32
|
|
|
33
|
-
- `@xenonbyte/da-vinci-workflow@0.1.
|
|
33
|
+
- `@xenonbyte/da-vinci-workflow@0.1.21`
|
|
34
34
|
|
|
35
35
|
已发布版本重点:
|
|
36
36
|
|
|
37
|
+
- `da-vinci pencil-session end` 现在默认要求提供 live 快照输入(`--nodes-file`);只有显式 `--force` 才允许跳过,避免 live MCP 与磁盘未同步时被静默关闭
|
|
38
|
+
- `build` 路由现在明确:编译成功不等于流程完成;对外宣布终态前必须通过 `da-vinci audit --mode completion --change <change-id> <project-path>`
|
|
39
|
+
- `continue` 的推荐规则现在会拦截未过设计门禁时的 `build` 选路(缺少项目内 `.pen`、session 未关闭、runtime/design-source BLOCK、required design-supervisor BLOCK)
|
|
40
|
+
- 新增回归测试覆盖:session 结束同步防护,以及 build/continue 提示词级门禁约束
|
|
37
41
|
- `continue` 的选路与恢复规则现已统一:先看工件/checkpoint 真相,再把 Context Delta 当作辅助信息
|
|
38
42
|
- Context Delta 审计规则已强化:触发信号更精确、告警改为状态不一致语义,并补充 `supersedes` 校验与时间归一化
|
|
39
43
|
- checkpoint 相关工件默认自动启用 Context Delta 期望检查;只有少数无 checkpoint 标题的工件才需要显式 `Context Delta Required`
|
|
@@ -138,32 +142,14 @@ Da Vinci 当前支持五种模式:
|
|
|
138
142
|
|
|
139
143
|
```md
|
|
140
144
|
## Visual Assist
|
|
141
|
-
- Preferred adapters:
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
- Design-supervisor
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
-
|
|
148
|
-
|
|
149
|
-
- Design-supervisor review inputs:
|
|
150
|
-
- screenshots
|
|
151
|
-
- pencil variables
|
|
152
|
-
- visual thesis
|
|
153
|
-
- content plan
|
|
154
|
-
- interaction thesis
|
|
155
|
-
- Scope:
|
|
156
|
-
- visual contract refinement
|
|
157
|
-
- page composition
|
|
158
|
-
- hierarchy and spacing
|
|
159
|
-
- anchor-surface composition
|
|
160
|
-
- Pencil design refinement
|
|
161
|
-
- Fallback:
|
|
162
|
-
- native-da-vinci
|
|
163
|
-
- Require Adapter:
|
|
164
|
-
- false
|
|
165
|
-
- Require Supervisor Review:
|
|
166
|
-
- false
|
|
145
|
+
- Preferred adapters: ui-ux-pro-max, frontend-skill
|
|
146
|
+
- Design-supervisor reviewers: frontend-skill, ui-ux-pro-max
|
|
147
|
+
- Design-supervisor review mode: screenshot-and-theme
|
|
148
|
+
- Design-supervisor review inputs: screenshots, pencil variables, visual thesis, content plan, interaction thesis
|
|
149
|
+
- Scope: visual contract refinement, page composition, hierarchy and spacing, anchor-surface composition, Pencil design refinement
|
|
150
|
+
- Fallback: native-da-vinci
|
|
151
|
+
- Require Adapter: false
|
|
152
|
+
- Require Supervisor Review: false
|
|
167
153
|
```
|
|
168
154
|
|
|
169
155
|
适用场景:
|
|
@@ -176,33 +162,14 @@ Da Vinci 当前支持五种模式:
|
|
|
176
162
|
|
|
177
163
|
```md
|
|
178
164
|
## Visual Assist
|
|
179
|
-
- Preferred adapters:
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
- Design-supervisor
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
-
|
|
186
|
-
|
|
187
|
-
- Design-supervisor review inputs:
|
|
188
|
-
- screenshots
|
|
189
|
-
- pencil variables
|
|
190
|
-
- visual thesis
|
|
191
|
-
- content plan
|
|
192
|
-
- interaction thesis
|
|
193
|
-
- Scope:
|
|
194
|
-
- visual contract refinement
|
|
195
|
-
- page composition
|
|
196
|
-
- hierarchy and spacing
|
|
197
|
-
- motion guidance
|
|
198
|
-
- anchor-surface composition
|
|
199
|
-
- Pencil design refinement
|
|
200
|
-
- Fallback:
|
|
201
|
-
- native-da-vinci
|
|
202
|
-
- Require Adapter:
|
|
203
|
-
- true
|
|
204
|
-
- Require Supervisor Review:
|
|
205
|
-
- true
|
|
165
|
+
- Preferred adapters: frontend-skill, ui-ux-pro-max
|
|
166
|
+
- Design-supervisor reviewers: frontend-skill, ui-ux-pro-max
|
|
167
|
+
- Design-supervisor review mode: screenshot-and-theme
|
|
168
|
+
- Design-supervisor review inputs: screenshots, pencil variables, visual thesis, content plan, interaction thesis
|
|
169
|
+
- Scope: visual contract refinement, page composition, hierarchy and spacing, motion guidance, anchor-surface composition, Pencil design refinement
|
|
170
|
+
- Fallback: native-da-vinci
|
|
171
|
+
- Require Adapter: true
|
|
172
|
+
- Require Supervisor Review: true
|
|
206
173
|
```
|
|
207
174
|
|
|
208
175
|
适用场景:
|
|
@@ -400,6 +367,9 @@ da-vinci status
|
|
|
400
367
|
da-vinci validate-assets
|
|
401
368
|
da-vinci audit --mode integrity /abs/path/to/project
|
|
402
369
|
da-vinci audit --mode completion --change <change-id> /abs/path/to/project
|
|
370
|
+
da-vinci icon-sync # 默认容错;需要强门禁时加 --strict
|
|
371
|
+
cp references/icon-aliases.example.json ~/.da-vinci/icon-aliases.json
|
|
372
|
+
da-vinci icon-search --query "settings lock" --family material --top 8
|
|
403
373
|
da-vinci preflight-pencil --ops-file /abs/path/to/ops.txt
|
|
404
374
|
da-vinci uninstall --platform codex,claude,gemini
|
|
405
375
|
```
|
|
@@ -430,6 +400,20 @@ Context Delta 与 audit 的关系:
|
|
|
430
400
|
- 直接标出常见 schema 漂移,比如错误 `padding`、非法 hex 颜色、`flex`、`margin`、`overflow`
|
|
431
401
|
- 当 anchor-surface 批次太大时给出拆批警告,避免继续大块回滚
|
|
432
402
|
|
|
403
|
+
`da-vinci icon-search` 用于在渲染前选择更稳定的 `icon_font` 名称:
|
|
404
|
+
|
|
405
|
+
- 先运行 `da-vinci icon-sync`,把官方图标名同步到 `~/.da-vinci/icon-catalog.json`
|
|
406
|
+
- 默认是用户级缓存(当前 HOME 下),同一用户执行一次通常可被多个项目复用
|
|
407
|
+
- 当上游图标库有更新,或你需要最新新增图标时,建议重新执行 `da-vinci icon-sync`
|
|
408
|
+
- `icon-sync` 默认对上游部分失败不阻塞(会标记 `Status: DEGRADED`);如果 CI 需要任何源失败即退出,请使用 `da-vinci icon-sync --strict`
|
|
409
|
+
- 如果你要项目隔离,可用 `--catalog <path>` 指定项目级 catalog
|
|
410
|
+
- 可选创建 `~/.da-vinci/icon-aliases.json`(可从 `references/icon-aliases.example.json` 拷贝),用于 `保险箱`、`解密`、`重试` 这类业务词
|
|
411
|
+
- 支持中英文混合关键词检索
|
|
412
|
+
- 支持家族过滤(`material`、`rounded`、`outlined`、`sharp`、`lucide`、`feather`、`phosphor`)
|
|
413
|
+
- 检索排序会自动叠加别名扩展词
|
|
414
|
+
- 返回排序候选,并附带可直接复用的 `icon_font` 节点 payload 提示
|
|
415
|
+
- `Icon System Guidance (Advisory)` 可复制模板见 `docs/constraint-files.md` 与 `references/artifact-templates.md`
|
|
416
|
+
|
|
433
417
|
当 Pencil MCP 可用时,Da Vinci 现在还要求在终态完成声明前,把 MCP runtime gate 结果记录到 `pencil-design.md`。这层 gate 负责检查 live editor/source convergence,与 filesystem audit 分工不同。
|
|
434
418
|
在重设计进行中,如果有 shell 能力,应在第一次成功写入 Pencil 后立即运行 `da-vinci audit --mode integrity <project-path>`;如果同一个 anchor surface 连续回滚,则继续配合 `da-vinci preflight-pencil` 和更小的 follow-up batch。
|
|
435
419
|
|
|
@@ -584,6 +568,7 @@ Continue from proposal, migration-contract, and target specs into design or impl
|
|
|
584
568
|
- 每个场景文件都包含 `Simple redesign`、`Complex redesign`、`Design-only`、`Continue`
|
|
585
569
|
- `docs/workflow-overview.md`
|
|
586
570
|
- `docs/pencil-rendering-workflow.md`
|
|
571
|
+
- `docs/constraint-files.md`
|
|
587
572
|
- `docs/visual-adapters.md`
|
|
588
573
|
- `docs/visual-assist-presets/`
|
|
589
574
|
- `docs/workflow-examples.md`
|
|
@@ -598,6 +583,7 @@ Continue from proposal, migration-contract, and target specs into design or impl
|
|
|
598
583
|
- 每个场景文件也都包含 `Simple redesign`、`Complex redesign`、`Design-only`、`Continue`
|
|
599
584
|
- `docs/zh-CN/workflow-overview.md`
|
|
600
585
|
- `docs/zh-CN/pencil-rendering-workflow.md`
|
|
586
|
+
- `docs/zh-CN/constraint-files.md`
|
|
601
587
|
- `docs/zh-CN/visual-adapters.md`
|
|
602
588
|
- `docs/zh-CN/visual-assist-presets/`
|
|
603
589
|
- `docs/zh-CN/`
|
|
@@ -15,3 +15,9 @@ Focus on:
|
|
|
15
15
|
During implementation:
|
|
16
16
|
- run `execution checkpoint` after each top-level task group
|
|
17
17
|
- update source artifacts before continuing if drift is found
|
|
18
|
+
|
|
19
|
+
Completion discipline:
|
|
20
|
+
- treat `BUILD SUCCESSFUL` as compile-only evidence, not workflow completion
|
|
21
|
+
- do not report `design complete` or `workflow complete` while in-scope task groups remain unfinished
|
|
22
|
+
- before any terminal completion claim, require `da-vinci audit --mode completion --change <change-id> <project-path>` to pass
|
|
23
|
+
- if completion audit fails, continue from the minimal unfinished stage instead of exiting
|
|
@@ -27,4 +27,5 @@ Route discipline:
|
|
|
27
27
|
- do not default the user into `/dv:build` unless the project is clearly implementation-ready
|
|
28
28
|
- if design artifacts exist but `tasks.md` does not, prefer a continuation prompt that moves into `/dv:tasks`
|
|
29
29
|
- only prefer `/dv:build` once task generation and implementation readiness are already clear
|
|
30
|
+
- do not route into `/dv:build` when any design gate is unresolved: missing shell-visible project-local `.pen`, active/unclosed Pencil session, runtime/design-source checkpoint still BLOCK, or required design-supervisor review still BLOCK/unaccepted
|
|
30
31
|
- continuation prompts should usually target the main workflow entry so Da Vinci can resume the full state machine
|
|
@@ -11,3 +11,7 @@ Implementation rules:
|
|
|
11
11
|
- requirements decide behavior
|
|
12
12
|
- Pencil decides presentation
|
|
13
13
|
- run `execution checkpoint` after each top-level task group
|
|
14
|
+
- treat `BUILD SUCCESSFUL` as compile-only evidence, not workflow completion
|
|
15
|
+
- do not report `design complete` or `workflow complete` while in-scope task groups remain unfinished
|
|
16
|
+
- before any terminal completion claim, require `da-vinci audit --mode completion --change <change-id> <project-path>` to pass
|
|
17
|
+
- if completion audit fails, continue from the minimal unfinished stage instead of exiting
|
|
@@ -27,4 +27,5 @@ Route discipline:
|
|
|
27
27
|
- do not default the user into `/prompts:dv-build` unless the project is clearly implementation-ready
|
|
28
28
|
- if design artifacts exist but `tasks.md` does not, prefer a continuation prompt that moves into `/prompts:dv-tasks`
|
|
29
29
|
- only prefer `/prompts:dv-build` once task generation and implementation readiness are already clear
|
|
30
|
+
- do not route into `/prompts:dv-build` when any design gate is unresolved: missing shell-visible project-local `.pen`, active/unclosed Pencil session, runtime/design-source checkpoint still BLOCK, or required design-supervisor review still BLOCK/unaccepted
|
|
30
31
|
- continuation prompts should usually target the main workflow entry so Da Vinci can resume the full state machine
|
|
@@ -10,4 +10,8 @@ Implementation rules:
|
|
|
10
10
|
- requirements decide behavior
|
|
11
11
|
- Pencil decides presentation
|
|
12
12
|
- run `execution checkpoint` after each top-level task group
|
|
13
|
+
- treat `BUILD SUCCESSFUL` as compile-only evidence, not workflow completion
|
|
14
|
+
- do not report `design complete` or `workflow complete` while in-scope task groups remain unfinished
|
|
15
|
+
- before any terminal completion claim, require `da-vinci audit --mode completion --change <change-id> <project-path>` to pass
|
|
16
|
+
- if completion audit fails, continue from the minimal unfinished stage instead of exiting
|
|
13
17
|
"""
|
|
@@ -26,5 +26,6 @@ Route discipline:
|
|
|
26
26
|
- do not default the user into `/dv:build` unless the project is clearly implementation-ready
|
|
27
27
|
- if design artifacts exist but `tasks.md` does not, prefer a continuation prompt that moves into `/dv:tasks`
|
|
28
28
|
- only prefer `/dv:build` once task generation and implementation readiness are already clear
|
|
29
|
+
- do not route into `/dv:build` when any design gate is unresolved: missing shell-visible project-local `.pen`, active/unclosed Pencil session, runtime/design-source checkpoint still BLOCK, or required design-supervisor review still BLOCK/unaccepted
|
|
29
30
|
- continuation prompts should usually target the main workflow entry so Da Vinci can resume the full state machine
|
|
30
31
|
"""
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Constraint Files
|
|
2
|
+
|
|
3
|
+
This document maps the workflow constraint files and clarifies which fields are machine-parsed gates versus advisory guidance.
|
|
4
|
+
|
|
5
|
+
Use this when you want one place to understand:
|
|
6
|
+
|
|
7
|
+
- where constraints live
|
|
8
|
+
- what can be customized freely
|
|
9
|
+
- what can block completion
|
|
10
|
+
|
|
11
|
+
## Constraint File Map
|
|
12
|
+
|
|
13
|
+
- `DA-VINCI.md`: project-level visual and workflow contract
|
|
14
|
+
- `.da-vinci/design-registry.md`: preferred project-local `.pen` path and source ownership
|
|
15
|
+
- `.da-vinci/changes/<change-id>/design-brief.md`: form-factor profile, visual direction, and layout-hygiene focus
|
|
16
|
+
- `.da-vinci/changes/<change-id>/design.md`: design plan and composition decisions
|
|
17
|
+
- `.da-vinci/changes/<change-id>/pencil-design.md`: live design record, screenshot review notes, gate evidence
|
|
18
|
+
- `.da-vinci/changes/<change-id>/pencil-bindings.md`: implementation page to Pencil page mapping
|
|
19
|
+
- `.da-vinci/changes/<change-id>/tasks.md`: implementation task plan
|
|
20
|
+
- `.da-vinci/changes/<change-id>/verification.md`: verification and drift summary
|
|
21
|
+
|
|
22
|
+
## Hard-Gate Fields (Machine Parsed)
|
|
23
|
+
|
|
24
|
+
The workflow audit currently parses specific fields. Keep these names stable.
|
|
25
|
+
|
|
26
|
+
### `DA-VINCI.md` -> `## Visual Assist`
|
|
27
|
+
|
|
28
|
+
- `Preferred adapters`
|
|
29
|
+
- `Design-supervisor reviewers`
|
|
30
|
+
- `Design-supervisor review mode`
|
|
31
|
+
- `Design-supervisor review inputs`
|
|
32
|
+
- `Scope`
|
|
33
|
+
- `Fallback`
|
|
34
|
+
- `Require Adapter`
|
|
35
|
+
- `Require Supervisor Review`
|
|
36
|
+
|
|
37
|
+
`Require Supervisor Review: true` makes missing or blocked supervisor review a completion blocker.
|
|
38
|
+
|
|
39
|
+
### `pencil-design.md` -> `## Design-Supervisor Review`
|
|
40
|
+
|
|
41
|
+
- `Status`
|
|
42
|
+
- `Issue list`
|
|
43
|
+
- `Revision outcome`
|
|
44
|
+
|
|
45
|
+
When supervisor review is required, missing or blocked review evidence blocks completion.
|
|
46
|
+
|
|
47
|
+
## Advisory Constraint Sections (Customizable)
|
|
48
|
+
|
|
49
|
+
Any additional section can be used as project guidance. These sections are not hard-gated unless you add custom checks.
|
|
50
|
+
|
|
51
|
+
For icon guidance specifically, route-level workflow checks do not include a dedicated Pencil icon-lookup API. Use explicit `icon_font` constraints plus screenshot review, and rely on CLI helpers for icon discovery.
|
|
52
|
+
When shell access is available, run `da-vinci icon-sync` to fetch official icon names first, then use `da-vinci icon-search --query "<text>"` to resolve likely `iconFontFamily` + `iconFontName` pairs before writing `batch_design` operations. By default `icon-sync` is non-blocking on partial source failures (reports `Status: DEGRADED`); use `--strict` only when you intentionally want hard gating in CI.
|
|
53
|
+
For product-specific vocabulary, add `~/.da-vinci/icon-aliases.json` (example: `references/icon-aliases.example.json`) so terms like `保险箱`, `解密`, and `重试` expand into icon-friendly query tokens automatically.
|
|
54
|
+
|
|
55
|
+
Recommended example:
|
|
56
|
+
|
|
57
|
+
```md
|
|
58
|
+
## Icon System Guidance (Advisory)
|
|
59
|
+
- Goal: improve icon consistency and visual quality without blocking delivery.
|
|
60
|
+
- Source: functional icons should prefer `icon_font`.
|
|
61
|
+
- Allowed families: `Material Symbols Rounded`, `lucide`, `feather`, `phosphor`.
|
|
62
|
+
- Default family: `Material Symbols Rounded`.
|
|
63
|
+
- Default spec: `24x24`, `weight 700` (when supported), unified color token per surface.
|
|
64
|
+
- Reuse rule: prefer reusable `Icon/*` components, then `ref` reuse.
|
|
65
|
+
- Placeholder policy: avoid placeholder geometry for functional icons.
|
|
66
|
+
- Review requirement: each anchor screenshot review should include an `icon consistency` note.
|
|
67
|
+
- Checkpoint policy: icon inconsistency => `WARN` (not `BLOCK`), then fix in next visual pass.
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
How to use this template in practice:
|
|
71
|
+
|
|
72
|
+
1. Copy the section into project-root `DA-VINCI.md`.
|
|
73
|
+
2. Keep it advisory first (`WARN`), and only convert to hard gate when explicit signoff requires it.
|
|
74
|
+
3. Use `da-vinci icon-sync` as a periodic cache refresh (not every design pass).
|
|
75
|
+
4. Run `da-vinci icon-search` when icon intent is ambiguous, icon quality drifts, or a new domain term appears.
|
|
76
|
+
5. Record one `icon consistency` note per anchor screenshot review in `pencil-design.md`.
|
|
77
|
+
|
|
78
|
+
Field guidance:
|
|
79
|
+
|
|
80
|
+
- `Goal`: the expected icon-quality outcome for the project.
|
|
81
|
+
- `Source`: require `icon_font` for functional icons; avoid placeholder vectors for real actions.
|
|
82
|
+
- `Allowed families`: approved icon families for this project.
|
|
83
|
+
- `Default family`: preferred first choice to avoid mixed-family drift.
|
|
84
|
+
- `Default spec`: baseline size/weight/color-token policy.
|
|
85
|
+
- `Reuse rule`: whether icon components should be reusable before page-wide expansion.
|
|
86
|
+
- `Placeholder policy`: what is considered unacceptable placeholder behavior.
|
|
87
|
+
- `Review requirement`: what reviewers must explicitly check.
|
|
88
|
+
- `Checkpoint policy`: expected severity (`WARN` or `BLOCK`) and remediation expectation.
|
|
89
|
+
|
|
90
|
+
Minimal template (recommended default):
|
|
91
|
+
|
|
92
|
+
```md
|
|
93
|
+
## Icon System Guidance (Advisory)
|
|
94
|
+
- Goal: improve icon consistency and visual quality without blocking delivery.
|
|
95
|
+
- Source: functional icons should prefer `icon_font`.
|
|
96
|
+
- Allowed families: `Material Symbols Rounded`, `lucide`, `feather`, `phosphor`.
|
|
97
|
+
- Default family: `Material Symbols Rounded`.
|
|
98
|
+
- Default spec: `24x24`, `weight 700` (when supported), unified color token per surface.
|
|
99
|
+
- Reuse rule: prefer reusable `Icon/*` components, then `ref` reuse.
|
|
100
|
+
- Placeholder policy: avoid placeholder geometry for functional icons.
|
|
101
|
+
- Review requirement: each anchor screenshot review should include an `icon consistency` note.
|
|
102
|
+
- Checkpoint policy: icon inconsistency => `WARN` (not `BLOCK`), then fix in next visual pass.
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Recommended Defaults
|
|
106
|
+
|
|
107
|
+
- keep `Require Supervisor Review: false` unless reviewer signoff is a delivery requirement
|
|
108
|
+
- keep icon guidance advisory by default (`WARN`)
|
|
109
|
+
- raise icon issues to hard-gate only for explicit signoff workflows
|
|
@@ -33,6 +33,23 @@ Entry helpers:
|
|
|
33
33
|
|
|
34
34
|
These helpers exist to select or resume the correct route. They are not substitutes for the main state machine.
|
|
35
35
|
|
|
36
|
+
## Supporting CLI Utilities (Outside `dv:` Routes)
|
|
37
|
+
|
|
38
|
+
These commands do not replace route selection, but they support design execution quality:
|
|
39
|
+
|
|
40
|
+
- `da-vinci icon-sync`
|
|
41
|
+
- sync official icon names (Material Symbols, Lucide, Feather, Phosphor) into `~/.da-vinci/icon-catalog.json`
|
|
42
|
+
- default scope is user-level (current HOME), reusable across projects for the same user
|
|
43
|
+
- rerun when upstream icon libraries are updated or when you need newly added icons
|
|
44
|
+
- default behavior is non-blocking on partial source failures (`Status: DEGRADED`)
|
|
45
|
+
- use `--strict` only when CI should fail on any upstream source error
|
|
46
|
+
- use `--catalog <path>` for an isolated project-level catalog
|
|
47
|
+
- `da-vinci icon-search --query "<text>" [--family ...] [--top ...] [--aliases ...]`
|
|
48
|
+
- resolve likely `icon_font` names before writing Pencil `batch_design` operations
|
|
49
|
+
- supports mixed EN/ZH terms and optional alias expansion via `~/.da-vinci/icon-aliases.json`
|
|
50
|
+
|
|
51
|
+
Use these utilities during `/dv:design`, especially before anchor-surface icon finalization.
|
|
52
|
+
|
|
36
53
|
## Route Meanings
|
|
37
54
|
|
|
38
55
|
### `/dv:intake`
|
|
@@ -83,6 +100,7 @@ Important continuation rule:
|
|
|
83
100
|
- it should not promote `build` as a co-equal next step yet
|
|
84
101
|
- route selection should be derived from artifact and checkpoint truth before contextual deltas are consulted
|
|
85
102
|
- if contextual deltas conflict with current artifacts, ignore those deltas for route selection and report the conflict
|
|
103
|
+
- do not route into `build` while design gates are unresolved: missing shell-visible project-local `.pen`, active/unclosed Pencil session, runtime or design-source checkpoint still `BLOCK`, or required design-supervisor review still `BLOCK`/unaccepted
|
|
86
104
|
|
|
87
105
|
### `/dv:breakdown`
|
|
88
106
|
|
|
@@ -154,6 +172,12 @@ Creates or updates:
|
|
|
154
172
|
|
|
155
173
|
This is the execution stage.
|
|
156
174
|
|
|
175
|
+
Completion discipline:
|
|
176
|
+
|
|
177
|
+
- treat `BUILD SUCCESSFUL` as compile-only evidence
|
|
178
|
+
- do not claim `design complete` or `workflow complete` while in-scope task groups remain
|
|
179
|
+
- run `da-vinci audit --mode completion --change <change-id> <project-path>` before any terminal completion claim
|
|
180
|
+
|
|
157
181
|
### `/dv:verify`
|
|
158
182
|
|
|
159
183
|
Use when:
|
package/docs/visual-adapters.md
CHANGED
|
@@ -46,33 +46,14 @@ Recommended shape:
|
|
|
46
46
|
|
|
47
47
|
```md
|
|
48
48
|
## Visual Assist
|
|
49
|
-
- Preferred adapters:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
- Design-supervisor
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
- Design-supervisor review inputs:
|
|
58
|
-
- screenshots
|
|
59
|
-
- pencil variables
|
|
60
|
-
- visual thesis
|
|
61
|
-
- content plan
|
|
62
|
-
- interaction thesis
|
|
63
|
-
- Scope:
|
|
64
|
-
- visual contract refinement
|
|
65
|
-
- page composition
|
|
66
|
-
- hierarchy and spacing
|
|
67
|
-
- motion guidance
|
|
68
|
-
- anchor-surface composition
|
|
69
|
-
- Pencil design refinement
|
|
70
|
-
- Fallback:
|
|
71
|
-
- native-da-vinci
|
|
72
|
-
- Require Adapter:
|
|
73
|
-
- false
|
|
74
|
-
- Require Supervisor Review:
|
|
75
|
-
- false
|
|
49
|
+
- Preferred adapters: frontend-skill, ui-ux-pro-max
|
|
50
|
+
- Design-supervisor reviewers: frontend-skill, ui-ux-pro-max
|
|
51
|
+
- Design-supervisor review mode: screenshot-and-theme
|
|
52
|
+
- Design-supervisor review inputs: screenshots, pencil variables, visual thesis, content plan, interaction thesis
|
|
53
|
+
- Scope: visual contract refinement, page composition, hierarchy and spacing, motion guidance, anchor-surface composition, Pencil design refinement
|
|
54
|
+
- Fallback: native-da-vinci
|
|
55
|
+
- Require Adapter: false
|
|
56
|
+
- Require Supervisor Review: false
|
|
76
57
|
```
|
|
77
58
|
|
|
78
59
|
Use `Require Adapter: true` only when the workflow must stop if the preferred adapter is unavailable locally.
|
|
@@ -83,32 +64,14 @@ Balanced default:
|
|
|
83
64
|
|
|
84
65
|
```md
|
|
85
66
|
## Visual Assist
|
|
86
|
-
- Preferred adapters:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
- Design-supervisor
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
-
|
|
93
|
-
|
|
94
|
-
- Design-supervisor review inputs:
|
|
95
|
-
- screenshots
|
|
96
|
-
- pencil variables
|
|
97
|
-
- visual thesis
|
|
98
|
-
- content plan
|
|
99
|
-
- interaction thesis
|
|
100
|
-
- Scope:
|
|
101
|
-
- visual contract refinement
|
|
102
|
-
- page composition
|
|
103
|
-
- hierarchy and spacing
|
|
104
|
-
- anchor-surface composition
|
|
105
|
-
- Pencil design refinement
|
|
106
|
-
- Fallback:
|
|
107
|
-
- native-da-vinci
|
|
108
|
-
- Require Adapter:
|
|
109
|
-
- false
|
|
110
|
-
- Require Supervisor Review:
|
|
111
|
-
- false
|
|
67
|
+
- Preferred adapters: ui-ux-pro-max, frontend-skill
|
|
68
|
+
- Design-supervisor reviewers: frontend-skill, ui-ux-pro-max
|
|
69
|
+
- Design-supervisor review mode: screenshot-and-theme
|
|
70
|
+
- Design-supervisor review inputs: screenshots, pencil variables, visual thesis, content plan, interaction thesis
|
|
71
|
+
- Scope: visual contract refinement, page composition, hierarchy and spacing, anchor-surface composition, Pencil design refinement
|
|
72
|
+
- Fallback: native-da-vinci
|
|
73
|
+
- Require Adapter: false
|
|
74
|
+
- Require Supervisor Review: false
|
|
112
75
|
```
|
|
113
76
|
|
|
114
77
|
Use this when:
|
|
@@ -120,33 +83,14 @@ Quality-first redesign:
|
|
|
120
83
|
|
|
121
84
|
```md
|
|
122
85
|
## Visual Assist
|
|
123
|
-
- Preferred adapters:
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
- Design-supervisor
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
-
|
|
130
|
-
|
|
131
|
-
- Design-supervisor review inputs:
|
|
132
|
-
- screenshots
|
|
133
|
-
- pencil variables
|
|
134
|
-
- visual thesis
|
|
135
|
-
- content plan
|
|
136
|
-
- interaction thesis
|
|
137
|
-
- Scope:
|
|
138
|
-
- visual contract refinement
|
|
139
|
-
- page composition
|
|
140
|
-
- hierarchy and spacing
|
|
141
|
-
- motion guidance
|
|
142
|
-
- anchor-surface composition
|
|
143
|
-
- Pencil design refinement
|
|
144
|
-
- Fallback:
|
|
145
|
-
- native-da-vinci
|
|
146
|
-
- Require Adapter:
|
|
147
|
-
- true
|
|
148
|
-
- Require Supervisor Review:
|
|
149
|
-
- false
|
|
86
|
+
- Preferred adapters: frontend-skill, ui-ux-pro-max
|
|
87
|
+
- Design-supervisor reviewers: frontend-skill, ui-ux-pro-max
|
|
88
|
+
- Design-supervisor review mode: screenshot-and-theme
|
|
89
|
+
- Design-supervisor review inputs: screenshots, pencil variables, visual thesis, content plan, interaction thesis
|
|
90
|
+
- Scope: visual contract refinement, page composition, hierarchy and spacing, motion guidance, anchor-surface composition, Pencil design refinement
|
|
91
|
+
- Fallback: native-da-vinci
|
|
92
|
+
- Require Adapter: true
|
|
93
|
+
- Require Supervisor Review: false
|
|
150
94
|
```
|
|
151
95
|
|
|
152
96
|
Use this when:
|