@defrex/autobuild 1.0.1 → 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.
- package/README.md +6 -6
- package/SPEC.md +360 -229
- package/docs/answering-blocked-builds.md +2 -2
- package/docs/architecture.md +155 -45
- package/docs/assets/headline-wide.png +0 -0
- package/docs/builds.md +4 -4
- package/docs/cli.md +4 -4
- package/docs/configuration-overview.md +4 -4
- package/docs/configuration.md +245 -210
- package/docs/dispatcher-hosting.md +2 -2
- package/docs/dispatcher.md +1 -1
- package/docs/forges.md +5 -5
- package/docs/getting-started.md +2 -2
- package/docs/glossary.md +6 -6
- package/docs/hosted-dispatcher.md +6 -3
- package/docs/hosted-service.md +16 -5
- package/docs/integration-overview.md +15 -15
- package/docs/integration-tree.md +45 -38
- package/docs/integration.md +6 -6
- package/docs/mcp.md +16 -15
- package/docs/{landing-policy.md → merge-policy.md} +42 -24
- package/docs/migration-1.0.md +17 -13
- package/docs/operating.md +41 -18
- package/docs/operator-api.md +91 -15
- package/docs/operator-surfaces.md +8 -4
- package/docs/overview.md +3 -3
- package/docs/remote-store-protocol.md +76 -11
- package/docs/remote-ticket-protocol.md +1 -1
- package/docs/restacking.md +54 -15
- package/docs/setup.md +41 -6
- package/docs/skills.md +1 -1
- package/docs/spec-standard.md +6 -6
- package/docs/ticket-dependencies.md +7 -7
- package/docs/tickets.md +8 -2
- package/docs/troubleshooting.md +2 -2
- package/docs/upgrading.md +8 -3
- package/docs/verification.md +60 -14
- package/package.json +7 -5
- package/packages/core/src/cli/binary-direct.ts +13 -1
- package/packages/core/src/cli/binary-lifecycle.ts +65 -2
- package/packages/core/src/cli/build-control.ts +83 -28
- package/packages/core/src/cli/context.ts +81 -38
- package/packages/core/src/cli/dashboard/facts.ts +2 -1
- package/packages/core/src/cli/dashboard/integration-detail.ts +8 -8
- package/packages/core/src/cli/dashboard/integration-row.ts +40 -13
- package/packages/core/src/cli/dashboard/landing-display.ts +25 -0
- package/packages/core/src/cli/dashboard/model.ts +56 -33
- package/packages/core/src/cli/dashboard/poll.ts +9 -3
- package/packages/core/src/cli/dashboard/render.ts +59 -37
- package/packages/core/src/cli/dashboard/target-distance.ts +14 -0
- package/packages/core/src/cli/dashboard/tree.ts +3 -2
- package/packages/core/src/cli/dispatch-args.ts +1 -1
- package/packages/core/src/cli/dispatch-frontend.ts +6 -3
- package/packages/core/src/cli/dispatch.ts +35 -9
- package/packages/core/src/cli/env.ts +4 -0
- package/packages/core/src/cli/help.ts +30 -23
- package/packages/core/src/cli/main.ts +24 -8
- package/packages/core/src/cli/node-verification-provenance.ts +1 -97
- package/packages/core/src/cli/publication-settlement.ts +43 -20
- package/packages/core/src/cli/repository-status.ts +20 -9
- package/packages/core/src/cli/status.ts +42 -5
- package/packages/core/src/cli/store-opening.ts +6 -1
- package/packages/core/src/cli/terminal.ts +22 -1
- package/packages/core/src/cli/terminals.ts +14 -10
- package/packages/core/src/cli/upgrade-landing.ts +70 -30
- package/packages/core/src/cli/upgrade.ts +3 -1
- package/packages/core/src/cli/wait.ts +15 -7
- package/packages/core/src/cli/watch-lifetime.ts +111 -0
- package/packages/core/src/cli/watch.ts +634 -511
- package/packages/core/src/config/effective-artifact.fixture.ts +27 -0
- package/packages/core/src/config/effective-artifact.ts +13 -0
- package/packages/core/src/config/landing.ts +1 -1
- package/packages/core/src/config/load.ts +21 -1
- package/packages/core/src/config/pipeline-source.ts +28 -0
- package/packages/core/src/config/reference-metadata.ts +2 -0
- package/packages/core/src/config/reference.ts +22 -7
- package/packages/core/src/config/schema.ts +86 -162
- package/packages/core/src/context-directory.ts +26 -0
- package/packages/core/src/distribution-packaging.ts +26 -5
- package/packages/core/src/events/catalog.ts +10 -2
- package/packages/core/src/events/globs.ts +1 -1
- package/packages/core/src/events/payloads.ts +70 -1
- package/packages/core/src/events/policy.ts +7 -0
- package/packages/core/src/events/repository.ts +2 -4
- package/packages/core/src/events/sessions.ts +6 -6
- package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +571 -0
- package/packages/core/src/kernel/auto-merge.ts +2 -2
- package/packages/core/src/kernel/engine.ts +255 -26
- package/packages/core/src/kernel/generators/leaf-restack-log.ts +10 -0
- package/packages/core/src/kernel/integration-landing.ts +3 -3
- package/packages/core/src/kernel/integration-state.ts +27 -4
- package/packages/core/src/kernel/leaf-restack-state.ts +28 -3
- package/packages/core/src/kernel/log-index.ts +13 -1
- package/packages/core/src/kernel/node-landing.ts +8 -8
- package/packages/core/src/kernel/node-parent.ts +2 -2
- package/packages/core/src/kernel/node-restack-transaction.ts +1 -1
- package/packages/core/src/kernel/node-verification-context.ts +216 -0
- package/packages/core/src/kernel/phases.ts +1 -1
- package/packages/core/src/kernel/plan-verify-selection.ts +16 -0
- package/packages/core/src/kernel/publication-retry.ts +168 -0
- package/packages/core/src/kernel/reconcile-restack.ts +29 -1
- package/packages/core/src/kernel/reducer.ts +82 -5
- package/packages/core/src/kernel/target-distance.ts +45 -0
- package/packages/core/src/kernel/terminal-guard.ts +10 -1
- package/packages/core/src/kernel/verify-stage-state.ts +123 -0
- package/packages/core/src/kernel/verify-stages.ts +39 -0
- package/packages/core/src/ontology.ts +1 -0
- package/packages/core/src/operator/annotations.ts +6 -0
- package/packages/core/src/operator/control.ts +1 -1
- package/packages/core/src/operator/index.ts +1 -7
- package/packages/core/src/operator/landings.ts +5 -1
- package/packages/core/src/operator/presentation.ts +6 -1
- package/packages/core/src/operator/query.ts +14 -18
- package/packages/core/src/operator/registry.ts +17 -6
- package/packages/core/src/operator/sandbox-host.ts +64 -40
- package/packages/core/src/operator/sandbox.ts +3 -0
- package/packages/core/src/operator/ticket-source-backend.ts +3 -12
- package/packages/core/src/ports/forge/contract.ts +2 -2
- package/packages/core/src/ports/forge/git-rewrite.ts +25 -2
- package/packages/core/src/ports/forge/github-readiness.ts +2 -2
- package/packages/core/src/ports/forge/github.ts +26 -7
- package/packages/core/src/ports/forge/local-git.ts +4 -4
- package/packages/core/src/ports/forge/readiness.ts +1 -1
- package/packages/core/src/ports/forge-failure.ts +24 -0
- package/packages/core/src/ports/workspace/build-execution.ts +3 -1
- package/packages/core/src/ports/workspace/phase-scratch.ts +4 -3
- package/packages/core/src/ports/workspace/vercel-sandbox.ts +59 -39
- package/packages/core/src/processes/build-child.ts +6 -8
- package/packages/core/src/processes/build-execution-state.ts +8 -5
- package/packages/core/src/processes/build-runner.ts +522 -98
- package/packages/core/src/processes/dispatcher.ts +186 -101
- package/packages/core/src/processes/execution-no-progress.ts +8 -1
- package/packages/core/src/processes/phase-failure-budget.ts +1 -0
- package/packages/core/src/processes/publication-loss.ts +8 -2
- package/packages/core/src/processes/publication-state.ts +42 -4
- package/packages/core/src/processes/repo-view.ts +14 -0
- package/packages/core/src/processes/verify-cycle-config.ts +96 -0
- package/packages/core/src/{integration → scenarios}/harness.ts +330 -317
- package/packages/core/src/store/adapter.ts +1 -0
- package/packages/core/src/store/build-scope.ts +9 -0
- package/packages/core/src/store/contract.ts +113 -1
- package/packages/core/src/store/local/schema.ts +13 -0
- package/packages/core/src/store/local/store.ts +42 -0
- package/packages/core/src/store/memory.ts +47 -0
- package/packages/core/src/store/operator-presence.ts +21 -0
- package/packages/core/src/store/phase-session.ts +10 -0
- package/packages/core/src/store/reducer-value-shapes.json +5081 -4160
- package/packages/core/src/store/remote/client.ts +47 -1
- package/packages/core/src/store/remote/compatibility.ts +2 -0
- package/packages/core/src/store/remote/protocol.ts +4 -0
- package/packages/core/src/store/remote/version.ts +3 -1
- package/packages/core/src/store/retention.ts +2 -3
- package/packages/core/src/store/session-handle.ts +9 -0
- package/packages/core/src/store/streams/session-writer.ts +1 -1
- package/packages/core/src/store/types.ts +12 -2
- package/packages/core/src/testing/index.ts +11 -1
- package/packages/core/src/testing/temp-directories.ts +58 -0
- package/skills/code-review/SKILL.md +23 -9
- package/skills/finalize/SKILL.md +15 -7
- package/skills/guide/SKILL.md +253 -118
- package/skills/guide/references/integration-tree.md +45 -38
- package/skills/guide/references/{landing-policy.md → merge-policy.md} +42 -24
- package/skills/guide/references/migration-1.0.md +17 -13
- package/skills/guide/references/operator-api.md +91 -15
- package/skills/guide/references/remote-store-protocol.md +76 -11
- package/skills/guide/references/remote-ticket-protocol.md +1 -1
- package/skills/guide/references/restacking.md +54 -15
- package/skills/guide/references/setup.md +41 -6
- package/skills/guide/references/spec-standard.md +6 -6
- package/skills/guide/references/ticket-dependencies.md +7 -7
- package/skills/implement/SKILL.md +43 -17
- package/skills/operate/SKILL.md +117 -116
- package/skills/plan/SKILL.md +39 -13
- package/skills/plan-review/SKILL.md +15 -10
- package/skills/reconcile/SKILL.md +22 -3
- package/skills/spec/SKILL.md +19 -19
- package/skills/tickets/SKILL.md +9 -7
- package/templates/autobuild.toml +1 -1
- package/templates/hosted-service/package.json +2 -2
- package/packages/core/src/orchestrator/approvals.ts +0 -115
- package/packages/core/src/orchestrator/conversation.ts +0 -167
- package/packages/core/src/orchestrator/model.ts +0 -86
- package/packages/core/src/orchestrator/prompt.ts +0 -63
- package/packages/core/src/orchestrator/tools.ts +0 -117
- package/packages/core/src/orchestrator/turn-runner.ts +0 -457
- package/packages/core/src/processes/orchestrator-tick.ts +0 -360
package/skills/operate/SKILL.md
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: operate
|
|
3
|
-
description: Orchestrate a repository's builds - file and groom tickets, watch builds, answer escalations, pause, resume, or abort builds, control
|
|
3
|
+
description: Orchestrate a repository's builds - file and groom tickets, watch builds, answer escalations, pause, resume, or abort builds, control merge consent, and drive work to merge. Use when asked to watch, shepherd, or orchestrate builds, whether from a coding-agent session at the repository root using the ab CLI or from an external connected agent using the operator tool registry.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Operating the repository
|
|
7
7
|
|
|
8
|
-
The operator agent
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
The operator agent operates the builds the repository's dispatcher dispatches:
|
|
9
|
+
files and grooms tickets, watches builds, answers escalations and drives authorized
|
|
10
|
+
work to merge. Any external agent can take the role through the CLI or MCP.
|
|
11
|
+
Filing sessions check presence before taking the role; with a live operator,
|
|
12
|
+
they leave operating context in the ticket and stop. Explicit human instructions
|
|
13
|
+
always override that default. Presence is advisory, permits concurrent operators,
|
|
14
|
+
and grants no exclusive authority. MCP presence registration is deferred.
|
|
15
15
|
|
|
16
16
|
The operator agent is not a build phase: it never runs pipeline steps, never
|
|
17
17
|
edits the repository, and never touches a build's checkout. Its reach is the
|
|
18
|
-
operator surface — the `ab` CLI, or the operator tool registry
|
|
19
|
-
hosted turn.
|
|
18
|
+
operator surface — the `ab` CLI, or the operator tool registry exposed through MCP.
|
|
20
19
|
|
|
21
20
|
Find your setting and read that section: **Running locally with the `ab`
|
|
22
|
-
CLI** if you are a session with a shell, **Running
|
|
21
|
+
CLI** if you are a session with a shell, **Running as an external connected agent** if
|
|
23
22
|
your tools are the registry's `builds.*` / `tickets.*` family. The sections
|
|
24
23
|
after them apply to both.
|
|
25
24
|
|
|
@@ -80,9 +79,16 @@ working directory, and actual version when you start orchestrating.
|
|
|
80
79
|
Every `ab …` example in this skill means this resolved invocation, run from
|
|
81
80
|
the same resolved working directory.
|
|
82
81
|
|
|
82
|
+
### Check presence before registering
|
|
83
|
+
|
|
84
|
+
Run `ab repository status --json` and inspect `operator.registrations`. If another
|
|
85
|
+
live operator is present, tell the human and do not become a second operator
|
|
86
|
+
unless directed. Otherwise arm a repository-wide `ab watch --operator --json`.
|
|
87
|
+
A flagged watch writes only mutable liveness, never events or a lease.
|
|
88
|
+
|
|
83
89
|
### Watch for attention events
|
|
84
90
|
|
|
85
|
-
`ab watch --json` is the standing monitor. Keep its default filter: every
|
|
91
|
+
`ab watch --operator --json` is the standing monitor. Keep its default filter: every
|
|
86
92
|
record calls for action. It reports failed node verification, build escalations, persistent janitor failures and merge decisions,
|
|
87
93
|
harvest escalations/recovery exhaustion, automatic upgrade failures and runtime rollbacks, rejected configuration, reloads needing
|
|
88
94
|
restart, abnormal dispatcher stops/loss, ticket-source and forge degradation past reset (15 minutes
|
|
@@ -92,7 +98,16 @@ on that retry stays silent. Source grace and cooldown-driven failures do not
|
|
|
92
98
|
start the tick-failure clock. Routine outcomes and self-healing failures stay silent.
|
|
93
99
|
|
|
94
100
|
Every record carries a cursor; bounded watches end with a bare `{"cursor": …}`
|
|
95
|
-
line.
|
|
101
|
+
line. Re-arm only with `ab watch --operator --json --since <watch-cursor>`,
|
|
102
|
+
using this standing watch's own cursor. Presence survives a re-arm gap of up to
|
|
103
|
+
five minutes after its last heartbeat on routine timeout/count completion.
|
|
104
|
+
Termination (SIGINT, SIGTERM, SIGHUP or stdout EPIPE) attempts withdrawal within
|
|
105
|
+
about two seconds; re-arming with the cursor re-registers the same ID/start.
|
|
106
|
+
Failed or unsupported withdrawal and SIGKILL fall back to TTL expiry.
|
|
107
|
+
`ab wait` neither heartbeats nor carries
|
|
108
|
+
registration identity. A separate unflagged diagnostic watch or wait must never
|
|
109
|
+
replace the standing monitor or supply its resume cursor.
|
|
110
|
+
Named diagnostic watches end when all named builds
|
|
96
111
|
are terminal; add `--repository` for repository attention. With no slugs all
|
|
97
112
|
active builds and repository attention are included. Reconcile status after
|
|
98
113
|
arming because historical build attention is silently baselined.
|
|
@@ -151,49 +166,36 @@ establish loss: a healthy lease can accompany a slow tick.
|
|
|
151
166
|
An unscoped watch, or a named watch with `--repository`, reports loss as a
|
|
152
167
|
read-only observation: `{repo, build:null, state:null, observation:{type:
|
|
153
168
|
"dispatcher.lost", run, observedAt, leaseExpiresAt, ...identity}, cursor}`.
|
|
169
|
+
A validated successor takeover suppresses predecessor loss even while its sessions
|
|
170
|
+
drain. An unfinished handoff without takeover still reports loss on lease expiry;
|
|
171
|
+
successor loss and upgrade-failure/rollback attention remain independent.
|
|
154
172
|
It has no durable event envelope. Keep its cursor just as for event records;
|
|
155
173
|
resuming it suppresses repeated loss reports for that run. Inspect repository
|
|
156
174
|
status to diagnose the condition and report dispatcher trouble to the human.
|
|
157
175
|
Neither a loss observation nor a later retry authorizes dispatcher intervention.
|
|
158
176
|
|
|
159
|
-
### Keep
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
`ab watch --json --since <cursor
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
(merged, closed, aborted) as that build's outcome, and an open escalation
|
|
182
|
-
or merge decision as attention to handle now.
|
|
183
|
-
4. When a watch returns records, react: read the record, inspect the build,
|
|
184
|
-
resolve attention using the shared rules; for a repository record inspect repository status and act
|
|
185
|
-
on its condition without assuming a build slug. Then re-arm from the last cursor. Keep your own
|
|
186
|
-
outcome table from status reconciliation after named-watch exit and bounded
|
|
187
|
-
watch timeouts. Default watches do not emit routine merge/completion records. A timeout (exit 3, or a watch
|
|
188
|
-
that ends with only a `{"cursor": …}` line) is not completion — reconcile
|
|
189
|
-
as in step 3, then re-arm from that cursor.
|
|
190
|
-
5. Stop only when every build in the set has an outcome in your table.
|
|
191
|
-
`pr.conflicted` is not terminal — reconcile follows. An open escalation
|
|
192
|
-
(`blocked`) needs a response, not patience. A watch that exits because
|
|
193
|
-
every named build is terminal still needs the step 3 status read to learn
|
|
194
|
-
how each ended.
|
|
195
|
-
6. Report each outcome to the human, and file or move tickets when the
|
|
196
|
-
outcome makes that obviously right.
|
|
177
|
+
### Keep going and adopt newly dispatched builds
|
|
178
|
+
|
|
179
|
+
Operate the builds the repository's dispatcher dispatches, including new builds
|
|
180
|
+
that appear after you arm. Finishing the initially queued set is no reason to stop.
|
|
181
|
+
|
|
182
|
+
1. Check presence as above, then arm `ab watch --operator --json` with no slugs.
|
|
183
|
+
Retain its own cursor and re-arm with
|
|
184
|
+
`ab watch --operator --json --since <watch-cursor>`.
|
|
185
|
+
2. Right after arming and after each timeout, run `ab builds --all --json`, adopt
|
|
186
|
+
newly dispatched builds, inspect active builds with `ab build status <slug> --json`,
|
|
187
|
+
and reconcile `ab repository status --json`. Historical attention is baselined
|
|
188
|
+
by a fresh watch, so status reconciliation closes the attachment gap.
|
|
189
|
+
3. Handle each attention record using the shared rules. Repository records have
|
|
190
|
+
no build slug: inspect repository status. Re-arm from the standing watch's
|
|
191
|
+
latest cursor, including its trailing cursor after a timeout or count exit.
|
|
192
|
+
4. Report each merged, closed or aborted outcome and file or move tickets when
|
|
193
|
+
warranted. A conflict or escalation requires action. Keep the standing watch
|
|
194
|
+
alive and keep discovering work until the human ends or hands off the role.
|
|
195
|
+
|
|
196
|
+
Use `ab wait` and named unflagged watches only as separate diagnostics. They
|
|
197
|
+
cannot replace the registered monitor or its cursor. In MCP, use the existing
|
|
198
|
+
registry monitoring tools; operator presence is not exposed there.
|
|
197
199
|
|
|
198
200
|
### Inspect
|
|
199
201
|
|
|
@@ -216,7 +218,7 @@ Read events with a cursor or a small `--events` count; logs are long.
|
|
|
216
218
|
resolves with a revised spec; `--revise-spec-from-ticket` imports an amended ticket.
|
|
217
219
|
Idle collecting or verification-failed nodes need no escalation and recollect
|
|
218
220
|
for verification on the same head; children and contributions remain intact.
|
|
219
|
-
Active work, pause, pending controls and
|
|
221
|
+
Active work, pause, pending controls and merge intent refuse revision. Leaves
|
|
220
222
|
require an escalation and restart from plan. Run `ab help answer` for the full menu.
|
|
221
223
|
- `ab pause <slug>` / `ab resume <slug>`; `ab pause --all` / `ab resume --all`
|
|
222
224
|
hold and release the whole repository. Pause immediately interrupts live agent
|
|
@@ -226,22 +228,22 @@ Read events with a cursor or a small `--events` count; logs are long.
|
|
|
226
228
|
check-only verify), pause still takes effect at the next boundary.
|
|
227
229
|
- `ab abort <slug>` — destructive: closes the PR, removes branches, and
|
|
228
230
|
returns the ticket to triage.
|
|
229
|
-
- `ab hold <slug>` — persistently hold a
|
|
230
|
-
- `ab
|
|
231
|
+
- `ab hold <slug>` — persistently hold a merge and revoke earlier consent.
|
|
232
|
+
- `ab merge <slug>` — consent to a ready merge and clear its hold. Consent
|
|
231
233
|
survives restacks and verification; use hold to withdraw it when work changes.
|
|
232
234
|
Read the matched policy, readiness, acknowledged command and gate deferral in
|
|
233
235
|
build status before acting. Work the consent queue by checking completeness
|
|
234
|
-
and current verification, then issuing
|
|
236
|
+
and current verification, then issuing merge for the chosen merge. A merge
|
|
235
237
|
acknowledgement accepts consent; it never promises that gates passed.
|
|
236
|
-
- Configure ordered `[[
|
|
238
|
+
- Configure ordered `[[merge]]` rules for project policy through ab-guide.
|
|
237
239
|
Repository auto-merge defaults and per-build auto-merge toggles are retired.
|
|
238
240
|
|
|
239
241
|
### Tickets
|
|
240
242
|
|
|
241
243
|
For feature sets you file yourself, consult the shared
|
|
242
244
|
[destination choice guidance](../ab-guide/references/integration-tree.md#choosing-a-destination):
|
|
243
|
-
explicitly choose root or a node, evaluate the repository's effective
|
|
244
|
-
policy, and explain the
|
|
245
|
+
explicitly choose root or a node, evaluate the repository's effective merge
|
|
246
|
+
policy, and explain the merge flow to the human. Ask when intent is unclear.
|
|
245
247
|
|
|
246
248
|
`ab ticket create|update|block|unblock|list|show|move|states` file, edit, and
|
|
247
249
|
move tickets; the `ab-tickets` skill covers the tracker's details. Moving a
|
|
@@ -254,47 +256,32 @@ The registry has operator notes, harvest control, and `discard`, which have no
|
|
|
254
256
|
CLI equivalent, and no bulk control beyond `pause --all` / `resume --all`. Say
|
|
255
257
|
so rather than improvising; tell the human, or record it with `ab observe`
|
|
256
258
|
when you are inside a build. `ab mcp` mounts the same registry over MCP for
|
|
257
|
-
harnesses that support it — if you have those tools, the
|
|
259
|
+
harnesses that support it — if you have those tools, the connected-agent section's tool
|
|
258
260
|
descriptions apply.
|
|
259
261
|
|
|
260
|
-
## Running
|
|
262
|
+
## Running as an external connected agent
|
|
261
263
|
|
|
262
|
-
This section applies when
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
repository
|
|
264
|
+
This section applies when an external agent harness connects to the operator
|
|
265
|
+
registry through MCP. With a shell and the `ab` CLI, use the section above.
|
|
266
|
+
Follow each advertised tool schema, including its repository arguments; do not
|
|
267
|
+
assume repository identity is injected into calls.
|
|
266
268
|
|
|
267
269
|
### How you run
|
|
268
270
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
- Every tool call is attributed to the session owner — the human account
|
|
277
|
-
named on every write is that owner, with your session as the delegate.
|
|
278
|
-
Act accordingly: you are spending their authority.
|
|
279
|
-
- Your tools target exactly one repository, the session's own. You never
|
|
280
|
-
supply a repository argument; it is bound for you.
|
|
271
|
+
Your external harness owns the conversation, scheduling, output, checkpoints
|
|
272
|
+
and concurrency. The service does not load your prompt or operator notes, run
|
|
273
|
+
a durable agent loop, deliver wake messages, or resume you on a timer.
|
|
274
|
+
Read notes and current repository facts explicitly before acting. Tool writes
|
|
275
|
+
use the authenticated binding's operator identity: local MCP uses the local
|
|
276
|
+
operator identity, and hosted MCP uses the authenticated user's authority.
|
|
277
|
+
Do not assume session-owner delegation or a runner-provided repository scope.
|
|
281
278
|
|
|
282
|
-
###
|
|
279
|
+
### Human approvals
|
|
283
280
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
provider call — with the identical conversation. Never assume a turn
|
|
289
|
-
died; never repeat work a checkpoint already covers.
|
|
290
|
-
- **Approval.** Some tools are on the repository's approval list. Calling
|
|
291
|
-
one suspends your turn (`cause: approval`) until the human answers.
|
|
292
|
-
An `approve` answer executes the call; a `deny` answer hands you a denied
|
|
293
|
-
tool output — treat it as a firm no, say so briefly, and move on. Tools
|
|
294
|
-
not on the list run without pause.
|
|
295
|
-
|
|
296
|
-
When suspended, just stop cleanly. Anything important you want to say should
|
|
297
|
-
already be in your streamed output before the suspension point.
|
|
281
|
+
Respect a human denial as a firm no. Any approval or suspension flow in your
|
|
282
|
+
external harness belongs to that harness. Hosted session approval answers are
|
|
283
|
+
durable records only; the service does not execute approved calls or resume
|
|
284
|
+
agents. Do not repeat completed work when your harness resumes.
|
|
298
285
|
|
|
299
286
|
### The tool surface
|
|
300
287
|
|
|
@@ -327,7 +314,7 @@ that does the job, and say what you are doing before you do it:
|
|
|
327
314
|
genuinely conforms and the human's intent is clear.
|
|
328
315
|
- `notes.read`, `notes.write` — the operator-notes artifact: durable,
|
|
329
316
|
human-readable notes about this repository's operation. Write what the
|
|
330
|
-
next
|
|
317
|
+
next operator or human will need; explicitly read it before acting on
|
|
331
318
|
anything you'd otherwise guess.
|
|
332
319
|
- `repository.settings` and `repository.bulk_control` — repository-wide
|
|
333
320
|
switches; use sparingly and only on clear instruction.
|
|
@@ -339,17 +326,17 @@ report it, adapt, and carry on.
|
|
|
339
326
|
|
|
340
327
|
### The attention set
|
|
341
328
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
329
|
+
Obtain current facts through supported status, event and monitoring reads.
|
|
330
|
+
Notifications may be stale; reconcile current state before acting on routine
|
|
331
|
+
outcomes or self-healing failures. The service does not automatically deliver
|
|
332
|
+
wake payloads to your external harness.
|
|
346
333
|
|
|
347
334
|
Treat every default-watch record as a call to act:
|
|
348
335
|
|
|
349
336
|
- `integration.verification-failed`: inspect the failed steps, verified head and parent, then recheck current status. If the node still needs that repair, file a repair child targeting it. Each current failed cycle reports once; recovery does not backfill superseded failures. The node may have advanced after notification.
|
|
350
337
|
- `escalation.raised`: inspect the question and evidence, then resolve it using
|
|
351
338
|
the shared rules.
|
|
352
|
-
- `build.consent-ready`: inspect the one consent queue, then
|
|
339
|
+
- `build.consent-ready`: inspect the one consent queue, then merge or hold the
|
|
353
340
|
selected candidate under the human's policy. Unready or stale candidates
|
|
354
341
|
do not produce this observation.
|
|
355
342
|
- `build.merge-decision`: diagnose the current merge-gate deferral or unsafe
|
|
@@ -444,8 +431,8 @@ for the exceptions above.
|
|
|
444
431
|
observe it with a tool, say you cannot observe it.
|
|
445
432
|
- You never invent repository identity, ticket ids, or build slugs; every
|
|
446
433
|
id you act on came from a tool result or the conversation.
|
|
447
|
-
-
|
|
448
|
-
|
|
434
|
+
- External harnesses own concurrency and incoming-message handling; the
|
|
435
|
+
service provides no one-turn-at-a-time or queued-message execution guarantee.
|
|
449
436
|
- Where operator notes exist (hosted), they are shared ground truth; keep
|
|
450
437
|
them current when you learn something durable.
|
|
451
438
|
|
|
@@ -456,33 +443,33 @@ its integration build collects child contributions on its recorded branch.
|
|
|
456
443
|
A target is the destination of a contribution. `ab ticket tree --json` (MCP
|
|
457
444
|
`tickets.tree`) shows exhaustive source metadata, including completed tickets
|
|
458
445
|
and empty nodes. A claimed build freezes its effective target; use build status
|
|
459
|
-
or queue entries for
|
|
446
|
+
or queue entries for merge ancestry after a source ticket changes.
|
|
460
447
|
|
|
461
|
-
Start with `ab
|
|
462
|
-
ready
|
|
448
|
+
Start with `ab merges --json` (MCP `merges.list`). This is the one queue of
|
|
449
|
+
ready merges needing a decision: consent-policy candidates and held ready
|
|
463
450
|
candidates. Entries include the target, branch preview, candidate head/parent,
|
|
464
451
|
verification receipts and node children/completeness. Unknown completeness is
|
|
465
452
|
not zero children. A changed head or parent must regain current verification;
|
|
466
453
|
unfinished or automatically authorized candidates do not ask for attention.
|
|
467
454
|
|
|
468
|
-
Select a queue build in the terminal and use `l
|
|
469
|
-
`ab
|
|
470
|
-
or `hold`. Hold is available before readiness and suppresses automatic
|
|
471
|
-
|
|
455
|
+
Select a queue build in the terminal and use `l merge` or `o hold`, or run
|
|
456
|
+
`ab merge <slug>` / `ab hold <slug>`. MCP uses `builds.control` with action `merge`
|
|
457
|
+
or `hold`. Hold is available before readiness and suppresses automatic merge.
|
|
458
|
+
Merge rechecks readiness and live node completeness, so act on failures by
|
|
472
459
|
refreshing the facts. Open children keep a node collecting. When integration
|
|
473
|
-
verification fails, file a repair child targeting that node and let it
|
|
460
|
+
verification fails, file a repair child targeting that node and let it merge
|
|
474
461
|
before retrying the node cycle.
|
|
475
462
|
|
|
476
|
-
Watch for decisions and conflicts with `ab watch --json`; save its opaque cursor
|
|
477
|
-
and resume with `ab watch --since <cursor> --json`. Default attention includes
|
|
478
|
-
failed node verification (`integration.verification-failed`), node
|
|
479
|
-
`build.consent-ready` observations, including already-ready
|
|
463
|
+
Watch for decisions and conflicts with `ab watch --operator --json`; save its opaque cursor
|
|
464
|
+
and resume with `ab watch --operator --since <watch-cursor> --json`. Default attention includes
|
|
465
|
+
failed node verification (`integration.verification-failed`), node merges, node item conflicts, conflicted leaf replays and derived
|
|
466
|
+
`build.consent-ready` observations, including already-ready merges on first
|
|
480
467
|
repository-wide discovery. Readiness is identified by its durable
|
|
481
468
|
entry position: resuming suppresses the same episode, while a new candidate or
|
|
482
469
|
exit/re-entry can notify again. Explicit `--event` globs remain event-only.
|
|
483
|
-
Use `ab wait --for consent --for node-
|
|
470
|
+
Use `ab wait --for consent --for node-merged --for restack-conflicted --json`
|
|
484
471
|
for one wake; state waits return immediately when already satisfied. `--for
|
|
485
|
-
attention` also includes current failed node verification, consent readiness, janitor failure attention and
|
|
472
|
+
attention` also includes current failed node verification, consent readiness, janitor failure attention and merge/conflict attention.
|
|
486
473
|
Resume event backlogs with `--since <cursor>`; keep handling emitted records
|
|
487
474
|
before interpreting terminal completion.
|
|
488
475
|
|
|
@@ -497,6 +484,20 @@ raise with its own event type.
|
|
|
497
484
|
|
|
498
485
|
## Forge failure recovery
|
|
499
486
|
|
|
487
|
+
Leaf restack and reconcile publication retry classified transient forge or transport
|
|
488
|
+
failures six times after the initial attempt, waiting 30, 60, 120, 240, 300 and
|
|
489
|
+
300 seconds. `publication.retry-scheduled` records the operation, frozen rewrite
|
|
490
|
+
identity, episode anchor, failure ordinal, last error and absolute retry time;
|
|
491
|
+
restart resumes that schedule without rerunning the resolver. These retries do
|
|
492
|
+
not consume `maxPhaseAttempts`. A seventh transient failure records
|
|
493
|
+
`publication.retry-exhausted` and raises `publication-retry-limit`, naming the last
|
|
494
|
+
error and six retries. Answering that escalation opens a fresh publication episode
|
|
495
|
+
for the same retained intent without resetting agent phase failures. Pending
|
|
496
|
+
publication keeps its workspace through backoff and unresolved exhaustion.
|
|
497
|
+
Classified rate limits retain repository cooldown and consume no publication
|
|
498
|
+
retry allowance. Rejected pushes, lease conflicts, dirty trees and unclassified
|
|
499
|
+
errors retain their existing behavior.
|
|
500
|
+
|
|
500
501
|
Janitor failures are durable per-build episodes. Eligible failures retry after
|
|
501
502
|
30, 60, 120, 240 seconds, then at the configured cap (300 seconds by default).
|
|
502
503
|
Skipped polls preserve the episode across restart. After
|
|
@@ -507,7 +508,7 @@ clears it. `policy.janitorBackoffMaxSeconds` sets the positive integer cap.
|
|
|
507
508
|
A classified forge rate limit records repository degradation with `resetAt`.
|
|
508
509
|
Forge work waits during cooldown; passing the deadline permits a recovery
|
|
509
510
|
request, and only success clears degradation. A further limit extends cooldown.
|
|
510
|
-
Native
|
|
511
|
+
Native merge application failures keep candidate-specific retry eligibility,
|
|
511
512
|
including automatic decisions without a human command. Retries recheck consent,
|
|
512
513
|
holds, verification and the exact candidate. Uncertain enables remain pending
|
|
513
514
|
until cancellation can be confirmed after cooldown. Publication retries reuse
|
|
@@ -531,7 +532,7 @@ using exact-resource ETags; authenticated 304s spare the REST primary quota.
|
|
|
531
532
|
Adapter caches are bounded and restart/eviction falls back to fresh reads.
|
|
532
533
|
Writes, including Git publication and rewrites, invalidate observations before
|
|
533
534
|
attempting the mutation so acknowledgement reads remain fresh. Leaf PR polling
|
|
534
|
-
keeps its existing cadence. Readiness and
|
|
535
|
+
keeps its existing cadence. Readiness and merge inspections remain fresh.
|
|
535
536
|
|
|
536
537
|
For node cadence, durable wakes, restart behavior and CLI evidence, see
|
|
537
538
|
[node polling and status](../ab-guide/references/integration-tree.md#polling-and-status).
|
|
@@ -547,7 +548,7 @@ Shared requests are attributed to their first requester; cache hits count zero.
|
|
|
547
548
|
An open collecting node may intentionally trail its parent. Parent movement is
|
|
548
549
|
observed without starting replay. Use `ab restack <node>` (or `builds.restack`
|
|
549
550
|
with `{repo, slug}`) to request freshness; paused or blocked nodes retain the
|
|
550
|
-
request until their ordinary safety gates permit it. Completeness,
|
|
551
|
+
request until their ordinary safety gates permit it. Completeness, merge,
|
|
551
552
|
queued dependency presence and accepted re-parenting supply automatic demand.
|
|
552
553
|
Nested nodes need independent demand. Inspect the shared parent commit distance
|
|
553
554
|
readout; unknown is unavailable evidence, not zero. Existing transactions finish
|
package/skills/plan/SKILL.md
CHANGED
|
@@ -11,18 +11,32 @@ write product code in this phase.
|
|
|
11
11
|
|
|
12
12
|
Guidance is an external operator answer, from the operator agent or a human.
|
|
13
13
|
|
|
14
|
+
Scratch output, downloaded references, probes, and temporary scripts belong under `.ab/`
|
|
15
|
+
(prefer the current `$AB_CONTEXT_DIR` when appropriate), never at the worktree
|
|
16
|
+
root, and must not be committed. Manifest-directed artifact paths remain authoritative.
|
|
17
|
+
|
|
18
|
+
Large scratch belongs under the session's `.ab/` directory (prefer `$AB_CONTEXT_DIR`),
|
|
19
|
+
not `/tmp`: this includes ad-hoc PostgreSQL data/cluster directories, Cargo target
|
|
20
|
+
directories, browser profiles, and database copies. Configure `PGDATA`,
|
|
21
|
+
`CARGO_TARGET_DIR`, and explicit browser profile paths for those resources.
|
|
22
|
+
Keep `TMPDIR` outside the worktree for test suites and commands that discover
|
|
23
|
+
repositories or configuration through parent directories, including focused tests
|
|
24
|
+
and Git probes. Do not relocate required installed tooling or retained evidence;
|
|
25
|
+
manifest-directed artifact paths remain authoritative. Never commit scratch.
|
|
26
|
+
|
|
27
|
+
|
|
14
28
|
## Session shape
|
|
15
29
|
|
|
16
|
-
1. Run `ab context` first. It hydrates
|
|
17
|
-
|
|
18
|
-
commands, and this round's `feedback` when the round has any),
|
|
19
|
-
(the contract you plan against),
|
|
20
|
-
once you have one, and this round's feedback:
|
|
21
|
-
reviewer's findings) or
|
|
30
|
+
1. Run `ab context` first. It hydrates `$AB_CONTEXT_DIR/` with everything you may see:
|
|
31
|
+
`$AB_CONTEXT_DIR/context.json` (the manifest — your required deposits, allowed terminal
|
|
32
|
+
commands, and this round's `feedback` when the round has any), `$AB_CONTEXT_DIR/spec.md`
|
|
33
|
+
(the contract you plan against), `$AB_CONTEXT_DIR/ticket.md`, your prior plan revision
|
|
34
|
+
once you have one, and this round's feedback: `$AB_CONTEXT_DIR/findings.json` (the
|
|
35
|
+
reviewer's findings) or `$AB_CONTEXT_DIR/guidance.json` (an operator's answer to
|
|
22
36
|
the escalation that blocked this build). A round never carries both, and a
|
|
23
37
|
round may carry neither.
|
|
24
38
|
When the manifest lists `assets`, they are the build's pinned ticket assets
|
|
25
|
-
under
|
|
39
|
+
under `$AB_CONTEXT_DIR/assets/<kind>/<name>/`; read them with the spec. A `design` asset
|
|
26
40
|
is a contract on observable visual and reference outcomes, not on implementation — the plan must satisfy it, while how stays yours. The spec cites
|
|
27
41
|
assets by kind and name.
|
|
28
42
|
2. Read the spec, then the codebase. The spec says what and why; you decide
|
|
@@ -33,10 +47,10 @@ Guidance is an external operator answer, from the operator agent or a human.
|
|
|
33
47
|
identifier constraints; memory, nearby adapter code, and passing tests over
|
|
34
48
|
a fake or mock are not evidence of the real contract because they can
|
|
35
49
|
repeat the author's assumption.
|
|
36
|
-
3. Write the plan to
|
|
50
|
+
3. Write the plan to `$AB_CONTEXT_DIR/plan.md`, deposit it, and finish:
|
|
37
51
|
|
|
38
52
|
```
|
|
39
|
-
ab artifact put plan
|
|
53
|
+
ab artifact put plan "$AB_CONTEXT_DIR/plan.md"
|
|
40
54
|
ab done
|
|
41
55
|
```
|
|
42
56
|
|
|
@@ -57,7 +71,7 @@ Read `autobuild.toml` before writing the plan:
|
|
|
57
71
|
path-glob calculation.
|
|
58
72
|
|
|
59
73
|
Put the selection in an opening TOML front-matter block in the same
|
|
60
|
-
|
|
74
|
+
`$AB_CONTEXT_DIR/plan.md` artifact:
|
|
61
75
|
|
|
62
76
|
```toml
|
|
63
77
|
+++
|
|
@@ -79,6 +93,13 @@ deposit a fresh corrected plan revision and retry. `plan-review` sees and
|
|
|
79
93
|
reviews this block as part of the plan—there is no separate artifact or
|
|
80
94
|
verdict.
|
|
81
95
|
|
|
96
|
+
If the approved selection later names any step absent from the cycle's pinned
|
|
97
|
+
configured universe, the entire selection falls back to all configured optional
|
|
98
|
+
steps. The kernel records one observation per cycle and plan revision naming
|
|
99
|
+
the unknown steps. Mandatory steps, path applicability and post-reconcile policy
|
|
100
|
+
still apply. A valid selection continues to skip genuinely omitted optional
|
|
101
|
+
steps. Strict validation when depositing a new plan is unchanged.
|
|
102
|
+
|
|
82
103
|
## What a plan contains
|
|
83
104
|
|
|
84
105
|
- **Approach** — the shape of the change and why this shape, in a few
|
|
@@ -102,10 +123,10 @@ ab observe --kind followup "…"
|
|
|
102
123
|
## Feedback rounds
|
|
103
124
|
|
|
104
125
|
A round that carries feedback carries exactly one kind, and only that file
|
|
105
|
-
exists.
|
|
126
|
+
exists. `$AB_CONTEXT_DIR/findings.json` is the reviewer's findings against your previous
|
|
106
127
|
revision: address every one — change the plan, or state in the plan why the
|
|
107
128
|
finding is wrong (the reviewer sees your revision next round).
|
|
108
|
-
|
|
129
|
+
`$AB_CONTEXT_DIR/guidance.json` is an operator's answer to the escalation that blocked
|
|
109
130
|
this build. It may have been raised by you or the reviewer, or by the kernel's
|
|
110
131
|
plan-loop stall or policy guards. The file carries the escalation id and the
|
|
111
132
|
answer text.
|
|
@@ -128,8 +149,13 @@ If the spec is contradictory, unbuildable, or wrong — do not plan around it.
|
|
|
128
149
|
Park the build for a human:
|
|
129
150
|
|
|
130
151
|
```
|
|
131
|
-
ab escalate "…the question, concretely…" --refs
|
|
152
|
+
ab escalate "…the question, concretely…" --refs "$AB_CONTEXT_DIR/spec.md"
|
|
132
153
|
```
|
|
133
154
|
|
|
134
155
|
This is also a terminal command; use exactly one of `ab done` or
|
|
135
156
|
`ab escalate` per session.
|
|
157
|
+
|
|
158
|
+
Read the manifest path printed by `ab context`. Its `materialized` keys are
|
|
159
|
+
relative to `contextDir`: join them to locate collision-adjusted inputs.
|
|
160
|
+
Manifest path fields are workspace-relative; use `notesPath` for producer notes.
|
|
161
|
+
Run commands from the workspace root.
|
|
@@ -11,15 +11,15 @@ verdict travels the typed channel; nothing you print matters to the pipeline.
|
|
|
11
11
|
|
|
12
12
|
## Session shape
|
|
13
13
|
|
|
14
|
-
1. Run `ab context`. You get
|
|
15
|
-
and
|
|
16
|
-
marking, not for deference. When present,
|
|
14
|
+
1. Run `ab context`. You get `$AB_CONTEXT_DIR/spec.md`, `$AB_CONTEXT_DIR/plan.md` (latest revision),
|
|
15
|
+
and `$AB_CONTEXT_DIR/history/` with every prior round's findings — for persistence
|
|
16
|
+
marking, not for deference. When present, `$AB_CONTEXT_DIR/dismissed-findings.json`
|
|
17
17
|
lists finding ids a human explicitly dismissed.
|
|
18
18
|
2. Judge the plan on exactly these axes:
|
|
19
19
|
- **Spec conformance** — does executing this plan satisfy every
|
|
20
20
|
acceptance criterion? Does anything in it exceed the spec's scope? A
|
|
21
|
-
pinned `design` asset (listed under `assets` in
|
|
22
|
-
under
|
|
21
|
+
pinned `design` asset (listed under `assets` in `$AB_CONTEXT_DIR/context.json`, files
|
|
22
|
+
under `$AB_CONTEXT_DIR/assets/<kind>/<name>/`) is a contract on observable visual and reference outcomes, not on implementation: open it and flag a plan that
|
|
23
23
|
contradicts or ignores it, as you would an unmet criterion. A gap in the
|
|
24
24
|
asset is not a reason to invent requirements.
|
|
25
25
|
- **Groundedness** — do the files and seams it names actually exist and
|
|
@@ -42,13 +42,13 @@ verdict travels the typed channel; nothing you print matters to the pipeline.
|
|
|
42
42
|
unjustified omission or addition like any other plan defect. Mandatory
|
|
43
43
|
`always = true` steps must be present; no front matter means the safe
|
|
44
44
|
default of all configured steps.
|
|
45
|
-
3. Write your review notes to
|
|
45
|
+
3. Write your review notes to `$AB_CONTEXT_DIR/plan-review.md`, then deliver exactly one
|
|
46
46
|
verdict:
|
|
47
47
|
|
|
48
48
|
```
|
|
49
|
-
ab verdict approve --notes
|
|
50
|
-
ab verdict revise --findings
|
|
51
|
-
ab verdict escalate --reason "…" --notes
|
|
49
|
+
ab verdict approve --notes "$AB_CONTEXT_DIR/plan-review.md"
|
|
50
|
+
ab verdict revise --findings "$AB_CONTEXT_DIR/findings.json" --notes "$AB_CONTEXT_DIR/plan-review.md"
|
|
51
|
+
ab verdict escalate --reason "…" --notes "$AB_CONTEXT_DIR/plan-review.md"
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
## Writing findings
|
|
@@ -68,7 +68,7 @@ Findings are structured JSON (the CLI validates and stamps ids):
|
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
- `severity`: `blocking` | `important` | `minor`, calibrated below.
|
|
71
|
-
- `persists`: if a prior round's finding (see
|
|
71
|
+
- `persists`: if a prior round's finding (see `$AB_CONTEXT_DIR/history/`) is still
|
|
72
72
|
unresolved — the same disagreement, even if reworded — list its id here.
|
|
73
73
|
This is judgment only you can apply.
|
|
74
74
|
|
|
@@ -123,3 +123,8 @@ would have written it. Known immaterial defects are not a reason to withhold
|
|
|
123
123
|
approval — record them with `ab observe` and approve. Escalate when the
|
|
124
124
|
*spec* is the problem (contradictory or unbuildable); revise when the plan
|
|
125
125
|
is.
|
|
126
|
+
|
|
127
|
+
Read the manifest path printed by `ab context`. Its `materialized` keys are
|
|
128
|
+
relative to `contextDir`: join them to locate collision-adjusted inputs.
|
|
129
|
+
Manifest path fields are workspace-relative; use `notesPath` for producer notes.
|
|
130
|
+
Run commands from the workspace root.
|
|
@@ -7,7 +7,7 @@ description: Resolve the kernel-prepared replay of a build's single change onto
|
|
|
7
7
|
|
|
8
8
|
The kernel has collapsed this build's contribution into one change and replayed
|
|
9
9
|
it onto a frozen refreshed base. Your job is to preserve both the build's intent
|
|
10
|
-
and the behavior already
|
|
10
|
+
and the behavior already merged upstream. Work on the prepared detached HEAD;
|
|
11
11
|
the kernel retains the published branch until guarded publication succeeds.
|
|
12
12
|
|
|
13
13
|
For a node conflict, `nodeChange` names the integration owner, transaction,
|
|
@@ -21,10 +21,24 @@ integration owner's. `ab done` retains the item and records its receipt; trusted
|
|
|
21
21
|
kernel plumbing advances the remaining stack after the session ends. Do not
|
|
22
22
|
publish, collapse the node, choose another item, or rewrite the public branch.
|
|
23
23
|
|
|
24
|
+
Scratch output, downloaded references, probes, and temporary scripts belong under `.ab/`
|
|
25
|
+
(prefer the current `$AB_CONTEXT_DIR` when appropriate), never at the worktree
|
|
26
|
+
root, and must not be committed. Manifest-directed artifact paths remain authoritative.
|
|
27
|
+
|
|
28
|
+
Large scratch belongs under the session's `.ab/` directory (prefer `$AB_CONTEXT_DIR`),
|
|
29
|
+
not `/tmp`: this includes ad-hoc PostgreSQL data/cluster directories, Cargo target
|
|
30
|
+
directories, browser profiles, and database copies. Configure `PGDATA`,
|
|
31
|
+
`CARGO_TARGET_DIR`, and explicit browser profile paths for those resources.
|
|
32
|
+
Keep `TMPDIR` outside the worktree for test suites and commands that discover
|
|
33
|
+
repositories or configuration through parent directories, including focused tests
|
|
34
|
+
and Git probes. Do not relocate required installed tooling or retained evidence;
|
|
35
|
+
manifest-directed artifact paths remain authoritative. Never commit scratch.
|
|
36
|
+
|
|
37
|
+
|
|
24
38
|
## Session shape
|
|
25
39
|
|
|
26
40
|
1. Run `ab context`. Read the printed manifest and its `materialized` paths for
|
|
27
|
-
the spec, approved plan, implement-notes, and any
|
|
41
|
+
the spec, approved plan, implement-notes, and any `$AB_CONTEXT_DIR/guidance.json` guidance. `replay` names the
|
|
28
42
|
original head, old contribution base, single change, frozen target base and
|
|
29
43
|
whether replay conflicted. A replay may originate at verify entry before any
|
|
30
44
|
PR exists; `restackId` identifies an adopted automatic transaction. Never fetch, merge, rebase, select another base,
|
|
@@ -32,7 +46,7 @@ publish, collapse the node, choose another item, or rewrite the public branch.
|
|
|
32
46
|
2. Inspect `git status` and the prepared replay. If conflicts remain, resolve
|
|
33
47
|
them with the explicit charge to regress against neither side:
|
|
34
48
|
- Preserve the behavior the spec and approved plan require.
|
|
35
|
-
- Preserve the behavior already
|
|
49
|
+
- Preserve the behavior already merged on the target base.
|
|
36
50
|
Stage only the resolved files and run `git cherry-pick --continue`. If the
|
|
37
51
|
change is now redundant, preserve an empty commit with `git commit
|
|
38
52
|
--allow-empty --no-edit`; never skip away the build's identity. A clean
|
|
@@ -72,3 +86,8 @@ A human answer in guidance is authoritative while the spec remains the contract.
|
|
|
72
86
|
If they cannot both be satisfied, escalate the contradiction. Reconcile has no
|
|
73
87
|
code-review round; risky resolutions need human judgment. The only successful
|
|
74
88
|
terminal commands are `ab done` and `ab escalate`.
|
|
89
|
+
|
|
90
|
+
Read the manifest path printed by `ab context`. Its `materialized` keys are
|
|
91
|
+
relative to `contextDir`: join them to locate collision-adjusted inputs.
|
|
92
|
+
Manifest path fields are workspace-relative; use `notesPath` for producer notes.
|
|
93
|
+
Run commands from the workspace root.
|