@codyswann/lisa 4.88.0 → 4.88.2

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 (233) hide show
  1. package/all/copy-overwrite/scripts/lisa-hooks/block-direct-issue-create.sh +13 -9
  2. package/all/copy-overwrite/scripts/lisa-hooks/parity-safety-net.sh +150 -37
  3. package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +1 -1
  4. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  5. package/dist/core/lisa-owned-hash-ledger.js +24 -0
  6. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  7. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  8. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  9. package/dist/core/upstream-evidence-manifest.js +42 -24
  10. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  11. package/dist/opencode/plugin-templates/lisa-block-direct-issue-create.ts +5 -2
  12. package/dist/opencode/plugin-templates/parity-safety-net.sh +150 -37
  13. package/package.json +4 -4
  14. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  15. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  16. package/plugins/lisa/.codex-plugin/skills/lisa-agent-ready/SKILL.md +2 -2
  17. package/plugins/lisa/.codex-plugin/skills/lisa-github-build-intake/SKILL.md +21 -3
  18. package/plugins/lisa/.codex-plugin/skills/lisa-github-create/SKILL.md +1 -1
  19. package/plugins/lisa/.codex-plugin/skills/lisa-github-write-issue/SKILL.md +10 -2
  20. package/plugins/lisa/.codex-plugin/skills/lisa-jira-build-intake/SKILL.md +21 -3
  21. package/plugins/lisa/.codex-plugin/skills/lisa-jira-create/SKILL.md +1 -1
  22. package/plugins/lisa/.codex-plugin/skills/lisa-jira-write-ticket/SKILL.md +10 -2
  23. package/plugins/lisa/.codex-plugin/skills/lisa-linear-build-intake/SKILL.md +22 -4
  24. package/plugins/lisa/.codex-plugin/skills/lisa-linear-create/SKILL.md +1 -1
  25. package/plugins/lisa/.codex-plugin/skills/lisa-linear-write-issue/SKILL.md +10 -2
  26. package/plugins/lisa/.codex-plugin/skills/lisa-repair-intake/SKILL.md +29 -2
  27. package/plugins/lisa/.codex-plugin/skills/lisa-track/SKILL.md +5 -5
  28. package/plugins/lisa/.codex-plugin/skills/lisa-tracker-build-intake/SKILL.md +6 -0
  29. package/plugins/lisa/.codex-plugin/skills/lisa-tracker-create/SKILL.md +1 -1
  30. package/plugins/lisa/.codex-plugin/skills/lisa-tracker-write/SKILL.md +1 -1
  31. package/plugins/lisa/hooks/block-direct-issue-create.sh +13 -9
  32. package/plugins/lisa/hooks/parity-safety-net.sh +150 -37
  33. package/plugins/lisa/rules/reference/automation-runbook-contract.md +3 -2
  34. package/plugins/lisa/rules/reference/config-resolution.md +1 -0
  35. package/plugins/lisa/rules/reference/ready-role-filing.md +56 -5
  36. package/plugins/lisa/scripts/human-gate-act.mjs +182 -0
  37. package/plugins/lisa/scripts/human-gate-lift.mjs +141 -0
  38. package/plugins/lisa/scripts/intake-blocker-reprobe.mjs +319 -5
  39. package/plugins/lisa/skills/lisa-agent-ready/SKILL.md +2 -2
  40. package/plugins/lisa/skills/lisa-github-build-intake/SKILL.md +21 -3
  41. package/plugins/lisa/skills/lisa-github-create/SKILL.md +1 -1
  42. package/plugins/lisa/skills/lisa-github-write-issue/SKILL.md +10 -2
  43. package/plugins/lisa/skills/lisa-jira-build-intake/SKILL.md +21 -3
  44. package/plugins/lisa/skills/lisa-jira-create/SKILL.md +1 -1
  45. package/plugins/lisa/skills/lisa-jira-write-ticket/SKILL.md +10 -2
  46. package/plugins/lisa/skills/lisa-linear-build-intake/SKILL.md +22 -4
  47. package/plugins/lisa/skills/lisa-linear-create/SKILL.md +1 -1
  48. package/plugins/lisa/skills/lisa-linear-write-issue/SKILL.md +10 -2
  49. package/plugins/lisa/skills/lisa-repair-intake/SKILL.md +29 -2
  50. package/plugins/lisa/skills/lisa-track/SKILL.md +5 -5
  51. package/plugins/lisa/skills/lisa-tracker-build-intake/SKILL.md +6 -0
  52. package/plugins/lisa/skills/lisa-tracker-create/SKILL.md +1 -1
  53. package/plugins/lisa/skills/lisa-tracker-write/SKILL.md +1 -1
  54. package/plugins/lisa-agy/hooks/block-direct-issue-create.sh +13 -9
  55. package/plugins/lisa-agy/hooks/parity-safety-net.sh +150 -37
  56. package/plugins/lisa-agy/plugin.json +1 -1
  57. package/plugins/lisa-agy/scripts/human-gate-act.mjs +182 -0
  58. package/plugins/lisa-agy/scripts/human-gate-lift.mjs +141 -0
  59. package/plugins/lisa-agy/scripts/intake-blocker-reprobe.mjs +319 -5
  60. package/plugins/lisa-agy/skills/lisa-agent-ready/SKILL.md +2 -2
  61. package/plugins/lisa-agy/skills/lisa-github-build-intake/SKILL.md +21 -3
  62. package/plugins/lisa-agy/skills/lisa-github-create/SKILL.md +1 -1
  63. package/plugins/lisa-agy/skills/lisa-github-write-issue/SKILL.md +10 -2
  64. package/plugins/lisa-agy/skills/lisa-jira-build-intake/SKILL.md +21 -3
  65. package/plugins/lisa-agy/skills/lisa-jira-create/SKILL.md +1 -1
  66. package/plugins/lisa-agy/skills/lisa-jira-write-ticket/SKILL.md +10 -2
  67. package/plugins/lisa-agy/skills/lisa-linear-build-intake/SKILL.md +22 -4
  68. package/plugins/lisa-agy/skills/lisa-linear-create/SKILL.md +1 -1
  69. package/plugins/lisa-agy/skills/lisa-linear-write-issue/SKILL.md +10 -2
  70. package/plugins/lisa-agy/skills/lisa-repair-intake/SKILL.md +29 -2
  71. package/plugins/lisa-agy/skills/lisa-track/SKILL.md +5 -5
  72. package/plugins/lisa-agy/skills/lisa-tracker-build-intake/SKILL.md +6 -0
  73. package/plugins/lisa-agy/skills/lisa-tracker-create/SKILL.md +1 -1
  74. package/plugins/lisa-agy/skills/lisa-tracker-write/SKILL.md +1 -1
  75. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  76. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  77. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  78. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  79. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  80. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  81. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  82. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  83. package/plugins/lisa-copilot/hooks/block-direct-issue-create.sh +13 -9
  84. package/plugins/lisa-copilot/hooks/parity-safety-net.sh +150 -37
  85. package/plugins/lisa-copilot/rules/reference/automation-runbook-contract.md +3 -2
  86. package/plugins/lisa-copilot/rules/reference/config-resolution.md +1 -0
  87. package/plugins/lisa-copilot/rules/reference/ready-role-filing.md +56 -5
  88. package/plugins/lisa-copilot/scripts/human-gate-act.mjs +182 -0
  89. package/plugins/lisa-copilot/scripts/human-gate-lift.mjs +141 -0
  90. package/plugins/lisa-copilot/scripts/intake-blocker-reprobe.mjs +319 -5
  91. package/plugins/lisa-copilot/skills/lisa-agent-ready/SKILL.md +2 -2
  92. package/plugins/lisa-copilot/skills/lisa-github-build-intake/SKILL.md +21 -3
  93. package/plugins/lisa-copilot/skills/lisa-github-create/SKILL.md +1 -1
  94. package/plugins/lisa-copilot/skills/lisa-github-write-issue/SKILL.md +10 -2
  95. package/plugins/lisa-copilot/skills/lisa-jira-build-intake/SKILL.md +21 -3
  96. package/plugins/lisa-copilot/skills/lisa-jira-create/SKILL.md +1 -1
  97. package/plugins/lisa-copilot/skills/lisa-jira-write-ticket/SKILL.md +10 -2
  98. package/plugins/lisa-copilot/skills/lisa-linear-build-intake/SKILL.md +22 -4
  99. package/plugins/lisa-copilot/skills/lisa-linear-create/SKILL.md +1 -1
  100. package/plugins/lisa-copilot/skills/lisa-linear-write-issue/SKILL.md +10 -2
  101. package/plugins/lisa-copilot/skills/lisa-repair-intake/SKILL.md +29 -2
  102. package/plugins/lisa-copilot/skills/lisa-track/SKILL.md +5 -5
  103. package/plugins/lisa-copilot/skills/lisa-tracker-build-intake/SKILL.md +6 -0
  104. package/plugins/lisa-copilot/skills/lisa-tracker-create/SKILL.md +1 -1
  105. package/plugins/lisa-copilot/skills/lisa-tracker-write/SKILL.md +1 -1
  106. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  107. package/plugins/lisa-cursor/hooks/block-direct-issue-create.sh +13 -9
  108. package/plugins/lisa-cursor/hooks/parity-safety-net.sh +150 -37
  109. package/plugins/lisa-cursor/rules/automation-runbook-contract-reference.mdc +3 -2
  110. package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +1 -0
  111. package/plugins/lisa-cursor/rules/ready-role-filing-reference.mdc +56 -5
  112. package/plugins/lisa-cursor/scripts/human-gate-act.mjs +182 -0
  113. package/plugins/lisa-cursor/scripts/human-gate-lift.mjs +141 -0
  114. package/plugins/lisa-cursor/scripts/intake-blocker-reprobe.mjs +319 -5
  115. package/plugins/lisa-cursor/skills/lisa-agent-ready/SKILL.md +2 -2
  116. package/plugins/lisa-cursor/skills/lisa-github-build-intake/SKILL.md +21 -3
  117. package/plugins/lisa-cursor/skills/lisa-github-create/SKILL.md +1 -1
  118. package/plugins/lisa-cursor/skills/lisa-github-write-issue/SKILL.md +10 -2
  119. package/plugins/lisa-cursor/skills/lisa-jira-build-intake/SKILL.md +21 -3
  120. package/plugins/lisa-cursor/skills/lisa-jira-create/SKILL.md +1 -1
  121. package/plugins/lisa-cursor/skills/lisa-jira-write-ticket/SKILL.md +10 -2
  122. package/plugins/lisa-cursor/skills/lisa-linear-build-intake/SKILL.md +22 -4
  123. package/plugins/lisa-cursor/skills/lisa-linear-create/SKILL.md +1 -1
  124. package/plugins/lisa-cursor/skills/lisa-linear-write-issue/SKILL.md +10 -2
  125. package/plugins/lisa-cursor/skills/lisa-repair-intake/SKILL.md +29 -2
  126. package/plugins/lisa-cursor/skills/lisa-track/SKILL.md +5 -5
  127. package/plugins/lisa-cursor/skills/lisa-tracker-build-intake/SKILL.md +6 -0
  128. package/plugins/lisa-cursor/skills/lisa-tracker-create/SKILL.md +1 -1
  129. package/plugins/lisa-cursor/skills/lisa-tracker-write/SKILL.md +1 -1
  130. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  131. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  132. package/plugins/lisa-devin/hooks/block-direct-issue-create.sh +13 -9
  133. package/plugins/lisa-devin/hooks/parity-safety-net.sh +150 -37
  134. package/plugins/lisa-devin/rules/reference/automation-runbook-contract.md +3 -2
  135. package/plugins/lisa-devin/rules/reference/config-resolution.md +1 -0
  136. package/plugins/lisa-devin/rules/reference/ready-role-filing.md +56 -5
  137. package/plugins/lisa-devin/scripts/human-gate-act.mjs +182 -0
  138. package/plugins/lisa-devin/scripts/human-gate-lift.mjs +141 -0
  139. package/plugins/lisa-devin/scripts/intake-blocker-reprobe.mjs +319 -5
  140. package/plugins/lisa-devin/skills/lisa-agent-ready/SKILL.md +2 -2
  141. package/plugins/lisa-devin/skills/lisa-github-build-intake/SKILL.md +21 -3
  142. package/plugins/lisa-devin/skills/lisa-github-create/SKILL.md +1 -1
  143. package/plugins/lisa-devin/skills/lisa-github-write-issue/SKILL.md +10 -2
  144. package/plugins/lisa-devin/skills/lisa-jira-build-intake/SKILL.md +21 -3
  145. package/plugins/lisa-devin/skills/lisa-jira-create/SKILL.md +1 -1
  146. package/plugins/lisa-devin/skills/lisa-jira-write-ticket/SKILL.md +10 -2
  147. package/plugins/lisa-devin/skills/lisa-linear-build-intake/SKILL.md +22 -4
  148. package/plugins/lisa-devin/skills/lisa-linear-create/SKILL.md +1 -1
  149. package/plugins/lisa-devin/skills/lisa-linear-write-issue/SKILL.md +10 -2
  150. package/plugins/lisa-devin/skills/lisa-repair-intake/SKILL.md +29 -2
  151. package/plugins/lisa-devin/skills/lisa-track/SKILL.md +5 -5
  152. package/plugins/lisa-devin/skills/lisa-tracker-build-intake/SKILL.md +6 -0
  153. package/plugins/lisa-devin/skills/lisa-tracker-create/SKILL.md +1 -1
  154. package/plugins/lisa-devin/skills/lisa-tracker-write/SKILL.md +1 -1
  155. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  156. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  157. package/plugins/lisa-expo-agy/plugin.json +1 -1
  158. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  159. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  160. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  161. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  162. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  163. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  164. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  165. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  166. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  167. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  168. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  169. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  170. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  171. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  172. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  173. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  174. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  175. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  176. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  177. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  178. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  179. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  180. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  181. package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
  182. package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
  183. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  184. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  185. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  186. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  187. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  188. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  189. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  190. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  191. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  192. package/plugins/lisa-rails-agy/plugin.json +1 -1
  193. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  194. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  195. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  196. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  197. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  198. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  199. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  200. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  201. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  202. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  203. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  204. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  205. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  206. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  207. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  208. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  209. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  210. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  211. package/plugins/src/base/hooks/block-direct-issue-create.sh +13 -9
  212. package/plugins/src/base/hooks/parity-safety-net.sh +150 -37
  213. package/plugins/src/base/rules/reference/automation-runbook-contract.md +3 -2
  214. package/plugins/src/base/rules/reference/config-resolution.md +1 -0
  215. package/plugins/src/base/rules/reference/ready-role-filing.md +56 -5
  216. package/plugins/src/base/scripts/human-gate-act.mjs +182 -0
  217. package/plugins/src/base/scripts/human-gate-lift.mjs +141 -0
  218. package/plugins/src/base/scripts/intake-blocker-reprobe.mjs +319 -5
  219. package/plugins/src/base/skills/lisa-agent-ready/SKILL.md +2 -2
  220. package/plugins/src/base/skills/lisa-github-build-intake/SKILL.md +21 -3
  221. package/plugins/src/base/skills/lisa-github-create/SKILL.md +1 -1
  222. package/plugins/src/base/skills/lisa-github-write-issue/SKILL.md +10 -2
  223. package/plugins/src/base/skills/lisa-jira-build-intake/SKILL.md +21 -3
  224. package/plugins/src/base/skills/lisa-jira-create/SKILL.md +1 -1
  225. package/plugins/src/base/skills/lisa-jira-write-ticket/SKILL.md +10 -2
  226. package/plugins/src/base/skills/lisa-linear-build-intake/SKILL.md +22 -4
  227. package/plugins/src/base/skills/lisa-linear-create/SKILL.md +1 -1
  228. package/plugins/src/base/skills/lisa-linear-write-issue/SKILL.md +10 -2
  229. package/plugins/src/base/skills/lisa-repair-intake/SKILL.md +29 -2
  230. package/plugins/src/base/skills/lisa-track/SKILL.md +5 -5
  231. package/plugins/src/base/skills/lisa-tracker-build-intake/SKILL.md +6 -0
  232. package/plugins/src/base/skills/lisa-tracker-create/SKILL.md +1 -1
  233. package/plugins/src/base/skills/lisa-tracker-write/SKILL.md +1 -1
@@ -276,6 +276,308 @@ export function humanGateHolds(body) {
276
276
  return [...new Set(keys)];
277
277
  }
278
278
 
279
+ /**
280
+ * What a `human_gate` must name: an ACT an agent cannot perform
281
+ * (CodySwannGT/lisa#4658). A reason is legitimate only when it names one of
282
+ * the acts below, or a decision class the project declared human-only
283
+ * (`humanGate.humanOnly`). Anything else is a decision the agent makes and
284
+ * records. The writer-side CLI is `human-gate-act.mjs`; the sweep is
285
+ * `human-gate-lift.mjs`. It lives here so the hold verdict can judge a lift
286
+ * without a new dependency edge (the npm updater pins this file's dependency graph).
287
+ */
288
+
289
+ /**
290
+ * The acts an agent cannot perform. Each `label` is phrased so it completes
291
+ * "Held for a person to …", which is how the writers render the visible line.
292
+ *
293
+ * The patterns run over a normalized reason (lower case, hyphens and
294
+ * underscores read as spaces) so a slug and its prose spelling match alike.
295
+ * They are intentionally narrow: a word that is also an everyday topic
296
+ * ("token", "login", "billing page") is left out, because a pattern that
297
+ * matches a topic re-opens the gate this module closes.
298
+ */
299
+ export const HUMAN_GATE_ACTS = Object.freeze([
300
+ Object.freeze({
301
+ act: "credential",
302
+ label: "supply a credential only a person holds",
303
+ pattern:
304
+ /\b(credentials?|secrets?|passwords?|passphrases?|api keys?|access keys?|private keys?|deploy keys?|ssh keys?|signing keys?|auth tokens?|oauth|2fa|mfa|otp|one time codes?)\b/u,
305
+ }),
306
+ Object.freeze({
307
+ act: "spend",
308
+ label: "approve spending money",
309
+ pattern:
310
+ /\b(spend|spending|payments?|pay for|pay (a|an|the)|pay ([a-z0-9]+ ){0,3}fees?|purchase|purchasing|buy|budget approval|credit card|money|paid (plan|tier|seat|account)s?)\b/u,
311
+ }),
312
+ Object.freeze({
313
+ act: "external-account",
314
+ label: "open an external account",
315
+ pattern:
316
+ /\b((open|opening|create|creating|register|registering|sign up for|signing up for)( (a|an|the|new))?( [a-z0-9]+){0,3} accounts?|(vendor|provider|third party|external) accounts?|accounts? in (a|an|the|our) [a-z]+ name|signup)\b/u,
317
+ }),
318
+ Object.freeze({
319
+ act: "legal-signoff",
320
+ label: "give a legal or compliance sign-off",
321
+ pattern:
322
+ /\b(baa|business associate agreement|sign (a|an|the) [a-z ]{0,30}(agreement|contract|baa|dpa)|legal|lawyer|counsel|compliance|regulatory|hipaa|gdpr|soc ?2|contracts?|terms of service|licen[cs]e agreements?|protected (deploy|deployment|environment)s?)\b/u,
323
+ }),
324
+ Object.freeze({
325
+ act: "accountable-person",
326
+ label: "name an accountable person",
327
+ pattern:
328
+ /\b(accountable (person|owner|party)|name (an|the) (owner|approver|accountable)|(owner|approver) who answers|answers for)\b/u,
329
+ }),
330
+ Object.freeze({
331
+ act: "unreachable-system",
332
+ label: "act in a system the agent cannot reach",
333
+ pattern:
334
+ /\b(admin (rights|access|permissions?|role)|grant admin|physically|invite ([a-z]+ ){0,4}to (the |a |our )?([a-z]+ )?(workspace|org|organization|team|repo|repository|project)|add (the |a |our )?(bot|app|agent|integration) to|workspace admin|physical|hardware|on site|in person|unreachable|cannot reach|can ?not reach|cant reach|no access|outside (the )?agent|grant(s|ed|ing)? ([a-z]+ ){0,3}(access|permissions?|roles?)|give (the )?agent ([a-z]+ ){0,3}access|access (the )?agent (lacks|does not have|doesnt have|cannot get)|agent (lacks|does not have|doesnt have) ([a-z]+ ){0,4}access|tool access|missing access|access grant|provision(ing)? access|phone call)\b/u,
335
+ }),
336
+ Object.freeze({
337
+ act: "lisa-policy",
338
+ label: "make a call Lisa's own policy reserves for a person",
339
+ // Lisa's own human-only gates: exploratory-QA findings (the named exception
340
+ // in `ready-role-filing`), learnings promotion/demotion, harness
341
+ // interventions, automation retirement, and a hold the operator explicitly
342
+ // asked for. Each is a gate the factory model places outside the factory.
343
+ pattern:
344
+ /\b(exploratory (finding|qa)|harness intervention|(promot|demot|retir)\w*\b.{0,80}?\b(knowledge|learnings?)|(knowledge|learnings?)\b.{0,80}?\b(promot|demot|retir)\w*|automation retirement|retire (an |the )?automations?|operator (prioriti[sz]ation|requested)|operator (explicitly )?(asked|requested)|explicitly asked for|requested by (the )?operator)\b/u,
345
+ }),
346
+ ]);
347
+
348
+ /**
349
+ * Acts whose keyword alone could be a topic. A slug such as
350
+ * `compliance-dashboard-triage` or `oauth-provider-choice` carries an act
351
+ * keyword but names a decision about a topic, so for these acts a topic word
352
+ * with no act verb beside it is refused. Lisa's own policy gates and
353
+ * project-declared classes are exempt: they are already named decisions.
354
+ */
355
+ const KEYWORD_ACTS = new Set([
356
+ "credential",
357
+ "spend",
358
+ "external-account",
359
+ "legal-signoff",
360
+ "accountable-person",
361
+ "unreachable-system",
362
+ ]);
363
+
364
+ /** Words that mark a reason as being about a topic, not an act. */
365
+ const TOPIC_WORDS =
366
+ /\b(triage|dispatch|naming|rename|choice|choose|design|copy|colou?r|layout|wording|migration|refactor|classification|classify|cleanup|dashboard|page|button|ui|ux|docs?|documentation|schema|decision|selection|split|labels?|error message|policy|strategy|approach|format|field|template|structure|flag|adoption|list|pagination|conversion|settings|framework|pick|banner|placement|table|flow|storage|rotation|scope|folder|report|logging|tests?)\b/u;
367
+
368
+ /** Verbs that say what a person must actually do. */
369
+ const ACT_VERBS =
370
+ /\b(supply|supplies|provide|provides|enter|holds?|held by|approv\w*|sign(s|ed|ing)?|signoff|grant\w*|give|gives|open|opens|register\w*|attest\w*|pay|pays|only (a|the) (person|founder|owner|operator|human|admin)|lacks?|does not have|doesnt have|cannot|can not|physically|in person|on site)\b/u;
371
+
372
+ /** The path a refused gate is pointed at. One string, so writers cannot drift. */
373
+ export const DECIDE_AND_RECORD =
374
+ "This is a decision, not an act a person must perform. Decide and record: " +
375
+ "pick the reasonable default, write the decision on the item (a `Decision:` " +
376
+ "line saying what was chosen and why), and file it with `build_ready: true`.";
377
+
378
+ /**
379
+ * The comparable form of a reason: lower case, slug separators read as spaces.
380
+ * @param {unknown} value - A raw reason, slug, or line of text
381
+ * @returns {string} Normalized text
382
+ */
383
+ export function normalizeGateText(value) {
384
+ return String(value ?? "")
385
+ .toLowerCase()
386
+ .replace(/[-_/]+/gu, " ")
387
+ .replace(/[^a-z0-9' ]+/gu, " ")
388
+ .replace(/'/gu, "")
389
+ .replace(/\s+/gu, " ")
390
+ .trim();
391
+ }
392
+
393
+ /**
394
+ * The project's declared human-only decision classes, normalized.
395
+ * @param {unknown} classes - `humanGate.humanOnly` from config
396
+ * @returns {string[]} Non-empty normalized phrases
397
+ */
398
+ function normalizeClasses(classes) {
399
+ return (Array.isArray(classes) ? classes : [])
400
+ .map(normalizeGateText)
401
+ .filter(phrase => phrase.length > 0);
402
+ }
403
+
404
+ /**
405
+ * Classify a `human_gate` reason.
406
+ * @param {unknown} reason - The reason (slug or prose) a filing gives
407
+ * @param {{ humanOnly?: unknown }} [options] - `humanOnly`: project-declared
408
+ * human-only decision classes (`humanGate.humanOnly`)
409
+ * @returns {{ valid: boolean, act: string | null, label: string | null, matched: string | null, remedy: string | null }} Verdict
410
+ */
411
+ export function classifyHumanGateReason(reason, options = {}) {
412
+ const text = normalizeGateText(reason);
413
+ if (text.length > 0) {
414
+ // The topic veto applies to a SLUG only (one hyphenated token, no spaces).
415
+ // A prose reason describes the act in its own words ("the Stripe API key
416
+ // for the payments dashboard"), and refusing it for mentioning a topic
417
+ // would refuse real acts; a keyword in prose stays accepted, which keeps a
418
+ // hold rather than lifting one.
419
+ const slug = !/\s/u.test(String(reason ?? "").trim());
420
+ const topicOnly = slug && TOPIC_WORDS.test(text) && !ACT_VERBS.test(text);
421
+ for (const entry of HUMAN_GATE_ACTS) {
422
+ const match = entry.pattern.exec(text);
423
+ // A secret is never a topic: a credential match always wins.
424
+ const vetoed =
425
+ topicOnly && entry.act !== "credential" && KEYWORD_ACTS.has(entry.act);
426
+ if (match && !vetoed) {
427
+ return {
428
+ valid: true,
429
+ act: entry.act,
430
+ label: entry.label,
431
+ matched: match[0],
432
+ remedy: null,
433
+ };
434
+ }
435
+ }
436
+ const declared = normalizeClasses(options.humanOnly).find(phrase =>
437
+ ` ${text} `.includes(` ${phrase} `)
438
+ );
439
+ if (declared) {
440
+ return {
441
+ valid: true,
442
+ act: "project-policy",
443
+ label: `make a ${declared} decision this project reserves for a person`,
444
+ matched: declared,
445
+ remedy: null,
446
+ };
447
+ }
448
+ }
449
+ return {
450
+ valid: false,
451
+ act: null,
452
+ label: null,
453
+ matched: null,
454
+ remedy: DECIDE_AND_RECORD,
455
+ };
456
+ }
457
+
458
+ /**
459
+ * Marker on the machine-authored comment that LIFTS an invalid hold.
460
+ *
461
+ * Not a release, and deliberately not spelled like one. A release records a
462
+ * person's answer and so must come from a trusted human. A lift records that
463
+ * the hold was never valid under `ready-role-filing`: it names no act an agent
464
+ * cannot perform, so there is nothing for a person to authorize
465
+ * (CodySwannGT/lisa#4658). Its authority therefore comes from re-classifying
466
+ * the hold, not from who wrote the comment: a lift discharges a reason only
467
+ * while {@link invalidHumanGateHolds} still treats that hold as liftable. A
468
+ * lift naming a valid hold (a credential, spend, a sign-off) discharges
469
+ * nothing, whoever posts it.
470
+ *
471
+ * Like the release marker it closes with its own `]`, so it never contains
472
+ * {@link HUMAN_GATE_MARKER} and never reads as a fresh hold.
473
+ */
474
+ export const HUMAN_GATE_LIFTED_MARKER = "[lisa-human-gate-lifted]";
475
+
476
+ /** Longest slice of any one line the lift rule reads. */
477
+ const HOLD_TEXT_CAP = 2000;
478
+
479
+ /**
480
+ * Tokens that keep a hold no matter how it is worded or laid out.
481
+ *
482
+ * A wrongly kept hold costs one interruption; a wrongly lifted credential hold
483
+ * dispatches work that cannot succeed. So the sweep never lifts an item whose
484
+ * hold text mentions any of these anywhere, even when the reason itself reads
485
+ * as a topic. The list is about safety, not about classification: it is
486
+ * deliberately broader than the act patterns.
487
+ */
488
+ const HOLD_SAFETY_TOKENS =
489
+ /\b(credentials?|passwords?|passphrases?|passcodes?|mfa|2fa|otp|one time codes?|api keys?|keys?|tokens?|secrets?|oauth|sign|signs|signed|signing|signatures?|signoff|sign off|baa|contracts?|agreements?|admin|administrator|access|accounts?|spend\w*|budgets?|payments?|pay|paid|money|purchase|buy|billing|invoice|legal|lawyer|counsel|compliance|regulatory|hipaa|gdpr|soc ?2|physical|hardware|device)\b/u;
490
+
491
+ /**
492
+ * Every line of a body that belongs to a hold: each declaring marker line and
493
+ * each visible "Held for …" line, wherever they sit, plus the nearest
494
+ * non-blank neighbour of each.
495
+ * @param {unknown} body - The item body
496
+ * @returns {string[]} Hold-related lines, each capped
497
+ */
498
+ function holdRelatedLines(body) {
499
+ const lines = declarativeText(body).split("\n");
500
+ const isHoldLine = line =>
501
+ declaresOnLine(line) || /^\s*held for\b/iu.test(line);
502
+ const related = new Set();
503
+ lines.forEach((line, index) => {
504
+ if (!isHoldLine(line)) return;
505
+ related.add(index);
506
+ // The nearest non-blank neighbour on each side, so a hand-written hold
507
+ // that explains itself next to its marker is read too. More text can
508
+ // only keep a hold under this rule, never lift one.
509
+ for (const step of [-1, 1]) {
510
+ let at = index + step;
511
+ while (at >= 0 && at < lines.length && lines[at].trim() === "")
512
+ at += step;
513
+ if (at >= 0 && at < lines.length) related.add(at);
514
+ }
515
+ });
516
+ return (
517
+ [...related]
518
+ .sort((a, b) => a - b)
519
+ // A marker line's own `reason=` slug is judged once, as a slug, by the
520
+ // caller; read as prose here it would dodge the topic veto and re-hold a
521
+ // lifted decision (a `fee-label-copy` slug reading as spend).
522
+ .map(index => lines[index].replace(/reason=\S*/gu, " "))
523
+ .map(line => line.slice(0, HOLD_TEXT_CAP))
524
+ );
525
+ }
526
+
527
+ /**
528
+ * The reasons of every declared hold the sweep may lift.
529
+ *
530
+ * Structural rather than positional, on purpose: layout heuristics (which line
531
+ * is "this hold's" visible line) kept finding layouts that lifted a credential
532
+ * hold. A hold is liftable only when ALL of these hold for the item as a whole:
533
+ *
534
+ * 1. its reason slug classifies as topic-only;
535
+ * 2. no hold-related line (any marker line, any "Held for …" line) names an
536
+ * act, judged one line at a time;
537
+ * 3. no {@link HOLD_SAFETY_TOKENS} token appears anywhere in the reasons or
538
+ * the hold-related lines, judged as one set.
539
+ *
540
+ * Any doubt keeps the hold. A topic hold that shares an item with a real one,
541
+ * or sits beside a line mentioning a budget, stays held; that conservatism is
542
+ * the intended trade.
543
+ * @param {unknown} body - The item body
544
+ * @param {unknown} humanOnly - Project-declared human-only decision classes
545
+ * @returns {string[]} Reason keys whose hold may be lifted
546
+ */
547
+ export function invalidHumanGateHolds(body, humanOnly) {
548
+ const holds = humanGateHolds(body);
549
+ if (holds.length === 0) return [];
550
+ const lines = holdRelatedLines(body);
551
+ const anyLineValid = lines.some(
552
+ line => classifyHumanGateReason(line, { humanOnly }).valid
553
+ );
554
+ const everything = normalizeGateText([...holds, ...lines].join(" "));
555
+ if (anyLineValid || HOLD_SAFETY_TOKENS.test(everything)) return [];
556
+ return holds.filter(
557
+ reason => !classifyHumanGateReason(reason, { humanOnly }).valid
558
+ );
559
+ }
560
+
561
+ /**
562
+ * The reasons a lift comment discharges: named by a lift AND still invalid.
563
+ * @param {unknown} comments - Comments, structured or raw, any author
564
+ * @param {unknown} body - The item body
565
+ * @param {unknown} humanOnly - Project-declared human-only decision classes
566
+ * @returns {string[]} Reason keys lifted
567
+ */
568
+ export function humanGateLifts(comments, body, humanOnly) {
569
+ const invalid = new Set(invalidHumanGateHolds(body, humanOnly));
570
+ const named = (Array.isArray(comments) ? comments : [])
571
+ .map(entry => (typeof entry === "string" ? entry : (entry?.body ?? "")))
572
+ .flatMap(text =>
573
+ declarativeText(text)
574
+ .split("\n")
575
+ .filter(line => declaresOnLine(line, HUMAN_GATE_LIFTED_MARKER))
576
+ .map(line => reasonOnLine(line, HUMAN_GATE_LIFTED_MARKER))
577
+ );
578
+ return [...new Set(named)].filter(reason => invalid.has(reason));
579
+ }
580
+
279
581
  /**
280
582
  * Normalize stable provider IDs without case folding or trusting display names.
281
583
  * @param {unknown} value - Provider actor ID
@@ -398,8 +700,8 @@ export function humanGateDischarged(input = {}) {
398
700
  * no releases, so a held item stays held. Holding a gate that may be stale
399
701
  * beats releasing one that is not, and every caller that never passes comments
400
702
  * keeps its current behaviour by construction.
401
- * @param {{ labels?: unknown, body?: unknown, comments?: unknown, trustedHumanActorIds?: unknown, humanNeededLabel?: unknown }} input - Candidate surfaces
402
- * @returns {{ held: boolean, reason: string, declared: number, outstanding: string[], released: string[], labelPresent: boolean }} Held-ness verdict
703
+ * @param {{ labels?: unknown, body?: unknown, comments?: unknown, trustedHumanActorIds?: unknown, humanNeededLabel?: unknown, humanOnly?: unknown }} input - Candidate surfaces
704
+ * @returns {{ held: boolean, reason: string, declared: number, outstanding: string[], released: string[], lifted: string[], labelPresent: boolean }} Held-ness verdict
403
705
  */
404
706
  export function humanGateVerdict(input = {}) {
405
707
  const configured = String(
@@ -415,10 +717,18 @@ export function humanGateVerdict(input = {}) {
415
717
  );
416
718
  const releasedSet = new Set(released);
417
719
  const holds = humanGateHolds(input.body);
418
- const outstanding = holds.filter(reason => !releasedSet.has(reason));
720
+ // A lift discharges only a declared body hold that is still invalid; it can
721
+ // never discharge a label-only hold (access blocks, blocked verdicts), which
722
+ // is why it is applied here and not in the label-only branch below.
723
+ const lifted = humanGateLifts(input.comments, input.body, input.humanOnly);
724
+ const liftedSet = new Set(lifted);
725
+ const outstanding = holds.filter(
726
+ reason => !releasedSet.has(reason) && !liftedSet.has(reason)
727
+ );
419
728
  const base = {
420
729
  declared: holds.length,
421
730
  released,
731
+ lifted,
422
732
  labelPresent,
423
733
  };
424
734
 
@@ -454,7 +764,7 @@ export function humanGateVerdict(input = {}) {
454
764
  * its discharge is how the gate became one-way in the first place. Pass the
455
765
  * item's structured comments and trustedHumanActorIds to honor an authorized
456
766
  * release; omit either and the item stays held.
457
- * @param {{ labels?: unknown, body?: unknown, comments?: unknown, trustedHumanActorIds?: unknown, humanNeededLabel?: unknown }} input - Candidate surfaces
767
+ * @param {{ labels?: unknown, body?: unknown, comments?: unknown, trustedHumanActorIds?: unknown, humanNeededLabel?: unknown, humanOnly?: unknown }} input - Candidate surfaces
458
768
  * @returns {boolean} True when a person is holding this item
459
769
  */
460
770
  export function isHumanGated(input) {
@@ -507,6 +817,7 @@ function judgeProbe(probe) {
507
817
  * comments?: unknown
508
818
  * trustedHumanActorIds?: unknown
509
819
  * humanNeededLabel?: unknown
820
+ * humanOnly?: unknown
510
821
  * statedBlocker?: unknown
511
822
  * probe?: { discharged?: unknown, evidence?: unknown } | null
512
823
  * }} input
@@ -618,7 +929,7 @@ export const HUMAN_GATE_NOTE_MARKER = "<!-- [lisa-human-gate-reconciled] -->";
618
929
  * a parser keyed on the structured field would miss those while appearing to
619
930
  * work on every item that happens to have one — reproducing this defect one
620
931
  * layer down.
621
- * @param {{ labels?: unknown, body?: unknown, comments?: unknown, trustedHumanActorIds?: unknown, humanNeededLabel?: unknown }} input - Candidate surfaces
932
+ * @param {{ labels?: unknown, body?: unknown, comments?: unknown, trustedHumanActorIds?: unknown, humanNeededLabel?: unknown, humanOnly?: unknown }} input - Candidate surfaces
622
933
  * @returns {{ claimable: boolean, reason: string, humanGated: boolean }} Claim verdict
623
934
  */
624
935
  export function classifyReadyCandidate(input = {}) {
@@ -649,6 +960,7 @@ export function classifyReadyCandidate(input = {}) {
649
960
  * comments?: unknown
650
961
  * trustedHumanActorIds?: unknown
651
962
  * humanNeededLabel?: unknown
963
+ * humanOnly?: unknown
652
964
  * readyLabel?: unknown
653
965
  * alreadyNotified?: unknown
654
966
  * }} input - Candidate surfaces plus the configured lane and marker labels
@@ -756,6 +1068,7 @@ const RESUME_INSTRUCTION = [
756
1068
  * comments?: unknown
757
1069
  * trustedHumanActorIds?: unknown
758
1070
  * humanNeededLabel?: unknown
1071
+ * humanOnly?: unknown
759
1072
  * readyLabel?: unknown
760
1073
  * lifecycleLabels?: unknown
761
1074
  * alreadyNotified?: unknown
@@ -918,6 +1231,7 @@ export const NORMALIZATION_HOLD_NOTE_MARKER =
918
1231
  * comments?: unknown
919
1232
  * trustedHumanActorIds?: unknown
920
1233
  * humanNeededLabel?: unknown
1234
+ * humanOnly?: unknown
921
1235
  * lifecycleLabels?: unknown
922
1236
  * readyLabel?: unknown
923
1237
  * }} input - Candidate surfaces plus the configured lifecycle vocabulary
@@ -220,8 +220,8 @@ vocabulary; it consumes it.
220
220
  skill (never a vendor write skill directly), carrying the five finding fields in the body. Per the `ready-role-filing` rule each
221
221
  create declares its readiness explicitly: pass **`build_ready: true`** when the correction is
222
222
  mechanical (an omitted flag is NOT build-ready on any tracker, so the mechanical branch would
223
- otherwise file work nothing ever claims), and pass **`human_gate: "<the decision only a human can
224
- make>"`** plus the `human-needed` marker when it is a genuine human decision. This is the skill's **only tracker write**, and it creates Lisa's *own* work item —
223
+ otherwise file work nothing ever claims), and pass **`human_gate: "<the act only a person can
224
+ perform>"`** plus the `human-needed` marker when it needs an act an agent cannot perform (a credential, spend, a sign-off, an accountable person, an unreachable system — `ready-role-filing`, "What a human gate is"); a correction with a reasonable default is decided, recorded, and filed `build_ready: true`. This is the skill's **only tracker write**, and it creates Lisa's *own* work item —
225
225
  it **never edits, comments on, transitions, or otherwise mutates any ingested source** (see the
226
226
  connected-source safety boundary above). The shipped never-ask posture is preserved: a blocker
227
227
  becomes a filed ticket, **never** a prompt, and the session **never pauses to ask a human anything**,
@@ -241,12 +241,20 @@ true, and nothing re-read one before this phase. For each `$BLOCKED` candidate:
241
241
 
242
242
  1. **Read release comments before applying the human gate.** Pass all item comments, labels,
243
243
  body, `trustedHumanActorIds` and configured `humanNeededLabel` to `classifyReadyCandidate(...)`. For a discharged hold,
244
- call `planHumanGateRelease({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, readyLabel, lifecycleLabels, alreadyNotified })`
244
+ call `planHumanGateRelease({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, readyLabel, lifecycleLabels, alreadyNotified })`
245
245
  and retain its plan. Apply human-marker cleanup only as planned; defer any ready-role restoration
246
246
  until steps 2–5 have cleared the remaining blockers (map the role to the vendor's state or label).
247
247
  A still-active hold is never auto-selected, whatever any probe says. An absent or unreadable
248
248
  comment history cannot discharge a hold. A release removes only the human hold: continue the
249
249
  remaining blocker checks below before selecting the item.
250
+ Lift invalid holds first: call `planHumanGateLift({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, readyLabel, lifecycleLabels })` from `scripts/human-gate-lift.mjs`. Post its `comments` and apply only
251
+ `removeHumanNeededLabel` here; defer `addReadyLabel` until the remaining blocker checks below
252
+ clear, exactly as for a release. A hold that names no act an agent cannot perform then never
253
+ blocks selection, and an item with a real blocker never skips the re-probe. A hold that is
254
+ lifted, by this call or in an earlier cycle (`humanGateVerdict(...).lifted` lists both), is a
255
+ discharged condition, not a human decision still pending: record the decision on
256
+ the item (a `Decision:` line saying what was chosen and why) if it does not carry one yet and exclude that condition from
257
+ step 2's probe. Keep probing any independent blocker the item states.
250
258
 
251
259
  2. **Extract the stated discharge condition**, then **probe it**. Machine-testable conditions — a
252
260
  version on trunk, a published package, a CI run history, an advisory's patched status — rot
@@ -343,6 +351,16 @@ Run this **first**, ahead of the repo-scope gate (3a.0) and the leaf-only gate (
343
351
  candidate. Ordering is load-bearing for the same reason it is inside `classifyPreWorkCandidate`: no
344
352
  other gate's verdict — however conclusive — may promote an item a person parked.
345
353
 
354
+ **Lift invalid holds before classifying.** A hold filed under the old "human product call"
355
+ wording that names no act an agent cannot perform is not a hold (`ready-role-filing`, "What a human
356
+ gate is"), and no person should have to comment to end it. Call `planHumanGateLift({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, readyLabel, lifecycleLabels })` from `scripts/human-gate-lift.mjs`, with `humanOnly` read
357
+ from `humanGate.humanOnly` in config. Post each string in its `comments` once (each begins
358
+ `[lisa-human-gate-lifted] reason=<slug>` and explains why), apply its `actions` (remove the
359
+ human-needed marker, add the ready role back), then classify below with those comments included. A
360
+ valid hold (credential, spend, sign-off, and the rest) plans nothing and stays held; so does a
361
+ label-only hold. Name lifted items in the cycle summary via `summarizeHumanGateLifts([...])`,
362
+ printed even at zero.
363
+
346
364
  1. **Classify with `classifyReadyCandidate(...)`** from `scripts/intake-blocker-reprobe.mjs`. It
347
365
  shares the gate test with the pre-work classifier deliberately — two copies of a substring test
348
366
  drift, and a drifted gate fails *silently*, by quietly ceasing to match. Do **not** re-implement
@@ -359,7 +377,7 @@ other gate's verdict — however conclusive — may promote an item a person par
359
377
  and re-rejected every cycle forever and seen by nothing — `lisa-repair-intake` sweeps items that
360
378
  are **not** in the ready role and excludes gated ones outright, so a ready-and-gated item falls
361
379
  outside its filter twice over. Call
362
- `planHumanGateReconciliation({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, readyLabel, alreadyNotified })`
380
+ `planHumanGateReconciliation({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, readyLabel, alreadyNotified })`
363
381
  and apply exactly the actions it returns: remove `$READY`, add the configured human-needed
364
382
  marker, and post `formatHumanGateNote()` once. The planner is idempotent by state, so an item
365
383
  already out of the lane and already marked yields no second mutation and no second comment. This
@@ -369,7 +387,7 @@ other gate's verdict — however conclusive — may promote an item a person par
369
387
  This ready-lane candidate can retain a historical body marker and a human-needed label.
370
388
  This step reconciles only candidates still in the ready lane; released holds outside it are
371
389
  recovered by `lisa-repair-intake` step 2b (or Phase 2.5 when included in this cycle). Call
372
- `planHumanGateRelease({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, readyLabel, lifecycleLabels, alreadyNotified })`
390
+ `planHumanGateRelease({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, readyLabel, lifecycleLabels, alreadyNotified })`
373
391
  and apply exactly the actions it returns: remove the configured human-needed marker, add the
374
392
  configured ready role back, and post `formatHumanGateReleaseNote()` once. It is the exact inverse
375
393
  of step 3's planner and it refuses in both directions — an item still held plans nothing, and an
@@ -82,7 +82,7 @@ Issues must be created in parent-before-child order:
82
82
  2. For each Story, invoke `lisa-github-write-issue` with the Epic ref as `parent_ref`. Capture each Story number.
83
83
  3. For each Sub-task, invoke `lisa-github-write-issue` with the Story ref as `parent_ref` and explicit `build_ready: true`.
84
84
 
85
- - **Declare readiness on every leaf write.** Per the `ready-role-filing` rule an omitted `build_ready` is **not build-ready** on any tracker, so pass `build_ready: true` on each Sub-task (the leaf work units this skill plans) and never on the Epic or Stories, which are containers per `leaf-only-lifecycle`. A leaf that is deliberately held instead passes `human_gate: "<why a human must judge this first>"`. Filing a leaf with neither is an incomplete handoff and `lisa-github-write-issue` rejects it.
85
+ - **Declare readiness on every leaf write.** Per the `ready-role-filing` rule an omitted `build_ready` is **not build-ready** on any tracker, so pass `build_ready: true` on each Sub-task (the leaf work units this skill plans) and never on the Epic or Stories, which are containers per `leaf-only-lifecycle`. A leaf that is deliberately held instead passes `human_gate: "<the act a person must perform>"`. Filing a leaf with neither is an incomplete handoff and `lisa-github-write-issue` rejects it.
86
86
 
87
87
  ### What to pass to each invocation
88
88
 
@@ -324,10 +324,18 @@ For non-build-ready issues created fresh (Epics, Stories, and other containers),
324
324
  - **`build_ready: false`** → create the leaf **without** `status:ready`, so it sits in the backlog for a human to review and promote into the queue.
325
325
  - **`build_ready: true`** → ensure the leaf carries `status:ready` so `lisa-intake` / `lisa-github-build-intake` auto-picks it up.
326
326
 
327
- **A filing with neither is an incomplete handoff.** A leaf that is not build-ready must carry an explicit `human_gate: "<why a human must judge this first>"`; nothing in the ready lane means nothing ever claims it. When `human_gate` is supplied, stamp the hold on the issue so it is auditable — a visible line plus the verbatim marker:
327
+ **A filing with neither is an incomplete handoff.** A leaf that is not build-ready must carry an explicit `human_gate: "<the act a person must perform>"`; nothing in the ready lane means nothing ever claims it. When `human_gate` is supplied, stamp the hold on the issue so it is auditable — after the check below.
328
+
329
+ **Validate the gate before stamping it.** A `human_gate` is for an act an agent cannot perform — a credential only a person holds, spend, an external account, a legal or compliance sign-off, naming an accountable person, acting in a system the agent cannot reach, or a decision class the project declared human-only (`humanGate.humanOnly`). A choice with a reasonable default is a decision, not a gate (`ready-role-filing`, "What a human gate is"). Run the check on the reason:
330
+
331
+ ```bash
332
+ node "${CLAUDE_PLUGIN_ROOT:-node_modules/@codyswann/lisa/plugins/lisa}/scripts/human-gate-act.mjs" check --reason "<the human_gate reason>"
333
+ ```
334
+
335
+ Exit `1` refuses the gate: do **not** file the leaf held. Report the refusal with the verdict's `remedy` — **decide and record**: pick the reasonable default, write a `Decision:` line on the item, and file it `build_ready: true`. Exit `2` is a usage or config error: stop and report. On exit `0`, stamp the hold with the verdict's `label` naming the act — a visible line plus the verbatim marker:
328
336
 
329
337
  ```text
330
- Held for a human product call: <reason>.
338
+ Held for a person to <label>: <reason>.
331
339
  <!-- [lisa-human-gate] reason=<short-slug> -->
332
340
  ```
333
341
 
@@ -214,12 +214,20 @@ true, and nothing re-read one before this phase. For each pre-work candidate out
214
214
 
215
215
  1. **Read release comments before applying the human gate.** Pass all item comments, labels,
216
216
  body, `trustedHumanActorIds` and configured `humanNeededLabel` to `classifyReadyCandidate(...)`. For a discharged hold,
217
- call `planHumanGateRelease({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, readyLabel, lifecycleLabels, alreadyNotified })`
217
+ call `planHumanGateRelease({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, readyLabel, lifecycleLabels, alreadyNotified })`
218
218
  and retain its plan. Apply human-marker cleanup only as planned; defer any ready-role restoration
219
219
  until steps 2–5 have cleared the remaining blockers (map the role to the vendor's state or label).
220
220
  A still-active hold is never auto-selected, whatever any probe says. An absent or unreadable
221
221
  comment history cannot discharge a hold. A release removes only the human hold: continue the
222
222
  remaining blocker checks below before selecting the item.
223
+ Lift invalid holds first: call `planHumanGateLift({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, readyLabel, lifecycleLabels })` from `scripts/human-gate-lift.mjs`. Post its `comments` and apply only
224
+ `removeHumanNeededLabel` here; defer `addReadyLabel` until the remaining blocker checks below
225
+ clear, exactly as for a release. A hold that names no act an agent cannot perform then never
226
+ blocks selection, and an item with a real blocker never skips the re-probe. A hold that is
227
+ lifted, by this call or in an earlier cycle (`humanGateVerdict(...).lifted` lists both), is a
228
+ discharged condition, not a human decision still pending: record the decision on
229
+ the item (a `Decision:` line saying what was chosen and why) if it does not carry one yet and exclude that condition from
230
+ step 2's probe. Keep probing any independent blocker the item states.
223
231
 
224
232
  2. **Extract the stated discharge condition**, then **probe it**. Machine-testable conditions — a
225
233
  version on trunk, a published package, a CI run history, an advisory's patched status — rot
@@ -247,6 +255,16 @@ Run this **first**, ahead of the repo-scope gate (3a.0) and the leaf-only gate (
247
255
  candidate. Ordering is load-bearing for the same reason it is inside `classifyPreWorkCandidate`: no
248
256
  other gate's verdict — however conclusive — may promote an item a person parked.
249
257
 
258
+ **Lift invalid holds before classifying.** A hold filed under the old "human product call"
259
+ wording that names no act an agent cannot perform is not a hold (`ready-role-filing`, "What a human
260
+ gate is"), and no person should have to comment to end it. Call `planHumanGateLift({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, readyLabel, lifecycleLabels })` from `scripts/human-gate-lift.mjs`, with `humanOnly` read
261
+ from `humanGate.humanOnly` in config. Post each string in its `comments` once (each begins
262
+ `[lisa-human-gate-lifted] reason=<slug>` and explains why), apply its `actions` (remove the
263
+ human-needed marker, add the ready role back), then classify below with those comments included. A
264
+ valid hold (credential, spend, sign-off, and the rest) plans nothing and stays held; so does a
265
+ label-only hold. Name lifted items in the cycle summary via `summarizeHumanGateLifts([...])`,
266
+ printed even at zero.
267
+
250
268
  1. **Classify with `classifyReadyCandidate(...)`** from `scripts/intake-blocker-reprobe.mjs`. It
251
269
  shares the gate test with the pre-work classifier deliberately — two copies of a substring test
252
270
  drift, and a drifted gate fails *silently*, by quietly ceasing to match. Do **not** re-implement
@@ -263,7 +281,7 @@ other gate's verdict — however conclusive — may promote an item a person par
263
281
  and re-rejected every cycle forever and seen by nothing — `lisa-repair-intake` sweeps items that
264
282
  are **not** in the ready role and excludes gated ones outright, so a ready-and-gated item falls
265
283
  outside its filter twice over. Call
266
- `planHumanGateReconciliation({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, readyLabel, alreadyNotified })`
284
+ `planHumanGateReconciliation({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, readyLabel, alreadyNotified })`
267
285
  and apply exactly the actions it returns: remove `$READY`, add the configured human-needed
268
286
  marker, and post `formatHumanGateNote()` once. The planner is idempotent by state, so an item
269
287
  already out of the lane and already marked yields no second mutation and no second comment. This
@@ -273,7 +291,7 @@ other gate's verdict — however conclusive — may promote an item a person par
273
291
  This ready-lane candidate can retain a historical body marker and a human-needed label.
274
292
  This step reconciles only candidates still in the ready lane; released holds outside it are
275
293
  recovered by `lisa-repair-intake` step 2b (or Phase 2.5 when included in this cycle). Call
276
- `planHumanGateRelease({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, readyLabel, lifecycleLabels, alreadyNotified })`
294
+ `planHumanGateRelease({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, readyLabel, lifecycleLabels, alreadyNotified })`
277
295
  and apply exactly the actions it returns: remove the configured human-needed marker, add the
278
296
  configured ready role back, and post `formatHumanGateReleaseNote()` once. It is the exact inverse
279
297
  of step 3's planner and it refuses in both directions — an item still held plans nothing, and an
@@ -125,7 +125,7 @@ Exclude unless requested: migration plans, performance tests
125
125
  - Sign-in account and target environment recorded in description
126
126
  - Post-create verification
127
127
 
128
- **Declare readiness on every leaf write.** Per the `ready-role-filing` rule an omitted `build_ready` is **not build-ready** on any tracker, so pass `build_ready: true` on each Sub-task (the leaf work units this skill plans) and never on the Epic or Stories, which are containers per `leaf-only-lifecycle`. A leaf that is deliberately held instead passes `human_gate: "<why a human must judge this first>"`. Filing a leaf with neither is an incomplete handoff and `lisa-jira-write-ticket` rejects it.
128
+ **Declare readiness on every leaf write.** Per the `ready-role-filing` rule an omitted `build_ready` is **not build-ready** on any tracker, so pass `build_ready: true` on each Sub-task (the leaf work units this skill plans) and never on the Epic or Stories, which are containers per `leaf-only-lifecycle`. A leaf that is deliberately held instead passes `human_gate: "<the act a person must perform>"`. Filing a leaf with neither is an incomplete handoff and `lisa-jira-write-ticket` rejects it.
129
129
 
130
130
  ### Invocation order
131
131
 
@@ -309,10 +309,18 @@ Before create/update, verify each field is populated where applicable:
309
309
  - **`build_ready: false`** → same outcome as omitted, stated deliberately: the ticket waits in the project's default status for a human to promote it.
310
310
  - **`build_ready: true`** → after create, transition the **leaf** to the resolved `ready` role so `lisa-intake` / `lisa-jira-build-intake` auto-picks it up (see Phase 6 CREATE step). Resolve the role name with the standard pattern (`.jira.workflow.ready` // `Ready`, local overrides global). Best-effort: if the transition is unreachable, record it and leave the ticket in its default status rather than failing the write.
311
311
 
312
- **A filing with neither is an incomplete handoff.** A leaf that is not build-ready must carry an explicit `human_gate: "<why a human must judge this first>"`; nothing in the ready status means nothing ever claims it. When `human_gate` is supplied, stamp the hold on the ticket so it is auditable — a visible line plus the verbatim marker:
312
+ **A filing with neither is an incomplete handoff.** A leaf that is not build-ready must carry an explicit `human_gate: "<the act a person must perform>"`; nothing in the ready status means nothing ever claims it. When `human_gate` is supplied, stamp the hold on the ticket so it is auditable — after the check below.
313
+
314
+ **Validate the gate before stamping it.** A `human_gate` is for an act an agent cannot perform — a credential only a person holds, spend, an external account, a legal or compliance sign-off, naming an accountable person, acting in a system the agent cannot reach, or a decision class the project declared human-only (`humanGate.humanOnly`). A choice with a reasonable default is a decision, not a gate (`ready-role-filing`, "What a human gate is"). Run the check on the reason:
315
+
316
+ ```bash
317
+ node "${CLAUDE_PLUGIN_ROOT:-node_modules/@codyswann/lisa/plugins/lisa}/scripts/human-gate-act.mjs" check --reason "<the human_gate reason>"
318
+ ```
319
+
320
+ Exit `1` refuses the gate: do **not** file the leaf held. Report the refusal with the verdict's `remedy` — **decide and record**: pick the reasonable default, write a `Decision:` line on the item, and file it `build_ready: true`. Exit `2` is a usage or config error: stop and report. On exit `0`, stamp the hold with the verdict's `label` naming the act — a visible line plus the verbatim marker:
313
321
 
314
322
  ```text
315
- Held for a human product call: <reason>.
323
+ Held for a person to <label>: <reason>.
316
324
  <!-- [lisa-human-gate] reason=<short-slug> -->
317
325
  ```
318
326