@defrex/autobuild 1.8.1 → 1.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 (429) hide show
  1. package/README.md +3 -3
  2. package/SPEC.md +1602 -134
  3. package/bin/ab-dispatch-generation.ts +2 -0
  4. package/docs/agent-runtimes.md +30 -3
  5. package/docs/answering-blocked-builds.md +15 -7
  6. package/docs/architecture.md +320 -53
  7. package/docs/builds.md +5 -0
  8. package/docs/cli.md +7 -1
  9. package/docs/configuration-overview.md +1 -0
  10. package/docs/configuration.md +515 -49
  11. package/docs/dispatcher-hosting.md +4 -0
  12. package/docs/dispatcher.md +17 -3
  13. package/docs/forges.md +1 -1
  14. package/docs/getting-started.md +1 -1
  15. package/docs/integration-overview.md +4 -2
  16. package/docs/integration-tree.md +102 -11
  17. package/docs/merge-policy.md +70 -14
  18. package/docs/migration-1.0.md +2 -1
  19. package/docs/operating.md +53 -4
  20. package/docs/operator-api.md +128 -16
  21. package/docs/optimization-nodes.md +1042 -0
  22. package/docs/overview.md +1 -1
  23. package/docs/plugin-authoring.md +50 -13
  24. package/docs/remote-store-protocol.md +46 -7
  25. package/docs/remote-ticket-protocol.md +50 -2
  26. package/docs/restacking.md +102 -10
  27. package/docs/seams.md +2 -2
  28. package/docs/setup.md +16 -3
  29. package/docs/skills.md +4 -2
  30. package/docs/spec-standard.md +2 -1
  31. package/docs/ticket-dependencies.md +5 -0
  32. package/docs/ticket-migration.md +4 -2
  33. package/docs/ticket-sources.md +30 -12
  34. package/docs/tickets.md +15 -6
  35. package/docs/troubleshooting.md +3 -2
  36. package/docs/verification.md +18 -6
  37. package/docs/workspaces.md +3 -1
  38. package/package.json +4 -3
  39. package/packages/core/src/accounts/chatgpt-oauth.ts +7 -5
  40. package/packages/core/src/cli/attempt.ts +103 -0
  41. package/packages/core/src/cli/attention.ts +11 -1
  42. package/packages/core/src/cli/binary-direct.ts +52 -1
  43. package/packages/core/src/cli/binary.ts +5 -3
  44. package/packages/core/src/cli/build-control.ts +328 -66
  45. package/packages/core/src/cli/context.ts +268 -15
  46. package/packages/core/src/cli/dashboard/detail.ts +26 -2
  47. package/packages/core/src/cli/dashboard/facts.ts +40 -3
  48. package/packages/core/src/cli/dashboard/integration-detail.ts +7 -2
  49. package/packages/core/src/cli/dashboard/landing-display.ts +24 -3
  50. package/packages/core/src/cli/dashboard/model.ts +127 -33
  51. package/packages/core/src/cli/dashboard/objective-row.ts +189 -0
  52. package/packages/core/src/cli/dashboard/render.ts +49 -3
  53. package/packages/core/src/cli/dashboard/reopen-display.ts +39 -0
  54. package/packages/core/src/cli/dashboard/tree.ts +12 -1
  55. package/packages/core/src/cli/dispatch-frontend.ts +9 -1
  56. package/packages/core/src/cli/dispatch-launch-stop.ts +55 -0
  57. package/packages/core/src/cli/dispatch-launcher.ts +26 -44
  58. package/packages/core/src/cli/dispatch-repository-feed.ts +1 -1
  59. package/packages/core/src/cli/dispatch.ts +136 -5
  60. package/packages/core/src/cli/env.ts +42 -0
  61. package/packages/core/src/cli/help.ts +212 -11
  62. package/packages/core/src/cli/init-agent.ts +4 -1
  63. package/packages/core/src/cli/init-readiness-remote.ts +3 -2
  64. package/packages/core/src/cli/init-validation.ts +2 -2
  65. package/packages/core/src/cli/init.ts +3 -2
  66. package/packages/core/src/cli/judge-entry.ts +82 -0
  67. package/packages/core/src/cli/judge.ts +233 -0
  68. package/packages/core/src/cli/landings.ts +3 -2
  69. package/packages/core/src/cli/main.ts +412 -143
  70. package/packages/core/src/cli/measurement-text.ts +19 -0
  71. package/packages/core/src/cli/objective.ts +154 -0
  72. package/packages/core/src/cli/publication-settlement.ts +106 -22
  73. package/packages/core/src/cli/repo-lease.ts +1 -0
  74. package/packages/core/src/cli/repository-status.ts +179 -19
  75. package/packages/core/src/cli/status.ts +195 -17
  76. package/packages/core/src/cli/store-opening.ts +4 -0
  77. package/packages/core/src/cli/terminals.ts +205 -8
  78. package/packages/core/src/cli/ticket-start.ts +53 -0
  79. package/packages/core/src/cli/ticket.ts +68 -2
  80. package/packages/core/src/cli/upgrade-agent.ts +12 -8
  81. package/packages/core/src/cli/wait.ts +8 -2
  82. package/packages/core/src/cli/watch.ts +1325 -628
  83. package/packages/core/src/config/create-labels.ts +23 -0
  84. package/packages/core/src/config/live.ts +3 -0
  85. package/packages/core/src/config/load.ts +19 -0
  86. package/packages/core/src/config/pipeline-source.ts +1 -3
  87. package/packages/core/src/config/roles.ts +182 -73
  88. package/packages/core/src/config/schema.ts +226 -9
  89. package/packages/core/src/events/catalog.ts +41 -3
  90. package/packages/core/src/events/compatibility.ts +7 -1
  91. package/packages/core/src/events/payloads.ts +610 -1
  92. package/packages/core/src/events/policy.ts +62 -0
  93. package/packages/core/src/events/repository.ts +147 -21
  94. package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +1512 -199
  95. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/0ab2a90d0305dc9d.json.gz +0 -0
  96. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/10a4657408d4e121.json.gz +0 -0
  97. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/1152a2e97ee81728.json.gz +0 -0
  98. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/13ca84752c5f8b54.json.gz +0 -0
  99. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/1411d1cdbdd9911e.json.gz +0 -0
  100. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/1444fe1fa7fc802c.json.gz +0 -0
  101. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/1491ac0600349391.json.gz +0 -0
  102. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/1921f86f752428c9.json.gz +0 -0
  103. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/1972c1d66008ef6b.json.gz +0 -0
  104. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/19e8e43e7f3f1a06.json.gz +0 -0
  105. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/20a85c143c3e8164.json.gz +0 -0
  106. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/21ce2c0bf58318e1.json.gz +0 -0
  107. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/293dcb3a94fb3470.json.gz +0 -0
  108. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/2ab7436356267118.json.gz +0 -0
  109. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/2d084641735caaff.json.gz +0 -0
  110. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/3237bcecf68e5db9.json.gz +0 -0
  111. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/33d0cc593610e56f.json.gz +0 -0
  112. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/3451ed2136dcc356.json.gz +0 -0
  113. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/358ec8693f2237e6.json.gz +0 -0
  114. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/35cf9ccc4478b2d2.json.gz +0 -0
  115. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/3649e7bd1203f154.json.gz +0 -0
  116. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/378da6dece82202a.json.gz +0 -0
  117. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/38c75099d9191471.json.gz +0 -0
  118. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/398952f1f01db1a3.json.gz +0 -0
  119. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/3b64d352d56c9121.json.gz +0 -0
  120. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/3dc486226c05372d.json.gz +0 -0
  121. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/431c9bb2ee8838e0.json.gz +0 -0
  122. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/4400dffca929e2f0.json.gz +0 -0
  123. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/49064fc079964a5c.json.gz +0 -0
  124. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/4edded75f17742f4.json.gz +0 -0
  125. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/4f00c0f2c8afd159.json.gz +0 -0
  126. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/516a5a7aadf97587.json.gz +0 -0
  127. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/516dc6ea85d67cd7.json.gz +0 -0
  128. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/584e2ba74608e051.json.gz +0 -0
  129. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/59ffaa6974094c72.json.gz +0 -0
  130. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/5bb43afb121674c6.json.gz +0 -0
  131. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/5f0ca42af862c4ee.json.gz +0 -0
  132. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/6118031132db9bfc.json.gz +0 -0
  133. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/63107a8d58776b63.json.gz +0 -0
  134. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/63546b08d4d6fa11.json.gz +0 -0
  135. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/643d70429ce03dad.json.gz +0 -0
  136. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/677ea92572c29082.json.gz +0 -0
  137. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/6ae5bf60504d6467.json.gz +0 -0
  138. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/6efdc8defc75fccb.json.gz +0 -0
  139. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/71c53d33f09d8204.json.gz +0 -0
  140. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/7267ca2757cffba7.json.gz +0 -0
  141. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/76b7d4244082b3f9.json.gz +0 -0
  142. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/7749f918c6f10968.json.gz +0 -0
  143. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/7833e42d16301424.json.gz +0 -0
  144. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/7d4edad0614adaf1.json.gz +0 -0
  145. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/837365898d04f45a.json.gz +0 -0
  146. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/85f9f0c921b8b5bb.json.gz +0 -0
  147. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8879f57a24733897.json.gz +0 -0
  148. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/88cb9e71bdec972d.json.gz +0 -0
  149. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8a0cd6dd06cc155e.json.gz +0 -0
  150. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8aa9ca8609dc051d.json.gz +0 -0
  151. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8c8640255bd61658.json.gz +0 -0
  152. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8cc15eb1807c0157.json.gz +0 -0
  153. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8ced97c44bc0af3a.json.gz +0 -0
  154. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8d4144004720b9f8.json.gz +0 -0
  155. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8db633ead1807f8b.json.gz +0 -0
  156. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8e42cdbd0994ab0c.json.gz +0 -0
  157. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/9011d0f6ff955ef9.json.gz +0 -0
  158. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/916ebc5433801c41.json.gz +0 -0
  159. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/9539b995af5c54a9.json.gz +0 -0
  160. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/95f391bfd7b7dbd7.json.gz +0 -0
  161. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/9613e8fa568a9281.json.gz +0 -0
  162. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/9a68f8753bd9038d.json.gz +0 -0
  163. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/9b25e58227080094.json.gz +0 -0
  164. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/9ee3919fbd4f9458.json.gz +0 -0
  165. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/a04a34cc2717147b.json.gz +0 -0
  166. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/a0b32c12e4e6edb6.json.gz +0 -0
  167. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/a55218252707bdd3.json.gz +0 -0
  168. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/a732fd08b31522a6.json.gz +0 -0
  169. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/a9d206a01f9039e5.json.gz +0 -0
  170. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/abf7fe3c92c82f2d.json.gz +0 -0
  171. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/ac928b04842c00db.json.gz +0 -0
  172. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/af953392d81911da.json.gz +0 -0
  173. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/b0d877c44810ecb0.json.gz +0 -0
  174. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/b0f7c6ebb2db57fc.json.gz +0 -0
  175. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/b905c22ec17eed31.json.gz +0 -0
  176. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/bce0c54e865f4b79.json.gz +0 -0
  177. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/c68b7ee2e2610f30.json.gz +0 -0
  178. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/c7f7e0378aeea237.json.gz +0 -0
  179. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/c98cb1659eb142b6.json.gz +0 -0
  180. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/ca830adf06ed55a1.json.gz +0 -0
  181. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/cb3a219f33e437ca.json.gz +0 -0
  182. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/cf1e0c0d82567e0c.json.gz +0 -0
  183. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/d008d86d9ff77b30.json.gz +0 -0
  184. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/d1432a819d8e48c5.json.gz +0 -0
  185. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/d185ed6aa9192aff.json.gz +0 -0
  186. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/d873fad29d6c7e55.json.gz +0 -0
  187. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/db84b12316e2da4a.json.gz +0 -0
  188. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/ddf6dc967d898767.json.gz +0 -0
  189. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/dfc64de6e7bfc0a0.json.gz +0 -0
  190. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/e2f18fa32fe1f6d0.json.gz +0 -0
  191. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/e37393fed29e84c5.json.gz +0 -0
  192. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/e6a8585e2a054ff6.json.gz +0 -0
  193. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/e7e9e327baca6903.json.gz +0 -0
  194. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/e86447af0571672c.json.gz +0 -0
  195. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/ea819202d22122e5.json.gz +0 -0
  196. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/eb4535585f2e84f6.json.gz +0 -0
  197. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/eb7ddd5319d09e27.json.gz +0 -0
  198. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/eca4959b2b87ae15.json.gz +0 -0
  199. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/ee10d7959ec4843c.json.gz +0 -0
  200. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/ef1b68347966ab26.json.gz +0 -0
  201. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/f3e55425cc41f230.json.gz +0 -0
  202. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/f40042c1cdb9fd43.json.gz +0 -0
  203. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/f48466215c790a3f.json.gz +0 -0
  204. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/f5b9ace9b59351e7.json.gz +0 -0
  205. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/fa8f1475a55be935.json.gz +0 -0
  206. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/fb21116a15d0b1f1.json.gz +0 -0
  207. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/fe95444fbeabe592.json.gz +0 -0
  208. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/09bf0a1611d07363.json +984 -0
  209. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/10eac4988d66e161.json +1067 -0
  210. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/1a436b5fb45aee3e.json +1116 -0
  211. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/249db6f7a41f90e2.json +161 -0
  212. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/25dcb2fb6eaa83f4.json +858 -0
  213. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/2e1bdc763924616f.json +4932 -0
  214. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/30e9dabce3c4263d.json +399 -0
  215. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/4898ef339c68fa36.json +83 -0
  216. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/51816c0ffa62af6e.json +417 -0
  217. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/561bf45320062a44.json +83 -0
  218. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/5672d0233085d050.json +84 -0
  219. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/5e39f42cbdbf35ef.json +163 -0
  220. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/7771a7a2250f9964.json +868 -0
  221. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/881c491321bec99a.json +1074 -0
  222. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/965f25c3af1d2cdc.json +160 -0
  223. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/9b76d89da575ca90.json +20 -0
  224. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/9eb485320a72a9ff.json +233 -0
  225. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/a60448c01016135e.json +18 -0
  226. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/a6584fb61b6679bd.json +97 -0
  227. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/c88365c25b3186d3.json +543 -0
  228. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/e8f0481b23f90056.json +711 -0
  229. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/ee55782ed40ebbac.json +110 -0
  230. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/fc5082fac8167f3d.json +98 -0
  231. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/fd55c329cfe921cc.json +1069 -0
  232. package/packages/core/src/kernel/attempt-creation-key.ts +20 -0
  233. package/packages/core/src/kernel/attempt-settlement.ts +125 -0
  234. package/packages/core/src/kernel/auto-merge-default.ts +1 -3
  235. package/packages/core/src/kernel/auto-merge.ts +34 -3
  236. package/packages/core/src/kernel/dispatch-capacity.ts +312 -38
  237. package/packages/core/src/kernel/dispatch-placement.ts +1 -1
  238. package/packages/core/src/kernel/dispatch-settings.ts +1 -4
  239. package/packages/core/src/kernel/dispatch-status.ts +3 -5
  240. package/packages/core/src/kernel/dispatch-upgrade.ts +1 -1
  241. package/packages/core/src/kernel/engine.ts +109 -13
  242. package/packages/core/src/kernel/forge-checks.ts +140 -0
  243. package/packages/core/src/kernel/forge-health.ts +2 -2
  244. package/packages/core/src/kernel/generated-files.ts +43 -0
  245. package/packages/core/src/kernel/generated-regeneration.ts +254 -0
  246. package/packages/core/src/kernel/generators/build-log.ts +30 -2
  247. package/packages/core/src/kernel/generators/optimization-log.ts +578 -0
  248. package/packages/core/src/kernel/generators/panel-log.ts +133 -0
  249. package/packages/core/src/kernel/generators/repository-journals.ts +18 -0
  250. package/packages/core/src/kernel/guarded-forge.ts +76 -11
  251. package/packages/core/src/kernel/harvest.ts +1 -4
  252. package/packages/core/src/kernel/head-paths.ts +4 -1
  253. package/packages/core/src/kernel/history-retention.ts +337 -0
  254. package/packages/core/src/kernel/incremental-fixtures.ts +6 -0
  255. package/packages/core/src/kernel/incremental.ts +14 -4
  256. package/packages/core/src/kernel/integration-landing.ts +64 -13
  257. package/packages/core/src/kernel/integration-stack.ts +123 -20
  258. package/packages/core/src/kernel/integration-state.ts +39 -2
  259. package/packages/core/src/kernel/janitor-failure.ts +2 -0
  260. package/packages/core/src/kernel/kernel-git.ts +1 -1
  261. package/packages/core/src/kernel/landing-measurement.ts +275 -0
  262. package/packages/core/src/kernel/landing-readiness.ts +2 -0
  263. package/packages/core/src/kernel/landing-state.ts +76 -1
  264. package/packages/core/src/kernel/leaf-restack-state.ts +17 -1
  265. package/packages/core/src/kernel/log-index-value.ts +2 -0
  266. package/packages/core/src/kernel/log-index.ts +81 -3
  267. package/packages/core/src/kernel/measurement.ts +406 -0
  268. package/packages/core/src/kernel/mixed-version.ts +6 -3
  269. package/packages/core/src/kernel/node-landing.ts +92 -18
  270. package/packages/core/src/kernel/node-restack-state.ts +27 -1
  271. package/packages/core/src/kernel/node-restack-transaction.ts +80 -23
  272. package/packages/core/src/kernel/node-verification-context.ts +14 -4
  273. package/packages/core/src/kernel/open-pr-backpressure-state.ts +24 -0
  274. package/packages/core/src/kernel/open-pr-backpressure.ts +133 -0
  275. package/packages/core/src/kernel/optimization-admission.ts +249 -0
  276. package/packages/core/src/kernel/optimization.ts +774 -0
  277. package/packages/core/src/kernel/panel.ts +225 -0
  278. package/packages/core/src/kernel/phases.ts +42 -6
  279. package/packages/core/src/kernel/pr-attachments.ts +4 -16
  280. package/packages/core/src/kernel/pr-summary.ts +2 -2
  281. package/packages/core/src/kernel/read-deferrals.ts +2 -2
  282. package/packages/core/src/kernel/read-facts.ts +69 -31
  283. package/packages/core/src/kernel/reconcile-restack.ts +352 -103
  284. package/packages/core/src/kernel/reducer-identity.ts +659 -0
  285. package/packages/core/src/kernel/reducer-registry.ts +37 -3
  286. package/packages/core/src/kernel/reducer-revisions.ts +50 -0
  287. package/packages/core/src/kernel/reducer.ts +208 -9
  288. package/packages/core/src/kernel/reopen-state.ts +48 -0
  289. package/packages/core/src/kernel/reopen.ts +143 -0
  290. package/packages/core/src/kernel/replay-retention.ts +208 -39
  291. package/packages/core/src/kernel/repository-attention.ts +1 -1
  292. package/packages/core/src/kernel/service-facts.ts +19 -7
  293. package/packages/core/src/kernel/terminal-guard.ts +13 -5
  294. package/packages/core/src/kernel/ticket-handbacks.ts +1 -1
  295. package/packages/core/src/kernel/ticket-migrations.ts +1 -1
  296. package/packages/core/src/kernel/ticket-preparation.ts +1 -1
  297. package/packages/core/src/kernel/ticket-source-health.ts +1 -1
  298. package/packages/core/src/kernel/ticket-starts.ts +118 -0
  299. package/packages/core/src/kernel/ticket-wait.ts +37 -2
  300. package/packages/core/src/kernel/verify-diff-base.ts +62 -0
  301. package/packages/core/src/kernel/verify-stage-state.ts +1 -0
  302. package/packages/core/src/kernel/verify-stages.ts +41 -1
  303. package/packages/core/src/objective.ts +532 -0
  304. package/packages/core/src/ontology.ts +49 -6
  305. package/packages/core/src/operator/annotations.ts +35 -4
  306. package/packages/core/src/operator/control.ts +2 -1
  307. package/packages/core/src/operator/index.ts +12 -0
  308. package/packages/core/src/operator/optimization.ts +307 -0
  309. package/packages/core/src/operator/protocol.ts +30 -1
  310. package/packages/core/src/operator/query.ts +15 -1
  311. package/packages/core/src/operator/registry.ts +219 -13
  312. package/packages/core/src/operator/requests.ts +25 -2
  313. package/packages/core/src/operator/ticket-start.ts +152 -0
  314. package/packages/core/src/operator/tickets.ts +3 -2
  315. package/packages/core/src/plugin-sdk/index.ts +9 -1
  316. package/packages/core/src/plugins/registry.ts +1 -0
  317. package/packages/core/src/ports/forge/contract.ts +9 -0
  318. package/packages/core/src/ports/forge/fake.ts +151 -10
  319. package/packages/core/src/ports/forge/git-rewrite.ts +38 -5
  320. package/packages/core/src/ports/forge/github-readiness.ts +1 -1
  321. package/packages/core/src/ports/forge/github-squash-message.ts +89 -0
  322. package/packages/core/src/ports/forge/github-transport.ts +186 -1
  323. package/packages/core/src/ports/forge/github.ts +846 -239
  324. package/packages/core/src/ports/forge/readiness.ts +15 -3
  325. package/packages/core/src/ports/forge-failure.ts +22 -0
  326. package/packages/core/src/ports/forge-request-context.ts +23 -1
  327. package/packages/core/src/ports/forge-telemetry.ts +16 -0
  328. package/packages/core/src/ports/runner/antigravity.ts +1071 -0
  329. package/packages/core/src/ports/runner/claude.ts +6 -1
  330. package/packages/core/src/ports/runner/codex.ts +11 -2
  331. package/packages/core/src/ports/runner/contract.ts +25 -1
  332. package/packages/core/src/ports/runner/fake.ts +2 -2
  333. package/packages/core/src/ports/runner/native-cli-fixture.ts +40 -5
  334. package/packages/core/src/ports/runner/native-process-fixture.ts +4 -1
  335. package/packages/core/src/ports/runner/pi.ts +23 -7
  336. package/packages/core/src/ports/runner/production.ts +19 -2
  337. package/packages/core/src/ports/runner/session-env.ts +65 -5
  338. package/packages/core/src/ports/runner/start-prompt.ts +6 -4
  339. package/packages/core/src/ports/tickets/contract.ts +4 -2
  340. package/packages/core/src/ports/tickets/github.ts +20 -5
  341. package/packages/core/src/ports/tickets/hosted-index.ts +6 -1
  342. package/packages/core/src/ports/tickets/labels.ts +21 -0
  343. package/packages/core/src/ports/tickets/linear.ts +33 -0
  344. package/packages/core/src/ports/tickets/migration.ts +2 -0
  345. package/packages/core/src/ports/tickets/priority.ts +11 -0
  346. package/packages/core/src/ports/tickets/remote-protocol.ts +71 -6
  347. package/packages/core/src/ports/tickets/remote.ts +138 -16
  348. package/packages/core/src/ports/tickets/tree.ts +17 -4
  349. package/packages/core/src/ports/types.ts +145 -7
  350. package/packages/core/src/ports/workspace/builtin-capabilities.ts +7 -4
  351. package/packages/core/src/ports/workspace/commit-preservation.ts +182 -64
  352. package/packages/core/src/ports/workspace/create.ts +3 -0
  353. package/packages/core/src/ports/workspace/git-worktree.ts +13 -1
  354. package/packages/core/src/ports/workspace/vercel-sandbox.ts +242 -61
  355. package/packages/core/src/processes/build-execution-state.ts +5 -6
  356. package/packages/core/src/processes/build-runner.ts +1435 -132
  357. package/packages/core/src/processes/dispatch-failure-budget.ts +1 -1
  358. package/packages/core/src/processes/dispatcher-selectors.ts +15 -13
  359. package/packages/core/src/processes/dispatcher.ts +2874 -266
  360. package/packages/core/src/processes/execution-no-progress.ts +38 -1
  361. package/packages/core/src/processes/execution-settlement.ts +2 -6
  362. package/packages/core/src/processes/harvest-execution-state.ts +2 -6
  363. package/packages/core/src/processes/harvest-runner.ts +7 -2
  364. package/packages/core/src/processes/hook-command.ts +125 -0
  365. package/packages/core/src/processes/hook-webhook.ts +144 -0
  366. package/packages/core/src/processes/hooks.ts +740 -0
  367. package/packages/core/src/processes/infrastructure-failure-budget.ts +1 -3
  368. package/packages/core/src/processes/judge-launcher.ts +38 -0
  369. package/packages/core/src/processes/measurement-runner.ts +235 -0
  370. package/packages/core/src/processes/optimization-merges.ts +101 -0
  371. package/packages/core/src/processes/optimization-stop.ts +179 -0
  372. package/packages/core/src/processes/panel-runner.ts +756 -0
  373. package/packages/core/src/processes/phase-failure-budget.ts +1 -0
  374. package/packages/core/src/processes/publication-state.ts +1 -4
  375. package/packages/core/src/processes/repo-view.ts +77 -5
  376. package/packages/core/src/processes/sandbox-state.ts +1 -4
  377. package/packages/core/src/processes/tick-state.ts +1 -3
  378. package/packages/core/src/processes/workspace-preservation.ts +67 -9
  379. package/packages/core/src/scenarios/harness.ts +19 -8
  380. package/packages/core/src/store/contract.ts +72 -0
  381. package/packages/core/src/store/digest.ts +89 -7
  382. package/packages/core/src/store/judge-authority.ts +161 -0
  383. package/packages/core/src/store/phase-session.ts +226 -4
  384. package/packages/core/src/store/reduced-reads.ts +10 -0
  385. package/packages/core/src/store/reducer-value-shapes.json +17254 -11861
  386. package/packages/core/src/store/remote/client.ts +12 -2
  387. package/packages/core/src/store/remote/credentials.ts +31 -1
  388. package/packages/core/src/store/remote/index.ts +8 -0
  389. package/packages/core/src/store/remote/protocol.ts +38 -0
  390. package/packages/core/src/store/remote/released-clients.json +22 -0
  391. package/packages/core/src/store/remote/released-reducer-values/1.10.0.json +34439 -0
  392. package/packages/core/src/store/remote/released-reducer-values/1.9.0.json +29475 -0
  393. package/packages/core/src/store/remote/released-reducer-values/index.ts +18 -14
  394. package/packages/core/src/store/remote/token.ts +13 -4
  395. package/packages/core/src/store/repo-state-events.ts +9 -8
  396. package/packages/core/src/store/retention.ts +16 -2
  397. package/packages/core/src/store/session-reducer.ts +1 -4
  398. package/packages/core/src/store/ticket-assets.ts +1 -3
  399. package/packages/core/src/store/types.ts +9 -0
  400. package/packages/core/src/testing/dispatch-read-budget.ts +70 -0
  401. package/packages/core/src/testing/git-config-isolation.ts +25 -0
  402. package/packages/core/src/testing/index.ts +14 -0
  403. package/packages/core/src/testing/reduced-read-budget.ts +3950 -54
  404. package/skills/code-review/SKILL.md +16 -0
  405. package/skills/finalize/SKILL.md +10 -4
  406. package/skills/guide/SKILL.md +464 -83
  407. package/skills/guide/references/integration-tree.md +102 -11
  408. package/skills/guide/references/merge-policy.md +70 -14
  409. package/skills/guide/references/migration-1.0.md +2 -1
  410. package/skills/guide/references/operator-api.md +128 -16
  411. package/skills/guide/references/optimization-nodes.md +1042 -0
  412. package/skills/guide/references/plugin-authoring.md +50 -13
  413. package/skills/guide/references/remote-store-protocol.md +46 -7
  414. package/skills/guide/references/remote-ticket-protocol.md +50 -2
  415. package/skills/guide/references/restacking.md +102 -10
  416. package/skills/guide/references/setup.md +16 -3
  417. package/skills/guide/references/spec-standard.md +2 -1
  418. package/skills/guide/references/ticket-dependencies.md +5 -0
  419. package/skills/guide/references/ticket-migration.md +4 -2
  420. package/skills/implement/SKILL.md +51 -1
  421. package/skills/judge/SKILL.md +43 -0
  422. package/skills/operate/SKILL.md +267 -32
  423. package/skills/plan/SKILL.md +18 -0
  424. package/skills/plan-review/SKILL.md +15 -1
  425. package/skills/propose/SKILL.md +121 -0
  426. package/skills/reconcile/SKILL.md +21 -2
  427. package/skills/spec/SKILL.md +30 -4
  428. package/skills/tickets/SKILL.md +44 -5
  429. package/templates/hosted-service/package.json +2 -2
@@ -22,6 +22,7 @@ Idle nodes consume no runner capacity and empty nodes have no PR.
22
22
  - [Nodes, targets and the operating model](references/integration-tree.md)
23
23
  - [Merge policy, examples and forge requirements](references/merge-policy.md)
24
24
  - [Restacking, identity and recovery](references/restacking.md)
25
+ - [Optimization nodes](references/optimization-nodes.md): when to use one, a run end to end, grooming the objective, the `autobuild-objective` marker, objective schema, refusals, paired harness-pinned measurement and the noise check, revisions, derived progress, the proposer phase, and the landing gate and attempt settlement, stopping and completion.
25
26
  - [Migration from 0.x](references/migration-1.0.md)
26
27
  - [Moving ticket sources](references/ticket-migration.md): recorded migrations preserve in-flight build continuity.
27
28
 
@@ -78,16 +79,29 @@ spec → plan ⇄ plan-review → implement ⇄ code-review → verify:* → fin
78
79
  tickets; a human grooms them to the complete
79
80
  [spec standard](references/spec-standard.md) — what and why but never how,
80
81
  verifiable acceptance criteria, explicit out-of-scope, and evidence — and
81
- dispatches. Generated work cannot leave Triage un-groomed. The dispatcher
82
+ dispatches. Generated work cannot leave Triage un-groomed, with one
83
+ exception: an optimization node's proposer files attempts straight to ready,
84
+ because grooming the node's objective and budget is the dispatch decision for
85
+ them (see [optimization nodes](references/optimization-nodes.md#proposer-phase)). The dispatcher
82
86
  claims tickets that pass the `[tickets]` ready
83
87
  gate — urgent tickets first, then normal ones, each in the source's order —
84
88
  chooses a short immutable slug from the final conforming spec, and
85
89
  starts builds up to the top-level `capacity` bound, after slots reserved for
86
- integration nodes awaiting verification or reconcile, for finished builds
90
+ integration nodes awaiting verification, reconcile or propose, for finished builds
87
91
  waiting to re-verify or reconcile, and for builds whose ticket wait ended.
92
+ Free slots go to `manual` start requests, then urgent waiting work, then
93
+ urgent start requests and urgent tickets, then normal waiting work, then
94
+ normal start requests and normal tickets; a build takes its ticket's priority at
95
+ claim, and `ab priority <slug> urgent|normal` changes an active build's
96
+ priority. Priority orders free slots only.
88
97
  `capacity` counts builds running work: a build that finished its pipeline
89
98
  holds no slot while it waits for a merge decision, though it keeps its
90
99
  workspace until it merges or closes. Priority never preempts a running build.
100
+ With `[policy].maxOpenPrs` set, open-PR backpressure pauses new ordinary
101
+ normal-priority claims (not `ab start` requests) once that many root PRs are open and unmerged, until
102
+ the count drains to `resumeOpenPrs` (below `maxOpenPrs` when the two are
103
+ equal); urgent claims and in-flight work continue, and capacity is
104
+ unchanged.
91
105
  - **Ticket waits.** A work build that cannot proceed until other tickets
92
106
  complete parks without a slot. A phase agent ends its session with
93
107
  `ab wait-on <ticket-id>... --reason <text>`, a terminal that needs no
@@ -99,7 +113,9 @@ spec → plan ⇄ plan-review → implement ⇄ code-review → verify:* → fin
99
113
  declaring phase re-runs with the refusal as its guidance. Accepted, the ids
100
114
  join the build ticket's `blockedBy`, the build is blocked on an escalation
101
115
  whose question begins `Waiting on`, and it holds no slot while keeping its
102
- branch, workspace and completed phase work. The dispatcher ends the wait
116
+ branch, workspace and completed phase work. That escalation alone is not
117
+ attention: `ab wait --for attention` and default `ab watch` stay quiet,
118
+ while status surfaces show the wait. The dispatcher ends the wait
103
119
  (cause `automatic`) on its first tick after every named ticket completes;
104
120
  while any is still open the wait stays in place. A named ticket that is
105
121
  rejected or deleted can never complete: the dispatcher instead raises an
@@ -108,13 +124,17 @@ spec → plan ⇄ plan-review → implement ⇄ code-review → verify:* → fin
108
124
  filter, and its answer resumes the declaring phase like a wait answer. An
109
125
  operator may still end a wait early by answering its escalation (cause
110
126
  `operator`). The build then takes a slot
111
- ahead of new ticket claims. If its target moved, it first restacks onto the
127
+ ahead of normal ticket claims (urgent work first). If its target moved, it first restacks onto the
112
128
  target's current head (published work is replayed as one change, and a
113
- conflict reconciles first; with nothing published, the branch fast-forwards
129
+ conflict reconciles first unless it is confined to declared `[generated]`
130
+ files, which the kernel regenerates; with nothing published, the branch fast-forwards
114
131
  only when it has no commits the target lacks and no uncommitted tracked
115
132
  changes, and otherwise the restack fails without discarding them), so the
116
133
  resumed phase sees the merged blockers; an unchanged target resumes without
117
- a restack. The declaring phase then re-runs at the same round or attempt. `ab build status` shows a `waiting on:` line naming the tickets,
134
+ a restack. The declaring phase then re-runs at the same round or attempt,
135
+ except that a verify or finalize wait whose restack replayed cleanly
136
+ re-verifies every step from the first, at a new attempt, before finalize or
137
+ merge. `ab build status` shows a `waiting on:` line naming the tickets,
118
138
  and `ab builds` and both dashboards show the build as `waiting` on them.
119
139
  Node builds cannot declare waits.
120
140
  - **Failed preparation.** Durable preparation facts protect the claim-to-build
@@ -166,15 +186,96 @@ spec → plan ⇄ plan-review → implement ⇄ code-review → verify:* → fin
166
186
  - **Restacking and epilogue.** The kernel replays one net leaf change at verify
167
187
  entry, when a ticket wait ends and its destination moved, and when its
168
188
  destination moves while awaiting merge. Clean replay
169
- starts no agent; conflicts enter `reconcile`, then verification. The leaf
189
+ starts no agent; conflicts enter `reconcile`, then verification, except
190
+ that conflicts only in declared [`[generated]`](#generated) files are
191
+ regenerated by their commands with no agent. A clean
192
+ replay after a verify or finalize wait re-verifies on the restacked base. The leaf
170
193
  terminates **merged** or **closed**. Transient leaf publication failures park
171
194
  on a durable six-retry schedule, independently of agent phase attempts.
172
195
  See the [replay reference](references/restacking.md).
173
196
 
174
197
  Integration builds use collect → verify → merge → close, with demand-driven node restacking,
175
198
  repair children and source-aware reconcile as needed. Their exact-head/parent
176
- verification differs from clean waiting leaf rewrites. See the
199
+ verification differs from clean awaiting-merge leaf rewrites. See the
177
200
  [node lifecycle](references/integration-tree.md#collect-verify-and-merge).
201
+ An optimization node measures its starting value and then alternates `propose`
202
+ and collecting: an `ab-propose` session reads the attempt ledger and deposits
203
+ proposals with `ab propose`, and the dispatcher files each as an attempt
204
+ ticket. See the [proposer phase](references/optimization-nodes.md#proposer-phase).
205
+
206
+ **Optimization nodes.** A node becomes an optimization node only when its spec
207
+ carries exactly one fenced block whose info string is exactly
208
+ `autobuild-objective`. A heading named "Objective", a plain `toml` block, a block
209
+ nested inside another fence, or prose describing an objective never counts. Two
210
+ blocks, a block that fails to parse or validate, an objective with no budget
211
+ limit, or a ticket source with no rejected role refuse the opening and name the
212
+ reason; the node never opens as a plain node instead. A work ticket carrying the
213
+ block is refused at dispatch. A spec revision of an open optimization node may
214
+ change the objective but cannot add or remove the block, and a plain node never
215
+ gains one. Grooming the objective is the dispatch decision for the node's
216
+ attempts: once the node is measured, its proposer files attempts straight to
217
+ ready, within the groomed budget, and each must pass the ratchet before it
218
+ lands. The marker rules and the objective schema are in
219
+ [optimization nodes](references/optimization-nodes.md).
220
+
221
+ **Optimization attempts.** A child is an attempt when its ticket came from one
222
+ of the node's recorded proposals; it runs the ordinary work grammar. In every
223
+ phase of an attempt, `ab context` writes a derived `objective.md` and a manifest
224
+ `attempt` block: the purpose, the measurement command or judge panel, the
225
+ harness, ε, any threshold and the node's current value. In implement, `ab done`
226
+ refuses a contribution that changes a harness path, naming each path, before
227
+ anything is deposited or published, so code review never sees it.
228
+ `ab done --no-improvement "<reason>"` declines instead: it needs no commits,
229
+ skips review, verification and measurement, completes the build
230
+ `closed-unmerged`, and the dispatcher settles the attempt `declined` on the
231
+ node with the reason as the ledger note. A branch that an earlier implement
232
+ round published is deleted by the node before the ticket moves to rejected.
233
+ The flag is refused outside an attempt's implement phase. See
234
+ [attempts](references/optimization-nodes.md#attempts).
235
+
236
+ **Judge panels.** A panel objective is measured by a panel of judge sessions
237
+ under the `judge` role. Each judge compares two harness-pinned variants,
238
+ labeled `A/` and `B/` in an order drawn per judge, in its own root outside
239
+ any repository, and ends with `ab judge prefer <A|B|tie> --reason "…"`. The
240
+ kernel records each judgment with its order in `panel.judged`; the candidate's
241
+ win rate counts ties as half. Judges can read nothing: with a remote store
242
+ they hold a write-only credential, and with a local store they save the
243
+ preference for the runner to record. Nothing they are given, including their
244
+ self-contained `ab`, names the repository or reveals which variant is the
245
+ candidate. Each judge follows the `judge` role's provider alternates, each
246
+ target a separate judge session with its own stream in the same root and
247
+ order; only the chain's last failure counts. A resumed run reuses recorded
248
+ preferences and reruns only judges without one. An attempt on a panel objective is accepted when its win rate
249
+ against the current node head reaches 0.5 + ε; otherwise it settles
250
+ `no-improvement`. A panel node judges its opening head against itself for its noise
251
+ check (its starting value is 0.5), and after each accepted attempt judges the
252
+ landed head against the starting head, recording that win rate as progress;
253
+ a panel threshold compares it. Its next child waits to land while a progress
254
+ panel is owed. See
255
+ [judge panels](references/optimization-nodes.md#judge-panels).
256
+
257
+ **Optimization landing.** A child of an optimization node lands only with a
258
+ fresh measurement of its exact head against the node's exact current head: an
259
+ attempt must improve by at least ε, any other child must not regress by more
260
+ than ε (for a panel, its win rate must reach 0.5 + ε or 0.5 − ε), and an attempt that edits a harness path escalates instead. Each
261
+ attempt settles once. An attempt that does not land, including one an operator
262
+ aborts, has its ticket moved to the rejected role: the one case in which the
263
+ dispatcher moves a ticket there. A declined or no-improvement attempt's
264
+ published branch is deleted first, and a failed deletion stays pending and
265
+ visible. A human forge merge whose merged head was never measured does not
266
+ count as accepted. The attempt stays in flight, holding its slot, until an
267
+ operator runs `ab objective <node> --settle-unmeasured <attempt> --policy
268
+ release-unmeasured`, which settles it `merged-unmeasured` and moves no value.
269
+ See
270
+ [landing and settlement](references/optimization-nodes.md#landing-and-settlement).
271
+
272
+ An optimization node stops once: automatically on a threshold, plateau or
273
+ budget cause, when the proposer is exhausted, or by hand with
274
+ `ab objective <node> --stop [--drain | --abort]`. Its stop mode then aborts or
275
+ drains the attempts in flight. It completes only after it has stopped with no
276
+ attempt running or waiting to land, and stopping is not consent: land it with
277
+ `ab merge <node>`. See
278
+ [stopping and completion](references/optimization-nodes.md#stopping-and-completion).
178
279
 
179
280
  **Review severity is proportion to the spec.** Both review loops rate a
180
281
  finding by what the defect costs against the spec's acceptance criteria and
@@ -433,8 +534,14 @@ The distinctions that change an administrator's answer:
433
534
  successful content-producing finalize post-step. History rewrites (reconcile,
434
535
  leaf verify-entry, wait-resume and waiting restacks, and node restacks on demand; see
435
536
  [restacking](references/restacking.md)) replace a branch only with an exact
436
- expected-head guard after archiving every recorded Git tip under
437
- `refs/autobuild/archive/<slug>/<sha>`.
537
+ expected-head guard after retaining every recorded Git tip. Leaf rewrites and
538
+ node writes retain best effort: the immutable
539
+ `refs/autobuild/archive/<slug>/<sha>` ref where the forge accepts it, else a
540
+ BuildStore `history-objects-<sha>` copy, else one `history-unretained` warning
541
+ per build, and the write proceeds; `history.retained` (leaf) and
542
+ `node.history-retained` (node) record the non-forge outcomes. Workspace
543
+ preservation of unpublished commits is strict: archive ref, else store copy
544
+ (`workspace.commits-retained`), else the release is refused.
438
545
  `github` publishes through GitHub. `local-git` performs no remote/network/`gh`
439
546
  operation: durable PR records live under private Git refs, and the review
440
547
  locator is `refs/heads/ab/<slug>`. Once merge authorization (auto or consent;
@@ -473,7 +580,7 @@ evaluated as config logic.
473
580
 
474
581
  **Strictness:** unknown top-level keys/tables and unknown keys inside known
475
582
  tables are **errors**, not warnings — a typo must not silently disable a
476
- verifier. The open maps are `[accounts]`, `[commands]`, `[roles]`, `[profiles]`,
583
+ verifier. The open maps are `[accounts]`, `[commands]`, `[hooks]`, `[roles]`, `[profiles]`,
477
584
  `[profiles.<name>.roles]`, `[workspace.config]`,
478
585
  `[workspace.config.runtimeProvisioning]`, `[verify.<step>]`, and
479
586
  `[finalize.<step>]`. Autobuild strictly validates the
@@ -737,6 +844,29 @@ end-to-end or browser test suite into an ordinary `check` step. If none exists,
737
844
  do not create one during setup. The acceptance check neither substitutes for
738
845
  nor seeds a suite.
739
846
 
847
+ ### `[generated]`
848
+
849
+ An optional ordered array of tables, written `[[generated]]`, declaring files a
850
+ deterministic command rebuilds. Omitting it declares nothing and changes no
851
+ behavior.
852
+
853
+ | Field | Default | Allowed / constraints | Effect |
854
+ |---|---|---|---|
855
+ | `paths` | — (required) | nonempty array of path selectors (the `[verify.<step>].paths` grammar); a selector string may appear in only one entry | Files this entry owns. When several entries match a file, the first in declaration order owns it. |
856
+ | `command` | — (required) | nonblank shell string | Run with `sh -c` from the workspace root, after `[commands].setup`, to rebuild every file the entry owns. It must write only declared paths and leave the Git index unchanged; the kernel stages the output. |
857
+
858
+ When a restack replay (a leaf's automatic restack, or one item of a node
859
+ restack) conflicts only in declared files, the kernel regenerates them instead
860
+ of starting a reconcile session: it takes the target's side of each conflicted
861
+ file, runs each owning command once, and commits the result as the change's
862
+ replay. A non-zero exit, a write outside the declarations, a change to the Git
863
+ index, or leftover conflict markers fails the regeneration; nothing is committed and the replay goes to an
864
+ ordinary reconcile with the failure reason in its context. A replay that also
865
+ conflicts in undeclared files goes straight to reconcile, whose context lists
866
+ the generated files and commands to run after the other files are resolved.
867
+ Declarations come from the dispatcher's live configuration, like `[policy]`.
868
+ See [Restacking](references/restacking.md) for the recorded facts.
869
+
740
870
  ### `[verify]`
741
871
 
742
872
  Post-reconcile verification defaults to enabled: `[verify].afterReconcile = true`.
@@ -771,7 +901,7 @@ subtables are part of this section — their fields are listed here.
771
901
  | `steps` | `[]` | strings or nonempty arrays of names; no duplicate names | Ordered stages. Members start together; every pass or skip is required before the next stage. Each name needs a matching table. |
772
902
  | `failFast` | `false` | optional boolean on either verify kind | A failure cancels unfinished members of its stage, then tears down and relaunches the whole execution before implement. |
773
903
  | `kind` | — | **required**, `"check"` \| `"agent"` | Discriminator. `check` is deterministic (command + pass/fail, never an agent); `agent` runs a skill that returns `pass`, `fail`, or `skip`. |
774
- | `command` | — | **required when `kind = "check"`**, nonempty string | Ref into `[commands]` — the key, not a shell string. Pass/fail is the command's exit status. |
904
+ | `command` | — | **required when `kind = "check"`**, nonempty string | Ref into `[commands]` — the key, not a shell string. Pass/fail is the command's exit status. Runs with `AB_VERIFY_BASE` set to the verify diff base when one exists. |
775
905
  | `skill` | — | **required when `kind = "agent"`**, nonempty string | Installed skill name to run (e.g. a repository-authored `"verify-acceptance"`). |
776
906
  | `paths` | — | optional nonempty array of positive repository-relative globs | Makes either step kind apply when any changed path matches any selector. Omitted means unconditional. |
777
907
  | `afterReconcile` | repository: `true`; step: inherited | boolean | Step override wins over `[verify].afterReconcile`; false skips this step after reconciliation only. |
@@ -923,6 +1053,10 @@ excluded while build-owned resolutions remain visible. A miss starts no
923
1053
  command, agent, or session and records `skipped` with
924
1054
  `excluded by [verify.<step>].paths: no changed path matched <JSON paths>`.
925
1055
  Git/base failures fail closed as infrastructure rather than becoming skips.
1056
+ A `check` command receives that same base as `AB_VERIFY_BASE` (a node's is its
1057
+ integration cycle parent), so it can judge the change relative to the base.
1058
+ The variable is absent outside a build, under an older runtime, and for a leaf
1059
+ with no provisioned base; a check that needs it must handle its absence.
926
1060
 
927
1061
  Agent verifiers may also use `ab verdict pass`,
928
1062
  `ab verdict fail --report <file>`, or `ab verdict skip --reason <text>`. The
@@ -982,10 +1116,15 @@ Before releasing or replacing a build workspace, the dispatcher confirms a
982
1116
  non-destructive execution fence for the exact workspace and execution generation.
983
1117
  It preserves unpublished branch commits and distinct detached producer candidates
984
1118
  under immutable `refs/autobuild/archive/<build>/<sha>` refs, verifies their exact
985
- readback, and records `workspace.commits-preserved` before cleanup. Replacement
986
- provisioning restores those exact refs before starting an agent, reading them
987
- from the local repository with the local-git forge and fetching each exact ref
988
- from the remote otherwise. A preserved
1119
+ readback, and records `workspace.commits-preserved` before cleanup. Where the
1120
+ forge refuses an archive ref, the head is kept as a BuildStore copy instead
1121
+ and the receipt is the decisive `workspace.commits-retained`, whose heads each
1122
+ name either `remoteRef` or `storeBase`; a head kept by neither refuses the
1123
+ release. Replacement provisioning restores those exact commits before starting
1124
+ an agent, reading archive refs from the local repository with the local-git forge
1125
+ and fetching each exact ref from the remote otherwise, and restoring store copies
1126
+ through a dispatcher-side callback on any host, so a remote guest never holds
1127
+ store credentials. A preserved
989
1128
  branch head that the build's latest 64 replaced heads cover, as the replaced
990
1129
  head itself or one of its ancestors, is kept only as archived objects: it is
991
1130
  never preserved or restored as the branch, and provisioning records the skip as
@@ -996,11 +1135,14 @@ that exists without a provisioned checkout, records `workspace.commits-lost`,
996
1135
  naming known candidates and explicitly noting that any additional unpublished
997
1136
  SHAs could not be inspected. An environment that never started executing holds
998
1137
  no unpublished work: objects its checkout lacks mean nothing to preserve, so
999
- cleanup records `workspace.commits-preserved` carrying forward earlier preserved
1000
- heads, then releases and replaces it. Unknown fencing, inspection, transport, or
1138
+ cleanup records `workspace.commits-preserved` (or `workspace.commits-retained`)
1139
+ carrying forward earlier preserved heads, then releases and replaces it. Unknown fencing, inspection, transport, or
1001
1140
  receipt-write outcomes leave the workspace and snapshots intact. A workspace
1002
1141
  flagged by `workspace.cleanup-required` is never launched into: the dispatcher
1003
- releases it and provisions the next generation. A preservation or release
1142
+ releases it and provisions the next generation. Provisioning cut off by a
1143
+ recorded dispatcher teardown is the exception: the next invocation asks the
1144
+ provider to verify and finish the same generation, and if it cannot, the
1145
+ replacement consumes no infrastructure attempt. A preservation or release
1004
1146
  failure is recorded against its build, as an infrastructure failure or janitor
1005
1147
  attention, and never stops the dispatcher from advancing other builds.
1006
1148
  Fencing is revalidated after restart; a saved receipt alone never authorizes
@@ -1138,7 +1280,7 @@ These are the repository's roles for every build; a ticket label can select a
1138
1280
  The four primary axes, session budget, and ordered alternate list inherit independently. The reserved `default` role must explicitly name a
1139
1281
  runtime, is the raw inheritance base for every other role, and is **never
1140
1282
  dispatched as a phase**. Its absence fails eager resolution before a session,
1141
- with a copyable fix and all registered runtime names. Three runtimes ship:
1283
+ with a copyable fix and all registered runtime names. Four runtimes ship:
1142
1284
  Named `[accounts]` are deployment-owned nonsecret descriptors, adopted atomically
1143
1285
  with `[roles]`. The `account` axis inherits independently on primary and alternate
1144
1286
  routes. A Claude route defaults to the sole Claude subscription account, and
@@ -1146,21 +1288,29 @@ ambiguity or incompatible runtimes fail validation. See [billing accounts](refer
1146
1288
  for provisioning, ChatGPT sign-in destinations, Kimi regions, placeholders, single-owner renewal and metadata-only hosted readiness.
1147
1289
 
1148
1290
  **`claude`** (local Claude Code CLI), **`codex`** (local Codex CLI; unqualified
1149
- `gpt-*` ids), and **`pi`** (local Pi CLI 0.84.3 or newer; provider-qualified ids
1150
- such as the independent `openai-codex/gpt-5.6-sol` route). Pi runs headlessly
1291
+ `gpt-*` ids), **`pi`** (local Pi CLI 0.84.3 or newer; provider-qualified ids
1292
+ such as the independent `openai-codex/gpt-5.6-sol` route), and **`antigravity`**
1293
+ (local Antigravity CLI `agy`; unqualified `gemini-*`, `claude-*` and `gpt-*`
1294
+ slugs). Pi runs headlessly
1151
1295
  through RPC and uses that local installation's login and model catalog;
1152
1296
  Autobuild does not install it. `ab models [query]` lists the local catalog, and
1153
- `ab models --available` filters it to configured credentials. Claude and Codex
1154
- delegate an omitted model to their CLI default; a Claude route selecting a Kimi Code account defaults to `kimi-for-coding`; Pi declares `kimi-coding/k3`.
1297
+ `ab models --available` filters it to configured credentials. Antigravity runs
1298
+ headless `agy` turns with the operator's ambient agy authentication (keyring
1299
+ sign-in, `GEMINI_API_KEY` with `modelProvider = "gemini"`, or ADC); Autobuild
1300
+ does not install it and has no named accounts for it. Claude, Codex and
1301
+ Antigravity delegate an omitted model to their CLI default; a Claude route selecting a Kimi Code account defaults to `kimi-for-coding`; Pi declares `kimi-coding/k3`.
1302
+ Antigravity declares no tool-free one-shot, so slug naming uses the title
1303
+ fallback and upgrade conflicts stay manual on Antigravity routes.
1155
1304
  Trusted plugins may register additional runtime names;
1156
1305
  they use the same role inheritance, default-model compatibility validation,
1157
1306
  session event attribution, and optional one-shot capability path as builtins.
1158
1307
 
1159
1308
  The pipeline resolves `plan`, `plan-review`, `implement`, `code-review`,
1160
- `finalize`, and `reconcile`, plus each **agent** verify and finalize step by
1309
+ `finalize`, `reconcile` and an optimization node's `propose`, plus each **agent** verify and finalize step by
1161
1310
  its logical step name. A verify step's configured skill name remains a
1162
1311
  deprecated alias for existing configurations and will be removed in a future
1163
- release. The repository workflow resolves `harvest` and `harvest-review`. Two
1312
+ release. The repository workflow resolves `harvest` and `harvest-review`. Each
1313
+ judge session of an optimization objective's judge panel resolves `judge`. Two
1164
1314
  non-phase judgments use the same runtime/model/args resolver: `slug` optionally
1165
1315
  proposes pre-build naming, and `upgrade` proposes a resolution only when a
1166
1316
  vendored skill merge conflicts. Both are tool-free one-shots and receive the
@@ -1201,7 +1351,9 @@ model families; all problems in `default` and every declared role are
1201
1351
  aggregated by one eager resolver construction before judgment runs. Runtime
1202
1352
  adapters reject the model and parsed protocol/output-mode options they
1203
1353
  emit: Claude rejects `-p`/`--print`, `--output-format`, and `--model`; Codex
1204
- rejects `--json` and `--model`/`-m`; Pi rejects `--mode` and `--model`. Claude
1354
+ rejects `--json` and `--model`/`-m`; Pi rejects `--mode` and `--model`;
1355
+ Antigravity rejects `-p`/`--print`/`--prompt`, `--output-format`,
1356
+ `--input-format`, and `--model`. Claude
1205
1357
  routes with a selected account additionally reject `--settings`,
1206
1358
  `--setting-sources`, and `--bare` because Autobuild owns their authentication
1207
1359
  settings. Codex routes selecting a ChatGPT subscription account additionally
@@ -1210,7 +1362,10 @@ because Autobuild owns their provider and configuration routing. This includes
1210
1362
  using `-c` to set reasoning effort. Routes without an account retain the existing
1211
1363
  argument behavior. Exact
1212
1364
  spellings, `--option=value` forms, and documented compact short aliases join
1213
- that same role-naming aggregate. Every other option passes through without
1365
+ that same role-naming aggregate. Antigravity also owns conversation
1366
+ selection: `--conversation`, `--continue`/`-c`, and `--prompt-interactive`/`-i`
1367
+ (including `=` forms) in `args` fail each turn as a configuration failure
1368
+ before `agy` launches rather than at startup. Every other option passes through without
1214
1369
  Autobuild validation, including sandbox, approval, session, tool, skill,
1215
1370
  thinking, extension, lifecycle, and unknown options, even when it supplements
1216
1371
  another adapter-emitted occurrence. Pi always
@@ -1242,7 +1397,8 @@ an alternate; only a successful primary can remain live for producer revisions.
1242
1397
  Only chain exhaustion writes the phase failure, and
1243
1398
  the final failure controls retry behavior. Substitution starts and exhausted
1244
1399
  failures retain the targets and verbatim errors durably. Core phases, agent
1245
- verify/finalize, and Harvest use the chain; tool-free one-shots do not.
1400
+ verify/finalize, Harvest and judge sessions use the chain; tool-free one-shots
1401
+ do not.
1246
1402
 
1247
1403
  A build phase session that reaches its captured budget is aborted and ended
1248
1404
  best-effort. The kernel records retryable `phase.failed` with `phase session
@@ -1288,8 +1444,8 @@ args = ["--effort", "high"]
1288
1444
  `ab repository status` until it carries at most one. A ticket can only
1289
1445
  select a profile; it never supplies a model, runtime or argument itself.
1290
1446
  - **Contents are live.** Every agent session of the build (plan, plan
1291
- review, implement, code review, agent verify and finalize steps, reconcile)
1292
- resolves through the profile read from the current configuration, so an
1447
+ review, implement, code review, agent verify and finalize steps, reconcile,
1448
+ and the judges of a panel run on the build) resolves through the profile read from the current configuration, so an
1293
1449
  edit reaches only the builds that selected it, at their next session.
1294
1450
  `session.started.profile` records `{ name, configured }`. If a reload removes
1295
1451
  the profile, those builds continue on the repository roles and
@@ -1297,6 +1453,10 @@ args = ["--effort", "high"]
1297
1453
  - **Validation.** Duplicate labels, a missing or blank label, and an entry
1298
1454
  whose effective runtime, model, args or account would be refused for a
1299
1455
  `[roles]` entry fail config load, `ab init --validate` and a live reload.
1456
+ Dispatch also warns at startup, never refuses, for a profile entry no build
1457
+ session requests (including `slug`, `upgrade`, `harvest` and
1458
+ `harvest-review`), a deprecated skill-name key, or deprecated `extensions`,
1459
+ naming the `[profiles.<name>.roles.<role>]` table.
1300
1460
  - **Scope.** Sessions outside a build (`slug`, `upgrade`, `harvest`,
1301
1461
  `harvest-review`) never use a profile.
1302
1462
 
@@ -1308,7 +1468,9 @@ users to move its fields to `[roles.default]`.
1308
1468
  ### `[policy]`
1309
1469
 
1310
1470
  Every field is a **positive integer** except `harvestMaxDrift`, which is a
1311
- nonnegative integer so zero can disable that trigger.
1471
+ nonnegative integer so zero can disable that trigger, and the open-PR
1472
+ backpressure keys `maxOpenPrs` (no default; unset disables backpressure),
1473
+ `resumeOpenPrs` and the boolean `excludeHeldOpenPrs`.
1312
1474
 
1313
1475
  | Field | Default | Allowed / constraints | Effect |
1314
1476
  |---|---|---|---|
@@ -1320,7 +1482,7 @@ nonnegative integer so zero can disable that trigger.
1320
1482
  | `maxVerifyAttempts` | `3` | positive integer | Caps distinct failed verify cycles since the latest spec revision; passed and skipped cycles cost zero. |
1321
1483
  | `maxDispatchAttempts` | `3` | positive integer | Caps consecutive dispatch failures before a setup-targeted `dispatch-failure-limit` escalation. |
1322
1484
  | `maxSetupAttempts` | `3` | positive integer | Caps consecutive `[commands].setup` failures before a setup-targeted policy escalation. |
1323
- | `maxInfrastructureAttempts` | `3` | positive integer | Caps consecutive remote provider lifecycle failures before a setup-targeted policy escalation; a `retry` answer re-arms the budget. |
1485
+ | `maxInfrastructureAttempts` | `3` | positive integer | Caps consecutive remote provider lifecycle failures before a setup-targeted policy escalation; a `retry` answer re-arms the budget. Teardown-abandoned provisioning does not count. |
1324
1486
  | `maxReconcileAttempts` | `3` | positive integer | Caps completed reconciles that leave the PR conflicted against an unchanged authoritative base. Moving-base races do not consume the budget. |
1325
1487
  | `maxReviewRounds` | `6` | positive integer | Default `maxRounds` for the `plan ⇄ plan-review` and `implement ⇄ code-review` convergence loops. When that cap parks a build, `ab answer <slug> --review-round-ceiling <n>` may replace it for only the escalation's loop and current spec revision. |
1326
1488
  | `harvestThreshold` | `5` | positive integer | Newly unclaimed `observation.recorded` occurrences required to start one repository harvest run. |
@@ -1330,6 +1492,9 @@ nonnegative integer so zero can disable that trigger.
1330
1492
  | `nodeIdlePollSeconds` | `120` | positive integer | Interval between idle node checks; durable activity wakes the next tick. |
1331
1493
  | `janitorBackoffMaxSeconds` | `300` | positive integer | Cap on exponential janitor retry delay, starting at 30 seconds. |
1332
1494
  | `harvestMaxDrift` | `3` | nonnegative integer | Other builds merged after the oldest unclaimed observation required to start a run; `0` disables drift. |
1495
+ | `maxOpenPrs` | unset | positive integer | Open unmerged root PRs (leaves and integration nodes, not children of a node) at which the dispatcher stops claiming `normal`-priority tickets. Urgent claims, in-flight builds, reconciles and landings continue. Unset disables open-PR backpressure. |
1496
+ | `resumeOpenPrs` | `maxOpenPrs - 1` | nonnegative integer, at most `maxOpenPrs` | Once engaged, normal claims stay paused until the open root PR count is at or below this. Reaching `maxOpenPrs` takes precedence, so when this equals `maxOpenPrs` claims resume once the count falls below it. Inert without `maxOpenPrs`. |
1497
+ | `excludeHeldOpenPrs` | `false` | boolean | Leave PRs whose active landing command is `hold` out of the count. Inert without `maxOpenPrs`. |
1333
1498
 
1334
1499
  Dispatch failures share one budget across stages until runner attachment. At
1335
1500
  exhaustion dispatch parks durably; bare `ab answer <slug>` and text guidance
@@ -1362,8 +1527,8 @@ own-build-read deferral and its answer resets no phase failures; reconcile no-pr
1362
1527
  while `round` remains occurrence scope. Answering a runner-failure cause re-arms
1363
1528
  only its matching phase and round. The phase-level `verify-failure-limit` cause
1364
1529
  explicitly re-arms all rounds for its verify target, while
1365
- `reconcile-no-progress`, `publication-retry-limit`, `wait-unresolvable` and the
1366
- setup-only cause reset no phase-runner failures.
1530
+ `reconcile-no-progress`, `publication-retry-limit`, `wait-unresolvable`,
1531
+ `measurement-failed` and the setup-only cause reset no phase-runner failures.
1367
1532
  The closed cause map forces every future policy condition to choose one of these
1368
1533
  semantics instead of inheriting behavior from a missing `round`. Runner failures
1369
1534
  while checking progress or refreshing the base therefore remain counted after a
@@ -1404,19 +1569,20 @@ state eligible.
1404
1569
  | Field | Default | Allowed / constraints | Effect |
1405
1570
  |---|---|---|---|
1406
1571
  | `source` | — | **required**, nonblank builtin or plugin registration name | Which provider backs all ticket operations. Unknown names report every available builtin and plugin source. |
1407
- | `readyLabels` | — (source-aware) | optional; array of nonempty strings | A ticket must carry **every** listed label to be dispatchable. `[]` = **no label gate**. Absent uses the source default below. |
1572
+ | `readyLabels` | — (source-aware) | optional; array of nonempty strings | A ticket must carry **every** listed label to be dispatchable. `[]` = **no label gate**. Absent uses the source default below. Creation labels (`createLabels`) are ordinary labels and never satisfy this gate unless listed here; with the github/linear default `["autobuild"]`, `createLabels = ["autobuild"]` makes every Autobuild-filed ticket pass it. |
1408
1573
  | `url` | selected build service | HTTPS URL (loopback HTTP allowed), no userinfo/query/fragment; hosted only | Ticket service independent of builds; required for local builds. |
1409
1574
  | `readyState` | hosted, github: `ready` | non-blank string; required for other sources | The one workflow state a ticket must sit in to be dispatchable. Linear matches exactly and case-sensitively; file matches it case-insensitively to a state directory (`ready` → `ready/`); github matches the `autobuild:<state>` label ignoring case. There is no any-state mode. |
1410
1575
  | `readyAssignee` | — | optional; sources that declare the capability: `linear` (`"me"` or an email), `github` (`"me"` or a username, managed-user `name_shortcode` logins included), declaring plugins; refused for `file`/`hosted` | Also require the ticket to be assigned to that user; unassigned tickets are never ready. With `github`, each ready scan reports ready issues that have no assignee in the ticket diagnostics; assign one to make it claimable. `me` is the credential owner: of `LINEAR_API_KEY` for `linear`, of the GitHub token for `github`. A `github` issue with several assignees matches any one of them. |
1411
1576
  | `createAssignee` | — | optional; sources that declare the `assignees` capability: `github` (`"me"` or a username), declaring plugins; refused for `file`/`hosted`/`linear` | Assign every ticket Autobuild creates (`ab ticket create`, operator `tickets.create`, harvest proposals) to that user unless the create names its own assignees. `me` is the creating credential's owner, so a harvest proposal belongs to the filing dispatcher's owner. Pairs with `readyAssignee = "me"`. |
1577
+ | `createLabels` | — | optional; array of nonblank label names with no surrounding whitespace; every source, with reserved names refused on `github` (`autobuild:<state>`, `autobuild-link:…`, `node`) and `linear` (`node`) | Add these labels to every ticket Autobuild creates (`ab ticket create`, operator `tickets.create`, harvest proposals, optimization attempts), unioned after the labels the create names, never replacing them. A harvest proposal carries `autobuild:proposal` plus these. `ab ticket import` never applies them. `[]` or absent adds none. |
1412
1578
  | `teamKey` | — | required by `linear` and `hosted`, forbidden by `file` and `github`, allowed for plugins | The Linear team key (e.g. `"ENG"`), the captured prefix for new hosted ticket ids (`ENG-1`), or a plugin configuration field. Hosted numbers are project-local and continue across prefix changes; legacy ids remain aliases and readable inputs are case-insensitive. |
1413
1579
  | `claimedState` | hosted, github: `doing` | optional nonempty string; forbidden by `file`, allowed for plugins | Workflow state `claim()` moves a ticket to when a build starts. |
1414
1580
  | `doneState` | hosted, github: `"done"` | optional nonblank string | Project completion state and merged-ticket transition; hosted and github tickets only. A github ticket is done when its issue is closed as completed. |
1415
1581
  | `createState` | — | optional, nonempty string | Default state for new tickets when a create does not name one. Absent = the provider's default (Linear: the team's default, e.g. Backlog; file: Triage; github: triage). |
1416
- | `triageState` | — | optional, nonempty string | State the dispatcher hands tickets back to for human triage — spec-gate bounces, aborted builds (unless `ab abort --to ready`), closed-unmerged PRs. Absent = Linear: Backlog; hosted, github: triage; file/plugin: Triage. Must name a state the tracker actually has — a Linear team only has "Triage" when its triage feature is enabled. |
1582
+ | `triageState` | — | optional, nonempty string | State the dispatcher hands tickets back to for human triage — spec-gate bounces, aborted builds (unless `ab abort --to ready`), closed-unmerged PRs; an optimization attempt goes to the rejected role instead. Absent = Linear: Backlog; hosted, github: triage; file/plugin: Triage. Must name a state the tracker actually has — a Linear team only has "Triage" when its triage feature is enabled. |
1417
1583
  | `proposalState` | — | optional, nonempty string | State observation harvest files approved proposals into. Absent = the resolved `triageState`, which keeps the human grooming gate. Setting it to `readyState` waives that gate: harvested proposals dispatch without being read. Keep it distinct from `triageState` — see below. |
1418
1584
  | `backlogState` | — | optional nonblank string; every source | State that holds deliberately deferred work: the backlog role. Recommended (`ab init` writes `"backlog"` for file, hosted and github); unset means the role does not exist. Must differ, case-insensitively, from the ready, claimed, done, triage and proposal states and from `rejectedState`. |
1419
- | `rejectedState` | — | optional nonblank string; every source | State that holds considered-and-declined work: the rejected role. Recommended (`ab init` writes `"rejected"` for file, hosted and github). On github it is an issue closed as not planned or duplicate. A ticket in it never resolves a blocker, even if the source counts it complete, and never keeps a node incomplete. Same distinctness rule. |
1585
+ | `rejectedState` | — | optional nonblank string; every source | State that holds considered-and-declined work: the rejected role. Recommended (`ab init` writes `"rejected"` for file, hosted and github). On github it is an issue closed as not planned or duplicate. A ticket in it never resolves a blocker, even if the source counts it complete, and never keeps a node incomplete. An [optimization node](references/optimization-nodes.md) is refused without it, and its attempts that settle `no-improvement`, `declined`, `stopped` or `aborted` move into it. Same distinctness rule. |
1420
1586
  | `dir` | file: `.autobuild/tickets`; plugin: — | optional nonempty string; forbidden by `linear`, `hosted` and `github`, allowed for plugins | Root holding file state directories, or an existing plugin configuration field. |
1421
1587
 
1422
1588
  `readyLabels` is the only source-aware readiness default. Dispatch resolves it
@@ -1431,8 +1597,10 @@ as follows:
1431
1597
 
1432
1598
  An explicit `readyLabels` value always wins for every source.
1433
1599
 
1434
- `proposalState` is the one supported way to waive the grooming gate, and it is
1435
- deliberately not `triageState`. Do not suggest pointing `triageState` at the
1600
+ `proposalState` is the one supported way to waive the grooming gate for
1601
+ harvest, and it is deliberately not `triageState`. (An optimization node's
1602
+ attempts are the only other generated work that reaches ready: grooming the
1603
+ node's objective and budget is their dispatch decision.) Do not suggest pointing `triageState` at the
1436
1604
  ready state to get auto-dispatched proposals: `triageState` is also where a
1437
1605
  spec-gate bounce merges, so a nonconforming ticket would be claimed, bounced,
1438
1606
  and reclaimed on every tick. `proposalState` moves only what harvest files.
@@ -1450,6 +1618,10 @@ Cross-field rules, each an **error**:
1450
1618
  `linear`, or a plugin source without the `assignees` capability), the same
1451
1619
  way. `ab init --validate` also reports a `"me"` whose credential has no user
1452
1620
  and a user who can't be assigned issues in the repository.
1621
+ - A `createLabels` entry a builtin source reserves: on `github` an
1622
+ `autobuild:<state>` label (the `autobuild:proposal` and `autobuild:aborted`
1623
+ markers are allowed), an `autobuild-link:` label, or `node`; on `linear`,
1624
+ `node`. A live reload that adds one is rejected.
1453
1625
  - `source = "file"` with `teamKey` or `claimedState` set. `dir` is **optional**
1454
1626
  here — absent means the default above, which is why the schema leaves it
1455
1627
  optional rather than giving it a `.default()`: that is what keeps the
@@ -1502,7 +1674,8 @@ issue is always a `closes` link. Links to other issues show on GitHub as
1502
1674
  and intent, never deleted when unused; state and link labels are never ticket
1503
1675
  labels, and writes naming them are refused. The `autobuild:proposal` and
1504
1676
  `autobuild:aborted` labels that harvest and abort apply are ordinary labels,
1505
- so `proposal` and `aborted` cannot be states. Dispatcher notices post as issue
1677
+ so `proposal` and `aborted` cannot be states. Creation labels are ordinary
1678
+ labels too, created on demand like any other. Dispatcher notices post as issue
1506
1679
  comments, but tickets carry no comment history, so `ab ticket show` lists none;
1507
1680
  export and import read it explicitly.
1508
1681
  Assets live in the BuildStore. A node is an issue with the exact `node` label,
@@ -1616,6 +1789,62 @@ stays in the repository journal;
1616
1789
  `dispatcher.upgrade-failed` and `dispatcher.runtime-rolled-back` are actionable attention. Status also exposes the last rollback and current-lineage hold. Unrelated base commits do not
1617
1790
  retry an unchanged failed target. No registry credentials belong in these facts.
1618
1791
 
1792
+ ### `[hooks]`
1793
+
1794
+ An open map of hook name → observe-only hook. The lease-holding dispatcher
1795
+ delivers each record that matches the hook's filter to its command or URL, so
1796
+ tooling reacts to attention without keeping its own `ab watch` alive.
1797
+
1798
+ | Field | Default | Meaning |
1799
+ | --- | --- | --- |
1800
+ | `command` | one of `command`/`url` | Shell command run with `sh -c` from the checkout, once per record. |
1801
+ | `url` | one of `command`/`url` | Endpoint that receives one signed JSON `POST` per record: `https`, or `http` only to loopback (`localhost`, `127.0.0.0/8`, `[::1]`); no credentials or fragment. |
1802
+ | `secretEnv` | required with `url` | Name of the dispatcher environment variable holding the signing secret; rejected on a command hook. |
1803
+ | `events` | absent | `ab watch --event` globs, catalog-validated; absent means the default watch attention set. |
1804
+ | `timeoutSeconds` | `30` | Per-delivery limit; a timeout is a failure and kills a command's process group or abandons a request. |
1805
+
1806
+ - **Validation.** Names use ASCII letters, digits, `.`, `_` and `-`; a duplicate
1807
+ table, no target or both `command` and `url`, a bad `url`, a `url` without
1808
+ `secretEnv`, an empty `events` list, or a glob matching no build or repository
1809
+ event type (or `dispatcher.lost`) is rejected naming the hook, at startup and
1810
+ on reload. The dispatcher also rejects a `secretEnv` variable that is unset or
1811
+ blank in its own environment, naming the hook and the variable but never a
1812
+ value. `hooks` hot-reloads. The **hosted dispatcher rejects command hooks** as
1813
+ a config error, never silently ignored, and **delivers url hooks**.
1814
+ - **Record.** stdin carries exactly one record per invocation: the line `ab watch
1815
+ --json` prints for the same event under the same filter, including derived
1816
+ observations such as `build.consent-ready`. The record's `id` is stable across
1817
+ redelivery; its `cursor` is the hook's position after it. The environment drops
1818
+ build and session identity and adds `AB_HOOK=<name>`.
1819
+ - **Webhook.** A url hook gets one `POST` per record. The body is the record
1820
+ line without its newline (`Content-Type: application/json`), with headers
1821
+ `Autobuild-Hook` (hook name), `Autobuild-Delivery` (the record `id`, stable
1822
+ across redelivery), `Autobuild-Timestamp` (Unix seconds, per attempt) and
1823
+ `Autobuild-Signature: v1=<lowercase hex HMAC-SHA256 of "<timestamp>.<body>">`
1824
+ keyed by the secret. A 2xx response within the timeout is success; any other
1825
+ status, a redirect (never followed), a timeout or a connection error is a
1826
+ failure. Receivers recompute the signature over the raw body, compare in
1827
+ constant time, reject stale timestamps (five minutes is reasonable) and
1828
+ deduplicate on `Autobuild-Delivery`. The secret never appears in events,
1829
+ status, logs or errors.
1830
+ - **Guarantee.** For a command, exit 0 within the timeout is success. Records arrive in order,
1831
+ one invocation at a time; delivery is at least once, so consumers deduplicate
1832
+ by `id`. Hooks run outside the dispatch tick and nothing reads their outcome:
1833
+ a hook never delays or changes a build, a tick or another hook.
1834
+ - **Progress.** Durable per hook name (the latest `hook-progress.<name>`
1835
+ repository artifact) across restarts, hot upgrades and reloads. A new name
1836
+ starts when first loaded, without history; a renamed hook starts fresh; a
1837
+ changed command or filter resumes from saved progress. History too old to read
1838
+ resumes from the current position and records `hook.skipped`. `ab dispatch
1839
+ --once` makes one delivery pass per hook and stops at the first failure; a
1840
+ delivery in flight at a hosted invocation's deadline is stopped and
1841
+ redelivered next pass.
1842
+ - **Failure.** Retries back off to one minute between attempts. Five minutes of
1843
+ continuous failure records `hook.failing` once per episode; the next success
1844
+ records `hook.recovered`. All three `hook.*` events are default watch
1845
+ attention. `ab repository status` lists each hook's last delivery, backlog or
1846
+ "caught up", and current failure.
1847
+
1619
1848
  ## Setup and upgrades
1620
1849
 
1621
1850
  For 0.x upgrades, first read the [migration reference](references/migration-1.0.md):
@@ -1626,13 +1855,13 @@ repo path, needs no `AB_*` environment, and is safe to re-run. It:
1626
1855
 
1627
1856
  - Probes every registered runtime and reports whether it is usable, including a
1628
1857
  diagnostic reason. Setup launch selection uses the fixed product order
1629
- `claude`, `codex`, then `pi`; it never depends on repository content or a user
1858
+ `claude`, `codex`, `pi`, then `antigravity`; it never depends on repository content or a user
1630
1859
  questionnaire.
1631
1860
  - If config is absent, writes a valid stack-neutral skeleton with empty
1632
1861
  `[commands]`, no verify or finalize steps, a valid local ticket gate, and one
1633
1862
  explicit runtime solely as a schema placeholder. It reads no package or
1634
1863
  language manifest and invents no command.
1635
- - Vendors 12 skills before handoff, including the locally editable
1864
+ - Vendors 14 skills before handoff, including the locally editable
1636
1865
  [repository setup reference](references/setup.md) in the installed `ab-guide`
1637
1866
  tree. On an interactive terminal it starts the selected coding-agent CLI in
1638
1867
  the target repository with a short prompt to read that reference and
@@ -1992,6 +2221,9 @@ Harvest's creation reservations cover Harvest only, not interactive CLI creates.
1992
2221
  Dependency order and JSON id extraction are still required, but do not alone
1993
2222
  prevent an active dispatcher from claiming a partially created ready ticket.
1994
2223
 
2224
+ On create, `--labels` is unioned with `[tickets].createLabels`: the configured
2225
+ labels are added after the named ones, never replaced. `ab ticket import`
2226
+ keeps the exported labels and never adds them.
1995
2227
  Update is partial: omitted fields remain untouched, including labels, assignee,
1996
2228
  and provider metadata. `--labels` is a complete replacement and an explicitly
1997
2229
  empty value (`--labels ''`) clears the list. `--issues` records the forge issues
@@ -2003,8 +2235,10 @@ when it claims the ticket and turns them into PR and commit keywords; see
2003
2235
  complete replacement and `--issues ''` clears it. A source that cannot store
2004
2236
  issue links refuses any write naming them, names itself, and writes nothing.
2005
2237
  `--priority urgent` makes the dispatcher claim the ticket before normal ready
2006
- work, each class in source order; blockers and every other gate still apply,
2007
- and it never preempts a running build. `--priority normal` (the default)
2238
+ work, each class in source order, and ahead of normal builds waiting for a
2239
+ slot; blockers and every other gate still apply, and it never preempts a
2240
+ running build. The claimed build keeps that priority; `ab priority <slug>
2241
+ urgent|normal` changes an existing build's priority without touching its ticket. `--priority normal` (the default)
2008
2242
  removes urgency. The file, hosted and Linear sources store priority (Linear as
2009
2243
  its native Urgent; `normal` clears only Urgent and leaves other Linear priorities
2010
2244
  alone); plugin sources without the capability read every ticket as normal,
@@ -2037,7 +2271,7 @@ subcommands accept `--json`, which emits one bare JSON value and no prose: a
2037
2271
  `Ticket[]` for `list`, and the complete resulting `Ticket` for `create`,
2038
2272
  `update`, `block`, `unblock`, `show`, or `move`.
2039
2273
 
2040
- Paged operator ticket listings may use the optional API 1.9 `TicketSource.listPage(criteria, page)` capability; without it, the operator reads the full listing and slices it. Native errors propagate. CLI ticket lists and dispatcher ready scans remain exhaustive through `listReady`/`listAll`. PostgreSQL pages natively; file, Linear, GitHub and remote `HostedTicketSource` retain fallback. The POST list-ready protocol stays exhaustive. See the [custom source contract](references/plugin-authoring.md) for types and contract coverage.
2274
+ Paged operator ticket listings may use the optional API 1.9 `TicketSource.listPage(criteria, page)` capability; without it, the operator reads the full listing and slices it. Native errors propagate. CLI ticket lists and dispatcher ready scans remain exhaustive through `listReady`/`listAll`. PostgreSQL pages natively, and the remote `HostedTicketSource` forwards pages to it through the service's `list-page` operation, falling back only against a service predating it; file, Linear and GitHub retain fallback. The POST list-ready protocol stays exhaustive. See the [custom source contract](references/plugin-authoring.md) for types and contract coverage.
2041
2275
 
2042
2276
  ### Ticket assets
2043
2277
 
@@ -2211,7 +2445,7 @@ verification progress or failure and the merge mode in parentheses. Before
2211
2445
  a policy decision, label-dependent modes may read `policy pending`. A current
2212
2446
  verified node adds `verified`. Only restack conflicts, current verification
2213
2447
  failures (file a repair child targeting the node), a node waiting for a runner
2214
- slot ahead of new ticket claims, and readiness awaiting consent add a list
2448
+ slot ahead of normal ticket claims, and readiness awaiting consent add a list
2215
2449
  alert. Consent names `l` and `ab merge <slug>`. Branch,
2216
2450
  restack state and conflicting files remain in detail, along with every child's
2217
2451
  ticket id, title and live phase (or queued/merged), open-first counts, verification
@@ -2337,7 +2571,7 @@ Without a live agent, acknowledgement still waits for a safe boundary. During
2337
2571
  that window `p` appends
2338
2572
  the opposing resume request, cancels the stale pause, and projects the build
2339
2573
  back to `RUNNING`. The cancelling resume holds back nothing, including merge
2340
- readiness. An acknowledged paused build offers only `r resume` and reads
2574
+ readiness and janitor retry backoff. An acknowledged paused build offers only `r resume` and reads
2341
2575
  `RESUMING` until the kernel acknowledges that request; there is no gesture to
2342
2576
  cancel a pending resume. Blocked takes visual precedence, including when the
2343
2577
  build is also operator-paused, and `r` opens the existing feedback field. Keys
@@ -2371,7 +2605,9 @@ Intake off skips only new ticket claims while janitor, stale-runner, harvest,
2371
2605
  and in-flight work continue — it deliberately does **not** set the repository
2372
2606
  hold, so a build the repository has already accepted still starts and finishes.
2373
2607
  Every dispatcher samples the current value on each tick, so a change in one
2374
- process gates all dispatchers for that repository.
2608
+ process gates all dispatchers for that repository. Intake is not the only way
2609
+ to claim a ticket: `ab start <ticket-id>` asks the running dispatcher to claim
2610
+ one named ticket whether or not intake is on (see the controls table below).
2375
2611
 
2376
2612
  The repository hold has no launch flag and no setter of its own: `p` and `r` on
2377
2613
  the dashboard's global row and the `ab pause --all` / `ab resume --all` walk
@@ -2387,10 +2623,14 @@ No rules means leaf auto / node consent. There is no claim-time default
2387
2623
  seeding or fan-out over existing builds. `ab merge <slug>` supplies consent to
2388
2624
  that merge and frozen destination; it survives replacement heads until hold
2389
2625
  or completion, except that consent given under a rule with `paths` or `within`
2390
- predicates is revoked (`landing.consent-revoked`) when a reconcile's own edits
2391
- touch a file those predicates match. `--head <sha>` refuses with `head-mismatch`, recording nothing,
2392
- unless `<sha>` is the current candidate head. `ab hold <slug>` suppresses policy and withdraws consent.
2393
- The old `--auto-merge` / `--no-auto-merge` flags and `ab auto-merge` command
2626
+ predicates is revoked (`landing.consent-revoked`) when a reconcile's own edits,
2627
+ or a leaf restack's generated-file regeneration, touch a file those predicates match. `--head <sha>` refuses with `head-mismatch`, recording nothing,
2628
+ unless `<sha>` is the current candidate head. `ab hold <slug>` suppresses policy and withdraws consent;
2629
+ `--reason <text>` (1–2000 characters after trimming) records why, and status, merges, builds and
2630
+ both dashboards show it until a later hold or merge replaces it.
2631
+ `ab reopen <slug>` also revokes consent (a hold stays): it sends a finished,
2632
+ unmerged leaf back to implement with feedback, or to plan with a revised spec,
2633
+ on its existing branch and PR. The old `--auto-merge` / `--no-auto-merge` flags and `ab auto-merge` command
2394
2634
  are retired and return actionable errors; use merge rules and hold/merge.
2395
2635
 
2396
2636
  Global-row `h` re-reads the repository journal and appends the existing human
@@ -2418,7 +2658,12 @@ followed by its later kernel acknowledgement, never by the request alone.
2418
2658
  Every build row renders a `merge <state>` token. Cyan requested means
2419
2659
  authorized but not yet applied natively; green enabled means the native request
2420
2660
  is armed; yellow cancelling means cancellation is in flight; dim off means no
2421
- authorization. A recorded consent decision waiting for an operator reads
2661
+ authorization. Cyan `merge polling` means GitHub GraphQL is unavailable to the
2662
+ dispatcher, so Autobuild lands the gated PR itself when GitHub reports it clear
2663
+ to merge, which needs a running dispatcher. Yellow `merge awaits a human merge`
2664
+ means the landing settled and makes no further attempts: the base requires a
2665
+ merge queue, or GitHub refused the guarded merge (its message is shown), and a
2666
+ person merges the PR on GitHub. A recorded consent decision waiting for an operator reads
2422
2667
  `merge awaiting consent`; an explicit hold reads `merge held`.
2423
2668
  There is no red comparison with a repository default. Row and detail merge
2424
2669
  explanations distinguish a pending policy decision, consent, and hold, and name
@@ -2449,13 +2694,50 @@ to the build's event log and apply the same write-time checks.
2449
2694
  | Resume all | `ab resume --all [--store <ref>] [--json]` | Select the global row and press `r`. | `dispatcher.pause-set` (first), `dispatcher.intake-set`, then one `build.resume-requested` per `PAUSED` build |
2450
2695
  | Consent to merge | `ab merge <slug> [--head <sha>] [--store <ref>]` | Select a ready build and press `l`. | `build.land-requested`, then `landing.command-acknowledged` |
2451
2696
  | Restack node | `ab restack <node> [--store <ref>]` | CLI/tool request; normal safety gates apply. | `node.restack-requested`, then `node.restack-satisfied` |
2452
- | Hold merge | `ab hold <slug> [--store <ref>]` | Select a build and press `o`, including before readiness. | `build.hold-requested`, then `landing.command-acknowledged` after native cancellation |
2697
+ | Show or revise an objective | `ab objective <node> [--threshold n] [--epsilon n\|n%] [--max-attempts n] [--max-hours n] [--plateau n] [--stop-mode abort\|drain] [--concurrency n] [--json] [--store <ref>]` | CLI/tool request (`optimization.revise`); without flags it only shows the effective objective and progress. Running attempts are unaffected; revised stop rules apply on the next tick. | `optimization.objective-revised` |
2698
+ | Stop an optimization node | `ab objective <node> --stop [--drain\|--abort] [--json] [--store <ref>]` | CLI/tool request (`optimization.stop`). Without a flag the objective's stop mode applies (abort by default). Final, and not merge consent. | `optimization.stopped`; dispatcher `build.abort-requested` per aborted attempt, then `attempt.settled` |
2699
+ | Settle an unmeasured merge | `ab objective <node> --settle-unmeasured <proposal\|build> --policy release-unmeasured [--note <text>] [--json] [--store <ref>]` | CLI/tool request (`optimization.settle-unmeasured`). Only for an attempt listed as an unmeasured merge; releases its slot once, never as accepted. | `attempt.settled {outcome: merged-unmeasured}` |
2700
+ | Hold merge | `ab hold <slug> [--reason <text>] [--store <ref>]` | Select a build and press `o`, including before readiness. | `build.hold-requested` (optional `reason`), then `landing.command-acknowledged` after native cancellation |
2701
+ | Set build priority | `ab priority <slug> urgent\|normal [--store <ref>]` | CLI/tool request (`builds.control` action `priority`); changes only the build's slot-admission order, never its ticket, and never preempts running work. A build priority is only `urgent` or `normal`; `ab start`'s `manual` tier is admission-only. | `build.priority-set` |
2453
2702
  | Answer blockers with guidance | `ab answer <slug> <text> [--store <ref>]` | Select a blocked build, press `r`, enter text, then Enter. | One `escalation.answered` with `resolution: guidance` per applicable blocker. |
2454
2703
  | Retry blockers without guidance | `ab answer <slug> [--store <ref>]` | Open the same `r` field and press Enter empty or whitespace-only. | One `escalation.answered` with `resolution: retry` per applicable blocker. |
2455
2704
  | Dismiss cited finding chains | `ab answer <slug> --dismiss [--store <ref>]` | CLI only; build detail names the command. | One `escalation.answered` with `resolution: dismiss-finding` per blocker that cites a real review finding. |
2456
2705
  | Revise spec from a file | `ab answer <slug> --revise-spec <file> [--store <ref>]` | CLI only; build detail names the command. | For leaves, human `escalation.answered` then kernel `spec.revised`; eligible nodes publish `spec.revised` with operator provenance. |
2457
2706
  | Re-import revised ticket spec | `ab answer <slug> --revise-spec-from-ticket [--store <ref>]` | CLI only; build detail names the command. | The same leaf answer or direct node `spec.revised` protocol. |
2458
- | Abort | `ab abort <slug> [--to triage\|ready] [--reason <text>] [--store <ref>]` | Select any non-terminal build and press `a`, then Enter to confirm (Escape cancels); the dashboard aborts to triage. | `build.abort-requested`, then repository `ticket.handed-back` after cleanup moves the ticket |
2707
+ | Reopen a finished leaf | `ab reopen <slug> [--feedback <text>] [--revise-spec <file> \| --revise-spec-from-ticket] [--store <ref>]` | CLI/tool request (`builds.reopen`); only for a leaf waiting for its merge decision. Feedback alone returns to implement; a spec revision restarts from plan; the PR and branch are kept. | `build.reopened`; with a spec, kernel `spec.revised` with operator provenance |
2708
+ | Start one ticket | `ab start <ticket-id> [--priority manual\|urgent\|normal] [--cancel] [--json] [--store <ref>]` | CLI/tool request (`tickets.start`, optional `priority`); works while intake is off or open-PR backpressure is engaged, takes a free slot in its priority's admission tier, and claims no other ticket. | `ticket.start-requested {priority}` (or `ticket.start-cancelled`), then one dispatcher `ticket.start-settled` with its outcome and priority |
2709
+ | Abort | `ab abort <slug> [--to triage\|ready] [--reason <text>] [--store <ref>]` | Select any non-terminal build and press `a`, then Enter to confirm (Escape cancels); the dashboard aborts to triage. | `build.abort-requested`, then repository `ticket.handed-back` after cleanup moves the ticket (an optimization attempt instead settles `aborted` and its ticket moves to the rejected role) |
2710
+
2711
+ `ab start <ticket-id>` is for working one ticket while intake stays off — a
2712
+ single fix, or draining a backlog one ticket at a time. The id resolves through
2713
+ the configured source (an unknown ticket is refused, and GitHub `#123` and `123`
2714
+ are the same ticket); a repeat with the same priority while the request is
2715
+ pending is a no-op, and one with another priority updates the pending request.
2716
+ On its next tick with a free slot in the request's tier, the running
2717
+ dispatcher — local or hosted — claims that ticket and nothing else, through
2718
+ every ordinary gate: it must be in
2719
+ the configured ready state, meet the spec standard (a nonconforming body is
2720
+ bounced to triage as usual), have no unresolved `blockedBy` dependency and no
2721
+ active build. Dispatch labels and the ready assignee are not applied, because
2722
+ the ticket is named. Capacity and the repository pause are respected; the
2723
+ request waits for a free slot and never preempts a build, and there is no
2724
+ force. Each request settles exactly once with a dispatcher `ticket.start-settled`
2725
+ (default `ab watch` attention): `started` names the build; `already-building`,
2726
+ `blocked`, `invalid`, `missing`, `not-ready`, `terminal` and `claim-refused`
2727
+ say why it could not start. While pending, the request is listed by
2728
+ `ab repository status` with its priority; `ab start --cancel <ticket-id>`
2729
+ withdraws it.
2730
+
2731
+ `--priority` picks the request's slot-admission tier. `manual`, the default, goes
2732
+ ahead of every waiting build and ticket claim, urgent ones included. `urgent`
2733
+ waits for urgent parked work (nodes and finished or waiting builds that must
2734
+ run again), then goes ahead of urgent ready tickets and all normal work.
2735
+ `normal` waits for normal parked work and urgent claims, then goes ahead of
2736
+ normal ready tickets. A pending request reserves its slot ahead of the tiers it
2737
+ outranks until it settles or is cancelled. Every tier bypasses intake off and
2738
+ open-PR backpressure for the named ticket only, and none preempts a running
2739
+ build. The claimed build is `urgent` when the request was `urgent` and
2740
+ otherwise keeps its ticket's priority; `manual` is never a build priority.
2459
2741
 
2460
2742
  The two `--all` forms and the global-row keys are one walk behind two surfaces.
2461
2743
  The repository pause is written first and intake second, both absolutely —
@@ -2558,10 +2840,13 @@ or raises a `wait-unresolvable` escalation, whose answer routes the same way,
2558
2840
  when one is rejected or deleted. Either way the phase that declared it resumes at the same round or attempt once it
2559
2841
  holds a slot, on a checkout restacked onto the target's current head when the
2560
2842
  target moved; a reviewer's wait resumes that review round and never feeds the
2561
- next producer. Its `$AB_CONTEXT_DIR/guidance.json` carries a `wait` block
2843
+ next producer. A verify or finalize wait whose target moved and replayed
2844
+ cleanly instead re-verifies from the first step at a new attempt, because the
2845
+ old base's results no longer count. Its `$AB_CONTEXT_DIR/guidance.json` carries a `wait` block
2562
2846
  (`id`, `tickets`, `reason`, `outcome` `ended` or `refused`, `cause`,
2563
2847
  `message`), even after a bare retry or a `wait.ended`, which leave a one-line
2564
- summary as the answer. A refused wait writes the same file with the refusal.
2848
+ summary as the answer. A verifier re-run at a new attempt still receives the
2849
+ answer as guidance, without the `wait` block. A refused wait writes the same file with the refusal.
2565
2850
  In each of these routed cases, `ab context`
2566
2851
  writes the answer to `$AB_CONTEXT_DIR/guidance.json` in the build's workspace, and the
2567
2852
  receiving skill treats it as authoritative feedback for that round or attempt.
@@ -2611,7 +2896,11 @@ pending controls, merge intent and ended PRs refuse the no-escalation path.
2611
2896
  A concurrent state change refuses publication with a retry explanation;
2612
2897
  uncited artifacts are inert. Leaves still require an open escalation and
2613
2898
  restart from `plan` after any unfinished reconcile resumes under the revised
2614
- spec and its publication is confirmed.
2899
+ spec and its publication is confirmed. A settled, unmerged leaf awaiting merge
2900
+ revises without an escalation through `ab reopen`.
2901
+ A revision of an optimization node may change its `autobuild-objective` block
2902
+ but cannot remove it, and a revision of a plain node or a leaf cannot add one;
2903
+ both refusals record nothing.
2615
2904
 
2616
2905
  Every command requires an applicable target in this repository. Pause and
2617
2906
  resume require an active build; abort and hold also accept queued builds.
@@ -2640,7 +2929,8 @@ across startup, a successful attempt closes it unanswered, and a bare retry only
2640
2929
  brings the next attempt forward. Startup still recovers actionable builds and
2641
2930
  delivers pending operator commands, but it never records an answer or re-arms a budget.
2642
2931
 
2643
- Durable repository intake has launch-flag setters and a global-row toggle.
2932
+ Durable repository intake has launch-flag setters and a global-row toggle;
2933
+ `ab start` claims one ticket without changing it.
2644
2934
  Merge policy is configured through ordered rules, with per-merge hold/merge
2645
2935
  commands; no writable repository auto-merge default remains.
2646
2936
  Abort is available through both its CLI command and the confirmed build-row/detail
@@ -2667,7 +2957,9 @@ and are safe to run at any time.
2667
2957
 
2668
2958
  **`ab repository status [--json] [--store <ref>]`** reports ticket intake
2669
2959
  (`intake`, default `true`) and repository-wide pause (`paused`, default
2670
- `false`), alongside dispatcher and infrastructure status. Its historical
2960
+ `false`), alongside dispatcher and infrastructure status, plus `ticketStarts`
2961
+ (pending start requests and the most recent settlements, each with its
2962
+ `priority`) when either is nonempty. Its historical
2671
2963
  `defaultAutoMerge` field remains an inert compatibility value; it is not
2672
2964
  claim-time policy or a writable setting. Merge decisions and command state
2673
2965
  are queried on the build. A repository with no journal row uses the defaults
@@ -2678,12 +2970,20 @@ repository-local precedence. The command uses the same reducer as the
2678
2970
  dispatcher and dashboard, writes no state, claims no ticket, attaches no runner,
2679
2971
  and starts no dispatcher work. Dispatcher identity includes the held run’s recorded
2680
2972
  runtime; historical starts without metadata display `runtime unrecorded`.
2973
+ With `[policy].maxOpenPrs` configured and a dispatcher holding the
2974
+ repository, an `open-PR backpressure:` line (`capacity.backpressure` in JSON:
2975
+ `active`, `openPrs`, `maxOpenPrs`, `resumeOpenPrs`, `excludeHeld`) says whether
2976
+ normal intake is paused; the dispatcher records
2977
+ `dispatcher.open-pr-backpressure-engaged` and `-cleared` only on transitions.
2681
2978
  It also lists the latest ticket scan's ticket and dependency diagnostics
2682
2979
  (`queue:` lines, `ticketDiagnostics` and `dependencyDiagnostics` in JSON),
2683
2980
  including ready tickets whose labels select more than one role profile and
2684
2981
  tickets held because their target
2685
2982
  node is being built by another store, and dispatcher startup warnings
2686
- (`warningLines`).
2983
+ (`warningLines`). Each hook configured by the latest dispatcher run is listed
2984
+ with its last successful delivery, pending backlog or "caught up", and current
2985
+ failure (`hook <name> — …` lines; `hooks` in JSON, empty when none, each with its
2986
+ `command` or `url`).
2687
2987
 
2688
2988
  **`ab builds`** summarizes this repository's builds, one row each. It reports
2689
2989
  **active** builds by default — `running`, `paused`, `blocked` — because those
@@ -2800,8 +3100,9 @@ operator-only read (ambient phase identity fails closed).
2800
3100
  **`ab watch [<slug>...] [--repository] [--operator] [--event <glob>]... [--since <cursor>]
2801
3101
  [--timeout <dur>] [--interval <dur>] [--count <n>] [--json] [--store <ref>]`**
2802
3102
  streams matching events as they land instead of answering once. With no slug it
2803
- follows every nonterminal build in the repository — a build created while the
2804
- watch runs joins it without a restart — and naming one or more slugs watches
3103
+ follows every nonterminal build in the repository — builds that exist when it
3104
+ attaches are baselined, and a build created while the watch runs joins it
3105
+ without a restart, from its first event — and naming one or more slugs watches
2805
3106
  exactly those builds, ending the watch when all of them reach a terminal status.
2806
3107
  With no slugs the repository journal is included; named watches add it with
2807
3108
  `--repository`.
@@ -2812,19 +3113,34 @@ The default watch reports actionable conditions only:
2812
3113
 
2813
3114
  - `build.janitor-failing`: a build has failed janitor attempts for the configured attention threshold. A successful attempt clears it.
2814
3115
  - `build.janitor-escalated`: a build's janitor failure episode outlasted the escalation threshold and raised one escalation. The janitor keeps retrying; a successful attempt closes it unanswered, and a bare retry answer attempts on the next tick.
3116
+ - `dispatcher.forge-degraded`: the dispatcher's own rate-limit cooldown opened, with its reset; once per episode. Extensions marked `continued` are silent.
2815
3117
  - `dispatcher.forge-persistent`: forge degradation remains after a post-reset retry tick; recovery clears the episode.
2816
3118
 
2817
3119
  - Build `escalation.raised` or `phase.deferral-escalated`: an operator answer
2818
3120
  is required. A read deferral asks for CLI/store repair before retry or guidance.
2819
3121
  A `build.janitor-escalated` escalation needs no answer to recover; a bare
2820
3122
  retry answer only brings the next attempt forward.
2821
- - Build `landing.consent-revoked`: a reconcile's own edits touched files
2822
- protected by the `paths` or `within` rule the merge consent was given under.
3123
+ - Build `landing.consent-revoked`: a reconcile's own edits, or a leaf
3124
+ restack's generated-file regeneration, touched files protected by the
3125
+ `paths` or `within` rule the merge consent was given under.
2823
3126
  It names the matched files and the previous and new heads; the build returns
2824
3127
  to the consent queue and needs fresh consent for its new head.
3128
+ - Build `pr.checks-failed`: forge CI is failing at a finished, open leaf's
3129
+ live PR head. It names the failing checks (a preview of up to 20, and the
3130
+ total), the live head and the build's head, and fires once per head and
3131
+ failing set. `ab build status`, `ab builds`, `ab merges` and both dashboards
3132
+ show it as `ciFailure` until a successful CI read finds no failing checks on
3133
+ that head, even while some are still pending, or the PR moves to another
3134
+ head; clearing does not prove green.
3135
+ Unreadable CI is unknown, never red or green. Autobuild reports it and never
3136
+ re-runs CI or re-enters implement.
3137
+ - Build `optimization.noise-exceeded`: an optimization node's starting
3138
+ measurement found more noise than ε can resolve. It names the spread and ε;
3139
+ the node still opens. Raise `target.epsilon` with `ab objective`, or raise
3140
+ `metric.samples` (or `metric.judges` for a panel) with a spec revision.
2825
3141
  - Build `build.merge-decision`: a finalized open PR
2826
- with a recorded consent decision awaiting consent, an explicit hold, or a
2827
- current actionable merge-gate deferral. Policy decisions not yet recorded and
3142
+ with a recorded consent decision awaiting consent, an explicit hold, a
3143
+ current actionable merge-gate deferral, or a landing awaiting a human merge. Policy decisions not yet recorded and
2828
3144
  authorized merges awaiting application are silent. One merge decision is reported per build/PR.
2829
3145
  - Repository `harvest.escalated`, `harvest.recovery-exhausted`,
2830
3146
  `dispatcher.config-rejected`, `dispatcher.config-reloaded` with nonempty
@@ -2834,6 +3150,14 @@ The default watch reports actionable conditions only:
2834
3150
  line names the process whose GitHub request was rate-limited outside the
2835
3151
  dispatcher's credential (unauthenticated, with why, or on that process's own
2836
3152
  credential) and its reset; dispatcher forge work continues.
3153
+ - Repository `hook.failing`, `hook.recovered` and `hook.skipped`: a configured
3154
+ hook (`[hooks]`) has failed continuously for five minutes (once per episode,
3155
+ naming the latest error and the record `id` it is stuck on), has delivered
3156
+ again after a reported episode, or resumed past history it could no longer
3157
+ read (with the skipped stream ranges) or a build announcement it could not
3158
+ resolve. Inspect `ab repository status`, fix the hook's command, endpoint or
3159
+ configuration, and treat a skipped range as records the hook's consumer never
3160
+ received.
2837
3161
  - Repository `ticket-preparation.resolved` with outcome `abandoned`: automatic
2838
3162
  preparation recovery stopped and left the ticket unchanged. The line names the
2839
3163
  ticket, attempt and recorded reason; the payload's `claimed` says whether the
@@ -2848,6 +3172,10 @@ The default watch reports actionable conditions only:
2848
3172
  destination `state` and `role`, `requested` when an abort to ready fell back,
2849
3173
  the spec-standard parts `missing`, and the operator's `reason`. Each hand-back
2850
3174
  emits it once; moving the ticket on receipt is never overridden.
3175
+ - Repository `ticket.start-settled`: a single-ticket start request reached its
3176
+ outcome, with the request's `priority` — `started` with the build `slug`, or `already-building` (with the
3177
+ slug), `blocked`, `invalid`, `missing`, `not-ready`, `terminal` or
3178
+ `claim-refused`, with a `detail`. Each request settles once.
2851
3179
  - `dispatcher.ticket-source-persistent`: degradation past its advertised
2852
3180
  reset time, once a tick started at or after reset has completed or failed
2853
3181
  with the episode still open; crossing reset alone is silent. Without a reset,
@@ -2883,16 +3211,24 @@ have `repo` and null build/state. Source observations also report
2883
3211
 
2884
3212
  Every record carries a cursor, including timer-only records. Resuming suppresses
2885
3213
  delivered merge decisions and persistence episodes even when stream positions
2886
- did not advance. Old v1 cursors remain valid: historical eligible merge
3214
+ did not advance. A merge decision still due at the cursor, because the watch
3215
+ stopped on its event before observing it, is delivered once on resume, before
3216
+ the later events. Old v1 cursors remain valid: historical eligible merge
2887
3217
  decisions are treated as consumed; active overdue repository episodes may
2888
3218
  report because old watches had no persistence notification. Fresh attachment
2889
3219
  silently baselines historical direct events and merge decisions, but retains
2890
- active repository timers. Reconcile existing conditions through status after
3220
+ active repository timers. A no-slug watch follows each build announced in the
3221
+ journal after its position from the build's first event; cursors carry
3222
+ creations still in preparation, and a cursor from an earlier release, which
3223
+ carries none, baselines a build whose creation was selected before it. Reconcile existing conditions through status after
2891
3224
  arming the watch. Named watches still end when every named build is terminal;
2892
3225
  learn their outcomes from status reconciliation at exit.
2893
3226
 
2894
3227
  With `--json`, stdout is newline-delimited JSON — exactly one object per
2895
- matching event, flushed as soon as it is written — with fields `build` (slug,
3228
+ matching event, flushed as soon as it is written — with fields `id` (the
3229
+ record's stable identity, the same on redelivery and resume:
3230
+ `build:<slug>:<seq>`, `repo:<seq>`, `<observation type>:<dedupe identity>`, or
3231
+ `dispatcher.lost:<run>`), `build` (slug,
2896
3232
  or null for a repository event), `repo` (present only for repository events),
2897
3233
  `event` (the complete durable envelope: build, seq, ts, actor, type, payload),
2898
3234
  `state` (for build events, the reduction after that event: `status`, `phase`,
@@ -2902,8 +3238,9 @@ record is one plain human-readable line. On every exit the last `--json` line
2902
3238
  is a bare `{"cursor": …}` object reflecting the final position even when no
2903
3239
  record matched. Cursors are opaque; resume with `--since <cursor>` and every
2904
3240
  matching event after that cursor is delivered exactly once, in per-stream
2905
- sequence order — including events that landed while no watch was running. A
2906
- cursor from a different repository or store is rejected.
3241
+ sequence order — including events that landed while no watch was running and,
3242
+ with no slugs, events of builds created after that cursor. A cursor from a
3243
+ different repository or store is rejected.
2907
3244
 
2908
3245
 
2909
3246
  Dispatcher liveness is also visible through `ab repository status --json`:
@@ -2998,8 +3335,8 @@ At least one `--for <condition>` or `--event <glob>` is required. The condition
2998
3335
  vocabulary is closed: `blocked`, `paused`, `running`, `collecting`, `done`, `aborted`,
2999
3336
  `terminal` (done or aborted), `pr=open`, `pr=merged`, `pr=closed`,
3000
3337
  `pr=conflicted`, `phase=<phase>` (a core phase — `plan`, `plan-review`,
3001
- `implement`, `code-review`, `finalize`, `reconcile` — or `verify:<step>`), and
3002
- `attention` (current failed node verification, an open escalation, janitor failure attention, or a build waiting for a merge decision). Repeatable `--event`
3338
+ `implement`, `code-review`, `finalize`, `reconcile`, `propose` — or `verify:<step>`), and
3339
+ `attention` (current failed node verification, an open escalation other than a ticket wait's own, janitor failure attention, failing forge CI on a finished leaf, or a build waiting for a merge decision). Repeatable `--event`
3003
3340
  globs follow the `ab watch` rules. Multiple values are alternatives: the first
3004
3341
  one satisfied ends the wait — all `--for` values in supply order, then all
3005
3342
  globs in supply order — and the record names what matched.
@@ -3010,8 +3347,8 @@ means an open escalation exactly as everywhere else. In the manner of `kubectl
3010
3347
  wait`, a condition that already holds when the command starts returns
3011
3348
  immediately with that build's latest event (`--since` does not suppress this);
3012
3349
  otherwise the first later event whose reduction produces it ends the wait.
3013
- `attention` is also a current-state condition: current failed node verification, existing janitor failure attention, an already open escalation or
3014
- merge decision returns immediately, including with `--since`. Merge matches
3350
+ `attention` is also a current-state condition: current failed node verification, existing janitor failure attention, a current forge CI failure, an already open escalation other than a
3351
+ ticket wait's own, or merge decision returns immediately, including with `--since`. Merge matches
3015
3352
  use the same observation as watch. During replay, only new failed-node verification or escalation events
3016
3353
  or undelivered eligible merge decisions satisfy attention. `--event` conditions
3017
3354
  fire only on new events or a cursor-resumed backlog.
@@ -3192,11 +3529,13 @@ default, when you need to know what this repo's version says).
3192
3529
  | `ab-plan-review` | `plan-review` phase | Fresh skeptic: review the plan against the spec and check implement-session fit; escalate clearly oversized required work with a proposed split. Verdict `approve`/`revise`/`escalate`. |
3193
3530
  | `ab-implement` | `implement` phase | Execute the approved plan as local commits plus deposited notes. Never pushes. |
3194
3531
  | `ab-code-review` | `code-review` phase | Fresh skeptic: review the implementation diff against spec and plan, same verdict vocabulary. |
3195
- | `ab-reconcile` | `reconcile` phase (epilogue) | Resolve a kernel-prepared single-change replay onto a frozen refreshed base; the kernel archives evidence and publishes with an exact expected-head guard. |
3532
+ | `ab-reconcile` | `reconcile` phase (epilogue) | Resolve a kernel-prepared single-change replay onto a frozen refreshed base; the kernel retains evidence and publishes with an exact expected-head guard. |
3196
3533
  | `ab-finalize` | `finalize` phase | Write the PR description for a green build; the kernel opens the PR. |
3534
+ | `ab-judge` | A judge panel run | One judge of a panel objective: compare the blind variants `A/` and `B/` against the rubric and purpose, then record one preference (`A`, `B` or `tie`) with a reason through `ab judge prefer`. Runner-only; its session reads no build state. |
3535
+ | `ab-propose` | `propose` phase (optimization nodes) | Read an optimization node's attempt ledger, objective, progress and head, then deposit typed proposals for new attempts, or none with a reason, with `ab propose`; the dispatcher files them. Never creates tickets. |
3197
3536
  | `ab-operate` | outside the pipeline; model-invocable | The operator agent’s operating manual, for any agent: file and groom tickets, operate the builds the repository's dispatcher dispatches with a registered `ab watch --operator` loop, answer escalations, pause, resume, abort, control merge consent and holds, and adopt new builds until the human ends or hands off the role. MCP presence is deferred. |
3198
3537
 
3199
- Autobuild installs 12 skills. Everything except `ab-spec`, `ab-tickets`,
3538
+ Autobuild installs 14 skills. Everything except `ab-spec`, `ab-tickets`,
3200
3539
  `ab-guide`, and `ab-operate` carries `disable-model-invocation: true` — do not
3201
3540
  invoke a phase skill yourself, and do not remove that key to make one
3202
3541
  convenient to call. A model starting a pipeline phase by pattern-matching a
@@ -3264,12 +3603,15 @@ recovery and read-cost bounds.
3264
3603
 
3265
3604
  A historical `publication.lost` does not prove that every copy of its candidate
3266
3605
  is gone. Recovery checks the exact branch and private archive refs and retained
3267
- replay objects first. An available candidate continues guarded publication.
3268
- A genuinely missing reconcile or automatic restack candidate records
3606
+ store copies first. Replay copies are read in either format (chunked manifest or
3607
+ legacy base64 pack); a thin pack whose base is missing fetches the published target
3608
+ first and applies with `git index-pack --fix-thin`. An available candidate is
3609
+ retained best effort before guarded publication continues; a refused archive does
3610
+ not block it. A genuinely missing reconcile or automatic restack candidate records
3269
3611
  `publication.candidate-retired`, abandons its obsolete request, and replays the
3270
3612
  producing operation with a fresh transaction identity. Its frozen target,
3271
3613
  reconcile occurrence or automatic trigger, cycle, and message survive. The
3272
- retired candidate is excluded from archive requirements unless independently
3614
+ retired candidate is excluded from retention requirements unless independently
3273
3615
  required by proven history. This reconstruction consumes no infrastructure
3274
3616
  attempt and no additional conflict occurrence; it needs no operator guidance.
3275
3617
  A bare retry also clears an existing infrastructure-limit escalation through
@@ -3316,6 +3658,25 @@ succeeds.
3316
3658
 
3317
3659
  A rate limit the dispatcher classifies on its own authenticated request
3318
3660
  records repository degradation with `resetAt`.
3661
+ The built-in GitHub forge also treats a successful response, 304 included,
3662
+ that reports `x-ratelimit-remaining: 0` with a future reset at most 65 minutes
3663
+ away (one hour plus five minutes of clock skew) as that quota's limit.
3664
+ The response keeps its result, and the process's next
3665
+ request for the same quota (`core`, `graphql`, …) fails as that rate limit
3666
+ without being sent, so cooldown follows the rules here without an avoidable
3667
+ refusal. Other quotas are unaffected. A missing, malformed, past or
3668
+ implausible reset enters no cooldown, and no later response clears one early:
3669
+ only the reset passing, or an explicit `forge-clear`, does. After a clear, the
3670
+ next request goes to GitHub as a probe, and an actual limit restores the
3671
+ cooldown.
3672
+ The first limit of an episode records an ordinary `dispatcher.forge-degraded`,
3673
+ which wakes `ab watch` once. A later reset inside the unexpired episode extends
3674
+ the cooldown durably as a degradation marked `continued` that wakes nothing; an
3675
+ equal or earlier reset writes nothing. A limit after the reset has passed, or
3676
+ after recovery, opens a new episode. A rate-limited or unreadable response on
3677
+ landing, gate inspection or PR polling is a typed forge failure or an unproven
3678
+ state, never "no checks", "ungated", "closed" or "merged"; merge-freshness
3679
+ inspection defers instead of recording best-effort evidence.
3319
3680
  Forge work waits during cooldown; passing the deadline permits a recovery
3320
3681
  request; a successful probe records automatic recovery. An authorized operator
3321
3682
  may explicitly override erroneous recorded state with
@@ -3369,7 +3730,15 @@ using exact-resource ETags; authenticated 304s spare the REST primary quota.
3369
3730
  Adapter caches are bounded and restart/eviction falls back to fresh reads.
3370
3731
  Writes, including Git publication and rewrites, invalidate observations before
3371
3732
  attempting the mutation so acknowledgement reads remain fresh. Leaf PR polling
3372
- keeps its existing cadence. Readiness and merge inspections remain fresh.
3733
+ keeps its existing cadence. Gate branch and rules reads, merge-freshness
3734
+ protection and rulesets, landing, retarget and auto-merge PR reads, commit and
3735
+ history reads, merge-queue activity, summary-comment listing and branch
3736
+ existence revalidate the same way. Both caches hold the raw representation and
3737
+ every caller validates it with its own schema, so consumers of one resource
3738
+ share one request and one ETag; a representation that fails validation loses
3739
+ its ETag. Reads that must be fresh, including merge inspections, still reach
3740
+ GitHub every time, conditionally when an ETag is cached. Readiness diagnostics
3741
+ and post-mutation readbacks stay unconditional.
3373
3742
 
3374
3743
  For node cadence, durable wakes, restart behavior and CLI evidence, see
3375
3744
  [node polling and status](references/integration-tree.md#polling-and-status).
@@ -3380,6 +3749,18 @@ primary quota, REST 304s and GraphQL calls. Transport failures and historical or
3380
3749
  legacy observations can remain unclassified; absent fields never imply zero.
3381
3750
  Shared requests are attributed to their first requester; cache hits count zero.
3382
3751
 
3752
+ An adapter may also report the primary rate-limit headers a response carried
3753
+ (`resource`, `limit`, `remaining`, `resetAt`), including on 304s and limited
3754
+ failures; GitHub does. No extra `/rate_limit` request is made. Tick telemetry's
3755
+ optional `rateLimits` carries the latest reading per resource with its
3756
+ `observedAt`, at most eight resources and none older than a day, across ticks
3757
+ and dispatcher restarts, so a cooldown tick with no requests still reports the
3758
+ last known quota. Secondary limits carry no headers and appear only as the
3759
+ degradation. `ab repository status` shows them as `forgeRateLimit`: each
3760
+ reading, `stale` once its window has reset (current quota unknown), and
3761
+ `paused`/`pausedUntil` while the dispatcher's rate-limit cooldown holds forge
3762
+ landing and polling. Absent fields mean unknown, never full quota.
3763
+
3383
3764
  Work target distance is advisory `target.distance` telemetry, sampled during
3384
3765
  normal target polls from exact build/target tips, never at render time. It
3385
3766
  counts destination commits absent from the build head (`BUILD..TARGET`).