@xenonbyte/da-vinci-workflow 0.2.1 → 0.2.2
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 +17 -0
- package/README.md +21 -10
- package/README.zh-CN.md +21 -10
- package/bin/da-vinci-tui.js +8 -0
- package/docs/dv-command-reference.md +4 -0
- package/docs/prompt-entrypoints.md +2 -0
- package/docs/skill-usage.md +217 -0
- package/docs/workflow-overview.md +1 -0
- package/docs/zh-CN/dv-command-reference.md +4 -0
- package/docs/zh-CN/prompt-entrypoints.md +2 -0
- package/docs/zh-CN/skill-usage.md +217 -0
- package/docs/zh-CN/workflow-overview.md +1 -0
- package/lib/cli.js +23 -0
- package/package.json +4 -2
- package/tui/catalog.js +1190 -0
- package/tui/index.js +727 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.2.2 - 2026-03-31
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- built-in terminal TUI surfaces via `da-vinci tui` and `da-vinci-tui`, with phase-grouped command discovery, bilingual labels, previewable execution, and project/change context controls
|
|
7
|
+
- in-TUI command parameter help so operators can inspect supported flags, placeholders, and required inputs before editing a preview command
|
|
8
|
+
- operator-facing English and Chinese workflow guides covering first-run routing, implementation handoff, pause/resume recovery, and TUI usage
|
|
9
|
+
- TUI regression coverage plus package-content checks for the dedicated TUI bin and shipped `tui/` assets
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- README and Chinese companion docs now document the `0.2.2` TUI/operator release surface explicitly
|
|
13
|
+
- TUI child commands now execute from the active project context selected in the header instead of always inheriting the original launch cwd
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
- `q` and `Ctrl-C` now fully terminate the TUI session instead of clearing the screen while leaving stdin resumed in the foreground
|
|
17
|
+
- preview-command editing now treats unclosed quotes as a recoverable TUI error instead of crashing the process
|
|
18
|
+
- the TUI JSON shortcut now uses `J`, preserving lowercase `j/k` for navigation without unreachable toggle branches
|
|
19
|
+
|
|
3
20
|
## v0.2.1 - 2026-03-31
|
|
4
21
|
|
|
5
22
|
### Added
|
package/README.md
CHANGED
|
@@ -28,18 +28,18 @@ This workflow is intended for:
|
|
|
28
28
|
|
|
29
29
|
Latest published npm package:
|
|
30
30
|
|
|
31
|
-
- `@xenonbyte/da-vinci-workflow@0.2.
|
|
31
|
+
- `@xenonbyte/da-vinci-workflow@0.2.2`
|
|
32
32
|
|
|
33
|
-
Release highlights for `0.2.
|
|
33
|
+
Release highlights for `0.2.2`:
|
|
34
34
|
|
|
35
|
-
- added the
|
|
36
|
-
-
|
|
37
|
-
- added
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
- fixed
|
|
41
|
-
- fixed
|
|
42
|
-
-
|
|
35
|
+
- added the built-in terminal TUI via `da-vinci tui` and `da-vinci-tui`, with phase-grouped command discovery, bilingual labels, command previews, and project/change context management
|
|
36
|
+
- added command-parameter help inside the TUI so operators can inspect supported flags and placeholder requirements without leaving the terminal
|
|
37
|
+
- added operator-facing English and Chinese workflow guides that explain first-run routing, implementation handoff, pause/resume rules, and TUI usage
|
|
38
|
+
- expanded release coverage with TUI-specific regression tests plus package-content checks for the dedicated TUI bin and shipped `tui/` assets
|
|
39
|
+
- fixed TUI exit handling so `q` and `Ctrl-C` actually terminate the interactive session instead of leaving stdin resumed in the foreground
|
|
40
|
+
- fixed preview-command editing so unclosed quotes are handled as a recoverable TUI error instead of crashing the process
|
|
41
|
+
- fixed TUI JSON toggling by moving the shortcut to `J`, preserving `j/k` for navigation only
|
|
42
|
+
- fixed TUI child-command execution so relative paths resolve from the active project context selected in the header
|
|
43
43
|
|
|
44
44
|
## Supported workflow modes
|
|
45
45
|
|
|
@@ -93,6 +93,17 @@ Route discipline:
|
|
|
93
93
|
- contextual checkpoint deltas are auxiliary recovery notes only and must not override routing
|
|
94
94
|
- if contextual deltas conflict with current artifacts, ignore them for routing and record the conflict
|
|
95
95
|
|
|
96
|
+
## TUI Quick Start
|
|
97
|
+
|
|
98
|
+
If the growing CLI surface is the main usability problem, use the built-in terminal UI instead of memorizing commands.
|
|
99
|
+
|
|
100
|
+
- launch with `da-vinci tui` or `da-vinci-tui`
|
|
101
|
+
- use `npx -p @xenonbyte/da-vinci-workflow da-vinci tui` when the package is not installed globally
|
|
102
|
+
- the TUI groups commands by workflow phase, supports English and Chinese descriptions, and lets you launch the selected command after previewing it
|
|
103
|
+
- `p` sets project path context, `c` sets change-id context, `l` toggles language, `m` edits the preview command, and `Enter` runs it
|
|
104
|
+
|
|
105
|
+
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.
|
|
106
|
+
|
|
96
107
|
## Visual Assist Quick Start
|
|
97
108
|
|
|
98
109
|
Use `Visual Assist` when the project wants optional help from local UI-design skills such as `frontend-skill` or `ui-ux-pro-max`.
|
package/README.zh-CN.md
CHANGED
|
@@ -30,18 +30,18 @@ Da Vinci 是一个把产品需求一路推进到结构化规格、Pencil 设计
|
|
|
30
30
|
|
|
31
31
|
最新已发布 npm 包:
|
|
32
32
|
|
|
33
|
-
- `@xenonbyte/da-vinci-workflow@0.2.
|
|
33
|
+
- `@xenonbyte/da-vinci-workflow@0.2.2`
|
|
34
34
|
|
|
35
|
-
`0.2.
|
|
35
|
+
`0.2.2` 版本重点:
|
|
36
36
|
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
- 修复 `
|
|
44
|
-
-
|
|
37
|
+
- 新增内置终端 TUI:可通过 `da-vinci tui` 和 `da-vinci-tui` 启动,按阶段分组浏览命令,支持中英文说明、命令预览以及 project/change 上下文维护
|
|
38
|
+
- 新增 TUI 内的命令参数帮助,可以直接在终端里查看支持的 flag、占位符和必填参数
|
|
39
|
+
- 新增中英文 operator 文档,专门说明第一次如何进入、实现前如何衔接、中途退出后怎么恢复,以及 TUI 怎么配合
|
|
40
|
+
- 回归测试与打包校验现已覆盖 TUI 专项路径,包括独立 bin、`tui/` 目录资产和帮助输出
|
|
41
|
+
- 修复 TUI 退出路径:`q` 和 `Ctrl-C` 现在会真正结束会话,不再把进程留在前台挂住
|
|
42
|
+
- 修复预览命令编辑:未闭合引号现在会显示可恢复错误页,不再直接把 TUI 进程打崩
|
|
43
|
+
- 修复 TUI 的 JSON 切换快捷键冲突:现在使用 `J` 切换 `--json`,`j/k` 只负责移动
|
|
44
|
+
- 修复 TUI 子命令执行目录:相对路径现在会基于当前 header 里选中的项目上下文解析
|
|
45
45
|
|
|
46
46
|
## 支持的工作流模式
|
|
47
47
|
|
|
@@ -98,6 +98,17 @@ Da Vinci 当前支持五种模式:
|
|
|
98
98
|
- Context Delta 只用于恢复上下文,不是阶段判定真相源
|
|
99
99
|
- 如果 Context Delta 与当前工件冲突,应该忽略冲突条目并按工件真相继续
|
|
100
100
|
|
|
101
|
+
## TUI 快速上手
|
|
102
|
+
|
|
103
|
+
如果真正的痛点是 CLI 面太多、不想记命令,就直接用内置终端 TUI。
|
|
104
|
+
|
|
105
|
+
- 用 `da-vinci tui` 或 `da-vinci-tui` 启动
|
|
106
|
+
- 没有全局安装时,用 `npx -p @xenonbyte/da-vinci-workflow da-vinci tui`
|
|
107
|
+
- TUI 会按工作流阶段对命令分组,支持中英文说明,并在执行前先给出命令预览
|
|
108
|
+
- `p` 设置项目路径上下文,`c` 设置 change-id 上下文,`l` 切换语言,`m` 编辑预览命令,`Enter` 执行
|
|
109
|
+
|
|
110
|
+
如果你想看“人到底怎么用这个 skill、暂停后怎么续跑、TUI 怎么配合”的完整说明,直接看 [docs/zh-CN/skill-usage.md](/Users/xubo/x-skills/da-vinci/docs/zh-CN/skill-usage.md)。
|
|
111
|
+
|
|
101
112
|
## Visual Assist 快速上手
|
|
102
113
|
|
|
103
114
|
当项目想借助本地 UI 设计 skill,例如 `frontend-skill` 或 `ui-ux-pro-max`,来提升设计质量时,就配置 `Visual Assist`。
|
|
@@ -37,6 +37,10 @@ These helpers exist to select or resume the correct route. They are not substitu
|
|
|
37
37
|
|
|
38
38
|
These commands do not replace route selection, but they support design execution quality:
|
|
39
39
|
|
|
40
|
+
- `da-vinci tui [--project <path>] [--change <id>] [--lang en|zh]`
|
|
41
|
+
- opens a workflow-oriented terminal UI that groups commands by phase and lets you run them after previewing the generated CLI
|
|
42
|
+
- use `da-vinci-tui` as the dedicated bin alias, or `npx -p @xenonbyte/da-vinci-workflow da-vinci tui` without a global install
|
|
43
|
+
- useful when the command surface is harder to remember than the workflow itself
|
|
40
44
|
- `da-vinci workflow-status --project <path> [--change <id>] [--json]`
|
|
41
45
|
- derives the current workflow stage from artifact and checkpoint truth
|
|
42
46
|
- reports blockers, warnings, handoff-gate state, and one primary route recommendation
|
|
@@ -85,6 +85,8 @@ Use this default sequence:
|
|
|
85
85
|
|
|
86
86
|
Do not default this sequence to `build`.
|
|
87
87
|
|
|
88
|
+
If command recall becomes the main friction, launch `da-vinci tui` and use the grouped workflow surfaces from the terminal UI instead of memorizing each CLI surface manually.
|
|
89
|
+
|
|
88
90
|
`build` is still valid, but it is an expert route for workflows that are already implementation-ready.
|
|
89
91
|
|
|
90
92
|
State rule:
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
# Skill Usage Guide
|
|
2
|
+
|
|
3
|
+
Use this document when you want the operator-facing workflow rather than the lower-level command reference.
|
|
4
|
+
|
|
5
|
+
This guide focuses on:
|
|
6
|
+
|
|
7
|
+
- how to enter the Da Vinci workflow the first time
|
|
8
|
+
- how to move between requirement, design, task, and implementation phases
|
|
9
|
+
- how to resume safely after pausing midway
|
|
10
|
+
- how to use the TUI instead of memorizing many CLI surfaces
|
|
11
|
+
|
|
12
|
+
## Core Rule
|
|
13
|
+
|
|
14
|
+
Da Vinci should be resumed from artifact truth, not from chat memory.
|
|
15
|
+
|
|
16
|
+
That means:
|
|
17
|
+
|
|
18
|
+
- `spec.md` and related requirement artifacts stay the behavior truth
|
|
19
|
+
- the project-local `.pen` stays the design truth
|
|
20
|
+
- `tasks.md`, `verification.md`, and execution signals explain what has or has not been implemented yet
|
|
21
|
+
|
|
22
|
+
## First Entry
|
|
23
|
+
|
|
24
|
+
Use these entry helpers:
|
|
25
|
+
|
|
26
|
+
- `intake`
|
|
27
|
+
- choose this when the project is complex, the mode is unclear, or there are multiple truth sources
|
|
28
|
+
- `prompt`
|
|
29
|
+
- choose this when the mode is already known and you only need a good executable starting prompt
|
|
30
|
+
- `continue`
|
|
31
|
+
- choose this when `DA-VINCI.md` or `.da-vinci/` artifacts already exist and you are resuming work
|
|
32
|
+
|
|
33
|
+
For Codex, the usual first requests are:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
$da-vinci use intake for <project situation>
|
|
37
|
+
$da-vinci use prompt for <known scenario>
|
|
38
|
+
$da-vinci use continue for <existing workflow state>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Default recommendation:
|
|
42
|
+
|
|
43
|
+
1. use `intake` on the first pass through a non-trivial project
|
|
44
|
+
2. execute the generated main workflow prompt
|
|
45
|
+
3. when work pauses, come back through `continue`
|
|
46
|
+
|
|
47
|
+
Do not default directly to `build` unless the project is already implementation-ready.
|
|
48
|
+
|
|
49
|
+
## Real Workflow
|
|
50
|
+
|
|
51
|
+
The normal delivery flow is:
|
|
52
|
+
|
|
53
|
+
1. choose the mode
|
|
54
|
+
2. create or stabilize discovery and scope artifacts
|
|
55
|
+
3. register the preferred project-local `.pen` source
|
|
56
|
+
4. design 1 to 3 anchor surfaces first
|
|
57
|
+
5. reconcile the live Pencil session with the registered `.pen`
|
|
58
|
+
6. write `pencil-bindings.md`
|
|
59
|
+
7. generate or refine `tasks.md`
|
|
60
|
+
8. implement
|
|
61
|
+
9. verify
|
|
62
|
+
|
|
63
|
+
The artifact spine usually looks like this:
|
|
64
|
+
|
|
65
|
+
- `DA-VINCI.md`
|
|
66
|
+
- `.da-vinci/design-registry.md`
|
|
67
|
+
- `.da-vinci/page-map.md`
|
|
68
|
+
- `.da-vinci/changes/<change-id>/proposal.md`
|
|
69
|
+
- `.da-vinci/changes/<change-id>/specs/*/spec.md`
|
|
70
|
+
- `.da-vinci/changes/<change-id>/design.md`
|
|
71
|
+
- `.da-vinci/changes/<change-id>/pencil-design.md`
|
|
72
|
+
- `.da-vinci/changes/<change-id>/pencil-bindings.md`
|
|
73
|
+
- `.da-vinci/changes/<change-id>/tasks.md`
|
|
74
|
+
- `.da-vinci/changes/<change-id>/verification.md`
|
|
75
|
+
|
|
76
|
+
## Before Implementation
|
|
77
|
+
|
|
78
|
+
When design is mostly ready and implementation is next, use these checks:
|
|
79
|
+
|
|
80
|
+
- `da-vinci workflow-status`
|
|
81
|
+
- confirm the active stage and blockers first
|
|
82
|
+
- `da-vinci next-step`
|
|
83
|
+
- confirm whether the next move should still be `design`, `tasks`, or `build`
|
|
84
|
+
- `da-vinci lint-spec`
|
|
85
|
+
- use this when runtime spec quality is still uncertain
|
|
86
|
+
- `da-vinci scope-check`
|
|
87
|
+
- use this when page/state propagation across planning artifacts looks ambiguous
|
|
88
|
+
|
|
89
|
+
If you are already inside the project root directory, `--project` is optional because the CLI falls back to `cwd`.
|
|
90
|
+
|
|
91
|
+
Examples:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
da-vinci workflow-status
|
|
95
|
+
da-vinci next-step
|
|
96
|
+
da-vinci lint-spec
|
|
97
|
+
da-vinci scope-check
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## After Pausing Midway
|
|
101
|
+
|
|
102
|
+
The safest resume order is:
|
|
103
|
+
|
|
104
|
+
1. `da-vinci workflow-status [--change <id>] --json`
|
|
105
|
+
2. `da-vinci next-step [--change <id>]`
|
|
106
|
+
3. if spec quality is unclear, run `da-vinci lint-spec`
|
|
107
|
+
4. if planning propagation is unclear, run `da-vinci scope-check`
|
|
108
|
+
5. if planning artifacts changed since the last stable snapshot, run `da-vinci generate-sidecars` and `da-vinci diff-spec`
|
|
109
|
+
6. before terminal completion, run `da-vinci verify-bindings` and `da-vinci verify-coverage`
|
|
110
|
+
|
|
111
|
+
Resume should follow the artifacts, not old conversation state:
|
|
112
|
+
|
|
113
|
+
- if design artifacts exist but `tasks.md` does not, resume into `tasks`
|
|
114
|
+
- if `tasks.md` exists but design gates are still unresolved, resume into design cleanup rather than `build`
|
|
115
|
+
- only resume into `build` when implementation readiness is already clear
|
|
116
|
+
|
|
117
|
+
## How `change-id` Works
|
|
118
|
+
|
|
119
|
+
`change-id` is the directory name under `.da-vinci/changes/<change-id>/`.
|
|
120
|
+
|
|
121
|
+
Practical rules:
|
|
122
|
+
|
|
123
|
+
- if the project only has one non-empty change directory, most workflow commands can infer it automatically
|
|
124
|
+
- if the project has multiple non-empty change directories, pass `--change <id>` explicitly
|
|
125
|
+
- keep one active change per branch when possible to reduce routing friction
|
|
126
|
+
|
|
127
|
+
Use `da-vinci workflow-status` when you forget which change is active. In multi-change cases it reports the available ids and the latest inferred one for context.
|
|
128
|
+
|
|
129
|
+
## TUI Quick Start
|
|
130
|
+
|
|
131
|
+
If remembering many command surfaces is the main friction, use the terminal UI instead of typing commands from memory.
|
|
132
|
+
|
|
133
|
+
Launch it with either:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
da-vinci tui
|
|
137
|
+
da-vinci-tui
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Or through `npx` without installing globally:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
npx -p @xenonbyte/da-vinci-workflow da-vinci tui
|
|
144
|
+
npx -p @xenonbyte/da-vinci-workflow da-vinci-tui
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
The TUI provides:
|
|
148
|
+
|
|
149
|
+
- command grouping by workflow phase
|
|
150
|
+
- English and Chinese UI descriptions
|
|
151
|
+
- current project path and change-id context at the top
|
|
152
|
+
- preview commands before execution
|
|
153
|
+
- one-key toggles for `--strict`, `--json`, and `--continue-on-error`
|
|
154
|
+
- placeholder-aware editing for commands that still need specific paths like `<pen-path>`
|
|
155
|
+
|
|
156
|
+
### TUI Phase Map
|
|
157
|
+
|
|
158
|
+
```mermaid
|
|
159
|
+
flowchart TD
|
|
160
|
+
A[Launch da-vinci tui] --> B[Set project path and change-id context]
|
|
161
|
+
B --> C[Routing & Resume<br/>workflow-status / next-step]
|
|
162
|
+
C --> D{Which phase is active?}
|
|
163
|
+
|
|
164
|
+
D --> E[Planning & Drift<br/>lint-spec / scope-check / lint-tasks / lint-bindings / generate-sidecars / diff-spec / scaffold]
|
|
165
|
+
D --> F[Visual & Review<br/>icon-sync / icon-search / supervisor-review]
|
|
166
|
+
D --> G[Pen Files & Sync<br/>preflight-pencil / ensure-pen / write-pen / check-pen-sync / check-pen-baseline / sync-pen-source / snapshot-pen]
|
|
167
|
+
D --> H[Pencil Session<br/>pencil-lock * / pencil-session begin|persist|end|status]
|
|
168
|
+
D --> I[Verification & Completion<br/>verify-bindings / verify-implementation / verify-structure / verify-coverage / audit]
|
|
169
|
+
D --> J[Setup & Tooling<br/>install / uninstall / status / validate-assets / bootstrap-project]
|
|
170
|
+
|
|
171
|
+
E --> I
|
|
172
|
+
F --> G
|
|
173
|
+
G --> H
|
|
174
|
+
H --> E
|
|
175
|
+
I --> K{Ready to finish?}
|
|
176
|
+
K -->|No| C
|
|
177
|
+
K -->|Yes| L[Completion audit and terminal claim]
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Use this as the quick mental model:
|
|
181
|
+
|
|
182
|
+
- start from `Routing & Resume`
|
|
183
|
+
- move into the phase that matches the current blockers
|
|
184
|
+
- return to `Routing & Resume` whenever the workflow pauses or artifacts changed materially
|
|
185
|
+
- only finish after the verification lane and completion audit are both clear
|
|
186
|
+
|
|
187
|
+
Main keys:
|
|
188
|
+
|
|
189
|
+
- `Up/Down` or `j/k`: move selection
|
|
190
|
+
- `Enter` or `r`: run the selected command
|
|
191
|
+
- `h`: inspect parameters for the selected command
|
|
192
|
+
- `m`: edit the preview command first
|
|
193
|
+
- `p`: change project path context
|
|
194
|
+
- `c`: change or clear change-id context
|
|
195
|
+
- `l`: toggle English / Chinese
|
|
196
|
+
- `s`: toggle `--strict`
|
|
197
|
+
- `J`: toggle `--json`
|
|
198
|
+
- `e`: toggle `--continue-on-error`
|
|
199
|
+
- `?`: open help
|
|
200
|
+
- `q`: quit
|
|
201
|
+
|
|
202
|
+
Recommended TUI usage:
|
|
203
|
+
|
|
204
|
+
1. launch the TUI from the project root
|
|
205
|
+
2. set or confirm project path and change-id in the header
|
|
206
|
+
3. start with `workflow-status`
|
|
207
|
+
4. run `next-step`
|
|
208
|
+
5. move into `lint-spec` / `scope-check` / `tasks` / `verify-*` as needed
|
|
209
|
+
6. for specialized Pencil commands, press `m` and fill the remaining placeholders before execution
|
|
210
|
+
|
|
211
|
+
## Practical Shortcuts
|
|
212
|
+
|
|
213
|
+
- inside the project root, you usually do not need `--project`
|
|
214
|
+
- with one active change, you often do not need `--change`
|
|
215
|
+
- use `workflow-status` and `next-step` as the standard re-entry pair after any pause
|
|
216
|
+
- use the TUI when command recall is the main problem
|
|
217
|
+
- use direct CLI commands when you already know the exact surface and want faster scripting
|
|
@@ -14,6 +14,7 @@ Use [pencil-rendering-workflow.md](/Users/xubo/x-skills/da-vinci/docs/pencil-ren
|
|
|
14
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
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
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.
|
|
17
18
|
|
|
18
19
|
## Core Contract
|
|
19
20
|
|
|
@@ -39,6 +39,10 @@ Da Vinci 期望它们遵循工作流状态。
|
|
|
39
39
|
|
|
40
40
|
这些命令不会替代 `dv:` 选路,但能显著提升设计执行质量:
|
|
41
41
|
|
|
42
|
+
- `da-vinci tui [--project <path>] [--change <id>] [--lang en|zh]`
|
|
43
|
+
- 打开面向工作流的终端 UI,按阶段组织命令,并在执行前先展示生成出的 CLI 预览
|
|
44
|
+
- 也可以用独立 bin `da-vinci-tui`,或在没全局安装时用 `npx -p @xenonbyte/da-vinci-workflow da-vinci tui`
|
|
45
|
+
- 当真正难记的是命令面而不是流程本身时,优先用它
|
|
42
46
|
- `da-vinci workflow-status --project <path> [--change <id>] [--json]`
|
|
43
47
|
- 从工件和 checkpoint 真相推导当前 workflow 阶段
|
|
44
48
|
- 报告 blocker、warning、handoff gate 状态,以及主推荐路由
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
# Skill 使用说明
|
|
2
|
+
|
|
3
|
+
这份文档面向真正操作 Da Vinci 的人,而不是底层命令参考。
|
|
4
|
+
|
|
5
|
+
重点讲四件事:
|
|
6
|
+
|
|
7
|
+
- 第一次怎么进入 Da Vinci 工作流
|
|
8
|
+
- 需求、设计、任务、实现几段之间怎么衔接
|
|
9
|
+
- 中途退出后下次怎么安全恢复
|
|
10
|
+
- 如果不想记太多命令,怎么用 TUI
|
|
11
|
+
|
|
12
|
+
## 核心规则
|
|
13
|
+
|
|
14
|
+
Da Vinci 应该根据工件真相恢复,而不是根据聊天记忆恢复。
|
|
15
|
+
|
|
16
|
+
也就是说:
|
|
17
|
+
|
|
18
|
+
- `spec.md` 以及相关需求工件是行为真相
|
|
19
|
+
- 项目内 `.pen` 是设计真相
|
|
20
|
+
- `tasks.md`、`verification.md` 和 execution signals 负责说明哪些东西已经实现、哪些还没实现
|
|
21
|
+
|
|
22
|
+
## 第一次进入时怎么选入口
|
|
23
|
+
|
|
24
|
+
这三个入口各有分工:
|
|
25
|
+
|
|
26
|
+
- `intake`
|
|
27
|
+
- 适合项目复杂、mode 不明确、或有多个真相源的情况
|
|
28
|
+
- `prompt`
|
|
29
|
+
- 适合 mode 已明确,只需要一条高质量起始提示词的情况
|
|
30
|
+
- `continue`
|
|
31
|
+
- 适合仓库里已经有 `DA-VINCI.md` 或 `.da-vinci/`,需要恢复推进的情况
|
|
32
|
+
|
|
33
|
+
对 Codex,最常见的起手式是:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
$da-vinci use intake for <project situation>
|
|
37
|
+
$da-vinci use prompt for <known scenario>
|
|
38
|
+
$da-vinci use continue for <existing workflow state>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
默认建议:
|
|
42
|
+
|
|
43
|
+
1. 第一次进入复杂项目时先用 `intake`
|
|
44
|
+
2. 执行生成出来的主工作流提示词
|
|
45
|
+
3. 如果中途停下,下次回来用 `continue`
|
|
46
|
+
|
|
47
|
+
除非项目已经明显 implementation-ready,否则不要默认直接跳到 `build`。
|
|
48
|
+
|
|
49
|
+
## 实际流程怎么走
|
|
50
|
+
|
|
51
|
+
正常交付顺序通常是:
|
|
52
|
+
|
|
53
|
+
1. 选择 mode
|
|
54
|
+
2. 补 discovery 和 scope 工件
|
|
55
|
+
3. 登记首选项目内 `.pen`
|
|
56
|
+
4. 先做 1 到 3 个 anchor surfaces
|
|
57
|
+
5. 让 live Pencil 会话和登记 `.pen` 收敛
|
|
58
|
+
6. 写 `pencil-bindings.md`
|
|
59
|
+
7. 生成或整理 `tasks.md`
|
|
60
|
+
8. 实现
|
|
61
|
+
9. 验证
|
|
62
|
+
|
|
63
|
+
常见工件骨架一般是:
|
|
64
|
+
|
|
65
|
+
- `DA-VINCI.md`
|
|
66
|
+
- `.da-vinci/design-registry.md`
|
|
67
|
+
- `.da-vinci/page-map.md`
|
|
68
|
+
- `.da-vinci/changes/<change-id>/proposal.md`
|
|
69
|
+
- `.da-vinci/changes/<change-id>/specs/*/spec.md`
|
|
70
|
+
- `.da-vinci/changes/<change-id>/design.md`
|
|
71
|
+
- `.da-vinci/changes/<change-id>/pencil-design.md`
|
|
72
|
+
- `.da-vinci/changes/<change-id>/pencil-bindings.md`
|
|
73
|
+
- `.da-vinci/changes/<change-id>/tasks.md`
|
|
74
|
+
- `.da-vinci/changes/<change-id>/verification.md`
|
|
75
|
+
|
|
76
|
+
## 进入实现前怎么衔接
|
|
77
|
+
|
|
78
|
+
当设计大体完成,接下来准备实现时,建议按这个顺序看:
|
|
79
|
+
|
|
80
|
+
- `da-vinci workflow-status`
|
|
81
|
+
- 先确认当前阶段和 blocker
|
|
82
|
+
- `da-vinci next-step`
|
|
83
|
+
- 再确认下一步到底应该是 `design`、`tasks` 还是 `build`
|
|
84
|
+
- `da-vinci lint-spec`
|
|
85
|
+
- 当运行时 spec 质量还不够确定时使用
|
|
86
|
+
- `da-vinci scope-check`
|
|
87
|
+
- 当规划工件之间页面/状态传播关系还不清楚时使用
|
|
88
|
+
|
|
89
|
+
如果你已经在项目根目录里,`--project` 通常可以省略,因为 CLI 默认会回退到当前目录。
|
|
90
|
+
|
|
91
|
+
例如:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
da-vinci workflow-status
|
|
95
|
+
da-vinci next-step
|
|
96
|
+
da-vinci lint-spec
|
|
97
|
+
da-vinci scope-check
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## 中途退出后,下次怎么恢复
|
|
101
|
+
|
|
102
|
+
最稳妥的恢复顺序是:
|
|
103
|
+
|
|
104
|
+
1. `da-vinci workflow-status [--change <id>] --json`
|
|
105
|
+
2. `da-vinci next-step [--change <id>]`
|
|
106
|
+
3. 如果 spec 质量不确定,跑 `da-vinci lint-spec`
|
|
107
|
+
4. 如果规划传播关系不确定,跑 `da-vinci scope-check`
|
|
108
|
+
5. 如果 planning 工件相对上次稳定状态有变化,跑 `da-vinci generate-sidecars` 和 `da-vinci diff-spec`
|
|
109
|
+
6. 在终态前,跑 `da-vinci verify-bindings` 和 `da-vinci verify-coverage`
|
|
110
|
+
|
|
111
|
+
恢复时应该遵循工件,而不是旧聊天上下文:
|
|
112
|
+
|
|
113
|
+
- 如果设计工件已经有了,但 `tasks.md` 还没有,下一步应该回到 `tasks`
|
|
114
|
+
- 如果 `tasks.md` 已存在,但设计 gate 还没过,不要直接进 `build`
|
|
115
|
+
- 只有实现就绪度已经明确时,才把 `build` 当主恢复路径
|
|
116
|
+
|
|
117
|
+
## `change-id` 到底是什么
|
|
118
|
+
|
|
119
|
+
`change-id` 就是 `.da-vinci/changes/<change-id>/` 这个目录名。
|
|
120
|
+
|
|
121
|
+
实际使用规则:
|
|
122
|
+
|
|
123
|
+
- 如果项目里只有一个非空 change 目录,多数工作流命令都能自动推断
|
|
124
|
+
- 如果项目里有多个非空 change 目录,就显式传 `--change <id>`
|
|
125
|
+
- 尽量一条分支只维护一个 active change,这样续跑成本最低
|
|
126
|
+
|
|
127
|
+
如果你忘了当前活跃 change 是哪个,先跑 `da-vinci workflow-status`。在多 change 场景下,它会告诉你可用的 ids,还会给一个“仅供参考”的最新推断值。
|
|
128
|
+
|
|
129
|
+
## TUI 快速上手
|
|
130
|
+
|
|
131
|
+
如果真正的痛点是不想记那么多命令面,就直接用终端 TUI。
|
|
132
|
+
|
|
133
|
+
启动方式:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
da-vinci tui
|
|
137
|
+
da-vinci-tui
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
如果没有全局安装,也可以直接用 `npx`:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
npx -p @xenonbyte/da-vinci-workflow da-vinci tui
|
|
144
|
+
npx -p @xenonbyte/da-vinci-workflow da-vinci-tui
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
TUI 提供这些能力:
|
|
148
|
+
|
|
149
|
+
- 按工作流阶段对命令分组
|
|
150
|
+
- 中英文双语界面说明
|
|
151
|
+
- 顶部显示当前项目路径和 change-id 上下文
|
|
152
|
+
- 执行前可先看命令预览
|
|
153
|
+
- 一键切换 `--strict`、`--json`、`--continue-on-error`
|
|
154
|
+
- 对 `<pen-path>` 这类还没补具体路径的命令,支持先编辑预览再执行
|
|
155
|
+
|
|
156
|
+
### TUI 阶段图
|
|
157
|
+
|
|
158
|
+
```mermaid
|
|
159
|
+
flowchart TD
|
|
160
|
+
A[启动 da-vinci tui] --> B[设置 project path 和 change-id 上下文]
|
|
161
|
+
B --> C[选路与续跑<br/>workflow-status / next-step]
|
|
162
|
+
C --> D{当前处于哪个阶段?}
|
|
163
|
+
|
|
164
|
+
D --> E[规划与漂移检查<br/>lint-spec / scope-check / lint-tasks / lint-bindings / generate-sidecars / diff-spec / scaffold]
|
|
165
|
+
D --> F[视觉与审查<br/>icon-sync / icon-search / supervisor-review]
|
|
166
|
+
D --> G[Pen 文件与同步<br/>preflight-pencil / ensure-pen / write-pen / check-pen-sync / check-pen-baseline / sync-pen-source / snapshot-pen]
|
|
167
|
+
D --> H[Pencil 会话<br/>pencil-lock * / pencil-session begin|persist|end|status]
|
|
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
|
+
```
|
|
179
|
+
|
|
180
|
+
你可以把它理解成这四条最实用的规则:
|
|
181
|
+
|
|
182
|
+
- 先从“选路与续跑”开始
|
|
183
|
+
- 再进入当前 blocker 所在的阶段
|
|
184
|
+
- 只要中途暂停,或者工件发生了实质变化,就回到“选路与续跑”
|
|
185
|
+
- 只有验证链和 completion audit 都通过了,才进入终态
|
|
186
|
+
|
|
187
|
+
主要按键:
|
|
188
|
+
|
|
189
|
+
- `Up/Down` 或 `j/k`:移动选中项
|
|
190
|
+
- `Enter` 或 `r`:执行当前命令
|
|
191
|
+
- `h`:查看当前命令参数
|
|
192
|
+
- `m`:先编辑预览命令
|
|
193
|
+
- `p`:修改项目路径上下文
|
|
194
|
+
- `c`:修改或清空 change-id 上下文
|
|
195
|
+
- `l`:切换中英文
|
|
196
|
+
- `s`:切换 `--strict`
|
|
197
|
+
- `J`:切换 `--json`
|
|
198
|
+
- `e`:切换 `--continue-on-error`
|
|
199
|
+
- `?`:打开帮助
|
|
200
|
+
- `q`:退出
|
|
201
|
+
|
|
202
|
+
推荐的 TUI 使用顺序:
|
|
203
|
+
|
|
204
|
+
1. 在项目根目录启动 TUI
|
|
205
|
+
2. 先确认顶部的 project path 和 change-id
|
|
206
|
+
3. 先跑 `workflow-status`
|
|
207
|
+
4. 再跑 `next-step`
|
|
208
|
+
5. 根据情况进入 `lint-spec`、`scope-check`、`tasks`、`verify-*`
|
|
209
|
+
6. 如果是 Pencil 相关特殊命令,按 `m` 先把剩余占位符补全后再执行
|
|
210
|
+
|
|
211
|
+
## 实用简化规则
|
|
212
|
+
|
|
213
|
+
- 在项目根目录里,通常不需要写 `--project`
|
|
214
|
+
- 只有一个 active change 时,通常也不需要写 `--change`
|
|
215
|
+
- 每次暂停回来,默认先跑 `workflow-status` 和 `next-step`
|
|
216
|
+
- 觉得命令太散时,用 TUI
|
|
217
|
+
- 已经很清楚要跑哪条命令、而且在写脚本时,直接用 CLI 更快
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
如果你想看逐个 `dv:` 命令的职责、下一步推荐和 `verify` 回退规则,请看 [dv-command-reference.md](/Users/xubo/x-skills/da-vinci/docs/zh-CN/dv-command-reference.md)。
|
|
17
17
|
如果你想看约束文件总览(哪些字段是硬门禁、哪些是指导项),请看 [constraint-files.md](/Users/xubo/x-skills/da-vinci/docs/zh-CN/constraint-files.md)。
|
|
18
18
|
如果你想看 sidecar、enforcement、persisted-state 回退和 scaffold 约束,请看 [execution-chain-migration.md](/Users/xubo/x-skills/da-vinci/docs/zh-CN/execution-chain-migration.md)。
|
|
19
|
+
如果你想看更偏操作手册的说明,比如第一次怎么进、暂停后怎么续跑、TUI 怎么用,请看 [skill-usage.md](/Users/xubo/x-skills/da-vinci/docs/zh-CN/skill-usage.md)。
|
|
19
20
|
|
|
20
21
|
## 核心契约
|
|
21
22
|
|