sillyspec 3.27.12 → 3.28.0

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 (1207) hide show
  1. package/.claude/skills/sillyspec-execute/SKILL.md +214 -214
  2. package/.claude/skills/sillyspec-plan/SKILL.md +156 -156
  3. package/.claude/skills/sillyspec-quick/SKILL.md +116 -116
  4. package/package.json +1 -1
  5. package/src/agent-session-log.js +77 -10
  6. package/src/config-schema.js +2 -2
  7. package/src/contract-matrix.js +15 -2
  8. package/src/doctor-diagnostics.js +64 -1
  9. package/src/endpoint-extractor.js +100 -24
  10. package/src/index.js +36 -5
  11. package/src/machine-interface.js +63 -0
  12. package/src/progress/stage-machine.js +106 -1
  13. package/src/progress.js +3 -0
  14. package/src/run/command.js +1 -1
  15. package/src/run/complete-handlers.js +31 -3
  16. package/src/run/complete.js +12 -4
  17. package/src/run/quick-audit.js +98 -0
  18. package/src/run/shared.js +54 -0
  19. package/src/run/stage.js +18 -11
  20. package/src/spec-sync.js +191 -14
  21. package/src/stages/execute.js +6 -2
  22. package/src/sync.js +122 -4
  23. package/src/task-review.js +51 -4
  24. package/src/verify-postcheck.js +60 -8
  25. package/src/verify-probes.js +3 -0
  26. package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-archive/SKILL.md +0 -87
  27. package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-auto/SKILL.md +0 -93
  28. package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-brainstorm/SKILL.md +0 -114
  29. package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-commit/SKILL.md +0 -67
  30. package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-continue/SKILL.md +0 -47
  31. package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-doctor/SKILL.md +0 -76
  32. package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-execute/SKILL.md +0 -214
  33. package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-explore/SKILL.md +0 -102
  34. package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-export/SKILL.md +0 -57
  35. package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-init/SKILL.md +0 -177
  36. package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-knowledge/SKILL.md +0 -270
  37. package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-plan/SKILL.md +0 -156
  38. package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-quick/SKILL.md +0 -116
  39. package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-resume/SKILL.md +0 -70
  40. package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-scan/SKILL.md +0 -79
  41. package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-state/SKILL.md +0 -64
  42. package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-status/SKILL.md +0 -54
  43. package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-verify/SKILL.md +0 -87
  44. package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-workspace/SKILL.md +0 -175
  45. package/.claude/worktrees/sillyspec-data-model-research/.gitattributes +0 -2
  46. package/.claude/worktrees/sillyspec-data-model-research/.husky/pre-push +0 -20
  47. package/.claude/worktrees/sillyspec-data-model-research/README.md +0 -203
  48. package/.claude/worktrees/sillyspec-data-model-research/SKILL.md +0 -91
  49. package/.claude/worktrees/sillyspec-data-model-research/bin/sillyspec.js +0 -2
  50. package/.claude/worktrees/sillyspec-data-model-research/logo.jpg +0 -0
  51. package/.claude/worktrees/sillyspec-data-model-research/package-lock.json +0 -977
  52. package/.claude/worktrees/sillyspec-data-model-research/package.json +0 -39
  53. package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/dist/assets/index-Bq_Z2hne.js +0 -7446
  54. package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/dist/assets/index-O2W5RV4z.css +0 -1
  55. package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/dist/favicon.jpg +0 -0
  56. package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/dist/index.html +0 -16
  57. package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/dist/logo.jpg +0 -0
  58. package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/dist/prototype-dashboard.html +0 -836
  59. package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/dist/prototype-overview.html +0 -256
  60. package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/package.json +0 -25
  61. package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/server/executor.js +0 -95
  62. package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/server/index.js +0 -679
  63. package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/server/parser.js +0 -526
  64. package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/server/watcher.js +0 -357
  65. package/.claude/worktrees/sillyspec-data-model-research/src/agent-session-log.js +0 -803
  66. package/.claude/worktrees/sillyspec-data-model-research/src/change-list.js +0 -290
  67. package/.claude/worktrees/sillyspec-data-model-research/src/change-risk-profile.js +0 -270
  68. package/.claude/worktrees/sillyspec-data-model-research/src/check-primitives.js +0 -65
  69. package/.claude/worktrees/sillyspec-data-model-research/src/classify-change.js +0 -109
  70. package/.claude/worktrees/sillyspec-data-model-research/src/commit-suggest.js +0 -202
  71. package/.claude/worktrees/sillyspec-data-model-research/src/config-cat.js +0 -88
  72. package/.claude/worktrees/sillyspec-data-model-research/src/config-schema.js +0 -328
  73. package/.claude/worktrees/sillyspec-data-model-research/src/constants.js +0 -97
  74. package/.claude/worktrees/sillyspec-data-model-research/src/contract-matrix.js +0 -480
  75. package/.claude/worktrees/sillyspec-data-model-research/src/datetime.js +0 -20
  76. package/.claude/worktrees/sillyspec-data-model-research/src/db-engine.js +0 -55
  77. package/.claude/worktrees/sillyspec-data-model-research/src/db.js +0 -381
  78. package/.claude/worktrees/sillyspec-data-model-research/src/decision-distill.js +0 -517
  79. package/.claude/worktrees/sillyspec-data-model-research/src/dispatch/backends/local-agent.js +0 -155
  80. package/.claude/worktrees/sillyspec-data-model-research/src/dispatch/backends/sillyhub-mcp.js +0 -245
  81. package/.claude/worktrees/sillyspec-data-model-research/src/dispatch/probe.js +0 -246
  82. package/.claude/worktrees/sillyspec-data-model-research/src/dispatch/strategy.js +0 -121
  83. package/.claude/worktrees/sillyspec-data-model-research/src/docs-check.js +0 -825
  84. package/.claude/worktrees/sillyspec-data-model-research/src/docs-debt.js +0 -393
  85. package/.claude/worktrees/sillyspec-data-model-research/src/docs-gate.js +0 -107
  86. package/.claude/worktrees/sillyspec-data-model-research/src/doctor-diagnostics.js +0 -1099
  87. package/.claude/worktrees/sillyspec-data-model-research/src/endpoint-extractor.js +0 -420
  88. package/.claude/worktrees/sillyspec-data-model-research/src/foreign-declared.js +0 -78
  89. package/.claude/worktrees/sillyspec-data-model-research/src/fs-atomic.js +0 -73
  90. package/.claude/worktrees/sillyspec-data-model-research/src/git-helper.js +0 -150
  91. package/.claude/worktrees/sillyspec-data-model-research/src/hooks/claude-pre-tool-use.cjs +0 -130
  92. package/.claude/worktrees/sillyspec-data-model-research/src/hooks/worktree-guard.js +0 -892
  93. package/.claude/worktrees/sillyspec-data-model-research/src/index.js +0 -2798
  94. package/.claude/worktrees/sillyspec-data-model-research/src/init.js +0 -626
  95. package/.claude/worktrees/sillyspec-data-model-research/src/knowledge-match.js +0 -231
  96. package/.claude/worktrees/sillyspec-data-model-research/src/local-detect.js +0 -128
  97. package/.claude/worktrees/sillyspec-data-model-research/src/local-register.js +0 -104
  98. package/.claude/worktrees/sillyspec-data-model-research/src/machine-interface.js +0 -543
  99. package/.claude/worktrees/sillyspec-data-model-research/src/migrate.js +0 -127
  100. package/.claude/worktrees/sillyspec-data-model-research/src/module-impact.js +0 -166
  101. package/.claude/worktrees/sillyspec-data-model-research/src/module-resolve.js +0 -222
  102. package/.claude/worktrees/sillyspec-data-model-research/src/modules.js +0 -580
  103. package/.claude/worktrees/sillyspec-data-model-research/src/progress/change-registry.js +0 -336
  104. package/.claude/worktrees/sillyspec-data-model-research/src/progress/consistency-doctor.js +0 -355
  105. package/.claude/worktrees/sillyspec-data-model-research/src/progress/shared.js +0 -36
  106. package/.claude/worktrees/sillyspec-data-model-research/src/progress/stage-machine.js +0 -594
  107. package/.claude/worktrees/sillyspec-data-model-research/src/progress/step-store.js +0 -265
  108. package/.claude/worktrees/sillyspec-data-model-research/src/progress.js +0 -1304
  109. package/.claude/worktrees/sillyspec-data-model-research/src/quick-recommend.js +0 -115
  110. package/.claude/worktrees/sillyspec-data-model-research/src/quicklog.js +0 -852
  111. package/.claude/worktrees/sillyspec-data-model-research/src/review-tier.js +0 -77
  112. package/.claude/worktrees/sillyspec-data-model-research/src/run/command.js +0 -1595
  113. package/.claude/worktrees/sillyspec-data-model-research/src/run/complete-handlers.js +0 -1552
  114. package/.claude/worktrees/sillyspec-data-model-research/src/run/complete.js +0 -1259
  115. package/.claude/worktrees/sillyspec-data-model-research/src/run/concurrent-detect.js +0 -156
  116. package/.claude/worktrees/sillyspec-data-model-research/src/run/gates.js +0 -1084
  117. package/.claude/worktrees/sillyspec-data-model-research/src/run/multi-repo-context.js +0 -208
  118. package/.claude/worktrees/sillyspec-data-model-research/src/run/next.js +0 -128
  119. package/.claude/worktrees/sillyspec-data-model-research/src/run/prompt.js +0 -843
  120. package/.claude/worktrees/sillyspec-data-model-research/src/run/quick-audit.js +0 -186
  121. package/.claude/worktrees/sillyspec-data-model-research/src/run/scan-profile.js +0 -269
  122. package/.claude/worktrees/sillyspec-data-model-research/src/run/shared.js +0 -1562
  123. package/.claude/worktrees/sillyspec-data-model-research/src/run/stage.js +0 -584
  124. package/.claude/worktrees/sillyspec-data-model-research/src/run.js +0 -23
  125. package/.claude/worktrees/sillyspec-data-model-research/src/scan-diff.js +0 -388
  126. package/.claude/worktrees/sillyspec-data-model-research/src/scan-postcheck.js +0 -512
  127. package/.claude/worktrees/sillyspec-data-model-research/src/scan-staleness.js +0 -95
  128. package/.claude/worktrees/sillyspec-data-model-research/src/setup.js +0 -414
  129. package/.claude/worktrees/sillyspec-data-model-research/src/sillyhub-mcp/client.js +0 -597
  130. package/.claude/worktrees/sillyspec-data-model-research/src/sillyhub-mcp/config.js +0 -62
  131. package/.claude/worktrees/sillyspec-data-model-research/src/spec-dir-typo.js +0 -50
  132. package/.claude/worktrees/sillyspec-data-model-research/src/spec-sync.js +0 -358
  133. package/.claude/worktrees/sillyspec-data-model-research/src/stage-contract-engine.js +0 -171
  134. package/.claude/worktrees/sillyspec-data-model-research/src/stage-contract-spec.js +0 -550
  135. package/.claude/worktrees/sillyspec-data-model-research/src/stage-contract.js +0 -889
  136. package/.claude/worktrees/sillyspec-data-model-research/src/stage-review.js +0 -597
  137. package/.claude/worktrees/sillyspec-data-model-research/src/stages/archive.js +0 -199
  138. package/.claude/worktrees/sillyspec-data-model-research/src/stages/brainstorm-auto.js +0 -236
  139. package/.claude/worktrees/sillyspec-data-model-research/src/stages/brainstorm.js +0 -617
  140. package/.claude/worktrees/sillyspec-data-model-research/src/stages/cmd-existence.js +0 -145
  141. package/.claude/worktrees/sillyspec-data-model-research/src/stages/doctor.js +0 -540
  142. package/.claude/worktrees/sillyspec-data-model-research/src/stages/execute.js +0 -1275
  143. package/.claude/worktrees/sillyspec-data-model-research/src/stages/explore.js +0 -43
  144. package/.claude/worktrees/sillyspec-data-model-research/src/stages/index.js +0 -29
  145. package/.claude/worktrees/sillyspec-data-model-research/src/stages/knowledge.js +0 -514
  146. package/.claude/worktrees/sillyspec-data-model-research/src/stages/plan-postcheck.js +0 -1344
  147. package/.claude/worktrees/sillyspec-data-model-research/src/stages/plan.js +0 -650
  148. package/.claude/worktrees/sillyspec-data-model-research/src/stages/quick.js +0 -167
  149. package/.claude/worktrees/sillyspec-data-model-research/src/stages/scan.js +0 -608
  150. package/.claude/worktrees/sillyspec-data-model-research/src/stages/status.js +0 -64
  151. package/.claude/worktrees/sillyspec-data-model-research/src/stages/verify.js +0 -246
  152. package/.claude/worktrees/sillyspec-data-model-research/src/sync.js +0 -1470
  153. package/.claude/worktrees/sillyspec-data-model-research/src/task-review.js +0 -1498
  154. package/.claude/worktrees/sillyspec-data-model-research/src/taskcard.js +0 -210
  155. package/.claude/worktrees/sillyspec-data-model-research/src/verify-postcheck.js +0 -1718
  156. package/.claude/worktrees/sillyspec-data-model-research/src/verify-probes.js +0 -277
  157. package/.claude/worktrees/sillyspec-data-model-research/src/version.js +0 -19
  158. package/.claude/worktrees/sillyspec-data-model-research/src/workflow.js +0 -600
  159. package/.claude/worktrees/sillyspec-data-model-research/src/workspace.js +0 -125
  160. package/.claude/worktrees/sillyspec-data-model-research/src/worktree-apply.js +0 -1446
  161. package/.claude/worktrees/sillyspec-data-model-research/src/worktree-deps.js +0 -576
  162. package/.claude/worktrees/sillyspec-data-model-research/src/worktree.js +0 -1715
  163. package/.claude/worktrees/sillyspec-data-model-research/templates/claude-instruction.md +0 -23
  164. package/.claude/worktrees/sillyspec-data-model-research/templates/prompts/taskcard-rules.md +0 -28
  165. package/.claude/worktrees/sillyspec-data-model-research/templates/prompts/testcase-design.md +0 -12
  166. package/.claude/worktrees/sillyspec-data-model-research/templates/prompts/verify-probes.md +0 -32
  167. package/.claude/worktrees/sillyspec-data-model-research/templates/workflows/archive-impact.yaml +0 -79
  168. package/.claude/worktrees/sillyspec-data-model-research/templates/workflows/scan-docs.yaml +0 -132
  169. package/.worktrees/2c37b1d7/.claude/skills/sillyspec-archive/SKILL.md +0 -87
  170. package/.worktrees/2c37b1d7/.claude/skills/sillyspec-auto/SKILL.md +0 -93
  171. package/.worktrees/2c37b1d7/.claude/skills/sillyspec-brainstorm/SKILL.md +0 -114
  172. package/.worktrees/2c37b1d7/.claude/skills/sillyspec-commit/SKILL.md +0 -67
  173. package/.worktrees/2c37b1d7/.claude/skills/sillyspec-continue/SKILL.md +0 -47
  174. package/.worktrees/2c37b1d7/.claude/skills/sillyspec-doctor/SKILL.md +0 -76
  175. package/.worktrees/2c37b1d7/.claude/skills/sillyspec-execute/SKILL.md +0 -214
  176. package/.worktrees/2c37b1d7/.claude/skills/sillyspec-explore/SKILL.md +0 -102
  177. package/.worktrees/2c37b1d7/.claude/skills/sillyspec-export/SKILL.md +0 -57
  178. package/.worktrees/2c37b1d7/.claude/skills/sillyspec-init/SKILL.md +0 -177
  179. package/.worktrees/2c37b1d7/.claude/skills/sillyspec-knowledge/SKILL.md +0 -270
  180. package/.worktrees/2c37b1d7/.claude/skills/sillyspec-plan/SKILL.md +0 -156
  181. package/.worktrees/2c37b1d7/.claude/skills/sillyspec-propose/SKILL.md +0 -87
  182. package/.worktrees/2c37b1d7/.claude/skills/sillyspec-quick/SKILL.md +0 -116
  183. package/.worktrees/2c37b1d7/.claude/skills/sillyspec-resume/SKILL.md +0 -70
  184. package/.worktrees/2c37b1d7/.claude/skills/sillyspec-scan/SKILL.md +0 -79
  185. package/.worktrees/2c37b1d7/.claude/skills/sillyspec-state/SKILL.md +0 -64
  186. package/.worktrees/2c37b1d7/.claude/skills/sillyspec-status/SKILL.md +0 -54
  187. package/.worktrees/2c37b1d7/.claude/skills/sillyspec-verify/SKILL.md +0 -87
  188. package/.worktrees/2c37b1d7/.claude/skills/sillyspec-workspace/SKILL.md +0 -175
  189. package/.worktrees/2c37b1d7/.claude/skills/verify-per-user/SKILL.md +0 -6
  190. package/.worktrees/2c37b1d7/.gitattributes +0 -2
  191. package/.worktrees/2c37b1d7/.husky/pre-push +0 -20
  192. package/.worktrees/2c37b1d7/README.md +0 -203
  193. package/.worktrees/2c37b1d7/SKILL.md +0 -91
  194. package/.worktrees/2c37b1d7/architecture-analysis.md +0 -448
  195. package/.worktrees/2c37b1d7/bin/sillyspec.js +0 -2
  196. package/.worktrees/2c37b1d7/eval/README.md +0 -86
  197. package/.worktrees/2c37b1d7/eval/eval.config.json +0 -28
  198. package/.worktrees/2c37b1d7/eval/lib/adapters/cli.mjs +0 -63
  199. package/.worktrees/2c37b1d7/eval/lib/adapters/dryrun.mjs +0 -27
  200. package/.worktrees/2c37b1d7/eval/lib/config.mjs +0 -82
  201. package/.worktrees/2c37b1d7/eval/lib/db.mjs +0 -76
  202. package/.worktrees/2c37b1d7/eval/lib/report.mjs +0 -120
  203. package/.worktrees/2c37b1d7/eval/lib/runner.mjs +0 -157
  204. package/.worktrees/2c37b1d7/eval/lib/tasks.mjs +0 -73
  205. package/.worktrees/2c37b1d7/eval/lib/util.mjs +0 -107
  206. package/.worktrees/2c37b1d7/eval/lib/workdir.mjs +0 -30
  207. package/.worktrees/2c37b1d7/eval/run.mjs +0 -83
  208. package/.worktrees/2c37b1d7/eval/tasks/001-slugify/files/package.json +0 -6
  209. package/.worktrees/2c37b1d7/eval/tasks/001-slugify/solution/src/slugify.mjs +0 -26
  210. package/.worktrees/2c37b1d7/eval/tasks/001-slugify/task.json +0 -6
  211. package/.worktrees/2c37b1d7/eval/tasks/001-slugify/verify.mjs +0 -28
  212. package/.worktrees/2c37b1d7/eval/tasks/002-each-day/files/package.json +0 -6
  213. package/.worktrees/2c37b1d7/eval/tasks/002-each-day/files/src/dates.mjs +0 -4
  214. package/.worktrees/2c37b1d7/eval/tasks/002-each-day/solution/src/dates.mjs +0 -30
  215. package/.worktrees/2c37b1d7/eval/tasks/002-each-day/task.json +0 -6
  216. package/.worktrees/2c37b1d7/eval/tasks/002-each-day/verify.mjs +0 -31
  217. package/.worktrees/2c37b1d7/eval/tasks/003-word-report/files/data/notes.txt +0 -5
  218. package/.worktrees/2c37b1d7/eval/tasks/003-word-report/files/package.json +0 -6
  219. package/.worktrees/2c37b1d7/eval/tasks/003-word-report/solution/bin/report.mjs +0 -36
  220. package/.worktrees/2c37b1d7/eval/tasks/003-word-report/task.json +0 -6
  221. package/.worktrees/2c37b1d7/eval/tasks/003-word-report/verify.mjs +0 -38
  222. package/.worktrees/2c37b1d7/logo.jpg +0 -0
  223. package/.worktrees/2c37b1d7/package-lock.json +0 -977
  224. package/.worktrees/2c37b1d7/package.json +0 -41
  225. package/.worktrees/2c37b1d7/packages/dashboard/dist/assets/index-Bq_Z2hne.js +0 -7446
  226. package/.worktrees/2c37b1d7/packages/dashboard/dist/assets/index-O2W5RV4z.css +0 -1
  227. package/.worktrees/2c37b1d7/packages/dashboard/dist/favicon.jpg +0 -0
  228. package/.worktrees/2c37b1d7/packages/dashboard/dist/index.html +0 -16
  229. package/.worktrees/2c37b1d7/packages/dashboard/dist/logo.jpg +0 -0
  230. package/.worktrees/2c37b1d7/packages/dashboard/dist/prototype-dashboard.html +0 -836
  231. package/.worktrees/2c37b1d7/packages/dashboard/dist/prototype-overview.html +0 -256
  232. package/.worktrees/2c37b1d7/packages/dashboard/package.json +0 -25
  233. package/.worktrees/2c37b1d7/packages/dashboard/server/executor.js +0 -95
  234. package/.worktrees/2c37b1d7/packages/dashboard/server/index.js +0 -679
  235. package/.worktrees/2c37b1d7/packages/dashboard/server/parser.js +0 -526
  236. package/.worktrees/2c37b1d7/packages/dashboard/server/watcher.js +0 -357
  237. package/.worktrees/2c37b1d7/src/agent-session-log.js +0 -803
  238. package/.worktrees/2c37b1d7/src/change-list.js +0 -290
  239. package/.worktrees/2c37b1d7/src/change-risk-profile.js +0 -339
  240. package/.worktrees/2c37b1d7/src/check-primitives.js +0 -65
  241. package/.worktrees/2c37b1d7/src/classify-change.js +0 -109
  242. package/.worktrees/2c37b1d7/src/commit-suggest.js +0 -202
  243. package/.worktrees/2c37b1d7/src/config-cat.js +0 -88
  244. package/.worktrees/2c37b1d7/src/config-schema.js +0 -328
  245. package/.worktrees/2c37b1d7/src/constants.js +0 -97
  246. package/.worktrees/2c37b1d7/src/contract-matrix.js +0 -533
  247. package/.worktrees/2c37b1d7/src/datetime.js +0 -20
  248. package/.worktrees/2c37b1d7/src/db-engine.js +0 -55
  249. package/.worktrees/2c37b1d7/src/db.js +0 -381
  250. package/.worktrees/2c37b1d7/src/decision-distill.js +0 -517
  251. package/.worktrees/2c37b1d7/src/dispatch/backends/local-agent.js +0 -155
  252. package/.worktrees/2c37b1d7/src/dispatch/backends/sillyhub-mcp.js +0 -245
  253. package/.worktrees/2c37b1d7/src/dispatch/probe.js +0 -246
  254. package/.worktrees/2c37b1d7/src/dispatch/strategy.js +0 -121
  255. package/.worktrees/2c37b1d7/src/docs-check.js +0 -825
  256. package/.worktrees/2c37b1d7/src/docs-debt.js +0 -393
  257. package/.worktrees/2c37b1d7/src/docs-gate.js +0 -107
  258. package/.worktrees/2c37b1d7/src/doctor-diagnostics.js +0 -1099
  259. package/.worktrees/2c37b1d7/src/endpoint-extractor.js +0 -409
  260. package/.worktrees/2c37b1d7/src/foreign-declared.js +0 -155
  261. package/.worktrees/2c37b1d7/src/fs-atomic.js +0 -73
  262. package/.worktrees/2c37b1d7/src/git-helper.js +0 -150
  263. package/.worktrees/2c37b1d7/src/hooks/claude-pre-tool-use.cjs +0 -130
  264. package/.worktrees/2c37b1d7/src/hooks/worktree-guard.js +0 -892
  265. package/.worktrees/2c37b1d7/src/index.js +0 -2854
  266. package/.worktrees/2c37b1d7/src/init.js +0 -626
  267. package/.worktrees/2c37b1d7/src/knowledge-match.js +0 -231
  268. package/.worktrees/2c37b1d7/src/local-detect.js +0 -128
  269. package/.worktrees/2c37b1d7/src/local-register.js +0 -104
  270. package/.worktrees/2c37b1d7/src/machine-interface.js +0 -543
  271. package/.worktrees/2c37b1d7/src/migrate.js +0 -127
  272. package/.worktrees/2c37b1d7/src/module-impact.js +0 -166
  273. package/.worktrees/2c37b1d7/src/module-resolve.js +0 -222
  274. package/.worktrees/2c37b1d7/src/modules.js +0 -580
  275. package/.worktrees/2c37b1d7/src/plan-adopt-waves.js +0 -126
  276. package/.worktrees/2c37b1d7/src/progress/change-registry.js +0 -336
  277. package/.worktrees/2c37b1d7/src/progress/consistency-doctor.js +0 -355
  278. package/.worktrees/2c37b1d7/src/progress/shared.js +0 -36
  279. package/.worktrees/2c37b1d7/src/progress/stage-machine.js +0 -594
  280. package/.worktrees/2c37b1d7/src/progress/step-store.js +0 -265
  281. package/.worktrees/2c37b1d7/src/progress.js +0 -1304
  282. package/.worktrees/2c37b1d7/src/quick-recommend.js +0 -115
  283. package/.worktrees/2c37b1d7/src/quicklog.js +0 -883
  284. package/.worktrees/2c37b1d7/src/review-tier.js +0 -77
  285. package/.worktrees/2c37b1d7/src/run/command.js +0 -1641
  286. package/.worktrees/2c37b1d7/src/run/complete-handlers.js +0 -1552
  287. package/.worktrees/2c37b1d7/src/run/complete.js +0 -1259
  288. package/.worktrees/2c37b1d7/src/run/concurrent-detect.js +0 -156
  289. package/.worktrees/2c37b1d7/src/run/gates.js +0 -1111
  290. package/.worktrees/2c37b1d7/src/run/multi-repo-context.js +0 -208
  291. package/.worktrees/2c37b1d7/src/run/next.js +0 -128
  292. package/.worktrees/2c37b1d7/src/run/prompt.js +0 -843
  293. package/.worktrees/2c37b1d7/src/run/quick-audit.js +0 -186
  294. package/.worktrees/2c37b1d7/src/run/scan-profile.js +0 -269
  295. package/.worktrees/2c37b1d7/src/run/shared.js +0 -1562
  296. package/.worktrees/2c37b1d7/src/run/stage.js +0 -587
  297. package/.worktrees/2c37b1d7/src/run.js +0 -23
  298. package/.worktrees/2c37b1d7/src/scan-diff.js +0 -388
  299. package/.worktrees/2c37b1d7/src/scan-postcheck.js +0 -524
  300. package/.worktrees/2c37b1d7/src/scan-staleness.js +0 -95
  301. package/.worktrees/2c37b1d7/src/setup.js +0 -414
  302. package/.worktrees/2c37b1d7/src/sillyhub-mcp/client.js +0 -597
  303. package/.worktrees/2c37b1d7/src/sillyhub-mcp/config.js +0 -62
  304. package/.worktrees/2c37b1d7/src/spec-dir-typo.js +0 -50
  305. package/.worktrees/2c37b1d7/src/spec-sync.js +0 -358
  306. package/.worktrees/2c37b1d7/src/stage-contract-engine.js +0 -171
  307. package/.worktrees/2c37b1d7/src/stage-contract-spec.js +0 -551
  308. package/.worktrees/2c37b1d7/src/stage-contract.js +0 -948
  309. package/.worktrees/2c37b1d7/src/stage-review.js +0 -597
  310. package/.worktrees/2c37b1d7/src/stages/archive.js +0 -199
  311. package/.worktrees/2c37b1d7/src/stages/brainstorm-auto.js +0 -285
  312. package/.worktrees/2c37b1d7/src/stages/brainstorm.js +0 -624
  313. package/.worktrees/2c37b1d7/src/stages/cmd-existence.js +0 -145
  314. package/.worktrees/2c37b1d7/src/stages/doctor.js +0 -540
  315. package/.worktrees/2c37b1d7/src/stages/execute.js +0 -1277
  316. package/.worktrees/2c37b1d7/src/stages/explore.js +0 -43
  317. package/.worktrees/2c37b1d7/src/stages/index.js +0 -29
  318. package/.worktrees/2c37b1d7/src/stages/knowledge.js +0 -514
  319. package/.worktrees/2c37b1d7/src/stages/plan-postcheck.js +0 -1398
  320. package/.worktrees/2c37b1d7/src/stages/plan.js +0 -655
  321. package/.worktrees/2c37b1d7/src/stages/quick.js +0 -167
  322. package/.worktrees/2c37b1d7/src/stages/scan.js +0 -608
  323. package/.worktrees/2c37b1d7/src/stages/status.js +0 -64
  324. package/.worktrees/2c37b1d7/src/stages/verify.js +0 -246
  325. package/.worktrees/2c37b1d7/src/sync.js +0 -1470
  326. package/.worktrees/2c37b1d7/src/task-review.js +0 -1498
  327. package/.worktrees/2c37b1d7/src/taskcard-placeholders.js +0 -21
  328. package/.worktrees/2c37b1d7/src/taskcard.js +0 -250
  329. package/.worktrees/2c37b1d7/src/verify-postcheck.js +0 -1718
  330. package/.worktrees/2c37b1d7/src/verify-probes.js +0 -327
  331. package/.worktrees/2c37b1d7/src/version.js +0 -19
  332. package/.worktrees/2c37b1d7/src/workflow.js +0 -600
  333. package/.worktrees/2c37b1d7/src/workspace.js +0 -125
  334. package/.worktrees/2c37b1d7/src/worktree-apply.js +0 -1611
  335. package/.worktrees/2c37b1d7/src/worktree-deps.js +0 -668
  336. package/.worktrees/2c37b1d7/src/worktree.js +0 -1849
  337. package/.worktrees/2c37b1d7/templates/claude-instruction.md +0 -23
  338. package/.worktrees/2c37b1d7/templates/prompts/taskcard-rules.md +0 -29
  339. package/.worktrees/2c37b1d7/templates/prompts/testcase-design.md +0 -12
  340. package/.worktrees/2c37b1d7/templates/prompts/verify-probes.md +0 -32
  341. package/.worktrees/2c37b1d7/templates/workflows/archive-impact.yaml +0 -79
  342. package/.worktrees/2c37b1d7/templates/workflows/scan-docs.yaml +0 -132
  343. package/.worktrees/542c4415/.claude/skills/sillyspec-archive/SKILL.md +0 -87
  344. package/.worktrees/542c4415/.claude/skills/sillyspec-auto/SKILL.md +0 -93
  345. package/.worktrees/542c4415/.claude/skills/sillyspec-brainstorm/SKILL.md +0 -114
  346. package/.worktrees/542c4415/.claude/skills/sillyspec-commit/SKILL.md +0 -67
  347. package/.worktrees/542c4415/.claude/skills/sillyspec-continue/SKILL.md +0 -47
  348. package/.worktrees/542c4415/.claude/skills/sillyspec-doctor/SKILL.md +0 -76
  349. package/.worktrees/542c4415/.claude/skills/sillyspec-execute/SKILL.md +0 -214
  350. package/.worktrees/542c4415/.claude/skills/sillyspec-explore/SKILL.md +0 -102
  351. package/.worktrees/542c4415/.claude/skills/sillyspec-export/SKILL.md +0 -57
  352. package/.worktrees/542c4415/.claude/skills/sillyspec-init/SKILL.md +0 -177
  353. package/.worktrees/542c4415/.claude/skills/sillyspec-knowledge/SKILL.md +0 -270
  354. package/.worktrees/542c4415/.claude/skills/sillyspec-plan/SKILL.md +0 -156
  355. package/.worktrees/542c4415/.claude/skills/sillyspec-quick/SKILL.md +0 -116
  356. package/.worktrees/542c4415/.claude/skills/sillyspec-resume/SKILL.md +0 -70
  357. package/.worktrees/542c4415/.claude/skills/sillyspec-scan/SKILL.md +0 -79
  358. package/.worktrees/542c4415/.claude/skills/sillyspec-state/SKILL.md +0 -64
  359. package/.worktrees/542c4415/.claude/skills/sillyspec-status/SKILL.md +0 -54
  360. package/.worktrees/542c4415/.claude/skills/sillyspec-verify/SKILL.md +0 -87
  361. package/.worktrees/542c4415/.claude/skills/sillyspec-workspace/SKILL.md +0 -175
  362. package/.worktrees/542c4415/.gitattributes +0 -2
  363. package/.worktrees/542c4415/.husky/pre-push +0 -20
  364. package/.worktrees/542c4415/README.md +0 -203
  365. package/.worktrees/542c4415/SKILL.md +0 -91
  366. package/.worktrees/542c4415/architecture-analysis.md +0 -448
  367. package/.worktrees/542c4415/bin/sillyspec.js +0 -2
  368. package/.worktrees/542c4415/eval/README.md +0 -86
  369. package/.worktrees/542c4415/eval/eval.config.json +0 -28
  370. package/.worktrees/542c4415/eval/lib/adapters/cli.mjs +0 -63
  371. package/.worktrees/542c4415/eval/lib/adapters/dryrun.mjs +0 -27
  372. package/.worktrees/542c4415/eval/lib/config.mjs +0 -82
  373. package/.worktrees/542c4415/eval/lib/db.mjs +0 -76
  374. package/.worktrees/542c4415/eval/lib/report.mjs +0 -120
  375. package/.worktrees/542c4415/eval/lib/runner.mjs +0 -157
  376. package/.worktrees/542c4415/eval/lib/tasks.mjs +0 -73
  377. package/.worktrees/542c4415/eval/lib/util.mjs +0 -107
  378. package/.worktrees/542c4415/eval/lib/workdir.mjs +0 -30
  379. package/.worktrees/542c4415/eval/run.mjs +0 -83
  380. package/.worktrees/542c4415/eval/tasks/001-slugify/files/package.json +0 -6
  381. package/.worktrees/542c4415/eval/tasks/001-slugify/solution/src/slugify.mjs +0 -26
  382. package/.worktrees/542c4415/eval/tasks/001-slugify/task.json +0 -6
  383. package/.worktrees/542c4415/eval/tasks/001-slugify/verify.mjs +0 -28
  384. package/.worktrees/542c4415/eval/tasks/002-each-day/files/package.json +0 -6
  385. package/.worktrees/542c4415/eval/tasks/002-each-day/files/src/dates.mjs +0 -4
  386. package/.worktrees/542c4415/eval/tasks/002-each-day/solution/src/dates.mjs +0 -30
  387. package/.worktrees/542c4415/eval/tasks/002-each-day/task.json +0 -6
  388. package/.worktrees/542c4415/eval/tasks/002-each-day/verify.mjs +0 -31
  389. package/.worktrees/542c4415/eval/tasks/003-word-report/files/data/notes.txt +0 -5
  390. package/.worktrees/542c4415/eval/tasks/003-word-report/files/package.json +0 -6
  391. package/.worktrees/542c4415/eval/tasks/003-word-report/solution/bin/report.mjs +0 -36
  392. package/.worktrees/542c4415/eval/tasks/003-word-report/task.json +0 -6
  393. package/.worktrees/542c4415/eval/tasks/003-word-report/verify.mjs +0 -38
  394. package/.worktrees/542c4415/logo.jpg +0 -0
  395. package/.worktrees/542c4415/package-lock.json +0 -977
  396. package/.worktrees/542c4415/package.json +0 -41
  397. package/.worktrees/542c4415/packages/dashboard/dist/assets/index-Bq_Z2hne.js +0 -7446
  398. package/.worktrees/542c4415/packages/dashboard/dist/assets/index-O2W5RV4z.css +0 -1
  399. package/.worktrees/542c4415/packages/dashboard/dist/favicon.jpg +0 -0
  400. package/.worktrees/542c4415/packages/dashboard/dist/index.html +0 -16
  401. package/.worktrees/542c4415/packages/dashboard/dist/logo.jpg +0 -0
  402. package/.worktrees/542c4415/packages/dashboard/dist/prototype-dashboard.html +0 -836
  403. package/.worktrees/542c4415/packages/dashboard/dist/prototype-overview.html +0 -256
  404. package/.worktrees/542c4415/packages/dashboard/package.json +0 -25
  405. package/.worktrees/542c4415/packages/dashboard/server/executor.js +0 -95
  406. package/.worktrees/542c4415/packages/dashboard/server/index.js +0 -679
  407. package/.worktrees/542c4415/packages/dashboard/server/parser.js +0 -526
  408. package/.worktrees/542c4415/packages/dashboard/server/watcher.js +0 -357
  409. package/.worktrees/542c4415/src/agent-session-log.js +0 -803
  410. package/.worktrees/542c4415/src/change-list.js +0 -290
  411. package/.worktrees/542c4415/src/change-risk-profile.js +0 -339
  412. package/.worktrees/542c4415/src/check-primitives.js +0 -65
  413. package/.worktrees/542c4415/src/classify-change.js +0 -109
  414. package/.worktrees/542c4415/src/commit-suggest.js +0 -202
  415. package/.worktrees/542c4415/src/config-cat.js +0 -88
  416. package/.worktrees/542c4415/src/config-schema.js +0 -328
  417. package/.worktrees/542c4415/src/constants.js +0 -97
  418. package/.worktrees/542c4415/src/contract-matrix.js +0 -533
  419. package/.worktrees/542c4415/src/datetime.js +0 -20
  420. package/.worktrees/542c4415/src/db-engine.js +0 -55
  421. package/.worktrees/542c4415/src/db.js +0 -381
  422. package/.worktrees/542c4415/src/decision-distill.js +0 -517
  423. package/.worktrees/542c4415/src/dispatch/backends/local-agent.js +0 -155
  424. package/.worktrees/542c4415/src/dispatch/backends/sillyhub-mcp.js +0 -245
  425. package/.worktrees/542c4415/src/dispatch/probe.js +0 -246
  426. package/.worktrees/542c4415/src/dispatch/strategy.js +0 -121
  427. package/.worktrees/542c4415/src/docs-check.js +0 -825
  428. package/.worktrees/542c4415/src/docs-debt.js +0 -393
  429. package/.worktrees/542c4415/src/docs-gate.js +0 -107
  430. package/.worktrees/542c4415/src/doctor-diagnostics.js +0 -1099
  431. package/.worktrees/542c4415/src/endpoint-extractor.js +0 -409
  432. package/.worktrees/542c4415/src/foreign-declared.js +0 -155
  433. package/.worktrees/542c4415/src/fs-atomic.js +0 -73
  434. package/.worktrees/542c4415/src/git-helper.js +0 -150
  435. package/.worktrees/542c4415/src/hooks/claude-pre-tool-use.cjs +0 -130
  436. package/.worktrees/542c4415/src/hooks/worktree-guard.js +0 -892
  437. package/.worktrees/542c4415/src/index.js +0 -2854
  438. package/.worktrees/542c4415/src/init.js +0 -626
  439. package/.worktrees/542c4415/src/knowledge-match.js +0 -231
  440. package/.worktrees/542c4415/src/local-detect.js +0 -128
  441. package/.worktrees/542c4415/src/local-register.js +0 -104
  442. package/.worktrees/542c4415/src/machine-interface.js +0 -543
  443. package/.worktrees/542c4415/src/migrate.js +0 -127
  444. package/.worktrees/542c4415/src/module-impact.js +0 -166
  445. package/.worktrees/542c4415/src/module-resolve.js +0 -222
  446. package/.worktrees/542c4415/src/modules.js +0 -580
  447. package/.worktrees/542c4415/src/plan-adopt-waves.js +0 -126
  448. package/.worktrees/542c4415/src/progress/change-registry.js +0 -336
  449. package/.worktrees/542c4415/src/progress/consistency-doctor.js +0 -355
  450. package/.worktrees/542c4415/src/progress/shared.js +0 -36
  451. package/.worktrees/542c4415/src/progress/stage-machine.js +0 -594
  452. package/.worktrees/542c4415/src/progress/step-store.js +0 -265
  453. package/.worktrees/542c4415/src/progress.js +0 -1304
  454. package/.worktrees/542c4415/src/quick-recommend.js +0 -115
  455. package/.worktrees/542c4415/src/quicklog.js +0 -883
  456. package/.worktrees/542c4415/src/review-tier.js +0 -77
  457. package/.worktrees/542c4415/src/run/command.js +0 -1641
  458. package/.worktrees/542c4415/src/run/complete-handlers.js +0 -1552
  459. package/.worktrees/542c4415/src/run/complete.js +0 -1259
  460. package/.worktrees/542c4415/src/run/concurrent-detect.js +0 -156
  461. package/.worktrees/542c4415/src/run/gates.js +0 -1111
  462. package/.worktrees/542c4415/src/run/multi-repo-context.js +0 -208
  463. package/.worktrees/542c4415/src/run/next.js +0 -128
  464. package/.worktrees/542c4415/src/run/prompt.js +0 -843
  465. package/.worktrees/542c4415/src/run/quick-audit.js +0 -186
  466. package/.worktrees/542c4415/src/run/scan-profile.js +0 -269
  467. package/.worktrees/542c4415/src/run/shared.js +0 -1562
  468. package/.worktrees/542c4415/src/run/stage.js +0 -587
  469. package/.worktrees/542c4415/src/run.js +0 -23
  470. package/.worktrees/542c4415/src/scan-diff.js +0 -388
  471. package/.worktrees/542c4415/src/scan-postcheck.js +0 -524
  472. package/.worktrees/542c4415/src/scan-staleness.js +0 -95
  473. package/.worktrees/542c4415/src/setup.js +0 -414
  474. package/.worktrees/542c4415/src/sillyhub-mcp/client.js +0 -597
  475. package/.worktrees/542c4415/src/sillyhub-mcp/config.js +0 -62
  476. package/.worktrees/542c4415/src/spec-dir-typo.js +0 -50
  477. package/.worktrees/542c4415/src/spec-sync.js +0 -358
  478. package/.worktrees/542c4415/src/stage-contract-engine.js +0 -171
  479. package/.worktrees/542c4415/src/stage-contract-spec.js +0 -551
  480. package/.worktrees/542c4415/src/stage-contract.js +0 -948
  481. package/.worktrees/542c4415/src/stage-review.js +0 -597
  482. package/.worktrees/542c4415/src/stages/archive.js +0 -199
  483. package/.worktrees/542c4415/src/stages/brainstorm-auto.js +0 -285
  484. package/.worktrees/542c4415/src/stages/brainstorm.js +0 -624
  485. package/.worktrees/542c4415/src/stages/cmd-existence.js +0 -145
  486. package/.worktrees/542c4415/src/stages/doctor.js +0 -540
  487. package/.worktrees/542c4415/src/stages/execute.js +0 -1277
  488. package/.worktrees/542c4415/src/stages/explore.js +0 -43
  489. package/.worktrees/542c4415/src/stages/index.js +0 -29
  490. package/.worktrees/542c4415/src/stages/knowledge.js +0 -514
  491. package/.worktrees/542c4415/src/stages/plan-postcheck.js +0 -1398
  492. package/.worktrees/542c4415/src/stages/plan.js +0 -655
  493. package/.worktrees/542c4415/src/stages/quick.js +0 -167
  494. package/.worktrees/542c4415/src/stages/scan.js +0 -608
  495. package/.worktrees/542c4415/src/stages/status.js +0 -64
  496. package/.worktrees/542c4415/src/stages/verify.js +0 -246
  497. package/.worktrees/542c4415/src/sync.js +0 -1470
  498. package/.worktrees/542c4415/src/task-review.js +0 -1498
  499. package/.worktrees/542c4415/src/taskcard-placeholders.js +0 -21
  500. package/.worktrees/542c4415/src/taskcard.js +0 -250
  501. package/.worktrees/542c4415/src/verify-postcheck.js +0 -1718
  502. package/.worktrees/542c4415/src/verify-probes.js +0 -327
  503. package/.worktrees/542c4415/src/version.js +0 -19
  504. package/.worktrees/542c4415/src/workflow.js +0 -600
  505. package/.worktrees/542c4415/src/workspace.js +0 -125
  506. package/.worktrees/542c4415/src/worktree-apply.js +0 -1611
  507. package/.worktrees/542c4415/src/worktree-deps.js +0 -668
  508. package/.worktrees/542c4415/src/worktree.js +0 -1849
  509. package/.worktrees/542c4415/templates/claude-instruction.md +0 -23
  510. package/.worktrees/542c4415/templates/prompts/taskcard-rules.md +0 -29
  511. package/.worktrees/542c4415/templates/prompts/testcase-design.md +0 -12
  512. package/.worktrees/542c4415/templates/prompts/verify-probes.md +0 -32
  513. package/.worktrees/542c4415/templates/workflows/archive-impact.yaml +0 -79
  514. package/.worktrees/542c4415/templates/workflows/scan-docs.yaml +0 -132
  515. package/.worktrees/8d2d0392/.claude/skills/sillyspec-archive/SKILL.md +0 -87
  516. package/.worktrees/8d2d0392/.claude/skills/sillyspec-auto/SKILL.md +0 -93
  517. package/.worktrees/8d2d0392/.claude/skills/sillyspec-brainstorm/SKILL.md +0 -114
  518. package/.worktrees/8d2d0392/.claude/skills/sillyspec-commit/SKILL.md +0 -67
  519. package/.worktrees/8d2d0392/.claude/skills/sillyspec-continue/SKILL.md +0 -47
  520. package/.worktrees/8d2d0392/.claude/skills/sillyspec-doctor/SKILL.md +0 -76
  521. package/.worktrees/8d2d0392/.claude/skills/sillyspec-execute/SKILL.md +0 -214
  522. package/.worktrees/8d2d0392/.claude/skills/sillyspec-explore/SKILL.md +0 -102
  523. package/.worktrees/8d2d0392/.claude/skills/sillyspec-export/SKILL.md +0 -57
  524. package/.worktrees/8d2d0392/.claude/skills/sillyspec-init/SKILL.md +0 -177
  525. package/.worktrees/8d2d0392/.claude/skills/sillyspec-knowledge/SKILL.md +0 -270
  526. package/.worktrees/8d2d0392/.claude/skills/sillyspec-plan/SKILL.md +0 -156
  527. package/.worktrees/8d2d0392/.claude/skills/sillyspec-propose/SKILL.md +0 -87
  528. package/.worktrees/8d2d0392/.claude/skills/sillyspec-quick/SKILL.md +0 -116
  529. package/.worktrees/8d2d0392/.claude/skills/sillyspec-resume/SKILL.md +0 -70
  530. package/.worktrees/8d2d0392/.claude/skills/sillyspec-scan/SKILL.md +0 -79
  531. package/.worktrees/8d2d0392/.claude/skills/sillyspec-state/SKILL.md +0 -64
  532. package/.worktrees/8d2d0392/.claude/skills/sillyspec-status/SKILL.md +0 -54
  533. package/.worktrees/8d2d0392/.claude/skills/sillyspec-verify/SKILL.md +0 -87
  534. package/.worktrees/8d2d0392/.claude/skills/sillyspec-workspace/SKILL.md +0 -175
  535. package/.worktrees/8d2d0392/.claude/skills/verify-per-user/SKILL.md +0 -6
  536. package/.worktrees/8d2d0392/.gitattributes +0 -2
  537. package/.worktrees/8d2d0392/.husky/pre-push +0 -20
  538. package/.worktrees/8d2d0392/README.md +0 -203
  539. package/.worktrees/8d2d0392/SKILL.md +0 -91
  540. package/.worktrees/8d2d0392/architecture-analysis.md +0 -448
  541. package/.worktrees/8d2d0392/bin/sillyspec.js +0 -2
  542. package/.worktrees/8d2d0392/eval/README.md +0 -86
  543. package/.worktrees/8d2d0392/eval/eval.config.json +0 -28
  544. package/.worktrees/8d2d0392/eval/lib/adapters/cli.mjs +0 -63
  545. package/.worktrees/8d2d0392/eval/lib/adapters/dryrun.mjs +0 -27
  546. package/.worktrees/8d2d0392/eval/lib/config.mjs +0 -82
  547. package/.worktrees/8d2d0392/eval/lib/db.mjs +0 -76
  548. package/.worktrees/8d2d0392/eval/lib/report.mjs +0 -120
  549. package/.worktrees/8d2d0392/eval/lib/runner.mjs +0 -157
  550. package/.worktrees/8d2d0392/eval/lib/tasks.mjs +0 -73
  551. package/.worktrees/8d2d0392/eval/lib/util.mjs +0 -107
  552. package/.worktrees/8d2d0392/eval/lib/workdir.mjs +0 -30
  553. package/.worktrees/8d2d0392/eval/run.mjs +0 -83
  554. package/.worktrees/8d2d0392/eval/tasks/001-slugify/files/package.json +0 -6
  555. package/.worktrees/8d2d0392/eval/tasks/001-slugify/solution/src/slugify.mjs +0 -26
  556. package/.worktrees/8d2d0392/eval/tasks/001-slugify/task.json +0 -6
  557. package/.worktrees/8d2d0392/eval/tasks/001-slugify/verify.mjs +0 -28
  558. package/.worktrees/8d2d0392/eval/tasks/002-each-day/files/package.json +0 -6
  559. package/.worktrees/8d2d0392/eval/tasks/002-each-day/files/src/dates.mjs +0 -4
  560. package/.worktrees/8d2d0392/eval/tasks/002-each-day/solution/src/dates.mjs +0 -30
  561. package/.worktrees/8d2d0392/eval/tasks/002-each-day/task.json +0 -6
  562. package/.worktrees/8d2d0392/eval/tasks/002-each-day/verify.mjs +0 -31
  563. package/.worktrees/8d2d0392/eval/tasks/003-word-report/files/data/notes.txt +0 -5
  564. package/.worktrees/8d2d0392/eval/tasks/003-word-report/files/package.json +0 -6
  565. package/.worktrees/8d2d0392/eval/tasks/003-word-report/solution/bin/report.mjs +0 -36
  566. package/.worktrees/8d2d0392/eval/tasks/003-word-report/task.json +0 -6
  567. package/.worktrees/8d2d0392/eval/tasks/003-word-report/verify.mjs +0 -38
  568. package/.worktrees/8d2d0392/logo.jpg +0 -0
  569. package/.worktrees/8d2d0392/package-lock.json +0 -977
  570. package/.worktrees/8d2d0392/package.json +0 -41
  571. package/.worktrees/8d2d0392/packages/dashboard/dist/assets/index-Bq_Z2hne.js +0 -7446
  572. package/.worktrees/8d2d0392/packages/dashboard/dist/assets/index-O2W5RV4z.css +0 -1
  573. package/.worktrees/8d2d0392/packages/dashboard/dist/favicon.jpg +0 -0
  574. package/.worktrees/8d2d0392/packages/dashboard/dist/index.html +0 -16
  575. package/.worktrees/8d2d0392/packages/dashboard/dist/logo.jpg +0 -0
  576. package/.worktrees/8d2d0392/packages/dashboard/dist/prototype-dashboard.html +0 -836
  577. package/.worktrees/8d2d0392/packages/dashboard/dist/prototype-overview.html +0 -256
  578. package/.worktrees/8d2d0392/packages/dashboard/package.json +0 -25
  579. package/.worktrees/8d2d0392/packages/dashboard/server/executor.js +0 -95
  580. package/.worktrees/8d2d0392/packages/dashboard/server/index.js +0 -679
  581. package/.worktrees/8d2d0392/packages/dashboard/server/parser.js +0 -526
  582. package/.worktrees/8d2d0392/packages/dashboard/server/watcher.js +0 -357
  583. package/.worktrees/8d2d0392/src/agent-session-log.js +0 -803
  584. package/.worktrees/8d2d0392/src/change-list.js +0 -290
  585. package/.worktrees/8d2d0392/src/change-risk-profile.js +0 -339
  586. package/.worktrees/8d2d0392/src/check-primitives.js +0 -65
  587. package/.worktrees/8d2d0392/src/classify-change.js +0 -109
  588. package/.worktrees/8d2d0392/src/commit-suggest.js +0 -202
  589. package/.worktrees/8d2d0392/src/config-cat.js +0 -88
  590. package/.worktrees/8d2d0392/src/config-schema.js +0 -328
  591. package/.worktrees/8d2d0392/src/constants.js +0 -97
  592. package/.worktrees/8d2d0392/src/contract-matrix.js +0 -533
  593. package/.worktrees/8d2d0392/src/datetime.js +0 -20
  594. package/.worktrees/8d2d0392/src/db-engine.js +0 -55
  595. package/.worktrees/8d2d0392/src/db.js +0 -381
  596. package/.worktrees/8d2d0392/src/decision-distill.js +0 -517
  597. package/.worktrees/8d2d0392/src/dispatch/backends/local-agent.js +0 -155
  598. package/.worktrees/8d2d0392/src/dispatch/backends/sillyhub-mcp.js +0 -245
  599. package/.worktrees/8d2d0392/src/dispatch/probe.js +0 -246
  600. package/.worktrees/8d2d0392/src/dispatch/strategy.js +0 -121
  601. package/.worktrees/8d2d0392/src/docs-check.js +0 -825
  602. package/.worktrees/8d2d0392/src/docs-debt.js +0 -393
  603. package/.worktrees/8d2d0392/src/docs-gate.js +0 -107
  604. package/.worktrees/8d2d0392/src/doctor-diagnostics.js +0 -1099
  605. package/.worktrees/8d2d0392/src/endpoint-extractor.js +0 -409
  606. package/.worktrees/8d2d0392/src/foreign-declared.js +0 -78
  607. package/.worktrees/8d2d0392/src/fs-atomic.js +0 -73
  608. package/.worktrees/8d2d0392/src/git-helper.js +0 -150
  609. package/.worktrees/8d2d0392/src/hooks/claude-pre-tool-use.cjs +0 -130
  610. package/.worktrees/8d2d0392/src/hooks/worktree-guard.js +0 -892
  611. package/.worktrees/8d2d0392/src/index.js +0 -2854
  612. package/.worktrees/8d2d0392/src/init.js +0 -626
  613. package/.worktrees/8d2d0392/src/knowledge-match.js +0 -231
  614. package/.worktrees/8d2d0392/src/local-detect.js +0 -128
  615. package/.worktrees/8d2d0392/src/local-register.js +0 -104
  616. package/.worktrees/8d2d0392/src/machine-interface.js +0 -543
  617. package/.worktrees/8d2d0392/src/migrate.js +0 -127
  618. package/.worktrees/8d2d0392/src/module-impact.js +0 -166
  619. package/.worktrees/8d2d0392/src/module-resolve.js +0 -222
  620. package/.worktrees/8d2d0392/src/modules.js +0 -580
  621. package/.worktrees/8d2d0392/src/plan-adopt-waves.js +0 -126
  622. package/.worktrees/8d2d0392/src/progress/change-registry.js +0 -336
  623. package/.worktrees/8d2d0392/src/progress/consistency-doctor.js +0 -355
  624. package/.worktrees/8d2d0392/src/progress/shared.js +0 -36
  625. package/.worktrees/8d2d0392/src/progress/stage-machine.js +0 -594
  626. package/.worktrees/8d2d0392/src/progress/step-store.js +0 -265
  627. package/.worktrees/8d2d0392/src/progress.js +0 -1304
  628. package/.worktrees/8d2d0392/src/quick-recommend.js +0 -115
  629. package/.worktrees/8d2d0392/src/quicklog.js +0 -883
  630. package/.worktrees/8d2d0392/src/review-tier.js +0 -77
  631. package/.worktrees/8d2d0392/src/run/command.js +0 -1641
  632. package/.worktrees/8d2d0392/src/run/complete-handlers.js +0 -1552
  633. package/.worktrees/8d2d0392/src/run/complete.js +0 -1259
  634. package/.worktrees/8d2d0392/src/run/concurrent-detect.js +0 -156
  635. package/.worktrees/8d2d0392/src/run/gates.js +0 -1094
  636. package/.worktrees/8d2d0392/src/run/multi-repo-context.js +0 -208
  637. package/.worktrees/8d2d0392/src/run/next.js +0 -128
  638. package/.worktrees/8d2d0392/src/run/prompt.js +0 -843
  639. package/.worktrees/8d2d0392/src/run/quick-audit.js +0 -186
  640. package/.worktrees/8d2d0392/src/run/scan-profile.js +0 -269
  641. package/.worktrees/8d2d0392/src/run/shared.js +0 -1562
  642. package/.worktrees/8d2d0392/src/run/stage.js +0 -587
  643. package/.worktrees/8d2d0392/src/run.js +0 -23
  644. package/.worktrees/8d2d0392/src/scan-diff.js +0 -388
  645. package/.worktrees/8d2d0392/src/scan-postcheck.js +0 -524
  646. package/.worktrees/8d2d0392/src/scan-staleness.js +0 -95
  647. package/.worktrees/8d2d0392/src/setup.js +0 -414
  648. package/.worktrees/8d2d0392/src/sillyhub-mcp/client.js +0 -597
  649. package/.worktrees/8d2d0392/src/sillyhub-mcp/config.js +0 -62
  650. package/.worktrees/8d2d0392/src/spec-dir-typo.js +0 -50
  651. package/.worktrees/8d2d0392/src/spec-sync.js +0 -358
  652. package/.worktrees/8d2d0392/src/stage-contract-engine.js +0 -171
  653. package/.worktrees/8d2d0392/src/stage-contract-spec.js +0 -551
  654. package/.worktrees/8d2d0392/src/stage-contract.js +0 -948
  655. package/.worktrees/8d2d0392/src/stage-review.js +0 -597
  656. package/.worktrees/8d2d0392/src/stages/archive.js +0 -199
  657. package/.worktrees/8d2d0392/src/stages/brainstorm-auto.js +0 -285
  658. package/.worktrees/8d2d0392/src/stages/brainstorm.js +0 -624
  659. package/.worktrees/8d2d0392/src/stages/cmd-existence.js +0 -145
  660. package/.worktrees/8d2d0392/src/stages/doctor.js +0 -540
  661. package/.worktrees/8d2d0392/src/stages/execute.js +0 -1277
  662. package/.worktrees/8d2d0392/src/stages/explore.js +0 -43
  663. package/.worktrees/8d2d0392/src/stages/index.js +0 -29
  664. package/.worktrees/8d2d0392/src/stages/knowledge.js +0 -514
  665. package/.worktrees/8d2d0392/src/stages/plan-postcheck.js +0 -1398
  666. package/.worktrees/8d2d0392/src/stages/plan.js +0 -651
  667. package/.worktrees/8d2d0392/src/stages/quick.js +0 -167
  668. package/.worktrees/8d2d0392/src/stages/scan.js +0 -608
  669. package/.worktrees/8d2d0392/src/stages/status.js +0 -64
  670. package/.worktrees/8d2d0392/src/stages/verify.js +0 -246
  671. package/.worktrees/8d2d0392/src/sync.js +0 -1470
  672. package/.worktrees/8d2d0392/src/task-review.js +0 -1498
  673. package/.worktrees/8d2d0392/src/taskcard-placeholders.js +0 -21
  674. package/.worktrees/8d2d0392/src/taskcard.js +0 -217
  675. package/.worktrees/8d2d0392/src/verify-postcheck.js +0 -1718
  676. package/.worktrees/8d2d0392/src/verify-probes.js +0 -327
  677. package/.worktrees/8d2d0392/src/version.js +0 -19
  678. package/.worktrees/8d2d0392/src/workflow.js +0 -600
  679. package/.worktrees/8d2d0392/src/workspace.js +0 -125
  680. package/.worktrees/8d2d0392/src/worktree-apply.js +0 -1611
  681. package/.worktrees/8d2d0392/src/worktree-deps.js +0 -576
  682. package/.worktrees/8d2d0392/src/worktree.js +0 -1838
  683. package/.worktrees/8d2d0392/templates/claude-instruction.md +0 -23
  684. package/.worktrees/8d2d0392/templates/prompts/taskcard-rules.md +0 -29
  685. package/.worktrees/8d2d0392/templates/prompts/testcase-design.md +0 -12
  686. package/.worktrees/8d2d0392/templates/prompts/verify-probes.md +0 -32
  687. package/.worktrees/8d2d0392/templates/workflows/archive-impact.yaml +0 -79
  688. package/.worktrees/8d2d0392/templates/workflows/scan-docs.yaml +0 -132
  689. package/.worktrees/c1eae35e/.claude/skills/sillyspec-archive/SKILL.md +0 -87
  690. package/.worktrees/c1eae35e/.claude/skills/sillyspec-auto/SKILL.md +0 -93
  691. package/.worktrees/c1eae35e/.claude/skills/sillyspec-brainstorm/SKILL.md +0 -114
  692. package/.worktrees/c1eae35e/.claude/skills/sillyspec-commit/SKILL.md +0 -67
  693. package/.worktrees/c1eae35e/.claude/skills/sillyspec-continue/SKILL.md +0 -47
  694. package/.worktrees/c1eae35e/.claude/skills/sillyspec-doctor/SKILL.md +0 -76
  695. package/.worktrees/c1eae35e/.claude/skills/sillyspec-execute/SKILL.md +0 -214
  696. package/.worktrees/c1eae35e/.claude/skills/sillyspec-explore/SKILL.md +0 -102
  697. package/.worktrees/c1eae35e/.claude/skills/sillyspec-export/SKILL.md +0 -57
  698. package/.worktrees/c1eae35e/.claude/skills/sillyspec-init/SKILL.md +0 -177
  699. package/.worktrees/c1eae35e/.claude/skills/sillyspec-knowledge/SKILL.md +0 -270
  700. package/.worktrees/c1eae35e/.claude/skills/sillyspec-plan/SKILL.md +0 -156
  701. package/.worktrees/c1eae35e/.claude/skills/sillyspec-quick/SKILL.md +0 -116
  702. package/.worktrees/c1eae35e/.claude/skills/sillyspec-resume/SKILL.md +0 -70
  703. package/.worktrees/c1eae35e/.claude/skills/sillyspec-scan/SKILL.md +0 -79
  704. package/.worktrees/c1eae35e/.claude/skills/sillyspec-state/SKILL.md +0 -64
  705. package/.worktrees/c1eae35e/.claude/skills/sillyspec-status/SKILL.md +0 -54
  706. package/.worktrees/c1eae35e/.claude/skills/sillyspec-verify/SKILL.md +0 -87
  707. package/.worktrees/c1eae35e/.claude/skills/sillyspec-workspace/SKILL.md +0 -175
  708. package/.worktrees/c1eae35e/.gitattributes +0 -2
  709. package/.worktrees/c1eae35e/.husky/pre-push +0 -20
  710. package/.worktrees/c1eae35e/README.md +0 -203
  711. package/.worktrees/c1eae35e/SKILL.md +0 -91
  712. package/.worktrees/c1eae35e/architecture-analysis.md +0 -448
  713. package/.worktrees/c1eae35e/bin/sillyspec.js +0 -2
  714. package/.worktrees/c1eae35e/eval/README.md +0 -86
  715. package/.worktrees/c1eae35e/eval/eval.config.json +0 -28
  716. package/.worktrees/c1eae35e/eval/lib/adapters/cli.mjs +0 -63
  717. package/.worktrees/c1eae35e/eval/lib/adapters/dryrun.mjs +0 -27
  718. package/.worktrees/c1eae35e/eval/lib/config.mjs +0 -82
  719. package/.worktrees/c1eae35e/eval/lib/db.mjs +0 -76
  720. package/.worktrees/c1eae35e/eval/lib/report.mjs +0 -120
  721. package/.worktrees/c1eae35e/eval/lib/runner.mjs +0 -157
  722. package/.worktrees/c1eae35e/eval/lib/tasks.mjs +0 -73
  723. package/.worktrees/c1eae35e/eval/lib/util.mjs +0 -107
  724. package/.worktrees/c1eae35e/eval/lib/workdir.mjs +0 -30
  725. package/.worktrees/c1eae35e/eval/run.mjs +0 -83
  726. package/.worktrees/c1eae35e/eval/tasks/001-slugify/files/package.json +0 -6
  727. package/.worktrees/c1eae35e/eval/tasks/001-slugify/solution/src/slugify.mjs +0 -26
  728. package/.worktrees/c1eae35e/eval/tasks/001-slugify/task.json +0 -6
  729. package/.worktrees/c1eae35e/eval/tasks/001-slugify/verify.mjs +0 -28
  730. package/.worktrees/c1eae35e/eval/tasks/002-each-day/files/package.json +0 -6
  731. package/.worktrees/c1eae35e/eval/tasks/002-each-day/files/src/dates.mjs +0 -4
  732. package/.worktrees/c1eae35e/eval/tasks/002-each-day/solution/src/dates.mjs +0 -30
  733. package/.worktrees/c1eae35e/eval/tasks/002-each-day/task.json +0 -6
  734. package/.worktrees/c1eae35e/eval/tasks/002-each-day/verify.mjs +0 -31
  735. package/.worktrees/c1eae35e/eval/tasks/003-word-report/files/data/notes.txt +0 -5
  736. package/.worktrees/c1eae35e/eval/tasks/003-word-report/files/package.json +0 -6
  737. package/.worktrees/c1eae35e/eval/tasks/003-word-report/solution/bin/report.mjs +0 -36
  738. package/.worktrees/c1eae35e/eval/tasks/003-word-report/task.json +0 -6
  739. package/.worktrees/c1eae35e/eval/tasks/003-word-report/verify.mjs +0 -38
  740. package/.worktrees/c1eae35e/logo.jpg +0 -0
  741. package/.worktrees/c1eae35e/package-lock.json +0 -977
  742. package/.worktrees/c1eae35e/package.json +0 -41
  743. package/.worktrees/c1eae35e/packages/dashboard/dist/assets/index-Bq_Z2hne.js +0 -7446
  744. package/.worktrees/c1eae35e/packages/dashboard/dist/assets/index-O2W5RV4z.css +0 -1
  745. package/.worktrees/c1eae35e/packages/dashboard/dist/favicon.jpg +0 -0
  746. package/.worktrees/c1eae35e/packages/dashboard/dist/index.html +0 -16
  747. package/.worktrees/c1eae35e/packages/dashboard/dist/logo.jpg +0 -0
  748. package/.worktrees/c1eae35e/packages/dashboard/dist/prototype-dashboard.html +0 -836
  749. package/.worktrees/c1eae35e/packages/dashboard/dist/prototype-overview.html +0 -256
  750. package/.worktrees/c1eae35e/packages/dashboard/package.json +0 -25
  751. package/.worktrees/c1eae35e/packages/dashboard/server/executor.js +0 -95
  752. package/.worktrees/c1eae35e/packages/dashboard/server/index.js +0 -679
  753. package/.worktrees/c1eae35e/packages/dashboard/server/parser.js +0 -526
  754. package/.worktrees/c1eae35e/packages/dashboard/server/watcher.js +0 -357
  755. package/.worktrees/c1eae35e/src/agent-session-log.js +0 -803
  756. package/.worktrees/c1eae35e/src/change-list.js +0 -290
  757. package/.worktrees/c1eae35e/src/change-risk-profile.js +0 -339
  758. package/.worktrees/c1eae35e/src/check-primitives.js +0 -65
  759. package/.worktrees/c1eae35e/src/classify-change.js +0 -109
  760. package/.worktrees/c1eae35e/src/commit-suggest.js +0 -202
  761. package/.worktrees/c1eae35e/src/config-cat.js +0 -88
  762. package/.worktrees/c1eae35e/src/config-schema.js +0 -328
  763. package/.worktrees/c1eae35e/src/constants.js +0 -97
  764. package/.worktrees/c1eae35e/src/contract-matrix.js +0 -533
  765. package/.worktrees/c1eae35e/src/datetime.js +0 -20
  766. package/.worktrees/c1eae35e/src/db-engine.js +0 -55
  767. package/.worktrees/c1eae35e/src/db.js +0 -381
  768. package/.worktrees/c1eae35e/src/decision-distill.js +0 -517
  769. package/.worktrees/c1eae35e/src/dispatch/backends/local-agent.js +0 -155
  770. package/.worktrees/c1eae35e/src/dispatch/backends/sillyhub-mcp.js +0 -245
  771. package/.worktrees/c1eae35e/src/dispatch/probe.js +0 -246
  772. package/.worktrees/c1eae35e/src/dispatch/strategy.js +0 -121
  773. package/.worktrees/c1eae35e/src/docs-check.js +0 -825
  774. package/.worktrees/c1eae35e/src/docs-debt.js +0 -393
  775. package/.worktrees/c1eae35e/src/docs-gate.js +0 -107
  776. package/.worktrees/c1eae35e/src/doctor-diagnostics.js +0 -1099
  777. package/.worktrees/c1eae35e/src/endpoint-extractor.js +0 -409
  778. package/.worktrees/c1eae35e/src/foreign-declared.js +0 -155
  779. package/.worktrees/c1eae35e/src/fs-atomic.js +0 -73
  780. package/.worktrees/c1eae35e/src/git-helper.js +0 -150
  781. package/.worktrees/c1eae35e/src/hooks/claude-pre-tool-use.cjs +0 -130
  782. package/.worktrees/c1eae35e/src/hooks/worktree-guard.js +0 -892
  783. package/.worktrees/c1eae35e/src/index.js +0 -2854
  784. package/.worktrees/c1eae35e/src/init.js +0 -626
  785. package/.worktrees/c1eae35e/src/knowledge-match.js +0 -231
  786. package/.worktrees/c1eae35e/src/local-detect.js +0 -128
  787. package/.worktrees/c1eae35e/src/local-register.js +0 -104
  788. package/.worktrees/c1eae35e/src/machine-interface.js +0 -543
  789. package/.worktrees/c1eae35e/src/migrate.js +0 -127
  790. package/.worktrees/c1eae35e/src/module-impact.js +0 -166
  791. package/.worktrees/c1eae35e/src/module-resolve.js +0 -222
  792. package/.worktrees/c1eae35e/src/modules.js +0 -580
  793. package/.worktrees/c1eae35e/src/plan-adopt-waves.js +0 -126
  794. package/.worktrees/c1eae35e/src/progress/change-registry.js +0 -336
  795. package/.worktrees/c1eae35e/src/progress/consistency-doctor.js +0 -355
  796. package/.worktrees/c1eae35e/src/progress/shared.js +0 -36
  797. package/.worktrees/c1eae35e/src/progress/stage-machine.js +0 -594
  798. package/.worktrees/c1eae35e/src/progress/step-store.js +0 -265
  799. package/.worktrees/c1eae35e/src/progress.js +0 -1304
  800. package/.worktrees/c1eae35e/src/quick-recommend.js +0 -115
  801. package/.worktrees/c1eae35e/src/quicklog.js +0 -883
  802. package/.worktrees/c1eae35e/src/review-tier.js +0 -77
  803. package/.worktrees/c1eae35e/src/run/command.js +0 -1641
  804. package/.worktrees/c1eae35e/src/run/complete-handlers.js +0 -1552
  805. package/.worktrees/c1eae35e/src/run/complete.js +0 -1259
  806. package/.worktrees/c1eae35e/src/run/concurrent-detect.js +0 -156
  807. package/.worktrees/c1eae35e/src/run/gates.js +0 -1111
  808. package/.worktrees/c1eae35e/src/run/multi-repo-context.js +0 -208
  809. package/.worktrees/c1eae35e/src/run/next.js +0 -128
  810. package/.worktrees/c1eae35e/src/run/prompt.js +0 -843
  811. package/.worktrees/c1eae35e/src/run/quick-audit.js +0 -186
  812. package/.worktrees/c1eae35e/src/run/scan-profile.js +0 -269
  813. package/.worktrees/c1eae35e/src/run/shared.js +0 -1562
  814. package/.worktrees/c1eae35e/src/run/stage.js +0 -587
  815. package/.worktrees/c1eae35e/src/run.js +0 -23
  816. package/.worktrees/c1eae35e/src/scan-diff.js +0 -388
  817. package/.worktrees/c1eae35e/src/scan-postcheck.js +0 -524
  818. package/.worktrees/c1eae35e/src/scan-staleness.js +0 -95
  819. package/.worktrees/c1eae35e/src/setup.js +0 -414
  820. package/.worktrees/c1eae35e/src/sillyhub-mcp/client.js +0 -597
  821. package/.worktrees/c1eae35e/src/sillyhub-mcp/config.js +0 -62
  822. package/.worktrees/c1eae35e/src/spec-dir-typo.js +0 -50
  823. package/.worktrees/c1eae35e/src/spec-sync.js +0 -358
  824. package/.worktrees/c1eae35e/src/stage-contract-engine.js +0 -171
  825. package/.worktrees/c1eae35e/src/stage-contract-spec.js +0 -551
  826. package/.worktrees/c1eae35e/src/stage-contract.js +0 -948
  827. package/.worktrees/c1eae35e/src/stage-review.js +0 -597
  828. package/.worktrees/c1eae35e/src/stages/archive.js +0 -199
  829. package/.worktrees/c1eae35e/src/stages/brainstorm-auto.js +0 -285
  830. package/.worktrees/c1eae35e/src/stages/brainstorm.js +0 -624
  831. package/.worktrees/c1eae35e/src/stages/cmd-existence.js +0 -145
  832. package/.worktrees/c1eae35e/src/stages/doctor.js +0 -540
  833. package/.worktrees/c1eae35e/src/stages/execute.js +0 -1277
  834. package/.worktrees/c1eae35e/src/stages/explore.js +0 -43
  835. package/.worktrees/c1eae35e/src/stages/index.js +0 -29
  836. package/.worktrees/c1eae35e/src/stages/knowledge.js +0 -514
  837. package/.worktrees/c1eae35e/src/stages/plan-postcheck.js +0 -1398
  838. package/.worktrees/c1eae35e/src/stages/plan.js +0 -655
  839. package/.worktrees/c1eae35e/src/stages/quick.js +0 -167
  840. package/.worktrees/c1eae35e/src/stages/scan.js +0 -608
  841. package/.worktrees/c1eae35e/src/stages/status.js +0 -64
  842. package/.worktrees/c1eae35e/src/stages/verify.js +0 -246
  843. package/.worktrees/c1eae35e/src/sync.js +0 -1470
  844. package/.worktrees/c1eae35e/src/task-review.js +0 -1498
  845. package/.worktrees/c1eae35e/src/taskcard-placeholders.js +0 -21
  846. package/.worktrees/c1eae35e/src/taskcard.js +0 -250
  847. package/.worktrees/c1eae35e/src/verify-postcheck.js +0 -1718
  848. package/.worktrees/c1eae35e/src/verify-probes.js +0 -327
  849. package/.worktrees/c1eae35e/src/version.js +0 -19
  850. package/.worktrees/c1eae35e/src/workflow.js +0 -600
  851. package/.worktrees/c1eae35e/src/workspace.js +0 -125
  852. package/.worktrees/c1eae35e/src/worktree-apply.js +0 -1611
  853. package/.worktrees/c1eae35e/src/worktree-deps.js +0 -668
  854. package/.worktrees/c1eae35e/src/worktree.js +0 -1849
  855. package/.worktrees/c1eae35e/templates/claude-instruction.md +0 -23
  856. package/.worktrees/c1eae35e/templates/prompts/taskcard-rules.md +0 -29
  857. package/.worktrees/c1eae35e/templates/prompts/testcase-design.md +0 -12
  858. package/.worktrees/c1eae35e/templates/prompts/verify-probes.md +0 -32
  859. package/.worktrees/c1eae35e/templates/workflows/archive-impact.yaml +0 -79
  860. package/.worktrees/c1eae35e/templates/workflows/scan-docs.yaml +0 -132
  861. package/.worktrees/dafc71ad/.claude/skills/sillyspec-archive/SKILL.md +0 -87
  862. package/.worktrees/dafc71ad/.claude/skills/sillyspec-auto/SKILL.md +0 -93
  863. package/.worktrees/dafc71ad/.claude/skills/sillyspec-brainstorm/SKILL.md +0 -114
  864. package/.worktrees/dafc71ad/.claude/skills/sillyspec-commit/SKILL.md +0 -67
  865. package/.worktrees/dafc71ad/.claude/skills/sillyspec-continue/SKILL.md +0 -47
  866. package/.worktrees/dafc71ad/.claude/skills/sillyspec-doctor/SKILL.md +0 -76
  867. package/.worktrees/dafc71ad/.claude/skills/sillyspec-execute/SKILL.md +0 -214
  868. package/.worktrees/dafc71ad/.claude/skills/sillyspec-explore/SKILL.md +0 -102
  869. package/.worktrees/dafc71ad/.claude/skills/sillyspec-export/SKILL.md +0 -57
  870. package/.worktrees/dafc71ad/.claude/skills/sillyspec-init/SKILL.md +0 -177
  871. package/.worktrees/dafc71ad/.claude/skills/sillyspec-knowledge/SKILL.md +0 -270
  872. package/.worktrees/dafc71ad/.claude/skills/sillyspec-plan/SKILL.md +0 -156
  873. package/.worktrees/dafc71ad/.claude/skills/sillyspec-propose/SKILL.md +0 -87
  874. package/.worktrees/dafc71ad/.claude/skills/sillyspec-quick/SKILL.md +0 -116
  875. package/.worktrees/dafc71ad/.claude/skills/sillyspec-resume/SKILL.md +0 -70
  876. package/.worktrees/dafc71ad/.claude/skills/sillyspec-scan/SKILL.md +0 -79
  877. package/.worktrees/dafc71ad/.claude/skills/sillyspec-state/SKILL.md +0 -64
  878. package/.worktrees/dafc71ad/.claude/skills/sillyspec-status/SKILL.md +0 -54
  879. package/.worktrees/dafc71ad/.claude/skills/sillyspec-verify/SKILL.md +0 -87
  880. package/.worktrees/dafc71ad/.claude/skills/sillyspec-workspace/SKILL.md +0 -175
  881. package/.worktrees/dafc71ad/.gitattributes +0 -2
  882. package/.worktrees/dafc71ad/.husky/pre-push +0 -20
  883. package/.worktrees/dafc71ad/README.md +0 -203
  884. package/.worktrees/dafc71ad/SKILL.md +0 -91
  885. package/.worktrees/dafc71ad/analysis.md +0 -366
  886. package/.worktrees/dafc71ad/architecture-analysis.md +0 -448
  887. package/.worktrees/dafc71ad/bin/sillyspec.js +0 -2
  888. package/.worktrees/dafc71ad/eval/README.md +0 -86
  889. package/.worktrees/dafc71ad/eval/eval.config.json +0 -28
  890. package/.worktrees/dafc71ad/eval/lib/adapters/cli.mjs +0 -63
  891. package/.worktrees/dafc71ad/eval/lib/adapters/dryrun.mjs +0 -27
  892. package/.worktrees/dafc71ad/eval/lib/config.mjs +0 -82
  893. package/.worktrees/dafc71ad/eval/lib/db.mjs +0 -76
  894. package/.worktrees/dafc71ad/eval/lib/report.mjs +0 -120
  895. package/.worktrees/dafc71ad/eval/lib/runner.mjs +0 -157
  896. package/.worktrees/dafc71ad/eval/lib/tasks.mjs +0 -73
  897. package/.worktrees/dafc71ad/eval/lib/util.mjs +0 -107
  898. package/.worktrees/dafc71ad/eval/lib/workdir.mjs +0 -30
  899. package/.worktrees/dafc71ad/eval/run.mjs +0 -83
  900. package/.worktrees/dafc71ad/eval/tasks/001-slugify/files/package.json +0 -6
  901. package/.worktrees/dafc71ad/eval/tasks/001-slugify/solution/src/slugify.mjs +0 -26
  902. package/.worktrees/dafc71ad/eval/tasks/001-slugify/task.json +0 -6
  903. package/.worktrees/dafc71ad/eval/tasks/001-slugify/verify.mjs +0 -28
  904. package/.worktrees/dafc71ad/eval/tasks/002-each-day/files/package.json +0 -6
  905. package/.worktrees/dafc71ad/eval/tasks/002-each-day/files/src/dates.mjs +0 -4
  906. package/.worktrees/dafc71ad/eval/tasks/002-each-day/solution/src/dates.mjs +0 -30
  907. package/.worktrees/dafc71ad/eval/tasks/002-each-day/task.json +0 -6
  908. package/.worktrees/dafc71ad/eval/tasks/002-each-day/verify.mjs +0 -31
  909. package/.worktrees/dafc71ad/eval/tasks/003-word-report/files/data/notes.txt +0 -5
  910. package/.worktrees/dafc71ad/eval/tasks/003-word-report/files/package.json +0 -6
  911. package/.worktrees/dafc71ad/eval/tasks/003-word-report/solution/bin/report.mjs +0 -36
  912. package/.worktrees/dafc71ad/eval/tasks/003-word-report/task.json +0 -6
  913. package/.worktrees/dafc71ad/eval/tasks/003-word-report/verify.mjs +0 -38
  914. package/.worktrees/dafc71ad/logo.jpg +0 -0
  915. package/.worktrees/dafc71ad/package-lock.json +0 -977
  916. package/.worktrees/dafc71ad/package.json +0 -41
  917. package/.worktrees/dafc71ad/packages/dashboard/dist/assets/index-Bq_Z2hne.js +0 -7446
  918. package/.worktrees/dafc71ad/packages/dashboard/dist/assets/index-O2W5RV4z.css +0 -1
  919. package/.worktrees/dafc71ad/packages/dashboard/dist/favicon.jpg +0 -0
  920. package/.worktrees/dafc71ad/packages/dashboard/dist/index.html +0 -16
  921. package/.worktrees/dafc71ad/packages/dashboard/dist/logo.jpg +0 -0
  922. package/.worktrees/dafc71ad/packages/dashboard/dist/prototype-dashboard.html +0 -836
  923. package/.worktrees/dafc71ad/packages/dashboard/dist/prototype-overview.html +0 -256
  924. package/.worktrees/dafc71ad/packages/dashboard/package.json +0 -25
  925. package/.worktrees/dafc71ad/packages/dashboard/server/executor.js +0 -95
  926. package/.worktrees/dafc71ad/packages/dashboard/server/index.js +0 -679
  927. package/.worktrees/dafc71ad/packages/dashboard/server/parser.js +0 -526
  928. package/.worktrees/dafc71ad/packages/dashboard/server/watcher.js +0 -357
  929. package/.worktrees/dafc71ad/src/agent-session-log.js +0 -803
  930. package/.worktrees/dafc71ad/src/change-list.js +0 -290
  931. package/.worktrees/dafc71ad/src/change-risk-profile.js +0 -339
  932. package/.worktrees/dafc71ad/src/check-primitives.js +0 -65
  933. package/.worktrees/dafc71ad/src/classify-change.js +0 -109
  934. package/.worktrees/dafc71ad/src/commit-suggest.js +0 -202
  935. package/.worktrees/dafc71ad/src/config-cat.js +0 -88
  936. package/.worktrees/dafc71ad/src/config-schema.js +0 -328
  937. package/.worktrees/dafc71ad/src/constants.js +0 -97
  938. package/.worktrees/dafc71ad/src/contract-matrix.js +0 -533
  939. package/.worktrees/dafc71ad/src/datetime.js +0 -20
  940. package/.worktrees/dafc71ad/src/db-engine.js +0 -55
  941. package/.worktrees/dafc71ad/src/db.js +0 -381
  942. package/.worktrees/dafc71ad/src/decision-distill.js +0 -517
  943. package/.worktrees/dafc71ad/src/dispatch/backends/local-agent.js +0 -155
  944. package/.worktrees/dafc71ad/src/dispatch/backends/sillyhub-mcp.js +0 -245
  945. package/.worktrees/dafc71ad/src/dispatch/probe.js +0 -246
  946. package/.worktrees/dafc71ad/src/dispatch/strategy.js +0 -121
  947. package/.worktrees/dafc71ad/src/docs-check.js +0 -825
  948. package/.worktrees/dafc71ad/src/docs-debt.js +0 -393
  949. package/.worktrees/dafc71ad/src/docs-gate.js +0 -107
  950. package/.worktrees/dafc71ad/src/doctor-diagnostics.js +0 -1099
  951. package/.worktrees/dafc71ad/src/endpoint-extractor.js +0 -409
  952. package/.worktrees/dafc71ad/src/foreign-declared.js +0 -155
  953. package/.worktrees/dafc71ad/src/fs-atomic.js +0 -73
  954. package/.worktrees/dafc71ad/src/git-helper.js +0 -150
  955. package/.worktrees/dafc71ad/src/hooks/claude-pre-tool-use.cjs +0 -130
  956. package/.worktrees/dafc71ad/src/hooks/worktree-guard.js +0 -892
  957. package/.worktrees/dafc71ad/src/index.js +0 -2854
  958. package/.worktrees/dafc71ad/src/init.js +0 -626
  959. package/.worktrees/dafc71ad/src/knowledge-match.js +0 -231
  960. package/.worktrees/dafc71ad/src/local-detect.js +0 -128
  961. package/.worktrees/dafc71ad/src/local-register.js +0 -104
  962. package/.worktrees/dafc71ad/src/machine-interface.js +0 -543
  963. package/.worktrees/dafc71ad/src/migrate.js +0 -127
  964. package/.worktrees/dafc71ad/src/module-impact.js +0 -166
  965. package/.worktrees/dafc71ad/src/module-resolve.js +0 -222
  966. package/.worktrees/dafc71ad/src/modules.js +0 -580
  967. package/.worktrees/dafc71ad/src/plan-adopt-waves.js +0 -126
  968. package/.worktrees/dafc71ad/src/progress/change-registry.js +0 -336
  969. package/.worktrees/dafc71ad/src/progress/consistency-doctor.js +0 -355
  970. package/.worktrees/dafc71ad/src/progress/shared.js +0 -36
  971. package/.worktrees/dafc71ad/src/progress/stage-machine.js +0 -594
  972. package/.worktrees/dafc71ad/src/progress/step-store.js +0 -265
  973. package/.worktrees/dafc71ad/src/progress.js +0 -1304
  974. package/.worktrees/dafc71ad/src/quick-recommend.js +0 -115
  975. package/.worktrees/dafc71ad/src/quicklog.js +0 -883
  976. package/.worktrees/dafc71ad/src/review-tier.js +0 -77
  977. package/.worktrees/dafc71ad/src/run/command.js +0 -1641
  978. package/.worktrees/dafc71ad/src/run/complete-handlers.js +0 -1552
  979. package/.worktrees/dafc71ad/src/run/complete.js +0 -1259
  980. package/.worktrees/dafc71ad/src/run/concurrent-detect.js +0 -156
  981. package/.worktrees/dafc71ad/src/run/gates.js +0 -1111
  982. package/.worktrees/dafc71ad/src/run/multi-repo-context.js +0 -208
  983. package/.worktrees/dafc71ad/src/run/next.js +0 -128
  984. package/.worktrees/dafc71ad/src/run/prompt.js +0 -843
  985. package/.worktrees/dafc71ad/src/run/quick-audit.js +0 -186
  986. package/.worktrees/dafc71ad/src/run/scan-profile.js +0 -269
  987. package/.worktrees/dafc71ad/src/run/shared.js +0 -1562
  988. package/.worktrees/dafc71ad/src/run/stage.js +0 -587
  989. package/.worktrees/dafc71ad/src/run.js +0 -23
  990. package/.worktrees/dafc71ad/src/scan-diff.js +0 -388
  991. package/.worktrees/dafc71ad/src/scan-postcheck.js +0 -524
  992. package/.worktrees/dafc71ad/src/scan-staleness.js +0 -95
  993. package/.worktrees/dafc71ad/src/setup.js +0 -414
  994. package/.worktrees/dafc71ad/src/sillyhub-mcp/client.js +0 -597
  995. package/.worktrees/dafc71ad/src/sillyhub-mcp/config.js +0 -62
  996. package/.worktrees/dafc71ad/src/spec-dir-typo.js +0 -50
  997. package/.worktrees/dafc71ad/src/spec-sync.js +0 -358
  998. package/.worktrees/dafc71ad/src/stage-contract-engine.js +0 -171
  999. package/.worktrees/dafc71ad/src/stage-contract-spec.js +0 -551
  1000. package/.worktrees/dafc71ad/src/stage-contract.js +0 -948
  1001. package/.worktrees/dafc71ad/src/stage-review.js +0 -597
  1002. package/.worktrees/dafc71ad/src/stages/archive.js +0 -199
  1003. package/.worktrees/dafc71ad/src/stages/brainstorm-auto.js +0 -285
  1004. package/.worktrees/dafc71ad/src/stages/brainstorm.js +0 -624
  1005. package/.worktrees/dafc71ad/src/stages/cmd-existence.js +0 -145
  1006. package/.worktrees/dafc71ad/src/stages/doctor.js +0 -540
  1007. package/.worktrees/dafc71ad/src/stages/execute.js +0 -1277
  1008. package/.worktrees/dafc71ad/src/stages/explore.js +0 -43
  1009. package/.worktrees/dafc71ad/src/stages/index.js +0 -29
  1010. package/.worktrees/dafc71ad/src/stages/knowledge.js +0 -514
  1011. package/.worktrees/dafc71ad/src/stages/plan-postcheck.js +0 -1398
  1012. package/.worktrees/dafc71ad/src/stages/plan.js +0 -655
  1013. package/.worktrees/dafc71ad/src/stages/quick.js +0 -167
  1014. package/.worktrees/dafc71ad/src/stages/scan.js +0 -608
  1015. package/.worktrees/dafc71ad/src/stages/status.js +0 -64
  1016. package/.worktrees/dafc71ad/src/stages/verify.js +0 -246
  1017. package/.worktrees/dafc71ad/src/sync.js +0 -1470
  1018. package/.worktrees/dafc71ad/src/task-review.js +0 -1498
  1019. package/.worktrees/dafc71ad/src/taskcard-placeholders.js +0 -21
  1020. package/.worktrees/dafc71ad/src/taskcard.js +0 -250
  1021. package/.worktrees/dafc71ad/src/verify-postcheck.js +0 -1718
  1022. package/.worktrees/dafc71ad/src/verify-probes.js +0 -327
  1023. package/.worktrees/dafc71ad/src/version.js +0 -19
  1024. package/.worktrees/dafc71ad/src/workflow.js +0 -600
  1025. package/.worktrees/dafc71ad/src/workspace.js +0 -125
  1026. package/.worktrees/dafc71ad/src/worktree-apply.js +0 -1611
  1027. package/.worktrees/dafc71ad/src/worktree-deps.js +0 -668
  1028. package/.worktrees/dafc71ad/src/worktree.js +0 -1849
  1029. package/.worktrees/dafc71ad/templates/claude-instruction.md +0 -23
  1030. package/.worktrees/dafc71ad/templates/prompts/taskcard-rules.md +0 -29
  1031. package/.worktrees/dafc71ad/templates/prompts/testcase-design.md +0 -12
  1032. package/.worktrees/dafc71ad/templates/prompts/verify-probes.md +0 -32
  1033. package/.worktrees/dafc71ad/templates/workflows/archive-impact.yaml +0 -79
  1034. package/.worktrees/dafc71ad/templates/workflows/scan-docs.yaml +0 -132
  1035. package/.worktrees/e58fcc4c/.claude/skills/sillyspec-archive/SKILL.md +0 -87
  1036. package/.worktrees/e58fcc4c/.claude/skills/sillyspec-auto/SKILL.md +0 -93
  1037. package/.worktrees/e58fcc4c/.claude/skills/sillyspec-brainstorm/SKILL.md +0 -114
  1038. package/.worktrees/e58fcc4c/.claude/skills/sillyspec-commit/SKILL.md +0 -67
  1039. package/.worktrees/e58fcc4c/.claude/skills/sillyspec-continue/SKILL.md +0 -47
  1040. package/.worktrees/e58fcc4c/.claude/skills/sillyspec-doctor/SKILL.md +0 -76
  1041. package/.worktrees/e58fcc4c/.claude/skills/sillyspec-execute/SKILL.md +0 -214
  1042. package/.worktrees/e58fcc4c/.claude/skills/sillyspec-explore/SKILL.md +0 -102
  1043. package/.worktrees/e58fcc4c/.claude/skills/sillyspec-export/SKILL.md +0 -57
  1044. package/.worktrees/e58fcc4c/.claude/skills/sillyspec-init/SKILL.md +0 -177
  1045. package/.worktrees/e58fcc4c/.claude/skills/sillyspec-knowledge/SKILL.md +0 -270
  1046. package/.worktrees/e58fcc4c/.claude/skills/sillyspec-plan/SKILL.md +0 -156
  1047. package/.worktrees/e58fcc4c/.claude/skills/sillyspec-propose/SKILL.md +0 -87
  1048. package/.worktrees/e58fcc4c/.claude/skills/sillyspec-quick/SKILL.md +0 -116
  1049. package/.worktrees/e58fcc4c/.claude/skills/sillyspec-resume/SKILL.md +0 -70
  1050. package/.worktrees/e58fcc4c/.claude/skills/sillyspec-scan/SKILL.md +0 -79
  1051. package/.worktrees/e58fcc4c/.claude/skills/sillyspec-state/SKILL.md +0 -64
  1052. package/.worktrees/e58fcc4c/.claude/skills/sillyspec-status/SKILL.md +0 -54
  1053. package/.worktrees/e58fcc4c/.claude/skills/sillyspec-verify/SKILL.md +0 -87
  1054. package/.worktrees/e58fcc4c/.claude/skills/sillyspec-workspace/SKILL.md +0 -175
  1055. package/.worktrees/e58fcc4c/.gitattributes +0 -2
  1056. package/.worktrees/e58fcc4c/.husky/pre-push +0 -20
  1057. package/.worktrees/e58fcc4c/README.md +0 -203
  1058. package/.worktrees/e58fcc4c/SKILL.md +0 -91
  1059. package/.worktrees/e58fcc4c/architecture-analysis.md +0 -503
  1060. package/.worktrees/e58fcc4c/bin/sillyspec.js +0 -2
  1061. package/.worktrees/e58fcc4c/eval/README.md +0 -86
  1062. package/.worktrees/e58fcc4c/eval/eval.config.json +0 -28
  1063. package/.worktrees/e58fcc4c/eval/lib/adapters/cli.mjs +0 -63
  1064. package/.worktrees/e58fcc4c/eval/lib/adapters/dryrun.mjs +0 -27
  1065. package/.worktrees/e58fcc4c/eval/lib/config.mjs +0 -82
  1066. package/.worktrees/e58fcc4c/eval/lib/db.mjs +0 -76
  1067. package/.worktrees/e58fcc4c/eval/lib/report.mjs +0 -120
  1068. package/.worktrees/e58fcc4c/eval/lib/runner.mjs +0 -157
  1069. package/.worktrees/e58fcc4c/eval/lib/tasks.mjs +0 -73
  1070. package/.worktrees/e58fcc4c/eval/lib/util.mjs +0 -107
  1071. package/.worktrees/e58fcc4c/eval/lib/workdir.mjs +0 -30
  1072. package/.worktrees/e58fcc4c/eval/run.mjs +0 -83
  1073. package/.worktrees/e58fcc4c/eval/tasks/001-slugify/files/package.json +0 -6
  1074. package/.worktrees/e58fcc4c/eval/tasks/001-slugify/solution/src/slugify.mjs +0 -26
  1075. package/.worktrees/e58fcc4c/eval/tasks/001-slugify/task.json +0 -6
  1076. package/.worktrees/e58fcc4c/eval/tasks/001-slugify/verify.mjs +0 -28
  1077. package/.worktrees/e58fcc4c/eval/tasks/002-each-day/files/package.json +0 -6
  1078. package/.worktrees/e58fcc4c/eval/tasks/002-each-day/files/src/dates.mjs +0 -4
  1079. package/.worktrees/e58fcc4c/eval/tasks/002-each-day/solution/src/dates.mjs +0 -30
  1080. package/.worktrees/e58fcc4c/eval/tasks/002-each-day/task.json +0 -6
  1081. package/.worktrees/e58fcc4c/eval/tasks/002-each-day/verify.mjs +0 -31
  1082. package/.worktrees/e58fcc4c/eval/tasks/003-word-report/files/data/notes.txt +0 -5
  1083. package/.worktrees/e58fcc4c/eval/tasks/003-word-report/files/package.json +0 -6
  1084. package/.worktrees/e58fcc4c/eval/tasks/003-word-report/solution/bin/report.mjs +0 -36
  1085. package/.worktrees/e58fcc4c/eval/tasks/003-word-report/task.json +0 -6
  1086. package/.worktrees/e58fcc4c/eval/tasks/003-word-report/verify.mjs +0 -38
  1087. package/.worktrees/e58fcc4c/logo.jpg +0 -0
  1088. package/.worktrees/e58fcc4c/package-lock.json +0 -977
  1089. package/.worktrees/e58fcc4c/package.json +0 -41
  1090. package/.worktrees/e58fcc4c/packages/dashboard/dist/assets/index-Bq_Z2hne.js +0 -7446
  1091. package/.worktrees/e58fcc4c/packages/dashboard/dist/assets/index-O2W5RV4z.css +0 -1
  1092. package/.worktrees/e58fcc4c/packages/dashboard/dist/favicon.jpg +0 -0
  1093. package/.worktrees/e58fcc4c/packages/dashboard/dist/index.html +0 -16
  1094. package/.worktrees/e58fcc4c/packages/dashboard/dist/logo.jpg +0 -0
  1095. package/.worktrees/e58fcc4c/packages/dashboard/dist/prototype-dashboard.html +0 -836
  1096. package/.worktrees/e58fcc4c/packages/dashboard/dist/prototype-overview.html +0 -256
  1097. package/.worktrees/e58fcc4c/packages/dashboard/package.json +0 -25
  1098. package/.worktrees/e58fcc4c/packages/dashboard/server/executor.js +0 -95
  1099. package/.worktrees/e58fcc4c/packages/dashboard/server/index.js +0 -679
  1100. package/.worktrees/e58fcc4c/packages/dashboard/server/parser.js +0 -526
  1101. package/.worktrees/e58fcc4c/packages/dashboard/server/watcher.js +0 -357
  1102. package/.worktrees/e58fcc4c/src/agent-session-log.js +0 -803
  1103. package/.worktrees/e58fcc4c/src/change-list.js +0 -290
  1104. package/.worktrees/e58fcc4c/src/change-risk-profile.js +0 -339
  1105. package/.worktrees/e58fcc4c/src/check-primitives.js +0 -65
  1106. package/.worktrees/e58fcc4c/src/classify-change.js +0 -109
  1107. package/.worktrees/e58fcc4c/src/commit-suggest.js +0 -202
  1108. package/.worktrees/e58fcc4c/src/config-cat.js +0 -88
  1109. package/.worktrees/e58fcc4c/src/config-schema.js +0 -328
  1110. package/.worktrees/e58fcc4c/src/constants.js +0 -97
  1111. package/.worktrees/e58fcc4c/src/contract-matrix.js +0 -533
  1112. package/.worktrees/e58fcc4c/src/datetime.js +0 -20
  1113. package/.worktrees/e58fcc4c/src/db-engine.js +0 -55
  1114. package/.worktrees/e58fcc4c/src/db.js +0 -381
  1115. package/.worktrees/e58fcc4c/src/decision-distill.js +0 -517
  1116. package/.worktrees/e58fcc4c/src/dispatch/backends/local-agent.js +0 -155
  1117. package/.worktrees/e58fcc4c/src/dispatch/backends/sillyhub-mcp.js +0 -245
  1118. package/.worktrees/e58fcc4c/src/dispatch/probe.js +0 -246
  1119. package/.worktrees/e58fcc4c/src/dispatch/strategy.js +0 -121
  1120. package/.worktrees/e58fcc4c/src/docs-check.js +0 -825
  1121. package/.worktrees/e58fcc4c/src/docs-debt.js +0 -393
  1122. package/.worktrees/e58fcc4c/src/docs-gate.js +0 -107
  1123. package/.worktrees/e58fcc4c/src/doctor-diagnostics.js +0 -1099
  1124. package/.worktrees/e58fcc4c/src/endpoint-extractor.js +0 -409
  1125. package/.worktrees/e58fcc4c/src/foreign-declared.js +0 -155
  1126. package/.worktrees/e58fcc4c/src/fs-atomic.js +0 -73
  1127. package/.worktrees/e58fcc4c/src/git-helper.js +0 -150
  1128. package/.worktrees/e58fcc4c/src/hooks/claude-pre-tool-use.cjs +0 -130
  1129. package/.worktrees/e58fcc4c/src/hooks/worktree-guard.js +0 -892
  1130. package/.worktrees/e58fcc4c/src/index.js +0 -2854
  1131. package/.worktrees/e58fcc4c/src/init.js +0 -626
  1132. package/.worktrees/e58fcc4c/src/knowledge-match.js +0 -231
  1133. package/.worktrees/e58fcc4c/src/local-detect.js +0 -128
  1134. package/.worktrees/e58fcc4c/src/local-register.js +0 -104
  1135. package/.worktrees/e58fcc4c/src/machine-interface.js +0 -543
  1136. package/.worktrees/e58fcc4c/src/migrate.js +0 -127
  1137. package/.worktrees/e58fcc4c/src/module-impact.js +0 -166
  1138. package/.worktrees/e58fcc4c/src/module-resolve.js +0 -222
  1139. package/.worktrees/e58fcc4c/src/modules.js +0 -580
  1140. package/.worktrees/e58fcc4c/src/plan-adopt-waves.js +0 -126
  1141. package/.worktrees/e58fcc4c/src/progress/change-registry.js +0 -336
  1142. package/.worktrees/e58fcc4c/src/progress/consistency-doctor.js +0 -355
  1143. package/.worktrees/e58fcc4c/src/progress/shared.js +0 -36
  1144. package/.worktrees/e58fcc4c/src/progress/stage-machine.js +0 -594
  1145. package/.worktrees/e58fcc4c/src/progress/step-store.js +0 -265
  1146. package/.worktrees/e58fcc4c/src/progress.js +0 -1304
  1147. package/.worktrees/e58fcc4c/src/quick-recommend.js +0 -115
  1148. package/.worktrees/e58fcc4c/src/quicklog.js +0 -883
  1149. package/.worktrees/e58fcc4c/src/review-tier.js +0 -77
  1150. package/.worktrees/e58fcc4c/src/run/command.js +0 -1641
  1151. package/.worktrees/e58fcc4c/src/run/complete-handlers.js +0 -1552
  1152. package/.worktrees/e58fcc4c/src/run/complete.js +0 -1259
  1153. package/.worktrees/e58fcc4c/src/run/concurrent-detect.js +0 -156
  1154. package/.worktrees/e58fcc4c/src/run/gates.js +0 -1111
  1155. package/.worktrees/e58fcc4c/src/run/multi-repo-context.js +0 -208
  1156. package/.worktrees/e58fcc4c/src/run/next.js +0 -128
  1157. package/.worktrees/e58fcc4c/src/run/prompt.js +0 -843
  1158. package/.worktrees/e58fcc4c/src/run/quick-audit.js +0 -186
  1159. package/.worktrees/e58fcc4c/src/run/scan-profile.js +0 -269
  1160. package/.worktrees/e58fcc4c/src/run/shared.js +0 -1562
  1161. package/.worktrees/e58fcc4c/src/run/stage.js +0 -587
  1162. package/.worktrees/e58fcc4c/src/run.js +0 -23
  1163. package/.worktrees/e58fcc4c/src/scan-diff.js +0 -388
  1164. package/.worktrees/e58fcc4c/src/scan-postcheck.js +0 -524
  1165. package/.worktrees/e58fcc4c/src/scan-staleness.js +0 -95
  1166. package/.worktrees/e58fcc4c/src/setup.js +0 -414
  1167. package/.worktrees/e58fcc4c/src/sillyhub-mcp/client.js +0 -597
  1168. package/.worktrees/e58fcc4c/src/sillyhub-mcp/config.js +0 -62
  1169. package/.worktrees/e58fcc4c/src/spec-dir-typo.js +0 -50
  1170. package/.worktrees/e58fcc4c/src/spec-sync.js +0 -358
  1171. package/.worktrees/e58fcc4c/src/stage-contract-engine.js +0 -171
  1172. package/.worktrees/e58fcc4c/src/stage-contract-spec.js +0 -551
  1173. package/.worktrees/e58fcc4c/src/stage-contract.js +0 -948
  1174. package/.worktrees/e58fcc4c/src/stage-review.js +0 -597
  1175. package/.worktrees/e58fcc4c/src/stages/archive.js +0 -199
  1176. package/.worktrees/e58fcc4c/src/stages/brainstorm-auto.js +0 -285
  1177. package/.worktrees/e58fcc4c/src/stages/brainstorm.js +0 -624
  1178. package/.worktrees/e58fcc4c/src/stages/cmd-existence.js +0 -145
  1179. package/.worktrees/e58fcc4c/src/stages/doctor.js +0 -540
  1180. package/.worktrees/e58fcc4c/src/stages/execute.js +0 -1277
  1181. package/.worktrees/e58fcc4c/src/stages/explore.js +0 -43
  1182. package/.worktrees/e58fcc4c/src/stages/index.js +0 -29
  1183. package/.worktrees/e58fcc4c/src/stages/knowledge.js +0 -514
  1184. package/.worktrees/e58fcc4c/src/stages/plan-postcheck.js +0 -1398
  1185. package/.worktrees/e58fcc4c/src/stages/plan.js +0 -655
  1186. package/.worktrees/e58fcc4c/src/stages/quick.js +0 -167
  1187. package/.worktrees/e58fcc4c/src/stages/scan.js +0 -608
  1188. package/.worktrees/e58fcc4c/src/stages/status.js +0 -64
  1189. package/.worktrees/e58fcc4c/src/stages/verify.js +0 -246
  1190. package/.worktrees/e58fcc4c/src/sync.js +0 -1470
  1191. package/.worktrees/e58fcc4c/src/task-review.js +0 -1498
  1192. package/.worktrees/e58fcc4c/src/taskcard-placeholders.js +0 -21
  1193. package/.worktrees/e58fcc4c/src/taskcard.js +0 -250
  1194. package/.worktrees/e58fcc4c/src/verify-postcheck.js +0 -1718
  1195. package/.worktrees/e58fcc4c/src/verify-probes.js +0 -327
  1196. package/.worktrees/e58fcc4c/src/version.js +0 -19
  1197. package/.worktrees/e58fcc4c/src/workflow.js +0 -600
  1198. package/.worktrees/e58fcc4c/src/workspace.js +0 -125
  1199. package/.worktrees/e58fcc4c/src/worktree-apply.js +0 -1611
  1200. package/.worktrees/e58fcc4c/src/worktree-deps.js +0 -668
  1201. package/.worktrees/e58fcc4c/src/worktree.js +0 -1849
  1202. package/.worktrees/e58fcc4c/templates/claude-instruction.md +0 -23
  1203. package/.worktrees/e58fcc4c/templates/prompts/taskcard-rules.md +0 -29
  1204. package/.worktrees/e58fcc4c/templates/prompts/testcase-design.md +0 -12
  1205. package/.worktrees/e58fcc4c/templates/prompts/verify-probes.md +0 -32
  1206. package/.worktrees/e58fcc4c/templates/workflows/archive-impact.yaml +0 -79
  1207. package/.worktrees/e58fcc4c/templates/workflows/scan-docs.yaml +0 -132
@@ -1,889 +0,0 @@
1
- /**
2
- * StageContract — 阶段协议
3
- *
4
- * 每个阶段声明:允许的前置阶段、必须的产出、校验器、后续阶段。
5
- * CLI 不再相信 prompt 完成,completeStep 后必须过 validator。
6
- */
7
-
8
- import { existsSync, readdirSync, readFileSync } from 'fs'
9
- import { join, basename } from 'path'
10
- import { safeGit } from './git-helper.js'
11
- import { detectChangeRisk, checkIntegrationEvidence, VERIFICATION_NEEDS, RISK_LEVEL_CAUSES } from './change-risk-profile.js'
12
- import { SCAN_REQUIRED_DOCS, AUXILIARY_STAGES } from './constants.js'
13
- import { evaluateRules } from './stage-contract-engine.js'
14
- import { getRule } from './stage-contract-spec.js'
15
- import { parseAllowedPaths } from './stages/plan-postcheck.js'
16
-
17
- /**
18
- * 校验结果
19
- * @typedef {{ ok: boolean, errors: string[], warnings: string[] }} ValidationResult
20
- */
21
-
22
- /**
23
- * 阶段合约
24
- * @typedef {{
25
- * stage: string,
26
- * description: string,
27
- * allowedFrom: string[],
28
- * allowedTo: string[],
29
- * validators: Function[],
30
- * }} StageContract
31
- */
32
-
33
- // ============ Validators ============
34
-
35
- function resolveChangeDir(cwd, changeName, specRoot = null) {
36
- const changesRoot = specRoot ? join(specRoot, 'changes') : join(cwd, '.sillyspec', 'changes')
37
- return join(changesRoot, changeName)
38
- }
39
-
40
- /**
41
- * --change 变更名存在性校验(治 cwd 漂移误匹配,缺陷 execute-in-place-windows-pitfalls 坑5)。
42
- *
43
- * 多项目 monorepo 下,cwd 在子项目目录会让 resolveSpecDir 命中子项目 spec,
44
- * 此时 --change 传根项目变更名,旧逻辑(resolveChangeDir 纯拼路径)不报错而静默
45
- * fallback 误启动子项目流程。本校验对「操作已有变更」的阶段强制 changes/<changeName>
46
- * 存在,不存在则 fail-fast,把 cwd 漂移暴露给用户。
47
- *
48
- * 豁免:
49
- * - 非 plan/execute/verify/archive 阶段(scan/brainstorm/quick/explore 不校验:
50
- * brainstorm 可新建变更、quick 用 sessionId、scan/explore 无 change 语义)
51
- * - quick-<8hex> sessionId(quick 会话 changeName 是 sessionId,不在 changes/)
52
- *
53
- * @param {string} specBase - 规范根目录(.sillyspec 或平台 specRoot)
54
- * @param {string} stageName - 阶段名
55
- * @param {string} changeName - 变更名(--change 或 auto)
56
- * @returns {{ changeName: string, specBase: string, message: string } | null} null=通过,对象=失败
57
- */
58
- export function validateChangeExists(specBase, stageName, changeName) {
59
- const STAGES_REQUIRE_EXISTING_CHANGE = new Set(['plan', 'execute', 'verify', 'archive'])
60
- if (!changeName || !STAGES_REQUIRE_EXISTING_CHANGE.has(stageName)) return null
61
- if (/^quick-[0-9a-f]{8}$/.test(changeName)) return null
62
- if (existsSync(join(specBase, 'changes', changeName))) return null
63
-
64
- // archive 特例:step4 --confirm 已把变更从 changes/<name>/ 移到 changes/archive/<name>/。
65
- // step5(更新路线图/提交)--change <name> 不应因 changes/<name>/ 已移走而被前置校验误拦。
66
- if (stageName === 'archive') {
67
- const archiveRoot = join(specBase, 'changes', 'archive')
68
- if (existsSync(archiveRoot) && existsSync(join(archiveRoot, changeName))) {
69
- return null
70
- }
71
- }
72
- return {
73
- changeName,
74
- specBase,
75
- message: `变更 "${changeName}" 在当前 spec 下不存在:${join(specBase, 'changes', changeName)}\n` +
76
- ` 排查方向(三选一):① 变更名是否打错(sillyspec status 或 progress show 查看活跃变更名);` +
77
- `② cwd 是否漂到了子项目目录(回到项目根再跑,或加 --spec-dir <根>/.sillyspec);` +
78
- `③ 是否该先跑 sillyspec run brainstorm 新建该变更。`,
79
- }
80
- }
81
-
82
- function collectIdsFromLine(line, re, ids) {
83
- for (const match of line.matchAll(re)) {
84
- ids.add(match[0].toUpperCase())
85
- }
86
- }
87
-
88
- function extractIds(content, prefix) {
89
- if (!content) return []
90
- const ids = new Set()
91
- const idRe = new RegExp(`\\b${prefix}-\\d+(?:@v\\d+)?\\b`, 'gi')
92
- const headingLineRe = /^\s{0,3}#{1,6}\s+/i
93
- const fieldLineRe = /^\s*(?:[-*]\s*)?(?:id|decision[-_ ]?ids?|requirement[-_ ]?ids?|covers?|coverage|references?|impacts?|覆盖(?:来源|决策|需求)?)\s*[::]/i
94
- const tableLineRe = /^\s*\|/
95
- const listStartsWithIdRe = new RegExp(`^\\s*(?:[-*]|\\d+\\.)\\s*(?:\\[[ xX]\\]\\s*)?${prefix}-\\d+(?:@v\\d+)?\\b`, 'i')
96
-
97
- for (const line of content.split(/\r?\n/)) {
98
- if (!headingLineRe.test(line) && !fieldLineRe.test(line) && !tableLineRe.test(line) && !listStartsWithIdRe.test(line)) continue
99
- collectIdsFromLine(line, idRe, ids)
100
- }
101
- return [...ids].sort()
102
- }
103
-
104
- function readDecisionField(body, fieldPattern, fallback = '') {
105
- const re = new RegExp(`^\\s*(?:[-*]\\s*)?(?:${fieldPattern})\\s*[::]\\s*([^\\n]+)`, 'im')
106
- return (body.match(re)?.[1] || fallback).trim()
107
- }
108
-
109
- function buildDecisionRecord(id, body) {
110
- const status = readDecisionField(body, 'status', 'accepted').toLowerCase()
111
- const blockerValue = readDecisionField(body, 'blocker', 'false').toLowerCase()
112
- const blocker = ['true', 'yes', '1'].includes(blockerValue)
113
- const priorityValue = readDecisionField(body, 'priority|level|severity')
114
- const priorityMissing = priorityValue.length === 0
115
- const fallbackPriority = (['unresolved', 'blocking'].includes(status) || blocker) ? 'P1' : 'P2'
116
- const priority = (priorityValue.match(/P[0-2]/i)?.[0] || fallbackPriority).toUpperCase()
117
- // 解析 supersedes 字段:记录本条决策取代了哪个旧版本
118
- const supersedesRaw = readDecisionField(body, 'supersedes', '')
119
- const supersedes = supersedesRaw
120
- ? supersedesRaw.split(',').map(s => s.trim().toUpperCase().replace(/['"]/g, '')).filter(Boolean)
121
- : []
122
- return { id: id.toUpperCase(), body, status, priority, blocker, priorityMissing, supersedes }
123
- }
124
-
125
- function findNextDecisionBoundary(content, startIndex) {
126
- const boundaryRe = /^(\s{0,3}#{2,6}\s+D-\d+(?:@v\d+)?\b|\s*(?:[-*]\s*)?(?:id|decision[-_ ]?id|decision)\s*[::]\s*D-\d+(?:@v\d+)?\b)/gmi
127
- boundaryRe.lastIndex = startIndex
128
- const next = boundaryRe.exec(content)
129
- return next ? next.index : content.length
130
- }
131
-
132
- function isInsideRange(index, ranges) {
133
- return ranges.some(range => index >= range.start && index < range.end)
134
- }
135
-
136
- function parseDecisionRecords(content) {
137
- if (!content) return []
138
- const records = []
139
- const ranges = []
140
- const headingRe = /^\s{0,3}#{2,6}\s+(D-\d+(?:@v\d+)?)(?:\b|:)[^\n]*$/gmi
141
- const headings = []
142
- let match
143
- while ((match = headingRe.exec(content)) !== null) {
144
- headings.push({ id: match[1].toUpperCase(), index: match.index, end: headingRe.lastIndex })
145
- }
146
- for (let i = 0; i < headings.length; i++) {
147
- const current = headings[i]
148
- const next = headings[i + 1]
149
- const body = content.slice(current.end, next ? next.index : content.length)
150
- const end = next ? next.index : content.length
151
- ranges.push({ start: current.index, end })
152
- records.push(buildDecisionRecord(current.id, body))
153
- }
154
-
155
- const idLineRe = /^\s*(?:[-*]\s*)?(?:id|decision[-_ ]?id|decision)\s*[::]\s*(D-\d+(?:@v\d+)?)(?:\b|$)/gmi
156
- while ((match = idLineRe.exec(content)) !== null) {
157
- if (isInsideRange(match.index, ranges)) continue
158
- const bodyEnd = findNextDecisionBoundary(content, idLineRe.lastIndex)
159
- const body = content.slice(match.index, bodyEnd)
160
- records.push(buildDecisionRecord(match[1], body))
161
- }
162
-
163
- return records
164
- }
165
-
166
- function extractCurrentDecisionIds(content) {
167
- const records = parseDecisionRecords(content)
168
- if (records.length === 0) return extractIds(content, 'D')
169
- // 收集所有被 supersedes 声明取代的旧版本 ID
170
- const supersededIds = new Set()
171
- for (const r of records) {
172
- for (const oldId of r.supersedes) {
173
- supersededIds.add(oldId)
174
- }
175
- }
176
- return records
177
- .filter(r => !['superseded', 'rejected'].includes(r.status))
178
- .filter(r => !supersededIds.has(r.id)) // 被新版本显式取代的旧版本不再校验
179
- .map(r => r.id)
180
- .sort()
181
- }
182
-
183
- function findBlockingDecisionIssues(content) {
184
- return parseDecisionRecords(content)
185
- .filter(r => (r.blocker || ['unresolved', 'blocking'].includes(r.status)) && ['P0', 'P1'].includes(r.priority))
186
- .map(r => `${r.id} (${r.priority}${r.priorityMissing ? ', priority=missing->P1' : ''}, status=${r.status})`)
187
- }
188
-
189
- function readIfExists(file) {
190
- return existsSync(file) ? readFileSync(file, 'utf8') : ''
191
- }
192
-
193
- function warnMissingIds(warnings, ids, targetContent, targetName, sourceName) {
194
- // 剥版本后缀(@vN)按基号词边界匹配:target 里写裸号 D-001 即视为引用了 D-001@V1
195
- // 的当前版本(prompt 常裸号引用,旧版字面 includes("D-001@V1") 会批量误报)。
196
- // 大小写不敏感:target 整体大写后比对。
197
- const targetUpper = targetContent.toUpperCase()
198
- for (const id of ids) {
199
- const base = id.replace(/@V\d+$/, '')
200
- const re = new RegExp(`\\b${base}\\b`)
201
- if (!re.test(targetUpper)) {
202
- warnings.push(getRule('shared.id-traceability').failMessage.replaceAll('${target}', targetName).replaceAll('${source}', sourceName).replaceAll('${id}', id))
203
- }
204
- }
205
- }
206
-
207
- /**
208
- * scan 完成校验:检查 7 份 scan 文档 + manifest
209
- */
210
- function validateScanOutputs(cwd, changeName, context = {}) {
211
- const { projectName, specRoot } = context
212
- // 平台模式:specRoot 直接是规范目录(含 docs/)
213
- // 本地模式:规范目录是 cwd/.sillyspec
214
- // 不用 isSpecDir 启发式猜测——很多项目根目录有自己的 docs/,会误判
215
- const specBase = specRoot || join(cwd, '.sillyspec')
216
- const docsRoot = projectName
217
- ? join(specBase, 'docs', projectName, 'scan')
218
- : join(specBase, 'docs', 'scan')
219
-
220
- // 7 份 scan 文档存在性由引擎消费 manifest(与 SCAN_REQUIRED_DOCS 单源,文案/事前契约同源)
221
- const engineResult = evaluateRules('scan', { docsRoot })
222
- const errors = [...engineResult.errors]
223
- const warnings = [...engineResult.warnings]
224
-
225
- // 检查 modules 目录
226
- const modulesRoot = projectName
227
- ? join(specBase, 'docs', projectName, 'modules')
228
- : join(specBase, 'docs', 'modules')
229
- if (!existsSync(modulesRoot)) {
230
- warnings.push('modules 目录不存在')
231
- } else {
232
- const modules = readdirSync(modulesRoot).filter(f => f.endsWith('.md'))
233
- if (modules.length === 0) {
234
- warnings.push('modules 目录为空')
235
- }
236
- }
237
-
238
- return { ok: errors.length === 0, errors, warnings }
239
- }
240
-
241
- /**
242
- * brainstorm 完成校验:检查四件套规范文件是否生成
243
- */
244
- function validateBrainstormOutputs(cwd, changeName, context = {}) {
245
- const { specRoot } = context
246
- const changesRoot = specRoot ? join(specRoot, 'changes') : join(cwd, '.sillyspec', 'changes')
247
- if (specRoot && !existsSync(changesRoot)) {
248
- return { ok: false, errors: [`平台模式 specRoot 缺少 changes 目录: ${changesRoot}`], warnings: [] }
249
- }
250
- const changeDir = resolveChangeDir(cwd, changeName, specRoot)
251
- // 读 design.md frontmatter scale(若有)传入引擎 ctx,供 BRAINSTORM_RULES 的 condition 判定:
252
- // scale=small → proposal/requirements/tasks 三规则跳过(小变更只产 design.md,与末步 prompt 一致,
253
- // 避免"照 Step8 small 指引只写 design.md 后 --done 必撞四件套 error墙")。
254
- // fail-safe:design.md 不存在或无 scale → null → condition(ne 'small')成立 → 四件套全要求(保守走重流程)。
255
- const designPath = join(changeDir, 'design.md')
256
- let scale = null
257
- let designContent = null
258
- if (existsSync(designPath)) {
259
- designContent = readFileSync(designPath, 'utf8')
260
- const fm = designContent.match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n/)
261
- const sm = fm && fm[1].match(/^scale:[ \t]*['"]?(\w+)/m)
262
- if (sm) scale = sm[1]
263
- }
264
- // 纯 kind 规则(四件套存在性 + proposal/requirements/design 章节 + tasks 列表)由引擎消费
265
- // stage-contract-spec.js manifest,与报错文案 + prompt 事前契约严格同源(事前给的 == 事后查的)。
266
- // custom kind(lifecycle / decisions)保留下方旧逻辑,数据/文案在 Batch 3 迁入 manifest。
267
- const engineResult = evaluateRules('brainstorm', { changeDir, scale })
268
- const errors = [...engineResult.errors]
269
- const warnings = [...engineResult.warnings]
270
-
271
- if (designContent) {
272
- const content = designContent
273
-
274
- // lifecycle-exemption(custom kind):判定算法保留(trigger/exemption/table 三段短路),
275
- // data + failMessage/exemptionPassedMessage 从 stage-contract-spec.js manifest 同源。
276
- const lcRule = getRule('brainstorm.design.lifecycle-table')
277
- const { trigger: lcTrigger, exemptions: lcExempts, table: lcTable } = lcRule.data
278
- if (new RegExp(lcTrigger.pattern, lcTrigger.flags).test(content)) {
279
- const declaresNotApplicable = lcExempts.some(e => new RegExp(e.pattern, e.flags).test(content))
280
- if (declaresNotApplicable) {
281
- warnings.push(lcRule.exemptionPassedMessage)
282
- } else {
283
- const hasLifecycleTable = lcTable.some(t => new RegExp(t.pattern, t.flags).test(content))
284
- if (!hasLifecycleTable) {
285
- errors.push(lcRule.failMessage)
286
- }
287
- }
288
- }
289
- }
290
-
291
- const decisionsFile = join(changeDir, 'decisions.md')
292
- if (existsSync(decisionsFile)) {
293
- const decisions = readFileSync(decisionsFile, 'utf8')
294
- const blockers = findBlockingDecisionIssues(decisions)
295
- for (const issue of blockers) {
296
- errors.push(getRule('shared.decision-blocker').failMessage.replace('${issue}', issue))
297
- }
298
- const decisionIds = extractCurrentDecisionIds(decisions)
299
- if (decisionIds.length === 0) {
300
- warnings.push('decisions.md 存在但没有当前版本 D-xxx@vN 决策 ID')
301
- } else {
302
- const design = readIfExists(join(changeDir, 'design.md'))
303
- const requirements = readIfExists(join(changeDir, 'requirements.md'))
304
- const tasks = readIfExists(join(changeDir, 'tasks.md'))
305
- // decision 的天然引用落点是 design.md;requirements(需求按 FR 组织)与
306
- // tasks(骨架,待 plan 展开)不强求逐条引用每个架构决策,否则批量误报。
307
- warnMissingIds(warnings, decisionIds, design, 'design.md', 'decisions.md')
308
- }
309
- }
310
-
311
- return { ok: errors.length === 0, errors, warnings }
312
- }
313
-
314
- /**
315
- * plan 完成校验:检查 plan.md 生成
316
- */
317
- function validatePlanOutputs(cwd, changeName, context = {}) {
318
- const { specRoot } = context
319
- const changeDir = resolveChangeDir(cwd, changeName, specRoot)
320
- const planFile = join(changeDir, 'plan.md')
321
-
322
- // 读 design.md frontmatter scale(若有)传入引擎 ctx,供 plan.module-impact.exists 的 condition
323
- // (scale≠small)判定——large 要求 module-impact 首版,small 豁免(走 quick)。fail-safe:无 scale→null→
324
- // condition(ne 'small')成立→保守要求 module-impact(同 brainstorm scale 读取模式,line 264-272)。
325
- const designPathForScale = join(changeDir, 'design.md')
326
- let scale = null
327
- if (existsSync(designPathForScale)) {
328
- const fm = readFileSync(designPathForScale, 'utf8').match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n/)
329
- const sm = fm && fm[1].match(/^scale:[ \t]*['"]?(\w+)/m)
330
- if (sm) scale = sm[1]
331
- }
332
- // plan.md 存在性由引擎消费 manifest。entryPoint/id-trace/decisions 为 custom kind(下方保留)。
333
- const engineResult = evaluateRules('plan', { changeDir, scale })
334
- const errors = [...engineResult.errors]
335
- const warnings = [...engineResult.warnings]
336
-
337
- if (existsSync(planFile)) {
338
- const plan = readFileSync(planFile, 'utf8')
339
- const requirements = readIfExists(join(changeDir, 'requirements.md'))
340
- const requirementIds = extractIds(requirements, 'FR')
341
- warnMissingIds(warnings, requirementIds, plan, 'plan.md', 'requirements.md')
342
-
343
- const decisions = readIfExists(join(changeDir, 'decisions.md'))
344
- const blockers = findBlockingDecisionIssues(decisions)
345
- for (const issue of blockers) {
346
- errors.push(getRule('shared.decision-blocker').failMessage.replace('${issue}', issue))
347
- }
348
- const decisionIds = extractCurrentDecisionIds(decisions)
349
- warnMissingIds(warnings, decisionIds, plan, 'plan.md', 'decisions.md')
350
- }
351
- // ── P0: 生产接线路径检查:design 提到入口但 task 的 allowed_paths 不含入口文件 ──
352
- // entry-point-wiring(custom):trigger/file 抽取/exemption/failMessage 从 manifest 同源
353
- // (stage-contract-spec.js),保留多源 allowed_paths 收集 + 逐文件对账 + 豁免算法。
354
- const designContent = readIfExists(join(changeDir, 'design.md'))
355
- if (designContent) {
356
- const epRule = getRule('plan.entry-point-wiring')
357
- const { entryPointPatterns, fileExtractionPattern, exemptionPattern } = epRule.data
358
- const fileExtractRe = new RegExp(fileExtractionPattern.pattern, fileExtractionPattern.flags)
359
- const mentionedFiles = new Set()
360
- for (const ep of entryPointPatterns) {
361
- const pattern = new RegExp(ep.pattern, ep.flags)
362
- pattern.lastIndex = 0
363
- for (const match of designContent.matchAll(pattern)) {
364
- const fileMatch = match[0].match(fileExtractRe)
365
- if (fileMatch) mentionedFiles.add(fileMatch[1].toLowerCase())
366
- }
367
- }
368
- if (mentionedFiles.size > 0) {
369
- const tasksDir = join(changeDir, 'tasks')
370
- const allAllowedPaths = new Set()
371
- if (existsSync(tasksDir)) {
372
- const taskFiles = readdirSync(tasksDir).filter(f => /^task-\d+\.md$/i.test(f))
373
- for (const taskFile of taskFiles) {
374
- const taskContent = readFileSync(join(tasksDir, taskFile), 'utf8')
375
- // 复用 parseAllowedPaths(坑6①:认 inline 数组/缩进块/顶格块 + 剥反引号 + CRLF 归一,
376
- // 消除此处内联正则与 plan-postcheck 的解析漂移)。卡片无 frontmatter 时退全文扫描
377
- // (包裹伪 frontmatter 复用同一解析器)——原内联正则是全文匹配语义,entry-point-wiring
378
- // 只关心路径覆盖,卡片格式合法性归 plan-postcheck 把关,此处不收紧。
379
- const paths = parseAllowedPaths(taskContent)
380
- const effective = paths.length > 0 ? paths : parseAllowedPaths(`---\n${taskContent}\n---`)
381
- for (const p of effective) allAllowedPaths.add(p.toLowerCase())
382
- }
383
- }
384
- // 也从 plan.md 文件变更清单中收集
385
- if (existsSync(planFile)) {
386
- const planContent = readFileSync(planFile, 'utf8')
387
- const planFileChanges = planContent.match(/\|\s*(?:新增|修改|new|modify|update)\s*\|\s*`?([^`|]+)`?\s*\|/gi) || []
388
- for (const line of planFileChanges) {
389
- const file = line.match(/\|\s*(?:新增|修改|new|modify|update)\s*\|\s*`?([^`|]+)`?\s*\|/i)
390
- if (file) allAllowedPaths.add(file[1].trim().toLowerCase())
391
- }
392
- }
393
- for (const mentionedFile of mentionedFiles) {
394
- const found = [...allAllowedPaths].some(p => p.includes(mentionedFile))
395
- if (!found) {
396
- const noChangePattern = new RegExp(exemptionPattern.replaceAll('${file}', mentionedFile), 'i')
397
- if (!noChangePattern.test(designContent)) {
398
- errors.push(epRule.failMessage.replaceAll('${file}', mentionedFile))
399
- }
400
- }
401
- }
402
- }
403
- }
404
-
405
- return { ok: errors.length === 0, errors, warnings }
406
- }
407
- /**
408
- * 从 verify-result.md 提取结论关键词(PASS / PASS WITH NOTES / FAIL)。
409
- * 标题放宽:含「结论/Conclusion/Result/结果」的二级标题均可(B3c),
410
- * PASS/FAIL 可在标题行本身(如「## 验收结论:✅ PASS」)或紧邻标题的正文里。
411
- * 历史教训:原正则锚定确切「## 结论」,用户写「## 验收结论:✅ PASS」不被识别。
412
- */
413
- function extractVerifyConclusion(verify) {
414
- const headingRe = /^##\s[^\n]*(?:结论|conclusion|result|结果)/im
415
- const headingMatch = verify.match(headingRe)
416
- if (!headingMatch) return ''
417
- const start = headingMatch.index
418
- const slice = verify.slice(start, start + 400)
419
- const kw = slice.match(/\b(PASS(?:\s+WITH\s+NOTES)?|FAIL)\b/i)
420
- return kw ? kw[1].toUpperCase().replace(/\s+/g, ' ') : ''
421
- }
422
-
423
- function validateVerifyOutputs(cwd, changeName, context = {}) {
424
- const { specRoot } = context
425
- const changeDir = resolveChangeDir(cwd, changeName, specRoot)
426
-
427
- if (!existsSync(changeDir)) {
428
- return { ok: false, errors: [`变更目录缺失: ${changeDir}`], warnings: [] }
429
- }
430
-
431
- // 核心文档存在性(verify-result.md / design.md / plan.md)由引擎消费 manifest。
432
- // verify-result.md 不存在则不能完成——历史教训:AI 可能跳过报告直接 --done 导致"假完成"。
433
- const engineResult = evaluateRules('verify', { changeDir })
434
- const errors = [...engineResult.errors]
435
- const warnings = [...engineResult.warnings]
436
-
437
- const verifyResult = join(changeDir, 'verify-result.md')
438
- if (existsSync(verifyResult)) {
439
- const verify = readFileSync(verifyResult, 'utf8')
440
- const decisions = readIfExists(join(changeDir, 'decisions.md'))
441
- const blockers = findBlockingDecisionIssues(decisions)
442
- for (const issue of blockers) {
443
- errors.push(getRule('shared.decision-blocker').failMessage.replace('${issue}', issue))
444
- }
445
- const decisionIds = extractCurrentDecisionIds(decisions)
446
- warnMissingIds(warnings, decisionIds, verify, 'verify-result.md', 'decisions.md')
447
-
448
- // ── FAIL 结论门控(适用于所有变更,不限风险等级)──
449
- // verify-result.md 结论为 FAIL 时,verify 阶段不能 completed。
450
- // 历史教训:CLI 曾不校验结论,AI 写 FAIL 后 verify 仍被标记完成并提示"验证通过可以归档"。
451
- const conclusionStr = extractVerifyConclusion(verify)
452
- if (conclusionStr === 'FAIL') {
453
- errors.push(getRule('verify.conclusion.fail-gate').failMessage)
454
- } else if (!conclusionStr) {
455
- warnings.push(getRule('verify.conclusion.fail-gate').noConclusionWarning)
456
- }
457
-
458
- // ── P0: Change Risk Gate — 核心功能缺少真实集成验证时 FAIL ──
459
- const changeRiskProfile = detectChangeRisk({
460
- designContent: readIfExists(join(changeDir, 'design.md')),
461
- planContent: readIfExists(join(changeDir, 'plan.md')),
462
- })
463
- const conclusion = extractVerifyConclusion(verify)
464
- if (['integration-critical', 'deployment-critical'].includes(changeRiskProfile.level)) {
465
- // 关键词误伤早期引导(坑2,FR-02):命中高危关键词且无 frontmatter risk_level 时,
466
- // 无条件透出 frontmatter 覆盖指引(不依赖 conclusion / evidence),让 agent 早期即可
467
- // 判断是否属误判并显式覆盖,而非撞到 evidence gate 末尾才发现出路③。遵 6417a27:不做
468
- // body 否定语境扫描,只走 frontmatter 显式覆盖通道。
469
- if (!changeRiskProfile.explicit) {
470
- warnings.push(
471
- `[${changeRiskProfile.level}] 本次变更被关键词判级(命中:${changeRiskProfile.triggers.join(', ')})。` +
472
- `若属关键词误伤(实际未触碰 daemon/session/启动入口/跨进程),可在 design.md frontmatter 加 risk_level: <真实等级>(如 unit-sufficient)显式覆盖后重跑。`
473
- )
474
- }
475
- // 显式 risk_level 声明(design frontmatter,非关键词误判)下,PASS WITH NOTES 视为对残留项的
476
- // 诚实声明,不强求全量集成证据——豁免本就来自 design 的明确判断。自动关键词判级维持严格:
477
- // PASS WITH NOTES 仍要求证据齐全,防 agent 用 PASS WITH NOTES 绕证据门控。
478
- const requiresEvidence = conclusion === 'PASS' || (conclusion === 'PASS WITH NOTES' && !changeRiskProfile.explicit)
479
- if (conclusion === 'PASS WITH NOTES' && changeRiskProfile.explicit) {
480
- warnings.push(`[${changeRiskProfile.level}] 结论 PASS WITH NOTES:design frontmatter 显式声明 risk_level=${changeRiskProfile.level},残留项须为真实集成证据缺口,并在 verify-result.md 如实说明`)
481
- }
482
- if (requiresEvidence) {
483
- // CLI 回执注入(坑 verify-literal-evidence-mismatch,2026-08-22 实证:证据第一轮就齐
484
- // 但自然措辞不含字面词被误拦三轮):verify 服务回收器落的回执 = 真实启动+PID 登记
485
- // 的结构化证据,作为附加匹配文本——有回执不依赖 agent 措辞;无回执维持原字面匹配
486
- let receiptText = ''
487
- try {
488
- // 回执按变更分片(坑 verify-pids-cross-session-kill:原单份被并行会话后写覆盖),
489
- // 优先读本变更分片,兼容旧单份名(升级过渡期 receipt.change 过滤仍生效)
490
- const runtimeDir = join(cwd, '.sillyspec', '.runtime')
491
- const receiptPath = existsSync(join(runtimeDir, `verify-services-${changeName}.receipt.json`))
492
- ? join(runtimeDir, `verify-services-${changeName}.receipt.json`)
493
- : join(runtimeDir, 'verify-services.receipt.json')
494
- if (existsSync(receiptPath)) {
495
- const receipt = JSON.parse(readFileSync(receiptPath, 'utf8'))
496
- if (receipt && (receipt.reapedPidCount || 0) > 0 && (!receipt.change || receipt.change === changeName)) {
497
- receiptText = `CLI 回执:verify 服务进程已回收 ${receipt.reapedPidCount} 个(PID 已登记,真实启动,运行时证据 reapedAt=${receipt.reapedAt})`
498
- }
499
- }
500
- } catch { /* 回执损坏按无回执处理(fail 回原字面匹配) */ }
501
- const evidenceCheck = checkIntegrationEvidence(verify, changeRiskProfile.requiredVerification, { extraEvidenceText: receiptText })
502
- if (!evidenceCheck.ok) {
503
- // A: 报错说人话 —— 把「缺哪一项、要写/做什么、判级原因」逐条列出,
504
- // 让 agent 不必靠改结论文案撞墙。detail 指明真实启动须是本变更实际改动的
505
- // 部署/启动入口(非无关进程),以及每项的字面期望。
506
- const needs = changeRiskProfile.requiredVerification
507
- .filter(k => VERIFICATION_NEEDS[k] && VERIFICATION_NEEDS[k].desc)
508
- .map(k => {
509
- const vn = VERIFICATION_NEEDS[k]
510
- const lit = vn.literals && vn.literals.length ? '字面命中其一:' + vn.literals.join(' / ') : ''
511
- return `\n 〔${k}〕${vn.desc}${lit}`
512
- })
513
- .join('')
514
- const cause = changeRiskProfile.explicit
515
- ? RISK_LEVEL_CAUSES.explicit
516
- : (RISK_LEVEL_CAUSES[changeRiskProfile.level] || '')
517
- errors.push(
518
- `[${changeRiskProfile.level}] 验证结论为 ${conclusion},但缺少真实集成证据。\n` +
519
- ` 缺失项(需在 verify-result.md 如实提供并满足):${evidenceCheck.errors.join('; ')}\n` +
520
- ` 每项要提供什么:${needs}\n` +
521
- ` 风险判级原因:${cause}\n` +
522
- ` 命中触发词:${changeRiskProfile.triggers.join(', ')}\n` +
523
- ` 出路:① 补全上述缺失的真实集成证据(真实启动 daemon/backend、集成测试、运行日志)后保持 PASS;` +
524
- `或 ② 如实改结论 FAIL(承认端到端未验,留待部署后补);` +
525
- `或 ③ 若判级是关键词误伤(实际并未触碰 daemon/session/启动入口),在 design.md frontmatter 加 risk_level: <真实等级>(如 unit-sufficient)显式覆盖后重跑。` +
526
- `仅改结论文案/措辞蹭字面关键词会被对账。`
527
- )
528
- }
529
- warnings.push(...evidenceCheck.warnings)
530
- }
531
- }
532
- }
533
-
534
- return { ok: errors.length === 0, errors, warnings }
535
- }
536
-
537
- /**
538
- * 计算归档目标目录名:保持原变更名不变,直接移入 archive/。
539
- */
540
- export function archiveDestDirName(date, changeName) {
541
- return String(changeName)
542
- }
543
-
544
- /**
545
- * archive 完成校验:检查归档目录完整性
546
- */
547
- function validateArchiveOutputs(cwd, changeName) {
548
- const archiveDir = join(cwd, '.sillyspec', 'changes', 'archive')
549
- const destDir = join(archiveDir, changeName)
550
-
551
- // 归档目录不存在 early return(引擎在存在时才跑)
552
- if (!existsSync(destDir)) {
553
- return { ok: false, errors: [`归档目录缺失: ${destDir}`], warnings: [] }
554
- }
555
-
556
- // plan.md(必备)/design.md/module-impact.md(推荐)存在性由引擎消费 manifest
557
- const engineResult = evaluateRules('archive', { archiveDir: destDir }, undefined, { source: 'validateArchiveOutputs' })
558
- return { ok: engineResult.errors.length === 0, errors: engineResult.errors, warnings: engineResult.warnings }
559
- }
560
-
561
- /**
562
- * archive 前置校验:所有主流程阶段完成
563
- */
564
- function validateChangeClosed(cwd, changeName) {
565
- const errors = []
566
- const warnings = []
567
-
568
- // 检查前置阶段状态
569
- const progressDir = join(cwd, '.sillyspec', '.runtime')
570
- // 这里只做文件层面的检查,DB 检查在 run.js 里做
571
- const changeDir = join(cwd, '.sillyspec', 'changes', changeName)
572
- if (!existsSync(changeDir)) {
573
- errors.push(`变更目录不存在: ${changeDir}`)
574
- return { ok: false, errors, warnings }
575
- }
576
-
577
- // plan.md 存在性由引擎消费 manifest(source 区分 validateChangeClosed vs validateArchiveOutputs)
578
- const engineResult = evaluateRules('archive', { changeDir }, undefined, { source: 'validateChangeClosed' })
579
- return { ok: engineResult.errors.length === 0, errors: engineResult.errors, warnings: engineResult.warnings }
580
- }
581
-
582
- // ============ Execute 代码变更客观核验 ============
583
-
584
- // QUAL-01 收口:本地 execFileSync 裸调(无 safe.directory)→ git-helper safeGit 统一入口,
585
- // {ok,out,error} 适配语义与 timeout 15000 不变
586
- function gitTry(dir, args) {
587
- const r = safeGit(dir, args, { timeout: 15000 })
588
- if (r.value !== null) return { ok: true, out: r.value }
589
- return { ok: false, out: '', error: r.error || 'git 执行失败' }
590
- }
591
-
592
- /**
593
- * 客观核验 execute 阶段是否产生了真实代码变更。
594
- *
595
- * 历史漏洞:execute 无 stage-level validator,agent 勾选 plan.md 全部 checkbox
596
- * 即可让 execute 被标 completed,代码完成度与真实变更完全脱钩。
597
- *
598
- * 判定顺序(fail-open on uncertainty,避免环境差异误杀):
599
- * 1. worktree meta 存在且有 baseHash → 在 worktree 内查 baseHash..HEAD diff + 未提交改动
600
- * 2. sillyspec/<change> 分支存在 → 查 merge-base..branch diff
601
- * 3. 主工作区存在未提交改动(apply 后未 commit 的常见形态)→ changed
602
- * 4. 均无法判定 → unknown(由调用方降级为 warning)
603
- *
604
- * @returns {{ status: 'changed'|'unchanged'|'unknown', detail: string }}
605
- */
606
- export function checkExecuteCodeEvidence(cwd, changeName) {
607
- const metaPath = join(cwd, '.sillyspec', '.runtime', 'worktrees', changeName, 'meta.json')
608
- let meta = null
609
- if (existsSync(metaPath)) {
610
- try { meta = JSON.parse(readFileSync(metaPath, 'utf8')) } catch {}
611
- }
612
-
613
- // 1. worktree(或 in-place)meta 有 baseHash:最权威的对账基准
614
- if (meta?.baseHash) {
615
- const gitDir = (meta.worktreePath && meta.mode !== 'in-place-fallback' && existsSync(meta.worktreePath))
616
- ? meta.worktreePath
617
- : cwd
618
- const diff = gitTry(gitDir, ['diff', '--name-only', `${meta.baseHash}..HEAD`])
619
- const status = gitTry(gitDir, ['status', '--porcelain'])
620
- if (diff.ok && status.ok) {
621
- const committedFiles = diff.out ? diff.out.split('\n').filter(Boolean).length : 0
622
- const hasUncommitted = status.out.trim().length > 0
623
- if (committedFiles > 0 || hasUncommitted) {
624
- return { status: 'changed', detail: `${committedFiles} 个已提交变更文件${hasUncommitted ? ' + 未提交改动' : ''}(base ${meta.baseHash.slice(0, 8)})` }
625
- }
626
- return { status: 'unchanged', detail: `${gitDir} 相对 base ${meta.baseHash.slice(0, 8)} 无任何提交或未提交改动` }
627
- }
628
- return { status: 'unknown', detail: `git 核验失败: ${diff.error || status.error}` }
629
- }
630
-
631
- // 2. worktree 已清理但分支残留:diff merge-base..branch
632
- const branch = `sillyspec/${changeName}`
633
- const branchHash = gitTry(cwd, ['rev-parse', '--verify', '--quiet', branch])
634
- if (branchHash.ok && branchHash.out) {
635
- const mergeBase = gitTry(cwd, ['merge-base', 'HEAD', branch])
636
- if (mergeBase.ok && mergeBase.out) {
637
- const diff = gitTry(cwd, ['diff', '--name-only', `${mergeBase.out}..${branch}`])
638
- if (diff.ok && diff.out.split('\n').filter(Boolean).length > 0) {
639
- return { status: 'changed', detail: `分支 ${branch} 相对 merge-base 有变更` }
640
- }
641
- }
642
- }
643
-
644
- // 3. 主工作区未提交改动(worktree apply 后的常见形态)
645
- const status = gitTry(cwd, ['status', '--porcelain'])
646
- if (status.ok && status.out.trim()) {
647
- return { status: 'changed', detail: '主工作区存在未提交改动' }
648
- }
649
-
650
- return { status: 'unknown', detail: '无 worktree meta 且无可对账的分支/未提交改动(变更可能已 apply 并提交),无法客观判定' }
651
- }
652
-
653
- /**
654
- * execute 完成校验:plan.md 声明了任务时,必须存在真实代码变更。
655
- * 防止"勾选 checkbox = 完成 execute"的谎报路径。
656
- */
657
- function validateExecuteOutputs(cwd, changeName, context = {}) {
658
- const { specRoot, evidence: passedEvidence } = context
659
- const errors = []
660
- const warnings = []
661
-
662
- const changeDir = resolveChangeDir(cwd, changeName, specRoot)
663
- const planPath = join(changeDir, 'plan.md')
664
- // 无 plan.md 的 execute(旧流程/quick 混用)不在此核验范围
665
- if (!existsSync(planPath)) return { ok: true, errors, warnings }
666
-
667
- const planContent = readFileSync(planPath, 'utf8')
668
- const hasTasks = /^\s*[-*]\s*\[[ xX]\]\s*task-\d+/m.test(planContent)
669
- if (!hasTasks) return { ok: true, errors, warnings }
670
-
671
- // W4-G (D-008):evidence 可由调用方(runGate)预先算好传入,避免与 execute-evidence check
672
- // 重复 spawn git(gate execute 一次省 2 个 git 进程 ≈ 60-200ms on Windows)。未传则内部算(向后兼容)。
673
- const evidence = passedEvidence || checkExecuteCodeEvidence(cwd, changeName)
674
- if (evidence.status === 'unchanged') {
675
- errors.push(`execute 代码变更核验失败:plan.md 声明了任务,但 ${evidence.detail} — 勾选 checkbox 不等于完成实现`)
676
- } else if (evidence.status === 'unknown') {
677
- warnings.push(`execute 代码变更无法客观核验:${evidence.detail}`)
678
- }
679
-
680
- return { ok: errors.length === 0, errors, warnings }
681
- }
682
-
683
- // ============ Contract Registry ============
684
-
685
- /**
686
- * 主流程阶段(有严格转换顺序)
687
- */
688
- const mainFlowStages = ['brainstorm', 'plan', 'execute', 'verify']
689
-
690
- // 辅助阶段(可独立运行,无严格转换顺序)定义在 constants.js 的 AUXILIARY_STAGES,
691
- // 与 stages/index.js 共用单一真相源,避免两处逐字重复分叉。
692
-
693
- /**
694
- * @type {Object<string, StageContract>}
695
- */
696
- const contracts = {
697
- // === 主流程 ===
698
- brainstorm: {
699
- stage: 'brainstorm',
700
- description: '需求分析与设计',
701
- allowedFrom: [], // 任何变更的起始阶段
702
- allowedTo: ['plan'],
703
- validators: [validateBrainstormOutputs],
704
- },
705
- plan: {
706
- stage: 'plan',
707
- description: '任务拆解与规划',
708
- allowedFrom: ['brainstorm'],
709
- allowedTo: ['execute'],
710
- validators: [validatePlanOutputs],
711
- },
712
- execute: {
713
- stage: 'execute',
714
- description: '代码实现',
715
- allowedFrom: ['plan'],
716
- allowedTo: ['verify'],
717
- validators: [validateExecuteOutputs],
718
- },
719
- verify: {
720
- stage: 'verify',
721
- description: '验证与测试',
722
- allowedFrom: ['execute'],
723
- allowedTo: ['archive'],
724
- validators: [validateVerifyOutputs],
725
- },
726
- archive: {
727
- stage: 'archive',
728
- description: '归档与收口',
729
- allowedFrom: ['verify'],
730
- allowedTo: [],
731
- // 阶段级 validator 全部移除,改为 run.js 中 step 4 完成后的硬编码校验。
732
- // 理由:两个 validator 的生效窗口互斥 ——
733
- // validateChangeClosed 要求变更目录存在(step 4 --confirm 后已被移到 archive 目录)
734
- // validateArchiveOutputs 要求 archive 目录存在(step 4 前还不存在)
735
- // 注册为阶段级 validator 会导致每步都误报错误。
736
- // run.js:893-909 已在正确的时机(step 4 完成后)执行相同检查。
737
- validators: [],
738
- },
739
-
740
- // === 辅助阶段 ===
741
- scan: {
742
- stage: 'scan',
743
- description: '项目扫描',
744
- allowedFrom: [], // 无前置要求
745
- allowedTo: [], // 不进入主流程
746
- validators: [validateScanOutputs],
747
- },
748
- quick: {
749
- stage: 'quick',
750
- description: '快速任务',
751
- allowedFrom: [], // 无前置要求
752
- allowedTo: [], // 不进入主流程
753
- validators: [],
754
- },
755
- explore: {
756
- stage: 'explore',
757
- description: '代码探索',
758
- allowedFrom: [],
759
- allowedTo: [],
760
- validators: [],
761
- },
762
- status: {
763
- stage: 'status',
764
- description: '项目快照',
765
- allowedFrom: [],
766
- allowedTo: [],
767
- validators: [],
768
- },
769
- doctor: {
770
- stage: 'doctor',
771
- description: '环境诊断',
772
- allowedFrom: [],
773
- allowedTo: [],
774
- validators: [],
775
- },
776
- }
777
-
778
- // ============ Public API ============
779
-
780
- /**
781
- * 获取阶段合约
782
- */
783
- export function getContract(stageName) {
784
- return contracts[stageName] || null
785
- }
786
-
787
- /**
788
- * 校验状态转换是否允许
789
- * @param {string} fromStage - 当前阶段(空字符串表示变更起始)
790
- * @param {string} toStage - 目标阶段
791
- * @param {{ fromStageData?: { status?: string } | undefined }} [options] - 可选,从 progress.stages[prevStage] 提取
792
- * @returns {{ allowed: boolean, reason?: string }}
793
- */
794
- export function checkTransition(fromStage, toStage, options = {}) {
795
- const { fromStageData } = options // { status?: string } | undefined
796
- const contract = contracts[toStage]
797
- if (!contract) {
798
- return { allowed: false, reason: `未知阶段: ${toStage}` }
799
- }
800
-
801
- // 辅助阶段随时可执行(archive 除外:从主流程进入 archive 需要校验)
802
- if (AUXILIARY_STAGES.includes(toStage) && toStage !== 'archive') {
803
- return { allowed: true }
804
- }
805
-
806
- // 同阶段内重复运行:允许(继续执行当前阶段的下一步、或修订模式继续)
807
- if (fromStage === toStage) {
808
- return { allowed: true }
809
- }
810
-
811
- // task-07: failed_post_check 门控
812
- // scan post-check 未通过时,禁止进入主流程的下游阶段(brainstorm/plan/execute/verify/archive)
813
- // 必须先重跑 scan 修复。toStage === 'scan' 的重跑路径已被上方 fromStage === toStage 放行。
814
- // fromStageData.status 缺失(旧数据)时门控不触发(向后兼容)。
815
- if (fromStage === 'scan' && fromStageData?.status === 'failed_post_check' && toStage !== 'scan') {
816
- return {
817
- allowed: false,
818
- reason: 'scan post-check 未通过(failed_post_check),需修复后重跑 scan 再进入 ' + toStage,
819
- }
820
- }
821
-
822
- // archive 特殊处理:从 verify 来的允许,从其他主流程阶段来的需要校验
823
- if (toStage === 'archive') {
824
- if (fromStage === 'verify') {
825
- return { allowed: true }
826
- }
827
- // 独立运行 archive(无前置)也允许
828
- if (!fromStage || AUXILIARY_STAGES.includes(fromStage)) {
829
- return { allowed: true }
830
- }
831
- return { allowed: false, reason: 'archive 的前置阶段是 verify,不能从 ' + fromStage + ' 跳转' }
832
- }
833
-
834
- // 从辅助阶段进入主流程:允许
835
- if (AUXILIARY_STAGES.includes(fromStage)) {
836
- return { allowed: true }
837
- }
838
-
839
- // 无前置阶段(变更起始):只能开始 brainstorm 或辅助阶段
840
- if (!fromStage) {
841
- // 主流程必须从 brainstorm 开始
842
- if (contract.allowedFrom.length === 0) {
843
- return { allowed: true }
844
- }
845
- return { allowed: false, reason: `${toStage} 需要先完成 ${contract.allowedFrom.join(' 或 ')}` }
846
- }
847
-
848
- // 主流程内部跳转:检查目标阶段的 allowedFrom 是否包含 fromStage
849
- if (contract.allowedFrom.includes(fromStage)) {
850
- return { allowed: true }
851
- }
852
-
853
- return { allowed: false, reason: `${toStage} 的前置阶段是 ${contract.allowedFrom.join(' 或 ')},不能从 ${fromStage} 跳转` }
854
- }
855
-
856
- /**
857
- * 执行阶段完成校验
858
- * @param {string} stageName
859
- * @param {string} cwd
860
- * @param {string} changeName
861
- * @param {object} context - 额外上下文(如 projectName)
862
- * @returns {ValidationResult}
863
- */
864
- export function runValidators(stageName, cwd, changeName, context = {}) {
865
- const contract = contracts[stageName]
866
- if (!contract || contract.validators.length === 0) {
867
- return { ok: true, errors: [], warnings: [] }
868
- }
869
-
870
- const allErrors = []
871
- const allWarnings = []
872
-
873
- for (const validator of contract.validators) {
874
- try {
875
- const result = validator(cwd, changeName, context)
876
- allErrors.push(...(result.errors || []))
877
- allWarnings.push(...(result.warnings || []))
878
- } catch (e) {
879
- allErrors.push(`校验器 ${validator.name || 'unknown'} 异常: ${e.message}`)
880
- }
881
- }
882
-
883
- return { ok: allErrors.length === 0, errors: allErrors, warnings: allWarnings }
884
- }
885
-
886
- /**
887
- * 获取所有主流程阶段
888
- */
889
- export { mainFlowStages, AUXILIARY_STAGES as auxiliaryStages }