@1aboveio/skills 0.10.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 (397) hide show
  1. package/LICENSE +3 -0
  2. package/README.md +90 -0
  3. package/bin/1aboveio-skills.mjs +18 -0
  4. package/package.json +28 -0
  5. package/runtime/skills/distribution/generated/recipes.json +1189 -0
  6. package/runtime/skills/distribution/scripts/bundles.mjs +280 -0
  7. package/runtime/skills/engineering/engineering-runtime/scripts/main-module.mjs +80 -0
  8. package/skills/backend/airflow-dag-develop/LICENSE +3 -0
  9. package/skills/backend/airflow-dag-develop/SKILL.md +111 -0
  10. package/skills/backend/app-debug/LICENSE +3 -0
  11. package/skills/backend/app-debug/SKILL.md +109 -0
  12. package/skills/backend/app-debug/references/common-errors.md +128 -0
  13. package/skills/backend/python-backend/LICENSE +3 -0
  14. package/skills/backend/python-backend/SKILL.md +326 -0
  15. package/skills/cicd-pipeline/cloud-build/LICENSE +3 -0
  16. package/skills/cicd-pipeline/cloud-build/SKILL.md +707 -0
  17. package/skills/cicd-pipeline/cloud-debug/LICENSE +3 -0
  18. package/skills/cicd-pipeline/cloud-debug/SKILL.md +316 -0
  19. package/skills/cicd-pipeline/cloud-debug/references/build-failures.md +238 -0
  20. package/skills/cicd-pipeline/cloud-debug/references/deploy-failures.md +376 -0
  21. package/skills/cicd-pipeline/cloud-debug/references/pipeline-failures.md +378 -0
  22. package/skills/cicd-pipeline/cloud-deploy/LICENSE +3 -0
  23. package/skills/cicd-pipeline/cloud-deploy/SKILL.md +229 -0
  24. package/skills/cicd-pipeline/cloud-deploy/references/config-templates.md +257 -0
  25. package/skills/cicd-pipeline/docker/LICENSE +3 -0
  26. package/skills/cicd-pipeline/docker/SKILL.md +126 -0
  27. package/skills/cicd-pipeline/google-cloud/LICENSE +3 -0
  28. package/skills/cicd-pipeline/google-cloud/SKILL.md +118 -0
  29. package/skills/cicd-pipeline/google-cloud/references/gcs.md +469 -0
  30. package/skills/cicd-pipeline/google-cloud/references/iam.md +451 -0
  31. package/skills/cicd-pipeline/google-cloud/references/project.md +349 -0
  32. package/skills/cicd-pipeline/google-cloud/references/secrets.md +336 -0
  33. package/skills/cicd-pipeline/google-cloud/references/vpc.md +312 -0
  34. package/skills/cicd-pipeline/google-cloud/scripts/create-sa.sh +36 -0
  35. package/skills/cicd-pipeline/google-cloud/scripts/gcp-config.sh +31 -0
  36. package/skills/cicd-pipeline/google-cloud/scripts/grant-iap.sh +41 -0
  37. package/skills/cicd-pipeline/google-cloud/scripts/setup-secrets.sh +48 -0
  38. package/skills/cicd-pipeline/mergify/LICENSE +3 -0
  39. package/skills/cicd-pipeline/mergify/SKILL.md +138 -0
  40. package/skills/cicd-pipeline/mergify/assets/templates/mergify.yml +237 -0
  41. package/skills/cicd-pipeline/mergify/assets/templates/ruleset.json +46 -0
  42. package/skills/cicd-pipeline/mergify/references/branch-protection.md +277 -0
  43. package/skills/cicd-pipeline/mergify/references/configuration.md +183 -0
  44. package/skills/cicd-pipeline/mergify/references/diagnosis.md +73 -0
  45. package/skills/cicd-pipeline/mergify/references/traps.md +78 -0
  46. package/skills/cicd-pipeline/mergify/references/watch-contract.md +218 -0
  47. package/skills/cicd-pipeline/mergify/scripts/audit-core.mjs +131 -0
  48. package/skills/cicd-pipeline/mergify/scripts/audit.mjs +4 -0
  49. package/skills/cicd-pipeline/mergify/scripts/watch-pr-delivery-core.mjs +663 -0
  50. package/skills/cicd-pipeline/mergify/scripts/watch-pr-delivery.mjs +4 -0
  51. package/skills/cicd-pipeline/podman/LICENSE +3 -0
  52. package/skills/cicd-pipeline/podman/SKILL.md +70 -0
  53. package/skills/cicd-pipeline/podman/agents/openai.yaml +4 -0
  54. package/skills/cicd-pipeline/podman/assets/templates/podman-compose-socket-directory.yml +6 -0
  55. package/skills/cicd-pipeline/podman/assets/templates/podman-service-override.conf +3 -0
  56. package/skills/cicd-pipeline/podman/references/compose-compatibility.md +70 -0
  57. package/skills/cicd-pipeline/podman/references/networking-and-ports.md +74 -0
  58. package/skills/cicd-pipeline/podman/references/rootless-services-and-sockets.md +156 -0
  59. package/skills/cicd-pipeline/podman/references/troubleshooting.md +98 -0
  60. package/skills/engineering/e2e-test/LICENSE +3 -0
  61. package/skills/engineering/e2e-test/SKILL.md +156 -0
  62. package/skills/engineering/e2e-test/assets/ci-gates.cloudbuild.yaml +272 -0
  63. package/skills/engineering/e2e-test/assets/ci-gates.github.yml +451 -0
  64. package/skills/engineering/e2e-test/assets/e2e-workflow.yml +282 -0
  65. package/skills/engineering/e2e-test/references/authoring/auth-flows.md +159 -0
  66. package/skills/engineering/e2e-test/references/authoring/playwright-config.md +71 -0
  67. package/skills/engineering/e2e-test/references/authoring/playwright-patterns.md +219 -0
  68. package/skills/engineering/e2e-test/references/authoring/test-skipping.md +44 -0
  69. package/skills/engineering/e2e-test/references/ci-integration.md +121 -0
  70. package/skills/engineering/e2e-test/references/ci-playwright-container.md +280 -0
  71. package/skills/engineering/e2e-test/references/debugging.md +36 -0
  72. package/skills/engineering/e2e-test/references/presentation-sweep.md +131 -0
  73. package/skills/engineering/e2e-test/references/reviewing.md +39 -0
  74. package/skills/engineering/e2e-test/references/route-discovery.md +50 -0
  75. package/skills/engineering/e2e-test/references/route-manifest.md +44 -0
  76. package/skills/engineering/e2e-test/scripts/detect-routes-fastapi.py +290 -0
  77. package/skills/engineering/e2e-test/scripts/detect-routes-nextjs.mjs +200 -0
  78. package/skills/engineering/e2e-test/scripts/post-visual-evidence.mjs +158 -0
  79. package/skills/engineering/e2e-test/scripts/presentation-checks.mjs +171 -0
  80. package/skills/engineering/e2e-test/scripts/presentation-perceivability.mjs +179 -0
  81. package/skills/engineering/e2e-test/scripts/presentation-reachability.mjs +154 -0
  82. package/skills/engineering/e2e-test/scripts/presentation-render-health.mjs +141 -0
  83. package/skills/engineering/e2e-test/scripts/presentation-sweep.mjs +148 -0
  84. package/skills/engineering/e2e-test/scripts/presentation-temporal.mjs +127 -0
  85. package/skills/engineering/e2e-test/scripts/presentation-visual.mjs +84 -0
  86. package/skills/engineering/e2e-test/scripts/project-route-manifest.mjs +75 -0
  87. package/skills/engineering/e2e-test/scripts/validate-manifest.mjs +106 -0
  88. package/skills/engineering/engineering-runtime/LICENSE +3 -0
  89. package/skills/engineering/engineering-runtime/SKILL.md +10 -0
  90. package/skills/engineering/engineering-runtime/agents/openai.yaml +6 -0
  91. package/skills/engineering/engineering-runtime/coherence/workflow.json +553 -0
  92. package/skills/engineering/engineering-runtime/scripts/exact-head-artifact.mjs +131 -0
  93. package/skills/engineering/engineering-runtime/scripts/head-check-set.mjs +398 -0
  94. package/skills/engineering/engineering-runtime/scripts/main-module.mjs +80 -0
  95. package/skills/engineering/engineering-runtime/scripts/mergify-yaml.mjs +11 -0
  96. package/skills/engineering/engineering-runtime/scripts/package-lock.json +43 -0
  97. package/skills/engineering/engineering-runtime/scripts/package.json +10 -0
  98. package/skills/engineering/engineering-runtime/scripts/required-check-plan.mjs +223 -0
  99. package/skills/engineering/engineering-runtime/scripts/workflow-coherence.mjs +576 -0
  100. package/skills/engineering/engineering-runtime/scripts/workflow-policy.mjs +166 -0
  101. package/skills/engineering/ensure-coverage/LICENSE +3 -0
  102. package/skills/engineering/ensure-coverage/SKILL.md +136 -0
  103. package/skills/engineering/ensure-coverage/evals/evals.json +125 -0
  104. package/skills/engineering/ensure-coverage/references/breadth/coverage-ledger.md +91 -0
  105. package/skills/engineering/ensure-coverage/references/breadth/inventory-contract.md +83 -0
  106. package/skills/engineering/ensure-coverage/references/breadth/surface-baseline.md +44 -0
  107. package/skills/engineering/ensure-coverage/references/breadth/surface-discovery.md +16 -0
  108. package/skills/engineering/ensure-coverage/references/depth/characterization.md +68 -0
  109. package/skills/engineering/ensure-coverage/references/depth/coverage.config.example.json +25 -0
  110. package/skills/engineering/ensure-coverage/references/depth/grading.md +35 -0
  111. package/skills/engineering/ensure-coverage/references/depth/mock-policy.md +87 -0
  112. package/skills/engineering/ensure-coverage/references/depth/test-smells.md +23 -0
  113. package/skills/engineering/ensure-coverage/references/enforcement/ci-contract.md +164 -0
  114. package/skills/engineering/ensure-coverage/references/enforcement/hooks.md +85 -0
  115. package/skills/engineering/ensure-coverage/references/examples/coverage-ledger.md +109 -0
  116. package/skills/engineering/ensure-coverage/references/examples/refund-flow.md +33 -0
  117. package/skills/engineering/ensure-coverage/references/presentation/axis.md +78 -0
  118. package/skills/engineering/ensure-coverage/references/presentation/runner-contract.md +74 -0
  119. package/skills/engineering/ensure-coverage/references/process/audit-mode.md +33 -0
  120. package/skills/engineering/ensure-coverage/references/process/output-template.md +139 -0
  121. package/skills/engineering/ensure-coverage/references/process/review-contract-template.md +119 -0
  122. package/skills/engineering/ensure-coverage/references/process/scope-class.md +178 -0
  123. package/skills/engineering/ensure-coverage/references/process/test-strategy.md +55 -0
  124. package/skills/engineering/ensure-coverage/schemas/coverage-config.schema.json +45 -0
  125. package/skills/engineering/ensure-coverage/schemas/coverage-file.schema.json +93 -0
  126. package/skills/engineering/ensure-coverage/scripts/adapters/nextjs-inventory.mjs +178 -0
  127. package/skills/engineering/ensure-coverage/scripts/check-quarantine-expiry.mjs +101 -0
  128. package/skills/engineering/ensure-coverage/scripts/ci-audit.mjs +358 -0
  129. package/skills/engineering/ensure-coverage/scripts/coverage-checklist.mjs +494 -0
  130. package/skills/engineering/ensure-coverage/scripts/coverage-ledger.mjs +663 -0
  131. package/skills/engineering/ensure-coverage/scripts/design-parity.mjs +591 -0
  132. package/skills/engineering/ensure-coverage/scripts/evidence-block.mjs +367 -0
  133. package/skills/engineering/ensure-coverage/scripts/lint-tests.mjs +269 -0
  134. package/skills/engineering/ensure-coverage/scripts/mock-policy-config.mjs +176 -0
  135. package/skills/engineering/ensure-coverage/scripts/package-lock.json +76 -0
  136. package/skills/engineering/ensure-coverage/scripts/package.json +19 -0
  137. package/skills/engineering/ensure-coverage/scripts/scope-class.mjs +554 -0
  138. package/skills/engineering/harness-runtime/LICENSE +3 -0
  139. package/skills/engineering/harness-runtime/SKILL.md +18 -0
  140. package/skills/engineering/harness-runtime/agents/openai.yaml +6 -0
  141. package/skills/engineering/harness-runtime/bin/discover-models.mjs +4 -0
  142. package/skills/engineering/harness-runtime/bin/model-catalog.mjs +4 -0
  143. package/skills/engineering/harness-runtime/contracts.md +15 -0
  144. package/skills/engineering/harness-runtime/discover-models.mjs +392 -0
  145. package/skills/engineering/harness-runtime/fixtures/native-question-schemas.json +33 -0
  146. package/skills/engineering/harness-runtime/fixtures/question-responses.json +54 -0
  147. package/skills/engineering/harness-runtime/index.mjs +767 -0
  148. package/skills/engineering/harness-runtime/model-catalog.mjs +787 -0
  149. package/skills/engineering/harness-runtime/native-question-contracts.md +37 -0
  150. package/skills/engineering/harness-runtime/references/model-catalog-seed.json +159 -0
  151. package/skills/engineering/harness-runtime/references/model-catalog.md +57 -0
  152. package/skills/engineering/implement-and-pr/LICENSE +3 -0
  153. package/skills/engineering/implement-and-pr/SKILL.md +176 -0
  154. package/skills/engineering/implement-and-pr/references/ci-iteration.md +10 -0
  155. package/skills/engineering/implement-and-pr/references/closeout.md +27 -0
  156. package/skills/engineering/implement-and-pr/references/contract-complete-fix-rounds.md +34 -0
  157. package/skills/engineering/implement-and-pr/references/evidence-rules.md +39 -0
  158. package/skills/engineering/implement-and-pr/references/incremental-plan.md +16 -0
  159. package/skills/engineering/implement-and-pr/references/self-review.md +23 -0
  160. package/skills/engineering/implement-and-pr/references/tdd-mode.md +18 -0
  161. package/skills/engineering/resolve-issues/LICENSE +3 -0
  162. package/skills/engineering/resolve-issues/SKILL.md +167 -0
  163. package/skills/engineering/resolve-issues/generated/workflow-repair-policy.json +448 -0
  164. package/skills/engineering/resolve-issues/references/breaker.md +82 -0
  165. package/skills/engineering/resolve-issues/references/deliverables.md +27 -0
  166. package/skills/engineering/resolve-issues/references/delivery.md +108 -0
  167. package/skills/engineering/resolve-issues/references/evidence-lane.md +21 -0
  168. package/skills/engineering/resolve-issues/references/exact-head-ci.md +287 -0
  169. package/skills/engineering/resolve-issues/references/fan-out.md +33 -0
  170. package/skills/engineering/resolve-issues/references/finalization.md +68 -0
  171. package/skills/engineering/resolve-issues/references/guarantees.md +10 -0
  172. package/skills/engineering/resolve-issues/references/high-risk.md +29 -0
  173. package/skills/engineering/resolve-issues/references/incidents/848/README.md +156 -0
  174. package/skills/engineering/resolve-issues/references/intake.md +86 -0
  175. package/skills/engineering/resolve-issues/references/integration-gate.md +53 -0
  176. package/skills/engineering/resolve-issues/references/interference.md +87 -0
  177. package/skills/engineering/resolve-issues/references/loop.md +134 -0
  178. package/skills/engineering/resolve-issues/references/model-catalog.md +9 -0
  179. package/skills/engineering/resolve-issues/references/postmortem.md +27 -0
  180. package/skills/engineering/resolve-issues/references/pre-flight-model-slots.md +41 -0
  181. package/skills/engineering/resolve-issues/references/pre-flight-recording-and-checkout.md +48 -0
  182. package/skills/engineering/resolve-issues/references/pre-flight.md +41 -0
  183. package/skills/engineering/resolve-issues/references/regression-checklist.md +26 -0
  184. package/skills/engineering/resolve-issues/references/run-state.md +288 -0
  185. package/skills/engineering/resolve-issues/references/sandboxed-testing.md +48 -0
  186. package/skills/engineering/resolve-issues/references/spawn-contract.md +96 -0
  187. package/skills/engineering/resolve-issues/references/terminal-evidence-journal.md +40 -0
  188. package/skills/engineering/resolve-issues/references/why.md +653 -0
  189. package/skills/engineering/resolve-issues/schemas/fix-round.schema.json +49 -0
  190. package/skills/engineering/resolve-issues/scripts/combine-and-verify.mjs +721 -0
  191. package/skills/engineering/resolve-issues/scripts/component-candidate.mjs +962 -0
  192. package/skills/engineering/resolve-issues/scripts/contract-revision.mjs +220 -0
  193. package/skills/engineering/resolve-issues/scripts/detect-delivery-mode.mjs +420 -0
  194. package/skills/engineering/resolve-issues/scripts/detect-target-branch.mjs +256 -0
  195. package/skills/engineering/resolve-issues/scripts/detect-workspace-mode.mjs +168 -0
  196. package/skills/engineering/resolve-issues/scripts/discover-models.mjs +9 -0
  197. package/skills/engineering/resolve-issues/scripts/doctrine.mjs +62 -0
  198. package/skills/engineering/resolve-issues/scripts/evidence-lifecycle-contract.mjs +191 -0
  199. package/skills/engineering/resolve-issues/scripts/exact-head-ci.mjs +413 -0
  200. package/skills/engineering/resolve-issues/scripts/exact-head-github-provider.mjs +332 -0
  201. package/skills/engineering/resolve-issues/scripts/finalize.mjs +488 -0
  202. package/skills/engineering/resolve-issues/scripts/fix-rounds.mjs +3307 -0
  203. package/skills/engineering/resolve-issues/scripts/fixtures/evidence-lifecycle-circular-1001.json +16 -0
  204. package/skills/engineering/resolve-issues/scripts/fixtures/evidence-lifecycle-valid-sequencing.json +51 -0
  205. package/skills/engineering/resolve-issues/scripts/fixtures/fmm-express-830-component-candidate.json +17 -0
  206. package/skills/engineering/resolve-issues/scripts/fixtures/head-check-set-1081.json +166 -0
  207. package/skills/engineering/resolve-issues/scripts/gate-value-series.mjs +92 -0
  208. package/skills/engineering/resolve-issues/scripts/guide-index.mjs +73 -0
  209. package/skills/engineering/resolve-issues/scripts/head-check-set.mjs +159 -0
  210. package/skills/engineering/resolve-issues/scripts/interference.mjs +427 -0
  211. package/skills/engineering/resolve-issues/scripts/model-catalog.mjs +9 -0
  212. package/skills/engineering/resolve-issues/scripts/next-operations.mjs +419 -0
  213. package/skills/engineering/resolve-issues/scripts/postmortem.mjs +909 -0
  214. package/skills/engineering/resolve-issues/scripts/preflight-questions.mjs +322 -0
  215. package/skills/engineering/resolve-issues/scripts/reconcile-contained-unit-prs.mjs +415 -0
  216. package/skills/engineering/resolve-issues/scripts/release-state-contract.mjs +697 -0
  217. package/skills/engineering/resolve-issues/scripts/report.mjs +494 -0
  218. package/skills/engineering/resolve-issues/scripts/required-check-plan.mjs +172 -0
  219. package/skills/engineering/resolve-issues/scripts/round-metadata.mjs +79 -0
  220. package/skills/engineering/resolve-issues/scripts/run-state-review6-cases.mjs +334 -0
  221. package/skills/engineering/resolve-issues/scripts/run-state.mjs +4784 -0
  222. package/skills/engineering/resolve-issues/scripts/sandbox-selftest.mjs +395 -0
  223. package/skills/engineering/resolve-issues/scripts/spawn-contract.mjs +290 -0
  224. package/skills/engineering/resolve-issues/scripts/terminal-dispositions.mjs +170 -0
  225. package/skills/engineering/resolve-issues/scripts/terminal-evidence-journal.mjs +293 -0
  226. package/skills/engineering/resolve-issues/scripts/unit-kind.mjs +197 -0
  227. package/skills/engineering/resolve-issues/scripts/unit-lifecycle.mjs +127 -0
  228. package/skills/engineering/resolve-issues/scripts/watch-delivery.mjs +893 -0
  229. package/skills/engineering/resolve-issues/scripts/workspaces.mjs +829 -0
  230. package/skills/engineering/resolve-issues/workflows/independent-review.workflow.js +290 -0
  231. package/skills/engineering/resolve-issues/workflows/prior-art-scan.workflow.js +80 -0
  232. package/skills/engineering/resolve-issues/workflows/workflow-smoke.mjs +102 -0
  233. package/skills/engineering/resolve-release/LICENSE +3 -0
  234. package/skills/engineering/resolve-release/SKILL.md +112 -0
  235. package/skills/engineering/resolve-release/references/assembly.md +137 -0
  236. package/skills/engineering/resolve-release/references/auto-when-green.md +56 -0
  237. package/skills/engineering/resolve-release/references/candidate.md +167 -0
  238. package/skills/engineering/resolve-release/references/exposure.md +178 -0
  239. package/skills/engineering/resolve-release/references/handoff.md +24 -0
  240. package/skills/engineering/resolve-release/references/postmortem.md +230 -0
  241. package/skills/engineering/resolve-release/references/preflight.md +207 -0
  242. package/skills/engineering/resolve-release/references/principles.md +94 -0
  243. package/skills/engineering/resolve-release/references/regression-checklist.md +36 -0
  244. package/skills/engineering/resolve-release/references/related-skills.md +12 -0
  245. package/skills/engineering/resolve-release/references/routing.md +149 -0
  246. package/skills/engineering/resolve-release/references/verified-sha-github-flow.md +285 -0
  247. package/skills/engineering/resolve-release/references/versioning.md +202 -0
  248. package/skills/engineering/resolve-release/references/why.md +53 -0
  249. package/skills/engineering/resolve-release/scripts/adapter-completion-artifact.mjs +389 -0
  250. package/skills/engineering/resolve-release/scripts/build-changes.mjs +209 -0
  251. package/skills/engineering/resolve-release/scripts/candidate-hygiene.mjs +407 -0
  252. package/skills/engineering/resolve-release/scripts/candidate-identity.mjs +904 -0
  253. package/skills/engineering/resolve-release/scripts/candidate-traffic.mjs +81 -0
  254. package/skills/engineering/resolve-release/scripts/checked-adapter-loader.mjs +612 -0
  255. package/skills/engineering/resolve-release/scripts/close-attempt.mjs +135 -0
  256. package/skills/engineering/resolve-release/scripts/closeout-release.mjs +161 -0
  257. package/skills/engineering/resolve-release/scripts/doctrine.mjs +106 -0
  258. package/skills/engineering/resolve-release/scripts/durable-processing.mjs +522 -0
  259. package/skills/engineering/resolve-release/scripts/ensure-target-green.mjs +659 -0
  260. package/skills/engineering/resolve-release/scripts/evidence-bundle.mjs +1014 -0
  261. package/skills/engineering/resolve-release/scripts/finalize-release.mjs +526 -0
  262. package/skills/engineering/resolve-release/scripts/fixtures/durable-processing-adapter.mjs +169 -0
  263. package/skills/engineering/resolve-release/scripts/green-gate.mjs +599 -0
  264. package/skills/engineering/resolve-release/scripts/isolated-adapter-evaluator.mjs +752 -0
  265. package/skills/engineering/resolve-release/scripts/metadata-pr-status.mjs +56 -0
  266. package/skills/engineering/resolve-release/scripts/metadata-sync.mjs +1538 -0
  267. package/skills/engineering/resolve-release/scripts/postmortem.mjs +381 -0
  268. package/skills/engineering/resolve-release/scripts/preflight-probes.mjs +498 -0
  269. package/skills/engineering/resolve-release/scripts/production-endpoints.mjs +326 -0
  270. package/skills/engineering/resolve-release/scripts/rc-circuit-breaker.mjs +272 -0
  271. package/skills/engineering/resolve-release/scripts/report.mjs +417 -0
  272. package/skills/engineering/resolve-release/scripts/reprobe-credentials.mjs +114 -0
  273. package/skills/engineering/resolve-release/scripts/revalidate-candidate.mjs +238 -0
  274. package/skills/engineering/resolve-release/scripts/review-packet.mjs +503 -0
  275. package/skills/engineering/resolve-release/scripts/rollback-floor.mjs +263 -0
  276. package/skills/engineering/resolve-release/scripts/version-assert.mjs +339 -0
  277. package/skills/engineering/resolve-release/scripts/version-postmortem.mjs +485 -0
  278. package/skills/engineering/resolve-release/scripts/version.mjs +1199 -0
  279. package/skills/engineering/resolve-release/scripts/watch-candidate-delivery.mjs +449 -0
  280. package/skills/engineering/resolve-release/vendor/ACORN-LICENSE +21 -0
  281. package/skills/engineering/resolve-release/vendor/README.md +60 -0
  282. package/skills/engineering/resolve-release/vendor/acorn.mjs +6233 -0
  283. package/skills/engineering/resolve-release/vendor/quickjs/core/LICENSE +21 -0
  284. package/skills/engineering/resolve-release/vendor/quickjs/core/README.md +341 -0
  285. package/skills/engineering/resolve-release/vendor/quickjs/core/README.template.md +70 -0
  286. package/skills/engineering/resolve-release/vendor/quickjs/core/dist/chunk-TAV5CUKK.mjs +2 -0
  287. package/skills/engineering/resolve-release/vendor/quickjs/core/dist/chunk-TAV5CUKK.mjs.map +1 -0
  288. package/skills/engineering/resolve-release/vendor/quickjs/core/dist/chunk-V2S4ZYJR.mjs +7 -0
  289. package/skills/engineering/resolve-release/vendor/quickjs/core/dist/chunk-V2S4ZYJR.mjs.map +1 -0
  290. package/skills/engineering/resolve-release/vendor/quickjs/core/dist/index.d.mts +2033 -0
  291. package/skills/engineering/resolve-release/vendor/quickjs/core/dist/index.d.ts +2033 -0
  292. package/skills/engineering/resolve-release/vendor/quickjs/core/dist/index.js +7 -0
  293. package/skills/engineering/resolve-release/vendor/quickjs/core/dist/index.js.map +1 -0
  294. package/skills/engineering/resolve-release/vendor/quickjs/core/dist/index.mjs +2 -0
  295. package/skills/engineering/resolve-release/vendor/quickjs/core/dist/index.mjs.map +1 -0
  296. package/skills/engineering/resolve-release/vendor/quickjs/core/dist/module-ES6BEMUI.mjs +2 -0
  297. package/skills/engineering/resolve-release/vendor/quickjs/core/dist/module-ES6BEMUI.mjs.map +1 -0
  298. package/skills/engineering/resolve-release/vendor/quickjs/core/dist/module-asyncify-2EFITU5U.mjs +2 -0
  299. package/skills/engineering/resolve-release/vendor/quickjs/core/dist/module-asyncify-2EFITU5U.mjs.map +1 -0
  300. package/skills/engineering/resolve-release/vendor/quickjs/core/package.json +49 -0
  301. package/skills/engineering/resolve-release/vendor/quickjs/ffi-types/LICENSE +21 -0
  302. package/skills/engineering/resolve-release/vendor/quickjs/ffi-types/README.md +5 -0
  303. package/skills/engineering/resolve-release/vendor/quickjs/ffi-types/dist/index.d.mts +549 -0
  304. package/skills/engineering/resolve-release/vendor/quickjs/ffi-types/dist/index.d.ts +549 -0
  305. package/skills/engineering/resolve-release/vendor/quickjs/ffi-types/dist/index.js +2 -0
  306. package/skills/engineering/resolve-release/vendor/quickjs/ffi-types/dist/index.js.map +1 -0
  307. package/skills/engineering/resolve-release/vendor/quickjs/ffi-types/dist/index.mjs +2 -0
  308. package/skills/engineering/resolve-release/vendor/quickjs/ffi-types/dist/index.mjs.map +1 -0
  309. package/skills/engineering/resolve-release/vendor/quickjs/ffi-types/package.json +36 -0
  310. package/skills/engineering/resolve-release/vendor/quickjs/release-sync/LICENSE +47 -0
  311. package/skills/engineering/resolve-release/vendor/quickjs/release-sync/README.md +82 -0
  312. package/skills/engineering/resolve-release/vendor/quickjs/release-sync/dist/emscripten-module.browser.d.ts +11 -0
  313. package/skills/engineering/resolve-release/vendor/quickjs/release-sync/dist/emscripten-module.browser.mjs +22 -0
  314. package/skills/engineering/resolve-release/vendor/quickjs/release-sync/dist/emscripten-module.cjs +21 -0
  315. package/skills/engineering/resolve-release/vendor/quickjs/release-sync/dist/emscripten-module.cloudflare.cjs +21 -0
  316. package/skills/engineering/resolve-release/vendor/quickjs/release-sync/dist/emscripten-module.cloudflare.d.ts +11 -0
  317. package/skills/engineering/resolve-release/vendor/quickjs/release-sync/dist/emscripten-module.d.ts +11 -0
  318. package/skills/engineering/resolve-release/vendor/quickjs/release-sync/dist/emscripten-module.mjs +25 -0
  319. package/skills/engineering/resolve-release/vendor/quickjs/release-sync/dist/emscripten-module.wasm +0 -0
  320. package/skills/engineering/resolve-release/vendor/quickjs/release-sync/dist/ffi.d.mts +85 -0
  321. package/skills/engineering/resolve-release/vendor/quickjs/release-sync/dist/ffi.d.ts +85 -0
  322. package/skills/engineering/resolve-release/vendor/quickjs/release-sync/dist/ffi.js +2 -0
  323. package/skills/engineering/resolve-release/vendor/quickjs/release-sync/dist/ffi.js.map +1 -0
  324. package/skills/engineering/resolve-release/vendor/quickjs/release-sync/dist/ffi.mjs +2 -0
  325. package/skills/engineering/resolve-release/vendor/quickjs/release-sync/dist/ffi.mjs.map +1 -0
  326. package/skills/engineering/resolve-release/vendor/quickjs/release-sync/dist/index.d.mts +20 -0
  327. package/skills/engineering/resolve-release/vendor/quickjs/release-sync/dist/index.d.ts +20 -0
  328. package/skills/engineering/resolve-release/vendor/quickjs/release-sync/dist/index.js +2 -0
  329. package/skills/engineering/resolve-release/vendor/quickjs/release-sync/dist/index.js.map +1 -0
  330. package/skills/engineering/resolve-release/vendor/quickjs/release-sync/dist/index.mjs +2 -0
  331. package/skills/engineering/resolve-release/vendor/quickjs/release-sync/dist/index.mjs.map +1 -0
  332. package/skills/engineering/resolve-release/vendor/quickjs/release-sync/package.json +61 -0
  333. package/skills/engineering/review-pr/LICENSE +3 -0
  334. package/skills/engineering/review-pr/SKILL.md +123 -0
  335. package/skills/engineering/review-pr/references/adversarial-reviewer-prompt.md +42 -0
  336. package/skills/engineering/review-pr/references/code-correctness.md +5 -0
  337. package/skills/engineering/review-pr/references/contract-freshness.md +9 -0
  338. package/skills/engineering/review-pr/references/coordination.md +18 -0
  339. package/skills/engineering/review-pr/references/domain-hazards.md +123 -0
  340. package/skills/engineering/review-pr/references/finding-themes.md +7 -0
  341. package/skills/engineering/review-pr/references/github-posting.md +98 -0
  342. package/skills/engineering/review-pr/references/golden-path-smoke.md +5 -0
  343. package/skills/engineering/review-pr/references/incremental-output.md +16 -0
  344. package/skills/engineering/review-pr/references/inputs-and-discovery.md +31 -0
  345. package/skills/engineering/review-pr/references/output-format.md +99 -0
  346. package/skills/engineering/review-pr/references/over-mock-screen.md +7 -0
  347. package/skills/engineering/review-pr/references/promotion-prs.md +16 -0
  348. package/skills/engineering/review-pr/references/re-review.md +18 -0
  349. package/skills/engineering/review-pr/references/review-method.md +199 -0
  350. package/skills/engineering/review-pr/references/review-mode.md +30 -0
  351. package/skills/engineering/review-pr/references/review-posture.md +53 -0
  352. package/skills/engineering/review-pr/references/round1-depth.md +62 -0
  353. package/skills/engineering/review-pr/references/scripts.md +17 -0
  354. package/skills/engineering/review-pr/references/workflow.md +16 -0
  355. package/skills/engineering/review-pr/schemas/findings.schema.json +282 -0
  356. package/skills/engineering/review-pr/scripts/finding-contract.mjs +285 -0
  357. package/skills/engineering/review-pr/scripts/post-review.mjs +405 -0
  358. package/skills/engineering/review-pr/scripts/pr-context.mjs +207 -0
  359. package/skills/engineering/review-pr/scripts/scan-diff.mjs +365 -0
  360. package/skills/engineering/review-pr/scripts/theme-contract.mjs +57 -0
  361. package/skills/engineering/smoke/LICENSE +3 -0
  362. package/skills/engineering/smoke/SKILL.md +131 -0
  363. package/skills/engineering/smoke/assets/smoke.manifest.example.json +53 -0
  364. package/skills/engineering/smoke/references/manifest.md +192 -0
  365. package/skills/engineering/smoke/scripts/smoke.mjs +713 -0
  366. package/skills/fullstack/better-auth/LICENSE +3 -0
  367. package/skills/fullstack/better-auth/SKILL.md +601 -0
  368. package/skills/fullstack/better-auth/references/feishu-api.md +270 -0
  369. package/skills/fullstack/monorepo/LICENSE +3 -0
  370. package/skills/fullstack/monorepo/SKILL.md +465 -0
  371. package/skills/fullstack/nextjs-fullstack/LICENSE +3 -0
  372. package/skills/fullstack/nextjs-fullstack/SKILL.md +210 -0
  373. package/skills/fullstack/nextjs-fullstack/conventions.md +318 -0
  374. package/skills/fullstack/nextjs-fullstack/frontend-conventions.md +61 -0
  375. package/skills/fullstack/nextjs-fullstack/nextjs16.md +287 -0
  376. package/skills/fullstack/nextjs-fullstack/server-actions.md +409 -0
  377. package/skills/fullstack/prisma-setup/LICENSE +3 -0
  378. package/skills/fullstack/prisma-setup/SKILL.md +180 -0
  379. package/skills/fullstack/prisma-setup/nextjs.md +258 -0
  380. package/skills/fullstack/prisma-setup/turborepo.md +301 -0
  381. package/skills/fullstack/shadcn/LICENSE +3 -0
  382. package/skills/fullstack/shadcn/SKILL.md +119 -0
  383. package/skills/fullstack/shadcn/assets/shadcn-small.png +0 -0
  384. package/skills/fullstack/shadcn/assets/shadcn.png +0 -0
  385. package/skills/fullstack/shadcn/cli.md +411 -0
  386. package/skills/fullstack/shadcn/customization.md +224 -0
  387. package/skills/fullstack/shadcn/evals/evals.json +90 -0
  388. package/skills/fullstack/shadcn/mcp.md +101 -0
  389. package/skills/fullstack/shadcn/rules/base-vs-radix.md +323 -0
  390. package/skills/fullstack/shadcn/rules/component-selection.md +67 -0
  391. package/skills/fullstack/shadcn/rules/composition.md +195 -0
  392. package/skills/fullstack/shadcn/rules/data-table.md +201 -0
  393. package/skills/fullstack/shadcn/rules/forms.md +255 -0
  394. package/skills/fullstack/shadcn/rules/icons.md +103 -0
  395. package/skills/fullstack/shadcn/rules/styling.md +167 -0
  396. package/skills/fullstack/zod-v4/LICENSE +3 -0
  397. package/skills/fullstack/zod-v4/SKILL.md +287 -0
@@ -0,0 +1,123 @@
1
+ # Domain hazards — the high-risk-surface hunt list
2
+
3
+ A catalog of the **recurring, cross-repo bug classes** that a happy-path implementer ships and CI passes green, so the independent review (or production) is the first thing to catch them. It exists because these are the surfaces whose governing contract is hardest to pin down up front, so a first review most often still finds something to fix: auth, money, tenancy, and migrations. (A low first-pass rate here is a **spec-maturity** signal — a hard surface needs a more explicit contract — not a verdict on the reviewer or the code.) Use it two ways:
4
+
5
+ - **Reviewer** ([review-pr](../SKILL.md), code-correctness axis) — when the diff touches one of these surfaces, hunt it against the matching section and treat any unhandled item as a blocking finding.
6
+ - **Implementer / self-review** ([implement-and-pr](../../implement-and-pr/SKILL.md#self-review-before-handoff-adversarial-pass)) — hunt your own diff against it *before* opening the PR, so the cheap-to-catch class doesn't consume a review round.
7
+
8
+ This is the **generic** list — the failure *shape* that recurs everywhere. The **repo-specific values** (which issuer/audience string, which currencies, which tenant column, which migration tool) live in the repo's own **hazards file** — see [The repo hazards file](#the-repo-hazards-file-location-schema-lifecycle) for its location, schema, and how it grows. Hunt against **both**: this catalog for the shape, the repo file for the concrete values. If a repo touches a high-risk surface and has *no* hazards file, that absence is not just a gap to note — the implementer **seeds** it (see the lifecycle below).
9
+
10
+ The unifying rule for every class below: **decide by a positive allow-list, default to deny/refuse, and prove the outcome for the value the app actually produces at runtime — not the convenient fixture.** Most of these bugs are an `else` branch that permits, a default that's wrong, or a test pinned to a stand-in value the real producer never emits.
11
+
12
+ ---
13
+
14
+ ## 1. Auth / authz / token / session
15
+
16
+ | Hazard | Failure mode (real cases) | What to prove |
17
+ |---|---|---|
18
+ | **Fail-open guard/verifier** | On error / unknown input / unmatched branch, the code *allows* instead of denying. A signature verifier with an HMAC catch-all fallback; a country/eligibility check that skips the gate for unrecognized spellings. | Every error and `else` path **denies**. The default is deny. Add a test that feeds the unrecognized/garbage input and asserts refusal. |
19
+ | **Token/assertion validation** | Wrong issuer, wrong/defaulted `client_id`, missing audience check, unpinned algorithm (accepts `none` or HMAC where RS/ES expected). POSTing to the wrong endpoint (broker vs OIDC issuer). | `iss` / `aud` / `scope` / `exp` / signature-alg each asserted against the **real IdP contract**, not a literal default. Alg pinned. Target endpoint is the issuer, verified against the discovery doc. |
20
+ | **Replay / single-use / idempotency** | A one-time code (nonce, `jti`, `device_code`, OTP) accepted twice; no brute-force limit. | The code is consumed **atomically** and a second use is rejected; a replay test proves it; sensitive endpoints are rate-limited. |
21
+ | **Clock skew** | Assertion/token lifetime unbounded or with no skew tolerance; `iat`/`nbf`/`exp` mishandled. | Lifetime is clamped to a bounded window; skew tolerance is explicit; a token just inside/outside the window is tested both ways. |
22
+ | **Open redirect / dropped `returnTo`** | Redirect target derived from user input without an allow-list; a centralizing auth refactor drops the deep-link `returnTo` and lands the user on a default page. | Redirect targets pass a **positive allow-list** (`^/(?![/\\])` or exact known routes), and `returnTo` survives the whole flow (characterization test on the deep-link path). |
23
+ | **Privilege on switch** | Org-switch / impersonation / role change doesn't re-scope the session or leaves stale elevated state. | The switch re-derives authorization; a test asserts the post-switch scope, not just that the switch succeeded. |
24
+
25
+ ## 2. Money / tax / pricing
26
+
27
+ | Hazard | Failure mode (real cases) | What to prove |
28
+ |---|---|---|
29
+ | **Conversion direction** | Divide-vs-multiply inverted; response keyed to the base currency (USD) when the caller asked for the quote currency; daily vs realtime endpoint confused. | Direction asserted with a **known rate and a known expected result**; the response is keyed to the currency actually requested; the endpoint matches the contract. |
30
+ | **Precision & storage range** | Minor-unit integer column too small for the validated max — validation passes, the INSERT overflows and 500s (INT4 column vs a `1e11` Zod cap). | Storage type holds the max plausible value; the validation cap is **≤** the storage range; a max-size input is tested end-to-end through the write, not just through validation. |
31
+ | **Rounding** | Undefined or inconsistent rounding (half-up vs banker's); rounding applied at the wrong step; tax computed on the wrong base. | Rounding mode and step are explicit and tested at the boundary; tax base/order matches the spec. |
32
+ | **Immutability & state** | An issued invoice/number/ledger entry is mutable; a paid/void transition isn't guarded. | Post-issue mutation is rejected; state transitions go through one authoritative guard; the guard is tested for the illegal transition. |
33
+
34
+ ## 3. Tenancy / org-scope / isolation
35
+
36
+ | Hazard | Failure mode (real cases) | What to prove |
37
+ |---|---|---|
38
+ | **Cross-org leakage** | A read or write not filtered by tenant/org; lineage or join that crosses orgs (cross-org TaskRun lineage leak). | **Every** query is scoped by tenant by default (scoping is not opt-in); a two-org test asserts org A cannot see/mutate org B's rows. |
39
+ | **Authorization scope drift** | Ad-hoc role-string compares that a centralized detector misses (alias forms like `const role = …; return role === 'admin'`); checks in an app the audit doesn't cover. | Authorization is centralized; no inline role-string equality; the detector/audit covers every app, and a real instance is caught by a test. |
40
+
41
+ ## 4. DB migration / schema
42
+
43
+ | Hazard | Failure mode (real cases) | What to prove |
44
+ |---|---|---|
45
+ | **Type/range vs validation** | Column type can't hold the value the app validates as legal (see money precision). | Column range ≥ the app's accepted range; asserted with a boundary write. |
46
+ | **Migration scope creep** | A migration bundles unrelated changes or an unintended column/table drop; schema drifts from the intended migration. | One concern per migration; the diff contains **only** the intended change; drift is reconciled, not silently regenerated. |
47
+ | **Backfill / nullability / locks** | Adding a NOT NULL column without a default or backfill; a migration that locks a hot table. | New columns are nullable-or-defaulted with a backfill plan; lock-heavy changes are called out; the migration is reversible or the irreversibility is declared. |
48
+
49
+ ## 5. Cross-cutting refactor (the "centralizing drops an edge case" class)
50
+
51
+ Not a surface — a *move*. Consolidating a cross-cutting concern (auth redirect into a layout, mutation feedback into a shared hook, a loading boundary into a route group) is the single most reliable way to **silently drop a pre-existing edge behavior**: a deep-link `returnTo`, a fail-loud error toast that becomes fail-silent, a sibling route's own skeleton. The hazard shape: *green new tests pass while an edge the old path quietly handled is gone.*
52
+
53
+ **What to prove:** the pre-existing edges are pinned before the move — the characterization obligation, owned by [ensure-coverage → depth/characterization.md](../../ensure-coverage/references/depth/characterization.md) (`scan-diff.mjs` raises `modifies-existing-behavior` on exactly these diffs).
54
+
55
+ ---
56
+
57
+ ## The repo hazards file (location, schema, lifecycle)
58
+
59
+ The repo-specific layer is a **standalone file, not a section inside `CLAUDE.md`/`AGENTS.md`** — the agent-instructions file loads into every session, while hazards are only needed when a diff touches a high-risk surface, so the values live out-of-line and the instructions file carries only an index pointer.
60
+
61
+ ### Location & discovery
62
+
63
+ - **Canonical path: `docs/domain-hazards.md`** at the repo root's `docs/` directory.
64
+ - **Index pointer (required):** the repo's `AGENTS.md` (or `CLAUDE.md`) carries a short `## Domain hazards` section whose only job is to point at the file, e.g.:
65
+
66
+ ```markdown
67
+ ## Domain hazards
68
+ Repo-specific high-risk rules (auth/money/tenancy/migration): read
69
+ `docs/domain-hazards.md` before touching any of
70
+ those surfaces or reviewing a diff that does.
71
+ ```
72
+ - **Discovery order** (for any skill that hunts): follow the `Domain hazards` heading in `AGENTS.md`/`CLAUDE.md` to its linked file → else try `docs/domain-hazards.md` directly → else the file is **absent** (seed obligation below). A legacy repo with the values inline under that heading still counts — migrate them to the file the next time a hazard row is added.
73
+
74
+ ### File schema
75
+
76
+ One table per surface class, mirroring this catalog's sections so the generic shape and the repo value line up. Every row is one hazard with a **stable ID**, the repo's **concrete rule**, the **test obligation**, and the **source** that earned it:
77
+
78
+ ```markdown
79
+ # Domain hazards — <repo>
80
+
81
+ Repo-specific values for the high-risk-surface hunt. Generic bug *shapes* live in
82
+ the skills catalog (review-pr → references/domain-hazards.md); this file holds only
83
+ what is true of THIS repo. One row per hazard. Sections mirror the catalog.
84
+
85
+ ## Auth / authz / token / session
86
+ | ID | Hazard (this repo's rule) | What to prove | Source |
87
+ |---|---|---|---|
88
+ | auth-issuer | Issuer is `https://id.example.com`, never the broker URL; tokens assert `iss` + `aud=<client_id>`. | Token test asserts both against the real discovery doc values. | #231 (2026-06-17) |
89
+
90
+ ## Money / tax / pricing
91
+ | ID | Hazard (this repo's rule) | What to prove | Source |
92
+ |---|---|---|---|
93
+
94
+ ## Tenancy / org-scope / isolation
95
+
96
+
97
+ ## DB migration / schema
98
+
99
+
100
+ ## Cross-cutting
101
+
102
+ ```
103
+
104
+ - **ID** — kebab-case, class-prefixed, stable once assigned (`auth-resume-param`, `money-int4-range`). Findings and dedupe reference it.
105
+ - **Hazard** — one line, imperative, carrying the repo's *concrete values* (the exact issuer, param, column, tool). Never restate a generic shape this catalog already owns.
106
+ - **What to prove** — the test obligation a diff touching this hazard owes (the assertion, the two-org test, the boundary write).
107
+ - **Source** — the PR/finding (and date) that earned the row, so every rule is traceable to a real bug.
108
+
109
+ ### Admission rules (what keeps the file honest and small)
110
+
111
+ 1. **Repo-specific values only** — a generic shape belongs in this catalog, not the repo file; duplicating it there is noise.
112
+ 2. **Blocking domain-semantic findings only** — a row is earned by a real bug (an independent-review blocker or a self-review catch on a high-risk surface), not by speculation. Style nits and coverage gaps never earn rows.
113
+ 3. **Dedupe by meaning, not wording** — if an existing row already covers the bug, the resolution is "covered by `<id>`", never a near-duplicate row.
114
+ 4. **One line per hazard** — a row that needs a paragraph is two hazards or a doc link.
115
+
116
+ ### Lifecycle (how the file grows as a by-product of the loop)
117
+
118
+ The reviewer **proposes**, the fixer **writes**, the re-reviewer **verifies** — the reviewer is read-only by contract, so it never edits the file itself:
119
+
120
+ 1. **Propose (review-pr):** a blocking domain-semantic finding on a high-risk surface carries a `hazard_candidate` in the findings JSON (`schemas/findings.schema.json`) — a ready-to-paste row (section, id, rule, prove), or `covered_by: <id>` when an existing row already captures it.
121
+ 2. **Write (implement-and-pr, fix round):** the fix commit for that finding includes the candidate row in `docs/domain-hazards.md` (creating file + index pointer if absent). A hazard row tied to a finding fixed in the same PR is **in-scope by declaration** — it is never "broad unrelated changes."
122
+ 3. **Verify (review-pr, re-review):** a prior finding that carried a `hazard_candidate` is not `Resolved` until **both** the code fix and its hazards-file row (or an explicit `covered by <id>`) are present in the tree.
123
+ 4. **Seed (implement-and-pr, self-review):** a high-risk diff in a repo with **no** hazards file creates it — file, index pointer, and the rows for the hazards the self-review actually checked — rather than merely flagging the absence in Known Gaps.
@@ -0,0 +1,7 @@
1
+ # Finding themes (deep lane / state-machine / concurrency)
2
+
3
+ **Trigger: a high-risk unit, or a state-machine/concurrency finding.** Routine findings may omit `theme` entirely.
4
+
5
+ ### Finding themes (deep lane / state-machine / concurrency)
6
+
7
+ A finding's optional `theme` (stable kebab-case id + kind + the general violated contract) is the identity that powers same-theme recurrence detection and contract-complete fixes. It is **required only on `state-machine`/`concurrency` findings** (which also declare the full `stateSpace`) and throughout the deep lane (`resolve-issues/references/high-risk.md`); a routine lean-lane finding may omit it. A recurring finding keeps its id — a new counterexample is not a new theme. Detail: [review-method.md](review-method.md) § Theme reconciliation.
@@ -0,0 +1,98 @@
1
+ # Posting the Review to GitHub
2
+
3
+ When the review target **is a real GitHub PR** — you were given a PR number/URL (the PR is the source of truth for the code under review) and `gh` is authenticated — post the review back to GitHub automatically as the final step. Do not wait for confirmation. Still return the full report in the conversation as well.
4
+
5
+ Do **not** post when there is no real PR to post to: reviewing a local diff, uncommitted working-tree changes, a branch with no open PR, or a Review Contract pasted into the conversation. In those cases return the report only.
6
+
7
+ ## Prefer the script
8
+
9
+ `scripts/post-review.mjs --findings <findings.json> --pr <number> --pr-context <pr-context.json>` does everything below: it validates the **full review document** (verdict, top-level shape, and canonical findings) against [`schemas/findings.schema.json`](../schemas/findings.schema.json) (**refusing any finding without a `file:line`**), auto-detects the self-authored downgrade (`gh api user` vs PR author), maps verdict→event, and posts the single review via the reviews API. `--pr-context` points at the saved stdout of step 1's `pr-context.mjs --base <target-branch>` run — reusing its `changedFiles` list, never recomputing the diff — so a comment whose `file` isn't actually in the diff is diverted to the review body instead of anchored, even when the reviewer marked it `in_scope: true` (see "Out-of-scope, and off-diff, findings never anchor inline" below). Use `--dry-run` to inspect the payload first. The rest of this file documents *what it does* — the manual fallback and the rules the script encodes.
10
+
11
+ ### Label, verdict, and issue routing are rendered — not written by the reviewer
12
+
13
+ The reviewer emits JSON only (`{title, priority, in_scope, …}`). `post-review.mjs` derives the rest so any reviewer model maps to one output:
14
+
15
+ - **Label** — each inline comment is prefixed with a rendered `BLOCK-n`/`NOTE-n` (sequenced per class): in-scope `priority ≤ 1` → `BLOCK-n`; everything else → `NOTE-n`. No `[P1]`/`F-`/`N-` prefixes.
16
+ - **Verdict** — `NEEDS_CHANGES` iff ≥1 `BLOCK-n`, else `PASS`; `FAIL`/`BLOCKED` pass through unchanged. The verdict maps to the review event as below.
17
+ - **Removed `blocking` field** — a finding still carrying `blocking` is read-tolerated (it warns and the value is ignored; blocking is `in_scope && priority ≤ 1`).
18
+
19
+ ### Firing notes as tracked issues (`--file-issues`, default OFF)
20
+
21
+ Non-blocking findings route to GitHub issues so they are neither lost nor left holding attention on the PR:
22
+
23
+ | finding | routes to |
24
+ |---|---|
25
+ | in-scope `priority 2–3` | the **one** batched `refactor-later` issue (links the PR) |
26
+ | out-of-scope `priority 2–3` | the same batched `refactor-later` issue |
27
+ | out-of-scope `priority 0–1` | its **own** dedicated issue (`critical`/`security` labels) **plus a loud warning** — it does *not* block the PR |
28
+ | in-scope `priority 0–1` | no issue — it is a `BLOCK-n` that holds the PR |
29
+
30
+ **Issue creation is an outward action, so it is gated behind `--file-issues` and DEFAULTS OFF** — without the flag the script prints what it *would* open and creates nothing. This keeps normal review runs and tests from opening real issues. The out-of-scope-critical **warning prints regardless of the flag** (a warning is free; opening an issue is not). One `refactor-later` issue per PR — the notes are batched, never one issue per note.
31
+
32
+ ## Submit a single review (inline comments + summary + verdict)
33
+
34
+ Submit one review that carries the inline/file-specific comments, the top-level summary, and the verdict event together, via the reviews API:
35
+
36
+ ```bash
37
+ gh api --method POST \
38
+ repos/{owner}/{repo}/pulls/{number}/reviews \
39
+ -f event='REQUEST_CHANGES' \
40
+ -f body='<top-level summary: verdict, spec compliance, systemic risks, required changes>' \
41
+ -f 'comments[][path]=src/foo.ts' -F 'comments[][line]=42' -f 'comments[][body]=<concrete defect>' \
42
+ -f 'comments[][path]=src/bar.ts' -F 'comments[][line]=88' -f 'comments[][body]=<concrete defect>'
43
+ ```
44
+
45
+ If a runtime makes the reviews API awkward, fall back to `gh pr review <number> --approve|--request-changes|--comment --body '<summary>'` for the top-level review plus `gh pr comment` / `gh api .../comments` for inline notes.
46
+
47
+ ## Verdict → review event mapping
48
+
49
+ | Verdict | GitHub review event |
50
+ |---|---|
51
+ | `PASS` | `APPROVE` |
52
+ | `NEEDS_CHANGES` | `REQUEST_CHANGES` |
53
+ | `FAIL` | `REQUEST_CHANGES` |
54
+ | `BLOCKED` | `COMMENT` |
55
+
56
+ `APPROVE` and `REQUEST_CHANGES` are formal signals that can gate merge under branch protection — only emit `APPROVE` on a genuine `PASS`. `BLOCKED` posts as a neutral `COMMENT` because the review could not reach a reliable verdict.
57
+
58
+ ## Self-authored PRs
59
+
60
+ GitHub forbids a user from submitting an `APPROVE` or `REQUEST_CHANGES` review on a PR they authored (`gh`/the API returns "Can not approve/request changes on your own pull request"). In agentic chains the same identity often both opens the PR (`implement-and-pr`) and runs this review, so check before submitting:
61
+
62
+ ```bash
63
+ # reviewer identity vs PR author
64
+ me=$(gh api user --jq .login)
65
+ author=$(gh pr view <number> --json author --jq .author.login)
66
+ ```
67
+
68
+ When `me == author`, **downgrade the event to `COMMENT`** regardless of verdict — it is the only event GitHub permits on your own PR. Do not let the submission fail and silently skip posting. Preserve the real verdict in the review `body` so the signal is not lost, e.g.:
69
+
70
+ > **Intended verdict: NEEDS_CHANGES** — posted as a comment because the reviewer is the PR author and GitHub disallows self approve/request-changes. Treat the Required Changes below as blocking before merge.
71
+
72
+ Inline comments still post normally under a `COMMENT` event. When `me != author`, use the standard Verdict → event mapping above.
73
+
74
+ **Guarantee 2 still holds under self-authored COMMENT** (epic-876 / #941). Mergify/branch protection may never see an `APPROVE` event from this identity; that does not mean the independent review did not run. `post-review.mjs` returns `reviewPostedAs: comment-self-authored` (and prints it on the CLI). The orchestrator records that field on the unit along with the intended verdict and the review model read-back — **transcript + COMMENT body + model diversity is the proof**, not a GitHub APPROVE. Do not re-run review solely because `reviewDecision` stays empty/APPROVED-by-bot-only.
75
+
76
+ ## Comment placement
77
+
78
+ Leave inline/file-specific comments for concrete code or test defects, anchored to the offending line. Reserve the top-level review `body` for the verdict, spec-compliance summary, systemic risks, and the consolidated Required Changes list. Every inline comment should cite the specific defect (file, line, failing behavior, or contract claim) rather than restating the summary.
79
+
80
+ ### Out-of-scope, and off-diff, findings never anchor inline
81
+
82
+ GitHub refuses to anchor a review comment on a `path` that isn't in the PR's diff and 422s the **entire** review — losing the verdict, the summary, and every other inline comment with it. Two finding shapes hit this:
83
+
84
+ - **`in_scope: false`** — by definition about a file the diff didn't touch (#628).
85
+ - **`in_scope: true` whose `file` still isn't in the diff** (#635) — this doctrine's own § Review Posture permits tracing into unchanged code to *prove* impact, so a finding can legitimately be `in_scope: true` and still name a file the diff never touched.
86
+
87
+ `post-review.mjs` never anchors either shape: it validates every comment's `path` against `--pr-context`'s changed-file list (falling back to the `in_scope`-only check when that list isn't available — never dropping a finding or blocking the post either way) and moves anything it can't anchor into a `## Findings not anchored inline` section of the review body instead, in full detail (why/consequence/fix) — the only place left for it. An out-of-scope **critical** additionally keeps its existing loud warning at the top of the body.
88
+
89
+ ### Writing an inline comment
90
+
91
+ Each inline comment is one finding. Make it land:
92
+
93
+ - **State the triggering condition up front.** Name the scenario, input, or environment the bug needs ("when `token` is empty…", "on retry after a partial write…"). The severity often *depends* on that condition, so the reader needs it immediately.
94
+ - **Be severity-accurate.** Don't inflate a minor issue or undersell a serious one. If it's conditional or low-likelihood, say so.
95
+ - **Be brief.** At most one short paragraph; no line breaks mid-sentence unless a code fragment needs it.
96
+ - **Keep code fragments tiny.** No chunk longer than ~3 lines; wrap code in backticks or a fenced block. Keep the anchored line range as short as possible (the smallest subrange that pinpoints the issue, not a 30-line span).
97
+ - **Matter-of-fact tone, no flattery.** Read as a helpful suggestion, not a human-reviewer performance — avoid "Great job…", "Thanks for…", and praise padding.
98
+ - **End with the concrete fix** (or the question, if you genuinely can't tell), so the author can act without re-deriving it.
@@ -0,0 +1,5 @@
1
+ # Golden-path smoke check
2
+
3
+ **Trigger: the diff touches a critical do-not-ship journey** (sign in → core action → pay). Otherwise there is no golden path at stake and this does not apply.
4
+
5
+ - **Golden-path smoke:** if the change touches a critical do-not-ship journey (sign in → core action → pay), confirm `smoke.manifest.json` covers it (a new critical flow with no entry is `NEEDS_CHANGES`) and the attached `smoke-results.json` + `smoke-verdict.json` show `ALIVE` against the current HEAD — the per-PR golden-path liveness floor (`ensure-coverage` gate 8 / skill `smoke`); a missing or DEAD verdict blocks regardless of CI color.
@@ -0,0 +1,16 @@
1
+ # Incremental output — compose in the file, not in your context
2
+
3
+ **Trigger: an output path was configured.** The three rules that survive without this file are in SKILL.md; this is the resume mechanics and the rationale.
4
+
5
+ ## Incremental output: compose in the file, not in your context
6
+
7
+ When the caller configures an output path, build the review **in that file as you go** — never hold it in context and write it once at the end. Before the first axis, write the identity header (PR, base/head/tree SHAs, scope, `status: in-progress`). Append each finding as you confirm it and each AC row as you decide it. Write the verdict **last**, in the same pass that flips `status: complete`.
8
+
9
+ Why: a review composed at the end is lost *whole* when the run dies — turn budget, provider quota, a crash — and the replacement restarts from zero on a diff that hasn't changed. (Named incident: on skyee-ai-risk #938, two reviewer runs were killed at 65 and 47 assistant turns against soft limits of 24 and 30, discarding completed review work both times; the run that finally landed had to be hand-told to read the dead run's transcript to avoid redoing it.)
10
+
11
+ Two rules keep a partial safe to leave on disk:
12
+
13
+ - **No verdict until complete.** An in-progress artifact carries no verdict field *at all* — not `PENDING`, absent. The verdict is the one thing a caller acts on, so it must never exist before the scan that earns it. A caller reading `status: in-progress` treats the review as **not run**, exactly as it would treat a missing file. Getting this backwards is worse than no artifact: a partial that reads as a verdict is how unreviewed code merges.
14
+ - **The identity header is the resume key.** A resuming or replacement reviewer reads the partial first and continues from it **only if base/head/tree match exactly**. On any mismatch, discard it and start fresh — findings against a different tree are worse than no findings, because they look like coverage.
15
+
16
+ Resuming is then mechanical: read the partial, take its covered ACs and confirmed findings as done, scan only what's outstanding, finish the verdict. Where no output path is configured, return the review in your final response as before — this is about durability, not format.
@@ -0,0 +1,31 @@
1
+ # Required inputs, source discovery, and finding themes
2
+
3
+ What a review needs before it starts, how to look for a spec before declaring one
4
+ missing, and when a finding carries a stable `theme` id. Indexed from
5
+ [SKILL.md](../SKILL.md#routing). What the discovery *finds* selects the mode:
6
+ [review-mode.md](review-mode.md).
7
+
8
+ ## Required Inputs
9
+
10
+ - Pull request body and diff.
11
+ - Review Contract when required or present (template: `ensure-coverage` → `references/process/review-contract-template.md`).
12
+ - Referenced `/docs/tests/YYYY-MM-DD-...` test criteria or equivalent when present.
13
+ - Referenced source PRD/design doc/spec/bug brief/issue when present (PR body, contract, linked issues, comments, tracker).
14
+ - CI/test evidence referenced by the PR when available.
15
+
16
+ If the PR lacks a valid Review Contract, run [Source Discovery](#source-discovery) — the PR body, linked issues, comments, branch name, or tracker links may point to the source spec/test criteria. What that finds selects the [review mode](review-mode.md), and finding nothing is a legitimate mode rather than a defect. Distinguish **absent** from **inaccessible**: a spec that is referenced but unreachable, with no approved exception, is `BLOCKED`; a spec that simply does not exist is Code-only mode. Use `NEEDS_CHANGES` for normal implementation/test/coverage defects.
17
+
18
+
19
+ ### Finding themes (deep lane / state-machine / concurrency)
20
+
21
+ **Trigger: a high-risk unit, or a state-machine/concurrency finding.** Routine findings may omit `theme` entirely. Shape and stability rules: [references/finding-themes.md](finding-themes.md).
22
+
23
+ The one that matters to the caller: **a recurrence of the same underlying contract keeps the same `theme.id`** — that identity is what the orchestrator's circuit-breaker counts to tell a unit circling one invariant from a unit discovering an unwritten design.
24
+
25
+
26
+ ## Source Discovery
27
+
28
+ Before declaring source material missing: read the PR body + contract refs; open linked issues, comments, tracker links, PRD/spec/design links, and `/docs/tests/` links; follow issue references from branch name, commits, PR title; search likely in-repo spec locations (`/docs/`, `/docs/tests/`, `/specs/`) by title/branch/issue/slug. Use the linked source as the spec-compliance authority even if the PR body only summarizes it. If a link is inaccessible and prevents reliable review, return `BLOCKED` with the recorded link.
29
+
30
+ Review against whatever requirement artifact this discovery finds (fetch and read it first — linked material counts). Finding **none** selects Code-only mode below. That lowers nothing about how hard you look at the code; it only removes a question you have no authority to answer.
31
+
@@ -0,0 +1,99 @@
1
+ # Output Format
2
+
3
+ ## Every finding carries its proof (verification is enforced by the shape, not willpower)
4
+
5
+ The reliable way to make a reviewer *actually verify* — rather than restate the PR's claims — is to require each finding to cite the code that proves it. **A finding with no code location is not a finding.**
6
+
7
+ **The reviewer returns JSON only** ([`schemas/findings.schema.json`](../schemas/findings.schema.json)) — a plain `title`, a numeric `priority`, an `in_scope` flag. **It never writes the label or the verdict.** `post-review.mjs` *renders* the `BLOCK-n`/`NOTE-n` label and *derives* the verdict mechanically from `{priority, in_scope}`, so any reviewer model maps to one output. Do **not** prefix titles with `[P1]`, `F-`, `N-`, or any other house-style label — that drift is exactly what this contract removes.
8
+
9
+ Each finding (every code-correctness issue, and any spec/standards issue specific enough to anchor) must include:
10
+
11
+ - **`title`** — imperative, ≤80 chars. No label or priority prefix (the label is rendered downstream).
12
+ - **`priority`** *(required — the ONE severity scale)* — integer `0–3`. `0` only for universal issues that don't depend on any assumption about inputs; `0–1` are the blocking band, `2–3` the deferrable band. The label follows from it: **in-scope `priority ≤ 1` renders `BLOCK-n` (holds the PR); everything else renders `NOTE-n`.**
13
+ - **`in_scope`** *(boolean, default true)* — is the finding about *this diff*? `false` for a pre-existing / out-of-scope defect. It changes routing, not truth: an in-scope `p0–1` blocks; an **out-of-scope `p0–1` does NOT block** — it opens its own critical/security issue and fires a loud warning; a `p2–3` (either scope) batches into the one refactor-later issue.
14
+ - **Location** — `path:line-start–line-end` that **overlaps the diff**, the smallest subrange that pinpoints it. Can't point to a line? Then it isn't verified — mark it `Unverified` and state what you'd need to confirm it; do not assert it as a finding.
15
+ - **Why this path is vulnerable** — the concrete trigger/scenario/input, *traced through the code* (not "looks risky").
16
+ - **Subject** *(every finding; `code` when omitted)* — `code` or `evidence`. `evidence` means the fix touches no source file (contract wording, checklist rows, evidence locators). A mis-tagged `@level`/`@covers` is `code` — the tag lives in a test file. Callers route on it; see SKILL.md § Verdicts and the blocking bar.
17
+ - **Theme** *(state-machine/concurrency findings, and throughout the deep lane; optional otherwise)* — stable `theme.id`, `kind`, and the general violated `contract`; state-machine/concurrency themes also carry the complete `stateSpace` (`states × taskKinds`). A recurring theme retains the same identity and contract so the fix loop can reconcile it.
18
+ - **Consequence** *(optional field, non-optional information)* — what actually breaks or degrades if this ships unfixed: the user-visible failure, the corrupted/lost data, the security exposure, the maintenance cost. State the impact, not a restatement of the symptom.
19
+ - **Confidence** — `0.0–1.0`, kept honest; low confidence means you could not fully verify it.
20
+ - **Recommendation** *(optional field, non-optional when the fix isn't obvious)* — the concrete change that reduces the risk.
21
+
22
+ **A finding whose damage and fix the reader must guess is noise.** The trigger (why-vulnerable) says *what is wrong*; the reader also needs *why it matters* and *what to do*. The schema no longer forces separate `consequence`/`recommendation` fields — a tight `why` that already conveys the damage, on a finding whose fix is self-evident, stands alone — but the information is not optional: when the impact or the fix isn't obvious from the why, fill those fields or the finding cannot be acted on or prioritized. Drop it or complete it.
23
+
24
+ **Grounding:** every finding must be defensible from code/tests/tool output you actually read — **do not invent files, lines, or code paths**; if a conclusion rests on an inference, say so in the finding body. For a ripple claim ("this breaks X elsewhere"), cite the *provably affected* code, not speculation. Close with an **overall correctness** call (would existing code/tests break?) consistent with the verdict.
25
+
26
+ Use this format for the review report:
27
+
28
+ ```markdown
29
+ ## Verdict: PASS | NEEDS_CHANGES | FAIL | BLOCKED
30
+
31
+ ## Contract Check
32
+ - Review Contract: present/missing/incomplete
33
+ - Source Document: present/missing
34
+ - Test Criteria: present/missing/access issue
35
+ - AC Mapping: complete/incomplete
36
+ - Mock/Fake Policy: acceptable/insufficient
37
+
38
+ ## Spec Compliance Review
39
+ - Mode: `Spec'd` / `Code-only` — on Code-only append `— no requirement artifact found; spec compliance not assessed`, and raise it nowhere else (no finding, no note, no verdict effect)
40
+ - Source/spec alignment: <pass/fail/blocked/not assessable + notes> — always `not assessable` in Code-only mode; it is a scope statement there, not a gap
41
+ - Test criteria alignment: <pass/fail/blocked + notes>
42
+ - Contract claims verified: <yes/no + contradictions>
43
+
44
+ ## Acceptance Criteria Review
45
+ Status uses ensure-coverage classifications: Covered / Partial / Missing / Wrong Level / Over-mocked / Unverified / Excluded.
46
+ | AC | Required Level | PR Evidence | Status | Notes |
47
+ |---|---|---|---|---|
48
+ | AC1 | Integration | test_file::test_name | Covered | attested |
49
+ | AC2 | Unit + API | test_file::test_name | Partial | ... |
50
+
51
+ **Notes must record the real input each AC was instantiated with** — the actual runtime value and any legacy/empty-state row exercised, not just "attested". An AC verified only against a convenient proxy (a test that asserts a stand-in value the app never actually produces) is `Unverified`, not `Covered`.
52
+
53
+ ## Round-1 Depth Obligations
54
+ - Live endpoint probing: `completed` — concrete running-surface command/result and evidence; or `not-applicable` — specific reason the changed surface has no live endpoint. `deferred`, `later`, and omitted are invalid.
55
+ - Shared-consumer impact: `completed` — concrete trace through every changed contract consumer and evidence; or `not-applicable` — specific reason there are no relevant shared first-party consumers. `deferred`, `later`, and omitted are invalid.
56
+
57
+ ## Coverage Breadth Review
58
+ - Coverage gate: <coverage-ledger.mjs validate result / not run + why>
59
+ - Obligation Impact reconciled: <yes/no + discrepancies>
60
+ - Changed/added surfaces: <surface → alignment + depth status>
61
+ - Orphan surfaces / unmet baselines: <none or list>
62
+ - Exclusions checked: <none / gated + category+reason, or rejected>
63
+ - Presentation sweep (changed browser routes): <result / not run + why>
64
+
65
+ ## Code Correctness Review
66
+ One entry per finding, each carrying its proof (see "Every finding carries its proof"). "No blocking correctness findings." is a valid, clean result — don't manufacture filler. State each finding's `priority` and (when not the default) `in_scope`; the `BLOCK-n`/`NOTE-n` label is rendered by `post-review.mjs`, never written here.
67
+ - **<imperative title>** — `priority 0–3` · `in_scope true|false` · `path:line-start–line-end` (overlaps diff) · confidence 0.0–1.0 · *why this path is vulnerable*: <concrete trigger, traced through the code> · *consequence*: <what breaks/degrades if unfixed> · *fix*: <concrete change> · theme `<theme.id>` / `<theme.contract>` (state-machine/concurrency and deep-lane findings)
68
+ - **<…>** — `priority 2` · `path:line` · confidence … · why … · fix …
69
+ - Test-quality / scope-maintainability findings: same per-finding format where they anchor to a location; otherwise note briefly.
70
+ - Overall correctness: <patch is correct | incorrect> — <1–3 sentences consistent with the verdict>
71
+
72
+ ## Standards Review
73
+ - Standards sources reviewed: <files or none found>
74
+ - Hard violations: <none or list with cited source>
75
+ - Judgment calls: <none or list with cited source>
76
+
77
+ ## Previous Findings — Resolution Status
78
+ Include on **re-reviews only** (a second-or-later review of the same PR). One row per prior finding; resolution is verified against the current tree, not the PR's claim. `Resolved` requires a verifiable locator; a claimed-but-unlocatable or still-present fix stays `Unresolved` and remains a blocking finding. **`Resolved` also requires the invariant *class* closed, not just the cited instance** — an adjacent path/field/state still broken under the same rule is `Partially resolved`; name the unclosed member in the row. A prior finding that carried a `hazard_candidate` needs both locators — the code fix **and** its `docs/domain-hazards.md` row (or `covered by <id>`); code-only is `Partially resolved`. See SKILL.md → "Re-review: reconciling previous findings".
79
+ | # | Prior finding | Claimed | Verified status | Evidence locator |
80
+ |---|---|---|---|---|
81
+ | 1 | <short title> | resolved | Resolved | `path:line` / test / commit that proves it |
82
+ | 2 | <short title> | resolved | **Unresolved** | claim unlocatable / still present at `path:line` |
83
+
84
+ ## Required Changes
85
+ - <blocking issue to fix before merge — includes every prior finding still Unresolved/Partial>
86
+
87
+ ## Non-Blocking Notes
88
+ - <optional improvements>
89
+
90
+ ## Evidence Reviewed
91
+ - PR diff: <summary>
92
+ - Commits/base compared: <base/head or merge-base if available>
93
+ - Source/spec links: <links/files reviewed>
94
+ - Standards docs: <files reviewed>
95
+ - Tests: <files/test names>
96
+ - CI: <links/results if available>
97
+ ```
98
+
99
+ If the output channel does not render markdown tables well, replace the Acceptance Criteria table with one bullet per AC using the same fields.
@@ -0,0 +1,7 @@
1
+ # The over-mock screen — what it catches, and what it does not
2
+
3
+ **Trigger: `scan-diff.mjs` reported a hit, or you need to judge whether a mock is first-party.** The zero-tolerance rule itself is in SKILL.md and does not depend on this file.
4
+
5
+ - **What it catches:** `vi.mock`/`jest.mock`/`vitest.mock` of a first-party target (`@/…`, `~/…`, the repo's own package scope, a relative import into source). The complementary `page.route`/`route.fulfill`/MSW interception of your *own* endpoint in a journey is a `scan-diff.mjs` **lead** you adjudicate (legit in a Tier-2 failure-injection test, `Over-mocked` in a journey).
6
+ - **No waiver path** — no `// @mock-ok`, no "approved with justification" (distinct from the broader mock-only *judgment*, where money/auth/idempotency are never mock-only anyway). The only resolutions: **make it real, fake only the external, or delete the test** — and **over-mock is worse than no test**, so deleting (an honest, tracked gap) is always acceptable.
7
+ - **Genuine false positive = an external target** → simply *not* a finding (note why; fix durably by declaring topology in `coverage.config.json`). Faking a third-party boundary (clock, randomness, external HTTP/provider) is correct, not a finding. (Diff-scoped here; the whole-tree inherited burndown is `ensure-coverage`'s audit lint, when available.)
@@ -0,0 +1,16 @@
1
+ # Promotion PRs (e.g. `dev -> main`)
2
+
3
+ **Trigger: `pr-context.mjs` reports `promotion: true`.** A promotion carries already-reviewed commits between long-lived branches; the review question is different from a feature PR's and most of the four-axis scan does not apply.
4
+
5
+ ## Promotion PRs (e.g. `dev → main`)
6
+
7
+ A PR whose **base is a production branch** (`main`) and head is the integration branch (`dev`) or a release branch pinned from it (`release/<version>`) is a **promotion, not a feature PR** — `pr-context.mjs` flags `promotion: true`. Prefer the pinned release-branch head: a PR from `dev` itself promotes whatever the tip happens to be at merge time, not the SHA that was validated (`resolve-release` principle 11). Don't re-review the whole accumulated diff; the feature code was already reviewed on its way into `dev`. Two rules:
8
+
9
+ 1. **It must fast-forward.** `pr-context.mjs` reports `fastForwardable`; if `false`, the base has commits the head lacks (almost always hotfixes), so promoting would **silently revert them** (and the merge resolution is unreviewed). → **`NEEDS_CHANGES`**, and the remedy must act on the **promotion head**, which is normally a pinned `release/<version>` branch rather than the integration branch: with an integration branch, back-merge `main → dev` **and then re-cut the release branch from a fresh candidate** (the back-merge alone leaves the already-cut head just as un-fast-forwardable, and rebasing it instead would silently break the SHA-keyed pin); in a single-branch model (GitHub Flow, where no `dev` exists), **rebase the release branch onto `main`** and re-run this review — cheap, because that branch is usually one version-cut commit, and sound because that topology already treats the pin as a pre-filter. Never merge-resolve into the production branch either way. Best enforced upstream as branch protection (require linear history). One topology check; it subsumes the drift + merge-resolution risks.
10
+ 2. **Run the release-readiness checklist** on the content — migrations/backfills, secrets & config, feature-flag defaults, version/changelog, rollback, and **candidate validation**: green CI **and** a recorded ALIVE integration-environment smoke verdict on the **exact promoted SHA** (SHA-keyed — a verdict from any other SHA, or "dev looked fine", is not evidence). These are batch/deploy-level risks no per-feature review saw. Then **skip the rest** — re-reading green, already-reviewed feature code adds noise, not safety.
11
+
12
+ **Candidate validation is topology-scoped, or it becomes unsatisfiable.** The SHA-keyed rule above assumes the promoted SHA *is* the validated SHA — true when the promotion fast-forwards an integration branch. In a single-branch model the release branch is rebased before merging, so the shipped SHA **by construction** never earned a verdict: demanding one would block every valid release. There the row is satisfied by a verdict on the **candidate the release branch was cut from**, marked as a pre-filter, and the binding gate moves downstream to the pre-exposure check on the 0%-traffic candidate (`resolve-release` principle 11 and step 4a). Record which reading you applied — an unmarked pass hides which gate actually held.
13
+
14
+ On the test side, a promotion uses the **release lane**, not a re-run: where it fast-forwards, prod is the exact SHA whose PR-lane gates already passed, so gate on that result — plus a read-only smoke against the **0%-traffic candidate, before traffic shifts**, run under a **read-only production profile** (`prod-preview`/`prod-active`) (against production a synthetic tenant is not sufficient). Never the mutating suite on prod (see `ensure-coverage` → `references/enforcement/ci-contract.md`, and `e2e-test`'s CI section).
15
+
16
+ (For a normal `feature → dev`/`main` PR, ignore this and use the four axes above.)
@@ -0,0 +1,18 @@
1
+ # Re-review — reconciling previous findings
2
+
3
+ **Trigger: prior review findings exist** in any form — review comments, a Required Changes list, a findings ledger. `lastReviewedSha` chooses the scope, not whether this applies; absent one, the re-review is full-scope (see the scope rules below).
4
+
5
+ ## Re-review: reconciling previous findings
6
+
7
+ A second (or later) review of the same PR is **not** a fresh review — it is a re-review, and its job is to verify that the prior round's required changes were *actually* made. The failure mode this prevents: a producer pushes a commit titled "address review findings," self-asserts done, and the loop exits on the claim while findings remain unfixed. **Resolution is verified against the tree, never accepted on the PR's say-so.**
8
+
9
+ When prior review findings exist (earlier review comments, a Required Changes list, or a contract's findings ledger):
10
+
11
+ 1. **Enumerate every prior finding** and re-check each against the *current* `base...HEAD` diff and tree — independently, the same way you'd verify a new finding (locate the code; reproduce the concern).
12
+ 2. **Classify each** as `Resolved` / `Partially resolved` / `Unresolved`, with the **same evidence bar as a finding**: a `Resolved` claim needs a verifiable locator (the `file:line`/test/commit that proves the fix). **A finding the PR claims resolved but whose fix you cannot locate, or which is still present in the diff, stays `Unresolved`** — do not downgrade it because a commit message or comment says it was handled. **A prior finding that carried a `hazard_candidate` needs two locators to reach `Resolved`: the code fix *and* its row in the repo hazards file (`docs/domain-hazards.md`)** — or an explicit `covered by <id>` pointing at an existing row; code-fixed but row-missing is `Partially resolved` (the lesson wasn't banked — [lifecycle](domain-hazards.md#the-repo-hazards-file-location-schema-lifecycle)).
13
+ 3. **A still-present finding does not reset.** It remains a finding at its original (or higher) severity, and a pattern of claimed-but-unfixed items is itself a credibility signal worth noting.
14
+ - **A fix that closes only the cited instance is still-present.** A finding names an instance; what it obligates is the *rule* — every path, field, state, and interleaving that rule covers. So reconcile against the **class**, not the line you cited: the fix should name the invariant class it closed and the adjacent members it checked, and you verify those members. Serializing the one union you named while the sibling classification stays unserialized is `Partially resolved`, not `Resolved`. This is worth being strict about because the alternative is not a missed bug but a *slow* one: the same invariant returns two rounds later at a wider scope, and each return costs a full fix + re-review + CI round. Size it to the finding, though — a rule that genuinely covers one instance closes in one instance, and demanding an enumeration there is nitpicking priced as a blocker.
15
+ 4. **Verdict gate:** the PR cannot reach `PASS` while any prior blocking finding is `Unresolved` or `Partially resolved`. New findings introduced by the fix commits are reviewed normally on top.
16
+ 5. **Scope: delta by default.** The fresh four-axis scan of a re-review covers the **delta diff** — `<lastReviewedSha>...HEAD`, where `lastReviewedSha` is the HEAD the prior verdict was rendered against (the caller passes it; `resolve-issues` records it per unit) — plus the prior-findings reconciliation above. The already-reviewed remainder of the PR is not re-read axis by axis: re-running the full adversarial review of an unchanged, already-reviewed diff every round is the single largest cost in the fix loop, and everything that can have changed since the last verdict is the delta plus the findings themselves. Two boundaries keep this safe: the **decidable screens** (`scan-diff.mjs`, `coverage-checklist.mjs validate`) still run over the **full** `base...HEAD` diff — they're cheap, and honesty regressions can hide anywhere — and the **verdict still covers the whole PR** (prior findings + delta findings + full-diff screens). Run a **full-scope** re-review instead when any of these hold: the surface is high-risk (auth/money/tenancy/migration), this is the third round (and every third thereafter — periodic full passes stop drift accumulating in the unreviewed remainder), the delta touches files outside the originally reviewed diff, no `lastReviewedSha` was provided, the branch was rebased **in a way that moved the production diff**, or the authoritative contract revision differs from the one used by the last verdict. (A rebase/restack that leaves the production diff byte-identical is an *evidence* refresh, not a code change: when a review is run over one anyway it is full-scope, but the caller should generally not spend one — `resolve-issues` routes that case to its evidence-only lane, reading each finding's `subject` rather than inferring it — so classify the findings of such a round accordingly. An approved contract revision overrides this and always forces the full review.) In the last case, old-contract findings remain useful history but their resolution table cannot substitute for reviewing the whole current contract.
17
+
18
+ Emit the **Previous Findings — Resolution Status** table ([output-format.md](output-format.md)) in the report so the reconciliation is auditable. This is the verifier half of the loop discipline in `resolve-issues` (which re-reviews after every fix and exits only on a fresh APPROVE).