@codyswann/lisa 8.1.1 → 8.2.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 (228) hide show
  1. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  2. package/dist/core/upstream-evidence-manifest.json +138 -11
  3. package/package.json +4 -4
  4. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  5. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  6. package/plugins/lisa/.codex-plugin/scripts/queue-contract-resolution.mjs +583 -0
  7. package/plugins/lisa/.codex-plugin/scripts/ready-queue-order.mjs +99 -25
  8. package/plugins/lisa/.codex-plugin/scripts/stale-blocker-comment.mjs +185 -0
  9. package/plugins/lisa/.codex-plugin/scripts/stale-blocker-confirm.mjs +130 -0
  10. package/plugins/lisa/.codex-plugin/scripts/stale-blocker-edges.mjs +466 -0
  11. package/plugins/lisa/.codex-plugin/scripts/stale-blocker-pending.mjs +257 -0
  12. package/plugins/lisa/.codex-plugin/scripts/stale-blocker-restore.mjs +180 -0
  13. package/plugins/lisa/.codex-plugin/scripts/stale-blocker-summary.mjs +222 -0
  14. package/plugins/lisa/.codex-plugin/scripts/stale-blocker-sweep.mjs +394 -0
  15. package/plugins/lisa/.codex-plugin/scripts/stale-blocker-verify.mjs +193 -0
  16. package/plugins/lisa/.codex-plugin/skills/lisa-atlassian-access/SKILL.md +1 -0
  17. package/plugins/lisa/.codex-plugin/skills/lisa-github-build-intake/SKILL.md +2 -7
  18. package/plugins/lisa/.codex-plugin/skills/lisa-jira-build-intake/SKILL.md +2 -0
  19. package/plugins/lisa/.codex-plugin/skills/lisa-linear-access/SKILL.md +44 -0
  20. package/plugins/lisa/.codex-plugin/skills/lisa-linear-build-intake/SKILL.md +2 -0
  21. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +127 -2
  22. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-queue.mjs +90 -20
  23. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-stale-links-results.mjs +254 -0
  24. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-stale-links.mjs +243 -0
  25. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-usage.mjs +60 -0
  26. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/queue-github.mjs +68 -8
  27. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/session-manager.mjs +49 -0
  28. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/stale-links-github.mjs +196 -0
  29. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/stale-links-state.mjs +173 -0
  30. package/plugins/lisa/scripts/ready-queue-order.mjs +99 -25
  31. package/plugins/lisa/scripts/stale-blocker-comment.mjs +185 -0
  32. package/plugins/lisa/scripts/stale-blocker-confirm.mjs +130 -0
  33. package/plugins/lisa/scripts/stale-blocker-edges.mjs +466 -0
  34. package/plugins/lisa/scripts/stale-blocker-pending.mjs +257 -0
  35. package/plugins/lisa/scripts/stale-blocker-restore.mjs +180 -0
  36. package/plugins/lisa/scripts/stale-blocker-summary.mjs +222 -0
  37. package/plugins/lisa/scripts/stale-blocker-sweep.mjs +394 -0
  38. package/plugins/lisa/scripts/stale-blocker-verify.mjs +193 -0
  39. package/plugins/lisa/skills/lisa-atlassian-access/SKILL.md +1 -0
  40. package/plugins/lisa/skills/lisa-github-build-intake/SKILL.md +2 -7
  41. package/plugins/lisa/skills/lisa-jira-build-intake/SKILL.md +2 -0
  42. package/plugins/lisa/skills/lisa-linear-access/SKILL.md +44 -0
  43. package/plugins/lisa/skills/lisa-linear-build-intake/SKILL.md +2 -0
  44. package/plugins/lisa/skills/lisa-session-manager/SKILL.md +127 -2
  45. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-queue.mjs +90 -20
  46. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-stale-links-results.mjs +254 -0
  47. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-stale-links.mjs +243 -0
  48. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-usage.mjs +60 -0
  49. package/plugins/lisa/skills/lisa-session-manager/scripts/queue-github.mjs +68 -8
  50. package/plugins/lisa/skills/lisa-session-manager/scripts/session-manager.mjs +49 -0
  51. package/plugins/lisa/skills/lisa-session-manager/scripts/stale-links-github.mjs +196 -0
  52. package/plugins/lisa/skills/lisa-session-manager/scripts/stale-links-state.mjs +173 -0
  53. package/plugins/lisa-agy/plugin.json +1 -1
  54. package/plugins/lisa-agy/scripts/ready-queue-order.mjs +99 -25
  55. package/plugins/lisa-agy/scripts/stale-blocker-comment.mjs +185 -0
  56. package/plugins/lisa-agy/scripts/stale-blocker-confirm.mjs +130 -0
  57. package/plugins/lisa-agy/scripts/stale-blocker-edges.mjs +466 -0
  58. package/plugins/lisa-agy/scripts/stale-blocker-pending.mjs +257 -0
  59. package/plugins/lisa-agy/scripts/stale-blocker-restore.mjs +180 -0
  60. package/plugins/lisa-agy/scripts/stale-blocker-summary.mjs +222 -0
  61. package/plugins/lisa-agy/scripts/stale-blocker-sweep.mjs +394 -0
  62. package/plugins/lisa-agy/scripts/stale-blocker-verify.mjs +193 -0
  63. package/plugins/lisa-agy/skills/lisa-atlassian-access/SKILL.md +1 -0
  64. package/plugins/lisa-agy/skills/lisa-github-build-intake/SKILL.md +2 -7
  65. package/plugins/lisa-agy/skills/lisa-jira-build-intake/SKILL.md +2 -0
  66. package/plugins/lisa-agy/skills/lisa-linear-access/SKILL.md +44 -0
  67. package/plugins/lisa-agy/skills/lisa-linear-build-intake/SKILL.md +2 -0
  68. package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +127 -2
  69. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-queue.mjs +90 -20
  70. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-stale-links-results.mjs +254 -0
  71. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-stale-links.mjs +243 -0
  72. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-usage.mjs +60 -0
  73. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/queue-github.mjs +68 -8
  74. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/session-manager.mjs +49 -0
  75. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/stale-links-github.mjs +196 -0
  76. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/stale-links-state.mjs +173 -0
  77. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  78. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  79. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  80. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  81. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  82. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  83. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  84. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  85. package/plugins/lisa-copilot/scripts/ready-queue-order.mjs +99 -25
  86. package/plugins/lisa-copilot/scripts/stale-blocker-comment.mjs +185 -0
  87. package/plugins/lisa-copilot/scripts/stale-blocker-confirm.mjs +130 -0
  88. package/plugins/lisa-copilot/scripts/stale-blocker-edges.mjs +466 -0
  89. package/plugins/lisa-copilot/scripts/stale-blocker-pending.mjs +257 -0
  90. package/plugins/lisa-copilot/scripts/stale-blocker-restore.mjs +180 -0
  91. package/plugins/lisa-copilot/scripts/stale-blocker-summary.mjs +222 -0
  92. package/plugins/lisa-copilot/scripts/stale-blocker-sweep.mjs +394 -0
  93. package/plugins/lisa-copilot/scripts/stale-blocker-verify.mjs +193 -0
  94. package/plugins/lisa-copilot/skills/lisa-atlassian-access/SKILL.md +1 -0
  95. package/plugins/lisa-copilot/skills/lisa-github-build-intake/SKILL.md +2 -7
  96. package/plugins/lisa-copilot/skills/lisa-jira-build-intake/SKILL.md +2 -0
  97. package/plugins/lisa-copilot/skills/lisa-linear-access/SKILL.md +44 -0
  98. package/plugins/lisa-copilot/skills/lisa-linear-build-intake/SKILL.md +2 -0
  99. package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +127 -2
  100. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-queue.mjs +90 -20
  101. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-stale-links-results.mjs +254 -0
  102. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-stale-links.mjs +243 -0
  103. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-usage.mjs +60 -0
  104. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/queue-github.mjs +68 -8
  105. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/session-manager.mjs +49 -0
  106. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/stale-links-github.mjs +196 -0
  107. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/stale-links-state.mjs +173 -0
  108. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  109. package/plugins/lisa-cursor/scripts/ready-queue-order.mjs +99 -25
  110. package/plugins/lisa-cursor/scripts/stale-blocker-comment.mjs +185 -0
  111. package/plugins/lisa-cursor/scripts/stale-blocker-confirm.mjs +130 -0
  112. package/plugins/lisa-cursor/scripts/stale-blocker-edges.mjs +466 -0
  113. package/plugins/lisa-cursor/scripts/stale-blocker-pending.mjs +257 -0
  114. package/plugins/lisa-cursor/scripts/stale-blocker-restore.mjs +180 -0
  115. package/plugins/lisa-cursor/scripts/stale-blocker-summary.mjs +222 -0
  116. package/plugins/lisa-cursor/scripts/stale-blocker-sweep.mjs +394 -0
  117. package/plugins/lisa-cursor/scripts/stale-blocker-verify.mjs +193 -0
  118. package/plugins/lisa-cursor/skills/lisa-atlassian-access/SKILL.md +1 -0
  119. package/plugins/lisa-cursor/skills/lisa-github-build-intake/SKILL.md +2 -7
  120. package/plugins/lisa-cursor/skills/lisa-jira-build-intake/SKILL.md +2 -0
  121. package/plugins/lisa-cursor/skills/lisa-linear-access/SKILL.md +44 -0
  122. package/plugins/lisa-cursor/skills/lisa-linear-build-intake/SKILL.md +2 -0
  123. package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +127 -2
  124. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-queue.mjs +90 -20
  125. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-stale-links-results.mjs +254 -0
  126. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-stale-links.mjs +243 -0
  127. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-usage.mjs +60 -0
  128. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/queue-github.mjs +68 -8
  129. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/session-manager.mjs +49 -0
  130. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/stale-links-github.mjs +196 -0
  131. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/stale-links-state.mjs +173 -0
  132. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  133. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  134. package/plugins/lisa-devin/scripts/ready-queue-order.mjs +99 -25
  135. package/plugins/lisa-devin/scripts/stale-blocker-comment.mjs +185 -0
  136. package/plugins/lisa-devin/scripts/stale-blocker-confirm.mjs +130 -0
  137. package/plugins/lisa-devin/scripts/stale-blocker-edges.mjs +466 -0
  138. package/plugins/lisa-devin/scripts/stale-blocker-pending.mjs +257 -0
  139. package/plugins/lisa-devin/scripts/stale-blocker-restore.mjs +180 -0
  140. package/plugins/lisa-devin/scripts/stale-blocker-summary.mjs +222 -0
  141. package/plugins/lisa-devin/scripts/stale-blocker-sweep.mjs +394 -0
  142. package/plugins/lisa-devin/scripts/stale-blocker-verify.mjs +193 -0
  143. package/plugins/lisa-devin/skills/lisa-atlassian-access/SKILL.md +1 -0
  144. package/plugins/lisa-devin/skills/lisa-github-build-intake/SKILL.md +2 -7
  145. package/plugins/lisa-devin/skills/lisa-jira-build-intake/SKILL.md +2 -0
  146. package/plugins/lisa-devin/skills/lisa-linear-access/SKILL.md +44 -0
  147. package/plugins/lisa-devin/skills/lisa-linear-build-intake/SKILL.md +2 -0
  148. package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +127 -2
  149. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-queue.mjs +90 -20
  150. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-stale-links-results.mjs +254 -0
  151. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-stale-links.mjs +243 -0
  152. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-usage.mjs +60 -0
  153. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/queue-github.mjs +68 -8
  154. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/session-manager.mjs +49 -0
  155. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/stale-links-github.mjs +196 -0
  156. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/stale-links-state.mjs +173 -0
  157. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  158. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  159. package/plugins/lisa-expo-agy/plugin.json +1 -1
  160. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  161. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  162. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  163. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  164. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  165. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  166. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  167. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  168. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  169. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  170. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  171. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  172. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  173. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  174. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  175. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  176. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  177. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  178. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  179. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  180. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  181. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  182. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  183. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  184. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  185. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  186. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  187. package/plugins/lisa-rails-agy/plugin.json +1 -1
  188. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  189. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  190. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  191. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  192. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  193. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  194. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  195. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  196. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  197. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  198. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  199. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  200. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  201. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  202. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  203. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  204. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  205. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  206. package/plugins/src/base/scripts/ready-queue-order.mjs +99 -25
  207. package/plugins/src/base/scripts/stale-blocker-comment.mjs +185 -0
  208. package/plugins/src/base/scripts/stale-blocker-confirm.mjs +130 -0
  209. package/plugins/src/base/scripts/stale-blocker-edges.mjs +466 -0
  210. package/plugins/src/base/scripts/stale-blocker-pending.mjs +257 -0
  211. package/plugins/src/base/scripts/stale-blocker-restore.mjs +180 -0
  212. package/plugins/src/base/scripts/stale-blocker-summary.mjs +222 -0
  213. package/plugins/src/base/scripts/stale-blocker-sweep.mjs +394 -0
  214. package/plugins/src/base/scripts/stale-blocker-verify.mjs +193 -0
  215. package/plugins/src/base/skills/lisa-atlassian-access/SKILL.md +1 -0
  216. package/plugins/src/base/skills/lisa-github-build-intake/SKILL.md +2 -7
  217. package/plugins/src/base/skills/lisa-jira-build-intake/SKILL.md +2 -0
  218. package/plugins/src/base/skills/lisa-linear-access/SKILL.md +44 -0
  219. package/plugins/src/base/skills/lisa-linear-build-intake/SKILL.md +2 -0
  220. package/plugins/src/base/skills/lisa-session-manager/SKILL.md +127 -2
  221. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-queue.mjs +90 -20
  222. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-stale-links-results.mjs +254 -0
  223. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-stale-links.mjs +243 -0
  224. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-usage.mjs +60 -0
  225. package/plugins/src/base/skills/lisa-session-manager/scripts/queue-github.mjs +68 -8
  226. package/plugins/src/base/skills/lisa-session-manager/scripts/session-manager.mjs +49 -0
  227. package/plugins/src/base/skills/lisa-session-manager/scripts/stale-links-github.mjs +196 -0
  228. package/plugins/src/base/skills/lisa-session-manager/scripts/stale-links-state.mjs +173 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "description": "Ruby on Rails-specific skills and hooks for RuboCop and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "description": "TypeScript-specific hooks for formatting, linting, and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "description": "Distributable LLM Wiki kernel — ingest, query, lint, and maintain a git-native markdown knowledge base across Claude and Codex.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -53,6 +53,12 @@ import {
53
53
  isHumanGated,
54
54
  } from "./intake-blocker-reprobe.mjs";
55
55
  import { entryMatches, parseIdEntries } from "./operator-id-kinds.mjs";
56
+ import {
57
+ countUnresolvedBlockers,
58
+ githubBlockerEdges,
59
+ jiraBlockerEdges,
60
+ linearBlockerEdges,
61
+ } from "./stale-blocker-edges.mjs";
56
62
 
57
63
  /** Rank for GitHub `priority:<value>` labels; no label ranks 4. */
58
64
  const GITHUB_PRIORITY_RANKS = Object.freeze({
@@ -84,9 +90,6 @@ const LINEAR_NO_PRIORITY = 4;
84
90
  /** Linear workflow state types that leave a child finished. */
85
91
  const LINEAR_FINISHED_STATE_TYPES = new Set(["completed", "canceled"]);
86
92
 
87
- /** Jira link types whose inward side reads as "this item is blocked by". */
88
- const JIRA_BLOCKED_BY = /blocked by/i;
89
-
90
93
  /**
91
94
  * @param {unknown} value
92
95
  * @returns {string}
@@ -133,7 +136,7 @@ function nodesOf(list) {
133
136
  * @param {unknown} labels
134
137
  * @returns {string[]}
135
138
  */
136
- function labelNames(labels) {
139
+ export function labelNames(labels) {
137
140
  const list = Array.isArray(labels)
138
141
  ? labels
139
142
  : Array.isArray(labels?.nodes)
@@ -159,10 +162,11 @@ function repoLabelsOf(labels) {
159
162
  /**
160
163
  * Flatten an Atlassian Document Format node to plain text, one line per block.
161
164
  * A string description (the Markdown some access paths return) passes through.
165
+ * Also reads Jira comment bodies for the stale-link marker dedupe (#5065).
162
166
  * @param {unknown} node
163
167
  * @returns {string}
164
168
  */
165
- function adfText(node) {
169
+ export function adfText(node) {
166
170
  if (typeof node === "string") return node;
167
171
  if (!node || typeof node !== "object") return "";
168
172
  if (node.type === "text") return text(node.text);
@@ -172,12 +176,45 @@ function adfText(node) {
172
176
  return children.map(adfText).join(joiner);
173
177
  }
174
178
 
179
+ /**
180
+ * How many blockers still hold a GitHub issue.
181
+ *
182
+ * When the fetch attached the blockers (`nativeBlockers`, `bodyBlockers`, as
183
+ * the session manager's queue does), the shared stale-link rule decides
184
+ * (#5065): native dependencies AND `Blocked by` body lines, a blocker in the
185
+ * configured terminal done label counting as finished, as intake judges it.
186
+ * A row fetched without them falls back to GitHub's own summary, whose
187
+ * `blocked_by` counts open native blockers only.
188
+ * @param {Record<string, any>} issue - REST issue, optionally with blockers
189
+ * @param {string} repo - `owner/repo`
190
+ * @param {{ doneRoles?: readonly string[], landedRoles?: readonly string[] }} options - Configured terminal and non-terminal done labels
191
+ * @returns {number}
192
+ */
193
+ function githubOpenBlockers(issue, repo, options) {
194
+ // Blockers that could not be read hold the item: at least one.
195
+ if (issue.blockersUnreadable === true) {
196
+ return Math.max(1, count(issue.issue_dependencies_summary?.blocked_by));
197
+ }
198
+ if (!Array.isArray(issue.nativeBlockers) && !issue.bodyBlockers) {
199
+ return count(issue.issue_dependencies_summary?.blocked_by);
200
+ }
201
+ return countUnresolvedBlockers(
202
+ githubBlockerEdges({ ...issue, repo }),
203
+ options.doneRoles ?? [],
204
+ repo,
205
+ options.landedRoles
206
+ );
207
+ }
208
+
175
209
  /**
176
210
  * Normalize one GitHub REST issue row. Returns null for a pull-request row,
177
211
  * which the issues endpoint returns alongside issues and which is never a
178
212
  * dispatchable leaf.
179
213
  * @param {Record<string, any>} issue - REST `issues` list row
180
- * @param {{ repo?: string }} [options] - `owner/repo`, else read from repository_url
214
+ * @param {{ repo?: string, doneRoles?: readonly string[], landedRoles?: readonly string[] }} [options] -
215
+ * `owner/repo`, else read from repository_url; the configured terminal done
216
+ * labels (`terminalDoneRoles`) for the blocker rule, and the intermediate
217
+ * ones (`landedDoneRoles`), which hold nothing
181
218
  * @returns {ReturnType<typeof shape> | null}
182
219
  */
183
220
  export function normalizeGithubIssue(issue, options = {}) {
@@ -214,8 +251,8 @@ export function normalizeGithubIssue(issue, options = {}) {
214
251
  // `id:` like any author. No integration-only authorship exists here.
215
252
  authorIntegration: null,
216
253
  isContainer: Number(summary?.total ?? 0) > Number(summary?.completed ?? 0),
217
- // `blocked_by` in the dependency summary counts only OPEN blockers.
218
- openBlockers: count(issue.issue_dependencies_summary?.blocked_by),
254
+ openBlockers: githubOpenBlockers(issue, repo, options),
255
+ blockersUnreadable: issue.blockersUnreadable === true,
219
256
  });
220
257
  }
221
258
 
@@ -223,9 +260,12 @@ export function normalizeGithubIssue(issue, options = {}) {
223
260
  * Normalize one Jira REST/MCP issue. An epic (hierarchy level above 0) or an
224
261
  * issue with any subtask not yet in the done category is a container.
225
262
  * @param {Record<string, any>} issue - Issue with `key` and `fields`
263
+ * @param {{ doneRoles?: readonly string[], landedRoles?: readonly string[] }} [options] - Configured terminal
264
+ * done names (`terminalDoneRoles`), so a blocker there is finished, and
265
+ * the intermediate ones (`landedDoneRoles`), so a blocker there holds nothing
226
266
  * @returns {ReturnType<typeof shape>}
227
267
  */
228
- export function normalizeJiraIssue(issue) {
268
+ export function normalizeJiraIssue(issue, options = {}) {
229
269
  const fields = issue?.fields ?? {};
230
270
  const labels = labelNames(fields.labels);
231
271
  const priority = text(fields.priority?.name).trim().toLowerCase();
@@ -233,12 +273,15 @@ export function normalizeJiraIssue(issue) {
233
273
  const openSubtasks = (Array.isArray(fields.subtasks) ? fields.subtasks : [])
234
274
  .map(sub => sub?.fields?.status?.statusCategory?.key)
235
275
  .filter(category => category !== "done");
236
- const openBlockers = nodesOf(fields.issuelinks).filter(
237
- link =>
238
- link?.inwardIssue &&
239
- JIRA_BLOCKED_BY.test(text(link.type?.inward)) &&
240
- link.inwardIssue.fields?.status?.statusCategory?.key !== "done"
241
- ).length;
276
+ // One rule with the stale-link sweep (#5065): a blocker in the configured
277
+ // done status is finished even where its status category is not `done`,
278
+ // but only in this item's own project, which is the one that declares it.
279
+ const openBlockers = countUnresolvedBlockers(
280
+ jiraBlockerEdges(issue),
281
+ options.doneRoles ?? [],
282
+ text(issue?.key).split("-")[0],
283
+ options.landedRoles
284
+ );
242
285
 
243
286
  return shape({
244
287
  ref: text(issue?.key),
@@ -299,9 +342,12 @@ function linearIntegrationAuthor(issue) {
299
342
  * Normalize one Linear GraphQL issue. An issue with any child not completed
300
343
  * or canceled is a container.
301
344
  * @param {Record<string, any>} issue - Issue node
345
+ * @param {{ doneRoles?: readonly string[], landedRoles?: readonly string[] }} [options] - Configured terminal
346
+ * done names (`terminalDoneRoles`), so a blocker there is finished, and
347
+ * the intermediate ones (`landedDoneRoles`), so a blocker there holds nothing
302
348
  * @returns {ReturnType<typeof shape>}
303
349
  */
304
- export function normalizeLinearIssue(issue) {
350
+ export function normalizeLinearIssue(issue, options = {}) {
305
351
  const native = Number(issue?.priority ?? 0);
306
352
  const children = Array.isArray(issue?.children?.nodes)
307
353
  ? issue.children.nodes
@@ -310,12 +356,16 @@ export function normalizeLinearIssue(issue) {
310
356
  : [];
311
357
  const labels = labelNames(issue?.labels);
312
358
  // Linear has no "blocked by" relation type: B blocked by A is A's `blocks`
313
- // relation, read from B as an inverse relation.
314
- const openBlockers = nodesOf(issue?.inverseRelations).filter(
315
- relation =>
316
- relation?.type === "blocks" &&
317
- !LINEAR_FINISHED_STATE_TYPES.has(relation.issue?.state?.type)
318
- ).length;
359
+ // relation, read from B as an inverse
360
+ // relation. One rule with the stale-link sweep (#5065): a promotion
361
+ // workflow can type its configured done state `started`, so the configured
362
+ // name also counts as finished, in this item's own team only.
363
+ const openBlockers = countUnresolvedBlockers(
364
+ linearBlockerEdges(issue),
365
+ options.doneRoles ?? [],
366
+ text(issue?.team?.key) || text(issue?.identifier).split("-")[0],
367
+ options.landedRoles
368
+ );
319
369
 
320
370
  return shape({
321
371
  ref: text(issue?.identifier),
@@ -349,7 +399,7 @@ export function normalizeLinearIssue(issue) {
349
399
  * none) and `assigneeAccountId` the assignee's account id, for kind-keyed
350
400
  * entries (#4623). `authorIntegration` names the integration that filed an
351
401
  * item no person authored, for `integration:` entries (#4895).
352
- * @param {{ ref: string, title: string, assigneeId: string | null, assigneeLogin: string | null, assigneeAccountId: string | null, priorityRank: number, createdAt: string, updatedAt: string, labels: string[], body: string, authorId: string | null, authorLogin: string | null, authorIntegration: string | null, isContainer: boolean, openBlockers: number }} input
402
+ * @param {{ ref: string, title: string, assigneeId: string | null, assigneeLogin: string | null, assigneeAccountId: string | null, priorityRank: number, createdAt: string, updatedAt: string, labels: string[], body: string, authorId: string | null, authorLogin: string | null, authorIntegration: string | null, isContainer: boolean, openBlockers: number, blockersUnreadable?: boolean }} input
353
403
  */
354
404
  function shape(input) {
355
405
  return {
@@ -368,6 +418,9 @@ function shape(input) {
368
418
  authorIntegration: input.authorIntegration,
369
419
  isContainer: input.isContainer,
370
420
  openBlockers: input.openBlockers,
421
+ // The item's blocker list could not be read this fetch (GitHub only;
422
+ // Jira and Linear fetch blockers with the item, or the envelope fails).
423
+ blockersUnreadable: input.blockersUnreadable === true,
371
424
  repoLabels: repoLabelsOf(input.labels),
372
425
  };
373
426
  }
@@ -478,13 +531,34 @@ function compareWithinGroup(left, right) {
478
531
  * normalized assignee id: GitHub login, Jira accountId, Linear user id. A
479
532
  * `login:` entry matches only a GitHub assignee login, an `id:` entry only
480
533
  * the assignee's account id (#4623).
534
+ *
535
+ * An item whose blocker list could not be read is excluded with reason
536
+ * `blockers-unreadable` (CodySwannGT/lisa#5065); every other item is still
537
+ * offered.
481
538
  * @param {readonly Record<string, any>[]} items - Normalized items
482
539
  * @param {{ me?: string | null, operators?: readonly unknown[], trustedAuthorIds?: readonly unknown[], humanNeededLabel?: string, humanOnly?: unknown, humanGateMode?: unknown }} [options]
483
540
  * @returns {{ ordered: Record<string, any>[], excluded: { ref: string, reason: string }[] }}
484
541
  */
485
542
  export function orderReadyQueue(items, options = {}) {
486
543
  const context = orderingContext(options);
487
- return rank(items, item => exclusionReason(item, context), context);
544
+ return rank(
545
+ items,
546
+ item => exclusionReason(item, context) ?? unreadableBlockers(item),
547
+ context
548
+ );
549
+ }
550
+
551
+ /**
552
+ * An item whose blocker list could not be read is held in both tiers: it
553
+ * might be blocked by open work, so dispatching it is not known safe. Only
554
+ * that item waits; the next fetch reads it again.
555
+ * @param {Record<string, any>} item - Normalized item
556
+ * @returns {"blockers-unreadable" | null}
557
+ */
558
+ function unreadableBlockers(item) {
559
+ // probe-direction: fail-closed — an unread blocker list never reads as
560
+ // "nothing blocks this".
561
+ return item.blockersUnreadable === true ? "blockers-unreadable" : null;
488
562
  }
489
563
 
490
564
  /**
@@ -507,7 +581,7 @@ export function orderBacklogQueue(items, options = {}) {
507
581
  return rank(
508
582
  items,
509
583
  item => {
510
- const reason = exclusionReason(item, context);
584
+ const reason = exclusionReason(item, context) ?? unreadableBlockers(item);
511
585
  if (reason !== null) return reason;
512
586
  if (count(item.openBlockers) > 0) return "blocked-by-open-item";
513
587
  const failed = Object.hasOwn(failures, item.ref)
@@ -0,0 +1,185 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * The operator comment and marker dedupe for the stale-link sweep
4
+ * (CodySwannGT/lisa#5065), split from `stale-blocker-sweep.mjs`.
5
+ *
6
+ * The comment is read by a non-technical operator, so it says in plain words
7
+ * which links went and why, which blockers still hold the item, and which
8
+ * could not be opened. It starts with the prefix of whoever posts it (the
9
+ * session manager, or build intake on a runtime without one), and ends with
10
+ * one `[lisa-stale-blocker-link] blocker=<ref>` marker per removed link.
11
+ * @module stale-blocker-comment
12
+ */
13
+
14
+ import { adfText } from "./ready-queue-order.mjs";
15
+
16
+ /** Visible marker, one per removed blocker, so a re-run never re-comments. */
17
+ export const STALE_LINK_MARKER = "[lisa-stale-blocker-link]";
18
+
19
+ /** Who may post the comment, and the prefix each one posts under. */
20
+ export const STALE_LINK_POSTERS = Object.freeze({
21
+ "session-manager": "[lisa-session-manager]",
22
+ "build-intake": "[claude-build-intake]",
23
+ });
24
+
25
+ /**
26
+ * The marker line for one blocker.
27
+ * @param {string} blockerRef
28
+ * @returns {string}
29
+ */
30
+ export const markerLine = blockerRef =>
31
+ `${STALE_LINK_MARKER} blocker=${blockerRef}`;
32
+
33
+ /**
34
+ * An item's comments as one flat `{ body }` list, whatever envelope the
35
+ * vendor read used: a flat array (`comments: [{ body }]`), Linear's
36
+ * connection (`comments: { nodes: [...] }`), or Jira's issue field
37
+ * (`fields.comment.comments`). A comment given as a bare string is a body.
38
+ * Anything else is skipped, never thrown on, so a marker in any of these
39
+ * shapes is always found.
40
+ * @param {Record<string, any> | null | undefined} raw - The raw item
41
+ * @returns {{ body: unknown }[]}
42
+ */
43
+ export function commentsOf(raw) {
44
+ const list = value => {
45
+ if (Array.isArray(value)) return value;
46
+ if (Array.isArray(value?.nodes)) return value.nodes;
47
+ if (Array.isArray(value?.comments)) return value.comments;
48
+ return [];
49
+ };
50
+ return [...list(raw?.comments), ...list(raw?.fields?.comment)]
51
+ .map(comment => (typeof comment === "string" ? { body: comment } : comment))
52
+ .filter(comment => comment && typeof comment === "object");
53
+ }
54
+
55
+ /**
56
+ * Blockers this item's comments already record as removed. A Jira comment
57
+ * body is Atlassian Document Format, so it is flattened to text first.
58
+ * @param {readonly { body?: unknown }[] | undefined} comments
59
+ * @returns {Set<string>}
60
+ */
61
+ export function markedBlockers(comments) {
62
+ const pattern = /\[lisa-stale-blocker-link\] blocker=(\S+)/g;
63
+ return new Set(
64
+ (Array.isArray(comments) ? comments : []).flatMap(comment =>
65
+ [...adfText(comment?.body).matchAll(pattern)].map(match => match[1])
66
+ )
67
+ );
68
+ }
69
+
70
+ /**
71
+ * A plain-English list: "A", "A and B", "A, B and C".
72
+ * @param {readonly string[]} refs
73
+ * @returns {string}
74
+ */
75
+ const listOf = refs =>
76
+ refs.length < 2
77
+ ? refs.join("")
78
+ : `${refs.slice(0, -1).join(", ")} and ${refs[refs.length - 1]}`;
79
+
80
+ /**
81
+ * "is" or "are", "was" or "were", matched to how many refs there are.
82
+ * @param {readonly string[]} refs
83
+ * @param {string} one
84
+ * @param {string} many
85
+ * @returns {string}
86
+ */
87
+ const agree = (refs, one, many) => (refs.length === 1 ? one : many);
88
+
89
+ /**
90
+ * @param {readonly { blockerRef: string }[]} edges
91
+ * @returns {string[]} Unique blocker refs
92
+ */
93
+ const unique = edges => [...new Set(edges.map(edge => edge.blockerRef))];
94
+
95
+ /**
96
+ * The sentences about the links this sweep removes.
97
+ * @param {readonly { blockerRef: string, verdict: string }[]} stale
98
+ * @returns {string[]}
99
+ */
100
+ function removedSentences(stale) {
101
+ const finished = unique(stale.filter(e => e.verdict !== "cancelled"));
102
+ const cancelled = unique(stale.filter(e => e.verdict === "cancelled"));
103
+ const lines = [];
104
+ if (finished.length > 0) {
105
+ lines.push(
106
+ `This was marked as waiting on ${listOf(finished)}, which ${agree(finished, "is", "are")} done or closed, so ${agree(finished, "it", "they")} cannot hold this up.`
107
+ );
108
+ }
109
+ if (cancelled.length > 0) {
110
+ const lead = finished.length > 0 ? "It was also" : "This was";
111
+ lines.push(
112
+ `${lead} marked as waiting on ${listOf(cancelled)}, which ${agree(cancelled, "was", "were")} cancelled and will not be built, so ${agree(cancelled, "it", "they")} cannot hold this up.`
113
+ );
114
+ }
115
+ const removed = unique(stale);
116
+ lines.push(
117
+ `I removed ${agree(removed, "the link", "those links")}. Nothing else changed.`
118
+ );
119
+ return lines;
120
+ }
121
+
122
+ /**
123
+ * The one comment an operator reads for this item's clean-up.
124
+ * @param {{ stale: object[], real: object[], crossProject: object[], inaccessible: object[] }} sorted
125
+ * @param {string} [poster] - A key of {@link STALE_LINK_POSTERS}
126
+ * @param {string} [posterName] - The configured name of who posts it (the
127
+ * session manager's `sessionManager.name`), so the operator sees which
128
+ * manager acted; the prefix stays the machine-read marker
129
+ * @returns {string}
130
+ */
131
+ export function formatStaleLinkComment(
132
+ sorted,
133
+ poster = "session-manager",
134
+ posterName = ""
135
+ ) {
136
+ if (!Object.hasOwn(STALE_LINK_POSTERS, poster)) {
137
+ throw new Error(
138
+ `Unknown stale-link poster '${poster}'. Expected one of: ${Object.keys(STALE_LINK_POSTERS).join(", ")}.`
139
+ );
140
+ }
141
+ const lines = [
142
+ `${STALE_LINK_POSTERS[poster]} ${posterName.trim() ? `${posterName.trim()} cleared` : "Cleared"} waiting-on links.`,
143
+ ...removedSentences(sorted.stale),
144
+ ];
145
+ const open = unique([
146
+ ...sorted.real,
147
+ ...sorted.crossProject.filter(edge => edge.verdict === "open"),
148
+ ]);
149
+ if (open.length > 0) {
150
+ lines.push(
151
+ `It is still waiting on ${listOf(open)}, which ${agree(open, "is", "are")} not finished yet.`
152
+ );
153
+ }
154
+ const unreadable = unique(sorted.inaccessible);
155
+ if (unreadable.length > 0) {
156
+ lines.push(
157
+ `I could not open ${listOf(unreadable)}, so I left ${agree(unreadable, "that link", "those links")} alone.`
158
+ );
159
+ }
160
+ return [lines.join(" "), "", ...unique(sorted.stale).map(markerLine)].join(
161
+ "\n"
162
+ );
163
+ }
164
+
165
+ /**
166
+ * The comment as an Atlassian Document Format document. Jira Cloud's REST v3
167
+ * comment endpoint takes ADF, not a string, so a Jira plan posts this: one
168
+ * paragraph per non-empty line, so each marker stays on its own line and
169
+ * {@link markedBlockers} finds it again through `adfText`.
170
+ * @param {string} comment - From {@link formatStaleLinkComment}
171
+ * @returns {{ type: "doc", version: 1, content: object[] }}
172
+ */
173
+ export function staleLinkCommentAdf(comment) {
174
+ return {
175
+ type: "doc",
176
+ version: 1,
177
+ content: comment
178
+ .split("\n")
179
+ .filter(line => line.trim() !== "")
180
+ .map(line => ({
181
+ type: "paragraph",
182
+ content: [{ type: "text", text: line }],
183
+ })),
184
+ };
185
+ }