@codyswann/lisa 4.109.2 → 4.110.1

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 (492) hide show
  1. package/all/copy-overwrite/scripts/check-threshold-ratchet.mjs +4 -2
  2. package/all/copy-overwrite/scripts/lisa-hooks/block-direct-issue-create.sh +10 -5
  3. package/all/copy-overwrite/scripts/lisa-hooks/block-no-verify.sh +4 -3
  4. package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +2 -2
  5. package/all/create-only/.agents/rules/README.md +3 -2
  6. package/all/create-only/.lisa/ACCOUNTABILITY.md +16 -10
  7. package/all/create-only/.lisa/DEPENDENCY_DECISIONS.md +15 -12
  8. package/dist/codex/scripts/block-no-verify.sh +1 -1
  9. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  10. package/dist/core/lisa-owned-hash-ledger.js +18 -0
  11. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  12. package/dist/core/lisa.d.ts +4 -3
  13. package/dist/core/lisa.d.ts.map +1 -1
  14. package/dist/core/lisa.js +12 -5
  15. package/dist/core/lisa.js.map +1 -1
  16. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  17. package/dist/core/project-config-dependencies.d.ts +29 -8
  18. package/dist/core/project-config-dependencies.d.ts.map +1 -1
  19. package/dist/core/project-config-dependencies.js +55 -15
  20. package/dist/core/project-config-dependencies.js.map +1 -1
  21. package/dist/core/project-config-human-gate.d.ts +105 -0
  22. package/dist/core/project-config-human-gate.d.ts.map +1 -0
  23. package/dist/core/project-config-human-gate.js +178 -0
  24. package/dist/core/project-config-human-gate.js.map +1 -0
  25. package/dist/core/project-config-learnings.d.ts +28 -9
  26. package/dist/core/project-config-learnings.d.ts.map +1 -1
  27. package/dist/core/project-config-learnings.js +51 -13
  28. package/dist/core/project-config-learnings.js.map +1 -1
  29. package/dist/core/project-config.d.ts +13 -3
  30. package/dist/core/project-config.d.ts.map +1 -1
  31. package/dist/core/project-config.js +6 -2
  32. package/dist/core/project-config.js.map +1 -1
  33. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  34. package/dist/core/upstream-evidence-manifest.js +84 -69
  35. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  36. package/dist/opencode/plugin-templates/block-no-verify.sh +4 -3
  37. package/dist/opencode/plugin-templates/lisa-block-direct-issue-create.ts +10 -4
  38. package/dist/utils/usage-accounting.d.ts +13 -0
  39. package/dist/utils/usage-accounting.d.ts.map +1 -1
  40. package/dist/utils/usage-accounting.js +67 -4
  41. package/dist/utils/usage-accounting.js.map +1 -1
  42. package/dist/utils/usage-artifact-ref.d.ts +30 -0
  43. package/dist/utils/usage-artifact-ref.d.ts.map +1 -0
  44. package/dist/utils/usage-artifact-ref.js +55 -0
  45. package/dist/utils/usage-artifact-ref.js.map +1 -0
  46. package/package.json +4 -4
  47. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  49. package/plugins/lisa/.codex-plugin/scripts/blocker-edge-resolution.mjs +9 -5
  50. package/plugins/lisa/.codex-plugin/scripts/human-gate-act.mjs +278 -0
  51. package/plugins/lisa/.codex-plugin/scripts/intake-blocker-reprobe.mjs +215 -39
  52. package/plugins/lisa/.codex-plugin/scripts/ready-queue-order.mjs +9 -3
  53. package/plugins/lisa/.codex-plugin/skills/lisa-confluence-to-tracker/SKILL.md +1 -1
  54. package/plugins/lisa/.codex-plugin/skills/lisa-debrief-apply/SKILL.md +4 -4
  55. package/plugins/lisa/.codex-plugin/skills/lisa-debrief-apply/agents/openai.yaml +2 -2
  56. package/plugins/lisa/.codex-plugin/skills/lisa-drive-pr-to-merge/SKILL.md +18 -7
  57. package/plugins/lisa/.codex-plugin/skills/lisa-exploratory-qa/SKILL.md +23 -12
  58. package/plugins/lisa/.codex-plugin/skills/lisa-github-build-intake/SKILL.md +14 -9
  59. package/plugins/lisa/.codex-plugin/skills/lisa-github-to-tracker/SKILL.md +1 -1
  60. package/plugins/lisa/.codex-plugin/skills/lisa-github-write-issue/SKILL.md +2 -2
  61. package/plugins/lisa/.codex-plugin/skills/lisa-improve-harness/SKILL.md +24 -7
  62. package/plugins/lisa/.codex-plugin/skills/lisa-jira-build-intake/SKILL.md +14 -10
  63. package/plugins/lisa/.codex-plugin/skills/lisa-jira-write-ticket/SKILL.md +4 -4
  64. package/plugins/lisa/.codex-plugin/skills/lisa-learnings-audit/SKILL.md +64 -32
  65. package/plugins/lisa/.codex-plugin/skills/lisa-linear-build-intake/SKILL.md +9 -9
  66. package/plugins/lisa/.codex-plugin/skills/lisa-linear-to-tracker/SKILL.md +1 -1
  67. package/plugins/lisa/.codex-plugin/skills/lisa-linear-write-issue/SKILL.md +5 -5
  68. package/plugins/lisa/.codex-plugin/skills/lisa-monitor/SKILL.md +10 -4
  69. package/plugins/lisa/.codex-plugin/skills/lisa-notion-to-tracker/SKILL.md +1 -1
  70. package/plugins/lisa/.codex-plugin/skills/lisa-persist-learning/SKILL.md +5 -5
  71. package/plugins/lisa/.codex-plugin/skills/lisa-project-ideation/SKILL.md +10 -4
  72. package/plugins/lisa/.codex-plugin/skills/lisa-repair-intake/SKILL.md +24 -13
  73. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +19 -2
  74. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/references/runbook-template.md +8 -4
  75. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-cycle.mjs +9 -0
  76. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-queue.mjs +6 -0
  77. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-usage.mjs +1 -1
  78. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/escalation-overruled.mjs +1 -1
  79. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/human-needed.mjs +16 -5
  80. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/reconcile.mjs +76 -9
  81. package/plugins/lisa/.codex-plugin/skills/lisa-setup-automations/SKILL.md +7 -5
  82. package/plugins/lisa/.codex-plugin/skills/lisa-track/SKILL.md +3 -3
  83. package/plugins/lisa/.codex-plugin/skills/lisa-usage-accounting/SKILL.md +5 -1
  84. package/plugins/lisa/agents/learning-judge.md +5 -5
  85. package/plugins/lisa/agents/skill-evaluator.md +4 -4
  86. package/plugins/lisa/commands/debrief/apply.md +1 -1
  87. package/plugins/lisa/commands/learnings/audit.md +2 -2
  88. package/plugins/lisa/commands/persist-learning.md +1 -1
  89. package/plugins/lisa/hooks/block-direct-issue-create.sh +10 -5
  90. package/plugins/lisa/hooks/block-no-verify.agy.sh +1 -1
  91. package/plugins/lisa/hooks/block-no-verify.sh +4 -3
  92. package/plugins/lisa/hooks/inject-resolved-config.mjs +236 -14
  93. package/plugins/lisa/hooks/threshold-ratchet.mjs +4 -2
  94. package/plugins/lisa/rules/eager/base-rules.md +1 -1
  95. package/plugins/lisa/rules/eager/do-it-now.md +2 -2
  96. package/plugins/lisa/rules/eager/learnings-ladder.md +1 -1
  97. package/plugins/lisa/rules/eager/security-audit-handling.md +5 -5
  98. package/plugins/lisa/rules/reference/automation-runbook-contract.md +37 -22
  99. package/plugins/lisa/rules/reference/base-rules.md +1 -1
  100. package/plugins/lisa/rules/reference/config-resolution.md +7 -6
  101. package/plugins/lisa/rules/reference/dependency-trust-classes.md +28 -18
  102. package/plugins/lisa/rules/reference/factory-model.md +17 -8
  103. package/plugins/lisa/rules/reference/intent-routing.md +3 -3
  104. package/plugins/lisa/rules/reference/learnings-ladder.md +1 -1
  105. package/plugins/lisa/rules/reference/promotion-contract.md +5 -2
  106. package/plugins/lisa/rules/reference/ready-role-filing.md +32 -22
  107. package/plugins/lisa/rules/reference/security-audit-handling.md +9 -6
  108. package/plugins/lisa/rules/reference/usage-accounting.md +29 -1
  109. package/plugins/lisa/scripts/blocker-edge-resolution.mjs +9 -5
  110. package/plugins/lisa/scripts/human-gate-act.mjs +104 -8
  111. package/plugins/lisa/scripts/human-gate-lift.mjs +14 -7
  112. package/plugins/lisa/scripts/intake-blocker-reprobe.mjs +215 -39
  113. package/plugins/lisa/scripts/ready-queue-order.mjs +9 -3
  114. package/plugins/lisa/skills/lisa-confluence-to-tracker/SKILL.md +1 -1
  115. package/plugins/lisa/skills/lisa-debrief-apply/SKILL.md +3 -3
  116. package/plugins/lisa/skills/lisa-debrief-apply/agents/openai.yaml +2 -2
  117. package/plugins/lisa/skills/lisa-drive-pr-to-merge/SKILL.md +18 -7
  118. package/plugins/lisa/skills/lisa-exploratory-qa/SKILL.md +23 -12
  119. package/plugins/lisa/skills/lisa-github-build-intake/SKILL.md +14 -9
  120. package/plugins/lisa/skills/lisa-github-to-tracker/SKILL.md +1 -1
  121. package/plugins/lisa/skills/lisa-github-write-issue/SKILL.md +2 -2
  122. package/plugins/lisa/skills/lisa-improve-harness/SKILL.md +24 -7
  123. package/plugins/lisa/skills/lisa-jira-build-intake/SKILL.md +14 -10
  124. package/plugins/lisa/skills/lisa-jira-write-ticket/SKILL.md +4 -4
  125. package/plugins/lisa/skills/lisa-learnings-audit/SKILL.md +64 -32
  126. package/plugins/lisa/skills/lisa-linear-build-intake/SKILL.md +9 -9
  127. package/plugins/lisa/skills/lisa-linear-to-tracker/SKILL.md +1 -1
  128. package/plugins/lisa/skills/lisa-linear-write-issue/SKILL.md +5 -5
  129. package/plugins/lisa/skills/lisa-monitor/SKILL.md +10 -4
  130. package/plugins/lisa/skills/lisa-notion-to-tracker/SKILL.md +1 -1
  131. package/plugins/lisa/skills/lisa-persist-learning/SKILL.md +5 -5
  132. package/plugins/lisa/skills/lisa-project-ideation/SKILL.md +10 -4
  133. package/plugins/lisa/skills/lisa-repair-intake/SKILL.md +24 -13
  134. package/plugins/lisa/skills/lisa-session-manager/SKILL.md +19 -2
  135. package/plugins/lisa/skills/lisa-session-manager/references/runbook-template.md +8 -4
  136. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-cycle.mjs +9 -0
  137. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-queue.mjs +6 -0
  138. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-usage.mjs +1 -1
  139. package/plugins/lisa/skills/lisa-session-manager/scripts/escalation-overruled.mjs +1 -1
  140. package/plugins/lisa/skills/lisa-session-manager/scripts/human-needed.mjs +16 -5
  141. package/plugins/lisa/skills/lisa-session-manager/scripts/reconcile.mjs +76 -9
  142. package/plugins/lisa/skills/lisa-setup-automations/SKILL.md +7 -5
  143. package/plugins/lisa/skills/lisa-track/SKILL.md +3 -3
  144. package/plugins/lisa/skills/lisa-usage-accounting/SKILL.md +5 -1
  145. package/plugins/lisa-agy/agents/learning-judge.md +5 -5
  146. package/plugins/lisa-agy/agents/skill-evaluator.md +4 -4
  147. package/plugins/lisa-agy/commands/lisa/debrief/apply.md +1 -1
  148. package/plugins/lisa-agy/commands/lisa/learnings/audit.md +2 -2
  149. package/plugins/lisa-agy/commands/lisa/persist-learning.md +1 -1
  150. package/plugins/lisa-agy/hooks/block-direct-issue-create.sh +10 -5
  151. package/plugins/lisa-agy/hooks/block-no-verify.agy.sh +1 -1
  152. package/plugins/lisa-agy/plugin.json +1 -1
  153. package/plugins/lisa-agy/scripts/blocker-edge-resolution.mjs +9 -5
  154. package/plugins/lisa-agy/scripts/human-gate-act.mjs +104 -8
  155. package/plugins/lisa-agy/scripts/human-gate-lift.mjs +14 -7
  156. package/plugins/lisa-agy/scripts/intake-blocker-reprobe.mjs +215 -39
  157. package/plugins/lisa-agy/scripts/ready-queue-order.mjs +9 -3
  158. package/plugins/lisa-agy/skills/lisa-confluence-to-tracker/SKILL.md +1 -1
  159. package/plugins/lisa-agy/skills/lisa-debrief-apply/SKILL.md +3 -3
  160. package/plugins/lisa-agy/skills/lisa-drive-pr-to-merge/SKILL.md +18 -7
  161. package/plugins/lisa-agy/skills/lisa-exploratory-qa/SKILL.md +23 -12
  162. package/plugins/lisa-agy/skills/lisa-github-build-intake/SKILL.md +14 -9
  163. package/plugins/lisa-agy/skills/lisa-github-to-tracker/SKILL.md +1 -1
  164. package/plugins/lisa-agy/skills/lisa-github-write-issue/SKILL.md +2 -2
  165. package/plugins/lisa-agy/skills/lisa-improve-harness/SKILL.md +24 -7
  166. package/plugins/lisa-agy/skills/lisa-jira-build-intake/SKILL.md +14 -10
  167. package/plugins/lisa-agy/skills/lisa-jira-write-ticket/SKILL.md +4 -4
  168. package/plugins/lisa-agy/skills/lisa-learnings-audit/SKILL.md +64 -32
  169. package/plugins/lisa-agy/skills/lisa-linear-build-intake/SKILL.md +9 -9
  170. package/plugins/lisa-agy/skills/lisa-linear-to-tracker/SKILL.md +1 -1
  171. package/plugins/lisa-agy/skills/lisa-linear-write-issue/SKILL.md +5 -5
  172. package/plugins/lisa-agy/skills/lisa-monitor/SKILL.md +10 -4
  173. package/plugins/lisa-agy/skills/lisa-notion-to-tracker/SKILL.md +1 -1
  174. package/plugins/lisa-agy/skills/lisa-persist-learning/SKILL.md +5 -5
  175. package/plugins/lisa-agy/skills/lisa-project-ideation/SKILL.md +10 -4
  176. package/plugins/lisa-agy/skills/lisa-repair-intake/SKILL.md +24 -13
  177. package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +19 -2
  178. package/plugins/lisa-agy/skills/lisa-session-manager/references/runbook-template.md +8 -4
  179. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-cycle.mjs +9 -0
  180. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-queue.mjs +6 -0
  181. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-usage.mjs +1 -1
  182. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/escalation-overruled.mjs +1 -1
  183. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/human-needed.mjs +16 -5
  184. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/reconcile.mjs +76 -9
  185. package/plugins/lisa-agy/skills/lisa-setup-automations/SKILL.md +7 -5
  186. package/plugins/lisa-agy/skills/lisa-track/SKILL.md +3 -3
  187. package/plugins/lisa-agy/skills/lisa-usage-accounting/SKILL.md +5 -1
  188. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  189. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  190. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  191. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  192. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  193. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  194. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  195. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  196. package/plugins/lisa-copilot/agents/learning-judge.agent.md +5 -5
  197. package/plugins/lisa-copilot/agents/skill-evaluator.agent.md +4 -4
  198. package/plugins/lisa-copilot/commands/lisa/debrief/apply.md +1 -1
  199. package/plugins/lisa-copilot/commands/lisa/learnings/audit.md +2 -2
  200. package/plugins/lisa-copilot/commands/lisa/persist-learning.md +1 -1
  201. package/plugins/lisa-copilot/hooks/block-direct-issue-create.sh +10 -5
  202. package/plugins/lisa-copilot/hooks/block-no-verify.sh +4 -3
  203. package/plugins/lisa-copilot/hooks/inject-resolved-config.mjs +236 -14
  204. package/plugins/lisa-copilot/hooks/threshold-ratchet.mjs +4 -2
  205. package/plugins/lisa-copilot/rules/eager/base-rules.md +1 -1
  206. package/plugins/lisa-copilot/rules/eager/do-it-now.md +2 -2
  207. package/plugins/lisa-copilot/rules/eager/learnings-ladder.md +1 -1
  208. package/plugins/lisa-copilot/rules/eager/security-audit-handling.md +5 -5
  209. package/plugins/lisa-copilot/rules/reference/automation-runbook-contract.md +37 -22
  210. package/plugins/lisa-copilot/rules/reference/base-rules.md +1 -1
  211. package/plugins/lisa-copilot/rules/reference/config-resolution.md +7 -6
  212. package/plugins/lisa-copilot/rules/reference/dependency-trust-classes.md +28 -18
  213. package/plugins/lisa-copilot/rules/reference/factory-model.md +17 -8
  214. package/plugins/lisa-copilot/rules/reference/intent-routing.md +3 -3
  215. package/plugins/lisa-copilot/rules/reference/learnings-ladder.md +1 -1
  216. package/plugins/lisa-copilot/rules/reference/promotion-contract.md +5 -2
  217. package/plugins/lisa-copilot/rules/reference/ready-role-filing.md +32 -22
  218. package/plugins/lisa-copilot/rules/reference/security-audit-handling.md +9 -6
  219. package/plugins/lisa-copilot/rules/reference/usage-accounting.md +29 -1
  220. package/plugins/lisa-copilot/scripts/blocker-edge-resolution.mjs +9 -5
  221. package/plugins/lisa-copilot/scripts/human-gate-act.mjs +104 -8
  222. package/plugins/lisa-copilot/scripts/human-gate-lift.mjs +14 -7
  223. package/plugins/lisa-copilot/scripts/intake-blocker-reprobe.mjs +215 -39
  224. package/plugins/lisa-copilot/scripts/ready-queue-order.mjs +9 -3
  225. package/plugins/lisa-copilot/skills/lisa-confluence-to-tracker/SKILL.md +1 -1
  226. package/plugins/lisa-copilot/skills/lisa-debrief-apply/SKILL.md +3 -3
  227. package/plugins/lisa-copilot/skills/lisa-drive-pr-to-merge/SKILL.md +18 -7
  228. package/plugins/lisa-copilot/skills/lisa-exploratory-qa/SKILL.md +23 -12
  229. package/plugins/lisa-copilot/skills/lisa-github-build-intake/SKILL.md +14 -9
  230. package/plugins/lisa-copilot/skills/lisa-github-to-tracker/SKILL.md +1 -1
  231. package/plugins/lisa-copilot/skills/lisa-github-write-issue/SKILL.md +2 -2
  232. package/plugins/lisa-copilot/skills/lisa-improve-harness/SKILL.md +24 -7
  233. package/plugins/lisa-copilot/skills/lisa-jira-build-intake/SKILL.md +14 -10
  234. package/plugins/lisa-copilot/skills/lisa-jira-write-ticket/SKILL.md +4 -4
  235. package/plugins/lisa-copilot/skills/lisa-learnings-audit/SKILL.md +64 -32
  236. package/plugins/lisa-copilot/skills/lisa-linear-build-intake/SKILL.md +9 -9
  237. package/plugins/lisa-copilot/skills/lisa-linear-to-tracker/SKILL.md +1 -1
  238. package/plugins/lisa-copilot/skills/lisa-linear-write-issue/SKILL.md +5 -5
  239. package/plugins/lisa-copilot/skills/lisa-monitor/SKILL.md +10 -4
  240. package/plugins/lisa-copilot/skills/lisa-notion-to-tracker/SKILL.md +1 -1
  241. package/plugins/lisa-copilot/skills/lisa-persist-learning/SKILL.md +5 -5
  242. package/plugins/lisa-copilot/skills/lisa-project-ideation/SKILL.md +10 -4
  243. package/plugins/lisa-copilot/skills/lisa-repair-intake/SKILL.md +24 -13
  244. package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +19 -2
  245. package/plugins/lisa-copilot/skills/lisa-session-manager/references/runbook-template.md +8 -4
  246. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-cycle.mjs +9 -0
  247. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-queue.mjs +6 -0
  248. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-usage.mjs +1 -1
  249. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/escalation-overruled.mjs +1 -1
  250. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/human-needed.mjs +16 -5
  251. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/reconcile.mjs +76 -9
  252. package/plugins/lisa-copilot/skills/lisa-setup-automations/SKILL.md +7 -5
  253. package/plugins/lisa-copilot/skills/lisa-track/SKILL.md +3 -3
  254. package/plugins/lisa-copilot/skills/lisa-usage-accounting/SKILL.md +5 -1
  255. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  256. package/plugins/lisa-cursor/agents/learning-judge.md +5 -5
  257. package/plugins/lisa-cursor/agents/skill-evaluator.md +4 -4
  258. package/plugins/lisa-cursor/commands/lisa/debrief/apply.md +1 -1
  259. package/plugins/lisa-cursor/commands/lisa/learnings/audit.md +2 -2
  260. package/plugins/lisa-cursor/commands/lisa/persist-learning.md +1 -1
  261. package/plugins/lisa-cursor/hooks/block-direct-issue-create.sh +10 -5
  262. package/plugins/lisa-cursor/hooks/block-no-verify.sh +4 -3
  263. package/plugins/lisa-cursor/hooks/inject-resolved-config.mjs +236 -14
  264. package/plugins/lisa-cursor/hooks/threshold-ratchet.mjs +4 -2
  265. package/plugins/lisa-cursor/rules/automation-runbook-contract-reference.mdc +37 -22
  266. package/plugins/lisa-cursor/rules/base-rules-reference.mdc +1 -1
  267. package/plugins/lisa-cursor/rules/base-rules.mdc +1 -1
  268. package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +7 -6
  269. package/plugins/lisa-cursor/rules/dependency-trust-classes-reference.mdc +28 -18
  270. package/plugins/lisa-cursor/rules/do-it-now.mdc +2 -2
  271. package/plugins/lisa-cursor/rules/factory-model-reference.mdc +17 -8
  272. package/plugins/lisa-cursor/rules/intent-routing-reference.mdc +3 -3
  273. package/plugins/lisa-cursor/rules/learnings-ladder-reference.mdc +1 -1
  274. package/plugins/lisa-cursor/rules/learnings-ladder.mdc +1 -1
  275. package/plugins/lisa-cursor/rules/promotion-contract-reference.mdc +5 -2
  276. package/plugins/lisa-cursor/rules/ready-role-filing-reference.mdc +32 -22
  277. package/plugins/lisa-cursor/rules/security-audit-handling-reference.mdc +9 -6
  278. package/plugins/lisa-cursor/rules/security-audit-handling.mdc +5 -5
  279. package/plugins/lisa-cursor/rules/usage-accounting-reference.mdc +29 -1
  280. package/plugins/lisa-cursor/scripts/blocker-edge-resolution.mjs +9 -5
  281. package/plugins/lisa-cursor/scripts/human-gate-act.mjs +104 -8
  282. package/plugins/lisa-cursor/scripts/human-gate-lift.mjs +14 -7
  283. package/plugins/lisa-cursor/scripts/intake-blocker-reprobe.mjs +215 -39
  284. package/plugins/lisa-cursor/scripts/ready-queue-order.mjs +9 -3
  285. package/plugins/lisa-cursor/skills/lisa-confluence-to-tracker/SKILL.md +1 -1
  286. package/plugins/lisa-cursor/skills/lisa-debrief-apply/SKILL.md +3 -3
  287. package/plugins/lisa-cursor/skills/lisa-drive-pr-to-merge/SKILL.md +18 -7
  288. package/plugins/lisa-cursor/skills/lisa-exploratory-qa/SKILL.md +23 -12
  289. package/plugins/lisa-cursor/skills/lisa-github-build-intake/SKILL.md +14 -9
  290. package/plugins/lisa-cursor/skills/lisa-github-to-tracker/SKILL.md +1 -1
  291. package/plugins/lisa-cursor/skills/lisa-github-write-issue/SKILL.md +2 -2
  292. package/plugins/lisa-cursor/skills/lisa-improve-harness/SKILL.md +24 -7
  293. package/plugins/lisa-cursor/skills/lisa-jira-build-intake/SKILL.md +14 -10
  294. package/plugins/lisa-cursor/skills/lisa-jira-write-ticket/SKILL.md +4 -4
  295. package/plugins/lisa-cursor/skills/lisa-learnings-audit/SKILL.md +64 -32
  296. package/plugins/lisa-cursor/skills/lisa-linear-build-intake/SKILL.md +9 -9
  297. package/plugins/lisa-cursor/skills/lisa-linear-to-tracker/SKILL.md +1 -1
  298. package/plugins/lisa-cursor/skills/lisa-linear-write-issue/SKILL.md +5 -5
  299. package/plugins/lisa-cursor/skills/lisa-monitor/SKILL.md +10 -4
  300. package/plugins/lisa-cursor/skills/lisa-notion-to-tracker/SKILL.md +1 -1
  301. package/plugins/lisa-cursor/skills/lisa-persist-learning/SKILL.md +5 -5
  302. package/plugins/lisa-cursor/skills/lisa-project-ideation/SKILL.md +10 -4
  303. package/plugins/lisa-cursor/skills/lisa-repair-intake/SKILL.md +24 -13
  304. package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +19 -2
  305. package/plugins/lisa-cursor/skills/lisa-session-manager/references/runbook-template.md +8 -4
  306. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-cycle.mjs +9 -0
  307. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-queue.mjs +6 -0
  308. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-usage.mjs +1 -1
  309. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/escalation-overruled.mjs +1 -1
  310. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/human-needed.mjs +16 -5
  311. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/reconcile.mjs +76 -9
  312. package/plugins/lisa-cursor/skills/lisa-setup-automations/SKILL.md +7 -5
  313. package/plugins/lisa-cursor/skills/lisa-track/SKILL.md +3 -3
  314. package/plugins/lisa-cursor/skills/lisa-usage-accounting/SKILL.md +5 -1
  315. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  316. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  317. package/plugins/lisa-devin/agents/learning-judge.md +5 -5
  318. package/plugins/lisa-devin/agents/skill-evaluator.md +4 -4
  319. package/plugins/lisa-devin/hooks/block-direct-issue-create.sh +10 -5
  320. package/plugins/lisa-devin/hooks/block-no-verify.sh +4 -3
  321. package/plugins/lisa-devin/hooks/inject-resolved-config.mjs +236 -14
  322. package/plugins/lisa-devin/hooks/threshold-ratchet.mjs +4 -2
  323. package/plugins/lisa-devin/rules/eager/base-rules.md +1 -1
  324. package/plugins/lisa-devin/rules/eager/do-it-now.md +2 -2
  325. package/plugins/lisa-devin/rules/eager/learnings-ladder.md +1 -1
  326. package/plugins/lisa-devin/rules/eager/security-audit-handling.md +5 -5
  327. package/plugins/lisa-devin/rules/reference/automation-runbook-contract.md +37 -22
  328. package/plugins/lisa-devin/rules/reference/base-rules.md +1 -1
  329. package/plugins/lisa-devin/rules/reference/config-resolution.md +7 -6
  330. package/plugins/lisa-devin/rules/reference/dependency-trust-classes.md +28 -18
  331. package/plugins/lisa-devin/rules/reference/factory-model.md +17 -8
  332. package/plugins/lisa-devin/rules/reference/intent-routing.md +3 -3
  333. package/plugins/lisa-devin/rules/reference/learnings-ladder.md +1 -1
  334. package/plugins/lisa-devin/rules/reference/promotion-contract.md +5 -2
  335. package/plugins/lisa-devin/rules/reference/ready-role-filing.md +32 -22
  336. package/plugins/lisa-devin/rules/reference/security-audit-handling.md +9 -6
  337. package/plugins/lisa-devin/rules/reference/usage-accounting.md +29 -1
  338. package/plugins/lisa-devin/scripts/blocker-edge-resolution.mjs +9 -5
  339. package/plugins/lisa-devin/scripts/human-gate-act.mjs +104 -8
  340. package/plugins/lisa-devin/scripts/human-gate-lift.mjs +14 -7
  341. package/plugins/lisa-devin/scripts/intake-blocker-reprobe.mjs +215 -39
  342. package/plugins/lisa-devin/scripts/ready-queue-order.mjs +9 -3
  343. package/plugins/lisa-devin/skills/lisa-confluence-to-tracker/SKILL.md +1 -1
  344. package/plugins/lisa-devin/skills/lisa-debrief-apply/SKILL.md +3 -3
  345. package/plugins/lisa-devin/skills/lisa-drive-pr-to-merge/SKILL.md +18 -7
  346. package/plugins/lisa-devin/skills/lisa-exploratory-qa/SKILL.md +23 -12
  347. package/plugins/lisa-devin/skills/lisa-github-build-intake/SKILL.md +14 -9
  348. package/plugins/lisa-devin/skills/lisa-github-to-tracker/SKILL.md +1 -1
  349. package/plugins/lisa-devin/skills/lisa-github-write-issue/SKILL.md +2 -2
  350. package/plugins/lisa-devin/skills/lisa-improve-harness/SKILL.md +24 -7
  351. package/plugins/lisa-devin/skills/lisa-jira-build-intake/SKILL.md +14 -10
  352. package/plugins/lisa-devin/skills/lisa-jira-write-ticket/SKILL.md +4 -4
  353. package/plugins/lisa-devin/skills/lisa-learnings-audit/SKILL.md +64 -32
  354. package/plugins/lisa-devin/skills/lisa-linear-build-intake/SKILL.md +9 -9
  355. package/plugins/lisa-devin/skills/lisa-linear-to-tracker/SKILL.md +1 -1
  356. package/plugins/lisa-devin/skills/lisa-linear-write-issue/SKILL.md +5 -5
  357. package/plugins/lisa-devin/skills/lisa-monitor/SKILL.md +10 -4
  358. package/plugins/lisa-devin/skills/lisa-notion-to-tracker/SKILL.md +1 -1
  359. package/plugins/lisa-devin/skills/lisa-persist-learning/SKILL.md +5 -5
  360. package/plugins/lisa-devin/skills/lisa-project-ideation/SKILL.md +10 -4
  361. package/plugins/lisa-devin/skills/lisa-repair-intake/SKILL.md +24 -13
  362. package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +19 -2
  363. package/plugins/lisa-devin/skills/lisa-session-manager/references/runbook-template.md +8 -4
  364. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-cycle.mjs +9 -0
  365. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-queue.mjs +6 -0
  366. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-usage.mjs +1 -1
  367. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/escalation-overruled.mjs +1 -1
  368. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/human-needed.mjs +16 -5
  369. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/reconcile.mjs +76 -9
  370. package/plugins/lisa-devin/skills/lisa-setup-automations/SKILL.md +7 -5
  371. package/plugins/lisa-devin/skills/lisa-track/SKILL.md +3 -3
  372. package/plugins/lisa-devin/skills/lisa-usage-accounting/SKILL.md +5 -1
  373. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  374. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  375. package/plugins/lisa-expo-agy/plugin.json +1 -1
  376. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  377. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  378. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  379. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  380. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  381. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  382. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  383. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  384. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  385. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  386. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  387. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  388. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  389. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  390. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  391. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  392. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  393. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  394. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  395. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  396. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  397. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  398. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  399. package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
  400. package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
  401. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  402. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  403. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  404. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  405. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  406. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  407. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  408. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  409. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  410. package/plugins/lisa-rails-agy/plugin.json +1 -1
  411. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  412. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  413. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  414. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  415. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  416. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  417. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  418. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  419. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  420. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  421. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  422. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  423. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  424. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  425. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  426. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  427. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  428. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  429. package/plugins/src/base/agents/learning-judge.md +5 -5
  430. package/plugins/src/base/agents/skill-evaluator.md +4 -4
  431. package/plugins/src/base/commands/debrief/apply.md +1 -1
  432. package/plugins/src/base/commands/learnings/audit.md +2 -2
  433. package/plugins/src/base/commands/persist-learning.md +1 -1
  434. package/plugins/src/base/hooks/block-direct-issue-create.sh +10 -5
  435. package/plugins/src/base/hooks/block-no-verify.agy.sh +1 -1
  436. package/plugins/src/base/hooks/block-no-verify.sh +4 -3
  437. package/plugins/src/base/hooks/inject-resolved-config.mjs +236 -14
  438. package/plugins/src/base/hooks/threshold-ratchet.mjs +4 -2
  439. package/plugins/src/base/rules/eager/base-rules.md +1 -1
  440. package/plugins/src/base/rules/eager/do-it-now.md +2 -2
  441. package/plugins/src/base/rules/eager/learnings-ladder.md +1 -1
  442. package/plugins/src/base/rules/eager/security-audit-handling.md +5 -5
  443. package/plugins/src/base/rules/reference/automation-runbook-contract.md +37 -22
  444. package/plugins/src/base/rules/reference/base-rules.md +1 -1
  445. package/plugins/src/base/rules/reference/config-resolution.md +7 -6
  446. package/plugins/src/base/rules/reference/dependency-trust-classes.md +28 -18
  447. package/plugins/src/base/rules/reference/factory-model.md +17 -8
  448. package/plugins/src/base/rules/reference/intent-routing.md +3 -3
  449. package/plugins/src/base/rules/reference/learnings-ladder.md +1 -1
  450. package/plugins/src/base/rules/reference/promotion-contract.md +5 -2
  451. package/plugins/src/base/rules/reference/ready-role-filing.md +32 -22
  452. package/plugins/src/base/rules/reference/security-audit-handling.md +9 -6
  453. package/plugins/src/base/rules/reference/usage-accounting.md +29 -1
  454. package/plugins/src/base/scripts/blocker-edge-resolution.mjs +9 -5
  455. package/plugins/src/base/scripts/human-gate-act.mjs +104 -8
  456. package/plugins/src/base/scripts/human-gate-lift.mjs +14 -7
  457. package/plugins/src/base/scripts/intake-blocker-reprobe.mjs +215 -39
  458. package/plugins/src/base/scripts/ready-queue-order.mjs +9 -3
  459. package/plugins/src/base/skills/lisa-confluence-to-tracker/SKILL.md +1 -1
  460. package/plugins/src/base/skills/lisa-debrief-apply/SKILL.md +3 -3
  461. package/plugins/src/base/skills/lisa-drive-pr-to-merge/SKILL.md +18 -7
  462. package/plugins/src/base/skills/lisa-exploratory-qa/SKILL.md +23 -12
  463. package/plugins/src/base/skills/lisa-github-build-intake/SKILL.md +14 -9
  464. package/plugins/src/base/skills/lisa-github-to-tracker/SKILL.md +1 -1
  465. package/plugins/src/base/skills/lisa-github-write-issue/SKILL.md +2 -2
  466. package/plugins/src/base/skills/lisa-improve-harness/SKILL.md +24 -7
  467. package/plugins/src/base/skills/lisa-jira-build-intake/SKILL.md +14 -10
  468. package/plugins/src/base/skills/lisa-jira-write-ticket/SKILL.md +4 -4
  469. package/plugins/src/base/skills/lisa-learnings-audit/SKILL.md +64 -32
  470. package/plugins/src/base/skills/lisa-linear-build-intake/SKILL.md +9 -9
  471. package/plugins/src/base/skills/lisa-linear-to-tracker/SKILL.md +1 -1
  472. package/plugins/src/base/skills/lisa-linear-write-issue/SKILL.md +5 -5
  473. package/plugins/src/base/skills/lisa-monitor/SKILL.md +10 -4
  474. package/plugins/src/base/skills/lisa-notion-to-tracker/SKILL.md +1 -1
  475. package/plugins/src/base/skills/lisa-persist-learning/SKILL.md +5 -5
  476. package/plugins/src/base/skills/lisa-project-ideation/SKILL.md +10 -4
  477. package/plugins/src/base/skills/lisa-repair-intake/SKILL.md +24 -13
  478. package/plugins/src/base/skills/lisa-session-manager/SKILL.md +19 -2
  479. package/plugins/src/base/skills/lisa-session-manager/references/runbook-template.md +8 -4
  480. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-cycle.mjs +9 -0
  481. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-queue.mjs +6 -0
  482. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-usage.mjs +1 -1
  483. package/plugins/src/base/skills/lisa-session-manager/scripts/escalation-overruled.mjs +1 -1
  484. package/plugins/src/base/skills/lisa-session-manager/scripts/human-needed.mjs +16 -5
  485. package/plugins/src/base/skills/lisa-session-manager/scripts/reconcile.mjs +76 -9
  486. package/plugins/src/base/skills/lisa-setup-automations/SKILL.md +7 -5
  487. package/plugins/src/base/skills/lisa-track/SKILL.md +3 -3
  488. package/plugins/src/base/skills/lisa-usage-accounting/SKILL.md +5 -1
  489. package/rails/copy-overwrite/scripts/check-threshold-ratchet.mjs +4 -2
  490. package/typescript/copy-contents/.husky/pre-commit +3 -2
  491. package/typescript/copy-overwrite/.github/GITHUB_ACTIONS.md +2 -1
  492. package/typescript/copy-overwrite/scripts/check-threshold-ratchet.mjs +4 -2
@@ -47,7 +47,7 @@ For an existing incidental item, read its discussion, linked PRs and dependencie
47
47
  - an explicit reference matching the configured tracker (`KEY-123`, `org/repo#123` or issue URL, Linear team identifier);
48
48
  - an existing file path containing a specification (read the entire file, without offset/limit);
49
49
  - plain-text work description.
50
- 3. Detect the caller's readiness declaration, which is orthogonal to the classification above. Absent any declaration this is the default build-ready path. A caller deliberately holding the work because it needs an act an agent cannot perform (a credential only a person holds, spend, an external account, a legal or compliance sign-off, an accountable person, a system the agent cannot reach, or a project-declared human-only class) passes `human_gate: "<the act a person must perform>"`. A choice with a reasonable default is not a gate: decide it, record the decision on the item, and take the build-ready path (`ready-role-filing`, "What a human gate is"). The writer refuses a topic-only reason with exit 1 from `scripts/human-gate-act.mjs check`; the two declarations are mutually exclusive and a `human_gate` present but empty is a blocking error, because an unexplained hold is indistinguishable from an accident.
50
+ 3. Detect the caller's readiness declaration, which is orthogonal to the classification above. Absent any declaration this is the default build-ready path. A caller deliberately holding the work because it needs an act an agent cannot perform (an access act: `credential` (complete a login or supply a credential only a person holds), `spend`, `external-account`, `legal-signoff` (sign a legal agreement on the company's behalf), `person-only-account` (a protected deployment, a required reviewer, an account only a person holds), `unreachable-system`, or `operator-hold` (a hold the operator explicitly asked for); `human-authored-surface` (an edit to a surface declared human-authored, which no agent writes: an authorship rule, valid in both modes); or a decision class the project declared human-only (`humanGate.humanOnly`). Under `humanGate.mode: "strict"` the strict-only acts `compliance-signoff`, `accountable-person` and `lisa-policy` also count) passes `human_gate: "<the act a person must perform>"`. A choice with a reasonable default is not a gate: decide it, record the decision on the item, and take the build-ready path (`ready-role-filing`, "What a human gate is"). The writer refuses a topic-only reason with exit 1 from `scripts/human-gate-act.mjs check`; the two declarations are mutually exclusive and a `human_gate` present but empty is a blocking error, because an unexplained hold is indistinguishable from an accident.
51
51
  4. Preserve the full resolved specification for the caller. Do not treat a ticket-like token for a different provider/project as plain text; report the mismatch.
52
52
 
53
53
  ## Phase 2 — Resolve one live work item
@@ -97,7 +97,7 @@ Skip this step silently and return `route: implement` when the tracker is Jira o
97
97
  ### Hold check and claim
98
98
 
99
99
  The work item is **held** when the caller declared a `human_gate`, independently of any item history,
100
- or `classifyReadyCandidate({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly })` from the shipped
100
+ or `classifyReadyCandidate({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, humanGateMode })` from the shipped
101
101
  `scripts/intake-blocker-reprobe.mjs` returns `claimable: false`. Pass the complete live comment
102
102
  history so a matching `[lisa-human-gate-release]` discharges the historical body marker. Never
103
103
  reimplement heldness as a substring test or as the negation of `planHumanGateRelease().released`:
@@ -110,7 +110,7 @@ A held item stops the flow here, whatever roles or labels it carries. Do not inv
110
110
  and carry its reason verbatim in `gate_reason` (null for a keyless hold), then stop.
111
111
 
112
112
  For a discharged item, call
113
- `planHumanGateRelease({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, readyLabel, lifecycleLabels, alreadyNotified })`
113
+ `planHumanGateRelease({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, humanGateMode, readyLabel, lifecycleLabels, alreadyNotified })`
114
114
  and apply only the returned actions before claiming. Keep the body marker as history; a release
115
115
  never overrides a new caller-declared hold or another eligibility check.
116
116
 
@@ -43,7 +43,11 @@ child_refs:
43
43
  Required arguments:
44
44
 
45
45
  - `operation`: one of `record`, `rollup`, or `record_and_rollup`.
46
- - `artifact_ref`: canonical artifact identifier for the target being updated.
46
+ - `artifact_ref`: canonical artifact identifier for the target being updated, in the per-provider
47
+ grammar from the `usage-accounting` rule: `github:<owner>/<repo>#<N>`,
48
+ `linear:<workspace>/<KEY-N>` (workspace from `linear.workspace` in `.lisa.config.json`), or a bare
49
+ Jira `<KEY-N>`. The writer refuses a short `linear:<KEY-N>`: the completion proof would never
50
+ recognise it.
47
51
  - `artifact_kind`: the writable host surface (`github-issue`, `github-pr-comment`, `jira-ticket`,
48
52
  `linear-issue`, `notion-page`, `confluence-page`, `markdown-file`, or another caller-defined
49
53
  host string with a matching read/write adapter).
@@ -16,7 +16,7 @@ You are the quality bar between a claimed learning and the project learnings sur
16
16
  - Dropping is a valid, successful outcome — not a failure of the gate.
17
17
  - You judge the **truth and durability** of a claimed learning, not its plausibility. Plausibility without evidence is a drop.
18
18
 
19
- This gate is independent of (and composes with) the `skill-evaluator` ladder router: the router recommends the promotion destination — which rung of the ladder a presumed-valid learning should live on — feeding the gardener's human-gated tickets; this agent judges whether a claimed learning is true, caused the failure, and will recur. Callers must respect your verdict — do not override it.
19
+ This gate is independent of (and composes with) the `skill-evaluator` ladder router: the router recommends the promotion destination — which rung of the ladder a presumed-valid learning should live on — feeding the gardener's tickets (build-ready under the default `humanGate.mode: "access-only"`, human-gated under `"strict"`); this agent judges whether a claimed learning is true, caused the failure, and will recur. Callers must respect your verdict — do not override it.
20
20
 
21
21
  ## Candidate Input Schema
22
22
 
@@ -67,7 +67,7 @@ A missing, ambiguous, contradictory or undecided requirement is not always a one
67
67
 
68
68
  **The rule is the check planning should have run, never the answer.** Rewrite the candidate's `rule` as `Planning (<stage>): <check>` — e.g. `Planning (decomposition): an export ticket must name its report format before it is Ready.` — never `Exports use CSV.`, which only answers the one ticket and belongs on the item. A rule that only makes sense for this one item is not a check: drop it as `misunderstanding/spec-gap`. The `why` names the stage that let it through and quotes what the worker could not find. The prefix is load-bearing: planning skills select these entries from the bounded projection by it (`lisa-task-decomposition` step 0).
69
69
 
70
- **Recurrence never blocks a first occurrence.** A first-occurrence planning miss persists at `low` confidence, so by default its persistence PR waits for a human to merge it. That is a deliberate, bounded exception to Step 2's recurrence requirement. The hostile default exists because a plausible-but-wrong rule would reach every future session unattended; a `low` rule does not by default, because a human reads it at the gate first. A project that opts into `learnings.lowConfidence: "auto-merge"` accepts that a `low` rule lands unread, in exchange for the gardener re-reviewing those entries first. Meanwhile the signal is unusually strong and unusually rare: each occurrence already cost the human interruption the gate exists to prevent, so waiting for a second occurrence costs a second interruption and teaches nothing new. And the rule only adds a check to planning — a wrong one costs a planning question, not changed build behaviour. With recurrence evidence (another dispatched item that stopped on the same class of gap), Step 4 may grant `high`.
70
+ **Recurrence never blocks a first occurrence.** A first-occurrence planning miss persists at `low` confidence, and what happens to its persistence PR follows `learnings.lowConfidence`. That is a deliberate, bounded exception to Step 2's recurrence requirement. The hostile default exists because a plausible-but-wrong rule would reach every future session unattended. Under the default `humanGate.mode: "access-only"`, `learnings.lowConfidence` defaults to `"auto-merge"`: a `low` rule lands unread, in exchange for the gardener re-reviewing those entries first. Under `humanGate.mode: "strict"`, or when the project sets `learnings.lowConfidence: "human-triage"`, a `low` rule waits for a human to read it at the gate first. Meanwhile the signal is unusually strong and unusually rare: each occurrence already cost the human interruption the gate exists to prevent, so waiting for a second occurrence costs a second interruption and teaches nothing new. And the rule only adds a check to planning — a wrong one costs a planning question, not changed build behaviour. With recurrence evidence (another dispatched item that stopped on the same class of gap), Step 4 may grant `high`.
71
71
 
72
72
  ### Step 2.6: Overruled escalation (`signal: wrongly-escalated`)
73
73
 
@@ -79,7 +79,7 @@ A self-flagged human gate is the agent's own claim that a human is needed. When
79
79
 
80
80
  Step 2.5's dispatch condition does not apply (the item was held at filing, never dispatched), and neither does its flagged-human-gate exclusion. Step 1 does not short-circuit to `lisa-upstream` merely because the `human_gate` contract is Lisa-shipped: the ruling is about this project's escalations, and the rule is this project's filing check. Hand off upstream only when the evidence shows a shipped Lisa skill **instructed** the gate for this case.
81
81
 
82
- **The rule is the filing check, never the answer.** Rewrite it as `Planning (filing): <check>` — e.g. `Planning (filing): file human_gate only for an act no agent can perform (credential, spend, external account, legal sign-off); decide dispatch-order questions yourself.` — never the decision the human then made.
82
+ **The rule is the filing check, never the answer.** Rewrite it as `Planning (filing): <check>` — e.g. `Planning (filing): file human_gate only for an access act no agent can perform (credential, spend, external-account, legal-signoff, person-only-account, unreachable-system, operator-hold) or a human-authored surface; decide dispatch-order questions yourself.` — never the decision the human then made.
83
83
 
84
84
  **Confidence.** Several labeled items whose holds share the same gap pattern are recurrence: grant `high`. A single labeled item is `low`. Either way, the persistence PR never waits for a human: the human has already ruled, at the label, and the operator's position is that humans are involved only when an agent is actually stuck. `lisa-persist-learning` merges a `wrongly-escalated` learning through the project's normal gates at either confidence; if the call was wrong, the gardener retires the rule later.
85
85
 
@@ -100,7 +100,7 @@ When multiple classifications seem defensible, choose the one that does **not**
100
100
  ### Step 4: Confidence (durable-learning and planning-miss)
101
101
 
102
102
  - **`high`** — the causal story is unambiguous and the recurrence citations are directly on point. The persistence PR may merge through the project's normal gates unattended.
103
- - **`low`** — durable on the evidence, but the causal chain has an inferential step or the recurrence evidence is indirect. By default the persistence PR waits for a human (auto-merge off + `learning:needs-triage`). A project that sets `learnings.lowConfidence: "auto-merge"` instead merges it through its normal gates, labeled `learning:low-confidence` so the gardener re-reviews it first. A `wrongly-escalated` candidate never waits for a human, whatever this setting says (Step 2.6).
103
+ - **`low`** — durable on the evidence, but the causal chain has an inferential step or the recurrence evidence is indirect. Routing follows `learnings.lowConfidence`. Under `learnings.lowConfidence: "auto-merge"` — the default under `humanGate.mode: "access-only"` — the PR merges through the project's normal gates, labeled `learning:low-confidence` so the gardener re-reviews it first. Under `humanGate.mode: "strict"`, or when the project sets `"human-triage"`, the persistence PR waits for a human (auto-merge off + `learning:needs-triage`). A `wrongly-escalated` candidate never waits for a human, whatever this setting says (Step 2.6).
104
104
 
105
105
  Grade confidence on the evidence alone. The project's `learnings.lowConfidence` setting decides only what happens to a `low` PR; it never moves a candidate between `high` and `low`, so do not read it before grading.
106
106
 
@@ -151,7 +151,7 @@ Also echo back the candidate's `triggering_issue` so the caller can route withou
151
151
  ## Important Reminders
152
152
 
153
153
  1. **Most candidates DROP** — a session where you persist everything you saw is a failed gate, not a productive one.
154
- 2. **No recurrence citation, no durable-learning** — this is absolute; there are no exceptions for "obviously true" rules. A `planning-miss` is not a durable-learning: without recurrence it persists only at `low` (behind a human merge unless the project set `learnings.lowConfidence: "auto-merge"`), and the recurrence requirement never blocks a first occurrence of it.
154
+ 2. **No recurrence citation, no durable-learning** — this is absolute; there are no exceptions for "obviously true" rules. A `planning-miss` is not a durable-learning: without recurrence it persists only at `low` (auto-merged under the access-only default, behind a human merge when `learnings.lowConfidence` resolves to `"human-triage"`), and the recurrence requirement never blocks a first occurrence of it.
155
155
  3. **Cite what you relied on** — a verdict without `cited_evidence` is invalid; re-run the evaluation.
156
156
  4. **`lisa-upstream` never becomes a local rule** — classify and hand off; filing the upstream ticket is the caller's flow, not yours.
157
157
  5. **You classify; you do not write** — never touch the learnings surface, post comments, or open PRs. The caller (`lisa-persist-learning`) owns all side effects.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: skill-evaluator
3
- description: Six-rung ladder router for candidate learnings. Given a candidate (rule, why, provenance, evidence) it recommends a destination rung — EXECUTABLE-CONTROL | EAGER-RULE | SKILL | WIKI | KEEP-IN-LEDGER | RETIRE — and a scope (project | upstream), with a plain-language rationale and a drafted artifact. Advisory-only — it writes nothing and files nothing; the gardener turns its recommendations into human-gated tracker tickets. Use whenever a flow needs routing judgment about where a piece of knowledge should live.
3
+ description: Six-rung ladder router for candidate learnings. Given a candidate (rule, why, provenance, evidence) it recommends a destination rung — EXECUTABLE-CONTROL | EAGER-RULE | SKILL | WIKI | KEEP-IN-LEDGER | RETIRE — and a scope (project | upstream), with a plain-language rationale and a drafted artifact. Advisory-only — it writes nothing and files nothing; the gardener turns its recommendations into tracker tickets (build-ready under the default humanGate.mode access-only, human-gated under strict). Use whenever a flow needs routing judgment about where a piece of knowledge should live.
4
4
  ---
5
5
 
6
6
  # Ladder Router Agent (skill-evaluator)
@@ -32,7 +32,7 @@ You are **advisory-only**. You classify and draft; you never act:
32
32
 
33
33
  - You write nothing — no files created, edited, or deleted; no skills scaffolded; no rules appended; no wiki pages written.
34
34
  - You file nothing — no issues, no PRs, no comments.
35
- - Action belongs to the **gardener** (`lisa-learnings-audit`, #1735), your primary caller: it attaches your recommendation and drafted artifact to a tracker ticket that a human gates by flipping `status:ready`. The learner (LLG-2, #1731) is capture-only and no longer calls this agent.
35
+ - Action belongs to the **gardener** (`lisa-learnings-audit`, #1735), your primary caller: it attaches your recommendation and drafted artifact to a tracker ticket, filed build-ready under the default `humanGate.mode: "access-only"` and gated by a human flipping `status:ready` under `"strict"` (or when the change lands on a human-authored surface). The learner (LLG-2, #1731) is capture-only and no longer calls this agent.
36
36
 
37
37
  You are headless-safe: never prompt; if a candidate is unclassifiable, return KEEP-IN-LEDGER with a rationale naming what evidence is missing.
38
38
 
@@ -95,7 +95,7 @@ Recommend **EAGER-RULE** only on cited evidence of **repeated misses despite ret
95
95
  - **KEEP-IN-LEDGER** — the default landing zone: real but not yet proven broad/stable enough to promote. Probationary and expiring; the gardener revisits it with fresh evidence.
96
96
  - **RETIRE** — redundant (Step 0), stale (references files/flags/versions that no longer exist), or superseded. Retirement requires proof, not vibes.
97
97
 
98
- When two rungs seem defensible, choose the **cheaper** one (lower context cost) — promotion can happen later with more evidence; demotion of a wrongly-promoted rule costs a gardener cycle and a human decision.
98
+ When two rungs seem defensible, choose the **cheaper** one (lower context cost) — promotion can happen later with more evidence; demotion of a wrongly-promoted rule costs a gardener cycle (and, under `strict`, a human decision).
99
99
 
100
100
  ## Recommendation Output Contract
101
101
 
@@ -198,7 +198,7 @@ Never rely on a memorized inventory of skills, rules, or lints — hardcoded lis
198
198
  ## Important Reminders
199
199
 
200
200
  1. **Redundancy check (do first)** — a candidate with an existing mechanical owner routes to RETIRE citing that mechanical owner, before any other evaluation.
201
- 2. **Advisory-only, always** — you recommend; the gardener (#1735) files tickets; humans gate; the factory executes. You never touch a file or tracker.
201
+ 2. **Advisory-only, always** — you recommend; the gardener (#1735) files tickets; humans gate only under `strict` or for a human-authored surface; the factory executes. You never touch a file or tracker.
202
202
  3. **EXECUTABLE-CONTROL beats prose** — whenever a machine can check it, route it there, and always draft the remediation-teaching diagnostic (the context is relocated into the error message, not deleted).
203
203
  4. **The eager tier is earned, not defaulted** — demotion-biased; the default answer is NO without repeated-miss evidence.
204
204
  5. **When in doubt, route cheaper** — KEEP-IN-LEDGER is the honest default; promotion can come back with evidence.
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Apply human-marked dispositions from a Debrief triage document — route accepted learnings to their persistence destinations (Edge Case Brainstorm checklist, project rules, memory, tracker tickets). Reads the triage doc produced by /lisa:debrief; deterministic and idempotent."
2
+ description: "Apply the dispositions marked in a Debrief triage document (by a human, or by the agent when none are marked under humanGate.mode access-only) — route accepted learnings to their persistence destinations (Edge Case Brainstorm checklist, project rules, memory, tracker tickets). Reads the triage doc produced by /lisa:debrief; deterministic and idempotent."
3
3
  argument-hint: "<path to triage doc | URL>"
4
4
  ---
5
5
 
@@ -1,6 +1,6 @@
1
1
  ---
2
- description: "Run one gardener cycle over this project's knowledge surfaces (the learnings ladder, PRD #1729): inventory ledger/rules/skills/wiki/mechanical controls, gather evidence, classify via the ladder router, and file human-gated tracker tickets — per-item PROMOTE/DEMOTE tickets, one CONFIRM/RETIRE batch ticket per run, upstream Lisa issues for upstream-scoped patterns. Everything is human-gated; the run only files marker-deduped tickets. Terminal states: nothing-needed | candidates-proposed | blocked."
2
+ description: "Run one gardener cycle over this project's knowledge surfaces (the learnings ladder, PRD #1729): inventory ledger/rules/skills/wiki/mechanical controls, gather evidence, classify via the ladder router, and file tracker tickets — per-item PROMOTE/DEMOTE tickets, one CONFIRM/RETIRE batch ticket per run, upstream Lisa issues for upstream-scoped patterns. The run only files marker-deduped tickets: build-ready under the default humanGate.mode access-only (a change to a human-authored surface stays human-gated), human-gated under strict. Terminal states: nothing-needed | candidates-proposed | blocked."
3
3
  argument-hint: "[max_candidates=10] [surface=ledger|rules|skills|wiki|all] [dry_run=true]"
4
4
  ---
5
5
 
6
- Use the /lisa-learnings-audit skill (the gardener) to run one audit cycle: inventory the knowledge surfaces, gather per-item evidence, classify candidates through the ladder router, and emit human-gated, marker-deduped tracker tickets, reporting the terminal state. $ARGUMENTS
6
+ Use the /lisa-learnings-audit skill (the gardener) to run one audit cycle: inventory the knowledge surfaces, gather per-item evidence, classify candidates through the ladder router, and emit marker-deduped tracker tickets (build-ready under the default `humanGate.mode: "access-only"`, human-gated under `"strict"`), reporting the terminal state. $ARGUMENTS
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Route a candidate learning through the hostile-default learning-judge gate and act on the verdict: leave a dropped-with-reason note on the triggering issue (drop), file the upstream Lisa ticket automatically with marker dedupe, evidence, and a per-run cap (lisa-upstream), or persist a durable learning via a confidence-routed PR that touches only the learnings surface — auto-merge on for high confidence, auto-merge off plus the learning:needs-triage label for low confidence (unless learnings.lowConfidence is auto-merge). Idempotent via marker dedupe."
2
+ description: "Route a candidate learning through the hostile-default learning-judge gate and act on the verdict: leave a dropped-with-reason note on the triggering issue (drop), file the upstream Lisa ticket automatically with marker dedupe, evidence, and a per-run cap (lisa-upstream), or persist a durable learning via a confidence-routed PR that touches only the learnings surface — auto-merge on for high confidence; for low confidence, auto-merge on plus the learning:low-confidence label when learnings.lowConfidence resolves to auto-merge (the default under humanGate.mode access-only), or auto-merge off plus the learning:needs-triage label when it resolves to human-triage (the default under strict). Idempotent via marker dedupe."
3
3
  argument-hint: "<candidate-json-or-fields>"
4
4
  ---
5
5
 
@@ -464,11 +464,16 @@ FILE IT THE SANCTIONED WAY — one of these three, always explicit:
464
464
  write, and claims it. Complete means the \`work-item-definition-of-ready\`
465
465
  bar — reproduction, observed-versus-expected, Gherkin acceptance criteria.
466
466
 
467
- 2. A person must perform an act an agent cannot: supply a credential only
468
- they hold, approve spend, open an external account, give a legal or
469
- compliance sign-off, or act in a system the agent cannot reach. A choice
470
- with a reasonable default is NOT that: decide it, record the decision on
471
- the item, and use 1. Otherwise route the same way but pass
467
+ 2. A person must perform an act the agent lacks access to: complete an
468
+ interactive login or supply a credential only they hold, approve spend,
469
+ open an external account, sign a legal agreement (contract, BAA, DPA,
470
+ license), act from an account only a person holds (such as a protected
471
+ deployment approval), act in a system the agent cannot reach, release a
472
+ hold the operator explicitly asked for, or edit a file the project says
473
+ only people write. A choice with a reasonable default is NOT that, and
474
+ neither is a compliance judgement or naming an owner (unless
475
+ humanGate.mode is "strict"): decide it, record the decision on the item,
476
+ and use 1. Otherwise route the same way but pass
472
477
  \`human_gate: "<the act a person must perform>"\` in place of
473
478
  \`build_ready: true\` — the two are mutually exclusive. The leaf is filed
474
479
  into the default backlog role, outside the lane build-intake claims from,
@@ -37,7 +37,7 @@ allow() {
37
37
  }
38
38
 
39
39
  deny() {
40
- printf '%s\n' '{"decision":"deny","reason":"This command bypasses Lisa pre-commit/pre-push quality gates (--no-verify or its short form -n, HUSKY=0, or core.hooksPath disabling). `git commit -n` and a cluster such as `-nm \"msg\"` skip pre-commit exactly as completely as the long flag. Fix the underlying issue (security audit, lint, typecheck, tests, formatting) instead. If a fix is genuinely impossible, ask the user to make the risk-acceptance decision and add a specific documented ignore; never bypass the hook."}'
40
+ printf '%s\n' '{"decision":"deny","reason":"This command bypasses Lisa pre-commit/pre-push quality gates (--no-verify or its short form -n, HUSKY=0, or core.hooksPath disabling). `git commit -n` and a cluster such as `-nm \"msg\"` skip pre-commit exactly as completely as the long flag. Fix the underlying issue (security audit, lint, typecheck, tests, formatting) instead. If a fix is genuinely impossible, make the risk-acceptance decision yourself: add a specific documented ignore with its reason and an expiry (under humanGate.mode strict, ask the user to make that decision instead); never bypass the hook."}'
41
41
  exit 0
42
42
  }
43
43
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.109.2",
3
+ "version": "4.110.1",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -34,8 +34,10 @@
34
34
  * we needed is cancelled" into "we are unblocked", which is the same wrong-write
35
35
  * family as CodySwannGT/lisa#3479, where a reason-blind repair would have
36
36
  * stamped a production terminal on abandoned work. So an abandoned blocker
37
- * ESCALATES to a human rather than dissolving or silently holding forever:
38
- * somebody has to decide whether the dependent still makes sense.
37
+ * ESCALATES rather than dissolving or silently holding forever: someone has
38
+ * to decide whether the dependent still makes sense, and who decides follows
39
+ * `humanGate.mode` — the agent under `access-only`, a person under `strict`
40
+ * (see the session manager's `reconcile.mjs`).
39
41
  *
40
42
  * ## What this module does not decide
41
43
  *
@@ -77,8 +79,9 @@ export function resolveBlockerEdge(input = {}) {
77
79
 
78
80
  // Checked BEFORE containment, because an abandoned blocker whose branch
79
81
  // happens to contain some earlier commit of its own is still abandoned. The
80
- // question a human has to answer is whether the dependent still makes sense,
81
- // and a containment true would silently answer it for them.
82
+ // open question is whether the dependent still makes sense — answered by the
83
+ // agent or a person as `humanGate.mode` says — and a containment true would
84
+ // silently answer it for them.
82
85
  if (state === "closed" && reason === NOT_PLANNED) {
83
86
  return {
84
87
  action: "escalate",
@@ -86,7 +89,8 @@ export function resolveBlockerEdge(input = {}) {
86
89
  "the blocker was closed as NOT PLANNED, so the work this item depends on will never be " +
87
90
  "delivered. Dissolving the edge would read as 'unblocked' when nothing was built, and " +
88
91
  "holding it forever hides a decision somebody has to make: does this item still make sense " +
89
- "without its blocker? That is a human call, not a sweep's.",
92
+ "without its blocker? That is a decision to make and record, not one a sweep may " +
93
+ "round away; who makes it follows humanGate.mode.",
90
94
  };
91
95
  }
92
96
 
@@ -16,6 +16,15 @@
16
16
  * (`humanGate.humanOnly`). Anything else is a decision: the agent picks the
17
17
  * reasonable default, records it on the item, and files it build-ready.
18
18
  *
19
+ * Which acts count depends on `humanGate.mode` (CodySwannGT/lisa#4687). Under
20
+ * the default `access-only` mode an agent performs every act it has access to,
21
+ * so only an act it genuinely lacks access to is a gate: an interactive login
22
+ * or a credential only a person holds, spending money, opening an external
23
+ * account, a legal signature, an account only a person holds, a system the
24
+ * agent cannot reach, or a hold the operator explicitly asked for. `strict`
25
+ * also holds a compliance judgement, naming an accountable person, and Lisa's
26
+ * own policy calls. `humanGate.humanOnly` widens the gate in either mode.
27
+ *
19
28
  * Refusal is the default, deliberately. A closed vocabulary of acts can be
20
29
  * audited; an open vocabulary of "topics that feel important" is exactly the
21
30
  * reading that produced the false gates.
@@ -29,8 +38,17 @@
29
38
  * Usage:
30
39
  * node human-gate-act.mjs check --reason "<human_gate reason>" \
31
40
  * [--config .lisa.config.json] [--local .lisa.config.local.json]
32
- * Prints a JSON verdict. Exit 0 when the gate is legitimate, 1 when refused,
33
- * 2 on a usage or config error.
41
+ * node human-gate-act.mjs policy \
42
+ * [--config .lisa.config.json] [--local .lisa.config.local.json]
43
+ * `check` prints a JSON verdict carrying the `mode` it was judged under. Exit 0
44
+ * when the gate is legitimate, 1 when refused, 2 on a usage or config error.
45
+ * `policy` prints the resolved `{ mode, humanOnly }` a sweep passes to
46
+ * `planHumanGateLift` as `humanGateMode` and `humanOnly`; it exits 0.
47
+ * `humanGate.mode` is read case- and whitespace-insensitively. A value that is
48
+ * still not a mode is reported on stderr, never fatal. It resolves to the
49
+ * global file's valid mode when only the local one is wrong; with no valid
50
+ * value anywhere it fails safe, to `strict`: a typo must never quietly loosen
51
+ * the gate. Only an absent mode means `access-only`.
34
52
  * @module human-gate-act
35
53
  */
36
54
  import { readFileSync, realpathSync } from "node:fs";
@@ -38,9 +56,12 @@ import { fileURLToPath } from "node:url";
38
56
 
39
57
  import {
40
58
  DECIDE_AND_RECORD,
59
+ DEFAULT_HUMAN_GATE_MODE,
41
60
  HUMAN_GATE_ACTS,
61
+ HUMAN_GATE_MODES,
42
62
  classifyHumanGateReason,
43
63
  normalizeGateText,
64
+ normalizeHumanGateMode,
44
65
  } from "./intake-blocker-reprobe.mjs";
45
66
 
46
67
  // The classifier lives in `intake-blocker-reprobe.mjs` so the hold verdict
@@ -49,7 +70,9 @@ import {
49
70
  // and adds the writer-side CLI and config resolution.
50
71
  export {
51
72
  DECIDE_AND_RECORD,
73
+ DEFAULT_HUMAN_GATE_MODE,
52
74
  HUMAN_GATE_ACTS,
75
+ HUMAN_GATE_MODES,
53
76
  classifyHumanGateReason,
54
77
  normalizeGateText,
55
78
  };
@@ -105,6 +128,66 @@ export function resolveHumanOnly(local, global) {
105
128
  return Array.isArray(value) ? value : [];
106
129
  }
107
130
 
131
+ /**
132
+ * The effective `humanGate.mode`: a valid local declaration replaces the
133
+ * global one, the same way {@link resolveHumanOnly} does. Values are compared
134
+ * trimmed and lower-cased. An invalid local value falls back to a valid
135
+ * global one, so a typo in a personal override cannot silently hide a
136
+ * committed `strict`. When a value is present but none is valid, the mode
137
+ * fails safe, to `"strict"`; only when no value is declared at all does
138
+ * {@link DEFAULT_HUMAN_GATE_MODE} apply. The first rejected value is returned
139
+ * as `rejected` (its JSON spelling) so the caller can report it.
140
+ * @param {unknown} local - Parsed local config
141
+ * @param {unknown} global - Parsed global config
142
+ * @returns {{ mode: string, rejected?: string }} The mode in force
143
+ */
144
+ export function resolveHumanGateMode(local, global) {
145
+ const pick = config =>
146
+ config && typeof config === "object" ? config.humanGate?.mode : undefined;
147
+ // Every declaration is judged, so a typo in the committed file is reported
148
+ // even while a valid local value is in force.
149
+ const declared = [pick(local), pick(global)].filter(
150
+ value => value !== undefined
151
+ );
152
+ const valid = declared
153
+ .map(normalizeHumanGateMode)
154
+ .find(mode => HUMAN_GATE_MODES.includes(mode));
155
+ const invalid = declared.find(
156
+ value => !HUMAN_GATE_MODES.includes(normalizeHumanGateMode(value))
157
+ );
158
+ const mode =
159
+ valid ?? (invalid === undefined ? DEFAULT_HUMAN_GATE_MODE : "strict");
160
+ return invalid === undefined
161
+ ? { mode }
162
+ : { mode, rejected: JSON.stringify(invalid) };
163
+ }
164
+
165
+ /**
166
+ * The whole human-gate policy a reader passes on: the mode and the declared
167
+ * human-only classes, each resolved local-then-global.
168
+ * @param {unknown} local - Parsed local config
169
+ * @param {unknown} global - Parsed global config
170
+ * @returns {{ mode: string, humanOnly: unknown[], rejected?: string }} Policy
171
+ */
172
+ export function resolveHumanGatePolicy(local, global) {
173
+ const { mode, rejected } = resolveHumanGateMode(local, global);
174
+ return {
175
+ mode,
176
+ humanOnly: resolveHumanOnly(local, global),
177
+ ...(rejected === undefined ? {} : { rejected }),
178
+ };
179
+ }
180
+
181
+ /**
182
+ * The stderr line for an invalid `humanGate.mode`.
183
+ * @param {string} rejected - JSON spelling of the declared value
184
+ * @returns {string} One warning line
185
+ */
186
+ function invalidModeWarning(rejected) {
187
+ const accepted = HUMAN_GATE_MODES.map(value => `"${value}"`).join(" | ");
188
+ return `Invalid humanGate.mode: ${rejected} is not one of ${accepted}; ignored.\n`;
189
+ }
190
+
108
191
  /**
109
192
  * Parse `--key value` / `--key=value` flags.
110
193
  * @param {string[]} argv - Raw arguments
@@ -148,9 +231,12 @@ export function main(argv, io = {}) {
148
231
  const missing = ["reason", "config", "local"].filter(
149
232
  key => key in flags && (flags[key] === null || flags[key].trim() === "")
150
233
  );
151
- if (command !== "check" || !flags.reason || missing.length > 0) {
234
+ const usable =
235
+ command === "policy" || (command === "check" && Boolean(flags.reason));
236
+ if (!usable || missing.length > 0) {
152
237
  error(
153
- "usage: human-gate-act.mjs check --reason <text> [--config <path>] [--local <path>]\n"
238
+ "usage: human-gate-act.mjs check --reason <text> [--config <path>] [--local <path>]\n" +
239
+ " human-gate-act.mjs policy [--config <path>] [--local <path>]\n"
154
240
  );
155
241
  return 2;
156
242
  }
@@ -161,10 +247,20 @@ export function main(argv, io = {}) {
161
247
  error(`${failed.error}\n`);
162
248
  return 2;
163
249
  }
164
- const verdict = classifyHumanGateReason(flags.reason, {
165
- humanOnly: resolveHumanOnly(local.value, global.value),
166
- });
167
- write(`${JSON.stringify(verdict)}\n`);
250
+ const { rejected, ...policy } = resolveHumanGatePolicy(
251
+ local.value,
252
+ global.value
253
+ );
254
+ if (rejected !== undefined) {
255
+ error(invalidModeWarning(rejected));
256
+ error(`humanGate.mode in force: "${policy.mode}".\n`);
257
+ }
258
+ if (command === "policy") {
259
+ write(`${JSON.stringify(policy)}\n`);
260
+ return 0;
261
+ }
262
+ const verdict = classifyHumanGateReason(flags.reason, policy);
263
+ write(`${JSON.stringify({ ...verdict, mode: policy.mode })}\n`);
168
264
  return verdict.valid ? 0 : 1;
169
265
  }
170
266
 
@@ -5,15 +5,18 @@
5
5
  * stalling items, and the operator should never have to comment to release
6
6
  * one (CodySwannGT/lisa#4658, item 5). The intake and repair sweeps call
7
7
  * {@link planHumanGateLift} on every open item carrying a `[lisa-human-gate]`
8
- * hold. A hold whose reason names no act an agent cannot perform (see
9
- * `human-gate-act.mjs`) is lifted: the sweep posts a visible
8
+ * hold. A hold that is not valid under the project's `humanGate.mode` and
9
+ * `humanGate.humanOnly` (see `human-gate-act.mjs`) is lifted: the sweep posts a visible
10
10
  * `[lisa-human-gate-lifted] reason=<slug>` comment saying why, removes the
11
11
  * human-needed marker, and moves the item to the build-ready role.
12
12
  *
13
13
  * This is not a forged human release. A release records a person's answer; a
14
14
  * lift records that there was no question a person had to answer. A valid
15
- * hold — a credential, spend, a sign-off — is never lifted and still waits for
16
- * its act. A label-only hold (access blocked, a blocked verdict) has no
15
+ * hold — a credential, spend, a legal signature — is never lifted and still
16
+ * waits for its act. Pass `humanGateMode` (`humanGate.mode`) alongside
17
+ * `humanOnly`: under `"strict"` a pre-#4687 gate such as naming an accountable
18
+ * person is valid and kept; omitted, the default `access-only` mode lifts it
19
+ * (CodySwannGT/lisa#4687). A label-only hold (access blocked, a blocked verdict) has no
17
20
  * declared reason to judge and is never lifted either.
18
21
  * @module human-gate-lift
19
22
  */
@@ -42,8 +45,9 @@ export function formatHumanGateLift(lift = {}) {
42
45
  return [
43
46
  declaration,
44
47
  `Hold lifted: ${named} is a decision an agent can make, not an act only a ` +
45
- "person can perform (a credential, spend, an external account, a legal " +
46
- "sign-off, or a system the agent cannot reach), so this item is back in " +
48
+ "person can perform (a login or credential, spend, an external account, " +
49
+ "a legal signature, an account only a person holds, or a system the " +
50
+ "agent cannot reach), so this item is back in " +
47
51
  "the build queue and whoever builds it decides and records the call; " +
48
52
  "the description is unchanged.",
49
53
  ].join("\n");
@@ -64,6 +68,7 @@ export function formatHumanGateLift(lift = {}) {
64
68
  * trustedHumanActorIds?: unknown
65
69
  * humanNeededLabel?: unknown
66
70
  * humanOnly?: unknown
71
+ * humanGateMode?: unknown
67
72
  * readyLabel?: unknown
68
73
  * lifecycleLabels?: unknown
69
74
  * }} input - Candidate surfaces plus lane vocabulary and project policy
@@ -75,7 +80,9 @@ export function planHumanGateLift(input = {}) {
75
80
  addReadyLabel: null,
76
81
  });
77
82
  const verdict = humanGateVerdict(input);
78
- const liftable = new Set(invalidHumanGateHolds(input.body, input.humanOnly));
83
+ const liftable = new Set(
84
+ invalidHumanGateHolds(input.body, input.humanOnly, input.humanGateMode)
85
+ );
79
86
  const toLift = verdict.outstanding.filter(reason => liftable.has(reason));
80
87
  const kept = verdict.outstanding.filter(reason => !toLift.includes(reason));
81
88
  const comments = toLift.map(reason => formatHumanGateLift({ reason }));