lastlight 0.16.0 → 0.16.2

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 (385) hide show
  1. package/README.md +71 -692
  2. package/dist/cli-config.js.map +1 -0
  3. package/dist/cli-format.js.map +1 -0
  4. package/dist/{cli/cli-server.d.ts → cli-server.d.ts} +39 -1
  5. package/dist/{cli/cli-server.js → cli-server.js} +105 -5
  6. package/dist/cli-server.js.map +1 -0
  7. package/dist/cli-timeline.js.map +1 -0
  8. package/dist/{cli/cli.js → cli.js} +9 -7
  9. package/dist/cli.js.map +1 -0
  10. package/dist/{cli/fork-cli.d.ts → fork-cli.d.ts} +3 -3
  11. package/dist/{cli/fork-cli.js → fork-cli.js} +28 -27
  12. package/dist/fork-cli.js.map +1 -0
  13. package/dist/{cli/oauth-cli.js → oauth-cli.js} +1 -1
  14. package/dist/oauth-cli.js.map +1 -0
  15. package/dist/{cli/setup.js → setup.js} +10 -4
  16. package/dist/setup.js.map +1 -0
  17. package/dist/{cli/skills-install.d.ts → skills-install.d.ts} +6 -0
  18. package/dist/{cli/skills-install.js → skills-install.js} +6 -2
  19. package/dist/skills-install.js.map +1 -0
  20. package/package.json +20 -65
  21. package/plugins/lastlight/.claude-plugin/plugin.json +1 -1
  22. package/agent-context/rules.md +0 -80
  23. package/agent-context/security.md +0 -69
  24. package/agent-context/soul.md +0 -21
  25. package/config/default.yaml +0 -119
  26. package/deploy/.env.production.example +0 -100
  27. package/deploy/entrypoint.sh +0 -82
  28. package/deploy/native/README.md +0 -160
  29. package/deploy/native/install.sh +0 -110
  30. package/deploy/native/lastlight.env.example +0 -95
  31. package/deploy/native/lastlight.service +0 -50
  32. package/deploy/sandbox-entrypoint.sh +0 -93
  33. package/dist/admin/auth.d.ts +0 -51
  34. package/dist/admin/auth.js +0 -121
  35. package/dist/admin/auth.js.map +0 -1
  36. package/dist/admin/chat-session-reader.d.ts +0 -39
  37. package/dist/admin/chat-session-reader.js +0 -84
  38. package/dist/admin/chat-session-reader.js.map +0 -1
  39. package/dist/admin/docker.d.ts +0 -61
  40. package/dist/admin/docker.js +0 -187
  41. package/dist/admin/docker.js.map +0 -1
  42. package/dist/admin/index.d.ts +0 -9
  43. package/dist/admin/index.js +0 -59
  44. package/dist/admin/index.js.map +0 -1
  45. package/dist/admin/routes.d.ts +0 -81
  46. package/dist/admin/routes.js +0 -1381
  47. package/dist/admin/routes.js.map +0 -1
  48. package/dist/admin/sessions.d.ts +0 -89
  49. package/dist/admin/sessions.js +0 -204
  50. package/dist/admin/sessions.js.map +0 -1
  51. package/dist/admin/tail.d.ts +0 -12
  52. package/dist/admin/tail.js +0 -145
  53. package/dist/admin/tail.js.map +0 -1
  54. package/dist/admin/version.d.ts +0 -22
  55. package/dist/admin/version.js +0 -92
  56. package/dist/admin/version.js.map +0 -1
  57. package/dist/cli/cli-config.js.map +0 -1
  58. package/dist/cli/cli-format.js.map +0 -1
  59. package/dist/cli/cli-server.js.map +0 -1
  60. package/dist/cli/cli-timeline.js.map +0 -1
  61. package/dist/cli/cli.js.map +0 -1
  62. package/dist/cli/fork-cli.js.map +0 -1
  63. package/dist/cli/oauth-cli.js.map +0 -1
  64. package/dist/cli/setup.js.map +0 -1
  65. package/dist/cli/skills-install.js.map +0 -1
  66. package/dist/config/config-resolve.d.ts +0 -28
  67. package/dist/config/config-resolve.js +0 -47
  68. package/dist/config/config-resolve.js.map +0 -1
  69. package/dist/config/config.d.ts +0 -157
  70. package/dist/config/config.js +0 -581
  71. package/dist/config/config.js.map +0 -1
  72. package/dist/config/core-pin.d.ts +0 -16
  73. package/dist/config/core-pin.js +0 -85
  74. package/dist/config/core-pin.js.map +0 -1
  75. package/dist/config/overlay-assets.d.ts +0 -20
  76. package/dist/config/overlay-assets.js +0 -114
  77. package/dist/config/overlay-assets.js.map +0 -1
  78. package/dist/config/overlay-bootstrap.d.ts +0 -44
  79. package/dist/config/overlay-bootstrap.js +0 -304
  80. package/dist/config/overlay-bootstrap.js.map +0 -1
  81. package/dist/connectors/github-webhook.d.ts +0 -45
  82. package/dist/connectors/github-webhook.js +0 -321
  83. package/dist/connectors/github-webhook.js.map +0 -1
  84. package/dist/connectors/index.d.ts +0 -18
  85. package/dist/connectors/index.js +0 -41
  86. package/dist/connectors/index.js.map +0 -1
  87. package/dist/connectors/messaging/base.d.ts +0 -42
  88. package/dist/connectors/messaging/base.js +0 -139
  89. package/dist/connectors/messaging/base.js.map +0 -1
  90. package/dist/connectors/messaging/delivery.d.ts +0 -14
  91. package/dist/connectors/messaging/delivery.js +0 -38
  92. package/dist/connectors/messaging/delivery.js.map +0 -1
  93. package/dist/connectors/messaging/index.d.ts +0 -4
  94. package/dist/connectors/messaging/index.js +0 -4
  95. package/dist/connectors/messaging/index.js.map +0 -1
  96. package/dist/connectors/messaging/session-manager.d.ts +0 -53
  97. package/dist/connectors/messaging/session-manager.js +0 -255
  98. package/dist/connectors/messaging/session-manager.js.map +0 -1
  99. package/dist/connectors/messaging/types.d.ts +0 -58
  100. package/dist/connectors/messaging/types.js +0 -7
  101. package/dist/connectors/messaging/types.js.map +0 -1
  102. package/dist/connectors/slack/connector.d.ts +0 -142
  103. package/dist/connectors/slack/connector.js +0 -494
  104. package/dist/connectors/slack/connector.js.map +0 -1
  105. package/dist/connectors/slack/index.d.ts +0 -2
  106. package/dist/connectors/slack/index.js +0 -3
  107. package/dist/connectors/slack/index.js.map +0 -1
  108. package/dist/connectors/slack/mrkdwn.d.ts +0 -19
  109. package/dist/connectors/slack/mrkdwn.js +0 -240
  110. package/dist/connectors/slack/mrkdwn.js.map +0 -1
  111. package/dist/connectors/types.d.ts +0 -61
  112. package/dist/connectors/types.js +0 -2
  113. package/dist/connectors/types.js.map +0 -1
  114. package/dist/cron/fanout.d.ts +0 -33
  115. package/dist/cron/fanout.js +0 -55
  116. package/dist/cron/fanout.js.map +0 -1
  117. package/dist/cron/jobs.d.ts +0 -18
  118. package/dist/cron/jobs.js +0 -37
  119. package/dist/cron/jobs.js.map +0 -1
  120. package/dist/cron/scheduler.d.ts +0 -45
  121. package/dist/cron/scheduler.js +0 -105
  122. package/dist/cron/scheduler.js.map +0 -1
  123. package/dist/engine/agent-executor.d.ts +0 -34
  124. package/dist/engine/agent-executor.js +0 -246
  125. package/dist/engine/agent-executor.js.map +0 -1
  126. package/dist/engine/chat/chat-runner.d.ts +0 -132
  127. package/dist/engine/chat/chat-runner.js +0 -424
  128. package/dist/engine/chat/chat-runner.js.map +0 -1
  129. package/dist/engine/chat/chat-skills.d.ts +0 -45
  130. package/dist/engine/chat/chat-skills.js +0 -184
  131. package/dist/engine/chat/chat-skills.js.map +0 -1
  132. package/dist/engine/chat/chat.d.ts +0 -54
  133. package/dist/engine/chat/chat.js +0 -316
  134. package/dist/engine/chat/chat.js.map +0 -1
  135. package/dist/engine/chat/message-batcher.d.ts +0 -32
  136. package/dist/engine/chat/message-batcher.js +0 -109
  137. package/dist/engine/chat/message-batcher.js.map +0 -1
  138. package/dist/engine/dispatcher.d.ts +0 -73
  139. package/dist/engine/dispatcher.js +0 -663
  140. package/dist/engine/dispatcher.js.map +0 -1
  141. package/dist/engine/event-shim.d.ts +0 -117
  142. package/dist/engine/event-shim.js +0 -435
  143. package/dist/engine/event-shim.js.map +0 -1
  144. package/dist/engine/executors/orchestrator.d.ts +0 -81
  145. package/dist/engine/executors/orchestrator.js +0 -365
  146. package/dist/engine/executors/orchestrator.js.map +0 -1
  147. package/dist/engine/executors/shared.d.ts +0 -189
  148. package/dist/engine/executors/shared.js +0 -616
  149. package/dist/engine/executors/shared.js.map +0 -1
  150. package/dist/engine/github/git-auth.d.ts +0 -62
  151. package/dist/engine/github/git-auth.js +0 -161
  152. package/dist/engine/github/git-auth.js.map +0 -1
  153. package/dist/engine/github/github-app-client.d.ts +0 -23
  154. package/dist/engine/github/github-app-client.js +0 -33
  155. package/dist/engine/github/github-app-client.js.map +0 -1
  156. package/dist/engine/github/github-tools.d.ts +0 -18
  157. package/dist/engine/github/github-tools.js +0 -263
  158. package/dist/engine/github/github-tools.js.map +0 -1
  159. package/dist/engine/github/github.d.ts +0 -1193
  160. package/dist/engine/github/github.js +0 -357
  161. package/dist/engine/github/github.js.map +0 -1
  162. package/dist/engine/github/profiles.d.ts +0 -279
  163. package/dist/engine/github/profiles.js +0 -42
  164. package/dist/engine/github/profiles.js.map +0 -1
  165. package/dist/engine/github/review-poster.d.ts +0 -98
  166. package/dist/engine/github/review-poster.js +0 -177
  167. package/dist/engine/github/review-poster.js.map +0 -1
  168. package/dist/engine/llm.d.ts +0 -79
  169. package/dist/engine/llm.js +0 -269
  170. package/dist/engine/llm.js.map +0 -1
  171. package/dist/engine/oauth.d.ts +0 -43
  172. package/dist/engine/oauth.js +0 -103
  173. package/dist/engine/oauth.js.map +0 -1
  174. package/dist/engine/router.d.ts +0 -29
  175. package/dist/engine/router.js +0 -680
  176. package/dist/engine/router.js.map +0 -1
  177. package/dist/engine/screen/classifier.d.ts +0 -93
  178. package/dist/engine/screen/classifier.js +0 -215
  179. package/dist/engine/screen/classifier.js.map +0 -1
  180. package/dist/engine/screen/screen.d.ts +0 -41
  181. package/dist/engine/screen/screen.js +0 -93
  182. package/dist/engine/screen/screen.js.map +0 -1
  183. package/dist/evals-api.d.ts +0 -24
  184. package/dist/evals-api.js +0 -22
  185. package/dist/evals-api.js.map +0 -1
  186. package/dist/index.d.ts +0 -1
  187. package/dist/index.js +0 -940
  188. package/dist/index.js.map +0 -1
  189. package/dist/managed-repos.d.ts +0 -30
  190. package/dist/managed-repos.js +0 -72
  191. package/dist/managed-repos.js.map +0 -1
  192. package/dist/notify/blocks.d.ts +0 -23
  193. package/dist/notify/blocks.js +0 -118
  194. package/dist/notify/blocks.js.map +0 -1
  195. package/dist/notify/index.d.ts +0 -17
  196. package/dist/notify/index.js +0 -7
  197. package/dist/notify/index.js.map +0 -1
  198. package/dist/notify/model.d.ts +0 -57
  199. package/dist/notify/model.js +0 -89
  200. package/dist/notify/model.js.map +0 -1
  201. package/dist/notify/notifier.d.ts +0 -18
  202. package/dist/notify/notifier.js +0 -100
  203. package/dist/notify/notifier.js.map +0 -1
  204. package/dist/notify/render.d.ts +0 -21
  205. package/dist/notify/render.js +0 -59
  206. package/dist/notify/render.js.map +0 -1
  207. package/dist/notify/transports/github.d.ts +0 -26
  208. package/dist/notify/transports/github.js +0 -27
  209. package/dist/notify/transports/github.js.map +0 -1
  210. package/dist/notify/transports/slack.d.ts +0 -27
  211. package/dist/notify/transports/slack.js +0 -37
  212. package/dist/notify/transports/slack.js.map +0 -1
  213. package/dist/notify/types.d.ts +0 -119
  214. package/dist/notify/types.js +0 -16
  215. package/dist/notify/types.js.map +0 -1
  216. package/dist/providers.d.ts +0 -125
  217. package/dist/providers.js +0 -279
  218. package/dist/providers.js.map +0 -1
  219. package/dist/sandbox/docker.d.ts +0 -180
  220. package/dist/sandbox/docker.js +0 -517
  221. package/dist/sandbox/docker.js.map +0 -1
  222. package/dist/sandbox/egress-allowlist.d.ts +0 -74
  223. package/dist/sandbox/egress-allowlist.js +0 -164
  224. package/dist/sandbox/egress-allowlist.js.map +0 -1
  225. package/dist/sandbox/egress-firewall-config.d.ts +0 -127
  226. package/dist/sandbox/egress-firewall-config.js +0 -434
  227. package/dist/sandbox/egress-firewall-config.js.map +0 -1
  228. package/dist/sandbox/images.d.ts +0 -23
  229. package/dist/sandbox/images.js +0 -55
  230. package/dist/sandbox/images.js.map +0 -1
  231. package/dist/sandbox/index.d.ts +0 -112
  232. package/dist/sandbox/index.js +0 -332
  233. package/dist/sandbox/index.js.map +0 -1
  234. package/dist/sandbox/sandbox.d.ts +0 -214
  235. package/dist/sandbox/sandbox.js +0 -453
  236. package/dist/sandbox/sandbox.js.map +0 -1
  237. package/dist/sandbox/smol.d.ts +0 -162
  238. package/dist/sandbox/smol.js +0 -485
  239. package/dist/sandbox/smol.js.map +0 -1
  240. package/dist/session-log.d.ts +0 -63
  241. package/dist/session-log.js +0 -290
  242. package/dist/session-log.js.map +0 -1
  243. package/dist/state/approval-store.d.ts +0 -88
  244. package/dist/state/approval-store.js +0 -149
  245. package/dist/state/approval-store.js.map +0 -1
  246. package/dist/state/build-assets.d.ts +0 -50
  247. package/dist/state/build-assets.js +0 -154
  248. package/dist/state/build-assets.js.map +0 -1
  249. package/dist/state/db.d.ts +0 -81
  250. package/dist/state/db.js +0 -155
  251. package/dist/state/db.js.map +0 -1
  252. package/dist/state/execution-store.d.ts +0 -257
  253. package/dist/state/execution-store.js +0 -527
  254. package/dist/state/execution-store.js.map +0 -1
  255. package/dist/state/migrate.d.ts +0 -15
  256. package/dist/state/migrate.js +0 -175
  257. package/dist/state/migrate.js.map +0 -1
  258. package/dist/state/workflow-run-store.d.ts +0 -216
  259. package/dist/state/workflow-run-store.js +0 -403
  260. package/dist/state/workflow-run-store.js.map +0 -1
  261. package/dist/telemetry/index.d.ts +0 -38
  262. package/dist/telemetry/index.js +0 -253
  263. package/dist/telemetry/index.js.map +0 -1
  264. package/dist/telemetry/pi-events.d.ts +0 -12
  265. package/dist/telemetry/pi-events.js +0 -134
  266. package/dist/telemetry/pi-events.js.map +0 -1
  267. package/dist/workflows/dag.d.ts +0 -37
  268. package/dist/workflows/dag.js +0 -118
  269. package/dist/workflows/dag.js.map +0 -1
  270. package/dist/workflows/loader.d.ts +0 -53
  271. package/dist/workflows/loader.js +0 -421
  272. package/dist/workflows/loader.js.map +0 -1
  273. package/dist/workflows/loop-eval.d.ts +0 -28
  274. package/dist/workflows/loop-eval.js +0 -74
  275. package/dist/workflows/loop-eval.js.map +0 -1
  276. package/dist/workflows/phase-executor.d.ts +0 -222
  277. package/dist/workflows/phase-executor.js +0 -1153
  278. package/dist/workflows/phase-executor.js.map +0 -1
  279. package/dist/workflows/phase-ref.d.ts +0 -50
  280. package/dist/workflows/phase-ref.js +0 -91
  281. package/dist/workflows/phase-ref.js.map +0 -1
  282. package/dist/workflows/resume.d.ts +0 -58
  283. package/dist/workflows/resume.js +0 -313
  284. package/dist/workflows/resume.js.map +0 -1
  285. package/dist/workflows/runner.d.ts +0 -63
  286. package/dist/workflows/runner.js +0 -381
  287. package/dist/workflows/runner.js.map +0 -1
  288. package/dist/workflows/schema.d.ts +0 -344
  289. package/dist/workflows/schema.js +0 -460
  290. package/dist/workflows/schema.js.map +0 -1
  291. package/dist/workflows/simple.d.ts +0 -90
  292. package/dist/workflows/simple.js +0 -393
  293. package/dist/workflows/simple.js.map +0 -1
  294. package/dist/workflows/target-policy.d.ts +0 -74
  295. package/dist/workflows/target-policy.js +0 -80
  296. package/dist/workflows/target-policy.js.map +0 -1
  297. package/dist/workflows/templates.d.ts +0 -88
  298. package/dist/workflows/templates.js +0 -127
  299. package/dist/workflows/templates.js.map +0 -1
  300. package/dist/workflows/triggers.d.ts +0 -21
  301. package/dist/workflows/triggers.js +0 -45
  302. package/dist/workflows/triggers.js.map +0 -1
  303. package/dist/workflows/verdict.d.ts +0 -19
  304. package/dist/workflows/verdict.js +0 -30
  305. package/dist/workflows/verdict.js.map +0 -1
  306. package/dist/worktree/manager.d.ts +0 -43
  307. package/dist/worktree/manager.js +0 -127
  308. package/dist/worktree/manager.js.map +0 -1
  309. package/docker-compose.yml +0 -274
  310. package/sandbox.Dockerfile +0 -68
  311. package/skills/README.md +0 -42
  312. package/skills/browser-qa/SKILL.md +0 -208
  313. package/skills/browser-qa/scripts/agent-browser.mjs +0 -531
  314. package/skills/building/SKILL.md +0 -95
  315. package/skills/chat/SKILL.md +0 -36
  316. package/skills/code-review/SKILL.md +0 -82
  317. package/skills/debug-production/SKILL.md +0 -108
  318. package/skills/demo/SKILL.md +0 -228
  319. package/skills/demo/scripts/compose-demo.sh +0 -243
  320. package/skills/issue-answer/SKILL.md +0 -91
  321. package/skills/issue-comment/SKILL.md +0 -49
  322. package/skills/issue-triage/SKILL.md +0 -149
  323. package/skills/issue-triage/references/AGENT-BRIEF.md +0 -65
  324. package/skills/pr-comment/SKILL.md +0 -64
  325. package/skills/pr-review/SKILL.md +0 -148
  326. package/skills/pr-review/references/findings-schema.md +0 -89
  327. package/skills/qa-test/SKILL.md +0 -97
  328. package/skills/repo-health/SKILL.md +0 -67
  329. package/skills/security-feedback/SKILL.md +0 -173
  330. package/skills/security-feedback/references/templates.md +0 -77
  331. package/skills/security-review/SKILL.md +0 -215
  332. package/skills/security-review/references/issue-format.md +0 -302
  333. package/skills/verify/SKILL.md +0 -118
  334. package/workflows/answer.yaml +0 -44
  335. package/workflows/build.yaml +0 -129
  336. package/workflows/cron-health.yaml +0 -6
  337. package/workflows/cron-review.yaml +0 -8
  338. package/workflows/cron-security.yaml +0 -6
  339. package/workflows/cron-triage.yaml +0 -8
  340. package/workflows/demo.yaml +0 -62
  341. package/workflows/examples/bash-smoke.yaml +0 -41
  342. package/workflows/examples/parallel-review.yaml +0 -36
  343. package/workflows/examples/tdd-loop.yaml +0 -17
  344. package/workflows/explore.yaml +0 -80
  345. package/workflows/issue-comment.yaml +0 -15
  346. package/workflows/issue-triage.yaml +0 -22
  347. package/workflows/pr-comment.yaml +0 -16
  348. package/workflows/pr-fix.yaml +0 -17
  349. package/workflows/pr-review.yaml +0 -50
  350. package/workflows/prompts/answer.md +0 -68
  351. package/workflows/prompts/architect.md +0 -44
  352. package/workflows/prompts/classifier.md +0 -60
  353. package/workflows/prompts/classify-adds-info.md +0 -17
  354. package/workflows/prompts/demo.md +0 -125
  355. package/workflows/prompts/executor.md +0 -42
  356. package/workflows/prompts/explore-ask.md +0 -99
  357. package/workflows/prompts/explore-publish.md +0 -31
  358. package/workflows/prompts/explore-read.md +0 -120
  359. package/workflows/prompts/explore-synthesize.md +0 -88
  360. package/workflows/prompts/fix.md +0 -18
  361. package/workflows/prompts/guardrails.md +0 -96
  362. package/workflows/prompts/pr-fix.md +0 -26
  363. package/workflows/prompts/pr.md +0 -39
  364. package/workflows/prompts/qa-browser.md +0 -95
  365. package/workflows/prompts/qa-synth.md +0 -44
  366. package/workflows/prompts/qa-test.md +0 -60
  367. package/workflows/prompts/re-reviewer.md +0 -33
  368. package/workflows/prompts/reviewer.md +0 -60
  369. package/workflows/prompts/verify-browser.md +0 -93
  370. package/workflows/prompts/verify-synth.md +0 -44
  371. package/workflows/prompts/verify.md +0 -63
  372. package/workflows/qa-test.yaml +0 -94
  373. package/workflows/repo-health.yaml +0 -15
  374. package/workflows/security-feedback.yaml +0 -25
  375. package/workflows/security-review.yaml +0 -37
  376. package/workflows/verify.yaml +0 -93
  377. /package/dist/{cli/cli-config.d.ts → cli-config.d.ts} +0 -0
  378. /package/dist/{cli/cli-config.js → cli-config.js} +0 -0
  379. /package/dist/{cli/cli-format.d.ts → cli-format.d.ts} +0 -0
  380. /package/dist/{cli/cli-format.js → cli-format.js} +0 -0
  381. /package/dist/{cli/cli-timeline.d.ts → cli-timeline.d.ts} +0 -0
  382. /package/dist/{cli/cli-timeline.js → cli-timeline.js} +0 -0
  383. /package/dist/{cli/cli.d.ts → cli.d.ts} +0 -0
  384. /package/dist/{cli/oauth-cli.d.ts → oauth-cli.d.ts} +0 -0
  385. /package/dist/{cli/setup.d.ts → setup.d.ts} +0 -0
@@ -1,91 +0,0 @@
1
- ---
2
- name: issue-answer
3
- description: Answer a question directly — a sourced, neutral reply to an information/explanation/comparison request, from a GitHub issue or a Slack thread. Research repo docs and the web, output the answer, label `question` (GitHub only), leave open. Never write an agent brief, mark ready-for-agent, or change code.
4
- version: 1.1.0
5
- tags: [github, issues, questions]
6
- ---
7
-
8
- # Issue Answer
9
-
10
- A user asked a **question** — they want information, an explanation, or a
11
- comparison, not a code change. The router already decided this is a question;
12
- your job is to **answer it well and stop**. Do not re-triage it into a work item.
13
-
14
- The question reaches you from one of two places, and the prompt tells you which:
15
- - a **GitHub issue** (an `issueNumber` is set), or
16
- - a **Slack thread** (no `issueNumber`).
17
-
18
- ## How your answer is delivered
19
-
20
- Your **final message is the answer** — the harness posts it for you (as a
21
- comment on the issue for GitHub-initiated runs, or into the Slack thread for
22
- Slack-initiated runs). So:
23
-
24
- - Make your final message the complete, self-contained answer in clean markdown.
25
- - **Do NOT post the answer yourself** with `github_add_issue_comment` — the
26
- harness delivers it, and posting it too would double-post.
27
-
28
- ## Hard caps
29
-
30
- This skill answers; it never queues work. Per invocation:
31
-
32
- - Produce **one** answer (your final message).
33
- - The only GitHub write you make is the `question` **label**, and only when
34
- answering a GitHub issue.
35
- - **Never** write an agent brief, apply `ready-for-agent` / `ready-for-human`,
36
- create branches, push code, or open a PR.
37
- - **Never** close the issue — leave it open for the human to close once the
38
- answer satisfies them.
39
-
40
- If, while reading, you conclude the request is actually a bug or feature request
41
- (not a pure question), do **not** answer it as one. Make your final message a
42
- short note saying it looks like work rather than a question and asking a
43
- maintainer to `@last-light build` (or `explore`) it — let triage own work items.
44
-
45
- ## Procedure
46
-
47
- 1. **Understand the question.** Read the question from the prompt — the issue
48
- title/body (and existing comments, for a GitHub issue) or the Slack message.
49
- Identify exactly what the user wants to know.
50
- 2. **Research.**
51
- - **The repo** — read what's relevant to the answer: `CONTEXT.md`,
52
- `README`, `docs/`, `spec/`, and code only as needed to ground claims about
53
- this project. Don't survey the whole codebase; read what the question needs.
54
- - **The web** — when the question references anything outside this repo
55
- (another tool, framework, library, standard, or a "X vs Y" comparison),
56
- use the `web_search` and `web_fetch` tools to consult current,
57
- authoritative sources. Prefer official docs and primary sources.
58
- - **Budget your research and converge.** You have a bounded number of tool
59
- calls before the run ends — research is for grounding the answer, not
60
- exhaustive coverage. Front-load the searches you need, then stop looking.
61
- **Critical:** the moment you think *"I have enough"* (or *"let me just
62
- confirm one more thing"*), do **not** fire another tool call — write the
63
- answer **now**, in that same turn. Your reply being cut off mid-research
64
- delivers a useless half-sentence to the user, which is worse than an
65
- answer that omits a minor detail. If a fact is unverified, state it as
66
- unverified in the answer rather than spending your last turn chasing it.
67
- For broad/open-ended questions (e.g. "what's missing vs tool X"), gather a
68
- representative sample and answer from it — explicitly noting it's a
69
- sample, not an exhaustive audit — rather than enumerating everything.
70
- 3. **Label (GitHub issue only).** Ensure `question` exists idempotently with
71
- `github_ensure_labels` (`[{name: "question", color: "d876e3"}]` — one call,
72
- no 422 to worry about), then apply it with `github_add_labels`. If ensuring
73
- or adding the label is denied, skip it — the answer is the deliverable. For a
74
- Slack-initiated question there is no issue to label.
75
- 4. **Write the answer as your final message** (the harness delivers it — see
76
- above; do not post it yourself):
77
- - Direct and structured. Lead with the answer; use short sections or a
78
- comparison table when it helps.
79
- - **Neutral and grounded.** Claims about this project come from its docs;
80
- claims about external things are **cited** with links to the sources you
81
- used. Don't invent pricing, capabilities, or roadmap.
82
- - **Honest about uncertainty.** If something is fast-moving or you couldn't
83
- verify it, say so rather than stating it as fact.
84
- 5. **Stop.** The answer is the conversation; a human closes the issue when satisfied.
85
-
86
- ## Tool usage
87
-
88
- - GitHub operations via `github_*` MCP tools only — never `gh` CLI, `curl`, or
89
- raw HTTP. In chat you have no GitHub write tools beyond labelling; that's
90
- expected — the answer is delivered as your final message.
91
- - External research via the `web_search` / `web_fetch` tools only.
@@ -1,49 +0,0 @@
1
- ---
2
- name: issue-comment
3
- description: Handle a non-build maintainer comment on an issue or PR — close, reopen, label, dedupe, answer a brief question, or triage. Action-only; redirect anything that needs code changes to /build.
4
- version: 2.0.0
5
- tags: [github, issues, comments]
6
- ---
7
-
8
- # Issue Comment
9
-
10
- A maintainer @mentioned the bot on an issue or PR with a request that is **not**
11
- asking for code changes. Do the one bounded thing they asked, confirm it in one
12
- short comment, and stop.
13
-
14
- ## Hard caps
15
-
16
- This skill is deliberately small. Per invocation: **at most 2 file reads and 1
17
- outgoing comment.** Never make code changes, create branches, or push.
18
-
19
- ## Procedure
20
-
21
- 1. **Read the request.** The triggering comment is the job — read it, plus the
22
- issue/PR title, body, existing labels, and existing comments for context.
23
- 2. **Do the bounded action:**
24
- - Close / reopen → `github_update_issue`
25
- - Label → `github_add_labels` / `github_remove_label` (use the canonical
26
- triage roles from `docs/agents/triage-labels.md` where relevant; if you're
27
- applying a canonical label that may not exist yet, ensure it first with one
28
- idempotent `github_ensure_labels` call so it lands with the right color)
29
- - Duplicate check → search similar issues, link the original in one comment
30
- - Answer a direct question → ≤5 sentences, ≤2 file reads. Don't survey the
31
- codebase or compile a report.
32
- 3. **Confirm** in one short comment what you did. Done.
33
-
34
- ## Redirect, don't comply
35
-
36
- The classifier owns intent routing. If a request that needs *building* reached
37
- you anyway, the correct response is to **redirect, not do it** — even if the
38
- comment seems to greenlight the work, and even if the issue body describes a
39
- task. An issue titled "Security Review" asking you to "find and fix issues" is a
40
- build request: reply asking the maintainer to use `@last-light build` (or
41
- `@last-light explore`). Do **not** run the audit yourself from this skill.
42
-
43
- If the request is unclear or out of scope, post one short comment asking them to
44
- clarify or to use the right command. Do nothing else.
45
-
46
- ## Tool usage
47
-
48
- GitHub operations via `github_*` MCP tools only — never `gh` CLI, `curl`, or raw
49
- HTTP.
@@ -1,149 +0,0 @@
1
- ---
2
- name: issue-triage
3
- description: Triage GitHub issues through the canonical state machine — classify, label, deduplicate, request missing info, write agent briefs, and manage stale issues. Use on demand or on a triage cron.
4
- version: 2.0.0
5
- tags: [github, issues, triage]
6
- ---
7
-
8
- # Issue Triage
9
-
10
- Move each issue through a small **state machine**. Every triaged issue carries
11
- exactly **one category role and one state role**:
12
-
13
- - **Category:** `bug` (something is broken) · `enhancement` (new feature or improvement)
14
- - **State:** `needs-triage` (awaiting evaluation) · `needs-info` (waiting on the
15
- reporter) · `ready-for-agent` (fully specified, an AFK agent can take it) ·
16
- `ready-for-human` (needs human implementation) · `wontfix` (won't be actioned)
17
-
18
- These are canonical role names; the actual label strings for a repo may differ —
19
- `docs/agents/triage-labels.md` holds the mapping when present. Run **autonomously**:
20
- there is no maintainer to ask mid-run. Where you'd want direction, either make
21
- the call and apply the label, or post a comment and stop — the async comment *is*
22
- the conversation.
23
-
24
- Your job is to **classify the issue and pin down the problem statement** —
25
- clarify what's actually being asked, and ask for missing information when it's
26
- under-specified. You do **not** design or plan the implementation: you have only
27
- read-only context and no deep exploration, so solution design is left to the
28
- downstream build agent, which has full source access.
29
-
30
- ## 0. Ensure the labels exist
31
-
32
- Before applying any label, create the canonical set in a **single** idempotent
33
- `github_ensure_labels` call — pass every row below as one `labels` array
34
- (`{name, color}`). It lists once and creates only the missing ones, so it never
35
- errors on labels that already exist:
36
-
37
- | Label | Color | Role |
38
- |-------|-------|------|
39
- | `bug` | `d73a4a` | category |
40
- | `enhancement` | `a2eeef` | category |
41
- | `needs-triage` | `ededed` | state |
42
- | `needs-info` | `fbca04` | state |
43
- | `ready-for-agent` | `0e8a16` | state |
44
- | `ready-for-human` | `1d76db` | state |
45
- | `wontfix` | `ffffff` | state |
46
- | `duplicate` | `cfd3d7` | dedupe |
47
- | `question` | `d876e3` | question |
48
-
49
- If the call is denied (the token lacks the permission), fall back to using
50
- only the labels that already exist on the repo and skip the rest. Done when the
51
- labels you need are present or you've confirmed you can't create them.
52
-
53
- ## 1. Triage a specific issue
54
-
55
- 1. **Gather context.** Read the full issue — title, body, comments, existing
56
- labels, author, dates. Search existing issues for **duplicates** by concept
57
- (not just keyword). If a `.out-of-scope/` directory exists, read it and note
58
- any prior rejection this resembles. Done when you know the issue's intent and
59
- whether it's novel.
60
- 2. **Classify the category** — `bug` or `enhancement`. But first, check whether
61
- the issue is a **question** at all (see below) — questions are neither.
62
- 3. **Decide the state and act** (exactly one applies):
63
- - **Question** (asks for information, an explanation, or a comparison — wants
64
- an answer, not a code change) → add `question` and **stop**. Do **not**
65
- write an agent brief or mark it `ready-for-agent`/`ready-for-human` — a
66
- pure question is not work. (The router normally sends these to the answer
67
- path before triage runs; this is the safety net for ones that slip
68
- through, e.g. reopened issues. If you can answer it briefly and factually
69
- from the repo itself, do so in one short comment; otherwise just label it
70
- and leave it for the answer path or a human.)
71
- - **Duplicate** → comment linking the original, add `duplicate`, close.
72
- - **Already implemented** → comment pointing to where it lives, add `wontfix`,
73
- close. (Factual — safe to close autonomously.)
74
- - **Under-specified** (bug without repro, feature without a use case) → add
75
- `needs-info`, post the [needs-info template](#needs-info-template), stop.
76
- - **Fully specified and delegatable** → add `ready-for-agent`, post a triage
77
- summary — the problem statement, not a solution design
78
- ([references/AGENT-BRIEF.md](references/AGENT-BRIEF.md)).
79
- - **Needs human implementation** (judgment calls, external access, design
80
- decisions, manual testing) → add `ready-for-human` with a triage summary
81
- noting why it can't be delegated.
82
- - **Looks out of scope** (an enhancement you'd reject) → this is a maintainer
83
- decision; do **not** auto-close. Add `needs-triage`, post a comment with
84
- your reasoning (cite any matching `.out-of-scope/` file), and leave it for a
85
- human.
86
- 4. **Apply exactly one category + one state.** When you change an issue's state,
87
- **remove the superseded state label** (e.g. clear `needs-info` when moving to
88
- `ready-for-agent`) so the issue never carries two state roles. If the existing
89
- labels conflict (two state roles you didn't set this run), flag it in a comment
90
- and don't override — a maintainer may have set them deliberately.
91
-
92
- ## 1a. Reporter answered or added information
93
-
94
- You may be re-triaging an open, pre-build issue because the reporter (or a
95
- maintainer) just commented — answering a `needs-info` request, or adding new
96
- detail, repro steps, or clarification. (Re-triage only fires before any build has
97
- started; once an issue is building, it's out of your hands.)
98
-
99
- 1. **Re-read the whole thread** — the issue body, existing labels, and *all*
100
- comments including the newest. Re-assess against the gaps that originally held
101
- it back.
102
- 2. **If the new information resolves the gaps** → move the issue forward per §1
103
- step 3: remove `needs-info` and add `ready-for-agent` (+ triage summary),
104
- `ready-for-human`, or `needs-triage` as appropriate.
105
- 3. **If it's still under-specified** → keep `needs-info`, but **do not repost the
106
- full [needs-info template](#needs-info-template)**. Acknowledge what they
107
- answered and ask only the still-open questions — never duplicate a question
108
- they've already addressed.
109
-
110
- ## 2. New unlabelled issues (batch / cron)
111
-
112
- For each issue with no triage labels yet, run §1. Default new issues that need
113
- evaluation to `needs-triage`.
114
-
115
- ## 3. Stale `needs-info`
116
-
117
- 1. Find issues labelled `needs-info` with no activity for **14+ days**.
118
- 2. **Check for a prior bot reminder** with `github_list_issue_comments` — look
119
- for a `last-light[bot]` comment containing "reminder" / "still need" /
120
- "closing". **Never post a duplicate reminder.**
121
- 3. No reminder yet → post a gentle reminder asking if they still need help.
122
- 4. Reminder exists and **30+ days** have passed with no reporter response since →
123
- close kindly, noting they can reopen.
124
- 5. Reminder exists, **< 30 days** since → do nothing.
125
-
126
- ## needs-info template
127
-
128
- ```markdown
129
- ## Triage Notes
130
-
131
- **What we've established so far:**
132
- - point 1
133
-
134
- **What we still need from you (@reporter):**
135
- - specific, actionable question 1
136
- ```
137
-
138
- Questions must be specific and actionable — not "please provide more info".
139
-
140
- ## Tool usage
141
-
142
- GitHub operations via `github_*` MCP tools only — listing, labelling, commenting,
143
- closing, creating labels. Never `gh` CLI, `curl`, or raw HTTP.
144
-
145
- ## Pitfalls
146
-
147
- - Don't close aggressively — when genuinely in doubt, leave it open as `needs-triage`.
148
- - Don't change priority or state on issues a maintainer already triaged.
149
- - Check existing labels before adding — don't duplicate.
@@ -1,65 +0,0 @@
1
- # Writing a triage summary
2
-
3
- A triage summary is a comment posted when an issue moves to `ready-for-agent`
4
- (or `ready-for-human`). It captures the **problem statement** — what the issue is
5
- really asking for and what "done" looks like — so a downstream agent (or human)
6
- can pick it up. The original body and discussion are context; the summary is the
7
- distilled problem.
8
-
9
- Triage classifies and **scopes the problem**. It does **not** design the
10
- solution: triage runs with read-only context and no deep exploration, so any
11
- implementation it guessed would be wrong as often as right. The build agent
12
- explores the codebase fresh, with full source access, and owns every
13
- implementation decision. Post the summary with `github_add_issue_comment`.
14
-
15
- ## Principles
16
-
17
- **Durable.** The issue may sit in `ready-for-agent` for weeks while the codebase
18
- moves. Describe the problem and the desired behaviour in terms that stay true as
19
- the code changes. **Never** reference file paths or line numbers; they go stale.
20
-
21
- **Problem, not solution.** Say *what* should be true when the work is done, not
22
- *how* to build it. Do **not** name types, function signatures, or config shapes,
23
- propose an implementation approach, or point at where in the code to change —
24
- that is the build agent's job.
25
- - Good: "Todos can have an optional target date, shown in the list and editable."
26
- - Bad: "Add a `dueDate: Date` field to the `Todo` interface and a date picker in `TodoForm`."
27
-
28
- **Complete acceptance criteria.** List concrete, independently testable criteria
29
- so the agent knows when it's done. These describe the problem's done-state — not
30
- the implementation.
31
- - Good: "A todo with a past target date is visually flagged as overdue."
32
- - Bad: "Triage should work correctly."
33
-
34
- **Explicit scope boundaries.** State what is *out of scope* so the agent doesn't
35
- gold-plate or wander into adjacent features.
36
-
37
- ## Template
38
-
39
- ```markdown
40
- ## Triage Summary
41
-
42
- **Category:** bug / enhancement
43
- **Summary:** one line — what needs to happen
44
-
45
- **Current behavior:**
46
- What happens now. For a bug, the broken behaviour. For an enhancement, the
47
- status quo it builds on.
48
-
49
- **Desired behavior:**
50
- What should happen after the work is done. Be specific about edge cases and
51
- error conditions — in user-visible / behavioural terms, not code.
52
-
53
- **Acceptance criteria:**
54
- - [ ] Specific, testable criterion 1
55
- - [ ] Specific, testable criterion 2
56
-
57
- **Out of scope:**
58
- - Thing that should NOT be changed here
59
- - Adjacent feature that looks related but is separate
60
- ```
61
-
62
- ## `ready-for-human` variant
63
-
64
- Same structure, plus a leading note on **why it can't be delegated** — judgment
65
- calls, external access, design decisions, or manual testing the agent can't do.
@@ -1,64 +0,0 @@
1
- ---
2
- name: pr-comment
3
- description: Answer a maintainer's question about an open PR with concrete, code-cited evidence. The PR-side counterpart to issue-comment — for questions tied to the diff, not a full review.
4
- version: 2.0.0
5
- tags: [github, pr, comments, qa]
6
- ---
7
-
8
- # PR Comment
9
-
10
- A maintainer @mentioned the bot on a PR with a *question* (not a request to
11
- write code, and not "review this"). The question is the entire job — answer it
12
- with evidence, in one comment. Examples: "does this consider X?", "why did we
13
- change Y?", "is the new function thread-safe?", "regression risk for existing
14
- callers?".
15
-
16
- For general issue questions use `issue-comment`; for a full review use
17
- `pr-review`.
18
-
19
- ## Procedure
20
-
21
- ### 1. Read the PR and the question
22
-
23
- - `github_get_pull_request` → title, body, base, head.
24
- - The triggering question is in `context.commentBody`. Answer *that* question —
25
- don't generalise to a review or answer a different one.
26
-
27
- ### 2. Investigate with the diff in hand
28
-
29
- Get the diff and read the code needed to answer well — a real answer about
30
- thread-safety or regression risk needs the surrounding code, not just the hunk.
31
-
32
- - **Cap: 8 file reads** per invocation.
33
- - "Does it consider X?" → also check whether tests in the diff cover X.
34
- - "Regression risk?" → find callers of any function whose signature/behaviour
35
- changed (`github_search_code`).
36
- - Don't clone the repo unless a single answer genuinely needs cross-file traces
37
- no MCP tool can give — most don't. If it truly needs a full audit, say so and
38
- recommend `@last-light` (which routes to `pr-review`) rather than blowing the cap.
39
-
40
- ### 3. Reply with one comment
41
-
42
- `github_add_issue_comment` (PRs accept issue comments here). Keep it tight:
43
-
44
- - **Lead with the answer** — yes / no / it depends. Don't bury it.
45
- - **Cite `path:line`** — clickable in the GitHub UI.
46
- - 3–8 sentences or a short bulleted list. No headings.
47
- - If it's unanswerable from the PR alone, say so and name the specific
48
- information you'd need.
49
-
50
- > Yes — `src/foo.ts:42` checks `X` before calling `bar()`, and
51
- > `tests/foo.test.ts:118` asserts the rejection path. The only place X isn't
52
- > validated is the legacy `barLegacy` (`src/foo.ts:67`), which this PR doesn't
53
- > touch — worth a separate issue if you want it covered.
54
-
55
- ## Do not
56
-
57
- - Post a formal review (`github_create_pull_request_review`) — that's
58
- `pr-review`'s job and would collide with its blocking check.
59
- - Modify code, push, or add labels. One comment, nothing else.
60
- - Answer a tangent you noticed — note it in at most one trailing sentence.
61
-
62
- ## Tool usage
63
-
64
- GitHub operations via `github_*` MCP tools only — never `gh` CLI, `curl`, or raw HTTP.
@@ -1,148 +0,0 @@
1
- ---
2
- name: pr-review
3
- description: Review a GitHub pull request and post one formal review — advance the existing discussion and give precision-first, high-signal feedback. A pure code review — no building. Use when asked to review a PR or on a cron PR scan.
4
- version: 7.0.0
5
- tags: [github, review, code-quality]
6
- ---
7
-
8
- # PR Review
9
-
10
- Review an open PR — high-signal findings only. This is a **pure code review**:
11
- read the change and reason about it. Do **not** install dependencies, build, or
12
- run tests — that is CI's job, and it validates whether the change actually works
13
- far more reliably than you re-running it here. Your job is judgement on the diff,
14
- not a build gate. A noisy review gets muted, so precision matters more than
15
- volume.
16
-
17
- You do **not** post the review yourself. You write your findings to a JSON file
18
- (`.lastlight/pr-review/findings.json`) and a deterministic follow-up step posts
19
- one formal review, anchoring each finding to its diff line as an inline comment
20
- (§4).
21
-
22
- This skill is the PR-specific procedure. It uses the **code-review** skill for
23
- the precision bar and what-to-check rubric.
24
-
25
- ## Workspace
26
-
27
- The harness pre-clones the PR's head ref and drops you **inside the checkout** —
28
- your cwd **is** the repo (`ls -la` shows `.git/` directly; `AGENTS.md` is the
29
- sibling one level up at `../`). Use `git`/`read`/`grep` from here. To refresh:
30
- `git fetch origin <branch> --depth 50 && git reset --hard FETCH_HEAD`. If the
31
- checkout is somehow missing, `git clone https://github.com/{{owner}}/{{repo}}.git .`.
32
-
33
- **Read code from this local checkout, never the API.** Use `git`/`read`/`grep`
34
- on disk for the diff and file contents. Do **not** call
35
- `github_get_pull_request_diff`, `github_list_pull_request_files`, or
36
- `github_get_file_contents` — the API patch is a large redundant payload that
37
- re-bloats context every turn. The `github_*` tools are for *API* operations only
38
- (reading metadata + prior comments in §1–2). You never post the review via a
39
- tool — you write the findings file and the follow-up step posts it.
40
-
41
- ## Procedure
42
-
43
- ### 1. Confirm the target
44
-
45
- If `prNumber` (or `issueNumber`) is set in the Context block, **that is your
46
- target** — go straight to `github_get_pull_request` with it. Do **not** call
47
- `github_list_pull_requests` to "find" or "confirm" it; you were handed it, and
48
- listing dumps a large payload for nothing. Only when no PR is given (a repo-wide
49
- `mode: scan`) do you list open PRs and pick the most recent unreviewed one.
50
-
51
- **Stop conditions** (check before reviewing):
52
- - PR authored by `last-light[bot]` → skip. Never self-review.
53
- - `merged === true` → stop. This skill reviews open PRs only.
54
- - A `last-light[bot]` review already exists on the **current head SHA** → stop;
55
- don't post a duplicate. (A re-review is fine once new commits land.)
56
-
57
- ### 2. Read the prior discussion
58
-
59
- A review advances the conversation, don't restart it. Fetch and absorb:
60
- `github_list_pull_request_reviews`, `github_list_issue_comments`,
61
- `github_list_pull_request_review_comments`. Done when you can say: which findings
62
- were already raised (don't repeat them), which threads the author resolved
63
- (treat as done unless the fix is wrong), which are still open (surface those —
64
- higher signal than a fresh nit), and whether a human already approved.
65
-
66
- ### 3. Get the diff
67
-
68
- From inside `<repo>/`:
69
- ```
70
- git fetch origin <baseRef> --depth 50 # base isn't in the head-only clone
71
- git diff --stat origin/<baseRef>...HEAD # churn
72
- git diff origin/<baseRef>...HEAD # the patch
73
- ```
74
-
75
- ### 4. Assess and write your findings
76
-
77
- Apply the **code-review** skill's rubric — read each changed file in context;
78
- check correctness / edge-cases / security / regression-risk / test-coverage.
79
- Reason about the code statically; **don't build or run it** — trust CI to catch
80
- what only running reveals, and spend your effort on what a human reviewer sees.
81
- Follow that skill's **precision-first** rule: keep **only Critical and Important**
82
- findings, each anchored to a `path:line` with a one-line concrete impact (what
83
- breaks, for which input or caller). Drop Suggestions and Nits.
84
-
85
- Before writing anything, run the **confidence gate**: re-read each finding
86
- against the actual code and try to refute it; drop any you can't defend against
87
- what the code really does. A clean PR should be approved with few or no
88
- findings — that is a good review, not a lazy one.
89
-
90
- **Do not call `github_create_pull_request_review` (or any review-submitting
91
- tool).** Write your findings to `.lastlight/pr-review/findings.json` instead. A
92
- deterministic follow-up step reads that file and posts one formal review with
93
- your findings as inline comments anchored to the diff. The full contract with
94
- worked examples is in [references/findings-schema.md](references/findings-schema.md);
95
- the shape is:
96
-
97
- ```json
98
- {
99
- "skip": false,
100
- "summary": "One or two sentences on what the PR does + overall assessment.",
101
- "event": "COMMENT",
102
- "findings": [
103
- {
104
- "path": "src/foo.ts",
105
- "line": 42,
106
- "side": "RIGHT",
107
- "severity": "Critical",
108
- "title": "Short label for the finding",
109
- "body": "Concrete impact — what breaks, for which input or caller.",
110
- "suggestion": "exact replacement text for the anchored line(s)"
111
- }
112
- ]
113
- }
114
- ```
115
-
116
- Write **only these content fields** — `skip?` / `summary` / `event` /
117
- `findings[]`. The follow-up step already knows the PR number, base ref, head
118
- SHA and diff from the harness's own context and the checkout, so you do **not**
119
- record any of that metadata (that reliance was a footgun — omit it).
120
-
121
- Rules:
122
- - **Anchor precisely.** `path` must match the diff path exactly; `line`/`side`
123
- must point at a line that appears in the diff (added/context → `side: RIGHT`;
124
- removed/context → `side: LEFT`). A finding whose line isn't in the diff is
125
- demoted to the summary body, so get the anchor right. Use optional `start_line`
126
- (same side) for a multi-line range.
127
- - `severity` is `Critical` or `Important` only.
128
- - `suggestion` is optional — include it only when a concrete one-to-few-line fix
129
- is obvious. It must be the exact replacement text for the anchored line(s),
130
- nothing else; GitHub renders it as an applyable suggestion.
131
- - `event` is `APPROVE` / `REQUEST_CHANGES` / `COMMENT`, matching what survived
132
- the gate. A clean PR is an `APPROVE` with an empty `findings` array and a short
133
- `summary`.
134
- - Create the dir and keep the file out of git first:
135
- `mkdir -p .lastlight/pr-review && echo '.lastlight/' >> .git/info/exclude`.
136
-
137
- **Stop / skip:** if a stop condition in §1 holds (bot-authored, merged, already
138
- reviewed at the current head SHA), write `{"skip": true, "summary": "<reason>"}`
139
- and stop — the follow-up step then posts nothing.
140
-
141
- ## Verification
142
-
143
- Confirm `.lastlight/pr-review/findings.json` is valid JSON and every finding
144
- carries `path` + `line`. The first-class `post-review` action then posts the
145
- review — anchoring each finding to its diff line, demoting any off-diff finding
146
- to the body, and logging how many landed inline vs in the body. If the file is
147
- missing after a real review (not a `skip`), that step **fails the run** loudly
148
- rather than posting nothing.
@@ -1,89 +0,0 @@
1
- # PR review findings schema
2
-
3
- The `pr-review` skill writes its findings to `.lastlight/pr-review/findings.json`
4
- (relative to the repo checkout — your cwd). The first-class `post-review` action
5
- reads this file and posts **one** formal GitHub review:
6
-
7
- - Each finding whose `line`/`side` anchors to a line that appears in the PR diff
8
- becomes an **inline comment** on that exact line.
9
- - Any finding whose anchor isn't in the diff is **demoted** into the review body
10
- under an "Additional findings" heading (GitHub rejects comments off the diff).
11
- - If the diff can't be computed (git failure), **all** findings go into the
12
- body — the review still posts, so nothing is lost.
13
-
14
- You write only the review **content** — `skip?` / `summary` / `event` /
15
- `findings[]`. The PR number, base ref, head SHA and diff come from the harness's
16
- own run context and the checkout, so you do **not** record any of that metadata.
17
- You never call `github_create_pull_request_review` yourself; writing this file is
18
- how you submit.
19
-
20
- ## Top-level object
21
-
22
- | Field | Type | Required | Meaning |
23
- |---|---|---|---|
24
- | `skip` | boolean | no | `true` → you decided not to review (bot-authored / merged / already reviewed at head). The action posts nothing. |
25
- | `summary` | string | yes | One or two sentences on what the PR does + your overall assessment. Becomes the review body. |
26
- | `event` | string | yes | `APPROVE` \| `REQUEST_CHANGES` \| `COMMENT`. A clean PR is `APPROVE` with an empty `findings` array. |
27
- | `findings` | array | yes | The surviving Critical/Important findings (may be empty). |
28
-
29
- ## Finding object
30
-
31
- | Field | Type | Required | Meaning |
32
- |---|---|---|---|
33
- | `path` | string | yes | Repo-relative file path, matching the diff path exactly. |
34
- | `line` | number | yes | Line number on `side` that the comment anchors to. Must appear in the diff. |
35
- | `side` | string | no | `RIGHT` (added/context line — default) or `LEFT` (removed/context line). |
36
- | `start_line` | number | no | Start of a multi-line range (same `side` as `line`). |
37
- | `severity` | string | yes | `Critical` or `Important` only. |
38
- | `title` | string | yes | Short label for the finding. |
39
- | `body` | string | yes | Concrete impact — what breaks, for which input or caller. |
40
- | `suggestion` | string | no | Exact replacement text for the anchored line(s). Rendered as an applyable ```suggestion block. Include only when a concrete one-to-few-line fix is obvious. |
41
-
42
- ## Example — findings with an inline suggestion
43
-
44
- ```json
45
- {
46
- "skip": false,
47
- "summary": "Adds a `--config` flag to the CLI and threads it into the connect path. Solid overall; one crash on the default path and one missing-await.",
48
- "event": "REQUEST_CHANGES",
49
- "findings": [
50
- {
51
- "path": "src/cli.ts",
52
- "line": 42,
53
- "side": "RIGHT",
54
- "severity": "Critical",
55
- "title": "Null deref when --config is omitted",
56
- "body": "`cfg.host` is undefined when no config file is passed, so every default-path invocation throws before connecting.",
57
- "suggestion": "const host = cfg.host ?? DEFAULT_HOST;"
58
- },
59
- {
60
- "path": "src/connect.ts",
61
- "line": 88,
62
- "side": "RIGHT",
63
- "severity": "Important",
64
- "title": "Missing await on disconnect()",
65
- "body": "`disconnect()` returns a promise that's never awaited, so the socket can leak if the caller exits immediately after."
66
- }
67
- ]
68
- }
69
- ```
70
-
71
- ## Example — clean PR (approve, no findings)
72
-
73
- ```json
74
- {
75
- "skip": false,
76
- "summary": "Small, well-tested refactor of the retry helper. No correctness or regression concerns.",
77
- "event": "APPROVE",
78
- "findings": []
79
- }
80
- ```
81
-
82
- ## Example — skip (already reviewed this SHA)
83
-
84
- ```json
85
- {
86
- "skip": true,
87
- "summary": "A last-light[bot] review already exists on the current head SHA; nothing new to add."
88
- }
89
- ```