@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,29 @@
1
+ # The high-risk protocol (deep lane — auth/money/tenancy/migration only)
2
+
3
+ This file is the **expensive lane, on purpose**. The first-pass failure class that dominates recovery rounds is domain-semantic bugs on four surfaces — auth/authz/token/session, money/tax/pricing, tenancy/org-scope/isolation, DB migrations/schema — where "balanced-coder implement + frontier review" reliably costs 2–3 extra rounds. Since 2026-08-02 the reviewer slot defaults to `gpt-5.5` (deep-reasoner) rather than being asked, so a run that takes the default gets a reviewer *below* the frontier pairing named here — this lane's warning applies more sharply, not less. Naming a frontier reviewer at the gate is the cheapest thing to do for a run that lands in this lane. These are the low-first-pass surfaces because their governing contract is the hardest to pin down up front — a **spec-maturity** signal, not a reviewer- or code-quality one. Units flagged `high-risk` by the intake heuristic run everything below **in addition to** the lean loop. Nothing here applies to any other unit: applying this lane broadly is exactly the process-weight regression the [removal path](../SKILL.md#the-removal-path-keep-this-skill-small) exists to stop.
4
+
5
+ ## Producer additions (step 1)
6
+
7
+ - **Domain-hazard hunt, producer side.** Carry into the producer spawn (and its self-review) the instruction to hunt the diff against the **domain-hazards catalog** (`<skillsRoot>/review-pr/references/domain-hazards.md` — absolute, per SKILL.md's leaf-spawn contract; a repo-relative path reads as nothing once this skill is installed elsewhere and the producer hazard-hunts from memory on exactly the surfaces this lane exists for) **and** the repo hazards file (`docs/domain-hazards.md`, via the `Domain hazards` index in `AGENTS.md`/`CLAUDE.md`). No repo hazards file on a high-risk surface → the producer **seeds** it as part of the unit (implement-and-pr owns seeding).
8
+
9
+ ## Reviewer additions (step 2)
10
+
11
+ Append to the reviewer spawn contract:
12
+
13
+ > This unit is HIGH-RISK. **(a) Hazard hunt:** read the repo hazards file plus review-pr's domain-hazards catalog and adversarially hunt the diff against every item — fail-open vs fail-closed, replay/idempotency, clock-skew, issuer/audience/scope, conversion direction, minor-unit precision + storage range, cross-org isolation. Any hit is a blocking code-correctness finding, and every blocking domain-semantic finding carries a `hazard_candidate` (the ready-to-paste hazards-file row, or `covered_by: <id>`) — you are read-only; the fix commit writes the row, the re-review verifies it. **(b) Round-1 depth:** before your first verdict, probe each changed live endpoint against the real running surface (authorization, boundary, pagination/filter, failure cases) and trace the changed contract through every shared first-party consumer; record concrete evidence for both, or `not-applicable` with a specific reason — never a silent deferral to a later round.
14
+
15
+ A prior finding with a `hazard_candidate` needs **two locators** to reconcile as Resolved: the code fix and its hazards-file row (or an explicit covered-by) — code-only is Partially resolved; the lesson wasn't banked.
16
+
17
+ ## Theme discipline and class-complete fixes (steps 2–3)
18
+
19
+ - **Findings carry stable themes.** A recurrence of the same underlying contract keeps its `theme.id` — the reviewer restates the general violated contract, not just the new counterexample. A second consecutive finding on the same theme is a signal the unit may be stuck *or* the reviewer over-blocking; carry it into the circuit-breaker diagnosis (SKILL step 3) rather than resolving it yourself.
20
+ - **State-machine/concurrency themes get class-complete fixes.** The fix enumerates the governing contract's full `state × task-kind` space, attaches a test + execution-evidence locator to every cell, and self-reviews every adjacent state under the same rule — a single counterexample test never closes the theme (it's how the same bug returns wearing a different input).
21
+ - **Deep-audit matrix only in this lane** (#792). `record-review-round` / `record-fix-round` accept a **lean** payload for routine units (`headSha`, `themeIds`, `reviewSubject`, `authorizationBoundary`, minimal findings; changed surfaces are diff-derived) without `migrate-unit` or the coverage matrix. The full state/task matrix (`coverage` + `selfReview` + finding `theme` objects) is required **here** — when the high-risk deep protocol is active, or when the payload itself carries those deep fields. **You run these**, from the `fixRound` matrix the fix spawn returns — the spawn never writes the manifest itself. Reach for the deep shape when durability of the audit trail matters more than speed; do not tax every NEEDS_CHANGES with it.
22
+
23
+ ## Integration (epics)
24
+
25
+ A high-risk unit is **always included** in the epic integration gate's integrated review, even when its surface looks disjoint — cross-org leaks, wrong issuer/audience, and fail-open defaults surface only once a sibling's caller exists, invisible to any per-unit diff review.
26
+
27
+ ## Cost expectation
28
+
29
+ A high-risk unit is not a 45-minute unit and is not supposed to be. The budget goes to round-1 depth so the domain-semantic bug is caught **once**, early — not discovered on round 3 after two shallow fixes.
@@ -0,0 +1,156 @@
1
+ # Incident #848 — the circuit-breaker's founding incident
2
+
3
+ This is the distilled, **shippable** record of the resolve-issues run behind the
4
+ round circuit-breaker's existence and threshold. It carries the incident's
5
+ metadata, its round profile, the finding **class labels** (theme ids), and the
6
+ lessons — **never the finding bodies**. The bodies describe real, now-fixed
7
+ concurrency and authorization defects in a production payments/risk repo;
8
+ they are preserved out of the distributed skill. See
9
+ [Data provenance](#data-provenance) for where the raw evidence lives and why.
10
+
11
+ ## What the incident established
12
+
13
+ Epic `issue-848-849` (resolve-issues, target branch `dev`) is the primary source
14
+ behind four decisions:
15
+
16
+ - **The design gate + the round circuit-breaker (#344).** The breaker threshold
17
+ was set to 4 and lowered to 3 a minute later — this run is why. Unit #848 ran
18
+ nine review rounds without converging; a mechanized stop-and-ask is the direct
19
+ response.
20
+ - **The evidence for `units[].rounds` (#359).** Reconstructing what actually
21
+ happened here required a per-round record the manifest did not yet keep.
22
+ - **A PASS is not terminal.** Unit #848's round-6 PASS was reversed by later
23
+ rounds — one of only three known cases of a PASS being overturned, and the
24
+ flagship one. See [The PASS reversal](#the-pass-reversal).
25
+ - **The loop earns its cost on production code.** Across the rounds the review
26
+ surfaced ~15 distinct real implementation defects — concurrency and
27
+ authorization bugs in a payments risk engine — one adversarial round at a
28
+ time. This is the strongest available evidence that the loop pays for itself
29
+ on high-risk code.
30
+
31
+ ## The two units
32
+
33
+ | Unit | Review rounds | Final status | Final verdict | Role |
34
+ |------|---------------|--------------|---------------|------|
35
+ | #849 | 1 | merge-ready | PASS | The control case — the well-specified sibling that passed on the first review. |
36
+ | #848 | 9 | in-progress | NEEDS_CHANGES | Never reached merge-ready; the founding evidence. |
37
+
38
+ #849 passing in a single round while its sibling took nine is the contrast that
39
+ matters: the loop is cheap on a well-specified unit and expensive exactly where
40
+ the specification (and the underlying implementation) was not sound.
41
+
42
+ ## Unit #848 — round profile
43
+
44
+ Verdict sequence, reconstructed from the surviving per-round result files plus
45
+ the manifest. The initial review is **round 1**, recorded as the `runner` result
46
+ file (`review-848-runner-result.json`) — its four themes match the manifest's
47
+ round-1 entry one-to-one. Only the `r7` result file decayed from OS temp before
48
+ rescue; its round survives solely through the manifest.
49
+
50
+ | Round | Verdict | Findings |
51
+ |-------|---------|----------|
52
+ | r1 (runner, initial) | NEEDS_CHANGES | 4 |
53
+ | r2 | NEEDS_CHANGES | 1 |
54
+ | r3 | NEEDS_CHANGES | 2 |
55
+ | r4 | NEEDS_CHANGES | 3 |
56
+ | r5 | NEEDS_CHANGES | 1 |
57
+ | **r6** | **PASS** | 1 (non-blocking note) |
58
+ | r7 *(result file lost)* | NEEDS_CHANGES | 2 themes (manifest) |
59
+ | r8 | NEEDS_CHANGES | 1 |
60
+ | r9 | NEEDS_CHANGES | 1 |
61
+ | r10 | NEEDS_CHANGES | 4 |
62
+
63
+ Manifest metadata: `reviewRounds: 9`, `status: in-progress`,
64
+ `lastVerdict: NEEDS_CHANGES`.
65
+
66
+ ### The PASS reversal
67
+
68
+ The **round-6 PASS was reversed by r7/r8/r9/r10** (r7's NEEDS_CHANGES survives in
69
+ the manifest even though its result file is lost). This is the flagship evidence
70
+ that a PASS is not a terminal state — a later round, looking wider or at a fix
71
+ that introduced a new blocker, can and did overturn it. It is one of three known
72
+ cases and the one most worth citing when the PASS-reliability question is
73
+ revisited.
74
+
75
+ ### The defect class
76
+
77
+ All ~15 defects landed on **one subsystem**, and every **defect-class** theme id
78
+ shares the `blacklist-repair-*` prefix. The theme ids are safe class labels —
79
+ they name the invariant a finding violated, not the exploit — so they are
80
+ recorded here; the finding bodies are not. The distinct defect-class themes
81
+ observed (the round-7 theme survives only in the manifest, its result file having
82
+ decayed — see [Data provenance](#data-provenance)):
83
+
84
+ - `blacklist-repair-live-claim-fence`
85
+ - `blacklist-repair-already-correct-case-reconciliation`
86
+ - `blacklist-repair-immutable-cutoff-cohort`
87
+ - `blacklist-repair-mandatory-package-postflight`
88
+ - `blacklist-repair-preflight-execution-parity`
89
+ - `blacklist-repair-transactional-cohort-revalidation`
90
+ - `blacklist-repair-authoritative-case-postflight` *(round 7 — manifest only)*
91
+ - `blacklist-repair-terminal-winning-case-authority`
92
+
93
+ Three further round-10 ids — `blacklist-repair-orchestrate-runtime-proof`,
94
+ `blacklist-repair-exact-head-attestation`, and
95
+ `blacklist-repair-manual-postflight-binding` — plus the
96
+ `review-evidence-full-range-diff-check` note (rounds 6 and 7) are
97
+ **process/evidence** themes (review-artifact and runtime-proof obligations), not
98
+ defect classes, so they sit outside the census above.
99
+
100
+ The shape — one subsystem, many rounds, a recurring family of concurrency and
101
+ authorization invariants re-raised at a wider scope each round — is exactly the
102
+ "fix the class, not the counterexample" failure the SKILL.md fix-round rules and
103
+ the breaker exist to catch.
104
+
105
+ ## Models
106
+
107
+ A Pi/GPT run (`confirmedAt` 2026-07-17):
108
+
109
+ - Implementer: `gpt-5.6-terra`
110
+ - Reviewer / oracle: `gpt-5.6-sol`
111
+
112
+ (The oracle slot has since been removed from resolve-issues; it is recorded here
113
+ only as a fact of this historical run.)
114
+
115
+ ## Data provenance
116
+
117
+ - **Lost:** only the `r7` per-round result file had decayed from OS temp before
118
+ this rescue. **Round 1's result survives** — it is the `runner` result file
119
+ (`review-848-runner-result.json`), whose four themes match the manifest's
120
+ round-1 `reviewHistory` entry one-to-one. `r7` is the single lost file; its
121
+ verdict (`NEEDS_CHANGES`) and themes are reconstructable only through the
122
+ manifest, not from a result file. The mirror case is round 10: the manifest
123
+ `reviewHistory` recorded rounds 1–9 (`reviewRounds: 9`), so the round-10 review
124
+ survives **only** as the `r10` result file, with no manifest entry.
125
+ - **Raw artifacts (committed, in-repo, NOT shipped with the skill):** the
126
+ surviving per-round result JSONs and the run manifest live at the repo root
127
+ under [`incidents/848/`](../../../../../../incidents/848/) — deliberately
128
+ outside `skills/` because that directory is distributed to team members via a
129
+ symlink farm, and the raw files contain the full finding bodies. See
130
+ [`incidents/README.md`](../../../../../../incidents/README.md).
131
+ - **Excluded for size:** `review-848-r5-scan.json` (~1.6 MB) is raw
132
+ over-mock scan output, not incident evidence. It was preserved out-of-band but
133
+ is not committed.
134
+ - **Round-7 timestamp corruption — already fixed by #379.** The manifest's
135
+ round-7 timing had `startedAt` (`2026-07-17T15:09:41Z`) *after* `endedAt`
136
+ (`07:24:57Z`): a local CST (UTC+8) value stamped with a `Z` as if it were UTC.
137
+ The cause was the orchestrator **hand-writing** `units[].timings` per a prose
138
+ step. **#379 deleted `units[].timings`.** Its replacement, `units[].rounds[].at`,
139
+ is written through `run-state.mjs`'s `nowIso()`, which returns
140
+ `new Date().toISOString()` — correct UTC, machine-written, never hand-stamped.
141
+ So #386's "fix the timestamp-field bug" acceptance criterion is
142
+ **satisfied-by-#379**; no further fix is needed, and none was made here.
143
+
144
+ ## Manifest durability (recommendation recorded, change deferred)
145
+
146
+ The broader risk this incident exposes: run manifests are the only record of how
147
+ the loop actually behaves, and they live only in `$TMPDIR/resolver-runs/`, which
148
+ OS cleanup collects. At the time of rescue, **211 manifests covering 432 units**
149
+ sat there with no durable copy — one #848 file was already gone.
150
+
151
+ **Recommendation (not implemented in #386):** give the run store a durable
152
+ default — e.g. honor a `RESOLVER_RUN_DIR` env var pointing at a durable path, or
153
+ archive a run's manifest on completion into a tracked location. This is filed as
154
+ a tracked follow-up: **#418**. The change is deliberately out of scope for the
155
+ rescue unit (#386), which only preserves the #848 evidence and records this
156
+ decision.
@@ -0,0 +1,86 @@
1
+ # Intake and scheduling
2
+
3
+ How issues become units, how units are scheduled against interference, and what is
4
+ *not* a unit. Pre-flight runs before all of this and is indexed from
5
+ [SKILL.md](../SKILL.md#pre-flight-once-before-intake--never-mid-run). Next phase:
6
+ [loop.md](loop.md).
7
+
8
+ ## Intake & scheduling
9
+
10
+ - **Classify every unit before scheduling it.** Run `scripts/unit-kind.mjs classify --stdin`
11
+ with the issue title/body and record its returned `unitKind`, `kindRecommendation`, and
12
+ `kindConfirmation`. The closed kinds are `implementation`, `external-verification`,
13
+ `human-decision`, and `prerequisite`. External dispatch, physical presence, credentials,
14
+ hardware, provider observation, third-party approval, or a human decision requires
15
+ explicit confirmation with `confirmedBy` and `confirmedAt`.
16
+ - **Classify evidence/authorization lifecycle semantics at the same intake boundary.** Pass
17
+ `declaredScope` and planned `changedSurfaces` to `unit-kind.mjs`; each declaration is
18
+ `ordinary` or `evidence-authorization`, and unknown/malformed entries fail toward the
19
+ required class. Sensitive required-check, admission, enqueue, synthetic queue-head, and
20
+ delivery-ancestry surfaces override an `ordinary` declaration. A classified unit records
21
+ `evidenceLifecycle` and a versioned `evidenceLifecycleContract` covering every discovered
22
+ condition's phase, immutable SHA kind, producer, provider/acquisition operation, consuming
23
+ transition, and failure behavior. Run `evidence-lifecycle-contract.mjs validate <artifact.json>`;
24
+ the same validator runs inside `spawn-contract`, so missing, unsupported, mismatched, or
25
+ circular contracts refuse before implementation. This is focused workflow-design admission,
26
+ not an expansion of the auth/money/tenancy/migration high-risk tier. Ordinary unclassified
27
+ units retain the lean path with no artifact.
28
+ - **Only `implementation` enters produce/review/CI/delivery.** An external unit may own a
29
+ runbook, validator, or harness artifact, but artifact `PASS` is preparation evidence only:
30
+ never external completion or delivery. Never dispatch or claim a human-only operation
31
+ from a harness result.
32
+ - **External verification carries its protocol in state.** `externalProtocol` records
33
+ prerequisites, authorized actors, environment identity, allowed operations, stop/retry
34
+ policy, required evidence keys, and completion source. `externalCompletion` is valid only
35
+ when its source, actor, environment, operation, and evidence match that protocol exactly.
36
+ - **Completion dependency differs from code interference.** `completionDependsOn` allows
37
+ implementation to build/review while external/human work is pending, but blocks delivery.
38
+ Omit it for independently shippable code; progress reports both kinds separately.
39
+ - **Normalize to units.** Non-trivial work without approved test criteria → **stop and request them** (ensure-coverage create mode needs human sign-off); every unit owes baseline coverage for every surface it touches, ACs or not.
40
+ - **Decomposition gate (epics only, at intake, before any producer spawn).** An epic's children are not evidence they cover it. Map every parent requirement — numbered stories, constraints, named buckets/enums/reason codes, testing decisions — to the child that owns it, and diff the two sets. Every unowned requirement is either written into a child's ACs or deferred to a tracked issue named in the handoff. **An epic whose parent requirements live nowhere in its children does not start.** Re-run the same diff at the exit audit; children drift after intake. Fires **once per epic, never per unit** — the cost is a set-difference over two issue bodies. → [why](why.md#decomposition-gate)
41
+ - **A roster that grows mid-run re-runs the decomposition gate, at the moment it grows.** When units are added to a live roster, re-run the set-difference and answer one further question explicitly: **which of the new units block a component that is already merge-ready?** The default answer is **none** — a unit that did not exist when a component reached its bar cannot retroactively become its prerequisite. Record the answer in the manifest rather than leaving it to scheduling order. → [why](why.md#a-roster-that-grows-mid-run)
42
+ - **A surface every sibling disclaims has no owner.** When two or more children each place the same surface outside their own scope — *"X changes only indirectly"*, *"X remains agnostic"*, *"X is handled by \<sibling\>"* — that surface is unowned. At the decomposition gate, collect the disclaimed surfaces across the roster and give each an explicit owner or a tracked issue. → [why](why.md#a-surface-every-sibling-disclaims)
43
+ - **Prior-art check before any code** (epics: fan out via `prior-art-scan.workflow.js`): search PRs (`gh pr list --search`), the codebase, and issue state. Route true prior art to the `already-done` disposition; an open PR resumes at review/fix; partial work scopes the remainder; otherwise implement. A human descope is never prior art: record it only with `record-scope-decision`, including the human evidence and issue/PR dispositions. Unsure → ask, do not silently re-implement.
44
+ - **Scope double-check — verify the sizing yourself.** Before spawning, ask of each unit: would implementing this plausibly mean a **new subsystem**, **several separable deliverables**, or a diff far beyond a routine unit (one surface, a few hundred lines)? If yes, **propose the split before any code** — named slices in dependency order, one HITL ask; the human confirms, since scope is their call, but the proposal is your job, made from the issue's content. → [why](why.md#scope-double-check)
45
+ - **Design gate (before any producer spawn — implement-and-pr's design-input rule, enforced here because leaf spawns can't ask the human).** Apply the two-questions test to each unit: *would two reasonable implementers build materially different things from this issue?* and *does correctness depend on never-happens — orderings, failures, retries, partial states — the ACs don't state?* Either yes with no design/ADR in the source → **hand the unit back; do not produce the design here.** This is a terminal answer, not a problem to solve in-run: **no `autonomy` level drafts a missing contract**, and the one that briefly did was cut. Say what is missing, name `/grill-with-docs`, and stop that unit — the human lands the design and re-enters intake with it as the unit's design input. **Do not interview the human yourself, and do not route the resulting doc through the loop** ([prerequisites are not units](#prerequisite-artifacts-are-not-units)). Mechanically: set the unit's status to `blocked` (`run-state.mjs` accepts `queued|in-progress|merge-ready|blocked|skipped-already-done`, so record the "needs design" cause in the unit note, not as a status the schema rejects). When the human returns with the doc, re-enter intake and carry it into both the producer and reviewer spawns as the contract to build and verify against. Other units keep moving — a design-blocked unit never halts its siblings. **Most routine units answer no-no** — the issue is the design; blocking those on a brief is the over-triggering failure, not rigor. → [why](why.md#design-gate)
46
+ - **On a [`high-risk`](high-risk.md) unit the second question is presumed *yes* — it owes an enumerated invariant list, not a judgment call.** The gate inverts for them: a high-risk unit spawns its producer only when the source already enumerates the invariants the implementation must hold — fail-open vs fail-closed, replay/idempotency, issuer/audience/scope, conversion direction and precision, cross-org isolation, as its surface demands. An issue that merely *describes* the change does not clear it. **A contract pointer is not an invariant list.** → [why](why.md#high-risk-units-owe-an-invariant-list)
47
+ - **These gates bind resumed and in-flight units, not just fresh ones** — including units that entered the loop before the gates existed. Re-apply the scope and design checks before the next producer or fix spawn on a resumed unit. → [why](why.md#the-gates-bind-resumed-units)
48
+ - **Contract-revision gate (before every producer/reviewer spawn, and on resume).** Fetch the target branch and resolve the unit's authoritative approved design/test criteria **there**, not from a stale PR summary or the implementation branch's copy. Record the target-branch commit and refs in `units[].contractRevision`; derive freshness with the mechanized gate — `contract-revision.mjs check --in <manifest> --unit <id> --head <unit HEAD>` (exit 1 = HEAD lacks the approved revision → re-enter; **exit 2 = the pointer itself is unusable** — malformed, or it cites an artifact that does not exist at the approved commit, which no rebase can repair: fix the citation or land the missing doc, and do not spawn against a contract that is not in the tree; a `FRESH but review is stale` result means proceed but the exit gate owes a full-scope review), never a hand-eyeballed ancestry. If an approved revision affecting the unit landed after its recorded base or the contract used by its last review, stop the loop and re-enter intake: re-apply scope/design/risk, rebase onto the target branch containing the revision, and reconcile the **whole implementation** to the current invariant list before another review. Pre-revision review verdicts, CI, runtime evidence, and `lastReviewedSha` are historical only; they cannot authorize exit, and the next review is full-scope. An implementation PR cannot make itself compliant by weakening its own source/test criteria unless that source change is itself explicitly approved. → [why](why.md#contract-revision-gate)
49
+ - **Risk-tier each unit (this decides how much process it gets).** Auto-flag **`high-risk`** when ACs or diff touch auth/authz/token/session, money/tax/pricing, tenancy/org-scope, or a DB migration/schema change. A high-risk unit runs the loop below **plus** [references/high-risk.md](high-risk.md) — the deep protocol (hazard hunt, round-1 depth probing, theme-complete fixes, forced integration review). **Everything else runs only the lean loop — keep it cheap; that is the point of the tier.** Record the flag in the manifest.
50
+ - **Epic scheduling — [interference](#interference-scheduling-and-workspaces) is the primitive.** Record it as you find it: `dependsOn` carries the **blocking** edges (`{"unit":"#879","source":"symbol"|"premise"}`; a **premise** edge also owes `"invariant":"<the specific wrong behavior that would be live>"`, because the dependent is now built concurrently *against that sentence* rather than waiting — [interference.md](interference.md) has the counterfactual that decides the grade, and `runnable` prints `NO INVARIANT RECORDED` when it is missing), `sharedSurfaces` carries the **assembly** ones (units touching the same route/component/schema — individually green can be collectively red). Then everything else is derived: `run-state.mjs runnable <slug>` gives the capped runnable set, `plan` gives the [component](deliverables.md#deliverables-the-shippable-component-not-the-whole-epic) grouping. A dependent unit **stacks** (branches off its dependency's branch — off bare `targetBranch` its diff references missing symbols, or rests on an invariant that is not there yet; a co-delivered unit's PR is a review artifact within its component, not an individual merge). Read-only stages — reviews and prior-art — parallelize as they always have. A blocked unit never halts siblings, and its **component** ships when ready regardless of a stuck sibling in another component. Mirror roster transitions via `run-state.mjs upsert-unit`.
51
+ - **All blocked, nothing movable:** hand the human the decision batch with a recommendation each — say for every unit whether you read it as a mis-diagnosed blocker or as genuinely re-scopable, and which.
52
+ - **Report the plan before the first producer spawn — `run-state.mjs plan <slug>`, pasted whole.** It names the roster and its dependency order, the components, the risk tiers, what the decomposition gate deferred and to which issue, and every unit still owing an answer — once, at the moment it is all settled and nothing has been built yet. **Rendered, not narrated.** Record the two things intake owes the manifest rather than holding them in your head — **`upsert-unit` carries `dependsOn`, `merge` carries `deferrals`**:
53
+
54
+ ```
55
+ run-state.mjs upsert-unit <slug> '{"id":"#880","status":"queued","dependsOn":["#879"]}'
56
+ run-state.mjs merge <slug> '{"deferrals":[{"requirement":"<parent requirement>","trackedIn":"#<issue>"}]}'
57
+ ```
58
+
59
+ `dependsOn` is the stacking edge — a dangling or circular one is refused. `deferrals` needs the issue tracking it; an untracked deferral is refused. **This is a report, not a gate:** it stops nothing. What stops the loop is what it *contains* — a unit blocked on design, a scope split to confirm, missing test criteria — and those asks were already owed by their own gates; the plan is where they arrive together instead of one interruption at a time. → [why](why.md#plan-and-progress-reports)
60
+ - **Report progress each time a unit reaches a terminal disposition — `run-state.mjs progress <slug>`.** The rendered headline separates delivered, handed back, already done, human-descoped, blocked, and unresolved totals. Descoped requirements never enter the delivered, already-done, or resolved counts. It also names any unit sitting `merge-ready` with no terminal disposition. → [why](why.md#plan-and-progress-reports)
61
+
62
+ ## Interference, scheduling and workspaces
63
+
64
+ **Interference is the primitive** — one unit's correctness depending on another's tree — and both boundaries this loop cares about are derived from it. Design input: [ADR 0001](../../../../docs/adr/0001-interference-is-the-scheduling-primitive.md); vocabulary: [CONTEXT.md](../../../../CONTEXT.md). Mechanics, the reap procedure and the cap's reasoning: [references/interference.md](interference.md).
65
+
66
+ **Two grades, and they do not have the same effect — nor, since 2026-08-04, do the two *sources* within the blocking grade.** **Blocking** interference means the dependent cannot be *correctly shipped* until the other unit is in the tree; both sources block **delivery**, only one blocks the **build** — a **symbol edge** (the diff references symbols the other unit creates, so its base branch does not exist yet; fails loudly, derivable from the diff) and a **premise edge** (correctness rests on an invariant the other establishes; builds and passes in isolation while encoding a false premise, so it fails *silently* and **can only be declared, never derived** — if intake does not record it, every later gate agrees the work is fine and it ships in the wrong order). **Assembly** interference — a shared surface — prevents independent *validation* only.
67
+
68
+ **A premise edge does not hold the build back; it holds the *merge* back.** The dependent compiles, its surface is its own, and it is scheduled concurrently with the unit it rests on — carrying that unit's `invariant` verbatim into its producer and reviewer spawns, which is what makes the premise *declared* rather than silent. What keeps it from shipping first is the merge gate, which already refuses a component whose dependencies are not in the target. Blocking the schedule as well was a third enforcement of one ordering, and it cost the whole graph's depth: `epic-25-proposal-generator` ran 12 units at 1.7× parallelism behind 18 premise edges. → [interference.md](interference.md)
69
+
70
+ **Only the blocking grade constrains scheduling — and within it, only the symbol source.** Shared-surface units build concurrently and the integration gate re-validates them; that gate is already mandatory for every multi-unit component, so serializing them buys detection that exists either way and costs the most on the common epic shape. **Only the co-delivering sources — symbol and assembly — define a [component](deliverables.md#deliverables-the-shippable-component-not-the-whole-epic).** A premise edge *orders* two components; it does not bundle them.
71
+
72
+ **A unit is `runnable` when every unit it blocking-interferes with is pushed** — pushed, not merged, which is the whole win. **A run advances as a continuously refilled, capped runnable set:** ask `run-state.mjs runnable <slug>` whenever a unit reaches any milestone, admit what it names, and never wait for a barrier. There is no wave, batch or epoch here, deliberately. The **in-flight cap** bounds disk and dependency-install cost, **not correctness** — `inFlightCap` is **4, and the loop does not choose it**; `1 for fully serial` stays expressible for a human who has measured a reason, but it is never this skill's decision. → [why](why.md#the-in-flight-cap-and-its-default)
73
+
74
+ **A workspace belongs to a unit**, from its first producer spawn until the unit is delivered or handed back. Fix rounds reuse it, so the install is paid once per unit rather than once per round, and a dead spawn's replacement resumes in place. Two units never share a tree — `validate` refuses it.
75
+
76
+ **The orchestrator's checkout is not a unit's workspace, and no unit's workspace is the orchestrator's checkout.** You coordinate; you do not write code. **Do not run git in a workspace while its spawn is live**, and do not point a unit at the tree you are working in — `validate` refuses that too, and the reap refuses to remove it. → [why](why.md#the-orchestrator-is-a-writer-too)
77
+
78
+ **Preserved on death, reaped only on success.** A workspace is removed only when its unit is delivered or handed back **and** the tree holds nothing unpublished — no uncommitted change, no untracked file, no commit that is on no remote. Anything unreadable or ambiguous preserves. Orphans from dead sessions are collected by an explicit reap that reads recorded paths *and* `git worktree list`: `workspaces.mjs reap <slug>` plans, `--apply` removes.
79
+
80
+ ## Prerequisite artifacts are not units
81
+
82
+ **A design, ADR, or test-criteria document is an *input* to this loop, never a *deliverable* of it.** Whatever produces it — a human, `/grill-with-docs`, an earlier session — it does **not** get a producer spawn, an independent-review spawn, a PR of its own, a merge-queue delivery, or an ancestry gate. It is landed by the human, or it rides along in the unit's own branch as part of the unit's diff.
83
+
84
+ The failure this exists to stop is not hypothetical and not an agent misbehaving — it is what the gates say to do when nothing scopes them. The design gate blocks; the [contract-revision gate](#intake--scheduling) requires the approved contract to exist at a commit; a commit becomes a branch, a branch becomes a PR, and a PR is owed guarantee 2's independent review, guarantee 3's fresh verdict, and delivery's ancestry proof. Each step follows correctly from the last, and the result is the whole pipeline running against a documentation file. **Measured: 64 minutes, 5 spawns, ~$2, zero lines of the feature — $1.07 of it spent adversarially reviewing a 91-line ADR whose `scan-diff` was empty because there was no code in it.** → [why](why.md#the-design-gate-hands-back)
85
+
86
+ The rule in one line: **if the artifact contains no code, it does not enter the loop.** Route it back to the human and stop the unit.
@@ -0,0 +1,53 @@
1
+ # Epic integration gate — the full procedure (assemble → gates → review → smoke → verdict → combined PR → authorized merge)
2
+
3
+ This is the complete procedure behind SKILL.md's [epic integration gate](deliverables.md#deliverables-the-shippable-component-not-the-whole-epic). Start it when the first unit reaches preliminary PASS, update it as each later unit becomes ready, and finish it only after the complete component candidate is frozen and terminally authorized. The gate is **mechanized in [`combine-and-verify.mjs`](../scripts/combine-and-verify.mjs)** (assemble, gate arithmetic, verdict, merge gate); run `combine-and-verify.mjs --help` and treat the script as the source of truth for exit codes, flags, and merge order. This file is the **why** and the **judgment the script does not encode**: which spawns the orchestrator drives, and the incidents that shaped the gate.
4
+
5
+ ## Why the gate exists
6
+
7
+ The per-unit loop proves each PR merge-ready **against its own base, in isolation.** That is exactly the blind spot behind a whole class of post-merge bugs: every slice of an epic is green on its own branch, yet the slices **contradict or conflict once combined** on the integration branch. This is not hypothetical — it is the **#235** failure mode (the per-org login epic): one slice's tests asserted a *"Continue with Feishu"* button while a sibling slice replaced that button with an embedded QR panel; e2e specs assumed bare `/login` showed the credential card until a sibling made it show org-entry first; a second responsive logo a sibling added tripped strict-mode locators. Each slice passed review alone; the combination was red. No per-PR review can see this, because the conflicting sibling isn't in the PR's diff.
8
+
9
+ A prose-described, late-in-a-long-run gate degrades to a lookalike or gets skipped ("no cluster"); a script cannot be forgotten. That is why the gate is `combine-and-verify.mjs`, which emits **`integration-verdict.json`** — `ALIVE` **only when** the combined tree assembled clean AND its CI, integrated review, and smoke each came back green. Anything else (including the `pending` the assemble step writes) stays DEAD: the forcing artifact a merge/promote step refuses to proceed without.
10
+
11
+ Once the verdict is `ALIVE`, the integration branch is **not throwaway** — it *is* the deliverable, **published as one combined PR** (step 6). The component hands back a *single* CI-green PR rather than N per-unit PRs. (`resolve-release` still owns promoting→deploying to production, but the assembly + integration verification it would otherwise do at promotion time is already done here, so it consumes pre-combined, integration-verified PRs — its promotion-time assembly is a no-op re-verification of the tip, principle 2, not a fresh N-way merge.)
12
+
13
+ ## Scope: the deliverable is a component, not the epic
14
+
15
+ This gate runs once per multi-unit [component](deliverables.md#deliverables-the-shippable-component-not-the-whole-epic) (a shared-surface cluster or a dependency chain), **not** once over every unit an epic contains. Two units in *different* components — no shared surface, no dependency edge — are not assembled together; bundling them is what lets one stuck unit freeze finished ones (the **epic-848** incident). A completed upstream component ships even while a downstream one is still stuck (a dependency doesn't wait on its dependents).
16
+
17
+ **Why one combined PR *per component*, not N PRs merged one-by-one.** Under "require branches up to date before merging," a dependency chain merged unit-by-unit pays for itself twice: every merge advances `targetBranch` and invalidates the up-to-date status of every other open PR in the chain, forcing each to update + re-run required CI — N serialized merges and a re-CI on every step. Stacked PRs don't escape it (merging the bottom of the stack puts everything above it behind the base). The combined PR collapses the chain into **one** branch → **one** up-to-date check → **one** CI → **one** merge; dependency order is resolved *internally* at assembly. That churn argument is exactly why a component is a dependency chain, not an arbitrary bag of units — and why it does **not** justify combining *unrelated* components (two disjoint components share no branch and no up-to-date dependency, so merging one never invalidates the other; combining them creates only head-of-line blocking).
18
+
19
+ ## The steps — what the orchestrator drives (the script owns the arithmetic)
20
+
21
+ `combine-and-verify.mjs` owns the decidable shell: `assemble` (integration branch off the freshly-fetched `origin/<targetBranch>`, merge units in dependency order, record conflicts, gates start `pending`), `verdict` (exit 0 = ALIVE, 1 = DEAD), and `mergeable` (the step-7 gate). It never owns the **judgment (review)** or the **driving (smoke)** — those are the orchestrator's, and they are what this section exists for.
22
+
23
+ 1. **Progressively assemble (mechanized).** As soon as a unit reaches preliminary PASS, assemble every currently-ready unit in dependency order and record the snapshot with `run-state.mjs record-component-candidate <slug> <component> --stdin` using `roundClass: "unit-discovery"`. Re-run this after each newly-ready unit so conflicts and integrated-test failures appear before the roster finishes. A merge conflict is a finding. If it exposes a unit-owned defect, reopen that unit with typed `integration-finding`; if the correction only reconciles the combined tree, own it on the integration branch and record the next snapshot as `roundClass: "integration-fix"` with `integrationFix.owner: "integration"`. Never silently rewrite a passed unit branch.
24
+ 2. **Re-run integrated tests on every progressive snapshot; run the full gates on the complete candidate, not the per-unit diff** — the whole unit suite (`lint-tests` whole-tree + `coverage-ledger validate`), the **presentation sweep on every shared surface the cluster touched** (the real render of the *integrated* page, the only place a sibling-induced regression like the invisible button or the strict-mode double-logo shows up), and CI on the integration branch. Green-per-unit does not substitute for green-combined.
25
+
26
+ **Discover and freeze `required-check-plan.json` before freeze.** Query the live GitHub ruleset/branch conditions and Mergify merge-admission conditions, preserve them in the plan, and bind the plan to the complete candidate HEAD. GitHub rulesets retain their live `ref_name` include/exclude/default-branch scope and only applicable target-branch rulesets contribute checks; unsupported or ambiguous rule shapes fail closed. Mergify conditions retain source and phase identity: queue entry, auto-enqueue, and merge protections are `pr-head`; merge conditions are `queue-head`. Every discovered check has exactly one `locally-reproduced` or `publish-only` classification with evidence and explicit phase membership. Exact-head CI derives only PR-head local jobs from this plan; it does not accept hand-authored `requiredJobs`. Changed-path exemptions remain structural in their phase tree, and a skip never counts as success. Epic-892 is the incident: the terminal component suite passed 1,060 resolver tests plus distribution/lifecycle checks, but omitted deterministic `skill-size`; the combined PR then failed and moved the reviewed head. An omitted live check therefore refuses authorization even when supplied jobs are green. A genuinely PR-head publish-only check remains explicit; keep the candidate frozen, publish the unchanged frozen head, bind the provider result to that same SHA, then authorize. Legacy evidence without a plan fails with migration guidance rather than claiming complete coverage.
27
+
28
+ Record the combined CI result into `gates.ci`. When CI requires PR mutation, run the [exact-head CI adapter](exact-head-ci.md), then `combine-and-verify.mjs record-exact-head --in integration-verdict.json --artifact exact-head-artifact.json`; a pending/failing artifact or an artifact SHA that differs from the assembled tip keeps the candidate DEAD. A queue-head condition is retained in the plan but is not PR-head authorization evidence: its plan entry must name a provider/acquisition mapping before enqueue. The queue watcher captures provider-issued `queue-execution` evidence only after the provider creates and tests a distinct synthetic queue head. It is post-delivery proof, not a prerequisite for `ALIVE` or enqueue eligibility.
29
+ 3. **Freeze, then run one terminal independent review of the integrated diff.** Once every component unit is included and assembly/tests are clean, call `run-state.mjs freeze-component-candidate <slug> <component> --stdin` with the exact candidate HEAD. No commits are allowed between freeze and the terminal gates. Then run one independent review of the integrated diff — `read <skillsRoot>/review-pr/SKILL.md and follow it`, don't improvise; spawn it on the confirmed **review model at its confirmed effort** (SKILL.md's leaf-spawn contract, clauses (a) and (d)), scoped to `target...integration-branch`. It carries [step 2](loop.md#2--review--ci-same-breath-same-head)'s contract in full, **including its two proof artifacts** — the `coverage-checklist.mjs validate` result and the `scan-diff.mjs` findings channel — and a verdict arriving without them is rejected before it is read. For every lifecycle-classified unit, it also receives the validated `evidenceLifecycleContract` and compares the integrated implementation against each condition's phase, SHA kind, provider/acquisition path, consuming transition, and failure behavior. That artifact is design input, never a substitute for this independent review or provider-issued evidence. On top of that contract, this review reconciles the cluster's tests against each other: does any unit's test assert behavior a sibling changed? does each shared surface still render and behave correctly with all slices present? Record the verdict into `gates.review`.
30
+
31
+ *Why this step spells the contract out instead of linking it:* a markdown link can't be pasted into a spawn prompt, and until 2026-07-20 this step offered nothing else — no read instruction, no model, no proof bar — while the `smoke` gate one line below was fully mechanized. That asymmetry is the class-(A) failure this file's own opening warns about, sitting on the **latest-firing gate in a long run**, where a prose verdict written into `gates.review` is read by `verdict` as a green gate on the way to `ALIVE`.
32
+ 4. **Run the curated E2E happy-path smoke gate (skill: `smoke`).** The combined suite being green is necessary but not sufficient — the **#237** bugs (an invisible primary button, a component that crashed on mount) shipped *with* a green suite, caught only by **running the real app**. Boot the assembled integration branch (`--target local`), drive the selected golden paths into `smoke-results.json`, then reduce them to `smoke-verdict.json` — `read <skillsRoot>/smoke/SKILL.md and follow it`, don't improvise. It returns ALIVE / DEAD; record it into `gates.smoke`.
33
+
34
+ **The honest not-applicable path (#393).** A component in a repo with **no bootable surface and no curated golden-path manifest** genuinely cannot run smoke — this skills repo is the standing example (no root `package.json`, no app to boot, only the smoke skill's own shipped example manifest). For that case, and only that case, record `gates.smoke = 'not-applicable'` **plus** a top-level `smokeNotApplicableReason` on the verdict naming why (`combine-and-verify.mjs` then lets the smoke gate reach ALIVE on that reasoned N/A). This is the **same honesty pattern as green-gate's N/A**: an N/A-with-reason is *not* a pass fabricated to get green. The guardrails are sharp and enforced by the script:
35
+ - **Fabricating `smoke: 'ALIVE'` where the app never ran is still forbidden** — writing a gate result no gate produced is the exact defect the forcing function exists to prevent. The reasoned N/A is the honest *alternative* to that fabrication, not a new way to skip smoke where it could run.
36
+ - **A reason is mandatory.** `smoke: 'not-applicable'` with no `smokeNotApplicableReason` fails closed — the verdict stays DEAD, treated exactly like a missing gate.
37
+ - **A `no-surface` unit reuses this path unchanged** (#515) — it is not a skip and adds no machinery. The one difference: its reason is **derived from the scope class**, not authored per run — take `smokeNotApplicableReason` straight from `scope-class.mjs classify --json` (`scopeSmokeReason`), which names the matched classes. Everything above still applies: no reason, still DEAD.
38
+ - **Missing ≠ N/A.** A verdict with no smoke field at all is still DEAD; the N/A is a deliberate, reasoned third state, never a silent default for a missing result. `pending` / `DEAD` / `EMPTY` all stay DEAD too.
39
+ - **A repo that CAN boot still owes a real `ALIVE`.** The N/A is scoped to repos with no runnable surface; it does not excuse an un-run smoke where a golden path exists.
40
+ - The N/A + reason is **surfaced in the handoff** — `verdict` and `mergeable` print it, and it is written into `integration-verdict.json` — so a merge-without-smoke is a recorded, visible decision, not one buried in a transcript (#393's core ask).
41
+ 5. **Authorize the exact frozen head or keep it frozen for a publish-only check.** Reduce the locally runnable CI/review/smoke evidence into `integration-verdict.json`. When every required check was reproduced, call `run-state.mjs authorize-component-candidate <slug> <component> --stdin` with all three artifacts bound to the frozen SHA. When a mapped required check is genuinely publish-only, do not invent a provisional authorization: leave the candidate `frozen`, publish the unchanged head in step 6, bind the resulting green check to that SHA, then call the same authorization transition. Any movement after freeze first routes through the owned fix path (and after authorization first calls `reopen-component-candidate` with a #888 typed reason and changed boundary), then freezes a new generation and runs fresh terminal review + CI + smoke. Never weaken a sibling test to make the combined suite pass.
42
+ 6. **Publish the combined PR (the component deliverable).** *For a multi-unit component*, push the complete frozen integration head and open (or update) one combined PR into the confirmed `targetBranch` after all locally runnable terminal gates pass. Normally the candidate is already authorized and the verdict is `ALIVE`; the only pre-authorization publication is step 5's explicitly mapped publish-only required check, with the candidate still frozen and no head movement.
43
+
44
+ **Push order (epic-867 / #947).** The integration branch must be on the remote **before** unit PRs are converted to draft or cross-linked as superseded. If `git push -u origin <integration-branch>` is rejected by a **Mergify stack** pre-push hook (`use mergify stack push` / stack-only push), that hook is for stacked *unit* series — not for an assembly artifact. Recovery: `git push --no-verify -u origin <integration-branch>` (or the repo's documented non-stack push path). Do not stall on drafting unit PRs while the combined branch is still local-only.
45
+
46
+ Title the PR for the component; the body lists every unit with `Closes #<n>`, links each unit's PR, and carries the integrated Review Contract + the `integration-verdict.json` evidence. **Confirm CI is green on the combined PR's own HEAD** — opening the PR is what wires the repo's required checks to this branch, so re-watch `gh pr checks <combinedPr>` rather than trusting the pre-publish `gates.ci`; a required gate unwired or red on the published PR means the component is **not** done (re-route to the owning unit, never weaken a check). A publish-only check that succeeds on the unchanged frozen SHA completes step 5 authorization; it does not buy another review. Then **convert each per-unit PR to draft and cross-link it** — keep them as the per-slice review record; they close out when the combined PR lands and the unit branches are cleaned up (a stacked unit's PR closes when its dependency's branch is deleted). Don't close them by hand first. Record the combined PR ref into the run manifest (`components[].pr`) and into `integration-verdict.json` (`combinedPr`). *(A single-unit component has just one unit PR from [step 1](loop.md#1--produce-one-spawn-implement--e2e--gates--pr) — already the deliverable; publish-only checks run there unchanged.)*
47
+ 7. **Deliver the component through the recorded provider, only into `targetBranch`.** Fetch `origin/<targetBranch>` before assemble and record it as `baseShaAtAssemble`; fetch again before delivery and record the observed tip with `record-component-target-base … phase:enqueue`. The combined PR's live `headRefOid` must still equal the authorized frozen component HEAD. For **direct** delivery, `combine-and-verify.mjs mergeable` requires exact target-tip integration; reconcile, re-test/smoke, and delta-review before `gh pr merge`. For a **queue** provider, `combine-and-verify.mjs enqueue-eligible` permits forward target movement when `baseShaAtAssemble` is still an ancestor of the live target: keep the source HEAD immutable and let the batched queue test its synthetic current-base plus candidate tree. Mere target movement or pre-enqueue GitHub `DIRTY` is not a rebase trigger. Rewritten/divergent target history, a changed source HEAD, or a provider-observed conflict remains blocking. Only after the mode-specific gate exits 0 may the loop issue one provider enqueue; `gh pr merge` is forbidden in queue mode. The watcher must capture valid queue-head execution evidence, and completion requires that artifact plus fresh merged ancestry. `mergeShippable` is read from the manifest, never a flag; absent authorization stops at step 6. Never promote past `targetBranch`.
48
+
49
+ ## The skip rules in full
50
+
51
+ There is no terminal-review skip: that review is the event that authorizes the frozen component HEAD, including a single-unit or disjoint low-risk component. Keep the existing high-risk additions intact: auth/tenancy/token/money/migration components still run the high-risk integrated review protocol and smoke may be `not-applicable` only through the reasoned path above. Progressive snapshots do not buy full reviews; only the frozen generation does. Even one unit is assembled onto the target and smoked: that is where the real-render class shows up, independent of sibling clusters.
52
+
53
+ **Step 6 (publish) is governed by the component's unit count:** a multi-unit component publishes its combined PR; a single-unit component skips the publish because its one unit PR is already the deliverable. **Step 7 (merge) is governed by the `mergeShippable` authorization, not by unit count** — a single-unit component merges its own PR when authorized and shippable, exactly as a multi-unit one merges its combined PR. `combine-and-verify.mjs` over a single unit is a clean no-conflict assemble plus the gate arithmetic — cheap, and it still produces the forcing `integration-verdict.json` the handoff requires. When the user opted into multi-agent orchestration, the re-gate and review can fan out per component, same contract.
@@ -0,0 +1,87 @@
1
+ # Interference, the runnable set, and the workspaces it hands out
2
+
3
+ The full procedure behind SKILL.md's [interference section](intake.md#interference-scheduling-and-workspaces). Read it at intake, when you record the roster's edges, and again at the handoff, when you reap. The design input is [ADR 0001](../../../../docs/adr/0001-interference-is-the-scheduling-primitive.md) and the vocabulary is [CONTEXT.md](../../../../CONTEXT.md); this file is the mechanics and the judgment neither of those encodes.
4
+
5
+ ## Recording interference at intake
6
+
7
+ Two fields, and the difference between them is the whole design:
8
+
9
+ ```
10
+ run-state.mjs upsert-unit <slug> '{"id":"#880","status":"queued",
11
+ "dependsOn":[{"unit":"#879","source":"symbol"}],
12
+ "sharedSurfaces":["app/settings/page.tsx"]}'
13
+ ```
14
+
15
+ - **`dependsOn`** — the **blocking** edges. `source` is `symbol` or `premise`. A bare string (`"dependsOn":["#879"]`) still reads, as a **symbol** edge: that is the safe interpretation, because symbol co-delivers and the other reading would split a component that must merge together. An unrecognized source is **refused** at the write rather than coerced — a typo'd `premis` would take the co-delivering reading silently.
16
+ - **`sharedSurfaces`** — the **assembly** edges. Units naming the same surface id co-deliver. It never holds a unit back from building.
17
+
18
+ **Which source is it?** One question, and phrase it as the *counterfactual*: **if this unit merged tonight and the other never merged at all, what specific incorrect behavior would be live?** The build doesn't compile → **symbol**. A concrete wrong behavior you can name ("parallel manifest writes race and drop updates") → **premise**, and *that sentence is the edge's `invariant` field* — write it down, because it is what the dependent gets built against. Nothing, until the sibling lands and the pair is red → **assembly** (`sharedSurfaces`, not `dependsOn`). "It comes later in the plan", or "it builds on the other's work" → **no edge at all**.
19
+
20
+ The counterfactual's *never merged at all* clause is the load-bearing part. Asked as "should this come after?", plan order gets transcribed into the graph and step 2 depends on step 1 all the way down — which is exactly what the manifests show: 63 runs split into declaring **no** edges (depth 1, 10–33× parallelism) or a **chain** (depth 5–19, 1.2–2.4×), with almost nothing between. Asked as the counterfactual, step 2 of a plan is almost always still correct if step 1 shipped alone, so the edge is never drawn.
21
+
22
+ **The two grades do not cost the same, and since 2026-08-04 they do not block the same thing.** A **symbol** edge blocks *scheduling* — physically, since there is no tree to compile against. A **premise** edge blocks *delivery only*: the dependent is built **concurrently**, with its `invariant` carried verbatim into the producer and reviewer spawns, and the merge gate ([`combine-and-verify.mjs mergeable`](../scripts/combine-and-verify.mjs)) is what keeps it from shipping first. Declaring the assumption is what cures the silent-false-premise hazard; ordering the build never did — a dependent encodes its premise whenever it is built, and waiting only makes the premise true at that moment.
23
+
24
+ **A premise edge is the one nothing can recover for you.** A symbol edge announces itself the first time the diff fails to compile. A premise edge produces a green unit encoding a false assumption — the reviewer sees a green PR, and the integration gate sees two units that never touched the same file. If intake does not declare it, nothing downstream will.
25
+
26
+ That is an argument for **declaring** it, and it is worth being precise about what declaring buys, because it used to buy the wrong thing. The unit is *meant* to be runnable — building it later never removed the false premise from its code, it only made the premise true by the time the code ran. What the declaration buys is that the premise is **named**: it reaches the producer as an assumption to design against and the reviewer as a claim to check, and it reaches the merge gate as an ordering. An undeclared premise edge is still the silent failure this paragraph describes; a declared one is no longer silent, whenever it was built.
27
+
28
+ **Do not over-record.** A **symbol** edge you are not sure about costs a serialization; a **premise** edge you are not sure about now costs only a delivery ordering; a `sharedSurfaces` entry costs only an integration re-validation that was probably running anyway. When in doubt between premise and assembly, assembly is still the cheaper wrong answer — but the expensive mistake to avoid is calling something a **symbol** edge when the diff references nothing the other unit creates. That one you can check: name the identifier. If you cannot, it is not a symbol edge.
29
+
30
+ ## Running the set
31
+
32
+ ```
33
+ run-state.mjs runnable <slug> # who holds a workspace, who may be admitted, who waits
34
+ run-state.mjs runnable <slug> --json # the same, for the turn that acts on it
35
+ ```
36
+
37
+ Ask it **whenever a unit finishes** — a push, a delivery, a hand-back. It is a read: it computes the admission, you take it, and you record the workspace you handed out (the orchestrator is the manifest's only writer, ADR 0001 decision 5).
38
+
39
+ `ADMIT NOW` is already dependency-ordered, so taking it in order never spends the last free slot on a unit that unblocks nobody. A unit under `WAITING` is waiting on a **push**, not a merge — record `units[].pushedSha` as soon as a producer's branch is up, or its dependents sit there while the branch they need is already on the remote.
40
+
41
+ **The cap is a cost bound, not a correctness bound.** `inFlightCap` is **4, unconditionally, and the loop never picks a different number** — not at pre-flight, not from a judgement about how slow this repo's install looks. Nothing about correctness changes at any value: the scheduling predicate is what keeps units apart, and the cap only decides how many run at once. `1 for fully serial` remains expressible so a human who has *measured* a slow-install repo can set it, but that is a human's field to write and never an ask this skill raises. The reason it is no longer tunable by the loop is that a tunable default gets tuned down: `epic-563-admin-transactions` set 2, and its own manifest replayed through `runnable` admits nothing at 2 and admits `#573` at 4 — a five-hour serialization bought by a number nobody was ever going to revisit mid-run. → [why](why.md#the-in-flight-cap-and-its-default)
42
+
43
+ ## Handing out a workspace
44
+
45
+ ```
46
+ workspaces.mjs path <slug> <unitId> # the path this unit's tree takes
47
+ git worktree add <path> <base> # base: origin/<targetBranch> — or, for a SYMBOL
48
+ # dependent only, the dependency's branch. A premise
49
+ # dependent references nothing in that branch, so
50
+ # stacking it buys no symbols and exposes it to the
51
+ # upstream's squash/rebase (which silently widens the
52
+ # next delta re-review to full scope — loop.md § re-reviews)
53
+ run-state.mjs upsert-unit <slug> '{"id":"#880","workspacePath":"<path>"}'
54
+ ```
55
+
56
+ The tree belongs to that unit until it is delivered or handed back. **A fix round reuses it** — pass the same `workspacePath` in the spawn, and the dependency install is paid once per unit instead of once per round. A spawn that dies leaves a partial there, and the replacement resumes in place.
57
+
58
+ **Path reserved ≠ holding (epic-867 / #945).** Assign `workspacePath` at admit/spawn, not as a bulk intake roster write. `runnableState` counts a unit toward `inFlightCap` only when the path is *held* — status `in-progress`/`merge-ready`, or produce/review evidence (`rounds`, `reviewRounds`, `pr`, `pushedSha`). A pure `queued` unit with a pre-written path does not fill the cap (and `validate` warns).
59
+
60
+ **Never hand a unit the tree you are coordinating from,** and never do git work in a unit's tree while its spawn is live. `validate` refuses a unit whose `workspacePath` is the run's own checkout, and refuses two units sharing one path; the reap refuses to remove the orchestrator's checkout at all. The incident behind that rule is in [why.md](why.md#the-orchestrator-is-a-writer-too).
61
+
62
+ ## Reaping
63
+
64
+ ```
65
+ workspaces.mjs reap <slug> # the plan — removes nothing
66
+ workspaces.mjs reap <slug> --apply # remove the rows marked REAP
67
+ ```
68
+
69
+ It reads the manifest's recorded paths **and** `git worktree list`, because those two sets differ in exactly the case that matters: a session that died after creating a tree and before recording it. A manifest walk alone leaves those orphans forever.
70
+
71
+ **Four verdicts.** `REAP` — the unit is delivered or handed back and the tree holds nothing unpublished. `PRESERVE` — something is unpublished, or the unit still holds it, or git could not be read. `REFUSE` — the path is, contains, or sits inside the orchestrator's checkout; **or** its identity on disk cannot be established (a relative path, a dangling symlink, a permission refusal); **or** two units claim it, which is a corrupt manifest the reap will not resolve by guessing. `absent` — recorded but not on disk.
72
+
73
+ **Paths are compared as trees, not as strings.** `/tmp` is a symlink to `/private/tmp` on macOS, so a workspace created under one spelling and a guard written in the other name one directory and match no text. Every comparison here resolves symlinks first, and anything it cannot resolve is treated as protected.
74
+
75
+ **"Nothing to collect" and "could not look" are different answers.** With no scope established, nothing on disk is examined and the plan says `orphan collection: NOT RUN` with the reason. That is exit **4** — it outranks 1, because the orchestrator's own checkout is refused on nearly every run and a code ranked under 1 would never be seen. The same applies one row down: a worktree whose identity will not resolve gets a `REFUSE` row rather than being silently skipped as "out of scope", because *out of scope* and *I could not tell* are the same two answers again.
76
+
77
+ **The sweep's scope is declared, not inferred from an arbitrary entry.** `workspaceRoot` on the manifest is the run saying where its trees live, and it wins outright. With none declared the scope is inferred from the recorded `units[].workspacePath`s, which must all **agree on one parent tree** — several recorded paths make "the first one's parent" a coin toss, so a disagreement yields no scope rather than one of them. A declaration that cannot be **read** is refused, not quietly replaced by an inferred one: "declared none" means absent, `null` or a blank string, and any other value present — a non-string, a slashes-only `/`, a path that will not resolve — is a scope the run *stated* and the reap could not use, which is exit 4 rather than a scope the manifest never named. Declared or inferred, a root that is, contains, or sits inside a protected tree is **refused**: `dirname` of a unit mis-recorded as the checkout itself is the repo's *parent*, a scope holding every other checkout on the machine, whose worktrees are not this run's orphans. The filesystem root is refused on its own account, under every spelling — `/`, `///`, `/.`, a symlink to it — because it contains every protected tree there could be. Every one of those answers is a "could not look" — record `workspacePath` as you hand each workspace out, `set <slug> workspaceRoot <abs-path>` when the paths cannot agree, and read `git worktree list` by hand until you have.
78
+
79
+ **Unpublished means three things,** and the third is the one a `git status` check misses: an uncommitted change, an untracked file, **or a commit contained in no remote-tracking ref**. That last case has a spotless working tree and the entire unit living on one machine.
80
+
81
+ **A pre-authorization to keep working is a LOCK on those trees.** Before `reap --apply`, confirm every agent ever pointed at a workspace has *reported done* **and** gone idle. "It sent me its final result" is not enough on its own: if you told an agent it could keep going — more repeats, another measurement, a confirmation run — then it may still be executing in a tree whose contents look finished. The reap reads the tree, never the process table, so a clean, published, delivered workspace with a live worker inside it plans as `REAP`.
82
+
83
+ What that costs is not a lost commit — it is lost work *in flight*, and it can also **manufacture evidence**. In fmm-express epic-894 the orchestrator pre-authorized repeat E2E runs, read an interim report as terminal, and reaped: git de-registered the worktree and half-deleted `node_modules` under a live Playwright worker. One run collapsed with 36 `worker process exited unexpectedly`; the crash put a red mark on a test that read as a genuine regression until the agent opened the JSON and found a crash artifact rather than an assertion failure. A destroyed measurement does not merely vanish — it returns a plausible wrong answer. (`reap` now preserves a tree with a live process in it, but the doctrine is what stops you reaching for `--force` when it does.)
84
+
85
+ **A preserved row is a fact for the handoff, not an obstacle.** Report it — the path, the unit, and what it holds. Do not `--force`, do not `rm -rf`, do not push somebody else's branch to make it reapable. Removing a tree that holds unpublished work is the one action in this loop that destroys something no gate can recover, and a directory left on disk costs a human ten seconds.
86
+
87
+ Exit codes: `0` all clear **and the orphan sweep ran** · `1` something preserved or refused, **or `--apply` could not remove a tree and left it in place** · `2` usage · `3` no manifest · `4` the orphan sweep could not run (no scope could be established, or no `git worktree list`).