@defrex/autobuild 1.0.0-beta.1 → 1.0.0-beta.3
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/SPEC.md +310 -56
- package/bin/ab-build-runner.ts +10 -8
- package/docs/architecture.md +177 -23
- package/docs/configuration.md +35 -4
- package/docs/hosted-service.md +35 -0
- package/docs/integration-tree.md +83 -4
- package/docs/landing-policy.md +11 -0
- package/docs/migration-1.0.md +9 -0
- package/docs/operator-api.md +18 -0
- package/docs/remote-store-protocol.md +16 -0
- package/docs/remote-ticket-protocol.md +5 -0
- package/docs/restacking.md +42 -7
- package/docs/setup.md +25 -0
- package/docs/spec-standard.md +71 -0
- package/docs/ticket-dependencies.md +6 -45
- package/docs/ticket-migration.md +50 -4
- package/package.json +3 -3
- package/packages/core/src/cli/attention.ts +4 -1
- package/packages/core/src/cli/binary.ts +17 -1
- package/packages/core/src/cli/build-control.ts +3 -3
- package/packages/core/src/cli/context.ts +53 -1
- package/packages/core/src/cli/dashboard/actions.ts +4 -0
- package/packages/core/src/cli/dashboard/detail.ts +45 -1
- package/packages/core/src/cli/dashboard/facts.ts +7 -2
- package/packages/core/src/cli/dashboard/integration-detail.ts +144 -0
- package/packages/core/src/cli/dashboard/integration-row.ts +255 -0
- package/packages/core/src/cli/dashboard/landing-display.ts +64 -0
- package/packages/core/src/cli/dashboard/model.ts +147 -16
- package/packages/core/src/cli/dashboard/poll.ts +40 -4
- package/packages/core/src/cli/dashboard/render.ts +106 -5
- package/packages/core/src/cli/dashboard/transcript.ts +2 -1
- package/packages/core/src/cli/dispatch-frontend.ts +11 -0
- package/packages/core/src/cli/dispatch-repository-feed.ts +2 -1
- package/packages/core/src/cli/dispatch.ts +49 -14
- package/packages/core/src/cli/help.ts +17 -1
- package/packages/core/src/cli/main.ts +48 -8
- package/packages/core/src/cli/publication-settlement.ts +49 -5
- package/packages/core/src/cli/repository-status.ts +103 -2
- package/packages/core/src/cli/status.ts +24 -1
- package/packages/core/src/cli/terminals.ts +94 -93
- package/packages/core/src/cli/ticket.ts +35 -11
- package/packages/core/src/cli/wait.ts +11 -2
- package/packages/core/src/cli/watch.ts +12 -0
- package/packages/core/src/config/schema.ts +3 -0
- package/packages/core/src/events/catalog.ts +38 -0
- package/packages/core/src/events/compatibility.ts +183 -0
- package/packages/core/src/events/native-session.ts +13 -0
- package/packages/core/src/events/payloads.ts +150 -2
- package/packages/core/src/events/policy.ts +210 -0
- package/packages/core/src/events/repository.ts +69 -0
- package/packages/core/src/integration/harness.ts +4 -4
- package/packages/core/src/kernel/__snapshots__/{reducer-registry.test.ts.snap → reducer-accumulator-shapes.json} +4286 -4006
- package/packages/core/src/kernel/change-presence.ts +11 -3
- package/packages/core/src/kernel/dispatch-capacity.ts +127 -0
- package/packages/core/src/kernel/dispatcher-liveness.ts +5 -1
- package/packages/core/src/kernel/engine.ts +25 -5
- package/packages/core/src/kernel/forge-health.ts +19 -0
- package/packages/core/src/kernel/generators/build-log.ts +18 -0
- package/packages/core/src/kernel/generators/node-restack-log.ts +1 -1
- package/packages/core/src/kernel/generators/repository-journals.ts +10 -0
- package/packages/core/src/kernel/guarded-forge.ts +159 -0
- package/packages/core/src/kernel/incremental.ts +4 -2
- package/packages/core/src/kernel/integration-completeness.ts +108 -9
- package/packages/core/src/kernel/integration-landing.ts +5 -4
- package/packages/core/src/kernel/janitor-failure.ts +36 -0
- package/packages/core/src/kernel/landing-publication.ts +35 -15
- package/packages/core/src/kernel/landing-state.ts +7 -0
- package/packages/core/src/kernel/leaf-restack-state.ts +1 -1
- package/packages/core/src/kernel/log-index.ts +12 -1
- package/packages/core/src/kernel/mixed-version.ts +52 -0
- package/packages/core/src/kernel/node-landing.ts +14 -11
- package/packages/core/src/kernel/node-parent.ts +35 -10
- package/packages/core/src/kernel/node-restack-demand.ts +29 -0
- package/packages/core/src/kernel/node-restack-state.ts +46 -16
- package/packages/core/src/kernel/node-restack-transaction.ts +151 -8
- package/packages/core/src/kernel/node-restack.ts +34 -10
- package/packages/core/src/kernel/publication.ts +22 -0
- package/packages/core/src/kernel/read-deferrals.ts +111 -0
- package/packages/core/src/kernel/read-facts.ts +34 -6
- package/packages/core/src/kernel/reconcile-restack.ts +23 -2
- package/packages/core/src/kernel/reducer-registry.ts +18 -2
- package/packages/core/src/kernel/reducer.ts +196 -10
- package/packages/core/src/kernel/repository-attention.ts +38 -1
- package/packages/core/src/kernel/terminal-guard.ts +11 -4
- package/packages/core/src/kernel/ticket-migrations.ts +139 -0
- package/packages/core/src/operator/annotations.ts +6 -0
- package/packages/core/src/operator/index.ts +2 -0
- package/packages/core/src/operator/presentation.ts +5 -0
- package/packages/core/src/operator/query.ts +51 -11
- package/packages/core/src/operator/registry.ts +17 -1
- package/packages/core/src/operator/restack.ts +51 -0
- package/packages/core/src/operator/tickets.ts +30 -26
- package/packages/core/src/plugin-sdk/index.ts +10 -0
- package/packages/core/src/plugins/manifest.ts +1 -1
- package/packages/core/src/ports/forge/contract.ts +23 -0
- package/packages/core/src/ports/forge/fake.ts +6 -2
- package/packages/core/src/ports/forge/git-rewrite.ts +92 -64
- package/packages/core/src/ports/forge/github-transport.ts +45 -2
- package/packages/core/src/ports/forge/github.ts +56 -17
- package/packages/core/src/ports/forge/local-git.ts +7 -2
- package/packages/core/src/ports/forge-failure.ts +40 -0
- package/packages/core/src/ports/forge-request-context.ts +35 -0
- package/packages/core/src/ports/forge-telemetry.ts +16 -0
- package/packages/core/src/ports/runner/claude.ts +136 -9
- package/packages/core/src/ports/runner/codex.ts +112 -7
- package/packages/core/src/ports/runner/contract.ts +78 -0
- package/packages/core/src/ports/runner/fake.ts +59 -1
- package/packages/core/src/ports/runner/native-cli-fixture.ts +86 -0
- package/packages/core/src/ports/runner/native-process-fixture.ts +38 -0
- package/packages/core/src/ports/runner/native-session.ts +110 -0
- package/packages/core/src/ports/runner/pi-rpc.ts +7 -1
- package/packages/core/src/ports/runner/pi.ts +162 -2
- package/packages/core/src/ports/tickets/linear.ts +180 -12
- package/packages/core/src/ports/tickets/migration.ts +92 -9
- package/packages/core/src/ports/types.ts +60 -5
- package/packages/core/src/ports/workspace/git-worktree.ts +45 -51
- package/packages/core/src/ports/workspace/vercel-sandbox.ts +28 -12
- package/packages/core/src/processes/build-child-exit.ts +50 -2
- package/packages/core/src/processes/build-child.ts +15 -7
- package/packages/core/src/processes/build-runner.ts +909 -213
- package/packages/core/src/processes/dispatcher.ts +815 -369
- package/packages/core/src/processes/execution-no-progress.ts +15 -0
- package/packages/core/src/processes/pause-execution-fixture.ts +37 -0
- package/packages/core/src/processes/phase-failure-budget.ts +2 -1
- package/packages/core/src/processes/publication-loss.ts +7 -3
- package/packages/core/src/processes/repo-view.ts +53 -6
- package/packages/core/src/processes/tick-publication.ts +6 -2
- package/packages/core/src/runtime-identity.ts +37 -0
- package/packages/core/src/store/adapter.ts +4 -2
- package/packages/core/src/store/build-scope.ts +9 -0
- package/packages/core/src/store/contract.ts +233 -16
- package/packages/core/src/store/digest.ts +20 -2
- package/packages/core/src/store/local/schema.ts +6 -0
- package/packages/core/src/store/local/store.ts +57 -4
- package/packages/core/src/store/memory.ts +83 -2
- package/packages/core/src/store/new-build.ts +2 -2
- package/packages/core/src/store/phase-session.ts +13 -0
- package/packages/core/src/store/reduced-reads.ts +43 -4
- package/packages/core/src/store/reducer-value-shapes.json +8911 -6344
- package/packages/core/src/store/reducer-value-validation.ts +103 -3
- package/packages/core/src/store/reducer-values.ts +21 -6
- package/packages/core/src/store/remote/client.ts +145 -20
- package/packages/core/src/store/remote/index.ts +2 -0
- package/packages/core/src/store/remote/protocol.ts +19 -0
- package/packages/core/src/store/remote/version.ts +2 -0
- package/packages/core/src/store/repo-state-events.ts +5 -2
- package/packages/core/src/store/repo-tick.ts +6 -1
- package/packages/core/src/store/session-handle.ts +8 -0
- package/packages/core/src/store/snapshots.ts +21 -5
- package/packages/core/src/store/types.ts +17 -1
- package/packages/core/src/testing/dispatch-read-budget.ts +18 -2
- package/packages/core/src/testing/index.ts +7 -0
- package/packages/core/src/testing/newer-writer.ts +37 -0
- package/packages/core/src/testing/reduced-read-budget.ts +3 -0
- package/skills/guide/SKILL.md +140 -25
- package/skills/guide/references/integration-tree.md +83 -4
- package/skills/guide/references/landing-policy.md +11 -0
- package/skills/guide/references/migration-1.0.md +9 -0
- package/skills/guide/references/operator-api.md +18 -0
- package/skills/guide/references/plugin-authoring.md +47 -4
- package/skills/guide/references/remote-store-protocol.md +16 -0
- package/skills/guide/references/remote-ticket-protocol.md +5 -0
- package/skills/guide/references/restacking.md +42 -7
- package/skills/guide/references/setup.md +25 -0
- package/skills/guide/references/spec-standard.md +71 -0
- package/skills/guide/references/ticket-dependencies.md +6 -45
- package/skills/guide/references/ticket-migration.md +50 -4
- package/skills/implement/SKILL.md +4 -2
- package/skills/operate/SKILL.md +63 -6
- package/skills/reconcile/SKILL.md +3 -1
- package/skills/spec/SKILL.md +62 -40
- package/skills/tickets/SKILL.md +15 -43
package/skills/spec/SKILL.md
CHANGED
|
@@ -8,45 +8,41 @@ description: Design a feature spec-first through conversation, or flesh out an e
|
|
|
8
8
|
The conversational surface over the complete
|
|
9
9
|
[spec standard](../ab-guide/references/spec-standard.md) installed with
|
|
10
10
|
`ab-guide` — read it first. It defines "buildable": what and why but never how,
|
|
11
|
-
verifiable acceptance criteria, explicit out-of-scope, and evidence
|
|
11
|
+
verifiable acceptance criteria, explicit out-of-scope, and evidence, plus how
|
|
12
|
+
to size work and where to split it. This skill
|
|
12
13
|
runs *before* a build exists, so it takes a ticket, not a build slug — and
|
|
13
14
|
unlike the phase skills, it is a conversation with a human, not an autonomous
|
|
14
15
|
session.
|
|
15
16
|
|
|
16
17
|
## Node tickets and targets
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
integration
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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.
|
|
19
|
+
For node lifecycle, target validation and source-specific storage, read
|
|
20
|
+
[nodes and targets](../ab-guide/references/integration-tree.md). When filing
|
|
21
|
+
related work, follow the shared
|
|
22
|
+
[destination choice](../ab-guide/references/integration-tree.md#choosing-a-destination)
|
|
23
|
+
guidance before choosing root or a node.
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
ab ticket create "Integration" --body spec.md --kind node
|
|
27
|
+
ab ticket create "Child" --body child.md --target <node-id>
|
|
28
|
+
ab ticket update <id> --target <node-id>
|
|
29
|
+
ab ticket update <id> --no-target
|
|
30
|
+
ab ticket update <id> --kind work
|
|
31
|
+
ab ticket show <id> --json
|
|
32
|
+
ab ticket tree --json
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Whenever grooming produces more than one ticket for a feature, first confirm
|
|
36
|
+
the split is warranted under the standard's
|
|
37
|
+
[sizing and splitting](../ab-guide/references/spec-standard.md#sizing-and-splitting)
|
|
38
|
+
guidance, then explicitly choose root or a node before filing,
|
|
39
|
+
including when fleshing out an existing ticket splits it into several tickets.
|
|
40
|
+
Consult the shared destination criteria and read
|
|
41
|
+
the repository's effective landing policy in `autobuild.toml`; explain the actual
|
|
42
|
+
landing and consent flow to the human in plain terms. Ask the human when the
|
|
43
|
+
choice is unclear from grooming. Root is valid when each ticket can ship alone.
|
|
44
|
+
Choosing root or a node never changes the requested workflow state or silently
|
|
45
|
+
promotes tickets; the placement instructions below still apply.
|
|
50
46
|
|
|
51
47
|
## Ticket operations
|
|
52
48
|
|
|
@@ -69,6 +65,11 @@ in order, but as a conversation, not a form:
|
|
|
69
65
|
conversation in what actually exists.
|
|
70
66
|
2. **Acceptance criteria.** Propose them yourself from the discussion; let
|
|
71
67
|
the user correct. Each must be checkable by a reviewer or a verify step.
|
|
68
|
+
If the criteria fall into separate groups, apply
|
|
69
|
+
[sizing and splitting](../ab-guide/references/spec-standard.md#sizing-and-splitting)
|
|
70
|
+
before treating the work as several tickets: default to one larger ticket,
|
|
71
|
+
and when a split is warranted, propose the seams and the blocker graph to
|
|
72
|
+
the user with the reason for each cut.
|
|
72
73
|
3. **Out of scope.** Ask what adjacent work is explicitly excluded. Propose
|
|
73
74
|
candidates — the tempting expansions you noticed while reading the code.
|
|
74
75
|
4. **Evidence.** Link what exists: the error rates, the user reports, the
|
|
@@ -104,25 +105,43 @@ blockers at creation, read back and verify them, then move to ready last. The
|
|
|
104
105
|
human's requested final placement still wins; temporary staging needs no new
|
|
105
106
|
placement question. Never assume the source default is non-ready.
|
|
106
107
|
|
|
107
|
-
For a dependency chain
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
For a dependency chain explicitly chosen to ship together under a node, create
|
|
109
|
+
in dependency order and obtain each new id from the command's complete JSON
|
|
110
|
+
result. Write a spec-standard node body in `integration.md` as well as the child
|
|
111
|
+
specs. This example assumes the repository's triage state is `Triage`, its ready
|
|
112
|
+
state is `Ready`, and the human requested ready placement for the whole set.
|
|
113
|
+
Use the repository's actual states; if final placement is non-ready, leave the
|
|
114
|
+
set there after verification instead of promoting it. Root remains a valid
|
|
115
|
+
explicit choice when each ticket is independently useful and safe to ship:
|
|
110
116
|
|
|
111
117
|
```sh
|
|
112
|
-
ab ticket create "
|
|
118
|
+
ab ticket create "Integration" --body integration.md --kind node --json --state Triage > node-ticket.json
|
|
119
|
+
node_id="$(jq -r '.ref.id' node-ticket.json)"
|
|
120
|
+
ab ticket create "A" --body a.md --target "$node_id" --json --state Triage > a-ticket.json
|
|
113
121
|
a_id="$(jq -r '.ref.id' a-ticket.json)"
|
|
114
|
-
ab ticket create "B" --body b.md --blocked-by "$a_id" --json --state Triage > b-ticket.json
|
|
122
|
+
ab ticket create "B" --body b.md --blocked-by "$a_id" --target "$node_id" --json --state Triage > b-ticket.json
|
|
115
123
|
b_id="$(jq -r '.ref.id' b-ticket.json)"
|
|
116
|
-
ab ticket create "C" --body c.md --blocked-by "$b_id" --json --state Triage > c-ticket.json
|
|
124
|
+
ab ticket create "C" --body c.md --blocked-by "$b_id" --target "$node_id" --json --state Triage > c-ticket.json
|
|
117
125
|
c_id="$(jq -r '.ref.id' c-ticket.json)"
|
|
126
|
+
ab ticket show "$node_id" --json
|
|
127
|
+
ab ticket show "$a_id" --json
|
|
118
128
|
ab ticket show "$b_id" --json
|
|
119
129
|
ab ticket show "$c_id" --json
|
|
120
|
-
# Verify
|
|
130
|
+
# Verify the node and all children remain in Triage, all child targets equal
|
|
131
|
+
# node_id, and every complete blocker set is correct (A: none; B: A; C: B).
|
|
132
|
+
# Repair and read back any mismatch before publishing any ticket.
|
|
133
|
+
ab ticket move "$node_id" Ready --json
|
|
121
134
|
ab ticket move "$a_id" Ready --json
|
|
122
135
|
ab ticket move "$b_id" Ready --json
|
|
123
136
|
ab ticket move "$c_id" Ready --json
|
|
124
137
|
```
|
|
125
138
|
|
|
139
|
+
Register and verify all planned children before making the node ready, so it
|
|
140
|
+
cannot collect a partial feature. The node must satisfy the repository's ready
|
|
141
|
+
gates and open before children can be claimed; a CLI move alone does not prove
|
|
142
|
+
admission. After publication, read back the final states, targets and blockers;
|
|
143
|
+
repair partial writes without blindly creating duplicates.
|
|
144
|
+
|
|
126
145
|
Never parse an id from the human-readable confirmation line: it can contain the
|
|
127
146
|
new ticket id and blocker ids in the same source-local form. Dependency order
|
|
128
147
|
alone does not close the ready-publication race. Blockers are evaluated when
|
|
@@ -221,6 +240,9 @@ repository, report that rather than waiting on builds that cannot start.
|
|
|
221
240
|
|
|
222
241
|
## Rules
|
|
223
242
|
|
|
243
|
+
- **Fewer, larger tickets.** Split only when sizing calls for it, cut at
|
|
244
|
+
seams, and keep the blocker graph wide so independent tickets build
|
|
245
|
+
together.
|
|
224
246
|
- The spec says **what and why, never how.** An exported, attached `design`
|
|
225
247
|
asset is a contract on observable visual and reference outcomes — layout,
|
|
226
248
|
content, states, copy, look — that plan, review, and verify judge against;
|
package/skills/tickets/SKILL.md
CHANGED
|
@@ -11,49 +11,21 @@ content and blocker relationships. The default file source needs no secret.
|
|
|
11
11
|
|
|
12
12
|
## Node tickets and targets
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
integration
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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.
|
|
14
|
+
For node lifecycle, target validation and source-specific storage, read
|
|
15
|
+
[nodes and targets](../ab-guide/references/integration-tree.md). When filing
|
|
16
|
+
related work, follow the shared
|
|
17
|
+
[destination choice](../ab-guide/references/integration-tree.md#choosing-a-destination)
|
|
18
|
+
guidance before choosing root or a node.
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
ab ticket create "Integration" --body spec.md --kind node
|
|
22
|
+
ab ticket create "Child" --body child.md --target <node-id>
|
|
23
|
+
ab ticket update <id> --target <node-id>
|
|
24
|
+
ab ticket update <id> --no-target
|
|
25
|
+
ab ticket update <id> --kind work
|
|
26
|
+
ab ticket show <id> --json
|
|
27
|
+
ab ticket tree --json
|
|
28
|
+
```
|
|
57
29
|
|
|
58
30
|
## Hosted ticket ids
|
|
59
31
|
|