spexcode 0.6.1 → 0.6.5

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 (480) hide show
  1. package/README.md +99 -149
  2. package/bin/spex.mjs +4 -0
  3. package/node_modules/@spexcode/spec-cli/bin/spex.mjs +76 -0
  4. package/node_modules/@spexcode/spec-cli/dist/attach.d.ts +2 -0
  5. package/node_modules/@spexcode/spec-cli/dist/attach.js +48 -0
  6. package/node_modules/@spexcode/spec-cli/dist/claude-headless.d.ts +33 -0
  7. package/node_modules/@spexcode/spec-cli/dist/claude-headless.js +307 -0
  8. package/node_modules/@spexcode/spec-cli/dist/cli.d.ts +1 -0
  9. package/node_modules/@spexcode/spec-cli/dist/cli.js +1859 -0
  10. package/node_modules/@spexcode/spec-cli/dist/client.d.ts +111 -0
  11. package/node_modules/@spexcode/spec-cli/dist/client.js +476 -0
  12. package/node_modules/@spexcode/spec-cli/dist/cockpit.d.ts +7 -0
  13. package/node_modules/@spexcode/spec-cli/dist/cockpit.js +26 -0
  14. package/node_modules/@spexcode/spec-cli/dist/codex-headless.d.ts +1 -0
  15. package/{spec-cli/src/codex-headless.ts → node_modules/@spexcode/spec-cli/dist/codex-headless.js} +3 -9
  16. package/node_modules/@spexcode/spec-cli/dist/codex-runtime-generations.d.ts +53 -0
  17. package/node_modules/@spexcode/spec-cli/dist/codex-runtime-generations.js +686 -0
  18. package/node_modules/@spexcode/spec-cli/dist/commit-surgery.d.ts +1 -0
  19. package/node_modules/@spexcode/spec-cli/dist/commit-surgery.js +90 -0
  20. package/node_modules/@spexcode/spec-cli/dist/contract-filter.d.ts +14 -0
  21. package/node_modules/@spexcode/spec-cli/dist/contract-filter.js +219 -0
  22. package/node_modules/@spexcode/spec-cli/dist/dashboard-assets.d.ts +6 -0
  23. package/node_modules/@spexcode/spec-cli/dist/dashboard-assets.js +50 -0
  24. package/node_modules/@spexcode/spec-cli/dist/delivery-queue.d.ts +23 -0
  25. package/node_modules/@spexcode/spec-cli/dist/delivery-queue.js +179 -0
  26. package/node_modules/@spexcode/spec-cli/dist/doctor.d.ts +9 -0
  27. package/node_modules/@spexcode/spec-cli/dist/doctor.js +547 -0
  28. package/node_modules/@spexcode/spec-cli/dist/eval-host.d.ts +1 -0
  29. package/node_modules/@spexcode/spec-cli/dist/eval-host.js +19 -0
  30. package/node_modules/@spexcode/spec-cli/dist/execution-trace.d.ts +26 -0
  31. package/node_modules/@spexcode/spec-cli/dist/execution-trace.js +475 -0
  32. package/node_modules/@spexcode/spec-cli/dist/file-write.d.ts +2 -0
  33. package/node_modules/@spexcode/spec-cli/dist/file-write.js +26 -0
  34. package/node_modules/@spexcode/spec-cli/dist/flat.d.ts +89 -0
  35. package/node_modules/@spexcode/spec-cli/dist/flat.js +1076 -0
  36. package/node_modules/@spexcode/spec-cli/dist/gateway-auth.d.ts +56 -0
  37. package/node_modules/@spexcode/spec-cli/dist/gateway-auth.js +168 -0
  38. package/node_modules/@spexcode/spec-cli/dist/gateway-hub.d.ts +28 -0
  39. package/node_modules/@spexcode/spec-cli/dist/gateway-hub.js +361 -0
  40. package/node_modules/@spexcode/spec-cli/dist/gateway.d.ts +37 -0
  41. package/node_modules/@spexcode/spec-cli/dist/gateway.js +503 -0
  42. package/node_modules/@spexcode/spec-cli/dist/graphCache.d.ts +27 -0
  43. package/node_modules/@spexcode/spec-cli/dist/graphCache.js +716 -0
  44. package/node_modules/@spexcode/spec-cli/dist/graphSnapshot.d.ts +14 -0
  45. package/node_modules/@spexcode/spec-cli/dist/graphSnapshot.js +35 -0
  46. package/node_modules/@spexcode/spec-cli/dist/graphStream.d.ts +85 -0
  47. package/node_modules/@spexcode/spec-cli/dist/graphStream.js +1195 -0
  48. package/node_modules/@spexcode/spec-cli/dist/guidance-catalog.d.ts +64 -0
  49. package/node_modules/@spexcode/spec-cli/dist/guidance-catalog.js +166 -0
  50. package/node_modules/@spexcode/spec-cli/dist/guide.d.ts +8 -0
  51. package/{spec-cli/src/guide.ts → node_modules/@spexcode/spec-cli/dist/guide.js} +115 -22
  52. package/node_modules/@spexcode/spec-cli/dist/harness-select.d.ts +18 -0
  53. package/node_modules/@spexcode/spec-cli/dist/harness-select.js +62 -0
  54. package/node_modules/@spexcode/spec-cli/dist/harness.d.ts +325 -0
  55. package/node_modules/@spexcode/spec-cli/dist/harness.js +3026 -0
  56. package/node_modules/@spexcode/spec-cli/dist/headless-controller.d.ts +9 -0
  57. package/node_modules/@spexcode/spec-cli/dist/headless-controller.js +47 -0
  58. package/node_modules/@spexcode/spec-cli/dist/help.d.ts +10 -0
  59. package/node_modules/@spexcode/spec-cli/dist/help.js +574 -0
  60. package/node_modules/@spexcode/spec-cli/dist/hook-prompts.d.ts +18 -0
  61. package/node_modules/@spexcode/spec-cli/dist/hook-prompts.js +122 -0
  62. package/node_modules/@spexcode/spec-cli/dist/hooks.d.ts +1 -0
  63. package/{spec-cli/src/hooks.ts → node_modules/@spexcode/spec-cli/dist/hooks.js} +15 -15
  64. package/node_modules/@spexcode/spec-cli/dist/host-resources.d.ts +97 -0
  65. package/node_modules/@spexcode/spec-cli/dist/host-resources.js +795 -0
  66. package/node_modules/@spexcode/spec-cli/dist/host.d.ts +88 -0
  67. package/node_modules/@spexcode/spec-cli/dist/host.js +663 -0
  68. package/node_modules/@spexcode/spec-cli/dist/index.d.ts +1 -0
  69. package/node_modules/@spexcode/spec-cli/dist/index.js +899 -0
  70. package/node_modules/@spexcode/spec-cli/dist/init.d.ts +1 -0
  71. package/node_modules/@spexcode/spec-cli/dist/init.js +284 -0
  72. package/node_modules/@spexcode/spec-cli/dist/issues-cli.d.ts +6 -0
  73. package/node_modules/@spexcode/spec-cli/dist/issues-cli.js +334 -0
  74. package/node_modules/@spexcode/spec-cli/dist/issues.d.ts +69 -0
  75. package/node_modules/@spexcode/spec-cli/dist/issues.js +189 -0
  76. package/node_modules/@spexcode/spec-cli/dist/lint.d.ts +34 -0
  77. package/node_modules/@spexcode/spec-cli/dist/lint.js +476 -0
  78. package/node_modules/@spexcode/spec-cli/dist/listen.d.ts +7 -0
  79. package/{spec-cli/src/listen.ts → node_modules/@spexcode/spec-cli/dist/listen.js} +13 -17
  80. package/node_modules/@spexcode/spec-cli/dist/localIssues.d.ts +65 -0
  81. package/node_modules/@spexcode/spec-cli/dist/localIssues.js +582 -0
  82. package/node_modules/@spexcode/spec-cli/dist/login-page.d.ts +5 -0
  83. package/{spec-cli/src/login-page.ts → node_modules/@spexcode/spec-cli/dist/login-page.js} +7 -7
  84. package/node_modules/@spexcode/spec-cli/dist/loop-in.d.ts +23 -0
  85. package/{spec-cli/src/loop-in.ts → node_modules/@spexcode/spec-cli/dist/loop-in.js} +35 -45
  86. package/node_modules/@spexcode/spec-cli/dist/machine-peer.d.ts +69 -0
  87. package/node_modules/@spexcode/spec-cli/dist/machine-peer.js +603 -0
  88. package/node_modules/@spexcode/spec-cli/dist/materialize.d.ts +18 -0
  89. package/node_modules/@spexcode/spec-cli/dist/materialize.js +468 -0
  90. package/node_modules/@spexcode/spec-cli/dist/mentions.d.ts +50 -0
  91. package/node_modules/@spexcode/spec-cli/dist/mentions.js +117 -0
  92. package/node_modules/@spexcode/spec-cli/dist/opencode-headless.d.ts +4 -0
  93. package/node_modules/@spexcode/spec-cli/dist/opencode-headless.js +208 -0
  94. package/node_modules/@spexcode/spec-cli/dist/opencode.d.ts +3 -0
  95. package/{spec-cli/src/opencode.ts → node_modules/@spexcode/spec-cli/dist/opencode.js} +9 -13
  96. package/node_modules/@spexcode/spec-cli/dist/pi-harness.d.ts +3 -0
  97. package/{spec-cli/src/pi-harness.ts → node_modules/@spexcode/spec-cli/dist/pi-harness.js} +45 -40
  98. package/node_modules/@spexcode/spec-cli/dist/pi-headless.d.ts +25 -0
  99. package/node_modules/@spexcode/spec-cli/dist/pi-headless.js +196 -0
  100. package/node_modules/@spexcode/spec-cli/dist/plugin-harness.d.ts +21 -0
  101. package/node_modules/@spexcode/spec-cli/dist/plugin-harness.js +146 -0
  102. package/node_modules/@spexcode/spec-cli/dist/pty-bridge.d.ts +10 -0
  103. package/node_modules/@spexcode/spec-cli/dist/pty-bridge.js +404 -0
  104. package/node_modules/@spexcode/spec-cli/dist/pty-helper.d.mts +1 -0
  105. package/node_modules/@spexcode/spec-cli/dist/pty-helper.mjs +101 -0
  106. package/node_modules/@spexcode/spec-cli/dist/pty-native-helper.d.mts +2 -0
  107. package/node_modules/@spexcode/spec-cli/dist/pty-native-helper.mjs +23 -0
  108. package/node_modules/@spexcode/spec-cli/dist/public-graph.d.ts +46 -0
  109. package/node_modules/@spexcode/spec-cli/dist/public-graph.js +56 -0
  110. package/node_modules/@spexcode/spec-cli/dist/ranker.d.ts +15 -0
  111. package/node_modules/@spexcode/spec-cli/dist/ranker.js +188 -0
  112. package/node_modules/@spexcode/spec-cli/dist/reaper.d.ts +6 -0
  113. package/node_modules/@spexcode/spec-cli/dist/reaper.js +81 -0
  114. package/node_modules/@spexcode/spec-cli/dist/reviews.d.ts +189 -0
  115. package/node_modules/@spexcode/spec-cli/dist/reviews.js +350 -0
  116. package/node_modules/@spexcode/spec-cli/dist/runtime-guard.d.ts +6 -0
  117. package/node_modules/@spexcode/spec-cli/dist/runtime-guard.js +37 -0
  118. package/node_modules/@spexcode/spec-cli/dist/runtime-ownership.d.ts +21 -0
  119. package/node_modules/@spexcode/spec-cli/dist/runtime-ownership.js +84 -0
  120. package/node_modules/@spexcode/spec-cli/dist/search.bench.d.mts +1 -0
  121. package/node_modules/@spexcode/spec-cli/dist/search.bench.mjs +75 -0
  122. package/node_modules/@spexcode/spec-cli/dist/search.d.ts +20 -0
  123. package/node_modules/@spexcode/spec-cli/dist/search.js +61 -0
  124. package/node_modules/@spexcode/spec-cli/dist/session-cursors.d.ts +14 -0
  125. package/node_modules/@spexcode/spec-cli/dist/session-cursors.js +82 -0
  126. package/node_modules/@spexcode/spec-cli/dist/session-declarations.d.ts +13 -0
  127. package/node_modules/@spexcode/spec-cli/dist/session-declarations.js +126 -0
  128. package/node_modules/@spexcode/spec-cli/dist/session-execution.d.ts +10 -0
  129. package/node_modules/@spexcode/spec-cli/dist/session-execution.js +70 -0
  130. package/node_modules/@spexcode/spec-cli/dist/session-files.d.ts +28 -0
  131. package/node_modules/@spexcode/spec-cli/dist/session-files.js +130 -0
  132. package/node_modules/@spexcode/spec-cli/dist/session-follow.d.ts +31 -0
  133. package/node_modules/@spexcode/spec-cli/dist/session-follow.js +179 -0
  134. package/node_modules/@spexcode/spec-cli/dist/session-reparent.d.ts +10 -0
  135. package/node_modules/@spexcode/spec-cli/dist/session-reparent.js +33 -0
  136. package/node_modules/@spexcode/spec-cli/dist/session-timeline.d.ts +51 -0
  137. package/node_modules/@spexcode/spec-cli/dist/session-timeline.js +233 -0
  138. package/node_modules/@spexcode/spec-cli/dist/session-web.d.ts +24 -0
  139. package/node_modules/@spexcode/spec-cli/dist/session-web.js +141 -0
  140. package/node_modules/@spexcode/spec-cli/dist/sessions.d.ts +412 -0
  141. package/node_modules/@spexcode/spec-cli/dist/sessions.js +4239 -0
  142. package/node_modules/@spexcode/spec-cli/dist/sh.d.ts +1 -0
  143. package/node_modules/@spexcode/spec-cli/dist/sh.js +3 -0
  144. package/node_modules/@spexcode/spec-cli/dist/shim-runtime.d.ts +1 -0
  145. package/{spec-cli/src/shim-runtime.ts → node_modules/@spexcode/spec-cli/dist/shim-runtime.js} +3 -4
  146. package/node_modules/@spexcode/spec-cli/dist/slash-commands.d.ts +9 -0
  147. package/node_modules/@spexcode/spec-cli/dist/slash-commands.js +307 -0
  148. package/node_modules/@spexcode/spec-cli/dist/source-files.d.ts +9 -0
  149. package/node_modules/@spexcode/spec-cli/dist/source-files.js +113 -0
  150. package/node_modules/@spexcode/spec-cli/dist/supervise.d.ts +1 -0
  151. package/node_modules/@spexcode/spec-cli/dist/supervise.js +308 -0
  152. package/node_modules/@spexcode/spec-cli/dist/tree.d.ts +25 -0
  153. package/node_modules/@spexcode/spec-cli/dist/tree.js +98 -0
  154. package/node_modules/@spexcode/spec-cli/dist/tsx-bin.d.ts +3 -0
  155. package/node_modules/@spexcode/spec-cli/dist/tsx-bin.js +41 -0
  156. package/node_modules/@spexcode/spec-cli/dist/uninstall.d.ts +3 -0
  157. package/node_modules/@spexcode/spec-cli/dist/uninstall.js +177 -0
  158. package/node_modules/@spexcode/spec-cli/dist/uploads.d.ts +36 -0
  159. package/node_modules/@spexcode/spec-cli/dist/uploads.js +243 -0
  160. package/node_modules/@spexcode/spec-cli/dist/worktree-sources.d.ts +1 -0
  161. package/node_modules/@spexcode/spec-cli/dist/worktree-sources.js +47 -0
  162. package/{spec-cli → node_modules/@spexcode/spec-cli}/hooks/dispatch.sh +5 -5
  163. package/{spec-cli → node_modules/@spexcode/spec-cli}/hooks/harness.sh +27 -7
  164. package/node_modules/@spexcode/spec-cli/package.json +47 -0
  165. package/node_modules/@spexcode/spec-cli/templates/spec/project/.plugins/commands/supervisor/spec.md +8 -0
  166. package/node_modules/@spexcode/spec-cli/templates/spec/project/.plugins/core/comment-altitude/spec.md +9 -0
  167. package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/spec/project/.plugins/core/spec-first/spec-first.sh +1 -1
  168. package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/spec/project/.plugins/core/spec-of-file/spec-of-file.sh +1 -0
  169. package/node_modules/@spexcode/spec-cli/templates/spec/project/.plugins/core/spec.md +22 -0
  170. package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/spec/project/.plugins/core/stop-gate/spec.md +2 -2
  171. package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/spec/project/.plugins/core/stop-gate/stop-gate.sh +31 -29
  172. package/node_modules/@spexcode/spec-cli/templates/spec/project/.plugins/prompts/atomic-landing/spec.md +15 -0
  173. package/node_modules/@spexcode/spec-cli/templates/spec/project/.plugins/prompts/forge-link/spec.md +10 -0
  174. package/node_modules/@spexcode/spec-cli/templates/spec/project/.plugins/prompts/memory-hygiene/spec.md +13 -0
  175. package/node_modules/@spexcode/spec-cli/templates/spec/project/.plugins/prompts/reproduce-before-fix/spec.md +12 -0
  176. package/node_modules/@spexcode/spec-core/dist/anchors.d.ts +94 -0
  177. package/node_modules/@spexcode/spec-core/dist/anchors.js +730 -0
  178. package/node_modules/@spexcode/spec-core/dist/git.d.ts +166 -0
  179. package/node_modules/@spexcode/spec-core/dist/git.js +2736 -0
  180. package/node_modules/@spexcode/spec-core/dist/graph-delta.d.ts +44 -0
  181. package/node_modules/@spexcode/spec-core/dist/graph-delta.js +72 -0
  182. package/node_modules/@spexcode/spec-core/dist/graph.d.ts +34 -0
  183. package/node_modules/@spexcode/spec-core/dist/graph.js +237 -0
  184. package/node_modules/@spexcode/spec-core/dist/graphDelta.d.ts +3 -0
  185. package/node_modules/@spexcode/spec-core/dist/graphDelta.js +13 -0
  186. package/node_modules/@spexcode/spec-core/dist/harness-identity.d.ts +31 -0
  187. package/node_modules/@spexcode/spec-core/dist/harness-identity.js +20 -0
  188. package/node_modules/@spexcode/spec-core/dist/identity-presets.d.ts +152 -0
  189. package/node_modules/@spexcode/spec-core/dist/identity-presets.js +132 -0
  190. package/node_modules/@spexcode/spec-core/dist/index.d.ts +45 -0
  191. package/node_modules/@spexcode/spec-core/dist/index.js +19 -0
  192. package/node_modules/@spexcode/spec-core/dist/layout.d.ts +183 -0
  193. package/node_modules/@spexcode/spec-core/dist/layout.js +548 -0
  194. package/node_modules/@spexcode/spec-core/dist/process-identity.d.ts +37 -0
  195. package/node_modules/@spexcode/spec-core/dist/process-identity.js +214 -0
  196. package/node_modules/@spexcode/spec-core/dist/project-identity.d.ts +12 -0
  197. package/node_modules/@spexcode/spec-core/dist/project-identity.js +71 -0
  198. package/node_modules/@spexcode/spec-core/dist/project-store.d.ts +3 -0
  199. package/node_modules/@spexcode/spec-core/dist/project-store.js +14 -0
  200. package/node_modules/@spexcode/spec-core/dist/resilience.d.ts +2 -0
  201. package/node_modules/@spexcode/spec-core/dist/resilience.js +40 -0
  202. package/node_modules/@spexcode/spec-core/dist/review/index.d.ts +3 -0
  203. package/node_modules/@spexcode/spec-core/dist/review/index.js +5 -0
  204. package/node_modules/@spexcode/spec-core/dist/review/reviewFilters.d.ts +77 -0
  205. package/node_modules/@spexcode/spec-core/dist/review/reviewFilters.js +308 -0
  206. package/node_modules/@spexcode/spec-core/dist/review/reviewQuery.d.ts +66 -0
  207. package/node_modules/@spexcode/spec-core/dist/review/reviewQuery.js +180 -0
  208. package/node_modules/@spexcode/spec-core/dist/review/session.d.ts +4 -0
  209. package/node_modules/@spexcode/spec-core/dist/review/session.js +8 -0
  210. package/node_modules/@spexcode/spec-core/dist/reviewSnapshot.d.ts +15 -0
  211. package/node_modules/@spexcode/spec-core/dist/reviewSnapshot.js +12 -0
  212. package/node_modules/@spexcode/spec-core/dist/root-lru.d.ts +4 -0
  213. package/{spec-cli/src/root-lru.ts → node_modules/@spexcode/spec-core/dist/root-lru.js} +26 -30
  214. package/node_modules/@spexcode/spec-core/dist/specs.d.ts +117 -0
  215. package/node_modules/@spexcode/spec-core/dist/specs.js +489 -0
  216. package/node_modules/@spexcode/spec-core/package.json +28 -0
  217. package/node_modules/@spexcode/spec-eval/dist/cache.d.ts +10 -0
  218. package/node_modules/@spexcode/spec-eval/dist/cache.js +50 -0
  219. package/node_modules/@spexcode/spec-eval/dist/cli.d.ts +22 -0
  220. package/node_modules/@spexcode/spec-eval/dist/cli.js +981 -0
  221. package/node_modules/@spexcode/spec-eval/dist/evaltab.d.ts +98 -0
  222. package/node_modules/@spexcode/spec-eval/dist/evaltab.js +176 -0
  223. package/node_modules/@spexcode/spec-eval/dist/filing.d.ts +16 -0
  224. package/node_modules/@spexcode/spec-eval/dist/filing.js +36 -0
  225. package/node_modules/@spexcode/spec-eval/dist/freshness.d.ts +48 -0
  226. package/node_modules/@spexcode/spec-eval/dist/freshness.js +799 -0
  227. package/node_modules/@spexcode/spec-eval/dist/host.d.ts +46 -0
  228. package/node_modules/@spexcode/spec-eval/dist/host.js +53 -0
  229. package/node_modules/@spexcode/spec-eval/dist/humanok.d.ts +11 -0
  230. package/node_modules/@spexcode/spec-eval/dist/humanok.js +27 -0
  231. package/node_modules/@spexcode/spec-eval/dist/index.d.ts +4 -0
  232. package/node_modules/@spexcode/spec-eval/dist/index.js +4 -0
  233. package/node_modules/@spexcode/spec-eval/dist/remarks.d.ts +31 -0
  234. package/node_modules/@spexcode/spec-eval/dist/remarks.js +1 -0
  235. package/node_modules/@spexcode/spec-eval/dist/scenariofresh.d.ts +13 -0
  236. package/node_modules/@spexcode/spec-eval/dist/scenariofresh.js +303 -0
  237. package/node_modules/@spexcode/spec-eval/dist/scenarios.d.ts +99 -0
  238. package/node_modules/@spexcode/spec-eval/dist/scenarios.js +650 -0
  239. package/node_modules/@spexcode/spec-eval/dist/sessioneval.d.ts +307 -0
  240. package/node_modules/@spexcode/spec-eval/dist/sessioneval.js +1883 -0
  241. package/node_modules/@spexcode/spec-eval/dist/sidecar.d.ts +55 -0
  242. package/node_modules/@spexcode/spec-eval/dist/sidecar.js +82 -0
  243. package/node_modules/@spexcode/spec-eval/dist/timeline.d.ts +25 -0
  244. package/node_modules/@spexcode/spec-eval/dist/timeline.js +65 -0
  245. package/node_modules/@spexcode/spec-eval/dist/ui-path.d.ts +1 -0
  246. package/node_modules/@spexcode/spec-eval/dist/ui-path.js +2 -0
  247. package/node_modules/@spexcode/spec-eval/package.json +36 -0
  248. package/node_modules/@spexcode/spec-forge/dist/cache.d.ts +29 -0
  249. package/node_modules/@spexcode/spec-forge/dist/cache.js +59 -0
  250. package/node_modules/@spexcode/spec-forge/dist/cli.d.ts +1 -0
  251. package/node_modules/@spexcode/spec-forge/dist/cli.js +100 -0
  252. package/node_modules/@spexcode/spec-forge/dist/drivers/github.d.ts +2 -0
  253. package/node_modules/@spexcode/spec-forge/dist/drivers/github.js +116 -0
  254. package/node_modules/@spexcode/spec-forge/dist/drivers/gitlab.d.ts +7 -0
  255. package/node_modules/@spexcode/spec-forge/dist/drivers/gitlab.js +144 -0
  256. package/node_modules/@spexcode/spec-forge/dist/drivers.d.ts +10 -0
  257. package/node_modules/@spexcode/spec-forge/dist/drivers.js +83 -0
  258. package/node_modules/@spexcode/spec-forge/dist/index.d.ts +4 -0
  259. package/node_modules/@spexcode/spec-forge/dist/index.js +4 -0
  260. package/node_modules/@spexcode/spec-forge/dist/links.d.ts +15 -0
  261. package/node_modules/@spexcode/spec-forge/dist/links.js +65 -0
  262. package/node_modules/@spexcode/spec-forge/dist/needs-eval.d.ts +10 -0
  263. package/node_modules/@spexcode/spec-forge/dist/needs-eval.js +20 -0
  264. package/node_modules/@spexcode/spec-forge/dist/port.d.ts +53 -0
  265. package/node_modules/@spexcode/spec-forge/dist/port.js +1 -0
  266. package/node_modules/@spexcode/spec-forge/dist/resident.d.ts +7 -0
  267. package/node_modules/@spexcode/spec-forge/dist/resident.js +43 -0
  268. package/node_modules/@spexcode/spec-forge/package.json +32 -0
  269. package/package.json +33 -19
  270. package/spec-cli/bin/spex.mjs +0 -69
  271. package/spec-cli/src/anchors.ts +0 -706
  272. package/spec-cli/src/attach.ts +0 -43
  273. package/spec-cli/src/claude-headless.ts +0 -321
  274. package/spec-cli/src/cli.ts +0 -1115
  275. package/spec-cli/src/client.ts +0 -315
  276. package/spec-cli/src/cockpit.ts +0 -43
  277. package/spec-cli/src/codex-runtime-generations.ts +0 -646
  278. package/spec-cli/src/commit-surgery.ts +0 -68
  279. package/spec-cli/src/contract-filter.ts +0 -202
  280. package/spec-cli/src/delivery-queue.ts +0 -107
  281. package/spec-cli/src/doctor.ts +0 -516
  282. package/spec-cli/src/file-write.ts +0 -22
  283. package/spec-cli/src/gateway-auth.ts +0 -181
  284. package/spec-cli/src/gateway-hub.ts +0 -356
  285. package/spec-cli/src/gateway.ts +0 -368
  286. package/spec-cli/src/git.ts +0 -2180
  287. package/spec-cli/src/graph.ts +0 -221
  288. package/spec-cli/src/graphCache.ts +0 -641
  289. package/spec-cli/src/graphDelta.ts +0 -77
  290. package/spec-cli/src/graphStream.ts +0 -1019
  291. package/spec-cli/src/harness-select.ts +0 -77
  292. package/spec-cli/src/harness.ts +0 -2747
  293. package/spec-cli/src/headless-controller.ts +0 -63
  294. package/spec-cli/src/help.ts +0 -480
  295. package/spec-cli/src/host-resources.ts +0 -707
  296. package/spec-cli/src/host.ts +0 -611
  297. package/spec-cli/src/identity-presets.d.ts +0 -13
  298. package/spec-cli/src/identity-presets.js +0 -128
  299. package/spec-cli/src/index.ts +0 -730
  300. package/spec-cli/src/init.ts +0 -258
  301. package/spec-cli/src/issues-cli.ts +0 -276
  302. package/spec-cli/src/issues.ts +0 -237
  303. package/spec-cli/src/layout.ts +0 -557
  304. package/spec-cli/src/lint.ts +0 -458
  305. package/spec-cli/src/localIssues.ts +0 -538
  306. package/spec-cli/src/materialize.ts +0 -412
  307. package/spec-cli/src/mentions.ts +0 -81
  308. package/spec-cli/src/opencode-headless.ts +0 -205
  309. package/spec-cli/src/pi-headless.ts +0 -153
  310. package/spec-cli/src/plugin-harness.ts +0 -157
  311. package/spec-cli/src/process-identity.ts +0 -207
  312. package/spec-cli/src/project-identity.ts +0 -73
  313. package/spec-cli/src/project-store.ts +0 -17
  314. package/spec-cli/src/pty-bridge.ts +0 -396
  315. package/spec-cli/src/pty-helper.mjs +0 -96
  316. package/spec-cli/src/pty-native-helper.mjs +0 -22
  317. package/spec-cli/src/ranker.ts +0 -191
  318. package/spec-cli/src/reaper.ts +0 -125
  319. package/spec-cli/src/resilience.ts +0 -41
  320. package/spec-cli/src/reviewSnapshot.ts +0 -28
  321. package/spec-cli/src/reviews.ts +0 -405
  322. package/spec-cli/src/runtime-guard.ts +0 -35
  323. package/spec-cli/src/runtime-ownership.ts +0 -88
  324. package/spec-cli/src/search.bench.mjs +0 -80
  325. package/spec-cli/src/search.ts +0 -63
  326. package/spec-cli/src/session-cursors.ts +0 -91
  327. package/spec-cli/src/session-follow.ts +0 -182
  328. package/spec-cli/src/session-timeline.ts +0 -98
  329. package/spec-cli/src/sessions.ts +0 -3403
  330. package/spec-cli/src/sh.ts +0 -3
  331. package/spec-cli/src/slash-commands.ts +0 -318
  332. package/spec-cli/src/source-files.ts +0 -104
  333. package/spec-cli/src/specs.ts +0 -498
  334. package/spec-cli/src/supervise.ts +0 -245
  335. package/spec-cli/src/tree.ts +0 -118
  336. package/spec-cli/src/tsx-bin.ts +0 -18
  337. package/spec-cli/src/uninstall.ts +0 -171
  338. package/spec-cli/src/uploads.ts +0 -253
  339. package/spec-cli/src/worktree-sources.ts +0 -42
  340. package/spec-cli/templates/spec/project/.plugins/commands/supervisor/spec.md +0 -8
  341. package/spec-cli/templates/spec/project/.plugins/core/comment-altitude/spec.md +0 -28
  342. package/spec-cli/templates/spec/project/.plugins/core/spec.md +0 -23
  343. package/spec-cli/templates/spec/project/.plugins/prompts/atomic-landing/spec.md +0 -32
  344. package/spec-cli/templates/spec/project/.plugins/prompts/forge-link/spec.md +0 -9
  345. package/spec-cli/templates/spec/project/.plugins/prompts/memory-hygiene/spec.md +0 -15
  346. package/spec-cli/templates/spec/project/.plugins/prompts/reproduce-before-fix/spec.md +0 -18
  347. package/spec-dashboard/dist/assets/App-F9uaAVcH.js +0 -2
  348. package/spec-dashboard/dist/assets/Dashboard-Ba_jhxp1.js +0 -27
  349. package/spec-dashboard/dist/assets/Dashboard-C5ap-Sga.css +0 -1
  350. package/spec-dashboard/dist/assets/EvalsPage-FixoOg_n.js +0 -2
  351. package/spec-dashboard/dist/assets/IssuesPage-CuKLFhH3.js +0 -1
  352. package/spec-dashboard/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  353. package/spec-dashboard/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  354. package/spec-dashboard/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  355. package/spec-dashboard/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  356. package/spec-dashboard/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  357. package/spec-dashboard/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  358. package/spec-dashboard/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  359. package/spec-dashboard/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  360. package/spec-dashboard/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  361. package/spec-dashboard/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  362. package/spec-dashboard/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  363. package/spec-dashboard/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  364. package/spec-dashboard/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  365. package/spec-dashboard/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  366. package/spec-dashboard/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  367. package/spec-dashboard/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  368. package/spec-dashboard/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  369. package/spec-dashboard/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  370. package/spec-dashboard/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  371. package/spec-dashboard/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  372. package/spec-dashboard/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  373. package/spec-dashboard/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  374. package/spec-dashboard/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  375. package/spec-dashboard/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  376. package/spec-dashboard/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  377. package/spec-dashboard/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  378. package/spec-dashboard/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  379. package/spec-dashboard/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  380. package/spec-dashboard/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  381. package/spec-dashboard/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  382. package/spec-dashboard/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  383. package/spec-dashboard/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  384. package/spec-dashboard/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  385. package/spec-dashboard/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  386. package/spec-dashboard/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  387. package/spec-dashboard/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  388. package/spec-dashboard/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  389. package/spec-dashboard/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  390. package/spec-dashboard/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  391. package/spec-dashboard/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  392. package/spec-dashboard/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  393. package/spec-dashboard/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  394. package/spec-dashboard/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  395. package/spec-dashboard/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  396. package/spec-dashboard/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  397. package/spec-dashboard/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  398. package/spec-dashboard/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  399. package/spec-dashboard/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  400. package/spec-dashboard/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  401. package/spec-dashboard/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  402. package/spec-dashboard/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  403. package/spec-dashboard/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  404. package/spec-dashboard/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  405. package/spec-dashboard/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  406. package/spec-dashboard/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  407. package/spec-dashboard/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  408. package/spec-dashboard/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  409. package/spec-dashboard/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  410. package/spec-dashboard/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  411. package/spec-dashboard/dist/assets/MobileApp-CHgEHORJ.js +0 -2
  412. package/spec-dashboard/dist/assets/Modal-CQgYymmr.js +0 -1
  413. package/spec-dashboard/dist/assets/PageScroll-hT7UTLvD.js +0 -1
  414. package/spec-dashboard/dist/assets/ProjectsPage-CtXxakF9.js +0 -1
  415. package/spec-dashboard/dist/assets/SessionInterface-6GBZ9nXN.css +0 -32
  416. package/spec-dashboard/dist/assets/SessionInterface-Bpie-9fs.js +0 -39
  417. package/spec-dashboard/dist/assets/SessionWindow-CixDi4PI.js +0 -1
  418. package/spec-dashboard/dist/assets/Settings-C2MsucfE.js +0 -1
  419. package/spec-dashboard/dist/assets/Thread-C6Go8HRh.js +0 -13
  420. package/spec-dashboard/dist/assets/bindings-BC9vqpYU.js +0 -1
  421. package/spec-dashboard/dist/assets/data-B-RQmit6.js +0 -1
  422. package/spec-dashboard/dist/assets/index-CsI8DElI.css +0 -1
  423. package/spec-dashboard/dist/assets/index-DrVao0Ep.js +0 -41
  424. package/spec-dashboard/dist/assets/launch-BBH02b1v.js +0 -276
  425. package/spec-dashboard/dist/assets/launch-Cp579UoJ.css +0 -1
  426. package/spec-dashboard/dist/assets/terminalFont-C6oGNKrf.js +0 -1
  427. package/spec-dashboard/dist/index.html +0 -29
  428. package/spec-dashboard/src/reviewFilters.js +0 -322
  429. package/spec-dashboard/src/reviewQuery.js +0 -174
  430. package/spec-dashboard/src/session.js +0 -199
  431. package/spec-eval/src/cache.ts +0 -57
  432. package/spec-eval/src/cli.ts +0 -889
  433. package/spec-eval/src/evaltab.ts +0 -262
  434. package/spec-eval/src/filing.ts +0 -39
  435. package/spec-eval/src/freshness.ts +0 -557
  436. package/spec-eval/src/humanok.ts +0 -28
  437. package/spec-eval/src/scenariofresh.ts +0 -244
  438. package/spec-eval/src/scenarios.ts +0 -672
  439. package/spec-eval/src/sessioneval.ts +0 -2226
  440. package/spec-eval/src/sidecar.ts +0 -93
  441. package/spec-eval/src/timeline.ts +0 -54
  442. package/spec-forge/src/__fixtures__/github-forge.json +0 -63
  443. package/spec-forge/src/cache.ts +0 -66
  444. package/spec-forge/src/cli.ts +0 -99
  445. package/spec-forge/src/drivers/github.ts +0 -132
  446. package/spec-forge/src/drivers/gitlab.ts +0 -153
  447. package/spec-forge/src/drivers.ts +0 -73
  448. package/spec-forge/src/links.ts +0 -72
  449. package/spec-forge/src/needs-eval.ts +0 -29
  450. package/spec-forge/src/port.ts +0 -36
  451. package/spec-forge/src/resident.ts +0 -46
  452. /package/{spec-cli → node_modules/@spexcode/spec-cli}/README.md +0 -0
  453. /package/{spec-cli → node_modules/@spexcode/spec-cli}/hooks/compat/mark-active-0.5.2-eef1.fixture +0 -0
  454. /package/{spec-cli → node_modules/@spexcode/spec-cli}/hooks/compat/mark-active-sed-v0.fixture +0 -0
  455. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/hooks/commit-msg +0 -0
  456. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/hooks/post-checkout +0 -0
  457. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/hooks/post-merge +0 -0
  458. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/hooks/pre-commit +0 -0
  459. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/hooks/prepare-commit-msg +0 -0
  460. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/hooks/reference-transaction +0 -0
  461. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/spec/project/.plugins/commands/extract/spec.md +0 -0
  462. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/spec/project/.plugins/commands/regroup/spec.md +0 -0
  463. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/spec/project/.plugins/commands/rename/spec.md +0 -0
  464. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/spec/project/.plugins/commands/spec.md +0 -0
  465. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/spec/project/.plugins/commands/tidy/spec.md +0 -0
  466. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/spec/project/.plugins/core/idle/idle.sh +0 -0
  467. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/spec/project/.plugins/core/idle/spec.md +0 -0
  468. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/spec/project/.plugins/core/mark-active/mark-active.sh +0 -0
  469. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/spec/project/.plugins/core/mark-active/spec.md +0 -0
  470. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/spec/project/.plugins/core/session-fail/fail.sh +0 -0
  471. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/spec/project/.plugins/core/session-fail/spec.md +0 -0
  472. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/spec/project/.plugins/core/spec-first/spec.md +0 -0
  473. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/spec/project/.plugins/core/spec-of-file/spec.md +0 -0
  474. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/spec/project/.plugins/prompts/spec.md +0 -0
  475. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/spec/project/.plugins/skills/distill/digest.mjs +0 -0
  476. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/spec/project/.plugins/skills/distill/spec.md +0 -0
  477. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/spec/project/.plugins/skills/spec.md +0 -0
  478. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/spec/project/.plugins/spec.md +0 -0
  479. /package/{spec-cli → node_modules/@spexcode/spec-cli}/templates/spec/project/spec.md +0 -0
  480. /package/{spec-cli → node_modules/@spexcode/spec-core}/templates/spexcode.json +0 -0
package/README.md CHANGED
@@ -18,211 +18,161 @@
18
18
 
19
19
  </div>
20
20
 
21
- Spec-driven development with AI agents in the loop. SpexCode keeps a versioned tree of specs inside
21
+ Spec-driven orchestration for your coding agents. SpexCode keeps a versioned tree of specs inside
22
22
  your git repo, links every spec to the code it governs, and runs a session manager that dispatches
23
23
  coding agents into isolated worktrees. You review and merge; the tool keeps intent and
24
24
  implementation from drifting apart.
25
25
 
26
- [![Watch: this repo's spec tree grow from its git history](docs/spec-tree-poster.jpg)](https://spexcode.net/assets/spec-tree-growth.mp4)
27
-
28
- <sub>▶ This repo's own spec tree, replayed from its git history — 160 spec nodes growing over three weeks. Click for the [full video](https://spexcode.net/assets/spec-tree-growth.mp4).</sub>
29
-
30
26
  English | [中文](./docs/README.zh-CN.md) · Docs: [spexcode.net](https://spexcode.net) · License: MIT
31
27
 
32
- Quick links: [the model](#the-model) · [quick start](#quick-start) ·
33
- [agents](#working-with-agents) · [eval](#measuring-behavior-eval) · [config](#configuration)
28
+ | Feature | Description |
29
+ |---|---|
30
+ | **Computable spec–code drift** | Every spec pins the file it governs, down to the function. Whether code moved without its spec is computed from commits and line ranges, the same way on every machine: advisory for the file, blocking when an anchored function changes. |
31
+ | **Session & worktree management** | Each task runs in its own worktree and branch; independent tasks run in parallel. Sessions form a hierarchy: a session can dispatch and supervise workers of its own, so a worker can have a supervisor and that supervisor another. Workers propose; you review once, at merge time. |
32
+ | **Shareable URLs** | Spec nodes, sessions, evals, live terminals: every dashboard view has a stable address you can send to a colleague. Two people can watch the same session board. |
33
+ | **Modular layers** | Three separable layers: the spec↔code data asset (L0), the session substrate (L1), the dashboard (L2). Take what you need; L0 and L1 are building bricks for your own software factory. |
34
+ | **Cross-harness support** | Claude Code, Codex, OpenCode, pi, each interactive or headless. One materialized workflow contract serves them all; adding a harness is a config entry. |
34
35
 
35
36
  ## The model
36
37
 
37
- <div align="center"><img src="docs/sdd-tuxedo-pooh.png" alt="spec-driven development meme" width="260"></div>
38
-
39
- A spec node is a directory under `.spec/` containing a `spec.md`: frontmatter (title, status, a
40
- `code:` pointer to the file it governs, a `related:` list for files it references) plus a prose
41
- body stating what that part of the system is supposed to do, right now. Nodes nest, so the tree
42
- mirrors how you think about the project rather than the file layout. The body can split into two
43
- labelled parts. The short **raw source** states the intent; changing it takes explicit
44
- human approval (an agent can draft it, a human signs off). The **expanded spec** is the agent's
45
- detailed reading of that intent; it iterates freely but must always match the raw source.
38
+ A spec node is a directory under `.spec/` holding a `spec.md`: frontmatter naming the one file it
39
+ governs (`code:` — optionally pinned to specific functions with `path#symbol`) and the files it
40
+ references (`related:`), then a prose body stating what that part of the system is supposed to do,
41
+ right now. Nodes nest, so the tree mirrors how you think about the project rather than the file
42
+ layout. The body can split into two labelled parts: a short **raw source** a human signs off on, and
43
+ an **expanded spec** the agent iterates freely as long as it keeps matching the raw source.
46
44
 
47
- <img src="docs/readme-node.png" alt="spec node popup">
45
+ <img src="docs/readme-model.svg" alt="a spec node governs one file, anchored at function level; related files are referenced; git is the only database">
48
46
 
49
- Two rules make this workable:
47
+ Git is the only database: a node's versions are the commits that touched its
48
+ `spec.md`. A change is one commit that updates both the spec and the code it justifies. When code
49
+ moves alone, the linter notices:
50
50
 
51
- 1. **Git is the database.** There is no separate store. A node's version count is the number of
52
- commits that changed its `spec.md`, its history view is `git log` on that file, and each version
53
- is attributed to an agent session through a `Session:` commit trailer. This is also why a spec
54
- body always describes present intent and gets rewritten in place: changelog headings inside the
55
- body are banned (the linter enforces it), because git already keeps the history.
56
- 2. **Spec and code land together.** A change is one commit that updates both the `spec.md` and the
57
- code it justifies. When code moves without its spec, the linter flags it,
51
+ <img src="docs/readme-drift-flow.svg" alt="one real drift: spec and code land together, six days of code-only commits later a rename hits the anchored function — the commit is flagged and blocked">
58
52
 
59
- ```
60
- drift: spec-cli/src/graph.ts is 1 commit(s) ahead of spec 'graph-lean' (v12) may be stale
61
- ```
53
+ The check compares plain git facts: which commits came after the spec's last version, and whether
54
+ they intersect the anchored unit's lines. It cannot judge whether the new behavior is better, only
55
+ that the spec stopped describing it. The commit in the diagram updated seven other specs in the
56
+ same rename and missed this one; that kind of miss is normal work, and it is what a mechanical
57
+ check catches.
62
58
 
63
- and keeps flagging until the spec catches up.
59
+ ## Software as heuristic learning
64
60
 
65
- ## The optimization loop
61
+ Specs, commits, and evals compose into one optimization loop. The spec is the loss function: it
62
+ states what you want, and it is the half a human signs off on. Commits are the optimizer. **eval**,
63
+ the measurement subsystem, scores how far live behavior currently sits from the spec — an agent runs
64
+ each scenario against the product's real surface, the way an end user would touch it, and files the
65
+ result with evidence (a screenshot, a recording). The score's history lives in git like everything
66
+ else, and a bug fix is expected to bracket: a failing eval that reproduces the bug, then a passing
67
+ one on the same scenario.
66
68
 
67
- Specs, commits, and evals compose into one loop. The spec is the loss function: it states what you
68
- want, and it's the half a human signs off on. Commits are the optimizer. **eval**, the measurement
69
- subsystem, scores how far live behavior currently sits from the spec, and the
70
- score's history lives in git like everything else.
69
+ <div align="center"><img src="docs/readme-loop.svg" alt="the spec/code optimization loop" width="560"></div>
71
70
 
72
- <img src="docs/readme-loop.png" alt="the spec/code optimization loop">
73
-
74
- It also settles where the human stands day to day: nobody reads a neural net by staring at its
75
- weights, and between merge gates you don't have to stare at agent diffs either. Attention goes to
76
- the spec and the evals; the diff gets read once, at merge time.
71
+ Nobody reads a neural net by staring at its weights, and between merge gates you don't stare at
72
+ agent diffs either. Attention goes to the two ends — the spec and the evals; the diff gets read
73
+ once, at merge time.
77
74
 
78
75
  ## Quick start
79
76
 
80
- Requires Node ≥ 22 and git. This part is plain tooling — no AI involved yet.
77
+ Requires Node ≥ 22 and git.
81
78
 
82
79
  ```sh
83
80
  npm i -g spexcode # installs the `spex` command
84
81
  cd your-repo
85
- spex init --harness claude,codex,opencode,pi,claude-headless,opencode-headless,pi-headless,codex-headless # seeds .spec/, installs hooks, materializes the agent contracts
82
+ spex init --harness claude,codex,opencode,pi,zcode,claude-headless,opencode-headless,pi-headless,codex-headless # seeds .spec/, installs hooks, materializes the agent contracts
86
83
  ```
87
84
 
88
- That's the whole adoption. The example lists all the built-in harnesses remove the ones you don't
89
- use: `--harness` is required, has no default, and takes any one id or comma-separated subset.
90
- `spex init` is additive: it works on any existing git repo and never
91
- overwrites your files it creates a root `.spec/project/spec.md` and a starter `spexcode.json`,
92
- installs the git hooks, and writes the selected harness's managed contract, so any agent working in
93
- the repo discovers the workflow on its own.
85
+ That's the whole adoption. The example lists all the built-in harnesses; remove the ones you don't
86
+ use (`--harness` is required and takes any one id or comma-separated subset).
87
+ `spex init` is additive: it works on any existing git repo, never overwrites your files, and does
88
+ three things. It seeds a root `.spec/project/spec.md` plus a starter `spexcode.json`, installs the
89
+ git hooks, and **materializes** the workflow rules into the files your agent already reads
90
+ (`CLAUDE.md`, `AGENTS.md`): read the governing spec before the code, land spec and code in one
91
+ commit, propose merges instead of performing them. Any agent that opens the repo discovers the
92
+ workflow on its own.
94
93
 
95
- When you want the live board the graph, sessions, evals start the runtime:
94
+ When you want the live board (the graph, sessions, evals), start the runtime:
96
95
 
97
96
  ```sh
98
- spex serve # this project's backend prints its URL, registers itself for your user
99
- spex dashboard # once per user, any directory: the one dashboard open the URL it prints
97
+ npm i -g @spexcode/spec-dashboard # install the optional UI package once
98
+ spex serve # this project's backendprints its URL
99
+ spex dashboard # the machine's one gateway — every project behind one URL
100
100
  ```
101
101
 
102
- Run `spex serve` from each project you want online. Every backend registers itself, and the single
103
- `spex dashboard` finds them all backends already running and ones you start later, in any order.
104
- `/projects` switches and manages projects; each project's board lives under `/p/:id/`. There is no
105
- per-project dashboard process and no port pairing to remember: if a port is taken, give that
106
- backend its own with `spex serve --port <n>`, and trust the URL each command prints.
107
-
108
- Those are installed-user commands. Contributors working from this source checkout use `npm run api`
109
- for the reloadable backend and `npm run web` for the Vite/HMR frontend; see
110
- [Contributing](#contributing).
111
-
112
- Then grow the tree:
113
-
114
- 1. Edit `.spec/project/spec.md` to describe the project.
115
- 2. Add child nodes for the parts you want governed, each with a `code:` entry pointing at an
116
- existing file (`related:` for the files it touches but doesn't own).
117
- 3. Run `spex spec lint`. Coverage warnings list the source files no spec claims yet; that list is your
118
- adoption TODO.
102
+ The dashboard is a separate package so writing-only installs do not carry frontend build output. One `spex dashboard`
103
+ per machine is enough: every project you serve shows up behind it, and its
104
+ `/projects` page manages them from the browser.
105
+ [Getting started](https://spexcode.net/getting-started/) walks the rest of the setup.
119
106
 
120
- You are not expected to hand-author all of this. The intended workflow is to have an agent do most
121
- of the spec writing; `spex guide spec` prints the exact file format it needs.
122
- [Getting started](https://spexcode.net/getting-started/) on the docs site walks the setup end to
123
- end.
107
+ ## How does this system work
124
108
 
125
- <img src="docs/readme-graph.png" alt="dashboard screenshot">
109
+ Three stacked layers, and each is worth having without the ones above it:
126
110
 
127
- *SpexCode's own repo on its own board; the sessions top-left are agents building the tool.*
111
+ <img src="docs/readme-layers.svg" alt="L0 the spec-code data asset, L1 the agent session substrate, L2 the dashboard workspace — an adoption ladder">
128
112
 
129
- ## Working with agents
113
+ L0 is the asset an organisation adopts and keeps: plain files in plain git, useful offline.
114
+ ([Watch this repo's own L0 grow from its git
115
+ history](https://spexcode.net/assets/spec-tree-growth.mp4), 160 spec nodes over three weeks.)
116
+ L1 puts agents to work on that asset: the session state machine below. L2 is the workspace you
117
+ watch it all from, and because it is only a consumer of L1, anything the dashboard does, your
118
+ scripts and agents can do through the same CLI.
130
119
 
131
- This part needs tmux and a logged-in [Claude Code](https://www.anthropic.com/claude-code) or Codex
132
- on the machine.
120
+ ## Working with agents (L1)
133
121
 
134
- ```sh
135
- spex session new "[[settings]] make the settings page remember the last tab"
136
- ```
137
-
138
- launches a worker session in its own worktree on branch `node/settings-…`. The prompt's first
139
- `[[settings]]` mention sets the branch name and board attribution; the
140
- worker still finds and reads the governing spec itself before touching code. It makes the change,
141
- rewrites the spec body to match, commits
142
- both (a hook stamps the `Session:` trailer), then proposes a merge and stops. Workers never merge
143
- themselves. The merge stays with the manager: when you fire it, the session's own agent runs the
144
- actual `git merge`, so conflicts land on the one who knows the work. The same dispatch is a
145
- button on the dashboard (the new-session box on the board); the command form is what agents
146
- themselves use when they delegate.
147
-
148
- You supervise from outside — on the board, or with the same commands your agent uses:
122
+ This part needs tmux on the machine (on Windows, run inside WSL2).
149
123
 
150
124
  ```sh
151
- spex session watch # stream session transitions: launched / review / done / needs-input ...
152
- spex session review settings # commits ahead of trunk, merge-base diff, merge-conflict/lint gates
153
- spex session merge settings # gated merge into the trunk
154
- spex session close settings
125
+ spex session new "[[uploader]] retry failed chunks with backoff"
155
126
  ```
156
127
 
157
- Independent tasks run in parallel. Each worker is isolated in its own worktree, git serializes the
158
- merges, and a pre-commit guard blocks direct commits on the trunk, so everything flows through
159
- reviewable node branches.
128
+ launches a worker session in its own worktree on branch `node/uploader-…`. The prompt's first
129
+ `[[uploader]]` mention sets the branch name and board attribution; the worker finds and reads
130
+ the governing spec before it changes code. It makes the change, rewrites the spec body to
131
+ match, puts both in one commit, then files a merge proposal and stops:
160
132
 
161
- The process is enforced by mechanism, not prompt engineering: the backend creates the branch and a
162
- hook stamps the attribution; the materialized contract block carries the rest, so your dispatch
163
- prompt stays task-only. More on this mode of working:
164
- [working with agents](https://spexcode.net/working-with-agents/).
165
-
166
- ## Measuring behavior: eval
167
-
168
- eval is the measuring half of
169
- [the loop](#the-optimization-loop), built on the YATU discipline (**You As The User**): you measure
170
- behavior from the product's real surface, the way a real end user would touch it, not through an
171
- internal helper or shortcut that makes the
172
- proof easy. A spec says what a part should do; an
173
- `eval.md` beside it says how to check. Each scenario is a plain description plus an expected
174
- result. eval itself runs nothing (no DSL, no runner). An agent runs the scenario however it can:
175
- a test file, a real browser, or just clicking through by hand and screenshotting. It compares
176
- actual to expected and files the eval with evidence:
133
+ <img src="docs/readme-worker-flow.svg" alt="the eight-step worker loop: dispatch, read the spec, do the work, run evals, clear drift, propose a merge, human review, close">
177
134
 
178
135
  ```sh
179
- spex eval add settings --scenario remembers-tab --pass --image evidence.png
136
+ spex session ls # the living table below
137
+ spex session watch stream # follow transitions: working → review → done …
138
+ spex session review uploader # commits ahead of trunk, merge-base diff, merge/lint gates
139
+ spex session merge uploader # hands the gated merge to the session's own agent
140
+ spex session close uploader # retire the worktree, branch, and record
180
141
  ```
181
142
 
182
- Evals live in a git-tracked ndjson next to the spec, so measurements get the same attribution
183
- and history as spec versions. Bug fixes are expected to bracket: file a failing eval that
184
- reproduces the bug, fix, then file a passing eval on the same scenario.
143
+ <img src="docs/readme-sessions.svg" alt="animated terminal: spex session ls listing five sessions across working, review, asking and done states">
185
144
 
186
- <img src="docs/readme-eval.png" alt="eval view screenshot">
145
+ Each rule has a mechanism enforcing it: the backend creates the branch, a git hook attributes
146
+ every commit to its session, a pre-commit guard rejects direct commits to the trunk, and the
147
+ remaining conventions live in the materialized `CLAUDE.md`/`AGENTS.md`. Your dispatch prompt only
148
+ has to state the task. More: [working with agents](https://spexcode.net/working-with-agents/).
187
149
 
188
- *The eval view: scenario evals on the left; the selected eval's expected result, staleness,
189
- and recorded video evidence in the middle.*
150
+ ## The dashboard (L2)
190
151
 
191
- ## What's in the repo
192
-
193
- | Package | Role |
194
- |---|---|
195
- | `spec-cli` | The `spex` CLI and the HTTP backend (Hono, runs via tsx, no build step). Reads `.spec` and git live; owns the session state machine and the linter. |
196
- | `spec-dashboard` | React board: the node graph, per-node spec/history/issues panes, and a real terminal onto each live agent session. |
197
- | `spec-eval` | Scenario definitions, evals, evidence. |
198
- | `spec-forge` | Read-only tracer that resolves a forge's open issues and PRs to the spec nodes they serve (GitHub and GitLab drivers today). An issue links itself with a `Spec: <node-id>` line in its body; a PR from a `node/<id>` branch links for free. |
152
+ The spec tree, the sessions, and the evals each have a live page on the dashboard. Start `spex serve` and `spex dashboard`, then:
199
153
 
200
- ## The linter
154
+ <img src="docs/readme-graph.png" alt="the spec map: SpexCode's own repo on its own board — per-node version and eval chips, an agent avatar hovering on the node it is editing">
201
155
 
202
- `spex spec lint` checks the spec↔code graph and is the real gate (the git hook is fast local feedback):
156
+ *Your whole repo as one map SpexCode's own board shown. Each node carries its version and eval
157
+ state, an agent's avatar hovers on the node it is editing right now, and the rail top-left is the
158
+ live session console.*
203
159
 
204
- - **integrity** (error): a `code:` or `related:` path that doesn't exist
205
- - **living** (error): a changelog heading in a spec body
206
- - **coverage** (warn): unclaimed source files
207
- - **drift** (warn): governed code changed after its spec's last version, derived live from git
160
+ <img src="docs/readme-node.png" alt="a node opened on the board: the raw source callout, the expanded spec body, the governed file, a drift badge, and tabs for history, issues, eval">
208
161
 
209
- plus naming and ownership rules (`one-govern`, `id-format`, `mention` as errors;
210
- `related-drift`, `owners`, `confusable-id` as warns) `spex guide spec` lists them all.
162
+ *Click a node: the raw source on top, the expanded spec below it, the file it governs, its current
163
+ drift state, and tabs for the version history git already kept, its issues, and its evals.*
211
164
 
212
- `spex doctor` is the opt-in, read-only health diagnosis. Its altitude and breadth checks report bodies that
213
- look like implementation dumps and nodes with wide child fan-out, with per-node evidence and repair, without
214
- putting heuristic judgment in the lint or commit gate.
165
+ <img src="docs/readme-eval.png" alt="an eval reading under review: verdict banner, the scenario's expected result, the agent's note, recorded video evidence, and the review queue">
215
166
 
216
- ## Configuration
167
+ *An eval reading under review: the verdict, the scenario's expected result, the agent's note and
168
+ recorded video evidence. You can draw a region on the video to annotate it; the annotation is
169
+ matched to its step automatically, and the timestamp and step are sent to the agent with your
170
+ comment. The queue on the right leads to the next reading.*
217
171
 
218
- `spexcode.json` (committed, portable: layout, lint policy, doctor health budgets, project dashboard identity, launcher names) and
219
- `spexcode.local.json` (gitignored, host-specific: absolute launcher paths, cert paths) cover every
220
- setting. There is no imperative settings verb: you edit the two files by hand (or ask your agent
221
- to), and `spex guide settings` documents every field. The Projects admin UI writes a project's icon back
222
- to that same `dashboard.icon` field; the global gateway icon is the one separate host fact at
223
- `$SPEXCODE_HOME/config.json` `gateway.icon`, never copied into a repo. The other
224
- manuals are `spex guide` (the workflow), `spex guide spec`, `spex guide eval`, and
225
- `spex guide footprint`; `spex help` maps the commands.
172
+ The whole workspace is served over HTTP, so every view (a spec node, a session, an eval reading, a
173
+ live terminal) is a stable URL you can hand to a colleague; you can sit on the same board together.
174
+ The terminal pane is a real tmux session: copy the printed command and attach from your own
175
+ terminal.
226
176
 
227
177
  ## Contributing
228
178
 
package/bin/spex.mjs ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ // @@@ root release launcher ([[release-launcher]]) - the metapackage owns one command and delegates all
3
+ // product behavior to the independently compiled CLI package.
4
+ import '@spexcode/spec-cli/bin/spex.mjs'
@@ -0,0 +1,76 @@
1
+ #!/usr/bin/env node
2
+ // @@@ spex launcher ([[release-launcher]]) - package installs execute the package's compiled CLI directly;
3
+ // tsx remains a development tool and never enters an adopter's runtime closure.
4
+ import { spawn, spawnSync } from 'node:child_process'
5
+ import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs'
6
+ import { fileURLToPath } from 'node:url'
7
+ import { dirname, join } from 'node:path'
8
+
9
+ // Resolve from THIS package rather than cwd, so global and project-local installs run one compiled CLI.
10
+ const pkg = join(dirname(fileURLToPath(import.meta.url)), '..') // spec-cli/
11
+ const cli = join(pkg, 'dist', 'cli.js')
12
+ const workspace = join(pkg, '..')
13
+
14
+ // @@@ mid-merge guard ([[merge-tooling-resilience]]) - a released package contains no source to scan;
15
+ // a source workspace does. Refuse to run its possibly stale dist while its imported source trees still
16
+ // carry unresolved conflict markers, so hooks keep the retryable exit-75 contract during a merge.
17
+ const sourceRoot = join(pkg, 'src')
18
+ if (existsSync(sourceRoot)) {
19
+ const srcRoots = [sourceRoot, join(pkg, '..', 'packages', 'spec-core', 'src'), join(pkg, '..', 'spec-eval', 'src'), join(pkg, '..', 'spec-forge', 'src')]
20
+ const conflicted = srcRoots.flatMap((root) => {
21
+ if (!existsSync(root)) return []
22
+ return readdirSync(root, { recursive: true })
23
+ .filter((f) => /\.(ts|tsx|js|mjs)$/.test(String(f)))
24
+ .map((f) => join(root, String(f)))
25
+ .filter((path) => {
26
+ try { return /^<{7} /m.test(readFileSync(path, 'utf8')) } catch { return false }
27
+ })
28
+ })
29
+ if (conflicted.length) {
30
+ console.error('spex: paused mid-merge - unresolved conflict markers in the source SpexCode runs:')
31
+ for (const file of conflicted) console.error(` ${file}`)
32
+ console.error('resolve the merge, rebuild SpexCode, then retry. (exit 75)')
33
+ process.exit(75)
34
+ }
35
+
36
+ // @@@ source-workspace build ([[release-launcher]]) - the git hooks invoke this launcher straight from a
37
+ // checkout, where dist is intentionally untracked. Rebuild the complete runtime closure before linting
38
+ // candidate source; an installed package has no src tree and stays a pure Node -> dist execution path.
39
+ const runtimeEntries = [
40
+ cli,
41
+ join(workspace, 'packages', 'spec-core', 'dist', 'index.js'),
42
+ join(workspace, 'spec-eval', 'dist', 'index.js'),
43
+ join(workspace, 'spec-forge', 'dist', 'index.js'),
44
+ ]
45
+ const newestSource = srcRoots.reduce((newest, root) => {
46
+ if (!existsSync(root)) return newest
47
+ for (const entry of readdirSync(root, { recursive: true })) {
48
+ const path = join(root, String(entry))
49
+ try {
50
+ if (/\.(ts|tsx|js|mjs)$/.test(path)) newest = Math.max(newest, statSync(path).mtimeMs)
51
+ } catch { /* a concurrent source edit can only make the next invocation rebuild again */ }
52
+ }
53
+ return newest
54
+ }, 0)
55
+ const rebuild = runtimeEntries.some((entry) => {
56
+ try { return statSync(entry).mtimeMs < newestSource } catch { return true }
57
+ })
58
+ if (rebuild) {
59
+ const build = spawnSync('npm', ['run', 'build'], { cwd: workspace, stdio: 'inherit' })
60
+ if (build.error || build.status !== 0 || !existsSync(cli)) {
61
+ console.error('spex: source workspace build failed; fix it, then retry.')
62
+ process.exit(build.status ?? 1)
63
+ }
64
+ }
65
+ }
66
+ const args = process.argv.slice(2)
67
+ const env = { ...process.env }
68
+ // A backend/dashboard is a project or host control plane, never the managed session that happened to start it.
69
+ if (args[0] === 'serve' || args[0] === 'dashboard') {
70
+ const identityKeys = (env.SPEXCODE_SESSION_IDENTITY_VARS
71
+ || 'SPEXCODE_SESSION_ID,CLAUDE_CODE_SESSION_ID,CODEX_THREAD_ID,OPENCODE_SESSION_ID,PI_SESSION_ID')
72
+ .split(',').map((key) => key.trim()).filter(Boolean)
73
+ for (const key of identityKeys) delete env[key]
74
+ }
75
+ spawn(process.execPath, [cli, ...args], { stdio: 'inherit', env })
76
+ .on('exit', (code) => process.exit(code ?? 0))
@@ -0,0 +1,2 @@
1
+ export declare function assertLocalBackend(): Promise<void>;
2
+ export declare function attachSession(id: string): Promise<number>;
@@ -0,0 +1,48 @@
1
+ import { spawnSync } from 'node:child_process';
2
+ import { networkInterfaces } from 'node:os';
3
+ import { alive, apiBase, TMUX_SOCK } from './sessions.js';
4
+ const AGENT_ALTERNATIVES = 'read the pane with `spex session show <SEL> --capture`, drive it with `session send` (plain text first; `--keys` only as a last resort)';
5
+ // attach only makes sense on the machine that runs the tmux server — the backend's. The board the selector
6
+ // resolved against IS that backend, so the test is: does the RESOLVED backend (see [[remote-client]]'s
7
+ // ladder — flag / worker env / cwd record / fallback) point at this machine? Loopback and any address this
8
+ // host owns count as local; anything else (a tailnet/LAN IP of another box, a hostname we can't claim)
9
+ // fails loud with the reason and the remote-capable alternatives, never a silent local fallback onto a
10
+ // tmux socket that holds no sessions.
11
+ export async function assertLocalBackend() {
12
+ const base = await apiBase();
13
+ let host;
14
+ try {
15
+ host = new URL(base).hostname;
16
+ }
17
+ catch {
18
+ host = '';
19
+ }
20
+ const mine = new Set(['localhost', '127.0.0.1', '::1', '[::1]']);
21
+ for (const addrs of Object.values(networkInterfaces()))
22
+ for (const a of addrs ?? [])
23
+ mine.add(a.address);
24
+ if (mine.has(host))
25
+ return;
26
+ console.error(`spex session attach: attach is LOCAL-only, and the resolved backend is another machine (${base}).
27
+ The tmux session lives on THAT machine — a terminal can't be attached over HTTP. Either run attach there
28
+ (e.g. over ssh), or ${AGENT_ALTERNATIVES} — those work remotely.`);
29
+ process.exit(2);
30
+ }
31
+ // foreground takeover of the session's real tmux window; returns only via detach (C-b d) or the session
32
+ // ending. Interactive and blocking by design — a caller without a terminal (an agent inside its turn, a
33
+ // pipe) is refused up front and pointed at the remote-capable verbs instead of tmux's bare "not a terminal".
34
+ export async function attachSession(id) {
35
+ if (!process.stdin.isTTY || !process.stdout.isTTY) {
36
+ console.error(`spex session attach: attach is INTERACTIVE and needs a terminal — it blocks until you detach.
37
+ An agent must not run it inside a turn (it freezes you); ${AGENT_ALTERNATIVES}.`);
38
+ process.exit(2);
39
+ }
40
+ if (!(await alive(id))) {
41
+ console.error(`spex session attach: ${id} is offline — no live tmux session to attach.
42
+ Bring it back with \`spex session resume ${id}\`, or read its record with \`spex session show ${id}\`.`);
43
+ return 1;
44
+ }
45
+ console.log(`attaching to ${id} — detach with C-b d (the session keeps running)`);
46
+ const r = spawnSync('tmux', ['-u', '-L', TMUX_SOCK, 'attach-session', '-t', id], { stdio: 'inherit' });
47
+ return r.status ?? 1;
48
+ }
@@ -0,0 +1,33 @@
1
+ import type { DispatchResult, HarnessDeliveryRecord } from './harness.js';
2
+ type ClaudeHeadlessDeliveryRecord = HarnessDeliveryRecord & {
3
+ status?: string;
4
+ };
5
+ export declare const claudeHeadlessSock: (id: string) => string;
6
+ export declare function claudeHeadlessLaunchCommand(id: string, runtimeDir: string, claudeCmd: string): string;
7
+ export declare const deliverViaClaudeHeadless: (rec: ClaudeHeadlessDeliveryRecord, text: string) => Promise<DispatchResult>;
8
+ export declare const interruptClaudeHeadless: (rec: HarnessDeliveryRecord) => Promise<DispatchResult>;
9
+ export declare class ClaudeHeadlessController {
10
+ private readonly id;
11
+ private readonly claudeCmd;
12
+ private readonly cwd;
13
+ private server;
14
+ private child;
15
+ private controlQueue;
16
+ private closing;
17
+ private readonly socketPath;
18
+ constructor(id: string, _runtimeDir: string, claudeCmd: string, cwd?: string);
19
+ start(initialPrompt?: string): Promise<void>;
20
+ close(): Promise<void>;
21
+ private accept;
22
+ private handle;
23
+ private interrupt;
24
+ private spawnTurn;
25
+ private observeEvent;
26
+ private ensureTurnExit;
27
+ private terminateTurn;
28
+ private waitForTurnExit;
29
+ private signalTurn;
30
+ private writeLine;
31
+ }
32
+ export declare function runClaudeHeadlessController(id: string, runtimeDir: string, claudeCmd: string, tail: string[]): Promise<void>;
33
+ export {};