@defrex/autobuild 1.9.0 → 1.11.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 (537) hide show
  1. package/README.md +3 -3
  2. package/SPEC.md +2232 -175
  3. package/bin/ab-dispatch-generation.ts +5 -1
  4. package/docs/accounts.md +2 -1
  5. package/docs/agent-runtimes.md +30 -3
  6. package/docs/answering-blocked-builds.md +35 -7
  7. package/docs/architecture.md +436 -63
  8. package/docs/build-store.md +10 -7
  9. package/docs/builds.md +5 -0
  10. package/docs/cli.md +40 -2
  11. package/docs/configuration-overview.md +5 -1
  12. package/docs/configuration.md +649 -74
  13. package/docs/dispatcher.md +79 -6
  14. package/docs/forges.md +8 -1
  15. package/docs/getting-started.md +1 -1
  16. package/docs/integration-overview.md +4 -2
  17. package/docs/integration-tree.md +102 -11
  18. package/docs/merge-policy.md +30 -14
  19. package/docs/migration-1.0.md +2 -1
  20. package/docs/operating.md +36 -6
  21. package/docs/operator-api.md +251 -20
  22. package/docs/operator-surfaces.md +85 -0
  23. package/docs/optimization-nodes.md +1100 -0
  24. package/docs/overview.md +1 -1
  25. package/docs/plugin-authoring.md +83 -13
  26. package/docs/remote-store-protocol.md +137 -17
  27. package/docs/remote-ticket-protocol.md +90 -2
  28. package/docs/restacking.md +119 -15
  29. package/docs/seams.md +2 -2
  30. package/docs/setup.md +27 -4
  31. package/docs/skills.md +4 -2
  32. package/docs/spec-standard.md +2 -1
  33. package/docs/ticket-dependencies.md +15 -3
  34. package/docs/ticket-migration.md +4 -2
  35. package/docs/ticket-sources.md +54 -14
  36. package/docs/tickets.md +21 -6
  37. package/docs/troubleshooting.md +11 -2
  38. package/docs/verification.md +15 -3
  39. package/docs/workspaces.md +6 -1
  40. package/package.json +9 -5
  41. package/packages/core/src/accounts/chatgpt-oauth.ts +7 -5
  42. package/packages/core/src/cli/accounts.ts +7 -2
  43. package/packages/core/src/cli/attempt.ts +103 -0
  44. package/packages/core/src/cli/attention.ts +11 -2
  45. package/packages/core/src/cli/binary-direct.ts +54 -1
  46. package/packages/core/src/cli/binary-lifecycle.ts +2 -1
  47. package/packages/core/src/cli/binary.ts +5 -3
  48. package/packages/core/src/cli/build-control.ts +407 -67
  49. package/packages/core/src/cli/context.ts +272 -15
  50. package/packages/core/src/cli/dashboard/detail.ts +26 -2
  51. package/packages/core/src/cli/dashboard/facts.ts +89 -56
  52. package/packages/core/src/cli/dashboard/header.ts +101 -0
  53. package/packages/core/src/cli/dashboard/integration-detail.ts +7 -2
  54. package/packages/core/src/cli/dashboard/landing-display.ts +15 -2
  55. package/packages/core/src/cli/dashboard/model.ts +133 -66
  56. package/packages/core/src/cli/dashboard/objective-row.ts +221 -0
  57. package/packages/core/src/cli/dashboard/poll.ts +178 -76
  58. package/packages/core/src/cli/dashboard/render.ts +172 -227
  59. package/packages/core/src/cli/dashboard/reopen-display.ts +39 -0
  60. package/packages/core/src/cli/dashboard/row-text.ts +538 -0
  61. package/packages/core/src/cli/dashboard/timeline.ts +288 -0
  62. package/packages/core/src/cli/dashboard/tree.ts +12 -1
  63. package/packages/core/src/cli/dashboard/vocabulary.ts +188 -0
  64. package/packages/core/src/cli/dispatch-args.ts +44 -1
  65. package/packages/core/src/cli/dispatch-frontend.ts +29 -30
  66. package/packages/core/src/cli/dispatch-launch-stop.ts +73 -0
  67. package/packages/core/src/cli/dispatch-launcher.ts +41 -46
  68. package/packages/core/src/cli/dispatch-repository-feed.ts +1 -1
  69. package/packages/core/src/cli/dispatch-web.ts +155 -0
  70. package/packages/core/src/cli/dispatch.ts +216 -38
  71. package/packages/core/src/cli/env.ts +42 -0
  72. package/packages/core/src/cli/help.ts +293 -12
  73. package/packages/core/src/cli/init-agent.ts +4 -1
  74. package/packages/core/src/cli/init-readiness-remote.ts +3 -2
  75. package/packages/core/src/cli/init-validation.ts +5 -5
  76. package/packages/core/src/cli/init.ts +3 -2
  77. package/packages/core/src/cli/judge-entry.ts +82 -0
  78. package/packages/core/src/cli/judge.ts +233 -0
  79. package/packages/core/src/cli/landings.ts +3 -2
  80. package/packages/core/src/cli/main.ts +481 -148
  81. package/packages/core/src/cli/mcp.ts +35 -3
  82. package/packages/core/src/cli/measurement-text.ts +19 -0
  83. package/packages/core/src/cli/objective.ts +154 -0
  84. package/packages/core/src/cli/operator-preference.ts +57 -0
  85. package/packages/core/src/cli/publication-settlement.ts +106 -22
  86. package/packages/core/src/cli/repo-lease.ts +3 -0
  87. package/packages/core/src/cli/repo-state.ts +56 -6
  88. package/packages/core/src/cli/repository-status.ts +205 -56
  89. package/packages/core/src/cli/status.ts +275 -16
  90. package/packages/core/src/cli/store-opening.ts +4 -0
  91. package/packages/core/src/cli/terminal-restore.ts +32 -7
  92. package/packages/core/src/cli/terminals.ts +205 -8
  93. package/packages/core/src/cli/ticket-start.ts +53 -0
  94. package/packages/core/src/cli/ticket.ts +166 -38
  95. package/packages/core/src/cli/upgrade-agent.ts +12 -8
  96. package/packages/core/src/cli/wait.ts +22 -8
  97. package/packages/core/src/cli/watch.ts +361 -95
  98. package/packages/core/src/cli/web.ts +139 -0
  99. package/packages/core/src/config/create-labels.ts +23 -0
  100. package/packages/core/src/config/live.ts +101 -14
  101. package/packages/core/src/config/load.ts +61 -20
  102. package/packages/core/src/config/local.ts +212 -0
  103. package/packages/core/src/config/pipeline-source.ts +3 -3
  104. package/packages/core/src/config/reference.ts +18 -0
  105. package/packages/core/src/config/roles.ts +182 -73
  106. package/packages/core/src/config/schema.ts +157 -19
  107. package/packages/core/src/events/catalog.ts +43 -3
  108. package/packages/core/src/events/compatibility.ts +7 -1
  109. package/packages/core/src/events/payloads.ts +685 -1
  110. package/packages/core/src/events/policy.ts +63 -0
  111. package/packages/core/src/events/repository.ts +153 -27
  112. package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +1797 -199
  113. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/017d8dd5bb6dd80b.json.gz +0 -0
  114. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/0ab2a90d0305dc9d.json.gz +0 -0
  115. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/10a4657408d4e121.json.gz +0 -0
  116. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/1152a2e97ee81728.json.gz +0 -0
  117. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/13ca84752c5f8b54.json.gz +0 -0
  118. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/1411d1cdbdd9911e.json.gz +0 -0
  119. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/1444fe1fa7fc802c.json.gz +0 -0
  120. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/1491ac0600349391.json.gz +0 -0
  121. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/178e12f1759b7552.json.gz +0 -0
  122. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/1921f86f752428c9.json.gz +0 -0
  123. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/1972c1d66008ef6b.json.gz +0 -0
  124. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/19e8e43e7f3f1a06.json.gz +0 -0
  125. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/20a85c143c3e8164.json.gz +0 -0
  126. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/21ce2c0bf58318e1.json.gz +0 -0
  127. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/293dcb3a94fb3470.json.gz +0 -0
  128. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/2ab7436356267118.json.gz +0 -0
  129. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/2d084641735caaff.json.gz +0 -0
  130. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/3237bcecf68e5db9.json.gz +0 -0
  131. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/33d0cc593610e56f.json.gz +0 -0
  132. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/3451ed2136dcc356.json.gz +0 -0
  133. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/358ec8693f2237e6.json.gz +0 -0
  134. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/35cf9ccc4478b2d2.json.gz +0 -0
  135. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/3649e7bd1203f154.json.gz +0 -0
  136. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/378da6dece82202a.json.gz +0 -0
  137. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/38c75099d9191471.json.gz +0 -0
  138. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/398952f1f01db1a3.json.gz +0 -0
  139. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/3b64d352d56c9121.json.gz +0 -0
  140. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/3dc486226c05372d.json.gz +0 -0
  141. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/431c9bb2ee8838e0.json.gz +0 -0
  142. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/4400dffca929e2f0.json.gz +0 -0
  143. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/49064fc079964a5c.json.gz +0 -0
  144. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/4932c70a2af97faf.json.gz +0 -0
  145. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/4edded75f17742f4.json.gz +0 -0
  146. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/4f00c0f2c8afd159.json.gz +0 -0
  147. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/516a5a7aadf97587.json.gz +0 -0
  148. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/516dc6ea85d67cd7.json.gz +0 -0
  149. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/536085773daf6b58.json.gz +0 -0
  150. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/584e2ba74608e051.json.gz +0 -0
  151. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/59ffaa6974094c72.json.gz +0 -0
  152. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/5bb43afb121674c6.json.gz +0 -0
  153. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/5f0ca42af862c4ee.json.gz +0 -0
  154. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/6118031132db9bfc.json.gz +0 -0
  155. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/63107a8d58776b63.json.gz +0 -0
  156. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/63546b08d4d6fa11.json.gz +0 -0
  157. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/643d70429ce03dad.json.gz +0 -0
  158. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/677ea92572c29082.json.gz +0 -0
  159. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/6ae5bf60504d6467.json.gz +0 -0
  160. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/6bd6275061aaffa5.json.gz +0 -0
  161. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/6efdc8defc75fccb.json.gz +0 -0
  162. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/71c53d33f09d8204.json.gz +0 -0
  163. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/7267ca2757cffba7.json.gz +0 -0
  164. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/76b7d4244082b3f9.json.gz +0 -0
  165. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/7749f918c6f10968.json.gz +0 -0
  166. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/7833e42d16301424.json.gz +0 -0
  167. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/7d4edad0614adaf1.json.gz +0 -0
  168. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/837365898d04f45a.json.gz +0 -0
  169. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/85f9f0c921b8b5bb.json.gz +0 -0
  170. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8879f57a24733897.json.gz +0 -0
  171. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/88cb9e71bdec972d.json.gz +0 -0
  172. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/89625654b02e9ac1.json.gz +0 -0
  173. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8a0cd6dd06cc155e.json.gz +0 -0
  174. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8aa9ca8609dc051d.json.gz +0 -0
  175. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8c8640255bd61658.json.gz +0 -0
  176. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8cc15eb1807c0157.json.gz +0 -0
  177. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8ced97c44bc0af3a.json.gz +0 -0
  178. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8d4144004720b9f8.json.gz +0 -0
  179. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8db633ead1807f8b.json.gz +0 -0
  180. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/8e42cdbd0994ab0c.json.gz +0 -0
  181. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/9011d0f6ff955ef9.json.gz +0 -0
  182. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/916ebc5433801c41.json.gz +0 -0
  183. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/9539b995af5c54a9.json.gz +0 -0
  184. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/95f391bfd7b7dbd7.json.gz +0 -0
  185. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/9613e8fa568a9281.json.gz +0 -0
  186. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/9a68f8753bd9038d.json.gz +0 -0
  187. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/9b25e58227080094.json.gz +0 -0
  188. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/9ee3919fbd4f9458.json.gz +0 -0
  189. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/a04a34cc2717147b.json.gz +0 -0
  190. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/a0b32c12e4e6edb6.json.gz +0 -0
  191. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/a55218252707bdd3.json.gz +0 -0
  192. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/a732fd08b31522a6.json.gz +0 -0
  193. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/a98af134be2da8a9.json.gz +0 -0
  194. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/a9d206a01f9039e5.json.gz +0 -0
  195. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/abf7fe3c92c82f2d.json.gz +0 -0
  196. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/ac928b04842c00db.json.gz +0 -0
  197. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/af953392d81911da.json.gz +0 -0
  198. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/b0d877c44810ecb0.json.gz +0 -0
  199. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/b0f7c6ebb2db57fc.json.gz +0 -0
  200. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/b905c22ec17eed31.json.gz +0 -0
  201. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/bce0c54e865f4b79.json.gz +0 -0
  202. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/c68b7ee2e2610f30.json.gz +0 -0
  203. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/c7f7e0378aeea237.json.gz +0 -0
  204. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/c98cb1659eb142b6.json.gz +0 -0
  205. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/ca830adf06ed55a1.json.gz +0 -0
  206. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/cb3a219f33e437ca.json.gz +0 -0
  207. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/cf1e0c0d82567e0c.json.gz +0 -0
  208. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/d008d86d9ff77b30.json.gz +0 -0
  209. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/d1432a819d8e48c5.json.gz +0 -0
  210. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/d185ed6aa9192aff.json.gz +0 -0
  211. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/d5d5ccca80a893d8.json.gz +0 -0
  212. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/d873fad29d6c7e55.json.gz +0 -0
  213. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/db84b12316e2da4a.json.gz +0 -0
  214. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/ddf6dc967d898767.json.gz +0 -0
  215. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/dfc64de6e7bfc0a0.json.gz +0 -0
  216. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/e2f18fa32fe1f6d0.json.gz +0 -0
  217. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/e37393fed29e84c5.json.gz +0 -0
  218. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/e6a8585e2a054ff6.json.gz +0 -0
  219. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/e7e9e327baca6903.json.gz +0 -0
  220. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/e86447af0571672c.json.gz +0 -0
  221. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/ea819202d22122e5.json.gz +0 -0
  222. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/eb4535585f2e84f6.json.gz +0 -0
  223. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/eb7ddd5319d09e27.json.gz +0 -0
  224. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/eca4959b2b87ae15.json.gz +0 -0
  225. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/ee10d7959ec4843c.json.gz +0 -0
  226. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/ef1b68347966ab26.json.gz +0 -0
  227. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/f3e55425cc41f230.json.gz +0 -0
  228. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/f40042c1cdb9fd43.json.gz +0 -0
  229. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/f48466215c790a3f.json.gz +0 -0
  230. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/f5b9ace9b59351e7.json.gz +0 -0
  231. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/f8155387eb5f375c.json.gz +0 -0
  232. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/fa8f1475a55be935.json.gz +0 -0
  233. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/fb21116a15d0b1f1.json.gz +0 -0
  234. package/packages/core/src/kernel/__snapshots__/reducer-identity-corpora/fe95444fbeabe592.json.gz +0 -0
  235. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/09bf0a1611d07363.json +984 -0
  236. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/10eac4988d66e161.json +1067 -0
  237. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/1a436b5fb45aee3e.json +1116 -0
  238. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/249db6f7a41f90e2.json +161 -0
  239. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/25dcb2fb6eaa83f4.json +858 -0
  240. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/2e1bdc763924616f.json +4932 -0
  241. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/30e9dabce3c4263d.json +399 -0
  242. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/3c27f918b194e3b3.json +465 -0
  243. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/4898ef339c68fa36.json +83 -0
  244. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/51816c0ffa62af6e.json +417 -0
  245. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/561bf45320062a44.json +83 -0
  246. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/5672d0233085d050.json +84 -0
  247. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/5e39f42cbdbf35ef.json +163 -0
  248. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/7771a7a2250f9964.json +868 -0
  249. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/79f0e0f4ccd43ba2.json +455 -0
  250. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/859c09edac738823.json +1086 -0
  251. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/881c491321bec99a.json +1074 -0
  252. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/965f25c3af1d2cdc.json +160 -0
  253. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/9b76d89da575ca90.json +20 -0
  254. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/9eb485320a72a9ff.json +233 -0
  255. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/a283c1f3462b1cc1.json +81 -0
  256. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/a60448c01016135e.json +18 -0
  257. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/a6584fb61b6679bd.json +97 -0
  258. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/a6e570fb126991ff.json +36 -0
  259. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/a8acf22c968b6e3d.json +81 -0
  260. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/ba7b85895bf6698e.json +1153 -0
  261. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/c88365c25b3186d3.json +543 -0
  262. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/e8f0481b23f90056.json +711 -0
  263. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/ee55782ed40ebbac.json +110 -0
  264. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/fc5082fac8167f3d.json +98 -0
  265. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/fc66408cde0b6b04.json +637 -0
  266. package/packages/core/src/kernel/__snapshots__/reducer-identity-records/fd55c329cfe921cc.json +1069 -0
  267. package/packages/core/src/kernel/attempt-creation-key.ts +20 -0
  268. package/packages/core/src/kernel/attempt-settlement.ts +125 -0
  269. package/packages/core/src/kernel/auto-merge-default.ts +1 -3
  270. package/packages/core/src/kernel/auto-merge.ts +1 -3
  271. package/packages/core/src/kernel/build-roster.ts +230 -0
  272. package/packages/core/src/kernel/dispatch-capacity.ts +316 -40
  273. package/packages/core/src/kernel/dispatch-placement.ts +1 -1
  274. package/packages/core/src/kernel/dispatch-settings.ts +1 -4
  275. package/packages/core/src/kernel/dispatch-status.ts +3 -5
  276. package/packages/core/src/kernel/dispatch-upgrade.ts +1 -1
  277. package/packages/core/src/kernel/engine.ts +152 -18
  278. package/packages/core/src/kernel/execution-intervals.ts +61 -0
  279. package/packages/core/src/kernel/forge-checks.ts +140 -0
  280. package/packages/core/src/kernel/forge-health.ts +2 -2
  281. package/packages/core/src/kernel/generated-files.ts +43 -0
  282. package/packages/core/src/kernel/generated-regeneration.ts +254 -0
  283. package/packages/core/src/kernel/generators/build-log.ts +30 -2
  284. package/packages/core/src/kernel/generators/optimization-log.ts +679 -0
  285. package/packages/core/src/kernel/generators/panel-log.ts +133 -0
  286. package/packages/core/src/kernel/generators/repository-journals.ts +13 -0
  287. package/packages/core/src/kernel/guarded-forge.ts +76 -11
  288. package/packages/core/src/kernel/harvest.ts +1 -4
  289. package/packages/core/src/kernel/head-paths.ts +4 -1
  290. package/packages/core/src/kernel/history-retention.ts +337 -0
  291. package/packages/core/src/kernel/incremental-fixtures.ts +6 -0
  292. package/packages/core/src/kernel/incremental.ts +14 -4
  293. package/packages/core/src/kernel/integration-landing.ts +64 -13
  294. package/packages/core/src/kernel/integration-stack.ts +123 -20
  295. package/packages/core/src/kernel/integration-state.ts +39 -2
  296. package/packages/core/src/kernel/janitor-failure.ts +2 -0
  297. package/packages/core/src/kernel/kernel-git.ts +1 -1
  298. package/packages/core/src/kernel/landing-measurement.ts +275 -0
  299. package/packages/core/src/kernel/landing-readiness.ts +2 -0
  300. package/packages/core/src/kernel/landing-state.ts +20 -1
  301. package/packages/core/src/kernel/leaf-restack-base.ts +33 -7
  302. package/packages/core/src/kernel/leaf-restack-state.ts +99 -4
  303. package/packages/core/src/kernel/log-index-value.ts +2 -0
  304. package/packages/core/src/kernel/log-index.ts +100 -3
  305. package/packages/core/src/kernel/measurement.ts +406 -0
  306. package/packages/core/src/kernel/mixed-version.ts +6 -3
  307. package/packages/core/src/kernel/node-landing.ts +92 -18
  308. package/packages/core/src/kernel/node-restack-state.ts +27 -1
  309. package/packages/core/src/kernel/node-restack-transaction.ts +80 -23
  310. package/packages/core/src/kernel/node-verification-context.ts +14 -4
  311. package/packages/core/src/kernel/open-pr-backpressure-state.ts +24 -0
  312. package/packages/core/src/kernel/open-pr-backpressure.ts +133 -0
  313. package/packages/core/src/kernel/optimization-admission.ts +490 -0
  314. package/packages/core/src/kernel/optimization.ts +953 -0
  315. package/packages/core/src/kernel/panel.ts +225 -0
  316. package/packages/core/src/kernel/phase-failures.ts +121 -0
  317. package/packages/core/src/kernel/phases.ts +42 -6
  318. package/packages/core/src/kernel/pr-attachments.ts +4 -16
  319. package/packages/core/src/kernel/pr-summary.ts +2 -2
  320. package/packages/core/src/kernel/published-branch-head.ts +60 -0
  321. package/packages/core/src/kernel/read-deferrals.ts +2 -2
  322. package/packages/core/src/kernel/read-facts.ts +69 -31
  323. package/packages/core/src/kernel/reconcile-restack.ts +352 -103
  324. package/packages/core/src/kernel/reducer-identity.ts +659 -0
  325. package/packages/core/src/kernel/reducer-registry.ts +62 -9
  326. package/packages/core/src/kernel/reducer-revisions.ts +75 -0
  327. package/packages/core/src/kernel/reducer.ts +269 -11
  328. package/packages/core/src/kernel/reopen-state.ts +48 -0
  329. package/packages/core/src/kernel/reopen.ts +143 -0
  330. package/packages/core/src/kernel/replay-retention.ts +208 -39
  331. package/packages/core/src/kernel/repository-attention.ts +1 -1
  332. package/packages/core/src/kernel/rollup.ts +61 -0
  333. package/packages/core/src/kernel/service-facts.ts +19 -7
  334. package/packages/core/src/kernel/setup-streak.ts +38 -0
  335. package/packages/core/src/kernel/step-durations.ts +257 -0
  336. package/packages/core/src/kernel/target-observation.ts +6 -1
  337. package/packages/core/src/kernel/target-rewrite-recovery.ts +116 -0
  338. package/packages/core/src/kernel/terminal-guard.ts +13 -5
  339. package/packages/core/src/kernel/ticket-handbacks.ts +1 -1
  340. package/packages/core/src/kernel/ticket-migrations.ts +1 -1
  341. package/packages/core/src/kernel/ticket-preparation.ts +1 -1
  342. package/packages/core/src/kernel/ticket-source-health.ts +1 -1
  343. package/packages/core/src/kernel/ticket-starts.ts +118 -0
  344. package/packages/core/src/kernel/ticket-wait.ts +37 -2
  345. package/packages/core/src/kernel/verify-diff-base.ts +67 -0
  346. package/packages/core/src/kernel/verify-stage-state.ts +1 -0
  347. package/packages/core/src/kernel/verify-stages.ts +51 -1
  348. package/packages/core/src/objective.ts +532 -0
  349. package/packages/core/src/ontology.ts +54 -6
  350. package/packages/core/src/operator/agent-context-serve.ts +631 -0
  351. package/packages/core/src/operator/annotations.ts +105 -4
  352. package/packages/core/src/operator/attention.ts +470 -0
  353. package/packages/core/src/operator/canonical-skills.ts +35 -0
  354. package/packages/core/src/operator/cli-equivalents.ts +270 -0
  355. package/packages/core/src/operator/context-prompts.ts +61 -0
  356. package/packages/core/src/operator/control.ts +2 -1
  357. package/packages/core/src/operator/index.ts +61 -1
  358. package/packages/core/src/operator/landings.ts +28 -19
  359. package/packages/core/src/operator/optimization.ts +314 -0
  360. package/packages/core/src/operator/protocol.ts +33 -1
  361. package/packages/core/src/operator/query.ts +137 -73
  362. package/packages/core/src/operator/read-view.ts +5 -2
  363. package/packages/core/src/operator/registry.ts +625 -59
  364. package/packages/core/src/operator/requests.ts +45 -20
  365. package/packages/core/src/operator/sandbox-host.ts +107 -11
  366. package/packages/core/src/operator/sandbox-resolver.ts +253 -0
  367. package/packages/core/src/operator/sandbox.ts +778 -82
  368. package/packages/core/src/operator/ticket-asset-list.ts +77 -0
  369. package/packages/core/src/operator/ticket-assets.ts +167 -0
  370. package/packages/core/src/operator/ticket-start.ts +152 -0
  371. package/packages/core/src/operator/tickets.ts +36 -4
  372. package/packages/core/src/plugin-sdk/index.ts +24 -0
  373. package/packages/core/src/plugins/manifest.ts +1 -1
  374. package/packages/core/src/plugins/registry.ts +1 -0
  375. package/packages/core/src/ports/forge/contract.ts +9 -0
  376. package/packages/core/src/ports/forge/fake.ts +114 -2
  377. package/packages/core/src/ports/forge/git-blob.ts +15 -0
  378. package/packages/core/src/ports/forge/git-rewrite.ts +6 -4
  379. package/packages/core/src/ports/forge/github-readiness.ts +1 -1
  380. package/packages/core/src/ports/forge/github-transport.ts +156 -1
  381. package/packages/core/src/ports/forge/github.ts +388 -100
  382. package/packages/core/src/ports/forge/local-git.ts +61 -1
  383. package/packages/core/src/ports/forge/readiness.ts +15 -3
  384. package/packages/core/src/ports/forge-failure.ts +46 -0
  385. package/packages/core/src/ports/forge-request-context.ts +23 -1
  386. package/packages/core/src/ports/forge-telemetry.ts +16 -0
  387. package/packages/core/src/ports/runner/antigravity-test.fixture.ts +149 -0
  388. package/packages/core/src/ports/runner/antigravity.ts +1071 -0
  389. package/packages/core/src/ports/runner/claude-test.fixture.ts +71 -0
  390. package/packages/core/src/ports/runner/claude.ts +6 -1
  391. package/packages/core/src/ports/runner/codex-test.fixture.ts +63 -0
  392. package/packages/core/src/ports/runner/codex.ts +11 -2
  393. package/packages/core/src/ports/runner/contract.ts +25 -1
  394. package/packages/core/src/ports/runner/fake.ts +2 -2
  395. package/packages/core/src/ports/runner/native-cli-fixture.ts +40 -5
  396. package/packages/core/src/ports/runner/native-process-fixture.ts +4 -1
  397. package/packages/core/src/ports/runner/pi.ts +23 -7
  398. package/packages/core/src/ports/runner/production.ts +19 -2
  399. package/packages/core/src/ports/runner/session-env.ts +65 -5
  400. package/packages/core/src/ports/runner/start-prompt.ts +6 -4
  401. package/packages/core/src/ports/tickets/contract.ts +75 -2
  402. package/packages/core/src/ports/tickets/fake.ts +11 -0
  403. package/packages/core/src/ports/tickets/file.ts +18 -0
  404. package/packages/core/src/ports/tickets/github-fake.ts +136 -4
  405. package/packages/core/src/ports/tickets/github.ts +407 -35
  406. package/packages/core/src/ports/tickets/hosted-index.ts +16 -1
  407. package/packages/core/src/ports/tickets/labels.ts +21 -0
  408. package/packages/core/src/ports/tickets/linear.ts +163 -0
  409. package/packages/core/src/ports/tickets/migration.ts +2 -0
  410. package/packages/core/src/ports/tickets/priority.ts +20 -0
  411. package/packages/core/src/ports/tickets/remote-protocol.ts +105 -6
  412. package/packages/core/src/ports/tickets/remote.ts +203 -17
  413. package/packages/core/src/ports/tickets/search.ts +139 -0
  414. package/packages/core/src/ports/tickets/tree.ts +17 -4
  415. package/packages/core/src/ports/types.ts +202 -6
  416. package/packages/core/src/ports/workspace/builtin-capabilities.ts +16 -4
  417. package/packages/core/src/ports/workspace/commit-preservation.ts +182 -64
  418. package/packages/core/src/ports/workspace/create.ts +18 -1
  419. package/packages/core/src/ports/workspace/fake.ts +340 -12
  420. package/packages/core/src/ports/workspace/git-worktree.ts +846 -43
  421. package/packages/core/src/ports/workspace/operator-sandbox.ts +129 -12
  422. package/packages/core/src/ports/workspace/process-group.ts +48 -0
  423. package/packages/core/src/ports/workspace/vercel-sandbox.ts +1539 -221
  424. package/packages/core/src/processes/agent-context-assemble.ts +576 -0
  425. package/packages/core/src/processes/agent-context.ts +469 -0
  426. package/packages/core/src/processes/build-execution-state.ts +1 -3
  427. package/packages/core/src/processes/build-runner.ts +1982 -528
  428. package/packages/core/src/processes/dispatch-failure-budget.ts +1 -1
  429. package/packages/core/src/processes/dispatcher-selectors.ts +15 -13
  430. package/packages/core/src/processes/dispatcher.ts +3003 -308
  431. package/packages/core/src/processes/execution-no-progress.ts +40 -1
  432. package/packages/core/src/processes/execution-settlement.ts +2 -6
  433. package/packages/core/src/processes/harvest-execution-state.ts +2 -6
  434. package/packages/core/src/processes/harvest-runner.ts +7 -2
  435. package/packages/core/src/processes/infrastructure-failure-budget.ts +1 -3
  436. package/packages/core/src/processes/judge-launcher.ts +38 -0
  437. package/packages/core/src/processes/measurement-runner.ts +235 -0
  438. package/packages/core/src/processes/optimization-activity.ts +120 -0
  439. package/packages/core/src/processes/optimization-merges.ts +101 -0
  440. package/packages/core/src/processes/optimization-stop.ts +179 -0
  441. package/packages/core/src/processes/panel-runner.ts +756 -0
  442. package/packages/core/src/processes/phase-failure-budget.ts +2 -0
  443. package/packages/core/src/processes/publication-state.ts +1 -4
  444. package/packages/core/src/processes/repo-view.ts +154 -6
  445. package/packages/core/src/processes/sandbox-state.ts +54 -10
  446. package/packages/core/src/processes/tick-publication.ts +2 -0
  447. package/packages/core/src/processes/tick-state.ts +1 -3
  448. package/packages/core/src/processes/workspace-preparation.ts +76 -0
  449. package/packages/core/src/processes/workspace-preservation.ts +67 -9
  450. package/packages/core/src/scenarios/harness.ts +19 -13
  451. package/packages/core/src/store/account-redaction.ts +1 -0
  452. package/packages/core/src/store/adapter.ts +52 -1
  453. package/packages/core/src/store/agent-context.ts +432 -0
  454. package/packages/core/src/store/build-feed.ts +291 -0
  455. package/packages/core/src/store/build-scope.ts +19 -1
  456. package/packages/core/src/store/contract.ts +955 -14
  457. package/packages/core/src/store/digest.ts +104 -9
  458. package/packages/core/src/store/histogram.ts +113 -0
  459. package/packages/core/src/store/judge-authority.ts +161 -0
  460. package/packages/core/src/store/local/schema.ts +62 -0
  461. package/packages/core/src/store/local/store.ts +628 -22
  462. package/packages/core/src/store/local/ticket-asset-heads.ts +23 -0
  463. package/packages/core/src/store/memory.ts +461 -69
  464. package/packages/core/src/store/open-builds.ts +19 -0
  465. package/packages/core/src/store/phase-session.ts +256 -6
  466. package/packages/core/src/store/reduced-reads.ts +24 -4
  467. package/packages/core/src/store/reducer-value-shapes.json +18023 -11824
  468. package/packages/core/src/store/reducer-values.ts +6 -1
  469. package/packages/core/src/store/remote/client.ts +220 -4
  470. package/packages/core/src/store/remote/compatibility.ts +1 -1
  471. package/packages/core/src/store/remote/credentials.ts +31 -1
  472. package/packages/core/src/store/remote/index.ts +41 -0
  473. package/packages/core/src/store/remote/protocol.ts +107 -0
  474. package/packages/core/src/store/remote/released-clients.json +22 -0
  475. package/packages/core/src/store/remote/released-reducer-values/1.10.0.json +34439 -0
  476. package/packages/core/src/store/remote/released-reducer-values/1.11.0.json +35680 -0
  477. package/packages/core/src/store/remote/released-reducer-values/index.ts +20 -16
  478. package/packages/core/src/store/remote/token.ts +13 -4
  479. package/packages/core/src/store/repo-state-events.ts +6 -8
  480. package/packages/core/src/store/retention.ts +23 -1
  481. package/packages/core/src/store/rollups.ts +337 -0
  482. package/packages/core/src/store/session-handle.ts +20 -2
  483. package/packages/core/src/store/session-reducer.ts +1 -4
  484. package/packages/core/src/store/snapshots.ts +10 -0
  485. package/packages/core/src/store/ticket-assets.ts +1 -3
  486. package/packages/core/src/store/types.ts +117 -9
  487. package/packages/core/src/testing/dispatch-read-budget.ts +1162 -2
  488. package/packages/core/src/testing/git-config-isolation.ts +27 -0
  489. package/packages/core/src/testing/index.ts +40 -0
  490. package/packages/core/src/testing/memory-operator-sandbox.ts +346 -0
  491. package/packages/core/src/testing/reduced-read-budget.ts +5349 -153
  492. package/packages/core/src/web/analytics-source.ts +303 -0
  493. package/packages/core/src/web/assets/Atkinson-OFL.txt +93 -0
  494. package/packages/core/src/web/assets/AtkinsonHyperlegibleNext.latin.woff2 +0 -0
  495. package/packages/core/src/web/assets/JetBrains-OFL.txt +93 -0
  496. package/packages/core/src/web/assets/JetBrainsMono.latin.woff2 +0 -0
  497. package/packages/core/src/web/assets/app.css +1 -0
  498. package/packages/core/src/web/assets/app.js +9 -0
  499. package/packages/core/src/web/assets/manifest.json +31 -0
  500. package/packages/core/src/web/assets/theme.js +1 -0
  501. package/packages/core/src/web/bounded.ts +31 -0
  502. package/packages/core/src/web/http.ts +315 -0
  503. package/packages/core/src/web/hub.ts +160 -0
  504. package/packages/core/src/web/options.ts +38 -0
  505. package/packages/core/src/web/overview-source.ts +322 -0
  506. package/packages/core/src/web/page.ts +56 -0
  507. package/packages/core/src/web/protocol.ts +151 -0
  508. package/packages/core/src/web/read-only.ts +23 -0
  509. package/packages/core/src/web/repository-source.ts +35 -0
  510. package/packages/core/src/web/server.ts +97 -0
  511. package/skills/code-review/SKILL.md +26 -2
  512. package/skills/finalize/SKILL.md +10 -4
  513. package/skills/guide/SKILL.md +743 -123
  514. package/skills/guide/references/accounts.md +2 -1
  515. package/skills/guide/references/integration-tree.md +102 -11
  516. package/skills/guide/references/merge-policy.md +30 -14
  517. package/skills/guide/references/migration-1.0.md +2 -1
  518. package/skills/guide/references/operator-api.md +251 -20
  519. package/skills/guide/references/optimization-nodes.md +1100 -0
  520. package/skills/guide/references/plugin-authoring.md +83 -13
  521. package/skills/guide/references/remote-store-protocol.md +137 -17
  522. package/skills/guide/references/remote-ticket-protocol.md +90 -2
  523. package/skills/guide/references/restacking.md +119 -15
  524. package/skills/guide/references/setup.md +27 -4
  525. package/skills/guide/references/spec-standard.md +2 -1
  526. package/skills/guide/references/ticket-dependencies.md +15 -3
  527. package/skills/guide/references/ticket-migration.md +4 -2
  528. package/skills/implement/SKILL.md +74 -5
  529. package/skills/judge/SKILL.md +43 -0
  530. package/skills/operate/SKILL.md +374 -57
  531. package/skills/plan/SKILL.md +28 -4
  532. package/skills/plan-review/SKILL.md +24 -3
  533. package/skills/propose/SKILL.md +121 -0
  534. package/skills/reconcile/SKILL.md +21 -2
  535. package/skills/spec/SKILL.md +63 -11
  536. package/skills/tickets/SKILL.md +94 -9
  537. 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, attempt priority, and the landing gate and attempt settlement, active hours, 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
 
@@ -38,7 +39,9 @@ system.** For anything repository-specific — what verify steps run here, which
38
39
  runner a role uses, what `test` actually invokes — read the repo, not this
39
40
  document:
40
41
 
41
- - `autobuild.toml` at the repo root — the live configuration.
42
+ - `autobuild.toml` at the repo root — the live configuration, layered in that
43
+ checkout with an uncommitted `.autobuild/local.toml` when one exists (see
44
+ [Local overrides](#local-overrides)).
42
45
  - `.agents/skills/ab-*/SKILL.md` — the installed skills *as this repo edited
43
46
  them*. They are editable by design, so the vendored copy may deliberately
44
47
  differ from the distribution's default described here.
@@ -78,16 +81,31 @@ spec → plan ⇄ plan-review → implement ⇄ code-review → verify:* → fin
78
81
  tickets; a human grooms them to the complete
79
82
  [spec standard](references/spec-standard.md) — what and why but never how,
80
83
  verifiable acceptance criteria, explicit out-of-scope, and evidence — and
81
- dispatches. Generated work cannot leave Triage un-groomed. The dispatcher
84
+ dispatches. Generated work cannot leave Triage un-groomed, with one
85
+ exception: an optimization node's proposer files attempts straight to ready,
86
+ because grooming the node's objective and budget is the dispatch decision for
87
+ them (see [optimization nodes](references/optimization-nodes.md#proposer-phase)). The dispatcher
82
88
  claims tickets that pass the `[tickets]` ready
83
89
  gate — urgent tickets first, then normal ones, each in the source's order —
84
90
  chooses a short immutable slug from the final conforming spec, and
85
91
  starts builds up to the top-level `capacity` bound, after slots reserved for
86
- integration nodes awaiting verification or reconcile, for finished builds
92
+ integration nodes awaiting verification, reconcile or propose, for finished builds
87
93
  waiting to re-verify or reconcile, and for builds whose ticket wait ended.
94
+ Free slots go to `manual` start requests, then urgent waiting work, then
95
+ urgent start requests and urgent tickets, then normal waiting work, then
96
+ normal start requests and normal tickets; a build takes its ticket's priority at
97
+ claim, and `ab priority <slug> urgent|normal` changes an active build's
98
+ priority. An optimization node's attempts claim at the node's current
99
+ priority instead, so `ab priority <node> urgent` speeds up its attempts
100
+ claimed afterwards. Priority orders free slots only.
88
101
  `capacity` counts builds running work: a build that finished its pipeline
89
102
  holds no slot while it waits for a merge decision, though it keeps its
90
103
  workspace until it merges or closes. Priority never preempts a running build.
104
+ With `[policy].maxOpenPrs` set, open-PR backpressure pauses new ordinary
105
+ normal-priority claims (not `ab start` requests) once that many root PRs are open and unmerged, until
106
+ the count drains to `resumeOpenPrs` (below `maxOpenPrs` when the two are
107
+ equal); urgent claims and in-flight work continue, and capacity is
108
+ unchanged.
91
109
  - **Ticket waits.** A work build that cannot proceed until other tickets
92
110
  complete parks without a slot. A phase agent ends its session with
93
111
  `ab wait-on <ticket-id>... --reason <text>`, a terminal that needs no
@@ -99,7 +117,9 @@ spec → plan ⇄ plan-review → implement ⇄ code-review → verify:* → fin
99
117
  declaring phase re-runs with the refusal as its guidance. Accepted, the ids
100
118
  join the build ticket's `blockedBy`, the build is blocked on an escalation
101
119
  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
120
+ branch, workspace and completed phase work. That escalation alone is not
121
+ attention: `ab wait --for attention` and default `ab watch` stay quiet,
122
+ while status surfaces show the wait. The dispatcher ends the wait
103
123
  (cause `automatic`) on its first tick after every named ticket completes;
104
124
  while any is still open the wait stays in place. A named ticket that is
105
125
  rejected or deleted can never complete: the dispatcher instead raises an
@@ -108,13 +128,17 @@ spec → plan ⇄ plan-review → implement ⇄ code-review → verify:* → fin
108
128
  filter, and its answer resumes the declaring phase like a wait answer. An
109
129
  operator may still end a wait early by answering its escalation (cause
110
130
  `operator`). The build then takes a slot
111
- ahead of new ticket claims. If its target moved, it first restacks onto the
131
+ ahead of normal ticket claims (urgent work first). If its target moved, it first restacks onto the
112
132
  target's current head (published work is replayed as one change, and a
113
- conflict reconciles first; with nothing published, the branch fast-forwards
133
+ conflict reconciles first unless it is confined to declared `[generated]`
134
+ files, which the kernel regenerates; with nothing published, the branch fast-forwards
114
135
  only when it has no commits the target lacks and no uncommitted tracked
115
136
  changes, and otherwise the restack fails without discarding them), so the
116
137
  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,
138
+ a restack. The declaring phase then re-runs at the same round or attempt,
139
+ except that a verify or finalize wait whose restack replayed cleanly
140
+ re-verifies every step from the first, at a new attempt, before finalize or
141
+ merge. `ab build status` shows a `waiting on:` line naming the tickets,
118
142
  and `ab builds` and both dashboards show the build as `waiting` on them.
119
143
  Node builds cannot declare waits.
120
144
  - **Failed preparation.** Durable preparation facts protect the claim-to-build
@@ -166,15 +190,103 @@ spec → plan ⇄ plan-review → implement ⇄ code-review → verify:* → fin
166
190
  - **Restacking and epilogue.** The kernel replays one net leaf change at verify
167
191
  entry, when a ticket wait ends and its destination moved, and when its
168
192
  destination moves while awaiting merge. Clean replay
169
- starts no agent; conflicts enter `reconcile`, then verification. The leaf
193
+ starts no agent; conflicts enter `reconcile`, then verification, except
194
+ that conflicts only in declared [`[generated]`](#generated) files are
195
+ regenerated by their commands with no agent. A clean
196
+ replay after a verify or finalize wait re-verifies on the restacked base. The leaf
170
197
  terminates **merged** or **closed**. Transient leaf publication failures park
171
198
  on a durable six-retry schedule, independently of agent phase attempts.
172
199
  See the [replay reference](references/restacking.md).
173
200
 
174
201
  Integration builds use collect → verify → merge → close, with demand-driven node restacking,
175
202
  repair children and source-aware reconcile as needed. Their exact-head/parent
176
- verification differs from clean waiting leaf rewrites. See the
203
+ verification differs from clean awaiting-merge leaf rewrites. See the
177
204
  [node lifecycle](references/integration-tree.md#collect-verify-and-merge).
205
+ An optimization node measures its starting value and then alternates `propose`
206
+ and collecting: an `ab-propose` session reads the attempt ledger and deposits
207
+ proposals with `ab propose`, and the dispatcher files each as an attempt
208
+ ticket. See the [proposer phase](references/optimization-nodes.md#proposer-phase).
209
+
210
+ **Optimization nodes.** A node becomes an optimization node only when its spec
211
+ carries exactly one fenced block whose info string is exactly
212
+ `autobuild-objective`. A heading named "Objective", a plain `toml` block, a block
213
+ nested inside another fence, or prose describing an objective never counts. Two
214
+ blocks, a block that fails to parse or validate, an objective with no budget
215
+ limit, or a ticket source with no rejected role refuse the opening and name the
216
+ reason; the node never opens as a plain node instead. A work ticket carrying the
217
+ block is refused at dispatch. A spec revision of an open optimization node may
218
+ change the objective but cannot add or remove the block, and a plain node never
219
+ gains one. Grooming the objective is the dispatch decision for the node's
220
+ attempts: once the node is measured, its proposer files attempts straight to
221
+ ready, within the groomed budget, and each must pass the ratchet before it
222
+ lands. The marker rules and the objective schema are in
223
+ [optimization nodes](references/optimization-nodes.md).
224
+
225
+ To groom an optimization node, follow
226
+ the [grooming guidance](references/optimization-nodes.md#grooming-an-optimization-node):
227
+ measure the evidence, threshold and ε where builds run, and choose a budget
228
+ whose `maxHours` counts [active hours](references/optimization-nodes.md#active-hours),
229
+ the time attempts, the proposer and measurements actually run.
230
+
231
+ **Optimization attempts.** A child is an attempt when its ticket came from one
232
+ of the node's recorded proposals; it runs the ordinary work grammar. In every
233
+ phase of an attempt, `ab context` writes a derived `objective.md` and a manifest
234
+ `attempt` block: the purpose, the measurement command or judge panel, the
235
+ harness, ε, any threshold and the node's current value. In implement, `ab done`
236
+ refuses a contribution that changes a harness path, naming each path, before
237
+ anything is deposited or published, so code review never sees it.
238
+ `ab done --no-improvement "<reason>"` declines instead: it needs no commits,
239
+ skips review, verification and measurement, completes the build
240
+ `closed-unmerged`, and the dispatcher settles the attempt `declined` on the
241
+ node with the reason as the ledger note. A branch that an earlier implement
242
+ round published is deleted by the node before the ticket moves to rejected.
243
+ The flag is refused outside an attempt's implement phase. An attempt claims
244
+ at its node's current priority; nothing is reserved for it. See
245
+ [attempts](references/optimization-nodes.md#attempts).
246
+
247
+ **Judge panels.** A panel objective is measured by a panel of judge sessions
248
+ under the `judge` role. Each judge compares two harness-pinned variants,
249
+ labeled `A/` and `B/` in an order drawn per judge, in its own root outside
250
+ any repository, and ends with `ab judge prefer <A|B|tie> --reason "…"`. The
251
+ kernel records each judgment with its order in `panel.judged`; the candidate's
252
+ win rate counts ties as half. Judges can read nothing: with a remote store
253
+ they hold a write-only credential, and with a local store they save the
254
+ preference for the runner to record. Nothing they are given, including their
255
+ self-contained `ab`, names the repository or reveals which variant is the
256
+ candidate. Each judge follows the `judge` role's provider alternates, each
257
+ target a separate judge session with its own stream in the same root and
258
+ order; only the chain's last failure counts. A resumed run reuses recorded
259
+ preferences and reruns only judges without one. An attempt on a panel objective is accepted when its win rate
260
+ against the current node head reaches 0.5 + ε; otherwise it settles
261
+ `no-improvement`. A panel node judges its opening head against itself for its noise
262
+ check (its starting value is 0.5), and after each accepted attempt judges the
263
+ landed head against the starting head, recording that win rate as progress;
264
+ a panel threshold compares it. Its next child waits to land while a progress
265
+ panel is owed. See
266
+ [judge panels](references/optimization-nodes.md#judge-panels).
267
+
268
+ **Optimization landing.** A child of an optimization node lands only with a
269
+ fresh measurement of its exact head against the node's exact current head: an
270
+ attempt must improve by at least ε, any other child must not regress by more
271
+ 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
272
+ attempt settles once. An attempt that does not land, including one an operator
273
+ aborts, has its ticket moved to the rejected role: the one case in which the
274
+ dispatcher moves a ticket there. A declined or no-improvement attempt's
275
+ published branch is deleted first, and a failed deletion stays pending and
276
+ visible. A human forge merge whose merged head was never measured does not
277
+ count as accepted. The attempt stays in flight, holding its slot, until an
278
+ operator runs `ab objective <node> --settle-unmeasured <attempt> --policy
279
+ release-unmeasured`, which settles it `merged-unmeasured` and moves no value.
280
+ See
281
+ [landing and settlement](references/optimization-nodes.md#landing-and-settlement).
282
+
283
+ An optimization node stops once: automatically on a threshold, plateau or
284
+ budget cause, when the proposer is exhausted, or by hand with
285
+ `ab objective <node> --stop [--drain | --abort]`. Its stop mode then aborts or
286
+ drains the attempts in flight. It completes only after it has stopped with no
287
+ attempt running or waiting to land, and stopping is not consent: land it with
288
+ `ab merge <node>`. See
289
+ [stopping and completion](references/optimization-nodes.md#stopping-and-completion).
178
290
 
179
291
  **Review severity is proportion to the spec.** Both review loops rate a
180
292
  finding by what the defect costs against the spec's acceptance criteria and
@@ -244,12 +356,14 @@ terminal.
244
356
  **Slug naming is not a phase.** For each new build, a tool-free one-shot call
245
357
  proposes a lowercase kebab base of at most three meaningful spec-derived words.
246
358
  The dispatcher owns a hard deadline, strict validation, and `-2`, `-3`, …
247
- collision suffixes that skip both this store's slugs and `ab/` or `ab-node/`
248
- build branches already on the remote, checked once at claim time. A forge
249
- without that capability deduplicates against the store only and says so in a
359
+ collision suffixes that skip this store's slugs, `ab/` or `ab-node/` build
360
+ branches already on the remote, and, for a workspace provider that creates
361
+ branches in the local checkout (git-worktree), branches that already exist
362
+ there, checked once at claim time. A forge without the remote capability
363
+ deduplicates against the store (and local branches) only and says so in a
250
364
  startup warning. A missing or failed model proposal falls back to the first
251
365
  three words of the kebab-cased title, so the proposal never blocks dispatch.
252
- The branch check is not optional: if a remote lookup fails, or the base and its
366
+ The branch check is not optional: if a remote or local lookup fails, or the base and its
253
367
  `-2` … `-100` suffixes are all taken, the claim fails, no build is created, and
254
368
  the ticket is handed back to ready for a later tick. The slug
255
369
  and `ab/<slug>` (or `ab-node/<slug>` for a node) branch are chosen once;
@@ -285,8 +399,9 @@ The distinctions that change an administrator's answer:
285
399
  to the Store, so a slow claim or agent turn cannot delay a keypress. Repository
286
400
  reads advance incrementally. SIGINT, SIGHUP, SIGQUIT, and SIGTERM restore the
287
401
  terminal immediately, drain and reap the child, and keep repeated signals
288
- graceful until an open claim tick reaches a recoverable boundary; non-SIGINT
289
- termination is replayed only after that drain. Durable normal/forced/abnormal
402
+ graceful until an open claim tick reaches a recoverable boundary; after that
403
+ drain SIGHUP and SIGTERM are replayed, while SIGQUIT exits 131 instead of
404
+ dumping core. Durable normal/forced/abnormal
290
405
  evidence retains available process detail, and parent-death detection prevents
291
406
  a detached kernel. Resident checkout dispatch selects viewer or local execution before running a filesystem-only
292
407
  launcher that snapshots the invoking installation and its installed production
@@ -385,12 +500,15 @@ The distinctions that change an administrator's answer:
385
500
  within the generation; `--once`, origin-mode and hot development paths bypass
386
501
  the launcher. `--once` remains one tick plus drain.
387
502
  - **Live configuration** has two explicit contexts. A running dispatcher owns
388
- the last valid snapshot from the **main checkout**; dispatch, setup, and each
503
+ the last valid snapshot from the **main checkout**: its `autobuild.toml`
504
+ layered with `.autobuild/local.toml`, read together as one candidate before
505
+ every tick. Dispatch, setup, and each
389
506
  pipeline step capture it at their action boundary, without interrupting an
390
507
  agent turn or command already running. Missing, unreadable, malformed, and
391
508
  routing-invalid candidates retain that snapshot with deduplicated operator
392
509
  notice, and restoring a valid file resumes reload. Scoped phase CLI processes
393
- still read the build worktree's branch-owned file. Dispatcher merge readiness,
510
+ still read the build worktree's branch-owned file, which never has a local
511
+ override layer. Dispatcher merge readiness,
394
512
  resume, and execution recovery use the runner's pinned commands, verify, and
395
513
  finalize configuration through the cycle capture's exact artifact revision.
396
514
  Lease sweeps reuse at most 128 parsed effective-config pins in a disposable
@@ -433,8 +551,14 @@ The distinctions that change an administrator's answer:
433
551
  successful content-producing finalize post-step. History rewrites (reconcile,
434
552
  leaf verify-entry, wait-resume and waiting restacks, and node restacks on demand; see
435
553
  [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>`.
554
+ expected-head guard after retaining every recorded Git tip. Leaf rewrites and
555
+ node writes retain best effort: the immutable
556
+ `refs/autobuild/archive/<slug>/<sha>` ref where the forge accepts it, else a
557
+ BuildStore `history-objects-<sha>` copy, else one `history-unretained` warning
558
+ per build, and the write proceeds; `history.retained` (leaf) and
559
+ `node.history-retained` (node) record the non-forge outcomes. Workspace
560
+ preservation of unpublished commits is strict: archive ref, else store copy
561
+ (`workspace.commits-retained`), else the release is refused.
438
562
  `github` publishes through GitHub. `local-git` performs no remote/network/`gh`
439
563
  operation: durable PR records live under private Git refs, and the review
440
564
  locator is `refs/heads/ab/<slug>`. Once merge authorization (auto or consent;
@@ -516,6 +640,49 @@ clock is therefore consulted only once that window ends, at most one scan
516
640
  interval after the recorded measurement; the dispatcher then treats it as a
517
641
  clock rollback, rescans, and resets the cache to the current clock.
518
642
 
643
+ ### Local overrides
644
+
645
+ `.autobuild/local.toml`, beside `autobuild.toml` in a checkout, overrides
646
+ personal settings for every `ab` command that reads configuration from that
647
+ checkout, including a checkout-mode dispatcher. `ab init` ignores `.autobuild/`,
648
+ so the file is never committed. Edit overrides by hand; use
649
+ `ab operator dispatcher [human|agent] [--json]` to read or save ownership.
650
+ Saving may normalize local TOML formatting.
651
+
652
+ - **Allowed:** `capacity`, `ticketScanIntervalSeconds`, `[upgrade]`, `[hooks]`,
653
+ `[roles]`, `[accounts]`, `[operator]`.
654
+ - **Local only:** `[operator] dispatcher = "human" | "agent"` is optional, with no
655
+ default. Even an empty `[operator]` is rejected in `autobuild.toml`, with advice
656
+ to use `.autobuild/local.toml`. Preference changes are hot and never command a
657
+ dispatcher. Repository instructions take precedence.
658
+ - **Committed only:** every other section — store, forge, plugins, tickets,
659
+ orchestrator, PR, merge, policy, base branch, generated files and profiles
660
+ must agree across everyone sharing the store and ticket source, and the
661
+ build-owned `[verify]`, `[finalize]`, `[commands]` and `[workspace]` come from
662
+ the build's own branch. A local file that sets one is rejected with
663
+ `<path>: <key> can only be set in autobuild.toml`; an unknown key is
664
+ rejected with `<path>: "<key>" is not a configuration setting`. Both messages
665
+ then list the allowed sections.
666
+ - **Merge:** tables merge key by key; scalars and arrays replace whole. A local
667
+ file adds or changes keys but cannot remove a committed role, hook or key.
668
+ Invalid local values get the `autobuild.toml` message, naming the local file.
669
+ - **Reload:** a running dispatcher picks up edits with the same hot or
670
+ restart treatment per field; a rejected file keeps the last accepted
671
+ configuration running.
672
+ - **Visibility:** `ab repository status` prints
673
+ `dispatcher local overrides (<path>): <settings>` (`localOverrides` in
674
+ `--json`) when the held dispatcher took settings from its local file.
675
+ - Build worktrees, origin-mode and hosted dispatchers never read it.
676
+
677
+ ### `[operator]`
678
+
679
+ This table is local-only: put it in `.autobuild/local.toml`. Committed input
680
+ rejects even an empty table. `ab operator dispatcher [human|agent] [--json]`
681
+ reads or saves the preference; it never starts or stops a dispatcher.
682
+
683
+ | Field | Default | Allowed / constraints | Effect |
684
+ |---|---|---|---|
685
+ | `dispatcher` | unset | `"human"` or `"agent"` | Who runs a dispatcher when fresh status proves none is running; repository instructions take precedence. Hot, with no process action. |
519
686
 
520
687
  ### Root scalars
521
688
 
@@ -715,12 +882,22 @@ likes.
715
882
  |---|---|---|---|
716
883
  | `<name>` | — | nonempty string → nonempty shell string | Names a deterministic verb the kernel may run. Referenced by name from check steps in `[verify.<step>]` or `[finalize.<step>]`. |
717
884
 
718
- `setup` is special by convention: it runs after workspace provision and after a
719
- sandbox rehydrate. Failures are durable, remain visible in build status and the
720
- dashboard, and retry up to `[policy].maxSetupAttempts`; exhaustion raises a
721
- setup-targeted escalation without manufacturing a pipeline phase or verdict. An
722
- answer from your operator agent or you re-arms the budget, and a later successful `runner.attached` clears
723
- the current error. Values are never evaluated as config — they are handed to a
885
+ `setup` is special by convention: it runs at every runner attachment (workspace
886
+ provision, sandbox rehydrate, resume). Local worktrees do not inherit the
887
+ checkout's installed dependencies, so `setup` installs them. It runs again before
888
+ the next phase,
889
+ check, verify, finalize or measurement step whenever a restack, wait-resume
890
+ advance or completed reconcile moves the build onto a new base. Autobuild cannot
891
+ see which files setup reads, so every base move counts as a dependency change;
892
+ commits the build's own agents make do not move the base. Setup does not run
893
+ while a reconcile resolver works on a replay: a resolver that needs the new
894
+ dependencies to check its resolution runs the repository's setup itself.
895
+ Failures, at attachment or after a base move, are durable, remain visible in
896
+ build status and the dashboard, stop dependent work, and retry up to
897
+ `[policy].maxSetupAttempts`; exhaustion raises a setup-targeted escalation
898
+ without manufacturing a pipeline phase or verdict. An answer from your operator
899
+ agent or you re-arms the budget, and only a later successful setup, recorded as
900
+ a new `runner.attached`, clears the current error. Values are never evaluated as config — they are handed to a
724
901
  shell as written.
725
902
 
726
903
  Fresh init config deliberately leaves this map empty. The setup agent follows
@@ -737,6 +914,29 @@ end-to-end or browser test suite into an ordinary `check` step. If none exists,
737
914
  do not create one during setup. The acceptance check neither substitutes for
738
915
  nor seeds a suite.
739
916
 
917
+ ### `[generated]`
918
+
919
+ An optional ordered array of tables, written `[[generated]]`, declaring files a
920
+ deterministic command rebuilds. Omitting it declares nothing and changes no
921
+ behavior.
922
+
923
+ | Field | Default | Allowed / constraints | Effect |
924
+ |---|---|---|---|
925
+ | `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. |
926
+ | `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. |
927
+
928
+ When a restack replay (a leaf's automatic restack, or one item of a node
929
+ restack) conflicts only in declared files, the kernel regenerates them instead
930
+ of starting a reconcile session: it takes the target's side of each conflicted
931
+ file, runs each owning command once, and commits the result as the change's
932
+ replay. A non-zero exit, a write outside the declarations, a change to the Git
933
+ index, or leftover conflict markers fails the regeneration; nothing is committed and the replay goes to an
934
+ ordinary reconcile with the failure reason in its context. A replay that also
935
+ conflicts in undeclared files goes straight to reconcile, whose context lists
936
+ the generated files and commands to run after the other files are resolved.
937
+ Declarations come from the dispatcher's live configuration, like `[policy]`.
938
+ See [Restacking](references/restacking.md) for the recorded facts.
939
+
740
940
  ### `[verify]`
741
941
 
742
942
  Post-reconcile verification defaults to enabled: `[verify].afterReconcile = true`.
@@ -771,7 +971,7 @@ subtables are part of this section — their fields are listed here.
771
971
  | `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
972
  | `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
973
  | `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. |
974
+ | `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
975
  | `skill` | — | **required when `kind = "agent"`**, nonempty string | Installed skill name to run (e.g. a repository-authored `"verify-acceptance"`). |
776
976
  | `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
977
  | `afterReconcile` | repository: `true`; step: inherited | boolean | Step override wins over `[verify].afterReconcile`; false skips this step after reconciliation only. |
@@ -923,6 +1123,10 @@ excluded while build-owned resolutions remain visible. A miss starts no
923
1123
  command, agent, or session and records `skipped` with
924
1124
  `excluded by [verify.<step>].paths: no changed path matched <JSON paths>`.
925
1125
  Git/base failures fail closed as infrastructure rather than becoming skips.
1126
+ A `check` command receives that same base as `AB_VERIFY_BASE` (a node's is its
1127
+ integration cycle parent), so it can judge the change relative to the base.
1128
+ The variable is absent outside a build, under an older runtime, and for a leaf
1129
+ with no provisioned base; a check that needs it must handle its absence.
926
1130
 
927
1131
  Agent verifiers may also use `ab verdict pass`,
928
1132
  `ab verdict fail --report <file>`, or `ab verdict skip --reason <text>`. The
@@ -982,10 +1186,15 @@ Before releasing or replacing a build workspace, the dispatcher confirms a
982
1186
  non-destructive execution fence for the exact workspace and execution generation.
983
1187
  It preserves unpublished branch commits and distinct detached producer candidates
984
1188
  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
1189
+ readback, and records `workspace.commits-preserved` before cleanup. Where the
1190
+ forge refuses an archive ref, the head is kept as a BuildStore copy instead
1191
+ and the receipt is the decisive `workspace.commits-retained`, whose heads each
1192
+ name either `remoteRef` or `storeBase`; a head kept by neither refuses the
1193
+ release. Replacement provisioning restores those exact commits before starting
1194
+ an agent, reading archive refs from the local repository with the local-git forge
1195
+ and fetching each exact ref from the remote otherwise, and restoring store copies
1196
+ through a dispatcher-side callback on any host, so a remote guest never holds
1197
+ store credentials. A preserved
989
1198
  branch head that the build's latest 64 replaced heads cover, as the replaced
990
1199
  head itself or one of its ancestors, is kept only as archived objects: it is
991
1200
  never preserved or restored as the branch, and provisioning records the skip as
@@ -996,11 +1205,14 @@ that exists without a provisioned checkout, records `workspace.commits-lost`,
996
1205
  naming known candidates and explicitly noting that any additional unpublished
997
1206
  SHAs could not be inspected. An environment that never started executing holds
998
1207
  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
1208
+ cleanup records `workspace.commits-preserved` (or `workspace.commits-retained`)
1209
+ carrying forward earlier preserved heads, then releases and replaces it. Unknown fencing, inspection, transport, or
1001
1210
  receipt-write outcomes leave the workspace and snapshots intact. A workspace
1002
1211
  flagged by `workspace.cleanup-required` is never launched into: the dispatcher
1003
- releases it and provisions the next generation. A preservation or release
1212
+ releases it and provisions the next generation. Provisioning cut off by a
1213
+ recorded dispatcher teardown is the exception: the next invocation asks the
1214
+ provider to verify and finish the same generation, and if it cannot, the
1215
+ replacement consumes no infrastructure attempt. A preservation or release
1004
1216
  failure is recorded against its build, as an infrastructure failure or janitor
1005
1217
  attention, and never stops the dispatcher from advancing other builds.
1006
1218
  Fencing is revalidated after restart; a saved receipt alone never authorizes
@@ -1138,7 +1350,7 @@ These are the repository's roles for every build; a ticket label can select a
1138
1350
  The four primary axes, session budget, and ordered alternate list inherit independently. The reserved `default` role must explicitly name a
1139
1351
  runtime, is the raw inheritance base for every other role, and is **never
1140
1352
  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:
1353
+ with a copyable fix and all registered runtime names. Four runtimes ship:
1142
1354
  Named `[accounts]` are deployment-owned nonsecret descriptors, adopted atomically
1143
1355
  with `[roles]`. The `account` axis inherits independently on primary and alternate
1144
1356
  routes. A Claude route defaults to the sole Claude subscription account, and
@@ -1146,21 +1358,29 @@ ambiguity or incompatible runtimes fail validation. See [billing accounts](refer
1146
1358
  for provisioning, ChatGPT sign-in destinations, Kimi regions, placeholders, single-owner renewal and metadata-only hosted readiness.
1147
1359
 
1148
1360
  **`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
1361
+ `gpt-*` ids), **`pi`** (local Pi CLI 0.84.3 or newer; provider-qualified ids
1362
+ such as the independent `openai-codex/gpt-5.6-sol` route), and **`antigravity`**
1363
+ (local Antigravity CLI `agy`; unqualified `gemini-*`, `claude-*` and `gpt-*`
1364
+ slugs). Pi runs headlessly
1151
1365
  through RPC and uses that local installation's login and model catalog;
1152
1366
  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`.
1367
+ `ab models --available` filters it to configured credentials. Antigravity runs
1368
+ headless `agy` turns with the operator's ambient agy authentication (keyring
1369
+ sign-in, `GEMINI_API_KEY` with `modelProvider = "gemini"`, or ADC); Autobuild
1370
+ does not install it and has no named accounts for it. Claude, Codex and
1371
+ 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`.
1372
+ Antigravity declares no tool-free one-shot, so slug naming uses the title
1373
+ fallback and upgrade conflicts stay manual on Antigravity routes.
1155
1374
  Trusted plugins may register additional runtime names;
1156
1375
  they use the same role inheritance, default-model compatibility validation,
1157
1376
  session event attribution, and optional one-shot capability path as builtins.
1158
1377
 
1159
1378
  The pipeline resolves `plan`, `plan-review`, `implement`, `code-review`,
1160
- `finalize`, and `reconcile`, plus each **agent** verify and finalize step by
1379
+ `finalize`, `reconcile` and an optimization node's `propose`, plus each **agent** verify and finalize step by
1161
1380
  its logical step name. A verify step's configured skill name remains a
1162
1381
  deprecated alias for existing configurations and will be removed in a future
1163
- release. The repository workflow resolves `harvest` and `harvest-review`. Two
1382
+ release. The repository workflow resolves `harvest` and `harvest-review`. Each
1383
+ judge session of an optimization objective's judge panel resolves `judge`. Two
1164
1384
  non-phase judgments use the same runtime/model/args resolver: `slug` optionally
1165
1385
  proposes pre-build naming, and `upgrade` proposes a resolution only when a
1166
1386
  vendored skill merge conflicts. Both are tool-free one-shots and receive the
@@ -1201,7 +1421,9 @@ model families; all problems in `default` and every declared role are
1201
1421
  aggregated by one eager resolver construction before judgment runs. Runtime
1202
1422
  adapters reject the model and parsed protocol/output-mode options they
1203
1423
  emit: Claude rejects `-p`/`--print`, `--output-format`, and `--model`; Codex
1204
- rejects `--json` and `--model`/`-m`; Pi rejects `--mode` and `--model`. Claude
1424
+ rejects `--json` and `--model`/`-m`; Pi rejects `--mode` and `--model`;
1425
+ Antigravity rejects `-p`/`--print`/`--prompt`, `--output-format`,
1426
+ `--input-format`, and `--model`. Claude
1205
1427
  routes with a selected account additionally reject `--settings`,
1206
1428
  `--setting-sources`, and `--bare` because Autobuild owns their authentication
1207
1429
  settings. Codex routes selecting a ChatGPT subscription account additionally
@@ -1210,7 +1432,10 @@ because Autobuild owns their provider and configuration routing. This includes
1210
1432
  using `-c` to set reasoning effort. Routes without an account retain the existing
1211
1433
  argument behavior. Exact
1212
1434
  spellings, `--option=value` forms, and documented compact short aliases join
1213
- that same role-naming aggregate. Every other option passes through without
1435
+ that same role-naming aggregate. Antigravity also owns conversation
1436
+ selection: `--conversation`, `--continue`/`-c`, and `--prompt-interactive`/`-i`
1437
+ (including `=` forms) in `args` fail each turn as a configuration failure
1438
+ before `agy` launches rather than at startup. Every other option passes through without
1214
1439
  Autobuild validation, including sandbox, approval, session, tool, skill,
1215
1440
  thinking, extension, lifecycle, and unknown options, even when it supplements
1216
1441
  another adapter-emitted occurrence. Pi always
@@ -1242,7 +1467,8 @@ an alternate; only a successful primary can remain live for producer revisions.
1242
1467
  Only chain exhaustion writes the phase failure, and
1243
1468
  the final failure controls retry behavior. Substitution starts and exhausted
1244
1469
  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.
1470
+ verify/finalize, Harvest and judge sessions use the chain; tool-free one-shots
1471
+ do not.
1246
1472
 
1247
1473
  A build phase session that reaches its captured budget is aborted and ended
1248
1474
  best-effort. The kernel records retryable `phase.failed` with `phase session
@@ -1288,8 +1514,8 @@ args = ["--effort", "high"]
1288
1514
  `ab repository status` until it carries at most one. A ticket can only
1289
1515
  select a profile; it never supplies a model, runtime or argument itself.
1290
1516
  - **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
1517
+ review, implement, code review, agent verify and finalize steps, reconcile,
1518
+ and the judges of a panel run on the build) resolves through the profile read from the current configuration, so an
1293
1519
  edit reaches only the builds that selected it, at their next session.
1294
1520
  `session.started.profile` records `{ name, configured }`. If a reload removes
1295
1521
  the profile, those builds continue on the repository roles and
@@ -1297,6 +1523,10 @@ args = ["--effort", "high"]
1297
1523
  - **Validation.** Duplicate labels, a missing or blank label, and an entry
1298
1524
  whose effective runtime, model, args or account would be refused for a
1299
1525
  `[roles]` entry fail config load, `ab init --validate` and a live reload.
1526
+ Dispatch also warns at startup, never refuses, for a profile entry no build
1527
+ session requests (including `slug`, `upgrade`, `harvest` and
1528
+ `harvest-review`), a deprecated skill-name key, or deprecated `extensions`,
1529
+ naming the `[profiles.<name>.roles.<role>]` table.
1300
1530
  - **Scope.** Sessions outside a build (`slug`, `upgrade`, `harvest`,
1301
1531
  `harvest-review`) never use a profile.
1302
1532
 
@@ -1308,7 +1538,9 @@ users to move its fields to `[roles.default]`.
1308
1538
  ### `[policy]`
1309
1539
 
1310
1540
  Every field is a **positive integer** except `harvestMaxDrift`, which is a
1311
- nonnegative integer so zero can disable that trigger.
1541
+ nonnegative integer so zero can disable that trigger, and the open-PR
1542
+ backpressure keys `maxOpenPrs` (no default; unset disables backpressure),
1543
+ `resumeOpenPrs` and the boolean `excludeHeldOpenPrs`.
1312
1544
 
1313
1545
  | Field | Default | Allowed / constraints | Effect |
1314
1546
  |---|---|---|---|
@@ -1320,7 +1552,7 @@ nonnegative integer so zero can disable that trigger.
1320
1552
  | `maxVerifyAttempts` | `3` | positive integer | Caps distinct failed verify cycles since the latest spec revision; passed and skipped cycles cost zero. |
1321
1553
  | `maxDispatchAttempts` | `3` | positive integer | Caps consecutive dispatch failures before a setup-targeted `dispatch-failure-limit` escalation. |
1322
1554
  | `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. |
1555
+ | `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
1556
  | `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
1557
  | `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
1558
  | `harvestThreshold` | `5` | positive integer | Newly unclaimed `observation.recorded` occurrences required to start one repository harvest run. |
@@ -1330,6 +1562,9 @@ nonnegative integer so zero can disable that trigger.
1330
1562
  | `nodeIdlePollSeconds` | `120` | positive integer | Interval between idle node checks; durable activity wakes the next tick. |
1331
1563
  | `janitorBackoffMaxSeconds` | `300` | positive integer | Cap on exponential janitor retry delay, starting at 30 seconds. |
1332
1564
  | `harvestMaxDrift` | `3` | nonnegative integer | Other builds merged after the oldest unclaimed observation required to start a run; `0` disables drift. |
1565
+ | `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. |
1566
+ | `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`. |
1567
+ | `excludeHeldOpenPrs` | `false` | boolean | Leave PRs whose active landing command is `hold` out of the count. Inert without `maxOpenPrs`. |
1333
1568
 
1334
1569
  Dispatch failures share one budget across stages until runner attachment. At
1335
1570
  exhaustion dispatch parks durably; bare `ab answer <slug>` and text guidance
@@ -1362,8 +1597,9 @@ own-build-read deferral and its answer resets no phase failures; reconcile no-pr
1362
1597
  while `round` remains occurrence scope. Answering a runner-failure cause re-arms
1363
1598
  only its matching phase and round. The phase-level `verify-failure-limit` cause
1364
1599
  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.
1600
+ `reconcile-no-progress`, `publication-retry-limit`, `wait-unresolvable`,
1601
+ `measurement-failed`, `target-rewritten` and the setup-only cause reset no
1602
+ phase-runner failures.
1367
1603
  The closed cause map forces every future policy condition to choose one of these
1368
1604
  semantics instead of inheriting behavior from a missing `round`. Runner failures
1369
1605
  while checking progress or refreshing the base therefore remain counted after a
@@ -1404,19 +1640,20 @@ state eligible.
1404
1640
  | Field | Default | Allowed / constraints | Effect |
1405
1641
  |---|---|---|---|
1406
1642
  | `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. |
1643
+ | `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
1644
  | `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
1645
  | `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
1646
  | `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
1647
  | `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"`. |
1648
+ | `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
1649
  | `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
1650
  | `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
1651
  | `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
1652
  | `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. |
1653
+ | `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
1654
  | `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
1655
  | `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. |
1656
+ | `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
1657
  | `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
1658
 
1422
1659
  `readyLabels` is the only source-aware readiness default. Dispatch resolves it
@@ -1431,8 +1668,10 @@ as follows:
1431
1668
 
1432
1669
  An explicit `readyLabels` value always wins for every source.
1433
1670
 
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
1671
+ `proposalState` is the one supported way to waive the grooming gate for
1672
+ harvest, and it is deliberately not `triageState`. (An optimization node's
1673
+ attempts are the only other generated work that reaches ready: grooming the
1674
+ node's objective and budget is their dispatch decision.) Do not suggest pointing `triageState` at the
1436
1675
  ready state to get auto-dispatched proposals: `triageState` is also where a
1437
1676
  spec-gate bounce merges, so a nonconforming ticket would be claimed, bounced,
1438
1677
  and reclaimed on every tick. `proposalState` moves only what harvest files.
@@ -1450,6 +1689,10 @@ Cross-field rules, each an **error**:
1450
1689
  `linear`, or a plugin source without the `assignees` capability), the same
1451
1690
  way. `ab init --validate` also reports a `"me"` whose credential has no user
1452
1691
  and a user who can't be assigned issues in the repository.
1692
+ - A `createLabels` entry a builtin source reserves: on `github` an
1693
+ `autobuild:<state>` label (the `autobuild:proposal` and `autobuild:aborted`
1694
+ markers are allowed), an `autobuild-link:` label, or `node`; on `linear`,
1695
+ `node`. A live reload that adds one is rejected.
1453
1696
  - `source = "file"` with `teamKey` or `claimedState` set. `dir` is **optional**
1454
1697
  here — absent means the default above, which is why the schema leaves it
1455
1698
  optional rather than giving it a `.default()`: that is what keeps the
@@ -1496,13 +1739,20 @@ issue on GitHub returns it to triage: the first read strips a stale pre-reopen
1496
1739
  state label. That check reads the issue's last 100 label and reopen events, so
1497
1740
  an issue whose deciding event is older is excluded with a diagnostic until its
1498
1741
  state label is removed and re-added. Blockers are native GitHub issue
1499
- dependencies; a blocker in another repository never resolves. The ticket's own
1742
+ dependencies; a blocker in another repository never resolves. Blocker reads use
1743
+ the dependency list, not GitHub's lagging dependency summary, except broad
1744
+ listings and export, which can miss a blocker recorded seconds earlier. Claim
1745
+ re-reads blockers and leaves a ticket whose blocker was added after the
1746
+ dependency check ready for the next scan, and a ready-bound create with
1747
+ blockers opens in triage and moves to ready only after every blocker is
1748
+ recorded. The ticket's own
1500
1749
  issue is always a `closes` link. Links to other issues show on GitHub as
1501
1750
  `autobuild-link:<intent> #<n>` labels, one repository label per linked issue
1502
1751
  and intent, never deleted when unused; state and link labels are never ticket
1503
1752
  labels, and writes naming them are refused. The `autobuild:proposal` and
1504
1753
  `autobuild:aborted` labels that harvest and abort apply are ordinary labels,
1505
- so `proposal` and `aborted` cannot be states. Dispatcher notices post as issue
1754
+ so `proposal` and `aborted` cannot be states. Creation labels are ordinary
1755
+ labels too, created on demand like any other. Dispatcher notices post as issue
1506
1756
  comments, but tickets carry no comment history, so `ab ticket show` lists none;
1507
1757
  export and import read it explicitly.
1508
1758
  Assets live in the BuildStore. A node is an issue with the exact `node` label,
@@ -1514,7 +1764,10 @@ import remaps every id to a new issue number (see the
1514
1764
  [ticket migration procedure](references/ticket-migration.md)). Dispatcher reads are conditional requests whose validators
1515
1765
  live under the local state root and are evicted after 7 days unused, so an
1516
1766
  unchanged repository costs a tick no primary rate-limit budget. Rate limits
1517
- surface as the ticket-source rate-limit error. A keyed create needs
1767
+ surface as the ticket-source rate-limit error. Each search page is one GitHub
1768
+ search API request on its own 30-per-minute quota; exhausting that quota
1769
+ refuses only searches until its reset, while a secondary rate limit pauses the
1770
+ whole source, like any other GitHub request. A keyed create needs
1518
1771
  `idempotencyKeyReservedAt`, the earliest time the key could first have been
1519
1772
  used; harvest supplies it. Drive all of it through `ab ticket`, never by
1520
1773
  hand-editing state or link labels.
@@ -1543,15 +1796,22 @@ environment variable instead and say why.
1543
1796
  ### `[orchestrator]`
1544
1797
 
1545
1798
  Enables credential-free sandbox environments per session owner and repository,
1546
- driven by external agents through `sandbox.*` tools. Operators run in external
1799
+ driven by external agents through `sandbox.*` tools: `sandbox.open`,
1800
+ `sandbox.status`, `sandbox.close` and `sandbox.refresh` manage the
1801
+ environment's lifecycle, and the remaining tools work inside it. Operators run in external
1547
1802
  harnesses; the service never starts or resumes them. The table is strict and
1548
1803
  restart-classified.
1549
1804
 
1550
1805
  | Field | Default | Allowed / constraints | Effect |
1551
1806
  |---|---|---|---|
1552
- | `enabled` | `false` | boolean | Enables external sandbox tools, archive cleanup and dispatcher idle settlement. |
1807
+ | `enabled` | unset: on when hosted, off locally | boolean | Enables external sandbox tools, archive cleanup and dispatcher idle settlement. An explicit value wins on every host. |
1553
1808
  | `sandbox` | — | strict subtable | The sandbox behavior knobs; absence reads as the defaults below. |
1554
1809
 
1810
+ Unset `enabled` resolves per host: a hosted deployment serves the sandbox tools,
1811
+ while local `ab mcp`, dispatch and `ab init` leave them off. Dispatcher releases
1812
+ older than this default deposit an explicit `enabled = false`, so their
1813
+ projects stay off until they upgrade.
1814
+
1555
1815
  The removed runner settings `model`, `invocationBudgetSeconds`, `approvals` and
1556
1816
  repository-default `wake` are rejected in new config. Historical effective
1557
1817
  config artifacts remain readable. New sessions have no inherited wake settings;
@@ -1561,7 +1821,7 @@ explicit session wake writes are durable facts and do not execute turns.
1561
1821
 
1562
1822
  | Field | Default | Allowed / constraints | Effect |
1563
1823
  |---|---|---|---|
1564
- | `idleMinutes` | `30` | positive integer | Minutes without a sandbox tool call after which the dispatcher tick's janitor stops the environment, keeping its snapshot; the next tool call resumes it. |
1824
+ | `idleMinutes` | `30` | positive integer | Minutes without a sandbox tool call after which the operator sandbox stops, keeping its snapshot; a later sandbox.open resumes it. On vercel-sandbox the provider's own timer stops it, and every tool call extends that timer, so no dispatcher tick is needed; the dispatcher tick's janitor also stops an environment whose journal evidence is older, so it is no longer the only idle stop. |
1565
1825
  | `environmentVariables` | `[]` | array of nonblank names | Names of non-secret host variables forwarded into the sandbox — the only non-toolchain environment it ever sees, during provisioning/setup and tool exec/start alike. Unset means none. |
1566
1826
 
1567
1827
  The credential-free rule is structural, not advisory: the environment receives
@@ -1571,19 +1831,58 @@ no store, forge, ticket-provider, or model credential, and naming any of
1571
1831
  `AI_GATEWAY_API_KEY` in `environmentVariables` is a config error. The typed
1572
1832
  operator tools remain the only route to build state from inside the sandbox.
1573
1833
 
1574
- Tool bounds an operator agent should know: `sandbox.exec` waits at most **300
1575
- seconds**; stdout and stderr are each truncated at **65,536 bytes** with a
1834
+ Lifecycle an operator agent should follow:
1835
+
1836
+ - **Open, then poll.** `sandbox.open` returns at once with state
1837
+ `provisioning`, `resuming`, `ready` or `failed`; provisioning runs in the
1838
+ background of the serving process. On vercel-sandbox the slow tail
1839
+ (dependency install, runtimes, setup) runs detached inside the sandbox, so
1840
+ it is not bound by the serving request. Poll `sandbox.status` (safe to
1841
+ repeat; it also reports the checkout head and the recorded base head) until
1842
+ it reports `ready`. Its only write records a finished attempt's outcome,
1843
+ exactly once, whichever process observes it.
1844
+ - **Not ready refuses.** Until then `sandbox.exec`, `start`, `read_file`,
1845
+ `write_file`, `publish` and `refresh` refuse with code `sandbox-not-ready`
1846
+ and a `state` field (`absent`, `provisioning`, `resuming`, `stopped` or
1847
+ `failed`); none of them provisions. A `failed` status carries the failing
1848
+ stage and a redacted message; open again to retry.
1849
+ - **Close keeps work.** `sandbox.close` stops the environment and its detached
1850
+ commands, releases provider capacity and keeps the checkout; a later
1851
+ `sandbox.open` resumes it. Closing nothing succeeds and does nothing.
1852
+ - **Refresh is not destructive.** `sandbox.refresh` fast-forwards a clean
1853
+ checkout to the current base-branch head and records it as the publication
1854
+ base. A dirty checkout refuses with `sandbox-refresh-dirty`, a diverged one
1855
+ with `sandbox-refresh-diverged`, and a refusal changes nothing.
1856
+ - **Reset is.** `sandbox.reset` discards everything and re-provisions from the
1857
+ current base head in the background, returning the `sandbox.open` result;
1858
+ poll `sandbox.status` again.
1859
+ - **Idle stops.** An idle environment stops after `idleMinutes` without a
1860
+ sandbox tool call, keeping its checkout. On vercel-sandbox the provider's
1861
+ own timer stops it and every tool call extends that timer, so no dispatcher
1862
+ tick is needed; the dispatcher janitor is a second stop, no longer the only
1863
+ one. A stopped environment refuses tools with `sandbox-not-ready` (`stopped`)
1864
+ until `sandbox.open` resumes it with its committed and uncommitted work
1865
+ intact. `sandbox.status` never resumes it, so a failure recorded inside a
1866
+ stopped sandbox surfaces through the next `sandbox.open`, which reports it
1867
+ with its original stage. A failed environment is kept (stopped by its timer
1868
+ or `sandbox.close`) until the next `sandbox.open` records the failure and
1869
+ re-provisions; if that record cannot be written, open refuses with "nothing
1870
+ was discarded; call sandbox.open again".
1871
+ - A workspace provider without this lifecycle answers `sandbox.open`,
1872
+ `status`, `close`, `refresh` and `reset` with code `sandbox-unsupported`.
1873
+
1874
+ Tool bounds: `sandbox.exec` waits at most **300 seconds**; stdout and stderr
1875
+ are each truncated at **65,536 bytes** with a
1576
1876
  `[truncated by autobuild: output exceeded 65536 bytes]` marker; `sandbox.reset`
1577
- and archiving a session owner's last session are **destructive** (reset re-provisions
1578
- from the current base head); there is at most **one** environment per session owner
1579
- and repository.
1877
+ and archiving a session owner's last session are **destructive**; there is at
1878
+ most **one** environment per session owner and repository.
1580
1879
 
1581
1880
  Publication: `sandbox.publish` takes a title (1–200 characters), an optional
1582
1881
  body (≤65,536 characters), and an optional explicit commit, and takes your
1583
1882
  sandbox's current head commit to a pull request. It refuses when the checkout
1584
1883
  has uncommitted changes — tracked or untracked (the sandbox's own provisioning
1585
1884
  marker is excluded) — and when the commit is not a descendant of the base head
1586
- recorded when the sandbox was provisioned or last reset — a pre-existing environment without a recorded
1885
+ recorded when the sandbox was provisioned, last refreshed, or reset — a pre-existing environment without a recorded
1587
1886
  base head asks you to run `sandbox.reset` first. The rule is PR only, never the
1588
1887
  base branch: the sandbox itself never pushes and holds no credential — the push
1589
1888
  and the PR creation are kernel plumbing through the workspace provider's
@@ -1592,6 +1891,37 @@ repository, so a later publish updates the same PR's head. A publication is a
1592
1891
  repository-journal fact naming the session owner (the `operator` field), the session, the branch, the
1593
1892
  commit, and the PR; a refused or failed attempt is journaled too.
1594
1893
 
1894
+ Where the tools are served:
1895
+
1896
+ - **Local `ab mcp`** reads the checkout's config at startup. It lists the
1897
+ `sandbox.*` tools only when `[orchestrator] enabled = true` and the backend
1898
+ builds; `sandbox.publish` also needs a forge and provider publication.
1899
+ - **Hosted `/mcp`** lists every `sandbox.*` tool whenever the deployment can
1900
+ host operator sandboxes. Each call is checked against the repository's latest
1901
+ deposited effective config and refused with a typed code that names the
1902
+ reason:
1903
+
1904
+ | Code | Reason |
1905
+ |---|---|
1906
+ | `sandbox-orchestrator-disabled` | The latest effective config sets `enabled = false` (older releases write it explicitly). |
1907
+ | `sandbox-no-effective-config` | No dispatcher has deposited an effective config for the repository. |
1908
+ | `sandbox-effective-config-invalid` | The latest deposited effective config cannot be read. |
1909
+ | `sandbox-credentials-missing` | The project's provider cannot host a sandbox and the deployment lacks Vercel or forge credentials; the message names which. |
1910
+ | `sandbox-backend-unavailable` | The sandbox backend could not be built. |
1911
+
1912
+ A new deposit takes effect on the next call. Only `vercel-sandbox` can host
1913
+ a sandbox on a deployment, so a project with any other workspace provider,
1914
+ such as `git-worktree` dispatched locally, gets one from the deployment's
1915
+ Vercel Sandbox provider. That needs the deployment's Vercel credential and
1916
+ `GITHUB_TOKEN` or `GH_TOKEN`. The forge token is the git read credential,
1917
+ injected only by the host-side egress transform on upload-pack requests; the
1918
+ guest never sees it. `sandbox-not-ready` applies here as it does locally;
1919
+ the Vercel Sandbox provider implements the whole lifecycle, so
1920
+ `sandbox-unsupported` does not arise on a deployment.
1921
+ - **A hosted per-repository URL** (`/mcp/<host><path>`) lists `sandbox.*` only
1922
+ when that repository's latest deposited effective config enables
1923
+ `[orchestrator]`. Calls keep the same typed codes.
1924
+
1595
1925
  ### `[upgrade]`
1596
1926
 
1597
1927
  | Field | Default | Meaning |
@@ -1682,13 +2012,13 @@ repo path, needs no `AB_*` environment, and is safe to re-run. It:
1682
2012
 
1683
2013
  - Probes every registered runtime and reports whether it is usable, including a
1684
2014
  diagnostic reason. Setup launch selection uses the fixed product order
1685
- `claude`, `codex`, then `pi`; it never depends on repository content or a user
2015
+ `claude`, `codex`, `pi`, then `antigravity`; it never depends on repository content or a user
1686
2016
  questionnaire.
1687
2017
  - If config is absent, writes a valid stack-neutral skeleton with empty
1688
2018
  `[commands]`, no verify or finalize steps, a valid local ticket gate, and one
1689
2019
  explicit runtime solely as a schema placeholder. It reads no package or
1690
2020
  language manifest and invents no command.
1691
- - Vendors 12 skills before handoff, including the locally editable
2021
+ - Vendors 14 skills before handoff, including the locally editable
1692
2022
  [repository setup reference](references/setup.md) in the installed `ab-guide`
1693
2023
  tree. On an interactive terminal it starts the selected coding-agent CLI in
1694
2024
  the target repository with a short prompt to read that reference and
@@ -1864,26 +2194,90 @@ By default, each Git repository owns one self-contained state tree at
1864
2194
 
1865
2195
  - `autobuild.sqlite` — build records, event logs, and repository journals.
1866
2196
  - `blobs/` — content-addressed artifacts.
1867
- - `worktrees/` — autobuild-created Git worktrees.
1868
2197
  - `tickets/` — the default location for the `file` ticket source.
1869
2198
 
2199
+ Build worktrees live outside the checkout, so tools that walk parent
2200
+ directories for `node_modules` never reach the checkout's packages. A state
2201
+ tree outside the checkout keeps them in its own `worktrees/`. Otherwise they
2202
+ go to `$XDG_STATE_HOME/autobuild/worktrees/<checkout>-<hash>/`, which defaults
2203
+ to `~/.local/state/…`. The destination is checked on real paths: it must not
2204
+ resolve inside the checkout, and no directory from it up to `/` may hold
2205
+ `node_modules`. When the check fails, each new build fails to provision with an
2206
+ error naming the remedy, and dispatch shows the same message as a startup
2207
+ notice. Builds already in a worktree continue and release. Builds whose
2208
+ worktree is still at the old `<main-repo>/.autobuild/worktrees/` location
2209
+ resume, clean up and release in place; nothing new is created there.
2210
+
1870
2211
  The main checkout comes from Git's absolute repository/worktree topology, not
1871
2212
  blindly from the current worktree's top level or the parent of its Git common
1872
2213
  directory. Commands run in an autobuild-created linked worktree therefore read
1873
2214
  the main checkout's state and file tickets, while submodules and
1874
2215
  separate-Git-dir checkouts keep distinct roots beneath their own working trees.
1875
- There is no home-directory fallback: a repository with no state tree starts
1876
- empty.
2216
+ Store state has no home-directory fallback: a repository with no state tree
2217
+ starts empty.
1877
2218
 
1878
2219
  Every command uses the same precedence: explicit `--store <ref>` > nonempty
1879
2220
  `AB_STORE` > `[store] url` > `<main-repo>/.autobuild`. Relative local overrides are normalized
1880
2221
  against the main checkout. A local override relocates the whole state tree,
1881
- including `worktrees/` and default file tickets; an explicit `[tickets].dir`
1882
- remains repo-relative. An HTTP(S) URL still selects the remote store unchanged,
1883
- while worktrees and default file tickets remain under the repository-default
1884
- `.autobuild/` directory. The dispatcher passes its normalized selection to
2222
+ including default file tickets, and build worktrees follow it when it lies
2223
+ outside the checkout; an explicit `[tickets].dir` remains repo-relative. An
2224
+ HTTP(S) URL still selects the remote store unchanged, while default file
2225
+ tickets remain under the repository-default `.autobuild/` directory and build
2226
+ worktrees use the state-home location. The dispatcher passes its normalized selection to
1885
2227
  every agent session as `AB_STORE`.
1886
2228
 
2229
+ ### Repository agent context
2230
+
2231
+ Every dispatcher, in checkout or origin mode, keeps one record of the
2232
+ repository's agent context at the base-branch head in the store. It reads the
2233
+ tree through the forge (`git` for `local-git`, the Git Data API for GitHub), so
2234
+ both modes record identical content for the same commit. The record names its
2235
+ base commit and captures:
2236
+
2237
+ - **Skills.** Every skill directory under `.agents/skills/` and
2238
+ `.claude/skills/` that holds a `SKILL.md`, with all its files. A skill present
2239
+ in both, symlinked or byte-identical, appears once with every install path.
2240
+ Repository-local skills without the `ab-` prefix are included; dot-directories
2241
+ such as `.ab-pristine` are not.
2242
+ - **Agent instructions.** Every `AGENTS.md` and `CLAUDE.md`, root and nested,
2243
+ each with its directory. In one directory the two collapse into one entry
2244
+ when they are the same file or identical.
2245
+ - **Imports.** Files the instructions import by `@path`, resolved relative to
2246
+ the importing file and followed transitively. Each is a separate entry, never
2247
+ inlined. A path outside the repository is listed as omitted.
2248
+
2249
+ | Repository artifact | Holds | Written |
2250
+ | --- | --- | --- |
2251
+ | `agent-context` | The record: gzip JSON, metadata `{ schema, commit, digest, bytes, rawBytes }` | Only when the content digest changes |
2252
+ | `agent-context-head` | Pointer: last base head handled, input fingerprint, standing diagnostic | When the base head changes |
2253
+ | `agent-context-cache.<i>` | Blob bytes an interrupted capture already fetched | Only when an invocation deadline cuts a capture short |
2254
+
2255
+ Each process reads the base head at most once a minute, always on its first
2256
+ tick. An unchanged head then costs one small pointer read per fresh process and
2257
+ no tree, blob, record or event reads. Readers take the latest `agent-context`
2258
+ revision only.
2259
+
2260
+ Two bounds apply, and each has a typed tick-report diagnostic that `ab
2261
+ dispatch` prints:
2262
+
2263
+ - `oversize`: the encoded record exceeds 2.25 MiB.
2264
+ - `raw-oversize`: the record exceeds 32 MiB uncompressed, which is also every
2265
+ reader's decode ceiling, so a published record is always readable.
2266
+
2267
+ Both name the bound and the largest contributors. They, and `tree-unlistable`
2268
+ (the forge cannot list one directory completely), keep the last good revision
2269
+ and are reported once per base head. `capture-failed` is retried after five
2270
+ minutes, or as soon as the base head moves, and reported once per distinct
2271
+ failure; `unavailable` means the forge cannot read trees.
2272
+
2273
+ All three kinds are retention-managed like the dispatcher config artifacts: the
2274
+ newest 200 revisions of each kind survive (`AB_ARTIFACT_RETENTION_MAX_REVISIONS`
2275
+ overrides the bound). The dispatcher only writes the record. Connected agents
2276
+ read it through the `context.list` and `context.read` operator tools, the MCP
2277
+ prompt named for each skill, and the agent-context section of the MCP server
2278
+ instructions; see [Serving the operator tools over
2279
+ MCP](#serving-the-operator-tools-over-mcp).
2280
+
1887
2281
  ### Several dispatchers on one repository
1888
2282
 
1889
2283
  One repository driven by several dispatchers — for example each engineer
@@ -1902,8 +2296,12 @@ dispatchers but not store-owned state. Separate local stores each see only their
1902
2296
  API show only the local store's builds.
1903
2297
  - **Branch collisions are only partly guarded.** A dispatcher skips any slug
1904
2298
  whose `ab/` or `ab-node/` branch already exists on the remote (when its forge
1905
- supports `remoteBranchExists`), but two stores that claim the same name
1906
- before either pushes can still collide.
2299
+ supports `remoteBranchExists`) or locally in its checkout (when its workspace
2300
+ provider, such as git-worktree, supports `localBranchExists`), but two stores
2301
+ that claim the same name before either pushes can still collide. A leaf
2302
+ build's first provision never adopts an existing branch: it cuts from the
2303
+ base and keeps the old tip under `refs/autobuild/displaced/<branch>/<sha>`.
2304
+ A node's branch, which the kernel opens before any provision, is its own.
1907
2305
 
1908
2306
  ## Connect a project
1909
2307
 
@@ -2005,6 +2403,16 @@ provider-specific API/MCP calls:
2005
2403
  no filters it uses exactly dispatch's configured ready state and source-aware
2006
2404
  default labels. If either filter is present, only explicitly supplied
2007
2405
  criteria apply; every requested label must match.
2406
+ - `ab ticket search <query> [--state <state>] [--labels a,b] [--limit <n>] [--cursor <cursor>] [--json]`
2407
+ finds tickets whose title or body contains every query word,
2408
+ case-insensitively, in every state unless `--state` is given; check it for
2409
+ duplicates before `create`. `--limit` (default 20, at most 100) sizes a page
2410
+ and `--cursor` continues from the previous page's cursor. `--json` emits
2411
+ `{tickets, cursor?, diagnostics}`, identical to MCP `tickets.search`. Sources
2412
+ without search exit nonzero naming themselves and list nothing. The file,
2413
+ hosted, Linear and GitHub sources search; GitHub matches whole words through
2414
+ GitHub issue search. The hosted source refuses against a service predating
2415
+ search.
2008
2416
  - `ab ticket show <id> [--json]` reads one complete ticket. Human output includes
2009
2417
  labeled metadata and the body verbatim, so it can read a stored spec back.
2010
2418
  - `ab ticket move <id> (<state> | --role triage|ready|backlog|rejected) [--json]`
@@ -2042,12 +2450,17 @@ to a ticket that has already been claimed into a build does not stop that build.
2042
2450
  For dependent tickets, follow the
2043
2451
  [safe blocker-filing workflow](references/ticket-dependencies.md): determine the
2044
2452
  intended final destination, stage outside ready, verify all blocker relationships,
2045
- and move to ready last. Direct Linear and GitHub create the issue and its blockers
2453
+ and move to ready last. Direct Linear creates the issue and its blockers
2046
2454
  in separate requests; one `create --blocked-by` call is not atomic publication.
2455
+ GitHub stages a ready-bound create in triage itself and publishes it to ready
2456
+ after recording every blocker.
2047
2457
  Harvest's creation reservations cover Harvest only, not interactive CLI creates.
2048
2458
  Dependency order and JSON id extraction are still required, but do not alone
2049
2459
  prevent an active dispatcher from claiming a partially created ready ticket.
2050
2460
 
2461
+ On create, `--labels` is unioned with `[tickets].createLabels`: the configured
2462
+ labels are added after the named ones, never replaced. `ab ticket import`
2463
+ keeps the exported labels and never adds them.
2051
2464
  Update is partial: omitted fields remain untouched, including labels, assignee,
2052
2465
  and provider metadata. `--labels` is a complete replacement and an explicitly
2053
2466
  empty value (`--labels ''`) clears the list. `--issues` records the forge issues
@@ -2059,8 +2472,12 @@ when it claims the ticket and turns them into PR and commit keywords; see
2059
2472
  complete replacement and `--issues ''` clears it. A source that cannot store
2060
2473
  issue links refuses any write naming them, names itself, and writes nothing.
2061
2474
  `--priority urgent` makes the dispatcher claim the ticket before normal ready
2062
- work, each class in source order; blockers and every other gate still apply,
2063
- and it never preempts a running build. `--priority normal` (the default)
2475
+ work, each class in source order, and ahead of normal builds waiting for a
2476
+ slot; blockers and every other gate still apply, and it never preempts a
2477
+ running build. The claimed build keeps that priority; `ab priority <slug>
2478
+ urgent|normal` changes an existing build's priority without touching its ticket.
2479
+ An optimization attempt ignores its ticket's priority and claims at its node's
2480
+ current priority. `--priority normal` (the default)
2064
2481
  removes urgency. The file, hosted and Linear sources store priority (Linear as
2065
2482
  its native Urgent; `normal` clears only Urgent and leaves other Linear priorities
2066
2483
  alone); plugin sources without the capability read every ticket as normal,
@@ -2093,7 +2510,7 @@ subcommands accept `--json`, which emits one bare JSON value and no prose: a
2093
2510
  `Ticket[]` for `list`, and the complete resulting `Ticket` for `create`,
2094
2511
  `update`, `block`, `unblock`, `show`, or `move`.
2095
2512
 
2096
- 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.
2513
+ 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.
2097
2514
 
2098
2515
  ### Ticket assets
2099
2516
 
@@ -2104,16 +2521,20 @@ assets composed with legacy BuildStore attachments. Sources without native asset
2104
2521
  use the BuildStore. Existing service assets need no migration. Old local hosted-ticket
2105
2522
  assets are not moved and are not a fallback. Each has a kind and a name.
2106
2523
 
2107
- - `ab ticket attach <id> <kind> <path> [--name <name>] [--json]` stores `<path>`
2524
+ - `ab ticket attach <id> <kind> <path> [--name <name>] [--json]`
2525
+ (`tickets.asset.attach`) stores `<path>`
2108
2526
  (default name: its basename). Attaching the same kind and name again makes a
2109
2527
  new revision; earlier ones stay retrievable. Over the store's size limit
2110
2528
  (25 MiB by default, lower when the instance advertises a request ceiling) it is refused. Attach and
2111
2529
  remove leave a note on the ticket naming the asset.
2112
2530
  - `ab ticket show <id>` lists the current assets; with `--json` the ticket
2113
- gains an `assets` array.
2114
- - `ab ticket asset get <id> <kind> <name> <dest> [--rev <n>]` downloads the
2115
- exact bytes of the latest (or given) revision; `ab ticket asset rm <id> <kind>
2116
- <name>` drops it from the current assets.
2531
+ gains an `assets` array, as does `tickets.get`.
2532
+ - `ab ticket asset get <id> <kind> <name> <dest> [--rev <n>]`
2533
+ (`tickets.asset.get`) downloads the exact bytes of the latest (or given)
2534
+ revision; `ab ticket asset rm <id> <kind> <name>` (`tickets.asset.remove`)
2535
+ drops it from the current assets.
2536
+ - The operator tools carry bytes as base64 under the same rules, limits and
2537
+ notes; see the [operator API](references/operator-api.md#ticket-assets).
2117
2538
  - **Frozen at claim.** A claim pins the current revisions into the build.
2118
2539
  Hosted revisions are copied into immutable snapshots in the build store,
2119
2540
  preserving revision numbers and allowing reads without the ticket service.
@@ -2221,8 +2642,8 @@ Humans may run `ab dispatch --viewer` from a local checkout to watch dispatch
2221
2642
  elsewhere without taking a lease or starting any dispatch work. The optional
2222
2643
  `--dispatched-by <label>` is descriptive input: every frame shows `viewer` or
2223
2644
  `viewer · dispatched by <label>`. Plain/non-TTY output prints the same at startup
2224
- and emits state changes. `--once` reads one snapshot; `--interval <s>` sets the
2225
- viewer polling cadence. Startup intake flags and explicit `--repository` are
2645
+ and emits state changes; with `--web` it prints only the web UI's URL. `--once`
2646
+ reads one snapshot; `--interval <s>` sets the viewer polling cadence. Startup intake flags and explicit `--repository` are
2226
2647
  rejected. With no recorded dispatcher run the viewer says no dispatcher has run
2227
2648
  for this project yet; with a run whose effective configuration is not yet
2228
2649
  durable it waits.
@@ -2267,7 +2688,7 @@ verification progress or failure and the merge mode in parentheses. Before
2267
2688
  a policy decision, label-dependent modes may read `policy pending`. A current
2268
2689
  verified node adds `verified`. Only restack conflicts, current verification
2269
2690
  failures (file a repair child targeting the node), a node waiting for a runner
2270
- slot ahead of new ticket claims, and readiness awaiting consent add a list
2691
+ slot ahead of normal ticket claims, and readiness awaiting consent add a list
2271
2692
  alert. Consent names `l` and `ab merge <slug>`. Branch,
2272
2693
  restack state and conflicting files remain in detail, along with every child's
2273
2694
  ticket id, title and live phase (or queued/merged), open-first counts, verification
@@ -2393,7 +2814,7 @@ Without a live agent, acknowledgement still waits for a safe boundary. During
2393
2814
  that window `p` appends
2394
2815
  the opposing resume request, cancels the stale pause, and projects the build
2395
2816
  back to `RUNNING`. The cancelling resume holds back nothing, including merge
2396
- readiness. An acknowledged paused build offers only `r resume` and reads
2817
+ readiness and janitor retry backoff. An acknowledged paused build offers only `r resume` and reads
2397
2818
  `RESUMING` until the kernel acknowledges that request; there is no gesture to
2398
2819
  cancel a pending resume. Blocked takes visual precedence, including when the
2399
2820
  build is also operator-paused, and `r` opens the existing feedback field. Keys
@@ -2427,7 +2848,9 @@ Intake off skips only new ticket claims while janitor, stale-runner, harvest,
2427
2848
  and in-flight work continue — it deliberately does **not** set the repository
2428
2849
  hold, so a build the repository has already accepted still starts and finishes.
2429
2850
  Every dispatcher samples the current value on each tick, so a change in one
2430
- process gates all dispatchers for that repository.
2851
+ process gates all dispatchers for that repository. Intake is not the only way
2852
+ to claim a ticket: `ab start <ticket-id>` asks the running dispatcher to claim
2853
+ one named ticket whether or not intake is on (see the controls table below).
2431
2854
 
2432
2855
  The repository hold has no launch flag and no setter of its own: `p` and `r` on
2433
2856
  the dashboard's global row and the `ab pause --all` / `ab resume --all` walk
@@ -2443,10 +2866,14 @@ No rules means leaf auto / node consent. There is no claim-time default
2443
2866
  seeding or fan-out over existing builds. `ab merge <slug>` supplies consent to
2444
2867
  that merge and frozen destination; it survives replacement heads until hold
2445
2868
  or completion, except that consent given under a rule with `paths` or `within`
2446
- predicates is revoked (`landing.consent-revoked`) when a reconcile's own edits
2447
- touch a file those predicates match. `--head <sha>` refuses with `head-mismatch`, recording nothing,
2448
- unless `<sha>` is the current candidate head. `ab hold <slug>` suppresses policy and withdraws consent.
2449
- The old `--auto-merge` / `--no-auto-merge` flags and `ab auto-merge` command
2869
+ predicates is revoked (`landing.consent-revoked`) when a reconcile's own edits,
2870
+ or a leaf restack's generated-file regeneration, touch a file those predicates match. `--head <sha>` refuses with `head-mismatch`, recording nothing,
2871
+ unless `<sha>` is the current candidate head. `ab hold <slug>` suppresses policy and withdraws consent;
2872
+ `--reason <text>` (1–2000 characters after trimming) records why, and status, merges, builds and
2873
+ both dashboards show it until a later hold or merge replaces it.
2874
+ `ab reopen <slug>` also revokes consent (a hold stays): it sends a finished,
2875
+ unmerged leaf back to implement with feedback, or to plan with a revised spec,
2876
+ on its existing branch and PR. The old `--auto-merge` / `--no-auto-merge` flags and `ab auto-merge` command
2450
2877
  are retired and return actionable errors; use merge rules and hold/merge.
2451
2878
 
2452
2879
  Global-row `h` re-reads the repository journal and appends the existing human
@@ -2510,13 +2937,51 @@ to the build's event log and apply the same write-time checks.
2510
2937
  | 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 |
2511
2938
  | Consent to merge | `ab merge <slug> [--head <sha>] [--store <ref>]` | Select a ready build and press `l`. | `build.land-requested`, then `landing.command-acknowledged` |
2512
2939
  | Restack node | `ab restack <node> [--store <ref>]` | CLI/tool request; normal safety gates apply. | `node.restack-requested`, then `node.restack-satisfied` |
2513
- | 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 |
2940
+ | 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` |
2941
+ | 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` |
2942
+ | 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}` |
2943
+ | 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 |
2944
+ | 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. On an optimization node it also sets the tier its attempts claim in afterwards. A build priority is only `urgent` or `normal`; `ab start`'s `manual` tier is admission-only. | `build.priority-set` |
2514
2945
  | 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. |
2515
2946
  | 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. |
2516
2947
  | 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. |
2948
+ | Accept a rewritten target | `ab answer <slug> --accept-target [--store <ref>]` | CLI or MCP `builds.answer` with `resolution: accept-target`; answers only a leaf's `policy/target-rewritten` escalation, which other answer forms skip. | One `escalation.answered` with `resolution: accept-target`, then kernel `target.rewrite-recovered {recovery: accepted}` and a restack onto the current target |
2517
2949
  | 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. |
2518
2950
  | 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. |
2519
- | 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 |
2951
+ | 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 |
2952
+ | 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 |
2953
+ | 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) |
2954
+
2955
+ `ab start <ticket-id>` is for working one ticket while intake stays off — a
2956
+ single fix, or draining a backlog one ticket at a time. The id resolves through
2957
+ the configured source (an unknown ticket is refused, and GitHub `#123` and `123`
2958
+ are the same ticket); a repeat with the same priority while the request is
2959
+ pending is a no-op, and one with another priority updates the pending request.
2960
+ On its next tick with a free slot in the request's tier, the running
2961
+ dispatcher — local or hosted — claims that ticket and nothing else, through
2962
+ every ordinary gate: it must be in
2963
+ the configured ready state, meet the spec standard (a nonconforming body is
2964
+ bounced to triage as usual), have no unresolved `blockedBy` dependency and no
2965
+ active build. Dispatch labels and the ready assignee are not applied, because
2966
+ the ticket is named. Capacity and the repository pause are respected; the
2967
+ request waits for a free slot and never preempts a build, and there is no
2968
+ force. Each request settles exactly once with a dispatcher `ticket.start-settled`
2969
+ (default `ab watch` attention): `started` names the build; `already-building`,
2970
+ `blocked`, `invalid`, `missing`, `not-ready`, `terminal` and `claim-refused`
2971
+ say why it could not start. While pending, the request is listed by
2972
+ `ab repository status` with its priority; `ab start --cancel <ticket-id>`
2973
+ withdraws it.
2974
+
2975
+ `--priority` picks the request's slot-admission tier. `manual`, the default, goes
2976
+ ahead of every waiting build and ticket claim, urgent ones included. `urgent`
2977
+ waits for urgent parked work (nodes and finished or waiting builds that must
2978
+ run again), then goes ahead of urgent ready tickets and all normal work.
2979
+ `normal` waits for normal parked work and urgent claims, then goes ahead of
2980
+ normal ready tickets. A pending request reserves its slot ahead of the tiers it
2981
+ outranks until it settles or is cancelled. Every tier bypasses intake off and
2982
+ open-PR backpressure for the named ticket only, and none preempts a running
2983
+ build. The claimed build is `urgent` when the request was `urgent` and
2984
+ otherwise keeps its ticket's priority; `manual` is never a build priority.
2520
2985
 
2521
2986
  The two `--all` forms and the global-row keys are one walk behind two surfaces.
2522
2987
  The repository pause is written first and intake second, both absolutely —
@@ -2619,10 +3084,13 @@ or raises a `wait-unresolvable` escalation, whose answer routes the same way,
2619
3084
  when one is rejected or deleted. Either way the phase that declared it resumes at the same round or attempt once it
2620
3085
  holds a slot, on a checkout restacked onto the target's current head when the
2621
3086
  target moved; a reviewer's wait resumes that review round and never feeds the
2622
- next producer. Its `$AB_CONTEXT_DIR/guidance.json` carries a `wait` block
3087
+ next producer. A verify or finalize wait whose target moved and replayed
3088
+ cleanly instead re-verifies from the first step at a new attempt, because the
3089
+ old base's results no longer count. Its `$AB_CONTEXT_DIR/guidance.json` carries a `wait` block
2623
3090
  (`id`, `tickets`, `reason`, `outcome` `ended` or `refused`, `cause`,
2624
3091
  `message`), even after a bare retry or a `wait.ended`, which leave a one-line
2625
- summary as the answer. A refused wait writes the same file with the refusal.
3092
+ summary as the answer. A verifier re-run at a new attempt still receives the
3093
+ answer as guidance, without the `wait` block. A refused wait writes the same file with the refusal.
2626
3094
  In each of these routed cases, `ab context`
2627
3095
  writes the answer to `$AB_CONTEXT_DIR/guidance.json` in the build's workspace, and the
2628
3096
  receiving skill treats it as authoritative feedback for that round or attempt.
@@ -2672,7 +3140,11 @@ pending controls, merge intent and ended PRs refuse the no-escalation path.
2672
3140
  A concurrent state change refuses publication with a retry explanation;
2673
3141
  uncited artifacts are inert. Leaves still require an open escalation and
2674
3142
  restart from `plan` after any unfinished reconcile resumes under the revised
2675
- spec and its publication is confirmed.
3143
+ spec and its publication is confirmed. A settled, unmerged leaf awaiting merge
3144
+ revises without an escalation through `ab reopen`.
3145
+ A revision of an optimization node may change its `autobuild-objective` block
3146
+ but cannot remove it, and a revision of a plain node or a leaf cannot add one;
3147
+ both refusals record nothing.
2676
3148
 
2677
3149
  Every command requires an applicable target in this repository. Pause and
2678
3150
  resume require an active build; abort and hold also accept queued builds.
@@ -2701,7 +3173,8 @@ across startup, a successful attempt closes it unanswered, and a bare retry only
2701
3173
  brings the next attempt forward. Startup still recovers actionable builds and
2702
3174
  delivers pending operator commands, but it never records an answer or re-arms a budget.
2703
3175
 
2704
- Durable repository intake has launch-flag setters and a global-row toggle.
3176
+ Durable repository intake has launch-flag setters and a global-row toggle;
3177
+ `ab start` claims one ticket without changing it.
2705
3178
  Merge policy is configured through ordered rules, with per-merge hold/merge
2706
3179
  commands; no writable repository auto-merge default remains.
2707
3180
  Abort is available through both its CLI command and the confirmed build-row/detail
@@ -2728,7 +3201,9 @@ and are safe to run at any time.
2728
3201
 
2729
3202
  **`ab repository status [--json] [--store <ref>]`** reports ticket intake
2730
3203
  (`intake`, default `true`) and repository-wide pause (`paused`, default
2731
- `false`), alongside dispatcher and infrastructure status. Its historical
3204
+ `false`), alongside dispatcher and infrastructure status, plus `ticketStarts`
3205
+ (pending start requests and the most recent settlements, each with its
3206
+ `priority`) when either is nonempty. Its historical
2732
3207
  `defaultAutoMerge` field remains an inert compatibility value; it is not
2733
3208
  claim-time policy or a writable setting. Merge decisions and command state
2734
3209
  are queried on the build. A repository with no journal row uses the defaults
@@ -2739,6 +3214,11 @@ repository-local precedence. The command uses the same reducer as the
2739
3214
  dispatcher and dashboard, writes no state, claims no ticket, attaches no runner,
2740
3215
  and starts no dispatcher work. Dispatcher identity includes the held run’s recorded
2741
3216
  runtime; historical starts without metadata display `runtime unrecorded`.
3217
+ With `[policy].maxOpenPrs` configured and a dispatcher holding the
3218
+ repository, an `open-PR backpressure:` line (`capacity.backpressure` in JSON:
3219
+ `active`, `openPrs`, `maxOpenPrs`, `resumeOpenPrs`, `excludeHeld`) says whether
3220
+ normal intake is paused; the dispatcher records
3221
+ `dispatcher.open-pr-backpressure-engaged` and `-cleared` only on transitions.
2742
3222
  It also lists the latest ticket scan's ticket and dependency diagnostics
2743
3223
  (`queue:` lines, `ticketDiagnostics` and `dependencyDiagnostics` in JSON),
2744
3224
  including ready tickets whose labels select more than one role profile and
@@ -2864,8 +3344,9 @@ operator-only read (ambient phase identity fails closed).
2864
3344
  **`ab watch [<slug>...] [--repository] [--operator] [--event <glob>]... [--since <cursor>]
2865
3345
  [--timeout <dur>] [--interval <dur>] [--count <n>] [--json] [--store <ref>]`**
2866
3346
  streams matching events as they land instead of answering once. With no slug it
2867
- follows every nonterminal build in the repository — a build created while the
2868
- watch runs joins it without a restart — and naming one or more slugs watches
3347
+ follows every nonterminal build in the repository — builds that exist when it
3348
+ attaches are baselined, and a build created while the watch runs joins it
3349
+ without a restart, from its first event — and naming one or more slugs watches
2869
3350
  exactly those builds, ending the watch when all of them reach a terminal status.
2870
3351
  With no slugs the repository journal is included; named watches add it with
2871
3352
  `--repository`.
@@ -2876,16 +3357,31 @@ The default watch reports actionable conditions only:
2876
3357
 
2877
3358
  - `build.janitor-failing`: a build has failed janitor attempts for the configured attention threshold. A successful attempt clears it.
2878
3359
  - `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.
3360
+ - `dispatcher.forge-degraded`: the dispatcher's own rate-limit cooldown opened, with its reset; once per episode. Extensions marked `continued` are silent.
2879
3361
  - `dispatcher.forge-persistent`: forge degradation remains after a post-reset retry tick; recovery clears the episode.
2880
3362
 
2881
3363
  - Build `escalation.raised` or `phase.deferral-escalated`: an operator answer
2882
3364
  is required. A read deferral asks for CLI/store repair before retry or guidance.
2883
3365
  A `build.janitor-escalated` escalation needs no answer to recover; a bare
2884
3366
  retry answer only brings the next attempt forward.
2885
- - Build `landing.consent-revoked`: a reconcile's own edits touched files
2886
- protected by the `paths` or `within` rule the merge consent was given under.
3367
+ - Build `landing.consent-revoked`: a reconcile's own edits, or a leaf
3368
+ restack's generated-file regeneration, touched files protected by the
3369
+ `paths` or `within` rule the merge consent was given under.
2887
3370
  It names the matched files and the previous and new heads; the build returns
2888
3371
  to the consent queue and needs fresh consent for its new head.
3372
+ - Build `pr.checks-failed`: forge CI is failing at a finished, open leaf's
3373
+ live PR head. It names the failing checks (a preview of up to 20, and the
3374
+ total), the live head and the build's head, and fires once per head and
3375
+ failing set. `ab build status`, `ab builds`, `ab merges` and both dashboards
3376
+ show it as `ciFailure` until a successful CI read finds no failing checks on
3377
+ that head, even while some are still pending, or the PR moves to another
3378
+ head; clearing does not prove green.
3379
+ Unreadable CI is unknown, never red or green. Autobuild reports it and never
3380
+ re-runs CI or re-enters implement.
3381
+ - Build `optimization.noise-exceeded`: an optimization node's starting
3382
+ measurement found more noise than ε can resolve. It names the spread and ε;
3383
+ the node still opens. Raise `target.epsilon` with `ab objective`, or raise
3384
+ `metric.samples` (or `metric.judges` for a panel) with a spec revision.
2889
3385
  - Build `build.merge-decision`: a finalized open PR
2890
3386
  with a recorded consent decision awaiting consent, an explicit hold, a
2891
3387
  current actionable merge-gate deferral, or a landing awaiting a human merge. Policy decisions not yet recorded and
@@ -2920,6 +3416,10 @@ The default watch reports actionable conditions only:
2920
3416
  destination `state` and `role`, `requested` when an abort to ready fell back,
2921
3417
  the spec-standard parts `missing`, and the operator's `reason`. Each hand-back
2922
3418
  emits it once; moving the ticket on receipt is never overridden.
3419
+ - Repository `ticket.start-settled`: a single-ticket start request reached its
3420
+ outcome, with the request's `priority` — `started` with the build `slug`, or `already-building` (with the
3421
+ slug), `blocked`, `invalid`, `missing`, `not-ready`, `terminal` or
3422
+ `claim-refused`, with a `detail`. Each request settles once.
2923
3423
  - `dispatcher.ticket-source-persistent`: degradation past its advertised
2924
3424
  reset time, once a tick started at or after reset has completed or failed
2925
3425
  with the episode still open; crossing reset alone is silent. Without a reset,
@@ -2955,11 +3455,16 @@ have `repo` and null build/state. Source observations also report
2955
3455
 
2956
3456
  Every record carries a cursor, including timer-only records. Resuming suppresses
2957
3457
  delivered merge decisions and persistence episodes even when stream positions
2958
- did not advance. Old v1 cursors remain valid: historical eligible merge
3458
+ did not advance. A merge decision still due at the cursor, because the watch
3459
+ stopped on its event before observing it, is delivered once on resume, before
3460
+ the later events. Old v1 cursors remain valid: historical eligible merge
2959
3461
  decisions are treated as consumed; active overdue repository episodes may
2960
3462
  report because old watches had no persistence notification. Fresh attachment
2961
3463
  silently baselines historical direct events and merge decisions, but retains
2962
- active repository timers. Reconcile existing conditions through status after
3464
+ active repository timers. A no-slug watch follows each build announced in the
3465
+ journal after its position from the build's first event; cursors carry
3466
+ creations still in preparation, and a cursor from an earlier release, which
3467
+ carries none, baselines a build whose creation was selected before it. Reconcile existing conditions through status after
2963
3468
  arming the watch. Named watches still end when every named build is terminal;
2964
3469
  learn their outcomes from status reconciliation at exit.
2965
3470
 
@@ -2977,8 +3482,9 @@ record is one plain human-readable line. On every exit the last `--json` line
2977
3482
  is a bare `{"cursor": …}` object reflecting the final position even when no
2978
3483
  record matched. Cursors are opaque; resume with `--since <cursor>` and every
2979
3484
  matching event after that cursor is delivered exactly once, in per-stream
2980
- sequence order — including events that landed while no watch was running. A
2981
- cursor from a different repository or store is rejected.
3485
+ sequence order — including events that landed while no watch was running and,
3486
+ with no slugs, events of builds created after that cursor. A cursor from a
3487
+ different repository or store is rejected.
2982
3488
 
2983
3489
 
2984
3490
  Dispatcher liveness is also visible through `ab repository status --json`:
@@ -3073,8 +3579,8 @@ At least one `--for <condition>` or `--event <glob>` is required. The condition
3073
3579
  vocabulary is closed: `blocked`, `paused`, `running`, `collecting`, `done`, `aborted`,
3074
3580
  `terminal` (done or aborted), `pr=open`, `pr=merged`, `pr=closed`,
3075
3581
  `pr=conflicted`, `phase=<phase>` (a core phase — `plan`, `plan-review`,
3076
- `implement`, `code-review`, `finalize`, `reconcile` — or `verify:<step>`), and
3077
- `attention` (current failed node verification, an open escalation, janitor failure attention, or a build waiting for a merge decision). Repeatable `--event`
3582
+ `implement`, `code-review`, `finalize`, `reconcile`, `propose` — or `verify:<step>`), and
3583
+ `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`
3078
3584
  globs follow the `ab watch` rules. Multiple values are alternatives: the first
3079
3585
  one satisfied ends the wait — all `--for` values in supply order, then all
3080
3586
  globs in supply order — and the record names what matched.
@@ -3085,8 +3591,8 @@ means an open escalation exactly as everywhere else. In the manner of `kubectl
3085
3591
  wait`, a condition that already holds when the command starts returns
3086
3592
  immediately with that build's latest event (`--since` does not suppress this);
3087
3593
  otherwise the first later event whose reduction produces it ends the wait.
3088
- `attention` is also a current-state condition: current failed node verification, existing janitor failure attention, an already open escalation or
3089
- merge decision returns immediately, including with `--since`. Merge matches
3594
+ `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
3595
+ ticket wait's own, or merge decision returns immediately, including with `--since`. Merge matches
3090
3596
  use the same observation as watch. During replay, only new failed-node verification or escalation events
3091
3597
  or undelivered eligible merge decisions satisfy attention. `--event` conditions
3092
3598
  fire only on new events or a cursor-resumed backlog.
@@ -3161,7 +3667,9 @@ MCP `repository.events` is a connected agent's repository attention watch: it
3161
3667
  reads at most 256 journal positions after its cursor, with an optional wait of
3162
3668
  at most 30 seconds, and by default returns exactly the repository records this
3163
3669
  default watch reports. Its cursor advances past filtered events; omit it once
3164
- for a baseline, and treat `cursor-too-old` as above.
3670
+ for a baseline, and treat `cursor-too-old` as above. MCP `repository.attention`
3671
+ returns the current attention digest, every item naming its resolving tool,
3672
+ with the same cursor rules.
3165
3673
 
3166
3674
  **`ab harvest status [--events N] [--json] [--store <ref>]`** projects the
3167
3675
  **`ab harvest status [--events N] [--json] [--store <ref>]`** projects the
@@ -3250,6 +3758,30 @@ args = ["<install-root>/bin/ab.ts", "mcp"]
3250
3758
  The server runs until its client disconnects (stdio EOF) and needs no
3251
3759
  daemon: each client session starts one short-lived `ab mcp` process.
3252
3760
 
3761
+ ### Agent context over MCP
3762
+
3763
+ Every MCP binding (`ab mcp`, hosted `/mcp`, and the per-repository URLs) serves
3764
+ the repository's captured agent context, so a connected agent learns how to
3765
+ work without a checkout:
3766
+
3767
+ - `context.list` returns the skills (name, description, files), the agent
3768
+ instructions files with scopes and imports, the commit the record was taken
3769
+ from, and which to load before operating (`ab-operate`) and before ticket
3770
+ work (`ab-spec`, `ab-tickets`, the instructions).
3771
+ - `context.read` returns one file by path, or by a relative link with `from`.
3772
+ Skill files that mention `ab` commands start with a generated preamble that
3773
+ maps each command to its operator tool, or marks it as build-session only,
3774
+ runnable in the sandbox, or a host task for a human. Agent instructions get a
3775
+ preamble framing them as the repository's own rules, which win over
3776
+ Autobuild skills for that repository.
3777
+ - One MCP prompt per skill returns the same text as `context.read`.
3778
+ - The server instructions list each repository's skills and instructions.
3779
+ Hosted endpoints build them only for an `initialize` request: one
3780
+ latest-revision record read per repository in scope.
3781
+
3782
+ A repository with no captured record is served the canonical skills bundled
3783
+ with the serving Autobuild, and the index and every preamble say so.
3784
+
3253
3785
  ## The installed skills
3254
3786
 
3255
3787
  Each is invoked as `ab-<name>`, with its editable copy at
@@ -3267,11 +3799,13 @@ default, when you need to know what this repo's version says).
3267
3799
  | `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`. |
3268
3800
  | `ab-implement` | `implement` phase | Execute the approved plan as local commits plus deposited notes. Never pushes. |
3269
3801
  | `ab-code-review` | `code-review` phase | Fresh skeptic: review the implementation diff against spec and plan, same verdict vocabulary. |
3270
- | `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. |
3802
+ | `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. |
3271
3803
  | `ab-finalize` | `finalize` phase | Write the PR description for a green build; the kernel opens the PR. |
3804
+ | `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. |
3805
+ | `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. |
3272
3806
  | `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. |
3273
3807
 
3274
- Autobuild installs 12 skills. Everything except `ab-spec`, `ab-tickets`,
3808
+ Autobuild installs 14 skills. Everything except `ab-spec`, `ab-tickets`,
3275
3809
  `ab-guide`, and `ab-operate` carries `disable-model-invocation: true` — do not
3276
3810
  invoke a phase skill yourself, and do not remove that key to make one
3277
3811
  convenient to call. A model starting a pipeline phase by pattern-matching a
@@ -3329,8 +3863,19 @@ and `tickets.unblock` with the revision from `tickets.get` or `tickets.list`.
3329
3863
  ## Forge failure recovery
3330
3864
 
3331
3865
  Destination observation uses authoritative remote tips and fails closed on read
3332
- or ancestry errors. External rewrites retain the accepted target and raise
3333
- `target.rewritten` attention. Kernel node restacks instead require durable
3866
+ or ancestry errors. External rewrites record `target.rewritten` and retain the
3867
+ accepted target; nothing adopts them on top of existing work automatically:
3868
+
3869
+ - A leaf with no work of its own (no published head, no PR, no commits beyond
3870
+ its base) is reprovisioned from the current target by its next runner,
3871
+ without operator action (`target.rewrite-recovered`, `reprovisioned`).
3872
+ - A leaf with work raises one `policy/target-rewritten` escalation per episode
3873
+ (a run of rewrites of the same rejected base) naming that base, the new
3874
+ target head and its own commits. `ab answer <slug> --accept-target` restacks
3875
+ those commits onto the current target; `ab abort` is the other way out.
3876
+ - A node waits and raises `target.rewritten` attention once per episode.
3877
+
3878
+ Kernel node restacks instead require durable
3334
3879
  guarded publication receipts: the dispatcher proves at most 64 indexed hops per
3335
3880
  baseline and records them in `target.moved.lineage` for scoped runners. Missing
3336
3881
  proof or a longer gap still raises attention. See
@@ -3339,12 +3884,15 @@ recovery and read-cost bounds.
3339
3884
 
3340
3885
  A historical `publication.lost` does not prove that every copy of its candidate
3341
3886
  is gone. Recovery checks the exact branch and private archive refs and retained
3342
- replay objects first. An available candidate continues guarded publication.
3343
- A genuinely missing reconcile or automatic restack candidate records
3887
+ store copies first. Replay copies are read in either format (chunked manifest or
3888
+ legacy base64 pack); a thin pack whose base is missing fetches the published target
3889
+ first and applies with `git index-pack --fix-thin`. An available candidate is
3890
+ retained best effort before guarded publication continues; a refused archive does
3891
+ not block it. A genuinely missing reconcile or automatic restack candidate records
3344
3892
  `publication.candidate-retired`, abandons its obsolete request, and replays the
3345
3893
  producing operation with a fresh transaction identity. Its frozen target,
3346
3894
  reconcile occurrence or automatic trigger, cycle, and message survive. The
3347
- retired candidate is excluded from archive requirements unless independently
3895
+ retired candidate is excluded from retention requirements unless independently
3348
3896
  required by proven history. This reconstruction consumes no infrastructure
3349
3897
  attempt and no additional conflict occurrence; it needs no operator guidance.
3350
3898
  A bare retry also clears an existing infrastructure-limit escalation through
@@ -3391,6 +3939,25 @@ succeeds.
3391
3939
 
3392
3940
  A rate limit the dispatcher classifies on its own authenticated request
3393
3941
  records repository degradation with `resetAt`.
3942
+ The built-in GitHub forge also treats a successful response, 304 included,
3943
+ that reports `x-ratelimit-remaining: 0` with a future reset at most 65 minutes
3944
+ away (one hour plus five minutes of clock skew) as that quota's limit.
3945
+ The response keeps its result, and the process's next
3946
+ request for the same quota (`core`, `graphql`, …) fails as that rate limit
3947
+ without being sent, so cooldown follows the rules here without an avoidable
3948
+ refusal. Other quotas are unaffected. A missing, malformed, past or
3949
+ implausible reset enters no cooldown, and no later response clears one early:
3950
+ only the reset passing, or an explicit `forge-clear`, does. After a clear, the
3951
+ next request goes to GitHub as a probe, and an actual limit restores the
3952
+ cooldown.
3953
+ The first limit of an episode records an ordinary `dispatcher.forge-degraded`,
3954
+ which wakes `ab watch` once. A later reset inside the unexpired episode extends
3955
+ the cooldown durably as a degradation marked `continued` that wakes nothing; an
3956
+ equal or earlier reset writes nothing. A limit after the reset has passed, or
3957
+ after recovery, opens a new episode. A rate-limited or unreadable response on
3958
+ landing, gate inspection or PR polling is a typed forge failure or an unproven
3959
+ state, never "no checks", "ungated", "closed" or "merged"; merge-freshness
3960
+ inspection defers instead of recording best-effort evidence.
3394
3961
  Forge work waits during cooldown; passing the deadline permits a recovery
3395
3962
  request; a successful probe records automatic recovery. An authorized operator
3396
3963
  may explicitly override erroneous recorded state with
@@ -3444,7 +4011,15 @@ using exact-resource ETags; authenticated 304s spare the REST primary quota.
3444
4011
  Adapter caches are bounded and restart/eviction falls back to fresh reads.
3445
4012
  Writes, including Git publication and rewrites, invalidate observations before
3446
4013
  attempting the mutation so acknowledgement reads remain fresh. Leaf PR polling
3447
- keeps its existing cadence. Readiness and merge inspections remain fresh.
4014
+ keeps its existing cadence. Gate branch and rules reads, merge-freshness
4015
+ protection and rulesets, landing, retarget and auto-merge PR reads, commit and
4016
+ history reads, merge-queue activity, summary-comment listing and branch
4017
+ existence revalidate the same way. Both caches hold the raw representation and
4018
+ every caller validates it with its own schema, so consumers of one resource
4019
+ share one request and one ETag; a representation that fails validation loses
4020
+ its ETag. Reads that must be fresh, including merge inspections, still reach
4021
+ GitHub every time, conditionally when an ETag is cached. Readiness diagnostics
4022
+ and post-mutation readbacks stay unconditional.
3448
4023
 
3449
4024
  For node cadence, durable wakes, restart behavior and CLI evidence, see
3450
4025
  [node polling and status](references/integration-tree.md#polling-and-status).
@@ -3455,6 +4030,18 @@ primary quota, REST 304s and GraphQL calls. Transport failures and historical or
3455
4030
  legacy observations can remain unclassified; absent fields never imply zero.
3456
4031
  Shared requests are attributed to their first requester; cache hits count zero.
3457
4032
 
4033
+ An adapter may also report the primary rate-limit headers a response carried
4034
+ (`resource`, `limit`, `remaining`, `resetAt`), including on 304s and limited
4035
+ failures; GitHub does. No extra `/rate_limit` request is made. Tick telemetry's
4036
+ optional `rateLimits` carries the latest reading per resource with its
4037
+ `observedAt`, at most eight resources and none older than a day, across ticks
4038
+ and dispatcher restarts, so a cooldown tick with no requests still reports the
4039
+ last known quota. Secondary limits carry no headers and appear only as the
4040
+ degradation. `ab repository status` shows them as `forgeRateLimit`: each
4041
+ reading, `stale` once its window has reset (current quota unknown), and
4042
+ `paused`/`pausedUntil` while the dispatcher's rate-limit cooldown holds forge
4043
+ landing and polling. Absent fields mean unknown, never full quota.
4044
+
3458
4045
  Work target distance is advisory `target.distance` telemetry, sampled during
3459
4046
  normal target polls from exact build/target tips, never at render time. It
3460
4047
  counts destination commits absent from the build head (`BUILD..TARGET`).
@@ -3509,3 +4096,36 @@ ticket numbering from 1. Old credentials remain invalid with 401; independently
3509
4096
  repository-established requests receive 403 project not registered. See
3510
4097
  [project deletion](references/operator-api.md#permanent-project-deletion) for
3511
4098
  generation-bound preview tokens and API semantics.
4099
+
4100
+ ## Dispatcher ownership and web views
4101
+
4102
+ Read fresh `ab repository status --json` (`repository.status` for connected
4103
+ operators). `dispatcherRunning` is true for a holder, expired holder or unfinished
4104
+ handoff with a draining predecessor, including an empty drain map. Only durable
4105
+ retirement clears that evidence; missing/unreadable status fails closed for startup.
4106
+ Follow `ab-operate` boundaries: never start while running, honor repository rules,
4107
+ then the local ownership preference, or ask and offer to save it when unset.
4108
+ Agent-owned startup uses `ab dispatch --web --plain --json` and returns the URL;
4109
+ only a dispatcher this session started may be cleanly stopped on request.
4110
+
4111
+ `ab web [--json]` always permits a read-only browser surface without a dispatcher
4112
+ lease. `ab dispatch --web` serves the same UI with the dispatcher; `--plain`
4113
+ keeps the URL on stdout and diagnostics on stderr. Loopback binding is the default;
4114
+ non-loopback serving has no access control. The overview and build detail show progress,
4115
+ and each build page ends with that build's timeline. The analytics page
4116
+ (`/analytics`) shows a Gantt of builds active in a window (24 hours, 7 days,
4117
+ 30 days or all retained history), 25 to a page, on a clock or from-start axis,
4118
+ and step durations as per-run mean and percentiles or total time; outcome
4119
+ (merged or all) and kind (leaf, node or all) filters apply to both. Open tabs share refresh work;
4120
+ standalone web serving reads nothing while no browser is connected. While a tab is
4121
+ open, `ab web` starts its overview from the build roster, reading live builds and
4122
+ recently aborted builds that may still be cleaning up. It then reads only changed
4123
+ builds, and only the repository change position while idle. Analytics and
4124
+ timelines are explicit reads, fetched on load and on each filter, window or page
4125
+ change, and again for the same query only when the change position moves. A new
4126
+ analytics answer reads one rollup value, one listing page and at most 25 saved
4127
+ timelines; a build timeline not in memory reads the build and its saved timeline.
4128
+ `ab dispatch --web` shows the repository header without the overview. Its
4129
+ terminal-dashboard frames add no reads; a plain dispatcher reads one change
4130
+ position per tick while a browser is connected; analytics requests are explicit
4131
+ reads once its store is open.