@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
@@ -549,8 +549,11 @@ const LisaBlockDirectIssueCreate = async () => {
549
549
  " which resolves or creates exactly one live leaf through",
550
550
  " lisa-tracker-write with build_ready: true, validates it before the",
551
551
  " write, and claims it.",
552
- "2. A human product call is pending? Route the same way but pass",
553
- ' human_gate: "<why a human must judge this first>", which stamps',
552
+ "2. Must a person perform an act an agent cannot (a credential only they",
553
+ " hold, spend, an external account, a legal sign-off, a system the agent",
554
+ " cannot reach)? A choice with a reasonable default is not that: decide",
555
+ " it, record the decision on the item, and use 1. Otherwise pass",
556
+ ' human_gate: "<the act a person must perform>", which stamps',
554
557
  ` ${HUMAN_GATE_MARKER} on the item so the hold is auditable.`,
555
558
  "",
556
559
  "Filed, not ready, and no human_gate is the incomplete-handoff case. See",
@@ -731,6 +731,46 @@ follow_may_invoke() {
731
731
  return 1
732
732
  }
733
733
 
734
+ # Both the policy view and statement parser use these exact comment boundaries.
735
+ # This is fixed awk source, never source derived from the inspected command.
736
+ follow_comment_awk() {
737
+ printf '%s\n' '
738
+ # A hash starts a comment only at an unescaped shell word boundary.
739
+ # Backslash-newline pairs disappear before token recognition; a quoted or
740
+ # escaped blank is part of a word, not a boundary before its next hash.
741
+ function comment_start(at, before, escapes, k) {
742
+ before = at - 1;
743
+ while (before > 1 && substr(s, before, 1) == "\n" && substr(s, before - 1, 1) == "\\" && !comment_newline[before]) {
744
+ lookahead_step();
745
+ escapes = 0;
746
+ for (k = before - 1; k > 0 && substr(s, k, 1) == "\\"; k--) { lookahead_step(); escapes++ }
747
+ if (escapes % 2 == 0) { break }
748
+ before -= 2;
749
+ }
750
+ if (before == 0 || comment_newline[before]) { return 1 }
751
+ if (substr(s, before, 1) !~ /[ \t\n;&|()<>]/) { return 0 }
752
+ escapes = 0;
753
+ for (k = before - 1; k > 0 && substr(s, k, 1) == "\\"; k--) { lookahead_step(); escapes++ }
754
+ return escapes % 2 == 0;
755
+ }
756
+ function comment_end(at, end) {
757
+ # Address one byte at a time rather than copying the remaining file for
758
+ # every short comment. Repeated lookahead shares the existing work cap.
759
+ for (end = at; end <= n && substr(s, end, 1) != "\n"; end++) { lookahead_step() }
760
+ # Backslashes inside discarded comments do not escape their newline.
761
+ # Share this fact with the main walk and every lookahead that skips it.
762
+ if (end <= n) { comment_newline[end] = 1 }
763
+ return end;
764
+ }
765
+ # Lexical lookahead keeps an asynchronous return from ending its parent
766
+ # scan before the trailing & event. Aggregate work is capped linearly in
767
+ # input size, including overlap from nested scopes; no partial parse passes.
768
+ function lookahead_step() {
769
+ if (++lookahead_work > 8 * n + 1024) { exit 2 }
770
+ }
771
+ '
772
+ }
773
+
734
774
  # Split the command into statements at UNQUOTED separators, printing one
735
775
  # statement per line as "<separator><TAB><statement>". Quote-aware on purpose: a
736
776
  # `;` or `|` inside a quoted string is not a statement boundary, and splitting
@@ -746,21 +786,18 @@ follow_may_invoke() {
746
786
  # arrives through the ENVIRONMENT: `awk -v` processes backslash escapes in the
747
787
  # value it is given and would rewrite the command before it was ever read.
748
788
  follow_split() {
749
- LC_ALL=C SN_FOLLOW_TEXT="$1" awk '
750
- # Lexical lookahead keeps an asynchronous return from ending its parent
751
- # scan before the trailing & event. Aggregate work is capped linearly in
752
- # input size, including overlap from nested scopes; no partial parse passes.
753
- function lookahead_step() {
754
- if (++lookahead_work > 8 * n + 1024) { exit 2 }
755
- }
756
- function brace_pipe(from, opening, closing, j, c, quote, escape, braces, nesting, tail, tail_cases, tail_header, word, word_end) {
757
- quote = ""; escape = 0; braces = 1; nesting = 0; brace_redirect = ""; tail_cases = 0; tail_header = 0;
789
+ LC_ALL=C SN_FOLLOW_TEXT="$1" awk "$(follow_comment_awk)"'
790
+ function brace_pipe(from, opening, closing, j, c, quote, escape, braces, nesting, tail, tail_cases, tail_header, word, word_end, parameters) {
791
+ quote = ""; escape = 0; braces = 1; nesting = 0; brace_redirect = ""; tail_cases = 0; tail_header = 0; parameters = 0;
758
792
  for (j = from; j <= n; j++) {
759
793
  lookahead_step(); c = substr(s, j, 1);
760
- if (escape) { escape = 0; continue }
794
+ if (escape) { if (c == "$") { literal_dollars[j] = 1 } escape = 0; continue }
761
795
  if (c == "\\" && quote != "\047") { escape = 1; continue }
762
796
  if (quote != "") { if (c == quote) { quote = "" } continue }
763
797
  if (c == "\"" || c == "\047" || c == "`") { quote = c; continue }
798
+ if (c == "{" && (parameters > 0 || (substr(s, j - 1, 1) == "$" && !literal_dollars[j - 1]))) { parameters++; continue }
799
+ if (c == "}" && parameters > 0) { parameters--; continue }
800
+ if (c == "#" && parameters == 0 && comment_start(j)) { j = comment_end(j) - 1; continue }
764
801
  if (braces > 0) {
765
802
  # A case-pattern ) is not the closing parenthesis of its shell.
766
803
  if (opening == "(" && c ~ /[A-Za-z_]/) {
@@ -794,15 +831,18 @@ follow_split() {
794
831
  if (tail > 0) { brace_redirect = substr(s, tail) }
795
832
  return 0;
796
833
  }
797
- function list_async(from, j, c, quote, escape, nesting, braces) {
798
- quote = ""; escape = 0; nesting = 0; braces = 0;
834
+ function list_async(from, j, c, quote, escape, nesting, braces, parameters) {
835
+ quote = ""; escape = 0; nesting = 0; braces = 0; parameters = 0;
799
836
  for (j = from; j <= n; j++) {
800
837
  lookahead_step();
801
838
  c = substr(s, j, 1);
802
- if (escape) { escape = 0; continue }
839
+ if (escape) { if (c == "$") { literal_dollars[j] = 1 } escape = 0; continue }
803
840
  if (c == "\\" && quote != "\047") { escape = 1; continue }
804
841
  if (quote != "") { if (c == quote) { quote = "" } continue }
805
842
  if (c == "\"" || c == "\047" || c == "`") { quote = c; continue }
843
+ if (c == "{" && (parameters > 0 || (substr(s, j - 1, 1) == "$" && !literal_dollars[j - 1]))) { parameters++; continue }
844
+ if (c == "}" && parameters > 0) { parameters--; continue }
845
+ if (c == "#" && parameters == 0 && comment_start(j)) { j = comment_end(j) - 1; continue }
806
846
  if (c == "(") { nesting++; continue }
807
847
  if (c == ")") { if (nesting == 0) { return 0 } nesting--; continue }
808
848
  if (c == "{") { braces++; continue }
@@ -813,6 +853,24 @@ follow_split() {
813
853
  }
814
854
  return 0;
815
855
  }
856
+ # The reader consumes physical lines, but an unquoted/double-quoted
857
+ # backslash-newline is absent from the shell word. Preserve that join in
858
+ # emitted statements too: otherwise the next physical line can start with
859
+ # a literal word-owned hash and be discarded as a full-line comment.
860
+ function logical_lines(text, k, c, quote, escape, from, out) {
861
+ quote = ""; escape = 0; from = 1; out = "";
862
+ for (k = 1; k <= length(text); k++) {
863
+ c = substr(text, k, 1);
864
+ if (escape) {
865
+ if (c == "\n") { out = out substr(text, from, k - from - 1); from = k + 1 }
866
+ escape = 0; continue;
867
+ }
868
+ if (c == "\\" && quote != "\047") { escape = 1; continue }
869
+ if (quote != "") { if (c == quote) { quote = "" } continue }
870
+ if (c == "\"" || c == "\047") { quote = c }
871
+ }
872
+ return out substr(text, from);
873
+ }
816
874
  # U records tell the walker the stream below may not match the shell, so
817
875
  # a compound closer can no longer be trusted (follow_compound_close). They
818
876
  # only ever ADD distrust; every other record is emitted exactly as before.
@@ -822,6 +880,7 @@ follow_split() {
822
880
  # can spell `done` or `fi` on its own.
823
881
  function record(kind, text) {
824
882
  if (text ~ /\n/) { printf "U\t\n" }
883
+ text = logical_lines(text);
825
884
  printf "%s\t%s\n", kind, text;
826
885
  }
827
886
  # The first word of one separator-delimited piece of a comment, as the
@@ -831,8 +890,10 @@ follow_split() {
831
890
  gsub(/["\047]/, "", piece);
832
891
  return piece ~ /^(fi|done|esac|case|if|then|else|elif|do|while|until|for|select|function|!|\{|\})$/;
833
892
  }
834
- # This split does not recognise comments, so a comment is split as code. It
835
- # is harmless only when that split cannot change any structure the walker
893
+ # Retain the existing distrust signal for comments whose former split could
894
+ # change scope. Removing their text must not loosen a refusal that depended
895
+ # on conservative flow tracking. A comment is harmless to that tracking only
896
+ # when its former split cannot change any structure the walker
836
897
  # tracks: no piece after a separator starts with a reserved word, quotes
837
898
  # close, parentheses and braces balance, and nothing escapes or substitutes.
838
899
  # Inside a case pattern a `)` ends the pattern, so it is never harmless
@@ -864,7 +925,13 @@ follow_split() {
864
925
  if (pieces > 0 && comment_reserved(piece)) { return 1 }
865
926
  return cq != "" || parens != 0 || braces != 0;
866
927
  }
867
- function comment_check(at, pattern) {
928
+ function comment_check(at, pattern, from) {
929
+ # Full physical comment lines were absent from the old policy view and
930
+ # must not introduce new scope uncertainty merely because the parser now
931
+ # receives raw source. Inline comments keep the existing distrust rule.
932
+ if (at != 1 && substr(s, at - 1, 1) !~ /[[:space:];&|()]/) { return }
933
+ for (from = at - 1; from > 0 && substr(s, from, 1) != "\n"; from--) { lookahead_step() }
934
+ if (substr(s, from + 1, at - from - 1) ~ /^[[:space:]]*$/) { return }
868
935
  if ((at == 1 || substr(s, at - 1, 1) ~ /[[:space:];&|()]/) && comment_unsafe(at + 1, pattern)) {
869
936
  printf "U\t\n";
870
937
  }
@@ -872,16 +939,21 @@ follow_split() {
872
939
  BEGIN {
873
940
  s = ENVIRON["SN_FOLLOW_TEXT"]; n = length(s);
874
941
  q = ""; esc = 0; start = 1; sep = "o"; parens = 0;
875
- functions = 0; cases = 0; backtick = 0; brace_depth = 0; post_brace = 0;
942
+ functions = 0; cases = 0; backtick = 0; brace_depth = 0; post_brace = 0; parameters = 0;
876
943
  printf "L\t%d\n", list_async(1);
877
944
  for (i = 1; i <= n; i++) {
878
- c = substr(s, i, 1);
945
+ c = substr(s, i, 1); comment_from = 0;
879
946
  if (esc == 1) { if (c == "$") { literal_dollars[i] = 1 } esc = 0; continue }
880
947
  if (c == "\\" && q != "\047") { esc = 1; continue }
881
948
  if (functions > 0) {
882
949
  if (q != "") { if (c == q) { q = "" } continue }
883
950
  if (c == "\"" || c == "\047") { q = c; continue }
884
- if (c == "#") { comment_check(i, 0) }
951
+ if (c == "{" && (parameters > 0 || (substr(s, i - 1, 1) == "$" && !literal_dollars[i - 1]))) { parameters++; continue }
952
+ if (parameters > 0) { if (c == "}") { parameters-- } continue }
953
+ if (c == "#") {
954
+ comment_check(i, 0);
955
+ if (comment_start(i)) { i = comment_end(i) - 1; continue }
956
+ }
885
957
  if (c == "{") { functions++ }
886
958
  if (c == "}" && --functions == 0) {
887
959
  printf "N\t%s\t%s\n", sep, function_name;
@@ -895,7 +967,12 @@ follow_split() {
895
967
  quoted_expression = q == "\"" && ((c == "(" && substr(s, i - 1, 1) == "$" && !literal_dollars[i - 1]) || c == "`");
896
968
  if (q != "" && !quoted_expression) { if (c == q) { q = "" } continue }
897
969
  if (c == "\"" || c == "\047") { q = c; continue }
898
- if (c == "#") { comment_check(i, cases > 0 && case_scopes[cases] == parens && case_patterns[cases]) }
970
+ if (c == "{" && (parameters > 0 || (substr(s, i - 1, 1) == "$" && !literal_dollars[i - 1]))) { parameters++; continue }
971
+ if (c == "}" && parameters > 0) { parameters--; continue }
972
+ if (c == "#") {
973
+ comment_check(i, cases > 0 && case_scopes[cases] == parens && case_patterns[cases]);
974
+ if (parameters == 0 && comment_start(i)) { comment_from = i; i = comment_end(i); if (i > n) { i = n } c = "\n" }
975
+ }
899
976
  if (c == "`") {
900
977
  if (backtick) {
901
978
  piece = substr(s, start, i - start);
@@ -907,7 +984,7 @@ follow_split() {
907
984
  }
908
985
  continue;
909
986
  }
910
- if (i == start && c ~ /[[:space:]]/) { start = i + 1; continue }
987
+ if (i == start && c ~ /[ \t\n]/) { start = i + 1; continue }
911
988
  if (c ~ /[[:space:]]/ && substr(s, i - 1, 1) !~ /[[:space:]]/ && substr(s, start, 4) == "case") {
912
989
  piece = substr(s, start, i - start);
913
990
  if (piece ~ /^case[[:space:]].*[[:space:]]in$/) {
@@ -925,17 +1002,17 @@ follow_split() {
925
1002
  }
926
1003
  if (c == "{") {
927
1004
  piece = substr(s, start, i - start);
928
- definition = piece ~ /^[[:space:]]*([A-Za-z_][A-Za-z_0-9]*[[:space:]]*\([[:space:]]*\)|function[[:space:]]+[A-Za-z_][A-Za-z_0-9]*([[:space:]]*\([[:space:]]*\))?)[[:space:]]*$/;
1005
+ definition = piece ~ /^[ \t\n]*([A-Za-z_][A-Za-z_0-9]*[ \t]*\([ \t]*\)|function[ \t]+[A-Za-z_][A-Za-z_0-9]*([ \t]*\([ \t]*\))?)[ \t\n]*$/;
929
1006
  if (definition) {
930
1007
  function_name = piece;
931
- sub(/^[[:space:]]*(function[[:space:]]+)?/, "", function_name);
932
- sub(/[[:space:]\(].*$/, "", function_name);
1008
+ sub(/^[ \t\n]*(function[ \t]+)?/, "", function_name);
1009
+ sub(/[ \t\n\(].*$/, "", function_name);
933
1010
  functions = 1; function_start = i + 1;
934
1011
  continue;
935
1012
  }
936
1013
  previous = i > 1 ? substr(s, i - 1, 1) : "";
937
- group = (i == 1 || previous ~ /[[:space:];&|()]/) && substr(s, i + 1, 1) ~ /[[:space:];]/ &&
938
- piece ~ /^[[:space:]]*((then|do|else|!|time)[[:space:]]+)*$/;
1014
+ group = (i == 1 || previous ~ /[ \t\n;&|()]/) && substr(s, i + 1, 1) ~ /[ \t\n;]/ &&
1015
+ piece ~ /^[ \t\n]*((then|do|else|!|time)[ \t\n]+)*$/;
939
1016
  brace_groups[++brace_depth] = group;
940
1017
  if (group) {
941
1018
  brace_sep = sep;
@@ -966,10 +1043,10 @@ follow_split() {
966
1043
  if (c == "(") {
967
1044
  previous = i > 1 ? substr(s, i - 1, 1) : "";
968
1045
  piece = substr(s, start, i - start);
969
- header = piece ~ /^[[:space:]]*(function[[:space:]]+)?[A-Za-z_][A-Za-z_0-9]*[[:space:]]*$/ && substr(s, i + 1) ~ /^[[:space:]]*\)/;
1046
+ header = piece ~ /^[ \t]*(function[ \t]+)?[A-Za-z_][A-Za-z_0-9]*[ \t]*$/ && substr(s, i + 1) ~ /^[ \t]*\)/;
970
1047
  expression = previous ~ /[$<>]/ && !literal_dollars[i - 1] && substr(s, i + 1, 1) != "(";
971
1048
  group = (parens == 0 || scopes[parens] != 0) &&
972
- (i == 1 || previous ~ /[[:space:];&|()]/) && substr(s, i + 1, 1) != "(" && !header;
1049
+ (i == 1 || previous ~ /[ \t\n;&|()]/) && substr(s, i + 1, 1) != "(" && !header;
973
1050
  scopes[++parens] = expression ? 2 : group;
974
1051
  if (expression) {
975
1052
  expression_starts[parens] = start;
@@ -1002,7 +1079,7 @@ follow_split() {
1002
1079
  if (c == ";" || c == "&" || c == "|" || c == "\n") {
1003
1080
  if (parens > 0 && scopes[parens] == 0) { continue }
1004
1081
  if (c == "&" && (substr(s, i - 1, 1) ~ /[<>]/ || substr(s, i + 1, 1) == ">")) { continue }
1005
- piece = substr(s, start, i - start);
1082
+ piece = substr(s, start, (comment_from ? comment_from : i) - start);
1006
1083
  pipe = c == "|" && substr(s, i + 1, 1) != "|";
1007
1084
  if (pipe || sep == "|") { printf "(\t%s%s\nL\t%d\n", (sep == "|" ? "|" : ""), (pipe ? "+" : ""), list_async(start) }
1008
1085
  if (piece ~ /[^[:space:]]/) { record(post_brace ? "R" : sep, piece) }
@@ -1175,11 +1252,46 @@ follow_locate() {
1175
1252
  return 1
1176
1253
  }
1177
1254
 
1255
+ # Drop a physical comment line only at a real logical shell word boundary.
1256
+ # A blank after a joined newline can start a comment, but a hash in a quoted or
1257
+ # continued word cannot. Keep the old conservative inline-comment policy while
1258
+ # sharing comment/newline provenance and work bounds with the statement parser.
1259
+ follow_policy_text() {
1260
+ LC_ALL=C SN_FOLLOW_TEXT="$1" awk "$(follow_comment_awk)"'
1261
+ BEGIN {
1262
+ s = ENVIRON["SN_FOLLOW_TEXT"]; n = length(s);
1263
+ quote = ""; escape = 0; parameters = 0; line_start = 1; from = 1;
1264
+ for (i = 1; i <= n; i++) {
1265
+ lookahead_step(); c = substr(s, i, 1);
1266
+ if (c == "\n") { line_start = i + 1 }
1267
+ if (escape) { if (c == "$") { literal_dollars[i] = 1 } escape = 0; continue }
1268
+ if (c == "\\" && quote != "\047") { escape = 1; continue }
1269
+ if (quote != "") { if (c == quote) { quote = "" } continue }
1270
+ if (c == "\"" || c == "\047" || c == "`") { quote = c; continue }
1271
+ if (c == "{" && (parameters > 0 || (substr(s, i - 1, 1) == "$" && !literal_dollars[i - 1]))) { parameters++; continue }
1272
+ if (c == "}" && parameters > 0) { parameters--; continue }
1273
+ if (c == "#" && parameters == 0 && comment_start(i)) {
1274
+ end = comment_end(i);
1275
+ if (substr(s, line_start, i - line_start) ~ /^[ \t]*$/) {
1276
+ printf "%s", substr(s, from, line_start - from);
1277
+ from = end;
1278
+ }
1279
+ # Ignore quotes and backslashes owned by any real comment, including
1280
+ # inline comments whose bytes the conservative policy view retains.
1281
+ i = end - 1;
1282
+ }
1283
+ }
1284
+ printf "%s", substr(s, from);
1285
+ }
1286
+ '
1287
+ }
1288
+
1178
1289
  # Read one executed file into the text the guards will scan, then follow what IT
1179
- # executes, to a bounded depth. Full-line comments are dropped: a commented line
1180
- # is never executed, so scanning it can only manufacture a false refusal.
1290
+ # executes, to a bounded depth. Text policies retain their comment-free view;
1291
+ # the statement parser needs original physical lines to distinguish a comment
1292
+ # from a word-owned hash after a backslash-newline join.
1181
1293
  follow_take() {
1182
- local path="$1" depth="$2" size="" content="" rm_content="${3-}"
1294
+ local path="$1" depth="$2" size="" content="" source_content="" rm_content="${3-}"
1183
1295
  local invocation_kind=child
1184
1296
  if [ "$#" -eq 3 ]; then invocation_kind="$3"; fi
1185
1297
  case "$follow_paths" in
@@ -1208,17 +1320,18 @@ follow_take() {
1208
1320
  if [ "$#" -eq 4 ]; then
1209
1321
  # Scan the same complete bytes whose digest was authenticated, not a
1210
1322
  # second file read that could pair changed source with the cleanup view.
1211
- content="$(printf '%s' "$4" | sed 's/^[[:space:]]*#.*$//')" || follow_refuse "$path" "authenticated source could not be read"
1323
+ source_content="$4"
1212
1324
  else
1213
- content="$(LC_ALL=C tr -d '\000' <"$path" | sed 's/^[[:space:]]*#.*$//')" \
1325
+ source_content="$(LC_ALL=C tr -d '\000' <"$path")" \
1214
1326
  || follow_refuse "$path" "it could not be read"
1215
1327
  fi
1328
+ content="$(follow_policy_text "$source_content")" || follow_refuse "$path" "source policy view could not be read"
1216
1329
  follow_names="$follow_names $path"
1217
1330
  followed_text="$followed_text"$'\n'"$content"
1218
1331
  if [ "$#" -ne 4 ]; then
1219
1332
  rm_content="$content"
1220
1333
  else
1221
- rm_content="$(printf '%s' "$rm_content" | sed 's/^[[:space:]]*#.*$//')" || follow_refuse "$path" "supervisor cleanup view could not be read"
1334
+ rm_content="$(follow_policy_text "$rm_content")" || follow_refuse "$path" "supervisor cleanup view could not be read"
1222
1335
  fi
1223
1336
  followed_rm_text="$followed_rm_text"$'\n'"$rm_content"
1224
1337
  if [ "$depth" -lt "$FOLLOW_MAX_DEPTH" ]; then
@@ -1232,9 +1345,9 @@ follow_take() {
1232
1345
  # followed separately by follow_supervisor. Re-expanding all bootstrap
1233
1346
  # functions would re-interpret its internal protocol, not inspect a new
1234
1347
  # user-controlled file, and multiplied its native hook time fourfold.
1235
- follow_scan "$content" "$((depth + 1))" 0 1
1348
+ follow_scan "$source_content" "$((depth + 1))" 0 1
1236
1349
  else
1237
- follow_scan "$content" "$((depth + 1))" 0 0 "$invocation_kind"
1350
+ follow_scan "$source_content" "$((depth + 1))" 0 0 "$invocation_kind"
1238
1351
  fi
1239
1352
  if [ "$invocation_kind" != source ]; then
1240
1353
  follow_cwd="$saved_cwd"
package/package.json CHANGED
@@ -189,7 +189,7 @@
189
189
  "qs": "^6.16.0"
190
190
  },
191
191
  "name": "@codyswann/lisa",
192
- "version": "4.88.0",
192
+ "version": "4.88.2",
193
193
  "description": "Governance-as-code for AI coding agents: turns a repository into agent-operated software factories with guardrails, guidance and automated enforcement for Claude Code, Codex, Cursor, OpenCode, Antigravity, Copilot and Devin",
194
194
  "main": "dist/index.js",
195
195
  "exports": {
@@ -347,7 +347,7 @@
347
347
  "test": "tests"
348
348
  },
349
349
  "types": "./dist/index.d.ts",
350
- "lisaReleaseCommit": "55640ae3d7b5c8a0e666dab6fffbf08308b23df1",
351
- "gitHead": "55640ae3d7b5c8a0e666dab6fffbf08308b23df1",
352
- "lisaReleaseTag": "v4.88.0"
350
+ "lisaReleaseCommit": "56b86b5559b98020b18ec2077461e6ff640184fa",
351
+ "gitHead": "56b86b5559b98020b18ec2077461e6ff640184fa",
352
+ "lisaReleaseTag": "v4.88.2"
353
353
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.88.0",
3
+ "version": "4.88.2",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.88.0",
3
+ "version": "4.88.2",
4
4
  "description": "Universal governance: agents, skills, commands, hooks, and rules for all projects.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -222,8 +222,8 @@ vocabulary; it consumes it.
222
222
  skill (never a vendor write skill directly), carrying the five finding fields in the body. Per the `ready-role-filing` rule each
223
223
  create declares its readiness explicitly: pass **`build_ready: true`** when the correction is
224
224
  mechanical (an omitted flag is NOT build-ready on any tracker, so the mechanical branch would
225
- otherwise file work nothing ever claims), and pass **`human_gate: "<the decision only a human can
226
- 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 —
225
+ otherwise file work nothing ever claims), and pass **`human_gate: "<the act only a person can
226
+ 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 —
227
227
  it **never edits, comments on, transitions, or otherwise mutates any ingested source** (see the
228
228
  connected-source safety boundary above). The shipped never-ask posture is preserved: a blocker
229
229
  becomes a filed ticket, **never** a prompt, and the session **never pauses to ask a human anything**,
@@ -243,12 +243,20 @@ true, and nothing re-read one before this phase. For each `$BLOCKED` candidate:
243
243
 
244
244
  1. **Read release comments before applying the human gate.** Pass all item comments, labels,
245
245
  body, `trustedHumanActorIds` and configured `humanNeededLabel` to `classifyReadyCandidate(...)`. For a discharged hold,
246
- call `planHumanGateRelease({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, readyLabel, lifecycleLabels, alreadyNotified })`
246
+ call `planHumanGateRelease({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, readyLabel, lifecycleLabels, alreadyNotified })`
247
247
  and retain its plan. Apply human-marker cleanup only as planned; defer any ready-role restoration
248
248
  until steps 2–5 have cleared the remaining blockers (map the role to the vendor's state or label).
249
249
  A still-active hold is never auto-selected, whatever any probe says. An absent or unreadable
250
250
  comment history cannot discharge a hold. A release removes only the human hold: continue the
251
251
  remaining blocker checks below before selecting the item.
252
+ 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
253
+ `removeHumanNeededLabel` here; defer `addReadyLabel` until the remaining blocker checks below
254
+ clear, exactly as for a release. A hold that names no act an agent cannot perform then never
255
+ blocks selection, and an item with a real blocker never skips the re-probe. A hold that is
256
+ lifted, by this call or in an earlier cycle (`humanGateVerdict(...).lifted` lists both), is a
257
+ discharged condition, not a human decision still pending: record the decision on
258
+ the item (a `Decision:` line saying what was chosen and why) if it does not carry one yet and exclude that condition from
259
+ step 2's probe. Keep probing any independent blocker the item states.
252
260
 
253
261
  2. **Extract the stated discharge condition**, then **probe it**. Machine-testable conditions — a
254
262
  version on trunk, a published package, a CI run history, an advisory's patched status — rot
@@ -345,6 +353,16 @@ Run this **first**, ahead of the repo-scope gate (3a.0) and the leaf-only gate (
345
353
  candidate. Ordering is load-bearing for the same reason it is inside `classifyPreWorkCandidate`: no
346
354
  other gate's verdict — however conclusive — may promote an item a person parked.
347
355
 
356
+ **Lift invalid holds before classifying.** A hold filed under the old "human product call"
357
+ wording that names no act an agent cannot perform is not a hold (`ready-role-filing`, "What a human
358
+ 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
359
+ from `humanGate.humanOnly` in config. Post each string in its `comments` once (each begins
360
+ `[lisa-human-gate-lifted] reason=<slug>` and explains why), apply its `actions` (remove the
361
+ human-needed marker, add the ready role back), then classify below with those comments included. A
362
+ valid hold (credential, spend, sign-off, and the rest) plans nothing and stays held; so does a
363
+ label-only hold. Name lifted items in the cycle summary via `summarizeHumanGateLifts([...])`,
364
+ printed even at zero.
365
+
348
366
  1. **Classify with `classifyReadyCandidate(...)`** from `scripts/intake-blocker-reprobe.mjs`. It
349
367
  shares the gate test with the pre-work classifier deliberately — two copies of a substring test
350
368
  drift, and a drifted gate fails *silently*, by quietly ceasing to match. Do **not** re-implement
@@ -361,7 +379,7 @@ other gate's verdict — however conclusive — may promote an item a person par
361
379
  and re-rejected every cycle forever and seen by nothing — `lisa-repair-intake` sweeps items that
362
380
  are **not** in the ready role and excludes gated ones outright, so a ready-and-gated item falls
363
381
  outside its filter twice over. Call
364
- `planHumanGateReconciliation({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, readyLabel, alreadyNotified })`
382
+ `planHumanGateReconciliation({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, readyLabel, alreadyNotified })`
365
383
  and apply exactly the actions it returns: remove `$READY`, add the configured human-needed
366
384
  marker, and post `formatHumanGateNote()` once. The planner is idempotent by state, so an item
367
385
  already out of the lane and already marked yields no second mutation and no second comment. This
@@ -371,7 +389,7 @@ other gate's verdict — however conclusive — may promote an item a person par
371
389
  This ready-lane candidate can retain a historical body marker and a human-needed label.
372
390
  This step reconciles only candidates still in the ready lane; released holds outside it are
373
391
  recovered by `lisa-repair-intake` step 2b (or Phase 2.5 when included in this cycle). Call
374
- `planHumanGateRelease({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, readyLabel, lifecycleLabels, alreadyNotified })`
392
+ `planHumanGateRelease({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, readyLabel, lifecycleLabels, alreadyNotified })`
375
393
  and apply exactly the actions it returns: remove the configured human-needed marker, add the
376
394
  configured ready role back, and post `formatHumanGateReleaseNote()` once. It is the exact inverse
377
395
  of step 3's planner and it refuses in both directions — an item still held plans nothing, and an
@@ -84,7 +84,7 @@ Issues must be created in parent-before-child order:
84
84
  2. For each Story, invoke `lisa-github-write-issue` with the Epic ref as `parent_ref`. Capture each Story number.
85
85
  3. For each Sub-task, invoke `lisa-github-write-issue` with the Story ref as `parent_ref` and explicit `build_ready: true`.
86
86
 
87
- - **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.
87
+ - **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.
88
88
 
89
89
  ### What to pass to each invocation
90
90
 
@@ -326,10 +326,18 @@ For non-build-ready issues created fresh (Epics, Stories, and other containers),
326
326
  - **`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.
327
327
  - **`build_ready: true`** → ensure the leaf carries `status:ready` so `lisa-intake` / `lisa-github-build-intake` auto-picks it up.
328
328
 
329
- **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:
329
+ **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.
330
+
331
+ **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:
332
+
333
+ ```bash
334
+ node "${CLAUDE_PLUGIN_ROOT:-node_modules/@codyswann/lisa/plugins/lisa}/scripts/human-gate-act.mjs" check --reason "<the human_gate reason>"
335
+ ```
336
+
337
+ 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:
330
338
 
331
339
  ```text
332
- Held for a human product call: <reason>.
340
+ Held for a person to <label>: <reason>.
333
341
  <!-- [lisa-human-gate] reason=<short-slug> -->
334
342
  ```
335
343
 
@@ -216,12 +216,20 @@ true, and nothing re-read one before this phase. For each pre-work candidate out
216
216
 
217
217
  1. **Read release comments before applying the human gate.** Pass all item comments, labels,
218
218
  body, `trustedHumanActorIds` and configured `humanNeededLabel` to `classifyReadyCandidate(...)`. For a discharged hold,
219
- call `planHumanGateRelease({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, readyLabel, lifecycleLabels, alreadyNotified })`
219
+ call `planHumanGateRelease({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, readyLabel, lifecycleLabels, alreadyNotified })`
220
220
  and retain its plan. Apply human-marker cleanup only as planned; defer any ready-role restoration
221
221
  until steps 2–5 have cleared the remaining blockers (map the role to the vendor's state or label).
222
222
  A still-active hold is never auto-selected, whatever any probe says. An absent or unreadable
223
223
  comment history cannot discharge a hold. A release removes only the human hold: continue the
224
224
  remaining blocker checks below before selecting the item.
225
+ 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
226
+ `removeHumanNeededLabel` here; defer `addReadyLabel` until the remaining blocker checks below
227
+ clear, exactly as for a release. A hold that names no act an agent cannot perform then never
228
+ blocks selection, and an item with a real blocker never skips the re-probe. A hold that is
229
+ lifted, by this call or in an earlier cycle (`humanGateVerdict(...).lifted` lists both), is a
230
+ discharged condition, not a human decision still pending: record the decision on
231
+ the item (a `Decision:` line saying what was chosen and why) if it does not carry one yet and exclude that condition from
232
+ step 2's probe. Keep probing any independent blocker the item states.
225
233
 
226
234
  2. **Extract the stated discharge condition**, then **probe it**. Machine-testable conditions — a
227
235
  version on trunk, a published package, a CI run history, an advisory's patched status — rot
@@ -249,6 +257,16 @@ Run this **first**, ahead of the repo-scope gate (3a.0) and the leaf-only gate (
249
257
  candidate. Ordering is load-bearing for the same reason it is inside `classifyPreWorkCandidate`: no
250
258
  other gate's verdict — however conclusive — may promote an item a person parked.
251
259
 
260
+ **Lift invalid holds before classifying.** A hold filed under the old "human product call"
261
+ wording that names no act an agent cannot perform is not a hold (`ready-role-filing`, "What a human
262
+ 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
263
+ from `humanGate.humanOnly` in config. Post each string in its `comments` once (each begins
264
+ `[lisa-human-gate-lifted] reason=<slug>` and explains why), apply its `actions` (remove the
265
+ human-needed marker, add the ready role back), then classify below with those comments included. A
266
+ valid hold (credential, spend, sign-off, and the rest) plans nothing and stays held; so does a
267
+ label-only hold. Name lifted items in the cycle summary via `summarizeHumanGateLifts([...])`,
268
+ printed even at zero.
269
+
252
270
  1. **Classify with `classifyReadyCandidate(...)`** from `scripts/intake-blocker-reprobe.mjs`. It
253
271
  shares the gate test with the pre-work classifier deliberately — two copies of a substring test
254
272
  drift, and a drifted gate fails *silently*, by quietly ceasing to match. Do **not** re-implement
@@ -265,7 +283,7 @@ other gate's verdict — however conclusive — may promote an item a person par
265
283
  and re-rejected every cycle forever and seen by nothing — `lisa-repair-intake` sweeps items that
266
284
  are **not** in the ready role and excludes gated ones outright, so a ready-and-gated item falls
267
285
  outside its filter twice over. Call
268
- `planHumanGateReconciliation({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, readyLabel, alreadyNotified })`
286
+ `planHumanGateReconciliation({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, readyLabel, alreadyNotified })`
269
287
  and apply exactly the actions it returns: remove `$READY`, add the configured human-needed
270
288
  marker, and post `formatHumanGateNote()` once. The planner is idempotent by state, so an item
271
289
  already out of the lane and already marked yields no second mutation and no second comment. This
@@ -275,7 +293,7 @@ other gate's verdict — however conclusive — may promote an item a person par
275
293
  This ready-lane candidate can retain a historical body marker and a human-needed label.
276
294
  This step reconciles only candidates still in the ready lane; released holds outside it are
277
295
  recovered by `lisa-repair-intake` step 2b (or Phase 2.5 when included in this cycle). Call
278
- `planHumanGateRelease({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, readyLabel, lifecycleLabels, alreadyNotified })`
296
+ `planHumanGateRelease({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, readyLabel, lifecycleLabels, alreadyNotified })`
279
297
  and apply exactly the actions it returns: remove the configured human-needed marker, add the
280
298
  configured ready role back, and post `formatHumanGateReleaseNote()` once. It is the exact inverse
281
299
  of step 3's planner and it refuses in both directions — an item still held plans nothing, and an
@@ -127,7 +127,7 @@ Exclude unless requested: migration plans, performance tests
127
127
  - Sign-in account and target environment recorded in description
128
128
  - Post-create verification
129
129
 
130
- **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.
130
+ **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.
131
131
 
132
132
  ### Invocation order
133
133
 
@@ -311,10 +311,18 @@ Before create/update, verify each field is populated where applicable:
311
311
  - **`build_ready: false`** → same outcome as omitted, stated deliberately: the ticket waits in the project's default status for a human to promote it.
312
312
  - **`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.
313
313
 
314
- **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:
314
+ **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.
315
+
316
+ **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:
317
+
318
+ ```bash
319
+ node "${CLAUDE_PLUGIN_ROOT:-node_modules/@codyswann/lisa/plugins/lisa}/scripts/human-gate-act.mjs" check --reason "<the human_gate reason>"
320
+ ```
321
+
322
+ 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:
315
323
 
316
324
  ```text
317
- Held for a human product call: <reason>.
325
+ Held for a person to <label>: <reason>.
318
326
  <!-- [lisa-human-gate] reason=<short-slug> -->
319
327
  ```
320
328