@defrex/autobuild 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/README.md +6 -6
  2. package/SPEC.md +360 -229
  3. package/docs/answering-blocked-builds.md +2 -2
  4. package/docs/architecture.md +155 -45
  5. package/docs/assets/headline-wide.png +0 -0
  6. package/docs/builds.md +4 -4
  7. package/docs/cli.md +4 -4
  8. package/docs/configuration-overview.md +4 -4
  9. package/docs/configuration.md +245 -210
  10. package/docs/dispatcher-hosting.md +2 -2
  11. package/docs/dispatcher.md +1 -1
  12. package/docs/forges.md +5 -5
  13. package/docs/getting-started.md +2 -2
  14. package/docs/glossary.md +6 -6
  15. package/docs/hosted-dispatcher.md +6 -3
  16. package/docs/hosted-service.md +16 -5
  17. package/docs/integration-overview.md +15 -15
  18. package/docs/integration-tree.md +45 -38
  19. package/docs/integration.md +6 -6
  20. package/docs/mcp.md +16 -15
  21. package/docs/{landing-policy.md → merge-policy.md} +42 -24
  22. package/docs/migration-1.0.md +17 -13
  23. package/docs/operating.md +41 -18
  24. package/docs/operator-api.md +91 -15
  25. package/docs/operator-surfaces.md +8 -4
  26. package/docs/overview.md +3 -3
  27. package/docs/remote-store-protocol.md +76 -11
  28. package/docs/remote-ticket-protocol.md +1 -1
  29. package/docs/restacking.md +54 -15
  30. package/docs/setup.md +41 -6
  31. package/docs/skills.md +1 -1
  32. package/docs/spec-standard.md +6 -6
  33. package/docs/ticket-dependencies.md +7 -7
  34. package/docs/tickets.md +8 -2
  35. package/docs/troubleshooting.md +2 -2
  36. package/docs/upgrading.md +8 -3
  37. package/docs/verification.md +60 -14
  38. package/package.json +7 -5
  39. package/packages/core/src/cli/binary-direct.ts +13 -1
  40. package/packages/core/src/cli/binary-lifecycle.ts +65 -2
  41. package/packages/core/src/cli/build-control.ts +83 -28
  42. package/packages/core/src/cli/context.ts +81 -38
  43. package/packages/core/src/cli/dashboard/facts.ts +2 -1
  44. package/packages/core/src/cli/dashboard/integration-detail.ts +8 -8
  45. package/packages/core/src/cli/dashboard/integration-row.ts +40 -13
  46. package/packages/core/src/cli/dashboard/landing-display.ts +25 -0
  47. package/packages/core/src/cli/dashboard/model.ts +56 -33
  48. package/packages/core/src/cli/dashboard/poll.ts +9 -3
  49. package/packages/core/src/cli/dashboard/render.ts +59 -37
  50. package/packages/core/src/cli/dashboard/target-distance.ts +14 -0
  51. package/packages/core/src/cli/dashboard/tree.ts +3 -2
  52. package/packages/core/src/cli/dispatch-args.ts +1 -1
  53. package/packages/core/src/cli/dispatch-frontend.ts +6 -3
  54. package/packages/core/src/cli/dispatch.ts +35 -9
  55. package/packages/core/src/cli/env.ts +4 -0
  56. package/packages/core/src/cli/help.ts +30 -23
  57. package/packages/core/src/cli/main.ts +24 -8
  58. package/packages/core/src/cli/node-verification-provenance.ts +1 -97
  59. package/packages/core/src/cli/publication-settlement.ts +43 -20
  60. package/packages/core/src/cli/repository-status.ts +20 -9
  61. package/packages/core/src/cli/status.ts +42 -5
  62. package/packages/core/src/cli/store-opening.ts +6 -1
  63. package/packages/core/src/cli/terminal.ts +22 -1
  64. package/packages/core/src/cli/terminals.ts +14 -10
  65. package/packages/core/src/cli/upgrade-landing.ts +70 -30
  66. package/packages/core/src/cli/upgrade.ts +3 -1
  67. package/packages/core/src/cli/wait.ts +15 -7
  68. package/packages/core/src/cli/watch-lifetime.ts +111 -0
  69. package/packages/core/src/cli/watch.ts +634 -511
  70. package/packages/core/src/config/effective-artifact.fixture.ts +27 -0
  71. package/packages/core/src/config/effective-artifact.ts +13 -0
  72. package/packages/core/src/config/landing.ts +1 -1
  73. package/packages/core/src/config/load.ts +21 -1
  74. package/packages/core/src/config/pipeline-source.ts +28 -0
  75. package/packages/core/src/config/reference-metadata.ts +2 -0
  76. package/packages/core/src/config/reference.ts +22 -7
  77. package/packages/core/src/config/schema.ts +86 -162
  78. package/packages/core/src/context-directory.ts +26 -0
  79. package/packages/core/src/distribution-packaging.ts +26 -5
  80. package/packages/core/src/events/catalog.ts +10 -2
  81. package/packages/core/src/events/globs.ts +1 -1
  82. package/packages/core/src/events/payloads.ts +70 -1
  83. package/packages/core/src/events/policy.ts +7 -0
  84. package/packages/core/src/events/repository.ts +2 -4
  85. package/packages/core/src/events/sessions.ts +6 -6
  86. package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +571 -0
  87. package/packages/core/src/kernel/auto-merge.ts +2 -2
  88. package/packages/core/src/kernel/engine.ts +255 -26
  89. package/packages/core/src/kernel/generators/leaf-restack-log.ts +10 -0
  90. package/packages/core/src/kernel/integration-landing.ts +3 -3
  91. package/packages/core/src/kernel/integration-state.ts +27 -4
  92. package/packages/core/src/kernel/leaf-restack-state.ts +28 -3
  93. package/packages/core/src/kernel/log-index.ts +13 -1
  94. package/packages/core/src/kernel/node-landing.ts +8 -8
  95. package/packages/core/src/kernel/node-parent.ts +2 -2
  96. package/packages/core/src/kernel/node-restack-transaction.ts +1 -1
  97. package/packages/core/src/kernel/node-verification-context.ts +216 -0
  98. package/packages/core/src/kernel/phases.ts +1 -1
  99. package/packages/core/src/kernel/plan-verify-selection.ts +16 -0
  100. package/packages/core/src/kernel/publication-retry.ts +168 -0
  101. package/packages/core/src/kernel/reconcile-restack.ts +29 -1
  102. package/packages/core/src/kernel/reducer.ts +82 -5
  103. package/packages/core/src/kernel/target-distance.ts +45 -0
  104. package/packages/core/src/kernel/terminal-guard.ts +10 -1
  105. package/packages/core/src/kernel/verify-stage-state.ts +123 -0
  106. package/packages/core/src/kernel/verify-stages.ts +39 -0
  107. package/packages/core/src/ontology.ts +1 -0
  108. package/packages/core/src/operator/annotations.ts +6 -0
  109. package/packages/core/src/operator/control.ts +1 -1
  110. package/packages/core/src/operator/index.ts +1 -7
  111. package/packages/core/src/operator/landings.ts +5 -1
  112. package/packages/core/src/operator/presentation.ts +6 -1
  113. package/packages/core/src/operator/query.ts +14 -18
  114. package/packages/core/src/operator/registry.ts +17 -6
  115. package/packages/core/src/operator/sandbox-host.ts +64 -40
  116. package/packages/core/src/operator/sandbox.ts +3 -0
  117. package/packages/core/src/operator/ticket-source-backend.ts +3 -12
  118. package/packages/core/src/ports/forge/contract.ts +2 -2
  119. package/packages/core/src/ports/forge/git-rewrite.ts +25 -2
  120. package/packages/core/src/ports/forge/github-readiness.ts +2 -2
  121. package/packages/core/src/ports/forge/github.ts +26 -7
  122. package/packages/core/src/ports/forge/local-git.ts +4 -4
  123. package/packages/core/src/ports/forge/readiness.ts +1 -1
  124. package/packages/core/src/ports/forge-failure.ts +24 -0
  125. package/packages/core/src/ports/workspace/build-execution.ts +3 -1
  126. package/packages/core/src/ports/workspace/phase-scratch.ts +4 -3
  127. package/packages/core/src/ports/workspace/vercel-sandbox.ts +59 -39
  128. package/packages/core/src/processes/build-child.ts +6 -8
  129. package/packages/core/src/processes/build-execution-state.ts +8 -5
  130. package/packages/core/src/processes/build-runner.ts +522 -98
  131. package/packages/core/src/processes/dispatcher.ts +186 -101
  132. package/packages/core/src/processes/execution-no-progress.ts +8 -1
  133. package/packages/core/src/processes/phase-failure-budget.ts +1 -0
  134. package/packages/core/src/processes/publication-loss.ts +8 -2
  135. package/packages/core/src/processes/publication-state.ts +42 -4
  136. package/packages/core/src/processes/repo-view.ts +14 -0
  137. package/packages/core/src/processes/verify-cycle-config.ts +96 -0
  138. package/packages/core/src/{integration → scenarios}/harness.ts +330 -317
  139. package/packages/core/src/store/adapter.ts +1 -0
  140. package/packages/core/src/store/build-scope.ts +9 -0
  141. package/packages/core/src/store/contract.ts +113 -1
  142. package/packages/core/src/store/local/schema.ts +13 -0
  143. package/packages/core/src/store/local/store.ts +42 -0
  144. package/packages/core/src/store/memory.ts +47 -0
  145. package/packages/core/src/store/operator-presence.ts +21 -0
  146. package/packages/core/src/store/phase-session.ts +10 -0
  147. package/packages/core/src/store/reducer-value-shapes.json +5081 -4160
  148. package/packages/core/src/store/remote/client.ts +47 -1
  149. package/packages/core/src/store/remote/compatibility.ts +2 -0
  150. package/packages/core/src/store/remote/protocol.ts +4 -0
  151. package/packages/core/src/store/remote/version.ts +3 -1
  152. package/packages/core/src/store/retention.ts +2 -3
  153. package/packages/core/src/store/session-handle.ts +9 -0
  154. package/packages/core/src/store/streams/session-writer.ts +1 -1
  155. package/packages/core/src/store/types.ts +12 -2
  156. package/packages/core/src/testing/index.ts +11 -1
  157. package/packages/core/src/testing/temp-directories.ts +58 -0
  158. package/skills/code-review/SKILL.md +23 -9
  159. package/skills/finalize/SKILL.md +15 -7
  160. package/skills/guide/SKILL.md +253 -118
  161. package/skills/guide/references/integration-tree.md +45 -38
  162. package/skills/guide/references/{landing-policy.md → merge-policy.md} +42 -24
  163. package/skills/guide/references/migration-1.0.md +17 -13
  164. package/skills/guide/references/operator-api.md +91 -15
  165. package/skills/guide/references/remote-store-protocol.md +76 -11
  166. package/skills/guide/references/remote-ticket-protocol.md +1 -1
  167. package/skills/guide/references/restacking.md +54 -15
  168. package/skills/guide/references/setup.md +41 -6
  169. package/skills/guide/references/spec-standard.md +6 -6
  170. package/skills/guide/references/ticket-dependencies.md +7 -7
  171. package/skills/implement/SKILL.md +43 -17
  172. package/skills/operate/SKILL.md +117 -116
  173. package/skills/plan/SKILL.md +39 -13
  174. package/skills/plan-review/SKILL.md +15 -10
  175. package/skills/reconcile/SKILL.md +22 -3
  176. package/skills/spec/SKILL.md +19 -19
  177. package/skills/tickets/SKILL.md +9 -7
  178. package/templates/autobuild.toml +1 -1
  179. package/templates/hosted-service/package.json +2 -2
  180. package/packages/core/src/orchestrator/approvals.ts +0 -115
  181. package/packages/core/src/orchestrator/conversation.ts +0 -167
  182. package/packages/core/src/orchestrator/model.ts +0 -86
  183. package/packages/core/src/orchestrator/prompt.ts +0 -63
  184. package/packages/core/src/orchestrator/tools.ts +0 -117
  185. package/packages/core/src/orchestrator/turn-runner.ts +0 -457
  186. package/packages/core/src/processes/orchestrator-tick.ts +0 -360
@@ -2,7 +2,7 @@
2
2
 
3
3
  Autobuild organizes work as a tree rooted at the configured `baseBranch`.
4
4
  Work tickets are leaves; node tickets are finite integration points that collect
5
- children before landing into their parent. Nodes can nest. An omitted target
5
+ children before merge into their parent. Nodes can nest. An omitted target
6
6
  means the root, so repositories can continue sending every leaf directly there.
7
7
  Blockers form a separate graph. In repositories with nodes, a blocker with a
8
8
  build resolves only when its change identity is present in the dependent's
@@ -12,10 +12,10 @@ See [restacking](restacking.md) for change identity and replay.
12
12
 
13
13
  Presence is checked only at claim, never to interrupt existing work. The newest
14
14
  build generation supplies evidence; ambiguous or unavailable evidence leaves the
15
- dependent queued. Confirmed landing SHA reachability can prove presence without
16
- a trailer, and a landed node transports its whole owned contribution. Empty
17
- completed nodes contribute nothing. Sibling work waits for landing into the common
18
- ancestor and demand the minimal restack path; same-node landings satisfy presence directly.
15
+ dependent queued. Confirmed merge SHA reachability can prove presence without
16
+ a trailer, and a merged node transports its whole owned contribution. Empty
17
+ completed nodes contribute nothing. Sibling work waits for merge into the common
18
+ ancestor and demand the minimal restack path; same-node merges satisfy presence directly.
19
19
 
20
20
  ## Choosing a destination
21
21
 
@@ -24,29 +24,29 @@ First decide whether the feature should be more than one ticket at all; the
24
24
  tickets cut at seams. Whenever grooming produces more than one ticket for a
25
25
  feature, explicitly choose root or a node before filing. Use a node when the set should reach the base branch
26
26
  as one integrated change, or intermediate states should not ship independently.
27
- Use root when every ticket is independently valuable and safe to land alone.
27
+ Use root when every ticket is independently valuable and safe to merge alone.
28
28
  Nested nodes can collect a subfeature before contributing it to a larger feature.
29
29
  A node provides one integrated delivery to its parent under the configured forge
30
30
  method; it does not promise one physical Git commit.
31
31
 
32
32
  Blockers and targets are independent: blockers order work; targets decide where
33
- it lands. A blocker inside the same node resolves when its change lands into that
33
+ it merges. A blocker inside the same node resolves when its change merges into that
34
34
  node, so a dependency chain can advance without waiting for root consent, subject
35
35
  to the normal claim gates and presence rules. Dependencies across destinations
36
36
  still need the presence evidence described above and in
37
37
  [blocker resolution](ticket-dependencies.md#when-a-blocker-resolves).
38
38
 
39
39
  Read the consuming repository's `autobuild.toml` and evaluate its effective
40
- [landing policy](landing-policy.md) for the actual ticket kinds, destinations and
41
- labels. Ordered `[[landing]]` rules use the first match; `from`, `into` and `label`
40
+ [merge policy](merge-policy.md) for the actual ticket kinds, destinations and
41
+ labels. Ordered `[[merge]]` rules use the first match; `from`, `into` and `label`
42
42
  predicates are ANDed, with omitted predicates acting as wildcards. Without a
43
- match, leaves default to auto and nodes to consent. Explain the resulting landing
43
+ match, leaves default to auto and nodes to consent. Explain the resulting merge
44
44
  and consent flow to the human in plain terms. Ask when grooming does not make the
45
45
  destination choice clear. This decision is separate from workflow-state placement
46
46
  and never authorizes promoting tickets to ready.
47
47
 
48
48
  For example, **if** the matched rules require consent into root and allow automatic
49
- landing into nodes (the staged-release example in the policy reference), a
49
+ merge into nodes (the staged-release example in the policy reference), a
50
50
  root-targeted chain waits for consent separately for each ticket and ships each
51
51
  intermediate change to the base branch. Under those same rules, children collect
52
52
  automatically in a node and the verified, complete node waits for consent once
@@ -96,15 +96,15 @@ capacity, effective display capacity and the nodes using descendant-held slots.
96
96
  Idle collecting nodes remain free.
97
97
 
98
98
  Claims freeze the destination build generation and branch. Missing, unopened,
99
- landed, closed or aborted targets leave work queued with diagnostics. The newest
99
+ merged, closed or aborted targets leave work queued with diagnostics. The newest
100
100
  generation wins; a closed generation never falls back to an older open one.
101
101
  Source metadata and effective ancestry are different: `ab ticket tree` shows
102
102
  source targets, while build status shows the effective destination.
103
103
 
104
- ## Collect, verify and land
104
+ ## Collect, verify and merge
105
105
 
106
106
  Node `verify:*` context additionally exposes `nodeVerification`: the frozen
107
- range, a JSON index path, contribution build slugs, current stored ticket
107
+ range, a JSON index path, contribution build slugs, preparation-time stored ticket
108
108
  identities, event-authorized spec revisions and spec paths, and their commits.
109
109
  The index maps every commit in the range using build identity trailers,
110
110
  including earlier-cycle contributions and merge side history. Commits without
@@ -115,7 +115,14 @@ Their full messages express maintainer-authorized intent: judge quality and
115
115
  consistency, and never fail them solely for lacking a covering spec. Other node
116
116
  changes are authorized when covered by the current event-authorized node spec or the spec
117
117
  of the contribution introducing it; use the commit mapping to find that spec.
118
- Missing or ambiguous provenance fails hydration. Leaf context is unchanged.
118
+ The dispatcher collects these inputs with repository authority before launching
119
+ verification and atomically deposits a node-owned `node-verification-context`
120
+ artifact cited by exact revision in `integration.prepared`. Contributor specs
121
+ freeze at preparation; resumed and concurrent verifiers read the same cycle input.
122
+ Hydration reads only that node-owned artifact and grants no general contributor
123
+ read authority. Missing or ambiguous provenance prevents preparation; missing,
124
+ corrupt or mismatched prepared inputs fail hydration. Historical agent cycles
125
+ without a citation require a new integration cycle. Leaf context is unchanged.
119
126
  See [iterating inside a node](#iterating-inside-a-node) for authoring and evolving
120
127
  these sources of intent.
121
128
 
@@ -136,25 +143,25 @@ Each leaf runs the normal spec, plan/review, implement/review, verify and finali
136
143
  pipeline against its frozen destination.
137
144
 
138
145
  A node collects until every ticket targeting it is natively done or cancelled,
139
- all frozen child claims have settled, and at least one contribution has landed.
146
+ all frozen child claims have settled, and at least one contribution has merged.
140
147
  Triage, backlog and ready children keep it incomplete. Exhaustive enumeration
141
148
  failures fail closed. Completeness is sampled again before verification and
142
149
  publication; tracker edits cannot be transactional with a forge write.
143
150
 
144
151
  The kernel runs all configured verify steps with normal path applicability on
145
152
  the exact node head and parent. Either moving invalidates eligibility, even a
146
- clean restack. Failed verification blocks the node and emits `integration.verification-failed` once per prepared cycle. Default watch and new hosted wake settings include it; `ab wait --for attention` also detects the current failure before notification. The fact names failed steps, head, parent and repair guidance. Watch baselines prior failures; reconcile status after arming. A new cycle can notify again, while historical facts do not keep a repaired node blocked. Recovery reports only the latest prepared cycle while its head and parent remain current; superseded failures are not backfilled. Recheck current status before filing a repair, since the node may have advanced after notification. To recover, file a repair child targeting
147
- it; the repaired landed head permits a new cycle. If the contract changed, an
153
+ clean restack. Failed verification blocks the node and emits `integration.verification-failed` once per prepared cycle. Default `ab watch` includes it; `ab wait --for attention` also detects the current failure before notification. The fact names failed steps, head, parent and repair guidance. Watch baselines prior failures; reconcile status after arming. A new cycle can notify again, while historical facts do not keep a repaired node blocked. Recovery reports only the latest prepared cycle while its head and parent remain current; superseded failures are not backfilled. Recheck current status before filing a repair, since the node may have advanced after notification. To recover, file a repair child targeting
154
+ it; the repaired merged head permits a new cycle. If the contract changed, an
148
155
  operator can explicitly revise the spec instead and verify again on the same head
149
156
  (see operator node spec revisions below). Historical reports keep their
150
- actual head/base citations. Integration grammar is collect → verify → land →
157
+ actual head/base citations. Integration grammar is collect → verify → merge →
151
158
  close, with restacking and repair cycles along the way.
152
159
 
153
- [Landing policy](landing-policy.md) defaults nodes to consent. Once complete and
154
- verified, `ab land <slug>` authorizes landing; it refuses incomplete nodes and
160
+ [Merge policy](merge-policy.md) defaults nodes to consent. Once complete and
161
+ verified, `ab merge <slug>` authorizes merge; it refuses incomplete nodes and
155
162
  names open children. `ab hold <slug>` works before readiness and withdraws
156
163
  consent. Automatic authorization still requires every readiness and merge gate.
157
- A landed node completes its ticket and closes admission; it is not a perpetual
164
+ A merged node completes its ticket and closes admission; it is not a perpetual
158
165
  staging branch. Releases remain separate maintainer operations.
159
166
 
160
167
  Human forge merges are an explicit escape hatch, including while incomplete,
@@ -166,7 +173,7 @@ children retain their frozen destination.
166
173
  ## Iterating inside a node
167
174
 
168
175
  Write the node spec as a finite integration charter: its goal, observable
169
- completion conditions for the whole, and destination and landing expectations
176
+ completion conditions for the whole, and destination and merge expectations
170
177
  under the effective policy. Put feature specifics in spec-standard children.
171
178
  An open node supports three ways to iterate:
172
179
 
@@ -191,9 +198,9 @@ An open node supports three ways to iterate:
191
198
  restrictions.
192
199
 
193
200
  Open children keep the node incomplete, including triage, backlog and ready
194
- children. Completion remains finite: landed or otherwise ended nodes close
201
+ children. Completion remains finite: merged or otherwise ended nodes close
195
202
  admission. Iteration does not relax verification of the exact head and parent,
196
- or the configured readiness, consent and landing gates described above.
203
+ or the configured readiness, consent and merge gates described above.
197
204
 
198
205
  ## Changing a parent
199
206
 
@@ -205,11 +212,11 @@ new commit or PR. Descendants restack only on their own demand.
205
212
 
206
213
  The request is durable before the provider write. Source readback accepts the
207
214
  new effective ancestry; branch publication, PR retargeting and completion have
208
- separate receipts. Pending moves fence verification and landing and keep both
209
- parents incomplete. Reparenting revokes land consent; holds survive. Policy is
215
+ separate receipts. Pending moves fence verification and merge and keep both
216
+ parents incomplete. Reparenting revokes merge consent; holds survive. Policy is
210
217
  sampled again for the new parent, including when both parents have the same SHA.
211
218
 
212
- Cycles, unopened/terminal parents, landing or closing nodes, unsupported PR
219
+ Cycles, unopened/terminal parents, merge or closing nodes, unsupported PR
213
220
  retargeting and busy writer operations refuse or defer the move with a reason.
214
221
  Invalid direct provider edits leave effective ancestry unchanged and produce
215
222
  durable diagnostics; restoring it clears the current refusal. Missing source
@@ -218,29 +225,29 @@ Git/PR effects without the tracker. Ambiguous writes are reread on recovery.
218
225
  Changing a claimed work ticket's target is refused before any combined patch is
219
226
  written: abort and re-dispatch instead.
220
227
 
221
- See [forge requirements](landing-policy.md#forge-requirements),
228
+ See [forge requirements](merge-policy.md#forge-requirements),
222
229
  [restacking](restacking.md), and [migration from 0.x](migration-1.0.md).
223
230
 
224
231
  ## Integration detail
225
232
 
226
233
  Both dashboards show destination (with the configured-base annotation for root
227
- targets), row progress and steps, branch/restack state, and all open and landed
234
+ targets), row progress and steps, branch/restack state, and all open and merged
228
235
  children with titles and states. Open children come first; live children show
229
- their current phase, unbuilt children read `queued`, contributions read `landed`.
236
+ their current phase, unbuilt children read `queued`, contributions read `merged`.
230
237
  Cancelled tickets without contributions are excluded. Verification names the
231
238
  expected steps and only outcomes bound to the current node head and destination;
232
- failures name the repair-child instruction. Landing explains the rule and mode;
233
- ready consent names `l` and `ab land <slug>`. Conflicts name recorded files.
239
+ failures name the repair-child instruction. Merge explains the rule and mode;
240
+ ready consent names `l` and `ab merge <slug>`. Conflicts name recorded files.
234
241
  These are Store-only projections: additive `integration.observed.children`
235
242
  metadata carries source/id, optional title and contribution build identity;
236
243
  `node.item-conflicted.files` and conflicted `restack.replayed.files` retain paths.
237
244
  Older events remain readable, with explicit unavailable titles/files. Display
238
- metadata never changes completeness or landing eligibility.
245
+ metadata never changes completeness or merge eligibility.
239
246
 
240
247
  ## Demand-driven parent freshness
241
248
 
242
249
  Collecting nodes may intentionally trail their parent. They refresh before
243
- verification and landing, for queued dependency presence, on operator request,
250
+ verification and merge, for queued dependency presence, on operator request,
244
251
  and after accepted re-parenting. Descendants need independent demand; presence
245
252
  requests follow only the minimal proven ancestor path. See
246
253
  [restacking](restacking.md#timing-and-evidence) for timing, requests and distance.
@@ -250,7 +257,7 @@ requests follow only the minimal proven ancestor path. See
250
257
  Opened integration nodes poll every tick until their durable activity has been
251
258
  quiet for `policy.nodeIdleAfterSeconds` (default 600 seconds), then poll every
252
259
  `policy.nodeIdlePollSeconds` (default 120 seconds). Holds and waiting for consent
253
- qualify normally. Child claims, PR and landing activity, operator commands
260
+ qualify normally. Child claims, PR and merge activity, operator commands
254
261
  (including repeated holds), restack requests and answers wake the next tick.
255
262
  GitHub-only changes are discovered on the next due check, within the idle
256
263
  interval plus normal tick scheduling while the dispatcher is running; failure,
@@ -272,10 +279,10 @@ Each kernel `spec.revised` records the exact artifact and operator identity
272
279
  Ticket-origin revisions re-pin assets; supplied bodies preserve asset pins.
273
280
  The node recollects and verifies the new revision, including on the same head
274
281
  and parent after a failed cycle. Earlier cycles remain historical evidence
275
- and cannot block or authorize landing under the replacement. Children keep
282
+ and cannot block or authorize merge under the replacement. Children keep
276
283
  their specs, claims and targets; contributions are not restarted.
277
284
  Active verification/reconcile or writer work, restack/reparent work, pause,
278
- pending controls, landing intent and ended PRs refuse the no-escalation path.
285
+ pending controls, merge intent and ended PRs refuse the no-escalation path.
279
286
  A concurrent state change refuses publication with a retry explanation;
280
287
  uncited artifacts are inert. Leaves still require an open escalation and
281
288
  restart from `plan`.
@@ -1,6 +1,6 @@
1
- # Landing policy
1
+ # Merge policy
2
2
 
3
- Landing authorization is an ordered, strict `[[landing]]` array in
3
+ Merge authorization is an ordered, strict `[[merge]]` array in
4
4
  `autobuild.toml`. Rules require `mode = "auto"` or `"consent"`; optional
5
5
  predicates are ANDed, omissions are wildcards, and the first match wins.
6
6
 
@@ -22,14 +22,16 @@ Editing configuration does not revise that decision. A replacement candidate
22
22
  gets a fresh decision. Policy is live dispatcher configuration, separate from
23
23
  the pinned execution pipeline.
24
24
 
25
- `ab hold <slug>` suppresses landing and revokes consent, even before readiness.
26
- `ab land <slug>` requires readiness, clears hold and consents to this landing
25
+ `ab hold <slug>` suppresses merge and revokes consent, even before readiness.
26
+ `ab merge <slug>` requires readiness, clears hold and consents to this merge
27
27
  into its destination. Consent survives head replacement, restacking, verification
28
- and re-finalization until hold or completion; it approves the landing rather than
28
+ and re-finalization until hold or completion; it approves the merge rather than
29
29
  an immutable diff. Accepted node reparenting revokes it. Commands and receipts
30
30
  are sequence-correlated: hold acknowledgement confirms native cancellation;
31
- land acknowledgement does not claim gates passed. MCP/operator tools offer the
32
- same actions; the terminal uses `l`/`o`, and the web has no consent controls.
31
+ merge acknowledgement does not claim gates passed. MCP/operator tools offer the
32
+ same actions; the terminal uses `l`/`o`. The hosted web app offers **Merge** and
33
+ **Hold** on a merge awaiting consent. These controls record the same durable
34
+ actions; **Merge** does not mean the merge gates have passed.
33
35
 
34
36
  ## Worked configurations
35
37
 
@@ -40,7 +42,7 @@ repository's commands, roles and verification before operating it.
40
42
 
41
43
  ```toml
42
44
  baseBranch = "main"
43
- landing = []
45
+ merge = []
44
46
 
45
47
  [tickets]
46
48
  source = "file"
@@ -55,11 +57,11 @@ consent. No special rule is needed for a repository without integration nodes.
55
57
  ```toml
56
58
  baseBranch = "main"
57
59
 
58
- [[landing]]
60
+ [[merge]]
59
61
  into = "root"
60
62
  mode = "consent"
61
63
 
62
- [[landing]]
64
+ [[merge]]
63
65
  into = "node"
64
66
  mode = "auto"
65
67
 
@@ -69,7 +71,7 @@ readyState = "ready"
69
71
  ```
70
72
 
71
73
  Leaves and nodes entering the root match rule 1 and require consent. Leaves and
72
- nested nodes entering any node match rule 2 and land automatically when ready.
74
+ nested nodes entering any node match rule 2 and merge automatically when ready.
73
75
  A specific destination can replace `"node"` with its ticket id, such as
74
76
  `"REL-1"`; it matches that frozen destination only.
75
77
 
@@ -78,15 +80,15 @@ A specific destination can replace `"node"` with its ticket id, such as
78
80
  ```toml
79
81
  baseBranch = "main"
80
82
 
81
- [[landing]]
83
+ [[merge]]
82
84
  label = "review"
83
85
  mode = "consent"
84
86
 
85
- [[landing]]
87
+ [[merge]]
86
88
  from = "node"
87
89
  mode = "consent"
88
90
 
89
- [[landing]]
91
+ [[merge]]
90
92
  mode = "auto"
91
93
 
92
94
  [tickets]
@@ -99,14 +101,14 @@ other leaves match rule 3. `Review` does not match `review`. Moving the catch-al
99
101
  to the front would shadow both safeguards and automatically authorize nodes too.
100
102
  Authorization never bypasses verification, checks, protection or merge gates.
101
103
 
102
- ## Landing methods
104
+ ## Merge methods
103
105
 
104
106
  Root-target leaves squash into one identity-bearing commit per build.
105
107
  Node-target children use serialized, exact-parent guarded fast-forwards;
106
- node-to-local-git-root landing also fast-forwards, preserving the contributions.
107
- Node-to-GitHub-root landing uses PR rebase merge guarded on verified head after
108
+ node-to-local-git-root merge also fast-forwards, preserving the contributions.
109
+ Node-to-GitHub-root merge uses PR rebase merge guarded on verified head after
108
110
  a final parent freshness read. Enforced up-to-date protection provides a fenced
109
- landing; uncertainty is recorded as unfenced and requires immutable landed-tree
111
+ merge; uncertainty is recorded as unfenced and requires immutable merged-tree
110
112
  audit. A mismatch raises operator attention without rewriting the shared parent.
111
113
  Pending audits survive completion and retry until settled.
112
114
 
@@ -115,15 +117,15 @@ authoritatively ungated root permits an inspected-head guarded direct squash;
115
117
  unknown gate state defers. Node targets instead require authoritative proof of
116
118
  an ungated destination, cancel native auto-merge and serialize the guarded push.
117
119
  Gated or unproven node destinations stay open with actionable diagnostics.
118
- Successful push proves landing; forge acknowledgement is best-effort, including
119
- a landed-SHA comment and closing an unacknowledged open review.
120
+ Successful push proves merge; forge acknowledgement is best-effort, including
121
+ a merged-SHA comment and closing an unacknowledged open review.
120
122
 
121
123
  Native application receipts bind to exact candidates; consent does not. Every
122
124
  replacement confirms cancellation first; the next poll reconciles native state
123
125
  before other actions. Stale enables are repaired by polling. This bounded model
124
126
  requires replacement-head checks to take far longer than a poll interval. It
125
127
  has no durable native-effect reservation. Human forge merges record whether a
126
- hold was overridden; possible stale-enable landings raise operator attention.
128
+ hold was overridden; possible stale-enable merges raise operator attention.
127
129
  No result is undone by rewriting the target.
128
130
 
129
131
  ## Forge requirements
@@ -136,7 +138,7 @@ retention policy. See [restacking](restacking.md).
136
138
 
137
139
  Tree admission requires node branch creation, authoritative branch-head reads
138
140
  and comparison. Reparenting additionally requires PR retargeting. Controlled
139
- landing requires exact-parent guarded publication and authoritative gate proof;
141
+ merge requires exact-parent guarded publication and authoritative gate proof;
140
142
  GitHub root nodes also need rebase merge support. Root leaves require squash
141
143
  support. Readiness inspection reports method/publication hard failures and
142
144
  linear-history/freshness recommendations without changing provider settings or
@@ -145,7 +147,7 @@ pushing probes. Unknown permission never proves permission.
145
147
  Legacy plugins can remain readable without supporting tree operations: old
146
148
  ticket sources read as work/root and refuse tree metadata writes. This read
147
149
  compatibility does not grant forge tree capabilities. Upgrade adapters before
148
- admitting nodes or requesting unsupported retargeting or landing operations.
150
+ admitting nodes or requesting unsupported retargeting or merge operations.
149
151
  For the lifecycle see [integration trees](integration-tree.md); for old controls
150
152
  and upgrade conversion see [migration](migration-1.0.md).
151
153
 
@@ -157,5 +159,21 @@ Local-git's shared database retains authoritative CAS.
157
159
 
158
160
  Native cancellation receipts are candidate- and operation-specific. Publication
159
161
  retries confirm forge state before reusing a receipt; external re-enables require
160
- another confirmed cancellation. Classified transient landing failures retain
162
+ another confirmed cancellation. Classified transient merge failures retain
161
163
  retry eligibility and recheck authorization after repository forge cooldown.
164
+
165
+ ## Deprecated spellings
166
+
167
+ `ab land` and `ab landings` remain callable aliases for `ab merge` and `ab merges`,
168
+ with one deprecation notice on stderr. `node-landed` remains an alias for the
169
+ `ab wait --for node-merged` condition. Ordinary help lists only the current names.
170
+
171
+ The deprecated `[[landing]]` config array has the same semantics as `[[merge]]`
172
+ and warns after validation. Declare only one spelling, including empty arrays.
173
+ `ab upgrade` renames the old root key and table headers while preserving policy;
174
+ unsupported spellings require the reported manual edit before retrying.
175
+
176
+ MCP discovery offers `merges.list` and its deprecated alias `landings.list`.
177
+ `builds.control` accepts canonical `merge` and deprecated `land` actions through
178
+ both MCP bindings. HTTP control bodies and durable event fields retain their
179
+ existing wire names, including `land`, `landing.decided`, and `integration.landed`.
@@ -1,6 +1,6 @@
1
1
  # Migrating from 0.x to 1.0
2
2
 
3
- The integration tree changes replay and landing authorization. It does not cut a
3
+ The integration tree changes replay and merge authorization. It does not cut a
4
4
  release or rename `baseBranch`: that setting now names the tree root. Existing
5
5
  tickets default to work with no target and continue targeting the root. Adopt
6
6
  nodes only when useful; see [integration trees](integration-tree.md).
@@ -13,7 +13,7 @@ review local conflicts. `--no-self-update` skips installation update while still
13
13
  performing repository migration and skill merging. Preserve local customizations
14
14
  and use the installed [setup reference](setup.md) to review verification and roles.
15
15
 
16
- When `landing` is absent, upgrade reads the target repository's configured
16
+ When neither `merge` nor its deprecated `landing` alias is declared, upgrade reads the target repository's configured
17
17
  BuildStore journal, ignoring ambient `AB_STORE` for that choice, and appends:
18
18
 
19
19
  | Legacy repository default | Leaf rule | Node rule |
@@ -23,15 +23,18 @@ BuildStore journal, ignoring ambient `AB_STORE` for that choice, and appends:
23
23
 
24
24
  A genuinely absent local journal counts as no fact. An unreadable or unavailable
25
25
  journal fails migration with guidance: restore store access and retry, or write
26
- explicit rules after deciding the desired policy. Existing valid landing arrays
27
- are preserved byte-for-byte, including root-level `landing = []`, which selects
26
+ explicit rules after deciding the desired policy. Existing valid merge arrays
27
+ are preserved byte-for-byte, including root-level `merge = []`, which selects
28
28
  the new leaf-auto/node-consent defaults. Fresh init uses those new defaults.
29
- See [landing policy](landing-policy.md) for complete worked configurations.
29
+ An explicit deprecated `landing` array is renamed to `merge`, preserving values,
30
+ selectors, order and surrounding comments without reading the legacy journal.
31
+ Declaring both spellings is an error, including empty arrays.
32
+ See [merge policy](merge-policy.md) for complete worked configurations.
30
33
 
31
34
  The repository auto-merge default, its fan-out and old CLI/default controls are
32
- retired. Use `ab land` and `ab hold`, not an old repository switch. Historical
33
- explicit per-build `build.auto-merge-requested`/`cancelled` facts map to land/hold
34
- until a new landing command supersedes them; historical default-seeded requests
35
+ retired. Use `ab merge` and `ab hold`, not an old repository switch. Historical
36
+ explicit per-build `build.auto-merge-requested`/`cancelled` facts map to merge/hold
37
+ until a new merge command supersedes them; historical default-seeded requests
35
38
  confer no consent. New claims do not materialize old defaults.
36
39
 
37
40
  ## Builds already in flight
@@ -39,14 +42,15 @@ confer no consent. New claims do not materialize old defaults.
39
42
  Historical events and merge reconciliations keep their replay/display meaning;
40
43
  old merge commits remain valid history. Later replay uses the promoted historical
41
44
  contribution base. The current engine can restack resumed builds at newly reached
42
- verification or waiting-for-landing boundaries, and current landing rules govern
45
+ verification or waiting-for-merge boundaries, and current merge rules govern
43
46
  new readiness decisions. There is no claim-version switch promising every old
44
47
  build finishes with the old merge standard. Drain old work before switching
45
48
  versions if retaining old execution behavior is required. Simultaneous old and
46
49
  new writers are not a supported migration strategy.
47
50
 
48
- Execution pipeline configuration stays pinned to the build; live dispatcher
49
- landing policy is separate. A recorded readiness decision retains its rule
51
+ Execution pipeline configuration stays owned by the build and is re-pinned
52
+ from its checkout at each verify cycle; live dispatcher
53
+ merge policy is separate. A recorded readiness decision retains its rule
50
54
  snapshot despite configuration edits; a new candidate receives a new decision.
51
55
  Explicit consent persists through replay and re-verification until hold or
52
56
  completion, except accepted node reparenting revokes it.
@@ -62,7 +66,7 @@ replay; the kernel owns branch replacement with expected-head guards.
62
66
 
63
67
  Root leaves squash; node destinations and local-git root nodes fast-forward;
64
68
  GitHub root nodes use guarded rebase merge with recorded fencing/audit limits.
65
- Check [forge requirements](landing-policy.md#forge-requirements) and
69
+ Check [forge requirements](merge-policy.md#forge-requirements) and
66
70
  [restacking](restacking.md) before enabling nodes on a plugin forge. Ensure
67
71
  archive publication/read permissions, tree capabilities and required merge
68
72
  methods are available; legacy read compatibility is insufficient.
@@ -71,7 +75,7 @@ methods are available; legacy read compatibility is insufficient.
71
75
 
72
76
  Parent movement is now observed without starting a node replay. Existing frozen
73
77
  transactions finish after upgrade; subsequent replay needs completeness before
74
- verification, freshness before landing, dependency presence, operator demand
78
+ verification, freshness before merge, dependency presence, operator demand
75
79
  (`ab restack <node>`), or accepted re-parenting. Nested nodes need independent
76
80
  demand. Leaves keep their existing timing. There is no eager compatibility mode.
77
81
  See [restacking](restacking.md) for durable requests and parent commit distance.
@@ -1,9 +1,9 @@
1
1
  # Operator API v1
2
2
 
3
3
  The hosted service exposes the polling-oriented operator surface at
4
- `/operator/v1/repos/{repo}`. It is versioned with remote store protocol **4**.
4
+ `/operator/v1/repos/{repo}`. It is versioned with remote store protocol **6**.
5
5
  Every request must send `X-Autobuild-Version`,
6
- `X-Autobuild-Protocol-Version: 3`, and `Authorization: Bearer …`. Identity is
6
+ `X-Autobuild-Protocol-Version: 6`, and `Authorization: Bearer …`. Identity is
7
7
  checked before authentication or resource lookup.
8
8
 
9
9
  Project credentials are opaque `abp_1_<id>_<secret>` bearer values bound to one
@@ -73,8 +73,13 @@ archived status is terminal.
73
73
 
74
74
  Session state is a reduction of the session's event log, never a stored
75
75
  column; a `GET …/sessions/{sid}` response therefore always reflects the
76
- session's full history. The API never exposes raw session-event append: the
77
- turn runner (a later ticket) is the only producer of turn facts.
76
+ session's full history. Message, explicit wake and approval writes return
77
+ `{ok:true}` without turn or stream ids. They record facts only: the service
78
+ never starts or resumes an agent, executes an approved call, or reaps a turn.
79
+ New sessions have no inherited wake settings. Historical turn events and
80
+ streams remain readable; an approval answer clears the matching pending
81
+ approval without changing its suspended turn or stream. The API never exposes
82
+ raw session-event append. External operator harnesses own agent execution.
78
83
 
79
84
  ## Reads
80
85
 
@@ -99,7 +104,9 @@ Dashboard reads use the latest durable, run-correlated `effectiveConfig`
99
104
  repository artifact. Missing, corrupt, or invalid configuration returns a typed
100
105
  `409 effective-config-unavailable`; the service never guesses from a checkout.
101
106
  Clients poll these reads — the operator HTTP API exposes no push or long-poll
102
- event transport. Streaming is provided as a CLI read surface: `ab watch`
107
+ event transport. Streaming is provided by `ab watch`; unflagged watches are read-only.
108
+ Only CLI `--operator` watches write advisory liveness, never events or authority;
109
+ MCP presence registration is deferred. `ab watch`
103
110
  streams build and repository events by polling the same event logs client-side
104
111
  (the store protocol's `GET /builds/{slug}/events` and `GET /repos/{repo}/events`
105
112
  reads), not as a transport on this API. `triageState`, `readyState`,
@@ -156,10 +163,10 @@ Each kernel `spec.revised` records the exact artifact and operator identity
156
163
  Ticket-origin revisions re-pin assets; supplied bodies preserve asset pins.
157
164
  The node recollects and verifies the new revision, including on the same head
158
165
  and parent after a failed cycle. Earlier cycles remain historical evidence
159
- and cannot block or authorize landing under the replacement. Children keep
166
+ and cannot block or authorize merge under the replacement. Children keep
160
167
  their specs, claims and targets; contributions are not restarted.
161
168
  Active verification/reconcile or writer work, restack/reparent work, pause,
162
- pending controls, landing intent and ended PRs refuse the no-escalation path.
169
+ pending controls, merge intent and ended PRs refuse the no-escalation path.
163
170
  A concurrent state change refuses publication with a retry explanation;
164
171
  uncited artifacts are inert. Leaves still require an open escalation and
165
172
  restart from `plan`.
@@ -217,8 +224,7 @@ progress and unattempted builds. Unexpected failures are `500 internal`.
217
224
 
218
225
  The same deployment serves the web dashboard through `/api/web/repos/{repo}/…`.
219
226
  That route is not a second public bearer-token API: it requires a current
220
- Better Auth HTTP-only cookie, rechecks the deployment email and repository
221
- allowlists, rejects cross-origin JSON controls, and delegates only the dashboard,
227
+ Better Auth HTTP-only cookie, rechecks the deployment current organization membership and project registration, rejects cross-origin JSON controls, and delegates only the dashboard,
222
228
  build, settings, and harvest operator suffixes listed above. It replaces caller-supplied authorization/version
223
229
  headers with a server-minted token that expires after 30 seconds and carries
224
230
  the normalized signed-in email. Consequently every durable control event has
@@ -246,7 +252,10 @@ invocation hides the holder start or the latest stop. Other state reads retain
246
252
  their bounded semantics.
247
253
 
248
254
  Repository-following `ab watch` additionally emits a read-only `dispatcher.lost`
249
- observation when an observed lease expires without a matching stop. JSON carries
255
+ observation when an observed lease expires without a matching stop or validated
256
+ successor takeover. A completed ownership transfer suppresses predecessor loss
257
+ even while its sessions drain; a handoff without takeover still reports loss on
258
+ expiry. Successor loss and upgrade-failure/rollback attention remain independent. JSON carries
250
259
  `observation` instead of `event`, with run, observedAt, leaseExpiresAt and available
251
260
  identity, plus the usual repo/build/state/cursor fields. It invents no durable
252
261
  sequence or actor. Retain the cursor to avoid repeat reports across invocations.
@@ -264,7 +273,7 @@ The default watch reports actionable conditions only:
264
273
 
265
274
  - Build `escalation.raised`, `integration.landed`, `node.item-conflicted`, or
266
275
  conflicted `restack.replayed` events. `build.consent-ready` is the single
267
- signal for a ready consent or held landing, including first repository-wide
276
+ signal for a ready consent or held merge, including first repository-wide
268
277
  discovery. Its target has the queue entry shape `{kind, branch, ticket?, build?}`.
269
278
  Unready and stale candidates stay silent. `build.merge-decision` remains for
270
279
  current actionable merge-gate deferrals and unsafe forge outcomes, once per
@@ -309,7 +318,7 @@ learn their outcomes from status reconciliation at exit.
309
318
 
310
319
  `ab wait --for attention` is build-only and uses the same build conditions:
311
320
  current failed node verification, an open escalation, janitor failure attention,
312
- consent readiness, landing/conflict attention or a merge decision. Current failed
321
+ consent readiness, merge/conflict attention or a merge decision. Current failed
313
322
  verification satisfies attention even before its notification is written. Existing conditions return immediately,
314
323
  even with `--since`; live and backlog matches ignore routine outcomes and
315
324
  self-healing failures. A merge match uses the watch observation with
@@ -326,9 +335,9 @@ Metadata-only patches are accepted. Target validation and demotion guards apply
326
335
  to CLI, HTTP and MCP alike; unsupported sources refuse even explicit defaults
327
336
  or clears before changing other fields. Dispatch routing is unchanged.
328
337
 
329
- Landing controls use `land` and `hold` with acknowledged durable state. Land
330
- requires readiness and survives restacks; hold persists until land. Repository
331
- auto-merge settings are retired; configure ordered `[[landing]]` rules.
338
+ HTTP merge controls retain the wire actions `land` and `hold` with acknowledged durable state. Merge
339
+ requires readiness and survives restacks; hold persists until merge. Repository
340
+ auto-merge settings are retired; configure ordered `[[merge]]` rules.
332
341
 
333
342
  Default attention includes `build.janitor-failing` and
334
343
  `dispatcher.forge-persistent`. Raw `dispatcher.forge-degraded` and
@@ -373,3 +382,70 @@ repository attention. `dispatcher.rollback-hold-cleared` records a different
373
382
  successfully resolved target. The rollback hold survives store compatibility
374
383
  changes, resolution errors and upgrade opt-out; a new operator-launch lineage
375
384
  ignores old holds. Preflight failure suppression above remains separate.
385
+
386
+
387
+ ## Organization management (browser)
388
+
389
+ These same-origin cookie-session routes are the management contract. Mutations
390
+ require the exact `BETTER_AUTH_URL` Origin and `application/json`, accept at most
391
+ 8192 characters of JSON, and reject unsupported fields. Responses are private,
392
+ no-store. No client-supplied actor or role is trusted. Raw Better Auth
393
+ `/api/auth/organization/*` routes are disabled, including invitations.
394
+
395
+ ### Discovery and bootstrap
396
+
397
+ `GET /api/web/orgs` returns
398
+ `{isSuperUser,organizations:[{id,name,slug,ownerEmail,membershipRole}]}`.
399
+ Every admitted operator can discover their own organizations. Super users see
400
+ all organizations; their membershipRole is null where they are not members.
401
+ Roles are `owner` and `member`; ownerEmail is null for an ownerless organization.
402
+ Results sort by slug then ID. Members may inspect and read rosters in their own
403
+ organizations, including member emails. Foreign organizations return 403 before
404
+ resource detail. A multi-org member uses these IDs for explicit connect selection.
405
+
406
+ To bootstrap, sign in as a super user configured by
407
+ `AB_WEB_SUPER_USER_EMAILS`, then POST `{name,slug}` to `/api/web/orgs`.
408
+ The response is 201 `{organization}` in the discovery shape. Names are nonblank
409
+ and at most 100 characters; slugs are unique lowercase kebab strings of at most
410
+ 100 characters. Creation grants no membership. The account menu links every
411
+ operator to `/members`, and super users to `/organizations` and `/projects`.
412
+ These separate pages show acknowledged reads, refresh after writes, and confirm
413
+ member removal and project moves inline before writing.
414
+
415
+ Super users and the organization’s members can GET `/api/web/orgs/:orgId` for
416
+ `{organization,projects:[repo]}` with active owned projects and the caller’s actual
417
+ membershipRole. Only super users can GET `/api/web/projects/unassigned` for `{projects:[repo]}`. The latter
418
+ contains every active registered project without an assignment, including legacy
419
+ registrations; removed entries are excluded. Projects sort lexically.
420
+
421
+ ### Members and owner
422
+
423
+ Super users and the organization's members can GET
424
+ `/api/web/orgs/:orgId/members` for `{members:[{email,role,name,status}]}`.
425
+ `name` is a known persisted identity name or null; `status` is `joined` when a
426
+ normalized-email auth identity exists, otherwise `pending`. Grants are the roster
427
+ source; identities enrich them without duplicating rows. An existing identity
428
+ added to another organization is joined immediately.
429
+ Only super users and owners may POST `{email}` to that path for `{member}` or
430
+ DELETE `{email}` for `{removed:true}`.
431
+ Emails normalize before matching, grants work before first sign-in, and duplicate
432
+ adds preserve the existing role. An owner cannot remove themselves. Ordinary
433
+ members can read their own rosters but cannot mutate membership.
434
+
435
+ Only super users can PUT `{email:string|null}` to
436
+ `/api/web/orgs/:orgId/owner`, returning `{organization}`. A non-null owner must
437
+ already be a member. Transfer demotes the previous owner; null clears ownership.
438
+ Removing an owner as a super user also clears ownership. An org can have no owner.
439
+
440
+ ### Project assignment and errors
441
+
442
+ Only super users can PUT `{repo}` to `/api/web/orgs/:orgId/projects`, returning
443
+ `{repo,organizationId}`. The repo must be actively registered. This atomically
444
+ assigns or moves it. Registry removal retains assignment and history, but hides
445
+ the inactive project; re-registration restores that assignment.
446
+
447
+ Status codes are 401 for absent, malformed or expired sessions; 403 for admission
448
+ or role refusal; 400 for invalid inputs; 404 for missing resources after role
449
+ checks; 409 for duplicate slugs; and sanitized 503 for store outages. Foreign
450
+ projects return the same unknown-repository result as absent projects. Machine
451
+ credentials and the hosted-store administration CLI keep their existing behavior.