@defrex/autobuild 1.0.0-beta.3 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/README.md +1 -1
  2. package/SPEC.md +362 -56
  3. package/bin/ab-dispatch-generation.ts +93 -0
  4. package/docs/agent-runtimes.md +157 -0
  5. package/docs/answering-blocked-builds.md +21 -3
  6. package/docs/architecture.md +166 -7
  7. package/docs/build-store.md +123 -0
  8. package/docs/builds.md +82 -0
  9. package/docs/cli.md +48 -0
  10. package/docs/configuration-overview.md +93 -0
  11. package/docs/configuration.md +1778 -188
  12. package/docs/dispatcher-hosting.md +115 -0
  13. package/docs/dispatcher.md +59 -0
  14. package/docs/forges.md +121 -0
  15. package/docs/getting-started.md +60 -0
  16. package/docs/glossary.md +60 -0
  17. package/docs/hosted-service.md +2 -2
  18. package/docs/intake.md +48 -0
  19. package/docs/integration-overview.md +81 -0
  20. package/docs/integration-tree.md +87 -2
  21. package/docs/integration.md +54 -0
  22. package/docs/operating.md +114 -0
  23. package/docs/operator-api.md +64 -11
  24. package/docs/operator-surfaces.md +90 -0
  25. package/docs/overview.md +49 -0
  26. package/docs/plugin-authoring.md +426 -0
  27. package/docs/remote-store-protocol.md +12 -9
  28. package/docs/restacking.md +4 -1
  29. package/docs/seams.md +66 -0
  30. package/docs/setup.md +28 -6
  31. package/docs/skills.md +119 -0
  32. package/docs/spec-standard.md +23 -5
  33. package/docs/ticket-sources.md +132 -0
  34. package/docs/tickets.md +69 -0
  35. package/docs/troubleshooting.md +111 -0
  36. package/docs/upgrading.md +50 -0
  37. package/docs/verification.md +146 -0
  38. package/docs/website.md +47 -5
  39. package/docs/workspaces.md +152 -0
  40. package/package.json +5 -4
  41. package/packages/core/src/cli/artifact.ts +5 -4
  42. package/packages/core/src/cli/attention.ts +2 -0
  43. package/packages/core/src/cli/binary-direct.ts +190 -0
  44. package/packages/core/src/cli/binary-lifecycle.ts +46 -0
  45. package/packages/core/src/cli/binary.ts +24 -210
  46. package/packages/core/src/cli/build-control.ts +105 -2
  47. package/packages/core/src/cli/context.ts +41 -1
  48. package/packages/core/src/cli/dashboard/hand-pushed.ts +24 -0
  49. package/packages/core/src/cli/dashboard/handoff.ts +64 -0
  50. package/packages/core/src/cli/dashboard/integration-detail.ts +3 -0
  51. package/packages/core/src/cli/dashboard/model.ts +34 -10
  52. package/packages/core/src/cli/dashboard/render.ts +24 -2
  53. package/packages/core/src/cli/dashboard/rollback.ts +30 -0
  54. package/packages/core/src/cli/dispatch-args.ts +53 -0
  55. package/packages/core/src/cli/dispatch-crash-budget.ts +15 -0
  56. package/packages/core/src/cli/dispatch-frontend.ts +52 -5
  57. package/packages/core/src/cli/dispatch-handoff.ts +276 -0
  58. package/packages/core/src/cli/dispatch-launch-contract.ts +170 -0
  59. package/packages/core/src/cli/dispatch-launcher.ts +580 -0
  60. package/packages/core/src/cli/dispatch-parent-watch.ts +44 -0
  61. package/packages/core/src/cli/dispatch-preflight.ts +272 -0
  62. package/packages/core/src/cli/dispatch-presentation-job.ts +46 -0
  63. package/packages/core/src/cli/dispatch-presentation-ownership.ts +9 -0
  64. package/packages/core/src/cli/dispatch-process.ts +22 -90
  65. package/packages/core/src/cli/dispatch-readiness.ts +47 -0
  66. package/packages/core/src/cli/dispatch-repository-feed.ts +5 -1
  67. package/packages/core/src/cli/dispatch-runtime-cache.ts +522 -0
  68. package/packages/core/src/cli/dispatch-runtime-dependencies.ts +291 -0
  69. package/packages/core/src/cli/dispatch-runtime-use.ts +336 -0
  70. package/packages/core/src/cli/dispatch-upgrade-controller.ts +221 -0
  71. package/packages/core/src/cli/dispatch-upgrade-install.ts +258 -0
  72. package/packages/core/src/cli/dispatch-upgrade-source.ts +309 -0
  73. package/packages/core/src/cli/dispatch-upgrade-target.ts +190 -0
  74. package/packages/core/src/cli/dispatch.ts +604 -60
  75. package/packages/core/src/cli/dispatcher-liveness.ts +1 -1
  76. package/packages/core/src/cli/env.ts +1 -1
  77. package/packages/core/src/cli/harvest.ts +28 -11
  78. package/packages/core/src/cli/help.ts +10 -5
  79. package/packages/core/src/cli/installation.ts +5 -3
  80. package/packages/core/src/cli/main-checkout.ts +59 -0
  81. package/packages/core/src/cli/main.ts +15 -45
  82. package/packages/core/src/cli/node-verification-provenance.ts +97 -0
  83. package/packages/core/src/cli/repo-state.ts +3 -58
  84. package/packages/core/src/cli/repository-status.ts +67 -3
  85. package/packages/core/src/cli/runtime-spawn.ts +16 -0
  86. package/packages/core/src/cli/status.ts +57 -3
  87. package/packages/core/src/cli/upgrade-followup.ts +25 -0
  88. package/packages/core/src/cli/wait.ts +3 -0
  89. package/packages/core/src/cli/watch.ts +7 -0
  90. package/packages/core/src/config/landing.ts +8 -0
  91. package/packages/core/src/config/live.ts +1 -0
  92. package/packages/core/src/config/reference-metadata.ts +31 -0
  93. package/packages/core/src/config/reference.ts +342 -0
  94. package/packages/core/src/config/roles.ts +1 -1
  95. package/packages/core/src/config/schema.ts +352 -10
  96. package/packages/core/src/distribution-packaging.ts +116 -0
  97. package/packages/core/src/events/catalog.ts +6 -0
  98. package/packages/core/src/events/payloads.ts +53 -9
  99. package/packages/core/src/events/policy.ts +25 -0
  100. package/packages/core/src/events/repository.ts +184 -4
  101. package/packages/core/src/events/runtime.ts +16 -0
  102. package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +2515 -78
  103. package/packages/core/src/kernel/dispatch-drain-recovery.ts +121 -0
  104. package/packages/core/src/kernel/dispatch-status.ts +4 -2
  105. package/packages/core/src/kernel/dispatch-upgrade.ts +171 -0
  106. package/packages/core/src/kernel/dispatcher-liveness.ts +7 -0
  107. package/packages/core/src/kernel/generators/repository-journals.ts +82 -0
  108. package/packages/core/src/kernel/guarded-forge.ts +1 -1
  109. package/packages/core/src/kernel/harvest.ts +98 -4
  110. package/packages/core/src/kernel/integration-attention.ts +20 -0
  111. package/packages/core/src/kernel/integration-state.ts +80 -11
  112. package/packages/core/src/kernel/landing-readiness.ts +6 -1
  113. package/packages/core/src/kernel/mixed-version.ts +34 -0
  114. package/packages/core/src/kernel/node-polling.ts +160 -0
  115. package/packages/core/src/kernel/read-facts.ts +40 -5
  116. package/packages/core/src/kernel/reducer-registry.ts +3 -0
  117. package/packages/core/src/kernel/reducer.ts +75 -14
  118. package/packages/core/src/kernel/service-facts.ts +11 -4
  119. package/packages/core/src/ontology.ts +2 -2
  120. package/packages/core/src/open-map.ts +3 -1
  121. package/packages/core/src/operator/presentation.ts +7 -0
  122. package/packages/core/src/operator/query.ts +6 -2
  123. package/packages/core/src/operator/registry.ts +1 -1
  124. package/packages/core/src/plugins/load.ts +4 -1
  125. package/packages/core/src/plugins/runtime-snapshot.ts +128 -0
  126. package/packages/core/src/ports/forge/contract.ts +29 -0
  127. package/packages/core/src/ports/forge/github.ts +189 -61
  128. package/packages/core/src/ports/forge-failure.ts +1 -0
  129. package/packages/core/src/ports/forge-telemetry.ts +3 -0
  130. package/packages/core/src/ports/runner/session-env.ts +1 -0
  131. package/packages/core/src/ports/types.ts +10 -0
  132. package/packages/core/src/ports/workspace/distribution-archive.ts +22 -149
  133. package/packages/core/src/ports/workspace/distribution-release.ts +56 -0
  134. package/packages/core/src/ports/workspace/git-worktree.ts +2 -1
  135. package/packages/core/src/ports/workspace/local-build-execution.ts +37 -17
  136. package/packages/core/src/processes/build-child-exit.ts +5 -26
  137. package/packages/core/src/processes/build-runner.ts +81 -11
  138. package/packages/core/src/processes/dispatcher.ts +254 -23
  139. package/packages/core/src/processes/execution-no-progress.ts +6 -0
  140. package/packages/core/src/processes/execution-relaunch.ts +30 -0
  141. package/packages/core/src/processes/execution-settlement.ts +16 -7
  142. package/packages/core/src/processes/harvest-runner.ts +328 -292
  143. package/packages/core/src/processes/process-group-reaper.ts +17 -10
  144. package/packages/core/src/runtime-identity.ts +22 -3
  145. package/packages/core/src/store/contract.ts +153 -0
  146. package/packages/core/src/store/local/store.ts +197 -72
  147. package/packages/core/src/store/reduced-reads.ts +8 -0
  148. package/packages/core/src/store/reducer-value-shapes.json +5783 -3305
  149. package/packages/core/src/store/remote/client.ts +43 -0
  150. package/packages/core/src/store/repo-state-events.ts +20 -3
  151. package/packages/core/src/store/types.ts +7 -0
  152. package/skills/finalize/SKILL.md +3 -1
  153. package/skills/guide/SKILL.md +273 -48
  154. package/skills/guide/references/integration-tree.md +87 -2
  155. package/skills/guide/references/operator-api.md +71 -14
  156. package/skills/guide/references/plugin-authoring.md +231 -266
  157. package/skills/guide/references/remote-store-protocol.md +12 -9
  158. package/skills/guide/references/restacking.md +4 -1
  159. package/skills/guide/references/setup.md +28 -6
  160. package/skills/guide/references/spec-standard.md +23 -5
  161. package/skills/harvest/SKILL.md +4 -0
  162. package/skills/harvest-review/SKILL.md +4 -0
  163. package/skills/implement/SKILL.md +4 -2
  164. package/skills/operate/SKILL.md +104 -35
  165. package/skills/plan/SKILL.md +12 -4
  166. package/skills/spec/SKILL.md +20 -2
  167. package/skills/tickets/SKILL.md +20 -1
  168. package/templates/hosted-service/package.json +2 -2
@@ -9,6 +9,8 @@ You are the planner for one build. Your contract: turn the spec into a plan
9
9
  another agent can implement without re-deriving your reasoning. You never
10
10
  write product code in this phase.
11
11
 
12
+ Guidance is an external operator answer, from the operator agent or a human.
13
+
12
14
  ## Session shape
13
15
 
14
16
  1. Run `ab context` first. It hydrates `.ab/` with everything you may see:
@@ -16,7 +18,7 @@ write product code in this phase.
16
18
  commands, and this round's `feedback` when the round has any), `.ab/spec.md`
17
19
  (the contract you plan against), `.ab/ticket.md`, your prior plan revision
18
20
  once you have one, and this round's feedback: `.ab/findings.json` (the
19
- reviewer's findings) or `.ab/guidance.json` (a human operator's answer to
21
+ reviewer's findings) or `.ab/guidance.json` (an operator's answer to
20
22
  the escalation that blocked this build). A round never carries both, and a
21
23
  round may carry neither.
22
24
  When the manifest lists `assets`, they are the build's pinned ticket assets
@@ -59,10 +61,14 @@ Put the selection in an opening TOML front-matter block in the same
59
61
 
60
62
  ```toml
61
63
  +++
62
- verifySteps = ["types", "e2e"]
64
+ verifySteps = ["types", "acceptance"]
63
65
  +++
64
66
  ```
65
67
 
68
+ Here, `acceptance` is an acceptance check: a repository-owned agent verify step
69
+ that runs the built software against each spec acceptance criterion, attaches
70
+ evidence, and returns a typed verdict. It leaves no test files behind.
71
+
66
72
  The array is the complete selected set, including every mandatory step. Its
67
73
  written order does not reorder execution; the kernel canonicalizes to
68
74
  `[verify].steps` order. With no front matter, all configured steps run, which
@@ -80,7 +86,9 @@ verdict.
80
86
  - **Steps** — ordered, concrete, each naming the files it touches and what
81
87
  changes. An implementer should be able to execute steps top to bottom.
82
88
  - **Testing** — what gets unit-tested and at which seams; what the verify
83
- steps will exercise.
89
+ steps will exercise. Prefer unit and integration tests at seams. Add end-to-end
90
+ or browser-automation tests only when the repository already maintains such a
91
+ suite or the spec explicitly asks for one.
84
92
  - **Risks** — the parts most likely to go wrong, and how the implementer
85
93
  will know.
86
94
 
@@ -97,7 +105,7 @@ A round that carries feedback carries exactly one kind, and only that file
97
105
  exists. `.ab/findings.json` is the reviewer's findings against your previous
98
106
  revision: address every one — change the plan, or state in the plan why the
99
107
  finding is wrong (the reviewer sees your revision next round).
100
- `.ab/guidance.json` is a human operator's answer to the escalation that blocked
108
+ `.ab/guidance.json` is an operator's answer to the escalation that blocked
101
109
  this build. It may have been raised by you or the reviewer, or by the kernel's
102
110
  plan-loop stall or policy guards. The file carries the escalation id and the
103
111
  answer text.
@@ -16,6 +16,24 @@ session.
16
16
 
17
17
  ## Node tickets and targets
18
18
 
19
+ Write a node ticket as a **charter**: the integration goal, checkable completion
20
+ conditions for the whole, and its destination and landing expectations under the
21
+ repository's effective policy. Put evolving feature specifics in child tickets.
22
+ The charter still follows all four parts of the spec standard: what and why,
23
+ verifiable acceptance criteria, out of scope, and evidence.
24
+
25
+ For example: “Integrate a coherent account-management flow so users can manage
26
+ their account in one place. Done means the child-delivered account settings and
27
+ account closure flows work together and pass integration verification. Land the
28
+ complete flow into its parent under the configured landing policy.” Record the
29
+ scope exclusions and supporting evidence alongside these criteria; describe each
30
+ flow's detailed requirements in its child spec.
31
+
32
+ A charter can evolve while the node is open. See
33
+ [iterating inside a node](../ab-guide/references/integration-tree.md#iterating-inside-a-node)
34
+ for adding children, hand-pushed tweaks, explicit charter revisions, and what
35
+ verification judges each against.
36
+
19
37
  For node lifecycle, target validation and source-specific storage, read
20
38
  [nodes and targets](../ab-guide/references/integration-tree.md). When filing
21
39
  related work, follow the shared
@@ -107,7 +125,7 @@ placement question. Never assume the source default is non-ready.
107
125
 
108
126
  For a dependency chain explicitly chosen to ship together under a node, create
109
127
  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
128
+ result. Write a spec-standard node charter in `integration.md` as well as the child
111
129
  specs. This example assumes the repository's triage state is `Triage`, its ready
112
130
  state is `Ready`, and the human requested ready placement for the whole set.
113
131
  Use the repository's actual states; if final placement is non-ready, leave the
@@ -212,7 +230,7 @@ planner does not treat it as a contract.
212
230
 
213
231
  Once work you specified sits in the ready state, its builds start without
214
232
  anyone watching them. By default, the agent that wrote the spec becomes their
215
- operator. You hold the context an escalation asks about — the intent, the
233
+ operator agent. You hold the context an escalation asks about — the intent, the
216
234
  alternatives the human rejected, what was ruled out of scope — and a build
217
235
  blocked on a question you could answer should not wait for a human.
218
236
 
@@ -11,6 +11,25 @@ content and blocker relationships. The default file source needs no secret.
11
11
 
12
12
  ## Node tickets and targets
13
13
 
14
+ Use a spec-standard charter for the node's integration goal, whole-level
15
+ completion and policy-controlled landing; put feature specifics in children.
16
+ While the node is open, iterate by adding spec-standard children targeting its
17
+ ticket id, pushing small maintainer-authorized tweaks to its recorded branch
18
+ with meaningful intent in commit messages, or explicitly revising its charter.
19
+ Node verification judges ordinary changes against the current event-authorized
20
+ charter or the introducing child's spec through the provenance mapping. Owned
21
+ hand-pushed commit messages authorize tweaks, judged for quality and consistency;
22
+ a missing covering spec alone is not a failure.
23
+
24
+ A ticket edit alone does not revise the active build. Use
25
+ `ab answer <node> --revise-spec replacement.md` or
26
+ `ab answer <node> --revise-spec-from-ticket`; children keep their specs, claims
27
+ and targets while the node recollects and verifies the new revision, including
28
+ on the same head after failure. See
29
+ [iterating inside a node](../ab-guide/references/integration-tree.md#iterating-inside-a-node)
30
+ and [revision restrictions](../ab-guide/references/integration-tree.md#operator-node-spec-revisions).
31
+ Open children keep the node incomplete; completed nodes close admission.
32
+
14
33
  For node lifecycle, target validation and source-specific storage, read
15
34
  [nodes and targets](../ab-guide/references/integration-tree.md). When filing
16
35
  related work, follow the shared
@@ -151,7 +170,7 @@ bounces.
151
170
  stop a build, that's `ab` (or a human), not `mv`.
152
171
 
153
172
  When a conversation queues work by moving it into `ready/` (or the configured
154
- ready state of any source), the agent that queued it becomes its operator by
173
+ ready state of any source), the agent that queued it becomes its operator agent by
155
174
  default, as the `ab-spec` skill describes under "After filing": load the
156
175
  `ab-operate` skill and shepherd those builds to completion unless the human
157
176
  says they will operate them, hands them to another agent, or the session
@@ -4,8 +4,8 @@
4
4
  "build": "ab-hosted-service-build"
5
5
  },
6
6
  "dependencies": {
7
- "@defrex/autobuild-hosted-store-service": "0.14.0",
8
- "@defrex/autobuild": "0.14.0",
7
+ "@defrex/autobuild-hosted-store-service": "1.0.0",
8
+ "@defrex/autobuild": "1.0.0",
9
9
  "next": "16.1.6",
10
10
  "react": "19.2.4",
11
11
  "react-dom": "19.2.4"