@xenonbyte/da-vinci-workflow 0.2.2 → 0.2.4
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 +28 -0
- package/README.md +49 -14
- package/README.zh-CN.md +169 -14
- package/commands/claude/dv/breakdown.md +8 -0
- package/commands/claude/dv/build.md +16 -0
- package/commands/claude/dv/continue.md +4 -0
- package/commands/claude/dv/design.md +5 -2
- package/commands/claude/dv/tasks.md +14 -0
- package/commands/claude/dv/verify.md +11 -0
- package/commands/codex/prompts/dv-breakdown.md +8 -0
- package/commands/codex/prompts/dv-build.md +16 -0
- package/commands/codex/prompts/dv-continue.md +4 -0
- package/commands/codex/prompts/dv-design.md +5 -2
- package/commands/codex/prompts/dv-tasks.md +14 -0
- package/commands/codex/prompts/dv-verify.md +10 -0
- package/commands/gemini/dv/breakdown.toml +8 -0
- package/commands/gemini/dv/build.toml +16 -0
- package/commands/gemini/dv/continue.toml +4 -0
- package/commands/gemini/dv/design.toml +5 -2
- package/commands/gemini/dv/tasks.toml +14 -0
- package/commands/gemini/dv/verify.toml +10 -0
- package/commands/templates/dv-continue.shared.md +4 -0
- package/docs/discipline-and-orchestration-upgrade.md +83 -0
- package/docs/dv-command-reference.md +61 -2
- package/docs/execution-chain-migration.md +23 -0
- package/docs/execution-chain-plan.md +10 -3
- package/docs/mode-use-cases.md +2 -1
- package/docs/pencil-rendering-workflow.md +15 -12
- package/docs/prompt-entrypoints.md +5 -0
- package/docs/prompt-presets/README.md +1 -1
- package/docs/prompt-presets/desktop-app.md +3 -3
- package/docs/prompt-presets/mobile-app.md +3 -3
- package/docs/prompt-presets/tablet-app.md +3 -3
- package/docs/prompt-presets/web-app.md +3 -3
- package/docs/skill-usage.md +61 -38
- package/docs/workflow-examples.md +16 -13
- package/docs/workflow-overview.md +19 -0
- package/docs/zh-CN/dv-command-reference.md +59 -2
- package/docs/zh-CN/execution-chain-migration.md +23 -0
- package/docs/zh-CN/mode-use-cases.md +2 -1
- package/docs/zh-CN/pencil-rendering-workflow.md +15 -12
- package/docs/zh-CN/prompt-entrypoints.md +5 -0
- package/docs/zh-CN/prompt-presets/README.md +1 -1
- package/docs/zh-CN/prompt-presets/desktop-app.md +3 -3
- package/docs/zh-CN/prompt-presets/mobile-app.md +3 -3
- package/docs/zh-CN/prompt-presets/tablet-app.md +3 -3
- package/docs/zh-CN/prompt-presets/web-app.md +3 -3
- package/docs/zh-CN/skill-usage.md +61 -38
- package/docs/zh-CN/workflow-examples.md +15 -13
- package/docs/zh-CN/workflow-overview.md +19 -0
- package/examples/greenfield-spec-markupflow/.da-vinci/state/execution-signals/demo__lint-tasks.json +16 -0
- package/lib/audit-parsers.js +166 -10
- package/lib/audit.js +3 -26
- package/lib/cli.js +156 -2
- package/lib/design-source-registry.js +146 -0
- package/lib/execution-profile.js +143 -0
- package/lib/execution-signals.js +19 -1
- package/lib/lint-tasks.js +86 -2
- package/lib/planning-parsers.js +255 -18
- package/lib/save-current-design.js +790 -0
- package/lib/supervisor-review.js +3 -2
- package/lib/task-execution.js +160 -0
- package/lib/task-review.js +197 -0
- package/lib/verify.js +152 -1
- package/lib/workflow-bootstrap.js +2 -13
- package/lib/workflow-persisted-state.js +3 -1
- package/lib/workflow-state.js +503 -33
- package/lib/worktree-preflight.js +214 -0
- package/package.json +1 -1
- package/references/artifact-templates.md +56 -6
- package/tui/catalog.js +103 -0
- package/tui/index.js +2274 -418
|
@@ -67,13 +67,17 @@
|
|
|
67
67
|
|
|
68
68
|
- 有 shell 能力时,先运行 `da-vinci workflow-status --project <path> [--change <id>] --json`
|
|
69
69
|
- 再用 `da-vinci next-step --project <path> [--change <id>]` 作为第一续跑路由信号
|
|
70
|
+
- 如可用,优先读取 `da-vinci next-step --project <path> [--change <id>] --json`,显式获取 discipline marker、execution-profile 与 verification freshness 信息
|
|
70
71
|
- 如果运行时 spec 质量还不确定,进入 `build` 前先运行 `da-vinci lint-spec --project <path> [--change <id>]`
|
|
71
72
|
- 如果页面或状态在规划工件中的传播关系不确定,进入 `build` 前先运行 `da-vinci scope-check --project <path> [--change <id>]`
|
|
73
|
+
- 如果任务拆解质量不确定,进入 `build` 前先运行 `da-vinci lint-tasks --project <path> [--change <id>]`
|
|
72
74
|
- 进入终态前先运行 `da-vinci verify-bindings --project <path> [--change <id>]` 与 `da-vinci verify-coverage --project <path> [--change <id>]`
|
|
73
75
|
- 当规划切片有改动且需要恢复判断时,运行 `da-vinci diff-spec --project <path> [--change <id>]`
|
|
74
76
|
- 先根据工件和 checkpoint 真相决定路由
|
|
75
77
|
- Context Delta 只用于恢复和解释,不用于覆盖选路
|
|
76
78
|
- 如果 Context Delta 与当前工件冲突,选路时忽略冲突内容并标记冲突
|
|
79
|
+
- 如果 design approval discipline marker 缺失、格式错误或过期,路由应停留在 `design` 或 `tasks`,不能直接推进到 `build`
|
|
80
|
+
- 如果提示了 bounded parallel 执行,先运行 `da-vinci worktree-preflight --project <path> [--change <id>]`,再决定是否输出并行 build continuation prompt
|
|
77
81
|
|
|
78
82
|
## 默认推荐流程
|
|
79
83
|
|
|
@@ -94,6 +98,7 @@
|
|
|
94
98
|
|
|
95
99
|
- 如果设计已经完成,但 `tasks.md` 还不存在,下一步主推荐通常应该是 `tasks`,而不是 `build`
|
|
96
100
|
- 只有任务和实现就绪度都已经明确时,才把 `build` 作为主推荐下一步
|
|
101
|
+
- 在 fresh verification evidence 缺失时,不能输出终态 completion 表述;应明确要求 completion audit
|
|
97
102
|
|
|
98
103
|
## 平台语法
|
|
99
104
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
4. 两者一起放进工作流设置
|
|
22
22
|
5. 只有在项目存在特殊真相源或平台约束时,再继续收紧提示词
|
|
23
23
|
6. 如果 Pencil MCP 可用,优先使用已经明确要求 MCP runtime gate 和 completion audit 的那版 redesign 提示词
|
|
24
|
-
7. 如果项目要在自治运行里把 `.pen` 真正持久化到本地,必须使用要求 `da-vinci pencil-session begin /
|
|
24
|
+
7. 如果项目要在自治运行里把 `.pen` 真正持久化到本地,必须使用要求 `da-vinci pencil-session begin / save-current-design / end` 的提示词;并明确区分 `saved` / `blocked` / `unavailable`,只有高层保存不可用时才回退到底层 payload 持久化链路
|
|
25
25
|
|
|
26
26
|
可用模板:
|
|
27
27
|
|
|
@@ -120,7 +120,7 @@ Design 1-3 anchor surfaces first, review screenshots, then expand.
|
|
|
120
120
|
如果同一个 anchor surface 连续两次回滚,就切到每批不超过 6 个操作的微批次,直到拿到干净的 schema-safe pass。
|
|
121
121
|
在第一次成功写入 Pencil 后、继续大范围扩展前,先运行 `da-vinci audit --mode integrity <project-path>`。
|
|
122
122
|
如果 Pencil MCP 可用,在第一次成功写入 Pencil 后运行 MCP runtime gate,并把结果记录到 `pencil-design.md`。
|
|
123
|
-
在第一次 Pencil 编辑前,必须执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`;发生实质性 live edit
|
|
123
|
+
在第一次 Pencil 编辑前,必须执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`;发生实质性 live edit 后,优先执行 `da-vinci save-current-design --project <project-path>`。必须区分 `saved`、`blocked`、`unavailable` 三类结果;只有高层桥接返回 `unavailable` 时,才退回 `pencil-session persist --nodes-file/--variables-file` 这条底层链路。
|
|
124
124
|
截图导出只能写到 `.da-vinci/changes/<change-id>/exports/`,不能写进 `.da-vinci/designs/`。
|
|
125
125
|
截图审查必须记录明确的 `PASS` / `WARN` / `BLOCK`、问题列表和是否回改;“看起来很好”不算审查记录。
|
|
126
126
|
如果 `DA-VINCI.md` 配置了 `Design-supervisor reviewers`,就在 screenshot review、layout hygiene 和 design checkpoint 之后再做 `design-supervisor review`,输入要同时包含 screenshots、Pencil variables 和设计 thesis。若 `Require Supervisor Review: true`,那么缺失、`BLOCK`、或未被接受的 review 结果都要视为阻断。
|
|
@@ -156,7 +156,7 @@ Design 1-3 anchor surfaces first, review screenshots, then expand.
|
|
|
156
156
|
For each anchor surface, explain how the new composition differs structurally from the current layout and whether it is primarily HTML-referenced, partially HTML-referenced, or inferred.
|
|
157
157
|
|
|
158
158
|
Before non-trivial `batch_design` calls, preflight the Pencil operations when shell access is available.
|
|
159
|
-
Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci
|
|
159
|
+
Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci save-current-design --project <project-path>` after material live edits. Treat `saved`, `blocked`, and `unavailable` as distinct outcomes.
|
|
160
160
|
Run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
|
|
161
161
|
Before reporting `design complete` or `workflow complete`, require both the MCP runtime gate and `da-vinci audit --mode completion --change <change-id> <project-path>` to pass.
|
|
162
162
|
Persist project-local Pencil files under .da-vinci/designs/.
|
|
@@ -190,7 +190,7 @@ $da-vinci use continue for this existing desktop-product redesign workflow.
|
|
|
190
190
|
Use the existing Da Vinci artifacts in this project.
|
|
191
191
|
Do not restart discovery unless an artifact is missing or clearly wrong.
|
|
192
192
|
选路先以当前工件和 checkpoint 真相为准,再把 Context Delta 作为辅助恢复信息;如果 Context Delta 与工件冲突,忽略冲突条目并记录冲突后继续。
|
|
193
|
-
把登记的项目内 Pencil 源保持在 `.da-vinci/designs/` 下,作为设计真相源。如果继续这一轮会做 Pencil 编辑,必须先执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`,发生实质性 live edit
|
|
193
|
+
把登记的项目内 Pencil 源保持在 `.da-vinci/designs/` 下,作为设计真相源。如果继续这一轮会做 Pencil 编辑,必须先执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`,发生实质性 live edit 后优先执行 `da-vinci save-current-design --project <project-path>`。必须区分 `saved`、`blocked`、`unavailable`;只有高层桥接返回 `unavailable` 时,才回退到底层 payload 持久化链路。
|
|
194
194
|
If the redesign is complex, continue from the approved anchor surfaces instead of restarting broad scaffolding.
|
|
195
195
|
如果 Pencil MCP 可用,且这一轮继续做了新的 Pencil 写入,就重新运行 MCP runtime gate,并把最新结果记录到 `pencil-design.md`。
|
|
196
196
|
在声明 `design complete` 或 `workflow complete` 之前,必须同时通过 MCP runtime gate 和 `da-vinci audit --mode completion --change <change-id> <project-path>`。
|
|
@@ -126,7 +126,7 @@ Use only Pencil-supported properties; do not use web-only props like flex or mar
|
|
|
126
126
|
Verify the registered project-local `.pen` file exists as a shell-visible file after the first Pencil write.
|
|
127
127
|
在第一次成功写入 Pencil 后、继续大范围扩展前,先运行 `da-vinci audit --mode integrity <project-path>`。
|
|
128
128
|
如果 Pencil MCP 可用,在第一次成功写入 Pencil 后运行 MCP runtime gate,并把结果记录到 `pencil-design.md`。
|
|
129
|
-
在第一次 Pencil 编辑前,必须执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`;发生实质性 live edit
|
|
129
|
+
在第一次 Pencil 编辑前,必须执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`;发生实质性 live edit 后,优先执行 `da-vinci save-current-design --project <project-path>`。必须区分 `saved`、`blocked`、`unavailable` 三类结果;只有高层桥接返回 `unavailable` 时,才退回 `pencil-session persist --nodes-file/--variables-file` 这条底层链路。
|
|
130
130
|
Keep non-`.pen` workflow artifacts out of `.da-vinci/designs/`.
|
|
131
131
|
截图导出只能写到 `.da-vinci/changes/<change-id>/exports/`,不能写进 `.da-vinci/designs/`。
|
|
132
132
|
截图审查必须记录明确的 `PASS` / `WARN` / `BLOCK`、问题列表和是否回改;“看起来很好”不算审查记录。
|
|
@@ -164,7 +164,7 @@ Design 1-3 anchor surfaces first, review screenshots, then expand.
|
|
|
164
164
|
For each anchor surface, explain how the new composition differs structurally from the current layout and whether it is primarily HTML-referenced, partially HTML-referenced, or inferred.
|
|
165
165
|
|
|
166
166
|
Before non-trivial `batch_design` calls, preflight the Pencil operations when shell access is available.
|
|
167
|
-
Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci
|
|
167
|
+
Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci save-current-design --project <project-path>` after material live edits. Treat `saved`, `blocked`, and `unavailable` as distinct outcomes.
|
|
168
168
|
Run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
|
|
169
169
|
Before reporting `design complete` or `workflow complete`, require both the MCP runtime gate and `da-vinci audit --mode completion --change <change-id> <project-path>` to pass.
|
|
170
170
|
Persist project-local Pencil files under .da-vinci/designs/.
|
|
@@ -198,7 +198,7 @@ $da-vinci use continue for this existing mobile-app redesign workflow.
|
|
|
198
198
|
Use the existing Da Vinci artifacts in this project.
|
|
199
199
|
Do not restart discovery unless an artifact is missing or clearly wrong.
|
|
200
200
|
选路先以当前工件和 checkpoint 真相为准,再把 Context Delta 作为辅助恢复信息;如果 Context Delta 与工件冲突,忽略冲突条目并记录冲突后继续。
|
|
201
|
-
把登记的项目内 Pencil 源保持在 `.da-vinci/designs/` 下,作为设计真相源。如果继续这一轮会做 Pencil 编辑,必须先执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`,发生实质性 live edit
|
|
201
|
+
把登记的项目内 Pencil 源保持在 `.da-vinci/designs/` 下,作为设计真相源。如果继续这一轮会做 Pencil 编辑,必须先执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`,发生实质性 live edit 后优先执行 `da-vinci save-current-design --project <project-path>`。必须区分 `saved`、`blocked`、`unavailable`;只有高层桥接返回 `unavailable` 时,才回退到底层 payload 持久化链路。
|
|
202
202
|
If the redesign is complex, keep the anchor-first flow until the design checkpoint passes.
|
|
203
203
|
如果 Pencil MCP 可用,且这一轮继续做了新的 Pencil 写入,就重新运行 MCP runtime gate,并把最新结果记录到 `pencil-design.md`。
|
|
204
204
|
在声明 `design complete` 或 `workflow complete` 之前,必须同时通过 MCP runtime gate 和 `da-vinci audit --mode completion --change <change-id> <project-path>`。
|
|
@@ -120,7 +120,7 @@ Design 1-3 anchor surfaces first, review screenshots, then expand.
|
|
|
120
120
|
如果同一个 anchor surface 连续两次回滚,就切到每批不超过 6 个操作的微批次,直到拿到干净的 schema-safe pass。
|
|
121
121
|
在第一次成功写入 Pencil 后、继续大范围扩展前,先运行 `da-vinci audit --mode integrity <project-path>`。
|
|
122
122
|
如果 Pencil MCP 可用,在第一次成功写入 Pencil 后运行 MCP runtime gate,并把结果记录到 `pencil-design.md`。
|
|
123
|
-
在第一次 Pencil 编辑前,必须执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`;发生实质性 live edit
|
|
123
|
+
在第一次 Pencil 编辑前,必须执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`;发生实质性 live edit 后,优先执行 `da-vinci save-current-design --project <project-path>`。必须区分 `saved`、`blocked`、`unavailable` 三类结果;只有高层桥接返回 `unavailable` 时,才退回 `pencil-session persist --nodes-file/--variables-file` 这条底层链路。
|
|
124
124
|
截图导出只能写到 `.da-vinci/changes/<change-id>/exports/`,不能写进 `.da-vinci/designs/`。
|
|
125
125
|
截图审查必须记录明确的 `PASS` / `WARN` / `BLOCK`、问题列表和是否回改;“看起来很好”不算审查记录。
|
|
126
126
|
如果 `DA-VINCI.md` 配置了 `Design-supervisor reviewers`,就在 screenshot review、layout hygiene 和 design checkpoint 之后再做 `design-supervisor review`,输入要同时包含 screenshots、Pencil variables 和设计 thesis。若 `Require Supervisor Review: true`,那么缺失、`BLOCK`、或未被接受的 review 结果都要视为阻断。
|
|
@@ -156,7 +156,7 @@ Design 1-3 anchor surfaces first, review screenshots, then expand.
|
|
|
156
156
|
For each anchor surface, explain how the new composition differs structurally from the current layout and whether it is primarily HTML-referenced, partially HTML-referenced, or inferred.
|
|
157
157
|
|
|
158
158
|
Before non-trivial `batch_design` calls, preflight the Pencil operations when shell access is available.
|
|
159
|
-
Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci
|
|
159
|
+
Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci save-current-design --project <project-path>` after material live edits. Treat `saved`, `blocked`, and `unavailable` as distinct outcomes.
|
|
160
160
|
Run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
|
|
161
161
|
Before reporting `design complete` or `workflow complete`, require both the MCP runtime gate and `da-vinci audit --mode completion --change <change-id> <project-path>` to pass.
|
|
162
162
|
Persist project-local Pencil files under .da-vinci/designs/.
|
|
@@ -190,7 +190,7 @@ $da-vinci use continue for this existing tablet-product redesign workflow.
|
|
|
190
190
|
Use the existing Da Vinci artifacts in this project.
|
|
191
191
|
Do not restart discovery unless an artifact is missing or clearly wrong.
|
|
192
192
|
选路先以当前工件和 checkpoint 真相为准,再把 Context Delta 作为辅助恢复信息;如果 Context Delta 与工件冲突,忽略冲突条目并记录冲突后继续。
|
|
193
|
-
把登记的项目内 Pencil 源保持在 `.da-vinci/designs/` 下,作为设计真相源。如果继续这一轮会做 Pencil 编辑,必须先执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`,发生实质性 live edit
|
|
193
|
+
把登记的项目内 Pencil 源保持在 `.da-vinci/designs/` 下,作为设计真相源。如果继续这一轮会做 Pencil 编辑,必须先执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`,发生实质性 live edit 后优先执行 `da-vinci save-current-design --project <project-path>`。必须区分 `saved`、`blocked`、`unavailable`;只有高层桥接返回 `unavailable` 时,才回退到底层 payload 持久化链路。
|
|
194
194
|
If the redesign is complex, continue from the approved anchor surfaces instead of restarting broad scaffolding.
|
|
195
195
|
如果 Pencil MCP 可用,且这一轮继续做了新的 Pencil 写入,就重新运行 MCP runtime gate,并把最新结果记录到 `pencil-design.md`。
|
|
196
196
|
在声明 `design complete` 或 `workflow complete` 之前,必须同时通过 MCP runtime gate 和 `da-vinci audit --mode completion --change <change-id> <project-path>`。
|
|
@@ -121,7 +121,7 @@ Design 1-3 anchor surfaces first, review screenshots, then expand.
|
|
|
121
121
|
如果同一个 anchor surface 连续两次回滚,就切到每批不超过 6 个操作的微批次,直到拿到干净的 schema-safe pass。
|
|
122
122
|
在第一次成功写入 Pencil 后、继续大范围扩展前,先运行 `da-vinci audit --mode integrity <project-path>`。
|
|
123
123
|
如果 Pencil MCP 可用,在第一次成功写入 Pencil 后运行 MCP runtime gate,并把结果记录到 `pencil-design.md`。
|
|
124
|
-
在第一次 Pencil 编辑前,必须执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`;发生实质性 live edit
|
|
124
|
+
在第一次 Pencil 编辑前,必须执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`;发生实质性 live edit 后,优先执行 `da-vinci save-current-design --project <project-path>`。必须区分 `saved`、`blocked`、`unavailable` 三类结果;只有高层桥接返回 `unavailable` 时,才退回 `pencil-session persist --nodes-file/--variables-file` 这条底层链路。
|
|
125
125
|
截图导出只能写到 `.da-vinci/changes/<change-id>/exports/`,不能写进 `.da-vinci/designs/`。
|
|
126
126
|
截图审查必须记录明确的 `PASS` / `WARN` / `BLOCK`、问题列表和是否回改;“看起来很好”不算审查记录。
|
|
127
127
|
如果 `DA-VINCI.md` 配置了 `Design-supervisor reviewers`,就在 screenshot review、layout hygiene 和 design checkpoint 之后再做 `design-supervisor review`,输入要同时包含 screenshots、Pencil variables 和设计 thesis。若 `Require Supervisor Review: true`,那么缺失、`BLOCK`、或未被接受的 review 结果都要视为阻断。
|
|
@@ -157,7 +157,7 @@ Design 1-3 anchor surfaces first, review screenshots, then expand.
|
|
|
157
157
|
For each anchor surface, explain how the new composition differs structurally from the current layout and whether it is primarily HTML-referenced, partially HTML-referenced, or inferred.
|
|
158
158
|
|
|
159
159
|
Before non-trivial `batch_design` calls, preflight the Pencil operations when shell access is available.
|
|
160
|
-
Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci
|
|
160
|
+
Require `da-vinci pencil-session begin --project <project-path> --pen <path>` before the first Pencil edit, then use `da-vinci save-current-design --project <project-path>` after material live edits. Treat `saved`, `blocked`, and `unavailable` as distinct outcomes.
|
|
161
161
|
Run the MCP runtime gate after the first successful Pencil write and record it in `pencil-design.md`.
|
|
162
162
|
Before reporting `design complete` or `workflow complete`, require both the MCP runtime gate and `da-vinci audit --mode completion --change <change-id> <project-path>` to pass.
|
|
163
163
|
Persist project-local Pencil files under .da-vinci/designs/.
|
|
@@ -191,7 +191,7 @@ $da-vinci use continue for this existing web-product redesign workflow.
|
|
|
191
191
|
Use the existing Da Vinci artifacts in this project.
|
|
192
192
|
Do not restart discovery unless an artifact is missing or clearly wrong.
|
|
193
193
|
选路先以当前工件和 checkpoint 真相为准,再把 Context Delta 作为辅助恢复信息;如果 Context Delta 与工件冲突,忽略冲突条目并记录冲突后继续。
|
|
194
|
-
把登记的项目内 Pencil 源保持在 `.da-vinci/designs/` 下,作为设计真相源。如果继续这一轮会做 Pencil 编辑,必须先执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`,发生实质性 live edit
|
|
194
|
+
把登记的项目内 Pencil 源保持在 `.da-vinci/designs/` 下,作为设计真相源。如果继续这一轮会做 Pencil 编辑,必须先执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`,发生实质性 live edit 后优先执行 `da-vinci save-current-design --project <project-path>`。必须区分 `saved`、`blocked`、`unavailable`;只有高层桥接返回 `unavailable` 时,才回退到底层 payload 持久化链路。
|
|
195
195
|
If the redesign is complex, continue from the approved anchor surfaces instead of restarting broad scaffolding.
|
|
196
196
|
如果 Pencil MCP 可用,且这一轮继续做了新的 Pencil 写入,就重新运行 MCP runtime gate,并把最新结果记录到 `pencil-design.md`。
|
|
197
197
|
在声明 `design complete` 或 `workflow complete` 之前,必须同时通过 MCP runtime gate 和 `da-vinci audit --mode completion --change <change-id> <project-path>`。
|
|
@@ -85,6 +85,12 @@ $da-vinci use continue for <existing workflow state>
|
|
|
85
85
|
- 当运行时 spec 质量还不够确定时使用
|
|
86
86
|
- `da-vinci scope-check`
|
|
87
87
|
- 当规划工件之间页面/状态传播关系还不清楚时使用
|
|
88
|
+
- `da-vinci lint-tasks`
|
|
89
|
+
- 校验 task groups 是否包含 discipline markers、明确文件落点、执行意图与 verification 命令
|
|
90
|
+
- `da-vinci lint-bindings`
|
|
91
|
+
- 当 `pencil-design.md` 与 `pencil-bindings.md` 同时存在时运行,确保实现落点证据可解析
|
|
92
|
+
- `da-vinci worktree-preflight`
|
|
93
|
+
- 准备 bounded parallel 执行前先跑,用于判断是否建议启用本地 worktree 隔离
|
|
88
94
|
|
|
89
95
|
如果你已经在项目根目录里,`--project` 通常可以省略,因为 CLI 默认会回退到当前目录。
|
|
90
96
|
|
|
@@ -95,8 +101,17 @@ da-vinci workflow-status
|
|
|
95
101
|
da-vinci next-step
|
|
96
102
|
da-vinci lint-spec
|
|
97
103
|
da-vinci scope-check
|
|
104
|
+
da-vinci lint-tasks
|
|
98
105
|
```
|
|
99
106
|
|
|
107
|
+
实现阶段不要只靠聊天总结,建议同步写入机器可读证据:
|
|
108
|
+
|
|
109
|
+
- `da-vinci task-execution --project <path> --change <id> --task-group <id> --status <DONE|DONE_WITH_CONCERNS|NEEDS_CONTEXT|BLOCKED> --summary <text> ...`
|
|
110
|
+
- `da-vinci task-review --project <path> --change <id> --task-group <id> --stage spec ...`
|
|
111
|
+
- `da-vinci task-review --project <path> --change <id> --task-group <id> --stage quality ...`
|
|
112
|
+
|
|
113
|
+
同一 task group 只有在 `spec` review 已是 `PASS` 时,`quality` review 才允许通过。
|
|
114
|
+
|
|
100
115
|
## 中途退出后,下次怎么恢复
|
|
101
116
|
|
|
102
117
|
最稳妥的恢复顺序是:
|
|
@@ -107,6 +122,7 @@ da-vinci scope-check
|
|
|
107
122
|
4. 如果规划传播关系不确定,跑 `da-vinci scope-check`
|
|
108
123
|
5. 如果 planning 工件相对上次稳定状态有变化,跑 `da-vinci generate-sidecars` 和 `da-vinci diff-spec`
|
|
109
124
|
6. 在终态前,跑 `da-vinci verify-bindings` 和 `da-vinci verify-coverage`
|
|
125
|
+
7. 如果要做 completion 表述,确认 `verify-coverage` 的 freshness 仍然有效,并运行 `da-vinci audit --mode completion --change <id> <project-path>`
|
|
110
126
|
|
|
111
127
|
恢复时应该遵循工件,而不是旧聊天上下文:
|
|
112
128
|
|
|
@@ -146,67 +162,74 @@ npx -p @xenonbyte/da-vinci-workflow da-vinci-tui
|
|
|
146
162
|
|
|
147
163
|
TUI 提供这些能力:
|
|
148
164
|
|
|
149
|
-
-
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
165
|
+
- 首屏按场景组织:`安装与卸载`、`当前状态`、`切换工作项`、`设计操作`、`实施前检查`、`验收前检查`、`设置`
|
|
166
|
+
- 常用链路直接做成组合入口(续跑、实施前检查、验收前检查)
|
|
167
|
+
- `设计操作` 聚焦实用设计操作(`保存当前设计稿`、`同步图标库`、`Visual Assist 预设`)
|
|
168
|
+
- `安装与卸载` 提供三个动作:`状态`(查看 `da-vinci status`)、`安装`(一键安装所有支持平台)、`卸载`(一键卸载所有支持平台)
|
|
169
|
+
- 界面中英双语,但 Visual Assist 输出始终使用英文权威源
|
|
170
|
+
- 顶部只保留最小上下文(项目 + change)
|
|
171
|
+
- `设置` 仅保留 `语言` 和 `日志`
|
|
172
|
+
- `设置 > 日志` 提供项目内每日诊断日志(`.da-vinci/logs/YYYY-MM-DD.ndjson`)
|
|
155
173
|
|
|
156
|
-
### TUI
|
|
174
|
+
### TUI 场景图
|
|
157
175
|
|
|
158
176
|
```mermaid
|
|
159
177
|
flowchart TD
|
|
160
|
-
A[启动 da-vinci tui] --> B[设置 project
|
|
161
|
-
B --> C[
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
D --> I[验证与完成<br/>verify-bindings / verify-implementation / verify-structure / verify-coverage / audit]
|
|
169
|
-
D --> J[初始化与工具<br/>install / uninstall / status / validate-assets / bootstrap-project]
|
|
170
|
-
|
|
171
|
-
E --> I
|
|
172
|
-
F --> G
|
|
173
|
-
G --> H
|
|
174
|
-
H --> E
|
|
175
|
-
I --> K{可以收尾了吗?}
|
|
176
|
-
K -->|还不行| C
|
|
177
|
-
K -->|可以| L[跑 completion audit 并做终态声明]
|
|
178
|
+
A[启动 da-vinci tui] --> B[设置 project 和 change 上下文]
|
|
179
|
+
B --> C[安装与卸载<br/>状态 + 一键安装/卸载全部平台]
|
|
180
|
+
B --> D[当前状态<br/>workflow-status + next-step 总结]
|
|
181
|
+
B --> E[切换工作项<br/>选择已有 change]
|
|
182
|
+
B --> F[设计操作<br/>图标同步 + Visual Assist 预设]
|
|
183
|
+
B --> G[实施前检查<br/>实现前就绪度检查]
|
|
184
|
+
B --> H[验收前检查<br/>verify-* 链路]
|
|
185
|
+
B --> I[设置<br/>语言 + 日志]
|
|
178
186
|
```
|
|
179
187
|
|
|
180
188
|
你可以把它理解成这四条最实用的规则:
|
|
181
189
|
|
|
182
|
-
-
|
|
183
|
-
-
|
|
184
|
-
-
|
|
185
|
-
-
|
|
190
|
+
- 先选“当前时机”对应的场景
|
|
191
|
+
- 优先用场景入口完成常用检查
|
|
192
|
+
- 只要中途暂停或路由不清晰,就进入“当前状态”
|
|
193
|
+
- 只有“验收前检查”通过,才进入终态
|
|
194
|
+
|
|
195
|
+
Visual Assist 预设映射(`设计操作 > Visual Assist 预设`):
|
|
196
|
+
|
|
197
|
+
- `Masterpiece` => `required reviewer signoff`
|
|
198
|
+
- `High Quality` => `advisory reviewer`
|
|
199
|
+
- `Normal` => `adapter-only`
|
|
200
|
+
|
|
201
|
+
Visual Assist 受控写入规则:
|
|
202
|
+
|
|
203
|
+
- 先选平台,再从 3 档质量中选择(对应 Variant 1/2/3)
|
|
204
|
+
- 内容来自 `docs/visual-assist-presets/` 的英文权威源
|
|
205
|
+
- 只替换项目根 `DA-VINCI.md` 的 `## Visual Assist`
|
|
206
|
+
- 保留无关章节,避免重复 `## Visual Assist`
|
|
186
207
|
|
|
187
208
|
主要按键:
|
|
188
209
|
|
|
189
210
|
- `Up/Down` 或 `j/k`:移动选中项
|
|
190
|
-
- `Enter` 或 `r
|
|
191
|
-
- `
|
|
192
|
-
- `
|
|
211
|
+
- `Enter` 或 `r`:进入当前场景/动作
|
|
212
|
+
- `u/d`:长内容按页上下翻
|
|
213
|
+
- `g/G`:长内容跳到顶部/底部
|
|
193
214
|
- `p`:修改项目路径上下文
|
|
194
215
|
- `c`:修改或清空 change-id 上下文
|
|
195
216
|
- `l`:切换中英文
|
|
217
|
+
- `t`:主题识别不准时,手动切换主题模式
|
|
196
218
|
- `s`:切换 `--strict`
|
|
197
219
|
- `J`:切换 `--json`
|
|
198
220
|
- `e`:切换 `--continue-on-error`
|
|
199
221
|
- `?`:打开帮助
|
|
200
|
-
- `
|
|
222
|
+
- `Ctrl-C`:紧急退出
|
|
201
223
|
|
|
202
224
|
推荐的 TUI 使用顺序:
|
|
203
225
|
|
|
204
226
|
1. 在项目根目录启动 TUI
|
|
205
|
-
2.
|
|
206
|
-
3.
|
|
207
|
-
4.
|
|
208
|
-
5.
|
|
209
|
-
6.
|
|
227
|
+
2. 先选当前任务对应的场景
|
|
228
|
+
3. 再确认顶部的 project path 和 change-id
|
|
229
|
+
4. 优先执行场景入口(`切换工作项`、`实施前检查`、`安装与卸载`、`验收前检查`);需要续跑判断时进入 `当前状态`
|
|
230
|
+
5. 需要管理 Visual Assist 时,进入 `设计操作 > Visual Assist 预设`,完成“平台 + 质量”选择后自动写入
|
|
231
|
+
6. 需要查看安装态时进入 `安装与卸载 > 状态`;需要安装/卸载时进入 `安装与卸载 > 安装/卸载` 一键执行全部平台
|
|
232
|
+
7. 排查问题时到 `设置 > 日志` 查看/复制当天日志;日志只做诊断证据,不替代工件真相
|
|
210
233
|
|
|
211
234
|
## 实用简化规则
|
|
212
235
|
|
|
@@ -110,17 +110,18 @@ $da-vinci use redesign-from-code to inventory the current app, identify current
|
|
|
110
110
|
11. 如果同一个 anchor surface 连续两次回滚,就切到每批不超过 6 个操作的微批次,直到拿到干净的 schema-safe pass
|
|
111
111
|
12. 如果这一轮开始时还没有登记的项目内 `.pen`,必须先执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`,先 seed 登记路径并拿到全局锁,再开始第一次 Pencil 编辑
|
|
112
112
|
13. 如果存在外部或历史 `.pen` 备份,在新一轮写入前先运行 `da-vinci check-pen-baseline --pen <project-pen> --baseline <other-pen>`;若 hash 不一致,先把选中的优先来源同步回 `<project-pen>`
|
|
113
|
-
14. 如果项目里原本已有登记的 `.pen`,继续设计时也必须先通过 `da-vinci pencil-session begin --project <project-path> --pen <path>` reopen
|
|
114
|
-
15.
|
|
115
|
-
16.
|
|
116
|
-
17.
|
|
117
|
-
18.
|
|
118
|
-
19.
|
|
119
|
-
20.
|
|
120
|
-
21.
|
|
121
|
-
22.
|
|
122
|
-
23.
|
|
123
|
-
24.
|
|
113
|
+
14. 如果项目里原本已有登记的 `.pen`,继续设计时也必须先通过 `da-vinci pencil-session begin --project <project-path> --pen <path>` reopen 它;发生实质性 live edit 后,优先执行 `da-vinci save-current-design --project <project-path>`
|
|
114
|
+
15. 必须区分 `saved` / `blocked` / `unavailable`,只有 `saved` 才代表保存成功;`unavailable` 时才能回退到底层 payload 持久化链路
|
|
115
|
+
16. 在第一次成功写入 Pencil 后,立即验证登记的项目内 `.pen` 路径已经成为 shell 可见文件
|
|
116
|
+
17. 紧接着运行 `da-vinci audit --mode integrity <project-path>`
|
|
117
|
+
18. 如果 Pencil MCP 可用,先运行 MCP runtime gate,并把结果记录到 `pencil-design.md`
|
|
118
|
+
19. 运行 `design-source checkpoint`,确认登记的项目内 `.pen` 路径、当前 Pencil 设计源和 shell 可见文件是一致的
|
|
119
|
+
20. 截图导出只放到 `.da-vinci/changes/<change-id>/exports/`,绝不能写进 `.da-vinci/designs/`
|
|
120
|
+
21. 在 broad expansion 前,先把 screenshot review 的 `PASS` / `WARN` / `BLOCK`、问题列表和回改结果记清楚
|
|
121
|
+
22. 绑定路由和 Pencil 页面
|
|
122
|
+
23. 生成和 redesign slice 对齐的任务
|
|
123
|
+
24. 在任何终态完成声明之前,先运行 `da-vinci audit --mode completion --change <change-id> <project-path>`
|
|
124
|
+
25. 只有在 completion gate 最终能通过时,才进入实现和验证
|
|
124
125
|
|
|
125
126
|
### 复杂 Android 页面示例
|
|
126
127
|
|
|
@@ -145,7 +146,8 @@ If the same anchor surface rolls back twice, switch to micro-batches of 6 or few
|
|
|
145
146
|
Use only Pencil-supported properties; do not use web-only props like flex or margin.
|
|
146
147
|
在第一次 Pencil 编辑前,必须执行 `da-vinci pencil-session begin --project <project-path> --pen <path>`,这样会先 seed 登记好的 `.pen` 并持有全局 Pencil 锁。
|
|
147
148
|
如果存在外部或历史 `.pen`,先运行 `da-vinci check-pen-baseline --pen <project-pen> --baseline <other-pen>`;若 hash 分叉,先确认来源优先级并把选中的来源同步回 `<project-pen>` 再继续。
|
|
148
|
-
如果项目里原本已有登记的 `.pen`,继续设计时先打开它,但实质性 live edit 后优先通过 `da-vinci
|
|
149
|
+
如果项目里原本已有登记的 `.pen`,继续设计时先打开它,但实质性 live edit 后优先通过 `da-vinci save-current-design --project <project-path>` 保存。
|
|
150
|
+
必须区分 `saved` / `blocked` / `unavailable`;只有 `saved` 才是保存成功,`unavailable` 才能触发底层回退。
|
|
149
151
|
Verify the registered project-local `.pen` file exists as a shell-visible file after the first Pencil write.
|
|
150
152
|
在第一次成功写入 Pencil 后、继续大范围扩展前,先运行 `da-vinci audit --mode integrity <project-path>`。
|
|
151
153
|
Keep `.da-vinci/designs/` reserved for `.pen` files only.
|
|
@@ -218,7 +220,7 @@ If frontend-skill is available, use it as the primary visual adapter.
|
|
|
218
220
|
If it is unavailable, fall back to native Da Vinci design rules and continue.
|
|
219
221
|
Persist project-local Pencil files under .da-vinci/designs/.
|
|
220
222
|
如果当前还没有登记的项目内 `.pen`,先在这里 seed 一个登记好的 `.pen`,再开始第一次 Pencil 编辑,并把后续 live 编辑持续绑定到这个路径。
|
|
221
|
-
如果项目里原本已有 `.pen
|
|
223
|
+
如果项目里原本已有 `.pen`,继续设计后优先执行 `da-vinci save-current-design --project <project-path>` 持久化;只有高层保存返回 `unavailable` 时才回退到底层 payload 持久化。
|
|
222
224
|
```
|
|
223
225
|
|
|
224
226
|
## 图标库辅助示例
|
|
@@ -32,6 +32,12 @@ Da Vinci 围绕一个固定契约工作:
|
|
|
32
32
|
- 项目内 `.pen` 是设计真相源
|
|
33
33
|
- 实现必须能追溯到这两层
|
|
34
34
|
|
|
35
|
+
真相与编排边界:
|
|
36
|
+
|
|
37
|
+
- 选路和 completion 真相来自工件、checkpoint、execution signals 与 `audit`
|
|
38
|
+
- execution profile、worktree preflight 等编排信息始终是 advisory 指导,不替代真相面
|
|
39
|
+
- 编排提示不能覆盖来自工件、checkpoint 或 completion audit 的明确 `BLOCK`
|
|
40
|
+
|
|
35
41
|
## 主流程
|
|
36
42
|
|
|
37
43
|
1. 选择正确的 mode。
|
|
@@ -62,6 +68,12 @@ Da Vinci 围绕一个固定契约工作:
|
|
|
62
68
|
- 显式生成确定性的 planning sidecars,供 diff 和下游工具消费
|
|
63
69
|
- `da-vinci verify-bindings|verify-implementation|verify-structure|verify-coverage --project <path> [--change <id>] [--strict] [--json]`
|
|
64
70
|
- 校验从 bindings 到实现与结构覆盖的执行链证据
|
|
71
|
+
- `da-vinci task-execution --project <path> --change <id> --task-group <id> --status <DONE|DONE_WITH_CONCERNS|NEEDS_CONTEXT|BLOCKED> --summary <text> ...`
|
|
72
|
+
- 按 task group 持久化 implementer 结果包,便于恢复时读取未解决 blocker/concern
|
|
73
|
+
- `da-vinci task-review --project <path> --change <id> --task-group <id> --stage <spec|quality> --status <PASS|WARN|BLOCK> --summary <text> ...`
|
|
74
|
+
- 持久化有序两阶段 review 证据(先 `spec` 再 `quality`),并可写回 `verification.md`
|
|
75
|
+
- `da-vinci worktree-preflight --project <path> [--change <id>] [--json]`
|
|
76
|
+
- 在准备 bounded-parallel 执行前提供 advisory 隔离预检
|
|
65
77
|
- `da-vinci diff-spec --project <path> [--change <id>] [--from <sidecars-dir>] [--json]`
|
|
66
78
|
- 报告 spec/tasks/page-map/bindings sidecars 的规范化差异,支持安全续跑
|
|
67
79
|
|
|
@@ -159,6 +171,7 @@ anchor 通过后,再抽 shared primitives,然后再扩更多页面。
|
|
|
159
171
|
|
|
160
172
|
- `design-source checkpoint`
|
|
161
173
|
- 如果启用了 Pencil MCP,则跑 `MCP runtime gate`
|
|
174
|
+
- 发生实质性 live edit 后执行 `da-vinci save-current-design --project <project-path>`(高层绑定源保存路径)
|
|
162
175
|
- 工作中期跑 `da-vinci audit --mode integrity <project-path>`
|
|
163
176
|
- 在现有 change 工件里记录 checkpoint 邻近的 `Context Delta`
|
|
164
177
|
|
|
@@ -168,6 +181,7 @@ anchor 通过后,再抽 shared primitives,然后再扩更多页面。
|
|
|
168
181
|
- active editor 是正确的设计源
|
|
169
182
|
- shell 上确实有 `.pen`
|
|
170
183
|
- live snapshot 和 persisted snapshot 已同步
|
|
184
|
+
- 高层保存结果被诚实处理(`saved` / `blocked` / `unavailable`)
|
|
171
185
|
- 最近关键执行上下文可恢复,但不会替代工件真相的选路权
|
|
172
186
|
|
|
173
187
|
### 6. Mapping
|
|
@@ -185,7 +199,11 @@ anchor 通过后,再抽 shared primitives,然后再扩更多页面。
|
|
|
185
199
|
mapping 通过后:
|
|
186
200
|
|
|
187
201
|
- 生成 `tasks.md`
|
|
202
|
+
- 保持 task group 可解析:包含 discipline markers、文件目标、执行意图、review 意图和 verification 命令
|
|
188
203
|
- 基于 requirements 和 Pencil 数据实现
|
|
204
|
+
- 在大范围实现前,从 `workflow-status` 或 `next-step --json` 查看 `executionProfile`
|
|
205
|
+
- 如果建议 bounded parallel,先跑 `da-vinci worktree-preflight --project <path> [--change <id>]`;隔离未就绪时降级为串行
|
|
206
|
+
- 通过 `task-execution` 与有序 `task-review` 记录每个 task group 的执行与审查证据
|
|
189
207
|
- 验证需求漂移和设计漂移
|
|
190
208
|
|
|
191
209
|
### 8. 终态完成
|
|
@@ -195,6 +213,7 @@ mapping 通过后:
|
|
|
195
213
|
- design checkpoint 不再阻塞
|
|
196
214
|
- design-source checkpoint 至少 `PASS`
|
|
197
215
|
- 如果用了 Pencil MCP,runtime gate 结果可接受
|
|
216
|
+
- in-scope 的实现和覆盖结论具备 fresh verification evidence
|
|
198
217
|
- `da-vinci audit --mode completion --change <change-id> <project-path>` 通过
|
|
199
218
|
|
|
200
219
|
补充说明:
|
package/examples/greenfield-spec-markupflow/.da-vinci/state/execution-signals/demo__lint-tasks.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"surface": "lint-tasks",
|
|
4
|
+
"status": "WARN",
|
|
5
|
+
"advisory": true,
|
|
6
|
+
"strict": false,
|
|
7
|
+
"failures": [
|
|
8
|
+
"Missing `.da-vinci/` directory."
|
|
9
|
+
],
|
|
10
|
+
"warnings": [],
|
|
11
|
+
"notes": [
|
|
12
|
+
"lint-tasks defaults to advisory mode; pass `--strict` to block on findings."
|
|
13
|
+
],
|
|
14
|
+
"timestamp": "2026-03-31T16:22:40.193Z",
|
|
15
|
+
"changeId": "demo"
|
|
16
|
+
}
|