openplanr 2.2641.1 → 3.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 (315) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +1 -1
  3. package/dist/cli/commands/artifact.js +1 -1
  4. package/dist/cli/commands/artifact.js.map +1 -1
  5. package/dist/cli/commands/doctor.d.ts.map +1 -1
  6. package/dist/cli/commands/doctor.js +19 -4
  7. package/dist/cli/commands/doctor.js.map +1 -1
  8. package/dist/cli/commands/github.d.ts.map +1 -1
  9. package/dist/cli/commands/github.js +7 -10
  10. package/dist/cli/commands/github.js.map +1 -1
  11. package/dist/cli/commands/linear.js +1 -1
  12. package/dist/cli/commands/linear.js.map +1 -1
  13. package/dist/cli/commands/report.d.ts.map +1 -1
  14. package/dist/cli/commands/report.js +28 -32
  15. package/dist/cli/commands/report.js.map +1 -1
  16. package/dist/cli/commands/upgrade.d.ts.map +1 -1
  17. package/dist/cli/commands/upgrade.js +12 -10
  18. package/dist/cli/commands/upgrade.js.map +1 -1
  19. package/dist/cli/error-boundary.d.ts.map +1 -1
  20. package/dist/cli/error-boundary.js +2 -1
  21. package/dist/cli/error-boundary.js.map +1 -1
  22. package/dist/dashboard/.vite/manifest.json +1 -1
  23. package/dist/dashboard/assets/{index-DGyC7RDz.js → index-Csby7_ur.js} +2 -2
  24. package/dist/dashboard/assets/{index-DGyC7RDz.js.map → index-Csby7_ur.js.map} +1 -1
  25. package/dist/dashboard/dashboard-manifest.json +8 -8
  26. package/dist/dashboard/index.html +1 -1
  27. package/dist/models/schema.d.ts +0 -4
  28. package/dist/models/schema.d.ts.map +1 -1
  29. package/dist/models/schema.js +0 -2
  30. package/dist/models/schema.js.map +1 -1
  31. package/dist/models/types.d.ts +1 -4
  32. package/dist/models/types.d.ts.map +1 -1
  33. package/dist/services/credentials-service.js +1 -1
  34. package/dist/services/credentials-service.js.map +1 -1
  35. package/dist/services/distribution-service.d.ts +1 -4
  36. package/dist/services/distribution-service.d.ts.map +1 -1
  37. package/dist/services/distribution-service.js +1 -60
  38. package/dist/services/distribution-service.js.map +1 -1
  39. package/dist/services/github-service.d.ts +7 -4
  40. package/dist/services/github-service.d.ts.map +1 -1
  41. package/dist/services/github-service.js +16 -15
  42. package/dist/services/github-service.js.map +1 -1
  43. package/dist/services/linear-push-service.d.ts +3 -4
  44. package/dist/services/linear-push-service.d.ts.map +1 -1
  45. package/dist/services/linear-push-service.js +5 -6
  46. package/dist/services/linear-push-service.js.map +1 -1
  47. package/dist/services/runtime-change-summary.d.ts +4 -0
  48. package/dist/services/runtime-change-summary.d.ts.map +1 -1
  49. package/dist/services/runtime-change-summary.js +7 -0
  50. package/dist/services/runtime-change-summary.js.map +1 -1
  51. package/dist/services/runtime-manager/doctor.js +1 -1
  52. package/dist/services/runtime-manager/doctor.js.map +1 -1
  53. package/dist/services/runtime-manager/runtime-package.d.ts +15 -0
  54. package/dist/services/runtime-manager/runtime-package.d.ts.map +1 -1
  55. package/dist/services/runtime-manager/runtime-package.js +50 -10
  56. package/dist/services/runtime-manager/runtime-package.js.map +1 -1
  57. package/dist/services/runtime-manager-service.d.ts +11 -0
  58. package/dist/services/runtime-manager-service.d.ts.map +1 -1
  59. package/dist/services/runtime-manager-service.js +88 -16
  60. package/dist/services/runtime-manager-service.js.map +1 -1
  61. package/dist/services/spec-service.d.ts.map +1 -1
  62. package/dist/services/spec-service.js +34 -69
  63. package/dist/services/spec-service.js.map +1 -1
  64. package/dist/services/upgrade-report.d.ts +2 -2
  65. package/dist/services/upgrade-report.d.ts.map +1 -1
  66. package/dist/services/upgrade-report.js +11 -2
  67. package/dist/services/upgrade-report.js.map +1 -1
  68. package/dist/services/upgrade-service.d.ts +8 -2
  69. package/dist/services/upgrade-service.d.ts.map +1 -1
  70. package/dist/services/upgrade-service.js +44 -12
  71. package/dist/services/upgrade-service.js.map +1 -1
  72. package/dist/templates/rules/shared/capability-map.md.hbs +1 -1
  73. package/docs/CLI.md +14 -15
  74. package/docs/TROUBLESHOOTING.md +9 -6
  75. package/install.ps1 +3 -3
  76. package/install.sh +3 -3
  77. package/lib/host-packages/adapter-registry.json +5 -5
  78. package/lib/host-packages/capability-map.json +8 -8
  79. package/lib/host-packages/claude/.claude-plugin/marketplace.json +2 -2
  80. package/lib/host-packages/claude/openplanr/.claude-plugin/plugin.json +2 -2
  81. package/lib/host-packages/claude/openplanr/.openplanr-content.json +91 -75
  82. package/lib/host-packages/claude/openplanr/README.md +8 -12
  83. package/lib/host-packages/claude/openplanr/agents/planr-backend.md +49 -55
  84. package/lib/host-packages/claude/openplanr/agents/planr-database.md +56 -92
  85. package/lib/host-packages/claude/openplanr/agents/planr-designer.md +35 -51
  86. package/lib/host-packages/claude/openplanr/agents/planr-devops.md +37 -51
  87. package/lib/host-packages/claude/openplanr/agents/planr-documentation.md +29 -52
  88. package/lib/host-packages/claude/openplanr/agents/planr-entity-scaffold.md +24 -23
  89. package/lib/host-packages/claude/openplanr/agents/planr-frontend.md +46 -58
  90. package/lib/host-packages/claude/openplanr/agents/planr-qa.md +4 -2
  91. package/lib/host-packages/claude/openplanr/agents/planr-specification.md +54 -51
  92. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/backend.md +21 -65
  93. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/designer.md +5 -6
  94. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/devops.md +2 -3
  95. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/doc-gen.md +3 -4
  96. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/frontend.md +19 -64
  97. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/specification.md +10 -12
  98. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/backend.md +19 -62
  99. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/designer.md +3 -4
  100. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/devops.md +2 -3
  101. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/doc-gen.md +2 -3
  102. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/frontend.md +16 -59
  103. package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/specification.md +9 -11
  104. package/lib/host-packages/claude/openplanr/references/pipeline/stacks/database/mongodb.md +4 -4
  105. package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-review.mjs +24 -9
  106. package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-share.mjs +3 -3
  107. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/lib/artifact/ui/studio-shell.css +1 -1
  108. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -4
  109. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/enhancements.css +14 -4
  110. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/share.js +1 -1
  111. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +14 -5
  112. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-design-review-experience.js +28 -0
  113. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-studio-shell.js +105 -27
  114. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +6 -6
  115. package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +2 -2
  116. package/lib/host-packages/claude/openplanr/runtime/plan/scripts/design.mjs +1 -1
  117. package/lib/host-packages/claude/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +2 -2
  118. package/lib/host-packages/claude/openplanr/skills/artifact/SKILL.md +2 -2
  119. package/lib/host-packages/claude/openplanr/skills/artifact/references/diagram-sharing.md +1 -1
  120. package/lib/host-packages/claude/openplanr/skills/ceo-review/SKILL.md +0 -1
  121. package/lib/host-packages/claude/openplanr/skills/ceo-review/references/operate-advisor-contract.md +25 -4
  122. package/lib/host-packages/claude/openplanr/skills/chair-review/SKILL.md +6 -2
  123. package/lib/host-packages/claude/openplanr/skills/challenger-review/SKILL.md +6 -2
  124. package/lib/host-packages/claude/openplanr/skills/cmo-review/SKILL.md +0 -1
  125. package/lib/host-packages/claude/openplanr/skills/cmo-review/references/operate-advisor-contract.md +25 -4
  126. package/lib/host-packages/claude/openplanr/skills/coo-review/SKILL.md +0 -1
  127. package/lib/host-packages/claude/openplanr/skills/coo-review/references/operate-advisor-contract.md +25 -4
  128. package/lib/host-packages/claude/openplanr/skills/cpo-review/SKILL.md +0 -1
  129. package/lib/host-packages/claude/openplanr/skills/cpo-review/references/operate-advisor-contract.md +25 -4
  130. package/lib/host-packages/claude/openplanr/skills/cto-review/SKILL.md +0 -1
  131. package/lib/host-packages/claude/openplanr/skills/cto-review/references/operate-advisor-contract.md +25 -4
  132. package/lib/host-packages/claude/openplanr/skills/delegate/SKILL.md +8 -1
  133. package/lib/host-packages/claude/openplanr/skills/delegate/references/capsule-contract.md +17 -2
  134. package/lib/host-packages/claude/openplanr/skills/delegate/references/operator-guide.md +7 -5
  135. package/lib/host-packages/claude/openplanr/skills/delegate/scripts/adapters/claude.mjs +11 -4
  136. package/lib/host-packages/claude/openplanr/skills/delegate/scripts/adapters/native.mjs +1 -1
  137. package/lib/host-packages/claude/openplanr/skills/delegate/scripts/backend-diagnostics.mjs +14 -48
  138. package/lib/host-packages/claude/openplanr/skills/delegate/scripts/context.mjs +84 -22
  139. package/lib/host-packages/claude/openplanr/skills/delegate/scripts/credentials.mjs +167 -0
  140. package/lib/host-packages/claude/openplanr/skills/delegate/scripts/presentation.mjs +3 -2
  141. package/lib/host-packages/claude/openplanr/skills/delegate/scripts/run-contract.mjs +5 -7
  142. package/lib/host-packages/claude/openplanr/skills/delegate/scripts/run-preparation.mjs +5 -3
  143. package/lib/host-packages/claude/openplanr/skills/delegate/scripts/run-record.mjs +2 -3
  144. package/lib/host-packages/claude/openplanr/skills/design/references/utilities.md +1 -1
  145. package/lib/host-packages/claude/openplanr/skills/design-loop/references/utilities.md +1 -1
  146. package/lib/host-packages/claude/openplanr/skills/design-review/references/utilities.md +1 -1
  147. package/lib/host-packages/claude/openplanr/skills/diagram/references/diagram-sharing.md +1 -1
  148. package/lib/host-packages/claude/openplanr/skills/doctor/SKILL.md +4 -1
  149. package/lib/host-packages/claude/openplanr/skills/doctor/references/upgrade.md +8 -0
  150. package/lib/host-packages/claude/openplanr/skills/operate/SKILL.md +5 -3
  151. package/lib/host-packages/claude/openplanr/skills/plan/SKILL.md +10 -4
  152. package/lib/host-packages/claude/openplanr/skills/sprint/SKILL.md +5 -4
  153. package/lib/host-packages/claude/openplanr/skills/sprint/references/tracker-connections.md +70 -0
  154. package/lib/host-packages/claude/openplanr/skills/status/SKILL.md +4 -3
  155. package/lib/host-packages/claude/openplanr/skills/status/references/tracker-connections.md +70 -0
  156. package/lib/host-packages/claude/openplanr/skills/sync/SKILL.md +11 -20
  157. package/lib/host-packages/claude/openplanr/skills/sync/references/tracker-connections.md +70 -0
  158. package/lib/host-packages/claude/openplanr/skills/sync/scripts/sync.mjs +2 -2
  159. package/lib/host-packages/cursor/openplanr/.openplanr-content.json +63 -47
  160. package/lib/host-packages/cursor/openplanr/manifest.json +1 -1
  161. package/lib/host-packages/cursor/openplanr/rules/planr-artifact/references/diagram-sharing.md +1 -1
  162. package/lib/host-packages/cursor/openplanr/rules/planr-artifact.mdc +2 -2
  163. package/lib/host-packages/cursor/openplanr/rules/planr-ceo-review/references/operate-advisor-contract.md +25 -4
  164. package/lib/host-packages/cursor/openplanr/rules/planr-chair-review.mdc +6 -1
  165. package/lib/host-packages/cursor/openplanr/rules/planr-challenger-review.mdc +6 -1
  166. package/lib/host-packages/cursor/openplanr/rules/planr-cmo-review/references/operate-advisor-contract.md +25 -4
  167. package/lib/host-packages/cursor/openplanr/rules/planr-coo-review/references/operate-advisor-contract.md +25 -4
  168. package/lib/host-packages/cursor/openplanr/rules/planr-cpo-review/references/operate-advisor-contract.md +25 -4
  169. package/lib/host-packages/cursor/openplanr/rules/planr-cto-review/references/operate-advisor-contract.md +25 -4
  170. package/lib/host-packages/cursor/openplanr/rules/planr-delegate/references/capsule-contract.md +17 -2
  171. package/lib/host-packages/cursor/openplanr/rules/planr-delegate/references/operator-guide.md +7 -5
  172. package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/adapters/claude.mjs +11 -4
  173. package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/adapters/native.mjs +1 -1
  174. package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/backend-diagnostics.mjs +14 -48
  175. package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/context.mjs +84 -22
  176. package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/credentials.mjs +167 -0
  177. package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/presentation.mjs +3 -2
  178. package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/run-contract.mjs +5 -7
  179. package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/run-preparation.mjs +5 -3
  180. package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/run-record.mjs +2 -3
  181. package/lib/host-packages/cursor/openplanr/rules/planr-delegate.mdc +8 -1
  182. package/lib/host-packages/cursor/openplanr/rules/planr-design/references/utilities.md +1 -1
  183. package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/utilities.md +1 -1
  184. package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/utilities.md +1 -1
  185. package/lib/host-packages/cursor/openplanr/rules/planr-diagram/references/diagram-sharing.md +1 -1
  186. package/lib/host-packages/cursor/openplanr/rules/planr-doctor/references/upgrade.md +8 -0
  187. package/lib/host-packages/cursor/openplanr/rules/planr-doctor.mdc +4 -1
  188. package/lib/host-packages/cursor/openplanr/rules/planr-operate.mdc +5 -3
  189. package/lib/host-packages/cursor/openplanr/rules/planr-plan.mdc +10 -4
  190. package/lib/host-packages/cursor/openplanr/rules/planr-sprint/references/tracker-connections.md +70 -0
  191. package/lib/host-packages/cursor/openplanr/rules/planr-sprint.mdc +5 -4
  192. package/lib/host-packages/cursor/openplanr/rules/planr-status/references/tracker-connections.md +70 -0
  193. package/lib/host-packages/cursor/openplanr/rules/planr-status.mdc +4 -3
  194. package/lib/host-packages/cursor/openplanr/rules/planr-sync/references/tracker-connections.md +70 -0
  195. package/lib/host-packages/cursor/openplanr/rules/planr-sync/scripts/sync.mjs +2 -2
  196. package/lib/host-packages/cursor/openplanr/rules/planr-sync.mdc +11 -20
  197. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-review.mjs +24 -9
  198. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-share.mjs +3 -3
  199. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/lib/artifact/ui/studio-shell.css +1 -1
  200. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -4
  201. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/enhancements.css +14 -4
  202. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/share.js +1 -1
  203. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +14 -5
  204. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-design-review-experience.js +28 -0
  205. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-studio-shell.js +105 -27
  206. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +6 -6
  207. package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +2 -2
  208. package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/design.mjs +1 -1
  209. package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +2 -2
  210. package/lib/host-packages/openai/.claude-plugin/marketplace.json +2 -2
  211. package/lib/host-packages/openai/openplanr/.codex-plugin/plugin.json +1 -1
  212. package/lib/host-packages/openai/openplanr/.openplanr-content.json +72 -56
  213. package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-review.mjs +24 -9
  214. package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-share.mjs +3 -3
  215. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/lib/artifact/ui/studio-shell.css +1 -1
  216. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -4
  217. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/enhancements.css +14 -4
  218. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/share.js +1 -1
  219. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +14 -5
  220. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-design-review-experience.js +28 -0
  221. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-studio-shell.js +105 -27
  222. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +6 -6
  223. package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +2 -2
  224. package/lib/host-packages/openai/openplanr/runtime/plan/scripts/design.mjs +1 -1
  225. package/lib/host-packages/openai/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +2 -2
  226. package/lib/host-packages/openai/openplanr/skills/artifact/SKILL.md +2 -2
  227. package/lib/host-packages/openai/openplanr/skills/artifact/references/diagram-sharing.md +1 -1
  228. package/lib/host-packages/openai/openplanr/skills/ceo-review/SKILL.md +0 -1
  229. package/lib/host-packages/openai/openplanr/skills/ceo-review/references/operate-advisor-contract.md +25 -4
  230. package/lib/host-packages/openai/openplanr/skills/chair-review/SKILL.md +6 -2
  231. package/lib/host-packages/openai/openplanr/skills/challenger-review/SKILL.md +6 -2
  232. package/lib/host-packages/openai/openplanr/skills/cmo-review/SKILL.md +0 -1
  233. package/lib/host-packages/openai/openplanr/skills/cmo-review/references/operate-advisor-contract.md +25 -4
  234. package/lib/host-packages/openai/openplanr/skills/coo-review/SKILL.md +0 -1
  235. package/lib/host-packages/openai/openplanr/skills/coo-review/references/operate-advisor-contract.md +25 -4
  236. package/lib/host-packages/openai/openplanr/skills/cpo-review/SKILL.md +0 -1
  237. package/lib/host-packages/openai/openplanr/skills/cpo-review/references/operate-advisor-contract.md +25 -4
  238. package/lib/host-packages/openai/openplanr/skills/cto-review/SKILL.md +0 -1
  239. package/lib/host-packages/openai/openplanr/skills/cto-review/references/operate-advisor-contract.md +25 -4
  240. package/lib/host-packages/openai/openplanr/skills/delegate/SKILL.md +8 -1
  241. package/lib/host-packages/openai/openplanr/skills/delegate/openplanr.skill.json +11 -0
  242. package/lib/host-packages/openai/openplanr/skills/delegate/references/capsule-contract.md +17 -2
  243. package/lib/host-packages/openai/openplanr/skills/delegate/references/operator-guide.md +7 -5
  244. package/lib/host-packages/openai/openplanr/skills/delegate/scripts/adapters/claude.mjs +11 -4
  245. package/lib/host-packages/openai/openplanr/skills/delegate/scripts/adapters/native.mjs +1 -1
  246. package/lib/host-packages/openai/openplanr/skills/delegate/scripts/backend-diagnostics.mjs +14 -48
  247. package/lib/host-packages/openai/openplanr/skills/delegate/scripts/context.mjs +84 -22
  248. package/lib/host-packages/openai/openplanr/skills/delegate/scripts/credentials.mjs +167 -0
  249. package/lib/host-packages/openai/openplanr/skills/delegate/scripts/presentation.mjs +3 -2
  250. package/lib/host-packages/openai/openplanr/skills/delegate/scripts/run-contract.mjs +5 -7
  251. package/lib/host-packages/openai/openplanr/skills/delegate/scripts/run-preparation.mjs +5 -3
  252. package/lib/host-packages/openai/openplanr/skills/delegate/scripts/run-record.mjs +2 -3
  253. package/lib/host-packages/openai/openplanr/skills/design/references/utilities.md +1 -1
  254. package/lib/host-packages/openai/openplanr/skills/design-loop/references/utilities.md +1 -1
  255. package/lib/host-packages/openai/openplanr/skills/design-review/references/utilities.md +1 -1
  256. package/lib/host-packages/openai/openplanr/skills/diagram/references/diagram-sharing.md +1 -1
  257. package/lib/host-packages/openai/openplanr/skills/doctor/SKILL.md +4 -1
  258. package/lib/host-packages/openai/openplanr/skills/doctor/references/upgrade.md +8 -0
  259. package/lib/host-packages/openai/openplanr/skills/operate/SKILL.md +5 -3
  260. package/lib/host-packages/openai/openplanr/skills/plan/SKILL.md +10 -4
  261. package/lib/host-packages/openai/openplanr/skills/sprint/SKILL.md +5 -4
  262. package/lib/host-packages/openai/openplanr/skills/sprint/openplanr.skill.json +11 -0
  263. package/lib/host-packages/openai/openplanr/skills/sprint/references/tracker-connections.md +70 -0
  264. package/lib/host-packages/openai/openplanr/skills/status/SKILL.md +4 -3
  265. package/lib/host-packages/openai/openplanr/skills/status/openplanr.skill.json +11 -0
  266. package/lib/host-packages/openai/openplanr/skills/status/references/tracker-connections.md +70 -0
  267. package/lib/host-packages/openai/openplanr/skills/sync/SKILL.md +11 -20
  268. package/lib/host-packages/openai/openplanr/skills/sync/openplanr.skill.json +11 -0
  269. package/lib/host-packages/openai/openplanr/skills/sync/references/tracker-connections.md +70 -0
  270. package/lib/host-packages/openai/openplanr/skills/sync/scripts/sync.mjs +2 -2
  271. package/lib/integrations.mjs +2 -2
  272. package/lib/node-runtime.d.mts +1 -1
  273. package/lib/node-runtime.mjs +2 -7
  274. package/package.json +4 -5
  275. package/bin/planr.js +0 -7
  276. package/dist/services/connectors/adapters/business-metrics.d.ts +0 -5
  277. package/dist/services/connectors/adapters/business-metrics.d.ts.map +0 -1
  278. package/dist/services/connectors/adapters/business-metrics.js +0 -41
  279. package/dist/services/connectors/adapters/business-metrics.js.map +0 -1
  280. package/dist/services/connectors/adapters/deployment-health.d.ts +0 -18
  281. package/dist/services/connectors/adapters/deployment-health.d.ts.map +0 -1
  282. package/dist/services/connectors/adapters/deployment-health.js +0 -67
  283. package/dist/services/connectors/adapters/deployment-health.js.map +0 -1
  284. package/dist/services/connectors/adapters/github.d.ts +0 -5
  285. package/dist/services/connectors/adapters/github.d.ts.map +0 -1
  286. package/dist/services/connectors/adapters/github.js +0 -31
  287. package/dist/services/connectors/adapters/github.js.map +0 -1
  288. package/dist/services/connectors/adapters/linear-jira.d.ts +0 -5
  289. package/dist/services/connectors/adapters/linear-jira.d.ts.map +0 -1
  290. package/dist/services/connectors/adapters/linear-jira.js +0 -26
  291. package/dist/services/connectors/adapters/linear-jira.js.map +0 -1
  292. package/dist/services/connectors/adapters/posthog.d.ts +0 -5
  293. package/dist/services/connectors/adapters/posthog.d.ts.map +0 -1
  294. package/dist/services/connectors/adapters/posthog.js +0 -31
  295. package/dist/services/connectors/adapters/posthog.js.map +0 -1
  296. package/dist/services/connectors/adapters/sentry.d.ts +0 -5
  297. package/dist/services/connectors/adapters/sentry.d.ts.map +0 -1
  298. package/dist/services/connectors/adapters/sentry.js +0 -31
  299. package/dist/services/connectors/adapters/sentry.js.map +0 -1
  300. package/dist/services/connectors/checkpoint-custody.d.ts +0 -45
  301. package/dist/services/connectors/checkpoint-custody.d.ts.map +0 -1
  302. package/dist/services/connectors/checkpoint-custody.js +0 -499
  303. package/dist/services/connectors/checkpoint-custody.js.map +0 -1
  304. package/dist/services/connectors/connector-registry.d.ts +0 -144
  305. package/dist/services/connectors/connector-registry.d.ts.map +0 -1
  306. package/dist/services/connectors/connector-registry.js +0 -423
  307. package/dist/services/connectors/connector-registry.js.map +0 -1
  308. package/dist/services/connectors/connector-runtime.d.ts +0 -208
  309. package/dist/services/connectors/connector-runtime.d.ts.map +0 -1
  310. package/dist/services/connectors/connector-runtime.js +0 -1305
  311. package/dist/services/connectors/connector-runtime.js.map +0 -1
  312. package/dist/services/connectors/credential-custody.d.ts +0 -96
  313. package/dist/services/connectors/credential-custody.d.ts.map +0 -1
  314. package/dist/services/connectors/credential-custody.js +0 -390
  315. package/dist/services/connectors/credential-custody.js.map +0 -1
@@ -0,0 +1,167 @@
1
+ // Credential classification for delegated context. Findings never carry the matched value.
2
+ import { createHash } from 'node:crypto';
3
+
4
+ /**
5
+ * Recognizable credential formats; rejected everywhere, including tests and placeholders.
6
+ * Case-sensitive: each prefix has a fixed case, and `github_pat_` and `sk-` bodies need an
7
+ * uppercase letter or digit.
8
+ */
9
+ export const CREDENTIAL_FORMAT =
10
+ /-----BEGIN (?:[A-Z ]* )?PRIVATE KEY(?: BLOCK)?-----|"private_key"\s*:\s*"-----BEGIN|(?<![A-Za-z0-9])AKIA[0-9A-Z]{16}\b|(?<![A-Za-z0-9])gh[pousr]_[A-Za-z0-9]{20,}(?![A-Za-z0-9])|(?<![A-Za-z0-9])github_pat_(?=[A-Za-z0-9_]*[A-Z0-9])[A-Za-z0-9_]{20,}\b|(?<![A-Za-z0-9])sk-(?:proj-)?(?=[A-Za-z0-9_-]*[A-Z0-9])[A-Za-z0-9_-]{24,}\b|(?<![A-Za-z0-9])xox[baprs]-[A-Za-z0-9-]{20,}/u;
11
+
12
+ // `word` is the credential word findings report as `key`; the rest of a name may hold a value.
13
+ const CREDENTIAL_NAME =
14
+ '(?<name>(?:[A-Za-z_][A-Za-z0-9_-]*?)?(?<word>API[_-]?KEY|ACCESS[_-]?TOKEN|AUTH[_-]?TOKEN|CLIENT[_-]?SECRET|PRIVATE[_-]?KEY|PASSWORD|TOKEN|SECRET(?:[_-]?KEY)?))';
15
+ const QUOTED_ASSIGNMENT = new RegExp(
16
+ `(?:^|[^A-Za-z0-9_])${CREDENTIAL_NAME}["']?\\s*[:=]\\s*(?<quote>["'\`])(?<value>(?:(?!\\k<quote>|\\$\\{)[^\\r\\n\\\\]|\\\\.){16,})\\k<quote>`,
17
+ 'giu',
18
+ );
19
+ const UNQUOTED_ASSIGNMENT = new RegExp(
20
+ `^[ \\t]*(?<exported>export[ \\t]+)?${CREDENTIAL_NAME}(?<before>[ \\t]*)(?<operator>[:=])(?<after>[ \\t]*)(?!process\\.env(?:\\.|\\[)|import\\.meta\\.env(?:\\.|\\[)|Deno\\.env\\.|os\\.environ|env\\.)(?<value>[^\\s"'\`#()\\[\\]{}$]{16,})[ \\t]*(?:#[^\\r\\n]*)?\\r?$`,
21
+ 'gimu',
22
+ );
23
+ const PLACEHOLDER =
24
+ /^(?:example(?:[-_].*)?|placeholder(?:[-_].*)?|your[-_].*|(?:change|replace)[-_]me(?:[-_].*)?|(?:dummy|fake|mock|test|never[-_]return)[-_](?:api[-_]?key|access[-_]?token|auth[-_]?token|client[-_]?secret|password|token|secret(?:[-_]?key)?))$/iu;
25
+ // A lowercase marker followed only by words and short numbers, one of them a credential noun.
26
+ const DESCRIBED_PLACEHOLDER =
27
+ /^(?:dummy|fake|mock|test|fixture|synthetic|never[-_]return)(?:[-_. ](?:[a-z]+|\d{1,4}))+[-_.]?$/u;
28
+ const CREDENTIAL_NOUN = /[-_. ](?:secret|key|token|password|credential)s?(?=[-_. ]|$)/u;
29
+ const SHELL_NAME = /^[A-Z][A-Z0-9_]*$/u;
30
+ const IDENTIFIER_WORD = /[A-Z]{2,}(?![a-z])\d{0,2}|[A-Z]?[a-z]+\d{0,2}|[A-Z]\d{0,2}|\d{1,2}/gu;
31
+
32
+ const CODE_EXTENSIONS = new Set(
33
+ 'c cc cjs cpp cs cts dart go groovy h hpp java js jsx kt kts lua m mjs mm mts php py rb rs scala svelte swift ts tsx vue'.split(
34
+ ' ',
35
+ ),
36
+ );
37
+ const CONFIG_EXTENSIONS = new Set(
38
+ 'bash cfg conf env fish hcl ini json json5 jsonc properties ps1 sh tf toml xml yaml yml zsh'.split(
39
+ ' ',
40
+ ),
41
+ );
42
+ const CONFIG_NAMES = new Set(['dockerfile', 'makefile', 'procfile']);
43
+
44
+ /** The syntax that decides whether an unquoted value is a literal: code, config, or free text. */
45
+ export function credentialSyntax(path) {
46
+ if (typeof path !== 'string' || !path) return 'text';
47
+ const name = path.split('/').at(-1).toLowerCase();
48
+ if (CONFIG_NAMES.has(name) || name.startsWith('.env')) return 'config';
49
+ const extension = name.includes('.') ? name.split('.').at(-1) : '';
50
+ if (CODE_EXTENSIONS.has(extension)) return 'code';
51
+ if (CONFIG_EXTENSIONS.has(extension)) return 'config';
52
+ return 'text';
53
+ }
54
+
55
+ function sha256(value) {
56
+ return createHash('sha256').update(value).digest('hex');
57
+ }
58
+
59
+ function position(content, index) {
60
+ const before = content.slice(0, index);
61
+ return { line: before.split('\n').length, column: index - before.lastIndexOf('\n') };
62
+ }
63
+
64
+ // Reads like a code identifier: whole words, digits only at word ends, at most one one-letter word.
65
+ function codeIdentifier(value) {
66
+ if (!/^[A-Za-z_$][\w$]*$/u.test(value) || value.length > 64) return false;
67
+ let singleLetters = 0;
68
+ for (const part of value.split(/[_$]+/u).filter(Boolean)) {
69
+ const words = part.match(IDENTIFIER_WORD) ?? [];
70
+ if (words.join('') !== part) return false;
71
+ singleLetters += words.filter((word) => word.replace(/\d+$/u, '').length <= 1).length;
72
+ }
73
+ return singleLetters <= 1;
74
+ }
75
+
76
+ function memberPath(value) {
77
+ const segments = value.replace(/!$/u, '').split(/[!?]?\./u);
78
+ return segments.length > 1 && segments.every(codeIdentifier);
79
+ }
80
+
81
+ // An unquoted value is a literal unless its syntax makes it a reference, type or expression.
82
+ // Multi-line strings in code read like text, so an unterminated identifier stays a literal.
83
+ function unquotedLiteral(raw, operator, syntax) {
84
+ if (syntax === 'config' || (syntax === 'text' && operator === '=')) return true;
85
+ const terminated = /[;,]$/u.test(raw);
86
+ const value = terminated ? raw.slice(0, -1) : raw;
87
+ if (memberPath(value)) return !(terminated || syntax === 'code');
88
+ return !(terminated && codeIdentifier(value));
89
+ }
90
+
91
+ // `export NAME=` is a shell line in any file, and so is an uppercase `NAME=value` without spaces
92
+ // unless it ends in `,` like a keyword argument.
93
+ function shellAssignment({ exported, name, before, operator, after, value }) {
94
+ if (exported) return true;
95
+ return operator === '=' && !before && !after && SHELL_NAME.test(name) && !value.endsWith(',');
96
+ }
97
+
98
+ function placeholder(value) {
99
+ return (
100
+ PLACEHOLDER.test(value) || (DESCRIBED_PLACEHOLDER.test(value) && CREDENTIAL_NOUN.test(value))
101
+ );
102
+ }
103
+
104
+ /**
105
+ * Classifies credential material in `bytes` from `origin` ({ path?, label?, syntax?, resolvable? }).
106
+ * Findings report location, rule, classification, confidence and explanation, never values.
107
+ * `resolvable: false` marks text that no resolution can admit, such as a correction.
108
+ */
109
+ export function classifyCredentials(bytes, origin = {}) {
110
+ const buffer = Buffer.isBuffer(bytes) ? bytes : Buffer.from(String(bytes), 'utf8');
111
+ const content = buffer.toString('utf8');
112
+ const label = origin.label ?? origin.path ?? 'text';
113
+ const syntax = origin.syntax ?? credentialSyntax(origin.path);
114
+ const resolvable = origin.resolvable !== false;
115
+ const findings = [];
116
+ const add = (rule, index, key, details) => {
117
+ const { line, column } = position(content, index);
118
+ findings.push({
119
+ id: `cred_${sha256(`${label}\n${rule}\n${line}:${column}\n${key ?? ''}`).slice(0, 16)}`,
120
+ rule,
121
+ ...details,
122
+ location: { ...(origin.path ? { path: origin.path } : {}), line, column },
123
+ ...(key ? { key } : {}),
124
+ });
125
+ };
126
+ for (const match of content.matchAll(new RegExp(CREDENTIAL_FORMAT.source, 'gu')))
127
+ add('credential-format', match.index, null, {
128
+ classification: 'credential',
129
+ confidence: 'high',
130
+ resolvable: false,
131
+ explanation:
132
+ 'A recognizable credential or private key format cannot be delegated; remove it from the source.',
133
+ });
134
+ const literal = ({ index, 0: text, groups: { name, word } }) =>
135
+ add('credential-assignment', index + text.indexOf(name), word, {
136
+ classification: 'possible-credential',
137
+ confidence: 'medium',
138
+ resolvable,
139
+ explanation: `${word} is assigned a literal that is neither a reference nor a recognized placeholder; ${resolvable ? 'resolve this finding only if the value is not a credential' : 'remove the value or replace it with a reference'}.`,
140
+ });
141
+ for (const match of content.matchAll(QUOTED_ASSIGNMENT))
142
+ if (!placeholder(match.groups.value)) literal(match);
143
+ for (const match of content.matchAll(UNQUOTED_ASSIGNMENT)) {
144
+ const { operator, value } = match.groups;
145
+ const lineSyntax = shellAssignment(match.groups) ? 'config' : syntax;
146
+ if (unquotedLiteral(value, operator, lineSyntax) && !placeholder(value.replace(/[;,]$/u, '')))
147
+ literal(match);
148
+ }
149
+ return { contentDigest: `sha256:${sha256(buffer)}`, syntax, findings };
150
+ }
151
+
152
+ /**
153
+ * Splits findings into those an explicit resolution covers and the rest. A resolution names one
154
+ * resolvable finding and the exact content digest it was recorded for; changed bytes invalidate it.
155
+ */
156
+ export function resolveFindings(classification, resolutions = []) {
157
+ const accepted = new Set(
158
+ resolutions
159
+ .filter((resolution) => resolution?.contentDigest === classification.contentDigest)
160
+ .map((resolution) => resolution.id),
161
+ );
162
+ const applied = [];
163
+ const remaining = [];
164
+ for (const finding of classification.findings)
165
+ (finding.resolvable && accepted.has(finding.id) ? applied : remaining).push(finding);
166
+ return { applied, remaining };
167
+ }
@@ -39,7 +39,7 @@ export function preparationPresentation(preview) {
39
39
  return {
40
40
  phase: 'preview',
41
41
  headline: `${taskLabel(preview.selector)} is ready for review before dispatch.`,
42
- context: `${preview.inventory.length} copied file(s); ${preview.omissions.length} omission(s).`,
42
+ context: `${preview.inventory.length} copied file(s); ${preview.omissions.length} omission(s); ${preview.credentialResolutions?.length ?? 0} accepted credential resolution(s).`,
43
43
  writableRepository: preview.writableRepository,
44
44
  worktreePath: preview.worktreePath,
45
45
  selectedPaths: preview.selectedPaths,
@@ -49,6 +49,7 @@ export function preparationPresentation(preview) {
49
49
  : 'Legacy run has no recorded integration scope; supply explicit paths at review. The worktree is not a filesystem sandbox.',
50
50
  inventory: preview.inventory,
51
51
  omissions: preview.omissions,
52
+ credentialResolutions: preview.credentialResolutions ?? [],
52
53
  blockers: preview.blockers ?? [],
53
54
  planning: preview.planning ?? null,
54
55
  helper: preview.helper ?? null,
@@ -61,7 +62,7 @@ export function preparationPresentation(preview) {
61
62
  destination: preview.destination,
62
63
  ...(preview.executionPolicy ? { executionPolicy: preview.executionPolicy } : {}),
63
64
  nextAction:
64
- 'Review required sources, optional omissions, planning location, integration scope, and destination before dispatch.',
65
+ 'Review required sources, optional omissions, accepted credential resolutions, planning location, integration scope, and destination before dispatch.',
65
66
  };
66
67
  }
67
68
 
@@ -2,6 +2,7 @@
2
2
  import { createHash } from 'node:crypto';
3
3
  import { isAbsolute, sep } from 'node:path';
4
4
  import { assertCredentialFreeText } from './context.mjs';
5
+ import { CREDENTIAL_FORMAT } from './credentials.mjs';
5
6
  import { updateRunRecord } from './run-record.mjs';
6
7
 
7
8
  const MAX_HANDOFF_TEXT = 4096;
@@ -16,9 +17,6 @@ export const SHA256 = /^[a-f0-9]{64}$/u;
16
17
 
17
18
  const RESULT_STATES = new Set(['completed', 'blocked', 'question']);
18
19
 
19
- const CREDENTIAL =
20
- /-----BEGIN (?:[A-Z ]* )?PRIVATE KEY-----|\bAKIA[0-9A-Z]{16}\b|\bgh[pousr]_[A-Za-z0-9_]{20,}\b|\bgithub_pat_[A-Za-z0-9_]{20,}\b|\bsk-(?:proj-)?[A-Za-z0-9_-]{24,}\b|\bxox[baprs]-[A-Za-z0-9-]{20,}/iu;
21
-
22
20
  export class DelegateRunError extends Error {
23
21
  constructor(code, message, runId = null, details = null) {
24
22
  super(message);
@@ -68,7 +66,7 @@ export function boundedText(value, label) {
68
66
  typeof value !== 'string' ||
69
67
  !value.trim() ||
70
68
  Buffer.byteLength(value, 'utf8') > MAX_HANDOFF_TEXT ||
71
- CREDENTIAL.test(value)
69
+ CREDENTIAL_FORMAT.test(value)
72
70
  ) {
73
71
  throw new DelegateRunError(
74
72
  'E_DELEGATE_INPUT',
@@ -152,7 +150,7 @@ function validQuestion(question) {
152
150
  typeof question.text !== 'string' ||
153
151
  !question.text.trim() ||
154
152
  Buffer.byteLength(question.text, 'utf8') > MAX_HANDOFF_TEXT ||
155
- CREDENTIAL.test(question.text) ||
153
+ CREDENTIAL_FORMAT.test(question.text) ||
156
154
  (question.options !== undefined &&
157
155
  (!Array.isArray(question.options) ||
158
156
  question.options.length > 12 ||
@@ -160,7 +158,7 @@ function validQuestion(question) {
160
158
  (option) =>
161
159
  typeof option !== 'string' ||
162
160
  Buffer.byteLength(option, 'utf8') > 256 ||
163
- CREDENTIAL.test(option),
161
+ CREDENTIAL_FORMAT.test(option),
164
162
  )))
165
163
  )
166
164
  return false;
@@ -181,7 +179,7 @@ export function resultShape(result, expectedSessionId = null) {
181
179
  ) {
182
180
  return null;
183
181
  }
184
- if (CREDENTIAL.test(result.summary)) return null;
182
+ if (CREDENTIAL_FORMAT.test(result.summary)) return null;
185
183
  if (result.status === 'blocked' && !result.summary.trim()) return null;
186
184
  if (result.status === 'question' && !validQuestion(result.question)) return null;
187
185
  if (
@@ -58,7 +58,7 @@ async function inspectWorktreeDependencies(worktreePath) {
58
58
  }
59
59
 
60
60
  export async function probeDelegateHost({ repositoryRoot, env = process.env } = {}) {
61
- const nodeReady = Number(process.versions.node.split('.')[0]) >= 20;
61
+ const nodeReady = Number(process.versions.node.split('.')[0]) >= 22;
62
62
  const options = {
63
63
  env: { PATH: env.PATH, HOME: env.HOME, USER: env.USER, TMPDIR: env.TMPDIR },
64
64
  cwd: repositoryRoot,
@@ -128,7 +128,7 @@ export async function probeDelegateHost({ repositoryRoot, env = process.env } =
128
128
  }
129
129
  return {
130
130
  ready: nodeReady && gitReady,
131
- node: { ready: nodeReady, minimumMajor: 20 },
131
+ node: { ready: nodeReady, minimumMajor: 22 },
132
132
  git: { ready: gitReady, ...(gitDiagnostic ? { diagnostic: gitDiagnostic } : {}) },
133
133
  repository,
134
134
  engines,
@@ -143,6 +143,7 @@ export async function prepareDelegateRun({
143
143
  selectedFiles = [],
144
144
  optionalFiles = [],
145
145
  readOnlyRepositories = [],
146
+ credentialResolutions = [],
146
147
  selectedPaths,
147
148
  scopePaths,
148
149
  preservePaths = [],
@@ -166,7 +167,7 @@ export async function prepareDelegateRun({
166
167
  if (!host.ready || !host.repository?.ready)
167
168
  throw new DelegateRunError(
168
169
  'E_DELEGATE_PREREQUISITE',
169
- 'Node 20+, Git, and a repository with a commit are required before task collection.',
170
+ 'Node 22+, Git, and a repository with a commit are required before task collection.',
170
171
  null,
171
172
  host,
172
173
  );
@@ -199,6 +200,7 @@ export async function prepareDelegateRun({
199
200
  selectedFiles,
200
201
  optionalFiles,
201
202
  readOnlyRepositories,
203
+ credentialResolutions,
202
204
  });
203
205
  const integrationScopePaths = scopePaths === undefined ? null : integrationPaths(scopePaths);
204
206
  let identity = profileIdentity(prepared);
@@ -14,6 +14,7 @@ import {
14
14
  import { homedir } from 'node:os';
15
15
  import { join, resolve, sep } from 'node:path';
16
16
  import { promisify } from 'node:util';
17
+ import { CREDENTIAL_FORMAT } from './credentials.mjs';
17
18
  import { captureFileState } from './custody.mjs';
18
19
 
19
20
  export const RUN_RECORD_SCHEMA_VERSION = '2.0.0';
@@ -21,8 +22,6 @@ export const MAX_RUN_RECORD_BYTES = 64 * 1024;
21
22
  export const CLOSED_RETENTION_MS = 30 * 24 * 60 * 60 * 1000;
22
23
 
23
24
  const RUN_ID = /^[a-zA-Z0-9][a-zA-Z0-9-]{0,99}$/u;
24
- const CREDENTIAL =
25
- /-----BEGIN (?:[A-Z ]* )?PRIVATE KEY-----|\bAKIA[0-9A-Z]{16}\b|\bgh[pousr]_[A-Za-z0-9_]{20,}\b|\bgithub_pat_[A-Za-z0-9_]{20,}\b|\bsk-(?:proj-)?[A-Za-z0-9_-]{24,}\b|\bxox[baprs]-[A-Za-z0-9-]{20,}/iu;
26
25
 
27
26
  const execute = promisify(execFile);
28
27
 
@@ -74,7 +73,7 @@ function encoded(record) {
74
73
  if (bytes.length > MAX_RUN_RECORD_BYTES) {
75
74
  throw new RunRecordError('E_RUN_LIMIT', 'Delegated run record exceeds its private size limit.');
76
75
  }
77
- if (CREDENTIAL.test(bytes.toString('utf8'))) {
76
+ if (CREDENTIAL_FORMAT.test(bytes.toString('utf8'))) {
78
77
  throw new RunRecordError('E_RUN_CREDENTIAL', 'Credential material cannot enter a run record.');
79
78
  }
80
79
  return bytes;
@@ -15,7 +15,7 @@ Ordinary implementation remains with `planr-ship`.
15
15
  Resolve [runner.mjs](planr-delegate/scripts/runner.mjs) from this installed skill. Call it through
16
16
  Node as `node <installed-skill>/scripts/runner.mjs <action>`, with one JSON object
17
17
  on stdin. Alternatively, include `action` in that object and omit the command-line
18
- action; conflicting actions are rejected. `probe` discovers Node 20+, Git, installed
18
+ action; conflicting actions are rejected. `probe` discovers Node 22+, Git, installed
19
19
  CLIs and optional profiles; an OpenPlanr checkout or public CLI command is not
20
20
  needed. Reuse normal signed-in authentication. Preserve selection precedence:
21
21
  explicit engine/profile, saved choice, then a sole compatible native choice; ask
@@ -44,6 +44,13 @@ Capacity and duration remain unverified without matching measurements. For a lar
44
44
  local task, select only relevant sources or split the task before a new preparation;
45
45
  never silently omit, truncate or replace a required source with a summary.
46
46
 
47
+ If `prepare` reports `E_CAPSULE_SECRET`, show its masked findings (path, line, rule,
48
+ confidence); never edit, redact or drop a required source to pass the check. For a
49
+ resolvable finding, ask whether that exact value is a credential. Only when the user
50
+ confirms it is not, prepare again with `credentialResolutions` naming that finding's
51
+ `id` and `contentDigest`. Recognizable credential formats, private keys and credential
52
+ files are never resolvable: ask the user to remove the credential from the source.
53
+
47
54
  Call `prepare` with the engine/profile, context and explicit integration scope.
48
55
  Show its engine, model selection, known provider or native-managed routing,
49
56
  trusted configuration, working directory and context inventory once before
@@ -2,7 +2,7 @@
2
2
 
3
3
  Run the linked design helper from the skill entrypoint relative to the skill's
4
4
  directory. It contains deterministic operations and all required assets. It needs
5
- Node 20 or later, with no global CLI, provider credentials or runtime downloads.
5
+ Node.js 22.13 or later, with no global CLI, provider credentials or runtime downloads.
6
6
  Use `--help` to inspect the installed command interface before writing documents
7
7
  or invoking operations; the installed contract is authoritative.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Run the linked design helper from the skill entrypoint relative to the skill's
4
4
  directory. It contains deterministic operations and all required assets. It needs
5
- Node 20 or later, with no global CLI, provider credentials or runtime downloads.
5
+ Node.js 22.13 or later, with no global CLI, provider credentials or runtime downloads.
6
6
  Use `--help` to inspect the installed command interface before writing documents
7
7
  or invoking operations; the installed contract is authoritative.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Run the linked design helper from the skill entrypoint relative to the skill's
4
4
  directory. It contains deterministic operations and all required assets. It needs
5
- Node 20 or later, with no global CLI, provider credentials or runtime downloads.
5
+ Node.js 22.13 or later, with no global CLI, provider credentials or runtime downloads.
6
6
  Use `--help` to inspect the installed command interface before writing documents
7
7
  or invoking operations; the installed contract is authoritative.
8
8
 
@@ -13,7 +13,7 @@ review. Preview the exact diagram title, source revision, elements, connections,
13
13
  destination and retention before creating it. Use `--yes` only when the user has
14
14
  already authorized that publication. The stable URL and generated access token
15
15
  are separate; copy the token through the local studio's **Share diagram** dialog,
16
- never into a URL, prompt, ordinary output or repository file. Owner credentials
16
+ never into a URL, prompt, ordinary output or repository file. Owner keys
17
17
  are saved privately outside the project. The review remains available until the
18
18
  owner revokes or deletes it and works while the local studio is stopped.
19
19
 
@@ -52,6 +52,10 @@ Shape (the fields this skill reads):
52
52
  - `upgrade-available` or `incompatible` → act. First **record the `installed`
53
53
  block as the before state** — the honest diff at the end depends on it. When
54
54
  only `nextSteps` is non-empty, skip to step 3.
55
+ - `agents-behind` → the CLI is current and a coding agent's OpenPlanr install
56
+ needs updating. Record the `installed` block, then skip to step 3.
57
+ - `aligned` with non-empty `nextSteps` → the versions match, but an install needs
58
+ the `openplanr doctor` commands listed. Skip to step 3.
55
59
 
56
60
  ## 2. Upgrade the CLI and obtain the next steps
57
61
 
@@ -90,6 +94,10 @@ this file.** Other shapes:
90
94
  `openplanr upgrade status --json` and use its `nextSteps`.
91
95
  - An `openplanr doctor` command: planning that agent's update failed, and `detail`
92
96
  says why. Relay it and run `openplanr doctor --json`.
97
+ - An `openplanr doctor --fix` command: a file in that agent's runtime package was
98
+ changed outside OpenPlanr, and `detail` names it. Run it, show the user the
99
+ repair preview, and rerun it with `--yes` only after they confirm. The changed
100
+ files are backed up before they are replaced.
93
101
 
94
102
  `pluginHalfCommands` repeats the commands for older readers; read `nextSteps`.
95
103
 
@@ -36,7 +36,10 @@ skill's job, then reporting what actually changed — never what was merely
36
36
  attempted.
37
37
 
38
38
  1. **Decide.** Run `openplanr upgrade status --json` and read `status`. If it is
39
- `aligned` or `unknown`, there is nothing to drive — report it and stop.
39
+ `aligned` or `unknown` with empty `nextSteps`, there is nothing to drive —
40
+ report it and stop. If it is `agents-behind`, or `aligned` with `nextSteps`,
41
+ the CLI is already current: run its `nextSteps` commands in order, as step 3
42
+ describes, without upgrading the CLI.
40
43
  Record the reported `installed` versions; that is the before state.
41
44
  2. **Own half, prescribe half.** If `status` is `upgrade-available` or
42
45
  `incompatible`, confirm with the user (this upgrades the npm CLI), then run
@@ -46,9 +46,11 @@ matches. Never overwrite a prior cycle implicitly.
46
46
  ```
47
47
 
48
48
  `cycle.md` records the effective scope, roster, repository revision when relevant, and the outcome
49
- of each lens. If the directory is ignored by Git, continue locally and mention that in the report;
50
- do not ask the user to change ignore rules. Report an exact filesystem error only when the cycle
51
- workspace cannot be created or written.
49
+ of each lens. An advisor lens run on its own creates the same layout with a one-lens roster and an
50
+ unsynthesized `board-report.md`, so every review the dashboard lists has one shape.
51
+ If the directory is ignored by Git, continue locally and mention that in the report; do not ask the
52
+ user to change ignore rules. Report an exact filesystem error only when the cycle workspace cannot be
53
+ created or written.
52
54
 
53
55
  ## Build shared context once
54
56
 
@@ -78,8 +78,14 @@ Write stories and tasks directly in the repository's active planning mode.
78
78
  deleted ID. The packaged [planning ID helper](planr-plan/scripts/planning-ids.mjs) may
79
79
  inspect or reserve IDs; it never generates content.
80
80
  - Give each story stable acceptance IDs starting at `AC-001`.
81
- - Create one Tech task when no design surface applies; create one UI and one
82
- Tech task when it does. Never exceed two tasks for one story.
81
+ - Split each story into tasks that are coherent and independently verifiable.
82
+ Separate by ownership first: UI work is a `UI` task for the frontend role and
83
+ server, data, or integration work is a `Tech` task for the backend role.
84
+ Within one owner, split further only for a real output dependency, a distinct
85
+ verification surface, or reviewable size. Most stories need one Tech task,
86
+ plus one UI task when a design surface applies; never fragment one coherent
87
+ change into tasks that cannot be verified alone, and never fold unrelated work
88
+ into one task.
83
89
  - Map every acceptance ID through `acceptanceRefs` and name it with a concrete
84
90
  verification statement under `## Test Requirements`.
85
91
  - Set `reviewRisks` and `browserSurfaces` from repository evidence; use empty
@@ -111,8 +117,8 @@ instead of repeating every path in chat.
111
117
  - **Checks:** frontmatter, ID and acceptance coverage checks actually performed.
112
118
  - **Issues:** unresolved inputs or material assumptions, with their impact and recovery step; omit when empty.
113
119
  - **Next:** the exact ready task selector and a copy-ready host-native
114
- invocation such as `$planr-ship T-NNN` (Codex/ChatGPT) or
115
- `/planr-ship T-NNN` (Claude Code).
120
+ invocation such as `/planr:ship T-NNN` (Claude Code), `$planr:ship T-NNN`
121
+ (Codex/ChatGPT) or the `planr-ship` rule (Cursor).
116
122
 
117
123
  Mention the planning layout or consulted lenses only when they explain a material
118
124
  choice. Different summary wording never requires another planning run.
@@ -0,0 +1,70 @@
1
+ # GitHub and Linear connections
2
+
3
+ These skills store and read no GitHub or Linear credentials. Remote steps run through a
4
+ connection the host already has; the planning files stay the source of truth.
5
+
6
+ ## Use the host's connection
7
+
8
+ - **Linear:** the host's Linear connection, whose tools read, create and update issues.
9
+ - **GitHub:** the host's GitHub connection, or the GitHub CLI when
10
+ `gh auth status --hostname github.com` succeeds.
11
+
12
+ Never ask the user for a token, read one from the environment or a file, or put one in a
13
+ command, URL or file.
14
+
15
+ ## When a connection is missing
16
+
17
+ Finish the local work first. Then report the remote step as not run and give the one
18
+ line for the current host:
19
+
20
+ | Host | Linear | GitHub |
21
+ | --- | --- | --- |
22
+ | Claude Code | Run `/plugin install linear@claude-plugins-official`, then sign in to Linear from `/mcp`. | Install the GitHub CLI (cli.github.com) and run `gh auth login`. |
23
+ | Codex | Run `codex mcp add linear --url https://mcp.linear.app/mcp`, then `codex mcp login linear`. | Install the GitHub plugin from `/plugins`, or run `gh auth login`. |
24
+ | Cursor | Add Linear from the Cursor Marketplace and sign in to Linear. | Install the GitHub CLI (cli.github.com) and run `gh auth login`. |
25
+
26
+ Ask the user to try again once connected; never retry the remote step on your own.
27
+
28
+ ## Status mapping
29
+
30
+ | Local status | Linear workflow state | GitHub issue |
31
+ | --- | --- | --- |
32
+ | `planning`, `pending` | Unstarted (for example Todo) | open |
33
+ | `in-progress` | Started (for example In Progress) | open |
34
+ | `done` | Completed (for example Done) | closed |
35
+ | Backlog `open` | Backlog, else Unstarted | open |
36
+ | Backlog `closed` | Completed | closed |
37
+ | Backlog `promoted` | Leave as it is | Leave as it is |
38
+
39
+ When reading state back, write only a status the item's type allows. A backlog item takes
40
+ `open` or `closed` and keeps `promoted`.
41
+
42
+ - Linear Completed or Canceled sets `done`, or `closed` for a backlog item. Started sets
43
+ `in-progress`, and Triage, Backlog or Unstarted sets `planning` for features and stories
44
+ and `pending` for quick tasks; a backlog item takes `open` from any of these. Epics and
45
+ task files keep their status.
46
+ - A closed GitHub issue sets `done`, or `closed` for a backlog item. An open issue sets
47
+ `in-progress` for a `done` item and `open` for a `closed` backlog item; other statuses
48
+ stay as they are.
49
+
50
+ ## Links
51
+
52
+ A linked item records its tracker identity in frontmatter. Update a linked item through
53
+ that identity instead of creating another, and record the identity of everything you
54
+ create.
55
+
56
+ - **GitHub:** each item is one issue, recorded as `githubIssue`.
57
+ - **Linear:** use the shapes the OpenPlanr CLI uses, so its later pushes reuse what you
58
+ create:
59
+ - An epic is a Linear project (`linearProjectId`, `linearProjectIdentifier`,
60
+ `linearProjectUrl`). When its `linearMappingStrategy` is `milestone-of` or `label-on`,
61
+ it is a milestone in an existing project (`linearMilestoneId`) or a team label
62
+ (`linearLabelId`) instead, and every issue under it carries that milestone
63
+ (`linearProjectMilestoneId`) or label (`linearLabelIds`).
64
+ - A feature, quick task or backlog item is one issue (`linearIssueId`,
65
+ `linearIssueIdentifier`, `linearIssueUrl`). A story is a sub-issue of its feature's
66
+ issue (`linearParentIssueId`).
67
+ - All task files of one feature share one task-list issue: a sub-issue of the feature's
68
+ issue whose checklist merges every task file, recorded in each task file. Its state is
69
+ Completed when every task file is `done`, Unstarted when every one is `pending`, and
70
+ Started otherwise.
@@ -35,7 +35,7 @@ capability; it never blocks the run. Name every degraded input in `Issues`.
35
35
  | Capacity (engineers × working days) | Fit the list and name the overflow | Ask once; default 1 engineer × 10 days, stated in the return |
36
36
  | Previous sprint or refinement note (`.planr/sprints/SPRINT-NNN/refinement.json`) | Carry `leftovers`; `openplanr sprint diff` is possible | First run, no diff |
37
37
  | Last Operate cycle | Rank its unfinished actions alongside | Skipped silently |
38
- | Linear or GitHub connector | Push statuses on approval, read PR state | Local files only; report the external step as not run |
38
+ | Linear or GitHub connection ([tracker connections](planr-sprint/references/tracker-connections.md)) | Update linked issues on approval, read PR state | Local files only; report the external step as not run and name the connection to add |
39
39
 
40
40
  ## Step 0: Frame the run
41
41
 
@@ -134,9 +134,10 @@ openplanr sprint apply SPRINT-NNN --dry-run # show the status and prior
134
134
  openplanr sprint apply SPRINT-NNN --yes --commit # one commit: chore(planr): refine backlog for SPRINT-NNN
135
135
  ```
136
136
 
137
- Where a connector is configured, push each changed item afterwards
138
- (`openplanr linear push <id>`, `openplanr github push <id>`) and report the ones that
139
- were not pushed. When the CLI is unavailable, apply the same status changes with
137
+ Then update the issue linked to each changed item through the host's Linear or
138
+ GitHub connection, with the status mapping in
139
+ [tracker connections](planr-sprint/references/tracker-connections.md), and report the items that
140
+ were not updated. When the CLI is unavailable, apply the same status changes with
140
141
  the repository's own vocabulary and commit them with the same message.
141
142
 
142
143
  Close a finished sprint with `openplanr sprint close SPRINT-NNN`; it records the
@@ -0,0 +1,70 @@
1
+ # GitHub and Linear connections
2
+
3
+ These skills store and read no GitHub or Linear credentials. Remote steps run through a
4
+ connection the host already has; the planning files stay the source of truth.
5
+
6
+ ## Use the host's connection
7
+
8
+ - **Linear:** the host's Linear connection, whose tools read, create and update issues.
9
+ - **GitHub:** the host's GitHub connection, or the GitHub CLI when
10
+ `gh auth status --hostname github.com` succeeds.
11
+
12
+ Never ask the user for a token, read one from the environment or a file, or put one in a
13
+ command, URL or file.
14
+
15
+ ## When a connection is missing
16
+
17
+ Finish the local work first. Then report the remote step as not run and give the one
18
+ line for the current host:
19
+
20
+ | Host | Linear | GitHub |
21
+ | --- | --- | --- |
22
+ | Claude Code | Run `/plugin install linear@claude-plugins-official`, then sign in to Linear from `/mcp`. | Install the GitHub CLI (cli.github.com) and run `gh auth login`. |
23
+ | Codex | Run `codex mcp add linear --url https://mcp.linear.app/mcp`, then `codex mcp login linear`. | Install the GitHub plugin from `/plugins`, or run `gh auth login`. |
24
+ | Cursor | Add Linear from the Cursor Marketplace and sign in to Linear. | Install the GitHub CLI (cli.github.com) and run `gh auth login`. |
25
+
26
+ Ask the user to try again once connected; never retry the remote step on your own.
27
+
28
+ ## Status mapping
29
+
30
+ | Local status | Linear workflow state | GitHub issue |
31
+ | --- | --- | --- |
32
+ | `planning`, `pending` | Unstarted (for example Todo) | open |
33
+ | `in-progress` | Started (for example In Progress) | open |
34
+ | `done` | Completed (for example Done) | closed |
35
+ | Backlog `open` | Backlog, else Unstarted | open |
36
+ | Backlog `closed` | Completed | closed |
37
+ | Backlog `promoted` | Leave as it is | Leave as it is |
38
+
39
+ When reading state back, write only a status the item's type allows. A backlog item takes
40
+ `open` or `closed` and keeps `promoted`.
41
+
42
+ - Linear Completed or Canceled sets `done`, or `closed` for a backlog item. Started sets
43
+ `in-progress`, and Triage, Backlog or Unstarted sets `planning` for features and stories
44
+ and `pending` for quick tasks; a backlog item takes `open` from any of these. Epics and
45
+ task files keep their status.
46
+ - A closed GitHub issue sets `done`, or `closed` for a backlog item. An open issue sets
47
+ `in-progress` for a `done` item and `open` for a `closed` backlog item; other statuses
48
+ stay as they are.
49
+
50
+ ## Links
51
+
52
+ A linked item records its tracker identity in frontmatter. Update a linked item through
53
+ that identity instead of creating another, and record the identity of everything you
54
+ create.
55
+
56
+ - **GitHub:** each item is one issue, recorded as `githubIssue`.
57
+ - **Linear:** use the shapes the OpenPlanr CLI uses, so its later pushes reuse what you
58
+ create:
59
+ - An epic is a Linear project (`linearProjectId`, `linearProjectIdentifier`,
60
+ `linearProjectUrl`). When its `linearMappingStrategy` is `milestone-of` or `label-on`,
61
+ it is a milestone in an existing project (`linearMilestoneId`) or a team label
62
+ (`linearLabelId`) instead, and every issue under it carries that milestone
63
+ (`linearProjectMilestoneId`) or label (`linearLabelIds`).
64
+ - A feature, quick task or backlog item is one issue (`linearIssueId`,
65
+ `linearIssueIdentifier`, `linearIssueUrl`). A story is a sub-issue of its feature's
66
+ issue (`linearParentIssueId`).
67
+ - All task files of one feature share one task-list issue: a sub-issue of the feature's
68
+ issue whose checklist merges every task file, recorded in each task file. Its state is
69
+ Completed when every task file is `done`, Unstarted when every one is `pending`, and
70
+ Started otherwise.
@@ -10,9 +10,10 @@ planning artifacts, task statuses, dependency graph, current branch, and relevan
10
10
  runtime markers directly. Use the optional deterministic `openplanr status --json`
11
11
  utility when available, but do not require it or a semantic subprocess.
12
12
 
13
- Add GitHub or Linear lookups only when the user requests live remote state. Keep
14
- local results useful when credentials or connectors are unavailable. Report
15
- counts, ready and blocked work, dependency problems, and the most useful next
13
+ Add GitHub or Linear lookups only when the user requests live remote state, through
14
+ the host's connections as described in [tracker connections](planr-status/references/tracker-connections.md).
15
+ Keep local results useful when a connection is unavailable, and name the one to add.
16
+ Report counts, ready and blocked work, dependency problems, and the most useful next
16
17
  action. Do not repair artifacts, start Plan or Ship, or change lifecycle state.
17
18
 
18
19
  When the OpenPlanr dashboard is running (`planr-dashboard`), the same delivery