@xenonbyte/da-vinci-workflow 0.1.25 → 0.1.26
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 +23 -0
- package/README.md +39 -10
- package/README.zh-CN.md +28 -10
- package/SKILL.md +3 -0
- package/commands/claude/dv/design.md +1 -0
- package/commands/codex/prompts/dv-design.md +1 -0
- package/commands/gemini/dv/design.toml +1 -0
- package/docs/dv-command-reference.md +14 -2
- package/docs/pencil-rendering-workflow.md +9 -7
- package/docs/prompt-presets/README.md +4 -0
- package/docs/visual-assist-presets/README.md +4 -0
- package/docs/workflow-examples.md +13 -11
- package/docs/workflow-overview.md +2 -0
- package/docs/zh-CN/dv-command-reference.md +14 -2
- package/docs/zh-CN/pencil-rendering-workflow.md +9 -7
- package/docs/zh-CN/prompt-presets/README.md +5 -1
- package/docs/zh-CN/visual-assist-presets/README.md +5 -1
- package/docs/zh-CN/workflow-examples.md +13 -11
- package/docs/zh-CN/workflow-overview.md +2 -0
- package/examples/greenfield-spec-markupflow/README.md +6 -1
- package/lib/async-offload-worker.js +26 -0
- package/lib/async-offload.js +82 -0
- package/lib/audit-parsers.js +152 -32
- package/lib/audit.js +84 -23
- package/lib/cli.js +749 -433
- package/lib/fs-safety.js +1 -4
- package/lib/icon-aliases.js +7 -7
- package/lib/icon-search.js +21 -14
- package/lib/icon-sync.js +220 -41
- package/lib/install.js +128 -60
- package/lib/mcp-runtime-gate.js +4 -7
- package/lib/pen-persistence.js +318 -46
- package/lib/pencil-lock.js +237 -25
- package/lib/pencil-preflight.js +233 -12
- package/lib/pencil-session.js +216 -36
- package/lib/supervisor-review.js +56 -34
- package/lib/utils.js +121 -0
- package/lib/workflow-bootstrap.js +255 -0
- package/package.json +13 -3
- package/references/checkpoints.md +2 -0
- package/references/design-inputs.md +2 -0
- package/references/pencil-design-to-code.md +2 -0
- package/scripts/fixtures/complex-sample.pen +0 -295
- package/scripts/fixtures/mock-pencil.js +0 -49
- package/scripts/test-audit-context-delta.js +0 -446
- package/scripts/test-audit-design-supervisor.js +0 -691
- package/scripts/test-audit-safety.js +0 -92
- package/scripts/test-icon-aliases.js +0 -96
- package/scripts/test-icon-search.js +0 -77
- package/scripts/test-icon-sync.js +0 -178
- package/scripts/test-mcp-runtime-gate.js +0 -287
- package/scripts/test-mode-consistency.js +0 -344
- package/scripts/test-pen-persistence.js +0 -403
- package/scripts/test-pencil-lock.js +0 -130
- package/scripts/test-pencil-preflight.js +0 -169
- package/scripts/test-pencil-session.js +0 -192
- package/scripts/test-persistence-flows.js +0 -345
- package/scripts/test-supervisor-review-cli.js +0 -619
- package/scripts/test-supervisor-review-integration.js +0 -115
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.1.26 - 2026-03-31
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- `da-vinci check-pen-baseline` to compare project-local `.pen` hashes against external or secondary `.pen` sources before a new session write phase
|
|
7
|
+
- `da-vinci sync-pen-source` to sync the chosen latest `.pen` source back into the project-local baseline and refresh state metadata
|
|
8
|
+
- `pencil-session begin` support for multi-source baseline flags: `--baseline`, `--prefer-source`, and `--sync-preferred-source`
|
|
9
|
+
- new persistence/session/flow regression tests covering baseline divergence detection and explicit source sync recovery
|
|
10
|
+
- `da-vinci bootstrap-project` to scaffold a minimal `.da-vinci/` project spine, seed a workflow-owned project-local `.pen`, and optionally create change-level design artifacts
|
|
11
|
+
- release/doc alignment regression coverage for bootstrap scaffolding, package contents, and repo-head command documentation
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- multi-source baseline policy now treats `pencil-session persist` as live-vs-project sync evidence only; cross-source freshness must be explicitly aligned before continuing edits
|
|
15
|
+
- design prompts, skill rules, and workflow docs now require baseline alignment checks when external `.pen` backups are present
|
|
16
|
+
- `pencil-lock` now recovers stale lock files only when the owning project no longer has an active Pencil session, with a short grace window to avoid begin-time races
|
|
17
|
+
- `pencil-session end --force` now records explicit `forceWithoutSync` session metadata, and completion audit now fails when a session was force-closed without final live sync verification
|
|
18
|
+
- `icon-sync` network fetch now follows HTTP redirects (with loop and redirect-limit protections) instead of assuming direct 2xx responses
|
|
19
|
+
- `audit` now suggests `da-vinci bootstrap-project` when required workflow artifacts are missing, instead of failing without a concrete hydration path
|
|
20
|
+
- `supervisor-review` retry backoff now supports `--review-retry-max-delay-ms` so repeated reviewer failures stay bounded
|
|
21
|
+
- `icon-sync` upstream source URLs are now configurable, and `icon-search` score weights are exported as named constants instead of relying on undocumented magic numbers
|
|
22
|
+
- `pencil-session` lifecycle rollback/release failures now preserve structured causes instead of mutating original error messages in place
|
|
23
|
+
- the main CI workflow can now attach the real reviewer bridge smoke job automatically when repository integration variables are enabled, while retaining the local core gate as the always-on baseline
|
|
24
|
+
- README and command-reference docs now document the `0.1.26` bootstrap/reviewer/CI release surface explicitly instead of leaving those changes as repo-head-only notes
|
|
25
|
+
|
|
3
26
|
## v0.1.25 - 2026-03-29
|
|
4
27
|
|
|
5
28
|
### Added
|
package/README.md
CHANGED
|
@@ -28,12 +28,15 @@ 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.26`
|
|
32
32
|
|
|
33
|
-
Release highlights
|
|
33
|
+
Release highlights for `0.1.26`:
|
|
34
34
|
|
|
35
|
-
- `da-vinci
|
|
36
|
-
-
|
|
35
|
+
- `da-vinci bootstrap-project --project <path> [--change <id>]` now scaffolds the minimum `.da-vinci/` artifact spine, seeds a workflow-owned project-local `.pen`, and gives a concrete next-step handoff into `pencil-session begin`
|
|
36
|
+
- audit failures now suggest `da-vinci bootstrap-project` when the project is missing the required `.da-vinci/` structure, reducing “hard fail with no recovery path” friction
|
|
37
|
+
- `da-vinci supervisor-review --run-reviewers` now supports configurable parallel reviewer execution, resilient retry backoff, and capped retry delay (`--review-concurrency`, `--review-retries`, `--review-retry-delay-ms`, `--review-retry-max-delay-ms`)
|
|
38
|
+
- real `codex exec` reviewer smoke remains opt-in, but the main CI workflow can now attach that smoke job automatically when repository integration variables are enabled; the separate `reviewer-bridge-smoke` workflow remains available for manual/weekly runs
|
|
39
|
+
- `icon-sync` now supports configurable source URLs, and `icon-search` exports named scoring weights instead of relying on undocumented magic numbers
|
|
37
40
|
- supervisor-review parsing now explicitly handles legacy Chinese round-attempt headings (for example `## Design-Supervisor Review(第2轮尝试)`) and keeps canonical structured review fallback deterministic
|
|
38
41
|
- `--nodes-file` metadata-payload guard now reports shorter relative file paths when possible, while preserving absolute-path fallback outside current working directory
|
|
39
42
|
- audit parser logic is now split into `lib/audit-parsers.js`, reducing `lib/audit.js` size and making maintenance safer
|
|
@@ -85,7 +88,7 @@ Release highlights:
|
|
|
85
88
|
- prompt-entry helper routes for `intake`, `prompt`, and `continue` are now published across Codex, Claude, and Gemini
|
|
86
89
|
- Chinese companion docs are now intentionally limited to `README.zh-CN.md` and `docs/zh-CN/`
|
|
87
90
|
- asset validation now covers the full shipped documentation set
|
|
88
|
-
- `da-vinci status` now validates full installed asset sets across Codex, Claude, and Gemini
|
|
91
|
+
- `da-vinci status` now validates full installed asset sets across Codex, Claude, and Gemini, and flags stale or locally modified copies
|
|
89
92
|
- Claude and Gemini command adapters now use self-contained workflow wording after installation
|
|
90
93
|
- `.npmrc` and `openspec/` are kept local-only and are no longer versioned or shipped in the npm package
|
|
91
94
|
- Node-first install, uninstall, status, and asset validation commands remain the supported distribution path
|
|
@@ -304,6 +307,14 @@ Placement rules:
|
|
|
304
307
|
- keep change-specific workflow files in `.da-vinci/changes/<change-id>/`
|
|
305
308
|
- do not scatter `proposal.md`, `tasks.md`, and `verification.md` across the project root
|
|
306
309
|
|
|
310
|
+
If a repo does not have this scaffold yet, hydrate the minimum project spine first:
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
da-vinci bootstrap-project --project /abs/path/to/project --change <change-id>
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
That command creates the required project-level files, seeds a default project-local `.pen`, and lays down the minimum change-level design artifacts expected by the current workflow.
|
|
317
|
+
|
|
307
318
|
## Checkpoints
|
|
308
319
|
|
|
309
320
|
Da Vinci uses these checkpoints:
|
|
@@ -368,8 +379,12 @@ Rules:
|
|
|
368
379
|
- complex pages should be decomposed into subpages, states, overlays, and implementation surfaces before Pencil redesign is treated as final
|
|
369
380
|
- the preferred `.pen` path recorded in `design-registry.md` is workflow-owned state, not user-authored config
|
|
370
381
|
- 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
|
|
382
|
+
- in multi-source scenarios (for example project-local `.pen` plus an external backup `.pen`), do not assume the project file is globally latest just because a prior `pencil-session persist` succeeded
|
|
383
|
+
- before a new edit round starts, compare hashes explicitly across sources and confirm source priority
|
|
384
|
+
- if an external source is selected as latest, sync it into the project-local `.pen` before further live edits
|
|
371
385
|
- 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
|
|
372
386
|
- 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
|
|
387
|
+
- in multi-source scenarios (for example external backup `.pen` files), a successful `pencil-session persist` only proves live-vs-project sync for that run; it does not prove the project file is globally latest until cross-source hash alignment is confirmed
|
|
373
388
|
|
|
374
389
|
Optional visual-adapter policy:
|
|
375
390
|
|
|
@@ -508,7 +523,7 @@ Both modes check the most common workflow-integrity failures in a project:
|
|
|
508
523
|
- writes `Configured reviewers`, `Executed reviewers`, `Review source`, `Status`, `Issue list`, and `Revision outcome` into `pencil-design.md` when `--write` is provided
|
|
509
524
|
- accepts explicit status input (`--status PASS|WARN|BLOCK`) or can infer a conservative status from current design artifacts
|
|
510
525
|
- for required supervisor gates, prefer `--run-reviewers --write` so configured reviewer skills execute and the record is persisted in one step
|
|
511
|
-
- reviewer execution tuning is available via `--review-concurrency`, `--review-retries`, and `--review-retry-delay-ms` (exponential backoff)
|
|
526
|
+
- reviewer execution tuning is available via `--review-concurrency`, `--review-retries`, `--review-retry-delay-ms`, and `--review-retry-max-delay-ms` (bounded exponential backoff)
|
|
512
527
|
- keeps `design-supervisor review` available as a compatibility alias
|
|
513
528
|
|
|
514
529
|
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.
|
|
@@ -518,15 +533,18 @@ Project-local `.pen` persistence now has two supported paths:
|
|
|
518
533
|
|
|
519
534
|
- first-run path: seed the registered project-local `.pen` with `da-vinci ensure-pen --output <path> --verify-open`, open that exact path, then persist later MCP snapshot writes back to the same file
|
|
520
535
|
- resume path: if a registered project-local `.pen` already exists, reopen it for continuity, but after material live edits persist a fresh live MCP snapshot back to that same path and run `da-vinci check-pen-sync`
|
|
536
|
+
- multi-source guard: when external `.pen` sources also exist, run `da-vinci check-pen-baseline --pen <project-pen> --baseline <other-pen>` before each new `pencil-session begin`; if hashes diverge, confirm source priority explicitly and sync the chosen source into `<project-pen>` before new edits
|
|
521
537
|
|
|
522
538
|
On autonomous redesign runs, the session wrapper is required when it is available. Lower-level helpers remain available only when the wrapper truly cannot be used.
|
|
523
539
|
|
|
524
540
|
Persistence helpers:
|
|
525
541
|
|
|
526
542
|
- required wrapper on autonomous runs:
|
|
527
|
-
- `da-vinci pencil-session begin --project <project-path> --pen <path
|
|
543
|
+
- `da-vinci pencil-session begin --project <project-path> --pen <path> [--baseline <path>] [--prefer-source <path>] [--sync-preferred-source]`
|
|
528
544
|
- `da-vinci pencil-session persist --project <project-path> --pen <path> --nodes-file <batch-get-json> --variables-file <get-variables-json> --version <version>`
|
|
529
545
|
- `da-vinci pencil-session end --project <project-path> --pen <path> --nodes-file <batch-get-json> --variables-file <get-variables-json> --version <version>`
|
|
546
|
+
- `da-vinci check-pen-baseline --pen <project-pen> --baseline <other-pen>[,<other-pen>...] [--prefer-source <path>]`
|
|
547
|
+
- `da-vinci sync-pen-source --from <preferred-source> --to <project-pen>`
|
|
530
548
|
- `da-vinci ensure-pen --output <path> --verify-open`
|
|
531
549
|
- `da-vinci write-pen --output <path> --nodes-file <batch-get-json> --variables-file <get-variables-json> --version <version> --verify-open`
|
|
532
550
|
- `da-vinci check-pen-sync --pen <path> --nodes-file <batch-get-json> --variables-file <get-variables-json> --version <version>`
|
|
@@ -593,13 +611,13 @@ Entry helpers:
|
|
|
593
611
|
/dv:continue
|
|
594
612
|
```
|
|
595
613
|
|
|
596
|
-
## Repo-local forward
|
|
614
|
+
## Repo-local forward-test reference
|
|
597
615
|
|
|
598
|
-
A
|
|
616
|
+
A documentation-first repo-local forward-test reference is available at:
|
|
599
617
|
|
|
600
618
|
- `examples/greenfield-spec-markupflow/`
|
|
601
619
|
|
|
602
|
-
That example
|
|
620
|
+
That example records a `greenfield-spec` scenario from:
|
|
603
621
|
|
|
604
622
|
1. design brief
|
|
605
623
|
2. proposal and spec
|
|
@@ -610,6 +628,17 @@ That example runs a `greenfield-spec` scenario from:
|
|
|
610
628
|
7. static HTML delivery
|
|
611
629
|
8. verification
|
|
612
630
|
|
|
631
|
+
It is not a drop-in `da-vinci audit` fixture. The example keeps its walkthrough artifacts at the repository root for readability; the current audit commands expect a hydrated `.da-vinci/` tree plus persisted session/state metadata.
|
|
632
|
+
|
|
633
|
+
If you want to turn that example shape into a runnable audit scaffold, start by hydrating a real project tree with `da-vinci bootstrap-project --project <project-path> --change <change-id>`.
|
|
634
|
+
|
|
635
|
+
For reviewer bridge coverage:
|
|
636
|
+
|
|
637
|
+
- default CI always runs the core local test gate (`npm run quality:ci:core`)
|
|
638
|
+
- when repository integration variables are enabled, the main CI workflow also runs the real reviewer bridge smoke job
|
|
639
|
+
- the real `codex exec` reviewer smoke remains opt-in via `DA_VINCI_RUN_SUPERVISOR_INTEGRATION=1 npm run test:supervisor-review-integration`
|
|
640
|
+
- `.github/workflows/reviewer-bridge-smoke.yml` provides a dedicated manual/weekly smoke workflow; when enabled, it treats missing integration wiring as a hard failure instead of silently `SKIP`-ing
|
|
641
|
+
|
|
613
642
|
## Example requests
|
|
614
643
|
|
|
615
644
|
### Greenfield spec
|
package/README.zh-CN.md
CHANGED
|
@@ -30,12 +30,15 @@ Da Vinci 是一个把产品需求一路推进到结构化规格、Pencil 设计
|
|
|
30
30
|
|
|
31
31
|
最新已发布 npm 包:
|
|
32
32
|
|
|
33
|
-
- `@xenonbyte/da-vinci-workflow@0.1.
|
|
33
|
+
- `@xenonbyte/da-vinci-workflow@0.1.26`
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
`0.1.26` 版本重点:
|
|
36
36
|
|
|
37
|
-
- `da-vinci
|
|
38
|
-
-
|
|
37
|
+
- 新增 `da-vinci bootstrap-project --project <path> [--change <id>]`,可快速生成最小 `.da-vinci/` 工件骨架、seed 一个工作流管理的项目内 `.pen`,并给出后续 `pencil-session begin` 的明确下一步
|
|
38
|
+
- audit 现在在缺少 `.da-vinci/` 或关键工件时,会直接提示可执行的 `da-vinci bootstrap-project` 修复命令,不再只报硬错误
|
|
39
|
+
- `da-vinci supervisor-review --run-reviewers` 现已支持 reviewer 并发执行、失败重试退避,以及最大退避封顶(`--review-concurrency`、`--review-retries`、`--review-retry-delay-ms`、`--review-retry-max-delay-ms`)
|
|
40
|
+
- 真实 `codex exec` reviewer bridge 仍然是 opt-in,但主 CI workflow 现在在仓库变量已配置时也能自动挂上 reviewer smoke job;独立的 `reviewer-bridge-smoke` workflow 仍保留给手动/定时烟测
|
|
41
|
+
- `icon-sync` 现在支持可配置的上游 source URL,`icon-search` 评分权重也改成了具名常量,降低后续维护成本
|
|
39
42
|
- supervisor-review 解析现已显式覆盖中文 legacy 轮次标题(例如 `## Design-Supervisor Review(第2轮尝试)`),并保持“优先结构化评审块”的回退策略可预测
|
|
40
43
|
- `--nodes-file` 元数据误传保护现在优先输出更短的相对路径(在 cwd 外仍回退绝对路径),便于日志阅读
|
|
41
44
|
- audit 解析职责已拆分到 `lib/audit-parsers.js`,`lib/audit.js` 体量下降,可维护性更好
|
|
@@ -87,11 +90,11 @@ Da Vinci 是一个把产品需求一路推进到结构化规格、Pencil 设计
|
|
|
87
90
|
- `intake`、`prompt`、`continue` 三个提示词入口辅助路由已随 Codex、Claude、Gemini 一起发布
|
|
88
91
|
- 中文配套文档现在刻意只保留 `README.zh-CN.md` 和 `docs/zh-CN/`
|
|
89
92
|
- 资产校验现在覆盖完整的随包文档集合
|
|
90
|
-
- `da-vinci status` 会校验 Codex、Claude、Gemini
|
|
93
|
+
- `da-vinci status` 会校验 Codex、Claude、Gemini 的完整安装资产,并标记陈旧或被本地改写的副本
|
|
91
94
|
- Claude 和 Gemini 安装后的命令文案已改为自洽的工作流措辞
|
|
92
95
|
- `.npmrc` 和 `openspec/` 现在只本地保留,不再进入版本管理和 npm 包
|
|
93
96
|
- 安装、卸载、状态、资产校验都通过 Node CLI 提供
|
|
94
|
-
- 仓库内含一个 `greenfield-spec` 的本地 forward
|
|
97
|
+
- 仓库内含一个 `greenfield-spec` 的本地 forward-test 参考示例(文档优先,不是可直接通过 `da-vinci audit` 的 `.da-vinci/` 审计夹具)
|
|
95
98
|
|
|
96
99
|
## 支持的工作流模式
|
|
97
100
|
|
|
@@ -300,6 +303,14 @@ project/
|
|
|
300
303
|
- 项目内持久化的 Pencil `.pen` 文件默认放在 `.da-vinci/designs/`
|
|
301
304
|
- change 级工件放在 `.da-vinci/changes/<change-id>/`
|
|
302
305
|
|
|
306
|
+
如果项目还没有这套基础骨架,可以先执行:
|
|
307
|
+
|
|
308
|
+
```bash
|
|
309
|
+
da-vinci bootstrap-project --project /abs/path/to/project --change <change-id>
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
这个命令会先生成项目级 `.da-vinci/` 工件、默认项目内 `.pen`,以及当前工作流所要求的最小 change 级设计工件。
|
|
313
|
+
|
|
303
314
|
## 设计源规则
|
|
304
315
|
|
|
305
316
|
- `DA-VINCI.md` 是跨页面视觉一致性的项目级视觉契约
|
|
@@ -312,8 +323,12 @@ project/
|
|
|
312
323
|
- 复杂页面在 Pencil 重设计前应该先拆成 subpage、state、overlay 和 implementation surface
|
|
313
324
|
- `design-registry.md` 里登记的首选 `.pen` 路径属于工作流自动维护的状态,不应该依赖用户手工填写
|
|
314
325
|
- 一旦进入 Pencil 设计,Da Vinci 应该使用或创建这个项目内 `.pen` 路径,而不是继续沿用当前随手打开的 Pencil 文档
|
|
326
|
+
- 在多设计源场景(例如项目内 `.pen` + 外部备份 `.pen`)下,不能因为上一轮 `pencil-session persist` 成功就默认项目内文件一定是全局最新
|
|
327
|
+
- 新一轮编辑前要先做跨源 hash 对齐并明确来源优先级
|
|
328
|
+
- 如果外部源被确认是最新,先把它同步回项目内 `.pen`,再继续 live 编辑
|
|
315
329
|
- 如果 Pencil MCP 修改了 live 文档但没有自动把项目内 `.pen` 文件落到磁盘,工作流应该先把该 `.pen` 文件补写到登记路径,再把这轮设计当成可追踪结果
|
|
316
330
|
- 在进入 `pencil-bindings.md` 和实现任务前,应该先通过 `design-source checkpoint`,确认登记路径、当前设计源和 shell 可见 `.pen` 文件已经收敛成同一个项目级来源
|
|
331
|
+
- 多设计源场景(例如存在外部备份 `.pen`)下,`pencil-session persist` 成功只代表“本轮 live 与项目内 `.pen` 同步”,不等于“项目内文件一定是全局最新”;继续前必须做跨源 hash 对齐
|
|
317
332
|
|
|
318
333
|
可选 visual adapter 规则:
|
|
319
334
|
|
|
@@ -428,9 +443,9 @@ Context Delta 与 audit 的关系:
|
|
|
428
443
|
|
|
429
444
|
- 加上 `--write` 时,会把 `Configured reviewers`、`Executed reviewers`、`Review source`、`Status`、`Issue list`、`Revision outcome` 写入 `pencil-design.md`
|
|
430
445
|
- 可通过 `--status PASS|WARN|BLOCK` 显式指定,也可基于当前设计工件做保守推断
|
|
431
|
-
- 对 required supervisor gate,优先使用 `--run-reviewers --write
|
|
432
|
-
- reviewer 执行参数可通过 `--review-concurrency`、`--review-retries`、`--review-retry-delay-ms`
|
|
433
|
-
- `design-supervisor review`
|
|
446
|
+
- 对 required supervisor gate,优先使用 `--run-reviewers --write`,让配置的 reviewer skill 真正执行并一次落盘
|
|
447
|
+
- reviewer 执行参数可通过 `--review-concurrency`、`--review-retries`、`--review-retry-delay-ms`、`--review-retry-max-delay-ms` 调优(带上限的指数退避)
|
|
448
|
+
- `design-supervisor review` 兼容别名仍然保留
|
|
434
449
|
|
|
435
450
|
当 Pencil MCP 可用时,Da Vinci 现在还要求在终态完成声明前,把 MCP runtime gate 结果记录到 `pencil-design.md`。这层 gate 负责检查 live editor/source convergence,与 filesystem audit 分工不同。
|
|
436
451
|
在重设计进行中,如果有 shell 能力,应在第一次成功写入 Pencil 后立即运行 `da-vinci audit --mode integrity <project-path>`;如果同一个 anchor surface 连续回滚,则继续配合 `da-vinci preflight-pencil` 和更小的 follow-up batch。
|
|
@@ -439,15 +454,18 @@ Context Delta 与 audit 的关系:
|
|
|
439
454
|
|
|
440
455
|
- 首次运行路径:先用 `da-vinci ensure-pen --output <path> --verify-open` seed 登记好的项目内 `.pen`,打开这个精确路径,然后把后续 MCP 快照持续写回同一个文件
|
|
441
456
|
- 继续迭代路径:如果项目里原本已有登记的 `.pen`,先打开它继续工作;但发生实质性 live edit 后,要把当前 live MCP 快照重新持久化回同一路径,并运行 `da-vinci check-pen-sync`
|
|
457
|
+
- 多源门禁:如果还存在外部 `.pen` 源,每次新一轮 `pencil-session begin` 前先运行 `da-vinci check-pen-baseline --pen <project-pen> --baseline <other-pen>`;若 hash 不一致,必须先确认来源优先级并把选中的来源同步回 `<project-pen>`
|
|
442
458
|
|
|
443
459
|
如果是自治运行,session wrapper 只要可用就必须使用。只有 wrapper 确实不可用时,才退回底层 helper。
|
|
444
460
|
|
|
445
461
|
持久化命令:
|
|
446
462
|
|
|
447
463
|
- 自治运行必须使用的 session 命令:
|
|
448
|
-
- `da-vinci pencil-session begin --project <project-path> --pen <path
|
|
464
|
+
- `da-vinci pencil-session begin --project <project-path> --pen <path> [--baseline <path>] [--prefer-source <path>] [--sync-preferred-source]`
|
|
449
465
|
- `da-vinci pencil-session persist --project <project-path> --pen <path> --nodes-file <batch-get-json> --variables-file <get-variables-json> --version <version>`
|
|
450
466
|
- `da-vinci pencil-session end --project <project-path> --pen <path> --nodes-file <batch-get-json> --variables-file <get-variables-json> --version <version>`
|
|
467
|
+
- `da-vinci check-pen-baseline --pen <project-pen> --baseline <other-pen>[,<other-pen>...] [--prefer-source <path>]`
|
|
468
|
+
- `da-vinci sync-pen-source --from <preferred-source> --to <project-pen>`
|
|
451
469
|
- `da-vinci ensure-pen --output <path> --verify-open`
|
|
452
470
|
- `da-vinci write-pen --output <path> --nodes-file <batch-get-json> --variables-file <get-variables-json> --version <version> --verify-open`
|
|
453
471
|
- `da-vinci check-pen-sync --pen <path> --nodes-file <batch-get-json> --variables-file <get-variables-json> --version <version>`
|
package/SKILL.md
CHANGED
|
@@ -260,6 +260,9 @@ During active Pencil work:
|
|
|
260
260
|
`da-vinci pencil-session begin --project <project-path> --pen <path>`
|
|
261
261
|
`da-vinci pencil-session persist --project <project-path> --pen <path> --nodes-file <batch-get-json> --variables-file <get-variables-json> --version <version>`
|
|
262
262
|
`da-vinci pencil-session end --project <project-path> --pen <path> --nodes-file <batch-get-json> --variables-file <get-variables-json> --version <version>`
|
|
263
|
+
- when multiple `.pen` sources exist (for example external backups), run `da-vinci check-pen-baseline --pen <project-pen> --baseline <other-pen>` before a new `pencil-session begin`
|
|
264
|
+
- if baseline hashes diverge, do not treat the previous `persist` success as global freshness; confirm source priority explicitly (`--prefer-source`) and sync the chosen source into the project-local `.pen` before new edits
|
|
265
|
+
- use `da-vinci sync-pen-source --from <preferred-source> --to <project-pen>` when an external source is selected as latest and must be materialized into the project-local baseline
|
|
263
266
|
- before the first Pencil edit on a redesign pass, begin a Pencil session so the registered project-local `.pen` exists before editing and the global Pencil lock is held for that project
|
|
264
267
|
- acquire the global Pencil lock before MCP write operations on a project and release it after the write phase so two projects do not compete for the same active editor
|
|
265
268
|
- when a registered project-local `.pen` already exists, reopen it for continuity, but after material live edits persist a fresh MCP snapshot back to that same path instead of assuming live edits were flushed automatically
|
|
@@ -22,6 +22,7 @@ Before non-trivial `batch_design` calls, preflight the Pencil operations when sh
|
|
|
22
22
|
If the same anchor surface rolls back twice, switch to micro-batches of 6 or fewer operations until a clean schema-safe pass succeeds.
|
|
23
23
|
Require the session wrapper commands on autonomous runs: `da-vinci pencil-session begin`, `da-vinci pencil-session persist`, and `da-vinci pencil-session end`.
|
|
24
24
|
Before the first Pencil edit, require `da-vinci pencil-session begin` so the registered project-local `.pen` is seeded and locked before editing starts.
|
|
25
|
+
When multiple `.pen` sources exist (for example an external backup), run `da-vinci check-pen-baseline --pen <project-pen> --baseline <other-pen>` before `pencil-session begin`. If hashes diverge, confirm source priority explicitly and sync the chosen source into the project-local `.pen` (for example `da-vinci sync-pen-source --from <preferred-source> --to <project-pen>`) before continuing edits.
|
|
25
26
|
If a registered project-local `.pen` already exists, reopen it for continuity but persist a fresh live MCP snapshot back to that same path through `pencil-session persist` after material edits.
|
|
26
27
|
After the first successful Pencil write, run `da-vinci audit --mode integrity <project-path>` before broad expansion continues.
|
|
27
28
|
If Pencil MCP is active, run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
|
|
@@ -16,6 +16,7 @@ Before non-trivial `batch_design` calls, preflight the Pencil operations when sh
|
|
|
16
16
|
If the same anchor surface rolls back twice, switch to micro-batches of 6 or fewer operations until a clean schema-safe pass succeeds.
|
|
17
17
|
Require the session wrapper commands on autonomous runs: `da-vinci pencil-session begin`, `da-vinci pencil-session persist`, and `da-vinci pencil-session end`.
|
|
18
18
|
Before the first Pencil edit, require `da-vinci pencil-session begin` so the registered project-local `.pen` is seeded and locked before editing starts.
|
|
19
|
+
When multiple `.pen` sources exist (for example an external backup), run `da-vinci check-pen-baseline --pen <project-pen> --baseline <other-pen>` before `pencil-session begin`. If hashes diverge, confirm source priority explicitly and sync the chosen source into the project-local `.pen` (for example `da-vinci sync-pen-source --from <preferred-source> --to <project-pen>`) before continuing edits.
|
|
19
20
|
If a registered project-local `.pen` already exists, reopen it for continuity but persist a fresh live MCP snapshot back to that same path through `pencil-session persist` after material edits.
|
|
20
21
|
After the first successful Pencil write, run `da-vinci audit --mode integrity <project-path>` before broad expansion continues.
|
|
21
22
|
If Pencil MCP is active, run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
|
|
@@ -15,6 +15,7 @@ Before non-trivial `batch_design` calls, preflight the Pencil operations when sh
|
|
|
15
15
|
If the same anchor surface rolls back twice, switch to micro-batches of 6 or fewer operations until a clean schema-safe pass succeeds.
|
|
16
16
|
Require the session wrapper commands on autonomous runs: `da-vinci pencil-session begin`, `da-vinci pencil-session persist`, and `da-vinci pencil-session end`.
|
|
17
17
|
Before the first Pencil edit, require `da-vinci pencil-session begin` so the registered project-local `.pen` is seeded and locked before editing starts.
|
|
18
|
+
When multiple `.pen` sources exist (for example an external backup), run `da-vinci check-pen-baseline --pen <project-pen> --baseline <other-pen>` before `pencil-session begin`. If hashes diverge, confirm source priority explicitly and sync the chosen source into the project-local `.pen` (for example `da-vinci sync-pen-source --from <preferred-source> --to <project-pen>`) before continuing edits.
|
|
18
19
|
If a registered project-local `.pen` already exists, reopen it for continuity but persist a fresh live MCP snapshot back to that same path through `pencil-session persist` after material edits.
|
|
19
20
|
After the first successful Pencil write, run `da-vinci audit --mode integrity <project-path>` before broad expansion continues.
|
|
20
21
|
If Pencil MCP is active, run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
|
|
@@ -47,12 +47,24 @@ These commands do not replace route selection, but they support design execution
|
|
|
47
47
|
- `da-vinci icon-search --query "<text>" [--family ...] [--top ...] [--aliases ...]`
|
|
48
48
|
- resolve likely `icon_font` names before writing Pencil `batch_design` operations
|
|
49
49
|
- supports mixed EN/ZH terms and optional alias expansion via `~/.da-vinci/icon-aliases.json`
|
|
50
|
-
- `da-vinci
|
|
50
|
+
- `da-vinci bootstrap-project --project <path> [--change <id>] [--force]`
|
|
51
|
+
- scaffold the minimum `.da-vinci/` workflow spine for a repo that has not been hydrated yet
|
|
52
|
+
- seeds a workflow-owned project-local `.pen` under `.da-vinci/designs/`
|
|
53
|
+
- optionally creates the current change-level design artifacts (`design-brief.md`, `design.md`, `pencil-design.md`, `pencil-bindings.md`)
|
|
54
|
+
- use this before the first strict `audit` run when starting from an empty repo, a doc-first example, or a partially hydrated workspace
|
|
55
|
+
- `da-vinci supervisor-review --project <path> --change <id> [--run-reviewers] [--review-concurrency <value>] [--review-retries <value>] [--review-retry-delay-ms <value>] [--review-retry-max-delay-ms <value>] [--source <skill|manual|inferred>] [--executed-reviewers <csv>] [--status ...] [--issue-list ...] [--revision-outcome ...] [--write]`
|
|
51
56
|
- persists a structured supervisor-review record (`Configured reviewers`, `Executed reviewers`, `Review source`, `Status`, `Issue list`, `Revision outcome`) in `pencil-design.md`
|
|
52
57
|
- use `--run-reviewers --write` for one-step execution + record persistence through configured reviewer skills
|
|
53
|
-
- `--review-concurrency`, `--review-retries`, and `--review-retry-delay-ms` control parallelism
|
|
58
|
+
- `--review-concurrency`, `--review-retries`, `--review-retry-delay-ms`, and `--review-retry-max-delay-ms` control parallelism plus bounded retry backoff for reviewer execution
|
|
54
59
|
- when `Require Supervisor Review: true`, inferred/manual records are completion-blocking
|
|
55
60
|
- `design-supervisor review` is kept as a compatibility alias that forwards to this command
|
|
61
|
+
- `da-vinci check-pen-baseline --pen <project-pen> --baseline <other-pen>[,<other-pen>...] [--prefer-source <path>]`
|
|
62
|
+
- compares canonical `.pen` snapshot hashes across project-local and external/secondary sources before a new design round
|
|
63
|
+
- blocks by default on divergence until source priority is explicit
|
|
64
|
+
- `--prefer-source <project-pen>` records an explicit decision to keep the project path authoritative
|
|
65
|
+
- `da-vinci sync-pen-source --from <preferred-source> --to <project-pen>`
|
|
66
|
+
- copies the selected latest `.pen` source into the project-local `.pen` path and refreshes Da Vinci state metadata
|
|
67
|
+
- use when external backup is the latest baseline and must be materialized before `pencil-session begin`
|
|
56
68
|
|
|
57
69
|
Use these utilities during `/dv:design`, especially before anchor-surface icon finalization.
|
|
58
70
|
|
|
@@ -196,6 +196,7 @@ It verifies:
|
|
|
196
196
|
- the active editor matches that `.pen`
|
|
197
197
|
- the shell-visible file exists
|
|
198
198
|
- the registered `.pen` is not still only in memory
|
|
199
|
+
- when external or secondary `.pen` files exist, baseline hash alignment and source-priority confirmation are explicitly recorded before a new edit round
|
|
199
200
|
- `.da-vinci/designs/` is not polluted by markdown or PNG files
|
|
200
201
|
|
|
201
202
|
## MCP Runtime Gate
|
|
@@ -248,13 +249,14 @@ Context-delta audit expectations are warning-only:
|
|
|
248
249
|
Typical autonomous chain:
|
|
249
250
|
|
|
250
251
|
1. `da-vinci pencil-session begin --project <project-path> --pen <path>`
|
|
251
|
-
2.
|
|
252
|
-
3.
|
|
253
|
-
4.
|
|
254
|
-
5.
|
|
255
|
-
6. design
|
|
256
|
-
7.
|
|
257
|
-
8. `da-vinci
|
|
252
|
+
2. if external/secondary `.pen` files exist, run `da-vinci check-pen-baseline --pen <project-pen> --baseline <other-pen>` before edits; if diverged, sync the preferred source into `<project-pen>` first
|
|
253
|
+
3. Pencil MCP edits
|
|
254
|
+
4. `da-vinci pencil-session persist --project <project-path> --pen <path> --nodes-file <nodes.json> --variables-file <vars.json> --version <version>`
|
|
255
|
+
5. screenshot review + layout hygiene
|
|
256
|
+
6. design checkpoint
|
|
257
|
+
7. design-supervisor review when configured
|
|
258
|
+
8. `da-vinci pencil-session end --project <project-path> --pen <path> --nodes-file <nodes.json> --variables-file <vars.json> --version <version>`
|
|
259
|
+
9. `da-vinci audit --mode completion --change <change-id> <project-path>`
|
|
258
260
|
|
|
259
261
|
## Flow Diagram
|
|
260
262
|
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
# Prompt Presets
|
|
2
2
|
|
|
3
|
+
## Template Notes
|
|
4
|
+
|
|
3
5
|
Use these presets when you want a copy-ready starting prompt for a specific product surface.
|
|
4
6
|
|
|
7
|
+
This section explains what each preset family is for, when to use it, and how it should pair with `Visual Assist` plus workflow gates.
|
|
8
|
+
|
|
5
9
|
These presets primarily target screen-design work once the workflow mode is already clear.
|
|
6
10
|
For broad existing-product rewrites where flows or logic are also changing, prefer `overhaul-from-code` plus `intake`/custom prompt setup first, then reuse the relevant design-oriented preset after `proposal.md`, `migration-contract.md`, and target `specs/` stabilize.
|
|
7
11
|
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
# Visual Assist Presets
|
|
2
2
|
|
|
3
|
+
## Template Notes
|
|
4
|
+
|
|
3
5
|
Use these presets as starting points for the `## Visual Assist` section inside `DA-VINCI.md`.
|
|
4
6
|
|
|
7
|
+
This section explains the intent of each preset family, how the variants differ, and which workflow responsibilities must stay outside the preset itself.
|
|
8
|
+
|
|
5
9
|
Each preset is intentionally conservative:
|
|
6
10
|
|
|
7
11
|
- one primary adapter direction
|
|
@@ -88,17 +88,18 @@ Expected flow:
|
|
|
88
88
|
10. for functional icons, run `da-vinci icon-sync` then `da-vinci icon-search --query "<intent>"` to pick `icon_font` names before writing icon nodes
|
|
89
89
|
11. if the same anchor surface rolls back twice, switch to micro-batches of 6 or fewer operations until a clean schema-safe pass succeeds
|
|
90
90
|
12. require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit so the registered `.pen` is seeded and the global Pencil lock is held
|
|
91
|
-
13.
|
|
92
|
-
14.
|
|
93
|
-
15.
|
|
94
|
-
16.
|
|
95
|
-
17.
|
|
96
|
-
18.
|
|
97
|
-
19.
|
|
98
|
-
20.
|
|
99
|
-
21.
|
|
100
|
-
22.
|
|
101
|
-
23.
|
|
91
|
+
13. when external or secondary `.pen` sources exist, run `da-vinci check-pen-baseline --pen <project-pen> --baseline <other-pen>` before the new session write phase; if diverged, sync the chosen source into `<project-pen>` first
|
|
92
|
+
14. during live design work, use `da-vinci pencil-session persist --project <project-path> --pen <path> ...` after material edits, then end with `da-vinci pencil-session end ...`
|
|
93
|
+
15. verify the registered project-local `.pen` path becomes shell-visible immediately after the first successful Pencil write
|
|
94
|
+
16. run `da-vinci audit --mode integrity <project-path>` immediately after that first successful write
|
|
95
|
+
17. if Pencil MCP is active, run the MCP runtime gate and record it in `pencil-design.md`
|
|
96
|
+
18. run `design-source checkpoint` to confirm the registered project-local `.pen` path, the active Pencil source, and the shell-visible file all agree
|
|
97
|
+
19. export screenshots only under `.da-vinci/changes/<change-id>/exports/`, never into `.da-vinci/designs/`
|
|
98
|
+
20. record screenshot review with explicit `PASS` / `WARN` / `BLOCK`, issue list, and revision outcome before broad expansion
|
|
99
|
+
21. bind routes and pages to Pencil screens
|
|
100
|
+
22. generate tasks aligned to the redesign slices
|
|
101
|
+
23. run `da-vinci audit --mode completion --change <change-id> <project-path>` before any terminal completion claim
|
|
102
|
+
24. build and verify only after the completion gate can eventually pass
|
|
102
103
|
|
|
103
104
|
### Complex Android example
|
|
104
105
|
|
|
@@ -122,6 +123,7 @@ Before non-trivial `batch_design` calls, preflight the Pencil operations when sh
|
|
|
122
123
|
If the same anchor surface rolls back twice, switch to micro-batches of 6 or fewer operations until a clean schema-safe pass succeeds.
|
|
123
124
|
Use only Pencil-supported properties; do not use web-only props like flex or margin.
|
|
124
125
|
Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit.
|
|
126
|
+
When external or secondary `.pen` files exist, run `da-vinci check-pen-baseline --pen <project-pen> --baseline <other-pen>` first; if hashes diverge, sync the preferred source into `<project-pen>` before editing.
|
|
125
127
|
If a registered project-local `.pen` already exists, reopen it for continuity but persist a fresh live MCP snapshot back to that same path through `da-vinci pencil-session persist`.
|
|
126
128
|
Verify the registered project-local `.pen` file exists as a shell-visible file after the first Pencil write.
|
|
127
129
|
Run `da-vinci audit --mode integrity <project-path>` after that first successful Pencil write before broad expansion continues.
|
|
@@ -58,6 +58,8 @@ Depending on mode, Da Vinci typically builds this spine:
|
|
|
58
58
|
|
|
59
59
|
`DA-VINCI.md` remains the project-level workflow and visual contract file.
|
|
60
60
|
|
|
61
|
+
If you are starting from an empty repo, a documentation-first example, or a half-hydrated workspace, run `da-vinci bootstrap-project --project <project-path> --change <change-id>` before the first strict audit. That command creates the minimum project spine plus a workflow-owned project-local `.pen` baseline.
|
|
62
|
+
|
|
61
63
|
## Phase Breakdown
|
|
62
64
|
|
|
63
65
|
### 1. Intake And Mode Selection
|
|
@@ -49,12 +49,24 @@ Da Vinci 期望它们遵循工作流状态。
|
|
|
49
49
|
- `da-vinci icon-search --query "<关键词>" [--family ...] [--top ...] [--aliases ...]`
|
|
50
50
|
- 在写 Pencil `batch_design` 前先收敛可用的 `icon_font` 名称
|
|
51
51
|
- 支持中英文混合词,并可通过 `~/.da-vinci/icon-aliases.json` 做语义扩展
|
|
52
|
-
- `da-vinci
|
|
52
|
+
- `da-vinci bootstrap-project --project <path> [--change <id>] [--force]`
|
|
53
|
+
- 给还没水合完成的仓库补齐最小 `.da-vinci/` 工作流骨架
|
|
54
|
+
- 会在 `.da-vinci/designs/` 下 seed 一个工作流管理的项目内 `.pen`
|
|
55
|
+
- 传 `--change <id>` 时会顺手创建当前 change 所需的最小设计工件(`design-brief.md`、`design.md`、`pencil-design.md`、`pencil-bindings.md`)
|
|
56
|
+
- 适合从空仓库、文档示例、或只做了一半的工作区开始时,先补齐 audit 所需的基础工件
|
|
57
|
+
- `da-vinci supervisor-review --project <path> --change <id> [--run-reviewers] [--review-concurrency <value>] [--review-retries <value>] [--review-retry-delay-ms <value>] [--review-retry-max-delay-ms <value>] [--source <skill|manual|inferred>] [--executed-reviewers <csv>] [--status ...] [--issue-list ...] [--revision-outcome ...] [--write]`
|
|
53
58
|
- 持久化结构化 supervisor review 记录(`Configured reviewers`、`Executed reviewers`、`Review source`、`Status`、`Issue list`、`Revision outcome`)到 `pencil-design.md`
|
|
54
59
|
- 推荐直接用 `--run-reviewers --write` 一步完成 reviewer skills 执行与记录落盘
|
|
55
|
-
- 通过 `--review-concurrency`、`--review-retries`、`--review-retry-delay-ms` 可调 reviewer
|
|
60
|
+
- 通过 `--review-concurrency`、`--review-retries`、`--review-retry-delay-ms`、`--review-retry-max-delay-ms` 可调 reviewer 并发与有上限的重试退避
|
|
56
61
|
- 当 `Require Supervisor Review: true` 时,`manual/inferred` 记录会被 completion 阻断
|
|
57
62
|
- `design-supervisor review` 作为兼容别名保留,并会转发到该命令
|
|
63
|
+
- `da-vinci check-pen-baseline --pen <project-pen> --baseline <other-pen>[,<other-pen>...] [--prefer-source <path>]`
|
|
64
|
+
- 在新一轮设计前比较项目内/外部(或次要)`.pen` 的 canonical snapshot hash
|
|
65
|
+
- 默认在 hash 分叉时阻断,直到来源优先级被显式确认
|
|
66
|
+
- `--prefer-source <project-pen>` 可记录“继续以项目内路径为准”的显式决策
|
|
67
|
+
- `da-vinci sync-pen-source --from <preferred-source> --to <project-pen>`
|
|
68
|
+
- 把被选中的最新 `.pen` 来源同步到项目内 `.pen` 路径,并刷新 Da Vinci state 元数据
|
|
69
|
+
- 当外部备份是最新基线时,在 `pencil-session begin` 前先执行
|
|
58
70
|
|
|
59
71
|
建议在 `/dv:design` 阶段使用,尤其是在 anchor surface 的图标定稿前。
|
|
60
72
|
|
|
@@ -198,6 +198,7 @@ active Pencil 工作一旦存在,就要跑 `design-source checkpoint`。
|
|
|
198
198
|
- active editor 是否就是这个 `.pen`
|
|
199
199
|
- shell 上是否真的存在这个 `.pen`
|
|
200
200
|
- 登记的 `.pen` 是否还停留在“只有内存,没有磁盘”
|
|
201
|
+
- 如果存在外部或次要 `.pen`,是否在新一轮编辑前显式完成了基线 hash 对齐和来源优先级确认
|
|
201
202
|
- `.da-vinci/designs/` 是否被 markdown 或 PNG 污染
|
|
202
203
|
|
|
203
204
|
## MCP Runtime Gate
|
|
@@ -250,13 +251,14 @@ Context Delta 相关审计期望都是告警级:
|
|
|
250
251
|
典型自治流程:
|
|
251
252
|
|
|
252
253
|
1. `da-vinci pencil-session begin --project <project-path> --pen <path>`
|
|
253
|
-
2.
|
|
254
|
-
3.
|
|
255
|
-
4.
|
|
256
|
-
5.
|
|
257
|
-
6.
|
|
258
|
-
7.
|
|
259
|
-
8. `da-vinci
|
|
254
|
+
2. 如果存在外部/次要 `.pen`,在编辑前先运行 `da-vinci check-pen-baseline --pen <project-pen> --baseline <other-pen>`;若分叉,先把优先来源同步回 `<project-pen>`
|
|
255
|
+
3. Pencil MCP 编辑
|
|
256
|
+
4. `da-vinci pencil-session persist --project <project-path> --pen <path> --nodes-file <nodes.json> --variables-file <vars.json> --version <version>`
|
|
257
|
+
5. screenshot review + layout hygiene
|
|
258
|
+
6. design checkpoint
|
|
259
|
+
7. 如果配置了,就执行 design-supervisor review
|
|
260
|
+
8. `da-vinci pencil-session end --project <project-path> --pen <path> --nodes-file <nodes.json> --variables-file <vars.json> --version <version>`
|
|
261
|
+
9. `da-vinci audit --mode completion --change <change-id> <project-path>`
|
|
260
262
|
|
|
261
263
|
## 流程图
|
|
262
264
|
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 场景提示词模版说明
|
|
2
|
+
|
|
3
|
+
## 模版说明
|
|
2
4
|
|
|
3
5
|
这些模板用于在不同产品形态下,快速拿到可直接执行的起始提示词。
|
|
4
6
|
|
|
7
|
+
这部分主要说明每类模板适合什么场景、应该怎么搭配使用,以及它和 `Visual Assist`、workflow gate 之间的边界。
|
|
8
|
+
|
|
5
9
|
这些模板主要服务于 screen 设计阶段。
|
|
6
10
|
如果是存量系统的大改版,且流程或逻辑也会一起变化,应该先用 `overhaul-from-code` 搭配 `intake` 或自定义提示词把 `proposal.md`、`migration-contract.md` 和目标 `specs/` 稳定下来,再复用对应的设计模板。
|
|
7
11
|
|
|
@@ -99,17 +99,18 @@ $da-vinci use redesign-from-code to inventory the current app, identify current
|
|
|
99
99
|
10. 对功能性图标,先运行 `da-vinci icon-sync` 再运行 `da-vinci icon-search --query "<意图词>"`,先选定 `icon_font` 名称再写图标节点
|
|
100
100
|
11. 如果同一个 anchor surface 连续两次回滚,就切到每批不超过 6 个操作的微批次,直到拿到干净的 schema-safe pass
|
|
101
101
|
12. 如果这一轮开始时还没有登记的项目内 `.pen`,必须先执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`,先 seed 登记路径并拿到全局锁,再开始第一次 Pencil 编辑
|
|
102
|
-
13.
|
|
103
|
-
14.
|
|
104
|
-
15.
|
|
105
|
-
16.
|
|
106
|
-
17.
|
|
107
|
-
18.
|
|
108
|
-
19.
|
|
109
|
-
20.
|
|
110
|
-
21.
|
|
111
|
-
22.
|
|
112
|
-
23.
|
|
102
|
+
13. 如果存在外部或历史 `.pen` 备份,在新一轮写入前先运行 `da-vinci check-pen-baseline --pen <project-pen> --baseline <other-pen>`;若 hash 不一致,先把选中的优先来源同步回 `<project-pen>`
|
|
103
|
+
14. 如果项目里原本已有登记的 `.pen`,继续设计时也必须先通过 `da-vinci pencil-session begin --project <project-path> --pen <path>` reopen 它;发生了实质性 live edit 后,再通过 `da-vinci pencil-session persist` 把当前 MCP 快照重新覆盖写回同一路径
|
|
104
|
+
15. 在第一次成功写入 Pencil 后,立即验证登记的项目内 `.pen` 路径已经成为 shell 可见文件
|
|
105
|
+
16. 紧接着运行 `da-vinci audit --mode integrity <project-path>`
|
|
106
|
+
17. 如果 Pencil MCP 可用,先运行 MCP runtime gate,并把结果记录到 `pencil-design.md`
|
|
107
|
+
18. 运行 `design-source checkpoint`,确认登记的项目内 `.pen` 路径、当前 Pencil 设计源和 shell 可见文件是一致的
|
|
108
|
+
19. 截图导出只放到 `.da-vinci/changes/<change-id>/exports/`,绝不能写进 `.da-vinci/designs/`
|
|
109
|
+
20. 在 broad expansion 前,先把 screenshot review 的 `PASS` / `WARN` / `BLOCK`、问题列表和回改结果记清楚
|
|
110
|
+
21. 绑定路由和 Pencil 页面
|
|
111
|
+
22. 生成和 redesign slice 对齐的任务
|
|
112
|
+
23. 在任何终态完成声明之前,先运行 `da-vinci audit --mode completion --change <change-id> <project-path>`
|
|
113
|
+
24. 只有在 completion gate 最终能通过时,才进入实现和验证
|
|
113
114
|
|
|
114
115
|
### 复杂 Android 页面示例
|
|
115
116
|
|
|
@@ -133,6 +134,7 @@ Before non-trivial `batch_design` calls, preflight the Pencil operations when sh
|
|
|
133
134
|
If the same anchor surface rolls back twice, switch to micro-batches of 6 or fewer operations until a clean schema-safe pass succeeds.
|
|
134
135
|
Use only Pencil-supported properties; do not use web-only props like flex or margin.
|
|
135
136
|
在第一次 Pencil 编辑前,必须执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`,这样会先 seed 登记好的 `.pen` 并持有全局 Pencil 锁。
|
|
137
|
+
如果存在外部或历史 `.pen`,先运行 `da-vinci check-pen-baseline --pen <project-pen> --baseline <other-pen>`;若 hash 分叉,先确认来源优先级并把选中的来源同步回 `<project-pen>` 再继续。
|
|
136
138
|
如果项目里原本已有登记的 `.pen`,继续设计时先打开它,但实质性 live edit 后优先通过 `da-vinci pencil-session persist` 把当前 live MCP 快照重新覆盖写回同一路径。
|
|
137
139
|
Verify the registered project-local `.pen` file exists as a shell-visible file after the first Pencil write.
|
|
138
140
|
在第一次成功写入 Pencil 后、继续大范围扩展前,先运行 `da-vinci audit --mode integrity <project-path>`。
|
|
@@ -60,6 +60,8 @@ Da Vinci 围绕一个固定契约工作:
|
|
|
60
60
|
|
|
61
61
|
`DA-VINCI.md` 仍然是项目级工作流和视觉约束文件。
|
|
62
62
|
|
|
63
|
+
如果你是从空仓库、文档示例、或只水合到一半的工作区开始,先执行 `da-vinci bootstrap-project --project <project-path> --change <change-id>`,再跑严格 audit。这个命令会补齐最小项目骨架,并 seed 一个工作流管理的项目内 `.pen` 基线。
|
|
64
|
+
|
|
63
65
|
## 分阶段说明
|
|
64
66
|
|
|
65
67
|
### 1. Intake 与 Mode 选择
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
# MarkupFlow Forward Test
|
|
2
2
|
|
|
3
|
-
This example is a repo-local
|
|
3
|
+
This example is a repo-local forward-test reference for Da Vinci.
|
|
4
|
+
|
|
5
|
+
Important:
|
|
6
|
+
|
|
7
|
+
- this walkthrough is documentation-first and keeps the narrative artifacts at the repository root for readability
|
|
8
|
+
- it is not intended to pass `da-vinci audit` directly until those artifacts are materialized into the current `.da-vinci/` audit layout with persisted `.pen` session/state metadata
|
|
4
9
|
|
|
5
10
|
Mode:
|
|
6
11
|
|