@codyswann/lisa 8.3.0 → 8.5.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 (281) hide show
  1. package/all/copy-overwrite/scripts/lib/private-key-redaction.d.mts +4 -0
  2. package/all/copy-overwrite/scripts/lib/private-key-redaction.mjs +59 -0
  3. package/all/copy-overwrite/scripts/lisa-gates.mjs +1 -0
  4. package/all/copy-overwrite/scripts/lisa-hooks/block-direct-issue-create.sh +4 -1
  5. package/all/copy-overwrite/scripts/lisa-hooks/worktree-binding-guard.mjs +56 -1
  6. package/all/copy-overwrite/scripts/lisa-run-gates.mjs +17 -14
  7. package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +2 -2
  8. package/cdk/package-lisa/package.lisa.json +1 -1
  9. package/dist/cli/confined-project-read.d.ts +2 -1
  10. package/dist/cli/confined-project-read.d.ts.map +1 -1
  11. package/dist/cli/confined-project-read.js +22 -5
  12. package/dist/cli/confined-project-read.js.map +1 -1
  13. package/dist/cli/gh-cli.d.ts +2 -1
  14. package/dist/cli/gh-cli.d.ts.map +1 -1
  15. package/dist/cli/gh-cli.js +5 -3
  16. package/dist/cli/gh-cli.js.map +1 -1
  17. package/dist/cli/github-read-issue-cmd.d.ts +62 -0
  18. package/dist/cli/github-read-issue-cmd.d.ts.map +1 -0
  19. package/dist/cli/github-read-issue-cmd.js +121 -0
  20. package/dist/cli/github-read-issue-cmd.js.map +1 -0
  21. package/dist/cli/github-reader-relationships.d.ts +41 -0
  22. package/dist/cli/github-reader-relationships.d.ts.map +1 -0
  23. package/dist/cli/github-reader-relationships.js +218 -0
  24. package/dist/cli/github-reader-relationships.js.map +1 -0
  25. package/dist/cli/github-reader-target.d.ts +24 -0
  26. package/dist/cli/github-reader-target.d.ts.map +1 -0
  27. package/dist/cli/github-reader-target.js +95 -0
  28. package/dist/cli/github-reader-target.js.map +1 -0
  29. package/dist/cli/github-reader-wire.d.ts +72 -0
  30. package/dist/cli/github-reader-wire.d.ts.map +1 -0
  31. package/dist/cli/github-reader-wire.js +125 -0
  32. package/dist/cli/github-reader-wire.js.map +1 -0
  33. package/dist/cli/index.d.ts.map +1 -1
  34. package/dist/cli/index.js +2 -2
  35. package/dist/cli/index.js.map +1 -1
  36. package/dist/controls/carrier-edits.d.ts +1 -1
  37. package/dist/controls/carrier-edits.d.ts.map +1 -1
  38. package/dist/controls/carrier-edits.js +13 -3
  39. package/dist/controls/carrier-edits.js.map +1 -1
  40. package/dist/controls/carriers.d.ts.map +1 -1
  41. package/dist/controls/carriers.js +7 -2
  42. package/dist/controls/carriers.js.map +1 -1
  43. package/dist/controls/checks-binding.d.ts.map +1 -1
  44. package/dist/controls/checks-binding.js +13 -7
  45. package/dist/controls/checks-binding.js.map +1 -1
  46. package/dist/controls/commands/attest-before-enforce.d.ts.map +1 -1
  47. package/dist/controls/commands/attest-before-enforce.js +4 -5
  48. package/dist/controls/commands/attest-before-enforce.js.map +1 -1
  49. package/dist/controls/commands/attest-workspace.d.ts.map +1 -1
  50. package/dist/controls/commands/attest-workspace.js +3 -1
  51. package/dist/controls/commands/attest-workspace.js.map +1 -1
  52. package/dist/controls/commands/declaration-check.d.ts.map +1 -1
  53. package/dist/controls/commands/declaration-check.js +7 -4
  54. package/dist/controls/commands/declaration-check.js.map +1 -1
  55. package/dist/controls/commands/proof-check.js +1 -1
  56. package/dist/controls/commands/proof-check.js.map +1 -1
  57. package/dist/controls/commands/seed.d.ts +1 -9
  58. package/dist/controls/commands/seed.d.ts.map +1 -1
  59. package/dist/controls/commands/seed.js +72 -65
  60. package/dist/controls/commands/seed.js.map +1 -1
  61. package/dist/controls/configure-road.d.ts +2 -0
  62. package/dist/controls/configure-road.d.ts.map +1 -1
  63. package/dist/controls/configure-road.js +18 -14
  64. package/dist/controls/configure-road.js.map +1 -1
  65. package/dist/controls/enforce-entry-outcome.d.ts +2 -1
  66. package/dist/controls/enforce-entry-outcome.d.ts.map +1 -1
  67. package/dist/controls/enforce-entry-outcome.js +17 -15
  68. package/dist/controls/enforce-entry-outcome.js.map +1 -1
  69. package/dist/controls/enforce-points.d.ts +2 -0
  70. package/dist/controls/enforce-points.d.ts.map +1 -1
  71. package/dist/controls/enforce-points.js +4 -1
  72. package/dist/controls/enforce-points.js.map +1 -1
  73. package/dist/controls/enforce-report.d.ts.map +1 -1
  74. package/dist/controls/enforce-report.js +6 -1
  75. package/dist/controls/enforce-report.js.map +1 -1
  76. package/dist/controls/evidence-redact.d.ts.map +1 -1
  77. package/dist/controls/evidence-redact.js +11 -6
  78. package/dist/controls/evidence-redact.js.map +1 -1
  79. package/dist/controls/gates-declaration.d.ts.map +1 -1
  80. package/dist/controls/gates-declaration.js +6 -1
  81. package/dist/controls/gates-declaration.js.map +1 -1
  82. package/dist/controls/proof-copy-preparation.d.ts +33 -0
  83. package/dist/controls/proof-copy-preparation.d.ts.map +1 -0
  84. package/dist/controls/proof-copy-preparation.js +159 -0
  85. package/dist/controls/proof-copy-preparation.js.map +1 -0
  86. package/dist/controls/proof-copy-prepared-state.d.ts +33 -0
  87. package/dist/controls/proof-copy-prepared-state.d.ts.map +1 -0
  88. package/dist/controls/proof-copy-prepared-state.js +117 -0
  89. package/dist/controls/proof-copy-prepared-state.js.map +1 -0
  90. package/dist/controls/proof-copy-workspace.d.ts.map +1 -1
  91. package/dist/controls/proof-copy-workspace.js +17 -4
  92. package/dist/controls/proof-copy-workspace.js.map +1 -1
  93. package/dist/controls/proof-copy.d.ts +5 -0
  94. package/dist/controls/proof-copy.d.ts.map +1 -1
  95. package/dist/controls/proof-copy.js +17 -15
  96. package/dist/controls/proof-copy.js.map +1 -1
  97. package/dist/controls/proof-patch.d.ts +12 -0
  98. package/dist/controls/proof-patch.d.ts.map +1 -1
  99. package/dist/controls/proof-patch.js +28 -0
  100. package/dist/controls/proof-patch.js.map +1 -1
  101. package/dist/controls/proof-preparation-declaration.d.ts +15 -0
  102. package/dist/controls/proof-preparation-declaration.d.ts.map +1 -0
  103. package/dist/controls/proof-preparation-declaration.js +57 -0
  104. package/dist/controls/proof-preparation-declaration.js.map +1 -0
  105. package/dist/controls/proof-tools.d.ts +7 -4
  106. package/dist/controls/proof-tools.d.ts.map +1 -1
  107. package/dist/controls/proof-tools.js +1 -1
  108. package/dist/controls/proof-tools.js.map +1 -1
  109. package/dist/controls/register-drift.d.ts.map +1 -1
  110. package/dist/controls/register-drift.js +4 -3
  111. package/dist/controls/register-drift.js.map +1 -1
  112. package/dist/controls/register-evidence-rule.d.ts +2 -0
  113. package/dist/controls/register-evidence-rule.d.ts.map +1 -1
  114. package/dist/controls/register-evidence-rule.js +8 -7
  115. package/dist/controls/register-evidence-rule.js.map +1 -1
  116. package/dist/controls/register-rules.d.ts +2 -0
  117. package/dist/controls/register-rules.d.ts.map +1 -1
  118. package/dist/controls/register-rules.js.map +1 -1
  119. package/dist/controls/register-types.d.ts +2 -4
  120. package/dist/controls/register-types.d.ts.map +1 -1
  121. package/dist/controls/register-types.js.map +1 -1
  122. package/dist/controls/register.d.ts +2 -0
  123. package/dist/controls/register.d.ts.map +1 -1
  124. package/dist/controls/register.js +3 -1
  125. package/dist/controls/register.js.map +1 -1
  126. package/dist/controls/secret-scan.d.ts.map +1 -1
  127. package/dist/controls/secret-scan.js +7 -5
  128. package/dist/controls/secret-scan.js.map +1 -1
  129. package/dist/controls/secret-shapes.d.ts +7 -7
  130. package/dist/controls/secret-shapes.d.ts.map +1 -1
  131. package/dist/controls/secret-shapes.js +7 -18
  132. package/dist/controls/secret-shapes.js.map +1 -1
  133. package/dist/controls/shipped-parts.d.ts +89 -0
  134. package/dist/controls/shipped-parts.d.ts.map +1 -0
  135. package/dist/controls/shipped-parts.js +233 -0
  136. package/dist/controls/shipped-parts.js.map +1 -0
  137. package/dist/core/lisa-owned-hash-ledger.json +38 -0
  138. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  139. package/dist/core/upstream-evidence-manifest.json +90 -23
  140. package/dist/strategies/package-lisa-host-pins.d.ts +7 -12
  141. package/dist/strategies/package-lisa-host-pins.d.ts.map +1 -1
  142. package/dist/strategies/package-lisa-host-pins.js +29 -30
  143. package/dist/strategies/package-lisa-host-pins.js.map +1 -1
  144. package/dist/strategies/package-lisa-range-intersection.d.ts +8 -0
  145. package/dist/strategies/package-lisa-range-intersection.d.ts.map +1 -0
  146. package/dist/strategies/package-lisa-range-intersection.js +73 -0
  147. package/dist/strategies/package-lisa-range-intersection.js.map +1 -0
  148. package/harper-fabric/package-lisa/package.lisa.json +3 -2
  149. package/package.json +4 -4
  150. package/phaser/package-lisa/package.lisa.json +3 -2
  151. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  152. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  153. package/plugins/lisa/.codex-plugin/skills/lisa-attest/SKILL.md +12 -2
  154. package/plugins/lisa/.codex-plugin/skills/lisa-configure/SKILL.md +27 -13
  155. package/plugins/lisa/.codex-plugin/skills/lisa-github-read-issue/SKILL.md +22 -106
  156. package/plugins/lisa/.codex-plugin/skills/lisa-persist-learning/SKILL.md +37 -5
  157. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +9 -10
  158. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
  159. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
  160. package/plugins/lisa/hooks/block-direct-issue-create.sh +4 -1
  161. package/plugins/lisa/hooks/worktree-binding-guard.mjs +56 -1
  162. package/plugins/lisa/skills/lisa-attest/SKILL.md +12 -2
  163. package/plugins/lisa/skills/lisa-configure/SKILL.md +27 -13
  164. package/plugins/lisa/skills/lisa-github-read-issue/SKILL.md +22 -106
  165. package/plugins/lisa/skills/lisa-persist-learning/SKILL.md +37 -5
  166. package/plugins/lisa/skills/lisa-session-manager/SKILL.md +9 -10
  167. package/plugins/lisa/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
  168. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
  169. package/plugins/lisa-agy/hooks/block-direct-issue-create.sh +4 -1
  170. package/plugins/lisa-agy/plugin.json +1 -1
  171. package/plugins/lisa-agy/skills/lisa-attest/SKILL.md +12 -2
  172. package/plugins/lisa-agy/skills/lisa-configure/SKILL.md +27 -13
  173. package/plugins/lisa-agy/skills/lisa-github-read-issue/SKILL.md +22 -106
  174. package/plugins/lisa-agy/skills/lisa-persist-learning/SKILL.md +37 -5
  175. package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +9 -10
  176. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
  177. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
  178. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  179. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  180. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  181. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  182. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  183. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  184. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  185. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  186. package/plugins/lisa-copilot/hooks/block-direct-issue-create.sh +4 -1
  187. package/plugins/lisa-copilot/hooks/worktree-binding-guard.mjs +56 -1
  188. package/plugins/lisa-copilot/skills/lisa-attest/SKILL.md +12 -2
  189. package/plugins/lisa-copilot/skills/lisa-configure/SKILL.md +27 -13
  190. package/plugins/lisa-copilot/skills/lisa-github-read-issue/SKILL.md +22 -106
  191. package/plugins/lisa-copilot/skills/lisa-persist-learning/SKILL.md +37 -5
  192. package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +9 -10
  193. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
  194. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
  195. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  196. package/plugins/lisa-cursor/hooks/block-direct-issue-create.sh +4 -1
  197. package/plugins/lisa-cursor/hooks/worktree-binding-guard.mjs +56 -1
  198. package/plugins/lisa-cursor/skills/lisa-attest/SKILL.md +12 -2
  199. package/plugins/lisa-cursor/skills/lisa-configure/SKILL.md +27 -13
  200. package/plugins/lisa-cursor/skills/lisa-github-read-issue/SKILL.md +22 -106
  201. package/plugins/lisa-cursor/skills/lisa-persist-learning/SKILL.md +37 -5
  202. package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +9 -10
  203. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
  204. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
  205. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  206. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  207. package/plugins/lisa-devin/hooks/block-direct-issue-create.sh +4 -1
  208. package/plugins/lisa-devin/hooks/worktree-binding-guard.mjs +56 -1
  209. package/plugins/lisa-devin/skills/lisa-attest/SKILL.md +12 -2
  210. package/plugins/lisa-devin/skills/lisa-configure/SKILL.md +27 -13
  211. package/plugins/lisa-devin/skills/lisa-github-read-issue/SKILL.md +22 -106
  212. package/plugins/lisa-devin/skills/lisa-persist-learning/SKILL.md +37 -5
  213. package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +9 -10
  214. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
  215. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
  216. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  217. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  218. package/plugins/lisa-expo-agy/plugin.json +1 -1
  219. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  220. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  221. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  222. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  223. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  224. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  225. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  226. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  227. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  228. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  229. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  230. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  231. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  232. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  233. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  234. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  235. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  236. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  237. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  238. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  239. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  240. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  241. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  242. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  243. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  244. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  245. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  246. package/plugins/lisa-rails-agy/plugin.json +1 -1
  247. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  248. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  249. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  250. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  251. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  252. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  253. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  254. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  255. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  256. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  257. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  258. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  259. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  260. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  261. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  262. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  263. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  264. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  265. package/plugins/src/base/hooks/block-direct-issue-create.sh +4 -1
  266. package/plugins/src/base/hooks/worktree-binding-guard.mjs +56 -1
  267. package/plugins/src/base/skills/lisa-attest/SKILL.md +12 -2
  268. package/plugins/src/base/skills/lisa-configure/SKILL.md +27 -13
  269. package/plugins/src/base/skills/lisa-github-read-issue/SKILL.md +22 -106
  270. package/plugins/src/base/skills/lisa-persist-learning/SKILL.md +37 -5
  271. package/plugins/src/base/skills/lisa-session-manager/SKILL.md +9 -10
  272. package/plugins/src/base/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
  273. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
  274. package/rails/copy-overwrite/scripts/check-nightly-e2e-health.mjs +5115 -0
  275. package/scripts/check-derived-artifacts.mjs +1 -0
  276. package/scripts/generate-nightly-e2e-guard-certificate.mjs +15 -1
  277. package/scripts/lib/phrase-tests/redact.mjs +3 -8
  278. package/scripts/two-channel-couplings.json +5 -3
  279. package/typescript/copy-overwrite/.prettierignore +2 -0
  280. package/typescript/copy-overwrite/scripts/lisa-typecheck.mjs +82 -0
  281. package/typescript/package-lisa/package.lisa.json +3 -2
@@ -14,20 +14,23 @@ Repository name for scoped comments and logs: `basename $(git rev-parse --show-t
14
14
 
15
15
  ## Phase 1 — Resolve Context
16
16
 
17
- 1. Confirm `gh auth status` succeeds.
18
- 2. Parse `$ARGUMENTS`. Accept either:
19
- - `<org>/<repo>#<number>` token, OR
20
- - `https://github.com/<org>/<repo>/issues/<number>` URL.
21
-
22
- If `$ARGUMENTS` is just `#<number>` or `<number>`, resolve `<org>/<repo>` from `.lisa.config.json` (`github.org` / `github.repo`).
23
- 3. If the input doesn't parse cleanly, stop and report. Do NOT guess.
17
+ Pass the issue number, `<org>/<repo>#<number>`, or GitHub issue URL to the reader from the Lisa checkout. The reader resolves `.lisa.config.local.json` over `.lisa.config.json` before any GitHub request. A bare number uses `github.org` and `github.repo`. Configuration or syntax failure stops the read.
24
18
 
25
19
  ## Phase 2 — Fetch Primary Issue
26
20
 
27
21
  ```bash
28
- gh issue view <number> --repo <org>/<repo> --json number,title,body,state,stateReason,author,assignees,labels,milestone,createdAt,updatedAt,closedAt,url,comments,reactionGroups,projectItems
22
+ lisa --no-update-check github-read-issue '<issue-ref>'
29
23
  ```
30
24
 
25
+ Use `issue`, `comments`, `graph`, `timeline`, and `pullRequests` from the returned JSON. The reader checks the native GitHub session and requests repository data on its existing identity. A failed required read stops the operation. Report the exact diagnostic before work.
26
+
27
+ `project` describes only the repository's configured coordination service:
28
+
29
+ - `unconfigured` means repository reads ran without Projects requests or scope requirements.
30
+ - `verified` supplies metadata for the one configured Project. It establishes the Project's identity, with issue membership still unknown.
31
+ - `unverified` carries the exact warning for an unavailable best-effort Project. Preserve the warning and continue with verified repository data.
32
+ - A failure of a required Project read exits with its exact diagnostic. Stop before claiming work or returning a complete context bundle.
33
+
31
34
  Extract and preserve:
32
35
 
33
36
  ### Metadata
@@ -63,46 +66,11 @@ Any other `##` section: capture under `extra_sections` so callers can see PRDs t
63
66
 
64
67
  ### Comments
65
68
 
66
- Fetch ALL comments, always through the paginated endpoint, flattened into one array: `gh api repos/<org>/<repo>/issues/<number>/comments --paginate --slurp | jq 'add // []'` (author, body, created_at for each). `--paginate` alone emits one JSON array per page, so reading or counting its raw output undercounts; `--slurp` plus `jq 'add'` flattens the pages first. The `comments` field of `gh issue view --json` is not the source of record — it can be capped. Do not truncate. The fetched count is the number of comments after flattening (`... | jq 'add // [] | length'`); compare it with the issue's `comments` total (`gh api repos/<org>/<repo>/issues/<number> --jq .comments`); if they differ or a page fails, set `comments_complete: false` and say so at the top of the Comments section. Flag comments that contain:
67
- - Credentials, reproduction steps
68
- - Status updates from stakeholders
69
- - Decisions
70
- - Triage headers like `[<repo>]`
71
-
72
- Pagination is unconditional — never skip `--paginate` because an issue looks short.
69
+ Use every comment returned in `comments`, including author, body, and creation time. The reader flattens native pages and verifies the count against the issue before it returns a bundle. Flag reproduction details, status updates, decisions, and scoped triage headers. Handle credential-shaped text according to the existing privacy rules.
73
70
 
74
71
  ## Phase 3 — Fetch Sub-issue Graph (Parent + Children)
75
72
 
76
- GitHub native sub-issues are exposed via GraphQL:
77
-
78
- ```graphql
79
- query($org:String!,$repo:String!,$number:Int!){
80
- repository(owner:$org,name:$repo){
81
- issue(number:$number){
82
- id
83
- parent { number title state url repository { nameWithOwner } }
84
- subIssues(first: 100) {
85
- nodes {
86
- number title state url
87
- repository { nameWithOwner }
88
- labels(first: 50) { nodes { name } }
89
- assignees(first: 5) { nodes { login } }
90
- }
91
- }
92
- }
93
- }
94
- }
95
- ```
96
-
97
- ```bash
98
- gh api graphql -f query='<above>' -F org=<org> -F repo=<repo> -F number=<number>
99
- ```
100
-
101
- Capture:
102
- - **Parent sub-issue**: number, title, state, url, repo.
103
- - **Child sub-issues**: list with number, title, state, url, repo, labels (especially `type:` and `status:`), assignees.
104
-
105
- If the GraphQL `parent` / `subIssues` fields aren't available (older GHES), fall back to parsing `Parent: #<n>` text in the body and recording sub-issue text references — note "GraphQL sub-issues unavailable" in the bundle so callers know parent-link is text-based.
73
+ Use `graph.parent` and every item in `graph.children`, with repository, number, title, state, URL, labels, and assignees where returned. When the GitHub Enterprise schema lacks native parent or sub-issue support, `graph.warning` preserves the provider message. In that case parse the body's `Parent: #<n>` and sub-issue text references and label them as text-based.
106
74
 
107
75
  ## Phase 4 — Parse Issue Links from Body
108
76
 
@@ -121,7 +89,7 @@ For each parsed reference, fetch the linked issue/PR:
121
89
 
122
90
  ```bash
123
91
  gh issue view <link-number> --repo <link-org>/<link-repo> --json number,title,state,labels,assignees,url
124
- gh pr view <link-number> --repo <link-org>/<link-repo> --json number,title,state,reviewDecision,merged,mergedAt,url,reviewRequests,reviews,comments
92
+ gh pr view <link-number> --repo <link-org>/<link-repo> --json number,title,state,reviewDecision,mergedAt,url,reviewRequests,reviews,comments
125
93
  ```
126
94
 
127
95
  For each linked **issue**, capture: number, title, state, type (from labels), status (from labels), assignees, url.
@@ -134,72 +102,17 @@ For each linked **PR**, capture: number, title, state, mergedAt, reviewDecision,
134
102
 
135
103
  If the primary issue has a parent sub-issue (i.e., is a Story / Task / Sub-task / Improvement under an Epic):
136
104
 
137
- 1. Fetch the parent Epic in full via Phase 2 logic — full body, all comments, Validation Journey if present.
138
- 2. Fetch the parent Epic's other sub-issues (siblings) via the same GraphQL `subIssues` query against the parent. Filter out the primary issue itself.
105
+ 1. Read the parent Epic with the Phase 2 command for its native reference. Preserve the full body, all comments, and Validation Journey when present.
106
+ 2. Use `graph.children` from the parent's response to identify siblings. Filter out the primary issue itself.
139
107
  3. For each sibling, capture: number, title, type label, status label, assignee, url. Read the first paragraph of each sibling's body for context. If a sibling has `status:in-progress` with an assignee different from the primary issue's assignee, **flag prominently** so the caller can avoid duplicate work.
140
108
 
141
109
  If the primary issue IS an Epic, capture all children via Phase 3's `subIssues` traversal (already done).
142
110
 
143
111
  ## Phase 6 — Fetch Linked PRs and Label-Event History
144
112
 
145
- GitHub's native `closingIssuesReferences` and timeline give the canonical PR↔Issue relationship. The same timeline read also exposes label events, which are Lisa's GitHub-native transition history. Keep this as one GraphQL read path; do not add a second REST timeline fetch.
146
-
147
- ```bash
148
- query='query($org:String!,$repo:String!,$number:Int!,$cursor:String){
149
- repository(owner:$org,name:$repo){
150
- issue(number:$number){
151
- closedByPullRequestsReferences(first:50){
152
- nodes{number title state merged mergedAt url repository{nameWithOwner}}
153
- }
154
- timelineItems(
155
- first:100
156
- after:$cursor
157
- itemTypes:[CROSS_REFERENCED_EVENT,LABELED_EVENT,UNLABELED_EVENT]
158
- ){
159
- pageInfo{hasNextPage endCursor}
160
- nodes{
161
- ...on CrossReferencedEvent{
162
- createdAt
163
- actor{login}
164
- source{...on PullRequest{number title state url repository{nameWithOwner}}}
165
- }
166
- ...on LabeledEvent{
167
- createdAt
168
- actor{login}
169
- label{name}
170
- }
171
- ...on UnlabeledEvent{
172
- createdAt
173
- actor{login}
174
- label{name}
175
- }
176
- }
177
- }
178
- }
179
- }
180
- }'
181
-
182
- cursor=null
183
- while :; do
184
- if [ "$cursor" = null ]; then
185
- page=$(gh api graphql -f query="$query" -F org=<org> -F repo=<repo> -F number=<number>)
186
- else
187
- page=$(gh api graphql -f query="$query" -F org=<org> -F repo=<repo> -F number=<number> -f cursor="$cursor")
188
- fi
189
- printf '%s\n' "$page"
190
- has_next=$(printf '%s\n' "$page" | jq -r '.data.repository.issue.timelineItems.pageInfo.hasNextPage')
191
- cursor=$(printf '%s\n' "$page" | jq -r '.data.repository.issue.timelineItems.pageInfo.endCursor')
192
- [ "$has_next" = true ] || break
193
- done
194
- ```
195
-
196
- Capture:
197
- - **Linked PRs**: PR number, title, state, mergedAt, repo, url. Dedupe with PRs found in Phase 4. Preserve the existing `CrossReferencedEvent` behavior for PR linkage; widening the query must not change that consumer shape.
198
- - **Label-event history**: chronological `LabeledEvent` and `UnlabeledEvent` entries with event kind, label name, actor login, and `createdAt`. Preserve oldest→newest order across all pages. Status labels (`status:*`) are the GitHub transition history that downstream rejection detection consumes, but keep non-status label events too so callers can audit the full label stream.
113
+ Use the native `pullRequests` list from the Phase 2 command and deduplicate it against body references. Include each PR's actual base, head, review status, reviews, and unresolved threads. Surface any warning on a linked PR as incomplete access to that PR.
199
114
 
200
- Pagination is mandatory. `timelineItems(first:100)` silently truncates busy issues unless `pageInfo.hasNextPage` / `endCursor` is followed. If a page fetch fails, record label-event history as `unknown` with the error and continue assembling the bundle; a history read failure must never block the build.
201
-
202
- For each PR, fetch unresolved review comments via `gh pr view <num> --repo <org>/<repo> --json reviews,reviewThreads`.
115
+ Use `timeline.events` for the label-event history, preserving oldest-to-newest ordering and the label, actor, and time on each event. Status labels remain the transition history and other label events stay available for audit. If `timeline.warning` is present, record the history as unknown with the provider error. A missing history does not remove separately verified PR links or stop the build.
203
116
 
204
117
  ## Phase 7 — Assemble Context Bundle
205
118
 
@@ -278,6 +191,9 @@ Produce a single structured output that the caller can pass verbatim to downstre
278
191
  ### Body-referenced (`Resolves #<n>`)
279
192
  <per-PR block>
280
193
 
194
+ ## Project coordination
195
+ <status and configured Project metadata or exact warning from the reader>
196
+
281
197
  ## Label-Event History
282
198
  - Status: <known|unknown>
283
199
  - Events:
@@ -298,7 +214,7 @@ Produce a single structured output that the caller can pass verbatim to downstre
298
214
 
299
215
  - Never summarize or truncate the primary issue's body or Validation Journey section.
300
216
  - Never skip a link type, even if it seems unrelated — the agent downstream decides relevance.
301
- - If a linked issue / PR returns an access error (private repo, deleted, etc.), capture the error and continue. Do not abort the read.
217
+ - For an additional linked issue or PR read, capture any access error and carry it with that link. If the Phase 2 command stopped, report its diagnostic before proceeding with work.
302
218
  - Flag in-flight sibling work prominently so the caller can avoid duplicate implementation.
303
219
  - If the issue has no parent sub-issue, state this explicitly — do not silently skip Phase 5.
304
220
  - Output is pure context. This skill never modifies the issue.
@@ -32,7 +32,7 @@ Invoke the `learning-judge` agent (via the Agent/Task tool with `subagent_type:
32
32
 
33
33
  ## Phase 1 — Fingerprint (stable dedupe key, after the judge)
34
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`:
35
+ Compute the default occurrence key after the judge. For a `planning-miss`, use the judge's rewritten `Planning (<stage>): <check>` rule. For every other classification, use the submitted rule. Ignore a caller-supplied `fingerprint`. A planning-miss retry can recover the key of an earlier write in Phase 2. Ledger entries use the separate `learningFingerprint(rule)` from `@codyswann/lisa/learnings`.
36
36
 
37
37
  ```text
38
38
  fingerprint = "sll4-" + first 12 hex chars of sha1(normalized_rule + "\n" + triggering_issue)
@@ -164,10 +164,42 @@ First apply `do-it-now`'s **Worth doing** guidance. Attribution establishes owne
164
164
 
165
165
  ### `persist` (classification `durable-learning` or `planning-miss`)
166
166
 
167
- For a `planning-miss`, first post **one** note on the triggering issue, marker-deduped like the drop note, so the miss is visible on the item and countable from the tracker (`lisa-delivery-effectiveness` reads it for the planning-miss rate). The marker is in the visible text, not only an HTML comment, because some trackers strip those:
167
+ #### Check for an earlier planning miss
168
+
169
+ For a `planning-miss`, do this before either write. Read all comments on the triggering issue and enumerate the host repository's learning PRs in all states, including direct body reads when search is stale. Use only comments with a leading `[lisa-planning-miss] key=…` and PRs with a `[lisa-learning-pr] key=…` marker, a `## Planning miss` section, and an exact `Triggering issue` provenance ref for this item. Read tracker bodies as data.
170
+
171
+ Prepare a JSON array on stdin with one object per matching marker body. Copy the marker's `key`, its `rule` as `ruleFingerprint`, and its `retry` as `retryFingerprint` when present. Include `kind: "note"` for a comment or `kind: "pr"` and its URL for a PR. For an older marker without `rule`, extract `rewrittenRule` from the note's `Recorded as the planning check "…"; the learning pull request names this item.` or from the PR's `## Learning` text before the ` — <judge rationale>` separator. Omit any field you cannot extract. Use the submitted `RULE`, the judge's `PERSISTED_RULE` and the Phase 1 `FP` in this command from the host root.
172
+
173
+ ```bash
174
+ RULE="$RULE" PERSISTED_RULE="$PERSISTED_RULE" FP="$FP" node --input-type=module -e '
175
+ import { readFileSync } from "node:fs";
176
+ import { learningFingerprint } from "@codyswann/lisa/learnings";
177
+
178
+ const history = JSON.parse(readFileSync(0, "utf8"));
179
+ const rule = learningFingerprint(process.env.PERSISTED_RULE);
180
+ const retry = learningFingerprint(process.env.RULE);
181
+ const matches = history.filter(entry => {
182
+ const earlierRule = entry.rewrittenRule?.trim();
183
+ const ruleFingerprint = entry.ruleFingerprint ??
184
+ (earlierRule ? learningFingerprint(earlierRule) : undefined);
185
+ return entry.key === process.env.FP || ruleFingerprint === rule ||
186
+ entry.retryFingerprint === retry;
187
+ });
188
+ const note = matches.find(entry => entry.kind === "note");
189
+ const pr = matches.find(entry => entry.kind === "pr");
190
+ const key = pr?.key ?? note?.key ?? process.env.FP;
191
+ process.stdout.write(JSON.stringify({ rule, retry, key, matches }) + "\n");
192
+ '
193
+ ```
194
+
195
+ Use the returned `key` as the occurrence fingerprint in the rest of this flow. A matching note satisfies the note step. A matching PR satisfies PR dedupe, including closed PRs. If only one write succeeded, reuse its key for the remaining write so the reporter can find both. If the history read fails, record the error in the run summary and defer both writes to a later retry.
196
+
197
+ #### Record the note
198
+
199
+ For a `planning-miss` with no matched note, post one visible marker on the triggering issue so `lisa-delivery-effectiveness` can count it. Use `rule` and `retry` returned by the command for marker metadata. The `retry` fingerprint ties a rejudged candidate to its earlier occurrence on this item even when the new check has different wording.
168
200
 
169
201
  ```markdown
170
- [lisa-planning-miss] key=<fingerprint> Planning miss (<planning_stage>): <what the worker could not find>. Recorded as the planning check "<rewritten rule>"; the learning pull request names this item.
202
+ [lisa-planning-miss] key=<fingerprint> rule=<rule> retry=<retry> Planning miss (<planning_stage>): <what the worker could not find>. Recorded as the planning check "<rewritten rule>"; the learning pull request names this item.
171
203
  ```
172
204
 
173
205
  Post it even when Phase 3 then finds the rule already captured, or fails: the occurrence is still a miss, and the rate counts occurrences, not new rules. The `[lisa-planning-miss]` marker sits outside the `[lisa-learning-*]` namespace on purpose: it is a measurement of planning, and must not make the item look like learning machinery to `rejection-detection` or the judge's Step 0 guard.
@@ -178,7 +210,7 @@ Then continue to Phase 3.
178
210
 
179
211
  No learning content is ever committed without a PR — there is no other write path, and the PR must touch **only** the learnings surface (any other changed file is a bug).
180
212
 
181
- 1. **PR dedupe.** Search all PRs for the marker `[lisa-learning-pr] key=<fingerprint>` in the body (`gh pr list --state all --search '"<marker>" in:body' --json number,url`), with the stale-index guard above. If one exists, reference it and stop — never open a duplicate.
213
+ 1. **PR dedupe.** When Phase 2 found a matching learning PR, reference it and stop. Otherwise search all PRs for the marker `[lisa-learning-pr] key=<fingerprint>` in the body (`gh pr list --state all --search '"<marker>" in:body' --json number,url`), with the stale-index guard above. If one exists, reference it and stop — never open a duplicate.
182
214
  Then create (or reuse) branch `learning/<fingerprint>` in an **isolated worktree** off the default branch, never the caller's checkout, and run every step below from that worktree's root — `projectRoot` in each writer call is that root. A caller such as the session manager or an implement worker has its own branch and files in flight in its checkout; a writer run there would put the ledger change on the wrong branch and leave the learning branch empty.
183
215
  2. **Resolve the learnings surface path — never hardcode it.** The canonical path is `resolveProjectLearningsFile` from `@codyswann/lisa/learnings`: the machine-managed ledger resolved from `.lisa.config.json` (the `learnings.file` override, else the default `.lisa/PROJECT_LEARNINGS.md` — a cold path, never an auto-loaded rules tree):
184
216
 
@@ -228,7 +260,7 @@ No learning content is ever committed without a PR — there is no other write p
228
260
  <"Superseded entry id(s) X, Y: <why they merged>" | "Appended: no related entry exists — <one-line search summary>">
229
261
  ```
230
262
 
231
- For a **planning-miss** PR, add one section after `## Learning`, so the reviewer sees which stage let the gap through and that the rule is a check rather than the ticket's answer:
263
+ For a **planning-miss** PR, extend the one marker with the Phase 2 metadata (`<!-- [lisa-learning-pr] key=<fingerprint> rule=<rule> retry=<retry> -->`). Add one section after `## Learning` to show the reviewer which stage let the gap through and the check applied there:
232
264
 
233
265
  ```markdown
234
266
  ## Planning miss
@@ -304,15 +304,14 @@ leave the ledger as it is (`markedAt` stays null), carry on with the cycle and e
304
304
  - `worker-question` or `decision` whose worker already reported `DONE` or `FAILED` (the
305
305
  question outlives the worker in the ledger, so its marker can still be removed): do not
306
306
  resume the finished worker. Record the answer on the item (below); the next attempt reads it
307
- there. A worker's `FAILED` usually leaves the item in the `blocked` role (moved there on
308
- `FAILED`, or held there for a `decision`), and nothing else returns a blocked item with no
309
- dependency edges to Ready, so `answer-plan` returns `requeue: true` for it. First read the
310
- item with `lisa-tracker-read`. Only when the read-back shows it **in the `blocked` role**,
311
- also move it to the `ready` role in the step 2 update, as for `exhausted`, so the next
312
- dispatch starts a fresh attempt that reads the answer on the item. When it is anywhere else
313
- (a human moved it to the backlog or closed it, or `stop REF` already returned it to Ready),
314
- leave it where it is: `requeue` never overrides a human's move. A `DONE` worker's item is
315
- left where it is. `resume` refuses a finished
307
+ there. A worker's `FAILED` may leave the item in `claimed` with a human-needed label or
308
+ move it to the `blocked` role. First read the item with `lisa-tracker-read`. When `answer-plan`
309
+ returns `requeue: true` for an item in the `claimed` or `blocked` role, move it to the `ready`
310
+ role in the step 2 update, so the next dispatch starts a fresh attempt that reads
311
+ the answer. A `FAILED` attempt with the reason `left the claimed role outside the manager`
312
+ returns `requeue: false` to preserve the human's move into the `blocked` role.
313
+ Leave items in any other role where they are. A `DONE` worker's item is left where it is.
314
+ `resume` refuses a finished
316
315
  worker (exit 2), and `spawn` refuses a ref while its question is pending, so finish this
317
316
  clearing first.
318
317
 
@@ -337,7 +336,7 @@ leave the ledger as it is (`markedAt` stays null), carry on with the cycle and e
337
336
  `lisa-tracker-write`, with a short comment: `[lisa-session-manager] Answer delivered; removed the
338
337
  hold.` when a worker received the answer (`SendMessage` or `resume`), else
339
338
  `[lisa-session-manager] Answer recorded on the item; removed the hold.` When `answer-plan`
340
- returned `requeue: true` and the read-back shows the item in the `blocked` role, the same
339
+ returned `requeue: true` and the read-back shows the item in the `claimed` or `blocked` role, the same
341
340
  update also moves it to the `ready` role; in any other role, leave the item where it is. Read
342
341
  it back with `lisa-tracker-read`.
343
342
  3. `ledger clear-question <ref>` (`--reset-attempts` for an `exhausted` item). After "Record the
@@ -23,6 +23,9 @@ import {
23
23
  /** Worker statuses after which no worker receives an answer. */
24
24
  const FINISHED = new Set(["DONE", "FAILED"]);
25
25
 
26
+ /** The stall pass observed a tracker move made outside the manager. */
27
+ const EXTERNAL_MOVE_REASON = "left the claimed role outside the manager";
28
+
26
29
  /** How each answer source is named in the comment. */
27
30
  const SOURCE_NAMES = { cli: "answer", channel: "Telegram" };
28
31
 
@@ -63,41 +66,42 @@ function skipReason(status, worker, pending) {
63
66
  }
64
67
 
65
68
  /**
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.
69
+ * Ask the manager to requeue a FAILED worker's item from claimed or blocked
70
+ * once its answer is recorded, including an answer already on the item.
71
+ * An observed external move explicitly keeps the item's tracker status.
73
72
  * @param {string | undefined} status - The ledger item's status
73
+ * @param {string | null | undefined} finishReason - Why the attempt finished
74
74
  * @param {{kind?: string, answer?: object | null} | null} pending - The
75
75
  * pending question
76
- * @returns {{requeue?: true}} The flag, only when it applies
76
+ * @returns {{requeue?: boolean}} The flag, only when it applies
77
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 } : {};
78
+ function requeueOf(status, finishReason, pending) {
79
+ if (status !== "FAILED" || !pending?.answer || pending.kind === "repo-route")
80
+ return {};
81
+ return { requeue: finishReason !== EXTERNAL_MOVE_REASON };
84
82
  }
85
83
 
86
84
  /**
87
85
  * Plan recording a queued answer on the item. Throws when the answer looks
88
86
  * like it holds a credential: it would be posted on the item.
89
87
  * @param {{ref: string, status?: string, worker?: string | null,
90
- * pending: object | null}} input - The item's ref, its ledger status and
91
- * worker, and its pending question
92
- * @returns {{ref: string, record: false, reason: string, requeue?: true} |
88
+ * pending: object | null, finishReason?: string | null}} input - The item's
89
+ * ref, ledger status, worker, pending question, and attempt finish reason
90
+ * @returns {{ref: string, record: false, reason: string, requeue?: boolean} |
93
91
  * {ref: string, record: true, source: string, answerAt: string | null,
94
- * comment: string, requeue?: true}} Plan; answerAt is the queued answer's
92
+ * comment: string, requeue?: boolean}} Plan; answerAt is the queued answer's
95
93
  * `at`, which `ledger clear-question --expect-answer-at` checks before
96
94
  * clearing; `requeue: true` means also move the item to the `ready` role
97
95
  */
98
- export function planAnswerRecord({ ref, status, worker, pending }) {
96
+ export function planAnswerRecord({
97
+ ref,
98
+ status,
99
+ finishReason,
100
+ worker,
101
+ pending,
102
+ }) {
99
103
  const reason = skipReason(status, worker, pending);
100
- const requeue = requeueOf(status, pending);
104
+ const requeue = requeueOf(status, finishReason, pending);
101
105
  if (reason) return { ref, record: false, reason, ...requeue };
102
106
  const { source, text, at } = pending.answer;
103
107
  const shape = findCredentialShape(text);
@@ -49,7 +49,8 @@ export async function channelAnswer(ctx) {
49
49
  * @param {object} ctx - CLI context
50
50
  * @returns {Promise<{ json: object }>} `{ref,record:false,reason}` or
51
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
+ * FAILED worker's item must also move to the `ready` role, or false when
53
+ * the ledger records an external tracker move
53
54
  */
54
55
  export async function answerPlan(ctx) {
55
56
  const ref = requirePositional(ctx, "ref");
@@ -64,6 +65,7 @@ export async function answerPlan(ctx) {
64
65
  planAnswerRecord({
65
66
  ref,
66
67
  status: entry?.status,
68
+ finishReason: entry?.reason,
67
69
  worker: entry?.worker ?? null,
68
70
  pending,
69
71
  })