@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.
Files changed (88) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/CHANGELOG.zh-CN.md +44 -0
  3. package/README.md +86 -8
  4. package/README.zh-CN.md +293 -0
  5. package/SKILL.md +35 -1
  6. package/SKILL.zh-CN.md +339 -0
  7. package/commands/claude/da-vinci.md +7 -3
  8. package/commands/claude/dv/breakdown.md +1 -1
  9. package/commands/claude/dv/build.md +1 -1
  10. package/commands/claude/dv/continue.md +24 -0
  11. package/commands/claude/dv/design.md +1 -1
  12. package/commands/claude/dv/intake.md +26 -0
  13. package/commands/claude/dv/prompt.md +24 -0
  14. package/commands/claude/dv/tasks.md +1 -1
  15. package/commands/claude/dv/verify.md +1 -1
  16. package/commands/codex/prompts/da-vinci.md +5 -0
  17. package/commands/codex/prompts/dv-continue.md +24 -0
  18. package/commands/codex/prompts/dv-intake.md +27 -0
  19. package/commands/codex/prompts/dv-prompt.md +24 -0
  20. package/commands/gemini/da-vinci.toml +6 -1
  21. package/commands/gemini/dv/breakdown.toml +1 -1
  22. package/commands/gemini/dv/build.toml +1 -1
  23. package/commands/gemini/dv/continue.toml +24 -0
  24. package/commands/gemini/dv/design.toml +1 -1
  25. package/commands/gemini/dv/intake.toml +26 -0
  26. package/commands/gemini/dv/prompt.toml +24 -0
  27. package/commands/gemini/dv/tasks.toml +1 -1
  28. package/commands/gemini/dv/verify.toml +1 -1
  29. package/docs/mode-use-cases.md +13 -0
  30. package/docs/prompt-entrypoints.md +144 -0
  31. package/docs/workflow-examples.md +27 -0
  32. package/docs/zh-CN/commands/claude/da-vinci.md +27 -0
  33. package/docs/zh-CN/commands/claude/dv/breakdown.md +21 -0
  34. package/docs/zh-CN/commands/claude/dv/build.md +17 -0
  35. package/docs/zh-CN/commands/claude/dv/continue.md +24 -0
  36. package/docs/zh-CN/commands/claude/dv/design.md +20 -0
  37. package/docs/zh-CN/commands/claude/dv/intake.md +26 -0
  38. package/docs/zh-CN/commands/claude/dv/prompt.md +24 -0
  39. package/docs/zh-CN/commands/claude/dv/tasks.md +19 -0
  40. package/docs/zh-CN/commands/claude/dv/verify.md +16 -0
  41. package/docs/zh-CN/commands/codex/prompts/da-vinci.md +29 -0
  42. package/docs/zh-CN/commands/codex/prompts/dv-breakdown.md +19 -0
  43. package/docs/zh-CN/commands/codex/prompts/dv-build.md +13 -0
  44. package/docs/zh-CN/commands/codex/prompts/dv-continue.md +24 -0
  45. package/docs/zh-CN/commands/codex/prompts/dv-design.md +14 -0
  46. package/docs/zh-CN/commands/codex/prompts/dv-intake.md +27 -0
  47. package/docs/zh-CN/commands/codex/prompts/dv-prompt.md +24 -0
  48. package/docs/zh-CN/commands/codex/prompts/dv-tasks.md +16 -0
  49. package/docs/zh-CN/commands/codex/prompts/dv-verify.md +15 -0
  50. package/docs/zh-CN/mode-use-cases.md +145 -0
  51. package/docs/zh-CN/prompt-entrypoints.md +133 -0
  52. package/docs/zh-CN/workflow-examples.md +145 -0
  53. package/examples/greenfield-spec-markupflow/DA-VINCI.zh-CN.md +49 -0
  54. package/examples/greenfield-spec-markupflow/README.zh-CN.md +44 -0
  55. package/examples/greenfield-spec-markupflow/design-brief.zh-CN.md +24 -0
  56. package/examples/greenfield-spec-markupflow/design-registry.zh-CN.md +15 -0
  57. package/examples/greenfield-spec-markupflow/design.zh-CN.md +32 -0
  58. package/examples/greenfield-spec-markupflow/page-map.zh-CN.md +19 -0
  59. package/examples/greenfield-spec-markupflow/pencil-bindings.zh-CN.md +13 -0
  60. package/examples/greenfield-spec-markupflow/pencil-design.zh-CN.md +29 -0
  61. package/examples/greenfield-spec-markupflow/proposal.zh-CN.md +33 -0
  62. package/examples/greenfield-spec-markupflow/specs/marketing-site/spec.zh-CN.md +37 -0
  63. package/examples/greenfield-spec-markupflow/tasks.zh-CN.md +30 -0
  64. package/examples/greenfield-spec-markupflow/verification.zh-CN.md +38 -0
  65. package/lib/install.js +103 -31
  66. package/openspec/changes/da-vinci-v2-1-workflow/README.md +9 -0
  67. package/openspec/changes/da-vinci-v2-1-workflow/README.zh-CN.md +9 -0
  68. package/openspec/changes/da-vinci-v2-1-workflow/design.md +122 -0
  69. package/openspec/changes/da-vinci-v2-1-workflow/design.zh-CN.md +122 -0
  70. package/openspec/changes/da-vinci-v2-1-workflow/proposal.md +37 -0
  71. package/openspec/changes/da-vinci-v2-1-workflow/proposal.zh-CN.md +37 -0
  72. package/openspec/changes/da-vinci-v2-1-workflow/specs/workflow/spec.md +50 -0
  73. package/openspec/changes/da-vinci-v2-1-workflow/specs/workflow/spec.zh-CN.md +50 -0
  74. package/openspec/changes/da-vinci-v2-1-workflow/tasks.md +31 -0
  75. package/openspec/changes/da-vinci-v2-1-workflow/tasks.zh-CN.md +31 -0
  76. package/openspec/config.yaml +11 -0
  77. package/package.json +6 -1
  78. package/references/checkpoints.md +4 -0
  79. package/references/platform-adapters.md +30 -1
  80. package/references/prompt-recipes.md +181 -0
  81. package/references/zh-CN/artifact-templates.md +163 -0
  82. package/references/zh-CN/checkpoints.md +123 -0
  83. package/references/zh-CN/design-inputs.md +66 -0
  84. package/references/zh-CN/modes.md +69 -0
  85. package/references/zh-CN/page-mapping.md +43 -0
  86. package/references/zh-CN/pencil-design-to-code.md +65 -0
  87. package/references/zh-CN/platform-adapters.md +73 -0
  88. package/references/zh-CN/prompt-recipes.md +161 -0
@@ -0,0 +1,37 @@
1
+ # Spec
2
+
3
+ ## 能力
4
+ - 名称:MarkupFlow launch marketing site
5
+
6
+ ## 行为
7
+ - 首页必须解释三个核心产品能力:HTML 到带注释设计、Figma 到带注释设计、带注释设计作为 MCP 数据服务
8
+ - 首页必须明确产品面向桌面软件团队
9
+ - 首页必须把用户引导到更深入的工作流页面
10
+ - 产品详情页必须解释 import、annotation 和 publish 管线
11
+ - 产品详情页必须描述桌面工作区及其主要模块
12
+ - 两个页面都必须保持一致的产品语气和视觉系统
13
+
14
+ ## 状态
15
+ - Success:两个页面都能渲染预期内容区块,并正确互链
16
+ - Error:此静态 forward test 不适用
17
+ - Restricted:此静态 forward test 不适用
18
+
19
+ ## 输入
20
+ - 产品描述
21
+ - 能力列表
22
+ - Pencil 屏幕结构和文案
23
+
24
+ ## 输出
25
+ - 静态首页
26
+ - 静态产品详情页
27
+ - 实现到 Pencil 的可追溯关系
28
+
29
+ ## 验收
30
+ - 首页包含 hero、capabilities、MCP service 和 CTA 区块
31
+ - 产品详情页包含 desktop workspace、pipeline、modules 和 CTA 区块
32
+ - 每个页面映射到一个拥有稳定标识符的 Pencil 屏幕
33
+ - 实现文本和结构与请求的产品叙事保持一致
34
+
35
+ ## 边界情况
36
+ - 如果当前 Pencil 源改名或屏幕 id 变化,在继续实现前必须先更新 `pencil-bindings.md`
37
+ - 如果实时 `.pen` 文件不可用,当前 HTML 输出就是回退的实现基线
@@ -0,0 +1,30 @@
1
+ # Tasks
2
+
3
+ ## 1. 范围与页面定义
4
+ - [x] 在 `DA-VINCI.md` 中定义项目视觉契约
5
+ - [x] 记录桌面产品设计简报
6
+ - [x] 定义 proposal 和交付范围
7
+ - [x] 编写 marketing-site 行为 spec
8
+ - [x] 定义规范页面地图
9
+ - [x] `PASS` discovery checkpoint
10
+ - [x] `PASS` spec checkpoint
11
+
12
+ ## 2. Pencil 源与映射
13
+ - [x] 登记当前激活的 Pencil 源
14
+ - [x] 记录当前 Pencil 屏幕和实现说明
15
+ - [x] 将实现页面绑定到 Pencil 屏幕
16
+ - [x] 确认 Pencil 屏幕遵循同一份 `DA-VINCI.md` 视觉基线
17
+ - [x] `PASS` design checkpoint
18
+ - [x] `PASS` mapping checkpoint
19
+
20
+ ## 3. 静态页面实现
21
+ - [x] 基于需求和 Pencil 结构实现首页
22
+ - [x] 基于需求和 Pencil 结构实现产品详情页
23
+ - [x] 保持跨页导航和统一视觉语言
24
+ - [x] 在顶层页面实现后执行 `PASS` execution checkpoint
25
+
26
+ ## 4. 校验
27
+ - [x] 对照 spec 确认需求覆盖
28
+ - [x] 对照 Pencil 页面确认设计覆盖
29
+ - [x] 记录已知缺口和后续步骤
30
+ - [x] `PASS` task checkpoint
@@ -0,0 +1,38 @@
1
+ # Verification
2
+
3
+ ## 模式
4
+ - `greenfield-spec`
5
+
6
+ ## 检查点摘要
7
+ - discovery checkpoint: `PASS`
8
+ - spec checkpoint: `PASS`
9
+ - design checkpoint: `PASS`
10
+ - mapping checkpoint: `PASS`
11
+ - task checkpoint: `PASS`
12
+ - execution checkpoint: `PASS`
13
+
14
+ ## 需求覆盖
15
+ - 首页解释了三个核心能力
16
+ - 首页把产品定位为面向桌面软件
17
+ - 首页链接到了工作流详情页
18
+ - 产品详情页解释了 import、annotate 和 publish 流程
19
+ - 产品详情页解释了桌面工作区模块
20
+
21
+ ## 设计覆盖
22
+ - 实现遵循 `DA-VINCI.md` 中的项目视觉契约
23
+ - 首页实现遵循 Pencil 屏幕中 hero、capabilities、MCP service 和 CTA 的结构
24
+ - 产品详情实现遵循 Pencil 屏幕中 workspace hero、pipeline、modules 和 CTA 的结构
25
+ - 实现页面已明确绑定到 Pencil 屏幕 id
26
+
27
+ ## 漂移发现
28
+ - 本次 forward test 未记录阻塞性的需求漂移
29
+ - 本次 forward test 未记录阻塞性的设计漂移
30
+
31
+ ## 已知缺口
32
+ - `.pen` 文件尚未提交到仓库
33
+ - 当前实现是静态 `HTML + Tailwind`,不是生产级组件化应用
34
+ - 移动端行为对发布页示例来说足够可接受,但不是本次设计优先级
35
+
36
+ ## 结论
37
+ - Da Vinci 成功将 `greenfield-spec` 流程从产品描述推进到基于 Pencil 的静态实现
38
+ - 该示例证明:requirements、Pencil bindings、tasks 和代码输出可以在同一仓库里保持对齐
package/lib/install.js CHANGED
@@ -8,33 +8,73 @@ const VERSION = PACKAGE_JSON.version;
8
8
 
9
9
  const REQUIRED_FILES = [
10
10
  "SKILL.md",
11
+ "SKILL.zh-CN.md",
11
12
  "README.md",
13
+ "README.zh-CN.md",
14
+ "CHANGELOG.md",
15
+ "CHANGELOG.zh-CN.md",
12
16
  "agents/openai.yaml",
13
- "commands/claude/da-vinci.md",
14
- "commands/claude/dv/breakdown.md",
15
- "commands/claude/dv/build.md",
16
- "commands/claude/dv/design.md",
17
- "commands/claude/dv/tasks.md",
18
- "commands/claude/dv/verify.md",
19
- "commands/codex/prompts/da-vinci.md",
20
- "commands/codex/prompts/dv-breakdown.md",
21
- "commands/codex/prompts/dv-build.md",
22
- "commands/codex/prompts/dv-design.md",
23
- "commands/codex/prompts/dv-tasks.md",
24
- "commands/codex/prompts/dv-verify.md",
25
- "commands/gemini/da-vinci.toml",
26
- "commands/gemini/dv/breakdown.toml",
27
- "commands/gemini/dv/build.toml",
28
- "commands/gemini/dv/design.toml",
29
- "commands/gemini/dv/tasks.toml",
30
- "commands/gemini/dv/verify.toml",
31
- "references/artifact-templates.md",
32
- "references/checkpoints.md",
33
- "references/design-inputs.md",
34
- "references/modes.md",
35
- "references/page-mapping.md",
36
- "references/pencil-design-to-code.md",
37
- "references/platform-adapters.md"
17
+ ...listFiles(path.join(REPO_ROOT, "commands")).map((filePath) => path.relative(REPO_ROOT, filePath)),
18
+ ...listFiles(path.join(REPO_ROOT, "references")).map((filePath) => path.relative(REPO_ROOT, filePath)),
19
+ ...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))
22
+ ];
23
+
24
+ const CODEX_PROMPT_TARGETS = listFiles(path.join(REPO_ROOT, "commands", "codex", "prompts")).map(
25
+ (filePath) => path.join(".codex", "prompts", path.basename(filePath))
26
+ );
27
+
28
+ const CODEX_SKILL_TARGETS = [
29
+ path.join(".codex", "skills", "da-vinci", "SKILL.md"),
30
+ ...listFiles(path.join(REPO_ROOT, "agents")).map((filePath) =>
31
+ path.join(".codex", "skills", "da-vinci", "agents", path.relative(path.join(REPO_ROOT, "agents"), filePath))
32
+ ),
33
+ ...listFiles(path.join(REPO_ROOT, "references")).map((filePath) =>
34
+ path.join(
35
+ ".codex",
36
+ "skills",
37
+ "da-vinci",
38
+ "references",
39
+ path.relative(path.join(REPO_ROOT, "references"), filePath)
40
+ )
41
+ ),
42
+ ...listFiles(path.join(REPO_ROOT, "docs")).map((filePath) =>
43
+ path.join(".codex", "skills", "da-vinci", "docs", path.relative(path.join(REPO_ROOT, "docs"), filePath))
44
+ ),
45
+ ...listFiles(path.join(REPO_ROOT, "examples")).map((filePath) =>
46
+ path.join(
47
+ ".codex",
48
+ "skills",
49
+ "da-vinci",
50
+ "examples",
51
+ path.relative(path.join(REPO_ROOT, "examples"), filePath)
52
+ )
53
+ )
54
+ ];
55
+
56
+ const CLAUDE_TARGETS = [
57
+ path.join(".claude", "commands", "da-vinci.md"),
58
+ path.join(".claude", "commands", "dv", "breakdown.md"),
59
+ path.join(".claude", "commands", "dv", "build.md"),
60
+ path.join(".claude", "commands", "dv", "continue.md"),
61
+ path.join(".claude", "commands", "dv", "design.md"),
62
+ path.join(".claude", "commands", "dv", "intake.md"),
63
+ path.join(".claude", "commands", "dv", "prompt.md"),
64
+ path.join(".claude", "commands", "dv", "tasks.md"),
65
+ path.join(".claude", "commands", "dv", "verify.md")
66
+ ];
67
+
68
+ const GEMINI_TARGETS = [
69
+ path.join(".gemini", "commands", "da-vinci.toml"),
70
+ path.join(".gemini", "commands", "dv", "breakdown.toml"),
71
+ path.join(".gemini", "commands", "dv", "build.toml"),
72
+ path.join(".gemini", "commands", "dv", "continue.toml"),
73
+ path.join(".gemini", "commands", "dv", "design.toml"),
74
+ path.join(".gemini", "commands", "dv", "intake.toml"),
75
+ path.join(".gemini", "commands", "dv", "prompt.toml"),
76
+ path.join(".gemini", "commands", "dv", "tasks.toml"),
77
+ path.join(".gemini", "commands", "dv", "verify.toml")
38
78
  ];
39
79
 
40
80
  function resolveHome(homeDir) {
@@ -99,6 +139,10 @@ function tryRemoveEmptyDir(targetPath) {
99
139
 
100
140
  function listFiles(dirPath) {
101
141
  return fs.readdirSync(dirPath, { withFileTypes: true }).flatMap((entry) => {
142
+ if (entry.name.startsWith(".")) {
143
+ return [];
144
+ }
145
+
102
146
  const fullPath = path.join(dirPath, entry.name);
103
147
  if (entry.isDirectory()) {
104
148
  return listFiles(fullPath);
@@ -107,6 +151,10 @@ function listFiles(dirPath) {
107
151
  });
108
152
  }
109
153
 
154
+ function getMissingTargets(homeDir, relativePaths) {
155
+ return relativePaths.filter((relativePath) => !fs.existsSync(path.join(homeDir, relativePath)));
156
+ }
157
+
110
158
  function installCodex(homeDir) {
111
159
  const promptsTarget = path.join(homeDir, ".codex", "prompts");
112
160
  const skillTarget = path.join(homeDir, ".codex", "skills", "da-vinci");
@@ -132,7 +180,10 @@ function uninstallCodex(homeDir) {
132
180
  "da-vinci.md",
133
181
  "dv-breakdown.md",
134
182
  "dv-build.md",
183
+ "dv-continue.md",
135
184
  "dv-design.md",
185
+ "dv-intake.md",
186
+ "dv-prompt.md",
136
187
  "dv-tasks.md",
137
188
  "dv-verify.md"
138
189
  ];
@@ -155,7 +206,10 @@ function installClaude(homeDir) {
155
206
  copyNamedFiles(path.join(REPO_ROOT, "commands", "claude", "dv"), dvTarget, [
156
207
  "breakdown.md",
157
208
  "build.md",
209
+ "continue.md",
158
210
  "design.md",
211
+ "intake.md",
212
+ "prompt.md",
159
213
  "tasks.md",
160
214
  "verify.md"
161
215
  ]);
@@ -166,7 +220,10 @@ function uninstallClaude(homeDir) {
166
220
  removePath(path.join(commandsTarget, "da-vinci.md"));
167
221
  removePath(path.join(commandsTarget, "dv", "breakdown.md"));
168
222
  removePath(path.join(commandsTarget, "dv", "build.md"));
223
+ removePath(path.join(commandsTarget, "dv", "continue.md"));
169
224
  removePath(path.join(commandsTarget, "dv", "design.md"));
225
+ removePath(path.join(commandsTarget, "dv", "intake.md"));
226
+ removePath(path.join(commandsTarget, "dv", "prompt.md"));
170
227
  removePath(path.join(commandsTarget, "dv", "tasks.md"));
171
228
  removePath(path.join(commandsTarget, "dv", "verify.md"));
172
229
  tryRemoveEmptyDir(path.join(commandsTarget, "dv"));
@@ -183,7 +240,10 @@ function installGemini(homeDir) {
183
240
  copyNamedFiles(path.join(REPO_ROOT, "commands", "gemini", "dv"), dvTarget, [
184
241
  "breakdown.toml",
185
242
  "build.toml",
243
+ "continue.toml",
186
244
  "design.toml",
245
+ "intake.toml",
246
+ "prompt.toml",
187
247
  "tasks.toml",
188
248
  "verify.toml"
189
249
  ]);
@@ -194,7 +254,10 @@ function uninstallGemini(homeDir) {
194
254
  removePath(path.join(commandsTarget, "da-vinci.toml"));
195
255
  removePath(path.join(commandsTarget, "dv", "breakdown.toml"));
196
256
  removePath(path.join(commandsTarget, "dv", "build.toml"));
257
+ removePath(path.join(commandsTarget, "dv", "continue.toml"));
197
258
  removePath(path.join(commandsTarget, "dv", "design.toml"));
259
+ removePath(path.join(commandsTarget, "dv", "intake.toml"));
260
+ removePath(path.join(commandsTarget, "dv", "prompt.toml"));
198
261
  removePath(path.join(commandsTarget, "dv", "tasks.toml"));
199
262
  removePath(path.join(commandsTarget, "dv", "verify.toml"));
200
263
  tryRemoveEmptyDir(path.join(commandsTarget, "dv"));
@@ -244,20 +307,29 @@ function uninstallPlatforms(platforms, options = {}) {
244
307
 
245
308
  function getStatus(options = {}) {
246
309
  const homeDir = resolveHome(options.homeDir);
310
+ const codexPromptMissing = getMissingTargets(homeDir, CODEX_PROMPT_TARGETS);
311
+ const codexSkillMissing = getMissingTargets(homeDir, CODEX_SKILL_TARGETS);
312
+ const claudeMissing = getMissingTargets(homeDir, CLAUDE_TARGETS);
313
+ const geminiMissing = getMissingTargets(homeDir, GEMINI_TARGETS);
314
+
247
315
  return {
248
316
  version: VERSION,
249
317
  homeDir,
250
318
  codex: {
251
- prompt: fs.existsSync(path.join(homeDir, ".codex", "prompts", "da-vinci.md")),
252
- skill: fs.existsSync(path.join(homeDir, ".codex", "skills", "da-vinci", "SKILL.md"))
319
+ prompt: codexPromptMissing.length === 0,
320
+ skill: codexSkillMissing.length === 0,
321
+ promptMissing: codexPromptMissing,
322
+ skillMissing: codexSkillMissing
253
323
  },
254
324
  claude: {
255
- command: fs.existsSync(path.join(homeDir, ".claude", "commands", "da-vinci.md")),
256
- actionSet: fs.existsSync(path.join(homeDir, ".claude", "commands", "dv", "design.md"))
325
+ command: claudeMissing.length === 0,
326
+ actionSet: claudeMissing.length === 0,
327
+ missing: claudeMissing
257
328
  },
258
329
  gemini: {
259
- command: fs.existsSync(path.join(homeDir, ".gemini", "commands", "da-vinci.toml")),
260
- actionSet: fs.existsSync(path.join(homeDir, ".gemini", "commands", "dv", "design.toml"))
330
+ command: geminiMissing.length === 0,
331
+ actionSet: geminiMissing.length === 0,
332
+ missing: geminiMissing
261
333
  }
262
334
  };
263
335
  }
@@ -0,0 +1,9 @@
1
+ # Change: da-vinci-v2-1-workflow
2
+
3
+ This change tracks the V2.1 definition work for the Da Vinci skill:
4
+
5
+ - add workflow modes
6
+ - add design input collection
7
+ - add design source registry
8
+ - add Pencil page bindings
9
+ - add repository README
@@ -0,0 +1,9 @@
1
+ # Change: da-vinci-v2-1-workflow
2
+
3
+ 这个变更用于跟踪 Da Vinci skill 的 V2.1 定义工作:
4
+
5
+ - 新增工作流模式
6
+ - 新增设计输入收集
7
+ - 新增设计源登记
8
+ - 新增实现页面到 Pencil 页面的绑定
9
+ - 新增仓库 README
@@ -0,0 +1,122 @@
1
+ # Design
2
+
3
+ ## Workflow Shape
4
+
5
+ Da Vinci V2.1 extends the original workflow with two new concepts:
6
+
7
+ 1. design input collection
8
+ 2. design source traceability
9
+
10
+ The workflow now distinguishes:
11
+
12
+ - where design direction comes from
13
+ - where the visual contract comes from
14
+ - where design source files are registered
15
+ - how implementation pages bind to Pencil pages
16
+ - when one redesign spec is too coarse and should be split into redesign slices
17
+
18
+ ## New Artifacts
19
+
20
+ ### `design-brief.md`
21
+
22
+ Purpose:
23
+ - hold product form factor
24
+ - hold visual direction
25
+ - hold density and brand constraints
26
+
27
+ ### `DA-VINCI.md`
28
+
29
+ Purpose:
30
+ - hold the project-level visual baseline
31
+ - reduce page-to-page style drift
32
+ - persist theme, palette, typography, and component-tone rules across future design work
33
+
34
+ ### `design-registry.md`
35
+
36
+ Purpose:
37
+ - register active `.pen` files
38
+ - identify the preferred design source
39
+ - distinguish primary and secondary design sources
40
+
41
+ ### `pencil-bindings.md`
42
+
43
+ Purpose:
44
+ - bind implementation pages or routes to Pencil pages or screens
45
+
46
+ ## Fallback Policy
47
+
48
+ When bindings exist:
49
+ - iterate from the mapped source
50
+
51
+ When no bindings exist but project code exists:
52
+ - rebuild `project-inventory.md`
53
+ - rebuild `page-map.md`
54
+ - rebuild `design-registry.md`
55
+ - create a Pencil baseline after the inventory is stable
56
+
57
+ When neither bindings nor usable design sources exist:
58
+ - enter baseline reconstruction from the local source of truth
59
+
60
+ ## Spec Partitioning
61
+
62
+ Broad `redesign-from-code` work should not default to one oversized `ui-refresh` spec.
63
+
64
+ Keep these artifacts singular:
65
+
66
+ - `proposal.md`
67
+ - `DA-VINCI.md`
68
+ - `project-inventory.md`
69
+ - `design-registry.md`
70
+ - `page-map.md`
71
+
72
+ Split `specs/` by redesign slice when the refresh spans multiple product surfaces or implementation boundaries.
73
+
74
+ Recommended slices:
75
+
76
+ - `shared-shell`
77
+ - `core-pages`
78
+ - `settings-and-secondary`
79
+ - `admin-or-restricted`
80
+ - `reference-gap-pages`
81
+
82
+ ## README Strategy
83
+
84
+ The repository root README should explain:
85
+
86
+ - what Da Vinci is
87
+ - the four workflow modes
88
+ - the core workflow
89
+ - default artifacts
90
+ - checkpoints
91
+ - design source policy
92
+ - platform usage
93
+
94
+ ## Checkpoints
95
+
96
+ V2.1 strengthens:
97
+
98
+ - `discovery checkpoint`
99
+ - `mapping checkpoint`
100
+
101
+ The mapping checkpoint now depends on:
102
+
103
+ - `design-registry.md`
104
+ - `pencil-bindings.md`
105
+
106
+ The design checkpoint should also confirm:
107
+
108
+ - `DA-VINCI.md` exists or has been intentionally generated
109
+ - the current Pencil pages follow the same visual contract
110
+
111
+ ## Execution Policy
112
+
113
+ Da Vinci should execute as autonomous-by-default.
114
+
115
+ That means:
116
+
117
+ - checkpoints are internal quality gates
118
+ - `PASS` should continue automatically
119
+ - `WARN` should record and continue automatically
120
+ - `BLOCK` should stop only when existing artifacts or local context cannot resolve the issue safely
121
+
122
+ This prevents the workflow from degenerating into approval-at-every-step behavior while still preserving hard stops for real blockers.
@@ -0,0 +1,122 @@
1
+ # Design
2
+
3
+ ## 工作流形态
4
+
5
+ Da Vinci V2.1 在原始工作流上新增了两个概念:
6
+
7
+ 1. 设计输入收集
8
+ 2. 设计源可追溯性
9
+
10
+ 工作流现在会区分:
11
+
12
+ - 设计方向来自哪里
13
+ - 视觉契约来自哪里
14
+ - 设计源文件登记在哪里
15
+ - 实现页面如何绑定到 Pencil 页面
16
+ - 什么时候一个重设计 spec 过于粗糙,需要拆成多个 redesign slice
17
+
18
+ ## 新工件
19
+
20
+ ### `design-brief.md`
21
+
22
+ 用途:
23
+ - 记录产品形态
24
+ - 记录视觉方向
25
+ - 记录密度和品牌约束
26
+
27
+ ### `DA-VINCI.md`
28
+
29
+ 用途:
30
+ - 记录项目级视觉基线
31
+ - 减少页面之间的风格漂移
32
+ - 在后续设计工作中持续保存主题、配色、字体和组件语气规则
33
+
34
+ ### `design-registry.md`
35
+
36
+ 用途:
37
+ - 登记激活的 `.pen` 文件
38
+ - 标识首选设计源
39
+ - 区分主设计源和次设计源
40
+
41
+ ### `pencil-bindings.md`
42
+
43
+ 用途:
44
+ - 将实现页面或路由绑定到 Pencil 页面或屏幕
45
+
46
+ ## 回退策略
47
+
48
+ 当绑定存在时:
49
+ - 从映射后的设计源继续迭代
50
+
51
+ 当没有绑定但已有项目代码时:
52
+ - 重建 `project-inventory.md`
53
+ - 重建 `page-map.md`
54
+ - 重建 `design-registry.md`
55
+ - 在 inventory 稳定后创建 Pencil 基线
56
+
57
+ 当既没有绑定也没有可用设计源时:
58
+ - 从本地真相源进入基线重建
59
+
60
+ ## Spec 拆分规则
61
+
62
+ 宽范围的 `redesign-from-code` 工作不应默认只有一个庞大的 `ui-refresh` spec。
63
+
64
+ 以下工件保持单例:
65
+
66
+ - `proposal.md`
67
+ - `DA-VINCI.md`
68
+ - `project-inventory.md`
69
+ - `design-registry.md`
70
+ - `page-map.md`
71
+
72
+ 当改版跨越多个产品界面或实现边界时,应按 redesign slice 拆分 `specs/`。
73
+
74
+ 推荐切片:
75
+
76
+ - `shared-shell`
77
+ - `core-pages`
78
+ - `settings-and-secondary`
79
+ - `admin-or-restricted`
80
+ - `reference-gap-pages`
81
+
82
+ ## README 策略
83
+
84
+ 仓库根 README 应说明:
85
+
86
+ - Da Vinci 是什么
87
+ - 四种工作流模式
88
+ - 核心工作流
89
+ - 默认工件
90
+ - 检查点
91
+ - 设计源策略
92
+ - 平台使用方式
93
+
94
+ ## 检查点
95
+
96
+ V2.1 强化了:
97
+
98
+ - `discovery checkpoint`
99
+ - `mapping checkpoint`
100
+
101
+ 现在 `mapping checkpoint` 依赖:
102
+
103
+ - `design-registry.md`
104
+ - `pencil-bindings.md`
105
+
106
+ `design checkpoint` 还应确认:
107
+
108
+ - `DA-VINCI.md` 已存在,或者已被有意生成
109
+ - 当前 Pencil 页面遵循同一份视觉契约
110
+
111
+ ## 执行策略
112
+
113
+ Da Vinci 应默认采用 autonomous-by-default。
114
+
115
+ 这意味着:
116
+
117
+ - checkpoint 是内部质量闸门
118
+ - `PASS` 应自动继续
119
+ - `WARN` 应记录后自动继续
120
+ - `BLOCK` 只在现有工件或本地上下文无法安全解决问题时才停止
121
+
122
+ 这样可以避免工作流退化成“每一步都等审批”的行为,同时保留对真实阻塞问题的硬停止。
@@ -0,0 +1,37 @@
1
+ # Proposal
2
+
3
+ ## Change
4
+ - Name: `da-vinci-v2-1-workflow`
5
+ - Owner: `xenonbyte`
6
+ - Date: `2026-03-27`
7
+
8
+ ## Goal
9
+ - Upgrade Da Vinci from a basic requirement-to-design-to-code workflow into a multi-mode software delivery workflow with explicit design inputs, design source registration, and page-to-Pencil bindings.
10
+ - Add a repository README that explains the workflow, modes, artifacts, and platform usage.
11
+
12
+ ## Non-Goals
13
+ - Installing the skill automatically on all platforms
14
+ - Publishing the skill as a package
15
+ - Implementing code-generation scripts in this change
16
+
17
+ ## User Value
18
+ - Users can choose the correct workflow entry mode instead of forcing every project through one vague path.
19
+ - Users can trace project pages back to Pencil sources and iterate UI more safely.
20
+ - Users can understand the workflow quickly from the repository root.
21
+
22
+ ## Scope
23
+ - Define four workflow modes
24
+ - Add `design-brief.md`
25
+ - Add `design-registry.md`
26
+ - Strengthen `page-map.md` and `pencil-bindings.md`
27
+ - Add fallback policy when mappings do not exist
28
+ - Add `README.md`
29
+
30
+ ## Risks
31
+ - Workflow complexity may grow too quickly if artifact responsibilities are not clear.
32
+ - Mode selection may become ambiguous if examples are weak.
33
+
34
+ ## Success Criteria
35
+ - The skill documents four explicit modes.
36
+ - The skill documents design input collection and design source registration.
37
+ - The repository has a README that explains the workflow clearly.
@@ -0,0 +1,37 @@
1
+ # Proposal
2
+
3
+ ## 变更
4
+ - 名称:`da-vinci-v2-1-workflow`
5
+ - Owner:`xenonbyte`
6
+ - 日期:`2026-03-27`
7
+
8
+ ## 目标
9
+ - 将 Da Vinci 从基础的 requirement-to-design-to-code 工作流升级为多模式的软件交付工作流,并加入明确的设计输入、设计源登记和页面到 Pencil 的绑定。
10
+ - 新增仓库 README,用于说明工作流、模式、工件和平台使用方式。
11
+
12
+ ## 非目标
13
+ - 在所有平台上自动安装 skill
14
+ - 将 skill 发布为 package
15
+ - 在本次变更中实现代码生成脚本
16
+
17
+ ## 用户价值
18
+ - 用户可以根据项目起点选择正确的工作流入口模式,而不是把所有项目都塞进一条模糊路径。
19
+ - 用户可以把项目页面追溯回 Pencil 设计源,从而更安全地迭代 UI。
20
+ - 用户可以从仓库根目录快速理解这套工作流。
21
+
22
+ ## 范围
23
+ - 定义四种工作流模式
24
+ - 新增 `design-brief.md`
25
+ - 新增 `design-registry.md`
26
+ - 强化 `page-map.md` 和 `pencil-bindings.md`
27
+ - 新增映射缺失时的回退策略
28
+ - 新增 `README.md`
29
+
30
+ ## 风险
31
+ - 如果工件职责不够清晰,工作流复杂度可能增长过快。
32
+ - 如果示例不够强,mode 选择可能变得模糊。
33
+
34
+ ## 成功标准
35
+ - skill 明确记录四种工作流模式。
36
+ - skill 明确记录设计输入收集和设计源登记。
37
+ - 仓库拥有一份可以清晰解释工作流的 README。