@defrex/autobuild 0.13.0 → 1.0.0-beta.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 +5 -3
- package/SPEC.md +673 -99
- package/bin/ab-dispatch-kernel.ts +4 -6
- package/docs/architecture.md +322 -75
- package/docs/assets/headline-wide.png +0 -0
- package/docs/configuration.md +112 -12
- package/docs/hosted-service.md +20 -2
- package/docs/integration-tree.md +117 -0
- package/docs/landing-policy.md +150 -0
- package/docs/mcp.md +24 -0
- package/docs/migration-1.0.md +68 -0
- package/docs/operator-api.md +20 -9
- package/docs/remote-store-protocol.md +114 -9
- package/docs/remote-ticket-protocol.md +26 -5
- package/docs/restacking.md +79 -0
- package/docs/setup.md +49 -6
- package/docs/ticket-dependencies.md +69 -0
- package/docs/ticket-migration.md +8 -0
- package/package.json +4 -3
- package/packages/core/src/cli/attention.ts +40 -163
- package/packages/core/src/cli/build-control.ts +75 -55
- package/packages/core/src/cli/bulk-control.ts +3 -2
- package/packages/core/src/cli/context.ts +68 -78
- package/packages/core/src/cli/dashboard/actions.ts +6 -3
- package/packages/core/src/cli/dashboard/landing-display.ts +6 -0
- package/packages/core/src/cli/dashboard/live.ts +5 -0
- package/packages/core/src/cli/dashboard/model.ts +178 -40
- package/packages/core/src/cli/dashboard/poll.ts +15 -9
- package/packages/core/src/cli/dashboard/refresh.ts +176 -0
- package/packages/core/src/cli/dashboard/render.ts +78 -28
- package/packages/core/src/cli/dashboard/repository-poll.ts +57 -0
- package/packages/core/src/cli/dashboard/selection.ts +7 -1
- package/packages/core/src/cli/dashboard/tree.ts +107 -0
- package/packages/core/src/cli/dispatch-frontend.ts +173 -169
- package/packages/core/src/cli/dispatch-process.ts +14 -7
- package/packages/core/src/cli/dispatch-repository-feed.ts +196 -0
- package/packages/core/src/cli/dispatch.ts +397 -214
- package/packages/core/src/cli/dispatcher-liveness.ts +41 -21
- package/packages/core/src/cli/harvest.ts +71 -39
- package/packages/core/src/cli/help.ts +49 -32
- package/packages/core/src/cli/historical-build-state.ts +27 -0
- package/packages/core/src/cli/init-validation.ts +43 -2
- package/packages/core/src/cli/keyboard.ts +6 -0
- package/packages/core/src/cli/landings.ts +18 -0
- package/packages/core/src/cli/main.ts +52 -18
- package/packages/core/src/cli/mcp.ts +9 -0
- package/packages/core/src/cli/pr-attachments.ts +10 -13
- package/packages/core/src/cli/pr-summary-publication.ts +27 -60
- package/packages/core/src/cli/pr-summary.ts +43 -13
- package/packages/core/src/cli/publication-settlement.ts +177 -21
- package/packages/core/src/cli/repository-status.ts +49 -2
- package/packages/core/src/cli/status.ts +133 -36
- package/packages/core/src/cli/terminal-restore.ts +54 -0
- package/packages/core/src/cli/terminal.ts +16 -2
- package/packages/core/src/cli/terminals.ts +121 -219
- package/packages/core/src/cli/ticket-editor.ts +10 -3
- package/packages/core/src/cli/ticket.ts +115 -20
- package/packages/core/src/cli/upgrade-commit.ts +4 -0
- package/packages/core/src/cli/upgrade-compatibility.ts +2 -2
- package/packages/core/src/cli/upgrade-landing.ts +69 -0
- package/packages/core/src/cli/upgrade.ts +16 -0
- package/packages/core/src/cli/wait.ts +194 -91
- package/packages/core/src/cli/watch.ts +111 -109
- package/packages/core/src/config/landing.ts +22 -0
- package/packages/core/src/config/live.ts +1 -0
- package/packages/core/src/config/pipeline-source.ts +4 -3
- package/packages/core/src/config/schema.ts +3 -0
- package/packages/core/src/events/catalog.ts +48 -3
- package/packages/core/src/events/payloads.ts +295 -6
- package/packages/core/src/events/repository.ts +38 -3
- package/packages/core/src/integration/harness.ts +11 -2
- package/packages/core/src/kernel/__snapshots__/reducer-registry.test.ts.snap +3330 -119
- package/packages/core/src/kernel/auto-merge-default.ts +1 -0
- package/packages/core/src/kernel/auto-merge.ts +29 -4
- package/packages/core/src/kernel/build-identity.ts +94 -0
- package/packages/core/src/kernel/change-presence.ts +179 -0
- package/packages/core/src/kernel/dispatch-status.ts +17 -1
- package/packages/core/src/kernel/dispatcher-liveness.ts +10 -4
- package/packages/core/src/kernel/engine.ts +89 -2
- package/packages/core/src/kernel/generators/build-log.ts +23 -0
- package/packages/core/src/kernel/generators/leaf-restack-log.ts +110 -0
- package/packages/core/src/kernel/generators/node-restack-log.ts +94 -0
- package/packages/core/src/kernel/generators/repository-journals.ts +25 -3
- package/packages/core/src/kernel/harvest.ts +25 -23
- package/packages/core/src/kernel/integration-completeness.ts +81 -0
- package/packages/core/src/kernel/integration-landing.ts +263 -0
- package/packages/core/src/kernel/integration-stack.ts +36 -0
- package/packages/core/src/kernel/integration-state.ts +135 -0
- package/packages/core/src/kernel/landing-policy.ts +47 -0
- package/packages/core/src/kernel/landing-publication.ts +41 -0
- package/packages/core/src/kernel/landing-readiness.ts +67 -0
- package/packages/core/src/kernel/landing-state.ts +96 -0
- package/packages/core/src/kernel/leaf-restack-completion.ts +24 -0
- package/packages/core/src/kernel/leaf-restack-state.ts +73 -0
- package/packages/core/src/kernel/log-index-value.ts +38 -0
- package/packages/core/src/kernel/log-index.ts +35 -5
- package/packages/core/src/kernel/node-landing.ts +439 -0
- package/packages/core/src/kernel/node-parent.ts +184 -0
- package/packages/core/src/kernel/node-restack-state.ts +191 -0
- package/packages/core/src/kernel/node-restack-transaction.ts +210 -0
- package/packages/core/src/kernel/node-restack.ts +274 -0
- package/packages/core/src/kernel/read-facts.ts +704 -0
- package/packages/core/src/kernel/reconcile-head.ts +51 -0
- package/packages/core/src/kernel/reconcile-restack.ts +560 -0
- package/packages/core/src/kernel/reducer-registry.ts +153 -3
- package/packages/core/src/kernel/reducer.ts +121 -6
- package/packages/core/src/kernel/repository-attention.ts +179 -0
- package/packages/core/src/kernel/service-facts.ts +135 -0
- package/packages/core/src/kernel/snapshot-parent.ts +33 -0
- package/packages/core/src/kernel/terminal-guard.ts +133 -0
- package/packages/core/src/ontology.ts +9 -1
- package/packages/core/src/operator/annotations.ts +12 -0
- package/packages/core/src/operator/control.ts +11 -6
- package/packages/core/src/operator/index.ts +6 -0
- package/packages/core/src/operator/landings.ts +35 -0
- package/packages/core/src/operator/presentation.ts +1 -0
- package/packages/core/src/operator/protocol.ts +12 -3
- package/packages/core/src/operator/query.ts +40 -21
- package/packages/core/src/operator/read-view.ts +4 -13
- package/packages/core/src/operator/registry.ts +48 -19
- package/packages/core/src/operator/requests.ts +3 -22
- package/packages/core/src/operator/sandbox.ts +10 -9
- package/packages/core/src/operator/tickets.ts +57 -11
- package/packages/core/src/plugin-sdk/index.ts +13 -0
- package/packages/core/src/ports/forge/contract.ts +91 -3
- package/packages/core/src/ports/forge/fake.ts +142 -4
- package/packages/core/src/ports/forge/git-rewrite.ts +232 -0
- package/packages/core/src/ports/forge/github-readiness.ts +421 -0
- package/packages/core/src/ports/forge/github.ts +631 -35
- package/packages/core/src/ports/forge/local-git.ts +119 -5
- package/packages/core/src/ports/forge/readiness.ts +99 -0
- package/packages/core/src/ports/tickets/contract.ts +41 -0
- package/packages/core/src/ports/tickets/create.ts +8 -1
- package/packages/core/src/ports/tickets/fake.ts +32 -1
- package/packages/core/src/ports/tickets/file-codec.ts +7 -0
- package/packages/core/src/ports/tickets/file.ts +18 -1
- package/packages/core/src/ports/tickets/hosted-index.ts +2 -0
- package/packages/core/src/ports/tickets/linear.ts +124 -4
- package/packages/core/src/ports/tickets/migration.ts +25 -1
- package/packages/core/src/ports/tickets/operations.ts +7 -2
- package/packages/core/src/ports/tickets/remote-protocol.ts +19 -0
- package/packages/core/src/ports/tickets/remote.ts +10 -1
- package/packages/core/src/ports/tickets/revision.ts +3 -1
- package/packages/core/src/ports/tickets/tree.ts +148 -0
- package/packages/core/src/ports/tickets/update.ts +15 -2
- package/packages/core/src/ports/types.ts +135 -5
- package/packages/core/src/ports/workspace/git-worktree.ts +2 -1
- package/packages/core/src/ports/workspace/provider-capabilities.ts +1 -1
- package/packages/core/src/ports/workspace/vercel-sandbox.ts +60 -3
- package/packages/core/src/processes/build-child.ts +6 -6
- package/packages/core/src/processes/build-runner.ts +586 -87
- package/packages/core/src/processes/dispatch-failure-budget.ts +5 -4
- package/packages/core/src/processes/dispatcher-selectors.ts +15 -9
- package/packages/core/src/processes/dispatcher.ts +2239 -357
- package/packages/core/src/processes/execution-no-progress.ts +46 -1
- package/packages/core/src/processes/harvest-execution-state.ts +15 -9
- package/packages/core/src/processes/harvest-runner.ts +34 -70
- package/packages/core/src/processes/harvest.ts +38 -15
- package/packages/core/src/processes/infrastructure-failure-budget.ts +13 -15
- package/packages/core/src/processes/orchestrator-tick.ts +2 -2
- package/packages/core/src/processes/publication-loss.ts +35 -21
- package/packages/core/src/processes/publication-state.ts +30 -5
- package/packages/core/src/processes/repo-view.ts +244 -1130
- package/packages/core/src/processes/tick-publication.ts +110 -0
- package/packages/core/src/store/adapter.ts +23 -0
- package/packages/core/src/store/build-scope.ts +35 -0
- package/packages/core/src/store/contract.ts +909 -0
- package/packages/core/src/store/digest.ts +52 -4
- package/packages/core/src/store/local/schema.ts +26 -13
- package/packages/core/src/store/local/store.ts +296 -55
- package/packages/core/src/store/memory.ts +181 -30
- package/packages/core/src/store/phase-session.ts +34 -0
- package/packages/core/src/store/reduced-reads.ts +240 -0
- package/packages/core/src/store/reducer-value-shapes.json +18323 -0
- package/packages/core/src/store/reducer-value-validation.ts +96 -0
- package/packages/core/src/store/reducer-values.ts +145 -0
- package/packages/core/src/store/remote/client.ts +85 -0
- package/packages/core/src/store/remote/compatibility.ts +21 -9
- package/packages/core/src/store/remote/index.ts +19 -0
- package/packages/core/src/store/remote/protocol.ts +27 -0
- package/packages/core/src/store/remote/version.ts +3 -1
- package/packages/core/src/store/repo-state-events.ts +3 -1
- package/packages/core/src/store/repo-tick.ts +72 -0
- package/packages/core/src/store/session-handle.ts +34 -0
- package/packages/core/src/store/snapshots.ts +10 -0
- package/packages/core/src/store/subscribe.ts +1 -1
- package/packages/core/src/store/ticket-assets.ts +4 -4
- package/packages/core/src/store/types.ts +71 -6
- package/packages/core/src/testing/dispatch-read-budget.ts +215 -0
- package/packages/core/src/testing/index.ts +10 -0
- package/packages/core/src/testing/reduced-read-budget.ts +502 -0
- package/packages/core/src/testing/refresh-scheduler.ts +32 -0
- package/skills/guide/SKILL.md +116 -62
- package/skills/guide/references/integration-tree.md +117 -0
- package/skills/guide/references/landing-policy.md +150 -0
- package/skills/guide/references/migration-1.0.md +68 -0
- package/skills/guide/references/operator-api.md +13 -6
- package/skills/guide/references/plugin-authoring.md +34 -0
- package/skills/guide/references/remote-store-protocol.md +114 -9
- package/skills/guide/references/remote-ticket-protocol.md +26 -5
- package/skills/guide/references/restacking.md +79 -0
- package/skills/guide/references/setup.md +49 -6
- package/skills/guide/references/ticket-dependencies.md +69 -0
- package/skills/guide/references/ticket-migration.md +8 -0
- package/skills/operate/SKILL.md +55 -5
- package/skills/reconcile/SKILL.md +55 -48
- package/skills/spec/SKILL.md +67 -1
- package/skills/tickets/SKILL.md +55 -2
- package/templates/autobuild.toml +3 -0
- package/templates/hosted-service/package.json +2 -2
|
@@ -62,3 +62,11 @@ Legacy records without `comments` retain their Markdown comment append behavior;
|
|
|
62
62
|
export never interprets Markdown headings as structured history. New file tickets
|
|
63
63
|
use structured comments and preserve their body when a comment is added. There is
|
|
64
64
|
no continuous sync, assignee migration, state history or build-history migration.
|
|
65
|
+
|
|
66
|
+
Integration-tree `kind` and `target` are preserved in portable frontmatter.
|
|
67
|
+
Import validates the complete target graph before changing the destination and
|
|
68
|
+
refuses a destination that cannot preserve metadata. It creates or adopts every
|
|
69
|
+
identity, establishes node kinds, then applies targets using the durable id map,
|
|
70
|
+
just like blockers. Input order does not matter. Resuming also restores edges on
|
|
71
|
+
adopted tickets; normal destination validation still guards existing graphs and
|
|
72
|
+
node demotion. Older work-only exports remain valid.
|
package/skills/operate/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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 landing 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 inside the hosted service with the operator tool registry.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Operating the repository
|
|
@@ -10,7 +10,9 @@ pointed at a repository to file tickets, watch builds, unblock them, answer
|
|
|
10
10
|
operator questions, and drive work to merge. Any agent can take it on: a
|
|
11
11
|
coding-agent session at the repository root using the `ab` CLI (or `ab mcp`),
|
|
12
12
|
or the hosted service's embedded turn runner. There is no initialization
|
|
13
|
-
step — deciding to orchestrate is enough.
|
|
13
|
+
step — deciding to orchestrate is enough. By default, the agent that
|
|
14
|
+
specified and queued work (the `ab-spec` and `ab-tickets` skills) takes the
|
|
15
|
+
role for that work as soon as it is ready, unless the human opts out.
|
|
14
16
|
|
|
15
17
|
The orchestrator is not a build phase: it never runs pipeline steps, never
|
|
16
18
|
edits the repository, and never touches a build's checkout. Its reach is the
|
|
@@ -211,7 +213,15 @@ Read events with a cursor or a small `--events` count; logs are long.
|
|
|
211
213
|
hold and release the whole repository.
|
|
212
214
|
- `ab abort <slug>` — destructive: closes the PR, removes branches, and
|
|
213
215
|
returns the ticket to triage.
|
|
214
|
-
- `ab
|
|
216
|
+
- `ab hold <slug>` — persistently hold a landing and revoke earlier consent.
|
|
217
|
+
- `ab land <slug>` — consent to a ready landing and clear its hold. Consent
|
|
218
|
+
survives restacks and verification; use hold to withdraw it when work changes.
|
|
219
|
+
Read the matched policy, readiness, acknowledged command and gate deferral in
|
|
220
|
+
build status before acting. Work the consent queue by checking completeness
|
|
221
|
+
and current verification, then issuing land for the chosen landing. A land
|
|
222
|
+
acknowledgement accepts consent; it never promises that gates passed.
|
|
223
|
+
- Configure ordered `[[landing]]` rules for project policy through ab-guide.
|
|
224
|
+
Repository auto-merge defaults and per-build auto-merge toggles are retired.
|
|
215
225
|
|
|
216
226
|
### Tickets
|
|
217
227
|
|
|
@@ -317,8 +327,11 @@ Treat every default-watch record as a call to act:
|
|
|
317
327
|
|
|
318
328
|
- `escalation.raised`: inspect the question and evidence, then resolve it using
|
|
319
329
|
the shared rules.
|
|
320
|
-
- `build.
|
|
321
|
-
the operator's
|
|
330
|
+
- `build.consent-ready`: inspect the one consent queue, then land or hold the
|
|
331
|
+
selected candidate under the operator's policy. Unready or stale candidates
|
|
332
|
+
do not produce this observation.
|
|
333
|
+
- `build.merge-decision`: diagnose the current merge-gate deferral or unsafe
|
|
334
|
+
forge outcome. Consent and hold decisions use only `build.consent-ready`.
|
|
322
335
|
- Harvest escalation or recovery exhaustion: inspect harvest status and resolve
|
|
323
336
|
the reported blocker.
|
|
324
337
|
- Dispatcher loss, abnormal stop, restart-required reload, rejected config, or
|
|
@@ -376,3 +389,40 @@ for the exceptions above.
|
|
|
376
389
|
and a message that arrives mid-turn is answered after the current turn ends.
|
|
377
390
|
- Where operator notes exist (hosted), they are shared ground truth; keep
|
|
378
391
|
them current when you learn something durable.
|
|
392
|
+
|
|
393
|
+
## Drive the tree through one consent queue
|
|
394
|
+
|
|
395
|
+
The root is the configured base branch. A node is a named integration point;
|
|
396
|
+
its integration build collects child contributions on its recorded branch.
|
|
397
|
+
A target is the destination of a contribution. `ab ticket tree --json` (MCP
|
|
398
|
+
`tickets.tree`) shows exhaustive source metadata, including completed tickets
|
|
399
|
+
and empty nodes. A claimed build freezes its effective target; use build status
|
|
400
|
+
or queue entries for landing ancestry after a source ticket changes.
|
|
401
|
+
|
|
402
|
+
Start with `ab landings --json` (MCP `landings.list`). This is the one queue of
|
|
403
|
+
ready landings needing a decision: consent-policy candidates and held ready
|
|
404
|
+
candidates. Entries include the target, branch preview, candidate head/parent,
|
|
405
|
+
verification receipts and node children/completeness. Unknown completeness is
|
|
406
|
+
not zero children. A changed head or parent must regain current verification;
|
|
407
|
+
unfinished or automatically authorized candidates do not ask for attention.
|
|
408
|
+
|
|
409
|
+
Select a queue build in the terminal and use `l land` or `o hold`, or run
|
|
410
|
+
`ab land <slug>` / `ab hold <slug>`. MCP uses `builds.control` with action `land`
|
|
411
|
+
or `hold`. Hold is available before readiness and suppresses automatic landing.
|
|
412
|
+
Land rechecks readiness and live node completeness, so act on failures by
|
|
413
|
+
refreshing the facts. Open children keep a node collecting. When integration
|
|
414
|
+
verification fails, file a repair child targeting that node and let it land
|
|
415
|
+
before retrying the node cycle.
|
|
416
|
+
|
|
417
|
+
Watch for decisions and conflicts with `ab watch --json`; save its opaque cursor
|
|
418
|
+
and resume with `ab watch --since <cursor> --json`. Default attention includes
|
|
419
|
+
node landings, node item conflicts, conflicted leaf replays and derived
|
|
420
|
+
`build.consent-ready` observations, including already-ready landings on first
|
|
421
|
+
repository-wide discovery. Readiness is identified by its durable
|
|
422
|
+
entry position: resuming suppresses the same episode, while a new candidate or
|
|
423
|
+
exit/re-entry can notify again. Explicit `--event` globs remain event-only.
|
|
424
|
+
Use `ab wait --for consent --for node-landed --for restack-conflicted --json`
|
|
425
|
+
for one wake; state waits return immediately when already satisfied. `--for
|
|
426
|
+
attention` also includes consent readiness and landing/conflict attention.
|
|
427
|
+
Resume event backlogs with `--since <cursor>`; keep handling emitted records
|
|
428
|
+
before interpreting terminal completion.
|
|
@@ -1,65 +1,72 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: reconcile
|
|
3
|
-
description: Resolve
|
|
3
|
+
description: Resolve the kernel-prepared replay of a build's single change onto its refreshed base. Invoked by the build-runner as the reconcile phase; takes only the build slug.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# /ab-reconcile <build>
|
|
7
7
|
|
|
8
|
-
The
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
The kernel has collapsed this build's contribution into one change and replayed
|
|
9
|
+
it onto a frozen refreshed base. Your job is to preserve both the build's intent
|
|
10
|
+
and the behavior already landed upstream. Work on the prepared detached HEAD;
|
|
11
|
+
the kernel retains the published branch until guarded publication succeeds.
|
|
12
|
+
|
|
13
|
+
For a node conflict, `nodeChange` names the integration owner, transaction,
|
|
14
|
+
current item, source SHA and optional source build. The prepared replay is only
|
|
15
|
+
that change, not the whole node. The materialized spec, plan and implement-notes
|
|
16
|
+
belong to the source build. For a foreign item, inspect `foreign-change.patch`
|
|
17
|
+
and preserve foreign status without adding an identity; escalate if its intent
|
|
18
|
+
cannot be established. Missing source context requires escalation. The replay
|
|
19
|
+
base is `conflict.baseSha`; preserve the source build's trailer rather than the
|
|
20
|
+
integration owner's. `ab done` retains the item and records its receipt; trusted
|
|
21
|
+
kernel plumbing advances the remaining stack after the session ends. Do not
|
|
22
|
+
publish, collapse the node, choose another item, or rewrite the public branch.
|
|
13
23
|
|
|
14
24
|
## Session shape
|
|
15
25
|
|
|
16
|
-
1. Run `ab context`. Read the manifest
|
|
17
|
-
`.ab/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
the
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
sides
|
|
37
|
-
|
|
26
|
+
1. Run `ab context`. Read the printed manifest and its `materialized` paths for
|
|
27
|
+
the spec, approved plan, implement-notes, and any `.ab/guidance.json` guidance. `replay` names the
|
|
28
|
+
original head, old contribution base, single change, frozen target base and
|
|
29
|
+
whether replay conflicted. A replay may originate at verify entry before any
|
|
30
|
+
PR exists; `restackId` identifies an adopted automatic transaction. Never fetch, merge, rebase, select another base,
|
|
31
|
+
or move the named branch yourself. Missing replay inputs require escalation, except a node item uses `nodeChange` and `conflict.baseSha` instead of `replay`.
|
|
32
|
+
2. Inspect `git status` and the prepared replay. If conflicts remain, resolve
|
|
33
|
+
them with the explicit charge to regress against neither side:
|
|
34
|
+
- Preserve the behavior the spec and approved plan require.
|
|
35
|
+
- Preserve the behavior already landed on the target base.
|
|
36
|
+
Stage only the resolved files and run `git cherry-pick --continue`. If the
|
|
37
|
+
change is now redundant, preserve an empty commit with `git commit
|
|
38
|
+
--allow-empty --no-edit`; never skip away the build's identity. A clean
|
|
39
|
+
replay already has its commit and still needs inspection and checks.
|
|
40
|
+
3. Run the repository's required checks. The result must be exactly one commit
|
|
41
|
+
with exactly one parent equal to `replay.targetBase` (or `conflict.baseSha` for a
|
|
42
|
+
node item) and exactly one terminal
|
|
43
|
+
`Autobuild-Build: <build>` trailer. For node items use the source identity in
|
|
44
|
+
`nodeChange.build`; a foreign item must have no build trailer. Do not create a merge commit.
|
|
45
|
+
4. Write the manifest's `notesPath`: what collided, how each resolution preserves
|
|
46
|
+
both sides, and the checks run. Never commit notes or any other `.ab/` path.
|
|
47
|
+
Legacy tracked scratch may be inherited unchanged from either input; do not
|
|
48
|
+
author scratch changes as part of resolution.
|
|
49
|
+
5. Run `ab done --notes <notesPath>`. The kernel validates, archives recorded
|
|
50
|
+
evidence, and publishes with an exact expected-head lease. If the branch
|
|
51
|
+
changed, it prepares another replay of the observed complete contribution
|
|
52
|
+
onto the same frozen base. Read context again, inspect and resolve that replay,
|
|
53
|
+
run checks, update notes, then retry completion. Never push yourself.
|
|
38
54
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
55
|
+
A publication success message parks this turn for kernel publication;
|
|
56
|
+
do not repeat `ab done` after success. Post-reconcile verification follows the
|
|
57
|
+
captured policy and begins a fresh cycle after confirmed publication. A conflict
|
|
58
|
+
at initial verify entry still requires initial checks regardless of that policy.
|
|
42
59
|
|
|
43
60
|
## When not to resolve
|
|
44
61
|
|
|
45
|
-
|
|
46
|
-
the
|
|
47
|
-
sides is impossible — escalates rather than guesses:
|
|
62
|
+
Escalate semantic conflicts, incompatible or deleted branch history, or choices
|
|
63
|
+
that the spec does not settle. Do not guess away either side's behavior:
|
|
48
64
|
|
|
49
65
|
```
|
|
50
|
-
ab escalate "
|
|
66
|
+
ab escalate "The target changes the session-token format but the build keys its limiter on the old format. Which behavior should the limiter adopt?" --refs src/auth.ts
|
|
51
67
|
```
|
|
52
68
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
again rather than guess. Reconcile has no review round, so guidance is the only
|
|
58
|
-
feedback it ever receives.
|
|
59
|
-
|
|
60
|
-
Never stage or commit anything under `.ab/`, including with `git add -f`.
|
|
61
|
-
Tracked legacy scratch needs no index flags or stash: leave it untouched and
|
|
62
|
-
let the normal merge inherit, update, or delete it from a parent.
|
|
63
|
-
|
|
64
|
-
A wrong guess here lands directly on main. Exactly one terminal command:
|
|
65
|
-
`ab done` or `ab escalate`.
|
|
69
|
+
A human answer in guidance is authoritative while the spec remains the contract.
|
|
70
|
+
If they cannot both be satisfied, escalate the contradiction. Reconcile has no
|
|
71
|
+
code-review round; risky resolutions need human judgment. The only successful
|
|
72
|
+
terminal commands are `ab done` and `ab escalate`.
|
package/skills/spec/SKILL.md
CHANGED
|
@@ -13,6 +13,41 @@ runs *before* a build exists, so it takes a ticket, not a build slug — and
|
|
|
13
13
|
unlike the phase skills, it is a conversation with a human, not an autonomous
|
|
14
14
|
session.
|
|
15
15
|
|
|
16
|
+
## Node tickets and targets
|
|
17
|
+
|
|
18
|
+
Tickets have `kind = "work"` by default, or `kind = "node"` for a named
|
|
19
|
+
integration point. The optional `target` is a node ticket id in the same source;
|
|
20
|
+
omission means the configured `baseBranch` root. Nodes may target other nodes.
|
|
21
|
+
These fields currently describe intent only: dispatch, branches and landing
|
|
22
|
+
behavior are unchanged in this increment. Blockers remain a separate graph.
|
|
23
|
+
|
|
24
|
+
Use `ab ticket create "Integration" --body spec.md --kind node`, then
|
|
25
|
+
`ab ticket update <id> --target <node-id>`. Clear a target with `--no-target`;
|
|
26
|
+
reset kind with `--kind work`. Omitted fields preserve existing values.
|
|
27
|
+
`ab ticket show <id> [--json]` exposes both fields; `ab ticket tree [--json]`
|
|
28
|
+
shows the configured root and every ticket, including completed work and empty
|
|
29
|
+
nodes, nested by target with state. Siblings are sorted by id. Invalid external
|
|
30
|
+
graphs and listing diagnostics are reported explicitly.
|
|
31
|
+
|
|
32
|
+
Targets must exist and be nodes in the configured source. Self-targeting,
|
|
33
|
+
ancestor cycles and demoting a node with targeting tickets are refused before
|
|
34
|
+
any part of the requested update is written, regardless of ticket state.
|
|
35
|
+
Clear or reparent its children before demotion. File frontmatter persists the
|
|
36
|
+
fields; `ab ticket edit` displays them read-only. Change them through update.
|
|
37
|
+
Kind and target participate in content revisions and revision-checked writes.
|
|
38
|
+
File writes retain their existing best-effort, unlocked concurrency semantics.
|
|
39
|
+
|
|
40
|
+
Linear uses the exact `node` issue label for kind and the parent relation for
|
|
41
|
+
target, only when the parent carries that label. Ordinary grouping parents do
|
|
42
|
+
not impose targets and survive unrelated updates. Explicit target clear clears
|
|
43
|
+
the parent relation. Label replacements can demote nodes and receive the same
|
|
44
|
+
guards; explicit kind and label instructions must agree about `node`. Label
|
|
45
|
+
and parent connections are fully paginated. Linear still refuses guarded writes.
|
|
46
|
+
|
|
47
|
+
Hosted sources and legacy plugins read as work with no target and refuse any
|
|
48
|
+
explicit metadata write, including clears and mixed patches, with guidance to
|
|
49
|
+
use a capable source. No hosted storage or protocol change is implied.
|
|
50
|
+
|
|
16
51
|
## Ticket operations
|
|
17
52
|
|
|
18
53
|
Reach for `ab` first and use it whenever its CLI supports the requested ticket
|
|
@@ -57,7 +92,8 @@ setting is absent.
|
|
|
57
92
|
When the explicitly named destination equals `[tickets].readyState`, tell the
|
|
58
93
|
human in the completion response that the ticket may be claimed by the next
|
|
59
94
|
dispatch once the repository's label, dependency, intake, capacity, and other
|
|
60
|
-
readiness gates are satisfied
|
|
95
|
+
readiness gates are satisfied, and that you will operate it from there (see
|
|
96
|
+
[After filing: operate what you queued](#after-filing-operate-what-you-queued)).
|
|
61
97
|
|
|
62
98
|
If grooming established prerequisites, follow the complete
|
|
63
99
|
[safe blocker-filing workflow](../ab-guide/references/ticket-dependencies.md).
|
|
@@ -153,6 +189,36 @@ files over the store's size limit), keep the external link in Evidence and say
|
|
|
153
189
|
plainly, in the spec and to the human, that builds cannot read it, so the
|
|
154
190
|
planner does not treat it as a contract.
|
|
155
191
|
|
|
192
|
+
## After filing: operate what you queued
|
|
193
|
+
|
|
194
|
+
Once work you specified sits in the ready state, its builds start without
|
|
195
|
+
anyone watching them. By default, the agent that wrote the spec becomes their
|
|
196
|
+
operator. You hold the context an escalation asks about — the intent, the
|
|
197
|
+
alternatives the human rejected, what was ruled out of scope — and a build
|
|
198
|
+
blocked on a question you could answer should not wait for a human.
|
|
199
|
+
|
|
200
|
+
So when this conversation leaves work in the ready state, say in the
|
|
201
|
+
completion response that you will shepherd it, then load the `ab-operate`
|
|
202
|
+
skill and follow it: arm the standing watch, reconcile status, resolve
|
|
203
|
+
attention, and report each outcome until every build you queued has merged or
|
|
204
|
+
otherwise ended. Shepherd what this conversation queued unless the human
|
|
205
|
+
widens the scope.
|
|
206
|
+
|
|
207
|
+
This is the default, not a requirement:
|
|
208
|
+
|
|
209
|
+
- If the human says they will operate the work themselves, or hands it to
|
|
210
|
+
another agent, file the tickets and stop. A standing preference to the same
|
|
211
|
+
effect in the repository's agent instructions wins too.
|
|
212
|
+
- If the work is not in the ready state, for example left in triage for later
|
|
213
|
+
grooming, there is nothing to shepherd yet. Offer to operate once it is
|
|
214
|
+
ready; do not start a watch.
|
|
215
|
+
- If this session cannot keep a long-running watch (no background or monitor
|
|
216
|
+
facility, or no operator surface), say so and leave operation to the human.
|
|
217
|
+
|
|
218
|
+
Operating follows the `ab-operate` skill's rules, including its boundaries:
|
|
219
|
+
never start, stop, or restart a dispatcher. If no dispatcher holds the
|
|
220
|
+
repository, report that rather than waiting on builds that cannot start.
|
|
221
|
+
|
|
156
222
|
## Rules
|
|
157
223
|
|
|
158
224
|
- The spec says **what and why, never how.** An exported, attached `design`
|
package/skills/tickets/SKILL.md
CHANGED
|
@@ -9,6 +9,52 @@ The local ticket tracker is a directory of markdown files. `ls` and `mv` are
|
|
|
9
9
|
the state/backlog UI; source-agnostic `ab ticket` commands create and edit
|
|
10
10
|
content and blocker relationships. The default file source needs no secret.
|
|
11
11
|
|
|
12
|
+
## Node tickets and targets
|
|
13
|
+
|
|
14
|
+
Tickets have `kind = "work"` by default, or `kind = "node"` for a named
|
|
15
|
+
integration point. The optional `target` is a node ticket id in the same source;
|
|
16
|
+
omission means the configured `baseBranch` root. Nodes may target other nodes.
|
|
17
|
+
Ready node tickets open integration branches. Work claims freeze their target
|
|
18
|
+
identity and branch. Blockers remain a separate graph.
|
|
19
|
+
|
|
20
|
+
Use `ab ticket create "Integration" --body spec.md --kind node`, then
|
|
21
|
+
`ab ticket update <id> --target <node-id>`. Clear a target with `--no-target`;
|
|
22
|
+
reset kind with `--kind work`. Omitted fields preserve existing values.
|
|
23
|
+
`ab ticket show <id> [--json]` exposes both fields; `ab ticket tree [--json]`
|
|
24
|
+
shows the configured root and every ticket, including completed work and empty
|
|
25
|
+
nodes, nested by target with state. Siblings are sorted by id. Invalid external
|
|
26
|
+
graphs and listing diagnostics are reported explicitly.
|
|
27
|
+
|
|
28
|
+
Changing an open node target re-parents its branch and existing PR; `--no-target`
|
|
29
|
+
moves it to the configured root. The dispatcher confirms source metadata, replays
|
|
30
|
+
only node-owned contributions onto the new parent, then retargets the same review.
|
|
31
|
+
Children follow through the ordinary cascade; conflicts use normal source-aware
|
|
32
|
+
reconcile. Pending moves block verification and landing. Cycles, non-open parents,
|
|
33
|
+
landing/closing nodes and unsupported forge retargeting are refused with a reason.
|
|
34
|
+
Busy operations must settle first. Changing a claimed work target is refused before
|
|
35
|
+
any combined patch is written: abort and re-dispatch instead. Direct provider edits
|
|
36
|
+
are observed too; invalid edits leave effective ancestry unchanged with a durable
|
|
37
|
+
diagnostic. Status shows effective ancestry; ticket tree shows source metadata.
|
|
38
|
+
|
|
39
|
+
Targets must exist and be nodes in the configured source. Self-targeting,
|
|
40
|
+
ancestor cycles and demoting a node with targeting tickets are refused before
|
|
41
|
+
any part of the requested update is written, regardless of ticket state.
|
|
42
|
+
Clear or reparent its children before demotion. File frontmatter persists the
|
|
43
|
+
fields; `ab ticket edit` displays them read-only. Change them through update.
|
|
44
|
+
Kind and target participate in content revisions and revision-checked writes.
|
|
45
|
+
File writes retain their existing best-effort, unlocked concurrency semantics.
|
|
46
|
+
|
|
47
|
+
Linear uses the exact `node` issue label for kind and the parent relation for
|
|
48
|
+
target, only when the parent carries that label. Ordinary grouping parents do
|
|
49
|
+
not impose targets and survive unrelated updates. Explicit target clear clears
|
|
50
|
+
the parent relation. Label replacements can demote nodes and receive the same
|
|
51
|
+
guards; explicit kind and label instructions must agree about `node`. Label
|
|
52
|
+
and parent connections are fully paginated. Linear still refuses guarded writes.
|
|
53
|
+
|
|
54
|
+
Hosted sources and legacy plugins read as work with no target and refuse any
|
|
55
|
+
explicit metadata write, including clears and mixed patches, with guidance to
|
|
56
|
+
use a capable source. No hosted storage or protocol change is implied.
|
|
57
|
+
|
|
12
58
|
## Hosted ticket ids
|
|
13
59
|
|
|
14
60
|
When `[tickets].source = "hosted"`, use readable ids such as `ENG-12` with
|
|
@@ -132,6 +178,13 @@ bounces.
|
|
|
132
178
|
**Don't hand-move anything out of `doing/`** — a build owns it. If you need to
|
|
133
179
|
stop a build, that's `ab` (or a human), not `mv`.
|
|
134
180
|
|
|
181
|
+
When a conversation queues work by moving it into `ready/` (or the configured
|
|
182
|
+
ready state of any source), the agent that queued it becomes its operator by
|
|
183
|
+
default, as the `ab-spec` skill describes under "After filing": load the
|
|
184
|
+
`ab-operate` skill and shepherd those builds to completion unless the human
|
|
185
|
+
says they will operate them, hands them to another agent, or the session
|
|
186
|
+
cannot keep a long-running watch.
|
|
187
|
+
|
|
135
188
|
## Icebox
|
|
136
189
|
|
|
137
190
|
`icebox/` is work deliberately deferred, groomed or not, that nothing
|
|
@@ -235,13 +288,13 @@ revisions rather than ignoring them.
|
|
|
235
288
|
|
|
236
289
|
`ab ticket edit <id>` opens `$VISUAL`, falling back to `$EDITOR`, using TOML
|
|
237
290
|
frontmatter and a Markdown body. Only title, body and labels are editable;
|
|
238
|
-
id, blockers, creation key and reference comments are read-only. It saves only
|
|
291
|
+
kind, target, id, blockers, creation key and reference comments are read-only. It saves only
|
|
239
292
|
changed fields with the opening revision. Unchanged or formatting-only edits
|
|
240
293
|
write nothing. On conflict, invalid input or editor failure, the error names an
|
|
241
294
|
absolute file path containing the edited text. Read the current ticket and
|
|
242
295
|
reapply the intended changes before retrying; conflicts are never merged.
|
|
243
296
|
|
|
244
|
-
File and Linear revisions fingerprint title, body, canonical label/blocker sets
|
|
297
|
+
File and Linear revisions fingerprint kind, target, title, body, canonical label/blocker sets
|
|
245
298
|
and state; reverting identical content restores its fingerprint. File checks
|
|
246
299
|
re-read immediately before writing, with the existing no-lock race window.
|
|
247
300
|
Direct file edits and state-directory moves change revisions. File comments
|
package/templates/autobuild.toml
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"build": "ab-hosted-service-build"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@defrex/autobuild-hosted-store-service": "0.
|
|
8
|
-
"@defrex/autobuild": "0.
|
|
7
|
+
"@defrex/autobuild-hosted-store-service": "0.14.0",
|
|
8
|
+
"@defrex/autobuild": "0.14.0",
|
|
9
9
|
"next": "16.1.6",
|
|
10
10
|
"react": "19.2.4",
|
|
11
11
|
"react-dom": "19.2.4"
|