@xenonbyte/da-vinci-workflow 0.1.4 → 0.1.6
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 +42 -0
- package/CHANGELOG.zh-CN.md +44 -0
- package/README.md +86 -8
- package/README.zh-CN.md +293 -0
- package/SKILL.md +35 -1
- package/SKILL.zh-CN.md +339 -0
- package/commands/claude/da-vinci.md +7 -3
- package/commands/claude/dv/breakdown.md +1 -1
- package/commands/claude/dv/build.md +1 -1
- package/commands/claude/dv/continue.md +24 -0
- package/commands/claude/dv/design.md +1 -1
- package/commands/claude/dv/intake.md +26 -0
- package/commands/claude/dv/prompt.md +24 -0
- package/commands/claude/dv/tasks.md +1 -1
- package/commands/claude/dv/verify.md +1 -1
- package/commands/codex/prompts/da-vinci.md +5 -0
- package/commands/codex/prompts/dv-continue.md +24 -0
- package/commands/codex/prompts/dv-intake.md +27 -0
- package/commands/codex/prompts/dv-prompt.md +24 -0
- package/commands/gemini/da-vinci.toml +6 -1
- package/commands/gemini/dv/breakdown.toml +1 -1
- package/commands/gemini/dv/build.toml +1 -1
- package/commands/gemini/dv/continue.toml +24 -0
- package/commands/gemini/dv/design.toml +1 -1
- package/commands/gemini/dv/intake.toml +26 -0
- package/commands/gemini/dv/prompt.toml +24 -0
- package/commands/gemini/dv/tasks.toml +1 -1
- package/commands/gemini/dv/verify.toml +1 -1
- package/docs/mode-use-cases.md +13 -0
- package/docs/prompt-entrypoints.md +144 -0
- package/docs/workflow-examples.md +27 -0
- package/docs/zh-CN/commands/claude/da-vinci.md +27 -0
- package/docs/zh-CN/commands/claude/dv/breakdown.md +21 -0
- package/docs/zh-CN/commands/claude/dv/build.md +17 -0
- package/docs/zh-CN/commands/claude/dv/continue.md +24 -0
- package/docs/zh-CN/commands/claude/dv/design.md +20 -0
- package/docs/zh-CN/commands/claude/dv/intake.md +26 -0
- package/docs/zh-CN/commands/claude/dv/prompt.md +24 -0
- package/docs/zh-CN/commands/claude/dv/tasks.md +19 -0
- package/docs/zh-CN/commands/claude/dv/verify.md +16 -0
- package/docs/zh-CN/commands/codex/prompts/da-vinci.md +29 -0
- package/docs/zh-CN/commands/codex/prompts/dv-breakdown.md +19 -0
- package/docs/zh-CN/commands/codex/prompts/dv-build.md +13 -0
- package/docs/zh-CN/commands/codex/prompts/dv-continue.md +24 -0
- package/docs/zh-CN/commands/codex/prompts/dv-design.md +14 -0
- package/docs/zh-CN/commands/codex/prompts/dv-intake.md +27 -0
- package/docs/zh-CN/commands/codex/prompts/dv-prompt.md +24 -0
- package/docs/zh-CN/commands/codex/prompts/dv-tasks.md +16 -0
- package/docs/zh-CN/commands/codex/prompts/dv-verify.md +15 -0
- package/docs/zh-CN/mode-use-cases.md +145 -0
- package/docs/zh-CN/prompt-entrypoints.md +133 -0
- package/docs/zh-CN/workflow-examples.md +145 -0
- package/examples/greenfield-spec-markupflow/DA-VINCI.zh-CN.md +49 -0
- package/examples/greenfield-spec-markupflow/README.zh-CN.md +44 -0
- package/examples/greenfield-spec-markupflow/design-brief.zh-CN.md +24 -0
- package/examples/greenfield-spec-markupflow/design-registry.zh-CN.md +15 -0
- package/examples/greenfield-spec-markupflow/design.zh-CN.md +32 -0
- package/examples/greenfield-spec-markupflow/page-map.zh-CN.md +19 -0
- package/examples/greenfield-spec-markupflow/pencil-bindings.zh-CN.md +13 -0
- package/examples/greenfield-spec-markupflow/pencil-design.zh-CN.md +29 -0
- package/examples/greenfield-spec-markupflow/proposal.zh-CN.md +33 -0
- package/examples/greenfield-spec-markupflow/specs/marketing-site/spec.zh-CN.md +37 -0
- package/examples/greenfield-spec-markupflow/tasks.zh-CN.md +30 -0
- package/examples/greenfield-spec-markupflow/verification.zh-CN.md +38 -0
- package/lib/install.js +103 -31
- package/openspec/changes/da-vinci-v2-1-workflow/README.md +9 -0
- package/openspec/changes/da-vinci-v2-1-workflow/README.zh-CN.md +9 -0
- package/openspec/changes/da-vinci-v2-1-workflow/design.md +122 -0
- package/openspec/changes/da-vinci-v2-1-workflow/design.zh-CN.md +122 -0
- package/openspec/changes/da-vinci-v2-1-workflow/proposal.md +37 -0
- package/openspec/changes/da-vinci-v2-1-workflow/proposal.zh-CN.md +37 -0
- package/openspec/changes/da-vinci-v2-1-workflow/specs/workflow/spec.md +50 -0
- package/openspec/changes/da-vinci-v2-1-workflow/specs/workflow/spec.zh-CN.md +50 -0
- package/openspec/changes/da-vinci-v2-1-workflow/tasks.md +31 -0
- package/openspec/changes/da-vinci-v2-1-workflow/tasks.zh-CN.md +31 -0
- package/openspec/config.yaml +11 -0
- package/package.json +6 -1
- package/references/checkpoints.md +4 -0
- package/references/platform-adapters.md +30 -1
- package/references/prompt-recipes.md +181 -0
- package/references/zh-CN/artifact-templates.md +163 -0
- package/references/zh-CN/checkpoints.md +123 -0
- package/references/zh-CN/design-inputs.md +66 -0
- package/references/zh-CN/modes.md +69 -0
- package/references/zh-CN/page-mapping.md +43 -0
- package/references/zh-CN/pencil-design-to-code.md +65 -0
- package/references/zh-CN/platform-adapters.md +73 -0
- package/references/zh-CN/prompt-recipes.md +161 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Spec
|
|
2
|
+
|
|
3
|
+
## Capability
|
|
4
|
+
- Name: `Da Vinci workflow definition`
|
|
5
|
+
|
|
6
|
+
## Behavior
|
|
7
|
+
- The workflow SHALL support four modes: `greenfield-spec`, `greenfield-brainstorm`, `redesign-from-code`, and `feature-change`.
|
|
8
|
+
- The workflow SHALL define how design inputs are collected before new Pencil design generation for greenfield work.
|
|
9
|
+
- The workflow SHALL define a project-level registry for `.pen` design sources.
|
|
10
|
+
- The workflow SHALL detect or generate `DA-VINCI.md` before broad Pencil design generation and SHALL use it as the project-level visual contract.
|
|
11
|
+
- The workflow SHALL define implementation page to Pencil page bindings.
|
|
12
|
+
- The workflow SHALL define when broad `redesign-from-code` work must split into multiple redesign-slice specs instead of one oversized `ui-refresh` spec.
|
|
13
|
+
- The workflow SHALL define a fallback policy for missing mappings and missing design sources.
|
|
14
|
+
- The workflow SHALL run as autonomous-by-default and SHALL not stop for user confirmation at each stage.
|
|
15
|
+
- The workflow SHALL treat checkpoints as internal execution guards rather than approval gates.
|
|
16
|
+
- The repository SHALL contain a README that explains the workflow, modes, artifacts, checkpoints, and platform usage.
|
|
17
|
+
|
|
18
|
+
## States
|
|
19
|
+
- Greenfield with clear requirements
|
|
20
|
+
- Greenfield with unstable brainstorm input
|
|
21
|
+
- Existing codebase with redesign scope
|
|
22
|
+
- Existing codebase with feature-change scope
|
|
23
|
+
- Mapping present
|
|
24
|
+
- Mapping missing
|
|
25
|
+
|
|
26
|
+
## Inputs
|
|
27
|
+
- Product or feature requirements
|
|
28
|
+
- Existing codebase structure when available
|
|
29
|
+
- Existing `.pen` files when available
|
|
30
|
+
- Design preferences and form factor information
|
|
31
|
+
|
|
32
|
+
## Outputs
|
|
33
|
+
- Updated workflow definition in the skill
|
|
34
|
+
- Project-level documentation in `README.md`
|
|
35
|
+
- OpenSpec planning artifacts describing the change
|
|
36
|
+
|
|
37
|
+
## Acceptance
|
|
38
|
+
- A reader can identify the correct mode for a given project start condition.
|
|
39
|
+
- A reader can identify which artifact holds design source inventory.
|
|
40
|
+
- A reader can identify that `DA-VINCI.md` is the project-level visual contract.
|
|
41
|
+
- A reader can identify which artifact binds implementation pages to Pencil pages.
|
|
42
|
+
- A reader can identify when one redesign spec is too coarse and should be split into redesign slices.
|
|
43
|
+
- A reader can identify what happens when no mapping exists.
|
|
44
|
+
- A reader can identify that the workflow continues automatically unless a real blocker exists.
|
|
45
|
+
- A reader can identify how to invoke the skill on Codex, Claude, and Gemini.
|
|
46
|
+
|
|
47
|
+
## Edge Cases
|
|
48
|
+
- Existing codebase has no registered Pencil design source
|
|
49
|
+
- Multiple `.pen` files exist and only one should be treated as primary
|
|
50
|
+
- Greenfield work lacks explicit design preference input
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Spec
|
|
2
|
+
|
|
3
|
+
## 能力
|
|
4
|
+
- 名称:`Da Vinci workflow definition`
|
|
5
|
+
|
|
6
|
+
## 行为
|
|
7
|
+
- 工作流必须支持四种模式:`greenfield-spec`、`greenfield-brainstorm`、`redesign-from-code` 和 `feature-change`。
|
|
8
|
+
- 工作流必须定义在 greenfield 工作中,生成新的 Pencil 设计之前如何收集设计输入。
|
|
9
|
+
- 工作流必须定义一个项目级 `.pen` 设计源登记机制。
|
|
10
|
+
- 工作流必须在大范围 Pencil 设计生成前检测或生成 `DA-VINCI.md`,并将其作为项目级视觉契约使用。
|
|
11
|
+
- 工作流必须定义实现页面到 Pencil 页面的绑定方式。
|
|
12
|
+
- 工作流必须定义在大范围 `redesign-from-code` 工作中,何时应拆成多个 redesign-slice spec,而不是一个过大的 `ui-refresh` spec。
|
|
13
|
+
- 工作流必须定义在缺少映射或缺少设计源时的回退策略。
|
|
14
|
+
- 工作流必须默认以 autonomous-by-default 运行,而不是在每个阶段都停下来等待用户确认。
|
|
15
|
+
- 工作流必须把 checkpoint 视为内部执行保护,而不是审批闸门。
|
|
16
|
+
- 仓库必须包含一份 README,用来说明工作流、模式、工件、检查点和平台使用方式。
|
|
17
|
+
|
|
18
|
+
## 状态
|
|
19
|
+
- 需求明确的 greenfield
|
|
20
|
+
- 输入仍在发散中的 greenfield brainstorm
|
|
21
|
+
- 需要重设计的现有代码库
|
|
22
|
+
- 需要 feature-change 的现有代码库
|
|
23
|
+
- 映射已存在
|
|
24
|
+
- 映射缺失
|
|
25
|
+
|
|
26
|
+
## 输入
|
|
27
|
+
- 产品或功能需求
|
|
28
|
+
- 可用时的现有代码库结构
|
|
29
|
+
- 可用时的现有 `.pen` 文件
|
|
30
|
+
- 设计偏好和产品形态信息
|
|
31
|
+
|
|
32
|
+
## 输出
|
|
33
|
+
- skill 中更新后的工作流定义
|
|
34
|
+
- `README.md` 中的项目级说明文档
|
|
35
|
+
- 描述该变更的 OpenSpec 规划工件
|
|
36
|
+
|
|
37
|
+
## 验收
|
|
38
|
+
- 读者可以根据给定项目起点识别正确 mode。
|
|
39
|
+
- 读者可以识别哪个工件负责保存设计源清单。
|
|
40
|
+
- 读者可以识别 `DA-VINCI.md` 是项目级视觉契约。
|
|
41
|
+
- 读者可以识别哪个工件负责绑定实现页面到 Pencil 页面。
|
|
42
|
+
- 读者可以识别何时一个 redesign spec 过于粗糙,需要拆成多个 redesign slice。
|
|
43
|
+
- 读者可以识别在没有映射时会发生什么。
|
|
44
|
+
- 读者可以识别工作流会在没有真实阻塞时自动继续。
|
|
45
|
+
- 读者可以识别如何在 Codex、Claude 和 Gemini 中调用这个 skill。
|
|
46
|
+
|
|
47
|
+
## 边界情况
|
|
48
|
+
- 现有代码库没有登记 Pencil 设计源
|
|
49
|
+
- 存在多个 `.pen` 文件,但只有一个应该视为主源
|
|
50
|
+
- greenfield 工作缺少明确的设计偏好输入
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Tasks
|
|
2
|
+
|
|
3
|
+
## 1. Workflow Definition
|
|
4
|
+
- [x] Add four workflow modes to the skill
|
|
5
|
+
- [x] Add design input collection rules
|
|
6
|
+
- [x] Add design source registration rules
|
|
7
|
+
- [x] Add fallback policy for missing mappings
|
|
8
|
+
- [x] Add explicit page-mapping and design-input rules to support traceable implementation
|
|
9
|
+
- [x] Add `DA-VINCI.md` as a project-level visual contract checked before broad Pencil design generation
|
|
10
|
+
- [x] Add redesign-slice spec partitioning rules for broad `redesign-from-code` work
|
|
11
|
+
|
|
12
|
+
## 2. Artifact Definition
|
|
13
|
+
- [x] Add `DA-VINCI.md`
|
|
14
|
+
- [x] Add `design-brief.md`
|
|
15
|
+
- [x] Add `design-registry.md`
|
|
16
|
+
- [x] Strengthen `page-map.md`
|
|
17
|
+
- [x] Strengthen `pencil-bindings.md`
|
|
18
|
+
|
|
19
|
+
## 3. Checkpoints
|
|
20
|
+
- [x] Update `discovery checkpoint`
|
|
21
|
+
- [x] Update `design checkpoint`
|
|
22
|
+
- [x] Update `mapping checkpoint`
|
|
23
|
+
- [x] Update `spec checkpoint` to catch oversized redesign specs
|
|
24
|
+
- [x] Define autonomous-by-default execution policy
|
|
25
|
+
|
|
26
|
+
## 4. Repository Documentation
|
|
27
|
+
- [x] Add `README.md`
|
|
28
|
+
- [x] Add workflow examples
|
|
29
|
+
|
|
30
|
+
## 5. Planning
|
|
31
|
+
- [x] Add OpenSpec artifacts for this workflow change
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Tasks
|
|
2
|
+
|
|
3
|
+
## 1. 工作流定义
|
|
4
|
+
- [x] 为 skill 添加四种工作流模式
|
|
5
|
+
- [x] 添加设计输入收集规则
|
|
6
|
+
- [x] 添加设计源登记规则
|
|
7
|
+
- [x] 添加映射缺失时的回退策略
|
|
8
|
+
- [x] 添加明确的页面映射与设计输入规则,以支持可追溯的实现
|
|
9
|
+
- [x] 添加 `DA-VINCI.md` 作为项目级视觉契约,并在大范围 Pencil 设计生成前检查
|
|
10
|
+
- [x] 为大范围 `redesign-from-code` 工作添加 redesign-slice spec 拆分规则
|
|
11
|
+
|
|
12
|
+
## 2. 工件定义
|
|
13
|
+
- [x] 添加 `DA-VINCI.md`
|
|
14
|
+
- [x] 添加 `design-brief.md`
|
|
15
|
+
- [x] 添加 `design-registry.md`
|
|
16
|
+
- [x] 强化 `page-map.md`
|
|
17
|
+
- [x] 强化 `pencil-bindings.md`
|
|
18
|
+
|
|
19
|
+
## 3. 检查点
|
|
20
|
+
- [x] 更新 `discovery checkpoint`
|
|
21
|
+
- [x] 更新 `design checkpoint`
|
|
22
|
+
- [x] 更新 `mapping checkpoint`
|
|
23
|
+
- [x] 更新 `spec checkpoint`,用于拦截过大的 redesign spec
|
|
24
|
+
- [x] 定义 autonomous-by-default 执行策略
|
|
25
|
+
|
|
26
|
+
## 4. 仓库文档
|
|
27
|
+
- [x] 添加 `README.md`
|
|
28
|
+
- [x] 添加 workflow examples
|
|
29
|
+
|
|
30
|
+
## 5. 规划
|
|
31
|
+
- [x] 为本次工作流变更添加 OpenSpec 工件
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
schema: spec-driven
|
|
2
|
+
language: en
|
|
3
|
+
profile: expanded
|
|
4
|
+
context:
|
|
5
|
+
project: da-vinci
|
|
6
|
+
domain: requirement-to-design-to-code workflow
|
|
7
|
+
rules:
|
|
8
|
+
implementation_contract:
|
|
9
|
+
- requirements decide behavior
|
|
10
|
+
- Pencil decides presentation
|
|
11
|
+
- code follows both
|
package/package.json
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xenonbyte/da-vinci-workflow",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
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",
|
|
10
11
|
"README.md",
|
|
12
|
+
"README.zh-CN.md",
|
|
13
|
+
"CHANGELOG.md",
|
|
14
|
+
"CHANGELOG.zh-CN.md",
|
|
11
15
|
"agents",
|
|
12
16
|
"commands",
|
|
13
17
|
"references",
|
|
14
18
|
"docs",
|
|
15
19
|
"examples",
|
|
20
|
+
"openspec",
|
|
16
21
|
"bin",
|
|
17
22
|
"lib",
|
|
18
23
|
"scripts",
|
|
@@ -19,6 +19,10 @@ Default execution intent:
|
|
|
19
19
|
- assume `full-delivery` unless the request explicitly says `plan-only`, `design-only`, or another partial-delivery goal
|
|
20
20
|
- in `full-delivery`, checkpoints do not end the workflow; they control whether the workflow continues safely
|
|
21
21
|
|
|
22
|
+
Resume rule:
|
|
23
|
+
|
|
24
|
+
- when artifacts already exist and the workflow was paused, `continue` should resume from the current artifact truth instead of restarting discovery
|
|
25
|
+
|
|
22
26
|
## Visual Contract Rule
|
|
23
27
|
|
|
24
28
|
Before broad Pencil page generation:
|
|
@@ -25,7 +25,19 @@ Use this for:
|
|
|
25
25
|
- Pencil page generation planning
|
|
26
26
|
- design-to-code implementation
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Explicit helper routes:
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
/prompts:dv-intake
|
|
32
|
+
/prompts:dv-prompt
|
|
33
|
+
/prompts:dv-continue
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Use them when:
|
|
37
|
+
|
|
38
|
+
- the first workflow prompt is hard to phrase
|
|
39
|
+
- the user wants copy-ready prompt text
|
|
40
|
+
- the workflow needs to resume from existing artifacts
|
|
29
41
|
|
|
30
42
|
## Claude
|
|
31
43
|
|
|
@@ -43,6 +55,14 @@ Use the same workflow stages as Codex:
|
|
|
43
55
|
- implementation
|
|
44
56
|
- verification
|
|
45
57
|
|
|
58
|
+
Explicit helper routes:
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
/dv:intake
|
|
62
|
+
/dv:prompt
|
|
63
|
+
/dv:continue
|
|
64
|
+
```
|
|
65
|
+
|
|
46
66
|
## Gemini
|
|
47
67
|
|
|
48
68
|
Preferred:
|
|
@@ -53,6 +73,14 @@ Preferred:
|
|
|
53
73
|
|
|
54
74
|
Keep the same artifact names and checkpoint names across platforms.
|
|
55
75
|
|
|
76
|
+
Explicit helper routes:
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
/dv:intake
|
|
80
|
+
/dv:prompt
|
|
81
|
+
/dv:continue
|
|
82
|
+
```
|
|
83
|
+
|
|
56
84
|
## Cross-Platform Rule
|
|
57
85
|
|
|
58
86
|
Keep these stable:
|
|
@@ -62,5 +90,6 @@ Keep these stable:
|
|
|
62
90
|
- drift policy
|
|
63
91
|
- requirement/design/code contract
|
|
64
92
|
- mode names
|
|
93
|
+
- prompt helper semantics
|
|
65
94
|
|
|
66
95
|
Platform adapters may differ in command syntax, but not in workflow semantics.
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# Prompt Recipes
|
|
2
|
+
|
|
3
|
+
Use this reference when users need help starting or resuming Da Vinci but do not know which prompt to run.
|
|
4
|
+
|
|
5
|
+
## Route Purposes
|
|
6
|
+
|
|
7
|
+
Use these helper actions:
|
|
8
|
+
|
|
9
|
+
- `intake`: choose the best mode and generate the best first workflow prompt
|
|
10
|
+
- `prompt`: generate scenario-specific prompt text directly
|
|
11
|
+
- `continue`: inspect existing artifacts and generate the best continuation prompt
|
|
12
|
+
|
|
13
|
+
## Route Discipline
|
|
14
|
+
|
|
15
|
+
Keep these rules fixed:
|
|
16
|
+
|
|
17
|
+
- `intake` and `continue` should usually output a main `$da-vinci ...` or `/da-vinci ...` prompt
|
|
18
|
+
- do not default `intake` or `continue` into `build`
|
|
19
|
+
- use `build` directly only when tasks, design bindings, and implementation readiness are already clear
|
|
20
|
+
- continuation prompts should preserve existing artifact truth instead of restarting discovery
|
|
21
|
+
|
|
22
|
+
## Truth Sources To Capture
|
|
23
|
+
|
|
24
|
+
Good prompt output should explicitly state:
|
|
25
|
+
|
|
26
|
+
1. behavior source of truth
|
|
27
|
+
- existing codebase
|
|
28
|
+
- formal specs
|
|
29
|
+
- approved requirements
|
|
30
|
+
|
|
31
|
+
2. presentation or design source of truth
|
|
32
|
+
- Pencil `.pen` files
|
|
33
|
+
- HTML references
|
|
34
|
+
- Figma exports
|
|
35
|
+
- existing project visual contract
|
|
36
|
+
|
|
37
|
+
3. delivery intent
|
|
38
|
+
- `plan-only`
|
|
39
|
+
- `design-only`
|
|
40
|
+
- `full-delivery`
|
|
41
|
+
|
|
42
|
+
4. conflict rule
|
|
43
|
+
- if design and code conflict, which truth wins
|
|
44
|
+
|
|
45
|
+
5. coverage expectations
|
|
46
|
+
- states
|
|
47
|
+
- subpages
|
|
48
|
+
- dialogs
|
|
49
|
+
- sheets
|
|
50
|
+
- nested flows
|
|
51
|
+
|
|
52
|
+
## Output Shape For `intake`
|
|
53
|
+
|
|
54
|
+
`intake` should normally output:
|
|
55
|
+
|
|
56
|
+
- recommended mode
|
|
57
|
+
- recommended delivery intent
|
|
58
|
+
- one primary executable workflow prompt
|
|
59
|
+
- one more conservative prompt when useful
|
|
60
|
+
- one continuation prompt when the workflow is likely to pause
|
|
61
|
+
- missing inputs that would materially change the result
|
|
62
|
+
|
|
63
|
+
Use `intake` when:
|
|
64
|
+
|
|
65
|
+
- the user has a complex existing project
|
|
66
|
+
- the user has multiple truth sources and is unsure how to frame them
|
|
67
|
+
- the user asks "how should I use Da Vinci for this?"
|
|
68
|
+
|
|
69
|
+
## Output Shape For `prompt`
|
|
70
|
+
|
|
71
|
+
`prompt` should normally output:
|
|
72
|
+
|
|
73
|
+
- one primary prompt
|
|
74
|
+
- one more conservative prompt when useful
|
|
75
|
+
- one continuation prompt when useful
|
|
76
|
+
|
|
77
|
+
Use `prompt` when:
|
|
78
|
+
|
|
79
|
+
- the user already knows the scenario
|
|
80
|
+
- the user explicitly asks for copy-ready prompt text
|
|
81
|
+
- the user wants a reusable team template
|
|
82
|
+
|
|
83
|
+
## Output Shape For `continue`
|
|
84
|
+
|
|
85
|
+
`continue` should normally:
|
|
86
|
+
|
|
87
|
+
- inspect `DA-VINCI.md`
|
|
88
|
+
- inspect `.da-vinci/project-inventory.md` when present
|
|
89
|
+
- inspect `.da-vinci/design-registry.md` when present
|
|
90
|
+
- inspect `.da-vinci/page-map.md` when present
|
|
91
|
+
- inspect current change artifacts under `.da-vinci/changes/<change-id>/`
|
|
92
|
+
|
|
93
|
+
Then output:
|
|
94
|
+
|
|
95
|
+
- detected workflow state
|
|
96
|
+
- missing or weak artifacts
|
|
97
|
+
- one executable continuation prompt
|
|
98
|
+
- one more conservative continuation prompt when useful
|
|
99
|
+
|
|
100
|
+
Use `continue` when:
|
|
101
|
+
|
|
102
|
+
- the workflow paused after inventory
|
|
103
|
+
- the workflow paused after specs
|
|
104
|
+
- the workflow paused after tasks
|
|
105
|
+
- the user asks how to resume without restarting from scratch
|
|
106
|
+
|
|
107
|
+
## Mode Heuristics
|
|
108
|
+
|
|
109
|
+
Choose the mode using these heuristics:
|
|
110
|
+
|
|
111
|
+
- `greenfield-spec`
|
|
112
|
+
- new project
|
|
113
|
+
- requirements are already clear
|
|
114
|
+
|
|
115
|
+
- `greenfield-brainstorm`
|
|
116
|
+
- new project
|
|
117
|
+
- ideas are still rough or contradictory
|
|
118
|
+
|
|
119
|
+
- `redesign-from-code`
|
|
120
|
+
- existing product
|
|
121
|
+
- behavior should stay grounded in current code
|
|
122
|
+
- broad or global UI replacement
|
|
123
|
+
|
|
124
|
+
- `feature-change`
|
|
125
|
+
- existing product
|
|
126
|
+
- scoped requirement, page, or flow change
|
|
127
|
+
|
|
128
|
+
## Scenario Recipe: Existing Project Global UI Replacement
|
|
129
|
+
|
|
130
|
+
Prefer:
|
|
131
|
+
|
|
132
|
+
- mode: `redesign-from-code`
|
|
133
|
+
- behavior truth: existing code
|
|
134
|
+
- presentation truth: HTML, Pencil, or other design references
|
|
135
|
+
- delivery intent: usually `full-delivery`
|
|
136
|
+
|
|
137
|
+
Prompt should make these explicit:
|
|
138
|
+
|
|
139
|
+
- preserve current behavior
|
|
140
|
+
- preserve integrations and state transitions
|
|
141
|
+
- inventory all screens and states
|
|
142
|
+
- split redesign into implementation-safe slices
|
|
143
|
+
- document gaps between code and design references
|
|
144
|
+
|
|
145
|
+
## Scenario Recipe: Existing Code Plus HTML References
|
|
146
|
+
|
|
147
|
+
Prompt should explicitly say:
|
|
148
|
+
|
|
149
|
+
- the code is the behavior source of truth
|
|
150
|
+
- the HTML directory is a presentation reference only
|
|
151
|
+
- conflicts must preserve behavior and record the mismatch
|
|
152
|
+
- the workflow should inspect page states, subpages, dialogs, and overlays carefully
|
|
153
|
+
|
|
154
|
+
## Scenario Recipe: Continue After Inventory
|
|
155
|
+
|
|
156
|
+
If the project already has:
|
|
157
|
+
|
|
158
|
+
- `project-inventory.md`
|
|
159
|
+
- `page-map.md`
|
|
160
|
+
- early specs or proposal work
|
|
161
|
+
|
|
162
|
+
Then `continue` should usually produce a prompt that:
|
|
163
|
+
|
|
164
|
+
- keeps current artifacts as the working baseline
|
|
165
|
+
- completes any missing design mapping
|
|
166
|
+
- moves into tasks
|
|
167
|
+
- proceeds into implementation if the delivery intent is `full-delivery`
|
|
168
|
+
|
|
169
|
+
## Scenario Recipe: Continue After Tasks
|
|
170
|
+
|
|
171
|
+
If the project already has:
|
|
172
|
+
|
|
173
|
+
- `tasks.md`
|
|
174
|
+
- valid spec slices
|
|
175
|
+
- design bindings or an explicit design gap record
|
|
176
|
+
|
|
177
|
+
Then `continue` should usually produce a prompt that:
|
|
178
|
+
|
|
179
|
+
- resumes from the current task checkpoint
|
|
180
|
+
- starts implementation immediately unless a real blocker exists
|
|
181
|
+
- keeps execution checkpoints active after each top-level task group
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# 工件模板
|
|
2
|
+
|
|
3
|
+
> 中文配套文档。若与英文原文存在差异,请以 `references/artifact-templates.md` 为准。
|
|
4
|
+
|
|
5
|
+
本文定义 Da Vinci 默认工件的推荐结构。
|
|
6
|
+
|
|
7
|
+
## 放置规则
|
|
8
|
+
|
|
9
|
+
- `DA-VINCI.md` 放项目根目录
|
|
10
|
+
- 项目级工件放 `.da-vinci/`
|
|
11
|
+
- 变更级工件放 `.da-vinci/changes/<change-id>/`
|
|
12
|
+
|
|
13
|
+
推荐布局:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
project/
|
|
17
|
+
├── DA-VINCI.md
|
|
18
|
+
└── .da-vinci/
|
|
19
|
+
├── project-inventory.md
|
|
20
|
+
├── design-registry.md
|
|
21
|
+
├── page-map.md
|
|
22
|
+
└── changes/
|
|
23
|
+
└── <change-id>/
|
|
24
|
+
├── brainstorm.md
|
|
25
|
+
├── design-brief.md
|
|
26
|
+
├── proposal.md
|
|
27
|
+
├── design.md
|
|
28
|
+
├── pencil-design.md
|
|
29
|
+
├── pencil-bindings.md
|
|
30
|
+
├── tasks.md
|
|
31
|
+
├── verification.md
|
|
32
|
+
└── specs/
|
|
33
|
+
└── <capability>/spec.md
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## 关键模板说明
|
|
37
|
+
|
|
38
|
+
### `brainstorm.md`
|
|
39
|
+
|
|
40
|
+
用于收敛早期想法,记录:
|
|
41
|
+
|
|
42
|
+
- 输入
|
|
43
|
+
- 产品方向
|
|
44
|
+
- 候选页面
|
|
45
|
+
- 候选流程
|
|
46
|
+
- 风险与未知项
|
|
47
|
+
|
|
48
|
+
### `project-inventory.md`
|
|
49
|
+
|
|
50
|
+
用于从现有代码盘点:
|
|
51
|
+
|
|
52
|
+
- 当前产品概况
|
|
53
|
+
- 路由和页面
|
|
54
|
+
- 共享 UI 区域
|
|
55
|
+
- 技术限制
|
|
56
|
+
- 重设计影响范围
|
|
57
|
+
|
|
58
|
+
### `DA-VINCI.md`
|
|
59
|
+
|
|
60
|
+
用于项目级视觉契约,记录:
|
|
61
|
+
|
|
62
|
+
- 产品形态
|
|
63
|
+
- 视觉方向
|
|
64
|
+
- 主题
|
|
65
|
+
- 排版
|
|
66
|
+
- 布局规则
|
|
67
|
+
- 组件语气
|
|
68
|
+
- Do / Do Not
|
|
69
|
+
- Source Of Truth
|
|
70
|
+
|
|
71
|
+
### `design-brief.md`
|
|
72
|
+
|
|
73
|
+
用于记录:
|
|
74
|
+
|
|
75
|
+
- 产品形态
|
|
76
|
+
- 视觉方向
|
|
77
|
+
- 品牌约束
|
|
78
|
+
- 布局优先级
|
|
79
|
+
- 明确或推断出的偏好
|
|
80
|
+
|
|
81
|
+
### `design-registry.md`
|
|
82
|
+
|
|
83
|
+
用于记录:
|
|
84
|
+
|
|
85
|
+
- 活跃 `.pen` 源
|
|
86
|
+
- 首选设计源
|
|
87
|
+
- 历史或次要设计源
|
|
88
|
+
- 设计源说明
|
|
89
|
+
|
|
90
|
+
### `page-map.md`
|
|
91
|
+
|
|
92
|
+
用于记录:
|
|
93
|
+
|
|
94
|
+
- canonical pages
|
|
95
|
+
- 每个页面的状态
|
|
96
|
+
- 共享区域
|
|
97
|
+
- 页面优先级
|
|
98
|
+
|
|
99
|
+
### `proposal.md`
|
|
100
|
+
|
|
101
|
+
用于记录:
|
|
102
|
+
|
|
103
|
+
- 变更目标
|
|
104
|
+
- 范围
|
|
105
|
+
- 非目标
|
|
106
|
+
- 风险
|
|
107
|
+
- 成功标准
|
|
108
|
+
|
|
109
|
+
### `spec.md`
|
|
110
|
+
|
|
111
|
+
用于记录:
|
|
112
|
+
|
|
113
|
+
- capability 名称
|
|
114
|
+
- behavior
|
|
115
|
+
- states
|
|
116
|
+
- inputs
|
|
117
|
+
- outputs
|
|
118
|
+
- acceptance
|
|
119
|
+
- edge cases
|
|
120
|
+
|
|
121
|
+
### `design.md`
|
|
122
|
+
|
|
123
|
+
用于记录:
|
|
124
|
+
|
|
125
|
+
- 页面结构
|
|
126
|
+
- 交互模型
|
|
127
|
+
- 布局策略
|
|
128
|
+
- 组件策略
|
|
129
|
+
|
|
130
|
+
### `pencil-design.md`
|
|
131
|
+
|
|
132
|
+
用于记录:
|
|
133
|
+
|
|
134
|
+
- 活跃 `.pen` 源
|
|
135
|
+
- 屏幕和 screen id
|
|
136
|
+
- 实现说明
|
|
137
|
+
- 校验说明
|
|
138
|
+
|
|
139
|
+
### `pencil-bindings.md`
|
|
140
|
+
|
|
141
|
+
用于记录:
|
|
142
|
+
|
|
143
|
+
- 实现页面到 Pencil 页面映射
|
|
144
|
+
- 共享区域到设计区域映射
|
|
145
|
+
- 设计源说明
|
|
146
|
+
|
|
147
|
+
### `tasks.md`
|
|
148
|
+
|
|
149
|
+
用于记录:
|
|
150
|
+
|
|
151
|
+
- 顶层任务组
|
|
152
|
+
- 依赖顺序
|
|
153
|
+
- checkpoint 状态
|
|
154
|
+
|
|
155
|
+
### `verification.md`
|
|
156
|
+
|
|
157
|
+
用于记录:
|
|
158
|
+
|
|
159
|
+
- checkpoint 汇总
|
|
160
|
+
- requirement coverage
|
|
161
|
+
- design coverage
|
|
162
|
+
- drift findings
|
|
163
|
+
- known gaps
|