@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
@@ -2277,9 +2277,10 @@ Blocked: this command bypasses pre-commit/pre-push hooks (--no-verify or its
2277
2277
  short form -n, HUSKY=0, or core.hooksPath disabling). `git commit -n` and a
2278
2278
  cluster such as `-nm "msg"` skip pre-commit exactly as completely as the long
2279
2279
  flag. Fix the underlying issue (security audit, lint,
2280
- typecheck, tests, formatting) instead. If a fix is genuinely impossible, ask the
2281
- user to make the risk-acceptance decision and add a specific documented ignore;
2282
- never bypass the hook.
2280
+ typecheck, tests, formatting) instead. If a fix is genuinely impossible, make
2281
+ the risk-acceptance decision yourself: add a specific documented ignore with its
2282
+ reason and an expiry (under humanGate.mode strict, ask the user to make that
2283
+ decision instead); never bypass the hook.
2283
2284
  EOF
2284
2285
  exit 2
2285
2286
  fi
@@ -549,10 +549,16 @@ const LisaBlockDirectIssueCreate = async () => {
549
549
  " which resolves or creates exactly one live leaf through",
550
550
  " lisa-tracker-write with build_ready: true, validates it before the",
551
551
  " write, and claims it.",
552
- "2. Must a person perform an act an agent cannot (a credential only they",
553
- " hold, spend, an external account, a legal sign-off, a system the agent",
554
- " cannot reach)? A choice with a reasonable default is not that: decide",
555
- " it, record the decision on the item, and use 1. Otherwise pass",
552
+ "2. Must a person perform an act the agent lacks access to (complete an",
553
+ " interactive login or supply a credential only they hold, approve spend,",
554
+ " open an external account, sign a legal agreement such as a contract,",
555
+ " BAA, DPA or license, act from an account only a person holds such as a",
556
+ " protected deployment approval, act in a system the agent cannot reach,",
557
+ " release a hold the operator explicitly asked for, or edit a file the",
558
+ " project says only people write)? A choice with a reasonable default",
559
+ " is not that, and neither is a compliance judgement or naming an owner",
560
+ ' (unless humanGate.mode is "strict"): decide it, record the decision',
561
+ " on the item, and use 1. Otherwise pass",
556
562
  ' human_gate: "<the act a person must perform>", which stamps',
557
563
  ` ${HUMAN_GATE_MARKER} on the item so the hold is auditable.`,
558
564
  "",
@@ -3,6 +3,8 @@ import { verifyLisaUsageSectionIntegrity } from "../../all/copy-overwrite/script
3
3
  import type { LisaUsageEntry, LisaUsageRollup, LisaUsageChildArtifact, ParsedLisaUsageSection, LisaUsageSectionIntegrityIssue, LisaUsageSectionIntegrityResult } from "../../all/copy-overwrite/scripts/lib/usage-ledger.mjs";
4
4
  export { LISA_USAGE_HEADING, parseLisaUsageSection, verifyLisaUsageSectionIntegrity, };
5
5
  export type { LisaUsageEntry, LisaUsageRollup, LisaUsageChildArtifact, ParsedLisaUsageSection, LisaUsageSectionIntegrityIssue, LisaUsageSectionIntegrityResult, };
6
+ import { assertCanonicalArtifactRef } from "./usage-artifact-ref.js";
7
+ export { assertCanonicalArtifactRef };
6
8
  /**
7
9
  * Merge new usage entries into an existing ledger while keeping stable order for
8
10
  * previously recorded entries and replacing matching `entry_id` rows in place.
@@ -27,6 +29,8 @@ export declare function createLisaUsageRollup(entries: readonly LisaUsageEntry[]
27
29
  *
28
30
  * @param entry Direct usage entry to serialize.
29
31
  * @returns The legacy-readable primary token plus its measured-subset extension.
32
+ * @throws {Error} When `entry.artifactRef` is a short `linear:<KEY-N>` or
33
+ * otherwise not `linear:<workspace>/<KEY-N>` (see `assertCanonicalArtifactRef`).
30
34
  */
31
35
  export declare function renderLisaUsageEntryToken(entry: LisaUsageEntry): string;
32
36
  /**
@@ -50,10 +54,17 @@ export declare function renderLisaUsageRollupToken(rollup: LisaUsageRollup): str
50
54
  * Parsing has always been position-agnostic, so sections written in the old
51
55
  * layout still enumerate and migrate to this layout on their next rewrite.
52
56
  *
57
+ * Validates EVERY entry it is given, so it refuses a section that would carry
58
+ * a non-canonical `artifact_ref` even from a row already stored elsewhere.
59
+ * Callers holding a document with stored rows should use
60
+ * `upsertLisaUsageSection`, which validates only the new entries.
61
+ *
53
62
  * @param input Section payload containing direct entries and rollup totals.
54
63
  * @param input.entries Direct entries to render in document order.
55
64
  * @param input.rollup Rollup token to end the section with.
56
65
  * @returns The managed section text, terminated with a trailing newline.
66
+ * @throws {Error} When any entry's `artifactRef` is not canonical (see
67
+ * `assertCanonicalArtifactRef`).
57
68
  */
58
69
  export declare function renderLisaUsageSection(input: {
59
70
  entries: readonly LisaUsageEntry[];
@@ -69,6 +80,8 @@ export declare function renderLisaUsageSection(input: {
69
80
  * @param input.entries Newly observed direct usage entries.
70
81
  * @param input.rollup Optional explicit rollup payload to serialize.
71
82
  * @returns The updated artifact markdown with exactly one managed usage block.
83
+ * @throws {Error} When a NEW entry's `artifactRef` is not canonical (see
84
+ * `assertCanonicalArtifactRef`); entries already stored are preserved as-is.
72
85
  */
73
86
  export declare function upsertLisaUsageSection(document: string, input: {
74
87
  childArtifacts?: readonly LisaUsageChildArtifact[];
@@ -1 +1 @@
1
- {"version":3,"file":"usage-accounting.d.ts","sourceRoot":"","sources":["../../src/utils/usage-accounting.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAAE,+BAA+B,EAAE,MAAM,iEAAiE,CAAC;AAClH,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,8BAA8B,EAC9B,+BAA+B,EAChC,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,+BAA+B,GAChC,CAAC;AACF,YAAY,EACV,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,8BAA8B,EAC9B,+BAA+B,GAChC,CAAC;AAqKF;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,eAAe,EAAE,SAAS,cAAc,EAAE,EAC1C,WAAW,EAAE,SAAS,cAAc,EAAE,GACrC,SAAS,cAAc,EAAE,CAsB3B;AA+FD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,SAAS,cAAc,EAAE,EAClC,cAAc,CAAC,EAAE,eAAe,GAAG,IAAI,EACvC,cAAc,CAAC,EAAE,SAAS,sBAAsB,EAAE,GACjD,eAAe,CAoDjB;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CAIvE;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CAK1E;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;IACnC,MAAM,EAAE,eAAe,CAAC;CACzB,GAAG,MAAM,CAyBT;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE;IACL,cAAc,CAAC,EAAE,SAAS,sBAAsB,EAAE,CAAC;IACnD,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;IACnC,MAAM,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;CACjC,GACA,MAAM,CAoCR"}
1
+ {"version":3,"file":"usage-accounting.d.ts","sourceRoot":"","sources":["../../src/utils/usage-accounting.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAAE,+BAA+B,EAAE,MAAM,iEAAiE,CAAC;AAClH,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,8BAA8B,EAC9B,+BAA+B,EAChC,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,+BAA+B,GAChC,CAAC;AACF,YAAY,EACV,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,8BAA8B,EAC9B,+BAA+B,GAChC,CAAC;AAMF,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,EAAE,0BAA0B,EAAE,CAAC;AAgKtC;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,eAAe,EAAE,SAAS,cAAc,EAAE,EAC1C,WAAW,EAAE,SAAS,cAAc,EAAE,GACrC,SAAS,cAAc,EAAE,CAsB3B;AA+FD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,SAAS,cAAc,EAAE,EAClC,cAAc,CAAC,EAAE,eAAe,GAAG,IAAI,EACvC,cAAc,CAAC,EAAE,SAAS,sBAAsB,EAAE,GACjD,eAAe,CAoDjB;AAyBD;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CAGvE;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CAK1E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;IACnC,MAAM,EAAE,eAAe,CAAC;CACzB,GAAG,MAAM,CAGT;AA0CD;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE;IACL,cAAc,CAAC,EAAE,SAAS,sBAAsB,EAAE,CAAC;IACnD,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;IACnC,MAAM,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;CACjC,GACA,MAAM,CAGR"}
@@ -5,6 +5,8 @@ export { LISA_USAGE_HEADING, parseLisaUsageSection, verifyLisaUsageSectionIntegr
5
5
  import { collectLisaUsageChildArtifacts } from "./usage-accounting-rollup.js";
6
6
  import { sumNullableDecimals } from "./decimal-sum.js";
7
7
  import { renderEffectivenessToken } from "./effectiveness.js";
8
+ import { assertCanonicalArtifactRef } from "./usage-artifact-ref.js";
9
+ export { assertCanonicalArtifactRef };
8
10
  const MIXED_CURRENCY = "mixed";
9
11
  /**
10
12
  * Serialize a token field so whitespace, delimiters, and HTML comment endings
@@ -270,16 +272,38 @@ export function createLisaUsageRollup(entries, previousRollup, childArtifacts) {
270
272
  };
271
273
  }
272
274
  /**
273
- * Render the machine-readable token for a single direct usage row.
275
+ * Refuse every entry whose `artifact_ref` the completion-proof reader would
276
+ * not recognise (CodySwannGT/lisa#4699).
277
+ *
278
+ * @param entries Entries about to be written.
279
+ */
280
+ function assertEntriesCanonical(entries) {
281
+ entries.forEach(entry => assertCanonicalArtifactRef(entry.artifactRef));
282
+ }
283
+ /**
284
+ * Render the machine-readable token for a single direct usage row without the
285
+ * grammar check, so already-stored legacy rows can be re-serialized.
274
286
  *
275
287
  * @param entry Direct usage entry to serialize.
276
288
  * @returns The legacy-readable primary token plus its measured-subset extension.
277
289
  */
278
- export function renderLisaUsageEntryToken(entry) {
290
+ function renderEntryToken(entry) {
279
291
  const primaryToken = `<!-- lisa:usage-entry entry_id=${encodeTokenValue(entry.entryId)} flow=${encodeTokenValue(entry.flow)} run_id=${encodeTokenValue(entry.runId)} provider=${encodeTokenValue(entry.provider)} model=${encodeTokenValue(entry.model)} source=${encodeTokenValue(entry.source)} input_tokens=${renderNullable(entry.inputTokens)} cached_input_tokens=${renderNullable(entry.cachedInputTokens)} output_tokens=${renderNullable(entry.outputTokens)} reasoning_tokens=${renderNullable(entry.reasoningTokens)} total_tokens=${renderNullable(entry.totalTokens)} cost=${renderNullable(entry.cost)} currency=${renderNullable(entry.currency)} pricing_status=${encodeTokenValue(entry.pricingStatus)} pricing_source=${renderNullable(entry.pricingSource)} artifact_ref=${encodeTokenValue(entry.artifactRef)} parent_artifact_ref=${entry.parentArtifactRef === null ? "" : encodeTokenValue(entry.parentArtifactRef)} -->`;
280
292
  const measuredSubsetToken = `<!-- lisa:usage-entry-measured-subset entry_id=${encodeTokenValue(entry.entryId)} measured_subset_tokens=${renderNullable(entry.measuredSubsetTokens ?? null)} -->`;
281
293
  return `${primaryToken} ${measuredSubsetToken}${renderEffectivenessToken(entry.entryId, entry.effectiveness)}`;
282
294
  }
295
+ /**
296
+ * Render the machine-readable token for a single direct usage row.
297
+ *
298
+ * @param entry Direct usage entry to serialize.
299
+ * @returns The legacy-readable primary token plus its measured-subset extension.
300
+ * @throws {Error} When `entry.artifactRef` is a short `linear:<KEY-N>` or
301
+ * otherwise not `linear:<workspace>/<KEY-N>` (see `assertCanonicalArtifactRef`).
302
+ */
303
+ export function renderLisaUsageEntryToken(entry) {
304
+ assertCanonicalArtifactRef(entry.artifactRef);
305
+ return renderEntryToken(entry);
306
+ }
283
307
  /**
284
308
  * Render the machine-readable rollup token for a managed usage section.
285
309
  *
@@ -306,17 +330,38 @@ export function renderLisaUsageRollupToken(rollup) {
306
330
  * Parsing has always been position-agnostic, so sections written in the old
307
331
  * layout still enumerate and migrate to this layout on their next rewrite.
308
332
  *
333
+ * Validates EVERY entry it is given, so it refuses a section that would carry
334
+ * a non-canonical `artifact_ref` even from a row already stored elsewhere.
335
+ * Callers holding a document with stored rows should use
336
+ * `upsertLisaUsageSection`, which validates only the new entries.
337
+ *
309
338
  * @param input Section payload containing direct entries and rollup totals.
310
339
  * @param input.entries Direct entries to render in document order.
311
340
  * @param input.rollup Rollup token to end the section with.
312
341
  * @returns The managed section text, terminated with a trailing newline.
342
+ * @throws {Error} When any entry's `artifactRef` is not canonical (see
343
+ * `assertCanonicalArtifactRef`).
313
344
  */
314
345
  export function renderLisaUsageSection(input) {
346
+ assertEntriesCanonical(input.entries);
347
+ return renderSection(input);
348
+ }
349
+ /**
350
+ * Render the managed section body without the `artifact_ref` grammar check.
351
+ * Only the upsert path calls it, after checking the NEW entries, so
352
+ * a legacy row already stored in the document never blocks a rewrite.
353
+ *
354
+ * @param input Section payload containing direct entries and rollup totals.
355
+ * @param input.entries Direct entries to render in document order.
356
+ * @param input.rollup Rollup token to end the section with.
357
+ * @returns The managed section text, terminated with a trailing newline.
358
+ */
359
+ function renderSection(input) {
315
360
  const { entries, rollup } = input;
316
361
  const entryRows = entries.length === 0
317
362
  ? ["| _No direct entries recorded_ | | | | |"]
318
363
  : entries.map(entry => `| ${entry.flow} | ${entry.source} | ${entry.provider}/${entry.model} | ${formatEntryTokens(entry)} | ${formatCost(entry.cost, entry.currency)} |`);
319
- const entryTokenLines = entries.length === 0 ? [] : [...entries.map(renderLisaUsageEntryToken), ""];
364
+ const entryTokenLines = entries.length === 0 ? [] : [...entries.map(renderEntryToken), ""];
320
365
  const lines = [
321
366
  LISA_USAGE_HEADING,
322
367
  "",
@@ -341,8 +386,26 @@ export function renderLisaUsageSection(input) {
341
386
  * @param input.entries Newly observed direct usage entries.
342
387
  * @param input.rollup Optional explicit rollup payload to serialize.
343
388
  * @returns The updated artifact markdown with exactly one managed usage block.
389
+ * @throws {Error} When a NEW entry's `artifactRef` is not canonical (see
390
+ * `assertCanonicalArtifactRef`); entries already stored are preserved as-is.
344
391
  */
345
392
  export function upsertLisaUsageSection(document, input) {
393
+ assertEntriesCanonical(input.entries);
394
+ return mergeUsageSection(document, input);
395
+ }
396
+ /**
397
+ * Merge new entries into the managed section once they passed the grammar
398
+ * check. Stored rows are re-serialized unchecked so a legacy row never blocks
399
+ * a rewrite.
400
+ *
401
+ * @param document Existing artifact markdown or comment body.
402
+ * @param input New usage content to merge into the managed section.
403
+ * @param input.childArtifacts Optional child ledgers to recompute descendant totals from current work.
404
+ * @param input.entries Newly observed direct usage entries, already checked.
405
+ * @param input.rollup Optional explicit rollup payload to serialize.
406
+ * @returns The updated artifact markdown with exactly one managed usage block.
407
+ */
408
+ function mergeUsageSection(document, input) {
346
409
  const parsed = parseLisaUsageSection(document);
347
410
  const mergedEntries = mergeLisaUsageEntries(parsed.entries, input.entries);
348
411
  const previousRollup = input.childArtifacts === undefined &&
@@ -355,7 +418,7 @@ export function upsertLisaUsageSection(document, input) {
355
418
  const rollup = mergedEntries.length === 0 && input.rollup
356
419
  ? (previousRollup ?? input.rollup)
357
420
  : createLisaUsageRollup(mergedEntries, previousRollup, input.childArtifacts);
358
- const usageSection = renderLisaUsageSection({
421
+ const usageSection = renderSection({
359
422
  entries: mergedEntries,
360
423
  rollup,
361
424
  }).trimEnd();
@@ -1 +1 @@
1
- {"version":3,"file":"usage-accounting.js","sourceRoot":"","sources":["../../src/utils/usage-accounting.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAAE,+BAA+B,EAAE,MAAM,iEAAiE,CAAC;AASlH,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,+BAA+B,GAChC,CAAC;AASF,uHAAuH;AAEvH,OAAO,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,C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MAAM,EAAE,CAAC;QACZ,OAAO,KAAK;YACV,CAAC,CAAC,GAAG,YAAY,OAAO,mBAAmB,CAAC,KAAK,CAAC,EAAE;YACpD,CAAC,CAAC,GAAG,YAAY,IAAI,CAAC;IAC1B,CAAC;IAED,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,GAAG,MAAM,OAAO,YAAY,IAAI,CAAC;IAC1C,CAAC;IAED,OAAO,GAAG,MAAM,OAAO,YAAY,OAAO,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC;AACzE,CAAC;AAED,6EAA6E"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Producer-side grammar check for usage-entry `artifact_ref` values.
3
+ *
4
+ * Writers must produce a Linear ref as `linear:<workspace>/<KEY-N>`. The
5
+ * completion-proof reader (`isVerifyEntryFor` in
6
+ * `scripts/lib/completion-proof-content.mjs`) matches that form exactly,
7
+ * case-sensitively, against an uppercase issue identifier; it also tolerates a
8
+ * bare `KEY-N`, but it never recognises the short `linear:<KEY-N>`. The writer
9
+ * is a pure utility with no config or workspace context, so it cannot
10
+ * normalise a short ref reliably. It refuses it instead, so producer and
11
+ * consumer agree on one grammar and a bad ref fails loudly at write time
12
+ * rather than silently later (CodySwannGT/lisa#4699).
13
+ *
14
+ * Only the shape is checked, not the value: the workspace must still equal the
15
+ * `linear.workspace` key in `.lisa.config.json` exactly, including case.
16
+ *
17
+ * Only the `linear:` scheme is checked. Other providers' refs (`github:...`,
18
+ * bare Jira `KEY-N`, `notion:...`, and so on) pass through unchanged.
19
+ */
20
+ /**
21
+ * Refuse a usage `artifact_ref` that the completion-proof reader would never
22
+ * recognise.
23
+ *
24
+ * @param ref Candidate `artifact_ref` about to be written.
25
+ * @throws {Error} When `ref` starts with `linear:` but is not
26
+ * `linear:<workspace>/<KEY-N>` (no `/`, an empty workspace or one holding
27
+ * whitespace, or a key that is not an uppercase `KEY-N`).
28
+ */
29
+ export declare function assertCanonicalArtifactRef(ref: string): void;
30
+ //# sourceMappingURL=usage-artifact-ref.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage-artifact-ref.d.ts","sourceRoot":"","sources":["../../src/utils/usage-artifact-ref.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAiBH;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAc5D"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Producer-side grammar check for usage-entry `artifact_ref` values.
3
+ *
4
+ * Writers must produce a Linear ref as `linear:<workspace>/<KEY-N>`. The
5
+ * completion-proof reader (`isVerifyEntryFor` in
6
+ * `scripts/lib/completion-proof-content.mjs`) matches that form exactly,
7
+ * case-sensitively, against an uppercase issue identifier; it also tolerates a
8
+ * bare `KEY-N`, but it never recognises the short `linear:<KEY-N>`. The writer
9
+ * is a pure utility with no config or workspace context, so it cannot
10
+ * normalise a short ref reliably. It refuses it instead, so producer and
11
+ * consumer agree on one grammar and a bad ref fails loudly at write time
12
+ * rather than silently later (CodySwannGT/lisa#4699).
13
+ *
14
+ * Only the shape is checked, not the value: the workspace must still equal the
15
+ * `linear.workspace` key in `.lisa.config.json` exactly, including case.
16
+ *
17
+ * Only the `linear:` scheme is checked. Other providers' refs (`github:...`,
18
+ * bare Jira `KEY-N`, `notion:...`, and so on) pass through unchanged.
19
+ */
20
+ const LINEAR_PREFIX = "linear:";
21
+ const LINEAR_REST_PATTERN = /^[^/\s]+\/[A-Z][A-Z0-9_]*-\d+$/;
22
+ const LINEAR_REQUIRED_FORM = "linear:<workspace>/<KEY-N>";
23
+ /**
24
+ * Whether the part after `linear:` is `<workspace>/<KEY-N>`.
25
+ *
26
+ * @param rest Ref text after the `linear:` prefix.
27
+ * @returns True for a workspace without `/` or whitespace followed by exactly
28
+ * one uppercase `KEY-N`.
29
+ */
30
+ function isQualifiedLinearRest(rest) {
31
+ return LINEAR_REST_PATTERN.test(rest);
32
+ }
33
+ /**
34
+ * Refuse a usage `artifact_ref` that the completion-proof reader would never
35
+ * recognise.
36
+ *
37
+ * @param ref Candidate `artifact_ref` about to be written.
38
+ * @throws {Error} When `ref` starts with `linear:` but is not
39
+ * `linear:<workspace>/<KEY-N>` (no `/`, an empty workspace or one holding
40
+ * whitespace, or a key that is not an uppercase `KEY-N`).
41
+ */
42
+ export function assertCanonicalArtifactRef(ref) {
43
+ if (!ref.startsWith(LINEAR_PREFIX)) {
44
+ return;
45
+ }
46
+ if (isQualifiedLinearRest(ref.slice(LINEAR_PREFIX.length))) {
47
+ return;
48
+ }
49
+ throw new Error(`Usage artifact_ref "${ref}" is not a canonical Linear reference. ` +
50
+ `Write it as ${LINEAR_REQUIRED_FORM} (for example linear:acme/ENG-11), ` +
51
+ `taking <workspace> from the linear.workspace key in .lisa.config.json. ` +
52
+ `The completion proof never recognises a short linear:<KEY-N> or a ` +
53
+ `lowercase key, so such an entry would later be refused as absent.`);
54
+ }
55
+ //# sourceMappingURL=usage-artifact-ref.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage-artifact-ref.js","sourceRoot":"","sources":["../../src/utils/usage-artifact-ref.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,aAAa,GAAG,SAAS,CAAC;AAChC,MAAM,mBAAmB,GAAG,gCAAgC,CAAC;AAC7D,MAAM,oBAAoB,GAAG,4BAA4B,CAAC;AAE1D;;;;;;GAMG;AACH,SAAS,qBAAqB,CAAC,IAAY;IACzC,OAAO,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACxC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,0BAA0B,CAAC,GAAW;IACpD,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;QACnC,OAAO;IACT,CAAC;IACD,IAAI,qBAAqB,CAAC,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;QAC3D,OAAO;IACT,CAAC;IACD,MAAM,IAAI,KAAK,CACb,uBAAuB,GAAG,yCAAyC;QACjE,eAAe,oBAAoB,qCAAqC;QACxE,yEAAyE;QACzE,oEAAoE;QACpE,mEAAmE,CACtE,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -188,7 +188,7 @@
188
188
  "qs": "^6.16.0"
189
189
  },
190
190
  "name": "@codyswann/lisa",
191
- "version": "4.109.2",
191
+ "version": "4.110.0",
192
192
  "description": "Governance-as-code for AI coding agents: turns a repository into agent-operated software factories with guardrails, guidance and automated enforcement for Claude Code, Codex, Cursor, OpenCode, Antigravity, Copilot and Devin",
193
193
  "main": "dist/index.js",
194
194
  "exports": {
@@ -351,7 +351,7 @@
351
351
  "test": "tests"
352
352
  },
353
353
  "types": "./dist/index.d.ts",
354
- "lisaReleaseCommit": "ba915a7725d7c2fcc65e4feae5f52683648af969",
355
- "gitHead": "ba915a7725d7c2fcc65e4feae5f52683648af969",
356
- "lisaReleaseTag": "v4.109.2"
354
+ "lisaReleaseCommit": "6512d5ceecd1cde2fc0ef6754709e33cbea40c6e",
355
+ "gitHead": "6512d5ceecd1cde2fc0ef6754709e33cbea40c6e",
356
+ "lisaReleaseTag": "v4.110.0"
357
357
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.109.2",
3
+ "version": "4.110.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.109.2",
3
+ "version": "4.110.0",
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