openplanr 3.1.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/dist/cli/commands/groups/delivery.d.ts.map +1 -1
  3. package/dist/cli/commands/groups/delivery.js +2 -0
  4. package/dist/cli/commands/groups/delivery.js.map +1 -1
  5. package/dist/cli/commands/planning-artifacts.d.ts.map +1 -1
  6. package/dist/cli/commands/planning-artifacts.js +22 -12
  7. package/dist/cli/commands/planning-artifacts.js.map +1 -1
  8. package/dist/cli/commands/ship.d.ts +3 -0
  9. package/dist/cli/commands/ship.d.ts.map +1 -0
  10. package/dist/cli/commands/ship.js +65 -0
  11. package/dist/cli/commands/ship.js.map +1 -0
  12. package/dist/dashboard/.vite/manifest.json +1 -1
  13. package/dist/dashboard/assets/{index-G7ygVDGg.js → index-L8qtwqv6.js} +2 -2
  14. package/dist/dashboard/assets/{index-G7ygVDGg.js.map → index-L8qtwqv6.js.map} +1 -1
  15. package/dist/dashboard/dashboard-manifest.json +8 -8
  16. package/dist/dashboard/index.html +1 -1
  17. package/dist/models/schema.d.ts +39 -23
  18. package/dist/models/schema.d.ts.map +1 -1
  19. package/dist/models/schema.js +19 -12
  20. package/dist/models/schema.js.map +1 -1
  21. package/dist/models/types.d.ts +6 -0
  22. package/dist/models/types.d.ts.map +1 -1
  23. package/dist/services/id-service.d.ts +1 -5
  24. package/dist/services/id-service.d.ts.map +1 -1
  25. package/dist/services/id-service.js +1 -34
  26. package/dist/services/id-service.js.map +1 -1
  27. package/dist/services/ship-checks/changes.d.ts +24 -0
  28. package/dist/services/ship-checks/changes.d.ts.map +1 -0
  29. package/dist/services/ship-checks/changes.js +135 -0
  30. package/dist/services/ship-checks/changes.js.map +1 -0
  31. package/dist/services/ship-checks/contract.d.ts +81 -0
  32. package/dist/services/ship-checks/contract.d.ts.map +1 -0
  33. package/dist/services/ship-checks/contract.js +7 -0
  34. package/dist/services/ship-checks/contract.js.map +1 -0
  35. package/dist/services/ship-checks/discover.d.ts +10 -0
  36. package/dist/services/ship-checks/discover.d.ts.map +1 -0
  37. package/dist/services/ship-checks/discover.js +250 -0
  38. package/dist/services/ship-checks/discover.js.map +1 -0
  39. package/dist/services/ship-checks/glob.d.ts +5 -0
  40. package/dist/services/ship-checks/glob.d.ts.map +1 -0
  41. package/dist/services/ship-checks/glob.js +39 -0
  42. package/dist/services/ship-checks/glob.js.map +1 -0
  43. package/dist/services/ship-checks/hooks.d.ts +7 -0
  44. package/dist/services/ship-checks/hooks.d.ts.map +1 -0
  45. package/dist/services/ship-checks/hooks.js +65 -0
  46. package/dist/services/ship-checks/hooks.js.map +1 -0
  47. package/dist/services/ship-checks/packages.d.ts +29 -0
  48. package/dist/services/ship-checks/packages.d.ts.map +1 -0
  49. package/dist/services/ship-checks/packages.js +197 -0
  50. package/dist/services/ship-checks/packages.js.map +1 -0
  51. package/dist/services/ship-checks/related-tests.d.ts +13 -0
  52. package/dist/services/ship-checks/related-tests.d.ts.map +1 -0
  53. package/dist/services/ship-checks/related-tests.js +73 -0
  54. package/dist/services/ship-checks/related-tests.js.map +1 -0
  55. package/dist/services/ship-checks/scope.d.ts +8 -0
  56. package/dist/services/ship-checks/scope.d.ts.map +1 -0
  57. package/dist/services/ship-checks/scope.js +66 -0
  58. package/dist/services/ship-checks/scope.js.map +1 -0
  59. package/dist/services/ship-checks/task-requirements.d.ts +14 -0
  60. package/dist/services/ship-checks/task-requirements.d.ts.map +1 -0
  61. package/dist/services/ship-checks/task-requirements.js +145 -0
  62. package/dist/services/ship-checks/task-requirements.js.map +1 -0
  63. package/dist/services/ship-checks/workflows.d.ts +21 -0
  64. package/dist/services/ship-checks/workflows.d.ts.map +1 -0
  65. package/dist/services/ship-checks/workflows.js +208 -0
  66. package/dist/services/ship-checks/workflows.js.map +1 -0
  67. package/dist/services/template-service.d.ts +2 -0
  68. package/dist/services/template-service.d.ts.map +1 -1
  69. package/dist/services/template-service.js +4 -0
  70. package/dist/services/template-service.js.map +1 -1
  71. package/dist/utils/slugify.d.ts +1 -8
  72. package/dist/utils/slugify.d.ts.map +1 -1
  73. package/dist/utils/slugify.js +1 -25
  74. package/dist/utils/slugify.js.map +1 -1
  75. package/docs/CLI.md +48 -1
  76. package/lib/backlog-item.d.mts +49 -0
  77. package/lib/backlog-item.mjs +339 -0
  78. package/lib/host-packages/adapter-registry.json +5 -5
  79. package/lib/host-packages/capability-map.json +1 -1
  80. package/lib/host-packages/claude/.claude-plugin/marketplace.json +2 -2
  81. package/lib/host-packages/claude/openplanr/.claude-plugin/plugin.json +1 -1
  82. package/lib/host-packages/claude/openplanr/.openplanr-content.json +126 -90
  83. package/lib/host-packages/claude/openplanr/CONNECTORS.md +4 -6
  84. package/lib/host-packages/claude/openplanr/README.md +1 -1
  85. package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-artifact-shell.mjs +1 -1
  86. package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-chunked-workspace-client.mjs +1 -1
  87. package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-document.mjs +385 -79
  88. package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-handoff.mjs +1 -1
  89. package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-resource-pack.mjs +1 -1
  90. package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-review.mjs +45 -4
  91. package/lib/host-packages/{cursor/openplanr/runtime/design/scripts/design-runtime-support-e34c388a8e59.mjs → claude/openplanr/runtime/design/scripts/design-runtime-support-6774fd3d5d02.mjs} +1 -1
  92. package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-share.mjs +8 -5
  93. package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-shared-artifact-support-dependencies-design-support-protocol-contracts-3d9b1a86.mjs +40 -7
  94. package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-shared-artifact-support-protocol-contracts-ea2cd15e.mjs +1 -1
  95. package/lib/host-packages/claude/openplanr/runtime/design/scripts/{design-shared-protocol-contracts-31a760fc.mjs → design-shared-protocol-contracts-b5f28f94.mjs} +284 -45
  96. package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-upload-spool.mjs +1 -1
  97. package/lib/host-packages/claude/openplanr/runtime/design/scripts/design.mjs +215 -55
  98. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/02-artifact-review-ui.js +23 -23
  99. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +246 -45
  100. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/06-artifact-review-ui.js +12 -12
  101. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/08-artifact-review-ui.js +47 -14
  102. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +11 -10
  103. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -3
  104. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +16 -11
  105. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/01-module-runtime.js +7 -11
  106. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +163 -274
  107. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/03-react-dom-client-fiber-foundations.js +494 -967
  108. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/04-react-dom-client-reconciliation-hooks.js +346 -678
  109. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/05-react-dom-client-render-phases.js +382 -810
  110. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/06-react-dom-client-commit-effects.js +406 -730
  111. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/07-react-dom-client-work-loop-scheduling.js +259 -522
  112. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/08-react-dom-client-dom-events-properties-hydration.js +585 -937
  113. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +115 -240
  114. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/10-react.js +7 -17
  115. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/11-artifact-review-ui.js +3 -4
  116. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-protocol-contracts.js +215 -0
  117. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-design-review-experience.js +2766 -0
  118. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-studio-shell.js +134 -0
  119. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-canvas-engine.js +2170 -0
  120. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-design-review-experience.js +16 -0
  121. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/17-studio-shell.js +8 -0
  122. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/18-interface-primitives.js +3883 -0
  123. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/19-interface-primitives.js +966 -0
  124. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/{16-studio-shell.js → 20-studio-shell.js} +122 -227
  125. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/21-design-studio.js +1583 -0
  126. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +101 -47
  127. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +5 -1
  128. package/lib/host-packages/{openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0 → claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.20.0}/design-document.schema.json +78 -5
  129. package/lib/host-packages/claude/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +247 -45
  130. package/lib/host-packages/claude/openplanr/runtime/plan/scripts/design.mjs +45 -12
  131. package/lib/host-packages/claude/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +5 -1
  132. package/lib/host-packages/claude/openplanr/skills/connect/references/connectors.md +4 -6
  133. package/lib/host-packages/claude/openplanr/skills/design/SKILL.md +12 -0
  134. package/lib/host-packages/claude/openplanr/skills/design/references/craft.md +14 -3
  135. package/lib/host-packages/claude/openplanr/skills/design/references/design-system.md +33 -1
  136. package/lib/host-packages/claude/openplanr/skills/design/references/discovery.md +18 -4
  137. package/lib/host-packages/claude/openplanr/skills/design/references/generation.md +74 -1
  138. package/lib/host-packages/claude/openplanr/skills/design/references/hosted-canvas.md +62 -0
  139. package/lib/host-packages/claude/openplanr/skills/design/references/review.md +46 -1
  140. package/lib/host-packages/claude/openplanr/skills/design/references/utilities.md +6 -0
  141. package/lib/host-packages/claude/openplanr/skills/design/schemas/design-document.schema.json +78 -5
  142. package/lib/host-packages/claude/openplanr/skills/design-loop/references/craft.md +14 -3
  143. package/lib/host-packages/claude/openplanr/skills/design-loop/references/design-system.md +33 -1
  144. package/lib/host-packages/claude/openplanr/skills/design-loop/references/discovery.md +18 -4
  145. package/lib/host-packages/claude/openplanr/skills/design-loop/references/generation.md +74 -1
  146. package/lib/host-packages/claude/openplanr/skills/design-loop/references/review.md +46 -1
  147. package/lib/host-packages/claude/openplanr/skills/design-loop/references/utilities.md +6 -0
  148. package/lib/host-packages/claude/openplanr/skills/design-loop/schemas/design-document.schema.json +78 -5
  149. package/lib/host-packages/claude/openplanr/skills/design-review/references/craft.md +14 -3
  150. package/lib/host-packages/claude/openplanr/skills/design-review/references/design-system.md +33 -1
  151. package/lib/host-packages/claude/openplanr/skills/design-review/references/discovery.md +18 -4
  152. package/lib/host-packages/claude/openplanr/skills/design-review/references/generation.md +74 -1
  153. package/lib/host-packages/claude/openplanr/skills/design-review/references/review.md +46 -1
  154. package/lib/host-packages/claude/openplanr/skills/design-review/references/utilities.md +6 -0
  155. package/lib/host-packages/claude/openplanr/skills/design-review/schemas/design-document.schema.json +78 -5
  156. package/lib/host-packages/claude/openplanr/skills/investigate/SKILL.md +10 -1
  157. package/lib/host-packages/claude/openplanr/skills/investigate/references/findings.md +92 -0
  158. package/lib/host-packages/claude/openplanr/skills/investigate/scripts/backlog-item.mjs +339 -0
  159. package/lib/host-packages/claude/openplanr/skills/plan/SKILL.md +3 -0
  160. package/lib/host-packages/claude/openplanr/skills/plan/schemas/design-document.schema.json +78 -5
  161. package/lib/host-packages/claude/openplanr/skills/share/references/connectors.md +4 -6
  162. package/lib/host-packages/claude/openplanr/skills/ship/SKILL.md +15 -4
  163. package/lib/host-packages/claude/openplanr/skills/ship/references/findings.md +92 -0
  164. package/lib/host-packages/claude/openplanr/skills/ship/references/result-contract.md +3 -1
  165. package/lib/host-packages/claude/openplanr/skills/ship/scripts/backlog-item.mjs +339 -0
  166. package/lib/host-packages/claude/openplanr/skills/sprint/references/connectors.md +4 -6
  167. package/lib/host-packages/claude/openplanr/skills/status/references/connectors.md +4 -6
  168. package/lib/host-packages/claude/openplanr/skills/sync/references/connectors.md +4 -6
  169. package/lib/host-packages/cursor/openplanr/.openplanr-content.json +125 -89
  170. package/lib/host-packages/cursor/openplanr/CONNECTORS.md +4 -6
  171. package/lib/host-packages/cursor/openplanr/manifest.json +1 -1
  172. package/lib/host-packages/cursor/openplanr/rules/planr-connect/references/connectors.md +4 -6
  173. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/craft.md +14 -3
  174. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/design-system.md +33 -1
  175. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/discovery.md +18 -4
  176. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/generation.md +74 -1
  177. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/hosted-canvas.md +62 -0
  178. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/review.md +46 -1
  179. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/utilities.md +6 -0
  180. package/lib/host-packages/cursor/openplanr/rules/planr-design/schemas/design-document.schema.json +78 -5
  181. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/craft.md +14 -3
  182. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/design-system.md +33 -1
  183. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/discovery.md +18 -4
  184. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/generation.md +74 -1
  185. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/review.md +46 -1
  186. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/utilities.md +6 -0
  187. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/schemas/design-document.schema.json +78 -5
  188. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/craft.md +14 -3
  189. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/design-system.md +33 -1
  190. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/discovery.md +18 -4
  191. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/generation.md +74 -1
  192. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/review.md +46 -1
  193. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/utilities.md +6 -0
  194. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/schemas/design-document.schema.json +78 -5
  195. package/lib/host-packages/cursor/openplanr/rules/planr-design.mdc +12 -0
  196. package/lib/host-packages/cursor/openplanr/rules/planr-investigate/references/findings.md +92 -0
  197. package/lib/host-packages/cursor/openplanr/rules/planr-investigate/scripts/backlog-item.mjs +339 -0
  198. package/lib/host-packages/cursor/openplanr/rules/planr-investigate.mdc +10 -1
  199. package/lib/host-packages/cursor/openplanr/rules/planr-plan/schemas/design-document.schema.json +78 -5
  200. package/lib/host-packages/cursor/openplanr/rules/planr-plan.mdc +3 -0
  201. package/lib/host-packages/cursor/openplanr/rules/planr-share/references/connectors.md +4 -6
  202. package/lib/host-packages/cursor/openplanr/rules/planr-ship/references/findings.md +92 -0
  203. package/lib/host-packages/cursor/openplanr/rules/planr-ship/references/result-contract.md +3 -1
  204. package/lib/host-packages/cursor/openplanr/rules/planr-ship/scripts/backlog-item.mjs +339 -0
  205. package/lib/host-packages/cursor/openplanr/rules/planr-ship.mdc +15 -4
  206. package/lib/host-packages/cursor/openplanr/rules/planr-sprint/references/connectors.md +4 -6
  207. package/lib/host-packages/cursor/openplanr/rules/planr-status/references/connectors.md +4 -6
  208. package/lib/host-packages/cursor/openplanr/rules/planr-sync/references/connectors.md +4 -6
  209. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-artifact-shell.mjs +1 -1
  210. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-chunked-workspace-client.mjs +1 -1
  211. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-document.mjs +385 -79
  212. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-handoff.mjs +1 -1
  213. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-resource-pack.mjs +1 -1
  214. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-review.mjs +45 -4
  215. package/lib/host-packages/{openai/openplanr/runtime/design/scripts/design-runtime-support-e34c388a8e59.mjs → cursor/openplanr/runtime/design/scripts/design-runtime-support-6774fd3d5d02.mjs} +1 -1
  216. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-share.mjs +8 -5
  217. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-shared-artifact-support-dependencies-design-support-protocol-contracts-3d9b1a86.mjs +40 -7
  218. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-shared-artifact-support-protocol-contracts-ea2cd15e.mjs +1 -1
  219. package/lib/host-packages/{openai/openplanr/runtime/design/scripts/design-shared-protocol-contracts-31a760fc.mjs → cursor/openplanr/runtime/design/scripts/design-shared-protocol-contracts-b5f28f94.mjs} +284 -45
  220. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-upload-spool.mjs +1 -1
  221. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design.mjs +215 -55
  222. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/02-artifact-review-ui.js +23 -23
  223. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +246 -45
  224. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/06-artifact-review-ui.js +12 -12
  225. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/08-artifact-review-ui.js +47 -14
  226. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +11 -10
  227. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -3
  228. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +16 -11
  229. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/01-module-runtime.js +7 -11
  230. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +163 -274
  231. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/03-react-dom-client-fiber-foundations.js +494 -967
  232. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/04-react-dom-client-reconciliation-hooks.js +346 -678
  233. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/05-react-dom-client-render-phases.js +382 -810
  234. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/06-react-dom-client-commit-effects.js +406 -730
  235. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/07-react-dom-client-work-loop-scheduling.js +259 -522
  236. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/08-react-dom-client-dom-events-properties-hydration.js +585 -937
  237. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +115 -240
  238. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/10-react.js +7 -17
  239. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/11-artifact-review-ui.js +3 -4
  240. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-protocol-contracts.js +215 -0
  241. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-design-review-experience.js +2766 -0
  242. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-studio-shell.js +134 -0
  243. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-canvas-engine.js +2170 -0
  244. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-design-review-experience.js +16 -0
  245. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/17-studio-shell.js +8 -0
  246. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/18-interface-primitives.js +3883 -0
  247. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/19-interface-primitives.js +966 -0
  248. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/{16-studio-shell.js → 20-studio-shell.js} +122 -227
  249. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/21-design-studio.js +1583 -0
  250. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +101 -47
  251. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +5 -1
  252. package/lib/host-packages/{claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0 → cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.20.0}/design-document.schema.json +78 -5
  253. package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +247 -45
  254. package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/design.mjs +45 -12
  255. package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +5 -1
  256. package/lib/host-packages/openai/.claude-plugin/marketplace.json +2 -2
  257. package/lib/host-packages/openai/openplanr/.codex-plugin/plugin.json +1 -1
  258. package/lib/host-packages/openai/openplanr/.openplanr-content.json +128 -92
  259. package/lib/host-packages/openai/openplanr/CONNECTORS.md +4 -6
  260. package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-artifact-shell.mjs +1 -1
  261. package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-chunked-workspace-client.mjs +1 -1
  262. package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-document.mjs +385 -79
  263. package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-handoff.mjs +1 -1
  264. package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-resource-pack.mjs +1 -1
  265. package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-review.mjs +45 -4
  266. package/lib/host-packages/{claude/openplanr/runtime/design/scripts/design-runtime-support-e34c388a8e59.mjs → openai/openplanr/runtime/design/scripts/design-runtime-support-6774fd3d5d02.mjs} +1 -1
  267. package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-share.mjs +8 -5
  268. package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-shared-artifact-support-dependencies-design-support-protocol-contracts-3d9b1a86.mjs +40 -7
  269. package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-shared-artifact-support-protocol-contracts-ea2cd15e.mjs +1 -1
  270. package/lib/host-packages/{cursor/openplanr/runtime/design/scripts/design-shared-protocol-contracts-31a760fc.mjs → openai/openplanr/runtime/design/scripts/design-shared-protocol-contracts-b5f28f94.mjs} +284 -45
  271. package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-upload-spool.mjs +1 -1
  272. package/lib/host-packages/openai/openplanr/runtime/design/scripts/design.mjs +215 -55
  273. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/02-artifact-review-ui.js +23 -23
  274. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +246 -45
  275. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/06-artifact-review-ui.js +12 -12
  276. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/08-artifact-review-ui.js +47 -14
  277. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +11 -10
  278. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -3
  279. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +16 -11
  280. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/01-module-runtime.js +7 -11
  281. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +163 -274
  282. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/03-react-dom-client-fiber-foundations.js +494 -967
  283. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/04-react-dom-client-reconciliation-hooks.js +346 -678
  284. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/05-react-dom-client-render-phases.js +382 -810
  285. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/06-react-dom-client-commit-effects.js +406 -730
  286. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/07-react-dom-client-work-loop-scheduling.js +259 -522
  287. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/08-react-dom-client-dom-events-properties-hydration.js +585 -937
  288. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +115 -240
  289. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/10-react.js +7 -17
  290. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/11-artifact-review-ui.js +3 -4
  291. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-protocol-contracts.js +215 -0
  292. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-design-review-experience.js +2766 -0
  293. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-studio-shell.js +134 -0
  294. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-canvas-engine.js +2170 -0
  295. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-design-review-experience.js +16 -0
  296. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/17-studio-shell.js +8 -0
  297. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/18-interface-primitives.js +3883 -0
  298. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/19-interface-primitives.js +966 -0
  299. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/{16-studio-shell.js → 20-studio-shell.js} +122 -227
  300. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/21-design-studio.js +1583 -0
  301. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +101 -47
  302. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +5 -1
  303. package/lib/host-packages/{cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0 → openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.20.0}/design-document.schema.json +78 -5
  304. package/lib/host-packages/openai/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +247 -45
  305. package/lib/host-packages/openai/openplanr/runtime/plan/scripts/design.mjs +45 -12
  306. package/lib/host-packages/openai/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +5 -1
  307. package/lib/host-packages/openai/openplanr/skills/connect/references/connectors.md +4 -6
  308. package/lib/host-packages/openai/openplanr/skills/design/SKILL.md +12 -0
  309. package/lib/host-packages/openai/openplanr/skills/design/openplanr.skill.json +11 -0
  310. package/lib/host-packages/openai/openplanr/skills/design/references/craft.md +14 -3
  311. package/lib/host-packages/openai/openplanr/skills/design/references/design-system.md +33 -1
  312. package/lib/host-packages/openai/openplanr/skills/design/references/discovery.md +18 -4
  313. package/lib/host-packages/openai/openplanr/skills/design/references/generation.md +74 -1
  314. package/lib/host-packages/openai/openplanr/skills/design/references/hosted-canvas.md +62 -0
  315. package/lib/host-packages/openai/openplanr/skills/design/references/review.md +46 -1
  316. package/lib/host-packages/openai/openplanr/skills/design/references/utilities.md +6 -0
  317. package/lib/host-packages/openai/openplanr/skills/design/schemas/design-document.schema.json +78 -5
  318. package/lib/host-packages/openai/openplanr/skills/design-loop/references/craft.md +14 -3
  319. package/lib/host-packages/openai/openplanr/skills/design-loop/references/design-system.md +33 -1
  320. package/lib/host-packages/openai/openplanr/skills/design-loop/references/discovery.md +18 -4
  321. package/lib/host-packages/openai/openplanr/skills/design-loop/references/generation.md +74 -1
  322. package/lib/host-packages/openai/openplanr/skills/design-loop/references/review.md +46 -1
  323. package/lib/host-packages/openai/openplanr/skills/design-loop/references/utilities.md +6 -0
  324. package/lib/host-packages/openai/openplanr/skills/design-loop/schemas/design-document.schema.json +78 -5
  325. package/lib/host-packages/openai/openplanr/skills/design-review/references/craft.md +14 -3
  326. package/lib/host-packages/openai/openplanr/skills/design-review/references/design-system.md +33 -1
  327. package/lib/host-packages/openai/openplanr/skills/design-review/references/discovery.md +18 -4
  328. package/lib/host-packages/openai/openplanr/skills/design-review/references/generation.md +74 -1
  329. package/lib/host-packages/openai/openplanr/skills/design-review/references/review.md +46 -1
  330. package/lib/host-packages/openai/openplanr/skills/design-review/references/utilities.md +6 -0
  331. package/lib/host-packages/openai/openplanr/skills/design-review/schemas/design-document.schema.json +78 -5
  332. package/lib/host-packages/openai/openplanr/skills/investigate/SKILL.md +10 -1
  333. package/lib/host-packages/openai/openplanr/skills/investigate/openplanr.skill.json +22 -0
  334. package/lib/host-packages/openai/openplanr/skills/investigate/references/findings.md +92 -0
  335. package/lib/host-packages/openai/openplanr/skills/investigate/scripts/backlog-item.mjs +339 -0
  336. package/lib/host-packages/openai/openplanr/skills/plan/SKILL.md +3 -0
  337. package/lib/host-packages/openai/openplanr/skills/plan/schemas/design-document.schema.json +78 -5
  338. package/lib/host-packages/openai/openplanr/skills/share/references/connectors.md +4 -6
  339. package/lib/host-packages/openai/openplanr/skills/ship/SKILL.md +15 -4
  340. package/lib/host-packages/openai/openplanr/skills/ship/openplanr.skill.json +22 -0
  341. package/lib/host-packages/openai/openplanr/skills/ship/references/findings.md +92 -0
  342. package/lib/host-packages/openai/openplanr/skills/ship/references/result-contract.md +3 -1
  343. package/lib/host-packages/openai/openplanr/skills/ship/scripts/backlog-item.mjs +339 -0
  344. package/lib/host-packages/openai/openplanr/skills/sprint/references/connectors.md +4 -6
  345. package/lib/host-packages/openai/openplanr/skills/status/references/connectors.md +4 -6
  346. package/lib/host-packages/openai/openplanr/skills/sync/references/connectors.md +4 -6
  347. package/package.json +3 -3
  348. package/dist/templates/backlog/backlog-item.md.hbs +0 -40
  349. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-design-review-experience.js +0 -3589
  350. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-studio-shell.js +0 -184
  351. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-interface-primitives.js +0 -5229
  352. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-interface-primitives.js +0 -1733
  353. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/17-design-studio.js +0 -1844
  354. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-design-review-experience.js +0 -3589
  355. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-studio-shell.js +0 -184
  356. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-interface-primitives.js +0 -5229
  357. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-interface-primitives.js +0 -1733
  358. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/17-design-studio.js +0 -1844
  359. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-design-review-experience.js +0 -3589
  360. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-studio-shell.js +0 -184
  361. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-interface-primitives.js +0 -5229
  362. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-interface-primitives.js +0 -1733
  363. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/17-design-studio.js +0 -1844
@@ -3,12 +3,10 @@
3
3
  OpenPlanr skills name a kind of service, such as `~~chat`, instead of a product. Connect
4
4
  the product your team uses through your host: the vendor publishes the connector, and
5
5
  you sign in through the host. OpenPlanr bundles no connectors; they and their credentials
6
- live in your host. Two optional features need a token: Linear sync (`openplanr linear`) and
7
- company sign-in (`openplanr company login`). Only when you use them does OpenPlanr store a
8
- token, in your OS keychain, or in an encrypted file at `~/.planr/credentials.enc` if you set
9
- `PLANR_CREDENTIAL_FILE_PASSPHRASE`. Tokens are sent only to Linear or to the company server
10
- you sign in to.
11
- `openplanr company logout` removes company tokens.
6
+ live in your host. One optional feature needs a token: Linear sync (`openplanr linear`).
7
+ Only when you use it does OpenPlanr store a token, in your OS keychain, or in an encrypted
8
+ file at `~/.planr/credentials.enc` if you set `PLANR_CREDENTIAL_FILE_PASSPHRASE`. The token
9
+ is sent only to Linear.
12
10
  Every skill also works with nothing connected and reports any remote step it skipped.
13
11
 
14
12
  | Category | Placeholder | Products |
@@ -61,10 +61,15 @@ Discover checks in this order:
61
61
  3. package and task-runner scripts;
62
62
  4. applicable CI and pre-commit configuration.
63
63
 
64
- The packaged read-only [verification discovery helper](scripts/discover-verification.mjs)
65
- may list candidates. Resolve it relative to this `SKILL.md` and run
64
+ Run `openplanr ship checks --json --task <task-path>` (omit `--task` for a direct
65
+ request; add `--tier story` or `--tier push` before pushing) and run its `checks`
66
+ from each `cwd`. The command never executes checks or writes files. When
67
+ `complete` is `false`, report its error diagnostics and treat the check set as
68
+ incomplete: a pass is not CI-equivalent. Without the CLI, the packaged read-only
69
+ [verification discovery helper](scripts/discover-verification.mjs) may list
70
+ candidates. Resolve it relative to this `SKILL.md` and run
66
71
  `node <helper> --project <repository-root> --task <task-path>`; omit `--task` for a
67
- direct request. It never executes checks or writes files. If it is unavailable,
72
+ direct request. It never executes checks or writes files. If both are unavailable,
68
73
  inspect those four sources directly. Missing commands are diagnostics, not a
69
74
  reason to invent or skip all verification.
70
75
 
@@ -74,6 +79,11 @@ it by its own exit code; to shorten output, write it to a log and read the tail.
74
79
  Fix failures caused by the change and rerun affected checks.
75
80
  Read [the result contract](references/result-contract.md) before reporting.
76
81
 
82
+ Report defects you notice outside the task as [findings](references/findings.md),
83
+ and never fix them in this change unless they block it. The packaged
84
+ [backlog helper](scripts/backlog-item.mjs) lists and files backlog items when no
85
+ CLI is installed; resolve it relative to this `SKILL.md`.
86
+
77
87
  Do not write progress into an approved design package. The studio derives
78
88
  approved, planned, implementing, and verified state from canonical planning and
79
89
  Ship artifacts after this separate invocation.
@@ -89,7 +99,8 @@ results instead of reproducing them in chat.
89
99
  - **Task:** task ID and path, or `direct-request`.
90
100
  - **Changed:** material paths grouped by purpose.
91
101
  - **Checks:** command, `passed`, `failed`, or `not-run`, plus a concise result.
92
- - **Issues:** problem, impact, and next action, or `none`.
102
+ - **Issues:** blockers with problem, impact, and next action, or `none`; then
103
+ findings outside the task, each with its disposition.
93
104
 
94
105
  Keep the five machine fields unchanged. A human summary may omit empty or unavailable fields,
95
106
  but must make partial, blocked or unverified work clear and give the smallest
@@ -0,0 +1,92 @@
1
+ # Findings outside the task
2
+
3
+ A finding is a defect or bad practice you observed outside the task: a wrong
4
+ value, the same bug elsewhere, a flaky check. It needs evidence you saw: a
5
+ repo-relative `file:line`, or a command and its output line. A suspicion without
6
+ evidence is not a finding. A problem that stops this task is a blocker, not a
7
+ finding.
8
+
9
+ ## Never fix a finding here
10
+
11
+ Do not change code for a finding in this run. The one exception is a defect that
12
+ blocks this task's own definition of done: it becomes a blocker, you fix it, and
13
+ **Changed** says it was pre-existing and why it could not wait.
14
+
15
+ ## Shape
16
+
17
+ `issues` holds two lists. `blockers`: problem, impact, next action.
18
+ `findings`, each with:
19
+
20
+ - `title`: one plain line stating the defect; it is also the backlog title.
21
+ - `severity`: `critical`, `high`, `medium` or `low`; it becomes the backlog priority.
22
+ - `evidence`: `file:line`, or the command and the output line.
23
+ - `proposed`: the backlog entry: title, priority, tags, and a `description` in
24
+ Markdown with Problem, Why it matters ("no consequence yet" when that is the
25
+ honest answer), Evidence, and Fix shape. Label unverified parts as unverified.
26
+ - `disposition`: `filed`, `tracked`, `declined` or `reported`, plus `{ id, path }`
27
+ when filed or tracked.
28
+
29
+ Merge duplicates within the run. Sort by severity, highest first, and number from
30
+ 1. Show at most 5 in full and summarise the rest as "+N more".
31
+
32
+ ## Check what is already tracked
33
+
34
+ Before showing findings, list open backlog items with the backlog helper
35
+ linked from SKILL.md, resolved relative to that file: `node <helper> list
36
+ --project <repository-root> --open`. A finding about the same problem as an open item,
37
+ normally the same evidence file and an equivalent title, is `tracked`. Never file
38
+ it again and never edit the existing item.
39
+
40
+ ## Decide, then ask at most once
41
+
42
+ After checks, and only when at least one finding is untracked, take the first
43
+ rule that applies. File only what it allows.
44
+
45
+ 1. The request says to file findings, or not to: do that.
46
+ 2. **Attended run**, the user can answer now: ask one question with the host's
47
+ structured question tool: "File N findings as backlog items?" with the options
48
+ "File all N (Recommended)" and "Don't file", and free text for numbers such as
49
+ "1 3". Without such a tool, ask in one chat line: `File these as backlog items?
50
+ Reply "all", "none", or the numbers, e.g. "1 3".` File what the answer names.
51
+ 3. **Unattended run**, nobody can answer: the host cannot ask and wait (for
52
+ example a print or exec mode), another skill or a delegate runner started this
53
+ run, or the user said not to ask. Read `findings.unattended` in
54
+ `.planr/config.json`. Only `file` files every untracked finding. With
55
+ `report`, or no setting, do not run `add` at all: mark the findings `reported`.
56
+
57
+ Never ask per finding, never ask mid-run, and never file or drop a finding
58
+ silently.
59
+
60
+ ## File
61
+
62
+ Send each item as one JSON object (`title`, `priority`, `tags`, `description`)
63
+ on stdin. Never pass `acceptanceCriteria`.
64
+
65
+ - When an `openplanr` CLI resolves (the project's `node_modules/.bin`, then
66
+ `PATH`; never `npx`): `openplanr --project-dir <repository-root> backlog add
67
+ --data - --json`.
68
+ - Otherwise: `node <helper> add --project <repository-root> --data -`. Its
69
+ result can carry `cliHint`; end the result with that line, word for word,
70
+ once. Install only if the user says yes then, by running exactly the command in
71
+ the line. If the result says `templateOverrideIgnored`, say the default format
72
+ was used.
73
+
74
+ If filing fails, report the command and its error, and leave the finding
75
+ `reported`.
76
+
77
+ ## Report
78
+
79
+ Under **Issues**, write the blockers, or `none for this task.` when only findings
80
+ remain. Then:
81
+
82
+ ```text
83
+ Found outside this task (not changed)
84
+ 1. medium · /import has no rate limit · src/routes/import.ts:41
85
+ Filed BL-431 · .planr/backlog/BL-431-import-endpoint-has-no-rate-limit.md
86
+ 2. low · tests/session.test.ts timed out once, passed on rerun · npm test, first run
87
+ Already tracked as BL-212 · .planr/backlog/BL-212-session-test-times-out.md
88
+ ```
89
+
90
+ Unfiled findings say why in the heading, for example `(not changed, not filed:
91
+ unattended default is "report")`, and end with: `To file them, reply "file 1 2".` In an unattended run, add: `To file automatically in unattended runs, set "findings": { "unattended": "file" } in .planr/config.json.`
92
+ Paths are always repo-relative.
@@ -7,7 +7,9 @@ Return one concise human rendering backed by these five machine fields:
7
7
  3. `changed`: material files grouped by purpose.
8
8
  4. `checks`: each executed or applicable check with `passed`, `failed`, or
9
9
  `not-run` and a concise result.
10
- 5. `issues`: unresolved problem, impact, and next action; use `none` when empty.
10
+ 5. `issues`: `blockers` for this task, each with problem, impact, and next
11
+ action, and `findings` outside the task, shaped as `findings.md` describes;
12
+ use `none` when both are empty.
11
13
 
12
14
  Do not add receipts, digests, proof ledgers, fixed review loops, or approval
13
15
  narration. Mention evidence only when it is the natural result of a command or
@@ -0,0 +1,339 @@
1
+ #!/usr/bin/env node
2
+ // @ts-check
3
+ // The one backlog item writer: the CLI imports it, and skills run it when no CLI is installed.
4
+
5
+ import { mkdir, readdir, readFile, writeFile } from 'node:fs/promises';
6
+ import { join, relative, resolve, sep } from 'node:path';
7
+ import { fileURLToPath } from 'node:url';
8
+
9
+ /** Holds one empty file per issued ID, so the ID of a removed artifact is never issued again. */
10
+ const ISSUED_IDS_DIR = '.issued-ids';
11
+ const CLOSED_STATUSES = new Set(['closed', 'done']);
12
+
13
+ /** @type {typeof import('./backlog-item.d.mts').CLI_INSTALL_COMMAND} */
14
+ export const CLI_INSTALL_COMMAND = 'npm install -g openplanr';
15
+ /** @type {typeof import('./backlog-item.d.mts').CLI_HINT} */
16
+ export const CLI_HINT = `Install the OpenPlanr CLI to manage these items: ${CLI_INSTALL_COMMAND}`;
17
+
18
+ /** @type {typeof import('./backlog-item.d.mts').reserveNextId} */
19
+ export async function reserveNextId(dir, prefix) {
20
+ const issuedDir = join(dir, ISSUED_IDS_DIR);
21
+ await mkdir(issuedDir, { recursive: true });
22
+ const pattern = new RegExp(`^${prefix.replace(/[.*+?^${}()|[\]\\]/gu, '\\$&')}-(\\d{3,})`, 'u');
23
+ let next = 1;
24
+ for (const directory of [dir, issuedDir]) {
25
+ for (const entry of await readdir(directory, { withFileTypes: true })) {
26
+ const match = entry.isDirectory() ? null : pattern.exec(entry.name);
27
+ if (match) next = Math.max(next, Number.parseInt(match[1], 10) + 1);
28
+ }
29
+ }
30
+ for (; ; next++) {
31
+ const id = `${prefix}-${String(next).padStart(3, '0')}`;
32
+ try {
33
+ await writeFile(join(issuedDir, id), '', { flag: 'wx' });
34
+ return id;
35
+ } catch (error) {
36
+ if (/** @type {NodeJS.ErrnoException} */ (error).code !== 'EEXIST') throw error;
37
+ }
38
+ }
39
+ }
40
+
41
+ /** @type {typeof import('./backlog-item.d.mts').slugify} */
42
+ export function slugify(text, maxLength = 80) {
43
+ let slug = text
44
+ .toLowerCase()
45
+ .trim()
46
+ .replace(/[^\w\s-]/g, '')
47
+ .replace(/[\s_]+/g, '-')
48
+ .replace(/-+/g, '-')
49
+ .replace(/^-+|-+$/g, '');
50
+ if (slug.length > maxLength) {
51
+ slug = slug.slice(0, maxLength);
52
+ // Trim at the last whole-word boundary to avoid cut-off words.
53
+ const lastDash = slug.lastIndexOf('-');
54
+ if (lastDash > 0) slug = slug.slice(0, lastDash);
55
+ }
56
+ return slug;
57
+ }
58
+
59
+ /** @param {unknown} value */
60
+ function strings(value) {
61
+ if (Array.isArray(value)) return value.map(String).filter(Boolean);
62
+ if (typeof value === 'string')
63
+ return value
64
+ .split(',')
65
+ .map((item) => item.trim())
66
+ .filter(Boolean);
67
+ return [];
68
+ }
69
+
70
+ /** @param {unknown} value */
71
+ function optionalText(value) {
72
+ return value === undefined || value === null || value === '' ? undefined : value;
73
+ }
74
+
75
+ const PRIORITIES = Object.freeze(['critical', 'high', 'medium', 'low']);
76
+
77
+ /** Bad backlog input; the code lets the CLI report it as an input error, not a crash. */
78
+ class BacklogInputError extends Error {
79
+ /** @param {string} message */
80
+ constructor(message) {
81
+ super(message);
82
+ this.name = 'BacklogInputError';
83
+ this.code = 'E_BACKLOG_INVALID';
84
+ }
85
+ }
86
+
87
+ /** @type {typeof import('./backlog-item.d.mts').backlogFields} */
88
+ export function backlogFields(input) {
89
+ const title = String(input.title ?? input.name ?? '').trim();
90
+ if (!title) throw new BacklogInputError('A backlog item needs a non-empty title.');
91
+ const priority = String(input.priority ?? 'medium');
92
+ if (!PRIORITIES.includes(priority))
93
+ throw new BacklogInputError(
94
+ `Backlog priority ${JSON.stringify(priority)} is not valid; use one of ${PRIORITIES.join(', ')}.`,
95
+ );
96
+ const criteria = optionalText(input.acceptanceCriteria);
97
+ const notes = optionalText(input.notes);
98
+ const epicId = optionalText(input.epicId);
99
+ return {
100
+ title,
101
+ priority,
102
+ tags: strings(input.tags),
103
+ description: String(input.description ?? title),
104
+ ...(criteria === undefined
105
+ ? {}
106
+ : { acceptanceCriteria: Array.isArray(criteria) ? criteria.map(String) : String(criteria) }),
107
+ ...(notes === undefined ? {} : { notes: String(notes) }),
108
+ ...(epicId === undefined ? {} : { epicId: String(epicId) }),
109
+ };
110
+ }
111
+
112
+ /** @type {typeof import('./backlog-item.d.mts').renderBacklogItem} */
113
+ export function renderBacklogItem(id, fields, date) {
114
+ const quote = JSON.stringify;
115
+ const lines = [
116
+ '---',
117
+ `id: ${quote(id)}`,
118
+ `title: ${quote(fields.title)}`,
119
+ `priority: ${quote(fields.priority)}`,
120
+ `tags: [${fields.tags.map((tag) => quote(tag)).join(', ')}]`,
121
+ 'status: "open"',
122
+ `created: ${quote(date)}`,
123
+ `updated: ${quote(date)}`,
124
+ ...(fields.epicId ? [`epicId: ${quote(fields.epicId)}`] : []),
125
+ '---',
126
+ '',
127
+ `# ${id}: ${fields.title}`,
128
+ '',
129
+ ];
130
+ /** @param {string} heading @param {string} body @param {boolean} [spaced] */
131
+ const section = (heading, body, spaced = false) =>
132
+ lines.push(`## ${heading}`, ...(spaced ? [''] : []), body, '');
133
+ if (fields.tags.length > 0)
134
+ section('Tags', fields.tags.map((tag) => `- ${tag}`).join('\n'), true);
135
+ // A description with its own sections stands alone instead of nesting under another heading.
136
+ if (/^## /u.test(fields.description)) lines.push(fields.description, '');
137
+ else if (fields.description !== fields.title) section('Description', fields.description);
138
+ if (fields.acceptanceCriteria !== undefined && fields.acceptanceCriteria.length > 0)
139
+ section(
140
+ 'Acceptance Criteria',
141
+ Array.isArray(fields.acceptanceCriteria)
142
+ ? fields.acceptanceCriteria.map((criterion) => `- ${criterion}`).join('\n')
143
+ : fields.acceptanceCriteria,
144
+ );
145
+ if (fields.notes) section('Notes', fields.notes);
146
+ lines.push('---', `_Close when done: \`openplanr backlog update ${id} --status closed\`_`, '');
147
+ return lines.join('\n');
148
+ }
149
+
150
+ /** @type {typeof import('./backlog-item.d.mts').writeBacklogItem} */
151
+ export async function writeBacklogItem(backlogDir, prefix, fields, date) {
152
+ await mkdir(backlogDir, { recursive: true });
153
+ const id = await reserveNextId(backlogDir, prefix);
154
+ const filePath = join(backlogDir, `${id}-${slugify(fields.title)}.md`);
155
+ await writeFile(filePath, renderBacklogItem(id, fields, date));
156
+ return { id, filePath };
157
+ }
158
+
159
+ /** @param {string} projectDir */
160
+ async function projectConfig(projectDir) {
161
+ const configPath = join(projectDir, '.planr', 'config.json');
162
+ let raw;
163
+ try {
164
+ raw = await readFile(configPath, 'utf8');
165
+ } catch (error) {
166
+ if (/** @type {NodeJS.ErrnoException} */ (error).code === 'ENOENT')
167
+ throw new Error(
168
+ `No OpenPlanr project at ${projectDir}: ${configPath} is missing. Run \`openplanr init\` or pass the project root.`,
169
+ );
170
+ throw error;
171
+ }
172
+ let config;
173
+ try {
174
+ config = JSON.parse(raw);
175
+ } catch (error) {
176
+ throw new Error(`${configPath} is not valid JSON: ${/** @type {Error} */ (error).message}`);
177
+ }
178
+ return { configPath, raw, config };
179
+ }
180
+
181
+ /** @param {string} projectDir */
182
+ async function projectBacklog(projectDir) {
183
+ const { config } = await projectConfig(projectDir);
184
+ const agile = String(config.outputPaths?.agile ?? '.planr').replaceAll('\\', '/');
185
+ return {
186
+ backlogDir: resolve(projectDir, agile, 'backlog'),
187
+ prefix: String(config.idPrefix?.backlog ?? 'BL'),
188
+ templateOverrides:
189
+ typeof config.templateOverrides === 'string' ? config.templateOverrides : undefined,
190
+ };
191
+ }
192
+
193
+ /** @param {string} projectDir @param {string} filePath */
194
+ const relativePath = (projectDir, filePath) => relative(projectDir, filePath).split(sep).join('/');
195
+
196
+ /** @type {typeof import('./backlog-item.d.mts').createBacklogItem} */
197
+ export async function createBacklogItem(
198
+ projectDir,
199
+ input,
200
+ date = new Date().toISOString().split('T')[0],
201
+ ) {
202
+ const { backlogDir, prefix } = await projectBacklog(projectDir);
203
+ const fields = backlogFields(input);
204
+ const { id, filePath } = await writeBacklogItem(backlogDir, prefix, fields, date);
205
+ return { id, title: fields.title, artifactPath: relativePath(projectDir, filePath) };
206
+ }
207
+
208
+ /**
209
+ * Top-level scalar frontmatter fields; double-quoted values are read as JSON strings.
210
+ * @param {string} text
211
+ * @param {string} filePath
212
+ */
213
+ function frontmatter(text, filePath) {
214
+ const block = /^---\n([\s\S]*?)\n---/u.exec(text.replace(/\r\n/gu, '\n'))?.[1] ?? '';
215
+ /** @type {Record<string, string>} */
216
+ const fields = {};
217
+ for (const line of block.split('\n')) {
218
+ const match = /^(\w+):\s*(.*)$/u.exec(line);
219
+ if (!match) continue;
220
+ const value = match[2].trim();
221
+ if (!value.startsWith('"')) {
222
+ fields[match[1]] = value.replace(/^'(.*)'$/u, '$1');
223
+ continue;
224
+ }
225
+ try {
226
+ fields[match[1]] = String(JSON.parse(value));
227
+ } catch (error) {
228
+ throw new Error(
229
+ `${filePath}: frontmatter field "${match[1]}" is not a valid quoted string: ${/** @type {Error} */ (error).message}`,
230
+ );
231
+ }
232
+ }
233
+ return fields;
234
+ }
235
+
236
+ /** @type {typeof import('./backlog-item.d.mts').listOpenBacklog} */
237
+ export async function listOpenBacklog(projectDir) {
238
+ const { backlogDir } = await projectBacklog(projectDir);
239
+ let names;
240
+ try {
241
+ names = await readdir(backlogDir);
242
+ } catch (error) {
243
+ if (/** @type {NodeJS.ErrnoException} */ (error).code === 'ENOENT') return [];
244
+ throw error;
245
+ }
246
+ const items = [];
247
+ for (const name of names.sort((a, b) => a.localeCompare(b, undefined, { numeric: true }))) {
248
+ const match = /^([A-Z]+-\d{3,})-.+\.md$/u.exec(name);
249
+ if (!match) continue;
250
+ const filePath = join(backlogDir, name);
251
+ const fields = frontmatter(await readFile(filePath, 'utf8'), filePath);
252
+ const status = fields.status ?? 'open';
253
+ if (CLOSED_STATUSES.has(status)) continue;
254
+ items.push({
255
+ id: fields.id ?? match[1],
256
+ title: fields.title ?? name.slice(match[1].length + 1, -3).replace(/-/g, ' '),
257
+ status,
258
+ path: relativePath(projectDir, filePath),
259
+ });
260
+ }
261
+ return items;
262
+ }
263
+
264
+ /** @type {typeof import('./backlog-item.d.mts').takeCliHint} */
265
+ export async function takeCliHint(projectDir) {
266
+ const { configPath, raw, config } = await projectConfig(projectDir);
267
+ if (config.findings?.cliHintShown === true) return null;
268
+ const next = { ...config, findings: { ...config.findings, cliHintShown: true } };
269
+ const indent = /\n(\t| +)"/u.exec(raw)?.[1] ?? ' ';
270
+ await writeFile(configPath, `${JSON.stringify(next, null, indent)}\n`);
271
+ return CLI_HINT;
272
+ }
273
+
274
+ /** @param {string} source */
275
+ async function readInput(source) {
276
+ const text =
277
+ source === '-'
278
+ ? await new Promise((done, fail) => {
279
+ let value = '';
280
+ process.stdin.setEncoding('utf8');
281
+ process.stdin.on('data', (chunk) => {
282
+ value += chunk;
283
+ });
284
+ process.stdin.on('end', () => done(value));
285
+ process.stdin.on('error', fail);
286
+ })
287
+ : await readFile(resolve(source), 'utf8');
288
+ const parsed = JSON.parse(String(text));
289
+ if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed))
290
+ throw new Error('Backlog input must be one JSON object with at least a title.');
291
+ return parsed;
292
+ }
293
+
294
+ const USAGE =
295
+ 'Usage: backlog-item.mjs add --project <dir> --data <file|->\n backlog-item.mjs list --project <dir> --open\n';
296
+
297
+ /** @param {string[]} argv */
298
+ async function main(argv) {
299
+ const [command, ...rest] = argv;
300
+ /** @type {Record<string, string | boolean>} */
301
+ const options = {};
302
+ for (let index = 0; index < rest.length; index += 1) {
303
+ const flag = rest[index];
304
+ if (flag === '--open') options.open = true;
305
+ else if (flag === '--project' || flag === '--data')
306
+ options[flag.slice(2)] = rest[++index] ?? '';
307
+ else throw new Error(`Unknown argument: ${flag}\n${USAGE}`);
308
+ }
309
+ const projectDir = resolve(String(options.project ?? '.'));
310
+ if (command === 'add') {
311
+ if (typeof options.data !== 'string' || !options.data)
312
+ throw new Error(`add needs --data.\n${USAGE}`);
313
+ const { templateOverrides } = await projectBacklog(projectDir);
314
+ const result = await createBacklogItem(projectDir, await readInput(options.data));
315
+ const cliHint = await takeCliHint(projectDir);
316
+ process.stdout.write(
317
+ `${JSON.stringify({
318
+ ok: true,
319
+ action: 'backlog.created',
320
+ ...result,
321
+ ...(templateOverrides ? { templateOverrideIgnored: true } : {}),
322
+ ...(cliHint ? { cliHint } : {}),
323
+ })}\n`,
324
+ );
325
+ return;
326
+ }
327
+ if (command === 'list' && options.open) {
328
+ process.stdout.write(`${JSON.stringify({ items: await listOpenBacklog(projectDir) })}\n`);
329
+ return;
330
+ }
331
+ throw new Error(USAGE);
332
+ }
333
+
334
+ if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
335
+ main(process.argv.slice(2)).catch((error) => {
336
+ process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
337
+ process.exit(1);
338
+ });
339
+ }
@@ -3,12 +3,10 @@
3
3
  OpenPlanr skills name a kind of service, such as `~~chat`, instead of a product. Connect
4
4
  the product your team uses through your host: the vendor publishes the connector, and
5
5
  you sign in through the host. OpenPlanr bundles no connectors; they and their credentials
6
- live in your host. Two optional features need a token: Linear sync (`openplanr linear`) and
7
- company sign-in (`openplanr company login`). Only when you use them does OpenPlanr store a
8
- token, in your OS keychain, or in an encrypted file at `~/.planr/credentials.enc` if you set
9
- `PLANR_CREDENTIAL_FILE_PASSPHRASE`. Tokens are sent only to Linear or to the company server
10
- you sign in to.
11
- `openplanr company logout` removes company tokens.
6
+ live in your host. One optional feature needs a token: Linear sync (`openplanr linear`).
7
+ Only when you use it does OpenPlanr store a token, in your OS keychain, or in an encrypted
8
+ file at `~/.planr/credentials.enc` if you set `PLANR_CREDENTIAL_FILE_PASSPHRASE`. The token
9
+ is sent only to Linear.
12
10
  Every skill also works with nothing connected and reports any remote step it skipped.
13
11
 
14
12
  | Category | Placeholder | Products |
@@ -3,12 +3,10 @@
3
3
  OpenPlanr skills name a kind of service, such as `~~chat`, instead of a product. Connect
4
4
  the product your team uses through your host: the vendor publishes the connector, and
5
5
  you sign in through the host. OpenPlanr bundles no connectors; they and their credentials
6
- live in your host. Two optional features need a token: Linear sync (`openplanr linear`) and
7
- company sign-in (`openplanr company login`). Only when you use them does OpenPlanr store a
8
- token, in your OS keychain, or in an encrypted file at `~/.planr/credentials.enc` if you set
9
- `PLANR_CREDENTIAL_FILE_PASSPHRASE`. Tokens are sent only to Linear or to the company server
10
- you sign in to.
11
- `openplanr company logout` removes company tokens.
6
+ live in your host. One optional feature needs a token: Linear sync (`openplanr linear`).
7
+ Only when you use it does OpenPlanr store a token, in your OS keychain, or in an encrypted
8
+ file at `~/.planr/credentials.enc` if you set `PLANR_CREDENTIAL_FILE_PASSPHRASE`. The token
9
+ is sent only to Linear.
12
10
  Every skill also works with nothing connected and reports any remote step it skipped.
13
11
 
14
12
  | Category | Placeholder | Products |
@@ -3,12 +3,10 @@
3
3
  OpenPlanr skills name a kind of service, such as `~~chat`, instead of a product. Connect
4
4
  the product your team uses through your host: the vendor publishes the connector, and
5
5
  you sign in through the host. OpenPlanr bundles no connectors; they and their credentials
6
- live in your host. Two optional features need a token: Linear sync (`openplanr linear`) and
7
- company sign-in (`openplanr company login`). Only when you use them does OpenPlanr store a
8
- token, in your OS keychain, or in an encrypted file at `~/.planr/credentials.enc` if you set
9
- `PLANR_CREDENTIAL_FILE_PASSPHRASE`. Tokens are sent only to Linear or to the company server
10
- you sign in to.
11
- `openplanr company logout` removes company tokens.
6
+ live in your host. One optional feature needs a token: Linear sync (`openplanr linear`).
7
+ Only when you use it does OpenPlanr store a token, in your OS keychain, or in an encrypted
8
+ file at `~/.planr/credentials.enc` if you set `PLANR_CREDENTIAL_FILE_PASSPHRASE`. The token
9
+ is sent only to Linear.
12
10
  Every skill also works with nothing connected and reports any remote step it skipped.
13
11
 
14
12
  | Category | Placeholder | Products |