@codyswann/lisa 4.99.6 → 4.99.7

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 (258) hide show
  1. package/all/copy-overwrite/scripts/check-third-party-review-evidence.mjs +337 -26
  2. package/dist/cli/doctor-third-party-evidence-seed.d.ts +9 -4
  3. package/dist/cli/doctor-third-party-evidence-seed.d.ts.map +1 -1
  4. package/dist/cli/doctor-third-party-evidence-seed.js +66 -21
  5. package/dist/cli/doctor-third-party-evidence-seed.js.map +1 -1
  6. package/dist/cli/doctor-third-party-evidence-steps.d.ts +19 -0
  7. package/dist/cli/doctor-third-party-evidence-steps.d.ts.map +1 -0
  8. package/dist/cli/doctor-third-party-evidence-steps.js +60 -0
  9. package/dist/cli/doctor-third-party-evidence-steps.js.map +1 -0
  10. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  11. package/dist/core/lisa-owned-hash-ledger.js +12 -0
  12. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  13. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  14. package/dist/core/third-party-evidence-seed.d.ts +10 -1
  15. package/dist/core/third-party-evidence-seed.d.ts.map +1 -1
  16. package/dist/core/third-party-evidence-seed.js +72 -5
  17. package/dist/core/third-party-evidence-seed.js.map +1 -1
  18. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  19. package/dist/core/upstream-evidence-manifest.js +43 -27
  20. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  21. package/package.json +4 -4
  22. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  23. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  24. package/plugins/lisa/.codex-plugin/skills/lisa-debrief-apply/SKILL.md +1 -1
  25. package/plugins/lisa/.codex-plugin/skills/lisa-delivery-effectiveness/SKILL.md +2 -2
  26. package/plugins/lisa/.codex-plugin/skills/lisa-drive-pr-to-merge/SKILL.md +17 -7
  27. package/plugins/lisa/.codex-plugin/skills/lisa-github-build-intake/SKILL.md +1 -1
  28. package/plugins/lisa/.codex-plugin/skills/lisa-github-validate-issue/SKILL.md +1 -1
  29. package/plugins/lisa/.codex-plugin/skills/lisa-implement/SKILL.md +2 -2
  30. package/plugins/lisa/.codex-plugin/skills/lisa-jira-build-intake/SKILL.md +1 -1
  31. package/plugins/lisa/.codex-plugin/skills/lisa-jira-validate-ticket/SKILL.md +1 -1
  32. package/plugins/lisa/.codex-plugin/skills/lisa-learnings-audit/SKILL.md +11 -4
  33. package/plugins/lisa/.codex-plugin/skills/lisa-linear-build-intake/SKILL.md +1 -1
  34. package/plugins/lisa/.codex-plugin/skills/lisa-linear-validate-issue/SKILL.md +1 -1
  35. package/plugins/lisa/.codex-plugin/skills/lisa-persist-learning/SKILL.md +12 -12
  36. package/plugins/lisa/.codex-plugin/skills/lisa-pull-request-review/SKILL.md +62 -6
  37. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +22 -5
  38. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/answer-record.mjs +28 -4
  39. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-answer-record.mjs +2 -1
  40. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-human.mjs +38 -4
  41. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-usage.mjs +8 -3
  42. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/ledger-questions.mjs +6 -1
  43. package/plugins/lisa/.codex-plugin/skills/lisa-task-decomposition/SKILL.md +2 -2
  44. package/plugins/lisa/agents/learning-judge.md +7 -5
  45. package/plugins/lisa/commands/persist-learning.md +1 -1
  46. package/plugins/lisa/rules/reference/claim-archaeology.md +1 -1
  47. package/plugins/lisa/rules/reference/rejection-detection.md +1 -1
  48. package/plugins/lisa/rules/reference/work-item-definition-of-ready.md +5 -2
  49. package/plugins/lisa/skills/lisa-debrief-apply/SKILL.md +1 -1
  50. package/plugins/lisa/skills/lisa-delivery-effectiveness/SKILL.md +2 -2
  51. package/plugins/lisa/skills/lisa-drive-pr-to-merge/SKILL.md +17 -7
  52. package/plugins/lisa/skills/lisa-github-build-intake/SKILL.md +1 -1
  53. package/plugins/lisa/skills/lisa-github-validate-issue/SKILL.md +1 -1
  54. package/plugins/lisa/skills/lisa-implement/SKILL.md +2 -2
  55. package/plugins/lisa/skills/lisa-jira-build-intake/SKILL.md +1 -1
  56. package/plugins/lisa/skills/lisa-jira-validate-ticket/SKILL.md +1 -1
  57. package/plugins/lisa/skills/lisa-learnings-audit/SKILL.md +11 -4
  58. package/plugins/lisa/skills/lisa-linear-build-intake/SKILL.md +1 -1
  59. package/plugins/lisa/skills/lisa-linear-validate-issue/SKILL.md +1 -1
  60. package/plugins/lisa/skills/lisa-persist-learning/SKILL.md +12 -12
  61. package/plugins/lisa/skills/lisa-pull-request-review/SKILL.md +62 -6
  62. package/plugins/lisa/skills/lisa-session-manager/SKILL.md +22 -5
  63. package/plugins/lisa/skills/lisa-session-manager/scripts/answer-record.mjs +28 -4
  64. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-answer-record.mjs +2 -1
  65. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-human.mjs +38 -4
  66. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-usage.mjs +8 -3
  67. package/plugins/lisa/skills/lisa-session-manager/scripts/ledger-questions.mjs +6 -1
  68. package/plugins/lisa/skills/lisa-task-decomposition/SKILL.md +2 -2
  69. package/plugins/lisa-agy/agents/learning-judge.md +7 -5
  70. package/plugins/lisa-agy/commands/lisa/persist-learning.md +1 -1
  71. package/plugins/lisa-agy/plugin.json +1 -1
  72. package/plugins/lisa-agy/skills/lisa-debrief-apply/SKILL.md +1 -1
  73. package/plugins/lisa-agy/skills/lisa-delivery-effectiveness/SKILL.md +2 -2
  74. package/plugins/lisa-agy/skills/lisa-drive-pr-to-merge/SKILL.md +17 -7
  75. package/plugins/lisa-agy/skills/lisa-github-build-intake/SKILL.md +1 -1
  76. package/plugins/lisa-agy/skills/lisa-github-validate-issue/SKILL.md +1 -1
  77. package/plugins/lisa-agy/skills/lisa-implement/SKILL.md +2 -2
  78. package/plugins/lisa-agy/skills/lisa-jira-build-intake/SKILL.md +1 -1
  79. package/plugins/lisa-agy/skills/lisa-jira-validate-ticket/SKILL.md +1 -1
  80. package/plugins/lisa-agy/skills/lisa-learnings-audit/SKILL.md +11 -4
  81. package/plugins/lisa-agy/skills/lisa-linear-build-intake/SKILL.md +1 -1
  82. package/plugins/lisa-agy/skills/lisa-linear-validate-issue/SKILL.md +1 -1
  83. package/plugins/lisa-agy/skills/lisa-persist-learning/SKILL.md +12 -12
  84. package/plugins/lisa-agy/skills/lisa-pull-request-review/SKILL.md +62 -6
  85. package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +22 -5
  86. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/answer-record.mjs +28 -4
  87. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-answer-record.mjs +2 -1
  88. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-human.mjs +38 -4
  89. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-usage.mjs +8 -3
  90. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/ledger-questions.mjs +6 -1
  91. package/plugins/lisa-agy/skills/lisa-task-decomposition/SKILL.md +2 -2
  92. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  93. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  94. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  95. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  96. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  97. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  98. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  99. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  100. package/plugins/lisa-copilot/agents/learning-judge.agent.md +7 -5
  101. package/plugins/lisa-copilot/commands/lisa/persist-learning.md +1 -1
  102. package/plugins/lisa-copilot/rules/reference/claim-archaeology.md +1 -1
  103. package/plugins/lisa-copilot/rules/reference/rejection-detection.md +1 -1
  104. package/plugins/lisa-copilot/rules/reference/work-item-definition-of-ready.md +5 -2
  105. package/plugins/lisa-copilot/skills/lisa-debrief-apply/SKILL.md +1 -1
  106. package/plugins/lisa-copilot/skills/lisa-delivery-effectiveness/SKILL.md +2 -2
  107. package/plugins/lisa-copilot/skills/lisa-drive-pr-to-merge/SKILL.md +17 -7
  108. package/plugins/lisa-copilot/skills/lisa-github-build-intake/SKILL.md +1 -1
  109. package/plugins/lisa-copilot/skills/lisa-github-validate-issue/SKILL.md +1 -1
  110. package/plugins/lisa-copilot/skills/lisa-implement/SKILL.md +2 -2
  111. package/plugins/lisa-copilot/skills/lisa-jira-build-intake/SKILL.md +1 -1
  112. package/plugins/lisa-copilot/skills/lisa-jira-validate-ticket/SKILL.md +1 -1
  113. package/plugins/lisa-copilot/skills/lisa-learnings-audit/SKILL.md +11 -4
  114. package/plugins/lisa-copilot/skills/lisa-linear-build-intake/SKILL.md +1 -1
  115. package/plugins/lisa-copilot/skills/lisa-linear-validate-issue/SKILL.md +1 -1
  116. package/plugins/lisa-copilot/skills/lisa-persist-learning/SKILL.md +12 -12
  117. package/plugins/lisa-copilot/skills/lisa-pull-request-review/SKILL.md +62 -6
  118. package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +22 -5
  119. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/answer-record.mjs +28 -4
  120. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-answer-record.mjs +2 -1
  121. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-human.mjs +38 -4
  122. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-usage.mjs +8 -3
  123. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/ledger-questions.mjs +6 -1
  124. package/plugins/lisa-copilot/skills/lisa-task-decomposition/SKILL.md +2 -2
  125. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  126. package/plugins/lisa-cursor/agents/learning-judge.md +7 -5
  127. package/plugins/lisa-cursor/commands/lisa/persist-learning.md +1 -1
  128. package/plugins/lisa-cursor/rules/claim-archaeology-reference.mdc +1 -1
  129. package/plugins/lisa-cursor/rules/rejection-detection-reference.mdc +1 -1
  130. package/plugins/lisa-cursor/rules/work-item-definition-of-ready-reference.mdc +5 -2
  131. package/plugins/lisa-cursor/skills/lisa-debrief-apply/SKILL.md +1 -1
  132. package/plugins/lisa-cursor/skills/lisa-delivery-effectiveness/SKILL.md +2 -2
  133. package/plugins/lisa-cursor/skills/lisa-drive-pr-to-merge/SKILL.md +17 -7
  134. package/plugins/lisa-cursor/skills/lisa-github-build-intake/SKILL.md +1 -1
  135. package/plugins/lisa-cursor/skills/lisa-github-validate-issue/SKILL.md +1 -1
  136. package/plugins/lisa-cursor/skills/lisa-implement/SKILL.md +2 -2
  137. package/plugins/lisa-cursor/skills/lisa-jira-build-intake/SKILL.md +1 -1
  138. package/plugins/lisa-cursor/skills/lisa-jira-validate-ticket/SKILL.md +1 -1
  139. package/plugins/lisa-cursor/skills/lisa-learnings-audit/SKILL.md +11 -4
  140. package/plugins/lisa-cursor/skills/lisa-linear-build-intake/SKILL.md +1 -1
  141. package/plugins/lisa-cursor/skills/lisa-linear-validate-issue/SKILL.md +1 -1
  142. package/plugins/lisa-cursor/skills/lisa-persist-learning/SKILL.md +12 -12
  143. package/plugins/lisa-cursor/skills/lisa-pull-request-review/SKILL.md +62 -6
  144. package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +22 -5
  145. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/answer-record.mjs +28 -4
  146. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-answer-record.mjs +2 -1
  147. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-human.mjs +38 -4
  148. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-usage.mjs +8 -3
  149. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/ledger-questions.mjs +6 -1
  150. package/plugins/lisa-cursor/skills/lisa-task-decomposition/SKILL.md +2 -2
  151. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  152. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  153. package/plugins/lisa-devin/agents/learning-judge.md +7 -5
  154. package/plugins/lisa-devin/rules/reference/claim-archaeology.md +1 -1
  155. package/plugins/lisa-devin/rules/reference/rejection-detection.md +1 -1
  156. package/plugins/lisa-devin/rules/reference/work-item-definition-of-ready.md +5 -2
  157. package/plugins/lisa-devin/skills/lisa-debrief-apply/SKILL.md +1 -1
  158. package/plugins/lisa-devin/skills/lisa-delivery-effectiveness/SKILL.md +2 -2
  159. package/plugins/lisa-devin/skills/lisa-drive-pr-to-merge/SKILL.md +17 -7
  160. package/plugins/lisa-devin/skills/lisa-github-build-intake/SKILL.md +1 -1
  161. package/plugins/lisa-devin/skills/lisa-github-validate-issue/SKILL.md +1 -1
  162. package/plugins/lisa-devin/skills/lisa-implement/SKILL.md +2 -2
  163. package/plugins/lisa-devin/skills/lisa-jira-build-intake/SKILL.md +1 -1
  164. package/plugins/lisa-devin/skills/lisa-jira-validate-ticket/SKILL.md +1 -1
  165. package/plugins/lisa-devin/skills/lisa-learnings-audit/SKILL.md +11 -4
  166. package/plugins/lisa-devin/skills/lisa-linear-build-intake/SKILL.md +1 -1
  167. package/plugins/lisa-devin/skills/lisa-linear-validate-issue/SKILL.md +1 -1
  168. package/plugins/lisa-devin/skills/lisa-persist-learning/SKILL.md +12 -12
  169. package/plugins/lisa-devin/skills/lisa-pull-request-review/SKILL.md +62 -6
  170. package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +22 -5
  171. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/answer-record.mjs +28 -4
  172. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-answer-record.mjs +2 -1
  173. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-human.mjs +38 -4
  174. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-usage.mjs +8 -3
  175. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/ledger-questions.mjs +6 -1
  176. package/plugins/lisa-devin/skills/lisa-task-decomposition/SKILL.md +2 -2
  177. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  178. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  179. package/plugins/lisa-expo-agy/plugin.json +1 -1
  180. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  181. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  182. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  183. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  184. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  185. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  186. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  187. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  188. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  189. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  190. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  191. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  192. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  193. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  194. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  195. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  196. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  197. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  198. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  199. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  200. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  201. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  202. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  203. package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
  204. package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
  205. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  206. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  207. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  208. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  209. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  210. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  211. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  212. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  213. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  214. package/plugins/lisa-rails-agy/plugin.json +1 -1
  215. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  216. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  217. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  218. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  219. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  220. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  221. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  222. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  223. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  224. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  225. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  226. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  227. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  228. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  229. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  230. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  231. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  232. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  233. package/plugins/src/base/agents/learning-judge.md +7 -5
  234. package/plugins/src/base/commands/persist-learning.md +1 -1
  235. package/plugins/src/base/rules/reference/claim-archaeology.md +1 -1
  236. package/plugins/src/base/rules/reference/rejection-detection.md +1 -1
  237. package/plugins/src/base/rules/reference/work-item-definition-of-ready.md +5 -2
  238. package/plugins/src/base/skills/lisa-debrief-apply/SKILL.md +1 -1
  239. package/plugins/src/base/skills/lisa-delivery-effectiveness/SKILL.md +2 -2
  240. package/plugins/src/base/skills/lisa-drive-pr-to-merge/SKILL.md +17 -7
  241. package/plugins/src/base/skills/lisa-github-build-intake/SKILL.md +1 -1
  242. package/plugins/src/base/skills/lisa-github-validate-issue/SKILL.md +1 -1
  243. package/plugins/src/base/skills/lisa-implement/SKILL.md +2 -2
  244. package/plugins/src/base/skills/lisa-jira-build-intake/SKILL.md +1 -1
  245. package/plugins/src/base/skills/lisa-jira-validate-ticket/SKILL.md +1 -1
  246. package/plugins/src/base/skills/lisa-learnings-audit/SKILL.md +11 -4
  247. package/plugins/src/base/skills/lisa-linear-build-intake/SKILL.md +1 -1
  248. package/plugins/src/base/skills/lisa-linear-validate-issue/SKILL.md +1 -1
  249. package/plugins/src/base/skills/lisa-persist-learning/SKILL.md +12 -12
  250. package/plugins/src/base/skills/lisa-pull-request-review/SKILL.md +62 -6
  251. package/plugins/src/base/skills/lisa-session-manager/SKILL.md +22 -5
  252. package/plugins/src/base/skills/lisa-session-manager/scripts/answer-record.mjs +28 -4
  253. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-answer-record.mjs +2 -1
  254. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-human.mjs +38 -4
  255. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-usage.mjs +8 -3
  256. package/plugins/src/base/skills/lisa-session-manager/scripts/ledger-questions.mjs +6 -1
  257. package/plugins/src/base/skills/lisa-task-decomposition/SKILL.md +2 -2
  258. package/typescript/create-only/.github/workflows/third-party-review-evidence.yml +58 -17
@@ -62,20 +62,43 @@ function skipReason(status, worker, pending) {
62
62
  return worker ? "worker-not-finished" : null;
63
63
  }
64
64
 
65
+ /**
66
+ * `{requeue: true}` when clearing must also move the item to the `ready`
67
+ * role, else `{}`. A worker's `FAILED` moved the item to the `blocked` role,
68
+ * and the blocked pass keeps an item with no dependency edges, so without
69
+ * this move the "next attempt" that reads the recorded answer is never
70
+ * dispatched (CodySwannGT/lisa#4643). It holds whether the answer still has
71
+ * to be posted or is already on the item. A `DONE` worker's item and a
72
+ * repo-routing answer (carried by its `repo:<name>` stamp) are not moved.
73
+ * @param {string | undefined} status - The ledger item's status
74
+ * @param {{kind?: string, answer?: object | null} | null} pending - The
75
+ * pending question
76
+ * @returns {{requeue?: true}} The flag, only when it applies
77
+ */
78
+ function requeueOf(status, pending) {
79
+ const due =
80
+ status === "FAILED" &&
81
+ Boolean(pending?.answer) &&
82
+ pending?.kind !== "repo-route";
83
+ return due ? { requeue: true } : {};
84
+ }
85
+
65
86
  /**
66
87
  * Plan recording a queued answer on the item. Throws when the answer looks
67
88
  * like it holds a credential: it would be posted on the item.
68
89
  * @param {{ref: string, status?: string, worker?: string | null,
69
90
  * pending: object | null}} input - The item's ref, its ledger status and
70
91
  * worker, and its pending question
71
- * @returns {{ref: string, record: false, reason: string} |
92
+ * @returns {{ref: string, record: false, reason: string, requeue?: true} |
72
93
  * {ref: string, record: true, source: string, answerAt: string | null,
73
- * comment: string}} Plan; answerAt is the queued answer's `at`, which
74
- * `ledger clear-question --expect-answer-at` checks before clearing
94
+ * comment: string, requeue?: true}} Plan; answerAt is the queued answer's
95
+ * `at`, which `ledger clear-question --expect-answer-at` checks before
96
+ * clearing; `requeue: true` means also move the item to the `ready` role
75
97
  */
76
98
  export function planAnswerRecord({ ref, status, worker, pending }) {
77
99
  const reason = skipReason(status, worker, pending);
78
- if (reason) return { ref, record: false, reason };
100
+ const requeue = requeueOf(status, pending);
101
+ if (reason) return { ref, record: false, reason, ...requeue };
79
102
  const { source, text, at } = pending.answer;
80
103
  const shape = findCredentialShape(text);
81
104
  if (shape) {
@@ -93,5 +116,6 @@ export function planAnswerRecord({ ref, status, worker, pending }) {
93
116
  `${MANAGER_COMMENT_PREFIX} The operator answered the question above (by ${by}, ${at ?? "time unknown"}):`,
94
117
  text
95
118
  ),
119
+ ...requeue,
96
120
  };
97
121
  }
@@ -48,7 +48,8 @@ export async function channelAnswer(ctx) {
48
48
  * credential (nothing is printed, so nothing can be posted).
49
49
  * @param {object} ctx - CLI context
50
50
  * @returns {Promise<{ json: object }>} `{ref,record:false,reason}` or
51
- * `{ref,record:true,source,comment}`
51
+ * `{ref,record:true,source,comment}`, either with `requeue: true` when a
52
+ * FAILED worker's item must also move to the `ready` role
52
53
  */
53
54
  export async function answerPlan(ctx) {
54
55
  const ref = requirePositional(ctx, "ref");
@@ -181,10 +181,45 @@ const NO_ANSWERERS =
181
181
  "workers post as. Answer with the answerCommand that status lists, or " +
182
182
  "set sessionManager.operatorIds.";
183
183
 
184
+ /** Why replies are not read while the question's mark is unread. */
185
+ const NOT_MARKED =
186
+ "The pending question has not been marked on the item yet (markedAt is " +
187
+ "null): it was recorded, or its text changed, and its question comment " +
188
+ "has not been posted and read back. Replies are not read until it is, " +
189
+ "or a reply to an earlier question would be taken as this one's answer. " +
190
+ "Finish Mark and move on, then record the new comment with ledger marked " +
191
+ "--comment-id <id>.";
192
+
193
+ /**
194
+ * Why no reply can be read off the item yet, or null when one can. A queued
195
+ * answer is kept. An unmarked question (`markedAt` null) is refused because
196
+ * the answer search anchors on the last recorded question comment, which
197
+ * after a changed question is still the OLD one: reading replies then would
198
+ * queue a reply to the old question as the new one's answer
199
+ * (CodySwannGT/lisa#4643).
200
+ * @param {string} ref - Item ref
201
+ * @param {{answer?: object|null, markedAt?: string|null}} pending - Pending
202
+ * question
203
+ * @returns {object | null} The not-queued result, or null
204
+ */
205
+ function notReadable(ref, pending) {
206
+ if (pending.answer) return { queued: false, ref, reason: "already-queued" };
207
+ if (!pending.markedAt) {
208
+ return {
209
+ queued: false,
210
+ ref,
211
+ reason: "not-marked",
212
+ explanation: NOT_MARKED,
213
+ };
214
+ }
215
+ return null;
216
+ }
217
+
184
218
  /**
185
219
  * `item-answer <ref>` (stdin `{"comments":[...]}`): find the human's answer
186
220
  * on the item and queue it. stdout `{queued:false,reason}` when there is none
187
- * yet, or `reason: "no-answerers-configured"` (exit 0) when nobody may
221
+ * yet, `reason: "not-marked"` (exit 0) while the question's mark has not been
222
+ * read back, or `reason: "no-answerers-configured"` (exit 0) when nobody may
188
223
  * answer there. A reply that looks like it holds a credential is skipped and
189
224
  * listed in `refused` (with `reason: "credential-refused"` when no later
190
225
  * reply answers), so it never wedges the item. Exit 2 when the ref has no
@@ -207,9 +242,8 @@ export async function itemAnswer(ctx) {
207
242
  if (!pending) {
208
243
  throw new CliError(`${ref} has no pending question in the ledger.`, 2);
209
244
  }
210
- if (pending.answer) {
211
- return { json: { queued: false, ref, reason: "already-queued" } };
212
- }
245
+ const held = notReadable(ref, pending);
246
+ if (held) return { json: held };
213
247
  const allowed = allowedAnswerers(config);
214
248
  if (allowed.length === 0) {
215
249
  return {
@@ -277,8 +277,11 @@ Per cycle
277
277
  gh api --paginate repos/<o>/<r>/issues/<n>/comments (user.login,
278
278
  user.id). stdout {queued:true,ref,source,author[,refused]} or
279
279
  {queued:false,ref,reason:no-question-comment|no-answer-yet|
280
- already-queued|no-answerers-configured|credential-refused
281
- [,explanation][,refused,refusedExplanation]}. no-answerers-configured
280
+ already-queued|not-marked|no-answerers-configured|credential-refused
281
+ [,explanation][,refused,refusedExplanation]}. not-marked (exit 0):
282
+ the question's mark was never read back (markedAt null, as after a
283
+ changed question), so no reply is read; record it with ledger marked
284
+ --comment-id <id> first. no-answerers-configured
282
285
  (exit 0): neither list is set, so nothing on the item is read, because
283
286
  the tracker identity is the one workers post as; answer with answer.
284
287
  A reply that looks like a credential is skipped, never queued, and
@@ -303,7 +306,9 @@ Per cycle
303
306
  queued answer's at). A repo-route never records (the repo stamp carries
304
307
  it). Otherwise {ref,record:false,reason:no-pending-question|
305
308
  no-answer-queued|answered-on-item|worker-not-finished|
306
- routed-by-repo-stamp}. Exit 2 when the answer it would post looks
309
+ routed-by-repo-stamp}. Either shape adds requeue:true for a FAILED
310
+ worker's item (in the blocked role): move it to the ready role in the
311
+ same update that removes the marker. Exit 2 when the answer it would post looks
307
312
  like a credential (nothing printed, nothing to post) or the ledger
308
313
  is corrupt.
309
314
  record-cycle --outcome <outcome> [--ref <url>]... [--run-id <id>]
@@ -184,7 +184,12 @@ export function listPendingQuestions(ledger, answerCommand) {
184
184
  * would let the next cycle run `item-answer` against the old question comment
185
185
  * and queue a reply to the old question as the answer to the new one
186
186
  * (CodySwannGT/lisa#4570). A queued answer survives only a re-ping of the same
187
- * text for the same reason: it answered that text.
187
+ * text for the same reason: it answered that text. `managerCommentIds` is
188
+ * kept even when the text changes: those ids also keep the manager's own
189
+ * comments (the old question, its notes) out of the answer candidates, so
190
+ * clearing them would let a manager comment pass for an answer. Instead
191
+ * `item-answer` refuses (`not-marked`) while `markedAt` is null, so the stale
192
+ * last id is never used as the anchor (CodySwannGT/lisa#4643).
188
193
  * `kind` defaults to the previous kind, then `worker-question`.
189
194
  * @param {string} projectRoot - Absolute project root
190
195
  * @param {{ref: string, text: string, telegramMessageId: number|null,
@@ -14,10 +14,10 @@ Break work into ordered, well-scoped tasks that can be independently implemented
14
14
  Every time a dispatched worker had to stop for a human, or file a new ticket mid-build, because planning let a gap through, `learning-judge` may have persisted the check planning should have run as a `planning-miss` learning (CodySwannGT/lisa#4569). Those checks only help if planning reads them back. Before decomposing, load them through the learnings contract's **bounded projection** — never by reading the ledger file wholesale:
15
15
 
16
16
  ```bash
17
- node -e 'import("@codyswann/lisa/learnings").then(async m => { const { readFile } = await import("node:fs/promises"); const file = m.resolveProjectLearningsFile(await m.readProjectConfig(process.cwd())); const raw = await readFile(file, "utf8").catch(() => null); if (raw === null) return; const { entries, omittedCount } = m.projectLearnings(m.parseLearningsFile(raw)); const checks = entries.filter(e => /^Planning \((prd|decomposition|ready-gate|filing)\):/.test(e.rule)).map(e => ({ id: e.id, rule: e.rule, confidence: e.confidence })); console.log(JSON.stringify({ checks, omittedCount })); }).catch(error => console.error(`learned planning checks unavailable: ${error.message}`))' || true
17
+ node -e 'import("@codyswann/lisa/learnings").then(async m => { const { readFile } = await import("node:fs/promises"); const file = m.resolveProjectLearningsFile(await m.readProjectConfig(process.cwd())); const raw = await readFile(file, "utf8").catch(error => { if (error.code === "ENOENT") return null; throw error; }); if (raw === null) return; const planning = m.parseLearningsFile(raw).filter(e => /^Planning \((prd|decomposition|ready-gate|filing)\):/.test(e.rule)); const { entries } = m.projectLearnings(planning); const kept = new Set(entries.map(e => e.id)); const checks = entries.map(e => ({ id: e.id, rule: e.rule, confidence: e.confidence })); const omitted = planning.filter(e => !kept.has(e.id)).map(e => e.id); console.log(JSON.stringify({ checks, omitted })); }).catch(error => console.error(`learned planning checks unavailable: ${error.message}`))' || true
18
18
  ```
19
19
 
20
- Run it from the project root. No output means there is no ledger yet: carry on. A malformed ledger prints one warning and yields nothing: carry on without it. Never let this step block planning.
20
+ Run it from the project root. No output means there is no ledger yet (`ENOENT`): carry on. A ledger that exists but cannot be read, or is malformed, prints one warning naming the error and yields nothing: carry on without it. Say in the plan that the checks were not loaded. The projection is taken over the planning checks alone, so other learnings never crowd them out; `omitted` lists, by id, any planning check the budget still left out — name those in the plan as not applied. Never let this step block planning.
21
21
 
22
22
  Each check names the stage that owns it, and binds there:
23
23
 
@@ -31,7 +31,7 @@ Each candidate you evaluate is a single object:
31
31
  | `scope_hint` | `project` \| `upstream` | The submitter's guess at where the learning belongs. A hint only — attribution below decides. |
32
32
  | `triggering_issue` | string | The issue/work item whose failure produced this candidate. |
33
33
  | `signal` | `planning-miss` \| `wrongly-escalated` \| absent | `planning-miss`: set by a caller that saw a dispatched item stop for a human or file a new ticket mid-build (`lisa-session-manager`, `lisa-implement`); Step 2.5 decides. `wrongly-escalated`: set by `lisa-session-manager` when a human labeled an item's escalation wrong (the configured wrongly-escalated label); Step 2.6 decides. A hint only. |
34
- | `fingerprint` | string | Stable dedupe key for this candidate (computed by the caller, e.g. `lisa-persist-learning`). Echo it back unchanged. |
34
+ | `fingerprint` | string | Not sent: `lisa-persist-learning` runs this judge first and then computes its dedupe key from the rule this verdict carries (the rewritten rule for a `planning-miss`), ignoring any value a caller supplied. Never base a judgment on a fingerprint. |
35
35
 
36
36
  A candidate missing `triggering_issue` or with an empty evidence set can still be evaluated — but it can never reach `durable-learning`, because the mandatory citations below would be impossible.
37
37
 
@@ -61,7 +61,7 @@ Do not accept the candidate's own `why` as evidence — it is the claim under te
61
61
  A missing, ambiguous, contradictory or undecided requirement is not always a one-ticket problem. PRD intake, decomposition and the ready gate (`work-item-definition-of-ready`, the S18 stateless-pickup dry-run) exist so a dispatched worker never needs a human. When one does, the item's own question gets answered on the item, but the process that let it through is unchanged — dropping the signal guarantees the next PRD repeats it. So a requirement gap is a `planning-miss`, not a drop, when **all** of these hold, each established by cited evidence rather than the candidate's word. (The planning skills are Lisa-shipped, but that alone does not make the miss `lisa-upstream` in Step 1: a check about this project's domain — its report formats, its repos, its integrations — belongs here. Only a domain-free check every project's planning would miss is a Lisa gate defect.)
62
62
 
63
63
  1. **It was dispatched.** The item had passed the ready gate — it was in the ready role and was picked up for dispatch — claimed by a worker, or held by the dispatcher while routing it to a repository (a `repo-route` hold: the item is past the ready gate and mid-dispatch, and `repo-scope-split` at decomposition should have made the route unambiguous) — before the gap surfaced. Cite the claim, the dispatch, or the ready-role history. A gap found at PRD intake, during validation, or before the ready flip is the gate **working**: that is `misunderstanding/spec-gap`.
64
- 2. **The information really was missing.** Quote what the worker could not find, and confirm it is absent from the item and the links it resolves. If the answer was on the item and the worker misread it, it is `misunderstanding/spec-gap` (the worker's defect, not planning's).
64
+ 2. **The information really was missing, or the item could not be built as scoped.** For a `prd` or `ready-gate` miss, quote what the worker could not find, and confirm it is absent from the item and the links it resolves. For a `decomposition` miss, the evidence is that the item could not be built as scoped: it was mis-scoped, mis-split, or depended on work nobody filed. Cite the ticket the worker filed mid-build, or the dependency or repository split the item lacked; nothing need be missing from the item's text. If the answer was on the item and the worker misread it, or the item was buildable as written, it is `misunderstanding/spec-gap` (the worker's defect, not planning's).
65
65
  3. **It is not environmental or planned.** An outage, an expired credential, a flaky tool, missing tool access (`tool-access-gate`), or a decision planning **flagged as a human gate** on the item (`human_gate`, `[lisa-human-gate]`) is not a planning miss: asking there was the plan working. Neither is an item that exhausted its attempts. The one exception is a flagged gate a human has since **labeled wrongly escalated**: that is Step 2.6, and this exclusion does not apply to it.
66
66
  4. **A planning check would have caught it.** This is Step 2's prevention question, asked of planning instead of the build. Name the stage that should have caught it — `prd` (the requirement was never decided), `decomposition` (the work was mis-scoped, mis-split, or depended on something nobody filed, including a leaf the router could not place in one repo per `repo-scope-split`), or `ready-gate` (the item looked ready but S18 should have asked the question) — and re-walk it: with the check in force, the item would not have reached Ready with this gap.
67
67
 
@@ -88,11 +88,13 @@ Step 2.5's dispatch condition does not apply (the item was held at filing, never
88
88
  Exactly one of:
89
89
 
90
90
  - **`durable-learning`** — both falsification questions pass with cited evidence. Disposition `persist`.
91
- - **`planning-miss`** — every Step 2.5 condition holds: the item was dispatched past the ready gate, the information really was missing, the cause is not an outage, an expired credential, a flaky tool or a decision flagged as a human gate, and a named planning check would have caught it. Or every Step 2.6 condition holds: a human labeled a held item's escalation wrong and a named filing check would have kept the gate off (`planning_stage: filing`). Disposition `persist`, with `planning_stage` set and `rule` rewritten as the check.
91
+ - **`planning-miss`** — every Step 2.5 condition holds: the item was dispatched past the ready gate, the information really was missing or the item could not be built as scoped, the cause is not an outage, an expired credential, a flaky tool or a decision flagged as a human gate, and a named planning check would have caught it. Or every Step 2.6 condition holds: a human labeled a held item's escalation wrong and a named filing check would have kept the gate off (`planning_stage: filing`). Disposition `persist`, with `planning_stage` set and `rule` rewritten as the check.
92
92
  - **`one-off`** — a genuine typo, transient fluke, or single-occurrence mistake with no recurrence evidence. Disposition `drop`.
93
93
  - **`misunderstanding/spec-gap`** — the failure traces to an ambiguous or missing requirement caught **before** the item was dispatched (the gate worked), or to information the item did hold that was misread. The fix is a better spec (raise it on the work item), not a rule. Disposition `drop`.
94
94
  - **`lisa-upstream`** — set in Step 1. Disposition `handoff-upstream`; never persisted locally.
95
95
 
96
+ **`planning-miss` takes precedence over `durable-learning`** when the candidate's cause is a planning-stage gap on a dispatched item. Both persist, so the hostile default below cannot choose between them. Only `planning-miss` rewrites the rule as a `Planning (<stage>)` check that the planning stage reads back and leaves the countable `[lisa-planning-miss]` note on the item; persisting the same lesson as a `durable-learning` would route it to the build and lose the signal. When the cause lies in the build, not in planning, it is `durable-learning`.
97
+
96
98
  When multiple classifications seem defensible, choose the one that does **not** persist — the hostile default. Dispatch is a fact, not a judgement call: if you cannot cite that the item passed the ready gate and was dispatched, it is not `planning-miss`.
97
99
 
98
100
  ### Step 4: Confidence (durable-learning and planning-miss)
@@ -118,7 +120,7 @@ Return exactly one verdict object per candidate:
118
120
  | `rule` | string | Present **only** when `classification` is `planning-miss`: the candidate's rule rewritten as the `Planning (<stage>): <check>` check, within the contract's caps. The caller persists this text, not the submitted one. |
119
121
  | `disposition` | `persist` \| `drop` \| `handoff-upstream` | `persist` iff durable-learning or planning-miss; `handoff-upstream` iff lisa-upstream; otherwise `drop`. |
120
122
 
121
- Also echo back the candidate's `fingerprint` and `triggering_issue` so the caller can route without re-deriving them.
123
+ Also echo back the candidate's `triggering_issue` so the caller can route without re-deriving it. The caller computes the fingerprint after this verdict.
122
124
 
123
125
  ## Output Format
124
126
 
@@ -126,7 +128,7 @@ Also echo back the candidate's `fingerprint` and `triggering_issue` so the calle
126
128
  ## Learning Judgment
127
129
 
128
130
  **Candidate**: [rule text]
129
- **Fingerprint**: [fingerprint]
131
+ **Fingerprint**: none — the caller computes it after this verdict
130
132
  **Triggering issue**: [ref]
131
133
 
132
134
  | Check | Result | Cited evidence |
@@ -3,4 +3,4 @@ description: "Route a candidate learning through the hostile-default learning-ju
3
3
  argument-hint: "<candidate-json-or-fields>"
4
4
  ---
5
5
 
6
- Use the /lisa-persist-learning skill to fingerprint, judge, and route the candidate learning. $ARGUMENTS
6
+ Use the /lisa-persist-learning skill to judge, fingerprint, and route the candidate learning. $ARGUMENTS
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.99.6",
3
+ "version": "4.99.7",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -57,7 +57,7 @@ Use the branch, PR deduplication, commit, submission and confidence-routing sequ
57
57
  - **No related entry** → append via `persistLearningEntry(projectRoot, entry)`.
58
58
 
59
59
  3. **Entry mapping (eight fields).**
60
- - `fingerprint` — `learningFingerprint(rule)` from `@codyswann/lisa/learnings`, computed from the final consolidated rule. Keep workflow/PR markers separate: use the `lisa-persist-learning` Phase 0 occurrence key with the stable triage-document reference as `triggering_issue`; the rule distinguishes rows sharing that reference.
60
+ - `fingerprint` — `learningFingerprint(rule)` from `@codyswann/lisa/learnings`, computed from the final consolidated rule. Keep workflow/PR markers separate: use the `lisa-persist-learning` Phase 1 occurrence key with the stable triage-document reference as `triggering_issue`; the rule distinguishes rows sharing that reference.
61
61
  - `id` — initially `id = fingerprint`. On an exact stamped consolidation the writer carries forward the deterministic primary target id; report the returned id in the run summary.
62
62
  - `rule` / `why` — from the row's `Summary` and the category-specific guidance in the routing table above (≤240 chars, ≤2 lines).
63
63
  - `provenance` — **the triage-doc row's evidence links**. Evidence supports a rule; it is not the rule's identity, and one event may support several distinct lessons.
@@ -17,11 +17,11 @@ Each needs a stated numerator, denominator and window, or it is a number-shaped
17
17
  | **Gate rejection rate** | Work the pipeline refused, over work submitted | How much effort is spent producing output the standards reject |
18
18
  | **Rework rate** | Items reopened or returned after being declared complete, over items completed | How often "done" was not done |
19
19
  | **Escape rate** | Defects reaching production, over items released | What the gates did not catch |
20
- | **First-pass yield** | Items reaching terminal state with no rework, over items started | The one number that moves only when the whole line works |
20
+ | **First-pass yield** | Items reaching terminal state with no rework, over items started | Items that finished without rework; blind to planning misses resolved by a human, pre-completion gate rejections and escapes fixed in new items |
21
21
  | **Cost per delivered item** | Metered spend, over items reaching terminal state | What a unit of accepted output actually costs |
22
22
  | **Planning-miss rate** | Items carrying a `[lisa-planning-miss]` note, over items picked up for dispatch (entered the claimed role, or were held by the dispatcher at repository routing) | How often planning let through work a worker could not finish without a human |
23
23
 
24
- First-pass yield is the summary measure worth watching, because every other failure shows up in it. The other five exist to tell you *where* it went.
24
+ First-pass yield is the summary measure worth watching, but it does not see every failure. First-pass yield moves on rework and on items that never finish. It does not move on planning misses a human resolved, gate rejections fixed before completion, or escapes fixed in new items; those show up only in the planning-miss rate, the gate rejection rate and the escape rate. That is why the other five are read alongside it, and they also tell you *where* it went.
25
25
 
26
26
  The planning-miss rate is the one that points upstream of the build. Its numerator is the `[lisa-planning-miss]` note `lisa-persist-learning` leaves on an item when `learning-judge` confirms that a dispatched worker had to stop for a human, or file a new ticket mid-build, because planning let a gap through. Count distinct items, not notes. The note is posted only on a confirmed miss, so outages, expired credentials, flaky tools and decisions planning flagged as human gates are already out of it. Both halves come from the tracker. Each persisted miss also becomes a planning check that PRD intake, decomposition and the ready gate read back, so better planning shows up as this number falling.
27
27
 
@@ -750,8 +750,10 @@ rather than assuming, with `gh api repos/<owner>/<repo>/rules/branches/<base>`
750
750
  standing `CHANGES_REQUESTED` is not holding a slot for a review that would
751
751
  otherwise arrive. Nothing is scheduled to clear it.
752
752
 
753
- Where both hold, the block is **indefinite, not slow**. Waiting is not a
754
- strategy; something has to act.
753
+ So whenever a stale `CHANGES_REQUESTED` review stands, the block is
754
+ **indefinite, not slow**, whatever `dismiss_stale_reviews_on_push` is set to.
755
+ The approval count only decides whether anything else is also waiting. Waiting
756
+ is not a strategy; something has to act.
755
757
 
756
758
  **Unresolved threads block independently of the verdict.** This repository sets
757
759
  `required_review_thread_resolution: true`, so a PR can have a clear
@@ -1116,9 +1118,11 @@ patching only here.
1116
1118
  ### d. Review comments — human and bot
1117
1119
  Delegate to the `pull-request-review` skill with the PR number. It owns the whole
1118
1120
  comment cycle: fetch every unresolved human + bot thread (with resolution state via
1119
- GraphQL), implement valid feedback (commit + push), reply to invalid feedback, and
1120
- resolve every thread via `resolveReviewThread` so the branch-protection
1121
- thread-resolution gate clears.
1121
+ GraphQL) and every review-body finding not yet marked as answered (CodeRabbit's
1122
+ outside-diff and nitpick comments live only there), implement valid feedback
1123
+ (commit + push), answer invalid feedback, and resolve every thread via
1124
+ `resolveReviewThread` so the branch-protection thread-resolution gate clears.
1125
+ Its report counts unresolved threads and review-body findings separately.
1122
1126
 
1123
1127
  **A green review check is not proof a review happened.** A third-party review
1124
1128
  app reports on the PR head through a **check run** or a **commit status**, and
@@ -1373,8 +1377,14 @@ proxy for the other, so read them separately:
1373
1377
  stranded verdict. It is safe to dismiss, and leaving it is what makes a PR sit
1374
1378
  wedged looking abandoned.
1375
1379
 
1376
- Never dismiss on `reviewDecision` alone. Dismiss the stale (often bot) review
1377
- where repo policy permits:
1380
+ Never dismiss on `reviewDecision` alone. **Never dismiss a stale
1381
+ `CHANGES_REQUESTED` review while its body has items with no
1382
+ `[lisa-review-body] review=<id>` marker comment** — a push does not answer a
1383
+ review body, and dismissing it discards those findings. Route it through step
1384
+ (d) first; once the marker is posted, dismiss the stale (often bot) review
1385
+ where repo policy permits. The `no actionable items` marker that step (d) posts
1386
+ for a summary-only body counts, because that review has nothing left to answer.
1387
+ Dismiss with:
1378
1388
  ```bash
1379
1389
  gh api -X PUT repos/<owner>/<repo>/pulls/<pr>/reviews/<review_id>/dismissals \
1380
1390
  -f message="Addressed; threads resolved." -f event=DISMISS
@@ -501,7 +501,7 @@ Before the claim mutation, apply `claim-time-guards` — **Value before claim**,
501
501
 
502
502
  **Rejection detection runs first — before the relabel below.** Per the vendor-neutral `rejection-detection` rule (cite the slug; do not restate its classification table), classify this item at the **top of 3b, BEFORE** the `$READY → $CLAIMED` relabel — after the relabel the current-lane signal is gone. Read the item's Label-Event History from `lisa-github-read-issue` (chronological `LabeledEvent` / `UnlabeledEvent` on the configured `$READY` label) and classify it `rejection-reclaim | forward-only | never-left-ready | unknown`. Lane names come from `.lisa.config.json` (`github.labels.build.*`), never hardcoded. A failing/absent history yields `unknown` and the claim proceeds — detection never blocks the build. Items carrying a learning marker (`[lisa-learning-drop]` / `[lisa-learning-pr]` / `[lisa-learning-upstream-handoff]`) or the `learning:needs-triage` or `learning:low-confidence` label are never rejection triggers (no learning-about-learning). Carry the classification into the relabel and lifecycle below.
503
503
 
504
- **On `rejection-reclaim`, reflect before re-implementing** (per `rejection-detection`): read the rejection evidence through the access layer — the issue comments posted after the backward transition (the QA rejection comment) and the review threads on the rejected PR via `lisa-github-read-issue` — assemble ONE candidate learning (rule, why, provenance linking the rejection comment + rejected PR, evidence links, scope hint, triggering issue, fingerprint `sll4-sha1(rule\ntriggering_issue)[:12]`), and route it to the `lisa-persist-learning` skill. If that skill is absent, record the candidate as a comment carrying a **visible prose line plus** the marker (a bare marker renders as an empty bubble) — `Recorded a candidate learning from this rejection (queued for the judgment gate): <one-line candidate rule>.` then `<!-- [lisa-rejection-candidate] key=<issue>-<transition-ts> -->` — and proceed. Dedupe on `<issue>-<backward-transition-timestamp>` — a second re-claim produces no duplicate. Unreadable/absent evidence → no candidate, still implement.
504
+ **On `rejection-reclaim`, reflect before re-implementing** (per `rejection-detection`): read the rejection evidence through the access layer — the issue comments posted after the backward transition (the QA rejection comment) and the review threads on the rejected PR via `lisa-github-read-issue` — assemble ONE candidate learning (rule, why, provenance linking the rejection comment + rejected PR, evidence links, scope hint, triggering issue; no fingerprint, since `lisa-persist-learning` computes its own after the judge), and route it to the `lisa-persist-learning` skill. If that skill is absent, record the candidate as a comment carrying a **visible prose line plus** the marker (a bare marker renders as an empty bubble) — `Recorded a candidate learning from this rejection (queued for the judgment gate): <one-line candidate rule>.` then `<!-- [lisa-rejection-candidate] key=<issue>-<transition-ts> -->` — and proceed. Dedupe on `<issue>-<backward-transition-timestamp>` — a second re-claim produces no duplicate. Unreadable/absent evidence → no candidate, still implement.
505
505
 
506
506
  **Claim-time archaeology runs second — after rejection detection, still before the relabel below.** Classify this item per the vendor-neutral `claim-archaeology` rule, with the rejection classification above as its input. All shared semantics — ancestry signals, classification, learning-loop exclusion, cost budget, candidate derivation, marker dedupe, and the never-block degrade — live in that one slug; change them there, never here. GitHub wiring only: the typed relations and `closingIssuesReferences` are already in the read bundle; text-similarity searches use `gh search issues` over recently-closed issues; the fallback candidate comment is posted with `gh issue comment`.
507
507
 
@@ -345,7 +345,7 @@ Without a baseline and a target an Improvement has no verifiable terminal state
345
345
 
346
346
  The autonomy gate, run last, on every build-ready leaf (use the S15 classification; `N/A` for containers and non-build-ready items). Simulate a stateless agent reading only this item and the links it can resolve — session knowledge about the codebase does not count, because the next claimant will not have it. List every question that agent would have to ask a human before starting work, before choosing between materially different implementations, or before declaring the work done.
347
347
 
348
- **Learned planning checks.** Questions that past dispatched workers actually had to stop and ask are the best predictor of the next one. Load the `Planning (...)` checks through the bounded projection exactly as `lisa-task-decomposition` step 0 does, and add each one that applies to this item as a question the simulated agent must be able to answer from the item and the links it can resolve, the same reach S18 already allows. One it cannot answer is a FAIL question like any other, quoting the check's rule. No ledger, or a malformed one, adds nothing and never fails this gate.
348
+ **Learned planning checks.** Questions that past dispatched workers actually had to stop and ask are the best predictor of the next one. Load the `Planning (...)` checks through the bounded projection exactly as `lisa-task-decomposition` step 0 does, and add each one that applies to this item as a question the simulated agent must be able to answer from the item and the links it can resolve, the same reach S18 already allows. One it cannot answer is a FAIL question like any other, quoting the check's rule. Use that step's command as written: it projects over the planning checks alone. No ledger, or a malformed one, adds nothing; a ledger it cannot read prints one warning naming the error and adds nothing; none of them fails this gate. The report names each planning check the projection omitted, by id, as not asked.
349
349
 
350
350
  Zero questions → PASS. Any question → FAIL, with each question listed verbatim as its own remediation line — these are exactly the clarifying comments the caller posts to the source. The structure gates are proxies; this gate checks the readiness property itself: `ready` means a stateless agent can drive this item to its terminal state with zero human clarification (see `work-item-definition-of-ready`).
351
351
 
@@ -354,9 +354,9 @@ Before shutting down the team, execute the Verify flow:
354
354
  On Claude, the `enforce-verification-gate.sh` Stop hook reads this file — both v1 and v2 — and **will not let the flow stop** until it shows a terminal, all-`pass` verdict. The v2 claim/evidence checks are **advisory-first**: a boundary or identity violation is reported to stderr but does not block until `verification.gate.enforceBoundaries` is set to `true` in `.lisa.config.json` (default `false`, promoted via the threshold ratchet). Treat an advisory warning as a defect to fix now, not a warning to ignore — it becomes blocking on the ratchet. The gate — carrying over the non-bypassable completion gate of the `/goal` primitive, but checked deterministically against real evidence rather than by a transcript-only evaluator model. If you must stop before completion, write the verdict with `status: "blocked"` and the reason — marking each criterion whose proof is blocked as `status: "blocked"` with the blocker diagnosis as its `evidence`, while unaffected criteria keep their real `pass`/`fail` result — that records the outcome and releases the gate instead of leaving it to spin. But a `blocked` verdict is a last resort, not a shortcut around fillable work: **first resolve every gap you can resolve yourself.** If the work item is thin — missing its Validation Journey, acceptance criteria, or other derivable detail — enrich it: derive the missing detail from the ticket context and the codebase, write it back, and proceed. Do **not** block on a gap you could have filled. Only a blocker that survives that attempt is real, and it is one of two kinds:
355
355
 
356
356
  - **Actionable blocker** — an unresolved dependency or fixable technical gap that some team or repository could build (a missing or changed schema field, an unbuilt sibling work item, a required upstream fix), **including cross-repo dependencies**. Before writing the blocked verdict you MUST (1) file a build-ready fix/dependency ticket capturing the diagnosis — in the dependency's own repository/tracker when it is cross-repo (e.g. a `[<repo>] …` ticket in the shared project, or the sibling tracker) — and (2) link the current work item to it as `is blocked by`. Only then write the verdict. This is the same discipline as the regression-spec blocker and the remote-verification-fail exits above, and it is what makes the block machine-recoverable: `repair-intake` re-dispatches a blocked item once its linked `is blocked by` dependency closes, but it cannot act on a prose-only comment. Recommending the ticket "as a human follow-up" without filing and linking it is **not** a permitted exit.
357
- - **Human-only blocker** — an input the agent genuinely cannot obtain or produce no matter what it does: credentials, secrets, or **tool access** it does not have (AWS/CloudWatch, Figma, Jam, Sentry, SonarCloud, a database, a protected deploy target, …), or a product/design decision only a human can make. For missing tool access, follow the `tool-access-gate` rule's break-out protocol: post the "Access Needed" comment naming the exact credential/role/env var to grant and the probe that must pass — never work around the gap by substituting weaker verification, mocking the inaccessible system, or narrowing scope. Record the blocked verdict, mark it `human_needed` (the marker `repair-intake` recognizes, so it won't churn re-dispatching it), and surface or reassign to a human; do **not** fabricate a build-ready ticket, because there is no build-ready work.
357
+ - **Human-only blocker** — an input the agent genuinely cannot obtain or produce no matter what it does: credentials, secrets, or **tool access** it does not have (AWS/CloudWatch, Figma, Jam, Sentry, SonarCloud, a database, a protected deploy target, …), or a product/design decision only a human can make. For missing tool access, follow the `tool-access-gate` rule's break-out protocol: post the "Access Needed" comment naming the exact credential/role/env var to grant and the probe that must pass — never work around the gap by substituting weaker verification, mocking the inaccessible system, or narrowing scope. Record the blocked verdict. That verdict is local, gitignored scratch the tracker never sees, so also leave the stop on the work item, whatever `managedBy` says: (1) post a tracker comment on the work item stating the blocked verdict and its reason (for missing tool access, the "Access Needed" comment is that comment); (2) apply the configured `human_needed` label (the marker `repair-intake` recognizes, so it won't churn re-dispatching it); and (3) move the item to the configured blocked role. All three are required under `managedBy=` too, because a manager's handling of a `FAILED` exit does not apply the label; the manager may also mark the item, and adding a label already present is a no-op. Then surface or reassign to a human; do **not** fabricate a build-ready ticket, because there is no build-ready work.
358
358
 
359
- **Planning-miss signal.** Either exit can mean planning let a gap through, and that signal is worth more than the one ticket (CodySwannGT/lisa#4569). It is a planning miss when you file a new ticket mid-build because this item was mis-scoped, mis-split, or depends on work nobody filed, or when you mark it `human_needed` because a requirement was missing, unclear, contradictory or undecided. It is **not** one when the cause is an outage, an expired credential, missing tool access, a flaky tool, or a decision the item itself flagged as a human gate. For a planning miss, route one candidate through `lisa-persist-learning` with `signal: planning-miss`, `triggering_issue` = **this** item (never the new ticket), `rule` = the check planning should have run, as `Planning (<prd|decomposition|ready-gate>): <check>` (not this item's answer), `why` = the stage that let it through plus a quote of what you could not find, and `evidence_links` = the new ticket or the blocked-verdict comment. Run it as a background subagent where the runtime has one, otherwise after the blocked verdict is recorded; it is headless-safe, never blocks the exit, and its failure is one line in the final summary. Under `managedBy=`, the manager routes a human-needed stop itself when it marks the item, so route only the mid-build ticket case there; routing both would double-count one miss.
359
+ **Planning-miss signal.** Either exit can mean planning let a gap through, and that signal is worth more than the one ticket (CodySwannGT/lisa#4569). It is a planning miss when you file a new ticket mid-build because this item was mis-scoped, mis-split, or depends on work nobody filed, or when you stop it as `human_needed` because a requirement was missing, unclear, contradictory or undecided. It is **not** one when the cause is an outage, an expired credential, missing tool access, a flaky tool, or a decision the item itself flagged as a human gate. For a planning miss, route one candidate through `lisa-persist-learning` with `signal: planning-miss`, `triggering_issue` = **this** item (never the new ticket), `rule` = the check planning should have run, as `Planning (<prd|decomposition|ready-gate>): <check>` (not this item's answer), `why` = the stage that let it through plus a quote of what you could not find, or, for a decomposition miss, the ticket you filed and why the item could not be built as scoped, and `evidence_links` = the new ticket or the blocked-stop tracker comment. Run it as a background subagent where the runtime has one, otherwise after the blocked verdict is recorded; it is headless-safe, never blocks the exit, and its failure is one line in the final summary. Under `managedBy=`, the manager routes a human-needed stop itself when it marks the item, so route only the mid-build ticket case there; routing both would double-count one miss.
360
360
 
361
361
  **Harnesses that do not fire a Stop hook enforce the same discipline by convention.** The
362
362
  `enforce-verification-gate.sh` Stop hook is a **Claude-only** surface — Codex, Cursor, Antigravity,
@@ -381,7 +381,7 @@ Before the claim mutation, apply `claim-time-guards` — **Value before claim**,
381
381
 
382
382
  **Rejection detection runs first — before the transition below.** Per the vendor-neutral `rejection-detection` rule (cite the slug; do not restate its classification table), classify this ticket at the **top of 3b, BEFORE** the `$READY → $CLAIMED` transition — after the transition the current-status signal is gone. Read the ticket's status changelog via `lisa-atlassian-access operation: changelog key: <TICKET>` and classify it `rejection-reclaim | forward-only | never-left-ready | unknown` (a `rejection-reclaim` is a changelog entry whose `to` is the configured `$READY` status following an earlier `review`/`done`-ward status). Status names come from `.lisa.config.json`, never hardcoded. A failing/absent changelog yields `unknown` and the claim proceeds — detection never blocks the build. Tickets carrying a learning marker (`[lisa-learning-drop]` / `[lisa-learning-pr]` / `[lisa-learning-upstream-handoff]`) or the `learning:needs-triage` or `learning:low-confidence` label are never rejection triggers (no learning-about-learning). Carry the classification into the transition and lifecycle below.
383
383
 
384
- **On `rejection-reclaim`, reflect before re-implementing** (per `rejection-detection`): read the rejection evidence through the access layer — the ticket comments posted after the backward transition (the QA rejection comment) via `lisa-atlassian-access operation: read-ticket` / `comment` reads and the review threads on the rejected PR — assemble ONE candidate learning (rule, why, provenance linking the rejection comment + rejected PR, evidence links, scope hint, triggering issue, fingerprint `sll4-sha1(rule\ntriggering_issue)[:12]`), and route it to the `lisa-persist-learning` skill. If that skill is absent, record the candidate via `lisa-atlassian-access operation: comment` as a comment carrying a **visible prose line plus** the marker (a bare marker renders as an empty bubble) — `Recorded a candidate learning from this rejection (queued for the judgment gate): <one-line candidate rule>.` then `<!-- [lisa-rejection-candidate] key=<issue>-<transition-ts> -->` — and proceed. Dedupe on `<issue>-<backward-transition-timestamp>` — a second re-claim produces no duplicate. Unreadable/absent evidence → no candidate, still implement.
384
+ **On `rejection-reclaim`, reflect before re-implementing** (per `rejection-detection`): read the rejection evidence through the access layer — the ticket comments posted after the backward transition (the QA rejection comment) via `lisa-atlassian-access operation: read-ticket` / `comment` reads and the review threads on the rejected PR — assemble ONE candidate learning (rule, why, provenance linking the rejection comment + rejected PR, evidence links, scope hint, triggering issue; no fingerprint, since `lisa-persist-learning` computes its own after the judge), and route it to the `lisa-persist-learning` skill. If that skill is absent, record the candidate via `lisa-atlassian-access operation: comment` as a comment carrying a **visible prose line plus** the marker (a bare marker renders as an empty bubble) — `Recorded a candidate learning from this rejection (queued for the judgment gate): <one-line candidate rule>.` then `<!-- [lisa-rejection-candidate] key=<issue>-<transition-ts> -->` — and proceed. Dedupe on `<issue>-<backward-transition-timestamp>` — a second re-claim produces no duplicate. Unreadable/absent evidence → no candidate, still implement.
385
385
 
386
386
  **Claim-time archaeology runs second — after rejection detection, still before the transition below.** Classify this ticket per the vendor-neutral `claim-archaeology` rule, with the rejection classification above as its input. All shared semantics — ancestry signals, classification, learning-loop exclusion, cost budget, candidate derivation, marker dedupe, and the never-block degrade — live in that one slug; change them there, never here. JIRA wiring only: the typed relations are already in the read bundle; text-similarity searches run through `lisa-atlassian-access operation: search-issues jql:` over recently-closed tickets; the fallback candidate comment is posted via `lisa-atlassian-access operation: comment`.
387
387
 
@@ -347,7 +347,7 @@ Without a baseline and a target an Improvement has no verifiable terminal state
347
347
 
348
348
  The autonomy gate, run last, on every build-ready leaf (use the S15 classification; `N/A` for containers and non-build-ready items). Simulate a stateless agent reading only this item and the links it can resolve — session knowledge about the codebase does not count, because the next claimant will not have it. List every question that agent would have to ask a human before starting work, before choosing between materially different implementations, or before declaring the work done.
349
349
 
350
- **Learned planning checks.** Questions that past dispatched workers actually had to stop and ask are the best predictor of the next one. Load the `Planning (...)` checks through the bounded projection exactly as `lisa-task-decomposition` step 0 does, and add each one that applies to this item as a question the simulated agent must be able to answer from the item and the links it can resolve, the same reach S18 already allows. One it cannot answer is a FAIL question like any other, quoting the check's rule. No ledger, or a malformed one, adds nothing and never fails this gate.
350
+ **Learned planning checks.** Questions that past dispatched workers actually had to stop and ask are the best predictor of the next one. Load the `Planning (...)` checks through the bounded projection exactly as `lisa-task-decomposition` step 0 does, and add each one that applies to this item as a question the simulated agent must be able to answer from the item and the links it can resolve, the same reach S18 already allows. One it cannot answer is a FAIL question like any other, quoting the check's rule. Use that step's command as written: it projects over the planning checks alone. No ledger, or a malformed one, adds nothing; a ledger it cannot read prints one warning naming the error and adds nothing; none of them fails this gate. The report names each planning check the projection omitted, by id, as not asked.
351
351
 
352
352
  Zero questions → PASS. Any question → FAIL, with each question listed verbatim as its own remediation line — these are exactly the clarifying comments the caller posts to the source. The structure gates are proxies; this gate checks the readiness property itself: `ready` means a stateless agent can drive this item to its terminal state with zero human clarification (see `work-item-definition-of-ready`).
353
353
 
@@ -84,12 +84,19 @@ vibes), or leave alone. No evidence ⇒ no candidate; the gardener never files
84
84
  a recommendation it cannot evidence.
85
85
 
86
86
  **Learned planning checks.** A ledger entry whose rule begins
87
- `Planning (prd|decomposition|ready-gate):` is a `planning-miss` learning: the
88
- check planning should have run before a dispatched worker had to stop for a
87
+ `Planning (prd|decomposition|ready-gate|filing):` is a `planning-miss` learning:
88
+ the check planning should have run before a dispatched worker had to stop for a
89
89
  human (CodySwannGT/lisa#4569). When Recurrence shows the same class of gap
90
90
  stopping workers on more than one item, it is a PROMOTE candidate into the
91
- ready gate itself — the `work-item-definition-of-ready` rule or the validators'
92
- S18 dry-run — rather than one more ledger entry competing for the projection.
91
+ stage its rule names — the owner `lisa-task-decomposition` step 0 binds that
92
+ stage to — rather than one more ledger entry competing for the projection:
93
+
94
+ - `prd` → PRD intake's requirement checks (`*-to-tracker` Phase 1.45).
95
+ - `decomposition` → the decomposition obligations in `lisa-task-decomposition`.
96
+ - `ready-gate` → the `work-item-definition-of-ready` rule or the validators' S18 stateless-pickup dry-run.
97
+ - `filing` → the `ready-role-filing` rule, as a check a `human_gate:` hold reason must pass.
98
+
99
+ Never promote a check into a stage other than the one it names.
93
100
  A recurring miss counts once per `[lisa-planning-miss]` note on distinct items.
94
101
 
95
102
  **Auto-merged low-confidence entries are re-reviewed first.** A project
@@ -384,7 +384,7 @@ Before the claim mutation, apply `claim-time-guards` — **Value before claim**,
384
384
 
385
385
  > Reading state history is strictly simpler than the label history this used to key on: `IssueHistory` inlines `fromState.name` / `toState.name` on each node, so the transition is read directly with no label-ID resolution against `list-issue-labels` and no reconstruction from `addedLabelIds`/`removedLabelIds` deltas. That reconstruction was lossy — the deltas carry no prior/next full set — which is one more reason the build lane moved to states. A failing/absent history yields `unknown` and the claim proceeds — detection never blocks the build. Issues carrying a learning marker (`[lisa-learning-drop]` / `[lisa-learning-pr]` / `[lisa-learning-upstream-handoff]`) or the `learning:needs-triage` or `learning:low-confidence` label are never rejection triggers (no learning-about-learning). Carry the classification into the transition and lifecycle below.
386
386
 
387
- **On `rejection-reclaim`, reflect before re-implementing** (per `rejection-detection`): read the rejection evidence through the access layer — the Issue comments posted after the backward transition (the QA rejection comment) via `lisa-linear-access operation: list-comments` and the review threads on the rejected PR — assemble ONE candidate learning (rule, why, provenance linking the rejection comment + rejected PR, evidence links, scope hint, triggering issue, fingerprint `sll4-sha1(rule\ntriggering_issue)[:12]`), and route it to the `lisa-persist-learning` skill. If that skill is absent, record the candidate via `lisa-linear-access operation: save-comment` as a comment carrying a **visible prose line plus** the marker (a bare marker renders as an empty bubble) — `Recorded a candidate learning from this rejection (queued for the judgment gate): <one-line candidate rule>.` then `<!-- [lisa-rejection-candidate] key=<issue>-<transition-ts> -->` — and proceed. Dedupe on `<issue>-<backward-transition-timestamp>` — a second re-claim produces no duplicate. Unreadable/absent evidence → no candidate, still implement.
387
+ **On `rejection-reclaim`, reflect before re-implementing** (per `rejection-detection`): read the rejection evidence through the access layer — the Issue comments posted after the backward transition (the QA rejection comment) via `lisa-linear-access operation: list-comments` and the review threads on the rejected PR — assemble ONE candidate learning (rule, why, provenance linking the rejection comment + rejected PR, evidence links, scope hint, triggering issue; no fingerprint, since `lisa-persist-learning` computes its own after the judge), and route it to the `lisa-persist-learning` skill. If that skill is absent, record the candidate via `lisa-linear-access operation: save-comment` as a comment carrying a **visible prose line plus** the marker (a bare marker renders as an empty bubble) — `Recorded a candidate learning from this rejection (queued for the judgment gate): <one-line candidate rule>.` then `<!-- [lisa-rejection-candidate] key=<issue>-<transition-ts> -->` — and proceed. Dedupe on `<issue>-<backward-transition-timestamp>` — a second re-claim produces no duplicate. Unreadable/absent evidence → no candidate, still implement.
388
388
 
389
389
  **Claim-time archaeology runs second — after rejection detection, still before the transition below.** Classify this Issue per the vendor-neutral `claim-archaeology` rule, with the rejection classification above as its input. All shared semantics — ancestry signals, classification, learning-loop exclusion, cost budget, candidate derivation, marker dedupe, and the never-block degrade — live in that one slug; change them there, never here. Linear wiring only: the native relations are already in the read bundle; text-similarity searches run through `lisa-linear-access operation: list-issues` filtered to recently-closed Issues; the fallback candidate comment is posted via `lisa-linear-access operation: save-comment`.
390
390
 
@@ -332,7 +332,7 @@ Without a baseline and a target an Improvement has no verifiable terminal state
332
332
 
333
333
  The autonomy gate, run last, on every build-ready leaf (use the S15 classification; `N/A` for containers and non-build-ready items). Simulate a stateless agent reading only this item and the links it can resolve — session knowledge about the codebase does not count, because the next claimant will not have it. List every question that agent would have to ask a human before starting work, before choosing between materially different implementations, or before declaring the work done.
334
334
 
335
- **Learned planning checks.** Questions that past dispatched workers actually had to stop and ask are the best predictor of the next one. Load the `Planning (...)` checks through the bounded projection exactly as `lisa-task-decomposition` step 0 does, and add each one that applies to this item as a question the simulated agent must be able to answer from the item and the links it can resolve, the same reach S18 already allows. One it cannot answer is a FAIL question like any other, quoting the check's rule. No ledger, or a malformed one, adds nothing and never fails this gate.
335
+ **Learned planning checks.** Questions that past dispatched workers actually had to stop and ask are the best predictor of the next one. Load the `Planning (...)` checks through the bounded projection exactly as `lisa-task-decomposition` step 0 does, and add each one that applies to this item as a question the simulated agent must be able to answer from the item and the links it can resolve, the same reach S18 already allows. One it cannot answer is a FAIL question like any other, quoting the check's rule. Use that step's command as written: it projects over the planning checks alone. No ledger, or a malformed one, adds nothing; a ledger it cannot read prints one warning naming the error and adds nothing; none of them fails this gate. The report names each planning check the projection omitted, by id, as not asked.
336
336
 
337
337
  Zero questions → PASS. Any question → FAIL, with each question listed verbatim as its own remediation line — these are exactly the clarifying comments the caller posts to the source. The structure gates are proxies; this gate checks the readiness property itself: `ready` means a stateless agent can drive this item to its terminal state with zero human clarification (see `work-item-definition-of-ready`).
338
338
 
@@ -22,29 +22,29 @@ Accept the candidate as JSON or `key=value` fields:
22
22
  - `scope_hint` — `project` | `upstream` (a hint; the judge decides)
23
23
  - `triggering_issue` — the issue/work item whose failure produced this candidate (required)
24
24
  - `signal` — optional; `planning-miss` when a dispatched item stopped for a human or filed a new ticket mid-build (from `lisa-session-manager` or `lisa-implement`); `wrongly-escalated` when a human labeled an item's escalation wrong with the configured wrongly-escalated label (from `lisa-session-manager`'s overruled-escalation sweep, CodySwannGT/lisa#4657), carrying the hold and release as `evidence`. A hint for the judge, never a verdict
25
- - `fingerprint` — optional; computed below when absent
25
+ - `fingerprint` — ignored if supplied; Phase 1 always computes the key from the verdict's rule
26
26
 
27
- ## Phase 0 — Fingerprint (stable dedupe key)
27
+ ## Phase 0 — Judge (mandatory, never skipped)
28
28
 
29
- Every workflow marker and branch below keys off this occurrence fingerprint. It is separate from the ledger entry fingerprint, which all writers compute with `learningFingerprint(rule)` from `@codyswann/lisa/learnings`:
29
+ Invoke the `learning-judge` agent (via the Agent/Task tool with `subagent_type: "learning-judge"` — the same invoke pattern the gardener uses for the `skill-evaluator` ladder router) with the full candidate. It returns a verdict: `classification`, `cited_evidence[]`, `rationale`, `confidence` (durable-learning and planning-miss only), `planning_stage` and the rewritten `rule` (planning-miss only), `disposition`.
30
+
31
+ **Respect the verdict — do not override it.** Never re-run the judge hoping for a different answer, and never persist anything the judge did not classify `durable-learning` or `planning-miss`. For a `planning-miss`, persist the judge's rewritten `Planning (<stage>): <check>` rule, never the submitted text: the check is what planning reads back, and the submitted text is often just the one ticket's answer.
32
+
33
+ ## Phase 1 — Fingerprint (stable dedupe key, after the judge)
34
+
35
+ Every marker, branch and PR search in Phases 2 and 3 uses this fingerprint, so it is computed only after the judge, from the rule the verdict carries: the judge's rewritten `Planning (<stage>): <check>` rule for a `planning-miss`, and the submitted `rule` for every other classification (a drop or an upstream handoff carries the rule it was judged on). That way two wordings the judge rewrites to the same check share one fingerprint, and so one planning-miss note and at most one learning PR. A caller-supplied `fingerprint` is ignored: one formula, applied here, keeps one occurrence on one key. It is separate from the ledger entry fingerprint, which all writers compute with `learningFingerprint(rule)` from `@codyswann/lisa/learnings`:
30
36
 
31
37
  ```text
32
38
  fingerprint = "sll4-" + first 12 hex chars of sha1(normalized_rule + "\n" + triggering_issue)
33
- normalized_rule = rule lowercased, all whitespace runs collapsed to single spaces, trimmed
39
+ normalized_rule = the rule the verdict carries, lowercased, all whitespace runs collapsed to single spaces, trimmed
34
40
  ```
35
41
 
36
42
  ```bash
37
- NORM=$(printf '%s' "$RULE" | tr '[:upper:]' '[:lower:]' | tr -s '[:space:]' ' ' | sed 's/^ *//; s/ *$//')
43
+ NORM=$(printf '%s' "$PERSISTED_RULE" | tr '[:upper:]' '[:lower:]' | tr -s '[:space:]' ' ' | sed 's/^ *//; s/ *$//')
38
44
  FP="sll4-$(printf '%s\n%s' "$NORM" "$TRIGGERING_ISSUE" | shasum -a 1 | cut -c1-12)"
39
45
  ```
40
46
 
41
- (Use `sha1sum` where `shasum` is unavailable.) The same rule for the same triggering issue always produces the same fingerprint, so re-runs dedupe instead of duplicating comments, PRs, or branches.
42
-
43
- ## Phase 1 — Judge (mandatory, never skipped)
44
-
45
- Invoke the `learning-judge` agent (via the Agent/Task tool with `subagent_type: "learning-judge"` — the same invoke pattern the gardener uses for the `skill-evaluator` ladder router) with the full candidate including the fingerprint. It returns a verdict: `classification`, `cited_evidence[]`, `rationale`, `confidence` (durable-learning and planning-miss only), `planning_stage` and the rewritten `rule` (planning-miss only), `disposition`.
46
-
47
- **Respect the verdict — do not override it.** Never re-run the judge hoping for a different answer, and never persist anything the judge did not classify `durable-learning` or `planning-miss`. For a `planning-miss`, persist the judge's rewritten `Planning (<stage>): <check>` rule, never the submitted text: the check is what planning reads back, and the submitted text is often just the one ticket's answer.
47
+ (Use `sha1sum` where `shasum` is unavailable. `PERSISTED_RULE` is the rule the verdict carries, as above.) The same persisted rule for the same triggering issue always produces the same fingerprint, so re-runs dedupe instead of duplicating comments, PRs, or branches.
48
48
 
49
49
  ## Phase 2 — Route by disposition
50
50