sillyspec 3.26.6 → 3.26.8

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 (42) hide show
  1. package/.claude/skills/sillyspec-doctor/SKILL.md +2 -0
  2. package/.claude/skills/sillyspec-execute/SKILL.md +1 -1
  3. package/.claude/skills/sillyspec-knowledge/SKILL.md +1 -1
  4. package/.claude/skills/sillyspec-plan/SKILL.md +1 -1
  5. package/.husky/pre-push +9 -2
  6. package/bin/sillyspec.js +1 -1
  7. package/package.json +3 -3
  8. package/packages/dashboard/server/index.js +8 -1
  9. package/src/config-schema.js +305 -287
  10. package/src/docs-check.js +333 -0
  11. package/src/docs-debt.js +226 -0
  12. package/src/docs-gate.js +106 -0
  13. package/src/doctor-diagnostics.js +23 -2
  14. package/src/index.js +1880 -1750
  15. package/src/init.js +81 -14
  16. package/src/modules.js +490 -486
  17. package/src/progress.js +37 -13
  18. package/src/quicklog.js +19 -4
  19. package/src/run/command.js +54 -24
  20. package/src/run/complete-handlers.js +1254 -1128
  21. package/src/run/complete.js +8 -34
  22. package/src/run/gates.js +32 -3
  23. package/src/run/prompt.js +713 -633
  24. package/src/run/quick-audit.js +137 -123
  25. package/src/run/shared.js +1109 -929
  26. package/src/run/stage.js +8 -3
  27. package/src/scan-staleness.js +90 -0
  28. package/src/setup.js +27 -9
  29. package/src/sillyhub-mcp/client.js +149 -14
  30. package/src/stage-contract-spec.js +15 -0
  31. package/src/stage-contract.js +8 -5
  32. package/src/stages/brainstorm-auto.js +0 -1
  33. package/src/stages/brainstorm.js +1 -1
  34. package/src/stages/execute.js +985 -967
  35. package/src/stages/plan-postcheck.js +93 -36
  36. package/src/stages/verify.js +1 -1
  37. package/src/sync.js +60 -32
  38. package/src/task-review.js +38 -6
  39. package/src/verify-postcheck.js +22 -5
  40. package/src/worktree-apply.js +6 -3
  41. package/src/worktree-deps.js +5 -3
  42. package/src/worktree.js +4 -2
@@ -63,6 +63,8 @@ sillyspec runtime list # 枚举 .si
63
63
  > `--cleanup-remnant` 清理 init/平台切换残留的 0 字节空 db(占位但无数据)。默认 dry-run 只报告,`--confirm` 才删。绝不删有内容的 db。
64
64
  >
65
65
  > `runtime list` 是只读枚举:列出 `.sillyspec/.runtime/` 下的 db、doctor-diagnosis.json、workflow-runs/、user-inputs.md 等产物及用途。多会话/压缩后想知道「我手上有哪些证据文件」时用。加 `--json` 程序化读取。
66
+ >
67
+ > `doctor --json` 的 pointer_health 维度含 `pointer_missing_but_managed` 信号:项目根存在平台接管声明(`.sillyspec-platform-managed`)但恢复指针缺失——此状态下裸调命令会 fail-closed 拒绝静默落本地。恢复路径见信号文案:重跑平台 scan 重建指针 / `sillyspec platform disconnect` 彻底脱离 / 显式 `--spec-dir` 临时指定。
66
68
 
67
69
  ## 铁律
68
70
 
@@ -129,8 +129,8 @@ execute 还有**第二道**独立的 stage 级审查:除逐 task review.json
129
129
  - **local.yaml `repos:` 段**:在 `.sillyspec/local.yaml` 注册跨仓仓路径(`main` 不用注册,隐式=当前项目):
130
130
  ```yaml
131
131
  repos:
132
- sillyspec: C:/Users/qinyi/IdeaProjects/sillyspec
133
132
  shared-lib: ../shared-lib
133
+ tool-repo: C:/path/to/your/tool-repo
134
134
  ```
135
135
  task 卡 `repo:` 引用的 key 必须在此注册,否则 execute 启动 fail-closed 阻断(跨仓 apply 走错仓=数据所有权事故,配置错误不降级)。
136
136
  - **跨仓 task 的 `allowed_paths`**:指**相对跨仓仓根**的路径(非主仓根)。
@@ -80,7 +80,7 @@ sillyspec knowledge inspect --id "generated/worktree-baseline-conflict"
80
80
  "zone": "manual",
81
81
  "path": "knowledge/patterns.md",
82
82
  "meta": {
83
- "author": "qinyi",
83
+ "author": "<git-user>",
84
84
  "created_at": "2026-06-19T12:40:00+08:00",
85
85
  "updated_at": "2026-06-24T10:00:00+08:00"
86
86
  },
@@ -100,8 +100,8 @@ plan 完成校验会检查:design 提到入口文件(cli.ts/main.ts/server.t
100
100
 
101
101
  ```yaml
102
102
  repos:
103
- sillyspec: C:/Users/qinyi/IdeaProjects/sillyspec
104
103
  shared-lib: ../shared-lib
104
+ tool-repo: C:/path/to/your/tool-repo
105
105
  ```
106
106
 
107
107
  key = task 卡 `repo:` 引用名,value = 跨仓仓绝对路径(或相对主仓根的路径)。`main` 不用注册。
package/.husky/pre-push CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/bin/sh
2
- echo "🔧 pre-push: running lint + test..."
2
+ echo "🔧 pre-push: running lint + test + docs gate..."
3
3
  npm run lint --silent 2>&1
4
4
  if [ $? -ne 0 ]; then
5
5
  echo "❌ pre-push: lint failed, aborting push"
@@ -10,4 +10,11 @@ if [ $? -ne 0 ]; then
10
10
  echo "❌ pre-push: test failed, aborting push"
11
11
  exit 1
12
12
  fi
13
- echo "✅ pre-push: lint + test passed"
13
+ # docs gate ratchet(doc-consistency-debt 第七节):docs check 失效数 ≤ 基线放行。
14
+ # 基线 .sillyspec/docs-check-baseline 缺失/损坏时 fail-closed exit 2 拦截。
15
+ node bin/sillyspec.js docs gate 2>&1
16
+ if [ $? -ne 0 ]; then
17
+ echo "❌ pre-push: docs gate failed, aborting push"
18
+ exit 1
19
+ fi
20
+ echo "✅ pre-push: lint + test + docs gate passed"
package/bin/sillyspec.js CHANGED
@@ -1,2 +1,2 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
  import '../src/index.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sillyspec",
3
- "version": "3.26.6",
3
+ "version": "3.26.8",
4
4
  "description": "SillySpec CLI — 流程状态机,让 AI 严格按步骤来",
5
5
  "icon": "logo.jpg",
6
6
  "homepage": "https://sillyspec.ppdmq.top/",
@@ -31,9 +31,9 @@
31
31
  "@inquirer/prompts": "^7.10.1",
32
32
  "chalk": "^5.6.2",
33
33
  "chokidar": "^4.0",
34
- "js-yaml": "^4.2.0",
34
+ "js-yaml": "^4.3.1",
35
35
  "open": "^10.1",
36
36
  "ora": "^9.3.0",
37
- "ws": "^8.18"
37
+ "ws": "^8.21.3"
38
38
  }
39
39
  }
@@ -103,6 +103,13 @@ function isSillyspecPath(filePath) {
103
103
  return parts.includes('.sillyspec')
104
104
  }
105
105
 
106
+ // 凭据/敏感运行时文件:local.yaml 含 SillyHub token(connect 明文写入),.plan.md.lock 等锁文件
107
+ // 是并发原语非文档。/api/docs/content 无鉴权(仅 Origin 检查),这些文件绝不经 HTTP 暴露。
108
+ function isCredentialPath(filePath) {
109
+ const base = basename(resolve(filePath)).toLowerCase()
110
+ return base === 'local.yaml' || base === 'local.yml' || base.endsWith('.lock') || base === 'sillyspec-platform.json'
111
+ }
112
+
106
113
  function isViewableDocPath(filePath) {
107
114
  return /\.(md|markdown|mdx|html?|txt|log|json|ya?ml|toml|xml|csv)$/i.test(filePath)
108
115
  }
@@ -377,7 +384,7 @@ function startServer({ port = 3456, open: openBrowser = true } = {}) {
377
384
  }
378
385
  // Security: only allow reading viewable text documents under a .sillyspec tree.
379
386
  const normalizedPath = resolve(filePath)
380
- if (!isSillyspecPath(normalizedPath) || !isViewableDocPath(normalizedPath)) {
387
+ if (!isSillyspecPath(normalizedPath) || !isViewableDocPath(normalizedPath) || isCredentialPath(normalizedPath)) {
381
388
  res.writeHead(403)
382
389
  res.end(JSON.stringify({ error: 'Access denied' }))
383
390
  return