sillyspec 3.20.3 → 3.20.4
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/.claude/skills/sillyspec-archive/SKILL.md +21 -17
- package/.claude/skills/sillyspec-auto/SKILL.md +83 -77
- package/.claude/skills/sillyspec-brainstorm/SKILL.md +44 -17
- package/.claude/skills/sillyspec-commit/SKILL.md +106 -105
- package/.claude/skills/sillyspec-continue/SKILL.md +45 -44
- package/.claude/skills/sillyspec-doctor/SKILL.md +31 -22
- package/.claude/skills/sillyspec-execute/SKILL.md +30 -17
- package/.claude/skills/sillyspec-explore/SKILL.md +109 -96
- package/.claude/skills/sillyspec-knowledge/SKILL.md +270 -0
- package/.claude/skills/sillyspec-plan/SKILL.md +21 -52
- package/.claude/skills/sillyspec-propose/SKILL.md +21 -17
- package/.claude/skills/sillyspec-quick/SKILL.md +21 -17
- package/.claude/skills/sillyspec-resume/SKILL.md +68 -111
- package/.claude/skills/sillyspec-scan/SKILL.md +21 -17
- package/.claude/skills/sillyspec-state/SKILL.md +54 -54
- package/.claude/skills/sillyspec-status/SKILL.md +21 -17
- package/.claude/skills/sillyspec-verify/SKILL.md +21 -17
- package/.claude/skills/sillyspec-workspace/SKILL.md +157 -149
- package/.husky/pre-push +13 -0
- package/CLAUDE.md +18 -0
- package/README.md +198 -186
- package/SKILL.md +90 -87
- package/bin/sillyspec.js +2 -2
- package/docs/brainstorm-plan-contract.md +64 -0
- package/docs/plan-execute-contract.md +123 -0
- package/docs/platform-scan-protocol.md +298 -0
- package/docs/revision-mode.md +115 -0
- package/docs/sillyspec/file-lifecycle/known-implementation-gaps.md +99 -0
- package/docs/sillyspec/file-lifecycle/platform-workflows-sync.md +218 -0
- package/docs/sillyspec/file-lifecycle/stage-artifacts.md +167 -0
- package/docs/sillyspec/file-lifecycle/storage-and-state.md +148 -0
- package/docs/sillyspec/file-lifecycle/worktree-and-guard.md +211 -0
- package/docs/sillyspec/file-lifecycle.md +125 -0
- package/docs/workflow-contract-regression.md +106 -0
- package/docs/worktree-isolation.md +252 -0
- package/package.json +40 -34
- package/packages/dashboard/dist/assets/{index-D1EVTLmc.js → index-Bq_Z2hne.js} +7446 -7446
- package/packages/dashboard/dist/assets/index-O2W5RV4z.css +1 -0
- package/packages/dashboard/dist/index.html +16 -16
- package/packages/dashboard/dist/prototype-dashboard.html +836 -0
- package/packages/dashboard/dist/prototype-overview.html +256 -0
- package/packages/dashboard/index.html +15 -15
- package/packages/dashboard/package-lock.json +2384 -2384
- package/packages/dashboard/package.json +25 -25
- package/packages/dashboard/public/prototype-dashboard.html +836 -0
- package/packages/dashboard/public/prototype-overview.html +256 -0
- package/packages/dashboard/server/executor.js +86 -86
- package/packages/dashboard/server/index.js +588 -508
- package/packages/dashboard/server/parser.js +526 -458
- package/packages/dashboard/server/watcher.js +350 -342
- package/packages/dashboard/src/App.vue +558 -325
- package/packages/dashboard/src/components/ActionBar.vue +93 -84
- package/packages/dashboard/src/components/CommandPalette.vue +96 -92
- package/packages/dashboard/src/components/DetailPanel.vue +137 -137
- package/packages/dashboard/src/components/DocPreview.vue +105 -8
- package/packages/dashboard/src/components/DocTree.vue +75 -19
- package/packages/dashboard/src/components/HResizeHandle.vue +48 -0
- package/packages/dashboard/src/components/LogStream.vue +65 -65
- package/packages/dashboard/src/components/PipelineStage.vue +95 -75
- package/packages/dashboard/src/components/PipelineView.vue +156 -129
- package/packages/dashboard/src/components/ProjectCard.vue +187 -0
- package/packages/dashboard/src/components/ProjectList.vue +210 -210
- package/packages/dashboard/src/components/ProjectOverview.vue +113 -139
- package/packages/dashboard/src/components/StageBadge.vue +67 -53
- package/packages/dashboard/src/components/StepCard.vue +94 -89
- package/packages/dashboard/src/components/VResizeHandle.vue +61 -0
- package/packages/dashboard/src/components/detail/DocsDetail.vue +48 -48
- package/packages/dashboard/src/components/detail/GitDetail.vue +61 -61
- package/packages/dashboard/src/components/detail/TechDetail.vue +43 -43
- package/packages/dashboard/src/composables/useDashboard.js +192 -164
- package/packages/dashboard/src/composables/useKeyboard.js +119 -119
- package/packages/dashboard/src/composables/useLayout.js +131 -0
- package/packages/dashboard/src/composables/useWebSocket.js +129 -129
- package/packages/dashboard/src/main.js +8 -8
- package/packages/dashboard/src/style.css +132 -132
- package/packages/dashboard/vite.config.js +18 -18
- package/src/brainstorm-postcheck.js +158 -0
- package/src/change-list.js +52 -0
- package/src/change-risk-profile.js +352 -0
- package/src/classify-change.js +73 -0
- package/src/constants.js +70 -0
- package/src/contract-matrix.js +278 -0
- package/src/db.js +201 -0
- package/src/endpoint-extractor.js +315 -0
- package/src/hooks/claude-pre-tool-use.cjs +125 -0
- package/src/hooks/worktree-guard.js +761 -0
- package/src/index.js +922 -252
- package/src/init.js +431 -375
- package/src/knowledge-match.js +130 -0
- package/src/migrate.js +117 -117
- package/src/modules.js +482 -0
- package/src/progress.js +1734 -508
- package/src/run.js +3465 -652
- package/src/scan-postcheck.js +387 -0
- package/src/setup.js +398 -460
- package/src/stage-contract.js +700 -0
- package/src/stages/archive.js +160 -54
- package/src/stages/brainstorm-auto.js +229 -0
- package/src/stages/brainstorm.js +645 -239
- package/src/stages/doctor.js +365 -312
- package/src/stages/execute.js +625 -264
- package/src/stages/explore.js +34 -0
- package/src/stages/index.js +29 -35
- package/src/stages/knowledge.js +498 -0
- package/src/stages/plan-postcheck.js +511 -0
- package/src/stages/plan.js +582 -279
- package/src/stages/propose.js +174 -115
- package/src/stages/quick.js +102 -63
- package/src/stages/scan.js +558 -141
- package/src/stages/status.js +65 -65
- package/src/stages/verify.js +322 -135
- package/src/sync.js +497 -0
- package/src/task-review.js +346 -0
- package/src/workflow.js +785 -0
- package/src/worktree-apply.js +549 -0
- package/src/worktree-deps.js +185 -0
- package/src/worktree.js +982 -0
- package/templates/workflows/archive-impact.yaml +79 -0
- package/templates/workflows/scan-docs.yaml +132 -0
- package/test/brainstorm-plan-contract.test.mjs +273 -0
- package/test/check-syntax.mjs +26 -0
- package/test/cli-top-level-aliases.test.mjs +174 -0
- package/test/contract-artifacts.test.mjs +323 -0
- package/test/decision-supersede.test.mjs +277 -0
- package/test/knowledge-match.test.mjs +231 -0
- package/test/plan-execute-contract.test.mjs +330 -0
- package/test/plan-optimization.test.mjs +572 -0
- package/test/platform-artifacts.test.mjs +190 -0
- package/test/platform-failure-samples.test.mjs +199 -0
- package/test/platform-recovery-chain.test.mjs +179 -0
- package/test/platform-recovery.test.mjs +167 -0
- package/test/platform-scan-p0.test.mjs +175 -0
- package/test/revision-v1.test.mjs +1145 -0
- package/test/run-sanitize-project-name.test.mjs +51 -0
- package/test/run-scan-postcheck-fail.test.mjs +64 -0
- package/test/run-scan-project-parse.test.mjs +200 -0
- package/test/run-tests.mjs +48 -0
- package/test/scan-docs-yaml-placeholders.test.mjs +84 -0
- package/test/scan-knowledge.test.mjs +175 -0
- package/test/scan-paths.test.mjs +68 -0
- package/test/scan-postcheck-project-priority.test.mjs +85 -0
- package/test/scan-postcheck.test.mjs +197 -0
- package/test/scan-workflow-anyfailed-block.test.mjs +52 -0
- package/test/spec-dir.test.mjs +206 -0
- package/test/stage-contract-failed-post-check.test.mjs +102 -0
- package/test/stage-contract.test.mjs +299 -0
- package/test/stage-definitions.test.mjs +39 -0
- package/test/wait-gates.test.mjs +501 -0
- package/test/workflow-spec-base.test.mjs +142 -0
- package/test/worktree-deps-provision.test.mjs +148 -0
- package/test/worktree-guard.test.mjs +136 -0
- package/test/worktree-native-overlay.test.mjs +188 -0
- package/.sillyspec/changes/archive/2026-04-08-derive-state/design.md +0 -97
- package/.sillyspec/changes/archive/2026-04-08-derive-state/plan.md +0 -51
- package/.sillyspec/changes/archive/2026-04-08-derive-state/proposal.md +0 -29
- package/.sillyspec/changes/archive/2026-04-08-derive-state/requirements.md +0 -34
- package/.sillyspec/changes/archive/2026-04-08-derive-state/tasks.md +0 -13
- package/.sillyspec/changes/archive/2026-04-08-derive-state/verify-result.md +0 -43
- package/.sillyspec/changes/auto-mode/design.md +0 -50
- package/.sillyspec/changes/auto-mode/proposal.md +0 -19
- package/.sillyspec/changes/auto-mode/requirements.md +0 -21
- package/.sillyspec/changes/auto-mode/tasks.md +0 -7
- package/.sillyspec/changes/brainstorm-archive/2026-04-05-dashboard-design.md +0 -206
- package/.sillyspec/changes/brainstorm-archive/2026-04-05-unified-docs-design.md +0 -199
- package/.sillyspec/changes/dashboard/design.md +0 -219
- package/.sillyspec/changes/dashboard/design.md.braindraft +0 -206
- package/.sillyspec/changes/run-command-design/design.md +0 -1230
- package/.sillyspec/changes/unified-docs-design/design.md +0 -199
- package/.sillyspec/docs/sillyspec/scan/.gitkeep +0 -0
- package/.sillyspec/knowledge/INDEX.md +0 -8
- package/.sillyspec/knowledge/uncategorized.md +0 -3
- package/.sillyspec/plans/2026-04-05-dashboard.md +0 -737
- package/.sillyspec/projects/sillyspec.yaml +0 -3
- package/dist/steps/brainstorm/01-load-context.md +0 -30
- package/dist/steps/brainstorm/02-reuse-check.md +0 -6
- package/dist/steps/brainstorm/03-prototype-analysis.md +0 -11
- package/dist/steps/brainstorm/04-module-split.md +0 -23
- package/dist/steps/brainstorm/05-dialog-explore.md +0 -8
- package/dist/steps/brainstorm/06-propose-approaches.md +0 -3
- package/dist/steps/brainstorm/07-present-design.md +0 -3
- package/dist/steps/brainstorm/08-write-design.md +0 -21
- package/dist/steps/brainstorm/09-self-review.md +0 -15
- package/dist/steps/brainstorm/10-user-confirm.md +0 -3
- package/dist/steps/brainstorm/11-output-spec.md +0 -7
- package/dist/steps/brainstorm/manifest.yaml +0 -26
- package/dist/steps/execute/01-load-context.md +0 -41
- package/dist/steps/execute/02-scan-conventions.md +0 -47
- package/dist/steps/execute/03-skill-mcp.md +0 -19
- package/dist/steps/execute/04-assign-task.md +0 -22
- package/dist/steps/execute/04b-prompt-template.md +0 -54
- package/dist/steps/execute/05-write-test.md +0 -7
- package/dist/steps/execute/06-write-code.md +0 -8
- package/dist/steps/execute/07-run-test.md +0 -26
- package/dist/steps/execute/08-fix-issues.md +0 -28
- package/dist/steps/execute/09-next-task.md +0 -33
- package/dist/steps/execute/manifest.yaml +0 -28
- package/dist/steps/plan/01-load-context.md +0 -22
- package/dist/steps/plan/02-anchor-confirm.md +0 -1
- package/dist/steps/plan/03-expand-tasks.md +0 -33
- package/dist/steps/plan/04-mark-order.md +0 -15
- package/dist/steps/plan/05-e2e-planning.md +0 -17
- package/dist/steps/plan/06-self-check.md +0 -16
- package/dist/steps/plan/07-save.md +0 -1
- package/dist/steps/plan/manifest.yaml +0 -18
- package/dist/steps/scan/01-env-detect.md +0 -51
- package/dist/steps/scan/02-tech-stack.md +0 -16
- package/dist/steps/scan/03-conventions.md +0 -16
- package/dist/steps/scan/04-structure.md +0 -19
- package/dist/steps/scan/05-quality.md +0 -18
- package/dist/steps/scan/06-complete.md +0 -49
- package/dist/steps/scan/manifest.yaml +0 -16
- package/dist/steps/verify/01-load-specs.md +0 -28
- package/dist/steps/verify/02-check-tasks.md +0 -1
- package/dist/steps/verify/03-check-design.md +0 -6
- package/dist/steps/verify/04-run-tests.md +0 -7
- package/dist/steps/verify/05-e2e-tests.md +0 -27
- package/dist/steps/verify/05b-e2e-fix.md +0 -33
- package/dist/steps/verify/06-code-quality.md +0 -25
- package/dist/steps/verify/07-lint-check.md +0 -27
- package/dist/steps/verify/08-output-report.md +0 -14
- package/dist/steps/verify/manifest.yaml +0 -22
- package/packages/dashboard/dist/assets/index-DGe8CqeP.css +0 -1
- package/src/derive.js +0 -147
- package/src/step.js +0 -543
|
@@ -1,17 +1,30 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sillyspec:execute
|
|
3
|
-
description:
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
##
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
---
|
|
2
|
+
name: sillyspec:execute
|
|
3
|
+
description: 用于按 plan 执行代码实现。适合用户说"开始写代码、执行任务、跑 execute、开干"。按 plan.md 中的 Wave 和 Task 逐步实现,遵循 design.md 和模块文档。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## 多变更说明
|
|
7
|
+
|
|
8
|
+
如果项目有多个活跃变更(`.sillyspec/changes/` 下有多个目录),所有 `sillyspec run` 命令需要加 `--change <变更名>`。只有一个变更时可省略(CLI 自动检测)。
|
|
9
|
+
|
|
10
|
+
## 执行
|
|
11
|
+
|
|
12
|
+
**你必须使用 exec 工具(shell)执行以下命令,不要自己编造流程:**
|
|
13
|
+
|
|
14
|
+
1. 运行 `sillyspec run execute` — CLI 会自动创建 worktree 隔离环境,然后输出步骤 prompt
|
|
15
|
+
2. 按照输出的 prompt **严格执行**,不要跳过或自行添加步骤
|
|
16
|
+
3. 步骤完成后,运行 `sillyspec run execute --done --output "你的摘要"`
|
|
17
|
+
4. 重复 2-3 直到阶段完成
|
|
18
|
+
5. **禁止**在没有运行 CLI 的情况下自行决定流程
|
|
19
|
+
|
|
20
|
+
## Worktree 隔离
|
|
21
|
+
|
|
22
|
+
- CLI 启动 execute 阶段时**自动创建 git worktree**,AI agent 不需要手动创建
|
|
23
|
+
- Worktree 路径在 Step 3(确认 worktree 路径)中输出,后续子代理的 cwd 必须设为该路径
|
|
24
|
+
- **禁止跳过 worktree 或在主仓库直接写代码**
|
|
25
|
+
- 如果 worktree 创建失败,CLI 会报错并退出,需要排查后再重试
|
|
26
|
+
- **未提交的文件、dirty 状态等不影响 worktree 创建和进入,直接按 CLI 输出的 worktree 路径操作即可**
|
|
27
|
+
- 不要自行检查 git 状态来判断是否可以进入 worktree,CLI 会自动处理
|
|
28
|
+
|
|
29
|
+
## 用户指令
|
|
30
|
+
$ARGUMENTS
|
|
@@ -1,96 +1,109 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sillyspec:explore
|
|
3
|
-
description:
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## 交互规范
|
|
7
|
-
|
|
8
|
-
**当需要用户从多个选项中做出选择时,必须使用 Claude Code 内置的 AskUserQuestion 工具,将选项以参数传入。**
|
|
9
|
-
|
|
10
|
-
不要用编号列表让用户手动输入数字。
|
|
11
|
-
如果需要自由输入,在 AskUserQuestion 的选项中加入"Other(自定义输入)"。
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
你现在是 SillySpec 的自由思考伙伴。
|
|
16
|
-
|
|
17
|
-
## 话题
|
|
18
|
-
$ARGUMENTS
|
|
19
|
-
|
|
20
|
-
##
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
1
|
+
---
|
|
2
|
+
name: sillyspec:explore
|
|
3
|
+
description: 用于自由讨论、代码库调研、方案比较、画 ASCII 图、澄清问题。适合用户说"分析下、讨论下、看看怎么设计、先别写代码、调研一下、画个结构图、帮我再分析下"。只读,不修改文件,不实现功能。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## 交互规范
|
|
7
|
+
|
|
8
|
+
**当需要用户从多个选项中做出选择时,必须使用 Claude Code 内置的 AskUserQuestion 工具,将选项以参数传入。**
|
|
9
|
+
|
|
10
|
+
不要用编号列表让用户手动输入数字。
|
|
11
|
+
如果需要自由输入,在 AskUserQuestion 的选项中加入"Other(自定义输入)"。
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
你现在是 SillySpec 的自由思考伙伴。
|
|
16
|
+
|
|
17
|
+
## 话题
|
|
18
|
+
$ARGUMENTS
|
|
19
|
+
|
|
20
|
+
## 多变更说明
|
|
21
|
+
|
|
22
|
+
如果项目有多个活跃变更(`.sillyspec/changes/` 下有多个目录),所有 `sillyspec run` 命令需要加 `--change <变更名>`。只有一个变更时可省略(CLI 自动检测)。
|
|
23
|
+
|
|
24
|
+
## 执行
|
|
25
|
+
|
|
26
|
+
**你必须先使用 exec 工具(shell)执行以下命令读取统一 CLI prompt:**
|
|
27
|
+
|
|
28
|
+
1. 运行 `sillyspec run explore` — 读取输出的探索模式 prompt
|
|
29
|
+
2. 按照输出的 prompt 和本技能约束执行探索
|
|
30
|
+
3. 探索告一段落后,运行 `sillyspec run explore --done --input "<用户原始话题>" --output "你的摘要"`
|
|
31
|
+
4. **禁止**在没有运行 CLI 的情况下自行决定流程
|
|
32
|
+
|
|
33
|
+
## 这是什么模式
|
|
34
|
+
|
|
35
|
+
**探索模式用于思考,不用于实现。** 你可以读文件、搜代码、调查代码库,但绝对不能写代码或实现功能。如果用户要求实现,提醒他们先退出探索模式。
|
|
36
|
+
|
|
37
|
+
**这不是一个工作流,是一种姿态。** 没有固定步骤、没有必需的输出。你是一个帮助用户思考的伙伴。
|
|
38
|
+
|
|
39
|
+
## 姿态
|
|
40
|
+
|
|
41
|
+
- **好奇,不说教** — 问自然产生的问题,不按脚本走
|
|
42
|
+
- **开放式线程** — 展示多个有趣方向,让用户选择
|
|
43
|
+
- **可视化** — 大量使用 ASCII 图表
|
|
44
|
+
- **自适应** — 追随有趣的线索,随时转向
|
|
45
|
+
- **耐心** — 不急着下结论
|
|
46
|
+
- **务实** — 探索实际代码库,不只纸上谈兵
|
|
47
|
+
|
|
48
|
+
## 你可以做的事
|
|
49
|
+
|
|
50
|
+
**探索问题空间:** 问澄清问题、挑战假设、重新定义问题
|
|
51
|
+
|
|
52
|
+
**调查代码库:** 映射相关架构、找集成点、识别已有模式、暴露隐藏复杂性
|
|
53
|
+
|
|
54
|
+
**比较选项:** 头脑风暴多种方案、建对比表、画权衡分析
|
|
55
|
+
|
|
56
|
+
**画图:**
|
|
57
|
+
```
|
|
58
|
+
┌─────────────────────────────────┐
|
|
59
|
+
│ 用 ASCII 图自由表达 │
|
|
60
|
+
├─────────────────────────────────┤
|
|
61
|
+
│ │
|
|
62
|
+
│ ┌────────┐ ┌────────┐ │
|
|
63
|
+
│ │ State │──────▶│ State │ │
|
|
64
|
+
│ │ A │ │ B │ │
|
|
65
|
+
│ └────────┘ └────────┘ │
|
|
66
|
+
│ │
|
|
67
|
+
└─────────────────────────────────┘
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**暴露风险:** 识别可能出错的地方、发现理解空白
|
|
71
|
+
|
|
72
|
+
## OpenSpec 上下文感知
|
|
73
|
+
|
|
74
|
+
### 检查已有上下文
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# 查看进行中的变更
|
|
78
|
+
ls .sillyspec/changes/ 2>/dev/null | grep -v archive
|
|
79
|
+
# 查看需求
|
|
80
|
+
cat .sillyspec/REQUIREMENTS.md 2>/dev/null
|
|
81
|
+
cat .sillyspec/ROADMAP.md 2>/dev/null
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### 当有进行中的变更时
|
|
85
|
+
|
|
86
|
+
读取变更的 proposal、design、tasks,自然地引用它们。
|
|
87
|
+
|
|
88
|
+
当发现重要的决策时,**提议保存**(不自动保存):
|
|
89
|
+
|
|
90
|
+
请选择:
|
|
91
|
+
1. 写入 design.md
|
|
92
|
+
2. 加入 specs
|
|
93
|
+
3. 暂不保存
|
|
94
|
+
|
|
95
|
+
## 没有必需的结束
|
|
96
|
+
|
|
97
|
+
探索可以:
|
|
98
|
+
1. 创建变更提案 — 流入 proposal
|
|
99
|
+
2. 产出文档更新
|
|
100
|
+
3. 继续探索
|
|
101
|
+
4. 结束探索
|
|
102
|
+
|
|
103
|
+
## 禁止事项
|
|
104
|
+
|
|
105
|
+
- ❌ 写实现代码
|
|
106
|
+
- ❌ 安装依赖
|
|
107
|
+
- ❌ 修改任何文件(除非用户明确要求保存发现)
|
|
108
|
+
- ❌ 强行下结论
|
|
109
|
+
- ❌ 强行结构化(让模式自然涌现)
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sillyspec:knowledge
|
|
3
|
+
description: Agent-safe knowledge base commands for SillySpec repositories. Search, inspect, validate, refresh, and propose knowledge entries.
|
|
4
|
+
argument-hint: "search --query \"<text>\" --limit N | inspect --id \"<id>\" | validate | refresh | propose --title \"<title>\" --category <name>"
|
|
5
|
+
version: "3.19.2"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 交互规范
|
|
9
|
+
当需要用户从多个选项中做出选择时,必须使用 Claude Code 内置的 AskUserQuestion 工具,将选项以参数传入。
|
|
10
|
+
|
|
11
|
+
## 何时使用此技能
|
|
12
|
+
Use this skill when working on a SillySpec repository and the task may depend on prior project knowledge, known issues, implementation patterns, scan-derived learnings, execute-stage knowledge hits, or `.sillyspec/knowledge`.
|
|
13
|
+
|
|
14
|
+
Before implementing changes, **first search the knowledge base** to avoid repeating known work or running into known issues.
|
|
15
|
+
|
|
16
|
+
## 命令列表
|
|
17
|
+
|
|
18
|
+
### 1. knowledge search — 搜索知识库
|
|
19
|
+
在执行任务前搜索相关知识。
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
sillyspec knowledge search --query "<task summary>" --limit 5
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**示例:**
|
|
26
|
+
```bash
|
|
27
|
+
sillyspec knowledge search --query "worktree baseline apply conflict" --limit 5
|
|
28
|
+
sillyspec knowledge search --query "postcheck validation error"
|
|
29
|
+
sillyspec knowledge search --query "GLM usage metadata"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**输出(JSON):**
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"ok": true,
|
|
36
|
+
"query": "worktree baseline",
|
|
37
|
+
"matches": [
|
|
38
|
+
{
|
|
39
|
+
"id": "patterns",
|
|
40
|
+
"path": "knowledge/patterns.md",
|
|
41
|
+
"title": "Patterns",
|
|
42
|
+
"summary": "每个阶段对应 `src/stages/` 下的独立模块...",
|
|
43
|
+
"score": 3,
|
|
44
|
+
"tags": ["worktree", "git-worktree", "WorktreeManager"],
|
|
45
|
+
"category": "Patterns"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**使用场景:**
|
|
52
|
+
- 实现新功能前,检查是否有现有模式可复用
|
|
53
|
+
- 遇到报错前,搜索是否是已知问题
|
|
54
|
+
- 修改特定模块前,了解约定和坑点
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
### 2. knowledge inspect — 读取知识条目详情
|
|
59
|
+
搜索命中后,读取完整条目内容。
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
sillyspec knowledge inspect --id "<knowledge-id>"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**示例:**
|
|
66
|
+
```bash
|
|
67
|
+
sillyspec knowledge inspect --id "patterns"
|
|
68
|
+
sillyspec knowledge inspect --id "known-issues/sqljs-wasm-only"
|
|
69
|
+
sillyspec knowledge inspect --id "generated/worktree-baseline-conflict"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**输出(JSON):**
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"ok": true,
|
|
76
|
+
"entry": {
|
|
77
|
+
"id": "patterns",
|
|
78
|
+
"title": "Patterns",
|
|
79
|
+
"summary": "每个阶段对应 `src/stages/` 下的独立模块...",
|
|
80
|
+
"zone": "manual",
|
|
81
|
+
"path": "knowledge/patterns.md",
|
|
82
|
+
"meta": {
|
|
83
|
+
"author": "qinyi",
|
|
84
|
+
"created_at": "2026-06-19T12:40:00+08:00",
|
|
85
|
+
"updated_at": "2026-06-24T10:00:00+08:00"
|
|
86
|
+
},
|
|
87
|
+
"body": "完整 markdown 内容..."
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**zone 说明:**
|
|
93
|
+
- `manual` — 人工维护的知识(可直接信任)
|
|
94
|
+
- `generated` — 自动提取的知识(scan 生成,需人工审核)
|
|
95
|
+
- `proposed` — 提议待审核的知识(未合并)
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
### 3. knowledge validate — 校验知识库健康度
|
|
100
|
+
在 commit/archive 前检查知识库是否可用。
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
sillyspec knowledge validate
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**输出(JSON):**
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"ok": false,
|
|
110
|
+
"errors": [
|
|
111
|
+
{
|
|
112
|
+
"code": "broken_reference",
|
|
113
|
+
"path": "knowledge/generated/foo.md",
|
|
114
|
+
"referenced_in": "INDEX.md",
|
|
115
|
+
"display": "Foo Pattern"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"code": "empty_file",
|
|
119
|
+
"path": "knowledge/bar.md"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"warnings": [
|
|
123
|
+
{
|
|
124
|
+
"code": "too_many_uncategorized",
|
|
125
|
+
"count": 12,
|
|
126
|
+
"path": "knowledge/uncategorized.md"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"code": "unregistered_file",
|
|
130
|
+
"path": "knowledge/new-file.md"
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
**错误码说明:**
|
|
137
|
+
| code | 说明 |
|
|
138
|
+
|---|---|
|
|
139
|
+
| `knowledge_dir_missing` | `.sillyspec/knowledge/` 目录不存在 |
|
|
140
|
+
| `missing_index` | `INDEX.md` 不存在 |
|
|
141
|
+
| `broken_reference` | INDEX.md 引用的文件不存在 |
|
|
142
|
+
| `empty_file` | 知识文件为空 |
|
|
143
|
+
| `too_many_uncategorized` | uncategorized.md 条目 ≥10,需清理 |
|
|
144
|
+
| `unregistered_file` | 手动知识文件未在 INDEX.md 注册 |
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
### 4. knowledge refresh — 从 scan 文档刷新自动知识
|
|
149
|
+
**仅写 generated/ 区,不覆盖 manual/。**
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
sillyspec knowledge refresh
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**使用场景:**
|
|
156
|
+
- scan 阶段完成后,自动提取可复用知识
|
|
157
|
+
- archive 阶段完成后,沉淀长期有效的模式
|
|
158
|
+
|
|
159
|
+
**行为:**
|
|
160
|
+
1. 扫描 `.sillyspec/docs/<project>/scan/*.md`
|
|
161
|
+
2. 提取每个 `## 章节`(至少 3 行)作为知识条目
|
|
162
|
+
3. 写入 `.sillyspec/knowledge/generated/<slug>.md`
|
|
163
|
+
4. 生成 `generated/INDEX.md`
|
|
164
|
+
|
|
165
|
+
**输出(JSON):**
|
|
166
|
+
```json
|
|
167
|
+
{
|
|
168
|
+
"ok": true,
|
|
169
|
+
"generated_count": 8,
|
|
170
|
+
"new_count": 5,
|
|
171
|
+
"overwritten_count": 3,
|
|
172
|
+
"files": [
|
|
173
|
+
{ "file": "generated/worktree-isolation.md", "title": "...", "new": true },
|
|
174
|
+
{ "file": "generated/progress-management.md", "title": "...", "new": false }
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**注意事项:**
|
|
180
|
+
- generated/ 区知识是自动生成,不保证准确,需人工审核后合并到 manual/
|
|
181
|
+
- 已有文件会被覆盖( overwrite_count)
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
### 5. knowledge propose — 提议新知识
|
|
186
|
+
不直接编辑 manual/,而是写入 proposed/ 供审核。
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
sillyspec knowledge propose --title "<title>" --category <category> --body "<content>" --from "<source>"
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
**参数说明:**
|
|
193
|
+
| 参数 | 必填 | 说明 |
|
|
194
|
+
|---|---|---|
|
|
195
|
+
| `--title` | ✅ | 知识标题 |
|
|
196
|
+
| `--category` | ❌ | 分类(默认 uncategorized),如 known-issues, patterns, conventions |
|
|
197
|
+
| `--body` | ❌ | 知识正文 |
|
|
198
|
+
| `--from` | ❌ | 来源标注(如 execute/quick/scan) |
|
|
199
|
+
|
|
200
|
+
**示例:**
|
|
201
|
+
```bash
|
|
202
|
+
sillyspec knowledge propose --title "GLM API 超时处理" --category known-issues --body "GLM 模型默认超时 30 秒..." --from "execute"
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
**输出(JSON):**
|
|
206
|
+
```json
|
|
207
|
+
{
|
|
208
|
+
"ok": true,
|
|
209
|
+
"id": "proposed/glm-api-timeout",
|
|
210
|
+
"path": "knowledge/proposed/glm-api-timeout.md",
|
|
211
|
+
"title": "GLM API 超时处理",
|
|
212
|
+
"category": "known-issues",
|
|
213
|
+
"new": true,
|
|
214
|
+
"action": "created"
|
|
215
|
+
}
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**后续流程:**
|
|
219
|
+
- archive/commit 阶段审核 proposed/ 条目
|
|
220
|
+
- 合格的合并到 manual/,不合格的删除
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Agent 使用指南
|
|
225
|
+
|
|
226
|
+
### 任务前必查
|
|
227
|
+
在开始实现新功能、修改现有代码、或遇到报错前:
|
|
228
|
+
1. `knowledge search --query "<任务关键词>"`
|
|
229
|
+
2. 命中则 `knowledge inspect --id "<id>"`
|
|
230
|
+
3. 遵循知识中的约定和避坑建议
|
|
231
|
+
|
|
232
|
+
### 发现新知识
|
|
233
|
+
执行任务中发现可复用模式或新坑:
|
|
234
|
+
1. `knowledge propose --title "<标题>" --category <分类> --body "<内容>"`
|
|
235
|
+
2. 不要直接编辑 `.sillyspec/knowledge/manual/*.md`
|
|
236
|
+
|
|
237
|
+
### 提交前校验
|
|
238
|
+
commit/archive 前检查知识库状态:
|
|
239
|
+
1. `knowledge validate`
|
|
240
|
+
2. 如有 errors,先修复再提交
|
|
241
|
+
|
|
242
|
+
### 扫描后刷新
|
|
243
|
+
scan 阶段完成后:
|
|
244
|
+
1. `knowledge refresh`
|
|
245
|
+
2. 审核生成的 `generated/*.md`,有用的合并到 manual/
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## 禁止事项
|
|
250
|
+
|
|
251
|
+
❌ **不要直接编辑** `manual/` 或 `generated/` 中的知识文件
|
|
252
|
+
- 使用 `knowledge propose` 提议新知识
|
|
253
|
+
- 使用 `knowledge refresh` 刷新自动知识
|
|
254
|
+
|
|
255
|
+
❌ **不要使用 `grep` 或 `cat` 直接读取知识文件**
|
|
256
|
+
- 使用 `knowledge search` 和 `knowledge inspect`
|
|
257
|
+
- 它们使用与 execute 阶段相同的匹配引擎
|
|
258
|
+
|
|
259
|
+
❌ **不要让 agent 去审核 proposed/ 条目**
|
|
260
|
+
- 提议供人工审核,不要自动合并
|
|
261
|
+
- 只有用户明确要求才合并
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## 设计原则
|
|
266
|
+
|
|
267
|
+
- **Agent-safe:** 所有输出为 JSON,失败有明确错误码
|
|
268
|
+
- **写保护:** refresh 仅写 generated/,propose 仅写 proposed/,不碰 manual/
|
|
269
|
+
- **匹配引擎:** 使用 `knowledge-match.js`(与 execute 阶段一致)
|
|
270
|
+
- **审计友好:** 每个条目记录来源、创建/更新时间
|
|
@@ -1,52 +1,21 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sillyspec:plan
|
|
3
|
-
description:
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
##
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
3. 每个子代理的任务:
|
|
23
|
-
- 读取 design.md 和 plan.md
|
|
24
|
-
- 读取相关源文件
|
|
25
|
-
- 按格式要求写 task-N.md 并保存
|
|
26
|
-
4. 所有子代理完成后,继续 CLI 的下一步(审查一致性)
|
|
27
|
-
|
|
28
|
-
**子代理 prompt 模板:**
|
|
29
|
-
```
|
|
30
|
-
你是计划编写者。请为以下任务编写详细蓝图。
|
|
31
|
-
|
|
32
|
-
任务:${taskName}
|
|
33
|
-
变更目录:${changeDir}
|
|
34
|
-
文件路径:${changeDir}/tasks/task-${taskNum}.md
|
|
35
|
-
|
|
36
|
-
要求:
|
|
37
|
-
1. 读取 design.md 和 plan.md 了解上下文
|
|
38
|
-
2. 读取相关源文件了解现有代码
|
|
39
|
-
3. 按以下格式编写任务蓝图并保存到文件:
|
|
40
|
-
- 修改文件列表
|
|
41
|
-
- 实现要求
|
|
42
|
-
- 接口定义/数据结构
|
|
43
|
-
- 边界处理
|
|
44
|
-
- 参考
|
|
45
|
-
- TDD 步骤
|
|
46
|
-
- 验收标准(checkbox)
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
**注意:** 手动跑 plan 时不用子代理(串行即可),auto skill 中建议用子代理并行。
|
|
50
|
-
|
|
51
|
-
## 用户指令
|
|
52
|
-
$ARGUMENTS
|
|
1
|
+
---
|
|
2
|
+
name: sillyspec:plan
|
|
3
|
+
description: 用于把 design 拆解为可执行的实现计划。适合用户说"拆任务、做计划、排 wave、规划实现步骤"。产出 plan.md(Wave 分组 + Task 列表 + 依赖关系)。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## 多变更说明
|
|
7
|
+
|
|
8
|
+
如果项目有多个活跃变更(`.sillyspec/changes/` 下有多个目录),所有 `sillyspec run` 命令需要加 `--change <变更名>`。只有一个变更时可省略(CLI 自动检测)。
|
|
9
|
+
|
|
10
|
+
## 执行
|
|
11
|
+
|
|
12
|
+
**你必须使用 exec 工具(shell)执行以下命令,不要自己编造流程:**
|
|
13
|
+
|
|
14
|
+
1. 运行 `sillyspec run plan` — 读取输出的步骤 prompt
|
|
15
|
+
2. 按照输出的 prompt **严格执行**,不要跳过或自行添加步骤
|
|
16
|
+
3. 步骤完成后,运行 `sillyspec run plan --done --output "你的摘要"`
|
|
17
|
+
4. 重复 2-3 直到阶段完成
|
|
18
|
+
5. **禁止**在没有运行 CLI 的情况下自行决定流程
|
|
19
|
+
|
|
20
|
+
## 用户指令
|
|
21
|
+
$ARGUMENTS
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sillyspec:propose
|
|
3
|
-
description: 生成结构化规范 — proposal + design + tasks
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
##
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
---
|
|
2
|
+
name: sillyspec:propose
|
|
3
|
+
description: 生成结构化规范 — proposal + design + tasks
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## 多变更说明
|
|
7
|
+
|
|
8
|
+
如果项目有多个活跃变更(`.sillyspec/changes/` 下有多个目录),所有 `sillyspec run` 命令需要加 `--change <变更名>`。只有一个变更时可省略(CLI 自动检测)。
|
|
9
|
+
|
|
10
|
+
## 执行
|
|
11
|
+
|
|
12
|
+
**你必须使用 exec 工具(shell)执行以下命令,不要自己编造流程:**
|
|
13
|
+
|
|
14
|
+
1. 运行 `sillyspec run propose` — 读取输出的步骤 prompt
|
|
15
|
+
2. 按照输出的 prompt **严格执行**,不要跳过或自行添加步骤
|
|
16
|
+
3. 步骤完成后,运行 `sillyspec run propose --done --output "你的摘要"`
|
|
17
|
+
4. 重复 2-3 直到阶段完成
|
|
18
|
+
5. **禁止**在没有运行 CLI 的情况下自行决定流程
|
|
19
|
+
|
|
20
|
+
## 用户指令
|
|
21
|
+
$ARGUMENTS
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sillyspec:quick
|
|
3
|
-
description:
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
##
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
---
|
|
2
|
+
name: sillyspec:quick
|
|
3
|
+
description: 用于明确、低风险、范围很小的直接任务。适合用户说"直接改、快速修、顺手调整、改个文案、修个小 bug、更新一个文件、不要完整流程"。跳过 brainstorm/plan,但仍按 sillyspec quick 流程执行。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## 多变更说明
|
|
7
|
+
|
|
8
|
+
如果项目有多个活跃变更(`.sillyspec/changes/` 下有多个目录),所有 `sillyspec run` 命令需要加 `--change <变更名>`。只有一个变更时可省略(CLI 自动检测)。
|
|
9
|
+
|
|
10
|
+
## 执行
|
|
11
|
+
|
|
12
|
+
**你必须使用 exec 工具(shell)执行以下命令,不要自己编造流程:**
|
|
13
|
+
|
|
14
|
+
1. 运行 `sillyspec run quick` — 读取输出的步骤 prompt
|
|
15
|
+
2. 按照输出的 prompt **严格执行**,不要跳过或自行添加步骤
|
|
16
|
+
3. 步骤完成后,运行 `sillyspec run quick --done --output "你的摘要"`
|
|
17
|
+
4. 重复 2-3 直到阶段完成
|
|
18
|
+
5. **禁止**在没有运行 CLI 的情况下自行决定流程
|
|
19
|
+
|
|
20
|
+
## 用户指令
|
|
21
|
+
$ARGUMENTS
|