@codyswann/lisa 4.109.2 → 4.110.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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
@@ -210,7 +210,7 @@ If the parent is explicitly provided, use it. Otherwise:
210
210
  lisa-linear-access operation: list-projects({team: <teamKey>, state: ["backlog", "planned", "started"]})
211
211
  ```
212
212
  Match on keywords from the summary and description.
213
- 2. If no matching Project exists, stop and ask the human to create or pick one. Do NOT orphan the item.
213
+ 2. If no Project matches exactly, pick or create it yourself from the evidence: use the active Project the summary, description and linked work fit best, or, when none fits, create a new Project (this skill, `issue_type: Epic`) scoped to the work. Record the choice and why in the Issue description so a person can re-parent it later. Do NOT orphan the item.
214
214
 
215
215
  ### 4b. Related Items
216
216
 
@@ -257,7 +257,7 @@ Linear native relations are set on the Issue via `save_issue`'s `relations` fiel
257
257
 
258
258
  **Adding a relation to an already-linked pair may be a REPLACE, not an add.** Reported measured twice against the raw `issueRelationCreate` mutation: creating a `blocks` edge between two issues already carrying a `related` edge converted that edge in place — the source issue's outgoing relation count did not grow (CodySwannGT/lisa#3605). Relationship discovery is mandatory on the UPDATE path as well as creation, so this skill's own contract routinely points it at pairs that already have edges.
259
259
 
260
- So on an update, read the pair's existing relations before writing one. Where an edge already exists and differs in type, surface it and let a human decide rather than writing over it — **an inherited relation is not a verified one**, and rewriting it silently removes the only moment anyone would check what it meant.
260
+ So on an update, read the pair's existing relations before writing one. Where an edge already exists and differs in type, decide from the evidence (both issues' bodies, history and linked work) which type is right, and record a `Decision:` line on the issue before changing it (under `humanGate.mode: "strict"`, surface it and let a human decide) — **an inherited relation is not a verified one**, and rewriting it silently removes the only moment anyone would check what it meant.
261
261
 
262
262
  **The true undo is delete plus re-create with the original type.** A single delete removes the link entirely and does not restore what was there before, so any runbook recording "undo = delete relation X" has written down a plan that loses the prior relationship.
263
263
 
@@ -309,7 +309,7 @@ For Bug / Task / Sub-task, ensure the summary is prefixed with `[<repo-name>]`.
309
309
 
310
310
  **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.
311
311
 
312
- **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:
312
+ **Validate the gate before stamping it.** A `human_gate` is for 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. 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:
313
313
 
314
314
  ```bash
315
315
  node "${CLAUDE_PLUGIN_ROOT:-node_modules/@codyswann/lisa/plugins/lisa}/scripts/human-gate-act.mjs" check --reason "<the human_gate reason>"
@@ -333,7 +333,7 @@ person scanning a board and to any path that has not yet been routed through the
333
333
  If the label does not exist in the tracker, create it, or record that it could not be applied and
334
334
  proceed — the marker still holds. Never file the label *instead of* the marker.
335
335
 
336
- **Every marker reader must consult comments.** Use `classifyReadyCandidate` with labels, body, comments and the configured human-needed label, then `planHumanGateRelease` for any release actions. A historical body marker alone is not an active hold after its matching release; unreadable comments leave a hold in place.
336
+ **Every marker reader must consult comments.** Use `classifyReadyCandidate` with labels, body, comments, the configured human-needed label, `humanOnly` and `humanGateMode` (from `humanGate.mode`), then `planHumanGateRelease` for any release actions. A historical body marker alone is not an active hold after its matching release; unreadable comments leave a hold in place.
337
337
 
338
338
  **Write a `reason=` the release can name.** The hold's reason is not decoration: a hold ends when a
339
339
  `[lisa-human-gate-release]` comment repeating that same `reason=` is recorded on the item by an authorized human, and the
@@ -356,7 +356,7 @@ The validator is the **single source of truth** for what makes a valid Linear wo
356
356
 
357
357
  If the validator reports `FAIL`:
358
358
  - Surface the failure list and the per-gate remediation to the user.
359
- - Do NOT proceed to Phase 6. Fix the spec (or stop and ask the human) and re-run validation.
359
+ - Do NOT proceed to Phase 6. Fix the spec yourself from the evidence and re-run validation; stop only when a fix needs access you lack, and name that access.
360
360
  - Never call `lisa-linear-access operation: save-project` or `lisa-linear-access operation: save-issue` while the validator's verdict is FAIL.
361
361
 
362
362
  If the validator reports `PASS`, continue to Phase 6.
@@ -204,9 +204,14 @@ watching it. Evaluate all three. When all three hold, record `policy-obsolete` a
204
204
  **Completed** means the prior approved action happened, so a later recurrence may be re-filed.
205
205
  When an existing proposal suppresses filing, **the run still records `policy-obsolete` and files
206
206
  nothing** — the outcome describes this run, while the ticket is filed exactly once.
207
- - **Labels** `status:blocked` + `human-needed`, carrying the contract's decision-ready packet. The
208
- `human-needed` label marks the proposal human-owned: `lisa-repair-intake` recognizes it and never
209
- re-dispatches it as stalled work.
207
+ - **Labels** follow `humanGate.mode`. Under the default `access-only` the loop makes the call
208
+ itself: it picks one response from the evidence below (tear down, or re-cadence to a named longer
209
+ cadence), states it with its reasoning, and files the proposal build-ready (`status:ready`), so the
210
+ factory run that claims it performs that response with the matching command. If that run cannot
211
+ reach the scheduler, it holds the item naming that access. Under `strict`: `status:blocked` +
212
+ `human-needed`, carrying the contract's decision-ready packet. The `human-needed` label marks the
213
+ proposal human-owned: `lisa-repair-intake` recognizes it and never re-dispatches it as stalled
214
+ work.
210
215
  - **Evidence** the date-filtered search result, this run's summary, **the loop's current cadence**
211
216
  (the baseline an operator needs to choose a longer one), and a one-line summary of recent runs
212
217
  read from `.lisa/automations/runs/monitor.jsonl`. Fill the rest of the packet the same way every
@@ -220,5 +225,6 @@ watching it. Evaluate all three. When all three hold, record `policy-obsolete` a
220
225
  - **Operator footer**, verbatim, as on every loop-filed proposal (`rejection-detection`):
221
226
  > To stop this from being raised again, close it as **Not planned**. Close it as **Completed** if it was fixed — a later recurrence may be re-filed as a regression.
222
227
 
223
- The loop **keeps running at its normal cadence** until a human acts, and never deletes its own
228
+ The loop **keeps running at its normal cadence** until the proposal is acted on (by the factory run
229
+ that claims it under `access-only`, by a human under `strict`), and never deletes its own
224
230
  registration.
@@ -375,7 +375,7 @@ To run the gate, this skill must:
375
375
 
376
376
  1. Pull the remote links of every epic and story created in this run via `lisa-tracker-read (vendor-neutral; dispatches to jira-read-ticket or github-read-issue)`.
377
377
  2. Apply the §8 preservation matrix and verdict rules.
378
- 3. If the gate fails: list each dropped/misrouted artifact (domain, title, source page, why it was dropped) and either re-attach via `lisa-tracker-write` (UPDATE mode) or stop and ask the human. Never silently proceed past a gate failure.
378
+ 3. If the gate fails: list each dropped/misrouted artifact (domain, title, source page, why it was dropped) and re-attach each via `lisa-tracker-write` (UPDATE mode), choosing the destination ticket from the evidence and recording why. Stop only when re-attaching needs access you lack (for example, the source artifact or the tracker cannot be reached), and name that access. Never silently proceed past a gate failure.
379
379
  4. If the gate passes: print the matrix compactly and proceed to Phase 6.
380
380
 
381
381
  This gate is not optional. Skipping it is the failure mode the architecture exists to prevent.
@@ -235,13 +235,13 @@ No learning content is ever committed without a PR — there is no other write p
235
235
  Stage: <planning_stage>. The worker could not find: "<quoted>". Planning skills read this rule back through the bounded projection (`lisa-task-decomposition` step 0).
236
236
  ```
237
237
 
238
- For a **low-confidence** PR (other than a `wrongly-escalated` one, which no human merges — step 6), the body must additionally end with one fixed line chosen by the step-6 routing mode. Under `human-triage` (the default) it is this decision-framing line, so the human at the gate knows exactly what merging means:
238
+ For a **low-confidence** PR (other than a `wrongly-escalated` one, which no human merges — step 6), the body must additionally end with one fixed line chosen by the step-6 routing mode. Under `human-triage` (the default only under `humanGate.mode: "strict"`) it is this decision-framing line, so the human at the gate knows exactly what merging means:
239
239
 
240
240
  ```markdown
241
241
  **Merge** to adopt this rule into every future session for all six coding agents; **close** to discard it.
242
242
  ```
243
243
 
244
- Under `auto-merge` nobody stands at that gate, so the line instead says why the PR merges unattended and who re-checks it (resolve the mode with the step-6 command before writing the body):
244
+ Under `auto-merge` (the default under `humanGate.mode: "access-only"`) nobody stands at that gate, so the line instead says why the PR merges unattended and who re-checks it (resolve the mode with the step-6 command before writing the body):
245
245
 
246
246
  ```markdown
247
247
  Low-confidence learning: merges through the normal gates under `learnings.lowConfidence: "auto-merge"`; the gardener (`lisa-learnings-audit`) re-reviews it first.
@@ -253,10 +253,10 @@ No learning content is ever committed without a PR — there is no other write p
253
253
  LOW_CONFIDENCE=$(node -e 'import("@codyswann/lisa/learnings").then(async m => { const c = await m.readProjectConfig(process.cwd()); console.log(m.resolveLearningsSettings(c).lowConfidence); })')
254
254
  ```
255
255
 
256
- It prints `human-triage` when the key is absent — the default, unchanged — or `auto-merge` when the project opted in.
256
+ When the key is absent the default follows `humanGate.mode`: it prints `auto-merge` under the default `"access-only"` mode and `human-triage` under `"strict"`. A value the project sets explicitly always wins over the mode.
257
257
 
258
258
  - **`high`** → submit through `lisa-git-submit-pr` with its defaults: auto-merge ON, merging through the project's normal gates.
259
- - **`low` + `auto-merge`** → submit through `lisa-git-submit-pr` with its defaults, exactly like `high`: auto-merge ON, merging through the project's normal gates — the gates are not skipped, only the human wait is. This is for operators who involve humans only when an agent is genuinely stuck; the human gate's purpose is still covered, because the ledger is a cold, bounded projection, a planning-miss rule only adds a planning check, and the gardener can retire or demote a wrong entry. Keep the entry findable without blocking the merge: the ledger entry already carries `confidence: low` (step 3), and the PR gets the `learning:low-confidence` label (never `learning:needs-triage`, which means a human still has to act), created idempotently first:
259
+ - **`low` + `auto-merge`** → submit through `lisa-git-submit-pr` with its defaults, exactly like `high`: auto-merge ON, merging through the project's normal gates — the gates are not skipped, only the human wait is. This is the default under `humanGate.mode: "access-only"`, for operators who involve humans only when an agent is genuinely stuck; the human gate's purpose is still covered, because the ledger is a cold, bounded projection, a planning-miss rule only adds a planning check, and the gardener can retire or demote a wrong entry. Keep the entry findable without blocking the merge: the ledger entry already carries `confidence: low` (step 3), and the PR gets the `learning:low-confidence` label (never `learning:needs-triage`, which means a human still has to act), created idempotently first:
260
260
 
261
261
  ```bash
262
262
  gh label create "learning:low-confidence" \
@@ -268,7 +268,7 @@ No learning content is ever committed without a PR — there is no other write p
268
268
  ```
269
269
 
270
270
  Labeling never blocks: if it fails, report it in the run summary and leave the PR armed. The run summary names the routing mode used.
271
- - **`low` + `human-triage`** (the default) → submit through `lisa-git-submit-pr` with `auto_merge=false` (drives the PR to green-and-open `awaiting-human`, never merging — even on repos that disallow auto-merge). Then apply the human-triage label, creating it idempotently first (the `lisa-drive-pr-to-merge` label pattern — `|| true` tolerates only already-exists, so verify):
271
+ - **`low` + `human-triage`** (the default under `humanGate.mode: "strict"`, or set explicitly) → submit through `lisa-git-submit-pr` with `auto_merge=false` (drives the PR to green-and-open `awaiting-human`, never merging — even on repos that disallow auto-merge). Then apply the human-triage label, creating it idempotently first (the `lisa-drive-pr-to-merge` label pattern — `|| true` tolerates only already-exists, so verify):
272
272
 
273
273
  ```bash
274
274
  gh label create "learning:needs-triage" \
@@ -356,9 +356,14 @@ marker-deduped teardown proposal through `lisa-tracker-write` (per `tracked-work
356
356
  **Completed** means the prior approved action happened, so a later recurrence may be re-filed.
357
357
  When an existing proposal suppresses filing, **the run still records `policy-obsolete` and files
358
358
  nothing** — the outcome describes this run, while the ticket is filed exactly once.
359
- - **Labels** `status:blocked` + `human-needed`, carrying the contract's decision-ready packet. The
360
- `human-needed` label marks the proposal human-owned: `lisa-repair-intake` recognizes it and never
361
- re-dispatches it as stalled work.
359
+ - **Labels** follow `humanGate.mode`. Under the default `access-only` the loop makes the call
360
+ itself: it picks one response from the evidence below (tear down, or re-cadence to a named longer
361
+ cadence), states it with its reasoning, and files the proposal build-ready (`status:ready`), so the
362
+ factory run that claims it performs that response with the matching command. If that run cannot
363
+ reach the scheduler, it holds the item naming that access. Under `strict`: `status:blocked` +
364
+ `human-needed`, carrying the contract's decision-ready packet. The `human-needed` label marks the
365
+ proposal human-owned: `lisa-repair-intake` recognizes it and never re-dispatches it as stalled
366
+ work.
362
367
  - **Evidence** the date-filtered search result, this run's summary, **the loop's current cadence**
363
368
  (the baseline an operator needs to choose a longer one), and a one-line summary of recent runs
364
369
  read from `.lisa/automations/runs/exploratory-prds.jsonl`. Fill the rest of the packet the same
@@ -373,7 +378,8 @@ marker-deduped teardown proposal through `lisa-tracker-write` (per `tracked-work
373
378
  - **Operator footer**, verbatim, as on every loop-filed proposal (`rejection-detection`):
374
379
  > To stop this from being raised again, close it as **Not planned**. Close it as **Completed** if it was fixed — a later recurrence may be re-filed as a regression.
375
380
 
376
- The loop **keeps running at its normal cadence** until a human acts, and never deletes its own
381
+ The loop **keeps running at its normal cadence** until the proposal is acted on (by the factory run
382
+ that claims it under `access-only`, by a human under `strict`), and never deletes its own
377
383
  registration.
378
384
 
379
385
  ## Out of scope (hard rules)
@@ -408,8 +408,12 @@ the vendor build-intake runs**, skipping the claim transition (the item is alrea
408
408
  standing in for the scanner that never got to finish it.
409
409
  3. **On a surfaced blocker** (agent reports it cannot proceed), leave/move the item to `blocked`
410
410
  with a `[lisa-repair-intake]` note (see Loop prevention). When the surfaced blocker is something
411
- **only a human can supply** (credentials, access/permissions, a product or scoping decision), the
412
- item also carries the `human_needed` marker — the vendor agent's pre-flight gate applies it; if
411
+ **only a human can supply** (credentials or access/permissions the agent cannot obtain — an
412
+ interactive login, a secret store it cannot reach, spending money, a legal signature, an account
413
+ only a person holds — or a hold the operator explicitly asked for), the item also carries the
414
+ `human_needed` marker. A product or scoping decision is not on that list: the agent makes it from
415
+ the evidence, records the reasoning on the item, and continues (under `humanGate.mode: "strict"`
416
+ it is human-needed as before). The vendor agent's pre-flight gate applies the marker; if
413
417
  repair-intake makes the block transition itself for such a reason, it adds the marker too. (A
414
418
  block that another tracked ticket or retry will clear is *not* human-needed — that is the
415
419
  auto-recoverable fix-ticket path above.)
@@ -694,11 +698,15 @@ LISA_BLOCKER_NODE
694
698
  re-formed every cycle and a human had to break the loop. Reading the relation back is what makes
695
699
  "I removed the link" distinguishable from "I meant to".
696
700
 
697
- **An `escalate` verdict holds the item and reports it — never dissolve on it.** The sharp case is
701
+ **An `escalate` verdict never dissolves the edge as satisfied.** The sharp case is
698
702
  a blocker closed `NOT PLANNED`: the work depended on will never be delivered, so dissolving reads
699
- as "unblocked" when nothing was built, and holding silently hides a decision only a human can
700
- make. Treating closure as satisfaction is the same reason-blind wrong write as
701
- CodySwannGT/lisa#3479. A single escalation among otherwise-dissolving edges holds the item.
703
+ as "unblocked" when nothing was built. Treating closure as satisfaction is the same reason-blind
704
+ wrong write as CodySwannGT/lisa#3479. Under the default `humanGate.mode: "access-only"` the
705
+ scoping call is the agent's: re-scope the item to build without the dependency, drop the edge
706
+ because the item no longer needs it, or close the item as Not planned — and record a
707
+ `Decision:` line saying which and why. Under `"strict"`, hold and report it: the call is a
708
+ person's, and holding silently would hide it. Either way, a single escalation among
709
+ otherwise-dissolving edges holds the item until that call is made and recorded.
702
710
 
703
711
  **On Linear, dissolve with a relation DELETE.** Do not "update" an edge:
704
712
  `issueRelationCreate` CONVERTS an existing relation rather than adding one
@@ -1086,7 +1094,7 @@ with labels like `build-ready`, or with no Lisa status label at all, that are in
1086
1094
  `intake_mode=build`, every non-PRD issue is normalized as a build ticket. If `intake_mode=both`,
1087
1095
  classify PRDs first and normalize all remaining issues as build tickets.
1088
1096
  2a. **Ask whether a person is holding it, before anything else.** Call
1089
- `planLabelNormalization({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, lifecycleLabels, readyLabel })` from
1097
+ `planLabelNormalization({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, humanGateMode, lifecycleLabels, readyLabel })` from
1090
1098
  `scripts/intake-blocker-reprobe.mjs` for every candidate and apply exactly the verdict it
1091
1099
  returns. Do **not** re-implement the test here and do **not** decide held-ness from labels
1092
1100
  alone: the vendor writers stamp the `[lisa-human-gate]` marker into the body of a deliberate
@@ -1115,8 +1123,8 @@ with labels like `build-ready`, or with no Lisa status label at all, that are in
1115
1123
  should never have to comment to release one.
1116
1124
 
1117
1125
  Enumerate open items carrying a `[lisa-human-gate]` marker in the body and, for each, call
1118
- `planHumanGateLift({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, readyLabel, lifecycleLabels })`
1119
- from `scripts/human-gate-lift.mjs`, with `humanOnly` read from `humanGate.humanOnly` in config.
1126
+ `planHumanGateLift({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, humanGateMode, readyLabel, lifecycleLabels })`
1127
+ from `scripts/human-gate-lift.mjs`, with `humanOnly` read from `humanGate.humanOnly` and `humanGateMode` from `humanGate.mode` in config (one call: `node scripts/human-gate-act.mjs policy` prints both; a reader that omits the mode judges under access-only, so a strict project must pass it).
1120
1128
  The planner lifts only when it is sure: a topic-only slug, no act on any hold-related line, and
1121
1129
  no secret or act token anywhere in the hold text (`ready-role-filing`, "Existing invalid holds
1122
1130
  are lifted"). Any doubt keeps the hold. Apply exactly what it returns: post each string in `comments` once (each begins
@@ -1128,9 +1136,12 @@ with labels like `build-ready`, or with no Lisa status label at all, that are in
1128
1136
  `human_needed` marker this skill did not apply": a lift records that the hold was invalid under
1129
1137
  the contract, so there is nothing for a person to authorize. A lift's authority comes from
1130
1138
  re-classifying the hold, not from who wrote the comment, so a lift naming a valid hold discharges
1131
- nothing. **Valid holds plan nothing** (credential, spend, external account, legal/compliance
1132
- sign-off, accountable person, unreachable system, Lisa's own human-only gates, and any
1133
- project-declared class). **Label-only holds plan nothing** — an access block or blocked verdict
1139
+ nothing. **Valid holds plan nothing.** In both modes those are the access acts (`credential`,
1140
+ `spend`, `external-account`, `legal-signoff`, `person-only-account`, `unreachable-system`,
1141
+ `operator-hold`), `human-authored-surface`, and any project-declared `humanGate.humanOnly`
1142
+ class. Under `humanGate.mode: "strict"` the strict-only acts (`compliance-signoff`,
1143
+ `accountable-person`, `lisa-policy`) are valid too; under the default access-only mode a hold
1144
+ that names only one of them is invalid and is lifted. **Label-only holds plan nothing** — an access block or blocked verdict
1134
1145
  declares no reason to judge. A mixed item lifts its invalid reasons and stays held for the valid
1135
1146
  one. Never edit the description. Count these under `lifted_invalid_hold` and name them in the
1136
1147
  cycle summary via `summarizeHumanGateLifts([...])`, printed even when it is zero.
@@ -1144,7 +1155,7 @@ with labels like `build-ready`, or with no Lisa status label at all, that are in
1144
1155
 
1145
1156
  Enumerate items carrying the configured `human_needed` marker **or** a `[lisa-human-gate]` marker
1146
1157
  in the body, and for each call
1147
- `planHumanGateRelease({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, readyLabel, lifecycleLabels, alreadyNotified })`
1158
+ `planHumanGateRelease({ labels, body, comments, trustedHumanActorIds, humanNeededLabel, humanOnly, humanGateMode, readyLabel, lifecycleLabels, alreadyNotified })`
1148
1159
  from `scripts/intake-blocker-reprobe.mjs`. Apply exactly the actions it returns: remove the
1149
1160
  human-needed marker, add the configured build `ready` label back, and post
1150
1161
  `formatHumanGateReleaseNote()` once. Do **not** re-implement the discharge test, and do **not**
@@ -165,6 +165,15 @@ the others: `queue` already leaves an item with a pending question out (`pending
165
165
  rest of the queue is dispatched as usual. Never wait for the answer, never ask in this terminal
166
166
  (never `AskUserQuestion`), and never end a turn on the question.
167
167
 
168
+ **Decide before you mark.** A decision or a repo route is not, by itself, a reason to stop. When
169
+ the evidence supports a call — the item, its parent, the PRD, the code, the repo's history — the
170
+ manager (or the worker) makes it, posts the choice and its reasoning on the item so a person can
171
+ reverse it, and carries on. Mark the item only when the call genuinely needs a person: an access
172
+ gap the agent cannot close (an interactive login, a credential or secret store it cannot reach,
173
+ spending money, a legal signature, an account only a person holds), or a hold the operator
174
+ explicitly asked for. Under `humanGate.mode: "strict"` a design or product decision and an
175
+ ambiguous repo route are relayed to the operator as before.
176
+
168
177
  The four cases, each with its `--kind`:
169
178
 
170
179
  | Case | `--kind` | Question or reason (on STDIN) |
@@ -175,8 +184,11 @@ The four cases, each with its `--kind`:
175
184
  | A design or product decision | `decision` | the decision, the options, and what each one changes |
176
185
 
177
186
  A `decision` is raised when a worker's question or `FAILED` reason, or the item itself, says the
178
- work cannot go on until someone decides how it should behave; a worker's plain question stays
179
- `worker-question`.
187
+ work cannot go on until someone decides how it should behave **and** `humanGate.mode` is
188
+ `strict`; under access-only the manager decides it and records why. A worker's plain question
189
+ stays `worker-question`, and is raised only when answering it needs access the agent lacks or an
190
+ operator hold applies. A `repo-route` is raised only under `strict`; under access-only route to the
191
+ best-supported repo and record why.
180
192
 
181
193
  **Every hold except `exhausted` is also a planning miss** unless something outside planning caused
182
194
  it. PRD intake, decomposition and the ready gate exist so a dispatched worker never needs a human;
@@ -471,6 +483,11 @@ queue below). For each:
471
483
  - `release`: dissolve the edges and move the item to the `ready` role in one `lisa-tracker-write`
472
484
  update, with a comment `[lisa-session-manager] Released: <reason>`; read it back with `lisa-tracker-read` and confirm the
473
485
  role changed before you claim it did. Notify Telegram.
486
+ - `decide` (access-only; a blocker was closed NOT PLANNED): relay nothing to the operator. Make
487
+ the call from the item's and blocker's evidence: re-scope the item to build without the
488
+ dependency (dissolve the edge and move it to the `ready` role), drop an edge that no longer applies, or
489
+ close the item. Post `[lisa-session-manager] Decision: <which> — <why>` in the same
490
+ `lisa-tracker-write` update, and read it back before you claim it landed. Notify Telegram.
474
491
  - `keep` with a manager question pending: "Waiting on a human" above handles it.
475
492
  - `keep`, `escalate`, `skip-human-gate`: leave it. Gate self-blocks and clarification blocks
476
493
  belong to `lisa-repair-intake` and humans.
@@ -47,13 +47,17 @@ once it was posted on the item and read back there.
47
47
  ## Autonomous-vs-approval boundary
48
48
 
49
49
  Alone: claim, start workers, retry a stalled item with a fresh session, release a blocked item whose
50
- dependencies are all contained in its base branch. Requires the operator: any question a worker
51
- asks, any item whose repo is unclear, and any item that failed `stall.maxAttempts` times.
50
+ dependencies are all contained in its base branch, and decide a design, product or repo-route
51
+ question itself when the evidence supports a call, recording the choice and its reasoning on the
52
+ item. Requires the operator: an access gap the agent cannot close, a hold the operator explicitly
53
+ asked for, and any item that failed `stall.maxAttempts` times. Under `humanGate.mode: "strict"` every worker question, unclear repo and design or product
54
+ decision also requires the operator.
52
55
 
53
56
  ## Escalation
54
57
 
55
- When an item needs a human (a worker's question, an unclear repo, an item that failed
56
- `stall.maxAttempts` times, or a design or product decision), the manager marks it with the
58
+ When an item needs a human (a worker's question that needs access the agent lacks or an operator
59
+ hold, an item that failed `stall.maxAttempts` times, or — under `strict` only — any worker
60
+ question, unclear repo, or design or product decision), the manager marks it with the
57
61
  configured human-needed marker, posts the question on the item with how to answer it, records it
58
62
  pending in the ledger, and keeps dispatching other items: one item waiting on a person never stops
59
63
  the queue. An item that failed `stall.maxAttempts` times also moves to the `blocked` role. With
@@ -11,6 +11,7 @@ import {
11
11
  AUTOMATION_RUN_OUTCOMES,
12
12
  recordAutomationRun,
13
13
  } from "../../../scripts/automation-run-record.mjs";
14
+ import { resolveHumanGatePolicy } from "../../../scripts/human-gate-act.mjs";
14
15
  import { idComparableValues } from "../../../scripts/operator-id-kinds.mjs";
15
16
  import {
16
17
  CliError,
@@ -240,6 +241,11 @@ export async function route(ctx) {
240
241
  * carried beside them would let the item's text vouch for itself. The
241
242
  * release check compares account ids only, so an `id:` entry reaches it as
242
243
  * its bare value and a `login:` entry not at all (#4623).
244
+ *
245
+ * The human-gate policy (`humanGate.mode`, `humanGate.humanOnly`) comes from
246
+ * config the same way, resolved local-then-global like
247
+ * `human-gate-act.mjs policy`, and any copy in the input is overwritten: the
248
+ * item must not be able to declare its own hold invalid (#4687).
243
249
  * @param {object} ctx - CLI context
244
250
  * @returns {Promise<{ json: object }>} `{action,reason,edges,gate}`
245
251
  */
@@ -255,9 +261,12 @@ export async function blockedPlan(ctx) {
255
261
  const trustedHumanActorIds = idComparableValues(
256
262
  project.config?.trustedAuthorIds
257
263
  );
264
+ const policy = resolveHumanGatePolicy(project.local, project.global);
258
265
  return {
259
266
  json: planBlockedRelease({
260
267
  ...input,
268
+ humanOnly: policy.humanOnly,
269
+ humanGateMode: policy.mode,
261
270
  // The configured label, so a Jira `Human Needed` hold is still a hold.
262
271
  humanNeededLabel:
263
272
  input.humanNeededLabel ?? humanNeededLabel(project, undefined),
@@ -38,6 +38,7 @@ import {
38
38
  loadProject,
39
39
  validOrAbsent,
40
40
  } from "./cli-runtime.mjs";
41
+ import { resolveHumanGatePolicy } from "../../../scripts/human-gate-act.mjs";
41
42
  import { readJsonFile } from "./json-input.mjs";
42
43
  import { readLedger } from "./ledger.mjs";
43
44
  import { blockingGapRepo, listSetupGaps } from "./ledger-setup-gaps.mjs";
@@ -185,11 +186,16 @@ export async function queue(ctx) {
185
186
  const ledger = await readLedger(ctx.root);
186
187
  const me = ctx.values.me ?? ledger.control.me ?? null;
187
188
  const operators = config?.operatorIds ?? [];
189
+ // Resolved local-then-global like `human-gate-act.mjs policy`, so a hold
190
+ // the project's mode keeps is never dispatched as Ready work (#4687).
191
+ const gatePolicy = resolveHumanGatePolicy(project.local, project.global);
188
192
  const policy = {
189
193
  me,
190
194
  operators,
191
195
  trustedAuthorIds: config?.trustedAuthorIds ?? undefined,
192
196
  humanNeededLabel: humanNeededLabel(project, tracker),
197
+ humanOnly: gatePolicy.humanOnly,
198
+ humanGateMode: gatePolicy.mode,
193
199
  };
194
200
  const waiting = pendingRefs(ledger);
195
201
  const gaps = ledger.control.setupGaps;
@@ -266,7 +266,7 @@ Per cycle
266
266
  Trusted hold releasers are sessionManager.trustedAuthorIds (none when
267
267
  unset; plain and id: entries, compared as ids; login: entries never
268
268
  release); trustedHumanActorIds in the input is ignored. stdout
269
- {action:release|keep|escalate|skip-human-gate,reason,edges,gate}.
269
+ {action:release|keep|decide|escalate|skip-human-gate,reason,edges,gate}.
270
270
  --ref fills pendingQuestion from the ledger.
271
271
  mark-plan <ref> --kind <kind> [--cause <cause>] [--item-label <l>]...
272
272
  STDIN: question or reason
@@ -212,7 +212,7 @@ function collectEvidence({ body, comments }) {
212
212
  */
213
213
  function draftRule(holdReasons) {
214
214
  const named = holdReasons.length > 0 ? ` (seen: ${holdReasons[0]})` : "";
215
- const rule = `Planning (filing): file human_gate only for an act no agent can perform, such as a credential, spend, an external account or a legal sign-off; make an open decision yourself${named}.`;
215
+ const rule = `Planning (filing): file human_gate only for an act no agent can perform, such as a login or credential, spend, an external account, a legal signature, an account only a person holds; make an open decision yourself${named}.`;
216
216
  return rule.length > 240 ? `${rule.slice(0, 238)}.` : rule;
217
217
  }
218
218
 
@@ -3,9 +3,16 @@
3
3
  * on a work item that cannot progress without a human, and how it reads the
4
4
  * human's answer back off the item. Pure: no I/O, no clock, no config reads.
5
5
  *
6
- * Four cases need a human: a worker's question, an ambiguous repo route, an
7
- * item `exhausted` after `stall.maxAttempts`, and a design or product
8
- * decision. In each the manager marks the item with the configured
6
+ * Four kinds of mark exist: a worker's question, an ambiguous repo route, an
7
+ * item `exhausted` after `stall.maxAttempts`, and a `decision`. An agent
8
+ * performs every act it has access to (CodySwannGT/lisa#4687), so a hold is
9
+ * only for an act the agent lacks access to (an interactive login, a
10
+ * credential it cannot reach, spending money, a legal signature, an action
11
+ * only a person's account can take) or a hold the operator asked for. A
12
+ * design or product choice the agent can make is decided and recorded, not
13
+ * marked, unless the project sets `humanGate.mode: "strict"`. The kind
14
+ * identifiers are stable on purpose: ledgers in use already carry them. When
15
+ * a mark is warranted the manager marks the item with the configured
9
16
  * human-needed marker, posts the question on the item with enough context to
10
17
  * answer it there, records it pending in the ledger, and keeps dispatching
11
18
  * other work. One item waiting on a person never stops the queue.
@@ -19,7 +26,10 @@
19
26
  * @module session-manager/human-needed
20
27
  */
21
28
 
22
- /** The four reasons an item can need a human. */
29
+ /**
30
+ * The four kinds of mark. Whether one is warranted follows `humanGate.mode`:
31
+ * under `access-only` only missing access or an operator hold needs a person.
32
+ */
23
33
  export const HUMAN_NEEDED_KINDS = Object.freeze([
24
34
  "worker-question",
25
35
  "repo-route",
@@ -165,7 +175,8 @@ const KIND_TITLES = {
165
175
  "worker-question": "the worker building it has a question",
166
176
  "repo-route": "it is not clear which repository it belongs to",
167
177
  exhausted: "every automatic attempt to build it stopped without finishing",
168
- decision: "it needs a design or product decision",
178
+ decision:
179
+ "it needs a person: an act the agent cannot perform, or a call this project keeps for a person",
169
180
  };
170
181
 
171
182
  /**
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
3
  * The session manager's decision for one Blocked item: release it to Ready,
4
- * keep it, escalate it, or leave it to a human.
4
+ * keep it, hand a decision to the agent, escalate it, or leave it to a human.
5
5
  *
6
6
  * ## Why this composes rather than decides
7
7
  *
@@ -26,22 +26,85 @@
26
26
  */
27
27
 
28
28
  import { resolveBlockerEdges } from "../../../scripts/blocker-edge-resolution.mjs";
29
- import { humanGateVerdict } from "../../../scripts/intake-blocker-reprobe.mjs";
29
+ import {
30
+ humanGateVerdict,
31
+ isStrictHumanGateMode,
32
+ } from "../../../scripts/intake-blocker-reprobe.mjs";
30
33
 
31
34
  /** Every action the plan may return. */
32
35
  export const BLOCKED_RELEASE_ACTIONS = Object.freeze([
33
36
  "release",
34
37
  "keep",
38
+ "decide",
35
39
  "escalate",
36
40
  "skip-human-gate",
37
41
  ]);
38
42
 
43
+ /** `blockerReason` of a blocker closed as abandoned, as the edges carry it. */
44
+ const NOT_PLANNED = "not_planned";
45
+
46
+ /**
47
+ * The plan for an item with at least one escalating edge.
48
+ * @param {{decisions: {action: string, blockerReason?: unknown}[], escalations: number}} resolution
49
+ * The per-edge resolution
50
+ * @param {number} total How many edges the item has
51
+ * @param {{humanGateMode?: unknown}} input The plan input, for the mode
52
+ * @returns {{action: string, reason: string, edges: object[]}} The plan
53
+ */
54
+ function planEscalation(resolution, total, input) {
55
+ const escalated = resolution.decisions.filter(
56
+ one => one.action === "escalate"
57
+ );
58
+ const cancelled = escalated.filter(
59
+ one =>
60
+ String(one.blockerReason ?? "")
61
+ .trim()
62
+ .toLowerCase() === NOT_PLANNED
63
+ ).length;
64
+ const unknown = escalated.length - cancelled;
65
+ const strict = isStrictHumanGateMode(input.humanGateMode);
66
+ if (strict) {
67
+ return {
68
+ action: "escalate",
69
+ reason: `${resolution.escalations} of ${total} blocker edge(s) need a human decision.`,
70
+ edges: resolution.decisions,
71
+ };
72
+ }
73
+ if (unknown > 0) {
74
+ return {
75
+ action: "escalate",
76
+ reason:
77
+ `containment could not be computed for ${unknown} of ${total} blocker edge(s); ` +
78
+ "recompute it before judging this item.",
79
+ edges: resolution.decisions,
80
+ };
81
+ }
82
+ return {
83
+ action: "decide",
84
+ reason:
85
+ `${cancelled} of ${total} blocker edge(s) were closed as NOT PLANNED. No person is ` +
86
+ "needed: the agent that picks this item up decides whether to re-scope it, drop the " +
87
+ "edge, or close the item, and records a `Decision:` line on the item saying which " +
88
+ "and why.",
89
+ edges: resolution.decisions,
90
+ };
91
+ }
92
+
39
93
  /**
40
94
  * Plan what to do with one Blocked item.
41
95
  *
42
96
  * Precedence, first match wins: a held human gate (`skip-human-gate`), a
43
97
  * pending manager question (`keep`), no edges (`keep`), every edge dissolves
44
- * (`release`), any edge escalates (`escalate`), otherwise `keep`.
98
+ * (`release`), any edge escalates (`escalate`, or `decide` — see below),
99
+ * otherwise `keep`.
100
+ *
101
+ * A blocker closed NOT PLANNED leaves a decision: does this item still make
102
+ * sense without it? Under the default `humanGate.mode` (`access-only`) the
103
+ * agent makes it (CodySwannGT/lisa#4687): the plan returns `decide`, telling
104
+ * whoever picks the item up to re-scope it, drop the edge or close it, and to
105
+ * record a `Decision:` line. Under `strict` it stays `escalate`, a human relay.
106
+ * An edge whose containment could not be computed is never handed over as a
107
+ * decision in either mode: an unknown is a measurement to redo, not a call.
45
108
  *
46
109
  * `edges` carries the per-edge decisions — each input edge plus its `action`
47
110
  * and `reason` — so the caller can quote them in the explanatory tracker
@@ -52,6 +115,8 @@ export const BLOCKED_RELEASE_ACTIONS = Object.freeze([
52
115
  * comments?: unknown,
53
116
  * trustedHumanActorIds?: unknown,
54
117
  * humanNeededLabel?: unknown,
118
+ * humanOnly?: unknown,
119
+ * humanGateMode?: unknown,
55
120
  * edges?: readonly object[] | null | undefined,
56
121
  * pendingQuestion?: unknown,
57
122
  * }} [input] The item's hold surfaces, its judged edges, and the ledger question.
@@ -69,6 +134,13 @@ export function planBlockedRelease(input = {}) {
69
134
  comments: input.comments,
70
135
  trustedHumanActorIds: input.trustedHumanActorIds,
71
136
  humanNeededLabel: input.humanNeededLabel,
137
+ // The project's human-gate policy (CodySwannGT/lisa#4687): whether a hold
138
+ // is valid, and so whether a lift comment may discharge it, depends on
139
+ // `humanGate.mode` and `humanGate.humanOnly`. Omitted, a strict project's
140
+ // hold would be judged under access-only. The caller resolves both from
141
+ // config, never from the item.
142
+ humanOnly: input.humanOnly,
143
+ humanGateMode: input.humanGateMode,
72
144
  });
73
145
 
74
146
  if (gate.held) {
@@ -116,12 +188,7 @@ export function planBlockedRelease(input = {}) {
116
188
  }
117
189
 
118
190
  if (resolution.escalations > 0) {
119
- return {
120
- action: "escalate",
121
- reason: `${resolution.escalations} of ${edges.length} blocker edge(s) need a human decision.`,
122
- edges: resolution.decisions,
123
- gate,
124
- };
191
+ return { ...planEscalation(resolution, edges.length, input), gate };
125
192
  }
126
193
 
127
194
  return {
@@ -121,9 +121,10 @@ nothing announces it. `lisa-automation-status` must treat a stopped clock as a f
121
121
 
122
122
  - `learnings-audit` (default **false**) — opt-in: when `true`, additionally create the weekly
123
123
  `lisa-auto-<project>-learnings-audit` automation running `/lisa:learnings:audit` (the gardener —
124
- see "Optional automation" below). Default `false` because the gardener's output is human-gated
125
- tracker tickets: a project opts into the recurring audit stream deliberately rather than
126
- receiving recommendation tickets by surprise.
124
+ see "Optional automation" below). Default `false` because the gardener changes what the agents
125
+ believe — under the default `humanGate.mode: "access-only"` its tickets file build-ready, and
126
+ under `"strict"` they are human-gated: either way a project opts into the recurring audit stream
127
+ deliberately rather than receiving recommendation tickets by surprise.
127
128
 
128
129
  The defaults are autonomous by design — the factory model wants inputs flowing through the gates
129
130
  without a human between the loops and the pipeline. Pass `false` explicitly to opt a project into
@@ -201,7 +202,8 @@ For a Codex `rrule`: every 60 min → `FREQ=HOURLY;INTERVAL=1`; every 10 min →
201
202
  defaults above), additionally create `lisa-auto-<project>-learnings-audit`
202
203
  running `/lisa:learnings:audit` once a **week**. It audits the project's
203
204
  knowledge surfaces (learnings ledger, rules trees, skills, wiki) and files
204
- human-gated promote/demote/confirm/retire tickets per the
205
+ promote/demote/confirm/retire tickets — build-ready under the default
206
+ `humanGate.mode: "access-only"`, human-gated under `"strict"` — per the
205
207
  `lisa-learnings-audit` skill. Register at most ONE learnings-audit automation
206
208
  per project — the gardener's marker dedupe assumes a single scheduled runner
207
209
  and guarantees convergence (a transient duplicate from a concurrent run is
@@ -366,7 +368,7 @@ One line each; expand them into the operator's voice, keep the meaning.
366
368
  | **monitor** | Keeps production honest: observability regressions become tracked work instead of silent decay. | The connected observability providers, each through its access layer, plus this project's `monitor.gapTiers` config. | The regressions and coverage gaps this cycle surfaced, capped per run. | Only this project's own services and dashboards; it files findings, it never changes production. | Propose teardown when ALL THREE hold: a date-filtered tracker search finds nothing this loop filed within the trailing 30-day window (a small multiple of its daily cadence), AND this run found nothing, AND the project has no connected observability surfaces left — nothing to monitor. The third is a domain conjunct that only tightens the contract's two-part test: a quiet month on a healthy project is good news, not a reason to stop watching it. | `lisa-monitor/SKILL.md` |
367
369
  | **exploratory-prds** | Keeps the idea pipeline fed: the product's own gaps become PRDs when the PRD queue has room. | The PRD queue's pressure roles (the same ones `/lisa:queue-status` reports) and the project's own product surfaces. | One ideated PRD per run, and only when the pressure gate says the queue has capacity. | Never more than one PRD per run, and nothing at all while unresolved PRD pressure exists. | Propose teardown when ALL THREE hold: a date-filtered tracker search finds no PRD this loop ideated within the trailing 30-day window (a small multiple of its daily cadence), AND this run proposed nothing, AND no unresolved PRD pressure exists while the project has shipped no new surface to ideate against. The third is a domain conjunct that only tightens the contract's two-part test: a quiet month because the queue was full is the loop working, not the loop being obsolete. | `lisa-project-ideation/SKILL.md` |
368
370
  | **exploratory-bugs** | Keeps quality visible: bugs and usability problems get found by using the product, before a customer does. | The running application through its exploratory-qa surface, plus this project's existing bug queue for dedupe. | The findings of one exploratory session, capped per run and deduped against already-filed items. | Only this project's own app; it files tickets, it never changes product code. | Propose teardown when ALL THREE hold: a date-filtered tracker search finds no finding this loop filed within the trailing 30-day window (a small multiple of its daily cadence), AND this run found nothing, AND the project no longer ships an exploratory-qa command surface to explore. The third is a domain conjunct that only tightens the contract's two-part test: a quiet month on a product nobody broke is quality holding, not a reason to stop looking. | `lisa-exploratory-qa/SKILL.md` (the stack's own copy) |
369
- | **learnings-audit** | Keeps the project's knowledge true: stale, duplicated, or contradicted knowledge gets proposed for promotion, demotion, or retirement. | The learnings ledger, the rules trees, the skills, and the wiki — the project's knowledge surfaces. | The knowledge entries this audit judged stale, duplicated, or contradicted, capped per run. | It only proposes; every promote/demote/retire decision is a human-gated tracker ticket. | Propose teardown when BOTH hold: a date-filtered tracker search finds no `[lisa-gardener]` ticket created within the trailing six-week window (six runs at the weekly cadence), AND this run proposed nothing. | `lisa-learnings-audit/SKILL.md` |
371
+ | **learnings-audit** | Keeps the project's knowledge true: stale, duplicated, or contradicted knowledge gets proposed for promotion, demotion, or retirement. | The learnings ledger, the rules trees, the skills, and the wiki — the project's knowledge surfaces. | The knowledge entries this audit judged stale, duplicated, or contradicted, capped per run. | It only proposes: every promote/demote/retire decision is a tracker ticket, filed build-ready under the default `humanGate.mode: "access-only"` (human-gated under `"strict"`, or when the change lands on a human-authored surface). | Propose teardown when BOTH hold: a date-filtered tracker search finds no `[lisa-gardener]` ticket created within the trailing six-week window (six runs at the weekly cadence), AND this run proposed nothing. | `lisa-learnings-audit/SKILL.md` |
370
372
 
371
373
  **Retirement condition is mandatory and non-empty.** Every seeded runbook states one, and a loop
372
374
  that is structurally permanent says exactly that instead of leaving the section blank — an operator