@codyswann/lisa 8.8.0 → 8.10.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 (332) hide show
  1. package/README.md +21 -0
  2. package/all/copy-overwrite/scripts/lib/completion-authorization.mjs +54 -0
  3. package/all/copy-overwrite/scripts/lib/completion-proof-adapters.mjs +59 -0
  4. package/all/copy-overwrite/scripts/lib/completion-proof-markdown.mjs +1 -1
  5. package/all/copy-overwrite/scripts/lib/npm-update-helper-inventory.mjs +1 -0
  6. package/all/copy-overwrite/scripts/lib/release-switch.d.mts +91 -0
  7. package/all/copy-overwrite/scripts/lib/release-switch.mjs +1049 -0
  8. package/all/copy-overwrite/scripts/lisa-release-switch.mjs +203 -0
  9. package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +18 -5
  10. package/dist/cli/doctor-release-setting.d.ts +8 -0
  11. package/dist/cli/doctor-release-setting.d.ts.map +1 -0
  12. package/dist/cli/doctor-release-setting.js +71 -0
  13. package/dist/cli/doctor-release-setting.js.map +1 -0
  14. package/dist/cli/doctor.d.ts.map +1 -1
  15. package/dist/cli/doctor.js +2 -0
  16. package/dist/cli/doctor.js.map +1 -1
  17. package/dist/core/lisa-owned-hash-ledger.json +118 -4
  18. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  19. package/dist/core/nightly-e2e-guard-behavior-certificate.js.map +1 -1
  20. package/dist/core/upstream-evidence-manifest.json +107 -44
  21. package/package.json +4 -4
  22. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  23. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  24. package/plugins/lisa/.codex-plugin/scripts/intake-blocker-reprobe.mjs +195 -23
  25. package/plugins/lisa/.codex-plugin/scripts/operator-id-kinds.mjs +41 -2
  26. package/plugins/lisa/.codex-plugin/scripts/ready-queue-order.mjs +69 -0
  27. package/plugins/lisa/.codex-plugin/skills/lisa-doctor/SKILL.md +10 -0
  28. package/plugins/lisa/.codex-plugin/skills/lisa-drive-pr-to-merge/SKILL.md +9 -0
  29. package/plugins/lisa/.codex-plugin/skills/lisa-git-submit-pr/SKILL.md +1 -0
  30. package/plugins/lisa/.codex-plugin/skills/lisa-github-build-intake/SKILL.md +10 -0
  31. package/plugins/lisa/.codex-plugin/skills/lisa-github-validate-issue/SKILL.md +27 -1
  32. package/plugins/lisa/.codex-plugin/skills/lisa-github-write-issue/SKILL.md +34 -1
  33. package/plugins/lisa/.codex-plugin/skills/lisa-implement/SKILL.md +10 -2
  34. package/plugins/lisa/.codex-plugin/skills/lisa-jira-build-intake/SKILL.md +10 -0
  35. package/plugins/lisa/.codex-plugin/skills/lisa-jira-validate-ticket/SKILL.md +27 -1
  36. package/plugins/lisa/.codex-plugin/skills/lisa-jira-write-ticket/SKILL.md +34 -1
  37. package/plugins/lisa/.codex-plugin/skills/lisa-linear-build-intake/SKILL.md +10 -0
  38. package/plugins/lisa/.codex-plugin/skills/lisa-linear-validate-issue/SKILL.md +26 -0
  39. package/plugins/lisa/.codex-plugin/skills/lisa-linear-write-issue/SKILL.md +34 -1
  40. package/plugins/lisa/.codex-plugin/skills/lisa-repair-intake/SKILL.md +10 -0
  41. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/validate-config.mjs +94 -4
  42. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +11 -0
  43. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-cycle.mjs +3 -3
  44. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-human.mjs +3 -1
  45. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-orphans.mjs +4 -1
  46. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-queue.mjs +8 -5
  47. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/config.mjs +28 -4
  48. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/orphan-sweep.mjs +2 -1
  49. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/queue-github.mjs +4 -1
  50. package/plugins/lisa/.codex-plugin/skills/lisa-task-decomposition/SKILL.md +1 -0
  51. package/plugins/lisa/.codex-plugin/skills/lisa-track/SKILL.md +13 -1
  52. package/plugins/lisa/.codex-plugin/skills/lisa-tracker-build-intake/SKILL.md +11 -1
  53. package/plugins/lisa/.codex-plugin/skills/lisa-verify/SKILL.md +4 -1
  54. package/plugins/lisa/hooks/inject-resolved-config.mjs +235 -3
  55. package/plugins/lisa/rules/eager/coding-philosophy.md +7 -6
  56. package/plugins/lisa/rules/reference/coding-philosophy.md +48 -0
  57. package/plugins/lisa/rules/reference/config-resolution.md +5 -2
  58. package/plugins/lisa/rules/reference/intent-routing.md +2 -2
  59. package/plugins/lisa/rules/reference/ready-role-filing.md +55 -5
  60. package/plugins/lisa/rules/reference/work-item-definition-of-ready.md +31 -0
  61. package/plugins/lisa/scripts/intake-blocker-reprobe.mjs +195 -23
  62. package/plugins/lisa/scripts/operator-id-kinds.mjs +41 -2
  63. package/plugins/lisa/scripts/ready-queue-order.mjs +69 -0
  64. package/plugins/lisa/skills/lisa-doctor/SKILL.md +10 -0
  65. package/plugins/lisa/skills/lisa-drive-pr-to-merge/SKILL.md +9 -0
  66. package/plugins/lisa/skills/lisa-git-submit-pr/SKILL.md +1 -0
  67. package/plugins/lisa/skills/lisa-github-build-intake/SKILL.md +10 -0
  68. package/plugins/lisa/skills/lisa-github-validate-issue/SKILL.md +27 -1
  69. package/plugins/lisa/skills/lisa-github-write-issue/SKILL.md +34 -1
  70. package/plugins/lisa/skills/lisa-implement/SKILL.md +10 -2
  71. package/plugins/lisa/skills/lisa-jira-build-intake/SKILL.md +10 -0
  72. package/plugins/lisa/skills/lisa-jira-validate-ticket/SKILL.md +27 -1
  73. package/plugins/lisa/skills/lisa-jira-write-ticket/SKILL.md +34 -1
  74. package/plugins/lisa/skills/lisa-linear-build-intake/SKILL.md +10 -0
  75. package/plugins/lisa/skills/lisa-linear-validate-issue/SKILL.md +26 -0
  76. package/plugins/lisa/skills/lisa-linear-write-issue/SKILL.md +34 -1
  77. package/plugins/lisa/skills/lisa-repair-intake/SKILL.md +10 -0
  78. package/plugins/lisa/skills/lisa-secrets-access/scripts/validate-config.mjs +94 -4
  79. package/plugins/lisa/skills/lisa-session-manager/SKILL.md +11 -0
  80. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-cycle.mjs +3 -3
  81. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-human.mjs +3 -1
  82. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-orphans.mjs +4 -1
  83. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-queue.mjs +8 -5
  84. package/plugins/lisa/skills/lisa-session-manager/scripts/config.mjs +28 -4
  85. package/plugins/lisa/skills/lisa-session-manager/scripts/orphan-sweep.mjs +2 -1
  86. package/plugins/lisa/skills/lisa-session-manager/scripts/queue-github.mjs +4 -1
  87. package/plugins/lisa/skills/lisa-task-decomposition/SKILL.md +1 -0
  88. package/plugins/lisa/skills/lisa-track/SKILL.md +13 -1
  89. package/plugins/lisa/skills/lisa-tracker-build-intake/SKILL.md +11 -1
  90. package/plugins/lisa/skills/lisa-verify/SKILL.md +4 -1
  91. package/plugins/lisa-agy/plugin.json +1 -1
  92. package/plugins/lisa-agy/scripts/intake-blocker-reprobe.mjs +195 -23
  93. package/plugins/lisa-agy/scripts/operator-id-kinds.mjs +41 -2
  94. package/plugins/lisa-agy/scripts/ready-queue-order.mjs +69 -0
  95. package/plugins/lisa-agy/skills/lisa-doctor/SKILL.md +10 -0
  96. package/plugins/lisa-agy/skills/lisa-drive-pr-to-merge/SKILL.md +9 -0
  97. package/plugins/lisa-agy/skills/lisa-git-submit-pr/SKILL.md +1 -0
  98. package/plugins/lisa-agy/skills/lisa-github-build-intake/SKILL.md +10 -0
  99. package/plugins/lisa-agy/skills/lisa-github-validate-issue/SKILL.md +27 -1
  100. package/plugins/lisa-agy/skills/lisa-github-write-issue/SKILL.md +34 -1
  101. package/plugins/lisa-agy/skills/lisa-implement/SKILL.md +10 -2
  102. package/plugins/lisa-agy/skills/lisa-jira-build-intake/SKILL.md +10 -0
  103. package/plugins/lisa-agy/skills/lisa-jira-validate-ticket/SKILL.md +27 -1
  104. package/plugins/lisa-agy/skills/lisa-jira-write-ticket/SKILL.md +34 -1
  105. package/plugins/lisa-agy/skills/lisa-linear-build-intake/SKILL.md +10 -0
  106. package/plugins/lisa-agy/skills/lisa-linear-validate-issue/SKILL.md +26 -0
  107. package/plugins/lisa-agy/skills/lisa-linear-write-issue/SKILL.md +34 -1
  108. package/plugins/lisa-agy/skills/lisa-repair-intake/SKILL.md +10 -0
  109. package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/validate-config.mjs +94 -4
  110. package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +11 -0
  111. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-cycle.mjs +3 -3
  112. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-human.mjs +3 -1
  113. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-orphans.mjs +4 -1
  114. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-queue.mjs +8 -5
  115. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/config.mjs +28 -4
  116. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/orphan-sweep.mjs +2 -1
  117. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/queue-github.mjs +4 -1
  118. package/plugins/lisa-agy/skills/lisa-task-decomposition/SKILL.md +1 -0
  119. package/plugins/lisa-agy/skills/lisa-track/SKILL.md +13 -1
  120. package/plugins/lisa-agy/skills/lisa-tracker-build-intake/SKILL.md +11 -1
  121. package/plugins/lisa-agy/skills/lisa-verify/SKILL.md +4 -1
  122. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  123. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  124. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  125. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  126. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  127. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  128. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  129. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  130. package/plugins/lisa-copilot/hooks/inject-resolved-config.mjs +235 -3
  131. package/plugins/lisa-copilot/rules/eager/coding-philosophy.md +7 -6
  132. package/plugins/lisa-copilot/rules/reference/coding-philosophy.md +48 -0
  133. package/plugins/lisa-copilot/rules/reference/config-resolution.md +5 -2
  134. package/plugins/lisa-copilot/rules/reference/intent-routing.md +2 -2
  135. package/plugins/lisa-copilot/rules/reference/ready-role-filing.md +55 -5
  136. package/plugins/lisa-copilot/rules/reference/work-item-definition-of-ready.md +31 -0
  137. package/plugins/lisa-copilot/scripts/intake-blocker-reprobe.mjs +195 -23
  138. package/plugins/lisa-copilot/scripts/operator-id-kinds.mjs +41 -2
  139. package/plugins/lisa-copilot/scripts/ready-queue-order.mjs +69 -0
  140. package/plugins/lisa-copilot/skills/lisa-doctor/SKILL.md +10 -0
  141. package/plugins/lisa-copilot/skills/lisa-drive-pr-to-merge/SKILL.md +9 -0
  142. package/plugins/lisa-copilot/skills/lisa-git-submit-pr/SKILL.md +1 -0
  143. package/plugins/lisa-copilot/skills/lisa-github-build-intake/SKILL.md +10 -0
  144. package/plugins/lisa-copilot/skills/lisa-github-validate-issue/SKILL.md +27 -1
  145. package/plugins/lisa-copilot/skills/lisa-github-write-issue/SKILL.md +34 -1
  146. package/plugins/lisa-copilot/skills/lisa-implement/SKILL.md +10 -2
  147. package/plugins/lisa-copilot/skills/lisa-jira-build-intake/SKILL.md +10 -0
  148. package/plugins/lisa-copilot/skills/lisa-jira-validate-ticket/SKILL.md +27 -1
  149. package/plugins/lisa-copilot/skills/lisa-jira-write-ticket/SKILL.md +34 -1
  150. package/plugins/lisa-copilot/skills/lisa-linear-build-intake/SKILL.md +10 -0
  151. package/plugins/lisa-copilot/skills/lisa-linear-validate-issue/SKILL.md +26 -0
  152. package/plugins/lisa-copilot/skills/lisa-linear-write-issue/SKILL.md +34 -1
  153. package/plugins/lisa-copilot/skills/lisa-repair-intake/SKILL.md +10 -0
  154. package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/validate-config.mjs +94 -4
  155. package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +11 -0
  156. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-cycle.mjs +3 -3
  157. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-human.mjs +3 -1
  158. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-orphans.mjs +4 -1
  159. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-queue.mjs +8 -5
  160. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/config.mjs +28 -4
  161. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/orphan-sweep.mjs +2 -1
  162. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/queue-github.mjs +4 -1
  163. package/plugins/lisa-copilot/skills/lisa-task-decomposition/SKILL.md +1 -0
  164. package/plugins/lisa-copilot/skills/lisa-track/SKILL.md +13 -1
  165. package/plugins/lisa-copilot/skills/lisa-tracker-build-intake/SKILL.md +11 -1
  166. package/plugins/lisa-copilot/skills/lisa-verify/SKILL.md +4 -1
  167. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  168. package/plugins/lisa-cursor/hooks/inject-resolved-config.mjs +235 -3
  169. package/plugins/lisa-cursor/rules/coding-philosophy-reference.mdc +48 -0
  170. package/plugins/lisa-cursor/rules/coding-philosophy.mdc +7 -6
  171. package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +5 -2
  172. package/plugins/lisa-cursor/rules/intent-routing-reference.mdc +2 -2
  173. package/plugins/lisa-cursor/rules/ready-role-filing-reference.mdc +55 -5
  174. package/plugins/lisa-cursor/rules/work-item-definition-of-ready-reference.mdc +31 -0
  175. package/plugins/lisa-cursor/scripts/intake-blocker-reprobe.mjs +195 -23
  176. package/plugins/lisa-cursor/scripts/operator-id-kinds.mjs +41 -2
  177. package/plugins/lisa-cursor/scripts/ready-queue-order.mjs +69 -0
  178. package/plugins/lisa-cursor/skills/lisa-doctor/SKILL.md +10 -0
  179. package/plugins/lisa-cursor/skills/lisa-drive-pr-to-merge/SKILL.md +9 -0
  180. package/plugins/lisa-cursor/skills/lisa-git-submit-pr/SKILL.md +1 -0
  181. package/plugins/lisa-cursor/skills/lisa-github-build-intake/SKILL.md +10 -0
  182. package/plugins/lisa-cursor/skills/lisa-github-validate-issue/SKILL.md +27 -1
  183. package/plugins/lisa-cursor/skills/lisa-github-write-issue/SKILL.md +34 -1
  184. package/plugins/lisa-cursor/skills/lisa-implement/SKILL.md +10 -2
  185. package/plugins/lisa-cursor/skills/lisa-jira-build-intake/SKILL.md +10 -0
  186. package/plugins/lisa-cursor/skills/lisa-jira-validate-ticket/SKILL.md +27 -1
  187. package/plugins/lisa-cursor/skills/lisa-jira-write-ticket/SKILL.md +34 -1
  188. package/plugins/lisa-cursor/skills/lisa-linear-build-intake/SKILL.md +10 -0
  189. package/plugins/lisa-cursor/skills/lisa-linear-validate-issue/SKILL.md +26 -0
  190. package/plugins/lisa-cursor/skills/lisa-linear-write-issue/SKILL.md +34 -1
  191. package/plugins/lisa-cursor/skills/lisa-repair-intake/SKILL.md +10 -0
  192. package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/validate-config.mjs +94 -4
  193. package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +11 -0
  194. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-cycle.mjs +3 -3
  195. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-human.mjs +3 -1
  196. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-orphans.mjs +4 -1
  197. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-queue.mjs +8 -5
  198. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/config.mjs +28 -4
  199. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/orphan-sweep.mjs +2 -1
  200. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/queue-github.mjs +4 -1
  201. package/plugins/lisa-cursor/skills/lisa-task-decomposition/SKILL.md +1 -0
  202. package/plugins/lisa-cursor/skills/lisa-track/SKILL.md +13 -1
  203. package/plugins/lisa-cursor/skills/lisa-tracker-build-intake/SKILL.md +11 -1
  204. package/plugins/lisa-cursor/skills/lisa-verify/SKILL.md +4 -1
  205. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  206. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  207. package/plugins/lisa-devin/hooks/inject-resolved-config.mjs +235 -3
  208. package/plugins/lisa-devin/rules/eager/coding-philosophy.md +7 -6
  209. package/plugins/lisa-devin/rules/reference/coding-philosophy.md +48 -0
  210. package/plugins/lisa-devin/rules/reference/config-resolution.md +5 -2
  211. package/plugins/lisa-devin/rules/reference/intent-routing.md +2 -2
  212. package/plugins/lisa-devin/rules/reference/ready-role-filing.md +55 -5
  213. package/plugins/lisa-devin/rules/reference/work-item-definition-of-ready.md +31 -0
  214. package/plugins/lisa-devin/scripts/intake-blocker-reprobe.mjs +195 -23
  215. package/plugins/lisa-devin/scripts/operator-id-kinds.mjs +41 -2
  216. package/plugins/lisa-devin/scripts/ready-queue-order.mjs +69 -0
  217. package/plugins/lisa-devin/skills/lisa-doctor/SKILL.md +10 -0
  218. package/plugins/lisa-devin/skills/lisa-drive-pr-to-merge/SKILL.md +9 -0
  219. package/plugins/lisa-devin/skills/lisa-git-submit-pr/SKILL.md +1 -0
  220. package/plugins/lisa-devin/skills/lisa-github-build-intake/SKILL.md +10 -0
  221. package/plugins/lisa-devin/skills/lisa-github-validate-issue/SKILL.md +27 -1
  222. package/plugins/lisa-devin/skills/lisa-github-write-issue/SKILL.md +34 -1
  223. package/plugins/lisa-devin/skills/lisa-implement/SKILL.md +10 -2
  224. package/plugins/lisa-devin/skills/lisa-jira-build-intake/SKILL.md +10 -0
  225. package/plugins/lisa-devin/skills/lisa-jira-validate-ticket/SKILL.md +27 -1
  226. package/plugins/lisa-devin/skills/lisa-jira-write-ticket/SKILL.md +34 -1
  227. package/plugins/lisa-devin/skills/lisa-linear-build-intake/SKILL.md +10 -0
  228. package/plugins/lisa-devin/skills/lisa-linear-validate-issue/SKILL.md +26 -0
  229. package/plugins/lisa-devin/skills/lisa-linear-write-issue/SKILL.md +34 -1
  230. package/plugins/lisa-devin/skills/lisa-repair-intake/SKILL.md +10 -0
  231. package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/validate-config.mjs +94 -4
  232. package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +11 -0
  233. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-cycle.mjs +3 -3
  234. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-human.mjs +3 -1
  235. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-orphans.mjs +4 -1
  236. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-queue.mjs +8 -5
  237. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/config.mjs +28 -4
  238. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/orphan-sweep.mjs +2 -1
  239. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/queue-github.mjs +4 -1
  240. package/plugins/lisa-devin/skills/lisa-task-decomposition/SKILL.md +1 -0
  241. package/plugins/lisa-devin/skills/lisa-track/SKILL.md +13 -1
  242. package/plugins/lisa-devin/skills/lisa-tracker-build-intake/SKILL.md +11 -1
  243. package/plugins/lisa-devin/skills/lisa-verify/SKILL.md +4 -1
  244. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  245. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  246. package/plugins/lisa-expo-agy/plugin.json +1 -1
  247. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  248. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  249. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  250. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  251. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  252. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  253. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  254. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  255. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  256. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  257. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  258. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  259. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  260. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  261. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  262. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  263. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  264. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  265. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  266. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  267. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  268. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  269. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  270. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  271. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  272. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  273. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  274. package/plugins/lisa-rails-agy/plugin.json +1 -1
  275. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  276. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  277. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  278. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  279. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  280. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  281. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  282. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  283. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  284. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  285. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  286. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  287. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  288. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  289. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  290. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  291. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  292. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  293. package/plugins/src/base/hooks/inject-resolved-config.mjs +235 -3
  294. package/plugins/src/base/rules/eager/coding-philosophy.md +7 -6
  295. package/plugins/src/base/rules/reference/coding-philosophy.md +48 -0
  296. package/plugins/src/base/rules/reference/config-resolution.md +5 -2
  297. package/plugins/src/base/rules/reference/intent-routing.md +2 -2
  298. package/plugins/src/base/rules/reference/ready-role-filing.md +55 -5
  299. package/plugins/src/base/rules/reference/work-item-definition-of-ready.md +31 -0
  300. package/plugins/src/base/scripts/intake-blocker-reprobe.mjs +195 -23
  301. package/plugins/src/base/scripts/operator-id-kinds.mjs +41 -2
  302. package/plugins/src/base/scripts/ready-queue-order.mjs +69 -0
  303. package/plugins/src/base/skills/lisa-doctor/SKILL.md +10 -0
  304. package/plugins/src/base/skills/lisa-drive-pr-to-merge/SKILL.md +9 -0
  305. package/plugins/src/base/skills/lisa-git-submit-pr/SKILL.md +1 -0
  306. package/plugins/src/base/skills/lisa-github-build-intake/SKILL.md +10 -0
  307. package/plugins/src/base/skills/lisa-github-validate-issue/SKILL.md +27 -1
  308. package/plugins/src/base/skills/lisa-github-write-issue/SKILL.md +34 -1
  309. package/plugins/src/base/skills/lisa-implement/SKILL.md +10 -2
  310. package/plugins/src/base/skills/lisa-jira-build-intake/SKILL.md +10 -0
  311. package/plugins/src/base/skills/lisa-jira-validate-ticket/SKILL.md +27 -1
  312. package/plugins/src/base/skills/lisa-jira-write-ticket/SKILL.md +34 -1
  313. package/plugins/src/base/skills/lisa-linear-build-intake/SKILL.md +10 -0
  314. package/plugins/src/base/skills/lisa-linear-validate-issue/SKILL.md +26 -0
  315. package/plugins/src/base/skills/lisa-linear-write-issue/SKILL.md +34 -1
  316. package/plugins/src/base/skills/lisa-repair-intake/SKILL.md +10 -0
  317. package/plugins/src/base/skills/lisa-secrets-access/scripts/validate-config.mjs +94 -4
  318. package/plugins/src/base/skills/lisa-session-manager/SKILL.md +11 -0
  319. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-cycle.mjs +3 -3
  320. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-human.mjs +3 -1
  321. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-orphans.mjs +4 -1
  322. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-queue.mjs +8 -5
  323. package/plugins/src/base/skills/lisa-session-manager/scripts/config.mjs +28 -4
  324. package/plugins/src/base/skills/lisa-session-manager/scripts/orphan-sweep.mjs +2 -1
  325. package/plugins/src/base/skills/lisa-session-manager/scripts/queue-github.mjs +4 -1
  326. package/plugins/src/base/skills/lisa-task-decomposition/SKILL.md +1 -0
  327. package/plugins/src/base/skills/lisa-track/SKILL.md +13 -1
  328. package/plugins/src/base/skills/lisa-tracker-build-intake/SKILL.md +11 -1
  329. package/plugins/src/base/skills/lisa-verify/SKILL.md +4 -1
  330. package/scripts/lisa-release-switch.mjs +9 -0
  331. package/scripts/two-channel-couplings.json +1 -1
  332. package/typescript/copy-overwrite/.prettierignore +2 -0
@@ -178,6 +178,13 @@ When the control shows the surface is not locally exercisable, that is exit 2 be
178
178
 
179
179
  If the required regression spec is still in flight on an auto-merge-enabled PR, pause auto-merge or use an equivalent merge gate until the spec commit is pushed and its execution proof is available. The flow must not allow the PR to merge before this non-demotable deliverable is satisfied or formally blocked through the linked follow-up path above.
180
180
 
181
+ **Decide how the work stays promotable** (`coding-philosophy`, "Always Promotable"): whatever is on a shared branch can be promoted to the next environment as it stands, so no piece of work may block a deployment. Read the item's `## Release Switch` declaration (gate S22; `lisa-track` wrote one when the item had none) and `node scripts/lisa-release-switch.mjs config`. When the project sets `release.liveUsers: false`, skip this paragraph. Otherwise one question decides: if this were promoted to production right now, would a user see something unfinished or unproven?
182
+
183
+ - **No → the work is live.** Bug fixes, small tweaks, copy changes, refactors and dependency updates almost always are. Never add a switch to work that is complete and proven when it merges. Prove the change **before** it merges (the local verification below), because it is live the moment it ships; the check in the target environment after the deploy confirms that proof, and its not having run yet does not make the work unverified; if it changes a database or an API, add before you remove and keep the change additive, so old and new code work side by side.
184
+ - **Yes → the work is switched off.** The question decides, not the kind of work: a feature or a fix that lands across several merges, or new behavior that merges before its verification has passed, merges behind a switch that is off in production. Use the project's mechanism (`release.switch.mechanism`, with its convention at `release.switch.guide`); with none named, use a plain configuration value that defaults to off. Give the switch a name that appears nowhere else in the repository and is not the start of another switch's name (`node scripts/lisa-release-switch.mjs references --switch <name>` must report none before its first use). Use one spelling of the name everywhere it is read. The done gate searches every tracked file for the name as a whole token, in any letter case; records do not count (`evidence/<ticket>/…` at the repository root, a `CHANGELOG` file, and `.lisa/`), so recording that the switch is off holds nothing open. Every other file counts, documentation included. Lisa wraps no flag tool: follow the project's existing pattern and never introduce a second one. The switch must be settable per environment. Plan tasks for all three things: add the switch, confirm it is off in production, and remove it. Removing it is part of finishing, not a follow-up: the item that removes the switch is not done while the switch exists.
185
+
186
+ If the declaration no longer matches the work, update it through `lisa-tracker-write` before building.
187
+
181
188
  Determine how you will know that the task is fully complete. Write this as an **effective completion condition** — one an independent verifier could confirm from observed output alone, not from your assertion that it works. A strong condition has:
182
189
 
183
190
  - **One measurable end state** — a status code, an exit code, a row count, an observable UI state, an empty queue. Not "it looks right" or "the code is correct".
@@ -348,10 +355,11 @@ Before finishing, execute the Verify flow:
348
355
  8. PR Watch Loop: Drive the PR to merge via the `drive-pr-to-merge` skill — the single source of truth for clearing every blocker (auto-merge with direct-merge fallback, `BEHIND` re-sync, conflict resolution, failing-check fixes, human + bot review-comment handling with thread resolution, stale `CHANGES_REQUESTED` dismissal, and post-merge ancestry verification). `git-submit-pr` already invokes it; if you reach this step with a PR already open, invoke `drive-pr-to-merge` directly with the PR number. For a large review backlog you may delegate independent code fixes to subagents, but `drive-pr-to-merge` owns the loop and the terminal conditions — do not re-implement them.
349
356
  9. Merge the PR, then refresh the ticket-side backlink with `lisa-tracker-sync <work_item_ref> pr-merged pr_url=<url> merge_sha=<sha> tracker_provider=<provider>`.
350
357
  10. Monitor the deploy action that triggers automatically from the successful merge, in the own turn of the agent running this flow (the lead) with a bounded foreground watch. Do not look the run up again: `lisa-drive-pr-to-merge` already confirmed it during step 8 (its deploy-run check). If step 8 returned `blocked:deploy` or `blocked:no-deploy-run`, no deploy run fired, and that is not a code failure: treat it as blocked under the blocked-deploy rule below, and never open a fix PR for it. Otherwise watch the run step 8 confirmed. The ceiling is 60 minutes from the merge, unless the work item or the deploy workflow's own `timeout-minutes` sets another. Before each watch, first read `gh run view <run id> --json status,conclusion`: a run that has already concluded is judged by its conclusion, whatever the time. Only for a run still in progress, compute the seconds remaining before the ceiling; if none remain, stop watching and apply the blocked-deploy rule. Otherwise watch with `timeout <n> gh run watch <run id> --interval 30 --exit-status`, where `<n>` is the smaller of 540 and the seconds remaining (`timeout <n>` where the `timeout` utility exists; otherwise rely on the harness's own command timeout), give the tool call a timeout just above `<n>` (at most 600000 ms on Claude Code), and re-poll `gh run view <run id> --json status,conclusion` after each return until the run concludes. A run that concluded successfully proceeds to step 12; one that concluded unsuccessfully is a deploy failure — go to step 11. A run still in progress at the ceiling is not a code failure: treat it as blocked under the blocked-deploy rule, and never open a fix PR for it. Blocked-deploy rule: diagnose why no run fired or why the run did not finish. A repository-owned technical gap (a misconfigured trigger, a missing `workflow_dispatch`, a deploy job that hangs) is an actionable blocker under step 2a — file and link the build-ready ticket. Missing access, credentials or a human decision is a human-only blocker under step 2a. Either way, record the blocked verdict and end the flow there: skip steps 11–14, still post evidence (step 15), and keep the binding (step 16). **Never wait on the deploy with a detached or background watcher** — no trailing `&`, no `nohup`, no harness background task, no scheduled re-check — because its result reaches only the agent that started it, never the lead, which then sits idle after the deploy has finished. This is the same rule `lisa-drive-pr-to-merge` applies to the CI wait. If a watcher subagent is used anyway, it must `SendMessage` the lead the moment the run succeeds or fails, and the lead's turn may end only to wait for that message. On runtimes without cross-agent messaging, the foreground watch is the only option.
351
- 11. If deploy fails, fix the failure, open a new PR and then go back to step 7
358
+ 11. If deploy fails, find out why. When the merged change is what broke the deploy, revert it at once exactly as step 14 describes, whatever its `## Release Switch` says: a switch cannot turn off a failed build or deployment, and the shared branch must stay promotable while the rework happens. Otherwise (a failure the change did not cause, or a project that sets `release.liveUsers: false`) fix the failure, open a new PR and then go back to step 7
352
359
  12. Remote verification: `verification-specialist` verifies in target environment (same checks as local verification, but on remote), and refreshes the verdict (step 2a) to reflect the remote result. Resolve credentials through the `verification-lifecycle` lookup order before declaring any missing. If they remain genuinely unavailable, do not complete on artifact-only evidence: post a tracker comment naming every credential source checked and what could not be verified as a result, transition the work item to the configured blocked state, and apply the configured `needs-human` / `human-review` label (creating it when the tracker supports label creation and it is missing). The comment is what makes the escalation auditable — a label alone records that something stopped, not what was tried or why. Evidence must explicitly distinguish `verified empirically` from `artifact-only / verification deferred`.
353
360
  13. `ops-specialist`: post-deploy health check via `lisa-monitor <env> --report-only`, monitor for errors in first minutes. `--report-only` is REQUIRED: it keeps the post-deploy check a pure health/audit report so monitor's standalone ticket-filing never fires inside this flow.
354
- 14. If remote verification fails, find out why, fix it and return to step 5. **Bound this loop**: after a small number of full fix→deploy→reverify cycles without reaching a passing remote verdict (treat ~3 as the ceiling unless the work item states otherwise), stop retrying — file a build-ready fix ticket, write the verdict with `status: "blocked"` and the diagnosis, and move the work item to blocked rather than looping indefinitely. The completion gate releases on a `blocked` verdict, so the flow ends with a recorded outcome instead of a silent spin or a self-declared success.
361
+ 13a. **Switched-off work** (the item's `## Release Switch` says `Switched off — <switch-name>`, in a project with live users): steps 12 and 13 verify it with the switch **on** in a non-production environment, or, in a project with one environment, locally or for a test account only. Read back that the switch is **off** in production and record that read as evidence; if you cannot read the production value, you cannot claim the work is dark, so treat it as missing access (`tool-access-gate`). Only the item that removes the switch turns the feature on, and only once the whole feature is verified: when the declaration names another item as the remover, verify this item's part and leave the switch off in production. For the removing item, once verification passes, first confirm that the version you verified is what production is running (the production deployment includes the feature's last merge), because turning the switch on over an earlier, incomplete version shows users unfinished work. Then turn the switch on in production yourself. No person is needed, unless `node scripts/lisa-release-switch.mjs config` reports `"turnOn": "human"` (the project lists `feature-release` in `humanGate.humanOnly`); then that one step is a declared human gate: post a plain-English comment saying the feature is verified and waiting to be turned on, and hold the item there with a human-gate reason that names the class, for example `feature-release: turn <switch-name> on in production` (a reason that does not name `feature-release` is refused as a decision the agent should make). If the same command lists a `humanGate.humanOnly` problem, the project's setting is malformed: report it and do not turn the feature on. Remove the switch only after it is on in production and healthy, in a follow-on change on the same work item (or the item the declaration names): never while verification is failing or the turn-on is still waiting at the human gate, because removing the guard keeps the enabled path. That removal change is verified differently: the switch is on, or already gone, so there is no "off in production" to read back. Verify instead that the feature works in production with the switch removed and that nothing still reads it. `lisa-work-item.mjs finish` refuses the removing item while tracked source still references the switch.
362
+ 14. If remote verification fails, find out why. **A change whose failure is live is reverted, not fixed forward** (`coding-philosophy`, "Always Promotable"). Judge that by what users can reach, not only by the declaration: the failure is live when the item's `## Release Switch` says `Live` (or it has none), and also when the item is switched off but the failure shows with the switch off (it broke existing behavior). In a project with live users, that change is on a shared branch that must stay promotable. Revert it at once: open a pull request that reverts the merged change, drive it to merge with `lisa-drive-pr-to-merge`, then return the work item to the ready queue with the failure evidence so the rework arrives as a fresh claim. Never leave the change in place while you fix it, and never hold a promotion for it. Write the verdict with `status: "blocked"`, marking each criterion the failure affects as `blocked` with the failure and the revert as its evidence, and end the flow there: the completion gate releases on a `blocked` verdict, and the rework is already back in the ready queue. Once the switch is on in production, every failure of the feature is live: turn the switch off again at once, which is the fastest way back, and revert the removal change if it has already shipped. **A failure that only shows with the switch on while the switch is still off in production, and any failure in a project that sets `release.liveUsers: false`, is fixed forward**: nothing users can reach is broken and nothing is blocked, so fix it and return to step 5. **Bound this loop**: after a small number of full fix→deploy→reverify cycles without reaching a passing remote verdict (treat ~3 as the ceiling unless the work item states otherwise), stop retrying — file a build-ready fix ticket, write the verdict with `status: "blocked"` and the diagnosis, and move the work item to blocked rather than looping indefinitely. The completion gate releases on a `blocked` verdict, so the flow ends with a recorded outcome instead of a silent spin or a self-declared success.
355
363
  15. **Post evidence to the originating work item** via `lisa-tracker-evidence` (vendor-neutral; dispatches to `lisa-jira-evidence`, `lisa-github-evidence`, or `lisa-linear-evidence` per `.lisa.config.json` `tracker`), including the list of codified tests added on this branch. **If the work is UI-visible** (any verification step ran in a browser, or the change touches a user-facing surface), author `evidence/comment.md` per the **UI Evidence Checklist** in `lisa-tracker-evidence` — numbered live-session steps, one screenshot per step captured through the interactive browser controller and uploaded to the configured GitHub evidence release (default `pr-assets`) as plain URLs, and an explicit invitation to be corrected. This step is what makes the proof visible to a non-technical operator standing at the gate; a terminal work item with no posted evidence is an incomplete flow, not a finished one.
356
364
  16. After true terminal completion — required merge/deploy/verification passed, usage/evidence and two-way PR linkage are recorded, and the work item is terminal (terminal completion is `lisa-work-item.mjs finish`, run by `lisa-drive-pr-to-merge` §3d) — run `node scripts/lisa-work-item.mjs clear`, delete the work-item context file (`rm -f .lisa/work-item-context.md` from the worktree root) so comment-borne secrets do not outlive the work, and verify the worktree has no current binding and no context file. Do not clear on an interruption or blocked outcome; preserving the binding is what keeps resumed work attributable.
357
365
 
@@ -19,6 +19,16 @@ cannot discharge a hold. Keep the item held and report the missing authorization
19
19
  replace these inputs with an empty history or an inferred allowlist. Authorized matching releases
20
20
  continue through the existing path and never override an independently declared caller hold.
21
21
 
22
+ One exception is opt-in. A project may name its automation account as a relay (`relay:<account id>`
23
+ in the list of who may release, in its committed settings and never on an instruction given in
24
+ conversation). That account's release then counts when it is the first line of the comment and
25
+ names, before the reason, a trusted person from the same list:
26
+ `[lisa-human-gate-release] relayed-for=<person id> reason=<slug>`. Put any explanation after it;
27
+ a copy that is quoted, in code, or further down the comment releases nothing. Post one only when a trusted person told you to release that hold, and say in the
28
+ comment who asked, where and when. When the project named no relay, do not post a release: tell the
29
+ person at once that it must come from their own tracker login, give them the exact text and a link
30
+ to the item, and never report the item as released (`ready-role-filing`, "Relayed releases").
31
+
22
32
 
23
33
  All Atlassian operations in this skill go through `lisa-atlassian-access`. Do not call MCP tools or `acli` directly.
24
34
 
@@ -140,6 +140,7 @@ Per-type content requirements are defined once in the vendor-neutral `work-item-
140
140
  | S19 Branch Plan derivation | `technical` | false |
141
141
  | S20 Named-control reachability | `acceptance-criteria` | true |
142
142
  | S21 Token estimate (ready time) | `technical` | false |
143
+ | S22 Release switch declaration | `technical` | false |
143
144
  | F1 Issue type valid in project | `structural` | false |
144
145
  | F2 Epic parent exists and is an Epic | `structural` | false |
145
146
  | F3 Linked tickets exist | `structural` | false |
@@ -416,6 +417,30 @@ Remediation: re-render the section with `node scripts/lisa-estimate.mjs render -
416
417
 
417
418
  `product_relevant: false` — the estimate is produced by agents, not by whoever wrote the item.
418
419
 
420
+ #### S22 — Release switch declaration
421
+
422
+ Enforces the always-promotable rule (`coding-philosophy`, "Always Promotable"): whatever is on a shared branch can be promoted to the next environment as it stands, so every ticket that changes runtime behavior says how it is safe to promote.
423
+
424
+ **When the gate applies.** On a leaf whose `## Target Backend Environment` names an environment (`runtime_behavior_change = true`, derived from the stored declaration exactly as S8 derives it), in a project with live users (`release.liveUsers` absent or `true`). `N/A` when that declaration is a `None —` form (no runtime behavior change, or a container), and whenever the project sets `release.liveUsers: false`; then nothing about release switches blocks.
425
+
426
+ **How to run it.** Write the body to a file and run `node scripts/lisa-release-switch.mjs check --body-file <file>` for a proposed spec, adding `--existing true` when the ticket already exists in the tracker. Report its verdict line and reasons verbatim: exit 0 is PASS or N/A, exit 1 is FAIL, exit 2 means the config or the call is broken, which fails the gate with the error.
427
+
428
+ **What it checks.** The body carries a `## Release Switch` section whose entire content is one line, in one of these forms:
429
+
430
+ ```text
431
+ Live — complete and proven at merge
432
+ Switched off — <switch-name>; removed by this item
433
+ Switched off — <switch-name>; removed by <work-item ref>
434
+ ```
435
+
436
+ A **proposed spec** with no section FAILs: `lisa-jira-write-ticket` renders it before the write. A **live legacy ticket** with no section is `N/A` with a repair note routed to claim time, the same asymmetry S8 and S19 use, because failing every existing ticket would turn a legacy queue red for a section nobody had a way to add. A section that **is** present FAILs, on a proposed spec and on a live ticket alike, when it is neither form: no switch name, no work item that removes the switch, a second line, or free text.
437
+
438
+ **Which form.** One question decides: if this were promoted to production right now, would a user see something unfinished or unproven? If no, the work is live. Bug fixes, small tweaks, copy changes, refactors and dependency updates almost always are, and this gate never asks for a switch on work that is complete and proven when it merges. If yes (a feature or a fix that lands across several merges, or new behavior that merges before its verification has passed), the work is switched off, and the declaration names the switch and the work item that removes it. The question decides, not the kind of work.
439
+
440
+ Remediation: render the section with `node scripts/lisa-release-switch.mjs render --mode live --body-file <file>`, or `--mode off --switch <name> --removed-by "this item"` (or a work-item ref), and write the result back. Decide the form from the item; never ask a person for it.
441
+
442
+ `product_relevant: false` — how work is made safe to promote is an engineering decision the agent makes, not a product question.
443
+
419
444
  ### Feasibility Gates (require JIRA lookups; skip in dry-run if requested)
420
445
 
421
446
  #### F1 — Issue type valid in project
@@ -506,6 +531,7 @@ Output is a single fenced text block. Callers parse it; do not add free-form pro
506
531
  - [PASS|FAIL|N/A] S19 Branch Plan derivation — <one-line reason>
507
532
  - [PASS|FAIL|N/A] S20 Named-control reachability — <one-line reason>
508
533
  - [PASS|FAIL|N/A] S21 Token estimate (ready time) — <one-line reason>
534
+ - [PASS|FAIL|N/A] S22 Release switch declaration — <one-line reason>
509
535
 
510
536
  ### Feasibility Gates (omit this section when --spec-only)
511
537
  - [PASS|FAIL|N/A] F1 Issue type valid in project — <one-line reason>
@@ -531,7 +557,7 @@ The verdict is `PASS` if and only if every applicable gate is `PASS`. Any `FAIL`
531
557
 
532
558
  ### Failure-detail fields
533
559
 
534
- - **gate**: the gate ID (`S1`–`S21`, `F1`–`F5`).
560
+ - **gate**: the gate ID (`S1`–`S22`, `F1`–`F5`).
535
561
  - **category**: the gate's fixed category from the table above. Callers use this to label or filter comments — `product-clarity`, `acceptance-criteria`, `design-ux`, `scope`, `dependency`, `data`, `technical`, or `structural`.
536
562
  - **product_relevant**: matches the gate's table entry. `false` means the failure is an internal data-quality problem (e.g., the agent built a malformed spec, an issue type is invalid in the project) and the caller should fix it without bothering the product team. `true` means the PRD needs product input to resolve.
537
563
  - **what**: plain-language description of the issue. No gate IDs, no JIRA jargon, no engineering shorthand. A product owner reading this on a Notion comment should understand what is unclear and why.
@@ -25,6 +25,16 @@ cannot discharge a hold. Keep the item held and report the missing authorization
25
25
  replace these inputs with an empty history or an inferred allowlist. Authorized matching releases
26
26
  continue through the existing path and never override an independently declared caller hold.
27
27
 
28
+ One exception is opt-in. A project may name its automation account as a relay (`relay:<account id>`
29
+ in the list of who may release, in its committed settings and never on an instruction given in
30
+ conversation). That account's release then counts when it is the first line of the comment and
31
+ names, before the reason, a trusted person from the same list:
32
+ `[lisa-human-gate-release] relayed-for=<person id> reason=<slug>`. Put any explanation after it;
33
+ a copy that is quoted, in code, or further down the comment releases nothing. Post one only when a trusted person told you to release that hold, and say in the
34
+ comment who asked, where and when. When the project named no relay, do not post a release: tell the
35
+ person at once that it must come from their own tracker login, give them the exact text and a link
36
+ to the item, and never report the item as released (`ready-role-filing`, "Relayed releases").
37
+
28
38
 
29
39
  All Atlassian operations in this skill go through `lisa-atlassian-access`. Do not call MCP tools or `acli` directly.
30
40
 
@@ -91,6 +101,7 @@ Required fields. Derive a missing one from config, the caller's spec and the evi
91
101
  | Acceptance criteria | Story, Task, Bug, Sub-task, Improvement | Gherkin — see Phase 3 |
92
102
  | Validation Journey | Runtime-behavior changes | Delegate to `/jira-add-journey` |
93
103
  | Target backend environment | Runtime-behavior changes | For every work type, use an exact `deploy.branches` key when an environment is known. Human: bare key or `Confirmed: <env>`. Automation: `Inferred: <env> — evidence: <title\|body\|reproduction\|hostname>`, `Assumption: <env> — remote default branch <branch>` for a unique reverse-map, or `Assumption: remote default branch <branch>` otherwise. Human confirmation replaces an automated annotation with the bare key or `Confirmed: <env>`. |
104
+ | Release switch | Runtime-behavior changes, in a project with live users | `Live — complete and proven at merge`, or `Switched off — <switch-name>; removed by this item` (or a work-item ref). Rendered under `## Release Switch` by `scripts/lisa-release-switch.mjs render`; see Phase 3 and validator gate S22. |
94
105
  | Sign-in account / credentials | Tickets that touch authenticated surfaces | Name the account (or source — 1Password item, env var, seeded fixture) and role; recorded in description (Phase 3). Omit when sign-in is not required. |
95
106
  | Single-repo scope | Bug, Task, Sub-task, Improvement | These leaf work units MUST cover one repo only. If the work crosses repos, split it before creating. Epic / Spike / Story may span repos. |
96
107
  | Source Requirement | PRD-sourced tickets (`prd_source` provided) | `h2. Source Requirement` with PRD link + verbatim requirement quote(s) — see Phase 3; enforced at every level, sub-tasks included |
@@ -176,6 +187,28 @@ h2. Branch Plan
176
187
  non-unique mapping, or a branch absent from the remote, STOPS the write —
177
188
  never default to `main` or the remote default to keep the write alive.]
178
189
 
190
+ h2. Release Switch
191
+ [GENERATED by `node scripts/lisa-release-switch.mjs render`, exactly one line.
192
+ Render it on every leaf that has a Target Backend Environment, in a project
193
+ with live users (`release.liveUsers` absent or `true`); omit it entirely when
194
+ `runtime_behavior_change = false`, for an Epic/container, or when the project
195
+ sets `release.liveUsers: false`. It says how the work is safe to promote
196
+ (`coding-philosophy`, "Always Promotable"; validator gate S22):
197
+ Live — complete and proven at merge
198
+ Switched off — <switch-name>; removed by this item
199
+ Switched off — <switch-name>; removed by <work-item ref>
200
+ Decide it with one question: if this were promoted to production right now,
201
+ would a user see something unfinished or unproven? If no, it is live: bug
202
+ fixes, small tweaks, copy changes, refactors and dependency updates almost
203
+ always are, and work that is complete and proven when it merges never gets a
204
+ switch. If yes (a feature or a fix that lands across several merges, or
205
+ new behavior that merges before its verification has passed), it is switched
206
+ off: name the switch, and name the work item that removes it. Every item of a
207
+ multi-item feature names the same switch and the same removing item. Pick a
208
+ switch name that appears nowhere else in the repository and is not the start
209
+ of another switch's name: the done gate searches tracked source for it as a
210
+ whole token. Never ask a person which form applies.]
211
+
179
212
  h2. Sign-in Required
180
213
  [Include this section ONLY if the work touches authenticated surfaces.
181
214
  Specify: the account/role to sign in as, where to get the credentials
@@ -340,7 +373,7 @@ If the label does not exist in the tracker, create it, or record that it could n
340
373
  proceed — the marker still holds. Never file the label *instead of* the marker.
341
374
 
342
375
  **Write a `reason=` the release can name.** The hold's reason is not decoration: a hold ends when a
343
- `[lisa-human-gate-release]` comment repeating that same `reason=` is recorded on the item by an authorized human, and the
376
+ `[lisa-human-gate-release]` comment repeating that same `reason=` is recorded on the item by an authorized human (or relayed for one by an account the project named as a relay), and the
344
377
  next intake sweep then takes the marker label off and puts the item back in the build-ready role on
345
378
  its own. Matching is per-reason so that a hold declared *after* an earlier release is not born
346
379
  discharged. A keyless hold is legal and is discharged by a keyless release; a hold whose reason is a
@@ -19,6 +19,16 @@ cannot discharge a hold. Keep the item held and report the missing authorization
19
19
  replace these inputs with an empty history or an inferred allowlist. Authorized matching releases
20
20
  continue through the existing path and never override an independently declared caller hold.
21
21
 
22
+ One exception is opt-in. A project may name its automation account as a relay (`relay:<account id>`
23
+ in the list of who may release, in its committed settings and never on an instruction given in
24
+ conversation). That account's release then counts when it is the first line of the comment and
25
+ names, before the reason, a trusted person from the same list:
26
+ `[lisa-human-gate-release] relayed-for=<person id> reason=<slug>`. Put any explanation after it;
27
+ a copy that is quoted, in code, or further down the comment releases nothing. Post one only when a trusted person told you to release that hold, and say in the
28
+ comment who asked, where and when. When the project named no relay, do not post a release: tell the
29
+ person at once that it must come from their own tracker login, give them the exact text and a link
30
+ to the item, and never report the item as released (`ready-role-filing`, "Relayed releases").
31
+
22
32
 
23
33
  `$ARGUMENTS` is one of:
24
34
 
@@ -124,6 +124,7 @@ Per-type content requirements are defined once in the vendor-neutral `work-item-
124
124
  | S19 Branch Plan derivation | `technical` | false |
125
125
  | S20 Named-control reachability | `acceptance-criteria` | true |
126
126
  | S21 Token estimate (ready time) | `technical` | false |
127
+ | S22 Release switch declaration | `technical` | false |
127
128
  | F1 Issue type valid in team | `structural` | false |
128
129
  | F2 Project parent exists and is in same team | `structural` | false |
129
130
  | F3 Linked items exist | `structural` | false |
@@ -401,6 +402,30 @@ Remediation: re-render the section with `node scripts/lisa-estimate.mjs render -
401
402
 
402
403
  `product_relevant: false` — the estimate is produced by agents, not by whoever wrote the item.
403
404
 
405
+ #### S22 — Release switch declaration
406
+
407
+ Enforces the always-promotable rule (`coding-philosophy`, "Always Promotable"): whatever is on a shared branch can be promoted to the next environment as it stands, so every issue that changes runtime behavior says how it is safe to promote.
408
+
409
+ **When the gate applies.** On a leaf whose `## Target Backend Environment` names an environment (`runtime_behavior_change = true`, derived from the stored declaration exactly as S8 derives it), in a project with live users (`release.liveUsers` absent or `true`). `N/A` when that declaration is a `None —` form (no runtime behavior change, or a container), and whenever the project sets `release.liveUsers: false`; then nothing about release switches blocks.
410
+
411
+ **How to run it.** Write the body to a file and run `node scripts/lisa-release-switch.mjs check --body-file <file>` for a proposed spec, adding `--existing true` when the issue already exists in the tracker. Report its verdict line and reasons verbatim: exit 0 is PASS or N/A, exit 1 is FAIL, exit 2 means the config or the call is broken, which fails the gate with the error.
412
+
413
+ **What it checks.** The body carries a `## Release Switch` section whose entire content is one line, in one of these forms:
414
+
415
+ ```text
416
+ Live — complete and proven at merge
417
+ Switched off — <switch-name>; removed by this item
418
+ Switched off — <switch-name>; removed by <work-item ref>
419
+ ```
420
+
421
+ A **proposed spec** with no section FAILs: `lisa-linear-write-issue` renders it before the write. A **live legacy issue** with no section is `N/A` with a repair note routed to claim time, the same asymmetry S8 and S19 use, because failing every existing issue would turn a legacy queue red for a section nobody had a way to add. A section that **is** present FAILs, on a proposed spec and on a live issue alike, when it is neither form: no switch name, no work item that removes the switch, a second line, or free text.
422
+
423
+ **Which form.** One question decides: if this were promoted to production right now, would a user see something unfinished or unproven? If no, the work is live. Bug fixes, small tweaks, copy changes, refactors and dependency updates almost always are, and this gate never asks for a switch on work that is complete and proven when it merges. If yes (a feature or a fix that lands across several merges, or new behavior that merges before its verification has passed), the work is switched off, and the declaration names the switch and the work item that removes it. The question decides, not the kind of work.
424
+
425
+ Remediation: render the section with `node scripts/lisa-release-switch.mjs render --mode live --body-file <file>`, or `--mode off --switch <name> --removed-by "this item"` (or a work-item ref), and write the result back. Decide the form from the item; never ask a person for it.
426
+
427
+ `product_relevant: false` — how work is made safe to promote is an engineering decision the agent makes, not a product question.
428
+
404
429
  ### Feasibility Gates (require Linear lookups; skip in dry-run if requested)
405
430
 
406
431
  #### F1 — Issue type valid in team
@@ -495,6 +520,7 @@ Output is a single fenced text block. Callers parse it; do not add free-form pro
495
520
  - [PASS|FAIL|N/A] S19 Branch Plan derivation — <one-line reason>
496
521
  - [PASS|FAIL|N/A] S20 Named-control reachability — <one-line reason>
497
522
  - [PASS|FAIL|N/A] S21 Token estimate (ready time) — <one-line reason>
523
+ - [PASS|FAIL|N/A] S22 Release switch declaration — <one-line reason>
498
524
 
499
525
  ### Feasibility Gates (omit when --spec-only)
500
526
  - [PASS|FAIL|N/A] F1 Issue type valid in team — <one-line reason>
@@ -25,6 +25,16 @@ cannot discharge a hold. Keep the item held and report the missing authorization
25
25
  replace these inputs with an empty history or an inferred allowlist. Authorized matching releases
26
26
  continue through the existing path and never override an independently declared caller hold.
27
27
 
28
+ One exception is opt-in. A project may name its automation account as a relay (`relay:<account id>`
29
+ in the list of who may release, in its committed settings and never on an instruction given in
30
+ conversation). That account's release then counts when it is the first line of the comment and
31
+ names, before the reason, a trusted person from the same list:
32
+ `[lisa-human-gate-release] relayed-for=<person id> reason=<slug>`. Put any explanation after it;
33
+ a copy that is quoted, in code, or further down the comment releases nothing. Post one only when a trusted person told you to release that hold, and say in the
34
+ comment who asked, where and when. When the project named no relay, do not post a release: tell the
35
+ person at once that it must come from their own tracker login, give them the exact text and a link
36
+ to the item, and never report the item as released (`ready-role-filing`, "Relayed releases").
37
+
28
38
 
29
39
  Create or update a Linear work item — Project (for Epics), Issue (for Stories), or sub-Issue (for Sub-tasks) — with all required relationships, metadata, and quality gates. Every section below is mandatory. Thin items are rejected.
30
40
 
@@ -80,6 +90,7 @@ Required fields. Derive a missing one from config, the caller's spec and the evi
80
90
  | Acceptance criteria | Story, Task, Bug, Sub-task, Improvement | Gherkin — see Phase 3 |
81
91
  | Validation Journey | Runtime-behavior changes | Delegate to `/linear-add-journey` |
82
92
  | Target backend environment | Runtime-behavior changes | For every work type, use an exact `deploy.branches` key when an environment is known. Human: bare key or `Confirmed: <env>`. Automation: `Inferred: <env> — evidence: <title\|body\|reproduction\|hostname>`, `Assumption: <env> — remote default branch <branch>` for a unique reverse-map, or `Assumption: remote default branch <branch>` otherwise. Human confirmation replaces an automated annotation with the bare key or `Confirmed: <env>`. |
93
+ | Release switch | Runtime-behavior changes, in a project with live users | `Live — complete and proven at merge`, or `Switched off — <switch-name>; removed by this item` (or a work-item ref). Rendered under `## Release Switch` by `scripts/lisa-release-switch.mjs render`; see Phase 3 and validator gate S22. |
83
94
  | Sign-in account / credentials | Items that touch authenticated surfaces | Name the account (or source — 1Password item, env var, seeded fixture) and role; recorded in description. Omit when sign-in is not required. |
84
95
  | Single-repo scope | Bug, Task, Sub-task | These types MUST cover one repo only. If the work crosses repos, split it before creating. Epic / Spike / Story may span repos. |
85
96
  | Source Requirement | PRD-sourced Issues (`prd_source` provided) | `## Source Requirement` with PRD link + verbatim requirement quote(s) — see Phase 3; enforced at every level, sub-issues included. |
@@ -166,6 +177,28 @@ Linear descriptions are markdown (NOT Jira wiki markup — no `h2.` headings, us
166
177
  non-unique mapping, or a branch absent from the remote, STOPS the write —
167
178
  never default to `main` or the remote default to keep the write alive.]
168
179
 
180
+ ## Release Switch
181
+ [GENERATED by `node scripts/lisa-release-switch.mjs render`, exactly one line.
182
+ Render it on every leaf that has a Target Backend Environment, in a project
183
+ with live users (`release.liveUsers` absent or `true`); omit it entirely when
184
+ `runtime_behavior_change = false`, for an Epic/container, or when the project
185
+ sets `release.liveUsers: false`. It says how the work is safe to promote
186
+ (`coding-philosophy`, "Always Promotable"; validator gate S22):
187
+ Live — complete and proven at merge
188
+ Switched off — <switch-name>; removed by this item
189
+ Switched off — <switch-name>; removed by <work-item ref>
190
+ Decide it with one question: if this were promoted to production right now,
191
+ would a user see something unfinished or unproven? If no, it is live: bug
192
+ fixes, small tweaks, copy changes, refactors and dependency updates almost
193
+ always are, and work that is complete and proven when it merges never gets a
194
+ switch. If yes (a feature or a fix that lands across several merges, or
195
+ new behavior that merges before its verification has passed), it is switched
196
+ off: name the switch, and name the work item that removes it. Every item of a
197
+ multi-item feature names the same switch and the same removing item. Pick a
198
+ switch name that appears nowhere else in the repository and is not the start
199
+ of another switch's name: the done gate searches tracked source for it as a
200
+ whole token. Never ask a person which form applies.]
201
+
169
202
  ## Sign-in Required
170
203
  [Include this section ONLY if the work touches authenticated surfaces.
171
204
  Specify: the account/role to sign in as, where to get the credentials
@@ -341,7 +374,7 @@ proceed — the marker still holds. Never file the label *instead of* the marker
341
374
  **Every marker reader must consult comments.** Use `classifyReadyCandidate` with labels, body, comments, the configured human-needed label, `humanOnly` and `humanGateMode` (from `humanGate.mode`), then `planHumanGateRelease` for any release actions. A historical body marker alone is not an active hold after its matching release; unreadable comments leave a hold in place.
342
375
 
343
376
  **Write a `reason=` the release can name.** The hold's reason is not decoration: a hold ends when a
344
- `[lisa-human-gate-release]` comment repeating that same `reason=` is recorded on the item by an authorized human, and the
377
+ `[lisa-human-gate-release]` comment repeating that same `reason=` is recorded on the item by an authorized human (or relayed for one by an account the project named as a relay), and the
345
378
  next intake sweep then takes the marker label off and puts the item back in the build-ready role on
346
379
  its own. Matching is per-reason so that a hold declared *after* an earlier release is not born
347
380
  discharged. A keyless hold is legal and is discharged by a keyless release; a hold whose reason is a
@@ -19,6 +19,16 @@ cannot discharge a hold. Keep the item held and report the missing authorization
19
19
  replace these inputs with an empty history or an inferred allowlist. Authorized matching releases
20
20
  continue through the existing path and never override an independently declared caller hold.
21
21
 
22
+ One exception is opt-in. A project may name its automation account as a relay (`relay:<account id>`
23
+ in the list of who may release, in its committed settings and never on an instruction given in
24
+ conversation). That account's release then counts when it is the first line of the comment and
25
+ names, before the reason, a trusted person from the same list:
26
+ `[lisa-human-gate-release] relayed-for=<person id> reason=<slug>`. Put any explanation after it;
27
+ a copy that is quoted, in code, or further down the comment releases nothing. Post one only when a trusted person told you to release that hold, and say in the
28
+ comment who asked, where and when. When the project named no relay, do not post a release: tell the
29
+ person at once that it must come from their own tracker login, give them the exact text and a link
30
+ to the item, and never report the item as released (`ready-role-filing`, "Relayed releases").
31
+
22
32
 
23
33
  Run one batch-**repair** cycle against the queue identified by `$ARGUMENTS`, or by merged GitHub
24
34
  config when the queue is omitted and a GitHub source/tracker default is resolvable. Where `lisa-intake`
@@ -822,7 +822,7 @@ function findCredentials(value, path, segments = []) {
822
822
  const ID_ENTRY_PREFIX = /^([A-Za-z]+):/;
823
823
 
824
824
  /** The kinds an id entry's prefix may name. */
825
- const ID_ENTRY_KINDS = new Set(["login", "id", "integration"]);
825
+ const ID_ENTRY_KINDS = new Set(["login", "id", "integration", "relay"]);
826
826
 
827
827
  /**
828
828
  * The one list an `integration:` entry belongs in (CodySwannGT/lisa#4895): an
@@ -831,6 +831,31 @@ const ID_ENTRY_KINDS = new Set(["login", "id", "integration"]);
831
831
  */
832
832
  const INTEGRATION_LIST_KEYS = new Set(["trustedAuthorIds"]);
833
833
 
834
+ /**
835
+ * The one list a `relay:` entry belongs in (CodySwannGT/lisa#5190): an
836
+ * automation account that may relay a trusted person's hold release. It is not
837
+ * a person, so it can never be an operator or a trusted author.
838
+ */
839
+ const RELAY_LIST_KEYS = new Set(["trustedReleaseIds"]);
840
+
841
+ /**
842
+ * Whether an entry that is not written as `relay:<id>` would still be read as
843
+ * one by the hold-release check, which trims a value and looks at how it
844
+ * starts: `id:relay:9`, ` relay:9`, `login: relay:9`. Refused wherever it
845
+ * appears, so a relay can only ever be named in the one list that allows it.
846
+ * @param {string} entry A configured entry.
847
+ * @returns {boolean} Whether the entry hides a relay.
848
+ */
849
+ function hidesRelay(entry) {
850
+ const lower = entry.trim().toLowerCase();
851
+ const bare = ["id:", "login:", "integration:"].reduce(
852
+ (text, prefix) =>
853
+ text.startsWith(prefix) ? text.slice(prefix.length).trim() : text,
854
+ lower
855
+ );
856
+ return bare.startsWith("relay:") && !/^relay:\S/u.test(entry);
857
+ }
858
+
834
859
  /** Letters-and-colon starts of real tracker ids (JSM customers' `qm:`). */
835
860
  const PLAIN_ID_STARTS = new Set(["qm"]);
836
861
 
@@ -847,7 +872,7 @@ const ALL_DIGIT_ENTRY = /^\d+$/;
847
872
  * (CodySwannGT/lisa#4895), and an entry with no letters-only prefix is plain (a Jira accountId such as
848
873
  * `557058:<uuid>` or `qm:<id>` included).
849
874
  * @param {string} entry One entry.
850
- * @returns {"login" | "id" | "integration" | "plain" | "unknown-prefix" | "empty-value"} Kind.
875
+ * @returns {"login" | "id" | "integration" | "relay" | "plain" | "unknown-prefix" | "empty-value"} Kind.
851
876
  */
852
877
  export function classifyIdEntry(entry) {
853
878
  const prefix = ID_ENTRY_PREFIX.exec(entry)?.[1];
@@ -924,7 +949,8 @@ function idEntryProblems(key, ids) {
924
949
  `${path} has an ` +
925
950
  `unknown prefix ${JSON.stringify(prefix)}. Use login:<GitHub ` +
926
951
  `login>, id:<numeric or tracker account id>, ` +
927
- `integration:<service> (trustedAuthorIds only), or a plain id; ` +
952
+ `integration:<service> (trustedAuthorIds only), relay:<account id> ` +
953
+ `(trustedReleaseIds only), or a plain id; ` +
928
954
  `write a tracker id that itself starts with letters and a colon ` +
929
955
  `as id:<that id>.`,
930
956
  ];
@@ -937,6 +963,24 @@ function idEntryProblems(key, ids) {
937
963
  `operator, answer a question, or release a human hold.`,
938
964
  ];
939
965
  }
966
+ if (kind !== "relay" && kind !== "empty-value" && hidesRelay(entry)) {
967
+ return [
968
+ `${path} reads as a relay: entry written another way (behind ` +
969
+ `another prefix, or with a space in front). Write a relay exactly ` +
970
+ `as relay:<account id>, and only in ` +
971
+ `sessionManager.trustedReleaseIds; no person's account id starts ` +
972
+ `with "relay:".`,
973
+ ];
974
+ }
975
+ if (kind === "relay" && !RELAY_LIST_KEYS.has(key)) {
976
+ return [
977
+ `${path} is a relay: entry, which belongs only in ` +
978
+ `sessionManager.trustedReleaseIds. A relay is the automation ` +
979
+ `account allowed to post a hold release that a trusted person ` +
980
+ `asked for. It is not a person, so it can never be an operator, ` +
981
+ `author dispatched work, or answer a question.`,
982
+ ];
983
+ }
940
984
  return kind === "empty-value"
941
985
  ? [
942
986
  `${path} has an empty value after ${JSON.stringify(prefixOf(entry))}: name the ` +
@@ -1038,7 +1082,53 @@ function validateTrustList(key, ids, emptyProblem) {
1038
1082
  `Linear user id), not logins or display names.`,
1039
1083
  ];
1040
1084
  }
1041
- return ids.length === 0 ? [emptyProblem] : idEntryProblems(key, ids);
1085
+ if (ids.length === 0) return [emptyProblem];
1086
+ return [
1087
+ ...idEntryProblems(key, ids),
1088
+ ...relayWithoutPersonProblems(key, ids),
1089
+ ];
1090
+ }
1091
+
1092
+ /**
1093
+ * A release list that names a relay and no person releases nothing: a relayed
1094
+ * release must name a trusted person from the same list, and there is none.
1095
+ * Reported, because the project clearly meant to let its agent relay releases
1096
+ * and nothing would tell it why none ever counts.
1097
+ * @param {string} key The list's key.
1098
+ * @param {readonly string[]} ids Entries, already known to be strings.
1099
+ * @returns {string[]} Problems found.
1100
+ */
1101
+ function relayWithoutPersonProblems(key, ids) {
1102
+ if (!RELAY_LIST_KEYS.has(key)) return [];
1103
+ const kinds = ids.map(classifyIdEntry);
1104
+ if (!kinds.includes("relay")) return [];
1105
+ const valueAt = i => ids[i].slice(ids[i].indexOf(":") + 1).trim();
1106
+ const relays = new Set(
1107
+ kinds.flatMap((kind, i) => (kind === "relay" ? [valueAt(i)] : []))
1108
+ );
1109
+ const people = kinds.flatMap((kind, i) => {
1110
+ if (kind === "plain") return [{ i, value: ids[i].trim() }];
1111
+ return kind === "id" ? [{ i, value: valueAt(i) }] : [];
1112
+ });
1113
+ const both = people.filter(person => relays.has(person.value));
1114
+ return [
1115
+ ...(people.length === 0
1116
+ ? [
1117
+ `sessionManager.${key} names a relay but no person by account id. A ` +
1118
+ `relay can only post a release that a trusted person asked for, ` +
1119
+ `and that person must be in this list too, as id:<account id> or ` +
1120
+ `a plain id (a login: entry is not enough, because releases are ` +
1121
+ `matched on account ids). Add the people who may release a hold.`,
1122
+ ]
1123
+ : []),
1124
+ ...both.map(
1125
+ person =>
1126
+ `sessionManager.${key}[${person.i}] names the same account as a ` +
1127
+ `person and as a relay. An account is one or the other: a relay ` +
1128
+ `carries a person's decision and can never be the person who made ` +
1129
+ `it. Remove one of the two entries.`
1130
+ ),
1131
+ ];
1042
1132
  }
1043
1133
 
1044
1134
  /**
@@ -156,6 +156,17 @@ the manager.
156
156
  no hold is released.
157
157
  Removing `trustedAuthorIds` to dispatch integration-filed items would also remove every hold
158
158
  releaser; add `integration:<service>` instead.
159
+ - **A release the operator gives you, not the item.** When the operator tells you (with `answer`,
160
+ on Telegram, or in the session) to release a held item, check `sessionManager.trustedReleaseIds`
161
+ for a `relay:<id>` entry naming the account you post from (in the committed `.lisa.config.json`;
162
+ one in the local override alone is ignored). With one, post
163
+ `[lisa-human-gate-release] relayed-for=<the operator's account id> reason=<the hold's slug>`
164
+ (leaving `reason=` out for a hold that names no reason) through `lisa-tracker-write` as the
165
+ first line of the comment, then a plain-English line saying
166
+ who asked, where and when; the operator must be in the same list by account id. With none, post nothing: tell the operator the
167
+ release has to come from their own tracker login, and give the exact line and a link to the item.
168
+ Never say an item was released until `queue` or `blocked-plan` reads it as released
169
+ (`ready-role-filing`, "Relayed releases").
159
170
 
160
171
  ## Questions and notifications
161
172
 
@@ -12,7 +12,7 @@ import {
12
12
  recordAutomationRun,
13
13
  } from "../../../scripts/automation-run-record.mjs";
14
14
  import { resolveHumanGatePolicy } from "../../../scripts/human-gate-act.mjs";
15
- import { idComparableValues } from "../../../scripts/operator-id-kinds.mjs";
15
+ import { releaseComparableValues } from "../../../scripts/operator-id-kinds.mjs";
16
16
  import {
17
17
  CliError,
18
18
  EXIT,
@@ -275,8 +275,8 @@ export async function blockedPlan(ctx) {
275
275
  input.pendingQuestion ??
276
276
  (ref ? (await readLedger(ctx.root)).items[ref]?.pendingQuestion : null);
277
277
  const project = loadProject(ctx.root);
278
- const trustedHumanActorIds = idComparableValues(
279
- trustedReleaseEntries(project.config)
278
+ const trustedHumanActorIds = releaseComparableValues(
279
+ trustedReleaseEntries(project.config, project.global?.sessionManager)
280
280
  );
281
281
  const policy = resolveHumanGatePolicy(project.local, project.global);
282
282
  return {
@@ -159,7 +159,9 @@ function allowedAnswerers(config) {
159
159
  // it would tell the operator to reply on the item when no reply is read.
160
160
  return [...(config?.operatorIds ?? []), ...trustedReleaseEntries(config)]
161
161
  .map(String)
162
- .filter(entry => parseIdEntry(entry)?.kind !== "integration");
162
+ .filter(
163
+ entry => !["integration", "relay"].includes(parseIdEntry(entry)?.kind)
164
+ );
163
165
  }
164
166
 
165
167
  /** Why nothing is read off the item when nobody may answer there. */
@@ -166,7 +166,10 @@ export async function orphanPlan(ctx) {
166
166
  me: ledger.control.me ?? null,
167
167
  operatorIds: config?.operatorIds ?? [],
168
168
  // The sweep uses this list only to judge hold releases (#4895).
169
- trustedAuthorIds: trustedReleaseEntries(config),
169
+ trustedAuthorIds: trustedReleaseEntries(
170
+ config,
171
+ project.global?.sessionManager
172
+ ),
170
173
  now: new Date(),
171
174
  ...(max === undefined ? {} : { max }),
172
175
  // An explicit --stale-hours wins; otherwise the project's
@@ -30,7 +30,7 @@
30
30
  * @module session-manager/cli-queue
31
31
  */
32
32
  import {
33
- adfText,
33
+ adfCommentText,
34
34
  assertPagedToCompletion,
35
35
  normalizeJiraIssue,
36
36
  normalizeLinearIssue,
@@ -45,7 +45,7 @@ import {
45
45
  validOrAbsent,
46
46
  } from "./cli-runtime.mjs";
47
47
  import { resolveHumanGatePolicy } from "../../../scripts/human-gate-act.mjs";
48
- import { idComparableValues } from "../../../scripts/operator-id-kinds.mjs";
48
+ import { releaseComparableValues } from "../../../scripts/operator-id-kinds.mjs";
49
49
  import { commentsOf } from "../../../scripts/stale-blocker-comment.mjs";
50
50
  import {
51
51
  landedDoneRoles,
@@ -264,7 +264,10 @@ export async function queue(ctx) {
264
264
  // Resolved local-then-global like `human-gate-act.mjs policy`, so a hold
265
265
  // the project's mode keeps is never dispatched as Ready work (#4687).
266
266
  const gatePolicy = resolveHumanGatePolicy(project.local, project.global);
267
- const releasers = trustedReleaseEntries(config);
267
+ const releasers = trustedReleaseEntries(
268
+ config,
269
+ project.global?.sessionManager
270
+ );
268
271
  const policy = {
269
272
  me,
270
273
  operators,
@@ -272,13 +275,13 @@ export async function queue(ctx) {
272
275
  trustedHumanActorIds:
273
276
  tracker === "github"
274
277
  ? githubReleaserIds(ctx, releasers)
275
- : idComparableValues(releasers),
278
+ : releaseComparableValues(releasers),
276
279
  commentsFor:
277
280
  tracker === "github"
278
281
  ? ref => readIssueComments(ctx, ref)
279
282
  : ref =>
280
283
  commentsOf(rawByRef?.get(ref) ?? backlog?.rawByRef?.get(ref)).map(
281
- comment => ({ ...comment, body: adfText(comment.body) })
284
+ comment => ({ ...comment, body: adfCommentText(comment.body) })
282
285
  ),
283
286
  humanNeededLabel: humanNeededLabel(project, tracker),
284
287
  humanOnly: gatePolicy.humanOnly,