sillyspec 3.20.2 → 3.20.3

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 (208) hide show
  1. package/.claude/skills/sillyspec-archive/SKILL.md +1 -5
  2. package/.claude/skills/sillyspec-auto/SKILL.md +2 -8
  3. package/.claude/skills/sillyspec-brainstorm/SKILL.md +1 -28
  4. package/.claude/skills/sillyspec-commit/SKILL.md +3 -4
  5. package/.claude/skills/sillyspec-continue/SKILL.md +4 -5
  6. package/.claude/skills/sillyspec-doctor/SKILL.md +3 -12
  7. package/.claude/skills/sillyspec-execute/SKILL.md +2 -15
  8. package/.claude/skills/sillyspec-explore/SKILL.md +1 -14
  9. package/.claude/skills/sillyspec-plan/SKILL.md +36 -5
  10. package/.claude/skills/sillyspec-propose/SKILL.md +0 -4
  11. package/.claude/skills/sillyspec-quick/SKILL.md +1 -5
  12. package/.claude/skills/sillyspec-resume/SKILL.md +66 -23
  13. package/.claude/skills/sillyspec-scan/SKILL.md +1 -5
  14. package/.claude/skills/sillyspec-state/SKILL.md +8 -8
  15. package/.claude/skills/sillyspec-status/SKILL.md +1 -5
  16. package/.claude/skills/sillyspec-verify/SKILL.md +1 -5
  17. package/.claude/skills/sillyspec-workspace/SKILL.md +3 -11
  18. package/.sillyspec/changes/archive/2026-04-08-derive-state/design.md +97 -0
  19. package/.sillyspec/changes/archive/2026-04-08-derive-state/plan.md +51 -0
  20. package/.sillyspec/changes/archive/2026-04-08-derive-state/proposal.md +29 -0
  21. package/.sillyspec/changes/archive/2026-04-08-derive-state/requirements.md +34 -0
  22. package/.sillyspec/changes/archive/2026-04-08-derive-state/tasks.md +13 -0
  23. package/.sillyspec/changes/archive/2026-04-08-derive-state/verify-result.md +43 -0
  24. package/.sillyspec/changes/auto-mode/design.md +50 -0
  25. package/.sillyspec/changes/auto-mode/proposal.md +19 -0
  26. package/.sillyspec/changes/auto-mode/requirements.md +21 -0
  27. package/.sillyspec/changes/auto-mode/tasks.md +7 -0
  28. package/.sillyspec/changes/brainstorm-archive/2026-04-05-dashboard-design.md +206 -0
  29. package/.sillyspec/changes/brainstorm-archive/2026-04-05-unified-docs-design.md +199 -0
  30. package/.sillyspec/changes/dashboard/design.md +219 -0
  31. package/.sillyspec/changes/dashboard/design.md.braindraft +206 -0
  32. package/.sillyspec/changes/run-command-design/design.md +1230 -0
  33. package/.sillyspec/changes/unified-docs-design/design.md +199 -0
  34. package/.sillyspec/docs/sillyspec/scan/.gitkeep +0 -0
  35. package/.sillyspec/knowledge/INDEX.md +8 -0
  36. package/.sillyspec/knowledge/uncategorized.md +3 -0
  37. package/.sillyspec/plans/2026-04-05-dashboard.md +737 -0
  38. package/.sillyspec/projects/sillyspec.yaml +3 -0
  39. package/README.md +11 -13
  40. package/SKILL.md +40 -44
  41. package/dist/steps/brainstorm/01-load-context.md +30 -0
  42. package/dist/steps/brainstorm/02-reuse-check.md +6 -0
  43. package/dist/steps/brainstorm/03-prototype-analysis.md +11 -0
  44. package/dist/steps/brainstorm/04-module-split.md +23 -0
  45. package/dist/steps/brainstorm/05-dialog-explore.md +8 -0
  46. package/dist/steps/brainstorm/06-propose-approaches.md +3 -0
  47. package/dist/steps/brainstorm/07-present-design.md +3 -0
  48. package/dist/steps/brainstorm/08-write-design.md +21 -0
  49. package/dist/steps/brainstorm/09-self-review.md +15 -0
  50. package/dist/steps/brainstorm/10-user-confirm.md +3 -0
  51. package/dist/steps/brainstorm/11-output-spec.md +7 -0
  52. package/dist/steps/brainstorm/manifest.yaml +26 -0
  53. package/dist/steps/execute/01-load-context.md +41 -0
  54. package/dist/steps/execute/02-scan-conventions.md +47 -0
  55. package/dist/steps/execute/03-skill-mcp.md +19 -0
  56. package/dist/steps/execute/04-assign-task.md +22 -0
  57. package/dist/steps/execute/04b-prompt-template.md +54 -0
  58. package/dist/steps/execute/05-write-test.md +7 -0
  59. package/dist/steps/execute/06-write-code.md +8 -0
  60. package/dist/steps/execute/07-run-test.md +26 -0
  61. package/dist/steps/execute/08-fix-issues.md +28 -0
  62. package/dist/steps/execute/09-next-task.md +33 -0
  63. package/dist/steps/execute/manifest.yaml +28 -0
  64. package/dist/steps/plan/01-load-context.md +22 -0
  65. package/dist/steps/plan/02-anchor-confirm.md +1 -0
  66. package/dist/steps/plan/03-expand-tasks.md +33 -0
  67. package/dist/steps/plan/04-mark-order.md +15 -0
  68. package/dist/steps/plan/05-e2e-planning.md +17 -0
  69. package/dist/steps/plan/06-self-check.md +16 -0
  70. package/dist/steps/plan/07-save.md +1 -0
  71. package/dist/steps/plan/manifest.yaml +18 -0
  72. package/dist/steps/scan/01-env-detect.md +51 -0
  73. package/dist/steps/scan/02-tech-stack.md +16 -0
  74. package/dist/steps/scan/03-conventions.md +16 -0
  75. package/dist/steps/scan/04-structure.md +19 -0
  76. package/dist/steps/scan/05-quality.md +18 -0
  77. package/dist/steps/scan/06-complete.md +49 -0
  78. package/dist/steps/scan/manifest.yaml +16 -0
  79. package/dist/steps/verify/01-load-specs.md +28 -0
  80. package/dist/steps/verify/02-check-tasks.md +1 -0
  81. package/dist/steps/verify/03-check-design.md +6 -0
  82. package/dist/steps/verify/04-run-tests.md +7 -0
  83. package/dist/steps/verify/05-e2e-tests.md +27 -0
  84. package/dist/steps/verify/05b-e2e-fix.md +33 -0
  85. package/dist/steps/verify/06-code-quality.md +25 -0
  86. package/dist/steps/verify/07-lint-check.md +27 -0
  87. package/dist/steps/verify/08-output-report.md +14 -0
  88. package/dist/steps/verify/manifest.yaml +22 -0
  89. package/package.json +1 -7
  90. package/packages/dashboard/dist/assets/{index-Bq_Z2hne.js → index-D1EVTLmc.js} +1264 -1264
  91. package/packages/dashboard/dist/assets/index-DGe8CqeP.css +1 -0
  92. package/packages/dashboard/dist/index.html +2 -2
  93. package/packages/dashboard/package-lock.json +6 -6
  94. package/packages/dashboard/server/executor.js +1 -1
  95. package/packages/dashboard/server/index.js +18 -98
  96. package/packages/dashboard/server/parser.js +71 -139
  97. package/packages/dashboard/server/watcher.js +6 -14
  98. package/packages/dashboard/src/App.vue +185 -418
  99. package/packages/dashboard/src/components/ActionBar.vue +1 -10
  100. package/packages/dashboard/src/components/CommandPalette.vue +1 -5
  101. package/packages/dashboard/src/components/DocPreview.vue +8 -105
  102. package/packages/dashboard/src/components/DocTree.vue +19 -75
  103. package/packages/dashboard/src/components/PipelineStage.vue +2 -22
  104. package/packages/dashboard/src/components/PipelineView.vue +5 -32
  105. package/packages/dashboard/src/components/ProjectOverview.vue +139 -113
  106. package/packages/dashboard/src/components/StageBadge.vue +3 -17
  107. package/packages/dashboard/src/components/StepCard.vue +2 -7
  108. package/packages/dashboard/src/composables/useDashboard.js +0 -28
  109. package/src/derive.js +147 -0
  110. package/src/index.js +40 -688
  111. package/src/init.js +63 -119
  112. package/src/migrate.js +7 -7
  113. package/src/progress.js +248 -1474
  114. package/src/run.js +302 -3008
  115. package/src/setup.js +64 -2
  116. package/src/stages/archive.js +17 -123
  117. package/src/stages/brainstorm.js +48 -454
  118. package/src/stages/doctor.js +46 -99
  119. package/src/stages/execute.js +59 -420
  120. package/src/stages/index.js +18 -12
  121. package/src/stages/plan.js +189 -492
  122. package/src/stages/propose.js +11 -70
  123. package/src/stages/quick.js +13 -52
  124. package/src/stages/scan.js +68 -485
  125. package/src/stages/status.js +1 -1
  126. package/src/stages/verify.js +16 -203
  127. package/src/step.js +543 -0
  128. package/.claude/skills/sillyspec-knowledge/SKILL.md +0 -270
  129. package/.husky/pre-push +0 -13
  130. package/CLAUDE.md +0 -18
  131. package/docs/brainstorm-plan-contract.md +0 -64
  132. package/docs/plan-execute-contract.md +0 -123
  133. package/docs/platform-scan-protocol.md +0 -298
  134. package/docs/revision-mode.md +0 -115
  135. package/docs/sillyspec/file-lifecycle/known-implementation-gaps.md +0 -99
  136. package/docs/sillyspec/file-lifecycle/platform-workflows-sync.md +0 -218
  137. package/docs/sillyspec/file-lifecycle/stage-artifacts.md +0 -167
  138. package/docs/sillyspec/file-lifecycle/storage-and-state.md +0 -148
  139. package/docs/sillyspec/file-lifecycle/worktree-and-guard.md +0 -193
  140. package/docs/sillyspec/file-lifecycle.md +0 -125
  141. package/docs/workflow-contract-regression.md +0 -106
  142. package/docs/worktree-isolation.md +0 -252
  143. package/packages/dashboard/dist/assets/index-O2W5RV4z.css +0 -1
  144. package/packages/dashboard/dist/prototype-dashboard.html +0 -836
  145. package/packages/dashboard/dist/prototype-overview.html +0 -256
  146. package/packages/dashboard/public/prototype-dashboard.html +0 -836
  147. package/packages/dashboard/public/prototype-overview.html +0 -256
  148. package/packages/dashboard/src/components/HResizeHandle.vue +0 -48
  149. package/packages/dashboard/src/components/ProjectCard.vue +0 -187
  150. package/packages/dashboard/src/components/VResizeHandle.vue +0 -61
  151. package/packages/dashboard/src/composables/useLayout.js +0 -131
  152. package/src/brainstorm-postcheck.js +0 -158
  153. package/src/change-list.js +0 -52
  154. package/src/change-risk-profile.js +0 -352
  155. package/src/classify-change.js +0 -73
  156. package/src/constants.js +0 -70
  157. package/src/contract-matrix.js +0 -278
  158. package/src/db.js +0 -201
  159. package/src/endpoint-extractor.js +0 -315
  160. package/src/hooks/claude-pre-tool-use.cjs +0 -125
  161. package/src/hooks/worktree-guard.js +0 -761
  162. package/src/knowledge-match.js +0 -130
  163. package/src/modules.js +0 -482
  164. package/src/scan-postcheck.js +0 -383
  165. package/src/stage-contract.js +0 -700
  166. package/src/stages/brainstorm-auto.js +0 -229
  167. package/src/stages/explore.js +0 -34
  168. package/src/stages/knowledge.js +0 -498
  169. package/src/stages/plan-postcheck.js +0 -513
  170. package/src/sync.js +0 -497
  171. package/src/task-review.js +0 -346
  172. package/src/workflow.js +0 -785
  173. package/src/worktree-apply.js +0 -549
  174. package/src/worktree.js +0 -932
  175. package/templates/workflows/archive-impact.yaml +0 -79
  176. package/templates/workflows/scan-docs.yaml +0 -132
  177. package/test/brainstorm-plan-contract.test.mjs +0 -273
  178. package/test/check-syntax.mjs +0 -26
  179. package/test/cli-top-level-aliases.test.mjs +0 -174
  180. package/test/contract-artifacts.test.mjs +0 -323
  181. package/test/decision-supersede.test.mjs +0 -277
  182. package/test/knowledge-match.test.mjs +0 -231
  183. package/test/plan-execute-contract.test.mjs +0 -330
  184. package/test/plan-optimization.test.mjs +0 -572
  185. package/test/platform-artifacts.test.mjs +0 -190
  186. package/test/platform-failure-samples.test.mjs +0 -199
  187. package/test/platform-recovery-chain.test.mjs +0 -179
  188. package/test/platform-recovery.test.mjs +0 -167
  189. package/test/platform-scan-p0.test.mjs +0 -175
  190. package/test/revision-v1.test.mjs +0 -1145
  191. package/test/run-sanitize-project-name.test.mjs +0 -51
  192. package/test/run-scan-postcheck-fail.test.mjs +0 -64
  193. package/test/run-scan-project-parse.test.mjs +0 -200
  194. package/test/run-tests.mjs +0 -48
  195. package/test/scan-docs-yaml-placeholders.test.mjs +0 -84
  196. package/test/scan-knowledge.test.mjs +0 -175
  197. package/test/scan-paths.test.mjs +0 -68
  198. package/test/scan-postcheck-project-priority.test.mjs +0 -85
  199. package/test/scan-postcheck.test.mjs +0 -197
  200. package/test/scan-workflow-anyfailed-block.test.mjs +0 -52
  201. package/test/spec-dir.test.mjs +0 -206
  202. package/test/stage-contract-failed-post-check.test.mjs +0 -102
  203. package/test/stage-contract.test.mjs +0 -299
  204. package/test/stage-definitions.test.mjs +0 -39
  205. package/test/wait-gates.test.mjs +0 -501
  206. package/test/workflow-spec-base.test.mjs +0 -142
  207. package/test/worktree-guard.test.mjs +0 -136
  208. package/test/worktree-native-overlay.test.mjs +0 -188
package/src/setup.js CHANGED
@@ -1,9 +1,17 @@
1
- import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'fs';
1
+ import { existsSync, readFileSync, writeFileSync, mkdirSync, cpSync } from 'fs';
2
2
  import { join, dirname } from 'path';
3
+ import { fileURLToPath } from 'url';
3
4
  import { execSync } from 'child_process';
4
5
  import chalk from 'chalk';
5
6
  import ora from 'ora';
6
- import { checkbox, input } from '@inquirer/prompts';
7
+ import { checkbox, confirm, input, select } from '@inquirer/prompts';
8
+
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = dirname(__filename);
11
+
12
+ // ── Skill 定义 ──
13
+
14
+ const SKILLS = [];
7
15
 
8
16
  // ── MCP 工具定义 ──
9
17
 
@@ -282,6 +290,21 @@ export async function cmdSetup(dir, options = {}) {
282
290
  ...dbChoices,
283
291
  ...globalChoices.length > 0 ? [{ name: chalk.bold('── 全局工具 ──'), value: '_global_header', disabled: true }] : [],
284
292
  ...globalChoices,
293
+ ...[{ name: chalk.bold('── AI Skills(编写参考)──'), value: '_skill_header', disabled: true }],
294
+ ...(() => {
295
+ const installed = new Set();
296
+ for (const { path } of availableTools) {
297
+ const skillDir = join(dir, dirname(path), 'skills');
298
+ for (const s of SKILLS) {
299
+ if (existsSync(join(skillDir, s.target, 'SKILL.md'))) installed.add(s.id);
300
+ }
301
+ }
302
+ return SKILLS.filter(s => !installed.has(s.id)).map(s => ({
303
+ name: `${s.name} — ${s.description}`,
304
+ value: `skill:${s.id}`,
305
+ checked: false,
306
+ }));
307
+ })(),
285
308
  ];
286
309
 
287
310
  if (allChoices.length === 0) {
@@ -371,6 +394,41 @@ export async function cmdSetup(dir, options = {}) {
371
394
  }
372
395
  }
373
396
 
397
+ // ── 安装 Skills ──
398
+
399
+ const selectedSkills = SKILLS.filter(s => selected.includes(`skill:${s.id}`));
400
+
401
+ if (selectedSkills.length > 0) {
402
+ // 跟 MCP 一样,选择安装到哪些 AI 工具
403
+ const skillTargets = availableTools.map(t => ({
404
+ name: t.tool,
405
+ value: t.key,
406
+ checked: true,
407
+ }));
408
+
409
+ const selectedTools = await checkbox({
410
+ message: 'Skill 安装到哪些 AI 工具?',
411
+ choices: skillTargets,
412
+ });
413
+
414
+ const targets = availableTools.filter(t => selectedTools.includes(t.key));
415
+
416
+ console.log('');
417
+ for (const { tool, path } of targets) {
418
+ const spinner = ora(`安装 Skills 到 ${tool}...`).start();
419
+ for (const skill of selectedSkills) {
420
+ try {
421
+ const targetDir = join(dir, dirname(path), 'skills', skill.target);
422
+ mkdirSync(targetDir, { recursive: true });
423
+ cpSync(skill.source, targetDir, { recursive: true });
424
+ spinner.succeed(`${tool} → ${dirname(path)}/skills/${skill.target}/SKILL.md`);
425
+ } catch (err) {
426
+ spinner.fail(`${skill.name} 安装失败: ${err.message}`);
427
+ }
428
+ }
429
+ }
430
+ }
431
+
374
432
  // ── 总结 ──
375
433
 
376
434
  console.log('');
@@ -390,6 +448,10 @@ export async function cmdSetup(dir, options = {}) {
390
448
  console.log(` 🛠️ ${chalk.cyan(g.name)} — ${g.description}`);
391
449
  console.log(chalk.dim(` ${g.url}`));
392
450
  }
451
+ for (const s of selectedSkills) {
452
+ console.log(` 📚 ${chalk.cyan(s.name)} — ${s.description}`);
453
+ console.log(chalk.dim(` → ${s.target}/SKILL.md`));
454
+ }
393
455
  console.log('');
394
456
  if (selectedMcp.length > 0) {
395
457
  console.log(chalk.dim(' 重启你的 AI 工具以使 MCP 配置生效。'));
@@ -2,142 +2,34 @@ export const definition = {
2
2
  name: 'archive',
3
3
  title: '归档变更',
4
4
  description: '规范沉淀,可追溯',
5
+ auxiliary: true,
5
6
  steps: [
6
7
  {
7
8
  name: '任务完成度检查',
8
- prompt: `检查 plan.md 中所有任务 checkbox 是否已勾选(plan.md 是任务完成的唯一真相源)。
9
+ prompt: `检查 tasks.md 中所有 checkbox 是否已勾选。
9
10
 
10
11
  ### 操作
11
- 1. 读取 \`.sillyspec/changes/<change-name>/plan.md\`
12
- 2. 检查所有 \`- [x]\` checkbox 是否已勾选
13
- 3. 如果 plan.md 不存在,回退读取 tasks.md 作为备选
14
- 4. 如有遗漏 → **必须暂停等待用户决定**,不要自行判断"可以归档"
15
- - 调用:\`sillyspec run archive --wait --reason "存在未完成任务,是否继续归档" --options "继续归档,回到execute完成剩余任务" --output "未完成任务列表"\`
12
+ 1. 读取 \`.sillyspec/changes/<change-name>/tasks.md\`
13
+ 2. 检查所有 checkbox 是否已勾选
14
+ 3. 如有遗漏 询问用户是否继续归档
16
15
 
17
16
  ### 输出
18
- 完成度报告(已勾选/总数 + 未完成任务列表)`,
17
+ 完成度报告`,
19
18
  outputHint: '完成度报告',
20
19
  optional: false
21
20
  },
22
- {
23
- name: 'extract-module-impact',
24
- prompt: `按照 \`.sillyspec/workflows/archive-impact.yaml\` 中定义的 \`impact-analyzer\` 角色规则,分析本次变更影响的模块。
25
-
26
- ### 操作
27
- 1. 读取 \`.sillyspec/workflows/archive-impact.yaml\`,了解角色定义和检查规则
28
- 2. 读取变更目录下的 proposal.md、design.md、tasks.md
29
- 3. 运行 \`git diff --name-only HEAD~1\`(或 \`git diff --name-only --cached\`)获取真实修改文件列表
30
- 4. 读取 \`.sillyspec/docs/<project>/modules/_module-map.yaml\`
31
- - **如果不存在**:提示"建议运行 scan 生成模块映射",但继续执行。跳到步骤 7 生成只有 unmapped 部分的 module-impact.md
32
- 5. 三重交叉验证:
33
- - 声明范围:proposal.md / design.md 中的"变更范围"/"文件变更清单"
34
- - 任务范围:tasks.md / plan.md 中的任务文件路径
35
- - 真实变更:git diff 文件列表
36
- - **以 git diff 为准**(真实 > 声明)
37
- 6. 将 git diff 文件按 \`_module-map.yaml\` 的 paths glob 匹配到模块
38
- 7. 生成模块影响矩阵:
39
-
40
- | 模块 | 影响类型 | 相关文件 | 更新内容摘要 | needs_review |
41
- |------|----------|----------|-------------|-------------|
42
-
43
- 影响类型:逻辑变更 / 数据结构变更 / 接口变更 / 调用关系变更 / 配置变更 / 新增
44
- needs_review:如果影响无法完全确定,标记为 true
45
-
46
- 8. 未匹配到任何模块的文件归入"未匹配文件"表格
47
- 9. 生成 \`.sillyspec/changes/<change-name>/module-impact.md\`
48
- 10. 完成后运行 workflow 检查:
49
- \`node -e "import('./src/workflow.js').then(w => { /* 用 loadWorkflow 加载 archive-impact,用 runPostCheck 检查 */ })\``,
50
- outputHint: 'module-impact.md 路径 + 影响摘要',
51
- optional: false
52
- },
53
- {
54
- name: 'sync-module-docs',
55
- prompt: `根据 module-impact.md 同步更新模块索引和卡片文档。
56
-
57
- ### ⚠️ 核心原则:结构化事实改 _module-map.yaml,语义解释改模块卡片
58
- - \`_module-map.yaml\` 是唯一的结构化索引源(paths/tags/entrypoints/depends_on/used_by/status/needs_review)
59
- - 模块卡片只负责语义说明(定位/契约摘要/关键逻辑/注意事项/人工备注)
60
- - 一个信息只维护一次,不要两边重复
61
-
62
- ### 操作
63
- 1. 读取 \`.sillyspec/changes/<change-name>/module-impact.md\`
64
- 2. 如果没有受影响模块(只有 unmapped)→ 提示用户,跳过同步
65
- 3. 对每个受影响模块,按影响类型分别更新:
66
-
67
- #### 更新 _module-map.yaml 的规则
68
- - **路径变化** → 更新对应模块的 paths
69
- - **依赖变化** → 更新 depends_on / used_by(同时更新反向模块的 used_by / depends_on)
70
- - **导出符号变化** → 更新 entrypoints / main_symbols
71
- - **新增模块** → 添加完整条目
72
- - **模块废弃** → status: deprecated
73
- - **不确定的影响** → needs_review: true, review_reasons 追加原因
74
- - 如果 _module-map.yaml 的 generated_at 已过时,更新为当前时间
75
-
76
- #### 更新模块卡片(modules/<module-id>.md)的规则
77
- - **契约语义变化**(新增/删除对外能力) → 更新"契约摘要"
78
- - **关键逻辑变化** → 更新"关键逻辑"
79
- - **边界变化**(模块职责扩大/缩小) → 更新"定位"
80
- - **注意事项变化** → 更新"注意事项"
81
- - **内部实现变化**(不影响对外接口) → 通常不更新卡片
82
- - **人工备注** → 永远保护,不覆盖
83
-
84
- #### 人工备注保护
85
- 1. 用正则提取 \`<!-- MANUAL_NOTES_START -->\` 到 \`<!-- MANUAL_NOTES_END -->\` 之间的内容
86
- 2. 生成新卡片后,原样回填到人工备注区域
87
- 3. 如果标记缺失或重复 → 在 _module-map.yaml 中标记 needs_review: true
88
-
89
- #### 新建模块卡片模板
90
- \`\`\`markdown
91
- ---
92
- schema_version: 1
93
- doc_type: module-card
94
- module_id: <module-id>
95
- ---
96
-
97
- # <module-id>
98
-
99
- ## 定位
100
-
101
- ## 契约摘要
102
-
103
- ## 关键逻辑
104
-
105
- ## 注意事项
106
-
107
- ## 人工备注
108
-
109
- <!-- MANUAL_NOTES_START -->
110
-
111
- <!-- MANUAL_NOTES_END -->
112
- \`\`\`
113
-
114
- 4. 展示所有更新内容(diff 摘要),**必须暂停等待用户确认**
115
- - 调用:\`sillyspec run archive --wait --reason "等待用户确认模块文档同步" --options "确认写入,跳过同步" --output "diff 摘要"\`
116
- 5. **只有用户通过 --continue --answer "确认写入" 后才写入文件**
117
- - 写入 _module-map.yaml 和受影响的模块卡片
118
- 6. 用户拒绝时,不写入,但提示"module-impact.md 已保留,可稍后手动同步"
119
- 7. 回填 module-impact.md 的"更新结果"表格,区分目标:
120
- - 目标列写 "\`_module-map.yaml: <module-id>\`" 或 "\`modules/<module-id>.md\`"
121
- 8. **同步完成后**,运行 \`sillyspec modules rebuild\` 刷新索引(如果需要),或手动更新 dependencies.md
122
-
123
- ### 输出
124
- 已更新的文件路径列表 + 用户确认状态`,
125
- outputHint: '模块文档更新结果',
126
- optional: false
127
- },
128
21
  {
129
22
  name: '确认归档',
130
- prompt: `确认归档内容,由 CLI 执行目录移动。
23
+ prompt: `展示即将归档的内容,请用户确认。
131
24
 
132
25
  ### 操作
133
- 1. 展示:变更目录名、包含的文件列表(含 module-impact.md)、生成总结
134
- 2. 确保所有 checkbox 都已勾选
135
- 3. 让用户确认后,用 \`--confirm\` 完成本步骤:
136
- \`sillyspec run archive --done --confirm --output "确认归档"\`
137
- 4. CLI 会创建 \`.sillyspec/changes/archive/\`,并将变更目录移动到 \`.sillyspec/changes/archive/YYYY-MM-DD-<change-name>/\`
26
+ 1. 展示:变更目录名、包含的文件列表、生成总结
27
+ 2. 请用户确认是否执行归档
28
+ 3. 确认后:将 \`.sillyspec/changes/<change-name>/\` 移动到 \`.sillyspec/changes/archive/YYYY-MM-DD-<change-name>/\`
29
+ 4. 确保所有 checkbox 都已勾选
138
30
 
139
31
  ### 输出
140
- 归档完成 + archive 目录路径`,
32
+ 归档确认`,
141
33
  outputHint: '归档确认',
142
34
  optional: false
143
35
  },
@@ -147,9 +39,11 @@ module_id: <module-id>
147
39
 
148
40
  ### 操作
149
41
  1. 如果 \`.sillyspec/ROADMAP.md\` 存在,标记对应 Phase 为已完成
150
- 2. \`git add .sillyspec/changes/\` — 暂存归档结果(不要 commit,由用户通过统一提交工具处理)
151
- 3. \`git add .sillyspec/docs/\` — 暂存模块文档更新(如有)
152
- 4. 确认 sillyspec.db 中该变更已不再 active(确认归档步骤由 CLI 调用 unregisterChange)
42
+ 2. \`git add .sillyspec/\` — **不要 commit**,由用户通过统一提交工具处理
43
+ 3. 更新 progress.json:
44
+ - 清除当前变更信息(归档后不再活跃)
45
+ - 如果是主变更(有 MASTER.md),标记所有阶段为 ✅,然后清除
46
+ - 历史记录追加时间 + 归档完成
153
47
 
154
48
  ### 输出
155
49
  归档完成确认 + 累积规范统计`,