@xenonbyte/da-vinci-workflow 0.1.22 → 0.1.24

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
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.1.24 - 2026-03-29
4
+
5
+ ### Added
6
+ - `da-vinci supervisor-review` now supports structured reviewer provenance fields: `Configured reviewers`, `Executed reviewers`, and `Review source`
7
+ - `design-supervisor` compatibility binary (`design-supervisor review`) that forwards to `da-vinci supervisor-review`
8
+ - `scripts/test-supervisor-review-cli.js` coverage for alias behavior, inferred mode, and skill-source reviewer execution metadata
9
+ - `scripts/test-supervisor-review-integration.js` optional real `codex exec` smoke test (`DA_VINCI_RUN_SUPERVISOR_INTEGRATION=1`)
10
+
11
+ ### Changed
12
+ - supervisor-review audit parsing now accepts latest `## Design-Supervisor Review (Round X Attempt)` sections, multiline issue/outcome fields, and `Result` as a status alias
13
+ - completion audit now enforces skill-backed supervisor evidence (`Review source: skill` + executed configured reviewers) when `Require Supervisor Review: true`
14
+ - design prompts/skill docs now require configured reviewer skills to actually execute review before writing supervisor results
15
+ - command references and constraint docs (EN/ZH) now document structured reviewer fields and required skill-backed behavior for hard-gate projects
16
+ - `da-vinci supervisor-review --run-reviewers` now supports parallel execution (`--review-concurrency`) and resilient retries (`--review-retries`, `--review-retry-delay-ms`)
17
+
18
+ ## v0.1.23 - 2026-03-29
19
+
20
+ ### Added
21
+ - `lib/audit-parsers.js` to isolate markdown/checkpoint/context-delta/design-supervisor parsing concerns from audit orchestration
22
+ - `lib/fs-safety.js` for bounded recursive traversal and project-root path-boundary checks
23
+ - `lib/icon-text.js` to share icon text normalization/tokenization across icon modules
24
+ - `scripts/test-audit-safety.js` to cover out-of-root registry paths and traversal truncation warnings
25
+ - `test:audit-safety` npm script
26
+
27
+ ### Changed
28
+ - `lib/audit.js` now uses bounded safe scans, emits traversal warnings, and rejects out-of-root registry `.pen` references
29
+ - `lib/install.js` now uses bounded safe traversal for asset enumeration
30
+ - `lib/pencil-preflight.js` now hardens VM execution with unsafe-source checks, disabled dynamic code generation, source-size limits, and explicit timeout classification
31
+ - `lib/icon-search.js` and `lib/icon-aliases.js` now consume shared text utilities instead of duplicate local implementations
32
+ - preflight/icon tests now include safety and normalization regression coverage
33
+
3
34
  ## v0.1.22 - 2026-03-29
4
35
 
5
36
  ### Added
package/README.md CHANGED
@@ -28,10 +28,17 @@ This workflow is intended for:
28
28
 
29
29
  Latest published npm package:
30
30
 
31
- - `@xenonbyte/da-vinci-workflow@0.1.21`
31
+ - `@xenonbyte/da-vinci-workflow@0.1.24`
32
32
 
33
33
  Release highlights:
34
34
 
35
+ - `da-vinci supervisor-review --run-reviewers` now supports configurable parallel reviewer execution and resilient retry backoff (`--review-concurrency`, `--review-retries`, `--review-retry-delay-ms`)
36
+ - added optional `test:supervisor-review-integration` smoke coverage for real `codex exec` review runner flows (enabled via `DA_VINCI_RUN_SUPERVISOR_INTEGRATION=1`)
37
+ - audit parser logic is now split into `lib/audit-parsers.js`, reducing `lib/audit.js` size and making maintenance safer
38
+ - recursive file traversal now uses bounded safe scans with depth/count limits and symlink skipping
39
+ - completion/integrity audit now rejects out-of-root `.pen` references from `design-registry.md`
40
+ - `preflight-pencil` sandbox now blocks unsafe runtime tokens, disables dynamic code generation, and reports timeout failures explicitly
41
+ - icon text normalization/tokenization is now shared across `icon-search` and `icon-aliases`, removing duplicated logic and adding parity coverage
35
42
  - `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
43
  - `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
44
  - `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)
@@ -449,6 +456,7 @@ da-vinci audit --mode completion --change <change-id> /abs/path/to/project
449
456
  da-vinci icon-sync # tolerant by default; add --strict for hard gating
450
457
  cp references/icon-aliases.example.json ~/.da-vinci/icon-aliases.json
451
458
  da-vinci icon-search --query "settings lock" --family material --top 8
459
+ da-vinci supervisor-review --project /abs/path/to/project --change <change-id> --run-reviewers --write
452
460
  da-vinci preflight-pencil --ops-file /abs/path/to/ops.txt
453
461
  da-vinci uninstall --platform codex,claude,gemini
454
462
  ```
@@ -493,6 +501,14 @@ Both modes check the most common workflow-integrity failures in a project:
493
501
  - returns ranked candidates with ready-to-use `icon_font` node payload hints
494
502
  - for a copy-ready `Icon System Guidance (Advisory)` template, see `docs/constraint-files.md` and `references/artifact-templates.md`
495
503
 
504
+ `da-vinci supervisor-review` provides a local structured reviewer record:
505
+
506
+ - writes `Configured reviewers`, `Executed reviewers`, `Review source`, `Status`, `Issue list`, and `Revision outcome` into `pencil-design.md` when `--write` is provided
507
+ - accepts explicit status input (`--status PASS|WARN|BLOCK`) or can infer a conservative status from current design artifacts
508
+ - for required supervisor gates, prefer `--run-reviewers --write` so configured reviewer skills execute and the record is persisted in one step
509
+ - reviewer execution tuning is available via `--review-concurrency`, `--review-retries`, and `--review-retry-delay-ms` (exponential backoff)
510
+ - keeps `design-supervisor review` available as a compatibility alias
511
+
496
512
  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.
497
513
  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.
498
514
 
package/README.zh-CN.md CHANGED
@@ -30,10 +30,17 @@ Da Vinci 是一个把产品需求一路推进到结构化规格、Pencil 设计
30
30
 
31
31
  最新已发布 npm 包:
32
32
 
33
- - `@xenonbyte/da-vinci-workflow@0.1.21`
33
+ - `@xenonbyte/da-vinci-workflow@0.1.24`
34
34
 
35
35
  已发布版本重点:
36
36
 
37
+ - `da-vinci supervisor-review --run-reviewers` 现已支持 reviewer 并发执行与失败重试退避(`--review-concurrency`、`--review-retries`、`--review-retry-delay-ms`)
38
+ - 新增可选 `test:supervisor-review-integration` 烟测,用于覆盖真实 `codex exec` 评审执行链路(通过 `DA_VINCI_RUN_SUPERVISOR_INTEGRATION=1` 启用)
39
+ - audit 解析职责已拆分到 `lib/audit-parsers.js`,`lib/audit.js` 体量下降,可维护性更好
40
+ - 递归文件扫描改为安全有界遍历:增加深度/数量上限,并跳过符号链接
41
+ - completion/integrity audit 现在会拦截并忽略 `design-registry.md` 中越出项目根目录的 `.pen` 引用
42
+ - `preflight-pencil` 沙箱增强:拦截危险运行时 token、禁用动态代码生成,并对超时失败给出明确分类
43
+ - `icon-search` 与 `icon-aliases` 现在复用同一套文本归一化/分词逻辑,去掉重复实现并补了一致性回归测试
37
44
  - `da-vinci pencil-session end` 现在默认要求提供 live 快照输入(`--nodes-file`);只有显式 `--force` 才允许跳过,避免 live MCP 与磁盘未同步时被静默关闭
38
45
  - `build` 路由现在明确:编译成功不等于流程完成;对外宣布终态前必须通过 `da-vinci audit --mode completion --change <change-id> <project-path>`
39
46
  - `continue` 的推荐规则现在会拦截未过设计门禁时的 `build` 选路(缺少项目内 `.pen`、session 未关闭、runtime/design-source BLOCK、required design-supervisor BLOCK)
@@ -370,6 +377,7 @@ da-vinci audit --mode completion --change <change-id> /abs/path/to/project
370
377
  da-vinci icon-sync # 默认容错;需要强门禁时加 --strict
371
378
  cp references/icon-aliases.example.json ~/.da-vinci/icon-aliases.json
372
379
  da-vinci icon-search --query "settings lock" --family material --top 8
380
+ da-vinci supervisor-review --project /abs/path/to/project --change <change-id> --run-reviewers --write
373
381
  da-vinci preflight-pencil --ops-file /abs/path/to/ops.txt
374
382
  da-vinci uninstall --platform codex,claude,gemini
375
383
  ```
@@ -414,6 +422,14 @@ Context Delta 与 audit 的关系:
414
422
  - 返回排序候选,并附带可直接复用的 `icon_font` 节点 payload 提示
415
423
  - `Icon System Guidance (Advisory)` 可复制模板见 `docs/constraint-files.md` 与 `references/artifact-templates.md`
416
424
 
425
+ `da-vinci supervisor-review` 提供本地结构化评审记录能力:
426
+
427
+ - 加上 `--write` 时,会把 `Configured reviewers`、`Executed reviewers`、`Review source`、`Status`、`Issue list`、`Revision outcome` 写入 `pencil-design.md`
428
+ - 可通过 `--status PASS|WARN|BLOCK` 显式指定,也可基于当前设计工件做保守推断
429
+ - 对 required supervisor gate,优先使用 `--run-reviewers --write`,让 reviewer skills 执行与结果持久化一体完成
430
+ - reviewer 执行参数可通过 `--review-concurrency`、`--review-retries`、`--review-retry-delay-ms` 调优(指数退避)
431
+ - `design-supervisor review` 作为兼容别名仍可使用
432
+
417
433
  当 Pencil MCP 可用时,Da Vinci 现在还要求在终态完成声明前,把 MCP runtime gate 结果记录到 `pencil-design.md`。这层 gate 负责检查 live editor/source convergence,与 filesystem audit 分工不同。
418
434
  在重设计进行中,如果有 shell 能力,应在第一次成功写入 Pencil 后立即运行 `da-vinci audit --mode integrity <project-path>`;如果同一个 anchor surface 连续回滚,则继续配合 `da-vinci preflight-pencil` 和更小的 follow-up batch。
419
435
 
package/SKILL.md CHANGED
@@ -280,9 +280,9 @@ During active Pencil work:
280
280
  - exported screenshots are review artifacts only; place them under `.da-vinci/changes/<change-id>/exports/` and never treat them as a substitute for the project-local `.pen` source
281
281
  - screenshot review is binding: if the review calls out hierarchy, spacing, clarity, inconsistency, or unresolved-placeholder issues, revise the screen before treating the checkpoint as `PASS`
282
282
  - screenshot review must record an explicit `PASS`, `WARN`, or `BLOCK` plus the concrete issue list and revision outcome; phrases such as "looks good" do not count as review evidence
283
- - if `DA-VINCI.md` declares `Design-supervisor reviewers`, run `design-supervisor review` after screenshot review, layout hygiene, and design checkpoint for the approved anchor set
283
+ - if `DA-VINCI.md` declares `Design-supervisor reviewers`, run an explicit review pass with those reviewer skills on the approved anchor set, then persist the structured result with `da-vinci supervisor-review --project <project-path> --change <change-id> --run-reviewers --write` (or the compatibility alias `design-supervisor review --run-reviewers --write`)
284
284
  - keep `Design-supervisor reviewers` separate from `Preferred adapters`; adapters lead the design pass, reviewers judge whether the final style quality is strong enough to expand or implement
285
- - when `design-supervisor review` is active, review screenshots together with Pencil theme variables, `visual-thesis.md`, `content-plan.md`, and `interaction-thesis.md`, then record an explicit `PASS`, `WARN`, or `BLOCK` plus issue list and revision outcome in `pencil-design.md`
285
+ - when `design-supervisor review` is active, review screenshots together with Pencil theme variables, `visual-thesis.md`, `content-plan.md`, and `interaction-thesis.md`; record `Configured reviewers`, `Executed reviewers`, `Review source`, explicit `PASS`/`WARN`/`BLOCK`, issue list, and revision outcome in `pencil-design.md`
286
286
  - if `DA-VINCI.md` sets `Require Supervisor Review: true`, treat missing, blocked, or unaccepted `design-supervisor review` as a blocker before broad expansion, implementation-task handoff, or terminal completion
287
287
 
288
288
  ## Load References On Demand
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { runCli } = require("../lib/cli");
4
+
5
+ function printHelp() {
6
+ console.log(
7
+ [
8
+ "Design Supervisor CLI (Da Vinci bridge)",
9
+ "",
10
+ "Usage:",
11
+ " design-supervisor review --project <path> --change <id> [--run-reviewers] [--review-concurrency <value>] [--review-retries <value>] [--review-retry-delay-ms <value>] [--source <skill|manual|inferred>] [--executed-reviewers <csv>] [--status <PASS|WARN|BLOCK>] [--issue-list <text>] [--revision-outcome <text>] [--write] [--json]",
12
+ "",
13
+ "Notes:",
14
+ " - This command is a compatibility alias for `da-vinci supervisor-review`.",
15
+ " - It does not replace completion gating; use `da-vinci audit --mode completion` for final gate checks."
16
+ ].join("\n")
17
+ );
18
+ }
19
+
20
+ async function main() {
21
+ const args = process.argv.slice(2);
22
+ const [subcommand] = args;
23
+
24
+ if (!subcommand || subcommand === "--help" || subcommand === "-h" || subcommand === "help") {
25
+ printHelp();
26
+ return;
27
+ }
28
+
29
+ if (subcommand !== "review") {
30
+ throw new Error(`Unknown subcommand: ${subcommand}`);
31
+ }
32
+
33
+ await runCli(["supervisor-review", ...args.slice(1)]);
34
+ }
35
+
36
+ main().catch((error) => {
37
+ console.error(error.message || String(error));
38
+ process.exit(1);
39
+ });
@@ -26,5 +26,5 @@ If a registered project-local `.pen` already exists, reopen it for continuity bu
26
26
  After the first successful Pencil write, run `da-vinci audit --mode integrity <project-path>` before broad expansion continues.
27
27
  If Pencil MCP is active, run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
28
28
  Screenshot review must record an explicit `PASS`, `WARN`, or `BLOCK` plus the issue list and revision outcome; "looks good" is not a valid review record.
29
- If `DA-VINCI.md` declares `Design-supervisor reviewers`, run `design-supervisor review` after screenshot review, layout hygiene, and design checkpoint, then record the reviewers, inputs, status, issue list, and revision outcome in `pencil-design.md`. If `Require Supervisor Review: true`, treat missing, blocked, or unaccepted review results as blocking before broad expansion or terminal completion.
29
+ If `DA-VINCI.md` declares `Design-supervisor reviewers`, execute those reviewer skills on the approved anchor screenshots (do not skip to inferred review), then persist the structured result via `da-vinci supervisor-review --project <project-path> --change <change-id> --run-reviewers --write` (or the compatibility alias `design-supervisor review --run-reviewers --write`). Record configured/ executed reviewers, review source, status, issue list, and revision outcome in `pencil-design.md`. If `Require Supervisor Review: true`, treat missing, blocked, unaccepted, or non-skill-backed review results as blocking before broad expansion or terminal completion.
30
30
  Before reporting `design complete` or `workflow complete`, run `da-vinci audit --mode completion --change <change-id> <project-path>` and treat any failure as blocking.
@@ -20,5 +20,5 @@ If a registered project-local `.pen` already exists, reopen it for continuity bu
20
20
  After the first successful Pencil write, run `da-vinci audit --mode integrity <project-path>` before broad expansion continues.
21
21
  If Pencil MCP is active, run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
22
22
  Screenshot review must record an explicit `PASS`, `WARN`, or `BLOCK` plus the issue list and revision outcome; "looks good" is not a valid review record.
23
- If `DA-VINCI.md` declares `Design-supervisor reviewers`, run `design-supervisor review` after screenshot review, layout hygiene, and design checkpoint, then record the reviewers, inputs, status, issue list, and revision outcome in `pencil-design.md`. If `Require Supervisor Review: true`, treat missing, blocked, or unaccepted review results as blocking before broad expansion or terminal completion.
23
+ If `DA-VINCI.md` declares `Design-supervisor reviewers`, execute those reviewer skills on the approved anchor screenshots (do not skip to inferred review), then persist the structured result via `da-vinci supervisor-review --project <project-path> --change <change-id> --run-reviewers --write` (or the compatibility alias `design-supervisor review --run-reviewers --write`). Record configured/ executed reviewers, review source, status, issue list, and revision outcome in `pencil-design.md`. If `Require Supervisor Review: true`, treat missing, blocked, unaccepted, or non-skill-backed review results as blocking before broad expansion or terminal completion.
24
24
  Before claiming `design complete` or `workflow complete`, run `da-vinci audit --mode completion --change <change-id> <project-path>` and treat any failure as blocking.
@@ -19,6 +19,6 @@ If a registered project-local `.pen` already exists, reopen it for continuity bu
19
19
  After the first successful Pencil write, run `da-vinci audit --mode integrity <project-path>` before broad expansion continues.
20
20
  If Pencil MCP is active, run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
21
21
  Screenshot review must record an explicit `PASS`, `WARN`, or `BLOCK` plus the issue list and revision outcome; "looks good" is not a valid review record.
22
- If `DA-VINCI.md` declares `Design-supervisor reviewers`, run `design-supervisor review` after screenshot review, layout hygiene, and design checkpoint, then record the reviewers, inputs, status, issue list, and revision outcome in `pencil-design.md`. If `Require Supervisor Review: true`, treat missing, blocked, or unaccepted review results as blocking before broad expansion or terminal completion.
22
+ If `DA-VINCI.md` declares `Design-supervisor reviewers`, execute those reviewer skills on the approved anchor screenshots (do not skip to inferred review), then persist the structured result via `da-vinci supervisor-review --project <project-path> --change <change-id> --run-reviewers --write` (or the compatibility alias `design-supervisor review --run-reviewers --write`). Record configured/ executed reviewers, review source, status, issue list, and revision outcome in `pencil-design.md`. If `Require Supervisor Review: true`, treat missing, blocked, unaccepted, or non-skill-backed review results as blocking before broad expansion or terminal completion.
23
23
  Before reporting `design complete` or `workflow complete`, run `da-vinci audit --mode completion --change <change-id> <project-path>` and treat any failure as blocking.
24
24
  """
@@ -38,11 +38,14 @@ The workflow audit currently parses specific fields. Keep these names stable.
38
38
 
39
39
  ### `pencil-design.md` -> `## Design-Supervisor Review`
40
40
 
41
+ - `Configured reviewers`
42
+ - `Executed reviewers`
43
+ - `Review source`
41
44
  - `Status`
42
45
  - `Issue list`
43
46
  - `Revision outcome`
44
47
 
45
- When supervisor review is required, missing or blocked review evidence blocks completion.
48
+ When supervisor review is required, missing, blocked, unaccepted, or non-skill-backed review evidence blocks completion.
46
49
 
47
50
  ## Advisory Constraint Sections (Customizable)
48
51
 
@@ -47,6 +47,12 @@ 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 supervisor-review --project <path> --change <id> [--run-reviewers] [--review-concurrency <value>] [--review-retries <value>] [--review-retry-delay-ms <value>] [--source <skill|manual|inferred>] [--executed-reviewers <csv>] [--status ...] [--issue-list ...] [--revision-outcome ...] [--write]`
51
+ - persists a structured supervisor-review record (`Configured reviewers`, `Executed reviewers`, `Review source`, `Status`, `Issue list`, `Revision outcome`) in `pencil-design.md`
52
+ - 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 and retry backoff for reviewer execution
54
+ - when `Require Supervisor Review: true`, inferred/manual records are completion-blocking
55
+ - `design-supervisor review` is kept as a compatibility alias that forwards to this command
50
56
 
51
57
  Use these utilities during `/dv:design`, especially before anchor-surface icon finalization.
52
58
 
@@ -40,11 +40,14 @@
40
40
 
41
41
  ### `pencil-design.md` -> `## Design-Supervisor Review`
42
42
 
43
+ - `Configured reviewers`
44
+ - `Executed reviewers`
45
+ - `Review source`
43
46
  - `Status`
44
47
  - `Issue list`
45
48
  - `Revision outcome`
46
49
 
47
- 当 supervisor review 是必需时,缺失或 `BLOCK` 的评审证据会阻断 completion。
50
+ 当 supervisor review 是必需时,缺失、`BLOCK`、未接受、或非 skill-backed 的评审证据都会阻断 completion。
48
51
 
49
52
  ## 指导型约束段(可定制)
50
53
 
@@ -49,6 +49,12 @@ 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 supervisor-review --project <path> --change <id> [--run-reviewers] [--review-concurrency <value>] [--review-retries <value>] [--review-retry-delay-ms <value>] [--source <skill|manual|inferred>] [--executed-reviewers <csv>] [--status ...] [--issue-list ...] [--revision-outcome ...] [--write]`
53
+ - 持久化结构化 supervisor review 记录(`Configured reviewers`、`Executed reviewers`、`Review source`、`Status`、`Issue list`、`Revision outcome`)到 `pencil-design.md`
54
+ - 推荐直接用 `--run-reviewers --write` 一步完成 reviewer skills 执行与记录落盘
55
+ - 通过 `--review-concurrency`、`--review-retries`、`--review-retry-delay-ms` 可调 reviewer 并发与重试退避
56
+ - 当 `Require Supervisor Review: true` 时,`manual/inferred` 记录会被 completion 阻断
57
+ - `design-supervisor review` 作为兼容别名保留,并会转发到该命令
52
58
 
53
59
  建议在 `/dv:design` 阶段使用,尤其是在 anchor surface 的图标定稿前。
54
60