@xenonbyte/da-vinci-workflow 0.2.5 → 0.2.7

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,37 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.2.7 - 2026-04-05
4
+
5
+ ### Added
6
+ - `bounded-worker-isolation-contract` OpenSpec change with six contract slices covering advisory bounded-parallel baseline, isolated workspace rules, worker handoff payloads, sequencing, evidence writeback, and downgrade safety
7
+ - `lib/isolated-worker-handoff.js` plus phase 1-4 regression tests for worker handoff payload constraints and contract closeout checks
8
+
9
+ ### Changed
10
+ - `task-execution`, `task-review`, and `workflow-state` now keep isolated-worker evidence aligned with the new contract, including explicit partial-progress handling, review-order enforcement, out-of-scope-write blocking, and bounded-parallel downgrade visibility
11
+ - `quality:ci:contracts` now includes bounded worker isolation contract regressions instead of relying only on docs/asset consistency lanes
12
+ - supervisor-review reviewer execution now invokes `codex exec` with an explicit prompt separator and closed stdin, matching the real bridge behavior used by the integration smoke
13
+
14
+ ### Fixed
15
+ - reviewer bridge diagnostics now keep `stdout` / `stderr` context when Codex exits without writing the expected structured JSON output
16
+ - supervisor-review CLI and integration smoke fixtures now attach valid exported PNG screenshots so real reviewer runs can execute end to end
17
+ - release docs now reflect the current published version and release highlights
18
+
19
+ ## v0.2.6 - 2026-04-04
20
+
21
+ ### Added
22
+ - shared planning gate-envelope helpers (`lib/gate-utils.js`, `lib/planning-quality-utils.js`, `lib/planning-signal-freshness.js`) to normalize gate serialization, status finalization, and signal freshness checks across lint/spec/scope/task surfaces
23
+ - new regression coverage for bounded clarify visibility, stale-signal upstream derivation, analyze orphan/support detection hardening, and strict-promotion routing semantics
24
+
25
+ ### Changed
26
+ - `scope-check` analyze gate now enforces stronger cross-artifact support checks: empty bindings page-traceability is treated as drift, orphan fallback matching is tightened, and unresolved planning-anchor coverage is explicitly downgraded to advisory
27
+ - `lint-tasks` now derives upstream clarify/analyze context from current artifacts when planning signals are stale and merges derived evidence into task-checkpoint gate resolution
28
+ - planning signal freshness for `lint-tasks` now tracks `proposal.md` and page-map surfaces to prevent stale upstream gate carry-forward
29
+ - workflow-state now routes decisions from persisted gate/status truth with explicit stale-signal handling and bounded clarify note propagation
30
+
31
+ ### Fixed
32
+ - integrity audit now keeps clarify bounded-context findings visible for `lint-spec` signals regardless of top-level PASS/WARN/BLOCK status
33
+ - `lint-spec` gate findings attachment no longer carries an unreachable bounded-context branch for non-clarify gates
34
+
3
35
  ## v0.2.5 - 2026-04-02
4
36
 
5
37
  ### Added
package/README.md CHANGED
@@ -24,19 +24,25 @@ This workflow is intended for:
24
24
  - large existing-product overhauls where flows and logic also change
25
25
  - scoped feature delivery on an existing product
26
26
 
27
+ ## Maintainer Entry
28
+
29
+ If you are contributing to this repository itself, start with
30
+ [docs/maintainer-bootstrap.md](./docs/maintainer-bootstrap.md).
31
+ Use `da-vinci maintainer-readiness` as the canonical maintainer diagnosis surface after setup.
32
+
27
33
  ## Current release
28
34
 
29
35
  Latest published npm package:
30
36
 
31
- - `@xenonbyte/da-vinci-workflow@0.2.5`
37
+ - `@xenonbyte/da-vinci-workflow@0.2.7`
32
38
 
33
- Release highlights for `0.2.5`:
39
+ Release highlights for `0.2.7`:
34
40
 
35
- - verify and lint command handling is now modularized (`lib/cli/verify-family.js`, `lib/cli/lint-family.js`, `lib/cli/helpers.js`) while preserving `--continue-on-error` semantics
36
- - verification surfaces now expose richer evidence metadata and incremental scan reporting for `--changed-files`
37
- - scaffold now supports framework-aware reviewable templates for Next.js, React, Vue, and Svelte, while preserving existing implementation landing shape precedence
38
- - `resolveImplementationLanding` now resolves `.vue`, `.svelte`, and SvelteKit `+page.svelte` route landings
39
- - verification hardening fixes now block regex-literal false positives, comment-only pseudo-markup structure passes, and symlink-escape changed-files paths
41
+ - bounded worker isolation is now formalized as a contract-only OpenSpec change, with explicit task-group ownership, isolated workspace, handoff, sequencing, writeback, and downgrade rules
42
+ - `task-execution`, `task-review`, and `workflow-state` now align with that contract by blocking out-of-scope writes, preserving review ordering, and rejecting `partial=true` + `DONE`
43
+ - the reviewer bridge now runs `codex exec` with closed stdin plus explicit prompt separation, and preserves raw diagnostics when structured reviewer output is missing
44
+ - contract CI now exercises bounded-worker-isolation phase 1-4 tests directly instead of relying only on docs/asset consistency checks
45
+ - supervisor-review smoke fixtures now use valid exported screenshots, and the real reviewer bridge integration passes end to end
40
46
 
41
47
  ## Discipline And Orchestration Upgrade
42
48
 
@@ -57,7 +63,7 @@ Implemented capability set:
57
63
  This upgrade does **not** replace artifact truth, checkpoint truth, or completion audit authority.
58
64
  `workflow-status`, `next-step`, and orchestration outputs remain bounded by the existing contract.
59
65
 
60
- See [docs/discipline-and-orchestration-upgrade.md](/Users/xubo/x-skills/da-vinci/docs/discipline-and-orchestration-upgrade.md) for operator and maintainer guidance, and the OpenSpec change folder for implementation details.
66
+ See [docs/discipline-and-orchestration-upgrade.md](./docs/discipline-and-orchestration-upgrade.md) for operator and maintainer guidance, and the OpenSpec change folder for implementation details.
61
67
 
62
68
  ## Supported workflow modes
63
69
 
@@ -134,7 +140,7 @@ If the growing CLI surface is the main usability problem, use the built-in termi
134
140
  - it supports English/Chinese chrome, light/dark theme auto-detection, and `t` as a manual fallback
135
141
  - `p` sets project context, `c` sets change context, `l` toggles language, `J` toggles `--json`, and `Enter` opens/runs the selected item
136
142
 
137
- Use [docs/skill-usage.md](/Users/xubo/x-skills/da-vinci/docs/skill-usage.md) for the operator-facing workflow, resume rules, and TUI guidance.
143
+ Use [docs/skill-usage.md](./docs/skill-usage.md) for the operator-facing workflow, resume rules, and TUI guidance.
138
144
 
139
145
  ## Visual Assist Quick Start
140
146
 
package/README.zh-CN.md CHANGED
@@ -26,19 +26,26 @@ Da Vinci 是一个把产品需求一路推进到结构化规格、Pencil 设计
26
26
  - 基于现有代码做流程、逻辑和 UI 一起变化的大改版
27
27
  - 在现有产品上做范围明确的 feature-change
28
28
 
29
+ ## 维护者入口
30
+
31
+ 如果你是在维护这个仓库本身(而不是在下游项目里使用 Da Vinci),请先看
32
+ [docs/zh-CN/maintainer-bootstrap.md](./docs/zh-CN/maintainer-bootstrap.md)。
33
+
34
+ 完成 setup 后,用 `da-vinci maintainer-readiness` 作为维护者的 canonical 诊断/就绪命令。
35
+
29
36
  ## 当前发布状态
30
37
 
31
38
  最新已发布 npm 包:
32
39
 
33
- - `@xenonbyte/da-vinci-workflow@0.2.5`
40
+ - `@xenonbyte/da-vinci-workflow@0.2.7`
34
41
 
35
- `0.2.5` 版本重点:
42
+ `0.2.7` 版本重点:
36
43
 
37
- - verify/lint 命令分层模块化(`lib/cli/verify-family.js`、`lib/cli/lint-family.js`、`lib/cli/helpers.js`),并保持 `--continue-on-error` 语义不变
38
- - verification 系列命令增加更细粒度 evidence 元数据与 `--changed-files` 增量扫描报告
39
- - scaffold 增加 Next.js / React / Vue / Svelte 框架感知模板,并保持“已有 landing 形态优先”
40
- - `resolveImplementationLanding` 现已支持 `.vue`、`.svelte`,以及 SvelteKit `+page.svelte` 路由 landing
41
- - verification 加固修复:阻断 regex 字面量误判、注释伪 markup 误判通过、以及 symlink 绕过 `--changed-files` 根目录限制
44
+ - `bounded-worker-isolation-contract` 现已作为 contract-only OpenSpec 变更落地,明确 task-group ownership、isolated workspace、handoff、sequencing、writeback 与 downgrade 规则
45
+ - `task-execution`、`task-review`、`workflow-state` 现已与该 contract 对齐:会阻断 out-of-scope writes,保持 review 顺序,并拒绝 `partial=true` 与 `DONE` 组合
46
+ - reviewer bridge 现在会以显式 prompt 分隔并关闭 stdin 的方式运行 `codex exec`,同时在 reviewer 缺失结构化输出时保留原始诊断
47
+ - contract CI 现在会直接跑 bounded-worker-isolation phase 1-4 回归,不再只依赖文档/命令资产一致性检查
48
+ - supervisor-review smoke fixture 现在使用有效截图,真实 reviewer bridge integration 已能端到端通过
42
49
 
43
50
  ## Discipline And Orchestration 升级
44
51
 
@@ -59,7 +66,7 @@ Da Vinci 是一个把产品需求一路推进到结构化规格、Pencil 设计
59
66
  该升级**不会**替代现有 artifact truth、checkpoint truth 和 completion audit 权威。
60
67
  `workflow-status`、`next-step` 与 orchestration 输出仍然受现有契约约束。
61
68
 
62
- 可先阅读 [docs/discipline-and-orchestration-upgrade.md](/Users/xubo/x-skills/da-vinci/docs/discipline-and-orchestration-upgrade.md) 了解说明,再结合 OpenSpec 目录查看具体实现拆分。
69
+ 可先阅读 [docs/discipline-and-orchestration-upgrade.md](./docs/discipline-and-orchestration-upgrade.md) 了解说明,再结合 OpenSpec 目录查看具体实现拆分。
63
70
 
64
71
  ## 支持的工作流模式
65
72
 
@@ -140,7 +147,7 @@ Da Vinci 当前支持五种模式:
140
147
  - 支持中英文界面与浅色/深色自动识别,`t` 可手动切换主题
141
148
  - `p` 设置项目上下文,`c` 设置 change 上下文,`l` 切语言,`J` 切 `--json`,`Enter` 进入/执行
142
149
 
143
- 如果你想看“人到底怎么用这个 skill、暂停后怎么续跑、TUI 怎么配合”的完整说明,直接看 [docs/zh-CN/skill-usage.md](/Users/xubo/x-skills/da-vinci/docs/zh-CN/skill-usage.md)。
150
+ 如果你想看“人到底怎么用这个 skill、暂停后怎么续跑、TUI 怎么配合”的完整说明,直接看 [docs/zh-CN/skill-usage.md](./docs/zh-CN/skill-usage.md)。
144
151
 
145
152
  ## Visual Assist 快速上手
146
153
 
@@ -9,7 +9,10 @@ Use it when you need to know:
9
9
  - how the routes connect in normal delivery
10
10
  - what to do when `verify` finds drift
11
11
 
12
- Use [workflow-overview.md](/Users/xubo/x-skills/da-vinci/docs/workflow-overview.md) for the full end-to-end workflow and [pencil-rendering-workflow.md](/Users/xubo/x-skills/da-vinci/docs/pencil-rendering-workflow.md) for the dedicated Pencil rendering lifecycle.
12
+ Use [workflow-overview.md](./workflow-overview.md) for the full end-to-end workflow and [pencil-rendering-workflow.md](./pencil-rendering-workflow.md) for the dedicated Pencil rendering lifecycle.
13
+ If you are contributing to this repository itself, use
14
+ [maintainer-bootstrap.md](./maintainer-bootstrap.md)
15
+ as the canonical maintainer bootstrap path before choosing deeper command surfaces.
13
16
 
14
17
  ## Core Idea
15
18
 
@@ -41,24 +44,37 @@ These commands do not replace route selection, but they support design execution
41
44
  - opens a workflow-oriented terminal UI that groups commands by phase and lets you run them after previewing the generated CLI
42
45
  - use `da-vinci-tui` as the dedicated bin alias, or `npx -p @xenonbyte/da-vinci-workflow da-vinci tui` without a global install
43
46
  - useful when the command surface is harder to remember than the workflow itself
47
+ - `da-vinci verify-install [--platform <value>] [--json]`
48
+ - checks install confidence for explicitly selected maintainer platforms (for example `codex` only)
49
+ - treats non-selected platforms as `out_of_scope` / degraded coverage instead of hard failure
50
+ - if `--platform` is omitted, scope is reported as unknown instead of guessed from missing assets
51
+ - `da-vinci maintainer-readiness [--platform <value>] [--project <path>] [--json]`
52
+ - canonical repository-maintainer readiness surface (diagnosis), distinct from setup/bootstrap
53
+ - combines packaged-asset validation, verify-install confidence, and focused contracts lane (`npm run quality:ci:contracts`)
54
+ - reports actionable next steps and keeps deeper lanes (`quality:ci:e2e`, `quality:ci`) as optional escalation
55
+ - intentionally narrower than full CI; escalate to deeper lanes when risk is higher
44
56
  - `da-vinci workflow-status --project <path> [--change <id>] [--json]`
45
57
  - derives the current workflow stage from artifact and checkpoint truth
46
58
  - reports blockers, warnings, handoff-gate state, discipline markers, execution profile hints, and verification-evidence freshness
47
59
  - keep this distinct from `audit`: route guidance is not completion truth
48
60
  - `da-vinci next-step --project <path> [--change <id>] [--json]`
49
61
  - provides a route-first continuation summary from the same derived workflow state
50
- - JSON output includes `nextStep`, `executionProfile`, `worktreePreflight`, and discipline/freshness metadata for orchestration consumers
62
+ - JSON output includes `nextStep`, `blockingGate`, `executionProfile`, `worktreePreflight`, and discipline/freshness metadata for orchestration consumers
51
63
  - use this as the first continuation signal before free-form artifact scanning
52
64
  - `da-vinci lint-spec --project <path> [--change <id>] [--strict] [--json]`
53
65
  - validates Da Vinci runtime `spec.md` schema sections (`Behavior`, `States`, `Inputs`, `Outputs`, `Acceptance`, `Edge Cases`)
66
+ - emits machine-readable planning gates in JSON: `gates.principleInheritance`, `gates.clarify`, `gates.scenarioQuality`
67
+ - bounded-only clarify findings remain visible in `gates.clarify.bounded` and notes, and are non-blocking by default when bounded metadata is complete
54
68
  - default behavior is advisory (`WARN` with zero exit); `--strict` upgrades findings to blocking
55
69
  - explicitly does not treat OpenSpec planning `ADDED Requirements` structure as runtime-spec validity
56
70
  - `da-vinci scope-check --project <path> [--change <id>] [--strict] [--json]`
57
71
  - checks proposal, page-map, runtime specs, pencil-design states, and tasks for scope propagation gaps
72
+ - emits machine-readable analyze gate output in JSON: `gates.analyze`
58
73
  - emits a machine-readable coverage matrix for pages and states
59
74
  - default behavior is advisory (`WARN` with zero exit); `--strict` upgrades findings to blocking
60
75
  - `da-vinci lint-tasks --project <path> [--change <id>] [--strict] [--json]`
61
76
  - validates top-level task groups, ordering, discipline markers, execution-mode hints, file targets, verification commands, and behavior-to-task coverage hints
77
+ - validates task-anchor syntax (`Planning anchors:` and `anchor:<ref>`) and emits machine-readable checkpoint gate output: `gates.taskCheckpoint`
62
78
  - default behavior is advisory (`WARN` with zero exit); `--strict` upgrades findings to blocking
63
79
  - `da-vinci lint-bindings --project <path> [--change <id>] [--strict] [--json]`
64
80
  - validates implementation-to-Pencil mappings for parseability, source shape, and implementation landings
@@ -81,8 +97,10 @@ These commands do not replace route selection, but they support design execution
81
97
  - generates reviewable TODO scaffold templates with framework-aware shape (`next`/`react`/`vue`/`svelte`/`html`)
82
98
  - keeps known implementation landing extension/route shape when a concrete landing already exists
83
99
  - unknown/ambiguous framework detection falls back to HTML with explicit warning; traversal/output-root safety remains enforced
84
- - `da-vinci task-execution --project <path> --change <id> --task-group <id> --status <DONE|DONE_WITH_CONCERNS|NEEDS_CONTEXT|BLOCKED> --summary <text> [--changed-files <csv>] [--test-evidence <csv>] [--concerns <csv>] [--blockers <csv>] [--json]`
100
+ - `da-vinci task-execution --project <path> --change <id> --task-group <id> --status <DONE|DONE_WITH_CONCERNS|NEEDS_CONTEXT|BLOCKED> --summary <text> [--changed-files <csv>] [--test-evidence <csv> --confirm-test-evidence-executed] [--pending-test-evidence <csv>] [--concerns <csv>] [--blockers <csv>] [--out-of-scope-writes <csv>] [--partial] [--json]`
85
101
  - persists normalized implementer-status envelopes into execution signals
102
+ - `--pending-test-evidence` and `--partial` keep the envelope explicitly non-final; `DONE` is invalid when either is present
103
+ - `--out-of-scope-writes` keeps write-scope drift visible to workflow safety handling
86
104
  - use this to keep resume routing machine-readable when implementation is blocked or concerns remain
87
105
  - `da-vinci task-review --project <path> --change <id> --task-group <id> --stage <spec|quality> --status <PASS|WARN|BLOCK> --summary <text> [--issues <csv>] [--reviewer <name>] [--write-verification] [--json]`
88
106
  - persists ordered two-stage task review evidence (`spec` before `quality`)
@@ -30,10 +30,21 @@ Audit integration:
30
30
 
31
31
  - state schema version is supported
32
32
  - change entry exists
33
- - state timestamp is fresh
34
- - fingerprint matches current artifact truth
33
+ - governing artifact content digests match current artifact truth
35
34
 
36
- If any check fails, Da Vinci falls back to derived state from artifacts and records reconciliation notes.
35
+ Task-group ownership is now split cleanly:
36
+
37
+ - `.da-vinci/state/workflow.json` is the route-cache snapshot
38
+ - `.da-vinci/state/task-groups/<change>.json` is the canonical persisted task-group runtime-state file
39
+ - `workflow.json` references the canonical task-group file by path and digest instead of embedding a normal-copy `taskGroups` array
40
+
41
+ If persisted route trust fails, Da Vinci falls back to derived state from artifacts and records reconciliation notes.
42
+ If the canonical task-group file is missing, unreadable, or digest-mismatched, Da Vinci keeps the persisted route snapshot eligible but rebuilds task-group runtime state from artifacts for that read.
43
+
44
+ Snapshot age is now advisory only:
45
+
46
+ - an old snapshot remains usable when governing artifact digests still match
47
+ - age alone no longer invalidates persisted route truth
37
48
 
38
49
  ## 4. Scaffold Constraints
39
50
 
@@ -0,0 +1,102 @@
1
+ # Maintainer Bootstrap Guide
2
+
3
+ This guide is the canonical entry for contributors working on Da Vinci itself.
4
+
5
+ ## Audience Boundary
6
+
7
+ - Repository maintainer bootstrap: preparing to change this repository.
8
+ - Target-project bootstrap: `da-vinci bootstrap-project` scaffolds `.da-vinci/` artifacts for another project.
9
+ - Package install status: `da-vinci status` / `da-vinci verify-install` checks install confidence only, not full repo readiness.
10
+ - Operator workflow execution: use operator docs for downstream project flow, not for repository bootstrap.
11
+
12
+ ## First 10 Minutes After Clone
13
+
14
+ 1. Install dependencies: `npm install`
15
+ 2. Validate packaged assets: `npm run validate-assets`
16
+ 3. Verify install scope explicitly (recommended): `da-vinci verify-install --platform codex`
17
+ 4. Run canonical repo readiness check: `da-vinci maintainer-readiness --platform codex`
18
+
19
+ Run these from the repository root checkout you are maintaining. If needed, pass
20
+ `--project <path>` to target a different checkout explicitly.
21
+
22
+ If you use multiple environments, pass all selected ones:
23
+
24
+ - `da-vinci verify-install --platform codex,claude`
25
+ - `da-vinci maintainer-readiness --platform codex,claude`
26
+
27
+ ## Entry Surface Taxonomy
28
+
29
+ - Canonical entry:
30
+ - this guide + `da-vinci maintainer-readiness`
31
+ - Secondary/advanced maintainer surfaces:
32
+ - `npm run quality:ci:contracts`
33
+ - `npm run quality:ci:e2e`
34
+ - `npm run quality:ci`
35
+ - targeted `scripts/test-*.js` runs when narrowing a regression
36
+ - Downstream-project surfaces (not repo bootstrap):
37
+ - `da-vinci bootstrap-project`
38
+ - project `.da-vinci/` artifact workflows
39
+ - Bootstrap-adjacent install surfaces:
40
+ - `da-vinci status`
41
+ - `da-vinci verify-install`
42
+
43
+ ## Bootstrap vs Diagnosis
44
+
45
+ - Bootstrap/setup answers: "How do I get ready to work here?"
46
+ - Diagnosis/readiness answers: "Is this repo + local environment healthy enough for my change?"
47
+
48
+ Canonical diagnosis surface:
49
+
50
+ - `da-vinci maintainer-readiness`
51
+
52
+ It is intentionally narrower than full CI and gives actionable next steps. It runs:
53
+
54
+ - packaged asset validation
55
+ - selected-platform verify-install confidence
56
+ - focused quality lane: `npm run quality:ci:contracts`
57
+
58
+ ## Selected Platform Semantics
59
+
60
+ - Explicit `--platform` means only selected platforms are blocking.
61
+ - Non-selected platforms remain visible as `out_of_scope` / degraded coverage.
62
+ - If no `--platform` is provided, scope is treated as unknown and reported as degraded coverage instead of hard failure.
63
+
64
+ ## Use This / Do Not Use This
65
+
66
+ - Use this:
67
+ - `da-vinci verify-install --platform codex` then `da-vinci maintainer-readiness --platform codex`
68
+ - Do not use this:
69
+ - `da-vinci status` alone as proof of repo readiness
70
+ - Use this:
71
+ - this maintainer guide for repository contribution setup
72
+ - Do not use this:
73
+ - `da-vinci bootstrap-project` as maintainer bootstrap for this repository
74
+ - Use this:
75
+ - operator docs only when you are running Da Vinci on another target project
76
+ - Do not use this:
77
+ - operator workflow docs as the first maintainer entry surface
78
+
79
+ ## Troubleshooting
80
+
81
+ - Symptom: `verify-install` is WARN with unknown scope.
82
+ - Action: rerun with explicit `--platform <value>` so selected scope is explicit.
83
+ - Symptom: `maintainer-readiness` is BLOCK on verify-install.
84
+ - Action: fix selected-platform install issues first, then rerun readiness.
85
+ - Symptom: install checks pass but change confidence is still low.
86
+ - Action: run deeper lanes (`quality:ci:e2e` or `quality:ci`) and targeted tests for the changed surfaces.
87
+ - Symptom: confusion between repo bootstrap and downstream project bootstrap.
88
+ - Action: keep repo bootstrap in this guide; use `bootstrap-project` only for downstream repositories.
89
+
90
+ ## Deeper Validation Lanes
91
+
92
+ Run these before broader or higher-risk changes:
93
+
94
+ - `npm run quality:ci:e2e`
95
+ - `npm run quality:ci`
96
+
97
+ ## Operator Workflow References
98
+
99
+ Operator-facing workflow docs remain separate:
100
+
101
+ - [skill-usage.md](./skill-usage.md)
102
+ - [workflow-overview.md](./workflow-overview.md)
@@ -10,7 +10,7 @@ Use it when you need the exact rules for:
10
10
  - screenshot review
11
11
  - runtime gates and filesystem audits
12
12
 
13
- Use [dv-command-reference.md](/Users/xubo/x-skills/da-vinci/docs/dv-command-reference.md) when you need the route-level `dv:` command sequence and rollback behavior across `design`, `tasks`, `build`, and `verify`.
13
+ Use [dv-command-reference.md](./dv-command-reference.md) when you need the route-level `dv:` command sequence and rollback behavior across `design`, `tasks`, `build`, and `verify`.
14
14
 
15
15
  ## Rendering Truth Model
16
16
 
@@ -2,6 +2,10 @@
2
2
 
3
3
  Use this document when you want the operator-facing workflow rather than the lower-level command reference.
4
4
 
5
+ If you are contributing to Da Vinci itself, start with
6
+ [maintainer-bootstrap.md](./maintainer-bootstrap.md)
7
+ instead of this operator workflow guide.
8
+
5
9
  This guide focuses on:
6
10
 
7
11
  - how to enter the Da Vinci workflow the first time
@@ -18,6 +22,7 @@ That means:
18
22
  - `spec.md` and related requirement artifacts stay the behavior truth
19
23
  - the project-local `.pen` stays the design truth
20
24
  - `tasks.md`, `verification.md`, and execution signals explain what has or has not been implemented yet
25
+ - workflow memory is artifact-backed local state under `.da-vinci/state/`, not cross-chat memory
21
26
 
22
27
  ## First Entry
23
28
 
@@ -79,14 +84,20 @@ When design is mostly ready and implementation is next, use these checks:
79
84
 
80
85
  - `da-vinci workflow-status`
81
86
  - confirm the active stage and blockers first
87
+ - task-group focus comes from checklist progress plus the latest `task-execution` / `task-review` evidence
82
88
  - `da-vinci next-step`
83
89
  - confirm whether the next move should still be `design`, `tasks`, or `build`
90
+ - use this when you need the first runtime-aware task-group focus, not just the next unchecked checklist item
84
91
  - `da-vinci lint-spec`
85
92
  - use this when runtime spec quality is still uncertain
93
+ - check `gates.principleInheritance`, `gates.clarify`, and `gates.scenarioQuality` in `--json` output
94
+ - treat `gates.clarify.bounded` as visible planning context: bounded-only clarify is non-blocking by default when bounded metadata is complete
86
95
  - `da-vinci scope-check`
87
96
  - use this when page/state propagation across planning artifacts looks ambiguous
97
+ - check `gates.analyze` in `--json` output for cross-artifact coherence blockers
88
98
  - `da-vinci lint-tasks`
89
99
  - confirm task groups have discipline markers, exact ownership targets, execution intent, and verification commands
100
+ - check `gates.taskCheckpoint` in `--json` output for anchor and checkpoint readiness
90
101
  - `da-vinci lint-bindings`
91
102
  - run this when `pencil-design.md` and `pencil-bindings.md` both exist so implementation landing evidence stays parseable
92
103
  - `da-vinci worktree-preflight`
@@ -112,6 +123,13 @@ During implementation, persist machine-readable task evidence instead of relying
112
123
 
113
124
  `quality` review is valid only after `spec` review has a `PASS` record for the same task group.
114
125
 
126
+ Compatibility note:
127
+
128
+ - flat task-group fields such as `status`, `completion`, `nextAction`, and `resumeCursor` remain available in `workflow-status --json`
129
+ - `completion` stays checklist-derived progress percentage
130
+ - `status`, `nextAction`, and `resumeCursor` may shift to runtime-aware values when implementer or review evidence is fresher than checklist state
131
+ - `workflow-status --json` and `next-step --json` expose `blockingGate` when planning-gate promotion is blocked
132
+
115
133
  ## After Pausing Midway
116
134
 
117
135
  The safest resume order is:
@@ -124,12 +142,25 @@ The safest resume order is:
124
142
  6. before terminal completion, run `da-vinci verify-bindings` and `da-vinci verify-coverage`
125
143
  7. if completion wording is needed, confirm `verify-coverage` freshness is current and run `da-vinci audit --mode completion --change <id> <project-path>`
126
144
 
145
+ Strictness control:
146
+
147
+ - command lint strictness: use `--strict`
148
+ - workflow promotion strictness: use `DA_VINCI_DISCIPLINE_STRICT_PROMOTION`
149
+ - no separate strict controls are introduced for clarify/analyze/task-checkpoint gates
150
+ - integrity audit keeps bounded-only clarify context visible from planning signals even when `lint-spec` signal status is `PASS`
151
+
127
152
  Resume should follow the artifacts, not old conversation state:
128
153
 
129
154
  - if design artifacts exist but `tasks.md` does not, resume into `tasks`
130
155
  - if `tasks.md` exists but design gates are still unresolved, resume into design cleanup rather than `build`
131
156
  - only resume into `build` when implementation readiness is already clear
132
157
 
158
+ When task execution or review evidence conflicts with checklist progress:
159
+
160
+ - trust the route recommendation from `workflow-status` / `next-step`
161
+ - use task-group `nextAction` as the effective resume focus
162
+ - treat checklist `completion` as progress visibility, not as proof that blockers or review debt are cleared
163
+
133
164
  ## How `change-id` Works
134
165
 
135
166
  `change-id` is the directory name under `.da-vinci/changes/<change-id>/`.
@@ -10,11 +10,14 @@ Use it when you need the high-level delivery chain:
10
10
  - page-to-design mapping
11
11
  - implementation and verification
12
12
 
13
- Use [pencil-rendering-workflow.md](/Users/xubo/x-skills/da-vinci/docs/pencil-rendering-workflow.md) when you need the lower-level Pencil session, persistence, gate, and audit details.
14
- Use [dv-command-reference.md](/Users/xubo/x-skills/da-vinci/docs/dv-command-reference.md) when you need route-by-route `dv:` command behavior, next-step recommendations, and verify rollback handling.
15
- Use [constraint-files.md](/Users/xubo/x-skills/da-vinci/docs/constraint-files.md) when you need a single map for project constraint files, hard-gate fields, and advisory guidance sections.
16
- Use [execution-chain-migration.md](/Users/xubo/x-skills/da-vinci/docs/execution-chain-migration.md) for sidecar, enforcement, persisted-state fallback, and scaffold migration guidance.
17
- Use [skill-usage.md](/Users/xubo/x-skills/da-vinci/docs/skill-usage.md) for an operator-facing guide to starting, pausing, resuming, and using the TUI.
13
+ Use [pencil-rendering-workflow.md](./pencil-rendering-workflow.md) when you need the lower-level Pencil session, persistence, gate, and audit details.
14
+ Use [dv-command-reference.md](./dv-command-reference.md) when you need route-by-route `dv:` command behavior, next-step recommendations, and verify rollback handling.
15
+ Use [constraint-files.md](./constraint-files.md) when you need a single map for project constraint files, hard-gate fields, and advisory guidance sections.
16
+ Use [execution-chain-migration.md](./execution-chain-migration.md) for sidecar, enforcement, persisted-state fallback, and scaffold migration guidance.
17
+ Use [skill-usage.md](./skill-usage.md) for an operator-facing guide to starting, pausing, resuming, and using the TUI.
18
+ If you are bootstrapping as a repository maintainer, start with
19
+ [maintainer-bootstrap.md](./maintainer-bootstrap.md)
20
+ as the canonical maintainer entry.
18
21
 
19
22
  ## Core Contract
20
23
 
@@ -33,6 +36,9 @@ This means:
33
36
  Truth-versus-orchestration boundary:
34
37
 
35
38
  - route and completion truth comes from artifacts, checkpoints, execution signals, and `audit`
39
+ - workflow memory is artifact-backed local state, not chat-derived memory
40
+ - `.da-vinci/state/workflow.json` is a persisted route cache, not the canonical owner of task-group runtime state
41
+ - `.da-vinci/state/task-groups/<change>.json` is the canonical persisted task-group runtime-state owner when workflow snapshots are written
36
42
  - orchestration hints such as execution profiles and worktree preflight remain advisory guidance
37
43
  - orchestration hints must never override explicit `BLOCK` truth from artifacts, checkpoints, or completion audit
38
44
 
@@ -54,14 +60,23 @@ Use these command surfaces to inspect route readiness before selecting the next
54
60
 
55
61
  - `da-vinci workflow-status --project <path> [--change <id>] [--json]`
56
62
  - summarizes current stage, blockers, handoff gates, and route recommendation from artifact truth plus selected audit-visible evidence
63
+ - emits canonical task-group runtime state with compatibility fields plus layered planned / implementer / review / effective views
57
64
  - `da-vinci next-step --project <path> [--change <id>] [--json]`
58
65
  - emits the first continuation action from the same derived workflow-state model
66
+ - uses the same task-group runtime-state model as `workflow-status` instead of a separate checklist-only interpretation
67
+ - JSON output includes `blockingGate` when clarify/analyze/task-checkpoint promotion is blocked
59
68
  - `da-vinci lint-spec --project <path> [--change <id>] [--strict] [--json]`
60
69
  - validates runtime `spec.md` schema quality before implementation planning or execution
70
+ - emits machine-readable gates under `gates.principleInheritance`, `gates.clarify`, and `gates.scenarioQuality`
71
+ - clarify bounded ambiguity with complete metadata stays visible under `gates.clarify.bounded` and notes, and is non-blocking by default
61
72
  - default behavior is advisory; `--strict` is explicit opt-in for blocking behavior
62
73
  - `da-vinci scope-check --project <path> [--change <id>] [--strict] [--json]`
63
74
  - validates page and state propagation across proposal, page-map, runtime specs, pencil-design, and tasks
75
+ - emits machine-readable coherence gate output under `gates.analyze`
64
76
  - emits a machine-readable page/state coverage matrix for later verify and status consumers
77
+ - `da-vinci lint-tasks --project <path> [--change <id>] [--strict] [--json]`
78
+ - validates task-group planning discipline plus anchor traceability to upstream planning evidence
79
+ - emits machine-readable gate output under `gates.taskCheckpoint`
65
80
  - `da-vinci generate-sidecars --project <path> [--change <id>] [--json]`
66
81
  - explicitly generates deterministic planning sidecars used by diff and downstream tooling
67
82
  - `da-vinci verify-bindings|verify-implementation|verify-structure|verify-coverage --project <path> [--change <id>] [--strict] [--json]`
@@ -77,6 +92,24 @@ Use these command surfaces to inspect route readiness before selecting the next
77
92
 
78
93
  These surfaces do not replace `da-vinci audit --mode integrity|completion`.
79
94
  `audit` remains the formal integrity and completion truth surface.
95
+ - in integrity mode, planning-signal notes keep bounded clarify context visible even when `lint-spec` top-level signal status is `PASS`
96
+
97
+ Persisted-state trust rules:
98
+
99
+ - persisted workflow snapshots remain usable when governing artifact content digests still match, even if the snapshot is old
100
+ - age alone is advisory and no longer invalidates persisted route truth
101
+ - live overlays such as execution signals, audits, discipline, and verification freshness are recomputed on every read
102
+
103
+ Planning-gate strictness control plane:
104
+
105
+ - command-level lint strictness uses existing `--strict`
106
+ - workflow promotion strictness uses `DA_VINCI_DISCIPLINE_STRICT_PROMOTION`
107
+ - planning gates do not introduce a separate strict-flag family
108
+
109
+ Spec-kit borrowing boundary:
110
+
111
+ - Da Vinci borrows clarify/analyze/gate-method ideas only.
112
+ - Da Vinci does not adopt spec-kit constitution/init/branch/toolchain workflow.
80
113
 
81
114
  ## Standard Artifact Spine
82
115
 
@@ -202,6 +235,8 @@ After mapping passes:
202
235
  - inspect `executionProfile` from `workflow-status` or `next-step --json` before broad implementation
203
236
  - if bounded parallelism is suggested, run `da-vinci worktree-preflight --project <path> [--change <id>]` and downgrade to serial when isolation is not ready
204
237
  - persist per-task implementer and review evidence via `task-execution` and ordered `task-review` records
238
+ - read task-group `nextAction` and `resumeCursor` as runtime-aware focus when live evidence is fresher than checklist state
239
+ - keep reading flat task-group `completion` as checklist-derived progress percentage rather than runtime health
205
240
  - verify requirement drift and design drift
206
241
 
207
242
  ### 8. Terminal Completion
@@ -11,7 +11,8 @@
11
11
  - 正常推进时这些命令怎么衔接
12
12
  - `verify` 出问题后应该退回哪一层
13
13
 
14
- 大流程请看 [workflow-overview.md](/Users/xubo/x-skills/da-vinci/docs/zh-CN/workflow-overview.md),Pencil 渲染和门禁请看 [pencil-rendering-workflow.md](/Users/xubo/x-skills/da-vinci/docs/zh-CN/pencil-rendering-workflow.md)。
14
+ 大流程请看 [workflow-overview.md](./workflow-overview.md),Pencil 渲染和门禁请看 [pencil-rendering-workflow.md](./pencil-rendering-workflow.md)。
15
+ 如果你是在维护这个仓库本身,请先看 [maintainer-bootstrap.md](./maintainer-bootstrap.md) 再进入更深命令面。
15
16
 
16
17
  ## 核心理解
17
18
 
@@ -43,24 +44,37 @@ Da Vinci 期望它们遵循工作流状态。
43
44
  - 打开面向工作流的终端 UI,按阶段组织命令,并在执行前先展示生成出的 CLI 预览
44
45
  - 也可以用独立 bin `da-vinci-tui`,或在没全局安装时用 `npx -p @xenonbyte/da-vinci-workflow da-vinci tui`
45
46
  - 当真正难记的是命令面而不是流程本身时,优先用它
47
+ - `da-vinci verify-install [--platform <value>] [--json]`
48
+ - 校验显式选中的维护者平台安装置信度(例如只校验 `codex`)
49
+ - 未选平台会以 `out_of_scope` / degraded coverage 展示,不会直接判定失败
50
+ - 未传 `--platform` 时会报告 unknown scope,不会根据缺失资产猜测维护者意图
51
+ - `da-vinci maintainer-readiness [--platform <value>] [--project <path>] [--json]`
52
+ - 仓库维护者的 canonical 诊断/就绪面(diagnosis),与 bootstrap/setup 分离
53
+ - 组合 packaged-asset 校验、verify-install 置信度和聚焦 contracts lane(`npm run quality:ci:contracts`)
54
+ - 输出可执行下一步,并把更深层 lane(`quality:ci:e2e`、`quality:ci`)作为可选升级路径
55
+ - 明确比 full CI 更窄;高风险改动再升级到更深校验
46
56
  - `da-vinci workflow-status --project <path> [--change <id>] [--json]`
47
57
  - 从工件和 checkpoint 真相推导当前 workflow 阶段
48
58
  - 报告 blocker、warning、handoff gate、discipline marker、execution profile 提示与 verification freshness
49
59
  - 它和 `audit` 职责不同:它负责选路,不是终态审计真相
50
60
  - `da-vinci next-step --project <path> [--change <id>] [--json]`
51
61
  - 基于同一套 workflow-state 推导,给出 route-first 的续跑建议
52
- - JSON 输出包含 `nextStep`、`executionProfile`、`worktreePreflight` 与 discipline/freshness 元数据
62
+ - JSON 输出包含 `nextStep`、`blockingGate`、`executionProfile`、`worktreePreflight` 与 discipline/freshness 元数据
53
63
  - 在自由扫描工件之前,优先把它作为第一路由信号
54
64
  - `da-vinci lint-spec --project <path> [--change <id>] [--strict] [--json]`
55
65
  - 校验 Da Vinci 运行时 `spec.md` 的核心章节(`Behavior`、`States`、`Inputs`、`Outputs`、`Acceptance`、`Edge Cases`)
66
+ - JSON 输出机器可读 planning gate:`gates.principleInheritance`、`gates.clarify`、`gates.scenarioQuality`
67
+ - 当 bounded 元数据完整时,bounded-only clarify 会保留在 `gates.clarify.bounded` 与 notes 中,默认不阻断
56
68
  - 默认 advisory(有发现给 `WARN` 且不阻断);显式 `--strict` 才升级为阻断
57
69
  - 不会把 OpenSpec 规划用的 `ADDED Requirements` 结构当成运行时 spec 合法结构
58
70
  - `da-vinci scope-check --project <path> [--change <id>] [--strict] [--json]`
59
71
  - 检查 proposal、page-map、运行时 spec、pencil-design 状态和 tasks 之间的 scope 传播一致性
72
+ - JSON 输出机器可读 analyze gate:`gates.analyze`
60
73
  - 输出页面与状态两条线的机器可读覆盖矩阵
61
74
  - 默认 advisory(有发现给 `WARN` 且不阻断);显式 `--strict` 才升级为阻断
62
75
  - `da-vinci lint-tasks --project <path> [--change <id>] [--strict] [--json]`
63
76
  - 校验顶层 task groups、编号顺序、discipline markers、执行模式提示、文件目标、verification 命令与 behavior 覆盖提示
77
+ - 校验 task-anchor 语法(`Planning anchors:` 与 `anchor:<ref>`)并输出机器可读 checkpoint gate:`gates.taskCheckpoint`
64
78
  - 默认 advisory(有发现给 `WARN` 且不阻断);显式 `--strict` 才升级为阻断
65
79
  - `da-vinci lint-bindings --project <path> [--change <id>] [--strict] [--json]`
66
80
  - 校验实现到 Pencil 的映射是否可解析、source 形态是否合理、实现落点是否可定位
@@ -83,8 +97,10 @@ Da Vinci 期望它们遵循工作流状态。
83
97
  - 生成 framework-aware 的 TODO 可审查骨架(`next`/`react`/`vue`/`svelte`/`html`)
84
98
  - 若已存在明确实现落点,会优先保留该落点的扩展名与路由形状
85
99
  - 框架未知或冲突时显式告警并回退 HTML;同时继续严格执行 traversal/output-root 安全约束
86
- - `da-vinci task-execution --project <path> --change <id> --task-group <id> --status <DONE|DONE_WITH_CONCERNS|NEEDS_CONTEXT|BLOCKED> --summary <text> [--changed-files <csv>] [--test-evidence <csv>] [--concerns <csv>] [--blockers <csv>] [--json]`
100
+ - `da-vinci task-execution --project <path> --change <id> --task-group <id> --status <DONE|DONE_WITH_CONCERNS|NEEDS_CONTEXT|BLOCKED> --summary <text> [--changed-files <csv>] [--test-evidence <csv> --confirm-test-evidence-executed] [--pending-test-evidence <csv>] [--concerns <csv>] [--blockers <csv>] [--out-of-scope-writes <csv>] [--partial] [--json]`
87
101
  - 持久化结构化 implementer 执行结果包,作为 task 级执行证据
102
+ - `--pending-test-evidence` 与 `--partial` 会将结果明确标记为非终态;此时不得使用 `DONE`
103
+ - `--out-of-scope-writes` 会把写范围漂移显式暴露给 workflow safety 处理
88
104
  - `da-vinci task-review --project <path> --change <id> --task-group <id> --stage <spec|quality> --status <PASS|WARN|BLOCK> --summary <text> [--issues <csv>] [--reviewer <name>] [--write-verification] [--json]`
89
105
  - 持久化有序两阶段 task review 证据(`spec` 在前,`quality` 在后)
90
106
  - `da-vinci worktree-preflight --project <path> [--change <id>] [--json]`