@xenonbyte/da-vinci-workflow 0.1.6 → 0.1.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 +11 -0
- package/README.md +5 -14
- package/README.zh-CN.md +5 -13
- package/lib/install.js +1 -4
- package/package.json +2 -6
- package/CHANGELOG.zh-CN.md +0 -44
- package/SKILL.zh-CN.md +0 -339
- package/docs/zh-CN/commands/claude/da-vinci.md +0 -27
- package/docs/zh-CN/commands/claude/dv/breakdown.md +0 -21
- package/docs/zh-CN/commands/claude/dv/build.md +0 -17
- package/docs/zh-CN/commands/claude/dv/continue.md +0 -24
- package/docs/zh-CN/commands/claude/dv/design.md +0 -20
- package/docs/zh-CN/commands/claude/dv/intake.md +0 -26
- package/docs/zh-CN/commands/claude/dv/prompt.md +0 -24
- package/docs/zh-CN/commands/claude/dv/tasks.md +0 -19
- package/docs/zh-CN/commands/claude/dv/verify.md +0 -16
- package/docs/zh-CN/commands/codex/prompts/da-vinci.md +0 -29
- package/docs/zh-CN/commands/codex/prompts/dv-breakdown.md +0 -19
- package/docs/zh-CN/commands/codex/prompts/dv-build.md +0 -13
- package/docs/zh-CN/commands/codex/prompts/dv-continue.md +0 -24
- package/docs/zh-CN/commands/codex/prompts/dv-design.md +0 -14
- package/docs/zh-CN/commands/codex/prompts/dv-intake.md +0 -27
- package/docs/zh-CN/commands/codex/prompts/dv-prompt.md +0 -24
- package/docs/zh-CN/commands/codex/prompts/dv-tasks.md +0 -16
- package/docs/zh-CN/commands/codex/prompts/dv-verify.md +0 -15
- package/examples/greenfield-spec-markupflow/DA-VINCI.zh-CN.md +0 -49
- package/examples/greenfield-spec-markupflow/README.zh-CN.md +0 -44
- package/examples/greenfield-spec-markupflow/design-brief.zh-CN.md +0 -24
- package/examples/greenfield-spec-markupflow/design-registry.zh-CN.md +0 -15
- package/examples/greenfield-spec-markupflow/design.zh-CN.md +0 -32
- package/examples/greenfield-spec-markupflow/page-map.zh-CN.md +0 -19
- package/examples/greenfield-spec-markupflow/pencil-bindings.zh-CN.md +0 -13
- package/examples/greenfield-spec-markupflow/pencil-design.zh-CN.md +0 -29
- package/examples/greenfield-spec-markupflow/proposal.zh-CN.md +0 -33
- package/examples/greenfield-spec-markupflow/specs/marketing-site/spec.zh-CN.md +0 -37
- package/examples/greenfield-spec-markupflow/tasks.zh-CN.md +0 -30
- package/examples/greenfield-spec-markupflow/verification.zh-CN.md +0 -38
- package/openspec/changes/da-vinci-v2-1-workflow/README.md +0 -9
- package/openspec/changes/da-vinci-v2-1-workflow/README.zh-CN.md +0 -9
- package/openspec/changes/da-vinci-v2-1-workflow/design.md +0 -122
- package/openspec/changes/da-vinci-v2-1-workflow/design.zh-CN.md +0 -122
- package/openspec/changes/da-vinci-v2-1-workflow/proposal.md +0 -37
- package/openspec/changes/da-vinci-v2-1-workflow/proposal.zh-CN.md +0 -37
- package/openspec/changes/da-vinci-v2-1-workflow/specs/workflow/spec.md +0 -50
- package/openspec/changes/da-vinci-v2-1-workflow/specs/workflow/spec.zh-CN.md +0 -50
- package/openspec/changes/da-vinci-v2-1-workflow/tasks.md +0 -31
- package/openspec/changes/da-vinci-v2-1-workflow/tasks.zh-CN.md +0 -31
- package/openspec/config.yaml +0 -11
- package/references/zh-CN/artifact-templates.md +0 -163
- package/references/zh-CN/checkpoints.md +0 -123
- package/references/zh-CN/design-inputs.md +0 -66
- package/references/zh-CN/modes.md +0 -69
- package/references/zh-CN/page-mapping.md +0 -43
- package/references/zh-CN/pencil-design-to-code.md +0 -65
- package/references/zh-CN/platform-adapters.md +0 -73
- package/references/zh-CN/prompt-recipes.md +0 -161
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
- No unreleased changes yet.
|
|
6
6
|
|
|
7
|
+
## v0.1.7 - 2026-03-27
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
- Chinese companion docs are now intentionally limited to `README.zh-CN.md` and `docs/zh-CN/`
|
|
11
|
+
- `.npmrc` and `openspec/` are now local-only and no longer tracked or shipped in the npm package
|
|
12
|
+
- asset validation now checks only shipped repository assets
|
|
13
|
+
|
|
14
|
+
### Removed
|
|
15
|
+
- Chinese mirror docs for commands, references, examples, and changelog
|
|
16
|
+
- OpenSpec planning artifacts from version control and npm packaging
|
|
17
|
+
|
|
7
18
|
## v0.1.6 - 2026-03-27
|
|
8
19
|
|
|
9
20
|
### Added
|
package/README.md
CHANGED
|
@@ -27,15 +27,16 @@ This workflow is intended for:
|
|
|
27
27
|
|
|
28
28
|
Latest published npm package:
|
|
29
29
|
|
|
30
|
-
- `@xenonbyte/da-vinci-workflow@0.1.
|
|
30
|
+
- `@xenonbyte/da-vinci-workflow@0.1.7`
|
|
31
31
|
|
|
32
32
|
Release highlights:
|
|
33
33
|
|
|
34
34
|
- prompt-entry helper routes for `intake`, `prompt`, and `continue` are now published across Codex, Claude, and Gemini
|
|
35
|
-
-
|
|
36
|
-
- asset validation now covers the full
|
|
35
|
+
- Chinese companion docs are now intentionally limited to `README.zh-CN.md` and `docs/zh-CN/`
|
|
36
|
+
- asset validation now covers the full shipped documentation set
|
|
37
37
|
- `da-vinci status` now validates full installed asset sets across Codex, Claude, and Gemini
|
|
38
38
|
- Claude and Gemini command adapters now use self-contained workflow wording after installation
|
|
39
|
+
- `.npmrc` and `openspec/` are kept local-only and are no longer versioned or shipped in the npm package
|
|
39
40
|
- Node-first install, uninstall, status, and asset validation commands remain the supported distribution path
|
|
40
41
|
- repo-local forward-test example for a `greenfield-spec` workflow remains included
|
|
41
42
|
|
|
@@ -403,20 +404,13 @@ See:
|
|
|
403
404
|
Chinese companion documents are included in this repository:
|
|
404
405
|
|
|
405
406
|
- `README.zh-CN.md`
|
|
406
|
-
- `SKILL.zh-CN.md`
|
|
407
|
-
- `CHANGELOG.zh-CN.md`
|
|
408
407
|
- `docs/zh-CN/`
|
|
409
|
-
- `docs/zh-CN/commands/`
|
|
410
|
-
- `references/zh-CN/`
|
|
411
|
-
- `examples/greenfield-spec-markupflow/*.zh-CN.md`
|
|
412
|
-
- `openspec/changes/da-vinci-v2-1-workflow/*.zh-CN.md`
|
|
413
408
|
|
|
414
409
|
## Repository layout
|
|
415
410
|
|
|
416
411
|
```text
|
|
417
412
|
da-vinci/
|
|
418
413
|
├── SKILL.md
|
|
419
|
-
├── SKILL.zh-CN.md
|
|
420
414
|
├── README.zh-CN.md
|
|
421
415
|
├── agents/
|
|
422
416
|
│ └── openai.yaml
|
|
@@ -426,9 +420,7 @@ da-vinci/
|
|
|
426
420
|
│ └── gemini/
|
|
427
421
|
├── docs/
|
|
428
422
|
│ └── zh-CN/
|
|
429
|
-
|
|
430
|
-
│ └── zh-CN/
|
|
431
|
-
└── openspec/
|
|
423
|
+
└── references/
|
|
432
424
|
```
|
|
433
425
|
|
|
434
426
|
## Current status
|
|
@@ -438,7 +430,6 @@ The repository currently contains:
|
|
|
438
430
|
- the Da Vinci skill
|
|
439
431
|
- three-platform command adapters
|
|
440
432
|
- workflow references
|
|
441
|
-
- OpenSpec planning artifacts for the skill itself
|
|
442
433
|
- workflow examples
|
|
443
434
|
|
|
444
435
|
Next natural work for the repository:
|
package/README.zh-CN.md
CHANGED
|
@@ -29,15 +29,16 @@ Da Vinci 是一个把产品需求一路推进到结构化规格、Pencil 设计
|
|
|
29
29
|
|
|
30
30
|
最新已发布 npm 包:
|
|
31
31
|
|
|
32
|
-
- `@xenonbyte/da-vinci-workflow@0.1.
|
|
32
|
+
- `@xenonbyte/da-vinci-workflow@0.1.7`
|
|
33
33
|
|
|
34
34
|
已发布版本重点:
|
|
35
35
|
|
|
36
36
|
- `intake`、`prompt`、`continue` 三个提示词入口辅助路由已随 Codex、Claude、Gemini 一起发布
|
|
37
|
-
-
|
|
38
|
-
-
|
|
37
|
+
- 中文配套文档现在刻意只保留 `README.zh-CN.md` 和 `docs/zh-CN/`
|
|
38
|
+
- 资产校验现在覆盖完整的随包文档集合
|
|
39
39
|
- `da-vinci status` 会校验 Codex、Claude、Gemini 的完整安装资产
|
|
40
40
|
- Claude 和 Gemini 安装后的命令文案已改为自洽的工作流措辞
|
|
41
|
+
- `.npmrc` 和 `openspec/` 现在只本地保留,不再进入版本管理和 npm 包
|
|
41
42
|
- 安装、卸载、状态、资产校验都通过 Node CLI 提供
|
|
42
43
|
- 仓库内含一个 `greenfield-spec` 的本地 forward test
|
|
43
44
|
|
|
@@ -263,20 +264,13 @@ $da-vinci use feature-change to add a billing page, generate the relevant Pencil
|
|
|
263
264
|
中文文档:
|
|
264
265
|
|
|
265
266
|
- `README.zh-CN.md`
|
|
266
|
-
- `SKILL.zh-CN.md`
|
|
267
|
-
- `CHANGELOG.zh-CN.md`
|
|
268
267
|
- `docs/zh-CN/`
|
|
269
|
-
- `docs/zh-CN/commands/`
|
|
270
|
-
- `references/zh-CN/`
|
|
271
|
-
- `examples/greenfield-spec-markupflow/*.zh-CN.md`
|
|
272
|
-
- `openspec/changes/da-vinci-v2-1-workflow/*.zh-CN.md`
|
|
273
268
|
|
|
274
269
|
## 仓库布局
|
|
275
270
|
|
|
276
271
|
```text
|
|
277
272
|
da-vinci/
|
|
278
273
|
├── SKILL.md
|
|
279
|
-
├── SKILL.zh-CN.md
|
|
280
274
|
├── README.md
|
|
281
275
|
├── README.zh-CN.md
|
|
282
276
|
├── agents/
|
|
@@ -287,7 +281,5 @@ da-vinci/
|
|
|
287
281
|
│ └── gemini/
|
|
288
282
|
├── docs/
|
|
289
283
|
│ └── zh-CN/
|
|
290
|
-
|
|
291
|
-
│ └── zh-CN/
|
|
292
|
-
└── openspec/
|
|
284
|
+
└── references/
|
|
293
285
|
```
|
package/lib/install.js
CHANGED
|
@@ -8,17 +8,14 @@ const VERSION = PACKAGE_JSON.version;
|
|
|
8
8
|
|
|
9
9
|
const REQUIRED_FILES = [
|
|
10
10
|
"SKILL.md",
|
|
11
|
-
"SKILL.zh-CN.md",
|
|
12
11
|
"README.md",
|
|
13
12
|
"README.zh-CN.md",
|
|
14
13
|
"CHANGELOG.md",
|
|
15
|
-
"CHANGELOG.zh-CN.md",
|
|
16
14
|
"agents/openai.yaml",
|
|
17
15
|
...listFiles(path.join(REPO_ROOT, "commands")).map((filePath) => path.relative(REPO_ROOT, filePath)),
|
|
18
16
|
...listFiles(path.join(REPO_ROOT, "references")).map((filePath) => path.relative(REPO_ROOT, filePath)),
|
|
19
17
|
...listFiles(path.join(REPO_ROOT, "docs")).map((filePath) => path.relative(REPO_ROOT, filePath)),
|
|
20
|
-
...listFiles(path.join(REPO_ROOT, "examples")).map((filePath) => path.relative(REPO_ROOT, filePath))
|
|
21
|
-
...listFiles(path.join(REPO_ROOT, "openspec")).map((filePath) => path.relative(REPO_ROOT, filePath))
|
|
18
|
+
...listFiles(path.join(REPO_ROOT, "examples")).map((filePath) => path.relative(REPO_ROOT, filePath))
|
|
22
19
|
];
|
|
23
20
|
|
|
24
21
|
const CODEX_PROMPT_TARGETS = listFiles(path.join(REPO_ROOT, "commands", "codex", "prompts")).map(
|
package/package.json
CHANGED
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xenonbyte/da-vinci-workflow",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Requirement-to-design-to-code workflow skill for Codex, Claude, and Gemini",
|
|
5
5
|
"bin": {
|
|
6
6
|
"da-vinci": "bin/da-vinci.js"
|
|
7
7
|
},
|
|
8
8
|
"files": [
|
|
9
9
|
"SKILL.md",
|
|
10
|
-
"SKILL.zh-CN.md",
|
|
11
10
|
"README.md",
|
|
12
11
|
"README.zh-CN.md",
|
|
13
12
|
"CHANGELOG.md",
|
|
14
|
-
"CHANGELOG.zh-CN.md",
|
|
15
13
|
"agents",
|
|
16
14
|
"commands",
|
|
17
15
|
"references",
|
|
18
16
|
"docs",
|
|
19
17
|
"examples",
|
|
20
|
-
"openspec",
|
|
21
18
|
"bin",
|
|
22
19
|
"lib",
|
|
23
|
-
"scripts"
|
|
24
|
-
".npmrc"
|
|
20
|
+
"scripts"
|
|
25
21
|
],
|
|
26
22
|
"scripts": {
|
|
27
23
|
"postinstall": "node scripts/postinstall.js",
|
package/CHANGELOG.zh-CN.md
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# 变更日志
|
|
2
|
-
|
|
3
|
-
> 中文配套文档。若与 `CHANGELOG.md` 存在差异,以英文原文为准。
|
|
4
|
-
|
|
5
|
-
## Unreleased
|
|
6
|
-
|
|
7
|
-
- 暂无未发布变更。
|
|
8
|
-
|
|
9
|
-
## v0.1.6 - 2026-03-27
|
|
10
|
-
|
|
11
|
-
### 新增
|
|
12
|
-
- 为 Codex、Claude、Gemini 增加了 `intake`、`prompt`、`continue` 三个提示词入口辅助路由
|
|
13
|
-
- 新增 `references/prompt-recipes.md` 和 `docs/prompt-entrypoints.md`,用于说明这些入口路由的使用方式
|
|
14
|
-
- 为仓库文档补充了一套中文配套文档
|
|
15
|
-
|
|
16
|
-
### 变更
|
|
17
|
-
- README、SKILL、workflow examples、mode use cases、platform adapters 现在都补充了入口辅助路由的使用说明
|
|
18
|
-
- 安装和资产校验已包含新的路由文件
|
|
19
|
-
- 资产校验现在覆盖完整的 `examples/` 和 `openspec/` 文档集合,并且 `openspec/` 也已纳入 npm 包
|
|
20
|
-
|
|
21
|
-
## v0.1.5 - 2026-03-27
|
|
22
|
-
|
|
23
|
-
### 修复
|
|
24
|
-
- `da-vinci status` 现在会检查 Codex、Claude、Gemini 的完整安装资产,而不再只依赖少量哨兵文件
|
|
25
|
-
|
|
26
|
-
### 变更
|
|
27
|
-
- Claude 和 Gemini 安装后的命令文案改成自洽的 Da Vinci 工作流措辞,不再引用未安装的本地 skill/reference 文件
|
|
28
|
-
- README 的发布说明同步更新为当前安装完整性相关工作
|
|
29
|
-
|
|
30
|
-
## v0.1.4 - 2026-03-27
|
|
31
|
-
|
|
32
|
-
### 新增
|
|
33
|
-
- 为大范围 UI 刷新增加 `redesign-from-code` 的 spec 拆分规则
|
|
34
|
-
- 为 `shared-shell`、`core-pages`、`settings-and-secondary`、`admin-or-restricted`、`reference-gap-pages` 提供 redesign slice 指导
|
|
35
|
-
|
|
36
|
-
### 变更
|
|
37
|
-
- 当刷新跨越多个实现边界时,`redesign-from-code` 更倾向于多个 `specs/<slice>/spec.md`,而不是单个巨大的 `ui-refresh/spec.md`
|
|
38
|
-
- `spec checkpoint` 现在会检查 redesign spec 是否过粗
|
|
39
|
-
- `task checkpoint` 现在会检查顶层任务组是否能和 redesign slice 对齐
|
|
40
|
-
- `workflow-examples.md` 和 `mode-use-cases.md` 已同步反映基于 slice 的 spec 规划方式
|
|
41
|
-
|
|
42
|
-
### 说明
|
|
43
|
-
- `DA-VINCI.md` 仍然作为项目级视觉契约保存在仓库根目录
|
|
44
|
-
- 工作流工件仍然位于 `.da-vinci/` 下,变更级工件位于 `.da-vinci/changes/<change-id>/`
|
package/SKILL.zh-CN.md
DELETED
|
@@ -1,339 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: da-vinci
|
|
3
|
-
description: Da Vinci 工作流的中文配套说明。若与 `SKILL.md` 存在差异,以英文原文为准。
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Da Vinci 工作流
|
|
7
|
-
|
|
8
|
-
> 中文配套文档。英文原文 `SKILL.md` 仍然是工作流的最终权威说明。
|
|
9
|
-
|
|
10
|
-
Da Vinci 是一个从需求到设计再到代码的交付工作流,用来把产品或页面需求转成结构化规格、Pencil `.pen` 设计、设计绑定、实现任务以及最终代码。
|
|
11
|
-
|
|
12
|
-
## 核心契约
|
|
13
|
-
|
|
14
|
-
固定遵守以下规则:
|
|
15
|
-
|
|
16
|
-
- Requirements 决定行为
|
|
17
|
-
- Pencil 决定呈现
|
|
18
|
-
- Tasks 决定实现顺序
|
|
19
|
-
- Code 必须同时遵循 requirements 和 Pencil 数据
|
|
20
|
-
- 当 requirements 和 Pencil 出现漂移时,先更新源工件,再继续实现
|
|
21
|
-
|
|
22
|
-
## 执行策略
|
|
23
|
-
|
|
24
|
-
Da Vinci 默认是 `autonomous-by-default`:
|
|
25
|
-
|
|
26
|
-
- 不要在每一个步骤都停下来等待确认
|
|
27
|
-
- checkpoint 是内部执行护栏,不是审批点
|
|
28
|
-
- 只有真正的 blocker 才停下
|
|
29
|
-
|
|
30
|
-
当用户说的是这些意图时,默认当成 `full-delivery`:
|
|
31
|
-
|
|
32
|
-
- 完成开发
|
|
33
|
-
- 实现生成好的设计
|
|
34
|
-
- 全局重做 UI
|
|
35
|
-
- 把整个项目做完
|
|
36
|
-
|
|
37
|
-
这种情况下,不要在 `tasks.md` 停住。
|
|
38
|
-
|
|
39
|
-
## 调用模型
|
|
40
|
-
|
|
41
|
-
工作流名固定为 `da-vinci`。
|
|
42
|
-
|
|
43
|
-
- Codex 首选:`$da-vinci <request>`
|
|
44
|
-
- Claude / Gemini 首选:`/da-vinci <request>`
|
|
45
|
-
|
|
46
|
-
同时提供三个入口辅助动作:
|
|
47
|
-
|
|
48
|
-
- Codex:`/prompts:dv-intake`、`/prompts:dv-prompt`、`/prompts:dv-continue`
|
|
49
|
-
- Claude / Gemini:`/dv:intake`、`/dv:prompt`、`/dv:continue`
|
|
50
|
-
|
|
51
|
-
自然语言主入口仍然是默认路径。
|
|
52
|
-
|
|
53
|
-
## 入口辅助动作
|
|
54
|
-
|
|
55
|
-
### `intake`
|
|
56
|
-
|
|
57
|
-
用于用户知道自己要做什么,但不知道怎么写第一条高质量 Da Vinci 提示词。
|
|
58
|
-
|
|
59
|
-
它应该输出:
|
|
60
|
-
|
|
61
|
-
- 推荐 mode
|
|
62
|
-
- 推荐 delivery intent
|
|
63
|
-
- 一条主执行提示词
|
|
64
|
-
- 必要时的一条更保守提示词
|
|
65
|
-
- 一条后续 continue 提示词
|
|
66
|
-
- 会实质影响结果的缺失输入
|
|
67
|
-
|
|
68
|
-
注意:
|
|
69
|
-
|
|
70
|
-
- `intake` 通常应该生成主工作流提示词
|
|
71
|
-
- 不应该默认把用户直接导向 `build`
|
|
72
|
-
|
|
73
|
-
### `prompt`
|
|
74
|
-
|
|
75
|
-
用于用户明确就是想让 Da Vinci 帮他生成场景化提示词。
|
|
76
|
-
|
|
77
|
-
它应该:
|
|
78
|
-
|
|
79
|
-
- 生成可复制执行的提示词
|
|
80
|
-
- 明确 behavior source of truth
|
|
81
|
-
- 明确 design source of truth
|
|
82
|
-
- 明确 delivery intent
|
|
83
|
-
- 明确冲突时以谁为准
|
|
84
|
-
|
|
85
|
-
### `continue`
|
|
86
|
-
|
|
87
|
-
用于项目里已经存在 `DA-VINCI.md` 或 `.da-vinci/` 工件,工作流需要恢复推进。
|
|
88
|
-
|
|
89
|
-
它应该:
|
|
90
|
-
|
|
91
|
-
- 先检查现有工件
|
|
92
|
-
- 判断当前停在哪个阶段
|
|
93
|
-
- 输出一条可直接继续的提示词
|
|
94
|
-
- 不要在工件已经足够时重新开始 discovery
|
|
95
|
-
|
|
96
|
-
## Mode 选择
|
|
97
|
-
|
|
98
|
-
支持四种模式:
|
|
99
|
-
|
|
100
|
-
1. `greenfield-spec`
|
|
101
|
-
- 新项目
|
|
102
|
-
- 需求已经足够清晰
|
|
103
|
-
|
|
104
|
-
2. `greenfield-brainstorm`
|
|
105
|
-
- 新项目
|
|
106
|
-
- 输入仍然发散,需要先收敛
|
|
107
|
-
|
|
108
|
-
3. `redesign-from-code`
|
|
109
|
-
- 已有项目
|
|
110
|
-
- 代码是当前行为真相
|
|
111
|
-
- 目标是广泛或全局重设计
|
|
112
|
-
|
|
113
|
-
4. `feature-change`
|
|
114
|
-
- 已有项目
|
|
115
|
-
- 目标是局部功能或页面修改
|
|
116
|
-
|
|
117
|
-
如果用户没指定 mode:
|
|
118
|
-
|
|
119
|
-
- 新项目且需求清晰:`greenfield-spec`
|
|
120
|
-
- 新项目但想法发散:`greenfield-brainstorm`
|
|
121
|
-
- 现有项目全局 UI 替换:`redesign-from-code`
|
|
122
|
-
- 现有项目局部修改:`feature-change`
|
|
123
|
-
|
|
124
|
-
## 设计输入收集
|
|
125
|
-
|
|
126
|
-
在大范围生成 Pencil 页面前,先收集或推断:
|
|
127
|
-
|
|
128
|
-
1. `DA-VINCI.md` 是否已存在
|
|
129
|
-
2. 产品形态
|
|
130
|
-
- desktop software
|
|
131
|
-
- web app
|
|
132
|
-
- tablet
|
|
133
|
-
- mobile app
|
|
134
|
-
3. 视觉方向
|
|
135
|
-
- tone
|
|
136
|
-
- density
|
|
137
|
-
- brand direction
|
|
138
|
-
- dark / light
|
|
139
|
-
4. 设计限制
|
|
140
|
-
- 现有品牌
|
|
141
|
-
- 现有设计系统
|
|
142
|
-
- 响应式优先级
|
|
143
|
-
- 交付限制
|
|
144
|
-
|
|
145
|
-
优先级:
|
|
146
|
-
|
|
147
|
-
1. `DA-VINCI.md`
|
|
148
|
-
2. 现有工作流工件
|
|
149
|
-
3. 项目代码和本地信号
|
|
150
|
-
4. 用户明确回答
|
|
151
|
-
5. 简短澄清问题
|
|
152
|
-
|
|
153
|
-
## 默认工作流
|
|
154
|
-
|
|
155
|
-
标准顺序:
|
|
156
|
-
|
|
157
|
-
1. 选择 mode
|
|
158
|
-
2. 生成该 mode 所需的起始工件
|
|
159
|
-
3. 检测或生成 `DA-VINCI.md`
|
|
160
|
-
4. 收集设计输入并登记设计源
|
|
161
|
-
5. 定义或发现页面地图
|
|
162
|
-
6. 创建或更新 Pencil 设计
|
|
163
|
-
7. 绑定实现页面到 Pencil 页面
|
|
164
|
-
8. 通过 MCP 读取 Pencil 设计数据
|
|
165
|
-
9. 生成实现任务
|
|
166
|
-
10. 根据 requirements 和 Pencil 数据实现代码
|
|
167
|
-
11. 在结束前检查需求漂移和设计漂移
|
|
168
|
-
|
|
169
|
-
完成规则:
|
|
170
|
-
|
|
171
|
-
- 用户明确说 `plan-only` 时,只做到规划工件
|
|
172
|
-
- 用户明确说 `design-only` 时,只做到设计工件和绑定
|
|
173
|
-
- 其他情况默认 `full-delivery`
|
|
174
|
-
|
|
175
|
-
## 按需加载参考文档
|
|
176
|
-
|
|
177
|
-
只加载当前步骤需要的 reference:
|
|
178
|
-
|
|
179
|
-
- `references/modes.md`
|
|
180
|
-
- `references/artifact-templates.md`
|
|
181
|
-
- `references/checkpoints.md`
|
|
182
|
-
- `references/design-inputs.md`
|
|
183
|
-
- `references/page-mapping.md`
|
|
184
|
-
- `references/pencil-design-to-code.md`
|
|
185
|
-
- `references/platform-adapters.md`
|
|
186
|
-
- `references/prompt-recipes.md`
|
|
187
|
-
|
|
188
|
-
## 默认工件
|
|
189
|
-
|
|
190
|
-
默认工件集合:
|
|
191
|
-
|
|
192
|
-
1. `.da-vinci/changes/<change-id>/brainstorm.md`
|
|
193
|
-
2. `.da-vinci/project-inventory.md`
|
|
194
|
-
3. `DA-VINCI.md`
|
|
195
|
-
4. `.da-vinci/changes/<change-id>/design-brief.md`
|
|
196
|
-
5. `.da-vinci/design-registry.md`
|
|
197
|
-
6. `.da-vinci/page-map.md`
|
|
198
|
-
7. `.da-vinci/changes/<change-id>/proposal.md`
|
|
199
|
-
8. `.da-vinci/changes/<change-id>/specs/<capability>/spec.md`
|
|
200
|
-
9. `.da-vinci/changes/<change-id>/design.md`
|
|
201
|
-
10. `.da-vinci/changes/<change-id>/pencil-design.md`
|
|
202
|
-
11. `.da-vinci/changes/<change-id>/pencil-bindings.md`
|
|
203
|
-
12. `.da-vinci/changes/<change-id>/tasks.md`
|
|
204
|
-
13. `.da-vinci/changes/<change-id>/verification.md`
|
|
205
|
-
|
|
206
|
-
## 工件放置规则
|
|
207
|
-
|
|
208
|
-
- `DA-VINCI.md` 放项目根目录
|
|
209
|
-
- 项目级工件放 `.da-vinci/`
|
|
210
|
-
- 变更级工件放 `.da-vinci/changes/<change-id>/`
|
|
211
|
-
|
|
212
|
-
## 各模式最低工件流
|
|
213
|
-
|
|
214
|
-
### `greenfield-spec`
|
|
215
|
-
|
|
216
|
-
`DA-VINCI` -> `design-brief` -> `proposal` -> `specs` -> `page-map` -> `design-registry` -> `design` -> `pencil-design` -> `pencil-bindings` -> `tasks` -> `verification`
|
|
217
|
-
|
|
218
|
-
### `greenfield-brainstorm`
|
|
219
|
-
|
|
220
|
-
`brainstorm` -> `DA-VINCI` -> `design-brief` -> `proposal` -> `specs` -> `page-map` -> `design-registry` -> `design` -> `pencil-design` -> `pencil-bindings` -> `tasks` -> `verification`
|
|
221
|
-
|
|
222
|
-
### `redesign-from-code`
|
|
223
|
-
|
|
224
|
-
`project-inventory` -> `DA-VINCI` -> `design-registry` -> `proposal` -> `specs` -> `page-map` -> `design` -> `pencil-design` -> `pencil-bindings` -> `tasks` -> `verification`
|
|
225
|
-
|
|
226
|
-
广泛重设计时,`specs/` 要按 redesign slice 拆分,不要只做一个巨大的 `ui-refresh/spec.md`。
|
|
227
|
-
|
|
228
|
-
### `feature-change`
|
|
229
|
-
|
|
230
|
-
`proposal` -> `specs` -> 受影响的 `page-map` -> `DA-VINCI` -> `design-registry` -> `design` -> `pencil-design` delta -> `pencil-bindings` delta -> `tasks` -> `verification`
|
|
231
|
-
|
|
232
|
-
## Requirement 拆解规则
|
|
233
|
-
|
|
234
|
-
在设计或编码之前:
|
|
235
|
-
|
|
236
|
-
- 把请求拆成 pages、flows、states 和数据依赖
|
|
237
|
-
- 分清视觉问题、行为问题、集成问题
|
|
238
|
-
- 明确 must-have 和后续改进项
|
|
239
|
-
- 尽早标记高风险区域:auth、permission、upload、payment、admin、secret、migration
|
|
240
|
-
|
|
241
|
-
对于 `redesign-from-code`:
|
|
242
|
-
|
|
243
|
-
- 先 inventory 现有 routes、pages、modules
|
|
244
|
-
- 区分保留的 behavior 和需要替换的 presentation
|
|
245
|
-
- 当一个 spec 太粗时,按 redesign slice 拆开
|
|
246
|
-
|
|
247
|
-
## 设计源规则
|
|
248
|
-
|
|
249
|
-
- `design-registry.md` 是项目级 `.pen` 设计源清单
|
|
250
|
-
- `DA-VINCI.md` 是项目级视觉契约
|
|
251
|
-
- 已有绑定时,优先沿用并迭代现有 Pencil 源
|
|
252
|
-
- 现有代码存在但映射缺失时,先做 baseline reconstruction
|
|
253
|
-
- 既没有映射也没有设计源时,明确说明项目进入 baseline reconstruction
|
|
254
|
-
|
|
255
|
-
## Pencil 规则
|
|
256
|
-
|
|
257
|
-
Pencil 是结构化设计源,不是静态截图源。
|
|
258
|
-
|
|
259
|
-
创建或编辑 Pencil 设计时:
|
|
260
|
-
|
|
261
|
-
- 基于当前 scope 需要的页面来做
|
|
262
|
-
- 遵循 `page-map.md`
|
|
263
|
-
- 页面名、section 名、label 尽量和 spec 对齐
|
|
264
|
-
- 对实现有影响的 states 要显式建模
|
|
265
|
-
- 设计完成后做一次视觉检查,再视为可实现
|
|
266
|
-
|
|
267
|
-
## Pencil MCP 规则
|
|
268
|
-
|
|
269
|
-
当 Pencil 通过 MCP 可用时:
|
|
270
|
-
|
|
271
|
-
- 先读 active `.pen` 文件和目标页面结构
|
|
272
|
-
- 读取布局、文本、层级、按钮、面板和内容分区
|
|
273
|
-
- screenshot 只做次要视觉辅助
|
|
274
|
-
|
|
275
|
-
当 Pencil 不可用时:
|
|
276
|
-
|
|
277
|
-
- 明确说明设计支撑路径缺失
|
|
278
|
-
- 退回 requirements-first 的实现方式
|
|
279
|
-
|
|
280
|
-
## 实现规则
|
|
281
|
-
|
|
282
|
-
编码时:
|
|
283
|
-
|
|
284
|
-
- requirements 决定行为、条件、状态和语义
|
|
285
|
-
- Pencil 决定布局、section 顺序、视觉分组和文案放置
|
|
286
|
-
- 使用 `pencil-bindings.md` 决定当前页面应跟随哪个 Pencil 页面
|
|
287
|
-
- 不要从设计外观中虚构新行为
|
|
288
|
-
- 也不要在写代码时忽略 Pencil 的结构
|
|
289
|
-
|
|
290
|
-
## Checkpoints
|
|
291
|
-
|
|
292
|
-
需要运行的 checkpoints:
|
|
293
|
-
|
|
294
|
-
1. `discovery checkpoint`
|
|
295
|
-
2. `spec checkpoint`
|
|
296
|
-
3. `design checkpoint`
|
|
297
|
-
4. `mapping checkpoint`
|
|
298
|
-
5. `task checkpoint`
|
|
299
|
-
6. `execution checkpoint`
|
|
300
|
-
|
|
301
|
-
状态:
|
|
302
|
-
|
|
303
|
-
- `PASS`
|
|
304
|
-
- `WARN`
|
|
305
|
-
- `BLOCK`
|
|
306
|
-
|
|
307
|
-
处理方式:
|
|
308
|
-
|
|
309
|
-
- `PASS`:自动继续
|
|
310
|
-
- `WARN`:记录问题并继续
|
|
311
|
-
- `BLOCK`:停止,报告 blocker,只有在无法从现有工件或本地上下文解决时才询问用户
|
|
312
|
-
|
|
313
|
-
## 漂移策略
|
|
314
|
-
|
|
315
|
-
以下都算 drift:
|
|
316
|
-
|
|
317
|
-
- requirements 改了,但 Pencil 没更新
|
|
318
|
-
- page map 变了,但 bindings 没更新
|
|
319
|
-
- design registry 变了,但下游绑定没更新
|
|
320
|
-
- Pencil 变了,但 tasks 没更新
|
|
321
|
-
- 代码行为超出批准范围
|
|
322
|
-
- 代码布局或内容结构明显偏离 Pencil 且没有记录原因
|
|
323
|
-
|
|
324
|
-
发现 drift 时:
|
|
325
|
-
|
|
326
|
-
- 先更新源工件
|
|
327
|
-
- 再继续实现
|
|
328
|
-
|
|
329
|
-
## 输出格式
|
|
330
|
-
|
|
331
|
-
在完成有意义的工作后,报告:
|
|
332
|
-
|
|
333
|
-
1. 改动了哪些文件
|
|
334
|
-
2. 当前 active mode
|
|
335
|
-
3. 当前 workflow state
|
|
336
|
-
4. 下一步建议
|
|
337
|
-
5. blockers 或 drift
|
|
338
|
-
|
|
339
|
-
保持简洁、可执行、面向交付。
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Claude 平台的 Da Vinci 工作流命令索引。
|
|
3
|
-
---
|
|
4
|
-
# Da Vinci
|
|
5
|
-
|
|
6
|
-
将本次请求作为 Da Vinci 工作流处理。
|
|
7
|
-
|
|
8
|
-
平台:Claude
|
|
9
|
-
默认工作流入口:`/da-vinci <request>`
|
|
10
|
-
|
|
11
|
-
可用路由:
|
|
12
|
-
- `/dv:intake` - 把一个比较粗糙的项目描述转成最适合执行的 Da Vinci 主入口提示词。
|
|
13
|
-
- `/dv:prompt` - 当用户明确想直接拿到提示词文本时,生成特定场景的 Da Vinci 提示词。
|
|
14
|
-
- `/dv:continue` - 基于现有 Da Vinci 工件生成最合适的继续执行提示词。
|
|
15
|
-
- `/dv:breakdown` - 把产品或页面请求拆成范围、流程、状态和需求。
|
|
16
|
-
- `/dv:design` - 基于已确认的需求规划或创建 Pencil 支撑的页面设计。
|
|
17
|
-
- `/dv:tasks` - 根据需求和 Pencil 设计覆盖生成实现任务。
|
|
18
|
-
- `/dv:build` - 按需求和 Pencil 设计实现代码。
|
|
19
|
-
- `/dv:verify` - 检查需求覆盖、设计覆盖以及实现漂移。
|
|
20
|
-
|
|
21
|
-
注意:
|
|
22
|
-
- requirements 决定 behavior。
|
|
23
|
-
- Pencil 决定 presentation。
|
|
24
|
-
- code 必须同时遵循两者。
|
|
25
|
-
- 当用户不知道第一条工作流请求该怎么写时,优先用 `intake`。
|
|
26
|
-
- 当项目里已经有 `.da-vinci/` 工件且需要恢复流程时,优先用 `continue`。
|
|
27
|
-
- Codex、Claude 和 Gemini 应共享同一套工作流语义。
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: 为 Da Vinci 拆解范围、流程、状态和规格。
|
|
3
|
-
---
|
|
4
|
-
# Da Vinci Breakdown
|
|
5
|
-
|
|
6
|
-
将本次请求作为 Da Vinci 工作流处理。
|
|
7
|
-
|
|
8
|
-
动作:`breakdown`
|
|
9
|
-
|
|
10
|
-
重点:
|
|
11
|
-
- 范围
|
|
12
|
-
- 页面
|
|
13
|
-
- 流程
|
|
14
|
-
- 状态
|
|
15
|
-
- 数据和集成需求
|
|
16
|
-
|
|
17
|
-
创建或更新:
|
|
18
|
-
- `proposal.md`
|
|
19
|
-
- `specs/<capability>/spec.md`
|
|
20
|
-
|
|
21
|
-
只提出为形成可实施需求所必需的最少澄清问题。
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: 基于需求和 Pencil 设计数据为 Da Vinci 构建软件。
|
|
3
|
-
---
|
|
4
|
-
# Da Vinci Build
|
|
5
|
-
|
|
6
|
-
将本次请求作为 Da Vinci 工作流处理。
|
|
7
|
-
|
|
8
|
-
动作:`build`
|
|
9
|
-
|
|
10
|
-
重点:
|
|
11
|
-
- 由 requirements 支撑的行为
|
|
12
|
-
- 由 Pencil 支撑的布局与表现
|
|
13
|
-
- 来自 `tasks.md` 的实现顺序
|
|
14
|
-
|
|
15
|
-
实现期间:
|
|
16
|
-
- 每完成一个顶层任务组后运行 `execution checkpoint`
|
|
17
|
-
- 如果发现漂移,先更新源工件再继续
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: 基于现有 Da Vinci 工件生成最合适的继续执行提示词。
|
|
3
|
-
---
|
|
4
|
-
# Da Vinci Continue
|
|
5
|
-
|
|
6
|
-
将本次请求作为 Da Vinci 工作流处理。
|
|
7
|
-
|
|
8
|
-
动作:`continue`
|
|
9
|
-
|
|
10
|
-
重点:
|
|
11
|
-
- 先检查现有工作流工件
|
|
12
|
-
- 识别当前所处的工作流阶段
|
|
13
|
-
- 生成最合适的可执行继续提示词
|
|
14
|
-
|
|
15
|
-
输出应包含:
|
|
16
|
-
- 检测到的工作流状态
|
|
17
|
-
- 缺失或偏弱的工件
|
|
18
|
-
- 一条主要的 `/da-vinci continue ...` 提示词
|
|
19
|
-
- 在有价值时提供一条更保守的继续提示词
|
|
20
|
-
|
|
21
|
-
路由约束:
|
|
22
|
-
- 如果现有工件已经足够,不要重新开始 discovery
|
|
23
|
-
- 除非项目明显已经具备实现条件,否则不要默认把用户导向 `/dv:build`
|
|
24
|
-
- 继续提示词通常应指向主工作流入口,让 Da Vinci 恢复完整状态机
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: 为 Da Vinci 创建或细化 Pencil 支撑的设计计划。
|
|
3
|
-
---
|
|
4
|
-
# Da Vinci Design
|
|
5
|
-
|
|
6
|
-
将本次请求作为 Da Vinci 工作流处理。
|
|
7
|
-
|
|
8
|
-
动作:`design`
|
|
9
|
-
|
|
10
|
-
重点:
|
|
11
|
-
- 页面地图
|
|
12
|
-
- 布局结构
|
|
13
|
-
- 交互模型
|
|
14
|
-
- Pencil 页面覆盖
|
|
15
|
-
|
|
16
|
-
创建或更新:
|
|
17
|
-
- `design.md`
|
|
18
|
-
- `pencil-design.md`
|
|
19
|
-
|
|
20
|
-
在锁定实现任务前运行 `design checkpoint`。
|