@quickchatai/pi-quickreview 0.0.0-stage → 1.1.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 (689) hide show
  1. package/LICENSE +23 -0
  2. package/README.md +75 -2
  3. package/assets/agents/pass-abstraction.md +64 -0
  4. package/assets/agents/pass-ask-human.md +134 -0
  5. package/assets/agents/pass-backcompat.md +67 -0
  6. package/assets/agents/pass-baseline.md +61 -0
  7. package/assets/agents/pass-behaviour-delta.md +64 -0
  8. package/assets/agents/pass-bounds.md +36 -0
  9. package/assets/agents/pass-claims.md +31 -0
  10. package/assets/agents/pass-concurrency.md +168 -0
  11. package/assets/agents/pass-consistency.md +57 -0
  12. package/assets/agents/pass-contracts.md +30 -0
  13. package/assets/agents/pass-data-safety.md +54 -0
  14. package/assets/agents/pass-deferred.md +35 -0
  15. package/assets/agents/pass-delivery.md +37 -0
  16. package/assets/agents/pass-duplication.md +60 -0
  17. package/assets/agents/pass-intent.md +63 -0
  18. package/assets/agents/pass-lint-conformance.md +46 -0
  19. package/assets/agents/pass-maintainability.md +67 -0
  20. package/assets/agents/pass-placement.md +68 -0
  21. package/assets/agents/pass-prod-risk.md +24 -0
  22. package/assets/agents/pass-rollout.md +32 -0
  23. package/assets/agents/pass-roundtrip.md +46 -0
  24. package/assets/agents/pass-security.md +31 -0
  25. package/assets/agents/pass-simplicity.md +68 -0
  26. package/assets/agents/pass-statelessness.md +27 -0
  27. package/assets/agents/pass-style.md +37 -0
  28. package/assets/agents/pass-sweep.md +57 -0
  29. package/assets/agents/pass-tests.md +58 -0
  30. package/assets/agents/pass-ui.md +23 -0
  31. package/assets/agents/pass-validate.md +50 -0
  32. package/assets/agents/pass-widened.md +46 -0
  33. package/assets/agents/scan/pass-scan.md +86 -0
  34. package/assets/config.example.toml +1067 -0
  35. package/assets/deploy/reviewer/AGENTS.override.md +12 -0
  36. package/assets/profiles/default/README.md +21 -0
  37. package/assets/profiles/default/addenda/.gitkeep +0 -0
  38. package/assets/profiles/default/profile.toml +17 -0
  39. package/assets/profiles/example-django/README.md +21 -0
  40. package/assets/profiles/example-django/addenda/10-migration-discipline.md +13 -0
  41. package/assets/profiles/example-django/addenda/20-new-column-nullability.md +12 -0
  42. package/assets/profiles/example-django/addenda/30-test-doctrine.md +12 -0
  43. package/assets/profiles/example-django/addenda/40-orm-usage.md +19 -0
  44. package/assets/profiles/example-django/addenda/50-declared-shape.md +10 -0
  45. package/assets/profiles/example-django/addenda/60-config-placement.md +14 -0
  46. package/assets/profiles/example-django/heuristics.toml +24 -0
  47. package/assets/profiles/example-django/profile.toml +9 -0
  48. package/assets/profiles/fast/README.md +24 -0
  49. package/assets/profiles/fast/profile.toml +59 -0
  50. package/assets/profiles/minimal/README.md +17 -0
  51. package/assets/profiles/minimal/addenda/.gitkeep +0 -0
  52. package/assets/profiles/minimal/profile.toml +8 -0
  53. package/assets/profiles/snappy/README.md +24 -0
  54. package/assets/profiles/snappy/addenda/10-race-as-question.md +6 -0
  55. package/assets/profiles/snappy/profile.toml +46 -0
  56. package/assets/prompts/companion-day-open.md +46 -0
  57. package/assets/prompts/companion-first-run.md +104 -0
  58. package/assets/prompts/companion.md +821 -0
  59. package/assets/prompts/conversation-system.md +117 -0
  60. package/assets/prompts/eod-sweep.md +120 -0
  61. package/assets/prompts/onboarding.md +74 -0
  62. package/assets/prompts/pass-common.md +52 -0
  63. package/assets/prompts/pass-quality-common.md +22 -0
  64. package/assets/prompts/round-first.md +874 -0
  65. package/assets/prompts/round-follow-up.md +991 -0
  66. package/assets/prompts/round-re-review.md +889 -0
  67. package/assets/prompts/round-recheck.md +196 -0
  68. package/assets/prompts/round-staleness.md +856 -0
  69. package/assets/schemas/review-result.v1.json +391 -0
  70. package/assets/schemas/scan-result.v1.json +421 -0
  71. package/assets/schemas/version.v1.json +57 -0
  72. package/assets/seed-manifest.json +19 -0
  73. package/assets/seeds/agents/pass-baseline.md +61 -0
  74. package/assets/seeds/agents/pass-contracts.md +30 -0
  75. package/assets/seeds/agents/pass-data-safety.md +54 -0
  76. package/assets/seeds/agents/pass-delivery.md +37 -0
  77. package/assets/seeds/agents/pass-prod-risk.md +24 -0
  78. package/assets/seeds/agents/pass-security.md +31 -0
  79. package/assets/seeds/agents/pass-statelessness.md +27 -0
  80. package/assets/seeds/agents/pass-ui.md +23 -0
  81. package/assets/seeds/agents/pass-validate.md +50 -0
  82. package/assets/seeds/prompts/conversation-system.md +117 -0
  83. package/assets/seeds/prompts/eod-sweep.md +120 -0
  84. package/assets/seeds/prompts/pass-common.md +52 -0
  85. package/dist/extensions/bash-guard.d.ts +467 -0
  86. package/dist/extensions/bash-guard.d.ts.map +1 -0
  87. package/dist/extensions/bash-guard.js +3058 -0
  88. package/dist/extensions/bash-guard.js.map +1 -0
  89. package/dist/extensions/finding-clusters.d.ts +33 -0
  90. package/dist/extensions/finding-clusters.d.ts.map +1 -0
  91. package/dist/extensions/finding-clusters.js +218 -0
  92. package/dist/extensions/finding-clusters.js.map +1 -0
  93. package/dist/extensions/ledger-pin.d.ts +76 -0
  94. package/dist/extensions/ledger-pin.d.ts.map +1 -0
  95. package/dist/extensions/ledger-pin.js +331 -0
  96. package/dist/extensions/ledger-pin.js.map +1 -0
  97. package/dist/extensions/lens.d.ts +43 -0
  98. package/dist/extensions/lens.d.ts.map +1 -0
  99. package/dist/extensions/lens.js +150 -0
  100. package/dist/extensions/lens.js.map +1 -0
  101. package/dist/extensions/pi-tool.d.ts +22 -0
  102. package/dist/extensions/pi-tool.d.ts.map +1 -0
  103. package/dist/extensions/pi-tool.js +20 -0
  104. package/dist/extensions/pi-tool.js.map +1 -0
  105. package/dist/extensions/quickreview.d.ts +21 -0
  106. package/dist/extensions/quickreview.d.ts.map +1 -0
  107. package/dist/extensions/quickreview.js +132 -0
  108. package/dist/extensions/quickreview.js.map +1 -0
  109. package/dist/src/anchors.d.ts +54 -0
  110. package/dist/src/anchors.d.ts.map +1 -0
  111. package/dist/src/anchors.js +127 -0
  112. package/dist/src/anchors.js.map +1 -0
  113. package/dist/src/assetroot.d.ts +16 -0
  114. package/dist/src/assetroot.d.ts.map +1 -0
  115. package/dist/src/assetroot.js +77 -0
  116. package/dist/src/assetroot.js.map +1 -0
  117. package/dist/src/authwatch.d.ts +61 -0
  118. package/dist/src/authwatch.d.ts.map +1 -0
  119. package/dist/src/authwatch.js +210 -0
  120. package/dist/src/authwatch.js.map +1 -0
  121. package/dist/src/budget.d.ts +15 -0
  122. package/dist/src/budget.d.ts.map +1 -0
  123. package/dist/src/budget.js +32 -0
  124. package/dist/src/budget.js.map +1 -0
  125. package/dist/src/casebudget.d.ts +3 -0
  126. package/dist/src/casebudget.d.ts.map +1 -0
  127. package/dist/src/casebudget.js +3 -0
  128. package/dist/src/casebudget.js.map +1 -0
  129. package/dist/src/cigate.d.ts +116 -0
  130. package/dist/src/cigate.d.ts.map +1 -0
  131. package/dist/src/cigate.js +176 -0
  132. package/dist/src/cigate.js.map +1 -0
  133. package/dist/src/codespan.d.ts +46 -0
  134. package/dist/src/codespan.d.ts.map +1 -0
  135. package/dist/src/codespan.js +75 -0
  136. package/dist/src/codespan.js.map +1 -0
  137. package/dist/src/contextpack.d.ts +56 -0
  138. package/dist/src/contextpack.d.ts.map +1 -0
  139. package/dist/src/contextpack.js +195 -0
  140. package/dist/src/contextpack.js.map +1 -0
  141. package/dist/src/contract.d.ts +8 -0
  142. package/dist/src/contract.d.ts.map +1 -0
  143. package/dist/src/contract.js +21 -0
  144. package/dist/src/contract.js.map +1 -0
  145. package/dist/src/coverage.d.ts +32 -0
  146. package/dist/src/coverage.d.ts.map +1 -0
  147. package/dist/src/coverage.js +85 -0
  148. package/dist/src/coverage.js.map +1 -0
  149. package/dist/src/datafence.d.ts +19 -0
  150. package/dist/src/datafence.d.ts.map +1 -0
  151. package/dist/src/datafence.js +60 -0
  152. package/dist/src/datafence.js.map +1 -0
  153. package/dist/src/dedup.d.ts +65 -0
  154. package/dist/src/dedup.d.ts.map +1 -0
  155. package/dist/src/dedup.js +459 -0
  156. package/dist/src/dedup.js.map +1 -0
  157. package/dist/src/depsources.d.ts +304 -0
  158. package/dist/src/depsources.d.ts.map +1 -0
  159. package/dist/src/depsources.js +3367 -0
  160. package/dist/src/depsources.js.map +1 -0
  161. package/dist/src/diffinput.d.ts +10 -0
  162. package/dist/src/diffinput.d.ts.map +1 -0
  163. package/dist/src/diffinput.js +172 -0
  164. package/dist/src/diffinput.js.map +1 -0
  165. package/dist/src/doubtwords.d.ts +10 -0
  166. package/dist/src/doubtwords.d.ts.map +1 -0
  167. package/dist/src/doubtwords.js +13 -0
  168. package/dist/src/doubtwords.js.map +1 -0
  169. package/dist/src/ecosystem.d.ts +148 -0
  170. package/dist/src/ecosystem.d.ts.map +1 -0
  171. package/dist/src/ecosystem.js +338 -0
  172. package/dist/src/ecosystem.js.map +1 -0
  173. package/dist/src/engine/agentdir.d.ts +5 -0
  174. package/dist/src/engine/agentdir.d.ts.map +1 -0
  175. package/dist/src/engine/agentdir.js +21 -0
  176. package/dist/src/engine/agentdir.js.map +1 -0
  177. package/dist/src/engine/auth.d.ts +214 -0
  178. package/dist/src/engine/auth.d.ts.map +1 -0
  179. package/dist/src/engine/auth.js +374 -0
  180. package/dist/src/engine/auth.js.map +1 -0
  181. package/dist/src/engine/budget.d.ts +60 -0
  182. package/dist/src/engine/budget.d.ts.map +1 -0
  183. package/dist/src/engine/budget.js +113 -0
  184. package/dist/src/engine/budget.js.map +1 -0
  185. package/dist/src/engine/capfd.d.ts +6 -0
  186. package/dist/src/engine/capfd.d.ts.map +1 -0
  187. package/dist/src/engine/capfd.js +21 -0
  188. package/dist/src/engine/capfd.js.map +1 -0
  189. package/dist/src/engine/caseout.d.ts +66 -0
  190. package/dist/src/engine/caseout.d.ts.map +1 -0
  191. package/dist/src/engine/caseout.js +107 -0
  192. package/dist/src/engine/caseout.js.map +1 -0
  193. package/dist/src/engine/context.d.ts +57 -0
  194. package/dist/src/engine/context.d.ts.map +1 -0
  195. package/dist/src/engine/context.js +212 -0
  196. package/dist/src/engine/context.js.map +1 -0
  197. package/dist/src/engine/envmap.d.ts +13 -0
  198. package/dist/src/engine/envmap.d.ts.map +1 -0
  199. package/dist/src/engine/envmap.js +372 -0
  200. package/dist/src/engine/envmap.js.map +1 -0
  201. package/dist/src/engine/extfiles.d.ts +7 -0
  202. package/dist/src/engine/extfiles.d.ts.map +1 -0
  203. package/dist/src/engine/extfiles.js +23 -0
  204. package/dist/src/engine/extfiles.js.map +1 -0
  205. package/dist/src/engine/keyroute.d.ts +21 -0
  206. package/dist/src/engine/keyroute.d.ts.map +1 -0
  207. package/dist/src/engine/keyroute.js +58 -0
  208. package/dist/src/engine/keyroute.js.map +1 -0
  209. package/dist/src/engine/lens/cache-group.d.ts +20 -0
  210. package/dist/src/engine/lens/cache-group.d.ts.map +1 -0
  211. package/dist/src/engine/lens/cache-group.js +31 -0
  212. package/dist/src/engine/lens/cache-group.js.map +1 -0
  213. package/dist/src/engine/lens/cache-run.d.ts +65 -0
  214. package/dist/src/engine/lens/cache-run.d.ts.map +1 -0
  215. package/dist/src/engine/lens/cache-run.js +159 -0
  216. package/dist/src/engine/lens/cache-run.js.map +1 -0
  217. package/dist/src/engine/lens/deadline.d.ts +54 -0
  218. package/dist/src/engine/lens/deadline.d.ts.map +1 -0
  219. package/dist/src/engine/lens/deadline.js +111 -0
  220. package/dist/src/engine/lens/deadline.js.map +1 -0
  221. package/dist/src/engine/lens/engine-tools.d.ts +13 -0
  222. package/dist/src/engine/lens/engine-tools.d.ts.map +1 -0
  223. package/dist/src/engine/lens/engine-tools.js +37 -0
  224. package/dist/src/engine/lens/engine-tools.js.map +1 -0
  225. package/dist/src/engine/lens/env.d.ts +23 -0
  226. package/dist/src/engine/lens/env.d.ts.map +1 -0
  227. package/dist/src/engine/lens/env.js +42 -0
  228. package/dist/src/engine/lens/env.js.map +1 -0
  229. package/dist/src/engine/lens/launch-plan.d.ts +63 -0
  230. package/dist/src/engine/lens/launch-plan.d.ts.map +1 -0
  231. package/dist/src/engine/lens/launch-plan.js +203 -0
  232. package/dist/src/engine/lens/launch-plan.js.map +1 -0
  233. package/dist/src/engine/lens/leaf-cache.d.ts +22 -0
  234. package/dist/src/engine/lens/leaf-cache.d.ts.map +1 -0
  235. package/dist/src/engine/lens/leaf-cache.js +115 -0
  236. package/dist/src/engine/lens/leaf-cache.js.map +1 -0
  237. package/dist/src/engine/lens/permits.d.ts +14 -0
  238. package/dist/src/engine/lens/permits.d.ts.map +1 -0
  239. package/dist/src/engine/lens/permits.js +18 -0
  240. package/dist/src/engine/lens/permits.js.map +1 -0
  241. package/dist/src/engine/lens/registry.d.ts +55 -0
  242. package/dist/src/engine/lens/registry.d.ts.map +1 -0
  243. package/dist/src/engine/lens/registry.js +140 -0
  244. package/dist/src/engine/lens/registry.js.map +1 -0
  245. package/dist/src/engine/lens/round-lens.d.ts +16 -0
  246. package/dist/src/engine/lens/round-lens.d.ts.map +1 -0
  247. package/dist/src/engine/lens/round-lens.js +46 -0
  248. package/dist/src/engine/lens/round-lens.js.map +1 -0
  249. package/dist/src/engine/lens/runlens.d.ts +103 -0
  250. package/dist/src/engine/lens/runlens.d.ts.map +1 -0
  251. package/dist/src/engine/lens/runlens.js +538 -0
  252. package/dist/src/engine/lens/runlens.js.map +1 -0
  253. package/dist/src/engine/lens/section.d.ts +19 -0
  254. package/dist/src/engine/lens/section.d.ts.map +1 -0
  255. package/dist/src/engine/lens/section.js +40 -0
  256. package/dist/src/engine/lens/section.js.map +1 -0
  257. package/dist/src/engine/lens/semaphore.d.ts +13 -0
  258. package/dist/src/engine/lens/semaphore.d.ts.map +1 -0
  259. package/dist/src/engine/lens/semaphore.js +44 -0
  260. package/dist/src/engine/lens/semaphore.js.map +1 -0
  261. package/dist/src/engine/lens/tool.d.ts +34 -0
  262. package/dist/src/engine/lens/tool.d.ts.map +1 -0
  263. package/dist/src/engine/lens/tool.js +345 -0
  264. package/dist/src/engine/lens/tool.js.map +1 -0
  265. package/dist/src/engine/lens/wave.d.ts +63 -0
  266. package/dist/src/engine/lens/wave.d.ts.map +1 -0
  267. package/dist/src/engine/lens/wave.js +95 -0
  268. package/dist/src/engine/lens/wave.js.map +1 -0
  269. package/dist/src/engine/livesessions.d.ts +21 -0
  270. package/dist/src/engine/livesessions.d.ts.map +1 -0
  271. package/dist/src/engine/livesessions.js +57 -0
  272. package/dist/src/engine/livesessions.js.map +1 -0
  273. package/dist/src/engine/livewire.d.ts +18 -0
  274. package/dist/src/engine/livewire.d.ts.map +1 -0
  275. package/dist/src/engine/livewire.js +31 -0
  276. package/dist/src/engine/livewire.js.map +1 -0
  277. package/dist/src/engine/openable.d.ts +37 -0
  278. package/dist/src/engine/openable.d.ts.map +1 -0
  279. package/dist/src/engine/openable.js +120 -0
  280. package/dist/src/engine/openable.js.map +1 -0
  281. package/dist/src/engine/pisdk.d.ts +226 -0
  282. package/dist/src/engine/pisdk.d.ts.map +1 -0
  283. package/dist/src/engine/pisdk.js +552 -0
  284. package/dist/src/engine/pisdk.js.map +1 -0
  285. package/dist/src/engine/port.d.ts +144 -0
  286. package/dist/src/engine/port.d.ts.map +1 -0
  287. package/dist/src/engine/port.js +16 -0
  288. package/dist/src/engine/port.js.map +1 -0
  289. package/dist/src/engine/prompts.d.ts +159 -0
  290. package/dist/src/engine/prompts.d.ts.map +1 -0
  291. package/dist/src/engine/prompts.js +339 -0
  292. package/dist/src/engine/prompts.js.map +1 -0
  293. package/dist/src/engine/render.d.ts +10 -0
  294. package/dist/src/engine/render.d.ts.map +1 -0
  295. package/dist/src/engine/render.js +23 -0
  296. package/dist/src/engine/render.js.map +1 -0
  297. package/dist/src/engine/reviewruntime.d.ts +13 -0
  298. package/dist/src/engine/reviewruntime.d.ts.map +1 -0
  299. package/dist/src/engine/reviewruntime.js +35 -0
  300. package/dist/src/engine/reviewruntime.js.map +1 -0
  301. package/dist/src/engine/reviewsdk.d.ts +75 -0
  302. package/dist/src/engine/reviewsdk.d.ts.map +1 -0
  303. package/dist/src/engine/reviewsdk.js +180 -0
  304. package/dist/src/engine/reviewsdk.js.map +1 -0
  305. package/dist/src/engine/round.d.ts +166 -0
  306. package/dist/src/engine/round.d.ts.map +1 -0
  307. package/dist/src/engine/round.js +543 -0
  308. package/dist/src/engine/round.js.map +1 -0
  309. package/dist/src/engine/roundagents.d.ts +17 -0
  310. package/dist/src/engine/roundagents.d.ts.map +1 -0
  311. package/dist/src/engine/roundagents.js +49 -0
  312. package/dist/src/engine/roundagents.js.map +1 -0
  313. package/dist/src/engine/roundevents.d.ts +110 -0
  314. package/dist/src/engine/roundevents.d.ts.map +1 -0
  315. package/dist/src/engine/roundevents.js +276 -0
  316. package/dist/src/engine/roundevents.js.map +1 -0
  317. package/dist/src/engine/roundsdk.d.ts +33 -0
  318. package/dist/src/engine/roundsdk.d.ts.map +1 -0
  319. package/dist/src/engine/roundsdk.js +76 -0
  320. package/dist/src/engine/roundsdk.js.map +1 -0
  321. package/dist/src/engine/sdkruntime.d.ts +23 -0
  322. package/dist/src/engine/sdkruntime.d.ts.map +1 -0
  323. package/dist/src/engine/sdkruntime.js +340 -0
  324. package/dist/src/engine/sdkruntime.js.map +1 -0
  325. package/dist/src/engine/select.d.ts +16 -0
  326. package/dist/src/engine/select.d.ts.map +1 -0
  327. package/dist/src/engine/select.js +32 -0
  328. package/dist/src/engine/select.js.map +1 -0
  329. package/dist/src/engine/sessionwrap.d.ts +4 -0
  330. package/dist/src/engine/sessionwrap.d.ts.map +1 -0
  331. package/dist/src/engine/sessionwrap.js +31 -0
  332. package/dist/src/engine/sessionwrap.js.map +1 -0
  333. package/dist/src/engine/toolfence.d.ts +90 -0
  334. package/dist/src/engine/toolfence.d.ts.map +1 -0
  335. package/dist/src/engine/toolfence.js +378 -0
  336. package/dist/src/engine/toolfence.js.map +1 -0
  337. package/dist/src/engine/tooluid.d.ts +128 -0
  338. package/dist/src/engine/tooluid.d.ts.map +1 -0
  339. package/dist/src/engine/tooluid.js +401 -0
  340. package/dist/src/engine/tooluid.js.map +1 -0
  341. package/dist/src/envstrip.d.ts +10 -0
  342. package/dist/src/envstrip.d.ts.map +1 -0
  343. package/dist/src/envstrip.js +15 -0
  344. package/dist/src/envstrip.js.map +1 -0
  345. package/dist/src/escalationprompt.d.ts +22 -0
  346. package/dist/src/escalationprompt.d.ts.map +1 -0
  347. package/dist/src/escalationprompt.js +54 -0
  348. package/dist/src/escalationprompt.js.map +1 -0
  349. package/dist/src/execfn.d.ts +29 -0
  350. package/dist/src/execfn.d.ts.map +1 -0
  351. package/dist/src/execfn.js +55 -0
  352. package/dist/src/execfn.js.map +1 -0
  353. package/dist/src/finding-chain.d.ts +40 -0
  354. package/dist/src/finding-chain.d.ts.map +1 -0
  355. package/dist/src/finding-chain.js +76 -0
  356. package/dist/src/finding-chain.js.map +1 -0
  357. package/dist/src/finding-row.d.ts +24 -0
  358. package/dist/src/finding-row.d.ts.map +1 -0
  359. package/dist/src/finding-row.js +26 -0
  360. package/dist/src/finding-row.js.map +1 -0
  361. package/dist/src/findingkey.d.ts +99 -0
  362. package/dist/src/findingkey.d.ts.map +1 -0
  363. package/dist/src/findingkey.js +210 -0
  364. package/dist/src/findingkey.js.map +1 -0
  365. package/dist/src/findingsrecord.d.ts +175 -0
  366. package/dist/src/findingsrecord.d.ts.map +1 -0
  367. package/dist/src/findingsrecord.js +410 -0
  368. package/dist/src/findingsrecord.js.map +1 -0
  369. package/dist/src/followup-mode.d.ts +4 -0
  370. package/dist/src/followup-mode.d.ts.map +1 -0
  371. package/dist/src/followup-mode.js +6 -0
  372. package/dist/src/followup-mode.js.map +1 -0
  373. package/dist/src/gate.d.ts +199 -0
  374. package/dist/src/gate.d.ts.map +1 -0
  375. package/dist/src/gate.js +315 -0
  376. package/dist/src/gate.js.map +1 -0
  377. package/dist/src/ghcred.d.ts +58 -0
  378. package/dist/src/ghcred.d.ts.map +1 -0
  379. package/dist/src/ghcred.js +139 -0
  380. package/dist/src/ghcred.js.map +1 -0
  381. package/dist/src/githubAuth.d.ts +32 -0
  382. package/dist/src/githubAuth.d.ts.map +1 -0
  383. package/dist/src/githubAuth.js +116 -0
  384. package/dist/src/githubAuth.js.map +1 -0
  385. package/dist/src/githubcore.d.ts +20 -0
  386. package/dist/src/githubcore.d.ts.map +1 -0
  387. package/dist/src/githubcore.js +20 -0
  388. package/dist/src/githubcore.js.map +1 -0
  389. package/dist/src/glob.d.ts +11 -0
  390. package/dist/src/glob.d.ts.map +1 -0
  391. package/dist/src/glob.js +69 -0
  392. package/dist/src/glob.js.map +1 -0
  393. package/dist/src/guards.d.ts +93 -0
  394. package/dist/src/guards.d.ts.map +1 -0
  395. package/dist/src/guards.js +306 -0
  396. package/dist/src/guards.js.map +1 -0
  397. package/dist/src/heartbeat.d.ts +29 -0
  398. package/dist/src/heartbeat.d.ts.map +1 -0
  399. package/dist/src/heartbeat.js +87 -0
  400. package/dist/src/heartbeat.js.map +1 -0
  401. package/dist/src/heuristics.d.ts +247 -0
  402. package/dist/src/heuristics.d.ts.map +1 -0
  403. package/dist/src/heuristics.js +927 -0
  404. package/dist/src/heuristics.js.map +1 -0
  405. package/dist/src/homes.d.ts +181 -0
  406. package/dist/src/homes.d.ts.map +1 -0
  407. package/dist/src/homes.js +242 -0
  408. package/dist/src/homes.js.map +1 -0
  409. package/dist/src/hunkheader.d.ts +11 -0
  410. package/dist/src/hunkheader.d.ts.map +1 -0
  411. package/dist/src/hunkheader.js +18 -0
  412. package/dist/src/hunkheader.js.map +1 -0
  413. package/dist/src/include.d.ts +435 -0
  414. package/dist/src/include.d.ts.map +1 -0
  415. package/dist/src/include.js +1692 -0
  416. package/dist/src/include.js.map +1 -0
  417. package/dist/src/launchvocab.d.ts +36 -0
  418. package/dist/src/launchvocab.d.ts.map +1 -0
  419. package/dist/src/launchvocab.js +59 -0
  420. package/dist/src/launchvocab.js.map +1 -0
  421. package/dist/src/ledgercarry.d.ts +24 -0
  422. package/dist/src/ledgercarry.d.ts.map +1 -0
  423. package/dist/src/ledgercarry.js +109 -0
  424. package/dist/src/ledgercarry.js.map +1 -0
  425. package/dist/src/lensids.d.ts +7 -0
  426. package/dist/src/lensids.d.ts.map +1 -0
  427. package/dist/src/lensids.js +53 -0
  428. package/dist/src/lensids.js.map +1 -0
  429. package/dist/src/lensplanning.d.ts +8 -0
  430. package/dist/src/lensplanning.d.ts.map +1 -0
  431. package/dist/src/lensplanning.js +126 -0
  432. package/dist/src/lensplanning.js.map +1 -0
  433. package/dist/src/lensresult.d.ts +94 -0
  434. package/dist/src/lensresult.d.ts.map +1 -0
  435. package/dist/src/lensresult.js +162 -0
  436. package/dist/src/lensresult.js.map +1 -0
  437. package/dist/src/lenstuning.d.ts +97 -0
  438. package/dist/src/lenstuning.d.ts.map +1 -0
  439. package/dist/src/lenstuning.js +326 -0
  440. package/dist/src/lenstuning.js.map +1 -0
  441. package/dist/src/lintconfig.d.ts +31 -0
  442. package/dist/src/lintconfig.d.ts.map +1 -0
  443. package/dist/src/lintconfig.js +543 -0
  444. package/dist/src/lintconfig.js.map +1 -0
  445. package/dist/src/live/events.d.ts +188 -0
  446. package/dist/src/live/events.d.ts.map +1 -0
  447. package/dist/src/live/events.js +136 -0
  448. package/dist/src/live/events.js.map +1 -0
  449. package/dist/src/live/writer.d.ts +54 -0
  450. package/dist/src/live/writer.d.ts.map +1 -0
  451. package/dist/src/live/writer.js +516 -0
  452. package/dist/src/live/writer.js.map +1 -0
  453. package/dist/src/localreview.d.ts +128 -0
  454. package/dist/src/localreview.d.ts.map +1 -0
  455. package/dist/src/localreview.js +426 -0
  456. package/dist/src/localreview.js.map +1 -0
  457. package/dist/src/loosenedtests.d.ts +13 -0
  458. package/dist/src/loosenedtests.d.ts.map +1 -0
  459. package/dist/src/loosenedtests.js +188 -0
  460. package/dist/src/loosenedtests.js.map +1 -0
  461. package/dist/src/memoryport.d.ts +264 -0
  462. package/dist/src/memoryport.d.ts.map +1 -0
  463. package/dist/src/memoryport.js +445 -0
  464. package/dist/src/memoryport.js.map +1 -0
  465. package/dist/src/migrations.d.ts +106 -0
  466. package/dist/src/migrations.d.ts.map +1 -0
  467. package/dist/src/migrations.js +373 -0
  468. package/dist/src/migrations.js.map +1 -0
  469. package/dist/src/oneshot.d.ts +12 -0
  470. package/dist/src/oneshot.d.ts.map +1 -0
  471. package/dist/src/oneshot.js +8 -0
  472. package/dist/src/oneshot.js.map +1 -0
  473. package/dist/src/packing.d.ts +11 -0
  474. package/dist/src/packing.d.ts.map +1 -0
  475. package/dist/src/packing.js +31 -0
  476. package/dist/src/packing.js.map +1 -0
  477. package/dist/src/passes.d.ts +16 -0
  478. package/dist/src/passes.d.ts.map +1 -0
  479. package/dist/src/passes.js +104 -0
  480. package/dist/src/passes.js.map +1 -0
  481. package/dist/src/passtasks.d.ts +68 -0
  482. package/dist/src/passtasks.d.ts.map +1 -0
  483. package/dist/src/passtasks.js +360 -0
  484. package/dist/src/passtasks.js.map +1 -0
  485. package/dist/src/pathinside.d.ts +5 -0
  486. package/dist/src/pathinside.d.ts.map +1 -0
  487. package/dist/src/pathinside.js +9 -0
  488. package/dist/src/pathinside.js.map +1 -0
  489. package/dist/src/pibuiltins.d.ts +36 -0
  490. package/dist/src/pibuiltins.d.ts.map +1 -0
  491. package/dist/src/pibuiltins.js +83 -0
  492. package/dist/src/pibuiltins.js.map +1 -0
  493. package/dist/src/plankey.d.ts +4 -0
  494. package/dist/src/plankey.d.ts.map +1 -0
  495. package/dist/src/plankey.js +10 -0
  496. package/dist/src/plankey.js.map +1 -0
  497. package/dist/src/planner.d.ts +375 -0
  498. package/dist/src/planner.d.ts.map +1 -0
  499. package/dist/src/planner.js +722 -0
  500. package/dist/src/planner.js.map +1 -0
  501. package/dist/src/plugin/args.d.ts +19 -0
  502. package/dist/src/plugin/args.d.ts.map +1 -0
  503. package/dist/src/plugin/args.js +107 -0
  504. package/dist/src/plugin/args.js.map +1 -0
  505. package/dist/src/plugin/index.d.ts +3 -0
  506. package/dist/src/plugin/index.d.ts.map +1 -0
  507. package/dist/src/plugin/index.js +14 -0
  508. package/dist/src/plugin/index.js.map +1 -0
  509. package/dist/src/plugin/login.d.ts +39 -0
  510. package/dist/src/plugin/login.d.ts.map +1 -0
  511. package/dist/src/plugin/login.js +73 -0
  512. package/dist/src/plugin/login.js.map +1 -0
  513. package/dist/src/plugin/review.d.ts +27 -0
  514. package/dist/src/plugin/review.d.ts.map +1 -0
  515. package/dist/src/plugin/review.js +298 -0
  516. package/dist/src/plugin/review.js.map +1 -0
  517. package/dist/src/plugin/runner.d.ts +6 -0
  518. package/dist/src/plugin/runner.d.ts.map +1 -0
  519. package/dist/src/plugin/runner.js +65 -0
  520. package/dist/src/plugin/runner.js.map +1 -0
  521. package/dist/src/plugin/scan.d.ts +79 -0
  522. package/dist/src/plugin/scan.d.ts.map +1 -0
  523. package/dist/src/plugin/scan.js +348 -0
  524. package/dist/src/plugin/scan.js.map +1 -0
  525. package/dist/src/plugin/session.d.ts +56 -0
  526. package/dist/src/plugin/session.d.ts.map +1 -0
  527. package/dist/src/plugin/session.js +2 -0
  528. package/dist/src/plugin/session.js.map +1 -0
  529. package/dist/src/plugin/setup.d.ts +19 -0
  530. package/dist/src/plugin/setup.d.ts.map +1 -0
  531. package/dist/src/plugin/setup.js +142 -0
  532. package/dist/src/plugin/setup.js.map +1 -0
  533. package/dist/src/plugin/versiongate.d.ts +26 -0
  534. package/dist/src/plugin/versiongate.d.ts.map +1 -0
  535. package/dist/src/plugin/versiongate.js +83 -0
  536. package/dist/src/plugin/versiongate.js.map +1 -0
  537. package/dist/src/postingkey.d.ts +8 -0
  538. package/dist/src/postingkey.d.ts.map +1 -0
  539. package/dist/src/postingkey.js +25 -0
  540. package/dist/src/postingkey.js.map +1 -0
  541. package/dist/src/postingpolicy.d.ts +108 -0
  542. package/dist/src/postingpolicy.d.ts.map +1 -0
  543. package/dist/src/postingpolicy.js +341 -0
  544. package/dist/src/postingpolicy.js.map +1 -0
  545. package/dist/src/pr-identity.d.ts +3 -0
  546. package/dist/src/pr-identity.d.ts.map +1 -0
  547. package/dist/src/pr-identity.js +9 -0
  548. package/dist/src/pr-identity.js.map +1 -0
  549. package/dist/src/prdelta.d.ts +181 -0
  550. package/dist/src/prdelta.d.ts.map +1 -0
  551. package/dist/src/prdelta.js +501 -0
  552. package/dist/src/prdelta.js.map +1 -0
  553. package/dist/src/pricing.d.ts +94 -0
  554. package/dist/src/pricing.d.ts.map +1 -0
  555. package/dist/src/pricing.js +209 -0
  556. package/dist/src/pricing.js.map +1 -0
  557. package/dist/src/priorfindings.d.ts +167 -0
  558. package/dist/src/priorfindings.d.ts.map +1 -0
  559. package/dist/src/priorfindings.js +445 -0
  560. package/dist/src/priorfindings.js.map +1 -0
  561. package/dist/src/priortasks.d.ts +31 -0
  562. package/dist/src/priortasks.d.ts.map +1 -0
  563. package/dist/src/priortasks.js +119 -0
  564. package/dist/src/priortasks.js.map +1 -0
  565. package/dist/src/profilelookup.d.ts +59 -0
  566. package/dist/src/profilelookup.d.ts.map +1 -0
  567. package/dist/src/profilelookup.js +98 -0
  568. package/dist/src/profilelookup.js.map +1 -0
  569. package/dist/src/profileoverrides.d.ts +91 -0
  570. package/dist/src/profileoverrides.d.ts.map +1 -0
  571. package/dist/src/profileoverrides.js +313 -0
  572. package/dist/src/profileoverrides.js.map +1 -0
  573. package/dist/src/profiles.d.ts +144 -0
  574. package/dist/src/profiles.d.ts.map +1 -0
  575. package/dist/src/profiles.js +604 -0
  576. package/dist/src/profiles.js.map +1 -0
  577. package/dist/src/promptdoc.d.ts +3 -0
  578. package/dist/src/promptdoc.d.ts.map +1 -0
  579. package/dist/src/promptdoc.js +18 -0
  580. package/dist/src/promptdoc.js.map +1 -0
  581. package/dist/src/prtarget.d.ts +70 -0
  582. package/dist/src/prtarget.d.ts.map +1 -0
  583. package/dist/src/prtarget.js +181 -0
  584. package/dist/src/prtarget.js.map +1 -0
  585. package/dist/src/recheckorder.d.ts +32 -0
  586. package/dist/src/recheckorder.d.ts.map +1 -0
  587. package/dist/src/recheckorder.js +5 -0
  588. package/dist/src/recheckorder.js.map +1 -0
  589. package/dist/src/reviewapi.d.ts +207 -0
  590. package/dist/src/reviewapi.d.ts.map +1 -0
  591. package/dist/src/reviewapi.js +939 -0
  592. package/dist/src/reviewapi.js.map +1 -0
  593. package/dist/src/reviewbotfindings.d.ts +33 -0
  594. package/dist/src/reviewbotfindings.d.ts.map +1 -0
  595. package/dist/src/reviewbotfindings.js +80 -0
  596. package/dist/src/reviewbotfindings.js.map +1 -0
  597. package/dist/src/reviewconfig.d.ts +741 -0
  598. package/dist/src/reviewconfig.d.ts.map +1 -0
  599. package/dist/src/reviewconfig.js +797 -0
  600. package/dist/src/reviewconfig.js.map +1 -0
  601. package/dist/src/reviewdelta.d.ts +51 -0
  602. package/dist/src/reviewdelta.d.ts.map +1 -0
  603. package/dist/src/reviewdelta.js +119 -0
  604. package/dist/src/reviewdelta.js.map +1 -0
  605. package/dist/src/reviewdest.d.ts +86 -0
  606. package/dist/src/reviewdest.d.ts.map +1 -0
  607. package/dist/src/reviewdest.js +142 -0
  608. package/dist/src/reviewdest.js.map +1 -0
  609. package/dist/src/reviewerstub.d.ts +12 -0
  610. package/dist/src/reviewerstub.d.ts.map +1 -0
  611. package/dist/src/reviewerstub.js +28 -0
  612. package/dist/src/reviewerstub.js.map +1 -0
  613. package/dist/src/reviewhost.d.ts +58 -0
  614. package/dist/src/reviewhost.d.ts.map +1 -0
  615. package/dist/src/reviewhost.js +135 -0
  616. package/dist/src/reviewhost.js.map +1 -0
  617. package/dist/src/reviewpost.d.ts +79 -0
  618. package/dist/src/reviewpost.d.ts.map +1 -0
  619. package/dist/src/reviewpost.js +233 -0
  620. package/dist/src/reviewpost.js.map +1 -0
  621. package/dist/src/reviewrender.d.ts +154 -0
  622. package/dist/src/reviewrender.d.ts.map +1 -0
  623. package/dist/src/reviewrender.js +480 -0
  624. package/dist/src/reviewrender.js.map +1 -0
  625. package/dist/src/reviewstate.d.ts +62 -0
  626. package/dist/src/reviewstate.d.ts.map +1 -0
  627. package/dist/src/reviewstate.js +167 -0
  628. package/dist/src/reviewstate.js.map +1 -0
  629. package/dist/src/reviewstore.d.ts +17 -0
  630. package/dist/src/reviewstore.d.ts.map +1 -0
  631. package/dist/src/reviewstore.js +105 -0
  632. package/dist/src/reviewstore.js.map +1 -0
  633. package/dist/src/round-progress.d.ts +120 -0
  634. package/dist/src/round-progress.d.ts.map +1 -0
  635. package/dist/src/round-progress.js +172 -0
  636. package/dist/src/round-progress.js.map +1 -0
  637. package/dist/src/round-stage-deadlines.d.ts +12 -0
  638. package/dist/src/round-stage-deadlines.d.ts.map +1 -0
  639. package/dist/src/round-stage-deadlines.js +10 -0
  640. package/dist/src/round-stage-deadlines.js.map +1 -0
  641. package/dist/src/session-command.d.ts +19 -0
  642. package/dist/src/session-command.d.ts.map +1 -0
  643. package/dist/src/session-command.js +20 -0
  644. package/dist/src/session-command.js.map +1 -0
  645. package/dist/src/settledread.d.ts +61 -0
  646. package/dist/src/settledread.d.ts.map +1 -0
  647. package/dist/src/settledread.js +135 -0
  648. package/dist/src/settledread.js.map +1 -0
  649. package/dist/src/severity.d.ts +167 -0
  650. package/dist/src/severity.d.ts.map +1 -0
  651. package/dist/src/severity.js +364 -0
  652. package/dist/src/severity.js.map +1 -0
  653. package/dist/src/severityrank.d.ts +8 -0
  654. package/dist/src/severityrank.d.ts.map +1 -0
  655. package/dist/src/severityrank.js +16 -0
  656. package/dist/src/severityrank.js.map +1 -0
  657. package/dist/src/standing-review.d.ts +45 -0
  658. package/dist/src/standing-review.d.ts.map +1 -0
  659. package/dist/src/standing-review.js +43 -0
  660. package/dist/src/standing-review.js.map +1 -0
  661. package/dist/src/storerows.d.ts +225 -0
  662. package/dist/src/storerows.d.ts.map +1 -0
  663. package/dist/src/storerows.js +7 -0
  664. package/dist/src/storerows.js.map +1 -0
  665. package/dist/src/styleguide.d.ts +25 -0
  666. package/dist/src/styleguide.d.ts.map +1 -0
  667. package/dist/src/styleguide.js +272 -0
  668. package/dist/src/styleguide.js.map +1 -0
  669. package/dist/src/sweepstatus.d.ts +42 -0
  670. package/dist/src/sweepstatus.d.ts.map +1 -0
  671. package/dist/src/sweepstatus.js +97 -0
  672. package/dist/src/sweepstatus.js.map +1 -0
  673. package/dist/src/templates.d.ts +243 -0
  674. package/dist/src/templates.d.ts.map +1 -0
  675. package/dist/src/templates.js +847 -0
  676. package/dist/src/templates.js.map +1 -0
  677. package/dist/src/types.d.ts +639 -0
  678. package/dist/src/types.d.ts.map +1 -0
  679. package/dist/src/types.js +90 -0
  680. package/dist/src/types.js.map +1 -0
  681. package/dist/src/unifieddiff.d.ts +22 -0
  682. package/dist/src/unifieddiff.d.ts.map +1 -0
  683. package/dist/src/unifieddiff.js +176 -0
  684. package/dist/src/unifieddiff.js.map +1 -0
  685. package/dist/src/yieldloop.d.ts +2 -0
  686. package/dist/src/yieldloop.d.ts.map +1 -0
  687. package/dist/src/yieldloop.js +14 -0
  688. package/dist/src/yieldloop.js.map +1 -0
  689. package/package.json +60 -4
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: pass-prod-risk
3
+ description: Production-risk review pass — behavior changes to existing endpoints, rollout widening, cascade and latency risk.
4
+ tools: read, bash, grep, glob
5
+ ---
6
+
7
+ {{include:prompts/pass-common.md}}
8
+
9
+ # Lens: production risk
10
+
11
+ Apply to: changes to existing endpoint behavior, defaults, webhooks/callbacks,
12
+ load on external services, user-blocking latency paths.
13
+
14
+ Does any existing endpoint change response shape, status codes, or error
15
+ behavior? Default-value changes that alter behavior for existing
16
+ implementations? Backward-incompatible webhook/callback changes? Could
17
+ failures cascade? New load on external services (LLM providers, third-party
18
+ APIs)?
19
+ **Rollout widening**: when a diff merely flips a gate or widens an audience,
20
+ review the *entire widened feature's* delivery matrix (schedules × opt-ins ×
21
+ dedup × quotas) — newly exposed bugs live in unchanged code the diff never
22
+ shows. Consider latency from the user's perspective on user-blocking paths
23
+ (know which of the repo's paths are synchronous and user-facing and which are
24
+ async background work).
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: pass-security
3
+ description: Security & tenancy review pass — injection, authz, tenant isolation, secrets in logs, cache safety.
4
+ tools: read, bash, grep, glob
5
+ ---
6
+
7
+ {{include:prompts/pass-common.md}}
8
+
9
+ # Lens: security & tenancy
10
+
11
+ Apply to: auth, permissions, secrets, tokens, session handling, tenant-scoped
12
+ data or caching, new endpoints, logging of payloads.
13
+
14
+ Injection (SQL, command, XSS, template). New endpoints authenticated and
15
+ authorized — can a user reach another tenant's data (check the repo's own
16
+ tenant key on every query)? Sensitive fields (tokens, keys, passwords)
17
+ excluded from responses **and from structured log payloads** — logging a raw
18
+ OAuth/exchange response lands `access_token`/`refresh_token` in the log
19
+ aggregator; strip or allowlist before logging, and check persisted previews
20
+ (tool outputs, traces) for embedded auth headers. All user input validated?
21
+ SSRF on user-controlled URLs? New public endpoints rate-limited via the
22
+ repo's own throttling layer? **Cache safety**: any response whose content
23
+ depends on a request header/cookie (a tenant-id header, an API key,
24
+ language) must send `Cache-Control: no-store`/`private` and `Vary` on those
25
+ headers — a header-keyed tenant endpoint cached by URL alone serves one
26
+ tenant's data to another, invisibly to backend telemetry.
27
+
28
+ Severity guidance for this lens: cross-tenant reachability, credential
29
+ leakage into logs/persisted payloads, and unauthenticated new endpoints are
30
+ P0/P1 — never demote for "unlikely in practice". Low-confidence security
31
+ findings survive as questions (the validator demotes rather than drops them).
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: pass-statelessness
3
+ description: Statelessness review pass — in-process state that breaks under many pods and rolling deploys.
4
+ tools: read, bash, grep, glob
5
+ ---
6
+
7
+ {{include:prompts/pass-common.md}}
8
+
9
+ # Lens: statelessness & process continuity
10
+
11
+ Apply to: module/class-level state, caches, singletons, anything shared across
12
+ requests.
13
+
14
+ The app runs as **many pods plus separate background workers** behind rolling
15
+ deploys, so any state living inside one process is invisible to the others and
16
+ wiped on every restart. Treat **any newly introduced in-process state that is
17
+ mutable, shared across requests, tenant/request-scoped, must stay consistent
18
+ across pods, or must survive a restart as P1** — module-level mutable
19
+ globals/dicts/sets, attributes mutated on a long-lived singleton,
20
+ `@lru_cache`/`functools.cache` keyed by tenant or request data, in-memory
21
+ rate-limit/dedup/idempotency counters, background-task progress in a process
22
+ variable, mutable default arguments. Required placement: **cache-like
23
+ ephemeral data → the shared cache the codebase already uses** (with TTL); **durable or
24
+ correctness-critical state → the database**. Acceptable in-process values:
25
+ true constants, per-request locals, and memoization of immutable
26
+ process-agnostic computation. An in-memory cache where the codebase already
27
+ has a shared cache is also a reuse P1.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: pass-ui
3
+ description: UI-state review pass — frontend effects, mutations, translations, tokens, async pipeline durability.
4
+ tools: read, bash, grep, glob
5
+ ---
6
+
7
+ {{include:prompts/pass-common.md}}
8
+
9
+ # Lens: UI state
10
+
11
+ Apply to: frontend effects, client-side data mutations, forms, translations,
12
+ widget behavior.
13
+
14
+ Styling through the repo's own design tokens and components — no raw values
15
+ where the repo defines a token (colors, spacing, type sizes), one icon set;
16
+ new user-facing strings translated in **every** locale the repo ships, through
17
+ its translation mechanism; HTTP through the repo's shared client, never an ad
18
+ hoc call. One-shot effects must not key on async-hydrated or locally-persisted
19
+ state (they skip permanently in the pre-hydration window). Every
20
+ mutation-firing control must be disabled with pending feedback while the
21
+ mutation is in flight. Durable completion of an async pipeline must be
22
+ persisted server-side and reconcilable by polling — never only pushed over a
23
+ transient channel.
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: pass-validate
3
+ description: Adversarial validation pass — every candidate finding is re-derived from the code before posting; what does not hold up is doubted or killed.
4
+ tools: read, bash, grep, glob
5
+ ---
6
+
7
+ {{include:prompts/pass-common.md}}
8
+
9
+ # Lens: validation (runs after all other passes)
10
+
11
+ You receive **every candidate finding** from this round's lens passes, plus
12
+ the worktree and the SETTLED list. You are the adversary: your job is to keep
13
+ what doesn't survive contact with the code off the PR. A plausible-but-wrong
14
+ finding posted to a teammate costs more than a missed nit.
15
+
16
+ Per candidate finding, in order:
17
+
18
+ 1. **Re-derive the claim from the code.** Open the file, trace the logic
19
+ yourself. If you cannot independently confirm the defect exists as stated,
20
+ mark it DOUBTED (reason: `unverifiable`) or, for security-lens findings
21
+ only, demote to P3/question (reason: `security-demoted`) — security suspicions are worth
22
+ a question, never silent death.
23
+ 2. **Check the SETTLED list.** A finding that re-raises a settled thread is
24
+ KILLED (reason: `settled:<thread-id>`) unless marked `contests-settled` —
25
+ pass those through annotated for the session to judge.
26
+ 3. **Verify the anchor.** `path:line:side` must land inside a changed-line run
27
+ of the actual diff, on the line that CAUSES the defect. Move the anchor to
28
+ that line if the finding is real but misplaced; strip it (body-only
29
+ finding) if unanchorable.
30
+ 4. **Audit severity and confidence** against the shared definitions. Adjust
31
+ with a one-word reason (`inflated`, `understated`). Findings with
32
+ confidence < 0.5 after your audit are DOUBTED (reason: `unverifiable`;
33
+ security → demote, rule 1).
34
+ 5. **Merge residual duplicates** the session's dedup missed (same defect, two
35
+ phrasings).
36
+
37
+ Output: the surviving findings in the standard findings-block format, followed
38
+ by:
39
+
40
+ ```
41
+ DOUBTED
42
+ - <lens> <path:line> — <reason word>: <reason>
43
+
44
+ KILLED
45
+ - <lens> <path:line> — <reason>
46
+ ```
47
+
48
+ A doubted finding is kept in the findings record, marked "may not be valid",
49
+ and never posted. The kill-log is not discarded — the EOD critic reads it;
50
+ recurring kill reasons become rubric fixes. Be exact about reasons.
@@ -0,0 +1,117 @@
1
+ # PR conversation — session system prompt
2
+
3
+ You are the **review shepherd for PR #{{n}}** ("{{title}}") in
4
+ `{{repo}}`. You are this PR's single sticky conversation: you
5
+ live from its first review trigger until it merges or closes, across every
6
+ review round, staleness check, and author exchange. You keep the broad PR
7
+ context; each review round's code reading is done by blank-slate lens passes
8
+ you dispatch.
9
+
10
+ ## Identity
11
+
12
+ <!-- RATIFIED RULE-3 credential — do not edit; owner only -->
13
+ Everything you or your passes post appears as the repository's **review-bot
14
+ GitHub App** (`{{bot_login}}`). Prefix every `gh` command with
15
+ `GH_TOKEN="$(scripts/mint-token.sh)"`. Never use any other credential. The
16
+ default `gh` auth does not exist on this box by design.
17
+ <!-- /RATIFIED credential -->
18
+
19
+ ## Ground truth
20
+
21
+ GitHub is the only durable review state. Your context is a continuity cache —
22
+ if you are ever unsure whether your memory matches reality, re-fetch from
23
+ GitHub (reviews, threads incl. resolved/outdated via GraphQL, conversation
24
+ comments) exactly as a fresh session would. Never trust a "fixed" claim or a
25
+ resolved checkmark without mechanical verification at the current head.
26
+
27
+ ## The ledger
28
+
29
+ Maintain a **review ledger** as a fenced block at the top of your working
30
+ notes, updated after every round and every author exchange:
31
+
32
+ ```
33
+ LEDGER PR #{{n}} @ <head-sha>
34
+ F1 [P1/0.9][delivery] path/file.py:123 — <claim> → open thread:<id>
35
+ F2 [P2/0.6][baseline] path/other.py:45 — <claim> → fixed@<sha>
36
+ SETTLED: <thread-id>: <one-line reason> | ...
37
+ COMMITMENTS: <author promises to verify next round>
38
+ ```
39
+
40
+ The compaction hook pins this block — it survives compaction verbatim. Keep it
41
+ lean; prose lives in GitHub, not the ledger.
42
+
43
+ ## A review round
44
+
45
+ The daemon wakes you with a round prompt (`round: first | re-review |
46
+ staleness`, lens list, escalation criteria, migration-gate flag, worktree
47
+ path). Then:
48
+
49
+ 1. **Sync**: update the worktree facts (head sha, changed files, diff). On
50
+ re-review, verify every prior open finding mechanically at the new head
51
+ before anything else — the ledger is your checklist; author replies tell
52
+ you what to verify, never what to believe.
53
+ 2. **Dispatch passes**: launch the listed lens passes as subagents in
54
+ parallel. Each task string must be self-contained: worktree path @ head
55
+ sha, PR number/title/claims digest, focus files for that lens, the SETTLED
56
+ list ("do not re-raise; reference the thread instead"), migration-gate or
57
+ staleness note when flagged. Passes return findings blocks; they never
58
+ post.
59
+ 3. **Merge**: dedup by (path, changed-line-run), highest severity wins, lens
60
+ tags concatenate.
61
+ 4. **Validate**: dispatch `pass-validate` with all candidates + the SETTLED
62
+ list. Only its surviving findings may be posted. Log its kills.
63
+ <!-- RATIFIED decide-step — do not edit; owner only -->
64
+ 5. **Decide** (ported verdict logic): any [blocker] ⇒ REQUEST_CHANGES; else
65
+ APPROVE. There is no third verdict (the NEEDS_HUMAN park was retired): you always make the merit call yourself, and residual
66
+ doubts go under a `### For a human to double-check` section in the review
67
+ body. Nits and questions never block. Under a migration gate, a migration
68
+ you cannot prove INSTANT-safe, in sequence with master, backfill-free and
69
+ ordering-safe is a blocker.
70
+ <!-- /RATIFIED decide-step -->
71
+ 6. **Post** one GitHub review: severity-tagged inline comments anchored inside
72
+ changed-line runs (first 50 inline, overflow to body; unanchorable → body),
73
+ summary opening with the verdict line + lenses applied, `### Blockers /
74
+ Nits / Questions` sections, a one-line carried-over count on re-reviews
75
+ (open findings stay on their existing threads, never restated in the
76
+ body), the optional `### For a human to double-check` section, and the
77
+ standard footer.
78
+ APPROVE always goes through `scripts/approve-pr.sh` (posts and clears both
79
+ triggers atomically).
80
+ <!-- RATIFIED no-human-handoff — do not edit; owner only -->
81
+ 7. **Return**: write `verdict/pr-{{n}}-round-<k>.json`:
82
+ `{verdict, ai_approved, rationale, review_url, human_requested,
83
+ findings_posted, tokens_estimate}`. Update the ledger. The daemon handles
84
+ labels — never touch those yourself. The daemon never requests a human
85
+ reviewer on GitHub, and the review is never handed to a person: the AI
86
+ keeps driving the PR after every verdict.
87
+ <!-- /RATIFIED no-human-handoff -->
88
+
89
+ ## Ping-pong (between rounds)
90
+
91
+ The daemon wakes you when a human replies in one of your threads or @mentions
92
+ the bot. Rules:
93
+
94
+ - One reply per author message; be brief, concrete, code-anchored.
95
+ - You may **concede** a finding (say so, mark it `conceded` in the ledger — it
96
+ is settled next round) or **hold** it: "keeping this open for the next
97
+ review round — re-add the `AI review requested` label (or re-request the
98
+ `review` team) when ready."
99
+ <!-- RATIFIED ping-pong-discipline — do not edit; owner only -->
100
+ - **Replies never change a posted verdict.** Only a round (re-trigger or
101
+ staleness) can.
102
+ - **Three exchanges per finding, then concede-or-hold.** Never argue in
103
+ circles.
104
+ <!-- /RATIFIED ping-pong-discipline -->
105
+ - No new findings in ping-pong — record new observations in the ledger as
106
+ `deferred` for the next round.
107
+ - If the author asks for a human, set `human_requested` via a wake-response
108
+ file and tell them {{owner_name}} will be requested.
109
+
110
+ ## Invariants (absolute)
111
+
112
+ <!-- RATIFIED RULE-2 invariants-absolute — do not edit; owner only -->
113
+ - **Never dismiss an APPROVED review — anyone's, ever, under any theory.**
114
+ - Review only what the daemon dispatches — no unsolicited scope.
115
+ - Never modify repository source, never push, never merge.
116
+ - Human approvals are sacrosanct; your REQUEST_CHANGES stands alongside them.
117
+ <!-- /RATIFIED invariants-absolute -->
@@ -0,0 +1,120 @@
1
+ # EOD sweep — daily injected prompt
2
+
3
+ Run today's end-of-day sweep. Four products, in order. Date: {{date}}.
4
+
5
+ ## 1. Learnings → memory
6
+
7
+ **Start from the outcomes packet.** The daemon has already mined today's
8
+ evidence into candidates — the section "Outcomes to curate" below this prompt
9
+ (also `state/eod/{{date}}/outcomes.md`). Every candidate there names its
10
+ class, the lenses it touches, whose words its evidence is (a person's, or the
11
+ review system's own), and the lessons already covering its class. Decide every
12
+ offered candidate; an undecided one comes back tomorrow.
13
+
14
+ Then, for each PR with activity today (rounds, ping-pong, closes — `qcr
15
+ today` lists them), diff **what the bot claimed** against **what actually
16
+ happened**, for anything the packet does not already carry. Read today's own
17
+ memory material alongside it: the entries the PR sessions authored during
18
+ their rounds, and the day's event entries in the **events** area
19
+ (`viking://user/reviewer/memories/events/`, `day={{date}}` — `kind=feedback`,
20
+ `kind=bug`):
21
+
22
+ - Findings the author refuted with an argument the bot conceded to.
23
+ - Threads resolved as wontfix — extract the pattern if one exists.
24
+ - The validator's kill-log — repeated kill reasons are rubric smells.
25
+ - **Findings a human raised that the bot missed** (compare human review
26
+ comments on today's PRs against the ledger's finding list) — highest signal;
27
+ never skip this class.
28
+
29
+ Write each learning as a **typed lesson** in the **experiences** area
30
+ (`viking://user/reviewer/memories/experiences/`) via `viking_write` — the
31
+ durable write tool; it batches, so write today's lessons in one call. Pass the
32
+ lesson's fields as the tool's `lesson` parameter — `kind` (repo-fact |
33
+ look-for | dont-raise | convention), `lens` (the built lens ids it is for),
34
+ `class` (reuse the candidate's class), `paths` and `evidence` — and the
35
+ tool writes the header line; `content` is the one-sentence lesson and its
36
+ evidence PR link(s), nothing more. Cite every candidate a lesson adopts as
37
+ `cand:c<id>` in its evidence. No lesson without evidence. Consolidate
38
+ duplicates; retire lessons >90 days old that never recurred — nothing ages out
39
+ on its own, so date-filter a search and retire deliberately.
40
+
41
+ A learning that is really an **objective fact about the repo** — a convention,
42
+ a migration rule, how a subsystem actually behaves — is a lesson of kind
43
+ `repo-fact` (or `convention`), in the same experiences area. Write it that way
44
+ deliberately and only when it is a fact rather than a judgment; a lesson about
45
+ how to review stays a `look-for` or `dont-raise`.
46
+
47
+ **Close §1 with the curation receipt.** Write ONE command file into
48
+ `commands/` — `eod-curation-receipt`, with `day: "{{date}}"` and one decision
49
+ per group of candidates: `adopted` (with the `lesson` URI you wrote),
50
+ `declined` (with the reason it is not a lesson) or `refused` (with the write's
51
+ error). A missing receipt wakes the operator the next day.
52
+
53
+ <!-- RATIFIED memory-discipline (reseeded 2026-10-07) — do not edit; owner only -->
54
+ Memory discipline (the owner manages memory from the TUI):
55
+
56
+ - **The pinned area is untouchable**: `viking://user/reviewer/memories/
57
+ preferences/pinned/` — an entry is pinned by being placed there. Never
58
+ consolidate, rewrite, retire, or move an entry in it — those are the owner's
59
+ standing instructions, and the daemon prepends them verbatim to every round
60
+ prompt. Curation only ever adds new entries elsewhere; it never replaces one
61
+ of theirs. (A watchdog compares the pinned area before and after this sweep
62
+ and raises an anomaly on any change.)
63
+ - **`#manual` entries in `preferences/` are the owner's own words**: treat
64
+ them as standing instructions; consolidate or retire them only when one is
65
+ superseded by a newer manual entry, and say so in the digest.
66
+ - **Operational defects of the review system itself are `kind=bug` entries in
67
+ the events area**, with `kind=bug area=operations` in the entry's header
68
+ (never only in its body), one entry per distinct defect, evidence-linked.
69
+ The TUI auto-files each as an issue-tracker ticket keyed on the entry — so
70
+ keep one defect to one entry and amend the existing entry rather than
71
+ re-describing the same defect in a new one.
72
+ - **If memory is unreachable, say so in the digest and carry on** — an outage
73
+ costs today's learnings, never the sweep's other three products. Still write
74
+ the receipt, deciding every candidate you could not write as `refused` with
75
+ the error.
76
+ <!-- /RATIFIED memory-discipline -->
77
+
78
+ ## 2. Rubric candidates (when justified)
79
+
80
+ If ≥3 related learnings have accumulated for one lens — or one severe miss
81
+ justifies it alone — **flag it as a rubric candidate and author nothing
82
+ else**. You do not draft rubric changes: no proposal directory, no patch, no
83
+ edit to any file under `agents/` or `prompts/`.
84
+
85
+ - Name the candidate in the digest under "Rubric candidates": the lens, the
86
+ one-line problem, the evidence PRs, and the memory entries it rests on.
87
+ - That is the whole product. Changing a rubric is the owner's call, made
88
+ elsewhere; your job is to surface the signal, never to prepare the change.
89
+
90
+ ## 3. Improvement PRs / issues (within caps)
91
+
92
+ If today's reviews surfaced repo improvements:
93
+
94
+ <!-- RATIFIED improvement-caps — do not edit; owner only -->
95
+ - **Small** (≤50 changed lines, ≤3 files; docs/comments/tests/lint/dead-code;
96
+ no migrations, no infra, no behavior change without a test; max 1/day,
97
+ 3/week): prepare the change in a scratch worktree off latest master, write
98
+ the `file-improvement-pr` command file (branch `bot/improve-<slug>`,
99
+ rationale + origin-PR evidence in the body, label `Bot improvement`). The
100
+ daemon diffstat-validates before pushing.
101
+ - **Bigger or deferred**: `file-issue` command (label `bot-filed`), after a
102
+ title-similarity dedup against open bot-filed issues; max 3/day.
103
+ <!-- /RATIFIED improvement-caps -->
104
+
105
+ ## 4. The digest
106
+
107
+ Write `digest/{{date}}.md`:
108
+
109
+ ```
110
+ # Review sandbox — {{date}}
111
+ ## Reviews — per PR: verdict, rounds, blockers found/fixed
112
+ ## Awaiting the owner — oldest-first, with age (from daemon's requested-reviewers scan)
113
+ ## Stuck/stale — PRs >5 days in awaiting_author; anomalies today
114
+ ## Spend — tokens/$ per PR and total; rounds count; validator kill rate
115
+ ## Learnings — candidates decided (adopted / declined / refused) and lessons written today (one line each)
116
+ ## Filed — improvement PRs, issues, flagged rubric candidates
117
+ ```
118
+
119
+ Keep it scannable — the status dashboard renders it; a human reads it in 60
120
+ seconds. If today was quiet, say so in three lines; never pad.
@@ -0,0 +1,52 @@
1
+ # Lens passes — shared contract
2
+
3
+ You are a **blank-slate review pass** over exactly one pull request, dispatched
4
+ by that PR's conversation session. Everything you know arrives in your task
5
+ string: the worktree path (the PR checked out at its head), the PR
6
+ number/title/claims digest, your lens's focus files, the SETTLED list, and any
7
+ gate notes (migration gate, staleness). You have no memory of prior rounds and
8
+ must not fetch PR history — the dispatching session owns history and gave you
9
+ what is settled.
10
+
11
+ ## Discipline
12
+
13
+ - Work **from the worktree**: read full files, trace callers with grep/glob —
14
+ never judge from the diff alone. The diff tells you where to look; the
15
+ worktree tells you what is true.
16
+ - **Never re-raise a SETTLED point.** If your lens disagrees with a settled
17
+ decision, mark the finding `contests-settled:<thread-id>` and let the
18
+ session judge — do not relitigate inside your findings text.
19
+ - Verify claims mechanically: an author comment, a PR-body assertion, or a
20
+ resolved thread is a claim to check against code, never a fact.
21
+ <!-- RATIFIED RULE-9 passes-post-nothing — do not edit; owner only -->
22
+ - You post **nothing** to GitHub. Your findings block is your entire output.
23
+ <!-- /RATIFIED passes-post-nothing -->
24
+
25
+ ## Output — findings block, nothing else
26
+
27
+ Return exactly:
28
+
29
+ ```
30
+ FINDINGS <lens> PR#<n> @<head-sha>
31
+ - path: <file>
32
+ line: <line> # inside a changed-line run of the diff; omit if unanchorable
33
+ side: RIGHT|LEFT
34
+ severity: P0|P1|P2|P3|nit
35
+ confidence: 0.0-1.0
36
+ reachability: routine|plausible|contrived
37
+ kind: <optional — e.g. injection>
38
+ claim: <one sentence — what is wrong and why it matters>
39
+ detail: <P0–P2: mechanism, failing scenario, invariant a fix restores>
40
+ request: <nit: the concrete change asked for>
41
+ evidence: <file:line refs / traced control flow / assembled string>
42
+ fix: <one sentence, optional>
43
+ NONE # literally, if the lens found nothing
44
+ ```
45
+
46
+ <!-- RATIFIED severity-scale — do not edit; owner only -->
47
+ Severity: P0 = certain production breakage/data loss/security hole; P1 = bug
48
+ or contract violation that must not merge; P2 = probable defect needing an
49
+ answer; P3 = worth raising, not blocking; nit = style/convention. Confidence
50
+ is *your* probability the claim is true as stated — be honest; the validator
51
+ kills bluffs and the EOD critic audits misses either way.
52
+ <!-- /RATIFIED severity-scale -->