@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 @@
1
+ {"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../../src/core/foundation/doctor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAkB,UAAU,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAqBnD,SAAS,IAAI,CAAC,IAAY,EAAE,EAAW,EAAE,OAAe;IACtD,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC;AAC/B,CAAC;AAED,MAAM,MAAM,GAAG,CAAC,MAAc,EAAoB,EAAE,CAClD,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAClB,GAAG,EAAE,CAAC,IAAI,EACV,GAAG,EAAE,CAAC,KAAK,CACZ,CAAC;AAEJ,SAAS,WAAW,CAAC,MAAiB;IACpC,OAAO,CACL,OAAO,MAAM,CAAC,OAAO,KAAK,QAAQ;QAClC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE;QAC5B,CAAC,CAAC,MAAM,CAAC,MAAM;QACf,CAAC,CAAC,MAAM,CAAC,KAAK;QACd,OA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AAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAChG,MAAM,MAAM,GAAwB;QAClC,WAAW;QACX,OAAO,CAAC,KAAK;QACb,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;YAC3B,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE,SAAS,CAAC,OAAO,CAAC;YACxD,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAChD,CAAC,CAAC;QACH,MAAM,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC;QACvC,MAAM,UAAU,CAAC,WAAW,EAAE,MAAM,CAAC;QACrC,MAAM,aAAa,CAAC,WAAW,EAAE,MAAM,CAAC;QACxC,MAAM,gBAAgB,CAAC,WAAW,EAAE,MAAM,CAAC;QAC3C,MAAM,cAAc,CAAC,WAAW,EAAE,IAAI,CAAC;KACxC,CAAC;IACF,OAAO,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;AAC3D,CAAC"}
@@ -0,0 +1,96 @@
1
+ import type { HarnessDiagnoseContext, HarnessDiagnosis } from './config-pi.js';
2
+ import type { OsqConfig } from './config.js';
3
+ /**
4
+ * Canonical, immutable catalog of first-party harness capabilities. Every
5
+ * shared consumer derives its harness knowledge from here, so adding a harness
6
+ * never means editing a generic workflow branch.
7
+ */
8
+ export declare const HARNESS_NAMES: readonly ["agy", "opencode", "mock", "codex", "pi"];
9
+ export type HarnessName = (typeof HARNESS_NAMES)[number];
10
+ /** Where in {@link OsqConfig} a harness keeps its harness-specific settings. */
11
+ export type HarnessConfigKey = 'agy' | 'opencode' | 'codex' | 'pi';
12
+ export interface PlannerCapability {
13
+ /** Whether `planner.agent` is a meaningful setting for this harness. */
14
+ readonly agent: boolean;
15
+ /** Agent selected for planning when none is configured, if any. */
16
+ readonly defaultAgent?: string;
17
+ /** Brief attribution for a native (unspecified) planner model. */
18
+ readonly briefModelWhenNative: string;
19
+ }
20
+ export interface HarnessCatalogEntry {
21
+ readonly name: HarnessName;
22
+ /** `OsqConfig` section holding harness-specific settings, if any. */
23
+ readonly configKey?: HarnessConfigKey;
24
+ /** `OSQ_MODEL` applies even when this harness is not the selected executor. */
25
+ readonly envModelWhenUnselected: boolean;
26
+ /** Resolve the external executable, or `null` when none is required. */
27
+ readonly executable: (config: OsqConfig) => string | null;
28
+ /** Effective configured model, or `undefined` to defer to native defaults. */
29
+ readonly model: (config: OsqConfig) => string | undefined;
30
+ /** Applicable reasoning effort, or `null` when the harness has no such knob. */
31
+ readonly effort: (config: OsqConfig) => string | null;
32
+ readonly planner: PlannerCapability;
33
+ /** Optional extra doctor checks run after a passing `harness` probe. */
34
+ readonly diagnose?: (context: HarnessDiagnoseContext) => Promise<readonly HarnessDiagnosis[]>;
35
+ }
36
+ /** Normalize arbitrary casing and surrounding whitespace to a lower-case name. */
37
+ export declare function normalizeHarnessName(name: string): string;
38
+ /** The frozen catalog, ordered by {@link HARNESS_NAMES}. */
39
+ export declare const HARNESS_CATALOG: readonly HarnessCatalogEntry[];
40
+ /** Ordered available harness names. */
41
+ export declare function availableHarnessNames(): readonly HarnessName[];
42
+ /** Case-insensitive catalog lookup, or `undefined` when unregistered. */
43
+ export declare function findHarness(name: string): HarnessCatalogEntry | undefined;
44
+ /** Case-insensitive catalog lookup that reports catalog names when unknown. */
45
+ export declare function lookupHarness(name: string): HarnessCatalogEntry;
46
+ /** Resolve a registered harness's external executable, or `null` for none. */
47
+ export declare function resolveHarnessExecutable(name: string, config: OsqConfig): string | null;
48
+ /** Selected executor identity: harness, effective model or `default`, effort or null. */
49
+ export interface ExecutorIdentity {
50
+ readonly harness: HarnessName;
51
+ readonly model: string;
52
+ readonly effort: string | null;
53
+ }
54
+ /**
55
+ * Identity of the executor selected by configuration. Never borrows a model or
56
+ * effort from a harness that is not the selected one.
57
+ */
58
+ export declare function resolveExecutorIdentity(config: OsqConfig): ExecutorIdentity;
59
+ /** Planner harness, model, brief attribution, and optional agent actually used. */
60
+ export interface PlannerSelection {
61
+ harness: HarnessName;
62
+ model?: string;
63
+ briefModel: string;
64
+ agent?: string;
65
+ }
66
+ /**
67
+ * Resolve the planner independently of the executor. An explicit `planner`
68
+ * block always wins and never inherits executor model, effort, or agent; with
69
+ * no planner block the selected executor's catalog entry supplies planning
70
+ * capabilities, including its supported default agent.
71
+ */
72
+ export declare function resolvePlannerSelection(config: OsqConfig): PlannerSelection;
73
+ /**
74
+ * Selected model for a harness, never borrowing another harness's model. A
75
+ * native selection is represented as `default` rather than a guessed model.
76
+ */
77
+ export declare function resolveHarnessModel(harness: string, config: OsqConfig): string;
78
+ /** Configured effort for a harness, or null when the knob does not apply. */
79
+ export declare function resolveHarnessEffort(harness: string, config: OsqConfig): string | null;
80
+ /** Selected model for the adapter that is actually running. */
81
+ export declare function resolveAdapterModel(_adapterName: string, config: OsqConfig): string;
82
+ /** Resolve the Codex executable: explicit config, then `CODEX_PATH`, then `codex`. */
83
+ export declare function resolveCodexBinary(config?: Pick<OsqConfig, 'codex'>): string;
84
+ /**
85
+ * Resolve the Codex execution model: explicit `codex.model`, then `OSQ_MODEL`
86
+ * only when Codex is the executor, otherwise `undefined` (native default).
87
+ */
88
+ export declare function resolveCodexModel(config?: Pick<OsqConfig, 'harness' | 'codex'>): string | undefined;
89
+ /** Resolve the Codex reasoning effort override, or `undefined` for native defaults. */
90
+ export declare function resolveCodexEffort(config?: Pick<OsqConfig, 'codex'>): string | undefined;
91
+ /**
92
+ * Resolve the Pi execution model: explicit `pi.model`, then `OSQ_MODEL` only
93
+ * when Pi is the executor, otherwise `undefined` (Pi's native default).
94
+ */
95
+ export declare function resolvePiModel(config?: Pick<OsqConfig, 'harness' | 'pi'>): string | undefined;
96
+ //# sourceMappingURL=harness-catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"harness-catalog.d.ts","sourceRoot":"","sources":["../../../src/core/foundation/harness-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAE/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,aAAa,qDAAsD,CAAC;AAEjF,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,gFAAgF;AAChF,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,UAAU,GAAG,OAAO,GAAG,IAAI,CAAC;AAEnE,MAAM,WAAW,iBAAiB;IAChC,wEAAwE;IACxE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,mEAAmE;IACnE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,kEAAkE;IAClE,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;CACvC;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,qEAAqE;IACrE,QAAQ,CAAC,SAAS,CAAC,EAAE,gBAAgB,CAAC;IACtC,+EAA+E;IAC/E,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC;IACzC,wEAAwE;IACxE,QAAQ,CAAC,UAAU,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,MAAM,GAAG,IAAI,CAAC;IAC1D,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,MAAM,GAAG,SAAS,CAAC;IAC1D,gFAAgF;IAChF,QAAQ,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,MAAM,GAAG,IAAI,CAAC;IACtD,QAAQ,CAA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gB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,MAAM,CAE9E;AAED,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAEtF;AAED,+DAA+D;AAC/D,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,MAAM,CAEnF;AAED,sFAAsF;AACtF,wBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,MAAM,CAE5E;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,GAC5C,MAAM,GAAG,SAAS,CAEpB;AAED,uFAAuF;AACvF,wBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,CAExF;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC,GAAG,MAAM,GAAG,SAAS,CAQ7F"}
@@ -0,0 +1,182 @@
1
+ import { diagnosePi, resolvePiBinary, resolvePiEffort } from './config-pi.js';
2
+ /**
3
+ * Canonical, immutable catalog of first-party harness capabilities. Every
4
+ * shared consumer derives its harness knowledge from here, so adding a harness
5
+ * never means editing a generic workflow branch.
6
+ */
7
+ export const HARNESS_NAMES = ['agy', 'opencode', 'mock', 'codex', 'pi'];
8
+ const DEFINITIONS = {
9
+ agy: {
10
+ configKey: 'agy',
11
+ // Agent is the historical default harness, so OSQ_MODEL feeds its section
12
+ // regardless of the selected executor.
13
+ envModelWhenUnselected: true,
14
+ executable: () => process.env.AGY_PATH || 'agy',
15
+ model: (config) => config.agy?.model?.trim() || undefined,
16
+ effort: () => null,
17
+ planner: { agent: true, briefModelWhenNative: '' },
18
+ },
19
+ opencode: {
20
+ configKey: 'opencode',
21
+ envModelWhenUnselected: false,
22
+ executable: (config) => process.env.OPENCODE_PATH || config.opencode?.bin || 'opencode',
23
+ model: (config) => config.opencode?.model?.trim() || undefined,
24
+ effort: () => null,
25
+ planner: { agent: true, defaultAgent: 'osq-planner', briefModelWhenNative: '' },
26
+ },
27
+ mock: {
28
+ envModelWhenUnselected: false,
29
+ executable: () => null,
30
+ model: () => undefined,
31
+ effort: () => null,
32
+ planner: { agent: true, briefModelWhenNative: '' },
33
+ },
34
+ codex: {
35
+ configKey: 'codex',
36
+ envModelWhenUnselected: false,
37
+ executable: (config) => {
38
+ const explicit = config.codex?.bin?.trim();
39
+ if (explicit)
40
+ return explicit;
41
+ const fromEnv = process.env.CODEX_PATH?.trim();
42
+ if (fromEnv)
43
+ return fromEnv;
44
+ return 'codex';
45
+ },
46
+ model: (config) => {
47
+ const explicit = config.codex?.model?.trim();
48
+ if (explicit)
49
+ return explicit;
50
+ if (normalizeHarnessName(config.harness) === 'codex') {
51
+ const fromEnv = process.env.OSQ_MODEL?.trim();
52
+ if (fromEnv)
53
+ return fromEnv;
54
+ }
55
+ return undefined;
56
+ },
57
+ effort: (config) => config.codex?.effort?.trim() || null,
58
+ planner: { agent: false, briefModelWhenNative: 'default' },
59
+ },
60
+ pi: {
61
+ configKey: 'pi',
62
+ envModelWhenUnselected: false,
63
+ executable: resolvePiBinary,
64
+ model: resolvePiModel,
65
+ effort: resolvePiEffort,
66
+ planner: { agent: false, briefModelWhenNative: 'default' },
67
+ diagnose: diagnosePi,
68
+ },
69
+ };
70
+ /** Normalize arbitrary casing and surrounding whitespace to a lower-case name. */
71
+ export function normalizeHarnessName(name) {
72
+ return typeof name === 'string' ? name.trim().toLowerCase() : '';
73
+ }
74
+ /** The frozen catalog, ordered by {@link HARNESS_NAMES}. */
75
+ export const HARNESS_CATALOG = Object.freeze(HARNESS_NAMES.map((name) => Object.freeze({ name, ...DEFINITIONS[name] })));
76
+ /** Ordered available harness names. */
77
+ export function availableHarnessNames() {
78
+ return HARNESS_NAMES;
79
+ }
80
+ /** Case-insensitive catalog lookup, or `undefined` when unregistered. */
81
+ export function findHarness(name) {
82
+ const normalized = normalizeHarnessName(name);
83
+ return HARNESS_CATALOG.find((entry) => entry.name === normalized);
84
+ }
85
+ /** Case-insensitive catalog lookup that reports catalog names when unknown. */
86
+ export function lookupHarness(name) {
87
+ const entry = findHarness(name);
88
+ if (!entry) {
89
+ throw new Error(`Unknown harness: "${name}". Available harnesses: ${HARNESS_NAMES.join(', ')}`);
90
+ }
91
+ return entry;
92
+ }
93
+ /** Resolve a registered harness's external executable, or `null` for none. */
94
+ export function resolveHarnessExecutable(name, config) {
95
+ return lookupHarness(name).executable(config);
96
+ }
97
+ /**
98
+ * Identity of the executor selected by configuration. Never borrows a model or
99
+ * effort from a harness that is not the selected one.
100
+ */
101
+ export function resolveExecutorIdentity(config) {
102
+ const entry = lookupHarness(config.harness);
103
+ return {
104
+ harness: entry.name,
105
+ model: entry.model(config) ?? 'default',
106
+ effort: entry.effort(config),
107
+ };
108
+ }
109
+ /**
110
+ * Resolve the planner independently of the executor. An explicit `planner`
111
+ * block always wins and never inherits executor model, effort, or agent; with
112
+ * no planner block the selected executor's catalog entry supplies planning
113
+ * capabilities, including its supported default agent.
114
+ */
115
+ export function resolvePlannerSelection(config) {
116
+ const explicit = config.planner;
117
+ if (explicit) {
118
+ const entry = lookupHarness(explicit.harness);
119
+ const agent = explicit.agent ?? entry.planner.defaultAgent;
120
+ return {
121
+ harness: entry.name,
122
+ model: explicit.model,
123
+ briefModel: explicit.model,
124
+ ...(agent && entry.planner.agent ? { agent } : {}),
125
+ };
126
+ }
127
+ const entry = lookupHarness(config.harness);
128
+ const model = entry.model(config);
129
+ const agent = entry.planner.defaultAgent;
130
+ return {
131
+ harness: entry.name,
132
+ ...(model ? { model } : {}),
133
+ briefModel: model ?? entry.planner.briefModelWhenNative,
134
+ ...(agent && entry.planner.agent ? { agent } : {}),
135
+ };
136
+ }
137
+ /**
138
+ * Selected model for a harness, never borrowing another harness's model. A
139
+ * native selection is represented as `default` rather than a guessed model.
140
+ */
141
+ export function resolveHarnessModel(harness, config) {
142
+ return lookupHarness(harness).model(config) ?? 'default';
143
+ }
144
+ /** Configured effort for a harness, or null when the knob does not apply. */
145
+ export function resolveHarnessEffort(harness, config) {
146
+ return lookupHarness(harness).effort(config);
147
+ }
148
+ /** Selected model for the adapter that is actually running. */
149
+ export function resolveAdapterModel(_adapterName, config) {
150
+ return resolveExecutorIdentity(config).model;
151
+ }
152
+ /** Resolve the Codex executable: explicit config, then `CODEX_PATH`, then `codex`. */
153
+ export function resolveCodexBinary(config) {
154
+ return lookupHarness('codex').executable((config ?? {})) ?? 'codex';
155
+ }
156
+ /**
157
+ * Resolve the Codex execution model: explicit `codex.model`, then `OSQ_MODEL`
158
+ * only when Codex is the executor, otherwise `undefined` (native default).
159
+ */
160
+ export function resolveCodexModel(config) {
161
+ return lookupHarness('codex').model((config ?? {}));
162
+ }
163
+ /** Resolve the Codex reasoning effort override, or `undefined` for native defaults. */
164
+ export function resolveCodexEffort(config) {
165
+ return lookupHarness('codex').effort((config ?? {})) ?? undefined;
166
+ }
167
+ /**
168
+ * Resolve the Pi execution model: explicit `pi.model`, then `OSQ_MODEL` only
169
+ * when Pi is the executor, otherwise `undefined` (Pi's native default).
170
+ */
171
+ export function resolvePiModel(config) {
172
+ const explicit = config?.pi?.model?.trim();
173
+ if (explicit)
174
+ return explicit;
175
+ if (normalizeHarnessName(config?.harness ?? '') === 'pi') {
176
+ const fromEnv = process.env.OSQ_MODEL?.trim();
177
+ if (fromEnv)
178
+ return fromEnv;
179
+ }
180
+ return undefined;
181
+ }
182
+ //# sourceMappingURL=harness-catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"harness-catalog.js","sourceRoot":"","sources":["../../../src/core/foundation/harness-catalog.ts"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F,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,MAA0C;IACvE,MAAM,QAAQ,GAAG,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAC;IAC9B,IAAI,oBAAoB,CAAC,MAAM,EAAE,OAAO,IAAI,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC;QACzD,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9C,IAAI,OAAO;YAAE,OAAO,OAAO,CAAC;IAC9B,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,33 @@
1
+ export declare const OSQ_START_MARKER = "<!-- OSQ:START -->";
2
+ export declare const OSQ_END_MARKER = "<!-- OSQ:END -->";
3
+ /**
4
+ * The seven step lines of the managed `## Executing a task` section, in order.
5
+ * Task 2's shared executor prompt interpolates these verbatim.
6
+ */
7
+ export declare const EXECUTOR_STEPS: readonly string[];
8
+ /** The result-file headings and their purposes, in the order they must appear. */
9
+ export declare const RESULT_HEADINGS: ReadonlyArray<{
10
+ heading: string;
11
+ purpose: string;
12
+ }>;
13
+ /** The label prefix of the final line listing every changed file except the result file. */
14
+ export declare const RESULT_TOUCHED_PREFIX = "Touched:";
15
+ /**
16
+ * The body lines of the managed `## Exiting` section, including empty separator
17
+ * lines. Rendered from {@link RESULT_HEADINGS} and {@link RESULT_TOUCHED_PREFIX}
18
+ * so the prompt and the managed block name the same headings.
19
+ */
20
+ export declare const EXECUTOR_EXIT_LINES: readonly string[];
21
+ export declare const MANAGED_AGENTS_MD_BODY: string;
22
+ /** @deprecated use {@link MANAGED_AGENTS_MD_BODY}; alias kept for existing importers. */
23
+ export declare const MANAGED_AGENTS_BLOCK: string;
24
+ export declare const MANAGED_PLANNER_BLOCK = "<!-- OSQ:START -->\n## Planning a change\n\nYou write the change folder; a cheaper executor runs it one task at a time,\nsees only what you wrote, and reads it literally.\n\n### Interactive planning\n\nWhen a human is in the session:\n\n1. Read `AGENTS.md`, the capability specs this change touches, and one recent\n archived change end to end.\n2. Reply with the parent spec, the task list (titles only), the capability specs\n this change will write, and any `## Human steps`. Stop there.\n3. Write the change folder only after the human approves the list.\n\n### Working from the handoff\n\nWhen `osq plan` started you, `plan-prompt.md` in the selected change folder is\nyour complete prompt; read it and follow it exactly.\n\n### Either way\n\n- Write only inside that change folder.\n- Run `osq lint <slug>` and fix every finding before you finish.\n- Never run `osq approve`; a human owns that gate.\n- Grep for what already exists; verify every version, flag, or API before use.\n- Write files with the file tool, never through a shell echo.\n\n### Tasks\n\n- One task per coherent unit. Title is \"When X, Y\".\n- Every task names its `scope` and `verify` (no TTY, no network). A task that changes a preexisting\n test sets `tests.modify: true` and lists that test in `scope`; every other preexisting test is\n frozen. `osq lint` enforces the configured limits on scope patterns and acceptance lines.\n- `osq init` and `osq new` seed `verify: node -e \"process.exit(0)\"` as a\n planning sentinel, not trusted coverage. `osq lint` rejects it; replace it\n before approval with a command that verifies the completed change's final tree.\n- Every task's `verify` exercises its slice through the real entry point, wiring included. If closing\n the loop requires a file outside the task's `scope`, the scope is wrong; widen it or merge the task.\n An executor result that says the work is outside its scope is a planning failure.\n- Every task's `verify` must stay re-runnable against the final tree of the\n completed change, because the watcher and archive recertification run it there after\n later tasks land. A command that passes only mid-change is a planning failure.\n- By default the watcher also runs the change-level `verify` after each task, and\n a red result kills that task. Every task must leave it green; tasks that pass\n only together are one task.\n- The watcher runs each task's `verify` once before the first attempt and expects\n it to fail. A task whose `verify` should already pass before any change, such as\n a refactor, declares `verify_starts: green`. A task whose `verify` names a test\n the task creates declares `verify_starts: red`; a new test file may share that\n verify with existing tests. `any` is only for a task that can honestly start\n either way.\n- A file belongs to one task. Before each later task, the watcher re-hashes the\n resolved `scope` of every done task; any change halts the change until a human\n runs `osq retry`. Globs resolve again at every audit, so a broad glob also\n captures files that later tasks create. When a later task must extend a file,\n order that later task after the owner, name the shared file in the proposal,\n and list the expected `osq retry` under `## Human steps`.\n- Task bodies carry acceptance lines and the names of existing code to reuse,\n without signature blocks, numbered implementation steps, or line numbers. Write\n full signatures only for ports.\n- Refer to functions and files by name, never by line number.\n\n### Parent spec\n\n- `## Goal`, then the change-level `verify` every proposal declares as the first\n thing written after the goal, then `## Non-goals` and the contract as\n requirements with scenarios.\n- `## Surface` follows `## Non-goals` and lists the user-facing names the change\n adds, changes, or removes: commands, flags, config keys, frontmatter fields,\n document sections, dead reasons, and event types. Write `None` when there are\n none; `osq lint` rejects a proposal without the section.\n- The delta is the exact text the capability spec will contain after the change,\n never an instruction to update something.\n- Anything a task must not do itself goes under `## Human steps`.\n<!-- OSQ:END -->";
25
+ /**
26
+ * Canonical `.claude/commands/osq-plan.md` body. Claude expands `$ARGUMENTS`
27
+ * with the slug the author passes, so the command resolves the change folder
28
+ * instead of embedding a repository-specific path.
29
+ */
30
+ export declare const MANAGED_CLAUDE_PLAN_COMMAND = "<!-- OSQ:START -->\n# Plan change $ARGUMENTS\n\nFind the change folder under `openspec/changes/` for `$ARGUMENTS`, then read\nits `plan-prompt.md` and follow it exactly.\n\n- Write only inside that change folder.\n- Run `osq lint $ARGUMENTS` and fix every finding before you finish.\n- Never run `osq approve`; a human owns that gate.\n<!-- OSQ:END -->";
31
+ /** Relative path of the managed Claude command within a project root. */
32
+ export declare const CLAUDE_PLAN_COMMAND_PATH: string;
33
+ //# sourceMappingURL=init-blocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-blocks.d.ts","sourceRoot":"","sources":["../../../src/core/foundation/init-blocks.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AACrD,eAAO,MAAM,cAAc,qBAAqB,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAQ3C,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,eAAe,EAAE,aAAa,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAQ/E,CAAC;AAEF,4FAA4F;AAC5F,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAQhD,CAAC;AAEF,eAAO,MAAM,sBAAsB,QAyBjB,CAAC;AAEnB,yFAAyF;AACzF,eAAO,MAAM,oBAAoB,QAAyB,CAAC;AAE3D,eAAO,MAAM,qBAAqB,uqIA4EhB,CAAC;AAEnB;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,qWAStB,CAAC;AAEnB,yEAAyE;AACzE,eAAO,MAAM,wBAAwB,QAAkD,CAAC"}
@@ -0,0 +1,165 @@
1
+ import path from 'node:path';
2
+ export const OSQ_START_MARKER = '<!-- OSQ:START -->';
3
+ export const OSQ_END_MARKER = '<!-- OSQ:END -->';
4
+ /**
5
+ * The seven step lines of the managed `## Executing a task` section, in order.
6
+ * Task 2's shared executor prompt interpolates these verbatim.
7
+ */
8
+ export const EXECUTOR_STEPS = [
9
+ '1. Read your task file, its parent `proposal.md`, then only the delta specs and capability specs it names. Nothing else.',
10
+ '2. Too big for one pass? Write why in `.run/results/<n>.md`, exit without code.',
11
+ "3. Read a previous result file for this task if present. Run the task's `verify`. Start from what fails.",
12
+ '4. Tests for each acceptance line before implementing.',
13
+ "5. Minimal code to pass. Write only `.run/results/<n>.md` and files inside the task's `scope`; the task's `scope` wins over any other ownership rule you were given.",
14
+ '6. New test files are always allowed. Change a preexisting test only when the task sets `tests.modify: true` and the file is inside `scope`; any other test change kills the task.',
15
+ "7. Run the task's `verify` command before exiting. Then run the proposal's `verify`; the watcher runs both itself and kills the task if either fails.",
16
+ ];
17
+ /** The result-file headings and their purposes, in the order they must appear. */
18
+ export const RESULT_HEADINGS = [
19
+ { heading: '## Changed', purpose: 'what you changed.' },
20
+ { heading: '## Deviated', purpose: 'where you departed from the task, and why.' },
21
+ {
22
+ heading: '## Missing context',
23
+ purpose: 'what you needed that the task files did not give you.',
24
+ },
25
+ { heading: '## Next', purpose: 'for unfinished work, the acceptance line to pick up next.' },
26
+ ];
27
+ /** The label prefix of the final line listing every changed file except the result file. */
28
+ export const RESULT_TOUCHED_PREFIX = 'Touched:';
29
+ /**
30
+ * The body lines of the managed `## Exiting` section, including empty separator
31
+ * lines. Rendered from {@link RESULT_HEADINGS} and {@link RESULT_TOUCHED_PREFIX}
32
+ * so the prompt and the managed block name the same headings.
33
+ */
34
+ export const EXECUTOR_EXIT_LINES = [
35
+ 'Write `.run/results/<n>.md` first, with these headings in this order. Leave out any that would be empty.',
36
+ '',
37
+ ...RESULT_HEADINGS.map(({ heading, purpose }) => `- \`${heading}\`: ${purpose}`),
38
+ '',
39
+ `End the file with one line, \`${RESULT_TOUCHED_PREFIX} <path>, <path>\`, listing every file you changed other than the result file, relative to the project root.`,
40
+ '',
41
+ 'Then exit. One attempt. Do not ask questions.',
42
+ ];
43
+ export const MANAGED_AGENTS_MD_BODY = `${OSQ_START_MARKER}
44
+ ## Executing a task
45
+
46
+ You were handed one task, \`tasks/<n>.md\`, from a change under \`openspec/changes/\`.
47
+
48
+ ${EXECUTOR_STEPS.join('\n')}
49
+
50
+ ## Exiting
51
+
52
+ ${EXECUTOR_EXIT_LINES.join('\n')}
53
+
54
+ ## Where things live
55
+
56
+ - Living capability specs live under \`openspec/specs/\` as \`<capability>/spec.md\`. Never edit them; the watcher applies approved deltas at archive.
57
+ - In-flight changes live under \`openspec/changes/<id>-<slug>/\`: \`proposal.md\`, delta specs as \`specs/<capability>/spec.md\`, and one \`tasks/<n>.md\` per task.
58
+ - \`tasks.md\` and every file under \`.run/\` except your result file belong to the watcher and the human. Never edit them.
59
+ - Approval gate: only \`osq approve\`, run by a human, writes \`.run/approved\`. Verification gate: only the watcher's own \`verify\` run marks a task done.
60
+
61
+ ## Planning a change
62
+
63
+ Planners follow \`PLANNER.md\`. When \`osq plan\` started you, \`plan-prompt.md\` in the selected change folder is your complete prompt; read it and follow it exactly.
64
+
65
+ - Write only inside that change folder.
66
+ - Run \`osq lint <slug>\` and fix every finding before you finish.
67
+ - Never run \`osq approve\`; approval belongs to a human.
68
+ ${OSQ_END_MARKER}`;
69
+ /** @deprecated use {@link MANAGED_AGENTS_MD_BODY}; alias kept for existing importers. */
70
+ export const MANAGED_AGENTS_BLOCK = MANAGED_AGENTS_MD_BODY;
71
+ export const MANAGED_PLANNER_BLOCK = `${OSQ_START_MARKER}
72
+ ## Planning a change
73
+
74
+ You write the change folder; a cheaper executor runs it one task at a time,
75
+ sees only what you wrote, and reads it literally.
76
+
77
+ ### Interactive planning
78
+
79
+ When a human is in the session:
80
+
81
+ 1. Read \`AGENTS.md\`, the capability specs this change touches, and one recent
82
+ archived change end to end.
83
+ 2. Reply with the parent spec, the task list (titles only), the capability specs
84
+ this change will write, and any \`## Human steps\`. Stop there.
85
+ 3. Write the change folder only after the human approves the list.
86
+
87
+ ### Working from the handoff
88
+
89
+ When \`osq plan\` started you, \`plan-prompt.md\` in the selected change folder is
90
+ your complete prompt; read it and follow it exactly.
91
+
92
+ ### Either way
93
+
94
+ - Write only inside that change folder.
95
+ - Run \`osq lint <slug>\` and fix every finding before you finish.
96
+ - Never run \`osq approve\`; a human owns that gate.
97
+ - Grep for what already exists; verify every version, flag, or API before use.
98
+ - Write files with the file tool, never through a shell echo.
99
+
100
+ ### Tasks
101
+
102
+ - One task per coherent unit. Title is "When X, Y".
103
+ - Every task names its \`scope\` and \`verify\` (no TTY, no network). A task that changes a preexisting
104
+ test sets \`tests.modify: true\` and lists that test in \`scope\`; every other preexisting test is
105
+ frozen. \`osq lint\` enforces the configured limits on scope patterns and acceptance lines.
106
+ - \`osq init\` and \`osq new\` seed \`verify: node -e "process.exit(0)"\` as a
107
+ planning sentinel, not trusted coverage. \`osq lint\` rejects it; replace it
108
+ before approval with a command that verifies the completed change's final tree.
109
+ - Every task's \`verify\` exercises its slice through the real entry point, wiring included. If closing
110
+ the loop requires a file outside the task's \`scope\`, the scope is wrong; widen it or merge the task.
111
+ An executor result that says the work is outside its scope is a planning failure.
112
+ - Every task's \`verify\` must stay re-runnable against the final tree of the
113
+ completed change, because the watcher and archive recertification run it there after
114
+ later tasks land. A command that passes only mid-change is a planning failure.
115
+ - By default the watcher also runs the change-level \`verify\` after each task, and
116
+ a red result kills that task. Every task must leave it green; tasks that pass
117
+ only together are one task.
118
+ - The watcher runs each task's \`verify\` once before the first attempt and expects
119
+ it to fail. A task whose \`verify\` should already pass before any change, such as
120
+ a refactor, declares \`verify_starts: green\`. A task whose \`verify\` names a test
121
+ the task creates declares \`verify_starts: red\`; a new test file may share that
122
+ verify with existing tests. \`any\` is only for a task that can honestly start
123
+ either way.
124
+ - A file belongs to one task. Before each later task, the watcher re-hashes the
125
+ resolved \`scope\` of every done task; any change halts the change until a human
126
+ runs \`osq retry\`. Globs resolve again at every audit, so a broad glob also
127
+ captures files that later tasks create. When a later task must extend a file,
128
+ order that later task after the owner, name the shared file in the proposal,
129
+ and list the expected \`osq retry\` under \`## Human steps\`.
130
+ - Task bodies carry acceptance lines and the names of existing code to reuse,
131
+ without signature blocks, numbered implementation steps, or line numbers. Write
132
+ full signatures only for ports.
133
+ - Refer to functions and files by name, never by line number.
134
+
135
+ ### Parent spec
136
+
137
+ - \`## Goal\`, then the change-level \`verify\` every proposal declares as the first
138
+ thing written after the goal, then \`## Non-goals\` and the contract as
139
+ requirements with scenarios.
140
+ - \`## Surface\` follows \`## Non-goals\` and lists the user-facing names the change
141
+ adds, changes, or removes: commands, flags, config keys, frontmatter fields,
142
+ document sections, dead reasons, and event types. Write \`None\` when there are
143
+ none; \`osq lint\` rejects a proposal without the section.
144
+ - The delta is the exact text the capability spec will contain after the change,
145
+ never an instruction to update something.
146
+ - Anything a task must not do itself goes under \`## Human steps\`.
147
+ ${OSQ_END_MARKER}`;
148
+ /**
149
+ * Canonical `.claude/commands/osq-plan.md` body. Claude expands `$ARGUMENTS`
150
+ * with the slug the author passes, so the command resolves the change folder
151
+ * instead of embedding a repository-specific path.
152
+ */
153
+ export const MANAGED_CLAUDE_PLAN_COMMAND = `${OSQ_START_MARKER}
154
+ # Plan change $ARGUMENTS
155
+
156
+ Find the change folder under \`openspec/changes/\` for \`$ARGUMENTS\`, then read
157
+ its \`plan-prompt.md\` and follow it exactly.
158
+
159
+ - Write only inside that change folder.
160
+ - Run \`osq lint $ARGUMENTS\` and fix every finding before you finish.
161
+ - Never run \`osq approve\`; a human owns that gate.
162
+ ${OSQ_END_MARKER}`;
163
+ /** Relative path of the managed Claude command within a project root. */
164
+ export const CLAUDE_PLAN_COMMAND_PATH = path.join('.claude', 'commands', 'osq-plan.md');
165
+ //# sourceMappingURL=init-blocks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-blocks.js","sourceRoot":"","sources":["../../../src/core/foundation/init-blocks.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,CAAC,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AACrD,MAAM,CAAC,MAAM,cAAc,GAAG,kBAAkB,CAAC;AAEjD;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAsB;IAC/C,0HAA0H;IAC1H,iFAAiF;IACjF,0GAA0G;IAC1G,wDAAwD;IACxD,sKAAsK;IACtK,oLAAoL;IACpL,uJAAuJ;CACxJ,CAAC;AAEF,kFAAkF;AAClF,MAAM,CAAC,MAAM,eAAe,GAAwD;IAClF,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,mBAAmB,EAAE;IACvD,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,4CAA4C,EAAE;IACjF;QACE,OAAO,EAAE,oBAAoB;QAC7B,OAAO,EAAE,uDAAuD;KACjE;IACD,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,2DAA2D,EAAE;CAC7F,CAAC;AAEF,4FAA4F;AAC5F,MAAM,CAAC,MAAM,qBAAqB,GAAG,UAAU,CAAC;AAEhD;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAsB;IACpD,0GAA0G;IAC1G,EAAE;IACF,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,OAAO,OAAO,OAAO,EAAE,CAAC;IAChF,EAAE;IACF,iCAAiC,qBAAqB,6GAA6G;IACnK,EAAE;IACF,+CAA+C;CAChD,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,gBAAgB;;;;;EAKvD,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC;;;;EAIzB,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;EAgB9B,cAAc,EAAE,CAAC;AAEnB,yFAAyF;AACzF,MAAM,CAAC,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;AAE3D,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4EtD,cAAc,EAAE,CAAC;AAEnB;;;;GAIG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,gBAAgB;;;;;;;;;EAS5D,cAAc,EAAE,CAAC;AAEnB,yEAAyE;AACzE,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ export type ManagedBlockProblem = 'missing-block' | 'partial' | 'reversed' | 'duplicated' | 'stale';
2
+ /**
3
+ * Compare one document's osq marker pair against the installed canonical block.
4
+ * Returns `null` only when exactly one well-formed, current pair is present.
5
+ */
6
+ export declare function inspectManagedBlock(content: string, canonical: string): ManagedBlockProblem | null;
7
+ export declare function updateAgentsMd(targetDir: string): Promise<boolean>;
8
+ export declare function updatePlannerMd(targetDir: string): Promise<boolean>;
9
+ export declare function updateClaudePlanCommand(targetDir: string): Promise<boolean>;
10
+ //# sourceMappingURL=init-managed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-managed.d.ts","sourceRoot":"","sources":["../../../src/core/foundation/init-managed.ts"],"names":[],"mappings":"AAcA,MAAM,MAAM,mBAAmB,GAAG,eAAe,GAAG,SAAS,GAAG,UAAU,GAAG,YAAY,GAAG,OAAO,CAAC;AAMpG;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,GAChB,mBAAmB,GAAG,IAAI,CAW5B;AAuFD,wBAAsB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAExE;AAED,wBAAsB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAMzE;AAED,wBAAsB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAMjF"}