@matteeh/osq 0.1.0 → 0.2.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 (619) hide show
  1. package/README.md +415 -72
  2. package/dist/cli/approve.d.ts +13 -3
  3. package/dist/cli/approve.d.ts.map +1 -1
  4. package/dist/cli/approve.js +59 -4
  5. package/dist/cli/approve.js.map +1 -1
  6. package/dist/cli/bin.js +0 -0
  7. package/dist/cli/confirm.d.ts +21 -0
  8. package/dist/cli/confirm.d.ts.map +1 -0
  9. package/dist/cli/confirm.js +28 -0
  10. package/dist/cli/confirm.js.map +1 -0
  11. package/dist/cli/doctor.d.ts +13 -0
  12. package/dist/cli/doctor.d.ts.map +1 -0
  13. package/dist/cli/doctor.js +23 -0
  14. package/dist/cli/doctor.js.map +1 -0
  15. package/dist/cli/done.d.ts +12 -0
  16. package/dist/cli/done.d.ts.map +1 -0
  17. package/dist/cli/done.js +26 -0
  18. package/dist/cli/done.js.map +1 -0
  19. package/dist/cli/inbox.d.ts +22 -0
  20. package/dist/cli/inbox.d.ts.map +1 -0
  21. package/dist/cli/inbox.js +41 -0
  22. package/dist/cli/inbox.js.map +1 -0
  23. package/dist/cli/index.d.ts.map +1 -1
  24. package/dist/cli/index.js +127 -8
  25. package/dist/cli/index.js.map +1 -1
  26. package/dist/cli/init.d.ts +1 -0
  27. package/dist/cli/init.d.ts.map +1 -1
  28. package/dist/cli/init.js +9 -3
  29. package/dist/cli/init.js.map +1 -1
  30. package/dist/cli/lint.d.ts +26 -0
  31. package/dist/cli/lint.d.ts.map +1 -0
  32. package/dist/cli/lint.js +60 -0
  33. package/dist/cli/lint.js.map +1 -0
  34. package/dist/cli/migrate.d.ts +18 -0
  35. package/dist/cli/migrate.d.ts.map +1 -0
  36. package/dist/cli/migrate.js +42 -0
  37. package/dist/cli/migrate.js.map +1 -0
  38. package/dist/cli/new.js +1 -1
  39. package/dist/cli/new.js.map +1 -1
  40. package/dist/cli/plan-queue.d.ts +50 -0
  41. package/dist/cli/plan-queue.d.ts.map +1 -0
  42. package/dist/cli/plan-queue.js +167 -0
  43. package/dist/cli/plan-queue.js.map +1 -0
  44. package/dist/cli/plan.d.ts +35 -0
  45. package/dist/cli/plan.d.ts.map +1 -0
  46. package/dist/cli/plan.js +153 -0
  47. package/dist/cli/plan.js.map +1 -0
  48. package/dist/cli/queue.d.ts +9 -0
  49. package/dist/cli/queue.d.ts.map +1 -0
  50. package/dist/cli/queue.js +24 -0
  51. package/dist/cli/queue.js.map +1 -0
  52. package/dist/cli/reject.d.ts +8 -0
  53. package/dist/cli/reject.d.ts.map +1 -0
  54. package/dist/cli/reject.js +18 -0
  55. package/dist/cli/reject.js.map +1 -0
  56. package/dist/cli/report.d.ts +1 -1
  57. package/dist/cli/report.d.ts.map +1 -1
  58. package/dist/cli/report.js +141 -14
  59. package/dist/cli/report.js.map +1 -1
  60. package/dist/cli/retry.d.ts +7 -0
  61. package/dist/cli/retry.d.ts.map +1 -0
  62. package/dist/cli/retry.js +29 -0
  63. package/dist/cli/retry.js.map +1 -0
  64. package/dist/cli/serve.d.ts +30 -0
  65. package/dist/cli/serve.d.ts.map +1 -0
  66. package/dist/cli/serve.js +136 -0
  67. package/dist/cli/serve.js.map +1 -0
  68. package/dist/cli/setup.d.ts.map +1 -1
  69. package/dist/cli/setup.js +7 -1
  70. package/dist/cli/setup.js.map +1 -1
  71. package/dist/cli/show.d.ts +2 -1
  72. package/dist/cli/show.d.ts.map +1 -1
  73. package/dist/cli/show.js +20 -3
  74. package/dist/cli/show.js.map +1 -1
  75. package/dist/cli/status.d.ts +1 -1
  76. package/dist/cli/status.d.ts.map +1 -1
  77. package/dist/cli/status.js +2 -2
  78. package/dist/cli/status.js.map +1 -1
  79. package/dist/cli/watch.d.ts +9 -6
  80. package/dist/cli/watch.d.ts.map +1 -1
  81. package/dist/cli/watch.js +15 -2
  82. package/dist/cli/watch.js.map +1 -1
  83. package/dist/core/foundation/config-codex.d.ts +22 -0
  84. package/dist/core/foundation/config-codex.d.ts.map +1 -0
  85. package/dist/core/foundation/config-codex.js +58 -0
  86. package/dist/core/foundation/config-codex.js.map +1 -0
  87. package/dist/core/foundation/config-doctor.d.ts +14 -0
  88. package/dist/core/foundation/config-doctor.d.ts.map +1 -0
  89. package/dist/core/foundation/config-doctor.js +29 -0
  90. package/dist/core/foundation/config-doctor.js.map +1 -0
  91. package/dist/core/foundation/config-env.d.ts +3 -0
  92. package/dist/core/foundation/config-env.d.ts.map +1 -0
  93. package/dist/core/foundation/config-env.js +22 -0
  94. package/dist/core/foundation/config-env.js.map +1 -0
  95. package/dist/core/foundation/config-gates.d.ts +22 -0
  96. package/dist/core/foundation/config-gates.d.ts.map +1 -0
  97. package/dist/core/foundation/config-gates.js +43 -0
  98. package/dist/core/foundation/config-gates.js.map +1 -0
  99. package/dist/core/foundation/config-pi.d.ts +64 -0
  100. package/dist/core/foundation/config-pi.d.ts.map +1 -0
  101. package/dist/core/foundation/config-pi.js +131 -0
  102. package/dist/core/foundation/config-pi.js.map +1 -0
  103. package/dist/core/foundation/config-planning.d.ts +24 -0
  104. package/dist/core/foundation/config-planning.d.ts.map +1 -0
  105. package/dist/core/foundation/config-planning.js +60 -0
  106. package/dist/core/foundation/config-planning.js.map +1 -0
  107. package/dist/core/foundation/config-queue.d.ts +15 -0
  108. package/dist/core/foundation/config-queue.d.ts.map +1 -0
  109. package/dist/core/foundation/config-queue.js +24 -0
  110. package/dist/core/foundation/config-queue.js.map +1 -0
  111. package/dist/core/foundation/config-serve.d.ts +20 -0
  112. package/dist/core/foundation/config-serve.d.ts.map +1 -0
  113. package/dist/core/foundation/config-serve.js +35 -0
  114. package/dist/core/foundation/config-serve.js.map +1 -0
  115. package/dist/core/{config.d.ts → foundation/config.d.ts} +34 -3
  116. package/dist/core/foundation/config.d.ts.map +1 -0
  117. package/dist/core/{config.js → foundation/config.js} +35 -18
  118. package/dist/core/foundation/config.js.map +1 -0
  119. package/dist/core/foundation/doctor-managed.d.ts +13 -0
  120. package/dist/core/foundation/doctor-managed.d.ts.map +1 -0
  121. package/dist/core/foundation/doctor-managed.js +77 -0
  122. package/dist/core/foundation/doctor-managed.js.map +1 -0
  123. package/dist/core/foundation/doctor.d.ts +19 -0
  124. package/dist/core/foundation/doctor.d.ts.map +1 -0
  125. package/dist/core/foundation/doctor.js +187 -0
  126. package/dist/core/foundation/doctor.js.map +1 -0
  127. package/dist/core/foundation/harness-catalog.d.ts +96 -0
  128. package/dist/core/foundation/harness-catalog.d.ts.map +1 -0
  129. package/dist/core/foundation/harness-catalog.js +182 -0
  130. package/dist/core/foundation/harness-catalog.js.map +1 -0
  131. package/dist/core/foundation/init-blocks.d.ts +33 -0
  132. package/dist/core/foundation/init-blocks.d.ts.map +1 -0
  133. package/dist/core/foundation/init-blocks.js +165 -0
  134. package/dist/core/foundation/init-blocks.js.map +1 -0
  135. package/dist/core/foundation/init-managed.d.ts +10 -0
  136. package/dist/core/foundation/init-managed.d.ts.map +1 -0
  137. package/dist/core/foundation/init-managed.js +115 -0
  138. package/dist/core/foundation/init-managed.js.map +1 -0
  139. package/dist/core/foundation/init.d.ts +18 -0
  140. package/dist/core/foundation/init.d.ts.map +1 -0
  141. package/dist/core/foundation/init.js +113 -0
  142. package/dist/core/foundation/init.js.map +1 -0
  143. package/dist/core/{logger.d.ts → foundation/logger.d.ts} +1 -0
  144. package/dist/core/foundation/logger.d.ts.map +1 -0
  145. package/dist/core/{logger.js → foundation/logger.js} +18 -2
  146. package/dist/core/foundation/logger.js.map +1 -0
  147. package/dist/core/{new.d.ts → foundation/new.d.ts} +3 -0
  148. package/dist/core/foundation/new.d.ts.map +1 -0
  149. package/dist/core/foundation/new.js +206 -0
  150. package/dist/core/foundation/new.js.map +1 -0
  151. package/dist/core/foundation/package-root.d.ts +9 -0
  152. package/dist/core/foundation/package-root.d.ts.map +1 -0
  153. package/dist/core/foundation/package-root.js +11 -0
  154. package/dist/core/foundation/package-root.js.map +1 -0
  155. package/dist/core/lifecycle/done.d.ts +17 -0
  156. package/dist/core/lifecycle/done.d.ts.map +1 -0
  157. package/dist/core/lifecycle/done.js +97 -0
  158. package/dist/core/lifecycle/done.js.map +1 -0
  159. package/dist/core/lifecycle/reject.d.ts +26 -0
  160. package/dist/core/lifecycle/reject.d.ts.map +1 -0
  161. package/dist/core/lifecycle/reject.js +83 -0
  162. package/dist/core/lifecycle/reject.js.map +1 -0
  163. package/dist/core/lifecycle/retry-transition.d.ts +23 -0
  164. package/dist/core/lifecycle/retry-transition.d.ts.map +1 -0
  165. package/dist/core/lifecycle/retry-transition.js +41 -0
  166. package/dist/core/lifecycle/retry-transition.js.map +1 -0
  167. package/dist/core/lifecycle/retry.d.ts +18 -0
  168. package/dist/core/lifecycle/retry.d.ts.map +1 -0
  169. package/dist/core/lifecycle/retry.js +179 -0
  170. package/dist/core/lifecycle/retry.js.map +1 -0
  171. package/dist/core/report/approval-flags.d.ts +29 -0
  172. package/dist/core/report/approval-flags.d.ts.map +1 -0
  173. package/dist/core/report/approval-flags.js +138 -0
  174. package/dist/core/report/approval-flags.js.map +1 -0
  175. package/dist/core/report/planning-economics.d.ts +39 -0
  176. package/dist/core/report/planning-economics.d.ts.map +1 -0
  177. package/dist/core/report/planning-economics.js +168 -0
  178. package/dist/core/report/planning-economics.js.map +1 -0
  179. package/dist/core/report/planning-observed.d.ts +59 -0
  180. package/dist/core/report/planning-observed.d.ts.map +1 -0
  181. package/dist/core/report/planning-observed.js +135 -0
  182. package/dist/core/report/planning-observed.js.map +1 -0
  183. package/dist/core/report/planning-records.d.ts +69 -0
  184. package/dist/core/report/planning-records.d.ts.map +1 -0
  185. package/dist/core/report/planning-records.js +149 -0
  186. package/dist/core/report/planning-records.js.map +1 -0
  187. package/dist/core/report/planning-slice-lookup.d.ts +13 -0
  188. package/dist/core/report/planning-slice-lookup.d.ts.map +1 -0
  189. package/dist/core/report/planning-slice-lookup.js +146 -0
  190. package/dist/core/report/planning-slice-lookup.js.map +1 -0
  191. package/dist/core/report/planning-slice-measures.d.ts +17 -0
  192. package/dist/core/report/planning-slice-measures.d.ts.map +1 -0
  193. package/dist/core/report/planning-slice-measures.js +85 -0
  194. package/dist/core/report/planning-slice-measures.js.map +1 -0
  195. package/dist/core/report/planning-slice-record.d.ts +4 -0
  196. package/dist/core/report/planning-slice-record.d.ts.map +1 -0
  197. package/dist/core/report/planning-slice-record.js +66 -0
  198. package/dist/core/report/planning-slice-record.js.map +1 -0
  199. package/dist/core/report/planning-slice-turns.d.ts +13 -0
  200. package/dist/core/report/planning-slice-turns.d.ts.map +1 -0
  201. package/dist/core/report/planning-slice-turns.js +41 -0
  202. package/dist/core/report/planning-slice-turns.js.map +1 -0
  203. package/dist/core/report/planning-slice.d.ts +70 -0
  204. package/dist/core/report/planning-slice.d.ts.map +1 -0
  205. package/dist/core/report/planning-slice.js +147 -0
  206. package/dist/core/report/planning-slice.js.map +1 -0
  207. package/dist/core/report/planning.d.ts +31 -0
  208. package/dist/core/report/planning.d.ts.map +1 -0
  209. package/dist/core/report/planning.js +75 -0
  210. package/dist/core/report/planning.js.map +1 -0
  211. package/dist/core/report/report-events.d.ts +52 -0
  212. package/dist/core/report/report-events.d.ts.map +1 -0
  213. package/dist/core/report/report-events.js +198 -0
  214. package/dist/core/report/report-events.js.map +1 -0
  215. package/dist/core/report/report-pre-spawn.d.ts +25 -0
  216. package/dist/core/report/report-pre-spawn.d.ts.map +1 -0
  217. package/dist/core/report/report-pre-spawn.js +40 -0
  218. package/dist/core/report/report-pre-spawn.js.map +1 -0
  219. package/dist/core/report/report-retries.d.ts +30 -0
  220. package/dist/core/report/report-retries.d.ts.map +1 -0
  221. package/dist/core/report/report-retries.js +100 -0
  222. package/dist/core/report/report-retries.js.map +1 -0
  223. package/dist/core/report/report.d.ts +276 -0
  224. package/dist/core/report/report.d.ts.map +1 -0
  225. package/dist/core/report/report.js +1421 -0
  226. package/dist/core/report/report.js.map +1 -0
  227. package/dist/core/{lock.d.ts → run/lock.d.ts} +6 -0
  228. package/dist/core/run/lock.d.ts.map +1 -0
  229. package/dist/core/{lock.js → run/lock.js} +7 -15
  230. package/dist/core/run/lock.js.map +1 -0
  231. package/dist/core/run/manifest.d.ts +39 -0
  232. package/dist/core/run/manifest.d.ts.map +1 -0
  233. package/dist/core/run/manifest.js +137 -0
  234. package/dist/core/run/manifest.js.map +1 -0
  235. package/dist/core/run/scope-hash.d.ts +71 -0
  236. package/dist/core/run/scope-hash.d.ts.map +1 -0
  237. package/dist/core/run/scope-hash.js +177 -0
  238. package/dist/core/run/scope-hash.js.map +1 -0
  239. package/dist/core/run/scope.d.ts +30 -0
  240. package/dist/core/run/scope.d.ts.map +1 -0
  241. package/dist/core/run/scope.js +193 -0
  242. package/dist/core/run/scope.js.map +1 -0
  243. package/dist/core/run/summary.d.ts +8 -0
  244. package/dist/core/run/summary.d.ts.map +1 -0
  245. package/dist/core/run/summary.js +25 -0
  246. package/dist/core/run/summary.js.map +1 -0
  247. package/dist/core/run/verification.d.ts +23 -0
  248. package/dist/core/run/verification.d.ts.map +1 -0
  249. package/dist/core/run/verification.js +78 -0
  250. package/dist/core/run/verification.js.map +1 -0
  251. package/dist/core/spec/approve.d.ts +31 -0
  252. package/dist/core/spec/approve.d.ts.map +1 -0
  253. package/dist/core/spec/approve.js +111 -0
  254. package/dist/core/spec/approve.js.map +1 -0
  255. package/dist/core/spec/delta.d.ts +77 -0
  256. package/dist/core/spec/delta.d.ts.map +1 -0
  257. package/dist/core/spec/delta.js +581 -0
  258. package/dist/core/spec/delta.js.map +1 -0
  259. package/dist/core/spec/digest-flags.d.ts +21 -0
  260. package/dist/core/spec/digest-flags.d.ts.map +1 -0
  261. package/dist/core/spec/digest-flags.js +194 -0
  262. package/dist/core/spec/digest-flags.js.map +1 -0
  263. package/dist/core/spec/digest-verify-starts.d.ts +5 -0
  264. package/dist/core/spec/digest-verify-starts.d.ts.map +1 -0
  265. package/dist/core/spec/digest-verify-starts.js +31 -0
  266. package/dist/core/spec/digest-verify-starts.js.map +1 -0
  267. package/dist/core/spec/digest.d.ts +42 -0
  268. package/dist/core/spec/digest.d.ts.map +1 -0
  269. package/dist/core/spec/digest.js +170 -0
  270. package/dist/core/spec/digest.js.map +1 -0
  271. package/dist/core/spec/hasher.d.ts +11 -0
  272. package/dist/core/spec/hasher.d.ts.map +1 -0
  273. package/dist/core/{hasher.js → spec/hasher.js} +27 -3
  274. package/dist/core/spec/hasher.js.map +1 -0
  275. package/dist/core/spec/linter.d.ts +79 -0
  276. package/dist/core/spec/linter.d.ts.map +1 -0
  277. package/dist/core/spec/linter.js +826 -0
  278. package/dist/core/spec/linter.js.map +1 -0
  279. package/dist/core/spec/migrate.d.ts +54 -0
  280. package/dist/core/spec/migrate.d.ts.map +1 -0
  281. package/dist/core/spec/migrate.js +297 -0
  282. package/dist/core/spec/migrate.js.map +1 -0
  283. package/dist/core/spec/openspec-version.d.ts +30 -0
  284. package/dist/core/spec/openspec-version.d.ts.map +1 -0
  285. package/dist/core/spec/openspec-version.js +118 -0
  286. package/dist/core/spec/openspec-version.js.map +1 -0
  287. package/dist/core/spec/parser.d.ts +82 -0
  288. package/dist/core/spec/parser.d.ts.map +1 -0
  289. package/dist/core/spec/parser.js +221 -0
  290. package/dist/core/spec/parser.js.map +1 -0
  291. package/dist/core/spec/verify-paths.d.ts +18 -0
  292. package/dist/core/spec/verify-paths.d.ts.map +1 -0
  293. package/dist/core/spec/verify-paths.js +139 -0
  294. package/dist/core/spec/verify-paths.js.map +1 -0
  295. package/dist/core/spec/verify-starts.d.ts +45 -0
  296. package/dist/core/spec/verify-starts.d.ts.map +1 -0
  297. package/dist/core/spec/verify-starts.js +61 -0
  298. package/dist/core/spec/verify-starts.js.map +1 -0
  299. package/dist/core/status/inbox-cursor.d.ts +10 -0
  300. package/dist/core/status/inbox-cursor.d.ts.map +1 -0
  301. package/dist/core/status/inbox-cursor.js +33 -0
  302. package/dist/core/status/inbox-cursor.js.map +1 -0
  303. package/dist/core/status/inbox-projection.d.ts +15 -0
  304. package/dist/core/status/inbox-projection.d.ts.map +1 -0
  305. package/dist/core/status/inbox-projection.js +20 -0
  306. package/dist/core/status/inbox-projection.js.map +1 -0
  307. package/dist/core/status/inbox-text.d.ts +4 -0
  308. package/dist/core/status/inbox-text.d.ts.map +1 -0
  309. package/dist/core/status/inbox-text.js +48 -0
  310. package/dist/core/status/inbox-text.js.map +1 -0
  311. package/dist/core/status/inbox.d.ts +53 -0
  312. package/dist/core/status/inbox.d.ts.map +1 -0
  313. package/dist/core/status/inbox.js +167 -0
  314. package/dist/core/status/inbox.js.map +1 -0
  315. package/dist/core/status/layout.d.ts +29 -0
  316. package/dist/core/status/layout.d.ts.map +1 -0
  317. package/dist/core/status/layout.js +77 -0
  318. package/dist/core/status/layout.js.map +1 -0
  319. package/dist/core/status/queue-parser.d.ts +13 -0
  320. package/dist/core/status/queue-parser.d.ts.map +1 -0
  321. package/dist/core/status/queue-parser.js +88 -0
  322. package/dist/core/status/queue-parser.js.map +1 -0
  323. package/dist/core/status/queue-planning.d.ts +62 -0
  324. package/dist/core/status/queue-planning.d.ts.map +1 -0
  325. package/dist/core/status/queue-planning.js +158 -0
  326. package/dist/core/status/queue-planning.js.map +1 -0
  327. package/dist/core/status/queue-report-detail.d.ts +50 -0
  328. package/dist/core/status/queue-report-detail.d.ts.map +1 -0
  329. package/dist/core/status/queue-report-detail.js +140 -0
  330. package/dist/core/status/queue-report-detail.js.map +1 -0
  331. package/dist/core/status/queue-report.d.ts +14 -0
  332. package/dist/core/status/queue-report.d.ts.map +1 -0
  333. package/dist/core/status/queue-report.js +41 -0
  334. package/dist/core/status/queue-report.js.map +1 -0
  335. package/dist/core/status/queue-state.d.ts +53 -0
  336. package/dist/core/status/queue-state.d.ts.map +1 -0
  337. package/dist/core/status/queue-state.js +167 -0
  338. package/dist/core/status/queue-state.js.map +1 -0
  339. package/dist/core/status/queue.d.ts +7 -0
  340. package/dist/core/status/queue.d.ts.map +1 -0
  341. package/dist/core/status/queue.js +4 -0
  342. package/dist/core/status/queue.js.map +1 -0
  343. package/dist/core/status/show.d.ts +102 -0
  344. package/dist/core/status/show.d.ts.map +1 -0
  345. package/dist/core/status/show.js +704 -0
  346. package/dist/core/status/show.js.map +1 -0
  347. package/dist/core/status/state.d.ts +56 -0
  348. package/dist/core/status/state.d.ts.map +1 -0
  349. package/dist/core/status/state.js +187 -0
  350. package/dist/core/status/state.js.map +1 -0
  351. package/dist/core/status/status.d.ts +23 -0
  352. package/dist/core/status/status.d.ts.map +1 -0
  353. package/dist/core/status/status.js +173 -0
  354. package/dist/core/status/status.js.map +1 -0
  355. package/dist/core/web/web-data-change.d.ts +10 -0
  356. package/dist/core/web/web-data-change.d.ts.map +1 -0
  357. package/dist/core/web/web-data-change.js +106 -0
  358. package/dist/core/web/web-data-change.js.map +1 -0
  359. package/dist/core/web/web-data-folders.d.ts +39 -0
  360. package/dist/core/web/web-data-folders.d.ts.map +1 -0
  361. package/dist/core/web/web-data-folders.js +125 -0
  362. package/dist/core/web/web-data-folders.js.map +1 -0
  363. package/dist/core/web/web-data-graph.d.ts +8 -0
  364. package/dist/core/web/web-data-graph.d.ts.map +1 -0
  365. package/dist/core/web/web-data-graph.js +113 -0
  366. package/dist/core/web/web-data-graph.js.map +1 -0
  367. package/dist/core/web/web-data-lifecycle.d.ts +43 -0
  368. package/dist/core/web/web-data-lifecycle.d.ts.map +1 -0
  369. package/dist/core/web/web-data-lifecycle.js +141 -0
  370. package/dist/core/web/web-data-lifecycle.js.map +1 -0
  371. package/dist/core/web/web-data-observations.d.ts +30 -0
  372. package/dist/core/web/web-data-observations.d.ts.map +1 -0
  373. package/dist/core/web/web-data-observations.js +181 -0
  374. package/dist/core/web/web-data-observations.js.map +1 -0
  375. package/dist/core/web/web-data-tokens.d.ts +29 -0
  376. package/dist/core/web/web-data-tokens.d.ts.map +1 -0
  377. package/dist/core/web/web-data-tokens.js +62 -0
  378. package/dist/core/web/web-data-tokens.js.map +1 -0
  379. package/dist/core/web/web-data-types.d.ts +156 -0
  380. package/dist/core/web/web-data-types.d.ts.map +1 -0
  381. package/dist/core/web/web-data-types.js +15 -0
  382. package/dist/core/web/web-data-types.js.map +1 -0
  383. package/dist/core/web/web-data.d.ts +10 -0
  384. package/dist/core/web/web-data.d.ts.map +1 -0
  385. package/dist/core/web/web-data.js +8 -0
  386. package/dist/core/web/web-data.js.map +1 -0
  387. package/dist/core/web/web-events.d.ts +54 -0
  388. package/dist/core/web/web-events.d.ts.map +1 -0
  389. package/dist/core/web/web-events.js +162 -0
  390. package/dist/core/web/web-events.js.map +1 -0
  391. package/dist/core/web/web-export.d.ts +18 -0
  392. package/dist/core/web/web-export.d.ts.map +1 -0
  393. package/dist/core/web/web-export.js +112 -0
  394. package/dist/core/web/web-export.js.map +1 -0
  395. package/dist/core/web/web-server.d.ts +34 -0
  396. package/dist/core/web/web-server.d.ts.map +1 -0
  397. package/dist/core/web/web-server.js +182 -0
  398. package/dist/core/web/web-server.js.map +1 -0
  399. package/dist/core/web/web-static.d.ts +20 -0
  400. package/dist/core/web/web-static.d.ts.map +1 -0
  401. package/dist/core/web/web-static.js +104 -0
  402. package/dist/core/web/web-static.js.map +1 -0
  403. package/dist/harness/{agy.d.ts → agy/agy.d.ts} +8 -6
  404. package/dist/harness/agy/agy.d.ts.map +1 -0
  405. package/dist/harness/{agy.js → agy/agy.js} +49 -34
  406. package/dist/harness/agy/agy.js.map +1 -0
  407. package/dist/harness/claude/claude-turns.d.ts +29 -0
  408. package/dist/harness/claude/claude-turns.d.ts.map +1 -0
  409. package/dist/harness/claude/claude-turns.js +162 -0
  410. package/dist/harness/claude/claude-turns.js.map +1 -0
  411. package/dist/harness/claude/claude-usage.d.ts +12 -0
  412. package/dist/harness/claude/claude-usage.d.ts.map +1 -0
  413. package/dist/harness/claude/claude-usage.js +144 -0
  414. package/dist/harness/claude/claude-usage.js.map +1 -0
  415. package/dist/harness/codex/codex-observe-usage.d.ts +6 -0
  416. package/dist/harness/codex/codex-observe-usage.d.ts.map +1 -0
  417. package/dist/harness/codex/codex-observe-usage.js +215 -0
  418. package/dist/harness/codex/codex-observe-usage.js.map +1 -0
  419. package/dist/harness/codex/codex-prompt.d.ts +17 -0
  420. package/dist/harness/codex/codex-prompt.d.ts.map +1 -0
  421. package/dist/harness/codex/codex-prompt.js +43 -0
  422. package/dist/harness/codex/codex-prompt.js.map +1 -0
  423. package/dist/harness/codex/codex-stream.d.ts +23 -0
  424. package/dist/harness/codex/codex-stream.d.ts.map +1 -0
  425. package/dist/harness/codex/codex-stream.js +182 -0
  426. package/dist/harness/codex/codex-stream.js.map +1 -0
  427. package/dist/harness/codex/codex-usage.d.ts +26 -0
  428. package/dist/harness/codex/codex-usage.d.ts.map +1 -0
  429. package/dist/harness/codex/codex-usage.js +122 -0
  430. package/dist/harness/codex/codex-usage.js.map +1 -0
  431. package/dist/harness/codex/codex.d.ts +16 -0
  432. package/dist/harness/codex/codex.d.ts.map +1 -0
  433. package/dist/harness/codex/codex.js +92 -0
  434. package/dist/harness/codex/codex.js.map +1 -0
  435. package/dist/harness/index.d.ts +11 -2
  436. package/dist/harness/index.d.ts.map +1 -1
  437. package/dist/harness/index.js +24 -9
  438. package/dist/harness/index.js.map +1 -1
  439. package/dist/harness/mock.d.ts +5 -2
  440. package/dist/harness/mock.d.ts.map +1 -1
  441. package/dist/harness/mock.js +10 -11
  442. package/dist/harness/mock.js.map +1 -1
  443. package/dist/harness/opencode/opencode-observe-usage.d.ts +4 -0
  444. package/dist/harness/opencode/opencode-observe-usage.d.ts.map +1 -0
  445. package/dist/harness/opencode/opencode-observe-usage.js +100 -0
  446. package/dist/harness/opencode/opencode-observe-usage.js.map +1 -0
  447. package/dist/harness/opencode/opencode-usage.d.ts +24 -0
  448. package/dist/harness/opencode/opencode-usage.d.ts.map +1 -0
  449. package/dist/harness/opencode/opencode-usage.js +181 -0
  450. package/dist/harness/opencode/opencode-usage.js.map +1 -0
  451. package/dist/harness/{opencode.d.ts → opencode/opencode.d.ts} +10 -7
  452. package/dist/harness/opencode/opencode.d.ts.map +1 -0
  453. package/dist/harness/{opencode.js → opencode/opencode.js} +159 -70
  454. package/dist/harness/opencode/opencode.js.map +1 -0
  455. package/dist/harness/pi/pi-args.d.ts +9 -0
  456. package/dist/harness/pi/pi-args.d.ts.map +1 -0
  457. package/dist/harness/pi/pi-args.js +33 -0
  458. package/dist/harness/pi/pi-args.js.map +1 -0
  459. package/dist/harness/pi/pi-stream.d.ts +27 -0
  460. package/dist/harness/pi/pi-stream.d.ts.map +1 -0
  461. package/dist/harness/pi/pi-stream.js +176 -0
  462. package/dist/harness/pi/pi-stream.js.map +1 -0
  463. package/dist/harness/pi/pi-tools.d.ts +5 -0
  464. package/dist/harness/pi/pi-tools.d.ts.map +1 -0
  465. package/dist/harness/pi/pi-tools.js +31 -0
  466. package/dist/harness/pi/pi-tools.js.map +1 -0
  467. package/dist/harness/pi/pi.d.ts +11 -0
  468. package/dist/harness/pi/pi.d.ts.map +1 -0
  469. package/dist/harness/pi/pi.js +109 -0
  470. package/dist/harness/pi/pi.js.map +1 -0
  471. package/dist/harness/prompt.d.ts +11 -0
  472. package/dist/harness/prompt.d.ts.map +1 -0
  473. package/dist/harness/prompt.js +105 -0
  474. package/dist/harness/prompt.js.map +1 -0
  475. package/dist/harness/types.d.ts +287 -8
  476. package/dist/harness/types.d.ts.map +1 -1
  477. package/dist/harness/types.js +125 -0
  478. package/dist/harness/types.js.map +1 -1
  479. package/dist/index.d.ts +13 -2
  480. package/dist/index.d.ts.map +1 -1
  481. package/dist/index.js +8 -1
  482. package/dist/index.js.map +1 -1
  483. package/dist/watcher/archive-verify.d.ts +9 -0
  484. package/dist/watcher/archive-verify.d.ts.map +1 -0
  485. package/dist/watcher/archive-verify.js +80 -0
  486. package/dist/watcher/archive-verify.js.map +1 -0
  487. package/dist/watcher/archiver.d.ts +14 -2
  488. package/dist/watcher/archiver.d.ts.map +1 -1
  489. package/dist/watcher/archiver.js +112 -33
  490. package/dist/watcher/archiver.js.map +1 -1
  491. package/dist/watcher/attempt.d.ts +19 -0
  492. package/dist/watcher/attempt.d.ts.map +1 -0
  493. package/dist/watcher/attempt.js +94 -0
  494. package/dist/watcher/attempt.js.map +1 -0
  495. package/dist/watcher/auto-retry.d.ts +11 -0
  496. package/dist/watcher/auto-retry.d.ts.map +1 -0
  497. package/dist/watcher/auto-retry.js +180 -0
  498. package/dist/watcher/auto-retry.js.map +1 -0
  499. package/dist/watcher/build.d.ts +24 -0
  500. package/dist/watcher/build.d.ts.map +1 -0
  501. package/dist/watcher/build.js +169 -0
  502. package/dist/watcher/build.js.map +1 -0
  503. package/dist/watcher/change-verify.d.ts +25 -0
  504. package/dist/watcher/change-verify.d.ts.map +1 -0
  505. package/dist/watcher/change-verify.js +57 -0
  506. package/dist/watcher/change-verify.js.map +1 -0
  507. package/dist/watcher/dev.d.ts +51 -0
  508. package/dist/watcher/dev.d.ts.map +1 -0
  509. package/dist/watcher/dev.js +124 -0
  510. package/dist/watcher/dev.js.map +1 -0
  511. package/dist/watcher/failure-reason.d.ts +7 -0
  512. package/dist/watcher/failure-reason.d.ts.map +1 -0
  513. package/dist/watcher/failure-reason.js +2 -0
  514. package/dist/watcher/failure-reason.js.map +1 -0
  515. package/dist/watcher/fingerprint.d.ts +19 -0
  516. package/dist/watcher/fingerprint.d.ts.map +1 -0
  517. package/dist/watcher/fingerprint.js +53 -0
  518. package/dist/watcher/fingerprint.js.map +1 -0
  519. package/dist/watcher/heartbeat.d.ts +33 -0
  520. package/dist/watcher/heartbeat.d.ts.map +1 -0
  521. package/dist/watcher/heartbeat.js +135 -0
  522. package/dist/watcher/heartbeat.js.map +1 -0
  523. package/dist/watcher/lock.d.ts +10 -0
  524. package/dist/watcher/lock.d.ts.map +1 -0
  525. package/dist/watcher/lock.js +14 -0
  526. package/dist/watcher/lock.js.map +1 -0
  527. package/dist/watcher/loop.d.ts +26 -6
  528. package/dist/watcher/loop.d.ts.map +1 -1
  529. package/dist/watcher/loop.js +154 -37
  530. package/dist/watcher/loop.js.map +1 -1
  531. package/dist/watcher/measures.d.ts +46 -0
  532. package/dist/watcher/measures.d.ts.map +1 -0
  533. package/dist/watcher/measures.js +203 -0
  534. package/dist/watcher/measures.js.map +1 -0
  535. package/dist/watcher/outcome.d.ts +32 -0
  536. package/dist/watcher/outcome.d.ts.map +1 -0
  537. package/dist/watcher/outcome.js +127 -0
  538. package/dist/watcher/outcome.js.map +1 -0
  539. package/dist/watcher/regression.d.ts +43 -0
  540. package/dist/watcher/regression.d.ts.map +1 -0
  541. package/dist/watcher/regression.js +175 -0
  542. package/dist/watcher/regression.js.map +1 -0
  543. package/dist/watcher/runner.d.ts +6 -68
  544. package/dist/watcher/runner.d.ts.map +1 -1
  545. package/dist/watcher/runner.js +74 -523
  546. package/dist/watcher/runner.js.map +1 -1
  547. package/dist/watcher/spawn.d.ts +48 -0
  548. package/dist/watcher/spawn.d.ts.map +1 -0
  549. package/dist/watcher/spawn.js +130 -0
  550. package/dist/watcher/spawn.js.map +1 -0
  551. package/dist/watcher/task-verify.d.ts +59 -0
  552. package/dist/watcher/task-verify.d.ts.map +1 -0
  553. package/dist/watcher/task-verify.js +108 -0
  554. package/dist/watcher/task-verify.js.map +1 -0
  555. package/dist/watcher/verify.d.ts +44 -0
  556. package/dist/watcher/verify.d.ts.map +1 -0
  557. package/dist/watcher/verify.js +156 -0
  558. package/dist/watcher/verify.js.map +1 -0
  559. package/package.json +21 -9
  560. package/templates/PLANNER.md +77 -0
  561. package/templates/openspec/config.yaml +24 -0
  562. package/templates/openspec/schemas/osq/README.md +30 -0
  563. package/templates/openspec/schemas/osq/schema.yaml +133 -0
  564. package/templates/openspec/schemas/osq/templates/proposal.md +66 -0
  565. package/templates/openspec/schemas/osq/templates/spec.md +13 -0
  566. package/templates/openspec/schemas/osq/templates/tasks.md +11 -0
  567. package/templates/proposal.md +66 -0
  568. package/templates/tasks.md +5 -0
  569. package/ui/dist/assets/index-CZYeQ8la.js +9 -0
  570. package/ui/dist/assets/index-D6zVSjO7.css +1 -0
  571. package/ui/dist/index.html +14 -0
  572. package/dist/core/approve.d.ts +0 -11
  573. package/dist/core/approve.d.ts.map +0 -1
  574. package/dist/core/approve.js +0 -52
  575. package/dist/core/approve.js.map +0 -1
  576. package/dist/core/config.d.ts.map +0 -1
  577. package/dist/core/config.js.map +0 -1
  578. package/dist/core/hasher.d.ts +0 -4
  579. package/dist/core/hasher.d.ts.map +0 -1
  580. package/dist/core/hasher.js.map +0 -1
  581. package/dist/core/init.d.ts +0 -12
  582. package/dist/core/init.d.ts.map +0 -1
  583. package/dist/core/init.js +0 -151
  584. package/dist/core/init.js.map +0 -1
  585. package/dist/core/linter.d.ts +0 -8
  586. package/dist/core/linter.d.ts.map +0 -1
  587. package/dist/core/linter.js +0 -100
  588. package/dist/core/linter.js.map +0 -1
  589. package/dist/core/lock.d.ts.map +0 -1
  590. package/dist/core/lock.js.map +0 -1
  591. package/dist/core/logger.d.ts.map +0 -1
  592. package/dist/core/logger.js.map +0 -1
  593. package/dist/core/new.d.ts.map +0 -1
  594. package/dist/core/new.js +0 -79
  595. package/dist/core/new.js.map +0 -1
  596. package/dist/core/parser.d.ts +0 -32
  597. package/dist/core/parser.d.ts.map +0 -1
  598. package/dist/core/parser.js +0 -87
  599. package/dist/core/parser.js.map +0 -1
  600. package/dist/core/report.d.ts +0 -54
  601. package/dist/core/report.d.ts.map +0 -1
  602. package/dist/core/report.js +0 -475
  603. package/dist/core/report.js.map +0 -1
  604. package/dist/core/show.d.ts +0 -50
  605. package/dist/core/show.d.ts.map +0 -1
  606. package/dist/core/show.js +0 -374
  607. package/dist/core/show.js.map +0 -1
  608. package/dist/core/state.d.ts +0 -25
  609. package/dist/core/state.d.ts.map +0 -1
  610. package/dist/core/state.js +0 -180
  611. package/dist/core/state.js.map +0 -1
  612. package/dist/core/status.d.ts +0 -10
  613. package/dist/core/status.d.ts.map +0 -1
  614. package/dist/core/status.js +0 -106
  615. package/dist/core/status.js.map +0 -1
  616. package/dist/harness/agy.d.ts.map +0 -1
  617. package/dist/harness/agy.js.map +0 -1
  618. package/dist/harness/opencode.d.ts.map +0 -1
  619. package/dist/harness/opencode.js.map +0 -1
@@ -0,0 +1,156 @@
1
+ import { createHash } from 'node:crypto';
2
+ import fs from 'node:fs/promises';
3
+ import path from 'node:path';
4
+ import { resolveScope } from '../core/run/scope.js';
5
+ import { runVerificationCommand } from '../core/run/verification.js';
6
+ import { asRecord } from '../harness/stream.js';
7
+ import { appendHarnessEvent } from '../harness/types.js';
8
+ /** Last first-class `text` event on the agent stream, or null when absent. */
9
+ export async function extractFinalTextFromStream(specFolderPath, taskNumber) {
10
+ const eventFilePath = path.join(specFolderPath, '.run', 'events', `${taskNumber}.jsonl`);
11
+ let content = '';
12
+ try {
13
+ content = await fs.readFile(eventFilePath, 'utf8');
14
+ }
15
+ catch {
16
+ return null;
17
+ }
18
+ let finalText = null;
19
+ for (const line of content.split('\n')) {
20
+ if (!line.trim())
21
+ continue;
22
+ let parsed;
23
+ try {
24
+ parsed = JSON.parse(line);
25
+ }
26
+ catch {
27
+ continue;
28
+ }
29
+ const event = asRecord(parsed);
30
+ if (event?.type !== 'text')
31
+ continue;
32
+ const text = asRecord(event.data)?.text;
33
+ if (typeof text === 'string' && text.trim().length > 0) {
34
+ finalText = text;
35
+ }
36
+ }
37
+ return finalText?.trim() ? finalText : null;
38
+ }
39
+ /** Write a result file synthesized from the agent's final stream message. */
40
+ export async function synthesizeResultFile(resultsDir, taskNumber, finalText) {
41
+ await fs.mkdir(resultsDir, { recursive: true });
42
+ const resultPath = path.join(resultsDir, `${taskNumber}.md`);
43
+ const body = finalText.endsWith('\n') ? finalText : `${finalText}\n`;
44
+ const content = [
45
+ '---',
46
+ 'synthesized: true',
47
+ '---',
48
+ "<!-- Synthesized by the osq watcher from the agent's final stream message.",
49
+ ' The agent exited without writing a result file. -->',
50
+ '',
51
+ body,
52
+ ].join('\n');
53
+ await fs.writeFile(resultPath, content, 'utf8');
54
+ return resultPath;
55
+ }
56
+ const TEST_DIR_NAME = 'tests';
57
+ function hashFileContent(content) {
58
+ return createHash('sha256').update(content).digest('hex');
59
+ }
60
+ /** Snapshot preexisting `tests/` files as path -> content hash. */
61
+ export async function snapshotTestFiles(projectRoot) {
62
+ const snapshot = new Map();
63
+ const walk = async (dir) => {
64
+ let entries;
65
+ try {
66
+ entries = await fs.readdir(dir, { withFileTypes: true });
67
+ }
68
+ catch {
69
+ return;
70
+ }
71
+ for (const entry of entries) {
72
+ const full = path.join(dir, entry.name);
73
+ if (entry.isDirectory()) {
74
+ await walk(full);
75
+ }
76
+ else if (entry.isFile()) {
77
+ const relative = path.relative(projectRoot, full).split(path.sep).join('/');
78
+ snapshot.set(relative, hashFileContent(await fs.readFile(full)));
79
+ }
80
+ }
81
+ };
82
+ await walk(path.join(projectRoot, TEST_DIR_NAME));
83
+ return snapshot;
84
+ }
85
+ /** Pre-spawn test gate: preexisting `tests/**` hashes plus resolved scope authorization. */
86
+ export async function captureTestGate(projectRoot, scope, testsModify) {
87
+ const snapshot = await snapshotTestFiles(projectRoot);
88
+ const authorized = new Set();
89
+ for (const entry of await resolveScope(projectRoot, scope)) {
90
+ if (entry.absolutePath !== null)
91
+ authorized.add(entry.relativePath);
92
+ }
93
+ return { snapshot, testsModify, authorized };
94
+ }
95
+ /** Diagnostics for preexisting test files changed or deleted since `snapshot`. */
96
+ export async function findUndeclaredTestChanges(projectRoot, snapshot, options) {
97
+ const changes = [];
98
+ for (const [relative, expectedHash] of snapshot) {
99
+ let state = null;
100
+ try {
101
+ const hash = hashFileContent(await fs.readFile(path.join(projectRoot, relative)));
102
+ if (hash !== expectedHash)
103
+ state = 'modified';
104
+ }
105
+ catch {
106
+ state = 'deleted';
107
+ }
108
+ const authorized = options?.testsModify === true && options.authorized.has(relative);
109
+ if (state === null || authorized)
110
+ continue;
111
+ changes.push(options ? `${relative} (${state}); authorizing scope: ${relative}` : `${relative} (${state})`);
112
+ }
113
+ return changes.sort();
114
+ }
115
+ /**
116
+ * Run the verify command through the shared core executor, then append exactly
117
+ * one `verify_ran` event. This is the single watcher verification entrypoint;
118
+ * every watcher gate delegates here so event emission stays on one path.
119
+ */
120
+ export async function runVerificationGateResult(projectRoot, verifyCommand, verifyTimeoutSeconds, context) {
121
+ const result = await runVerificationCommand(projectRoot, verifyCommand, verifyTimeoutSeconds);
122
+ const error = result.timedOut
123
+ ? `Verify command timed out after ${verifyTimeoutSeconds}s`
124
+ : (result.error ??
125
+ (result.exitCode !== 0
126
+ ? result.output || `Process exited with code ${result.exitCode}`
127
+ : undefined));
128
+ if (context) {
129
+ await appendHarnessEvent(context.specFolderPath, context.taskNumber, {
130
+ type: 'verify_ran',
131
+ timestamp: new Date().toISOString(),
132
+ data: {
133
+ command: verifyCommand,
134
+ exitCode: result.exitCode,
135
+ duration: result.duration,
136
+ ...(result.output.trim() ? { output: result.output } : {}),
137
+ ...(context.extraData ? context.extraData(result) : {}),
138
+ },
139
+ });
140
+ }
141
+ return {
142
+ ...result,
143
+ passed: result.exitCode === 0 && !result.error,
144
+ ...(error ? { error } : {}),
145
+ };
146
+ }
147
+ /** Compatibility projection retaining the established `runVerificationGate` shape. */
148
+ export async function runVerificationGate(projectRoot, verifyCommand, verifyTimeoutSeconds, context) {
149
+ const result = await runVerificationGateResult(projectRoot, verifyCommand, verifyTimeoutSeconds, context);
150
+ return {
151
+ passed: result.passed,
152
+ timedOut: result.timedOut,
153
+ ...(result.error ? { error: result.error } : {}),
154
+ };
155
+ }
156
+ //# sourceMappingURL=verify.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify.js","sourceRoot":"","sources":["../../src/watcher/verify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAA2B,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC9F,OAAO,EAAE,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E,MAAM,CAAC,MAAM;QACrB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACjD,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matteeh/osq",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Strict spec queue. Spec-driven development with two kinds of agent and a human gate between them.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -16,11 +16,18 @@
16
16
  "osq": "dist/cli/bin.js"
17
17
  },
18
18
  "scripts": {
19
- "build": "tsc -p tsconfig.build.json",
20
- "lint": "biome check src tests",
21
- "format": "biome format --write src tests",
22
- "test": "node --import tsx --test tests/**/*.test.ts",
23
- "verify": "pnpm tsc --noEmit && pnpm test && pnpm lint",
19
+ "build": "pnpm build:ui && pnpm stage:ui && pnpm build:cli",
20
+ "build:cli": "tsc -p tsconfig.build.json",
21
+ "build:ui": "pnpm --filter @osq/ui build",
22
+ "stage:ui": "node scripts/stage-ui.mjs",
23
+ "clean:ui": "node scripts/stage-ui.mjs --clean",
24
+ "lint": "biome check src tests packages/ui/src",
25
+ "format": "biome format --write src tests packages/ui/src",
26
+ "test": "node --import tsx --test 'tests/**/*.test.ts' && TSX_TSCONFIG_PATH=packages/ui/tsconfig.runtime.json node --import tsx --test 'tests/**/*.test.tsx'",
27
+ "test:golden": "node --import tsx --test tests/golden-events.test.ts",
28
+ "typecheck:cli": "tsc --noEmit -p packages/ui/tsconfig.cli.json",
29
+ "typecheck:ui": "pnpm --filter @osq/ui typecheck",
30
+ "verify": "pnpm typecheck:cli && pnpm typecheck:ui && pnpm build && pnpm test && pnpm lint",
24
31
  "prepublishOnly": "npm run build"
25
32
  },
26
33
  "dependencies": {
@@ -31,7 +38,8 @@
31
38
  },
32
39
  "devDependencies": {
33
40
  "@biomejs/biome": "^1.9.4",
34
- "@types/node": "^22.13.9",
41
+ "@fission-ai/openspec": "1.13.1",
42
+ "@types/node": "^24.13.6",
35
43
  "tsx": "^4.19.3",
36
44
  "typescript": "^5.8.2"
37
45
  },
@@ -46,7 +54,7 @@
46
54
  "author": "Mathias",
47
55
  "license": "MIT",
48
56
  "engines": {
49
- "node": ">=22.0.0"
57
+ "node": ">=24.0.0"
50
58
  },
51
59
  "main": "./dist/index.js",
52
60
  "types": "./dist/index.d.ts",
@@ -58,9 +66,13 @@
58
66
  },
59
67
  "files": [
60
68
  "dist",
61
- "templates"
69
+ "templates",
70
+ "ui"
62
71
  ],
63
72
  "publishConfig": {
64
73
  "access": "public"
74
+ },
75
+ "peerDependencies": {
76
+ "@fission-ai/openspec": ">=1.13.1 <2"
65
77
  }
66
78
  }
@@ -0,0 +1,77 @@
1
+ <!-- OSQ:START -->
2
+ ## Planning a change
3
+
4
+ You write the change folder; a cheaper executor runs it one task at a time,
5
+ sees only what you wrote, and reads it literally.
6
+
7
+ ### Interactive planning
8
+
9
+ When a human is in the session:
10
+
11
+ 1. Read `AGENTS.md`, the capability specs this change touches, and one recent
12
+ archived change end to end.
13
+ 2. Reply with the parent spec, the task list (titles only), the capability specs
14
+ this change will write, and any `## Human steps`. Stop there.
15
+ 3. Write the change folder only after the human approves the list.
16
+
17
+ ### Working from the handoff
18
+
19
+ When `osq plan` started you, `plan-prompt.md` in the selected change folder is
20
+ your complete prompt; read it and follow it exactly.
21
+
22
+ ### Either way
23
+
24
+ - Write only inside that change folder.
25
+ - Run `osq lint <slug>` and fix every finding before you finish.
26
+ - Never run `osq approve`; a human owns that gate.
27
+ - Grep for what already exists; verify every version, flag, or API before use.
28
+ - Write files with the file tool, never through a shell echo.
29
+
30
+ ### Tasks
31
+
32
+ - One task per coherent unit. Title is "When X, Y".
33
+ - Every task names its `scope` and `verify` (no TTY, no network). A task that changes a preexisting
34
+ test sets `tests.modify: true` and lists that test in `scope`; every other preexisting test is
35
+ frozen. `osq lint` enforces the configured limits on scope patterns and acceptance lines.
36
+ - `osq init` and `osq new` seed `verify: node -e "process.exit(0)"` as a
37
+ planning sentinel, not trusted coverage. `osq lint` rejects it; replace it
38
+ before approval with a command that verifies the completed change's final tree.
39
+ - Every task's `verify` exercises its slice through the real entry point, wiring included. If closing
40
+ the loop requires a file outside the task's `scope`, the scope is wrong; widen it or merge the task.
41
+ An executor result that says the work is outside its scope is a planning failure.
42
+ - Every task's `verify` must stay re-runnable against the final tree of the
43
+ completed change, because the watcher and archive recertification run it there after
44
+ later tasks land. A command that passes only mid-change is a planning failure.
45
+ - By default the watcher also runs the change-level `verify` after each task, and
46
+ a red result kills that task. Every task must leave it green; tasks that pass
47
+ only together are one task.
48
+ - The watcher runs each task's `verify` once before the first attempt and expects
49
+ it to fail. A task whose `verify` should already pass before any change, such as
50
+ a refactor, declares `verify_starts: green`. A task whose `verify` names a test
51
+ the task creates declares `verify_starts: red`; a new test file may share that
52
+ verify with existing tests. `any` is only for a task that can honestly start
53
+ either way.
54
+ - A file belongs to one task. Before each later task, the watcher re-hashes the
55
+ resolved `scope` of every done task; any change halts the change until a human
56
+ runs `osq retry`. Globs resolve again at every audit, so a broad glob also
57
+ captures files that later tasks create. When a later task must extend a file,
58
+ order that later task after the owner, name the shared file in the proposal,
59
+ and list the expected `osq retry` under `## Human steps`.
60
+ - Task bodies carry acceptance lines and the names of existing code to reuse,
61
+ without signature blocks, numbered implementation steps, or line numbers. Write
62
+ full signatures only for ports.
63
+ - Refer to functions and files by name, never by line number.
64
+
65
+ ### Parent spec
66
+
67
+ - `## Goal`, then the change-level `verify` every proposal declares as the first
68
+ thing written after the goal, then `## Non-goals` and the contract as
69
+ requirements with scenarios.
70
+ - `## Surface` follows `## Non-goals` and lists the user-facing names the change
71
+ adds, changes, or removes: commands, flags, config keys, frontmatter fields,
72
+ document sections, dead reasons, and event types. Write `None` when there are
73
+ none; `osq lint` rejects a proposal without the section.
74
+ - The delta is the exact text the capability spec will contain after the change,
75
+ never an instruction to update something.
76
+ - Anything a task must not do itself goes under `## Human steps`.
77
+ <!-- OSQ:END -->
@@ -0,0 +1,24 @@
1
+ schema: osq
2
+
3
+ context: |
4
+ This project follows the osq profile of OpenSpec. Living capability specs
5
+ live under openspec/specs/<capability>/spec.md. In-flight changes live under
6
+ openspec/changes/<id>-<slug>/ with a proposal.md, delta specs, and tasks.md.
7
+ Runtime state is derived exclusively from .run/ markers, never from tasks.md.
8
+
9
+ Execution and archive authority belong strictly to osq: tasks are executed
10
+ only by osq watch after human approval, archiving is owned exclusively by osq
11
+ and never openspec archive, and checkboxes in tasks.md are write-only runner
12
+ projections that prevent bypassing the approval hash.
13
+
14
+ rules:
15
+ proposal:
16
+ - "Follow the proposal template's sections in order: Goal, Verify, Non-goals, Surface, Contract, Human steps, Delta."
17
+ - Declare the change-level verify command in frontmatter; the human gate reads the proposal before approving.
18
+ specs:
19
+ - Write one delta spec per capability at specs/<capability>/spec.md.
20
+ - Use exactly four hashtags for #### Scenario: blocks with WHEN/THEN bullets.
21
+ tasks:
22
+ - Break work into small tasks/<n>.md execution units that each state a verify command.
23
+ - Keep tasks.md checkboxes as a write-only projection of runtime state.
24
+ - Execute tasks exclusively through osq watch; never edit tasks.md checkboxes and never run openspec archive.
@@ -0,0 +1,30 @@
1
+ # osq OpenSpec schema
2
+
3
+ This is a fork of the built-in `spec-driven` schema. It keeps the same artifact
4
+ graph shape but drops the optional `design` artifact:
5
+
6
+ ```
7
+ proposal -> specs -> tasks
8
+ ```
9
+
10
+ The `apply` phase waits for `tasks` and tracks `tasks.md`.
11
+
12
+ ## tasks/<n>.md is an osq-specific execution unit
13
+
14
+ `tasks/<n>.md` sits outside the schema artifact graph. OpenSpec only knows about
15
+ the `proposal.md`, `specs/**/*.md`, and `tasks.md` artifacts declared in
16
+ `schema.yaml`; `tasks/<n>.md` is an osq-specific execution unit, not an OpenSpec
17
+ artifact. Each `tasks/<n>.md` is the single unit of work handed to a coding
18
+ agent: it carries the task title, a `verify` command, `scope`, `entry`,
19
+ `skills`, and an acceptance checklist. Runtime completion is derived from
20
+ `.run/` markers and the watcher's independent verify run, while `tasks.md` is
21
+ only a write-only checkbox projection.
22
+
23
+ ## Execution and archive authority
24
+
25
+ Agents that load the generated OpenSpec skills must not execute tasks on their
26
+ own. Task execution belongs exclusively to `osq watch`, which runs only after
27
+ human approval. `tasks.md` checkboxes are a write-only projection written by
28
+ the osq runner from its independent verification run; agents must never edit
29
+ them. Archiving is owned exclusively by `osq` and is never performed with
30
+ `openspec archive`.
@@ -0,0 +1,133 @@
1
+ name: osq
2
+ version: 1
3
+ description: osq profile - proposal → specs → tasks (design dropped; tasks/<n>.md is the execution unit)
4
+ artifacts:
5
+ - id: proposal
6
+ generates: proposal.md
7
+ description: Initial proposal document outlining the change
8
+ template: proposal.md
9
+ instruction: |
10
+ Create the proposal a human reads before approving the change. Follow the
11
+ template's frontmatter and sections exactly.
12
+
13
+ Frontmatter:
14
+ - `verify`: the change-level command that verifies the completed change's
15
+ final tree. `osq lint` rejects the seeded planning sentinel.
16
+ - `features.reads`: the living capabilities the change reads.
17
+
18
+ Sections, in this order:
19
+ - **Goal**: the problem this change solves and why now.
20
+ - **Verify**: the change-level `verify` command again, and what it proves.
21
+ - **Non-goals**: what the change deliberately does not do.
22
+ - **Surface**: the user-facing names the change adds, changes, or removes:
23
+ commands, flags, config keys, frontmatter fields, document sections,
24
+ dead reasons, and event types. Write `None` when there are none.
25
+ - **Contract**: requirements, each with `#### Scenario:` blocks using
26
+ WHEN/THEN bullets.
27
+ - **Human steps**: everything a task must not do itself, including running
28
+ `osq approve <id>`.
29
+ - **Delta**: one line per delta spec, and any file two tasks share.
30
+
31
+ Each capability the change adds or modifies needs a delta spec file at
32
+ `specs/<capability-path>/spec.md`. Run `openspec list --specs` to review the
33
+ project's capability inventory before introducing a near-duplicate. Never
34
+ run `osq approve` yourself; a human owns that gate.
35
+ requires: []
36
+
37
+ - id: specs
38
+ generates: "specs/**/*.md"
39
+ description: Detailed delta specifications for the change
40
+ template: spec.md
41
+ instruction: |
42
+ Create delta specification files that define WHAT the system should do.
43
+
44
+ Create one spec file per capability listed in the proposal's Capabilities
45
+ section, at `specs/<capability-path>/spec.md`. New capabilities use the
46
+ exact path from the proposal; modified capabilities use the exact existing
47
+ path from `openspec/specs/<capability-path>/`.
48
+
49
+ Delta operations (use ## headers):
50
+ - **ADDED Requirements**: New capabilities
51
+ - **MODIFIED Requirements**: Changed behavior - MUST include full updated content
52
+ - **REMOVED Requirements**: Deprecated features - MUST include **Reason**
53
+ and **Migration**
54
+ - **RENAMED Requirements**: Name changes only - use FROM:/TO: format
55
+
56
+ Format requirements:
57
+ - Each requirement: `### Requirement: <name>` followed by description
58
+ - Use SHALL/MUST for normative requirements (avoid should/may)
59
+ - Each scenario: `#### Scenario: <name>` with WHEN/THEN format
60
+ - **CRITICAL**: Scenarios MUST use exactly 4 hashtags (`####`).
61
+ - Every requirement MUST have at least one scenario.
62
+
63
+ New capabilities only: the delta spec's first section is `## Purpose` -
64
+ one or two sentences (50+ characters) describing what the capability is
65
+ for. Do NOT add `## Purpose` to a delta for an existing capability.
66
+
67
+ MODIFIED requirements workflow:
68
+ 1. Locate the existing requirement in
69
+ `openspec/specs/<capability-path>/spec.md`
70
+ 2. Copy the ENTIRE requirement block (from `### Requirement:` through all
71
+ scenarios)
72
+ 3. Paste under `## MODIFIED Requirements` and edit to reflect new behavior
73
+ 4. Ensure header text matches exactly (whitespace-insensitive)
74
+ requires:
75
+ - proposal
76
+
77
+ - id: tasks
78
+ generates: tasks.md
79
+ description: Implementation checklist with trackable tasks
80
+ template: tasks.md
81
+ instruction: |
82
+ Create the task list that breaks down the implementation work.
83
+
84
+ **IMPORTANT: Follow the template below exactly.** The apply phase parses
85
+ checkbox format to track progress. A box holding only `x` counts as done,
86
+ upper or lower case and with any spacing. Every other marker reads as
87
+ unfinished. A line with no checkbox is not tracked at all.
88
+
89
+ Guidelines:
90
+ - Group related tasks under ## numbered headings
91
+ - Each task MUST be a checkbox: `- [ ] X.Y Task description`
92
+ - Tasks should be small enough to complete in one session
93
+ - Order tasks by dependency (what must be done first?)
94
+ - Each task MUST state how to verify completion
95
+
96
+ In osq, each checklist entry is backed by a `tasks/<n>.md` execution unit
97
+ that carries its own `verify` command, `scope`, `entry`, `skills`, and
98
+ acceptance checklist. `tasks/<n>.md` is not an OpenSpec artifact; it is the
99
+ osq execution unit, and `tasks.md` remains a write-only projection of
100
+ runtime state.
101
+
102
+ Execution authority:
103
+ - Tasks are executed ONLY by osq watch after human approval. Archiving is
104
+ owned exclusively by osq and NEVER openspec archive. Task checkboxes in
105
+ tasks.md are strictly written by the osq runner as a write-only
106
+ projection of runtime verification, preventing bypass of the approval
107
+ hash. Agents MUST NOT execute tasks directly or edit checkboxes in
108
+ tasks.md.
109
+
110
+ Example:
111
+ ```
112
+ # Tasks
113
+
114
+ ## 1. Setup
115
+
116
+ - [ ] 1.1 Create new module structure and verify expected files are present
117
+ - [ ] 1.2 Add dependencies to package.json and verify package installation succeeds
118
+
119
+ ## 2. Core Implementation
120
+
121
+ - [ ] 2.1 Implement data export function and verify the export test passes
122
+ ```
123
+ requires:
124
+ - specs
125
+
126
+ apply:
127
+ requires: [tasks]
128
+ tracks: tasks.md
129
+ instruction: |
130
+ Tasks in osq are executed strictly by running `osq watch`. Do not execute
131
+ tasks directly, do not edit tasks.md checkboxes, and never run
132
+ `openspec archive` or `openspec apply`. Task checkboxes are updated
133
+ automatically by the runner upon passing independent verification.
@@ -0,0 +1,66 @@
1
+ ---
2
+ title: Change title
3
+ depends_on: []
4
+ verify: node -e "process.exit(0)"
5
+ features:
6
+ reads: []
7
+ ---
8
+ ## Goal
9
+
10
+ What problem this change solves and why.
11
+
12
+ ## Verify
13
+
14
+ `node -e "process.exit(0)"`
15
+
16
+ Replace this planning sentinel, here and in the frontmatter, with the command
17
+ that verifies the completed change's final tree, and say what it proves.
18
+
19
+ ## Non-goals
20
+
21
+ - What this change deliberately does not do.
22
+
23
+ ## Surface
24
+
25
+ <!-- User-facing names this change adds, changes, or removes: commands, flags,
26
+ config keys, frontmatter fields, document sections, dead reasons, and event
27
+ types. Replace None with one line per name, such as
28
+ "- Added: `osq init --refresh-schema` (flag)". -->
29
+ None
30
+
31
+ ## Contract
32
+
33
+ ### Requirement: <requirement name>
34
+
35
+ The system SHALL <observable behavior>.
36
+
37
+ #### Scenario: <scenario name>
38
+ - **WHEN** <condition>
39
+ - **THEN** <outcome>
40
+
41
+ ## Human steps
42
+
43
+ - Review the proposal, delta specs, and task bodies, then run `osq approve <id>`
44
+ yourself.
45
+
46
+ ## Delta
47
+
48
+ Delta specs live beside the proposal as `specs/<capability>/spec.md`. Each holds
49
+ the exact text the capability spec will contain after the change, under
50
+ `## ADDED Requirements`, `## MODIFIED Requirements`, `## REMOVED Requirements`,
51
+ or `## RENAMED Requirements`; a modified requirement repeats its full text. List
52
+ each delta here in one line and name any file two tasks share.
53
+
54
+ A delta that introduces a new capability also declares the files it owns in a
55
+ `### Requirement: Code ownership` block. Its `<!-- source: ... -->` comment lists
56
+ the owned path globs, comma-separated, and its scenario restates them:
57
+
58
+ ```markdown
59
+ ### Requirement: Code ownership
60
+ <!-- source: src/core/example.ts, src/cli/example.ts -->
61
+ The <capability> capability SHALL own <subsystems>.
62
+
63
+ #### Scenario: Codebase ownership boundaries
64
+ - **WHEN** file ownership is resolved for <capability>
65
+ - **THEN** system maps `src/core/example.ts` and `src/cli/example.ts` to <capability>
66
+ ```
@@ -0,0 +1,13 @@
1
+ # Spec Delta
2
+
3
+ ## Purpose
4
+ <!-- New capabilities only: one or two sentences (50+ characters) on what this capability is for. Delete this section for an existing capability. -->
5
+
6
+ ## ADDED Requirements
7
+
8
+ ### Requirement: <!-- requirement name -->
9
+ <!-- requirement text -->
10
+
11
+ #### Scenario: <!-- scenario name -->
12
+ - **WHEN** <!-- condition -->
13
+ - **THEN** <!-- expected outcome -->
@@ -0,0 +1,11 @@
1
+ # Tasks
2
+
3
+ ## 1. <!-- Task Group Name -->
4
+
5
+ - [ ] 1.1 <!-- Task description -->
6
+ - [ ] 1.2 <!-- Task description -->
7
+
8
+ ## 2. <!-- Task Group Name -->
9
+
10
+ - [ ] 2.1 <!-- Task description -->
11
+ - [ ] 2.2 <!-- Task description -->
@@ -0,0 +1,66 @@
1
+ ---
2
+ title: Change title
3
+ depends_on: []
4
+ verify: node -e "process.exit(0)"
5
+ features:
6
+ reads: []
7
+ ---
8
+ ## Goal
9
+
10
+ What problem this change solves and why.
11
+
12
+ ## Verify
13
+
14
+ `node -e "process.exit(0)"`
15
+
16
+ Replace this planning sentinel, here and in the frontmatter, with the command
17
+ that verifies the completed change's final tree, and say what it proves.
18
+
19
+ ## Non-goals
20
+
21
+ - What this change deliberately does not do.
22
+
23
+ ## Surface
24
+
25
+ <!-- User-facing names this change adds, changes, or removes: commands, flags,
26
+ config keys, frontmatter fields, document sections, dead reasons, and event
27
+ types. Replace None with one line per name, such as
28
+ "- Added: `osq init --refresh-schema` (flag)". -->
29
+ None
30
+
31
+ ## Contract
32
+
33
+ ### Requirement: <requirement name>
34
+
35
+ The system SHALL <observable behavior>.
36
+
37
+ #### Scenario: <scenario name>
38
+ - **WHEN** <condition>
39
+ - **THEN** <outcome>
40
+
41
+ ## Human steps
42
+
43
+ - Review the proposal, delta specs, and task bodies, then run `osq approve <id>`
44
+ yourself.
45
+
46
+ ## Delta
47
+
48
+ Delta specs live beside the proposal as `specs/<capability>/spec.md`. Each holds
49
+ the exact text the capability spec will contain after the change, under
50
+ `## ADDED Requirements`, `## MODIFIED Requirements`, `## REMOVED Requirements`,
51
+ or `## RENAMED Requirements`; a modified requirement repeats its full text. List
52
+ each delta here in one line and name any file two tasks share.
53
+
54
+ A delta that introduces a new capability also declares the files it owns in a
55
+ `### Requirement: Code ownership` block. Its `<!-- source: ... -->` comment lists
56
+ the owned path globs, comma-separated, and its scenario restates them:
57
+
58
+ ```markdown
59
+ ### Requirement: Code ownership
60
+ <!-- source: src/core/example.ts, src/cli/example.ts -->
61
+ The <capability> capability SHALL own <subsystems>.
62
+
63
+ #### Scenario: Codebase ownership boundaries
64
+ - **WHEN** file ownership is resolved for <capability>
65
+ - **THEN** system maps `src/core/example.ts` and `src/cli/example.ts` to <capability>
66
+ ```
@@ -0,0 +1,5 @@
1
+ # Tasks
2
+
3
+ ## 1. Section title
4
+
5
+ - [ ] 1. When initial condition, expected outcome