@defrex/autobuild 1.4.1 → 1.5.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 +1 -1
- package/SPEC.md +440 -95
- package/bin/ab-dispatch-kernel.ts +1 -0
- package/docs/accounts.md +9 -0
- package/docs/agent-runtimes.md +1 -0
- package/docs/answering-blocked-builds.md +2 -1
- package/docs/architecture.md +290 -130
- package/docs/assets/headline-wide.png +0 -0
- package/docs/build-store.md +33 -3
- package/docs/cli.md +2 -1
- package/docs/configuration-overview.md +9 -0
- package/docs/configuration.md +166 -101
- package/docs/dispatcher-hosting.md +19 -3
- package/docs/dispatcher.md +9 -4
- package/docs/integration-overview.md +2 -2
- package/docs/integration-tree.md +91 -28
- package/docs/merge-policy.md +28 -9
- package/docs/operator-api.md +43 -18
- package/docs/operator-surfaces.md +1 -1
- package/docs/plugin-authoring.md +85 -8
- package/docs/remote-store-protocol.md +25 -7
- package/docs/remote-ticket-protocol.md +126 -12
- package/docs/restacking.md +20 -6
- package/docs/seams.md +2 -2
- package/docs/setup.md +19 -13
- package/docs/spec-standard.md +2 -1
- package/docs/ticket-dependencies.md +26 -8
- package/docs/ticket-migration.md +70 -7
- package/docs/ticket-sources.md +82 -5
- package/docs/tickets.md +34 -2
- package/docs/troubleshooting.md +2 -2
- package/docs/verification.md +5 -5
- package/docs/website.md +8 -0
- package/docs/workspaces.md +1 -1
- package/package.json +5 -4
- package/packages/core/src/accounts/hosted-readiness.ts +21 -0
- package/packages/core/src/cli/attention.ts +1 -0
- package/packages/core/src/cli/build-control.ts +36 -12
- package/packages/core/src/cli/connect.ts +9 -18
- package/packages/core/src/cli/context.ts +44 -0
- package/packages/core/src/cli/dashboard/configuration.ts +11 -0
- package/packages/core/src/cli/dashboard/model.ts +40 -10
- package/packages/core/src/cli/dashboard/queue.ts +21 -0
- package/packages/core/src/cli/dashboard/render.ts +40 -22
- package/packages/core/src/cli/dispatch-frontend.ts +63 -30
- package/packages/core/src/cli/dispatch-mode.ts +35 -16
- package/packages/core/src/cli/dispatch-repository-feed.ts +40 -11
- package/packages/core/src/cli/dispatch.ts +154 -47
- package/packages/core/src/cli/help.ts +59 -22
- package/packages/core/src/cli/init-hosted-accounts.ts +54 -0
- package/packages/core/src/cli/init-readiness-remote.ts +16 -3
- package/packages/core/src/cli/init-validation.ts +144 -42
- package/packages/core/src/cli/issue-links.ts +67 -0
- package/packages/core/src/cli/main.ts +32 -15
- package/packages/core/src/cli/pr-summary-publication.ts +38 -7
- package/packages/core/src/cli/publication-settlement.ts +36 -24
- package/packages/core/src/cli/repository-status.ts +201 -49
- package/packages/core/src/cli/status.ts +41 -3
- package/packages/core/src/cli/terminals.ts +37 -2
- package/packages/core/src/cli/ticket-editor.ts +20 -6
- package/packages/core/src/cli/ticket.ts +264 -46
- package/packages/core/src/cli/triage-count-sampler.ts +59 -0
- package/packages/core/src/cli/watch.ts +4 -0
- package/packages/core/src/config/live.ts +45 -4
- package/packages/core/src/config/load.ts +9 -0
- package/packages/core/src/config/pipeline-source.ts +6 -2
- package/packages/core/src/config/ready-assignee.ts +86 -0
- package/packages/core/src/config/schema.ts +164 -36
- package/packages/core/src/distribution-packaging.ts +1 -1
- package/packages/core/src/events/catalog.ts +5 -0
- package/packages/core/src/events/compatibility.ts +2 -1
- package/packages/core/src/events/payloads.ts +70 -0
- package/packages/core/src/events/policy.ts +8 -0
- package/packages/core/src/events/repository.ts +91 -28
- package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +41 -0
- package/packages/core/src/kernel/build-identity.ts +12 -0
- package/packages/core/src/kernel/change-presence.ts +139 -6
- package/packages/core/src/kernel/dispatch-capacity.ts +80 -14
- package/packages/core/src/kernel/dispatch-status.ts +10 -1
- package/packages/core/src/kernel/dispatch-upgrade.ts +104 -5
- package/packages/core/src/kernel/engine.ts +4 -2
- package/packages/core/src/kernel/finalize-pr-rejection.ts +95 -0
- package/packages/core/src/kernel/generators/repository-journals.ts +15 -1
- package/packages/core/src/kernel/harvest.ts +4 -1
- package/packages/core/src/kernel/integration-completeness.ts +104 -17
- package/packages/core/src/kernel/integration-landing.ts +17 -0
- package/packages/core/src/kernel/integration-state.ts +17 -0
- package/packages/core/src/kernel/issue-keywords.ts +202 -0
- package/packages/core/src/kernel/janitor-failure.ts +11 -0
- package/packages/core/src/kernel/kernel-git.ts +87 -0
- package/packages/core/src/kernel/landing-readiness.ts +25 -17
- package/packages/core/src/kernel/log-index.ts +1 -1
- package/packages/core/src/kernel/node-issue-links.ts +142 -0
- package/packages/core/src/kernel/node-parent.ts +6 -0
- package/packages/core/src/kernel/node-restack-transaction.ts +2 -0
- package/packages/core/src/kernel/pr-summary.ts +24 -0
- package/packages/core/src/kernel/read-deferrals.ts +75 -12
- package/packages/core/src/kernel/read-facts.ts +32 -1
- package/packages/core/src/kernel/reconcile-restack.ts +1 -1
- package/packages/core/src/kernel/reducer-registry.ts +31 -1
- package/packages/core/src/kernel/reducer.ts +90 -2
- package/packages/core/src/kernel/ticket-preparation.ts +12 -0
- package/packages/core/src/kernel/verify-budget.ts +43 -0
- package/packages/core/src/operator/index.ts +3 -1
- package/packages/core/src/operator/presentation.ts +3 -0
- package/packages/core/src/operator/protocol.ts +38 -2
- package/packages/core/src/operator/query.ts +66 -29
- package/packages/core/src/operator/registry.ts +47 -26
- package/packages/core/src/operator/tickets.ts +77 -10
- package/packages/core/src/plugin-sdk/index.ts +13 -0
- package/packages/core/src/plugins/manifest.ts +1 -1
- package/packages/core/src/plugins/registry.ts +1 -0
- package/packages/core/src/ports/forge/contract.ts +69 -0
- package/packages/core/src/ports/forge/create.ts +5 -0
- package/packages/core/src/ports/forge/fake.ts +184 -3
- package/packages/core/src/ports/forge/git-rewrite.ts +4 -2
- package/packages/core/src/ports/forge/github.ts +175 -38
- package/packages/core/src/ports/forge/local-git.ts +14 -0
- package/packages/core/src/ports/forge/readiness.ts +10 -0
- package/packages/core/src/ports/forge-failure.ts +43 -0
- package/packages/core/src/ports/runner/claude.ts +7 -1
- package/packages/core/src/ports/runner/codex.ts +7 -2
- package/packages/core/src/ports/runner/native-cli-fixture.ts +2 -1
- package/packages/core/src/ports/runner/pi.ts +7 -1
- package/packages/core/src/ports/runner/runtime.ts +3 -0
- package/packages/core/src/ports/runner/start-prompt.ts +37 -0
- package/packages/core/src/ports/tickets/contract.ts +320 -7
- package/packages/core/src/ports/tickets/create.ts +72 -17
- package/packages/core/src/ports/tickets/fake.ts +18 -0
- package/packages/core/src/ports/tickets/file-codec.ts +20 -0
- package/packages/core/src/ports/tickets/file.ts +43 -1
- package/packages/core/src/ports/tickets/github-fake.ts +1123 -0
- package/packages/core/src/ports/tickets/github-issues.ts +431 -0
- package/packages/core/src/ports/tickets/github-validators.ts +194 -0
- package/packages/core/src/ports/tickets/github.ts +2029 -0
- package/packages/core/src/ports/tickets/hosted-index.ts +34 -3
- package/packages/core/src/ports/tickets/issue-links.ts +86 -0
- package/packages/core/src/ports/tickets/lifecycle.ts +60 -4
- package/packages/core/src/ports/tickets/linear.ts +66 -6
- package/packages/core/src/ports/tickets/migration.ts +290 -68
- package/packages/core/src/ports/tickets/operations.ts +98 -12
- package/packages/core/src/ports/tickets/priority.ts +55 -0
- package/packages/core/src/ports/tickets/remote-protocol.ts +195 -29
- package/packages/core/src/ports/tickets/remote.ts +188 -13
- package/packages/core/src/ports/tickets/revision.ts +22 -1
- package/packages/core/src/ports/tickets/states.ts +43 -0
- package/packages/core/src/ports/tickets/tree.ts +58 -12
- package/packages/core/src/ports/tickets/update.ts +12 -2
- package/packages/core/src/ports/types.ts +194 -11
- package/packages/core/src/ports/workspace/commit-preservation.ts +135 -13
- package/packages/core/src/ports/workspace/git-worktree.ts +3 -1
- package/packages/core/src/ports/workspace/vercel-sandbox.ts +132 -27
- package/packages/core/src/processes/build-runner.ts +99 -21
- package/packages/core/src/processes/dispatcher.ts +1080 -533
- package/packages/core/src/processes/execution-no-progress.ts +5 -0
- package/packages/core/src/processes/harvest-runner.ts +17 -8
- package/packages/core/src/processes/harvest.ts +5 -8
- package/packages/core/src/processes/tick-publication.ts +12 -2
- package/packages/core/src/processes/ticket-scan-schedule.ts +78 -0
- package/packages/core/src/processes/workspace-preservation.ts +37 -2
- package/packages/core/src/runtime-identity.ts +10 -2
- package/packages/core/src/scenarios/harness.ts +4 -0
- package/packages/core/src/store/adapter.ts +7 -1
- package/packages/core/src/store/contract.ts +83 -2
- package/packages/core/src/store/digest.ts +32 -1
- package/packages/core/src/store/reducer-value-shapes.json +4187 -3391
- package/packages/core/src/store/remote/protocol.ts +2 -0
- package/packages/core/src/store/remote/released-clients.json +22 -0
- package/packages/core/src/store/remote/released-reducer-values/1.5.0.json +26924 -0
- package/packages/core/src/store/remote/released-reducer-values/index.ts +2 -0
- package/packages/core/src/store/repo-state-events.ts +2 -0
- package/packages/core/src/store/types.ts +5 -0
- package/packages/core/src/testing/dispatch-read-budget.ts +729 -123
- package/packages/core/src/testing/index.ts +18 -1
- package/packages/core/src/testing/presence-history.ts +79 -0
- package/packages/core/src/testing/reduced-read-budget.ts +1197 -31
- package/packages/core/src/testing/upgrade-generations.ts +77 -0
- package/skills/code-review/SKILL.md +4 -3
- package/skills/finalize/SKILL.md +18 -2
- package/skills/guide/SKILL.md +382 -139
- package/skills/guide/references/accounts.md +9 -0
- package/skills/guide/references/integration-tree.md +91 -28
- package/skills/guide/references/merge-policy.md +28 -9
- package/skills/guide/references/operator-api.md +43 -18
- package/skills/guide/references/plugin-authoring.md +85 -8
- package/skills/guide/references/remote-store-protocol.md +25 -7
- package/skills/guide/references/remote-ticket-protocol.md +126 -12
- package/skills/guide/references/restacking.md +20 -6
- package/skills/guide/references/setup.md +19 -13
- package/skills/guide/references/spec-standard.md +2 -1
- package/skills/guide/references/ticket-dependencies.md +26 -8
- package/skills/guide/references/ticket-migration.md +70 -7
- package/skills/harvest-review/SKILL.md +4 -3
- package/skills/implement/SKILL.md +20 -1
- package/skills/operate/SKILL.md +103 -28
- package/skills/plan/SKILL.md +1 -1
- package/skills/reconcile/SKILL.md +5 -4
- package/skills/spec/SKILL.md +15 -2
- package/skills/tickets/SKILL.md +114 -37
- package/templates/autobuild.toml +5 -0
- package/templates/hosted-service/package.json +2 -2
package/skills/tickets/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tickets
|
|
3
|
-
description: Work this repo's local ticket tracker — create or edit a ticket, amend blockedBy dependencies, report the backlog, triage the inbox, move work between
|
|
3
|
+
description: Work this repo's local ticket tracker — create or edit a ticket, amend blockedBy dependencies, report the backlog, triage the inbox, move work between lifecycle roles (triage, backlog/icebox, ready, rejected) and any repository-defined states, or answer "what's the status of ticket X". Use whenever the user asks about tickets, blockers, the backlog, or wants something queued for autobuild to build.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# /tickets
|
|
@@ -28,7 +28,8 @@ and targets while the node recollects and verifies the new revision, including
|
|
|
28
28
|
on the same head after failure. See
|
|
29
29
|
[iterating inside a node](../ab-guide/references/integration-tree.md#iterating-inside-a-node)
|
|
30
30
|
and [revision restrictions](../ab-guide/references/integration-tree.md#operator-node-spec-revisions).
|
|
31
|
-
Open children keep the node incomplete
|
|
31
|
+
Open children keep the node incomplete, including triage, backlog and ready
|
|
32
|
+
children; a rejected child does not. Completed nodes close admission.
|
|
32
33
|
|
|
33
34
|
For node lifecycle, target validation and source-specific storage, read
|
|
34
35
|
[nodes and targets](../ab-guide/references/integration-tree.md). When filing
|
|
@@ -65,27 +66,34 @@ that directory instead), holding the four lifecycle state directories plus any o
|
|
|
65
66
|
dispatcher uses. Any other directory is a repository-defined state: the
|
|
66
67
|
dispatcher never moves tickets into it and never dispatches from it unless
|
|
67
68
|
`autobuild.toml` names it (for example `readyState` or `proposalState`).
|
|
69
|
+
The optional backlog and rejected roles are directories too, named by
|
|
70
|
+
`[tickets].backlogState` and `rejectedState` (`ab init` writes `backlog` and
|
|
71
|
+
`rejected`); the dispatcher never claims from or moves into them.
|
|
68
72
|
|
|
69
73
|
```
|
|
70
74
|
.autobuild/tickets/
|
|
71
|
-
triage/
|
|
72
|
-
ready/
|
|
73
|
-
doing/
|
|
74
|
-
done/
|
|
75
|
-
|
|
75
|
+
triage/ # filed, not groomed — the inbox
|
|
76
|
+
ready/ # groomed; file lifecycle-state gate satisfied
|
|
77
|
+
doing/ # claimed; preparing or running a build
|
|
78
|
+
done/ # merged
|
|
79
|
+
backlog/ # the backlog role once configured and first used
|
|
80
|
+
rejected/ # the rejected role once configured and first used
|
|
76
81
|
```
|
|
77
82
|
|
|
83
|
+
"Building" is the claimed role, `doing/` for this tracker. It is not a role you
|
|
84
|
+
move work into: the dispatcher moves a ticket there when it claims it.
|
|
85
|
+
|
|
78
86
|
**A ticket's state is the directory it is in.** There is no `state` field
|
|
79
87
|
anywhere. Do not try to change a ticket's state by editing the file.
|
|
80
88
|
|
|
81
89
|
Each ticket is `<id>.md`: TOML frontmatter between `+++` fences carrying `id`
|
|
82
|
-
and `title` (and optional `labels` and `
|
|
90
|
+
and `title` (and optional `labels`, `blockedBy`, `issueLinks` and `priority`), then the body — which is
|
|
83
91
|
the spec.
|
|
84
92
|
|
|
85
93
|
## Create a ticket
|
|
86
94
|
|
|
87
95
|
```
|
|
88
|
-
ab ticket create "Rate-limit auth endpoints" --body spec.md [--labels bug,api] [--blocked-by file-1,file-2]
|
|
96
|
+
ab ticket create "Rate-limit auth endpoints" --body spec.md [--labels bug,api] [--blocked-by file-1,file-2] [--issues 824,820:refs] [--priority urgent]
|
|
89
97
|
```
|
|
90
98
|
|
|
91
99
|
It lands in `triage/` and prints the new id. `--body` is a file, and its
|
|
@@ -94,11 +102,14 @@ contents are the spec — write it to the complete
|
|
|
94
102
|
the conversational way to get there). A ticket whose body isn't a conforming
|
|
95
103
|
spec gets bounced back to `triage/` by the dispatcher rather than built.
|
|
96
104
|
Blocker ids are source-local; every blocker must exist before creation
|
|
97
|
-
succeeds.
|
|
105
|
+
succeeds. When the ticket originates from a forge issue, attach it with
|
|
106
|
+
`--issues`: `N` (intent `closes`, the default) when the ticket fully resolves
|
|
107
|
+
the issue, `N:refs` when it only partly addresses it. `--priority urgent` makes
|
|
108
|
+
the dispatcher claim it before normal ready work; omit it for normal.
|
|
98
109
|
|
|
99
110
|
For dependencies on any source, follow the
|
|
100
111
|
[safe blocker-filing workflow](../ab-guide/references/ticket-dependencies.md).
|
|
101
|
-
Direct Linear record blockers after creating the issue, so a ready
|
|
112
|
+
Direct Linear and GitHub record blockers after creating the issue, so a ready
|
|
102
113
|
issue can be claimed before `create --blocked-by` returns. Stage dependents in a
|
|
103
114
|
known non-ready state, verify all blockers with `ab ticket show --json`, then use
|
|
104
115
|
`ab ticket move` to publish the intended ready destination. Do not use the local
|
|
@@ -112,12 +123,18 @@ Use the configured TicketSource rather than hand-editing frontmatter/body:
|
|
|
112
123
|
ab ticket update file-3 --body spec.md
|
|
113
124
|
ab ticket update file-3 --title "New title" --labels bug,api
|
|
114
125
|
ab ticket update file-3 --labels ''
|
|
126
|
+
ab ticket update file-3 --issues 824:refs
|
|
127
|
+
ab ticket update file-3 --priority urgent
|
|
115
128
|
ab ticket block file-3 file-1
|
|
116
129
|
ab ticket unblock file-3 file-1
|
|
117
130
|
```
|
|
118
131
|
|
|
119
132
|
Update is partial: omitted fields stay untouched, while an explicitly empty
|
|
120
|
-
`--labels` clears labels.
|
|
133
|
+
`--labels` clears labels. `--issues` replaces the whole set of issue links and
|
|
134
|
+
`--issues ''` clears it. `--priority urgent|normal` sets the dispatch class;
|
|
135
|
+
the file tracker writes `priority = "urgent"` and removes the key for normal. A
|
|
136
|
+
source that cannot store priority refuses `urgent`, names itself, and writes
|
|
137
|
+
nothing; `normal` succeeds there. It cannot change state. For block/unblock the first
|
|
121
138
|
id is the ticket being edited; the second is its blocker. Both are safe to
|
|
122
139
|
retry, and adding validates the blocker exists and is not the ticket itself.
|
|
123
140
|
|
|
@@ -132,9 +149,10 @@ ls .autobuild/tickets/doing # what's building right now
|
|
|
132
149
|
The filename is the id. For a title, read the file's frontmatter. To report
|
|
133
150
|
the whole backlog, cover every state — lifecycle and custom — via
|
|
134
151
|
`ab ticket states` or by listing every directory under the tracker root, so the
|
|
135
|
-
report includes
|
|
136
|
-
|
|
137
|
-
|
|
152
|
+
report includes the backlog and rejected states and any other category. The
|
|
153
|
+
roles column of `ab ticket states` names which states hold `backlog` and
|
|
154
|
+
`rejected`. `ab ticket list` without filters shows only the ready state,
|
|
155
|
+
regardless of other states, so it is not a backlog report.
|
|
138
156
|
|
|
139
157
|
## Groom / transition a ticket
|
|
140
158
|
|
|
@@ -163,13 +181,19 @@ another move to `ready/`, subject to the remaining dispatch gates and available
|
|
|
163
181
|
capacity. Blocker edits must use the source-agnostic `ab ticket block` and
|
|
164
182
|
`ab ticket unblock` commands shown above.
|
|
165
183
|
|
|
184
|
+
With a free slot the dispatcher claims eligible urgent tickets first, then
|
|
185
|
+
normal ones, each in source order; a blocked urgent ticket waits while normal
|
|
186
|
+
work proceeds, and urgency never stops a running build. To expedite a ticket,
|
|
187
|
+
mark it urgent rather than moving other tickets out of `ready/`.
|
|
188
|
+
|
|
166
189
|
When the dispatcher claims an eligible file ticket, it moves it to `doing/`,
|
|
167
190
|
then to `done/` on merge or back to `triage/` if the build aborts or the spec
|
|
168
191
|
bounces. A caught failure before build creation returns it to configured Ready
|
|
169
192
|
after safe ownership checks; unfinished recovery stays durably tracked and
|
|
170
193
|
withheld from another claim. Uncertain ownership or externally changed/missing
|
|
171
|
-
tickets end automatic recovery with an `abandoned` resolution,
|
|
172
|
-
|
|
194
|
+
tickets end automatic recovery with an `abandoned` resolution, reported once
|
|
195
|
+
in that tick's dispatcher diagnostics, leaving the ticket unchanged for
|
|
196
|
+
operator inspection. See [preparation recovery](../ab-guide/references/restacking.md#ticket-preparation-before-build-creation).
|
|
173
197
|
|
|
174
198
|
**Don't hand-move anything out of `doing/`** — dispatch preparation or a build owns it. If you need to
|
|
175
199
|
stop a build, that's `ab` (or a human), not `mv`.
|
|
@@ -183,17 +207,42 @@ role for the builds the repository's dispatcher dispatches. Explicit human
|
|
|
183
207
|
instructions override these defaults; non-ready filing needs no watch. See
|
|
184
208
|
[After filing](../ab-spec/SKILL.md#after-filing-check-operator-presence).
|
|
185
209
|
|
|
186
|
-
##
|
|
210
|
+
## Backlog (icebox)
|
|
187
211
|
|
|
188
|
-
|
|
189
|
-
dispatches from.
|
|
212
|
+
The backlog role holds work deliberately deferred, groomed or not, that nothing
|
|
213
|
+
dispatches from. "Ice it", "icebox" and "backlog" all mean this role. Move by
|
|
214
|
+
role, so you never need the repository's native name:
|
|
190
215
|
|
|
191
216
|
```
|
|
192
|
-
ab ticket
|
|
217
|
+
ab ticket move file-3 --role backlog
|
|
193
218
|
```
|
|
194
219
|
|
|
195
|
-
|
|
196
|
-
`
|
|
220
|
+
A source that creates states creates the role state on first use. To revive a
|
|
221
|
+
ticket, use `--role triage` when it needs regrooming, or `--role ready` when its
|
|
222
|
+
spec still holds.
|
|
223
|
+
|
|
224
|
+
## Rejected
|
|
225
|
+
|
|
226
|
+
The rejected role holds work that was considered and declined. "Reject" and
|
|
227
|
+
"won't do" mean this role:
|
|
228
|
+
|
|
229
|
+
```
|
|
230
|
+
ab ticket move file-3 --role rejected
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
A rejected ticket never resolves a blocker: tickets it blocks stay unclaimed,
|
|
234
|
+
and `ab ticket show` marks it `(rejected)`. A rejected child no longer keeps its
|
|
235
|
+
node incomplete. Moving it back to triage, backlog or ready restores ordinary
|
|
236
|
+
behavior with no other step.
|
|
237
|
+
|
|
238
|
+
## When a role is not configured
|
|
239
|
+
|
|
240
|
+
Both roles are optional. When the repository has not set the key, the move is
|
|
241
|
+
refused with a message naming it (`[tickets].backlogState` or
|
|
242
|
+
`[tickets].rejectedState`). Tell the human, and recommend setting the key to the
|
|
243
|
+
state that should hold that work, for example `backlogState = "backlog"`. Do not
|
|
244
|
+
invent a custom state in its place, and do not move to a state that only shares
|
|
245
|
+
the role's name: without the key, that state holds no role.
|
|
197
246
|
|
|
198
247
|
## Triage the backlog
|
|
199
248
|
|
|
@@ -203,8 +252,9 @@ To run a pass over `triage/`:
|
|
|
203
252
|
2. For each ticket in `triage/`, read it with `ab ticket show <id>` and judge
|
|
204
253
|
whether its body meets the
|
|
205
254
|
[spec standard](../ab-guide/references/spec-standard.md).
|
|
206
|
-
3. Move it
|
|
207
|
-
|
|
255
|
+
3. Move it with `--role ready` if it conforms and should be built,
|
|
256
|
+
`--role backlog` if it should wait, or `--role rejected` if it won't be
|
|
257
|
+
done; to another existing category if one fits; otherwise leave it in
|
|
208
258
|
`triage/` and tell the user why.
|
|
209
259
|
4. Report every move to the user in the session — id, title, destination, and
|
|
210
260
|
reason. A move leaves no comment on the ticket, so the report is the only
|
|
@@ -215,12 +265,14 @@ To run a pass over `triage/`:
|
|
|
215
265
|
Run `ab ticket states` before creating anything. Reuse an existing state whose
|
|
216
266
|
purpose fits. Create a new one only for a recurring reason that no existing
|
|
217
267
|
state covers, with a lowercase hyphenated noun name and a one-line `--about`
|
|
218
|
-
purpose
|
|
268
|
+
purpose:
|
|
219
269
|
|
|
220
270
|
```
|
|
221
|
-
ab ticket state create
|
|
271
|
+
ab ticket state create needs-design --about "Waiting on a design decision"
|
|
222
272
|
```
|
|
223
273
|
|
|
274
|
+
Deferred and declined work belong to the backlog and rejected roles, never to an
|
|
275
|
+
invented state; see [When a role is not configured](#when-a-role-is-not-configured).
|
|
224
276
|
Never invent a second ready, doing, or done state, never move anything out of
|
|
225
277
|
`doing/`, and never create states for a build's internal progress — the
|
|
226
278
|
lifecycle belongs to the dispatcher. Remember that `ab ticket list` without
|
|
@@ -251,11 +303,28 @@ guidance: state and labels live in Linear. The source-agnostic `ab ticket block`
|
|
|
251
303
|
and `ab ticket unblock` commands still edit blocker relationships through the
|
|
252
304
|
configured source.
|
|
253
305
|
|
|
306
|
+
No GitHub lifecycle UI either. When `[tickets] source = "github"`, tickets are
|
|
307
|
+
the repository's issues and ids are issue numbers (`123` or `#123`). State
|
|
308
|
+
lives on GitHub as one `autobuild:<state>` label on an open issue (none means
|
|
309
|
+
triage) and as the closing reason (completed is done, not planned is the
|
|
310
|
+
rejected role). Issue links to other issues are `autobuild-link:<intent> #<n>`
|
|
311
|
+
labels, and blockers are native issue dependencies. Use `ab ticket move` and
|
|
312
|
+
`--issues` rather than editing those labels on GitHub, and never leave two state
|
|
313
|
+
labels on one issue: it drops out of listings until one is removed. A node is
|
|
314
|
+
an issue with the exact `node` label, and a ticket's target is the node whose
|
|
315
|
+
sub-issue it is; another parent is plain grouping and gives no target. Set them
|
|
316
|
+
with `ab ticket create --kind`/`--target` and `ab ticket update --kind`,
|
|
317
|
+
`--target` or `--no-target`; sub-issues and `node` labels changed on GitHub are
|
|
318
|
+
read the same way. `ab ticket state create` makes the `autobuild:<state>` label, with the purpose
|
|
319
|
+
as its description, and refuses an existing name as hosted creation does. GitHub
|
|
320
|
+
tickets carry no comment history, so `ab ticket show` lists none; only
|
|
321
|
+
`ab ticket export` and `import` read it.
|
|
322
|
+
|
|
254
323
|
## Hosted ticket states
|
|
255
324
|
|
|
256
325
|
For `[tickets].source = "hosted"`, states are project-owned service data.
|
|
257
326
|
Run `ab ticket states` before creating a state, and reuse an existing purpose
|
|
258
|
-
when it fits. `ab ticket state create
|
|
327
|
+
when it fits. `ab ticket state create needs-design --about "Waiting on design"` creates
|
|
259
328
|
an empty state with an optional one-line, nonblank purpose. Custom names use
|
|
260
329
|
one to forty lowercase letters, digits, or hyphens, starting with a letter.
|
|
261
330
|
Hosted creation refuses an existing name in any letter case and never replaces
|
|
@@ -265,9 +334,12 @@ Use `ab ticket create --state <name>`, `ab ticket move <id> <name>`, and
|
|
|
265
334
|
`ab ticket list --state <name>` with any existing state. Unknown states are
|
|
266
335
|
refused with the available names. Configured states are added automatically;
|
|
267
336
|
former configuration roles remain custom states with their tickets intact.
|
|
268
|
-
Listing puts
|
|
269
|
-
other states
|
|
270
|
-
|
|
337
|
+
Listing puts role-holding states first in workflow order (triage, backlog,
|
|
338
|
+
ready, claimed, done, rejected), then other states, including empty states and
|
|
339
|
+
purposes. Move by role with `ab ticket move <id> --role backlog|rejected|triage|ready`
|
|
340
|
+
exactly as for the file source; MCP `tickets.move` takes the same roles. A role
|
|
341
|
+
mapped onto an existing state, such as `backlogState = "icebox"`, keeps that
|
|
342
|
+
state and its tickets. Configured names keep their spelling; lookup prefers an exact match, then a unique
|
|
271
343
|
case-insensitive match. States belong to one project.
|
|
272
344
|
|
|
273
345
|
The directory `ls` and `mv` instructions above apply only to the file source.
|
|
@@ -281,19 +353,24 @@ Every ticket read includes an opaque `revision`. Pass it as `expectedRevision`
|
|
|
281
353
|
`move`, `block` and `unblock`. A stale write fails without changing anything and
|
|
282
354
|
reports the current revision. Omission preserves unguarded behavior. Blocker
|
|
283
355
|
checks cover the entire batch. Dispatcher moves remain unguarded and change the
|
|
284
|
-
revision. Sources without guarded writes, including Linear, refuse
|
|
285
|
-
revisions rather than ignoring them.
|
|
356
|
+
revision. Sources without guarded writes, including Linear and GitHub, refuse
|
|
357
|
+
supplied revisions rather than ignoring them.
|
|
286
358
|
|
|
287
359
|
`ab ticket edit <id>` opens `$VISUAL`, falling back to `$EDITOR`, using TOML
|
|
288
360
|
frontmatter and a Markdown body. Only title, body and labels are editable;
|
|
289
|
-
kind, target, id, blockers, creation key and reference comments are read-only. It saves only
|
|
290
|
-
changed fields with the opening revision.
|
|
361
|
+
kind, target, id, blockers, issue links, priority, creation key and reference comments are read-only. It saves only
|
|
362
|
+
changed fields with the opening revision. Sources without guarded writes,
|
|
363
|
+
including Linear and GitHub, re-read the ticket immediately before an
|
|
364
|
+
unguarded write and refuse a changed revision, with the no-lock race window of file checks. Unchanged or formatting-only edits
|
|
291
365
|
write nothing. On conflict, invalid input or editor failure, the error names an
|
|
292
366
|
absolute file path containing the edited text. Read the current ticket and
|
|
293
367
|
reapply the intended changes before retrying; conflicts are never merged.
|
|
294
368
|
|
|
295
|
-
File and Linear revisions fingerprint kind, target, title, body, canonical label/blocker sets
|
|
296
|
-
and
|
|
369
|
+
File and Linear revisions fingerprint kind, target, title, body, canonical label/blocker sets,
|
|
370
|
+
state and urgent priority; file revisions also cover nonempty issue links. GitHub revisions
|
|
371
|
+
fingerprint kind, target, title, body, canonical label/blocker sets, state and issue links,
|
|
372
|
+
including the ticket's own issue; GitHub tickets carry no comments. Reverting
|
|
373
|
+
identical content restores its fingerprint. File checks
|
|
297
374
|
re-read immediately before writing, with the existing no-lock race window.
|
|
298
375
|
Direct file edits and state-directory moves change revisions. File comments
|
|
299
376
|
change the body and revision; separate hosted comments do not. Hosted revisions
|
package/templates/autobuild.toml
CHANGED
|
@@ -37,3 +37,8 @@ harvestThreshold = 5
|
|
|
37
37
|
[tickets]
|
|
38
38
|
source = "file"
|
|
39
39
|
readyState = "ready"
|
|
40
|
+
# Optional, recommended lifecycle roles: deferred and declined work.
|
|
41
|
+
# Keep both for source = "file", "hosted" or "github"; a Linear team maps them
|
|
42
|
+
# to its own workflow names instead. Remove either to go without that role.
|
|
43
|
+
backlogState = "backlog"
|
|
44
|
+
rejectedState = "rejected"
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"build": "ab-hosted-service-build"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@defrex/autobuild-hosted-store-service": "1.
|
|
8
|
-
"@defrex/autobuild": "1.
|
|
7
|
+
"@defrex/autobuild-hosted-store-service": "1.5.0",
|
|
8
|
+
"@defrex/autobuild": "1.5.0",
|
|
9
9
|
"next": "16.1.6",
|
|
10
10
|
"react": "19.2.4",
|
|
11
11
|
"react-dom": "19.2.4"
|