openplanr 1.25.2 → 2.0.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 (1738) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/CONTRIBUTING.md +33 -0
  3. package/README.md +154 -131
  4. package/dist/cli/commands/artifact.d.ts.map +1 -1
  5. package/dist/cli/commands/artifact.js +214 -30
  6. package/dist/cli/commands/artifact.js.map +1 -1
  7. package/dist/cli/commands/backlog.d.ts +1 -21
  8. package/dist/cli/commands/backlog.d.ts.map +1 -1
  9. package/dist/cli/commands/backlog.js +1 -428
  10. package/dist/cli/commands/backlog.js.map +1 -1
  11. package/dist/cli/commands/company.d.ts +3 -0
  12. package/dist/cli/commands/company.d.ts.map +1 -0
  13. package/dist/cli/commands/company.js +173 -0
  14. package/dist/cli/commands/company.js.map +1 -0
  15. package/dist/cli/commands/config-deterministic.d.ts +3 -0
  16. package/dist/cli/commands/config-deterministic.d.ts.map +1 -0
  17. package/dist/cli/commands/config-deterministic.js +88 -0
  18. package/dist/cli/commands/config-deterministic.js.map +1 -0
  19. package/dist/cli/commands/dashboard.d.ts +3 -0
  20. package/dist/cli/commands/dashboard.d.ts.map +1 -0
  21. package/dist/cli/commands/dashboard.js +36 -0
  22. package/dist/cli/commands/dashboard.js.map +1 -0
  23. package/dist/cli/commands/diagram/index.d.ts +3 -0
  24. package/dist/cli/commands/diagram/index.d.ts.map +1 -0
  25. package/dist/cli/commands/diagram/index.js +73 -0
  26. package/dist/cli/commands/diagram/index.js.map +1 -0
  27. package/dist/cli/commands/diagram/presentation.d.ts +4 -0
  28. package/dist/cli/commands/diagram/presentation.d.ts.map +1 -0
  29. package/dist/cli/commands/diagram/presentation.js +38 -0
  30. package/dist/cli/commands/diagram/presentation.js.map +1 -0
  31. package/dist/cli/commands/doctor.d.ts.map +1 -1
  32. package/dist/cli/commands/doctor.js +1 -11
  33. package/dist/cli/commands/doctor.js.map +1 -1
  34. package/dist/cli/commands/epic.d.ts +1 -9
  35. package/dist/cli/commands/epic.d.ts.map +1 -1
  36. package/dist/cli/commands/epic.js +1 -259
  37. package/dist/cli/commands/epic.js.map +1 -1
  38. package/dist/cli/commands/feature.d.ts +1 -8
  39. package/dist/cli/commands/feature.d.ts.map +1 -1
  40. package/dist/cli/commands/feature.js +1 -220
  41. package/dist/cli/commands/feature.js.map +1 -1
  42. package/dist/cli/commands/groups/delivery.d.ts +3 -0
  43. package/dist/cli/commands/groups/delivery.d.ts.map +1 -0
  44. package/dist/cli/commands/groups/delivery.js +13 -0
  45. package/dist/cli/commands/groups/delivery.js.map +1 -0
  46. package/dist/cli/commands/groups/foundation.d.ts +3 -0
  47. package/dist/cli/commands/groups/foundation.d.ts.map +1 -0
  48. package/dist/cli/commands/groups/foundation.js +11 -0
  49. package/dist/cli/commands/groups/foundation.js.map +1 -0
  50. package/dist/cli/commands/groups/intelligence.d.ts +3 -0
  51. package/dist/cli/commands/groups/intelligence.d.ts.map +1 -0
  52. package/dist/cli/commands/groups/intelligence.js +19 -0
  53. package/dist/cli/commands/groups/intelligence.js.map +1 -0
  54. package/dist/cli/commands/groups/operations.d.ts +3 -0
  55. package/dist/cli/commands/groups/operations.d.ts.map +1 -0
  56. package/dist/cli/commands/groups/operations.js +17 -0
  57. package/dist/cli/commands/groups/operations.js.map +1 -0
  58. package/dist/cli/commands/groups/planning.d.ts +3 -0
  59. package/dist/cli/commands/groups/planning.d.ts.map +1 -0
  60. package/dist/cli/commands/groups/planning.js +25 -0
  61. package/dist/cli/commands/groups/planning.js.map +1 -0
  62. package/dist/cli/commands/index.d.ts +4 -0
  63. package/dist/cli/commands/index.d.ts.map +1 -0
  64. package/dist/cli/commands/index.js +14 -0
  65. package/dist/cli/commands/index.js.map +1 -0
  66. package/dist/cli/commands/init-deterministic.d.ts +3 -0
  67. package/dist/cli/commands/init-deterministic.d.ts.map +1 -0
  68. package/dist/cli/commands/init-deterministic.js +40 -0
  69. package/dist/cli/commands/init-deterministic.js.map +1 -0
  70. package/dist/cli/commands/land.d.ts +15 -0
  71. package/dist/cli/commands/land.d.ts.map +1 -0
  72. package/dist/cli/commands/land.js +176 -0
  73. package/dist/cli/commands/land.js.map +1 -0
  74. package/dist/cli/commands/operate/input.d.ts +54 -0
  75. package/dist/cli/commands/operate/input.d.ts.map +1 -0
  76. package/dist/cli/commands/operate/input.js +98 -0
  77. package/dist/cli/commands/operate/input.js.map +1 -0
  78. package/dist/cli/commands/operate/registrars/assignments.d.ts +5 -0
  79. package/dist/cli/commands/operate/registrars/assignments.d.ts.map +1 -0
  80. package/dist/cli/commands/operate/registrars/assignments.js +167 -0
  81. package/dist/cli/commands/operate/registrars/assignments.js.map +1 -0
  82. package/dist/cli/commands/operate/registrars/catalog.d.ts +4 -0
  83. package/dist/cli/commands/operate/registrars/catalog.d.ts.map +1 -0
  84. package/dist/cli/commands/operate/registrars/catalog.js +12 -0
  85. package/dist/cli/commands/operate/registrars/catalog.js.map +1 -0
  86. package/dist/cli/commands/operate/registrars/contracts.d.ts +41 -0
  87. package/dist/cli/commands/operate/registrars/contracts.d.ts.map +1 -0
  88. package/dist/cli/commands/operate/registrars/contracts.js +2 -0
  89. package/dist/cli/commands/operate/registrars/contracts.js.map +1 -0
  90. package/dist/cli/commands/operate/registrars/dashboard.d.ts +4 -0
  91. package/dist/cli/commands/operate/registrars/dashboard.d.ts.map +1 -0
  92. package/dist/cli/commands/operate/registrars/dashboard.js +26 -0
  93. package/dist/cli/commands/operate/registrars/dashboard.js.map +1 -0
  94. package/dist/cli/commands/operate/registrars/dispatch.d.ts +7 -0
  95. package/dist/cli/commands/operate/registrars/dispatch.d.ts.map +1 -0
  96. package/dist/cli/commands/operate/registrars/dispatch.js +55 -0
  97. package/dist/cli/commands/operate/registrars/dispatch.js.map +1 -0
  98. package/dist/cli/commands/operate/registrars/experience.d.ts +4 -0
  99. package/dist/cli/commands/operate/registrars/experience.d.ts.map +1 -0
  100. package/dist/cli/commands/operate/registrars/experience.js +93 -0
  101. package/dist/cli/commands/operate/registrars/experience.js.map +1 -0
  102. package/dist/cli/commands/operate/registrars/index.d.ts +5 -0
  103. package/dist/cli/commands/operate/registrars/index.d.ts.map +1 -0
  104. package/dist/cli/commands/operate/registrars/index.js +28 -0
  105. package/dist/cli/commands/operate/registrars/index.js.map +1 -0
  106. package/dist/cli/commands/operate/registrars/lifecycle.d.ts +4 -0
  107. package/dist/cli/commands/operate/registrars/lifecycle.d.ts.map +1 -0
  108. package/dist/cli/commands/operate/registrars/lifecycle.js +46 -0
  109. package/dist/cli/commands/operate/registrars/lifecycle.js.map +1 -0
  110. package/dist/cli/commands/operate/registrars/measurement.d.ts +4 -0
  111. package/dist/cli/commands/operate/registrars/measurement.d.ts.map +1 -0
  112. package/dist/cli/commands/operate/registrars/measurement.js +122 -0
  113. package/dist/cli/commands/operate/registrars/measurement.js.map +1 -0
  114. package/dist/cli/commands/operate/registrars/note-validation.d.ts +6 -0
  115. package/dist/cli/commands/operate/registrars/note-validation.d.ts.map +1 -0
  116. package/dist/cli/commands/operate/registrars/note-validation.js +103 -0
  117. package/dist/cli/commands/operate/registrars/note-validation.js.map +1 -0
  118. package/dist/cli/commands/operate/registrars/planning.d.ts +4 -0
  119. package/dist/cli/commands/operate/registrars/planning.d.ts.map +1 -0
  120. package/dist/cli/commands/operate/registrars/planning.js +41 -0
  121. package/dist/cli/commands/operate/registrars/planning.js.map +1 -0
  122. package/dist/cli/commands/operate/registrars/recovery.d.ts +4 -0
  123. package/dist/cli/commands/operate/registrars/recovery.d.ts.map +1 -0
  124. package/dist/cli/commands/operate/registrars/recovery.js +65 -0
  125. package/dist/cli/commands/operate/registrars/recovery.js.map +1 -0
  126. package/dist/cli/commands/operate/registrars/reviews.d.ts +4 -0
  127. package/dist/cli/commands/operate/registrars/reviews.d.ts.map +1 -0
  128. package/dist/cli/commands/operate/registrars/reviews.js +83 -0
  129. package/dist/cli/commands/operate/registrars/reviews.js.map +1 -0
  130. package/dist/cli/commands/operate/registration.d.ts +4 -0
  131. package/dist/cli/commands/operate/registration.d.ts.map +1 -0
  132. package/dist/cli/commands/operate/registration.js +3 -0
  133. package/dist/cli/commands/operate/registration.js.map +1 -0
  134. package/dist/cli/commands/operate/render.d.ts +19 -0
  135. package/dist/cli/commands/operate/render.d.ts.map +1 -0
  136. package/dist/cli/commands/operate/render.js +201 -0
  137. package/dist/cli/commands/operate/render.js.map +1 -0
  138. package/dist/cli/commands/operate.d.ts +58 -13
  139. package/dist/cli/commands/operate.d.ts.map +1 -1
  140. package/dist/cli/commands/operate.js +169 -984
  141. package/dist/cli/commands/operate.js.map +1 -1
  142. package/dist/cli/commands/planning-artifacts.d.ts +10 -0
  143. package/dist/cli/commands/planning-artifacts.d.ts.map +1 -0
  144. package/dist/cli/commands/planning-artifacts.js +350 -0
  145. package/dist/cli/commands/planning-artifacts.js.map +1 -0
  146. package/dist/cli/commands/quick/interaction.d.ts +8 -0
  147. package/dist/cli/commands/quick/interaction.d.ts.map +1 -0
  148. package/dist/cli/commands/quick/interaction.js +8 -0
  149. package/dist/cli/commands/quick/interaction.js.map +1 -0
  150. package/dist/cli/commands/quick/project.d.ts +8 -0
  151. package/dist/cli/commands/quick/project.d.ts.map +1 -0
  152. package/dist/cli/commands/quick/project.js +8 -0
  153. package/dist/cli/commands/quick/project.js.map +1 -0
  154. package/dist/cli/commands/quick.d.ts +1 -29
  155. package/dist/cli/commands/quick.d.ts.map +1 -1
  156. package/dist/cli/commands/quick.js +1 -337
  157. package/dist/cli/commands/quick.js.map +1 -1
  158. package/dist/cli/commands/rules.js +1 -1
  159. package/dist/cli/commands/rules.js.map +1 -1
  160. package/dist/cli/commands/setup.d.ts.map +1 -1
  161. package/dist/cli/commands/setup.js +40 -18
  162. package/dist/cli/commands/setup.js.map +1 -1
  163. package/dist/cli/commands/spec.d.ts +6 -4
  164. package/dist/cli/commands/spec.d.ts.map +1 -1
  165. package/dist/cli/commands/spec.js +166 -174
  166. package/dist/cli/commands/spec.js.map +1 -1
  167. package/dist/cli/commands/sprint.d.ts +1 -8
  168. package/dist/cli/commands/sprint.d.ts.map +1 -1
  169. package/dist/cli/commands/sprint.js +1 -522
  170. package/dist/cli/commands/sprint.js.map +1 -1
  171. package/dist/cli/commands/story/interaction.d.ts +7 -0
  172. package/dist/cli/commands/story/interaction.d.ts.map +1 -0
  173. package/dist/cli/commands/story/interaction.js +7 -0
  174. package/dist/cli/commands/story/interaction.js.map +1 -0
  175. package/dist/cli/commands/story/project.d.ts +10 -0
  176. package/dist/cli/commands/story/project.d.ts.map +1 -0
  177. package/dist/cli/commands/story/project.js +10 -0
  178. package/dist/cli/commands/story/project.js.map +1 -0
  179. package/dist/cli/commands/story.d.ts +1 -8
  180. package/dist/cli/commands/story.d.ts.map +1 -1
  181. package/dist/cli/commands/story.js +1 -358
  182. package/dist/cli/commands/story.js.map +1 -1
  183. package/dist/cli/commands/task.d.ts +1 -9
  184. package/dist/cli/commands/task.d.ts.map +1 -1
  185. package/dist/cli/commands/task.js +1 -351
  186. package/dist/cli/commands/task.js.map +1 -1
  187. package/dist/cli/error-boundary.d.ts +29 -0
  188. package/dist/cli/error-boundary.d.ts.map +1 -0
  189. package/dist/cli/error-boundary.js +103 -0
  190. package/dist/cli/error-boundary.js.map +1 -0
  191. package/dist/cli/helpers/bulk-checkbox-update.d.ts +1 -1
  192. package/dist/cli/helpers/bulk-checkbox-update.js +1 -1
  193. package/dist/cli/index.js +38 -113
  194. package/dist/cli/index.js.map +1 -1
  195. package/dist/dashboard/.vite/manifest.json +68 -0
  196. package/dist/dashboard/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
  197. package/dist/dashboard/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
  198. package/dist/dashboard/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
  199. package/dist/dashboard/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
  200. package/dist/dashboard/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
  201. package/dist/dashboard/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
  202. package/dist/dashboard/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
  203. package/dist/dashboard/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
  204. package/dist/dashboard/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
  205. package/dist/dashboard/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
  206. package/dist/dashboard/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
  207. package/dist/dashboard/assets/index-Bk8DyO_2.css +1 -0
  208. package/dist/dashboard/assets/index-zeygL5iu.js +557 -0
  209. package/dist/dashboard/assets/index-zeygL5iu.js.map +1 -0
  210. package/dist/dashboard/dashboard-manifest.json +84 -0
  211. package/dist/dashboard/index.html +13 -0
  212. package/dist/generators/base-generator.d.ts +2 -0
  213. package/dist/generators/base-generator.d.ts.map +1 -1
  214. package/dist/generators/base-generator.js +8 -0
  215. package/dist/generators/base-generator.js.map +1 -1
  216. package/dist/generators/claude-generator.d.ts.map +1 -1
  217. package/dist/generators/claude-generator.js +12 -14
  218. package/dist/generators/claude-generator.js.map +1 -1
  219. package/dist/generators/codex-generator.d.ts.map +1 -1
  220. package/dist/generators/codex-generator.js +7 -7
  221. package/dist/generators/codex-generator.js.map +1 -1
  222. package/dist/generators/cursor-generator.d.ts.map +1 -1
  223. package/dist/generators/cursor-generator.js +11 -30
  224. package/dist/generators/cursor-generator.js.map +1 -1
  225. package/dist/models/schema.d.ts +0 -23
  226. package/dist/models/schema.d.ts.map +1 -1
  227. package/dist/models/schema.js +0 -7
  228. package/dist/models/schema.js.map +1 -1
  229. package/dist/models/types.d.ts +3 -14
  230. package/dist/models/types.d.ts.map +1 -1
  231. package/dist/services/artifact-pipeline-service.d.ts +99 -1
  232. package/dist/services/artifact-pipeline-service.d.ts.map +1 -1
  233. package/dist/services/artifact-pipeline-service.js +681 -4
  234. package/dist/services/artifact-pipeline-service.js.map +1 -1
  235. package/dist/services/canonical-json.d.ts +3 -0
  236. package/dist/services/canonical-json.d.ts.map +1 -0
  237. package/dist/services/canonical-json.js +71 -0
  238. package/dist/services/canonical-json.js.map +1 -0
  239. package/dist/services/claude-plugin-service.d.ts +6 -1
  240. package/dist/services/claude-plugin-service.d.ts.map +1 -1
  241. package/dist/services/claude-plugin-service.js +184 -12
  242. package/dist/services/claude-plugin-service.js.map +1 -1
  243. package/dist/services/codex-plugin-service.d.ts +30 -0
  244. package/dist/services/codex-plugin-service.d.ts.map +1 -0
  245. package/dist/services/codex-plugin-service.js +195 -0
  246. package/dist/services/codex-plugin-service.js.map +1 -0
  247. package/dist/services/company-auth-service.d.ts +70 -0
  248. package/dist/services/company-auth-service.d.ts.map +1 -0
  249. package/dist/services/company-auth-service.js +720 -0
  250. package/dist/services/company-auth-service.js.map +1 -0
  251. package/dist/services/company-auth-store.d.ts +22 -0
  252. package/dist/services/company-auth-store.d.ts.map +1 -0
  253. package/dist/services/company-auth-store.js +158 -0
  254. package/dist/services/company-auth-store.js.map +1 -0
  255. package/dist/services/company-common.d.ts +9 -0
  256. package/dist/services/company-common.d.ts.map +1 -0
  257. package/dist/services/company-common.js +35 -0
  258. package/dist/services/company-common.js.map +1 -0
  259. package/dist/services/company-sync-service.d.ts +214 -0
  260. package/dist/services/company-sync-service.d.ts.map +1 -0
  261. package/dist/services/company-sync-service.js +1299 -0
  262. package/dist/services/company-sync-service.js.map +1 -0
  263. package/dist/services/connectors/adapters/business-metrics.d.ts +5 -0
  264. package/dist/services/connectors/adapters/business-metrics.d.ts.map +1 -0
  265. package/dist/services/connectors/adapters/business-metrics.js +41 -0
  266. package/dist/services/connectors/adapters/business-metrics.js.map +1 -0
  267. package/dist/services/connectors/adapters/deployment-health.d.ts +18 -0
  268. package/dist/services/connectors/adapters/deployment-health.d.ts.map +1 -0
  269. package/dist/services/connectors/adapters/deployment-health.js +67 -0
  270. package/dist/services/connectors/adapters/deployment-health.js.map +1 -0
  271. package/dist/services/connectors/adapters/github.d.ts +5 -0
  272. package/dist/services/connectors/adapters/github.d.ts.map +1 -0
  273. package/dist/services/connectors/adapters/github.js +31 -0
  274. package/dist/services/connectors/adapters/github.js.map +1 -0
  275. package/dist/services/connectors/adapters/linear-jira.d.ts +5 -0
  276. package/dist/services/connectors/adapters/linear-jira.d.ts.map +1 -0
  277. package/dist/services/connectors/adapters/linear-jira.js +26 -0
  278. package/dist/services/connectors/adapters/linear-jira.js.map +1 -0
  279. package/dist/services/connectors/adapters/posthog.d.ts +5 -0
  280. package/dist/services/connectors/adapters/posthog.d.ts.map +1 -0
  281. package/dist/services/connectors/adapters/posthog.js +31 -0
  282. package/dist/services/connectors/adapters/posthog.js.map +1 -0
  283. package/dist/services/connectors/adapters/sentry.d.ts +5 -0
  284. package/dist/services/connectors/adapters/sentry.d.ts.map +1 -0
  285. package/dist/services/connectors/adapters/sentry.js +31 -0
  286. package/dist/services/connectors/adapters/sentry.js.map +1 -0
  287. package/dist/services/connectors/checkpoint-custody.d.ts +45 -0
  288. package/dist/services/connectors/checkpoint-custody.d.ts.map +1 -0
  289. package/dist/services/connectors/checkpoint-custody.js +496 -0
  290. package/dist/services/connectors/checkpoint-custody.js.map +1 -0
  291. package/dist/services/connectors/connector-registry.d.ts +144 -0
  292. package/dist/services/connectors/connector-registry.d.ts.map +1 -0
  293. package/dist/services/connectors/connector-registry.js +423 -0
  294. package/dist/services/connectors/connector-registry.js.map +1 -0
  295. package/dist/services/connectors/connector-runtime.d.ts +200 -0
  296. package/dist/services/connectors/connector-runtime.d.ts.map +1 -0
  297. package/dist/services/connectors/connector-runtime.js +1297 -0
  298. package/dist/services/connectors/connector-runtime.js.map +1 -0
  299. package/dist/services/connectors/credential-custody.d.ts +96 -0
  300. package/dist/services/connectors/credential-custody.d.ts.map +1 -0
  301. package/dist/services/connectors/credential-custody.js +390 -0
  302. package/dist/services/connectors/credential-custody.js.map +1 -0
  303. package/dist/services/credential-backends.d.ts +11 -1
  304. package/dist/services/credential-backends.d.ts.map +1 -1
  305. package/dist/services/credential-backends.js +104 -21
  306. package/dist/services/credential-backends.js.map +1 -1
  307. package/dist/services/credential-write-lock.d.ts +8 -0
  308. package/dist/services/credential-write-lock.d.ts.map +1 -0
  309. package/dist/services/credential-write-lock.js +104 -0
  310. package/dist/services/credential-write-lock.js.map +1 -0
  311. package/dist/services/credentials-service.d.ts +8 -2
  312. package/dist/services/credentials-service.d.ts.map +1 -1
  313. package/dist/services/credentials-service.js +66 -21
  314. package/dist/services/credentials-service.js.map +1 -1
  315. package/dist/services/deprecation-notices.d.ts +2 -2
  316. package/dist/services/deprecation-notices.d.ts.map +1 -1
  317. package/dist/services/deprecation-notices.js +2 -2
  318. package/dist/services/deprecation-notices.js.map +1 -1
  319. package/dist/services/design-artifact-service.d.ts +37 -0
  320. package/dist/services/design-artifact-service.d.ts.map +1 -0
  321. package/dist/services/design-artifact-service.js +94 -0
  322. package/dist/services/design-artifact-service.js.map +1 -0
  323. package/dist/services/diagram-artifact-service.d.ts +12 -0
  324. package/dist/services/diagram-artifact-service.d.ts.map +1 -0
  325. package/dist/services/diagram-artifact-service.js +41 -0
  326. package/dist/services/diagram-artifact-service.js.map +1 -0
  327. package/dist/services/diagram-pipeline-service.d.ts +125 -0
  328. package/dist/services/diagram-pipeline-service.d.ts.map +1 -0
  329. package/dist/services/diagram-pipeline-service.js +329 -0
  330. package/dist/services/diagram-pipeline-service.js.map +1 -0
  331. package/dist/services/gherkin-service.d.ts +3 -0
  332. package/dist/services/gherkin-service.d.ts.map +1 -0
  333. package/dist/services/gherkin-service.js +9 -0
  334. package/dist/services/gherkin-service.js.map +1 -0
  335. package/dist/services/graph-service.d.ts.map +1 -1
  336. package/dist/services/graph-service.js +6 -4
  337. package/dist/services/graph-service.js.map +1 -1
  338. package/dist/services/landing/landing-service.d.ts +42 -0
  339. package/dist/services/landing/landing-service.d.ts.map +1 -0
  340. package/dist/services/landing/landing-service.js +197 -0
  341. package/dist/services/landing/landing-service.js.map +1 -0
  342. package/dist/services/landing/operation-registry.d.ts +56 -0
  343. package/dist/services/landing/operation-registry.d.ts.map +1 -0
  344. package/dist/services/landing/operation-registry.js +165 -0
  345. package/dist/services/landing/operation-registry.js.map +1 -0
  346. package/dist/services/landing/receipt-custody.d.ts +48 -0
  347. package/dist/services/landing/receipt-custody.d.ts.map +1 -0
  348. package/dist/services/landing/receipt-custody.js +375 -0
  349. package/dist/services/landing/receipt-custody.js.map +1 -0
  350. package/dist/services/linear/constants.d.ts.map +1 -1
  351. package/dist/services/linear/constants.js +2 -6
  352. package/dist/services/linear/constants.js.map +1 -1
  353. package/dist/services/linear/task-status-aggregation.d.ts +1 -1
  354. package/dist/services/linear/task-status-aggregation.js +1 -1
  355. package/dist/services/linear-pull-service.d.ts.map +1 -1
  356. package/dist/services/linear-pull-service.js +7 -30
  357. package/dist/services/linear-pull-service.js.map +1 -1
  358. package/dist/services/linear-push-service.d.ts.map +1 -1
  359. package/dist/services/linear-push-service.js +4 -5
  360. package/dist/services/linear-push-service.js.map +1 -1
  361. package/dist/services/migration-registry.d.ts +0 -19
  362. package/dist/services/migration-registry.d.ts.map +1 -1
  363. package/dist/services/migration-registry.js +18 -32
  364. package/dist/services/migration-registry.js.map +1 -1
  365. package/dist/services/operate/assignment-lifecycle-service.d.ts +135 -0
  366. package/dist/services/operate/assignment-lifecycle-service.d.ts.map +1 -0
  367. package/dist/services/operate/assignment-lifecycle-service.js +113 -0
  368. package/dist/services/operate/assignment-lifecycle-service.js.map +1 -0
  369. package/dist/services/operate/assignment-packet-service.d.ts +79 -0
  370. package/dist/services/operate/assignment-packet-service.d.ts.map +1 -0
  371. package/dist/services/operate/assignment-packet-service.js +1030 -0
  372. package/dist/services/operate/assignment-packet-service.js.map +1 -0
  373. package/dist/services/operate/client/governance.d.ts +4 -0
  374. package/dist/services/operate/client/governance.d.ts.map +1 -0
  375. package/dist/services/operate/client/governance.js +3 -0
  376. package/dist/services/operate/client/governance.js.map +1 -0
  377. package/dist/services/operate/client/lifecycle.d.ts +18 -0
  378. package/dist/services/operate/client/lifecycle.d.ts.map +1 -0
  379. package/dist/services/operate/client/lifecycle.js +15 -0
  380. package/dist/services/operate/client/lifecycle.js.map +1 -0
  381. package/dist/services/operate/client/runtime.d.ts +13 -0
  382. package/dist/services/operate/client/runtime.d.ts.map +1 -0
  383. package/dist/services/operate/client/runtime.js +11 -0
  384. package/dist/services/operate/client/runtime.js.map +1 -0
  385. package/dist/services/operate/client-error.d.ts +9 -0
  386. package/dist/services/operate/client-error.d.ts.map +1 -0
  387. package/dist/services/operate/client-error.js +14 -0
  388. package/dist/services/operate/client-error.js.map +1 -0
  389. package/dist/services/operate/client.d.ts +415 -0
  390. package/dist/services/operate/client.d.ts.map +1 -0
  391. package/dist/services/operate/client.js +2432 -0
  392. package/dist/services/operate/client.js.map +1 -0
  393. package/dist/services/operate/command-gateway.d.ts +152 -0
  394. package/dist/services/operate/command-gateway.d.ts.map +1 -0
  395. package/dist/services/operate/command-gateway.js +883 -0
  396. package/dist/services/operate/command-gateway.js.map +1 -0
  397. package/dist/services/operate/composition.d.ts +421 -0
  398. package/dist/services/operate/composition.d.ts.map +1 -0
  399. package/dist/services/operate/composition.js +394 -0
  400. package/dist/services/operate/composition.js.map +1 -0
  401. package/dist/services/operate/cycle-lifecycle-service.d.ts +35 -0
  402. package/dist/services/operate/cycle-lifecycle-service.d.ts.map +1 -0
  403. package/dist/services/operate/cycle-lifecycle-service.js +427 -0
  404. package/dist/services/operate/cycle-lifecycle-service.js.map +1 -0
  405. package/dist/services/operate/delivery-evidence.d.ts +34 -0
  406. package/dist/services/operate/delivery-evidence.d.ts.map +1 -0
  407. package/dist/services/operate/delivery-evidence.js +666 -0
  408. package/dist/services/operate/delivery-evidence.js.map +1 -0
  409. package/dist/services/operate/domain-catalog-service.d.ts +24 -0
  410. package/dist/services/operate/domain-catalog-service.d.ts.map +1 -0
  411. package/dist/services/operate/domain-catalog-service.js +99 -0
  412. package/dist/services/operate/domain-catalog-service.js.map +1 -0
  413. package/dist/services/operate/experience-read-service.d.ts +64 -0
  414. package/dist/services/operate/experience-read-service.d.ts.map +1 -0
  415. package/dist/services/operate/experience-read-service.js +109 -0
  416. package/dist/services/operate/experience-read-service.js.map +1 -0
  417. package/dist/services/operate/governed-action-service.d.ts +80 -0
  418. package/dist/services/operate/governed-action-service.d.ts.map +1 -0
  419. package/dist/services/operate/governed-action-service.js +497 -0
  420. package/dist/services/operate/governed-action-service.js.map +1 -0
  421. package/dist/services/operate/identity-contract.d.ts +3 -0
  422. package/dist/services/operate/identity-contract.d.ts.map +1 -0
  423. package/dist/services/operate/identity-contract.js +6 -0
  424. package/dist/services/operate/identity-contract.js.map +1 -0
  425. package/dist/services/operate/measurement-schedule-service.d.ts +81 -0
  426. package/dist/services/operate/measurement-schedule-service.d.ts.map +1 -0
  427. package/dist/services/operate/measurement-schedule-service.js +461 -0
  428. package/dist/services/operate/measurement-schedule-service.js.map +1 -0
  429. package/dist/services/operate/path-custody.d.ts +16 -0
  430. package/dist/services/operate/path-custody.d.ts.map +1 -0
  431. package/dist/services/operate/path-custody.js +120 -0
  432. package/dist/services/operate/path-custody.js.map +1 -0
  433. package/dist/services/operate/pinned-legacy-replay-runner.d.ts +9 -0
  434. package/dist/services/operate/pinned-legacy-replay-runner.d.ts.map +1 -0
  435. package/dist/services/operate/pinned-legacy-replay-runner.js +441 -0
  436. package/dist/services/operate/pinned-legacy-replay-runner.js.map +1 -0
  437. package/dist/services/operate/planning-bridge.d.ts +28 -0
  438. package/dist/services/operate/planning-bridge.d.ts.map +1 -0
  439. package/dist/services/operate/planning-bridge.js +341 -0
  440. package/dist/services/operate/planning-bridge.js.map +1 -0
  441. package/dist/services/operate/planning-handoff-gateway.d.ts +47 -0
  442. package/dist/services/operate/planning-handoff-gateway.d.ts.map +1 -0
  443. package/dist/services/operate/planning-handoff-gateway.js +169 -0
  444. package/dist/services/operate/planning-handoff-gateway.js.map +1 -0
  445. package/dist/services/operate/planning-handoff-service.d.ts +38 -0
  446. package/dist/services/operate/planning-handoff-service.d.ts.map +1 -0
  447. package/dist/services/operate/planning-handoff-service.js +304 -0
  448. package/dist/services/operate/planning-handoff-service.js.map +1 -0
  449. package/dist/services/operate/project-transaction-lock.d.ts +6 -0
  450. package/dist/services/operate/project-transaction-lock.d.ts.map +1 -0
  451. package/dist/services/operate/project-transaction-lock.js +146 -0
  452. package/dist/services/operate/project-transaction-lock.js.map +1 -0
  453. package/dist/services/operate/recovery-service.d.ts +16 -0
  454. package/dist/services/operate/recovery-service.d.ts.map +1 -0
  455. package/dist/services/operate/recovery-service.js +59 -0
  456. package/dist/services/operate/recovery-service.js.map +1 -0
  457. package/dist/services/operate/replay-safe-retry-service.d.ts +21 -0
  458. package/dist/services/operate/replay-safe-retry-service.d.ts.map +1 -0
  459. package/dist/services/operate/replay-safe-retry-service.js +66 -0
  460. package/dist/services/operate/replay-safe-retry-service.js.map +1 -0
  461. package/dist/services/operate/repository-read-service.d.ts +13 -0
  462. package/dist/services/operate/repository-read-service.d.ts.map +1 -0
  463. package/dist/services/operate/repository-read-service.js +153 -0
  464. package/dist/services/operate/repository-read-service.js.map +1 -0
  465. package/dist/services/operate/review-lifecycle-service.d.ts +50 -0
  466. package/dist/services/operate/review-lifecycle-service.d.ts.map +1 -0
  467. package/dist/services/operate/review-lifecycle-service.js +63 -0
  468. package/dist/services/operate/review-lifecycle-service.js.map +1 -0
  469. package/dist/services/operate/review-read-gateway.d.ts +21 -0
  470. package/dist/services/operate/review-read-gateway.d.ts.map +1 -0
  471. package/dist/services/operate/review-read-gateway.js +119 -0
  472. package/dist/services/operate/review-read-gateway.js.map +1 -0
  473. package/dist/services/operate/screened-evidence-service.d.ts +24 -0
  474. package/dist/services/operate/screened-evidence-service.d.ts.map +1 -0
  475. package/dist/services/operate/screened-evidence-service.js +186 -0
  476. package/dist/services/operate/screened-evidence-service.js.map +1 -0
  477. package/dist/services/operate/search-hit-contract.d.ts +11 -0
  478. package/dist/services/operate/search-hit-contract.d.ts.map +1 -0
  479. package/dist/services/operate/search-hit-contract.js +29 -0
  480. package/dist/services/operate/search-hit-contract.js.map +1 -0
  481. package/dist/services/operate/session-capability.d.ts +61 -0
  482. package/dist/services/operate/session-capability.d.ts.map +1 -0
  483. package/dist/services/operate/session-capability.js +124 -0
  484. package/dist/services/operate/session-capability.js.map +1 -0
  485. package/dist/services/operate/spec-operating-origin-service.d.ts +60 -0
  486. package/dist/services/operate/spec-operating-origin-service.d.ts.map +1 -0
  487. package/dist/services/operate/spec-operating-origin-service.js +401 -0
  488. package/dist/services/operate/spec-operating-origin-service.js.map +1 -0
  489. package/dist/services/operate/storage-layout.d.ts +82 -0
  490. package/dist/services/operate/storage-layout.d.ts.map +1 -0
  491. package/dist/services/operate/storage-layout.js +1244 -0
  492. package/dist/services/operate/storage-layout.js.map +1 -0
  493. package/dist/services/operate/storage-migration-service.d.ts +15 -0
  494. package/dist/services/operate/storage-migration-service.d.ts.map +1 -0
  495. package/dist/services/operate/storage-migration-service.js +27 -0
  496. package/dist/services/operate/storage-migration-service.js.map +1 -0
  497. package/dist/services/operate/store.d.ts +132 -0
  498. package/dist/services/operate/store.d.ts.map +1 -0
  499. package/dist/services/operate/store.js +1344 -0
  500. package/dist/services/operate/store.js.map +1 -0
  501. package/dist/services/pipeline-package-service.d.ts +93 -2
  502. package/dist/services/pipeline-package-service.d.ts.map +1 -1
  503. package/dist/services/pipeline-package-service.js +867 -7
  504. package/dist/services/pipeline-package-service.js.map +1 -1
  505. package/dist/services/planning-id-service.d.ts +8 -0
  506. package/dist/services/planning-id-service.d.ts.map +1 -0
  507. package/dist/services/planning-id-service.js +114 -0
  508. package/dist/services/planning-id-service.js.map +1 -0
  509. package/dist/services/provenance-service.d.ts +33 -1
  510. package/dist/services/provenance-service.d.ts.map +1 -1
  511. package/dist/services/provenance-service.js +104 -8
  512. package/dist/services/provenance-service.js.map +1 -1
  513. package/dist/services/runtime-manager/doctor.d.ts +22 -0
  514. package/dist/services/runtime-manager/doctor.d.ts.map +1 -0
  515. package/dist/services/runtime-manager/doctor.js +74 -0
  516. package/dist/services/runtime-manager/doctor.js.map +1 -0
  517. package/dist/services/runtime-manager/global-state.d.ts +47 -0
  518. package/dist/services/runtime-manager/global-state.d.ts.map +1 -0
  519. package/dist/services/runtime-manager/global-state.js +59 -0
  520. package/dist/services/runtime-manager/global-state.js.map +1 -0
  521. package/dist/services/runtime-manager/install-plan.d.ts +37 -0
  522. package/dist/services/runtime-manager/install-plan.d.ts.map +1 -0
  523. package/dist/services/runtime-manager/install-plan.js +91 -0
  524. package/dist/services/runtime-manager/install-plan.js.map +1 -0
  525. package/dist/services/runtime-manager/inventory.d.ts +29 -0
  526. package/dist/services/runtime-manager/inventory.d.ts.map +1 -0
  527. package/dist/services/runtime-manager/inventory.js +46 -0
  528. package/dist/services/runtime-manager/inventory.js.map +1 -0
  529. package/dist/services/runtime-manager-service.d.ts +16 -71
  530. package/dist/services/runtime-manager-service.d.ts.map +1 -1
  531. package/dist/services/runtime-manager-service.js +1288 -505
  532. package/dist/services/runtime-manager-service.js.map +1 -1
  533. package/dist/services/spec-service.d.ts +213 -39
  534. package/dist/services/spec-service.d.ts.map +1 -1
  535. package/dist/services/spec-service.js +938 -171
  536. package/dist/services/spec-service.js.map +1 -1
  537. package/dist/services/template-service.d.ts.map +1 -1
  538. package/dist/services/template-service.js +1 -0
  539. package/dist/services/template-service.js.map +1 -1
  540. package/dist/templates/quick/quick-task.md.hbs +6 -0
  541. package/dist/templates/rules/claude/CLAUDE.md.hbs +3 -111
  542. package/dist/templates/rules/codex/AGENTS.md.hbs +2 -92
  543. package/dist/templates/rules/cursor/create-task-list.mdc.hbs +1 -1
  544. package/dist/templates/rules/cursor/implement-task-list.mdc.hbs +5 -83
  545. package/dist/templates/rules/cursor/openplanr.mdc.hbs +12 -0
  546. package/dist/templates/rules/shared/host-native-guidance.md.hbs +12 -0
  547. package/dist/templates/rules/shared/implementation-guidance.md.hbs +44 -0
  548. package/dist/templates/spec/spec-shaped.md.hbs +66 -22
  549. package/dist/templates/spec/spec.md.hbs +46 -23
  550. package/dist/templates/spec/story.md.hbs +15 -4
  551. package/dist/templates/spec/task.md.hbs +53 -5
  552. package/dist/utils/constants.d.ts +1 -1
  553. package/dist/utils/constants.js +1 -1
  554. package/dist/utils/logger.d.ts +0 -3
  555. package/dist/utils/logger.d.ts.map +1 -1
  556. package/dist/utils/logger.js +0 -6
  557. package/dist/utils/logger.js.map +1 -1
  558. package/docs/ARTIFACT_REVIEW.md +110 -0
  559. package/docs/CLI.md +1216 -0
  560. package/docs/CROSS_RUNTIME_SETUP.md +168 -0
  561. package/docs/TROUBLESHOOTING.md +227 -0
  562. package/lib/dashboard-verifier.d.mts +29 -0
  563. package/lib/dashboard-verifier.mjs +307 -0
  564. package/lib/host-packages/adapter-registry.json +44 -0
  565. package/lib/host-packages/claude/.claude-plugin/marketplace.json +20 -0
  566. package/lib/host-packages/claude/openplanr/.claude-plugin/plugin.json +9 -0
  567. package/lib/host-packages/claude/openplanr/.openplanr-content.json +1179 -0
  568. package/lib/host-packages/claude/openplanr/agents/planr-backend.md +66 -0
  569. package/lib/host-packages/claude/openplanr/agents/planr-database.md +165 -0
  570. package/lib/host-packages/claude/openplanr/agents/planr-designer.md +57 -0
  571. package/lib/host-packages/claude/openplanr/agents/planr-devops.md +57 -0
  572. package/lib/host-packages/claude/openplanr/agents/planr-documentation.md +63 -0
  573. package/lib/host-packages/claude/openplanr/agents/planr-entity-scaffold.md +29 -0
  574. package/lib/host-packages/claude/openplanr/agents/planr-frontend.md +69 -0
  575. package/lib/host-packages/claude/openplanr/agents/planr-qa.md +162 -0
  576. package/lib/host-packages/claude/openplanr/agents/planr-specification.md +124 -0
  577. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/backend.md +93 -0
  578. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/designer.md +90 -0
  579. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/devops.md +55 -0
  580. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/doc-gen.md +67 -0
  581. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/frontend.md +94 -0
  582. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/qa.md +17 -0
  583. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/specification.md +111 -0
  584. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/shared/contract-create-modify-preserve.md +17 -0
  585. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/shared/design-craft-rubric.md +51 -0
  586. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/shared/design-principles.md +43 -0
  587. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/shared/design-spec-template.md +88 -0
  588. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/shared/task-context-resolution.md +60 -0
  589. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/shared/verification-and-recovery-backend.md +26 -0
  590. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/shared/verification-and-recovery-frontend.md +27 -0
  591. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/backend.md +96 -0
  592. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/designer.md +83 -0
  593. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/devops.md +55 -0
  594. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/doc-gen.md +67 -0
  595. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/frontend.md +96 -0
  596. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/qa.md +17 -0
  597. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/specification.md +112 -0
  598. package/lib/host-packages/claude/openplanr/references/pipeline/stacks/backend/nestjs.md +130 -0
  599. package/lib/host-packages/claude/openplanr/references/pipeline/stacks/database/mongodb.md +122 -0
  600. package/lib/host-packages/claude/openplanr/references/pipeline/stacks/database/prisma.md +155 -0
  601. package/lib/host-packages/claude/openplanr/references/pipeline/stacks/devops/docker-compose.md +140 -0
  602. package/lib/host-packages/claude/openplanr/references/pipeline/stacks/frontend/nextjs.md +123 -0
  603. package/lib/host-packages/claude/openplanr/skills/artifact/SKILL.md +54 -0
  604. package/lib/host-packages/claude/openplanr/skills/artifact/openplanr.skill.json +48 -0
  605. package/lib/host-packages/claude/openplanr/skills/artifact/references/company-review.md +18 -0
  606. package/lib/host-packages/claude/openplanr/skills/artifact/references/design-sharing.md +51 -0
  607. package/lib/host-packages/claude/openplanr/skills/browser-qa/SKILL.md +34 -0
  608. package/lib/host-packages/claude/openplanr/skills/browser-qa/openplanr.skill.json +26 -0
  609. package/lib/host-packages/claude/openplanr/skills/ceo-review/SKILL.md +47 -0
  610. package/lib/host-packages/claude/openplanr/skills/ceo-review/openplanr.skill.json +81 -0
  611. package/lib/host-packages/claude/openplanr/skills/ceo-review/references/operate-advisor-contract.md +111 -0
  612. package/lib/host-packages/claude/openplanr/skills/ceo-review/scripts/errors.mjs +8 -0
  613. package/lib/host-packages/claude/openplanr/skills/ceo-review/scripts/operate-review-contract.mjs +438 -0
  614. package/lib/host-packages/claude/openplanr/skills/ceo-review/scripts/operate-review-note.mjs +595 -0
  615. package/lib/host-packages/claude/openplanr/skills/ceo-review/scripts/validate-note.mjs +31 -0
  616. package/lib/host-packages/claude/openplanr/skills/chair-review/SKILL.md +101 -0
  617. package/lib/host-packages/claude/openplanr/skills/chair-review/openplanr.skill.json +70 -0
  618. package/lib/host-packages/claude/openplanr/skills/chair-review/scripts/errors.mjs +8 -0
  619. package/lib/host-packages/claude/openplanr/skills/chair-review/scripts/operate-review-contract.mjs +438 -0
  620. package/lib/host-packages/claude/openplanr/skills/chair-review/scripts/operate-review-note.mjs +595 -0
  621. package/lib/host-packages/claude/openplanr/skills/chair-review/scripts/validate-note.mjs +31 -0
  622. package/lib/host-packages/claude/openplanr/skills/challenger-review/SKILL.md +86 -0
  623. package/lib/host-packages/claude/openplanr/skills/challenger-review/openplanr.skill.json +70 -0
  624. package/lib/host-packages/claude/openplanr/skills/challenger-review/scripts/errors.mjs +8 -0
  625. package/lib/host-packages/claude/openplanr/skills/challenger-review/scripts/operate-review-contract.mjs +438 -0
  626. package/lib/host-packages/claude/openplanr/skills/challenger-review/scripts/operate-review-note.mjs +595 -0
  627. package/lib/host-packages/claude/openplanr/skills/challenger-review/scripts/validate-note.mjs +31 -0
  628. package/lib/host-packages/claude/openplanr/skills/cmo-review/SKILL.md +46 -0
  629. package/lib/host-packages/claude/openplanr/skills/cmo-review/openplanr.skill.json +81 -0
  630. package/lib/host-packages/claude/openplanr/skills/cmo-review/references/operate-advisor-contract.md +111 -0
  631. package/lib/host-packages/claude/openplanr/skills/cmo-review/scripts/errors.mjs +8 -0
  632. package/lib/host-packages/claude/openplanr/skills/cmo-review/scripts/operate-review-contract.mjs +438 -0
  633. package/lib/host-packages/claude/openplanr/skills/cmo-review/scripts/operate-review-note.mjs +595 -0
  634. package/lib/host-packages/claude/openplanr/skills/cmo-review/scripts/validate-note.mjs +31 -0
  635. package/lib/host-packages/claude/openplanr/skills/coo-review/SKILL.md +45 -0
  636. package/lib/host-packages/claude/openplanr/skills/coo-review/openplanr.skill.json +81 -0
  637. package/lib/host-packages/claude/openplanr/skills/coo-review/references/operate-advisor-contract.md +111 -0
  638. package/lib/host-packages/claude/openplanr/skills/coo-review/scripts/errors.mjs +8 -0
  639. package/lib/host-packages/claude/openplanr/skills/coo-review/scripts/operate-review-contract.mjs +438 -0
  640. package/lib/host-packages/claude/openplanr/skills/coo-review/scripts/operate-review-note.mjs +595 -0
  641. package/lib/host-packages/claude/openplanr/skills/coo-review/scripts/validate-note.mjs +31 -0
  642. package/lib/host-packages/claude/openplanr/skills/cpo-review/SKILL.md +48 -0
  643. package/lib/host-packages/claude/openplanr/skills/cpo-review/openplanr.skill.json +81 -0
  644. package/lib/host-packages/claude/openplanr/skills/cpo-review/references/operate-advisor-contract.md +111 -0
  645. package/lib/host-packages/claude/openplanr/skills/cpo-review/scripts/errors.mjs +8 -0
  646. package/lib/host-packages/claude/openplanr/skills/cpo-review/scripts/operate-review-contract.mjs +438 -0
  647. package/lib/host-packages/claude/openplanr/skills/cpo-review/scripts/operate-review-note.mjs +595 -0
  648. package/lib/host-packages/claude/openplanr/skills/cpo-review/scripts/validate-note.mjs +31 -0
  649. package/lib/host-packages/claude/openplanr/skills/cto-review/SKILL.md +47 -0
  650. package/lib/host-packages/claude/openplanr/skills/cto-review/openplanr.skill.json +81 -0
  651. package/lib/host-packages/claude/openplanr/skills/cto-review/references/operate-advisor-contract.md +111 -0
  652. package/lib/host-packages/claude/openplanr/skills/cto-review/scripts/errors.mjs +8 -0
  653. package/lib/host-packages/claude/openplanr/skills/cto-review/scripts/operate-review-contract.mjs +438 -0
  654. package/lib/host-packages/claude/openplanr/skills/cto-review/scripts/operate-review-note.mjs +595 -0
  655. package/lib/host-packages/claude/openplanr/skills/cto-review/scripts/validate-note.mjs +31 -0
  656. package/lib/host-packages/claude/openplanr/skills/dashboard/SKILL.md +20 -0
  657. package/lib/host-packages/claude/openplanr/skills/dashboard/openplanr.skill.json +26 -0
  658. package/lib/host-packages/claude/openplanr/skills/design/SKILL.md +73 -0
  659. package/lib/host-packages/claude/openplanr/skills/design/openplanr.skill.json +466 -0
  660. package/lib/host-packages/claude/openplanr/skills/design/references/craft.md +68 -0
  661. package/lib/host-packages/claude/openplanr/skills/design/references/design-spec-template.md +88 -0
  662. package/lib/host-packages/claude/openplanr/skills/design/references/design-system.md +33 -0
  663. package/lib/host-packages/claude/openplanr/skills/design/references/discovery.md +53 -0
  664. package/lib/host-packages/claude/openplanr/skills/design/references/generation.md +105 -0
  665. package/lib/host-packages/claude/openplanr/skills/design/references/handoff.md +47 -0
  666. package/lib/host-packages/claude/openplanr/skills/design/references/review.md +88 -0
  667. package/lib/host-packages/claude/openplanr/skills/design/references/team-review.md +131 -0
  668. package/lib/host-packages/claude/openplanr/skills/design/references/utilities.md +93 -0
  669. package/lib/host-packages/claude/openplanr/skills/design/schemas/design-document.schema.json +306 -0
  670. package/lib/host-packages/claude/openplanr/skills/design/schemas/design-review-context.schema.json +191 -0
  671. package/lib/host-packages/claude/openplanr/skills/design/schemas/design-review-handoff.schema.json +407 -0
  672. package/lib/host-packages/claude/openplanr/skills/design/scripts/design.mjs +17323 -0
  673. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/notices/entities.txt +13 -0
  674. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/notices/parse5.txt +21 -0
  675. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  676. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  677. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  678. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  679. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  680. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  681. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  682. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/package.json +115 -0
  683. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  684. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  685. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  686. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  687. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  688. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  689. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  690. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  691. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  692. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  693. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  694. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  695. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  696. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  697. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  698. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  699. package/lib/host-packages/claude/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  700. package/lib/host-packages/claude/openplanr/skills/design-loop/SKILL.md +58 -0
  701. package/lib/host-packages/claude/openplanr/skills/design-loop/openplanr.skill.json +466 -0
  702. package/lib/host-packages/claude/openplanr/skills/design-loop/references/craft.md +68 -0
  703. package/lib/host-packages/claude/openplanr/skills/design-loop/references/design-spec-template.md +88 -0
  704. package/lib/host-packages/claude/openplanr/skills/design-loop/references/design-system.md +33 -0
  705. package/lib/host-packages/claude/openplanr/skills/design-loop/references/discovery.md +53 -0
  706. package/lib/host-packages/claude/openplanr/skills/design-loop/references/generation.md +105 -0
  707. package/lib/host-packages/claude/openplanr/skills/design-loop/references/handoff.md +47 -0
  708. package/lib/host-packages/claude/openplanr/skills/design-loop/references/review.md +88 -0
  709. package/lib/host-packages/claude/openplanr/skills/design-loop/references/team-review.md +131 -0
  710. package/lib/host-packages/claude/openplanr/skills/design-loop/references/utilities.md +93 -0
  711. package/lib/host-packages/claude/openplanr/skills/design-loop/schemas/design-document.schema.json +306 -0
  712. package/lib/host-packages/claude/openplanr/skills/design-loop/schemas/design-review-context.schema.json +191 -0
  713. package/lib/host-packages/claude/openplanr/skills/design-loop/schemas/design-review-handoff.schema.json +407 -0
  714. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/design.mjs +17323 -0
  715. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/notices/entities.txt +13 -0
  716. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/notices/parse5.txt +21 -0
  717. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  718. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  719. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  720. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  721. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  722. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  723. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  724. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/package.json +115 -0
  725. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  726. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  727. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  728. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  729. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  730. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  731. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  732. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  733. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  734. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  735. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  736. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  737. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  738. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  739. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  740. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  741. package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  742. package/lib/host-packages/claude/openplanr/skills/design-review/SKILL.md +54 -0
  743. package/lib/host-packages/claude/openplanr/skills/design-review/openplanr.skill.json +466 -0
  744. package/lib/host-packages/claude/openplanr/skills/design-review/references/craft.md +68 -0
  745. package/lib/host-packages/claude/openplanr/skills/design-review/references/design-spec-template.md +88 -0
  746. package/lib/host-packages/claude/openplanr/skills/design-review/references/design-system.md +33 -0
  747. package/lib/host-packages/claude/openplanr/skills/design-review/references/discovery.md +53 -0
  748. package/lib/host-packages/claude/openplanr/skills/design-review/references/generation.md +105 -0
  749. package/lib/host-packages/claude/openplanr/skills/design-review/references/handoff.md +47 -0
  750. package/lib/host-packages/claude/openplanr/skills/design-review/references/review.md +88 -0
  751. package/lib/host-packages/claude/openplanr/skills/design-review/references/team-review.md +131 -0
  752. package/lib/host-packages/claude/openplanr/skills/design-review/references/utilities.md +93 -0
  753. package/lib/host-packages/claude/openplanr/skills/design-review/schemas/design-document.schema.json +306 -0
  754. package/lib/host-packages/claude/openplanr/skills/design-review/schemas/design-review-context.schema.json +191 -0
  755. package/lib/host-packages/claude/openplanr/skills/design-review/schemas/design-review-handoff.schema.json +407 -0
  756. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/design.mjs +17323 -0
  757. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/notices/entities.txt +13 -0
  758. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/notices/parse5.txt +21 -0
  759. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  760. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  761. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  762. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  763. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  764. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  765. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  766. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/package.json +115 -0
  767. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  768. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  769. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  770. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  771. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  772. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  773. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  774. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  775. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  776. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  777. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  778. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  779. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  780. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  781. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  782. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  783. package/lib/host-packages/claude/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  784. package/lib/host-packages/claude/openplanr/skills/diagram/SKILL.md +65 -0
  785. package/lib/host-packages/claude/openplanr/skills/diagram/openplanr.skill.json +59 -0
  786. package/lib/host-packages/claude/openplanr/skills/diagram/references/diagram-document.md +86 -0
  787. package/lib/host-packages/claude/openplanr/skills/diagram/references/diagram-fidelity.md +19 -0
  788. package/lib/host-packages/claude/openplanr/skills/diagram/references/diagram-intent-to-ir.md +22 -0
  789. package/lib/host-packages/claude/openplanr/skills/doctor/SKILL.md +40 -0
  790. package/lib/host-packages/claude/openplanr/skills/doctor/openplanr.skill.json +37 -0
  791. package/lib/host-packages/claude/openplanr/skills/doctor/references/upgrade.md +106 -0
  792. package/lib/host-packages/claude/openplanr/skills/investigate/SKILL.md +31 -0
  793. package/lib/host-packages/claude/openplanr/skills/investigate/openplanr.skill.json +26 -0
  794. package/lib/host-packages/claude/openplanr/skills/land/SKILL.md +33 -0
  795. package/lib/host-packages/claude/openplanr/skills/land/openplanr.skill.json +26 -0
  796. package/lib/host-packages/claude/openplanr/skills/operate/SKILL.md +181 -0
  797. package/lib/host-packages/claude/openplanr/skills/operate/openplanr.skill.json +70 -0
  798. package/lib/host-packages/claude/openplanr/skills/operate/scripts/errors.mjs +8 -0
  799. package/lib/host-packages/claude/openplanr/skills/operate/scripts/operate-review-contract.mjs +438 -0
  800. package/lib/host-packages/claude/openplanr/skills/operate/scripts/operate-review-note.mjs +595 -0
  801. package/lib/host-packages/claude/openplanr/skills/operate/scripts/validate-note.mjs +31 -0
  802. package/lib/host-packages/claude/openplanr/skills/plan/SKILL.md +106 -0
  803. package/lib/host-packages/claude/openplanr/skills/plan/openplanr.skill.json +389 -0
  804. package/lib/host-packages/claude/openplanr/skills/plan/references/artifact-contract.md +39 -0
  805. package/lib/host-packages/claude/openplanr/skills/plan/schemas/design-document.schema.json +306 -0
  806. package/lib/host-packages/claude/openplanr/skills/plan/schemas/design-review-context.schema.json +191 -0
  807. package/lib/host-packages/claude/openplanr/skills/plan/schemas/design-review-handoff.schema.json +407 -0
  808. package/lib/host-packages/claude/openplanr/skills/plan/scripts/design.mjs +17323 -0
  809. package/lib/host-packages/claude/openplanr/skills/plan/scripts/planning-ids.mjs +120 -0
  810. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/notices/entities.txt +13 -0
  811. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/notices/parse5.txt +21 -0
  812. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  813. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  814. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  815. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  816. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  817. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  818. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  819. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/package.json +115 -0
  820. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  821. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  822. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  823. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  824. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  825. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  826. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  827. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  828. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  829. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  830. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  831. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  832. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  833. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  834. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  835. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  836. package/lib/host-packages/claude/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  837. package/lib/host-packages/claude/openplanr/skills/plan-review/SKILL.md +39 -0
  838. package/lib/host-packages/claude/openplanr/skills/plan-review/openplanr.skill.json +26 -0
  839. package/lib/host-packages/claude/openplanr/skills/release/SKILL.md +180 -0
  840. package/lib/host-packages/claude/openplanr/skills/release/assets/changelog-template.md +18 -0
  841. package/lib/host-packages/claude/openplanr/skills/release/assets/profile-template.md +45 -0
  842. package/lib/host-packages/claude/openplanr/skills/release/openplanr.skill.json +92 -0
  843. package/lib/host-packages/claude/openplanr/skills/release/references/cadence.md +92 -0
  844. package/lib/host-packages/claude/openplanr/skills/release/references/release-notes.md +127 -0
  845. package/lib/host-packages/claude/openplanr/skills/release/references/schemes.md +103 -0
  846. package/lib/host-packages/claude/openplanr/skills/release/scripts/collect_changes.sh +85 -0
  847. package/lib/host-packages/claude/openplanr/skills/ship/SKILL.md +80 -0
  848. package/lib/host-packages/claude/openplanr/skills/ship/openplanr.skill.json +48 -0
  849. package/lib/host-packages/claude/openplanr/skills/ship/references/result-contract.md +14 -0
  850. package/lib/host-packages/claude/openplanr/skills/ship/scripts/discover-verification.mjs +107 -0
  851. package/lib/host-packages/claude/openplanr/skills/spec/SKILL.md +53 -0
  852. package/lib/host-packages/claude/openplanr/skills/spec/openplanr.skill.json +37 -0
  853. package/lib/host-packages/claude/openplanr/skills/spec/references/specification-contract.md +32 -0
  854. package/lib/host-packages/claude/openplanr/skills/status/SKILL.md +21 -0
  855. package/lib/host-packages/claude/openplanr/skills/status/openplanr.skill.json +26 -0
  856. package/lib/host-packages/claude/openplanr/skills/sync/SKILL.md +30 -0
  857. package/lib/host-packages/claude/openplanr/skills/sync/openplanr.skill.json +37 -0
  858. package/lib/host-packages/claude/openplanr/skills/sync/scripts/sync.mjs +230 -0
  859. package/lib/host-packages/cursor/openplanr/.openplanr-content.json +939 -0
  860. package/lib/host-packages/cursor/openplanr/manifest.json +32 -0
  861. package/lib/host-packages/cursor/openplanr/rules/planr-artifact/references/company-review.md +18 -0
  862. package/lib/host-packages/cursor/openplanr/rules/planr-artifact/references/design-sharing.md +51 -0
  863. package/lib/host-packages/cursor/openplanr/rules/planr-artifact.mdc +53 -0
  864. package/lib/host-packages/cursor/openplanr/rules/planr-browser-qa.mdc +34 -0
  865. package/lib/host-packages/cursor/openplanr/rules/planr-ceo-review/references/operate-advisor-contract.md +111 -0
  866. package/lib/host-packages/cursor/openplanr/rules/planr-ceo-review/scripts/errors.mjs +8 -0
  867. package/lib/host-packages/cursor/openplanr/rules/planr-ceo-review/scripts/operate-review-contract.mjs +438 -0
  868. package/lib/host-packages/cursor/openplanr/rules/planr-ceo-review/scripts/operate-review-note.mjs +595 -0
  869. package/lib/host-packages/cursor/openplanr/rules/planr-ceo-review/scripts/validate-note.mjs +31 -0
  870. package/lib/host-packages/cursor/openplanr/rules/planr-ceo-review.mdc +45 -0
  871. package/lib/host-packages/cursor/openplanr/rules/planr-chair-review/scripts/errors.mjs +8 -0
  872. package/lib/host-packages/cursor/openplanr/rules/planr-chair-review/scripts/operate-review-contract.mjs +438 -0
  873. package/lib/host-packages/cursor/openplanr/rules/planr-chair-review/scripts/operate-review-note.mjs +595 -0
  874. package/lib/host-packages/cursor/openplanr/rules/planr-chair-review/scripts/validate-note.mjs +31 -0
  875. package/lib/host-packages/cursor/openplanr/rules/planr-chair-review.mdc +99 -0
  876. package/lib/host-packages/cursor/openplanr/rules/planr-challenger-review/scripts/errors.mjs +8 -0
  877. package/lib/host-packages/cursor/openplanr/rules/planr-challenger-review/scripts/operate-review-contract.mjs +438 -0
  878. package/lib/host-packages/cursor/openplanr/rules/planr-challenger-review/scripts/operate-review-note.mjs +595 -0
  879. package/lib/host-packages/cursor/openplanr/rules/planr-challenger-review/scripts/validate-note.mjs +31 -0
  880. package/lib/host-packages/cursor/openplanr/rules/planr-challenger-review.mdc +84 -0
  881. package/lib/host-packages/cursor/openplanr/rules/planr-cmo-review/references/operate-advisor-contract.md +111 -0
  882. package/lib/host-packages/cursor/openplanr/rules/planr-cmo-review/scripts/errors.mjs +8 -0
  883. package/lib/host-packages/cursor/openplanr/rules/planr-cmo-review/scripts/operate-review-contract.mjs +438 -0
  884. package/lib/host-packages/cursor/openplanr/rules/planr-cmo-review/scripts/operate-review-note.mjs +595 -0
  885. package/lib/host-packages/cursor/openplanr/rules/planr-cmo-review/scripts/validate-note.mjs +31 -0
  886. package/lib/host-packages/cursor/openplanr/rules/planr-cmo-review.mdc +44 -0
  887. package/lib/host-packages/cursor/openplanr/rules/planr-coo-review/references/operate-advisor-contract.md +111 -0
  888. package/lib/host-packages/cursor/openplanr/rules/planr-coo-review/scripts/errors.mjs +8 -0
  889. package/lib/host-packages/cursor/openplanr/rules/planr-coo-review/scripts/operate-review-contract.mjs +438 -0
  890. package/lib/host-packages/cursor/openplanr/rules/planr-coo-review/scripts/operate-review-note.mjs +595 -0
  891. package/lib/host-packages/cursor/openplanr/rules/planr-coo-review/scripts/validate-note.mjs +31 -0
  892. package/lib/host-packages/cursor/openplanr/rules/planr-coo-review.mdc +43 -0
  893. package/lib/host-packages/cursor/openplanr/rules/planr-cpo-review/references/operate-advisor-contract.md +111 -0
  894. package/lib/host-packages/cursor/openplanr/rules/planr-cpo-review/scripts/errors.mjs +8 -0
  895. package/lib/host-packages/cursor/openplanr/rules/planr-cpo-review/scripts/operate-review-contract.mjs +438 -0
  896. package/lib/host-packages/cursor/openplanr/rules/planr-cpo-review/scripts/operate-review-note.mjs +595 -0
  897. package/lib/host-packages/cursor/openplanr/rules/planr-cpo-review/scripts/validate-note.mjs +31 -0
  898. package/lib/host-packages/cursor/openplanr/rules/planr-cpo-review.mdc +46 -0
  899. package/lib/host-packages/cursor/openplanr/rules/planr-cto-review/references/operate-advisor-contract.md +111 -0
  900. package/lib/host-packages/cursor/openplanr/rules/planr-cto-review/scripts/errors.mjs +8 -0
  901. package/lib/host-packages/cursor/openplanr/rules/planr-cto-review/scripts/operate-review-contract.mjs +438 -0
  902. package/lib/host-packages/cursor/openplanr/rules/planr-cto-review/scripts/operate-review-note.mjs +595 -0
  903. package/lib/host-packages/cursor/openplanr/rules/planr-cto-review/scripts/validate-note.mjs +31 -0
  904. package/lib/host-packages/cursor/openplanr/rules/planr-cto-review.mdc +45 -0
  905. package/lib/host-packages/cursor/openplanr/rules/planr-dashboard.mdc +19 -0
  906. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/craft.md +68 -0
  907. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/design-spec-template.md +88 -0
  908. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/design-system.md +33 -0
  909. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/discovery.md +53 -0
  910. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/generation.md +105 -0
  911. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/handoff.md +47 -0
  912. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/review.md +88 -0
  913. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/team-review.md +131 -0
  914. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/utilities.md +93 -0
  915. package/lib/host-packages/cursor/openplanr/rules/planr-design/schemas/design-document.schema.json +306 -0
  916. package/lib/host-packages/cursor/openplanr/rules/planr-design/schemas/design-review-context.schema.json +191 -0
  917. package/lib/host-packages/cursor/openplanr/rules/planr-design/schemas/design-review-handoff.schema.json +407 -0
  918. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/design.mjs +17323 -0
  919. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/notices/entities.txt +13 -0
  920. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/notices/parse5.txt +21 -0
  921. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  922. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  923. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  924. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  925. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  926. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  927. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  928. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/package.json +115 -0
  929. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  930. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  931. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  932. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  933. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  934. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  935. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  936. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  937. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  938. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  939. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  940. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  941. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  942. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  943. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  944. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  945. package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  946. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/craft.md +68 -0
  947. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/design-spec-template.md +88 -0
  948. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/design-system.md +33 -0
  949. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/discovery.md +53 -0
  950. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/generation.md +105 -0
  951. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/handoff.md +47 -0
  952. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/review.md +88 -0
  953. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/team-review.md +131 -0
  954. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/utilities.md +93 -0
  955. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/schemas/design-document.schema.json +306 -0
  956. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/schemas/design-review-context.schema.json +191 -0
  957. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/schemas/design-review-handoff.schema.json +407 -0
  958. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/design.mjs +17323 -0
  959. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/notices/entities.txt +13 -0
  960. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/notices/parse5.txt +21 -0
  961. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  962. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  963. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  964. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  965. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  966. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  967. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  968. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/package.json +115 -0
  969. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  970. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  971. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  972. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  973. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  974. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  975. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  976. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  977. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  978. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  979. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  980. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  981. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  982. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  983. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  984. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  985. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  986. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop.mdc +57 -0
  987. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/craft.md +68 -0
  988. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/design-spec-template.md +88 -0
  989. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/design-system.md +33 -0
  990. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/discovery.md +53 -0
  991. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/generation.md +105 -0
  992. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/handoff.md +47 -0
  993. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/review.md +88 -0
  994. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/team-review.md +131 -0
  995. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/utilities.md +93 -0
  996. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/schemas/design-document.schema.json +306 -0
  997. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/schemas/design-review-context.schema.json +191 -0
  998. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/schemas/design-review-handoff.schema.json +407 -0
  999. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/design.mjs +17323 -0
  1000. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/notices/entities.txt +13 -0
  1001. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/notices/parse5.txt +21 -0
  1002. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  1003. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  1004. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  1005. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  1006. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  1007. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  1008. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  1009. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/package.json +115 -0
  1010. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  1011. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  1012. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  1013. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  1014. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  1015. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  1016. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  1017. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  1018. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  1019. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  1020. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  1021. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  1022. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  1023. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  1024. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  1025. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  1026. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  1027. package/lib/host-packages/cursor/openplanr/rules/planr-design-review.mdc +53 -0
  1028. package/lib/host-packages/cursor/openplanr/rules/planr-design.mdc +72 -0
  1029. package/lib/host-packages/cursor/openplanr/rules/planr-diagram/references/diagram-document.md +86 -0
  1030. package/lib/host-packages/cursor/openplanr/rules/planr-diagram/references/diagram-fidelity.md +19 -0
  1031. package/lib/host-packages/cursor/openplanr/rules/planr-diagram/references/diagram-intent-to-ir.md +22 -0
  1032. package/lib/host-packages/cursor/openplanr/rules/planr-diagram.mdc +64 -0
  1033. package/lib/host-packages/cursor/openplanr/rules/planr-doctor/references/upgrade.md +106 -0
  1034. package/lib/host-packages/cursor/openplanr/rules/planr-doctor.mdc +39 -0
  1035. package/lib/host-packages/cursor/openplanr/rules/planr-investigate.mdc +31 -0
  1036. package/lib/host-packages/cursor/openplanr/rules/planr-land.mdc +32 -0
  1037. package/lib/host-packages/cursor/openplanr/rules/planr-operate/scripts/errors.mjs +8 -0
  1038. package/lib/host-packages/cursor/openplanr/rules/planr-operate/scripts/operate-review-contract.mjs +438 -0
  1039. package/lib/host-packages/cursor/openplanr/rules/planr-operate/scripts/operate-review-note.mjs +595 -0
  1040. package/lib/host-packages/cursor/openplanr/rules/planr-operate/scripts/validate-note.mjs +31 -0
  1041. package/lib/host-packages/cursor/openplanr/rules/planr-operate.mdc +180 -0
  1042. package/lib/host-packages/cursor/openplanr/rules/planr-plan/references/artifact-contract.md +39 -0
  1043. package/lib/host-packages/cursor/openplanr/rules/planr-plan/schemas/design-document.schema.json +306 -0
  1044. package/lib/host-packages/cursor/openplanr/rules/planr-plan/schemas/design-review-context.schema.json +191 -0
  1045. package/lib/host-packages/cursor/openplanr/rules/planr-plan/schemas/design-review-handoff.schema.json +407 -0
  1046. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/design.mjs +17323 -0
  1047. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/planning-ids.mjs +120 -0
  1048. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/notices/entities.txt +13 -0
  1049. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/notices/parse5.txt +21 -0
  1050. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  1051. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  1052. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  1053. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  1054. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  1055. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  1056. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  1057. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/package.json +115 -0
  1058. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  1059. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  1060. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  1061. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  1062. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  1063. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  1064. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  1065. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  1066. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  1067. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  1068. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  1069. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  1070. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  1071. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  1072. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  1073. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  1074. package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  1075. package/lib/host-packages/cursor/openplanr/rules/planr-plan-review.mdc +38 -0
  1076. package/lib/host-packages/cursor/openplanr/rules/planr-plan.mdc +105 -0
  1077. package/lib/host-packages/cursor/openplanr/rules/planr-release/assets/changelog-template.md +18 -0
  1078. package/lib/host-packages/cursor/openplanr/rules/planr-release/assets/profile-template.md +45 -0
  1079. package/lib/host-packages/cursor/openplanr/rules/planr-release/references/cadence.md +92 -0
  1080. package/lib/host-packages/cursor/openplanr/rules/planr-release/references/release-notes.md +127 -0
  1081. package/lib/host-packages/cursor/openplanr/rules/planr-release/references/schemes.md +103 -0
  1082. package/lib/host-packages/cursor/openplanr/rules/planr-release/scripts/collect_changes.sh +85 -0
  1083. package/lib/host-packages/cursor/openplanr/rules/planr-release.mdc +179 -0
  1084. package/lib/host-packages/cursor/openplanr/rules/planr-ship/references/result-contract.md +14 -0
  1085. package/lib/host-packages/cursor/openplanr/rules/planr-ship/scripts/discover-verification.mjs +107 -0
  1086. package/lib/host-packages/cursor/openplanr/rules/planr-ship.mdc +79 -0
  1087. package/lib/host-packages/cursor/openplanr/rules/planr-spec/references/specification-contract.md +32 -0
  1088. package/lib/host-packages/cursor/openplanr/rules/planr-spec.mdc +52 -0
  1089. package/lib/host-packages/cursor/openplanr/rules/planr-status.mdc +20 -0
  1090. package/lib/host-packages/cursor/openplanr/rules/planr-sync/scripts/sync.mjs +230 -0
  1091. package/lib/host-packages/cursor/openplanr/rules/planr-sync.mdc +29 -0
  1092. package/lib/host-packages/openai/.claude-plugin/marketplace.json +19 -0
  1093. package/lib/host-packages/openai/openplanr/.codex-plugin/plugin.json +10 -0
  1094. package/lib/host-packages/openai/openplanr/.openplanr-content.json +1139 -0
  1095. package/lib/host-packages/openai/openplanr/skills/artifact/SKILL.md +54 -0
  1096. package/lib/host-packages/openai/openplanr/skills/artifact/agents/openai.yaml +6 -0
  1097. package/lib/host-packages/openai/openplanr/skills/artifact/openplanr.skill.json +48 -0
  1098. package/lib/host-packages/openai/openplanr/skills/artifact/references/company-review.md +18 -0
  1099. package/lib/host-packages/openai/openplanr/skills/artifact/references/design-sharing.md +51 -0
  1100. package/lib/host-packages/openai/openplanr/skills/browser-qa/SKILL.md +34 -0
  1101. package/lib/host-packages/openai/openplanr/skills/browser-qa/agents/openai.yaml +6 -0
  1102. package/lib/host-packages/openai/openplanr/skills/browser-qa/openplanr.skill.json +26 -0
  1103. package/lib/host-packages/openai/openplanr/skills/ceo-review/SKILL.md +47 -0
  1104. package/lib/host-packages/openai/openplanr/skills/ceo-review/agents/openai.yaml +6 -0
  1105. package/lib/host-packages/openai/openplanr/skills/ceo-review/openplanr.skill.json +81 -0
  1106. package/lib/host-packages/openai/openplanr/skills/ceo-review/references/operate-advisor-contract.md +111 -0
  1107. package/lib/host-packages/openai/openplanr/skills/ceo-review/scripts/errors.mjs +8 -0
  1108. package/lib/host-packages/openai/openplanr/skills/ceo-review/scripts/operate-review-contract.mjs +438 -0
  1109. package/lib/host-packages/openai/openplanr/skills/ceo-review/scripts/operate-review-note.mjs +595 -0
  1110. package/lib/host-packages/openai/openplanr/skills/ceo-review/scripts/validate-note.mjs +31 -0
  1111. package/lib/host-packages/openai/openplanr/skills/chair-review/SKILL.md +101 -0
  1112. package/lib/host-packages/openai/openplanr/skills/chair-review/agents/openai.yaml +6 -0
  1113. package/lib/host-packages/openai/openplanr/skills/chair-review/openplanr.skill.json +70 -0
  1114. package/lib/host-packages/openai/openplanr/skills/chair-review/scripts/errors.mjs +8 -0
  1115. package/lib/host-packages/openai/openplanr/skills/chair-review/scripts/operate-review-contract.mjs +438 -0
  1116. package/lib/host-packages/openai/openplanr/skills/chair-review/scripts/operate-review-note.mjs +595 -0
  1117. package/lib/host-packages/openai/openplanr/skills/chair-review/scripts/validate-note.mjs +31 -0
  1118. package/lib/host-packages/openai/openplanr/skills/challenger-review/SKILL.md +86 -0
  1119. package/lib/host-packages/openai/openplanr/skills/challenger-review/agents/openai.yaml +6 -0
  1120. package/lib/host-packages/openai/openplanr/skills/challenger-review/openplanr.skill.json +70 -0
  1121. package/lib/host-packages/openai/openplanr/skills/challenger-review/scripts/errors.mjs +8 -0
  1122. package/lib/host-packages/openai/openplanr/skills/challenger-review/scripts/operate-review-contract.mjs +438 -0
  1123. package/lib/host-packages/openai/openplanr/skills/challenger-review/scripts/operate-review-note.mjs +595 -0
  1124. package/lib/host-packages/openai/openplanr/skills/challenger-review/scripts/validate-note.mjs +31 -0
  1125. package/lib/host-packages/openai/openplanr/skills/cmo-review/SKILL.md +46 -0
  1126. package/lib/host-packages/openai/openplanr/skills/cmo-review/agents/openai.yaml +6 -0
  1127. package/lib/host-packages/openai/openplanr/skills/cmo-review/openplanr.skill.json +81 -0
  1128. package/lib/host-packages/openai/openplanr/skills/cmo-review/references/operate-advisor-contract.md +111 -0
  1129. package/lib/host-packages/openai/openplanr/skills/cmo-review/scripts/errors.mjs +8 -0
  1130. package/lib/host-packages/openai/openplanr/skills/cmo-review/scripts/operate-review-contract.mjs +438 -0
  1131. package/lib/host-packages/openai/openplanr/skills/cmo-review/scripts/operate-review-note.mjs +595 -0
  1132. package/lib/host-packages/openai/openplanr/skills/cmo-review/scripts/validate-note.mjs +31 -0
  1133. package/lib/host-packages/openai/openplanr/skills/coo-review/SKILL.md +45 -0
  1134. package/lib/host-packages/openai/openplanr/skills/coo-review/agents/openai.yaml +6 -0
  1135. package/lib/host-packages/openai/openplanr/skills/coo-review/openplanr.skill.json +81 -0
  1136. package/lib/host-packages/openai/openplanr/skills/coo-review/references/operate-advisor-contract.md +111 -0
  1137. package/lib/host-packages/openai/openplanr/skills/coo-review/scripts/errors.mjs +8 -0
  1138. package/lib/host-packages/openai/openplanr/skills/coo-review/scripts/operate-review-contract.mjs +438 -0
  1139. package/lib/host-packages/openai/openplanr/skills/coo-review/scripts/operate-review-note.mjs +595 -0
  1140. package/lib/host-packages/openai/openplanr/skills/coo-review/scripts/validate-note.mjs +31 -0
  1141. package/lib/host-packages/openai/openplanr/skills/cpo-review/SKILL.md +48 -0
  1142. package/lib/host-packages/openai/openplanr/skills/cpo-review/agents/openai.yaml +6 -0
  1143. package/lib/host-packages/openai/openplanr/skills/cpo-review/openplanr.skill.json +81 -0
  1144. package/lib/host-packages/openai/openplanr/skills/cpo-review/references/operate-advisor-contract.md +111 -0
  1145. package/lib/host-packages/openai/openplanr/skills/cpo-review/scripts/errors.mjs +8 -0
  1146. package/lib/host-packages/openai/openplanr/skills/cpo-review/scripts/operate-review-contract.mjs +438 -0
  1147. package/lib/host-packages/openai/openplanr/skills/cpo-review/scripts/operate-review-note.mjs +595 -0
  1148. package/lib/host-packages/openai/openplanr/skills/cpo-review/scripts/validate-note.mjs +31 -0
  1149. package/lib/host-packages/openai/openplanr/skills/cto-review/SKILL.md +47 -0
  1150. package/lib/host-packages/openai/openplanr/skills/cto-review/agents/openai.yaml +6 -0
  1151. package/lib/host-packages/openai/openplanr/skills/cto-review/openplanr.skill.json +81 -0
  1152. package/lib/host-packages/openai/openplanr/skills/cto-review/references/operate-advisor-contract.md +111 -0
  1153. package/lib/host-packages/openai/openplanr/skills/cto-review/scripts/errors.mjs +8 -0
  1154. package/lib/host-packages/openai/openplanr/skills/cto-review/scripts/operate-review-contract.mjs +438 -0
  1155. package/lib/host-packages/openai/openplanr/skills/cto-review/scripts/operate-review-note.mjs +595 -0
  1156. package/lib/host-packages/openai/openplanr/skills/cto-review/scripts/validate-note.mjs +31 -0
  1157. package/lib/host-packages/openai/openplanr/skills/dashboard/SKILL.md +20 -0
  1158. package/lib/host-packages/openai/openplanr/skills/dashboard/agents/openai.yaml +6 -0
  1159. package/lib/host-packages/openai/openplanr/skills/dashboard/openplanr.skill.json +26 -0
  1160. package/lib/host-packages/openai/openplanr/skills/design/SKILL.md +73 -0
  1161. package/lib/host-packages/openai/openplanr/skills/design/agents/openai.yaml +6 -0
  1162. package/lib/host-packages/openai/openplanr/skills/design/openplanr.skill.json +466 -0
  1163. package/lib/host-packages/openai/openplanr/skills/design/references/craft.md +68 -0
  1164. package/lib/host-packages/openai/openplanr/skills/design/references/design-spec-template.md +88 -0
  1165. package/lib/host-packages/openai/openplanr/skills/design/references/design-system.md +33 -0
  1166. package/lib/host-packages/openai/openplanr/skills/design/references/discovery.md +53 -0
  1167. package/lib/host-packages/openai/openplanr/skills/design/references/generation.md +105 -0
  1168. package/lib/host-packages/openai/openplanr/skills/design/references/handoff.md +47 -0
  1169. package/lib/host-packages/openai/openplanr/skills/design/references/review.md +88 -0
  1170. package/lib/host-packages/openai/openplanr/skills/design/references/team-review.md +131 -0
  1171. package/lib/host-packages/openai/openplanr/skills/design/references/utilities.md +93 -0
  1172. package/lib/host-packages/openai/openplanr/skills/design/schemas/design-document.schema.json +306 -0
  1173. package/lib/host-packages/openai/openplanr/skills/design/schemas/design-review-context.schema.json +191 -0
  1174. package/lib/host-packages/openai/openplanr/skills/design/schemas/design-review-handoff.schema.json +407 -0
  1175. package/lib/host-packages/openai/openplanr/skills/design/scripts/design.mjs +17323 -0
  1176. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/notices/entities.txt +13 -0
  1177. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/notices/parse5.txt +21 -0
  1178. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  1179. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  1180. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  1181. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  1182. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  1183. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  1184. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  1185. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/package.json +115 -0
  1186. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  1187. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  1188. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  1189. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  1190. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  1191. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  1192. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  1193. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  1194. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  1195. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  1196. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  1197. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  1198. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  1199. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  1200. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  1201. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  1202. package/lib/host-packages/openai/openplanr/skills/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  1203. package/lib/host-packages/openai/openplanr/skills/design-loop/SKILL.md +58 -0
  1204. package/lib/host-packages/openai/openplanr/skills/design-loop/agents/openai.yaml +6 -0
  1205. package/lib/host-packages/openai/openplanr/skills/design-loop/openplanr.skill.json +466 -0
  1206. package/lib/host-packages/openai/openplanr/skills/design-loop/references/craft.md +68 -0
  1207. package/lib/host-packages/openai/openplanr/skills/design-loop/references/design-spec-template.md +88 -0
  1208. package/lib/host-packages/openai/openplanr/skills/design-loop/references/design-system.md +33 -0
  1209. package/lib/host-packages/openai/openplanr/skills/design-loop/references/discovery.md +53 -0
  1210. package/lib/host-packages/openai/openplanr/skills/design-loop/references/generation.md +105 -0
  1211. package/lib/host-packages/openai/openplanr/skills/design-loop/references/handoff.md +47 -0
  1212. package/lib/host-packages/openai/openplanr/skills/design-loop/references/review.md +88 -0
  1213. package/lib/host-packages/openai/openplanr/skills/design-loop/references/team-review.md +131 -0
  1214. package/lib/host-packages/openai/openplanr/skills/design-loop/references/utilities.md +93 -0
  1215. package/lib/host-packages/openai/openplanr/skills/design-loop/schemas/design-document.schema.json +306 -0
  1216. package/lib/host-packages/openai/openplanr/skills/design-loop/schemas/design-review-context.schema.json +191 -0
  1217. package/lib/host-packages/openai/openplanr/skills/design-loop/schemas/design-review-handoff.schema.json +407 -0
  1218. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/design.mjs +17323 -0
  1219. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/notices/entities.txt +13 -0
  1220. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/notices/parse5.txt +21 -0
  1221. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  1222. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  1223. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  1224. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  1225. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  1226. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  1227. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  1228. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/package.json +115 -0
  1229. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  1230. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  1231. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  1232. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  1233. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  1234. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  1235. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  1236. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  1237. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  1238. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  1239. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  1240. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  1241. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  1242. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  1243. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  1244. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  1245. package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  1246. package/lib/host-packages/openai/openplanr/skills/design-review/SKILL.md +54 -0
  1247. package/lib/host-packages/openai/openplanr/skills/design-review/agents/openai.yaml +6 -0
  1248. package/lib/host-packages/openai/openplanr/skills/design-review/openplanr.skill.json +466 -0
  1249. package/lib/host-packages/openai/openplanr/skills/design-review/references/craft.md +68 -0
  1250. package/lib/host-packages/openai/openplanr/skills/design-review/references/design-spec-template.md +88 -0
  1251. package/lib/host-packages/openai/openplanr/skills/design-review/references/design-system.md +33 -0
  1252. package/lib/host-packages/openai/openplanr/skills/design-review/references/discovery.md +53 -0
  1253. package/lib/host-packages/openai/openplanr/skills/design-review/references/generation.md +105 -0
  1254. package/lib/host-packages/openai/openplanr/skills/design-review/references/handoff.md +47 -0
  1255. package/lib/host-packages/openai/openplanr/skills/design-review/references/review.md +88 -0
  1256. package/lib/host-packages/openai/openplanr/skills/design-review/references/team-review.md +131 -0
  1257. package/lib/host-packages/openai/openplanr/skills/design-review/references/utilities.md +93 -0
  1258. package/lib/host-packages/openai/openplanr/skills/design-review/schemas/design-document.schema.json +306 -0
  1259. package/lib/host-packages/openai/openplanr/skills/design-review/schemas/design-review-context.schema.json +191 -0
  1260. package/lib/host-packages/openai/openplanr/skills/design-review/schemas/design-review-handoff.schema.json +407 -0
  1261. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/design.mjs +17323 -0
  1262. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/notices/entities.txt +13 -0
  1263. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/notices/parse5.txt +21 -0
  1264. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  1265. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  1266. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  1267. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  1268. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  1269. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  1270. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  1271. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/package.json +115 -0
  1272. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  1273. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  1274. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  1275. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  1276. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  1277. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  1278. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  1279. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  1280. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  1281. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  1282. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  1283. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  1284. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  1285. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  1286. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  1287. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  1288. package/lib/host-packages/openai/openplanr/skills/design-review/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  1289. package/lib/host-packages/openai/openplanr/skills/diagram/SKILL.md +65 -0
  1290. package/lib/host-packages/openai/openplanr/skills/diagram/agents/openai.yaml +6 -0
  1291. package/lib/host-packages/openai/openplanr/skills/diagram/openplanr.skill.json +59 -0
  1292. package/lib/host-packages/openai/openplanr/skills/diagram/references/diagram-document.md +86 -0
  1293. package/lib/host-packages/openai/openplanr/skills/diagram/references/diagram-fidelity.md +19 -0
  1294. package/lib/host-packages/openai/openplanr/skills/diagram/references/diagram-intent-to-ir.md +22 -0
  1295. package/lib/host-packages/openai/openplanr/skills/doctor/SKILL.md +40 -0
  1296. package/lib/host-packages/openai/openplanr/skills/doctor/agents/openai.yaml +6 -0
  1297. package/lib/host-packages/openai/openplanr/skills/doctor/openplanr.skill.json +37 -0
  1298. package/lib/host-packages/openai/openplanr/skills/doctor/references/upgrade.md +106 -0
  1299. package/lib/host-packages/openai/openplanr/skills/investigate/SKILL.md +31 -0
  1300. package/lib/host-packages/openai/openplanr/skills/investigate/agents/openai.yaml +6 -0
  1301. package/lib/host-packages/openai/openplanr/skills/investigate/openplanr.skill.json +26 -0
  1302. package/lib/host-packages/openai/openplanr/skills/land/SKILL.md +33 -0
  1303. package/lib/host-packages/openai/openplanr/skills/land/agents/openai.yaml +6 -0
  1304. package/lib/host-packages/openai/openplanr/skills/land/openplanr.skill.json +26 -0
  1305. package/lib/host-packages/openai/openplanr/skills/operate/SKILL.md +181 -0
  1306. package/lib/host-packages/openai/openplanr/skills/operate/agents/openai.yaml +6 -0
  1307. package/lib/host-packages/openai/openplanr/skills/operate/openplanr.skill.json +70 -0
  1308. package/lib/host-packages/openai/openplanr/skills/operate/scripts/errors.mjs +8 -0
  1309. package/lib/host-packages/openai/openplanr/skills/operate/scripts/operate-review-contract.mjs +438 -0
  1310. package/lib/host-packages/openai/openplanr/skills/operate/scripts/operate-review-note.mjs +595 -0
  1311. package/lib/host-packages/openai/openplanr/skills/operate/scripts/validate-note.mjs +31 -0
  1312. package/lib/host-packages/openai/openplanr/skills/plan/SKILL.md +106 -0
  1313. package/lib/host-packages/openai/openplanr/skills/plan/agents/openai.yaml +6 -0
  1314. package/lib/host-packages/openai/openplanr/skills/plan/openplanr.skill.json +389 -0
  1315. package/lib/host-packages/openai/openplanr/skills/plan/references/artifact-contract.md +39 -0
  1316. package/lib/host-packages/openai/openplanr/skills/plan/schemas/design-document.schema.json +306 -0
  1317. package/lib/host-packages/openai/openplanr/skills/plan/schemas/design-review-context.schema.json +191 -0
  1318. package/lib/host-packages/openai/openplanr/skills/plan/schemas/design-review-handoff.schema.json +407 -0
  1319. package/lib/host-packages/openai/openplanr/skills/plan/scripts/design.mjs +17323 -0
  1320. package/lib/host-packages/openai/openplanr/skills/plan/scripts/planning-ids.mjs +120 -0
  1321. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/notices/entities.txt +13 -0
  1322. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/notices/parse5.txt +21 -0
  1323. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +3994 -0
  1324. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/enhancements.css +378 -0
  1325. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/enhancements.js +805 -0
  1326. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/share.css +1 -0
  1327. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/share.js +132 -0
  1328. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/studio.css +1103 -0
  1329. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/design/templates/studio/studio.js +1775 -0
  1330. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/package.json +115 -0
  1331. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/registry/artifact-theme.json +60 -0
  1332. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +90 -0
  1333. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
  1334. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +49 -0
  1335. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +97 -0
  1336. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-theme.schema.json +139 -0
  1337. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
  1338. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +191 -0
  1339. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
  1340. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
  1341. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
  1342. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-document.schema.json +306 -0
  1343. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
  1344. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
  1345. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
  1346. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
  1347. package/lib/host-packages/openai/openplanr/skills/plan/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
  1348. package/lib/host-packages/openai/openplanr/skills/plan-review/SKILL.md +39 -0
  1349. package/lib/host-packages/openai/openplanr/skills/plan-review/agents/openai.yaml +6 -0
  1350. package/lib/host-packages/openai/openplanr/skills/plan-review/openplanr.skill.json +26 -0
  1351. package/lib/host-packages/openai/openplanr/skills/release/SKILL.md +180 -0
  1352. package/lib/host-packages/openai/openplanr/skills/release/agents/openai.yaml +6 -0
  1353. package/lib/host-packages/openai/openplanr/skills/release/assets/changelog-template.md +18 -0
  1354. package/lib/host-packages/openai/openplanr/skills/release/assets/profile-template.md +45 -0
  1355. package/lib/host-packages/openai/openplanr/skills/release/openplanr.skill.json +92 -0
  1356. package/lib/host-packages/openai/openplanr/skills/release/references/cadence.md +92 -0
  1357. package/lib/host-packages/openai/openplanr/skills/release/references/release-notes.md +127 -0
  1358. package/lib/host-packages/openai/openplanr/skills/release/references/schemes.md +103 -0
  1359. package/lib/host-packages/openai/openplanr/skills/release/scripts/collect_changes.sh +85 -0
  1360. package/lib/host-packages/openai/openplanr/skills/ship/SKILL.md +80 -0
  1361. package/lib/host-packages/openai/openplanr/skills/ship/agents/openai.yaml +6 -0
  1362. package/lib/host-packages/openai/openplanr/skills/ship/openplanr.skill.json +48 -0
  1363. package/lib/host-packages/openai/openplanr/skills/ship/references/result-contract.md +14 -0
  1364. package/lib/host-packages/openai/openplanr/skills/ship/scripts/discover-verification.mjs +107 -0
  1365. package/lib/host-packages/openai/openplanr/skills/spec/SKILL.md +53 -0
  1366. package/lib/host-packages/openai/openplanr/skills/spec/agents/openai.yaml +6 -0
  1367. package/lib/host-packages/openai/openplanr/skills/spec/openplanr.skill.json +37 -0
  1368. package/lib/host-packages/openai/openplanr/skills/spec/references/specification-contract.md +32 -0
  1369. package/lib/host-packages/openai/openplanr/skills/status/SKILL.md +21 -0
  1370. package/lib/host-packages/openai/openplanr/skills/status/agents/openai.yaml +6 -0
  1371. package/lib/host-packages/openai/openplanr/skills/status/openplanr.skill.json +26 -0
  1372. package/lib/host-packages/openai/openplanr/skills/sync/SKILL.md +30 -0
  1373. package/lib/host-packages/openai/openplanr/skills/sync/agents/openai.yaml +6 -0
  1374. package/lib/host-packages/openai/openplanr/skills/sync/openplanr.skill.json +37 -0
  1375. package/lib/host-packages/openai/openplanr/skills/sync/scripts/sync.mjs +230 -0
  1376. package/lib/integrations.d.mts +43 -0
  1377. package/lib/integrations.mjs +230 -0
  1378. package/lib/skill-runtime/errors.mjs +8 -0
  1379. package/lib/skill-runtime/operate-review-contract.mjs +438 -0
  1380. package/lib/skill-runtime/operate-review-note.mjs +595 -0
  1381. package/package.json +56 -18
  1382. package/dist/ai/codebase/context-builder.d.ts +0 -50
  1383. package/dist/ai/codebase/context-builder.d.ts.map +0 -1
  1384. package/dist/ai/codebase/context-builder.js +0 -281
  1385. package/dist/ai/codebase/context-builder.js.map +0 -1
  1386. package/dist/ai/codebase/file-reader.d.ts +0 -22
  1387. package/dist/ai/codebase/file-reader.d.ts.map +0 -1
  1388. package/dist/ai/codebase/file-reader.js +0 -144
  1389. package/dist/ai/codebase/file-reader.js.map +0 -1
  1390. package/dist/ai/codebase/index.d.ts +0 -7
  1391. package/dist/ai/codebase/index.d.ts.map +0 -1
  1392. package/dist/ai/codebase/index.js +0 -7
  1393. package/dist/ai/codebase/index.js.map +0 -1
  1394. package/dist/ai/codebase/pattern-rules.d.ts +0 -28
  1395. package/dist/ai/codebase/pattern-rules.d.ts.map +0 -1
  1396. package/dist/ai/codebase/pattern-rules.js +0 -186
  1397. package/dist/ai/codebase/pattern-rules.js.map +0 -1
  1398. package/dist/ai/codebase/rules-reader.d.ts +0 -14
  1399. package/dist/ai/codebase/rules-reader.d.ts.map +0 -1
  1400. package/dist/ai/codebase/rules-reader.js +0 -25
  1401. package/dist/ai/codebase/rules-reader.js.map +0 -1
  1402. package/dist/ai/codebase/stack-detector.d.ts +0 -18
  1403. package/dist/ai/codebase/stack-detector.d.ts.map +0 -1
  1404. package/dist/ai/codebase/stack-detector.js +0 -173
  1405. package/dist/ai/codebase/stack-detector.js.map +0 -1
  1406. package/dist/ai/codebase/tree-generator.d.ts +0 -8
  1407. package/dist/ai/codebase/tree-generator.d.ts.map +0 -1
  1408. package/dist/ai/codebase/tree-generator.js +0 -84
  1409. package/dist/ai/codebase/tree-generator.js.map +0 -1
  1410. package/dist/ai/errors.d.ts +0 -22
  1411. package/dist/ai/errors.d.ts.map +0 -1
  1412. package/dist/ai/errors.js +0 -72
  1413. package/dist/ai/errors.js.map +0 -1
  1414. package/dist/ai/index.d.ts +0 -11
  1415. package/dist/ai/index.d.ts.map +0 -1
  1416. package/dist/ai/index.js +0 -10
  1417. package/dist/ai/index.js.map +0 -1
  1418. package/dist/ai/prompts/prompt-builder.d.ts +0 -134
  1419. package/dist/ai/prompts/prompt-builder.d.ts.map +0 -1
  1420. package/dist/ai/prompts/prompt-builder.js +0 -295
  1421. package/dist/ai/prompts/prompt-builder.js.map +0 -1
  1422. package/dist/ai/prompts/system-prompts.d.ts +0 -41
  1423. package/dist/ai/prompts/system-prompts.d.ts.map +0 -1
  1424. package/dist/ai/prompts/system-prompts.js +0 -512
  1425. package/dist/ai/prompts/system-prompts.js.map +0 -1
  1426. package/dist/ai/provider-factory.d.ts +0 -10
  1427. package/dist/ai/provider-factory.d.ts.map +0 -1
  1428. package/dist/ai/provider-factory.js +0 -49
  1429. package/dist/ai/provider-factory.js.map +0 -1
  1430. package/dist/ai/providers/anthropic-provider.d.ts +0 -24
  1431. package/dist/ai/providers/anthropic-provider.d.ts.map +0 -1
  1432. package/dist/ai/providers/anthropic-provider.js +0 -97
  1433. package/dist/ai/providers/anthropic-provider.js.map +0 -1
  1434. package/dist/ai/providers/ollama-provider.d.ts +0 -13
  1435. package/dist/ai/providers/ollama-provider.d.ts.map +0 -1
  1436. package/dist/ai/providers/ollama-provider.js +0 -16
  1437. package/dist/ai/providers/ollama-provider.js.map +0 -1
  1438. package/dist/ai/providers/openai-provider.d.ts +0 -19
  1439. package/dist/ai/providers/openai-provider.d.ts.map +0 -1
  1440. package/dist/ai/providers/openai-provider.js +0 -84
  1441. package/dist/ai/providers/openai-provider.js.map +0 -1
  1442. package/dist/ai/schemas/ai-response-schemas.d.ts +0 -340
  1443. package/dist/ai/schemas/ai-response-schemas.d.ts.map +0 -1
  1444. package/dist/ai/schemas/ai-response-schemas.js +0 -278
  1445. package/dist/ai/schemas/ai-response-schemas.js.map +0 -1
  1446. package/dist/ai/types.d.ts +0 -76
  1447. package/dist/ai/types.d.ts.map +0 -1
  1448. package/dist/ai/types.js +0 -49
  1449. package/dist/ai/types.js.map +0 -1
  1450. package/dist/ai/validation/index.d.ts +0 -2
  1451. package/dist/ai/validation/index.d.ts.map +0 -1
  1452. package/dist/ai/validation/index.js +0 -2
  1453. package/dist/ai/validation/index.js.map +0 -1
  1454. package/dist/ai/validation/task-validator.d.ts +0 -37
  1455. package/dist/ai/validation/task-validator.d.ts.map +0 -1
  1456. package/dist/ai/validation/task-validator.js +0 -81
  1457. package/dist/ai/validation/task-validator.js.map +0 -1
  1458. package/dist/cli/commands/config.d.ts +0 -8
  1459. package/dist/cli/commands/config.d.ts.map +0 -1
  1460. package/dist/cli/commands/config.js +0 -224
  1461. package/dist/cli/commands/config.js.map +0 -1
  1462. package/dist/cli/commands/estimate.d.ts +0 -3
  1463. package/dist/cli/commands/estimate.d.ts.map +0 -1
  1464. package/dist/cli/commands/estimate.js +0 -368
  1465. package/dist/cli/commands/estimate.js.map +0 -1
  1466. package/dist/cli/commands/init.d.ts +0 -9
  1467. package/dist/cli/commands/init.d.ts.map +0 -1
  1468. package/dist/cli/commands/init.js +0 -166
  1469. package/dist/cli/commands/init.js.map +0 -1
  1470. package/dist/cli/commands/pipeline.d.ts +0 -3
  1471. package/dist/cli/commands/pipeline.d.ts.map +0 -1
  1472. package/dist/cli/commands/pipeline.js +0 -59
  1473. package/dist/cli/commands/pipeline.js.map +0 -1
  1474. package/dist/cli/commands/plan.d.ts +0 -15
  1475. package/dist/cli/commands/plan.d.ts.map +0 -1
  1476. package/dist/cli/commands/plan.js +0 -444
  1477. package/dist/cli/commands/plan.js.map +0 -1
  1478. package/dist/cli/commands/refine.d.ts +0 -10
  1479. package/dist/cli/commands/refine.d.ts.map +0 -1
  1480. package/dist/cli/commands/refine.js +0 -226
  1481. package/dist/cli/commands/refine.js.map +0 -1
  1482. package/dist/cli/commands/revise.d.ts +0 -24
  1483. package/dist/cli/commands/revise.d.ts.map +0 -1
  1484. package/dist/cli/commands/revise.js +0 -572
  1485. package/dist/cli/commands/revise.js.map +0 -1
  1486. package/dist/cli/helpers/task-creation.d.ts +0 -89
  1487. package/dist/cli/helpers/task-creation.d.ts.map +0 -1
  1488. package/dist/cli/helpers/task-creation.js +0 -139
  1489. package/dist/cli/helpers/task-creation.js.map +0 -1
  1490. package/dist/services/ai-service.d.ts +0 -77
  1491. package/dist/services/ai-service.d.ts.map +0 -1
  1492. package/dist/services/ai-service.js +0 -241
  1493. package/dist/services/ai-service.js.map +0 -1
  1494. package/dist/services/artifact-gathering.d.ts +0 -55
  1495. package/dist/services/artifact-gathering.d.ts.map +0 -1
  1496. package/dist/services/artifact-gathering.js +0 -147
  1497. package/dist/services/artifact-gathering.js.map +0 -1
  1498. package/dist/services/operate/advisors.d.ts +0 -625
  1499. package/dist/services/operate/advisors.d.ts.map +0 -1
  1500. package/dist/services/operate/advisors.js +0 -1545
  1501. package/dist/services/operate/advisors.js.map +0 -1
  1502. package/dist/services/operate/artifact-route-generation.d.ts +0 -111
  1503. package/dist/services/operate/artifact-route-generation.d.ts.map +0 -1
  1504. package/dist/services/operate/artifact-route-generation.js +0 -460
  1505. package/dist/services/operate/artifact-route-generation.js.map +0 -1
  1506. package/dist/services/operate/artifacts.d.ts +0 -66
  1507. package/dist/services/operate/artifacts.d.ts.map +0 -1
  1508. package/dist/services/operate/artifacts.js +0 -336
  1509. package/dist/services/operate/artifacts.js.map +0 -1
  1510. package/dist/services/operate/cadence.d.ts +0 -50
  1511. package/dist/services/operate/cadence.d.ts.map +0 -1
  1512. package/dist/services/operate/cadence.js +0 -56
  1513. package/dist/services/operate/cadence.js.map +0 -1
  1514. package/dist/services/operate/canonical.d.ts +0 -18
  1515. package/dist/services/operate/canonical.d.ts.map +0 -1
  1516. package/dist/services/operate/canonical.js +0 -157
  1517. package/dist/services/operate/canonical.js.map +0 -1
  1518. package/dist/services/operate/citation-resolution.d.ts +0 -161
  1519. package/dist/services/operate/citation-resolution.d.ts.map +0 -1
  1520. package/dist/services/operate/citation-resolution.js +0 -593
  1521. package/dist/services/operate/citation-resolution.js.map +0 -1
  1522. package/dist/services/operate/completion.d.ts +0 -80
  1523. package/dist/services/operate/completion.d.ts.map +0 -1
  1524. package/dist/services/operate/completion.js +0 -279
  1525. package/dist/services/operate/completion.js.map +0 -1
  1526. package/dist/services/operate/config.d.ts +0 -154
  1527. package/dist/services/operate/config.d.ts.map +0 -1
  1528. package/dist/services/operate/config.js +0 -791
  1529. package/dist/services/operate/config.js.map +0 -1
  1530. package/dist/services/operate/consolidation.d.ts +0 -18
  1531. package/dist/services/operate/consolidation.d.ts.map +0 -1
  1532. package/dist/services/operate/consolidation.js +0 -539
  1533. package/dist/services/operate/consolidation.js.map +0 -1
  1534. package/dist/services/operate/context-research.d.ts +0 -84
  1535. package/dist/services/operate/context-research.d.ts.map +0 -1
  1536. package/dist/services/operate/context-research.js +0 -448
  1537. package/dist/services/operate/context-research.js.map +0 -1
  1538. package/dist/services/operate/decision-brief.d.ts +0 -237
  1539. package/dist/services/operate/decision-brief.d.ts.map +0 -1
  1540. package/dist/services/operate/decision-brief.js +0 -368
  1541. package/dist/services/operate/decision-brief.js.map +0 -1
  1542. package/dist/services/operate/doctor.d.ts +0 -85
  1543. package/dist/services/operate/doctor.d.ts.map +0 -1
  1544. package/dist/services/operate/doctor.js +0 -1070
  1545. package/dist/services/operate/doctor.js.map +0 -1
  1546. package/dist/services/operate/drafts.d.ts +0 -48
  1547. package/dist/services/operate/drafts.d.ts.map +0 -1
  1548. package/dist/services/operate/drafts.js +0 -398
  1549. package/dist/services/operate/drafts.js.map +0 -1
  1550. package/dist/services/operate/engine.d.ts +0 -151
  1551. package/dist/services/operate/engine.d.ts.map +0 -1
  1552. package/dist/services/operate/engine.js +0 -1896
  1553. package/dist/services/operate/engine.js.map +0 -1
  1554. package/dist/services/operate/event-store.d.ts +0 -113
  1555. package/dist/services/operate/event-store.d.ts.map +0 -1
  1556. package/dist/services/operate/event-store.js +0 -384
  1557. package/dist/services/operate/event-store.js.map +0 -1
  1558. package/dist/services/operate/evidence-cache.d.ts +0 -41
  1559. package/dist/services/operate/evidence-cache.d.ts.map +0 -1
  1560. package/dist/services/operate/evidence-cache.js +0 -193
  1561. package/dist/services/operate/evidence-cache.js.map +0 -1
  1562. package/dist/services/operate/evidence-import.d.ts +0 -40
  1563. package/dist/services/operate/evidence-import.d.ts.map +0 -1
  1564. package/dist/services/operate/evidence-import.js +0 -340
  1565. package/dist/services/operate/evidence-import.js.map +0 -1
  1566. package/dist/services/operate/evidence.d.ts +0 -21
  1567. package/dist/services/operate/evidence.d.ts.map +0 -1
  1568. package/dist/services/operate/evidence.js +0 -20
  1569. package/dist/services/operate/evidence.js.map +0 -1
  1570. package/dist/services/operate/ids.d.ts +0 -7
  1571. package/dist/services/operate/ids.d.ts.map +0 -1
  1572. package/dist/services/operate/ids.js +0 -23
  1573. package/dist/services/operate/ids.js.map +0 -1
  1574. package/dist/services/operate/index.d.ts +0 -16
  1575. package/dist/services/operate/index.d.ts.map +0 -1
  1576. package/dist/services/operate/index.js +0 -1864
  1577. package/dist/services/operate/index.js.map +0 -1
  1578. package/dist/services/operate/integrity.d.ts +0 -81
  1579. package/dist/services/operate/integrity.d.ts.map +0 -1
  1580. package/dist/services/operate/integrity.js +0 -152
  1581. package/dist/services/operate/integrity.js.map +0 -1
  1582. package/dist/services/operate/interaction/action-service.d.ts +0 -34
  1583. package/dist/services/operate/interaction/action-service.d.ts.map +0 -1
  1584. package/dist/services/operate/interaction/action-service.js +0 -103
  1585. package/dist/services/operate/interaction/action-service.js.map +0 -1
  1586. package/dist/services/operate/interaction/answer-service.d.ts +0 -40
  1587. package/dist/services/operate/interaction/answer-service.d.ts.map +0 -1
  1588. package/dist/services/operate/interaction/answer-service.js +0 -317
  1589. package/dist/services/operate/interaction/answer-service.js.map +0 -1
  1590. package/dist/services/operate/interaction/charter-suggestions.d.ts +0 -29
  1591. package/dist/services/operate/interaction/charter-suggestions.d.ts.map +0 -1
  1592. package/dist/services/operate/interaction/charter-suggestions.js +0 -104
  1593. package/dist/services/operate/interaction/charter-suggestions.js.map +0 -1
  1594. package/dist/services/operate/interaction/confirmation-service.d.ts +0 -30
  1595. package/dist/services/operate/interaction/confirmation-service.d.ts.map +0 -1
  1596. package/dist/services/operate/interaction/confirmation-service.js +0 -78
  1597. package/dist/services/operate/interaction/confirmation-service.js.map +0 -1
  1598. package/dist/services/operate/interaction/initialization-replay.d.ts +0 -9
  1599. package/dist/services/operate/interaction/initialization-replay.d.ts.map +0 -1
  1600. package/dist/services/operate/interaction/initialization-replay.js +0 -64
  1601. package/dist/services/operate/interaction/initialization-replay.js.map +0 -1
  1602. package/dist/services/operate/interaction/question-engine.d.ts +0 -41
  1603. package/dist/services/operate/interaction/question-engine.d.ts.map +0 -1
  1604. package/dist/services/operate/interaction/question-engine.js +0 -434
  1605. package/dist/services/operate/interaction/question-engine.js.map +0 -1
  1606. package/dist/services/operate/interaction/question-registry.d.ts +0 -52
  1607. package/dist/services/operate/interaction/question-registry.d.ts.map +0 -1
  1608. package/dist/services/operate/interaction/question-registry.js +0 -305
  1609. package/dist/services/operate/interaction/question-registry.js.map +0 -1
  1610. package/dist/services/operate/interaction/session-service.d.ts +0 -55
  1611. package/dist/services/operate/interaction/session-service.d.ts.map +0 -1
  1612. package/dist/services/operate/interaction/session-service.js +0 -304
  1613. package/dist/services/operate/interaction/session-service.js.map +0 -1
  1614. package/dist/services/operate/interaction/terminal-renderer.d.ts +0 -19
  1615. package/dist/services/operate/interaction/terminal-renderer.d.ts.map +0 -1
  1616. package/dist/services/operate/interaction/terminal-renderer.js +0 -124
  1617. package/dist/services/operate/interaction/terminal-renderer.js.map +0 -1
  1618. package/dist/services/operate/journal.d.ts +0 -34
  1619. package/dist/services/operate/journal.d.ts.map +0 -1
  1620. package/dist/services/operate/journal.js +0 -235
  1621. package/dist/services/operate/journal.js.map +0 -1
  1622. package/dist/services/operate/legacy-import-service.d.ts +0 -58
  1623. package/dist/services/operate/legacy-import-service.d.ts.map +0 -1
  1624. package/dist/services/operate/legacy-import-service.js +0 -922
  1625. package/dist/services/operate/legacy-import-service.js.map +0 -1
  1626. package/dist/services/operate/lifecycle-driver.d.ts +0 -309
  1627. package/dist/services/operate/lifecycle-driver.d.ts.map +0 -1
  1628. package/dist/services/operate/lifecycle-driver.js +0 -434
  1629. package/dist/services/operate/lifecycle-driver.js.map +0 -1
  1630. package/dist/services/operate/lifecycle.d.ts +0 -96
  1631. package/dist/services/operate/lifecycle.d.ts.map +0 -1
  1632. package/dist/services/operate/lifecycle.js +0 -596
  1633. package/dist/services/operate/lifecycle.js.map +0 -1
  1634. package/dist/services/operate/lock-service.d.ts +0 -37
  1635. package/dist/services/operate/lock-service.d.ts.map +0 -1
  1636. package/dist/services/operate/lock-service.js +0 -215
  1637. package/dist/services/operate/lock-service.js.map +0 -1
  1638. package/dist/services/operate/maintenance.d.ts +0 -139
  1639. package/dist/services/operate/maintenance.d.ts.map +0 -1
  1640. package/dist/services/operate/maintenance.js +0 -2200
  1641. package/dist/services/operate/maintenance.js.map +0 -1
  1642. package/dist/services/operate/migration.d.ts +0 -68
  1643. package/dist/services/operate/migration.d.ts.map +0 -1
  1644. package/dist/services/operate/migration.js +0 -243
  1645. package/dist/services/operate/migration.js.map +0 -1
  1646. package/dist/services/operate/mission-dispatch.d.ts +0 -271
  1647. package/dist/services/operate/mission-dispatch.d.ts.map +0 -1
  1648. package/dist/services/operate/mission-dispatch.js +0 -590
  1649. package/dist/services/operate/mission-dispatch.js.map +0 -1
  1650. package/dist/services/operate/outcomes.d.ts +0 -48
  1651. package/dist/services/operate/outcomes.d.ts.map +0 -1
  1652. package/dist/services/operate/outcomes.js +0 -312
  1653. package/dist/services/operate/outcomes.js.map +0 -1
  1654. package/dist/services/operate/pipeline-handoff.d.ts +0 -138
  1655. package/dist/services/operate/pipeline-handoff.d.ts.map +0 -1
  1656. package/dist/services/operate/pipeline-handoff.js +0 -175
  1657. package/dist/services/operate/pipeline-handoff.js.map +0 -1
  1658. package/dist/services/operate/profile-migration.d.ts +0 -69
  1659. package/dist/services/operate/profile-migration.d.ts.map +0 -1
  1660. package/dist/services/operate/profile-migration.js +0 -462
  1661. package/dist/services/operate/profile-migration.js.map +0 -1
  1662. package/dist/services/operate/projection-persistence.d.ts +0 -126
  1663. package/dist/services/operate/projection-persistence.d.ts.map +0 -1
  1664. package/dist/services/operate/projection-persistence.js +0 -752
  1665. package/dist/services/operate/projection-persistence.js.map +0 -1
  1666. package/dist/services/operate/projection.d.ts +0 -37
  1667. package/dist/services/operate/projection.d.ts.map +0 -1
  1668. package/dist/services/operate/projection.js +0 -209
  1669. package/dist/services/operate/projection.js.map +0 -1
  1670. package/dist/services/operate/protocol.d.ts +0 -86
  1671. package/dist/services/operate/protocol.d.ts.map +0 -1
  1672. package/dist/services/operate/protocol.js +0 -76
  1673. package/dist/services/operate/protocol.js.map +0 -1
  1674. package/dist/services/operate/read-only-providers.d.ts +0 -76
  1675. package/dist/services/operate/read-only-providers.d.ts.map +0 -1
  1676. package/dist/services/operate/read-only-providers.js +0 -421
  1677. package/dist/services/operate/read-only-providers.js.map +0 -1
  1678. package/dist/services/operate/redaction.d.ts +0 -74
  1679. package/dist/services/operate/redaction.d.ts.map +0 -1
  1680. package/dist/services/operate/redaction.js +0 -406
  1681. package/dist/services/operate/redaction.js.map +0 -1
  1682. package/dist/services/operate/reducer.d.ts +0 -10
  1683. package/dist/services/operate/reducer.d.ts.map +0 -1
  1684. package/dist/services/operate/reducer.js +0 -11
  1685. package/dist/services/operate/reducer.js.map +0 -1
  1686. package/dist/services/operate/report-html.d.ts +0 -32
  1687. package/dist/services/operate/report-html.d.ts.map +0 -1
  1688. package/dist/services/operate/report-html.js +0 -289
  1689. package/dist/services/operate/report-html.js.map +0 -1
  1690. package/dist/services/operate/reports.d.ts +0 -72
  1691. package/dist/services/operate/reports.d.ts.map +0 -1
  1692. package/dist/services/operate/reports.js +0 -481
  1693. package/dist/services/operate/reports.js.map +0 -1
  1694. package/dist/services/operate/routes.d.ts +0 -133
  1695. package/dist/services/operate/routes.d.ts.map +0 -1
  1696. package/dist/services/operate/routes.js +0 -1577
  1697. package/dist/services/operate/routes.js.map +0 -1
  1698. package/dist/services/operate/scratch.d.ts +0 -81
  1699. package/dist/services/operate/scratch.d.ts.map +0 -1
  1700. package/dist/services/operate/scratch.js +0 -190
  1701. package/dist/services/operate/scratch.js.map +0 -1
  1702. package/dist/services/operate/shipment-observer.d.ts +0 -14
  1703. package/dist/services/operate/shipment-observer.d.ts.map +0 -1
  1704. package/dist/services/operate/shipment-observer.js +0 -320
  1705. package/dist/services/operate/shipment-observer.js.map +0 -1
  1706. package/dist/services/operate/stalled-item-service.d.ts +0 -18
  1707. package/dist/services/operate/stalled-item-service.d.ts.map +0 -1
  1708. package/dist/services/operate/stalled-item-service.js +0 -121
  1709. package/dist/services/operate/stalled-item-service.js.map +0 -1
  1710. package/dist/services/operate/subprocess-env.d.ts +0 -4
  1711. package/dist/services/operate/subprocess-env.d.ts.map +0 -1
  1712. package/dist/services/operate/subprocess-env.js +0 -45
  1713. package/dist/services/operate/subprocess-env.js.map +0 -1
  1714. package/dist/services/operate/types.d.ts +0 -1064
  1715. package/dist/services/operate/types.d.ts.map +0 -1
  1716. package/dist/services/operate/types.js +0 -27
  1717. package/dist/services/operate/types.js.map +0 -1
  1718. package/dist/services/operate/workspace.d.ts +0 -76
  1719. package/dist/services/operate/workspace.d.ts.map +0 -1
  1720. package/dist/services/operate/workspace.js +0 -350
  1721. package/dist/services/operate/workspace.js.map +0 -1
  1722. package/dist/services/revise-service.d.ts +0 -115
  1723. package/dist/services/revise-service.d.ts.map +0 -1
  1724. package/dist/services/revise-service.js +0 -294
  1725. package/dist/services/revise-service.js.map +0 -1
  1726. package/dist/templates/rules/claude/planr-pipeline.md.hbs +0 -69
  1727. package/dist/templates/rules/codex/_pipeline-section.md.hbs +0 -154
  1728. package/dist/templates/rules/cursor/agents/backend-agent.md +0 -299
  1729. package/dist/templates/rules/cursor/agents/db-agent.md +0 -163
  1730. package/dist/templates/rules/cursor/agents/designer-agent.md +0 -219
  1731. package/dist/templates/rules/cursor/agents/devops-agent.md +0 -197
  1732. package/dist/templates/rules/cursor/agents/doc-gen-agent.md +0 -203
  1733. package/dist/templates/rules/cursor/agents/frontend-agent.md +0 -220
  1734. package/dist/templates/rules/cursor/agents/qa-agent.md +0 -170
  1735. package/dist/templates/rules/cursor/agents/specification-agent.md +0 -282
  1736. package/dist/templates/rules/cursor/planr-pipeline-plan.mdc.hbs +0 -196
  1737. package/dist/templates/rules/cursor/planr-pipeline-ship.mdc.hbs +0 -246
  1738. package/dist/templates/rules/cursor/planr-pipeline.mdc.hbs +0 -134
@@ -1,1864 +0,0 @@
1
- import { readFile } from 'node:fs/promises';
2
- import path from 'node:path';
3
- import { resolveAIProviderReadiness } from '../ai-service.js';
4
- import { loadConfig } from '../config-service.js';
5
- import { computeNextDueAt } from './cadence.js';
6
- import { canonicalDigest, sha256Digest } from './canonical.js';
7
- import { verifyOperatingCompletionPhases } from './completion.js';
8
- import { applyOperatingInitialization, getOperatingProfile, listOperatingProfiles, normalizeCustomOperatingProfile, normalizeOperatingInitializationAnswers, prepareOperatingInitialization, readOperatingLastRunAt, validateOperatingConfiguration, } from './config.js';
9
- import { operatingInitializationAnswersFromResearch, prepareOperatingContextResearch, readOperatingContextResearch, recordOperatingContextResearch, } from './context-research.js';
10
- import { approveOperatingDraft, discardOperatingDraft, listOperatingDrafts, materializeOperatingDrafts, showOperatingDraft, } from './drafts.js';
11
- import { runOperatingCycle } from './engine.js';
12
- import { OperatingEventStore } from './event-store.js';
13
- import { parseStrictJson } from './evidence-import.js';
14
- import { createOperatingAction } from './interaction/action-service.js';
15
- import { persistableOperatingInitAnswers, probeGitUserName, probePipelineInstalled, resumeGuidedSession, submitGuidedAnswers, } from './interaction/answer-service.js';
16
- import { assertOperatingConfirmation } from './interaction/confirmation-service.js';
17
- import { decodeOperatingInitializationReplay, encodeOperatingInitializationReplay, } from './interaction/initialization-replay.js';
18
- import { createOperatingInitQuestionnaire, evaluateOperatingInitQuestions, operatingInitAnswersFromOptions, } from './interaction/question-engine.js';
19
- import { cancelGuidedSession, createGuidedSession, createGuidedSessionId, currentGuidedSessionBindings, updateGuidedSession, } from './interaction/session-service.js';
20
- import { assertCommittedOperatingView } from './journal.js';
21
- import { applyOperatingMigration, inspectOperatingMigration, rollbackOperatingMigration, } from './legacy-import-service.js';
22
- import { answerOperatingGap, applyOrRollbackRoute, decideOperatingDecision, governOperatingFinding, readOperatingCollection, readOperatingReview, transitionOperatingCycle, verifyOperatingGap, } from './lifecycle.js';
23
- import { createOperatingAdapterStartHandoff, exportOperatingDiagnostics, operateAdapterLifecycle, operatingCacheAction, operatingIntegrityAction, purgeBoardMachineLocalCaches, readPersistedOperatingRoleResults, reapStalledOperatingRoles, repairOperatingSecurity, } from './maintenance.js';
24
- import { migrateOperatingStorageLayoutOnOpen } from './migration.js';
25
- import { applyOperatingProfileMigration, inspectOperatingProfileMigration, } from './profile-migration.js';
26
- import { OPERATING_BOARD_ROLES, renderOperatingBrief } from './projection.js';
27
- import { persistOperatingProjections } from './projection-persistence.js';
28
- import { loadOperatingProtocol, resolveOperatingPipelineRoot } from './protocol.js';
29
- import { readOperatingReport } from './reports.js';
30
- import { OPERATE_AGENT_PROTOCOL_VERSION, OperateError, } from './types.js';
31
- import { assertOperatingProject, resolveContainedPath, resolveOperatingPaths, } from './workspace.js';
32
- export { canonicalDigest, canonicalize, sha256Digest, } from './canonical.js';
33
- export { OperatingEventStore } from './event-store.js';
34
- export { acquireOperatingLock, recoverStaleOperatingLock, withOperatingLock, } from './lock-service.js';
35
- export { assertOperatingProjectionsCurrent, inspectOperatingProjectionDrift, persistOperatingProjections, prepareOperatingProjectionPersistence, renderOperatingProjectionFiles, } from './projection-persistence.js';
36
- export { assertOperatingArtifact, loadOperatingProtocol, operatingPipelineAvailable, } from './protocol.js';
37
- function option(request, name, fallback) {
38
- return request.options[name] ?? fallback;
39
- }
40
- function argument(request, name) {
41
- const value = request.arguments?.[name];
42
- return typeof value === 'string' ? value : undefined;
43
- }
44
- function stringList(value) {
45
- if (Array.isArray(value))
46
- return value
47
- .map(String)
48
- .map((entry) => entry.trim())
49
- .filter(Boolean);
50
- if (typeof value === 'string')
51
- return value
52
- .split(',')
53
- .map((entry) => entry.trim())
54
- .filter(Boolean);
55
- return [];
56
- }
57
- /**
58
- * Probe the coding-runtime identity of the host process from the environment
59
- * markers set by the agent that launched the CLI. Mirrors the compatible-runtime
60
- * detection in terminal-renderer.ts's `detectOperatingQuestionContext`, but keys
61
- * off the launcher's env markers so a non-interactive/JSON invocation can stamp a
62
- * truthful adapter block and resolve `auto` instead of stamping `unknown`/`none`
63
- * or silently disabling native dispatch.
64
- */
65
- function detectOperatingHostRuntime() {
66
- const env = process.env;
67
- const marker = (value) => (value ?? '').length > 0;
68
- if (marker(env.CLAUDECODE) || marker(env.CLAUDE_CODE_ENTRYPOINT))
69
- return 'claude';
70
- if (marker(env.CURSOR_TRACE_ID) || marker(env.CURSOR_AGENT))
71
- return 'cursor';
72
- if (marker(env.CODEX_SANDBOX) || marker(env.CODEX_HOME))
73
- return 'codex';
74
- return undefined;
75
- }
76
- async function resolvedOperatingRuntime(projectRoot, requested) {
77
- if (requested !== 'auto')
78
- return requested === 'claude' ? 'claude-code' : requested;
79
- const persisted = await readFile(path.join(resolveOperatingPaths(projectRoot).localRoot, 'preferences.json'), 'utf8')
80
- .then((raw) => {
81
- const runtime = JSON.parse(raw).runtime;
82
- return typeof runtime === 'string' && runtime ? runtime : 'auto';
83
- })
84
- .catch(() => 'auto');
85
- if (persisted !== 'auto')
86
- return persisted === 'claude' ? 'claude-code' : persisted;
87
- // A persisted (or absent) `auto` preference must never silently disable native
88
- // dispatch inside a capable host: resolve it to the detected runtime identity
89
- // so `usesNativeOperatingAdvisors` evaluates the real host, not the `auto`
90
- // placeholder that always returns false.
91
- const detected = detectOperatingHostRuntime();
92
- return detected === 'claude' ? 'claude-code' : (detected ?? 'auto');
93
- }
94
- export async function usesNativeOperatingAdvisors(projectRoot, requestedRuntime) {
95
- const runtime = await resolvedOperatingRuntime(projectRoot, requestedRuntime);
96
- const adapterId = runtime === 'claude' ? 'claude-code' : runtime;
97
- if (adapterId === 'auto')
98
- return false;
99
- const pipelineRoot = resolveOperatingPipelineRoot();
100
- if (!pipelineRoot)
101
- return false;
102
- const registry = await readFile(path.join(pipelineRoot, 'registry', 'adapters.json'), 'utf8')
103
- .then((raw) => JSON.parse(raw))
104
- .catch(() => ({ adapters: [] }));
105
- const adapter = registry.adapters?.find((entry) => entry.id === adapterId);
106
- if (adapter?.capabilities?.operatingBoard !== true)
107
- return false;
108
- if (
109
- // `native-read-only` is the US-001/T-001 adapters-registry capability name that
110
- // supersedes the earlier isolation labels; recognize it alongside them.
111
- [
112
- 'native-agent',
113
- 'sequential-native',
114
- 'native-isolated',
115
- 'native-bounded',
116
- 'native-read-only',
117
- ].includes(adapter.capabilities.operatingAdvisorDispatch ?? '')) {
118
- return true;
119
- }
120
- // Compatibility with Protocol v1.2 registries published before the
121
- // operatingAdvisorDispatch capability was added.
122
- return (adapter.capabilities.toolIsolation === 'enforced' ||
123
- (adapterId === 'codex' &&
124
- adapter.capabilities.subagents === 'dynamic' &&
125
- adapter.capabilities.headlessBridge === true));
126
- }
127
- async function readCustomOperatingProfile(projectRoot, file) {
128
- const resolved = await resolveContainedPath(projectRoot, file, { mustExist: true });
129
- try {
130
- return normalizeCustomOperatingProfile(parseStrictJson(await readFile(resolved, 'utf8')));
131
- }
132
- catch (error) {
133
- if (error instanceof OperateError && error.code === 'E_OPERATE_CONFIG_INVALID') {
134
- throw error;
135
- }
136
- throw new OperateError('E_OPERATE_CONFIG_INVALID', 'Custom profile must be a valid bounded JSON object.');
137
- }
138
- }
139
- function success(action, value = {}) {
140
- const nextActions = value.nextActions ?? value.next ?? [];
141
- return {
142
- schemaVersion: '1.0.0',
143
- protocolVersion: '1.2.0',
144
- ok: true,
145
- action,
146
- ...value,
147
- state: value.state ?? null,
148
- paths: value.paths ?? {},
149
- counts: value.counts ?? {},
150
- warnings: value.warnings ?? [],
151
- nextActions,
152
- };
153
- }
154
- /**
155
- * A healthy continuation (FR7/E-007): a guided-stage advance
156
- * (`E_OPERATE_INPUT_REQUIRED`) or first-use provider consent
157
- * (`E_OPERATE_AUTHORITY_REQUIRED`) is not a failure. It is returned as an
158
- * `ok: true` handoff carrying a machine-readable `flow: 'handoff'` discriminator
159
- * (and the originating `code`), mirroring `run`'s adapter-handoff shape so a
160
- * harness reads the pause without treating it as a red exit. No `exitCode` is
161
- * set: the CLI leaves the process exit code at 0 for `ok: true` results.
162
- */
163
- function handoffContinuation(action, code, value = {}) {
164
- return { ...success(action, value), code, flow: 'handoff' };
165
- }
166
- /**
167
- * First-use / renewal provider consent is disclosed by
168
- * `ensureOperatingProviderConsent` (advisors.ts) as an
169
- * `E_OPERATE_AUTHORITY_REQUIRED` carrying the full policy disclosure
170
- * (`endpoint`, `permittedDataClasses`, `policyDigest`). That specific
171
- * disclosure is a continuation, not a refusal — unlike every other
172
- * `E_OPERATE_AUTHORITY_REQUIRED` (a mutation attempted without `--yes`), which
173
- * stays an `ok: false` exit-4 failure so the authority model is unchanged.
174
- */
175
- function isProviderConsentHandoff(error) {
176
- if (!(error instanceof OperateError) || error.code !== 'E_OPERATE_AUTHORITY_REQUIRED') {
177
- return false;
178
- }
179
- const details = error.details;
180
- return (typeof details === 'object' &&
181
- details !== null &&
182
- 'policyDigest' in details &&
183
- 'endpoint' in details &&
184
- 'permittedDataClasses' in details);
185
- }
186
- function providerConsentContinuation(action, error) {
187
- const retry = `planr operate ${action} --yes`;
188
- return handoffContinuation(action, 'E_OPERATE_AUTHORITY_REQUIRED', {
189
- message: error.message,
190
- data: error.details,
191
- nextActions: [retry],
192
- next: [retry],
193
- });
194
- }
195
- /**
196
- * Stable process exit classes for automation.
197
- *
198
- * 2 — invalid invocation or configuration
199
- * 3 — required project/component is unavailable
200
- * 4 — explicit human authority or confirmation is required
201
- * 5 — committed state, integrity, or concurrency conflict
202
- * 6 — evidence/provider/advisor execution could not complete safely
203
- * 1 — unexpected internal failure
204
- *
205
- * Keep this exhaustive so adding a public Operate error cannot silently fall
206
- * through to the internal-error class.
207
- *
208
- * FR7/E-007 continuation note: `E_OPERATE_INPUT_REQUIRED` and
209
- * `E_OPERATE_AUTHORITY_REQUIRED` keep this class-4 mapping for the cases that
210
- * are genuine refusals — a mutation attempted without `--yes` still fails with
211
- * `ok: false` and exit 4. But a *healthy continuation* — a guided-stage advance
212
- * or first-use provider consent — is not a failure: it is returned as an
213
- * `ok: true` handoff (`flow: 'handoff'`) with no failure exit code, mirroring
214
- * `run`'s adapter handoff, so a harness never paints the happy path red. The
215
- * numeric class below is therefore only consulted for the failure branch.
216
- */
217
- const OPERATE_EXIT_CODES = {
218
- E_OPERATE_INTERNAL: 1,
219
- E_OPERATE_ACTION_UNKNOWN: 2,
220
- E_OPERATE_ARTIFACT_REJECTED: 2,
221
- E_OPERATE_CHARTER_INCOMPLETE: 2,
222
- E_OPERATE_CONFIG_INVALID: 2,
223
- E_OPERATE_INPUT_TOO_LARGE: 2,
224
- E_OPERATE_QUESTIONNAIRE_INVALID: 2,
225
- E_OPERATE_PATH_ESCAPE: 2,
226
- E_OPERATE_NOT_INITIALIZED: 3,
227
- E_OPERATE_PROJECT_REQUIRED: 3,
228
- E_PIPELINE_NOT_INSTALLED: 3,
229
- E_PIPELINE_VERSION_INCOMPATIBLE: 3,
230
- E_OPERATE_AUTHORITY_REQUIRED: 4,
231
- E_OPERATE_INPUT_REQUIRED: 4,
232
- E_OPERATE_SESSION_CANCELLED: 4,
233
- E_OPERATE_SESSION_EXPIRED: 4,
234
- E_OPERATE_ROUTE_CONFIRMATION_REQUIRED: 4,
235
- E_OPERATE_CHECKPOINT_INVALID: 5,
236
- E_OPERATE_CYCLE_ACTIVE: 5,
237
- E_OPERATE_CYCLE_INPUT_CONFLICT: 5,
238
- E_OPERATE_CYCLE_NOT_DISPOSED: 5,
239
- E_OPERATE_HEAD_DIVERGED: 5,
240
- E_OPERATE_MIGRATION_CONFLICT: 5,
241
- E_OPERATE_OUTCOME_NOT_READY: 5,
242
- E_OPERATE_PLANNER_CONFLICT: 5,
243
- E_OPERATE_PROJECTION_DRIFT: 5,
244
- E_OPERATE_ROUTE_DRIFT: 5,
245
- E_OPERATE_SECURITY_REPAIR_REQUIRED: 5,
246
- E_OPERATE_STALE_LOCK_UNSAFE: 5,
247
- E_OPERATE_STATE_INVALID: 5,
248
- E_OPERATE_STATE_UNAVAILABLE: 3,
249
- E_OPERATE_TRANSACTION_INVALID: 5,
250
- E_OPERATE_SESSION_REPLAY_CONFLICT: 5,
251
- E_OPERATE_SESSION_STALE: 5,
252
- E_OPERATE_ADVISOR_FAILED: 6,
253
- E_OPERATE_ADVISOR_ISOLATION: 6,
254
- E_OPERATE_CAP_EXCEEDED: 6,
255
- E_OPERATE_CRITICAL_CAP: 6,
256
- E_OPERATE_EVIDENCE_BUDGET: 6,
257
- E_OPERATE_EVIDENCE_NOT_READY: 6,
258
- E_OPERATE_EVIDENCE_REJECTED: 6,
259
- E_OPERATE_PROVIDER_READ_ONLY: 6,
260
- E_OPERATE_PROVIDER_DEPRECATED: 6,
261
- E_OPERATE_SECRET_DETECTED: 6,
262
- E_OPERATE_MISSION_PACKET_BUDGET: 6,
263
- E_OPERATE_MISSION_UNAVAILABLE: 3,
264
- E_OPERATE_SESSION_INVALID: 2,
265
- E_OPERATE_RUNTIME_MISMATCH: 5,
266
- E_OPERATE_DRAFT_UNAPPROVED: 4,
267
- E_RUNTIME_UNSUPPORTED: 3,
268
- };
269
- function operateExitCode(code) {
270
- return OPERATE_EXIT_CODES[code];
271
- }
272
- export function failure(action, error) {
273
- const code = error instanceof OperateError ? error.code : 'E_OPERATE_INTERNAL';
274
- // E_OPERATE_INTERNAL must never be zero-information: record the redacted error
275
- // class/name (no message or stack, which can carry paths or secrets) so the
276
- // diagnostics export and automation callers can classify the internal failure.
277
- const internalErrorClass = code === 'E_OPERATE_INTERNAL'
278
- ? error instanceof Error && typeof error.name === 'string' && error.name.length > 0
279
- ? error.name
280
- : 'Error'
281
- : undefined;
282
- const confirmationAction = error instanceof OperateError &&
283
- error.details?.action &&
284
- typeof error.details.action === 'object' &&
285
- !Array.isArray(error.details.action)
286
- ? error.details.action
287
- : null;
288
- const confirmationRecovery = code === 'E_OPERATE_ROUTE_CONFIRMATION_REQUIRED' &&
289
- typeof confirmationAction?.command === 'string' &&
290
- typeof confirmationAction.confirmationDigest === 'string'
291
- ? [`${confirmationAction.command} --confirm ${confirmationAction.confirmationDigest} --yes`]
292
- : null;
293
- const explicitRecovery = error instanceof OperateError && typeof error.details?.recoveryCommand === 'string'
294
- ? [error.details.recoveryCommand]
295
- : null;
296
- const nextActions = explicitRecovery ??
297
- confirmationRecovery ??
298
- (code === 'E_PIPELINE_NOT_INSTALLED'
299
- ? ['npm install -g openplanr@latest', 'planr setup --scope user', 'planr operate inspect']
300
- : code === 'E_OPERATE_NOT_INITIALIZED'
301
- ? ['planr operate init']
302
- : code === 'E_OPERATE_PROJECT_REQUIRED'
303
- ? ['cd /path/to/your/project', 'planr init', 'planr operate inspect']
304
- : code === 'E_OPERATE_CONFIG_INVALID' || code === 'E_OPERATE_CHARTER_INCOMPLETE'
305
- ? ['planr operate config validate']
306
- : code === 'E_OPERATE_ROUTE_CONFIRMATION_REQUIRED'
307
- ? ['planr operate routes apply <route-id> --preview --json']
308
- : code === 'E_OPERATE_MIGRATION_CONFLICT'
309
- ? ['planr operate migrate inspect', 'planr operate migrations list']
310
- : code === 'E_OPERATE_HEAD_DIVERGED' ||
311
- code === 'E_OPERATE_CHECKPOINT_INVALID' ||
312
- code === 'E_OPERATE_PROJECTION_DRIFT'
313
- ? ['planr operate integrity status', 'planr operate cycles recover <cycle-id>']
314
- : code === 'E_OPERATE_CYCLE_ACTIVE' || code === 'E_OPERATE_CYCLE_INPUT_CONFLICT'
315
- ? ['planr operate status', 'planr operate cycles resume <cycle-id>']
316
- : code === 'E_OPERATE_CYCLE_NOT_DISPOSED'
317
- ? [
318
- 'planr operate findings list',
319
- 'planr operate decisions list',
320
- 'planr operate cycles close <cycle-id>',
321
- ]
322
- : code.startsWith('E_OPERATE_EVIDENCE') ||
323
- code.startsWith('E_OPERATE_PROVIDER') ||
324
- code.startsWith('E_OPERATE_ADVISOR')
325
- ? ['planr operate run --preview --json', 'planr operate diagnostics export']
326
- : ['planr operate diagnostics export']);
327
- return {
328
- schemaVersion: '1.0.0',
329
- protocolVersion: '1.2.0',
330
- ok: false,
331
- action,
332
- code,
333
- message: error instanceof OperateError
334
- ? error.message
335
- : 'An unexpected internal Operating Board error occurred.',
336
- state: null,
337
- paths: {},
338
- counts: {},
339
- warnings: [],
340
- nextActions,
341
- data: error instanceof OperateError
342
- ? error.details
343
- : internalErrorClass
344
- ? { errorClass: internalErrorClass }
345
- : undefined,
346
- next: nextActions,
347
- exitCode: operateExitCode(code),
348
- };
349
- }
350
- /**
351
- * Reduce recovery `nextActions` to the set of public `planr operate` commands
352
- * that back the structured actions. The digest-bound authority flags
353
- * (`--yes`, `--confirm <digest>`, `--preview-digest <digest>`) are stripped from
354
- * the *command* string — a raw sha256 digest must never enter a structured
355
- * command (it would trip the sensitive-data guard in `assertSafeCommand`).
356
- *
357
- * FR8/E-008: stripping them here no longer strands a runner. For a
358
- * digest-confirmable command the exact, ready-to-run argv (including the real
359
- * `--confirm <digest> --yes` token) is re-surfaced on the structured action as
360
- * `confirmArgv` in `attachStructuredActions`, so the runner never has to
361
- * re-synthesize a confirmation token it was handed. A command whose only
362
- * authority is `--yes` is never given a confirmationDigest at all.
363
- */
364
- function publicActionCommands(nextActions) {
365
- return [
366
- ...new Set(nextActions
367
- .flatMap((value) => value.split(/\s+&&\s+/))
368
- .map((value) => value
369
- .trim()
370
- .replace(/\s+--yes(?=\s|$)/g, '')
371
- .replace(/\s+--confirm\s+\S+/g, '')
372
- .replace(/\s+--preview-digest\s+\S+/g, ''))
373
- .filter((value) => /^planr\s+/.test(value))),
374
- ];
375
- }
376
- /**
377
- * The digest-bound confirmation flag a public command's CLI actually accepts, or
378
- * `null` when its only authority is `--yes`. A confirmationDigest is meaningful
379
- * only for a command that can consume it via `--confirm`; a `--yes`-only command
380
- * (e.g. `operate run`) must never be handed one (FR8/E-008).
381
- */
382
- function commandConfirmFlag(command) {
383
- return /\boperate\s+init\b/.test(command) || /\bevidence\s+classify\b/.test(command)
384
- ? '--confirm'
385
- : null;
386
- }
387
- function hasFlag(command, flag) {
388
- return new RegExp(`(?:^|\\s)${flag.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}(?:\\s|$)`).test(command);
389
- }
390
- async function actionEffect(request, command) {
391
- if (/\b(?:inspect|status|brief|report|review|list|show)\b/.test(command) ||
392
- /\bconfig validate\b/.test(command) ||
393
- /\bprofiles validate\b/.test(command) ||
394
- /\bsources test\b/.test(command) ||
395
- (/\brun\b/.test(command) && hasFlag(command, '--preview')) ||
396
- /\bmigrate inspect\b/.test(command) ||
397
- /\bcache status\b/.test(command) ||
398
- /\bintegrity status\b/.test(command)) {
399
- return 'read-only';
400
- }
401
- if (/\boperate run\b/.test(command)) {
402
- if (hasFlag(command, '--offline'))
403
- return 'project-write';
404
- const commandRuntime = command.match(/(?:^|\s)--runtime\s+(\S+)/)?.[1];
405
- if (await usesNativeOperatingAdvisors(request.projectRoot, commandRuntime ?? option(request, 'runtime', 'auto'))) {
406
- return 'project-write';
407
- }
408
- return 'provider-call';
409
- }
410
- if (/\badapter resume\b/.test(command))
411
- return 'read-only';
412
- if (/\badapter finalize\b/.test(command))
413
- return 'project-write';
414
- if (/\b(?:adapter (?:prepare|record|cancel)|cache purge|diagnostics export)\b/.test(command)) {
415
- return 'machine-local-write';
416
- }
417
- if (/\bpipeline (?:plan|ship)\b/.test(command))
418
- return 'external-effect';
419
- return 'project-write';
420
- }
421
- async function attachStructuredActions(request, result) {
422
- if (result.actions?.length || result.action === 'input_required' || result.flow === 'handoff') {
423
- return result;
424
- }
425
- const commands = publicActionCommands(result.nextActions);
426
- if (commands.length === 0)
427
- return result;
428
- // Planning-only installations intentionally omit the portable pipeline and
429
- // therefore its Protocol v1.2 action validators. Provider-free inspection
430
- // and demonstration must still work; their legacy nextActions remain the
431
- // compatible fallback until the full package is installed.
432
- if (!resolveOperatingPipelineRoot())
433
- return result;
434
- const bindings = await currentGuidedSessionBindings(request.projectRoot);
435
- const eventHead = await new OperatingEventStore(request.projectRoot)
436
- .replay()
437
- .then((value) => (value.eventHead.hash ? value.eventHead : null))
438
- .catch(() => null);
439
- const requestDigest = canonicalDigest({
440
- action: request.action,
441
- arguments: request.arguments ?? {},
442
- options: Object.fromEntries(Object.entries(request.options)
443
- .filter(([key]) => !['yes', 'confirm', 'stdin'].includes(key))
444
- .map(([key, value]) => [key, canonicalDigest({ value })])),
445
- });
446
- const sessionId = `GIS-action-${requestDigest.slice('sha256:'.length, 'sha256:'.length + 24)}`;
447
- const actions = [];
448
- for (const [index, command] of commands.entries()) {
449
- const effect = await actionEffect(request, command);
450
- const confirmFlag = commandConfirmFlag(command);
451
- const id = `operate.next.${canonicalDigest({ command }).slice('sha256:'.length, 'sha256:'.length + 20)}`.toLowerCase();
452
- const created = await createOperatingAction({
453
- id,
454
- label: (() => {
455
- const publicLabel = command.replace(/^planr\s+/, '');
456
- return publicLabel.length <= 160
457
- ? publicLabel
458
- : `${publicLabel.slice(0, 157).trimEnd()}...`;
459
- })(),
460
- description: `Run the named ${effect} action returned by ${request.action}.`,
461
- command,
462
- effect,
463
- recommended: index === 0,
464
- ...(effect === 'read-only'
465
- ? {}
466
- : {
467
- confirmation: {
468
- sessionId,
469
- confirmationScope: `${request.action}:${index + 1}`,
470
- projectIdentity: bindings.projectIdentity,
471
- projectHead: bindings.projectHead,
472
- configHead: bindings.configHead,
473
- eventHead,
474
- arguments: [requestDigest],
475
- destinations: [],
476
- writes: [],
477
- },
478
- }),
479
- });
480
- let action = created.action;
481
- // FR8/E-008: `operate run` authorizes with `--yes` alone — its CLI accepts no
482
- // `--confirm` flag — so it must never carry a confirmationDigest a runner
483
- // could never pass. It still appears as a structured action (mirroring the
484
- // handoff `run` continuation) but with its digest binding cleared.
485
- if (/\boperate\s+run\b/.test(command)) {
486
- action = {
487
- ...action,
488
- requiresConfirmation: false,
489
- confirmationScope: null,
490
- confirmationDigest: null,
491
- };
492
- }
493
- // A digest-confirmable action (`--confirm <digest>`) carries its exact,
494
- // ready-to-run argv so a runner never has to re-synthesize the confirmation
495
- // token it was already handed.
496
- const confirmArgv = confirmFlag && action.confirmationDigest
497
- ? [...command.split(/\s+/), confirmFlag, action.confirmationDigest, '--yes']
498
- : undefined;
499
- actions.push(confirmArgv ? { ...action, confirmArgv } : action);
500
- }
501
- if (actions.length === 0)
502
- return result;
503
- return { ...result, actions };
504
- }
505
- async function inspect(request) {
506
- const pipelineRoot = resolveOperatingPipelineRoot();
507
- const localRoot = option(request, 'localRoot', undefined);
508
- const paths = resolveOperatingPaths(request.projectRoot, { localRoot });
509
- const customStateRoot = Boolean(localRoot ?? process.env.OPENPLANR_STATE_ROOT);
510
- const initialized = await readFile(paths.config, 'utf8').then(() => true, () => false);
511
- let project = false;
512
- try {
513
- await assertOperatingProject(request.projectRoot);
514
- project = true;
515
- }
516
- catch {
517
- project = false;
518
- }
519
- return success(request.action, {
520
- message: initialized
521
- ? 'Operating Board is initialized.'
522
- : 'Operating Board is available; initialization is optional.',
523
- data: {
524
- project,
525
- initialized,
526
- pipeline: {
527
- available: Boolean(pipelineRoot),
528
- root: pipelineRoot ? '(installed)' : null,
529
- // The contract the installed pipeline ENFORCES — mandates are signed and
530
- // validated at the agent protocol version. This previously reported the
531
- // frozen on-disk artifact envelope version instead, so the first command
532
- // of the journey advertised a two-generation-stale capability.
533
- protocolVersion: pipelineRoot ? OPERATE_AGENT_PROTOCOL_VERSION : null,
534
- },
535
- commitSafeRoot: project ? '.planr/operate' : null,
536
- machineLocalState: customStateRoot ? paths.localRoot : '~/.planr/operate/<project-hash>',
537
- },
538
- // FND-001: an uninitialized project is pointed at the research-first entry, not
539
- // cold into the guided questionnaire. Bare `planr operate` auto-runs
540
- // `context.refresh` (which pre-fills most charter fields from the repo) before
541
- // init; `planr operate context refresh` is the explicit standalone step. Both
542
- // verified to run uninitialized. The structured `actions[]` are derived from
543
- // these same commands, so the text hint and the actions can never disagree.
544
- next: initialized
545
- ? ['planr operate status']
546
- : ['planr operate', 'planr operate context refresh'],
547
- });
548
- }
549
- function demo(request) {
550
- const evidence = [
551
- {
552
- id: 'EVD-demo-activation',
553
- source: 'demo-fixture',
554
- summary: 'The product has no verified activation baseline for the current cycle.',
555
- observedFrom: '2026-06-01T00:00:00.000Z',
556
- observedTo: '2026-06-30T23:59:59.000Z',
557
- sensitivity: 'public',
558
- },
559
- {
560
- id: 'EVD-demo-delivery',
561
- source: 'demo-fixture',
562
- summary: 'Delivery capacity is already allocated to three unmeasured feature bets.',
563
- observedFrom: '2026-06-01T00:00:00.000Z',
564
- observedTo: '2026-06-30T23:59:59.000Z',
565
- sensitivity: 'public',
566
- },
567
- ];
568
- const demoState = {
569
- kind: 'operating-state',
570
- schemaVersion: '1.0.0',
571
- protocolVersion: '1.2.0',
572
- generatedAt: '2026-07-01T00:00:00.000Z',
573
- eventHead: { sequence: 0, hash: null },
574
- cycles: [{ id: 'CYCLE-001', state: 'reviewable', health: 'normal' }],
575
- findings: [
576
- {
577
- id: 'FND-001',
578
- cycleId: 'CYCLE-001',
579
- status: 'proposed',
580
- title: 'Measure activation before increasing delivery scope',
581
- problem: 'The product has no verified activation baseline.',
582
- proposal: 'Create one bounded activation instrumentation specification.',
583
- severity: 'high',
584
- sensitivity: 'public',
585
- score: 48,
586
- lane: 'DEV',
587
- owner: 'product-engineering',
588
- parked: false,
589
- evidenceRefs: ['EVD-demo-activation', 'EVD-demo-delivery'],
590
- },
591
- ],
592
- decisions: [
593
- {
594
- id: 'DEC-001',
595
- cycleId: 'CYCLE-001',
596
- status: 'open',
597
- question: 'Which customer event defines activation?',
598
- recommendation: 'Choose one observable event before planning more feature work.',
599
- evidenceRefs: ['EVD-demo-activation'],
600
- },
601
- ],
602
- dataGaps: [],
603
- routes: [
604
- {
605
- id: 'ACT-001',
606
- cycleId: 'CYCLE-001',
607
- state: 'proposed',
608
- findingIds: ['FND-001'],
609
- },
610
- ],
611
- specLinks: [],
612
- outcomes: [],
613
- learnings: [],
614
- evidenceSources: [{ id: 'demo-fixture', status: 'collected', itemCount: 2 }],
615
- summary: {
616
- currentCycleId: 'CYCLE-001',
617
- currentConstraint: 'The product has no verified activation baseline.',
618
- quiet: false,
619
- evidenceFreshness: 'fresh',
620
- surfacedFindings: 1,
621
- parkedFindings: 0,
622
- openDecisions: 1,
623
- openGaps: 0,
624
- stalledItems: 0,
625
- },
626
- };
627
- return success(request.action, {
628
- message: 'Generated a deterministic, credential-free Operating Board demonstration.',
629
- data: {
630
- brief: renderOperatingBrief(demoState),
631
- evidence,
632
- state: demoState,
633
- note: 'Demo performs no provider/model calls and writes no project state.',
634
- },
635
- next: ['planr operate init'],
636
- });
637
- }
638
- async function initializationApplyAction(input) {
639
- const sessionId = input.sessionId ??
640
- `GIS-init-${input.preview.previewDigest.slice('sha256:'.length, 'sha256:'.length + 24)}`;
641
- const command = input.sessionId
642
- ? `planr operate init --resume ${input.sessionId}`
643
- : [
644
- 'planr operate init',
645
- `--answers-token ${encodeOperatingInitializationReplay(input.answers)}`,
646
- `--preview-created-at ${input.preview.workspace.capturedAt}`,
647
- ].join(' ');
648
- return createOperatingAction({
649
- id: 'operate.init.apply',
650
- label: 'Apply Operating Board configuration',
651
- description: 'Write only the reviewed charter, workspace, configuration, and machine-local preferences.',
652
- command,
653
- effect: 'project-write',
654
- recommended: true,
655
- confirmation: {
656
- sessionId,
657
- confirmationScope: 'operate.init.apply',
658
- projectIdentity: input.bindings.projectIdentity,
659
- projectHead: input.bindings.projectHead,
660
- configHead: input.bindings.configHead,
661
- eventHead: input.preview.expectedEventHead.hash ? input.preview.expectedEventHead : null,
662
- arguments: [
663
- `answers=${canonicalDigest(input.answers)}`,
664
- `preview=${input.preview.previewDigest}`,
665
- ],
666
- destinations: [
667
- ...input.preview.changedPaths,
668
- ...(input.preview.preferencesChanged ? ['~/.planr/operate/preferences.json'] : []),
669
- ],
670
- writes: input.preview.writes.map((write) => `${write.relativePath}:${write.operation ?? 'replace'}:${sha256Digest(write.content)}`),
671
- },
672
- });
673
- }
674
- async function initialize(request) {
675
- await loadOperatingProtocol();
676
- const replayToken = option(request, 'answersToken', undefined);
677
- let supplied = replayToken
678
- ? decodeOperatingInitializationReplay(replayToken)
679
- : normalizeOperatingInitializationAnswers(operatingInitAnswersFromOptions(request.options));
680
- const resumeId = option(request, 'resume', undefined);
681
- const localRoot = option(request, 'localRoot', undefined);
682
- if (option(request, 'cancelSession', false)) {
683
- if (!resumeId) {
684
- throw new OperateError('E_OPERATE_SESSION_INVALID', '--cancel-session requires --resume <session-id>.');
685
- }
686
- return success(request.action, {
687
- message: 'Guided initialization session cancelled.',
688
- state: 'cancelled',
689
- data: await cancelGuidedSession({
690
- projectRoot: request.projectRoot,
691
- sessionId: resumeId,
692
- localRoot,
693
- }),
694
- next: ['planr operate init --json'],
695
- });
696
- }
697
- if (request.stdin !== undefined && !resumeId) {
698
- throw new OperateError('E_OPERATE_SESSION_INVALID', '--stdin requires --resume <session-id>.');
699
- }
700
- const bindings = await currentGuidedSessionBindings(request.projectRoot);
701
- let resumedSession = null;
702
- if (resumeId) {
703
- resumedSession =
704
- request.stdin === undefined
705
- ? await resumeGuidedSession({
706
- projectRoot: request.projectRoot,
707
- sessionId: resumeId,
708
- bindings,
709
- localRoot,
710
- })
711
- : await submitGuidedAnswers({
712
- projectRoot: request.projectRoot,
713
- sessionId: resumeId,
714
- raw: request.stdin,
715
- bindings,
716
- localRoot,
717
- });
718
- supplied = normalizeOperatingInitializationAnswers(resumedSession.answers);
719
- if (resumedSession.status === 'input-required') {
720
- // FR7/E-007: a guided-stage advance is a healthy continuation, not a
721
- // failure. Report it as an `ok: true` handoff (`flow: 'handoff'`) carrying
722
- // the next questionnaire, mirroring `run`'s adapter handoff.
723
- return handoffContinuation('input_required', 'E_OPERATE_INPUT_REQUIRED', {
724
- message: 'Operating Board initialization needs explicit human input.',
725
- state: resumedSession.session.state,
726
- questionnaire: resumedSession.questionnaire,
727
- });
728
- }
729
- }
730
- let customProfile;
731
- if (supplied.profile === 'custom' && supplied.profileFile) {
732
- customProfile = await readCustomOperatingProfile(request.projectRoot, supplied.profileFile);
733
- }
734
- else if (supplied.profile !== undefined &&
735
- supplied.profile !== 'custom' &&
736
- supplied.profileFile) {
737
- throw new OperateError('E_OPERATE_CONFIG_INVALID', '--profile-file is valid only with --profile custom.');
738
- }
739
- // Probe the real host runtime instead of stamping `unknown`/`none`: an explicit
740
- // --runtime flag wins, otherwise the launcher's env markers name the host so the
741
- // questionnaire's adapter block is truthful (and the runtime question can be a
742
- // detect-don't-ask suggestion rather than a required prompt).
743
- const detectedHostRuntime = detectOperatingHostRuntime();
744
- const requestedRuntimeOption = option(request, 'runtime', 'auto');
745
- // Probe the same signals the terminal path does so the JSON/native init path is
746
- // equally truthful: Git can suggest the decision owner and the installed
747
- // pipeline can suggest the planning-engine handoff.
748
- const gitUserName = await probeGitUserName(request.projectRoot);
749
- // Agent-native bootstrap researches first and stores epistemically labelled
750
- // context. Use it as provisional initialization input so the old serial
751
- // questionnaire does not ask the owner to retype discoverable project facts.
752
- // Explicit user/runtime answers always win; decisionOwner is intentionally
753
- // never inferred here because it is an authority assignment.
754
- if (!resumeId) {
755
- const researched = await operatingInitializationAnswersFromResearch(request.projectRoot);
756
- if (researched) {
757
- supplied = normalizeOperatingInitializationAnswers({
758
- ...researched,
759
- ...supplied,
760
- charter: {
761
- ...researched.charter,
762
- ...supplied.charter,
763
- },
764
- });
765
- }
766
- }
767
- const context = {
768
- projectRoot: request.projectRoot,
769
- ...bindings,
770
- ...(detectedHostRuntime ? { detectedRuntime: detectedHostRuntime } : {}),
771
- ...(gitUserName ? { gitUserName } : {}),
772
- timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
773
- pipelineInstalled: probePipelineInstalled(),
774
- runtime: requestedRuntimeOption && requestedRuntimeOption !== 'auto'
775
- ? requestedRuntimeOption
776
- : (detectedHostRuntime ?? (request.interactive ? 'terminal' : 'unknown')),
777
- interaction: detectedHostRuntime
778
- ? 'native'
779
- : request.interactive
780
- ? 'terminal'
781
- : 'none',
782
- };
783
- const questionState = await evaluateOperatingInitQuestions({
784
- answers: supplied,
785
- context,
786
- requireCharter: true,
787
- });
788
- if (questionState.status === 'input-required') {
789
- const sessionId = createGuidedSessionId();
790
- const questionnaire = await createOperatingInitQuestionnaire({
791
- context,
792
- questions: questionState.questions,
793
- stage: questionState.stage,
794
- sessionId,
795
- });
796
- await createGuidedSession({
797
- projectRoot: request.projectRoot,
798
- questionnaire,
799
- persistedAnswers: persistableOperatingInitAnswers(questionState.answers, context),
800
- localRoot,
801
- });
802
- // FR7/E-007: the first guided-stage prompt is a healthy continuation — an
803
- // `ok: true` handoff (`flow: 'handoff'`) carrying the questionnaire, not an
804
- // exit-4 failure.
805
- //
806
- // FND-002 (level 1): when a terminal is present, the handoff carries a
807
- // human-legible message and a next step describing the interactive
808
- // continuation, so no renderer is left with a shapeless payload. When there is
809
- // no interactive continuation (a non-TTY human, or the machine `--json`
810
- // channel) the handoff stays lean: the CLI renderer (`renderHuman`) owns the
811
- // transport-correct guidance there — an interactive "answer the questions"
812
- // instruction would be a lie in a non-TTY shell, and a machine reads the
813
- // questionnaire/`flow` directly. This keeps the no-silent-success fallback in
814
- // `renderHuman` the single, load-bearing source for the non-interactive case.
815
- const interactiveGuidance = request.interactive
816
- ? {
817
- message: 'Operating Board initialization needs a few governance answers before it can continue.',
818
- next: ['Answer the guided initialization questions to continue.'],
819
- }
820
- : {};
821
- return handoffContinuation('input_required', 'E_OPERATE_INPUT_REQUIRED', {
822
- ...interactiveGuidance,
823
- questionnaire,
824
- });
825
- }
826
- const profile = supplied.profile;
827
- const decisionOwner = supplied.decisionOwner ?? option(request, 'decisionOwner', '').trim();
828
- const planningEngine = supplied.planningEngine ??
829
- option(request, 'planningEngine', 'openplanr');
830
- const rawCharter = supplied.charter ?? option(request, 'charter', {});
831
- const preview = await prepareOperatingInitialization({
832
- projectRoot: request.projectRoot,
833
- profile,
834
- decisionOwner,
835
- planningEngine,
836
- runtime: supplied.runtime ?? option(request, 'runtime', 'auto'),
837
- cadence: supplied.cadence ?? option(request, 'cadence', 'manual'),
838
- timezone: supplied.timezone ??
839
- option(request, 'timezone', Intl.DateTimeFormat().resolvedOptions().timeZone),
840
- sensitivityCeiling: supplied.sensitivityCeiling ?? option(request, 'sensitivityCeiling', 'internal'),
841
- charter: rawCharter,
842
- customProfile,
843
- componentRoots: supplied.componentRoots ?? stringList(request.options.components),
844
- localRoot,
845
- now: resumedSession?.session.createdAt ??
846
- option(request, 'previewCreatedAt', undefined),
847
- });
848
- const legacyMigration = await inspectOperatingMigration({
849
- projectRoot: request.projectRoot,
850
- });
851
- const previewData = {
852
- previewDigest: preview.previewDigest,
853
- expectedEventHead: preview.expectedEventHead,
854
- resultingEventHead: preview.resultingEventHead,
855
- changedPaths: preview.changedPaths,
856
- localPreferencesChanged: preview.preferencesChanged,
857
- // FR5 / T-005: name the machine-local preference keys a re-init will actually
858
- // change (dispatch-mode overrides, adapter lease, cadence marker), so the
859
- // operator sees the field-level delta — not just that preferences.json is in
860
- // the affected-files list — before confirming.
861
- changedPreferenceKeys: preview.changedPreferenceKeys,
862
- previewCreatedAt: preview.workspace.capturedAt,
863
- workspaceDigest: preview.workspace.workspaceDigest,
864
- config: preview.config,
865
- legacyMigration,
866
- ...(resumedSession ? { sessionId: resumedSession.session.sessionId } : {}),
867
- };
868
- const { action: applyAction, confirmation } = await initializationApplyAction({
869
- request,
870
- preview,
871
- bindings,
872
- sessionId: resumedSession?.session.sessionId,
873
- answers: questionState.answers,
874
- });
875
- const requestedConfirmation = option(request, 'confirm', undefined);
876
- const confirmed = option(request, 'yes', false);
877
- if (resumedSession) {
878
- await updateGuidedSession({
879
- projectRoot: request.projectRoot,
880
- localRoot,
881
- session: {
882
- ...resumedSession.session,
883
- state: 'preview-ready',
884
- previewDigest: preview.previewDigest,
885
- confirmationDigest: confirmation?.confirmationDigest,
886
- updatedAt: new Date().toISOString(),
887
- },
888
- });
889
- if (!confirmed || !requestedConfirmation) {
890
- return success(request.action, {
891
- message: 'Operating Board initialization preview is ready; no state was written.',
892
- state: 'preview-ready',
893
- preview: { ...previewData, confirmation },
894
- actions: [applyAction],
895
- next: [
896
- `planr operate init --resume ${resumedSession.session.sessionId} --confirm ${confirmation?.confirmationDigest} --yes --json`,
897
- ],
898
- });
899
- }
900
- }
901
- if (option(request, 'preview', false) || option(request, 'dryRun', false)) {
902
- return success(request.action, {
903
- message: 'Operating Board initialization preview is ready; no state was written.',
904
- state: 'preview-ready',
905
- preview: { ...previewData, confirmation },
906
- actions: [applyAction],
907
- next: [`${applyAction.command} --confirm ${confirmation?.confirmationDigest} --yes`],
908
- });
909
- }
910
- if (!confirmed || !requestedConfirmation || !confirmation) {
911
- throw new OperateError('E_OPERATE_ROUTE_CONFIRMATION_REQUIRED', 'Initialization requires the exact named confirmation returned by its preview.', {
912
- preview: { ...previewData, confirmation },
913
- action: applyAction,
914
- });
915
- }
916
- const accepted = assertOperatingConfirmation({
917
- expected: confirmation,
918
- actionId: applyAction.id,
919
- confirmationDigest: requestedConfirmation,
920
- confirmed,
921
- });
922
- if (resumedSession) {
923
- await updateGuidedSession({
924
- projectRoot: request.projectRoot,
925
- localRoot,
926
- session: {
927
- ...resumedSession.session,
928
- state: 'confirmed',
929
- previewDigest: preview.previewDigest,
930
- confirmationDigest: accepted.confirmationDigest,
931
- confirmedAt: accepted.confirmedAt,
932
- updatedAt: accepted.confirmedAt ?? new Date().toISOString(),
933
- },
934
- });
935
- }
936
- const applied = await applyOperatingInitialization({
937
- projectRoot: request.projectRoot,
938
- preview,
939
- confirmationDigest: preview.previewDigest,
940
- });
941
- // FR4: a committed init apply is a fresh (re-genesised) board. Purge the
942
- // machine-local advisor sessions and incremental evidence baselines a prior
943
- // generation left at this path so the new board never inherits a stale
944
- // session or a baseline bound to a superseded workspace/board identity.
945
- await purgeBoardMachineLocalCaches({ projectRoot: request.projectRoot, localRoot });
946
- if (resumedSession) {
947
- const appliedAt = new Date().toISOString();
948
- await updateGuidedSession({
949
- projectRoot: request.projectRoot,
950
- localRoot,
951
- session: {
952
- ...resumedSession.session,
953
- state: 'applied',
954
- previewDigest: preview.previewDigest,
955
- confirmationDigest: accepted.confirmationDigest,
956
- confirmedAt: accepted.confirmedAt,
957
- appliedAt,
958
- updatedAt: appliedAt,
959
- },
960
- });
961
- }
962
- return success(request.action, {
963
- message: applied.initialized
964
- ? 'Operating Board initialized.'
965
- : 'Operating Board already matches this configuration.',
966
- data: {
967
- changedPaths: applied.changedPaths,
968
- workspaceDigest: preview.workspace.workspaceDigest,
969
- legacyMigration,
970
- },
971
- next: [
972
- ...(legacyMigration.record
973
- ? legacyMigration.record.state === 'conflict'
974
- ? ['planr operate migrate inspect']
975
- : ['planr operate migrate apply']
976
- : []),
977
- 'planr operate run',
978
- 'planr operate status',
979
- ],
980
- });
981
- }
982
- async function showConfig(request) {
983
- const config = await validateOperatingConfiguration(request.projectRoot);
984
- if (request.action === 'config.edit') {
985
- return success(request.action, {
986
- message: 'Operating configuration is managed at .planr/operate/config.json.',
987
- data: { path: '.planr/operate/config.json', config },
988
- next: ['Edit .planr/operate/config.json', 'planr operate config validate'],
989
- });
990
- }
991
- return success(request.action, {
992
- data: config,
993
- message: request.action === 'config.validate' ? 'Operating configuration is valid.' : undefined,
994
- });
995
- }
996
- async function profiles(request) {
997
- if (request.action === 'profiles.list') {
998
- return success(request.action, { data: listOperatingProfiles() });
999
- }
1000
- if (request.action === 'profiles.show') {
1001
- const profile = argument(request, 'profile');
1002
- if (!profile) {
1003
- throw new OperateError('E_OPERATE_CONFIG_INVALID', 'Profile ID is required.');
1004
- }
1005
- return success(request.action, {
1006
- data: getOperatingProfile(profile),
1007
- });
1008
- }
1009
- const file = argument(request, 'file');
1010
- if (!file)
1011
- throw new OperateError('E_OPERATE_CONFIG_INVALID', 'Profile file is required.');
1012
- const parsed = await readCustomOperatingProfile(request.projectRoot, file);
1013
- const profile = { ...getOperatingProfile('custom'), ...parsed };
1014
- if (!profile.enabledRoles?.length) {
1015
- throw new OperateError('E_OPERATE_CONFIG_INVALID', 'Custom profile is incomplete.');
1016
- }
1017
- return success(request.action, { data: profile, message: 'Custom profile is valid.' });
1018
- }
1019
- /**
1020
- * FR10 / T-009 + T-018 — the legacy `.planr/operate-profile.json` field migration
1021
- * (`profiles migrate inspect|apply`), routed through the action map. T-009 wired
1022
- * these directly to `profile-migration.ts`, which meant they bypassed the
1023
- * cross-cutting handling every other action receives here — notably the
1024
- * storage-layout auto-migration guard in `executeOperateAction`. Dispatching them
1025
- * through the map restores that guard for the mutating `apply` (so a
1026
- * SPEC-002-layout project is reconciled on open before the profile is rewritten),
1027
- * plus the standard `--json` shaping and structured provenance. `inspect` stays a
1028
- * read-only preview (`OPERATE_READ_ONLY_ACTIONS`): per FR10 it previews without
1029
- * mutating, so it must not migrate the on-disk layout as a side effect. The
1030
- * migration's own semantics are unchanged: still idempotent, still an exact
1031
- * digest-verified backup before mutation, still a journalled transaction with
1032
- * rollback — all owned by `profile-migration.ts`, which this handler only calls.
1033
- */
1034
- async function profileMigration(request) {
1035
- const localRoot = option(request, 'localRoot', undefined);
1036
- const scoped = localRoot ? { localRoot } : {};
1037
- if (request.action === 'profiles.migrate.inspect') {
1038
- const inspection = await inspectOperatingProfileMigration({
1039
- projectRoot: request.projectRoot,
1040
- ...scoped,
1041
- });
1042
- return success(request.action, {
1043
- message: !inspection.present
1044
- ? 'No legacy .planr/operate-profile.json is present; nothing to migrate.'
1045
- : inspection.changed
1046
- ? `Legacy profile migration previewed: ${inspection.converted.length} field(s) converted, ${inspection.unsupported.length} unsupported. No change was made.`
1047
- : 'Legacy profile already matches the current schema; nothing to migrate.',
1048
- counts: {
1049
- preserved: inspection.preserved.length,
1050
- converted: inspection.converted.length,
1051
- unsupported: inspection.unsupported.length,
1052
- },
1053
- warnings: inspection.unsupported.map((entry) => `${entry.field}: ${entry.reason}`),
1054
- data: inspection,
1055
- next: inspection.present && inspection.changed
1056
- ? ['planr operate profiles migrate apply --yes']
1057
- : [],
1058
- });
1059
- }
1060
- const applied = await applyOperatingProfileMigration({
1061
- projectRoot: request.projectRoot,
1062
- confirmed: option(request, 'yes', false),
1063
- ...scoped,
1064
- });
1065
- return success(request.action, {
1066
- message: !applied.present
1067
- ? 'No legacy .planr/operate-profile.json is present; nothing to migrate.'
1068
- : applied.applied
1069
- ? `Migrated the legacy operating profile; exact pre-migration backup written. Converted ${applied.converted.length} field(s); dropped ${applied.unsupported.length} unsupported field(s).`
1070
- : 'Legacy operating profile already matches the current schema; no change was made.',
1071
- paths: applied.backupPath ? { backup: applied.backupPath } : {},
1072
- counts: {
1073
- preserved: applied.preserved.length,
1074
- converted: applied.converted.length,
1075
- unsupported: applied.unsupported.length,
1076
- },
1077
- warnings: applied.unsupported.map((entry) => `${entry.field}: ${entry.reason}`),
1078
- data: applied,
1079
- });
1080
- }
1081
- /**
1082
- * The cycle states a governed cycle carries while it is still mid-flight: work
1083
- * may already be durably recorded, but no gate has been reached. The aggregate
1084
- * surfaces (`status`, `review`) must never describe a board in one of these
1085
- * states as quiet or as standing at the review gate — the per-lens board files
1086
- * stay honest, so an aggregate that claims otherwise is the only thing a reader
1087
- * can be misled by.
1088
- */
1089
- const OPERATING_IN_FLIGHT_CYCLE_STATES = new Set([
1090
- 'preparing',
1091
- 'collecting',
1092
- 'advising',
1093
- 'consolidating',
1094
- ]);
1095
- /** The only cycle states that genuinely present the mandatory human review gate. */
1096
- const OPERATING_REVIEW_GATE_CYCLE_STATES = new Set(['reviewable', 'blocked', 'failed']);
1097
- /**
1098
- * The advisory lenses a cycle is expected to record: the roles the cycle itself
1099
- * enabled (or every board role when it recorded no explicit selection), with
1100
- * Chair always expected because the review gate needs the consolidation.
1101
- */
1102
- function expectedOperatingCycleRoles(cycle) {
1103
- const enabled = Array.isArray(cycle.enabledRoles)
1104
- ? cycle.enabledRoles.filter((entry) => typeof entry === 'string')
1105
- : [];
1106
- const wanted = new Set(enabled.length > 0 ? enabled : OPERATING_BOARD_ROLES.map((role) => role.id));
1107
- wanted.add('chair');
1108
- return OPERATING_BOARD_ROLES.map((role) => role.id).filter((id) => wanted.has(id));
1109
- }
1110
- /**
1111
- * The truthful one-line account of a mid-flight cycle for `status`: how much of
1112
- * the board has durably recorded, and what is still outstanding before the
1113
- * review gate. Sourced from the committed `advisor-result` records, never from
1114
- * `state.summary.quiet` — projected findings only exist after consolidation, so
1115
- * a board with five recorded lenses and no Chair still summarizes as quiet, and
1116
- * reporting that summary is the false-negative this replaces.
1117
- */
1118
- async function describeInFlightOperatingCycle(store, cycle) {
1119
- const expected = expectedOperatingCycleRoles(cycle);
1120
- const results = await readPersistedOperatingRoleResults(store, cycle.id);
1121
- const recorded = new Set(results.map((result) => result.roleId));
1122
- const pending = expected.filter((roleId) => !recorded.has(roleId));
1123
- const proposals = results.reduce((total, result) => total + result.proposals.length, 0);
1124
- return [
1125
- `Cycle ${cycle.id} is ${cycle.state}, not quiet:`,
1126
- `${expected.filter((roleId) => recorded.has(roleId)).length} of ${expected.length}`,
1127
- `advisory lens result(s) recorded, ${proposals} recorded proposal(s) awaiting consolidation.`,
1128
- pending.length > 0
1129
- ? `Outstanding lens(es): ${pending.join(', ')}.`
1130
- : 'Every expected lens has recorded; consolidation into a reviewable board is outstanding.',
1131
- ].join(' ');
1132
- }
1133
- async function status(request) {
1134
- const config = await validateOperatingConfiguration(request.projectRoot);
1135
- const localRoot = option(request, 'localRoot', undefined);
1136
- await assertCommittedOperatingView(request.projectRoot, localRoot ? { localRoot } : {});
1137
- const store = new OperatingEventStore(request.projectRoot, localRoot ? { localRoot } : {});
1138
- const state = await store.state();
1139
- const activeCycle = [...state.cycles]
1140
- .filter((cycle) => !['closed', 'cancelled'].includes(cycle.state))
1141
- .sort((left, right) => left.id.localeCompare(right.id))
1142
- .at(-1);
1143
- // FR8 / E-008: surface `nextDueAt` via the pipeline's pure calculator with an
1144
- // INJECTED clock. This CLI boundary supplies `now` (an explicit option or the
1145
- // wall clock); the calculator itself reads no `Date.now()`. `manual` → null;
1146
- // `weekly` / `monthly` → the computed due date from the persisted `lastRunAt`.
1147
- const now = option(request, 'now', undefined) ?? new Date().toISOString();
1148
- const lastRunAt = await readOperatingLastRunAt(request.projectRoot, localRoot ? { localRoot } : {});
1149
- const nextDueAt = await computeNextDueAt(config.cadence, lastRunAt, now);
1150
- // A cycle that is still preparing/collecting/advising/consolidating is
1151
- // mid-flight, so neither `quiet` nor a surfaced-findings count describes it:
1152
- // both are projections that only become meaningful after consolidation. Report
1153
- // the real cycle state and the outstanding lenses instead.
1154
- const inFlightCycle = activeCycle && OPERATING_IN_FLIGHT_CYCLE_STATES.has(activeCycle.state)
1155
- ? activeCycle
1156
- : undefined;
1157
- return success(request.action, {
1158
- data: { ...state, cadence: { mode: config.cadence, lastRunAt, nextDueAt } },
1159
- message: activeCycle?.state === 'blocked'
1160
- ? `Operating Board is blocked on ${state.summary.openGaps} evidence or advisor readiness gap(s).`
1161
- : inFlightCycle
1162
- ? await describeInFlightOperatingCycle(store, inFlightCycle)
1163
- : state.summary.quiet
1164
- ? 'Operating Board is quiet.'
1165
- : `${state.summary.surfacedFindings} finding(s) are surfaced.`,
1166
- });
1167
- }
1168
- async function run(request) {
1169
- await validateOperatingConfiguration(request.projectRoot);
1170
- const requestedRuntime = option(request, 'runtime', 'auto');
1171
- const resolvedRuntime = await resolvedOperatingRuntime(request.projectRoot, requestedRuntime);
1172
- const nativeAdvisors = await usesNativeOperatingAdvisors(request.projectRoot, requestedRuntime);
1173
- if (resolvedRuntime !== 'auto' &&
1174
- !nativeAdvisors &&
1175
- !option(request, 'offline', false) &&
1176
- !option(request, 'reviewOnly', false)) {
1177
- throw new OperateError('E_RUNTIME_UNSUPPORTED', `Runtime ${resolvedRuntime} does not expose a compatible agent-native Operate workflow.`, {
1178
- runtime: resolvedRuntime,
1179
- recovery: 'Run `planr setup --scope user`, then restart the runtime so its generated Operate workflow is available.',
1180
- });
1181
- }
1182
- const deferAdvisors = !option(request, 'offline', false) &&
1183
- !option(request, 'dryRun', false) &&
1184
- !option(request, 'reviewOnly', false) &&
1185
- nativeAdvisors;
1186
- // Preflight the structured-provider key on a non-offline, non-native preview so
1187
- // `run --preview` names a missing key before any cycle starts, rather than
1188
- // surfacing it only when a real cycle reaches the provider path. Native and
1189
- // offline runs never need the structured key, so they skip the check.
1190
- const previewProviderWarnings = [];
1191
- if (option(request, 'preview', false) &&
1192
- !option(request, 'offline', false) &&
1193
- !option(request, 'reviewOnly', false) &&
1194
- !nativeAdvisors) {
1195
- const openPlanrConfig = await loadConfig(request.projectRoot).catch(() => null);
1196
- const readiness = openPlanrConfig
1197
- ? await resolveAIProviderReadiness(openPlanrConfig)
1198
- : {
1199
- configured: false,
1200
- keyResolvable: false,
1201
- remedy: 'No AI provider is configured. Run `planr config set-provider <name>` then `planr config set-key <provider>`, or run offline with --offline.',
1202
- };
1203
- if (!readiness.keyResolvable && readiness.remedy) {
1204
- previewProviderWarnings.push(readiness.remedy);
1205
- }
1206
- }
1207
- const result = await runOperatingCycle({
1208
- projectRoot: request.projectRoot,
1209
- cycleId: option(request, 'cycleId', undefined),
1210
- focus: stringList(request.options.focus),
1211
- depth: option(request, 'depth', 'standard'),
1212
- runtime: resolvedRuntime,
1213
- offline: option(request, 'offline', false),
1214
- reviewOnly: option(request, 'reviewOnly', false),
1215
- preview: option(request, 'preview', false),
1216
- dryRun: option(request, 'dryRun', false),
1217
- confirmed: option(request, 'yes', false),
1218
- quiet: option(request, 'json', false),
1219
- deferAdvisors,
1220
- });
1221
- const projected = result.state?.cycles.find((cycle) => cycle.id === result.cycle.id);
1222
- const drafts = !result.preview &&
1223
- !result.dryRun &&
1224
- !result.nativeHandoff &&
1225
- ['reviewable', 'closed'].includes(projected?.state ?? '')
1226
- ? await materializeOperatingDrafts({
1227
- projectRoot: request.projectRoot,
1228
- cycleId: result.cycle.id,
1229
- })
1230
- : { created: [], existing: [], rejected: [] };
1231
- if (drafts.created.length > 0 && result.state) {
1232
- await persistOperatingProjections({
1233
- projectRoot: request.projectRoot,
1234
- state: result.state,
1235
- revalidateEventHead: async () => (await new OperatingEventStore(request.projectRoot).replay()).eventHead,
1236
- });
1237
- }
1238
- const counts = {
1239
- findings: result.state?.findings.filter((entry) => entry.cycleId === result.cycle.id).length ?? 0,
1240
- decisions: result.state?.decisions.filter((entry) => entry.cycleId === result.cycle.id).length ?? 0,
1241
- gaps: result.state?.dataGaps.filter((entry) => entry.cycleId === result.cycle.id).length ?? 0,
1242
- specs: result.state?.specLinks.filter((entry) => entry.cycleId === result.cycle.id).length ?? 0,
1243
- artifacts: drafts.created.length + drafts.existing.length,
1244
- };
1245
- const handoff = result.nativeHandoff
1246
- ? await createOperatingAdapterStartHandoff({
1247
- projectRoot: request.projectRoot,
1248
- cycleId: result.nativeHandoff.cycleId,
1249
- evidenceDigest: result.nativeHandoff.evidenceDigest,
1250
- runtime: result.cycle.producer.runtime,
1251
- phase: result.nativeHandoff.phase,
1252
- roles: result.nativeHandoff.roles,
1253
- })
1254
- : undefined;
1255
- const nextActions = result.preview
1256
- ? [
1257
- option(request, 'offline', false)
1258
- ? 'planr operate run --offline'
1259
- : nativeAdvisors
1260
- ? `planr operate run --runtime ${resolvedRuntime}`
1261
- : 'planr operate run',
1262
- ]
1263
- : handoff
1264
- ? handoff.next.map(({ argv }) => argv.join(' '))
1265
- : [`planr operate review ${result.cycle.id}`];
1266
- return success(request.action, {
1267
- message: result.preview
1268
- ? 'Operating cycle preview is ready; no provider calls or writes were made.'
1269
- : result.dryRun
1270
- ? 'Operating cycle dry-run completed without committing state.'
1271
- : result.nativeHandoff
1272
- ? `Operating cycle is awaiting isolated native ${result.nativeHandoff.phase} execution.`
1273
- : projected?.state === 'blocked'
1274
- ? 'Operating cycle is blocked on evidence or advisor readiness.'
1275
- : 'Operating cycle is ready for human review.',
1276
- cycleId: result.cycle.id,
1277
- state: projected?.state ?? result.cycle.state,
1278
- paths: {
1279
- cycle: `.planr/operate/cycles/${result.cycle.id}`,
1280
- brief: `.planr/operate/cycles/${result.cycle.id}/brief.md`,
1281
- report: `.planr/operate/cycles/${result.cycle.id}/report.md`,
1282
- reportJson: `.planr/operate/cycles/${result.cycle.id}/report.json`,
1283
- actions: `.planr/operate/cycles/${result.cycle.id}/actions.md`,
1284
- },
1285
- counts,
1286
- handoff,
1287
- warnings: [
1288
- ...new Set([
1289
- ...(result.cycle.warnings ?? []),
1290
- ...stringList(projected?.warnings),
1291
- ...previewProviderWarnings,
1292
- ]),
1293
- ],
1294
- nextActions,
1295
- data: { ...result, drafts },
1296
- next: nextActions,
1297
- });
1298
- }
1299
- async function drafts(request) {
1300
- if (request.action === 'drafts.list') {
1301
- const records = await listOperatingDrafts(request.projectRoot);
1302
- return success(request.action, {
1303
- data: records.map((record) => record.draft),
1304
- counts: { artifacts: records.length },
1305
- });
1306
- }
1307
- const draftId = argument(request, 'draftId') ?? argument(request, 'id');
1308
- if (!draftId) {
1309
- throw new OperateError('E_OPERATE_CONFIG_INVALID', 'Draft ID is required.');
1310
- }
1311
- if (request.action === 'drafts.show') {
1312
- return success(request.action, {
1313
- data: await showOperatingDraft(request.projectRoot, draftId),
1314
- });
1315
- }
1316
- if (!option(request, 'yes', false)) {
1317
- throw new OperateError('E_OPERATE_AUTHORITY_REQUIRED', `${request.action} requires explicit confirmation with --yes.`);
1318
- }
1319
- if (request.action === 'drafts.approve') {
1320
- return success(request.action, {
1321
- data: await approveOperatingDraft(request.projectRoot, draftId),
1322
- message: `Operating draft ${draftId} approved. PLAN and SHIP remain separate actions.`,
1323
- });
1324
- }
1325
- return success(request.action, {
1326
- data: await discardOperatingDraft(request.projectRoot, draftId),
1327
- message: `Operating draft ${draftId} discarded.`,
1328
- });
1329
- }
1330
- async function contextResearch(request) {
1331
- if (request.action === 'context.show') {
1332
- return success(request.action, {
1333
- data: await readOperatingContextResearch(request.projectRoot),
1334
- });
1335
- }
1336
- if (request.action === 'context.review') {
1337
- return success(request.action, {
1338
- data: await recordOperatingContextResearch({
1339
- projectRoot: request.projectRoot,
1340
- stdin: request.stdin,
1341
- }),
1342
- message: 'Runtime-authored context was validated against the workspace and is ready for one compact owner review.',
1343
- next: ['planr operate init'],
1344
- });
1345
- }
1346
- const runtime = await resolvedOperatingRuntime(request.projectRoot, option(request, 'runtime', 'auto'));
1347
- if (runtime === 'auto') {
1348
- throw new OperateError('E_RUNTIME_UNSUPPORTED', 'Context research requires a selected Claude Code, Codex, or Cursor runtime.');
1349
- }
1350
- const researchMode = option(request, 'research', 'local');
1351
- const consentDigest = researchMode === 'connected'
1352
- ? canonicalDigest({
1353
- action: 'operate.context.connected-research',
1354
- runtime,
1355
- project: canonicalDigest(request.projectRoot),
1356
- })
1357
- : null;
1358
- const preview = option(request, 'preview', false);
1359
- if (researchMode === 'connected' && !preview && !option(request, 'yes', false)) {
1360
- throw new OperateError('E_OPERATE_AUTHORITY_REQUIRED', 'Connected research requires the exact preview and explicit confirmation.', {
1361
- confirmationDigest: consentDigest,
1362
- recovery: `planr operate context refresh --research connected --runtime ${runtime} --yes --confirm ${consentDigest}`,
1363
- });
1364
- }
1365
- const confirmed = option(request, 'confirm', undefined);
1366
- if (researchMode === 'connected' && !preview && confirmed !== consentDigest) {
1367
- throw new OperateError('E_OPERATE_AUTHORITY_REQUIRED', 'Connected research confirmation does not match the current project and runtime.', { confirmationDigest: consentDigest });
1368
- }
1369
- const prepared = await prepareOperatingContextResearch({
1370
- projectRoot: request.projectRoot,
1371
- runtime,
1372
- researchMode,
1373
- connectedResearchConsentDigest: consentDigest,
1374
- preview,
1375
- });
1376
- return success(request.action, {
1377
- data: { ...prepared, confirmationDigest: consentDigest },
1378
- preview: preview ? { researchMode, runtime, confirmationDigest: consentDigest } : undefined,
1379
- message: preview
1380
- ? 'Context research preview is ready; no workspace or provider action occurred.'
1381
- : 'Agent-native context research is prepared for the selected runtime.',
1382
- next: preview
1383
- ? [
1384
- `planr operate context refresh --research ${researchMode} --runtime ${runtime}${researchMode === 'connected' ? ` --yes --confirm ${consentDigest}` : ''}`,
1385
- ]
1386
- : ['planr operate context review --stdin --json'],
1387
- });
1388
- }
1389
- /**
1390
- * Whether `review` is genuinely standing at the mandatory human review gate —
1391
- * and, when it is not, the exact phase the cycle actually reached plus the
1392
- * artifacts still missing. Verified from the committed cycle state and the
1393
- * on-disk artifacts (`verifyOperatingCompletionPhases`), never from the fact
1394
- * that the command ran: announcing the gate for a cycle still in `advising`
1395
- * tells a reader the board is done deliberating when five lenses are recorded
1396
- * and the Chair has not run.
1397
- */
1398
- async function operatingReviewGateMessage(input) {
1399
- const scoped = input.localRoot ? { localRoot: input.localRoot } : {};
1400
- const state = await new OperatingEventStore(input.projectRoot, scoped).state();
1401
- const targetId = input.cycleId ?? state.summary.currentCycleId ?? undefined;
1402
- const cycle = targetId ? state.cycles.find((entry) => entry.id === targetId) : undefined;
1403
- if (!cycle) {
1404
- return {
1405
- message: 'No governed operating cycle exists yet, so no review gate has been reached. No route has been applied.',
1406
- warnings: [],
1407
- };
1408
- }
1409
- if (OPERATING_REVIEW_GATE_CYCLE_STATES.has(cycle.state)) {
1410
- return {
1411
- message: 'This is the mandatory human review gate. No route has been applied.',
1412
- warnings: [],
1413
- };
1414
- }
1415
- const completion = await verifyOperatingCompletionPhases(state, cycle.id, resolveOperatingPaths(input.projectRoot, scoped));
1416
- return {
1417
- message: [
1418
- `Cycle ${cycle.id} is ${cycle.state} and has NOT reached the human review gate.`,
1419
- `Verified on disk: reached phase ${completion.reachedPhase ?? 'none'} (${completion.reachedLabel}).`,
1420
- ...(completion.nextPhase
1421
- ? [`Current phase: ${completion.nextPhase} — ${completion.nextLabel}.`]
1422
- : []),
1423
- ...(completion.missing.length > 0
1424
- ? [`Still missing: ${completion.missing.join('; ')}.`]
1425
- : []),
1426
- 'No route has been applied.',
1427
- ].join(' '),
1428
- warnings: completion.missing.map((item) => `Missing before the review gate: ${item}`),
1429
- };
1430
- }
1431
- async function reviewOrBrief(request) {
1432
- const cycleId = argument(request, 'cycleId');
1433
- // FR3/E-003: the human review gate renders report Markdown (brief + per-role
1434
- // lens reports + exact next actions), never a raw `JSON.stringify` of the
1435
- // state. `--json` keeps returning the exact raw state object, byte-unchanged.
1436
- const human = request.action === 'review' && !option(request, 'json', false);
1437
- const localRoot = option(request, 'localRoot', undefined);
1438
- const data = await readOperatingReview({
1439
- projectRoot: request.projectRoot,
1440
- cycleId,
1441
- brief: request.action === 'brief',
1442
- human,
1443
- localRoot,
1444
- });
1445
- if (request.action !== 'review')
1446
- return success(request.action, { data });
1447
- const gate = await operatingReviewGateMessage({
1448
- projectRoot: request.projectRoot,
1449
- cycleId,
1450
- localRoot,
1451
- });
1452
- return success(request.action, { data, message: gate.message, warnings: gate.warnings });
1453
- }
1454
- async function report(request) {
1455
- const requestedFormat = option(request, 'format', undefined);
1456
- if (requestedFormat && !['markdown', 'json'].includes(requestedFormat)) {
1457
- throw new OperateError('E_OPERATE_CONFIG_INVALID', `Unknown report format ${requestedFormat}. Use markdown or json.`);
1458
- }
1459
- const data = await readOperatingReport({
1460
- projectRoot: request.projectRoot,
1461
- cycleId: argument(request, 'cycleId'),
1462
- lens: option(request, 'lens', 'all'),
1463
- localRoot: option(request, 'localRoot', undefined),
1464
- });
1465
- const format = requestedFormat ?? (option(request, 'json', false) ? 'json' : 'markdown');
1466
- return success(request.action, {
1467
- data: format === 'json' ? data : data.markdown,
1468
- message: `Operating report is ready for ${data.cycleId}.`,
1469
- });
1470
- }
1471
- async function collections(request) {
1472
- const [collection, operation] = request.action.split('.');
1473
- const singular = collection === 'cycles'
1474
- ? 'cycleId'
1475
- : collection === 'findings'
1476
- ? 'findingId'
1477
- : collection === 'decisions'
1478
- ? 'decisionId'
1479
- : collection === 'gaps'
1480
- ? 'gapId'
1481
- : collection === 'routes'
1482
- ? 'routeId'
1483
- : collection === 'evidence'
1484
- ? 'evidenceId'
1485
- : 'migrationId';
1486
- const id = argument(request, singular) ?? argument(request, 'id');
1487
- const data = await readOperatingCollection({
1488
- projectRoot: request.projectRoot,
1489
- collection: collection,
1490
- ...(operation === 'show' ? { id } : {}),
1491
- });
1492
- if (operation === 'show' && !data) {
1493
- throw new OperateError('E_OPERATE_STATE_INVALID', `Unknown ${collection} record ${id}.`);
1494
- }
1495
- return success(request.action, { data });
1496
- }
1497
- async function cycleMutation(request) {
1498
- const cycleId = argument(request, 'cycleId');
1499
- if (!cycleId)
1500
- throw new OperateError('E_OPERATE_STATE_INVALID', 'Cycle ID is required.');
1501
- const action = request.action.slice('cycles.'.length);
1502
- return success(request.action, {
1503
- data: await transitionOperatingCycle({
1504
- projectRoot: request.projectRoot,
1505
- cycleId,
1506
- action,
1507
- confirmed: option(request, 'yes', false),
1508
- }),
1509
- });
1510
- }
1511
- async function abandonStalledRole(request) {
1512
- // SPEC-005 T-020 — the operator escape for a cycle stranded at `phase: advisors`
1513
- // because a runtime dispatched a lens and reported nothing. Gated on a lapsed
1514
- // adapter lease + `--yes`, it terminally governs the still-unrecorded lenses
1515
- // `not_evaluated` so a following `planr operate run` (offline when no runtime is
1516
- // available) reaches a reviewable cycle without discarding the recorded work. It
1517
- // never invokes the runtime lifecycle, so it works when the runtime is gone.
1518
- const cycleId = argument(request, 'cycleId');
1519
- if (!cycleId)
1520
- throw new OperateError('E_OPERATE_STATE_INVALID', 'Cycle ID is required.');
1521
- const data = await reapStalledOperatingRoles({
1522
- projectRoot: request.projectRoot,
1523
- cycleId,
1524
- role: option(request, 'role', undefined),
1525
- reason: option(request, 'reason', undefined),
1526
- confirmed: option(request, 'yes', false),
1527
- });
1528
- return success(request.action, { data, nextActions: data.next, next: data.next });
1529
- }
1530
- async function findingMutation(request) {
1531
- const findingId = argument(request, 'findingId');
1532
- if (!findingId)
1533
- throw new OperateError('E_OPERATE_STATE_INVALID', 'Finding ID is required.');
1534
- return success(request.action, {
1535
- data: await governOperatingFinding({
1536
- projectRoot: request.projectRoot,
1537
- findingId,
1538
- action: request.action.slice('findings.'.length),
1539
- confirmed: option(request, 'yes', false),
1540
- reason: option(request, 'reason', undefined),
1541
- impact: request.options.impact,
1542
- confidence: request.options.confidence,
1543
- ease: request.options.ease,
1544
- }),
1545
- });
1546
- }
1547
- async function routeMutation(request) {
1548
- const routeId = argument(request, 'routeId');
1549
- if (!routeId)
1550
- throw new OperateError('E_OPERATE_STATE_INVALID', 'Route ID is required.');
1551
- const data = (await applyOrRollbackRoute({
1552
- projectRoot: request.projectRoot,
1553
- routeId,
1554
- action: request.action.endsWith('.apply') ? 'apply' : 'rollback',
1555
- previewDigest: option(request, 'previewDigest', undefined),
1556
- preview: option(request, 'preview', false) || option(request, 'dryRun', false),
1557
- confirmed: option(request, 'yes', false),
1558
- }));
1559
- return success(request.action, {
1560
- data,
1561
- nextActions: data.state === 'awaiting-artifact-review'
1562
- ? [
1563
- `planr operate routes apply ${routeId} --preview`,
1564
- `planr operate routes apply ${routeId} --preview-digest <generated-preview-digest> --yes`,
1565
- ]
1566
- : [],
1567
- });
1568
- }
1569
- async function answerMutation(request) {
1570
- if (request.action === 'gaps.verify') {
1571
- const gapId = argument(request, 'gapId');
1572
- if (!gapId)
1573
- throw new OperateError('E_OPERATE_STATE_INVALID', 'Gap ID is required.');
1574
- return success(request.action, {
1575
- data: await verifyOperatingGap({
1576
- projectRoot: request.projectRoot,
1577
- gapId,
1578
- evidenceRefs: stringList(request.options.evidenceRef),
1579
- confirmed: option(request, 'yes', false),
1580
- }),
1581
- });
1582
- }
1583
- const value = String(option(request, 'value', request.stdin ?? '')).trim();
1584
- if (request.action === 'decisions.decide') {
1585
- const decisionId = argument(request, 'decisionId');
1586
- if (!decisionId)
1587
- throw new OperateError('E_OPERATE_STATE_INVALID', 'Decision ID is required.');
1588
- return success(request.action, {
1589
- data: await decideOperatingDecision({
1590
- projectRoot: request.projectRoot,
1591
- decisionId,
1592
- value,
1593
- reason: option(request, 'reason', undefined),
1594
- confirmed: option(request, 'yes', false),
1595
- }),
1596
- });
1597
- }
1598
- const gapId = argument(request, 'gapId');
1599
- if (!gapId)
1600
- throw new OperateError('E_OPERATE_STATE_INVALID', 'Gap ID is required.');
1601
- return success(request.action, {
1602
- data: await answerOperatingGap({
1603
- projectRoot: request.projectRoot,
1604
- gapId,
1605
- value,
1606
- confirmed: option(request, 'yes', false),
1607
- }),
1608
- });
1609
- }
1610
- async function maintenance(request) {
1611
- if (request.action.startsWith('cache.')) {
1612
- return success(request.action, {
1613
- data: await operatingCacheAction({
1614
- projectRoot: request.projectRoot,
1615
- action: request.action.endsWith('purge') ? 'purge' : 'status',
1616
- confirmed: option(request, 'yes', false),
1617
- localRoot: option(request, 'localRoot', undefined),
1618
- }),
1619
- });
1620
- }
1621
- if (request.action.startsWith('integrity.')) {
1622
- return success(request.action, {
1623
- data: await operatingIntegrityAction({
1624
- projectRoot: request.projectRoot,
1625
- action: request.action.endsWith('enable') ? 'enable' : 'status',
1626
- confirmed: option(request, 'yes', false),
1627
- }),
1628
- });
1629
- }
1630
- if (request.action === 'diagnostics.export') {
1631
- return success(request.action, {
1632
- data: await exportOperatingDiagnostics({
1633
- projectRoot: request.projectRoot,
1634
- output: option(request, 'output', undefined),
1635
- }),
1636
- });
1637
- }
1638
- if (request.action === 'security.repair') {
1639
- return success(request.action, {
1640
- data: await repairOperatingSecurity({
1641
- projectRoot: request.projectRoot,
1642
- confirmed: option(request, 'yes', false),
1643
- }),
1644
- });
1645
- }
1646
- if (request.action === 'migrate.inspect') {
1647
- return success(request.action, {
1648
- data: await inspectOperatingMigration({ projectRoot: request.projectRoot }),
1649
- });
1650
- }
1651
- if (request.action === 'migrate.apply') {
1652
- return success(request.action, {
1653
- data: await applyOperatingMigration({
1654
- projectRoot: request.projectRoot,
1655
- confirmed: option(request, 'yes', false),
1656
- }),
1657
- });
1658
- }
1659
- if (request.action === 'migrations.rollback') {
1660
- const migrationId = argument(request, 'migrationId');
1661
- if (!migrationId) {
1662
- throw new OperateError('E_OPERATE_STATE_INVALID', 'Migration ID is required.');
1663
- }
1664
- return success(request.action, {
1665
- data: await rollbackOperatingMigration({
1666
- projectRoot: request.projectRoot,
1667
- migrationId,
1668
- confirmed: option(request, 'yes', false),
1669
- }),
1670
- });
1671
- }
1672
- const lifecycleNamespace = request.action.startsWith('harness.') ? 'harness.' : 'adapter.';
1673
- const data = await operateAdapterLifecycle({
1674
- projectRoot: request.projectRoot,
1675
- action: request.action.slice(lifecycleNamespace.length),
1676
- cycleId: option(request, 'cycleId', undefined),
1677
- evidenceDigest: option(request, 'evidenceDigest', undefined),
1678
- lease: option(request, 'lease', undefined),
1679
- idempotencyKey: option(request, 'idempotencyKey', undefined),
1680
- role: option(request, 'role', undefined),
1681
- reason: option(request, 'reason', undefined),
1682
- stdin: request.stdin,
1683
- });
1684
- const handoff = data && typeof data === 'object' && 'handoff' in data && data.handoff
1685
- ? data.handoff
1686
- : undefined;
1687
- const nextActions = handoff?.next.map(({ argv }) => argv.join(' ')) ?? [];
1688
- return success(request.action, {
1689
- data,
1690
- handoff,
1691
- nextActions,
1692
- next: nextActions,
1693
- });
1694
- }
1695
- const HANDLERS = {
1696
- inspect,
1697
- demo,
1698
- init: initialize,
1699
- 'config.show': showConfig,
1700
- 'config.validate': showConfig,
1701
- 'config.edit': showConfig,
1702
- 'profiles.list': profiles,
1703
- 'profiles.show': profiles,
1704
- 'profiles.validate': profiles,
1705
- 'profiles.migrate.inspect': profileMigration,
1706
- 'profiles.migrate.apply': profileMigration,
1707
- 'context.show': contextResearch,
1708
- 'context.refresh': contextResearch,
1709
- 'context.review': contextResearch,
1710
- 'drafts.list': drafts,
1711
- 'drafts.show': drafts,
1712
- 'drafts.approve': drafts,
1713
- 'drafts.discard': drafts,
1714
- run,
1715
- review: reviewOrBrief,
1716
- brief: reviewOrBrief,
1717
- report,
1718
- status,
1719
- 'cycles.list': collections,
1720
- 'cycles.show': collections,
1721
- 'cycles.resume': cycleMutation,
1722
- 'cycles.cancel': cycleMutation,
1723
- 'cycles.recover': cycleMutation,
1724
- 'cycles.close': cycleMutation,
1725
- 'findings.list': collections,
1726
- 'findings.show': collections,
1727
- 'findings.accept': findingMutation,
1728
- 'findings.reject': findingMutation,
1729
- 'findings.supersede': findingMutation,
1730
- 'routes.list': collections,
1731
- 'routes.show': collections,
1732
- 'routes.apply': routeMutation,
1733
- 'routes.rollback': routeMutation,
1734
- 'decisions.list': collections,
1735
- 'decisions.show': collections,
1736
- 'decisions.decide': answerMutation,
1737
- 'gaps.list': collections,
1738
- 'gaps.show': collections,
1739
- 'gaps.answer': answerMutation,
1740
- 'gaps.verify': answerMutation,
1741
- 'evidence.list': collections,
1742
- 'evidence.show': collections,
1743
- 'migrate.inspect': maintenance,
1744
- 'migrate.apply': maintenance,
1745
- 'migrations.list': collections,
1746
- 'migrations.show': collections,
1747
- 'migrations.rollback': maintenance,
1748
- 'cache.status': maintenance,
1749
- 'cache.purge': maintenance,
1750
- 'integrity.status': maintenance,
1751
- 'integrity.enable': maintenance,
1752
- 'diagnostics.export': maintenance,
1753
- 'security.repair': maintenance,
1754
- 'adapter.prepare': maintenance,
1755
- 'adapter.record': maintenance,
1756
- 'adapter.validate': maintenance,
1757
- 'adapter.resume': maintenance,
1758
- 'adapter.finalize': maintenance,
1759
- 'adapter.cancel': maintenance,
1760
- 'adapter.heartbeat': maintenance,
1761
- 'adapter.abandon': maintenance,
1762
- 'harness.prepare': maintenance,
1763
- 'harness.record': maintenance,
1764
- 'harness.validate': maintenance,
1765
- 'harness.resume': maintenance,
1766
- 'harness.finalize': maintenance,
1767
- 'harness.cancel': maintenance,
1768
- 'harness.heartbeat': maintenance,
1769
- 'harness.abandon': maintenance,
1770
- 'cycles.abandon-role': abandonStalledRole,
1771
- };
1772
- /**
1773
- * Actions that only read committed state. A SPEC-002-layout project stays
1774
- * readable through these without being migrated; only a mutating action opening
1775
- * such a project triggers the automatic, journal-safe v1.3 migration (FR5/E-005).
1776
- *
1777
- * T-018: `profiles.migrate.inspect` is listed here — it previews the profile
1778
- * migration without writing (FR10), so it must not reconcile the storage layout
1779
- * as a side effect. Only the mutating `profiles.migrate.apply` is absent, so it
1780
- * receives the guard the T-009 direct wiring skipped before it rewrites the
1781
- * profile on a SPEC-002-layout project.
1782
- */
1783
- const OPERATE_READ_ONLY_ACTIONS = new Set([
1784
- 'inspect',
1785
- 'demo',
1786
- 'config.show',
1787
- 'config.validate',
1788
- 'config.edit',
1789
- 'profiles.list',
1790
- 'profiles.show',
1791
- 'profiles.validate',
1792
- 'profiles.migrate.inspect',
1793
- 'context.show',
1794
- 'status',
1795
- 'review',
1796
- 'brief',
1797
- 'report',
1798
- 'cycles.list',
1799
- 'cycles.show',
1800
- 'findings.list',
1801
- 'findings.show',
1802
- 'routes.list',
1803
- 'routes.show',
1804
- 'decisions.list',
1805
- 'decisions.show',
1806
- 'gaps.list',
1807
- 'gaps.show',
1808
- 'evidence.list',
1809
- 'evidence.show',
1810
- 'migrate.inspect',
1811
- 'migrations.list',
1812
- 'migrations.show',
1813
- 'cache.status',
1814
- 'integrity.status',
1815
- 'adapter.resume',
1816
- 'harness.resume',
1817
- // US-T1: the harness/adapter response dry-run reads the prepared session, takes
1818
- // no lease, and mutates nothing — so it must not trigger the mutating-action
1819
- // storage-layout migration on open.
1820
- 'adapter.validate',
1821
- 'harness.validate',
1822
- ]);
1823
- /**
1824
- * Stable runtime-neutral Operating Board facade. Public CLI adapters only parse
1825
- * arguments and render this structured result; all state and security semantics
1826
- * live behind this function.
1827
- */
1828
- export async function executeOperateAction(request) {
1829
- try {
1830
- const handler = HANDLERS[request.action];
1831
- if (!handler) {
1832
- throw new OperateError('E_OPERATE_ACTION_UNKNOWN', `Unknown Operating Board action: ${request.action}.`);
1833
- }
1834
- // Any mutating action that opens a SPEC-002-layout project migrates it to the
1835
- // v1.3 storage layout, through the write-ahead journal, before proceeding.
1836
- if (!OPERATE_READ_ONLY_ACTIONS.has(request.action)) {
1837
- await migrateOperatingStorageLayoutOnOpen(request.projectRoot, {
1838
- localRoot: option(request, 'localRoot', undefined),
1839
- });
1840
- }
1841
- return await attachStructuredActions(request, await handler(request));
1842
- }
1843
- catch (error) {
1844
- // FR7/E-007: first-use provider consent is a healthy continuation, not a
1845
- // failure — return the `ok: true` handoff shape instead of an exit-4 error.
1846
- // Every other authority/error stays a genuine failure.
1847
- if (isProviderConsentHandoff(error)) {
1848
- const continuation = providerConsentContinuation(request.action, error);
1849
- try {
1850
- return await attachStructuredActions(request, continuation);
1851
- }
1852
- catch {
1853
- return continuation;
1854
- }
1855
- }
1856
- try {
1857
- return await attachStructuredActions(request, failure(request.action, error));
1858
- }
1859
- catch {
1860
- return failure(request.action, error);
1861
- }
1862
- }
1863
- }
1864
- //# sourceMappingURL=index.js.map