axstack 0.20.11 → 0.20.13

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 CHANGED
@@ -112,8 +112,8 @@ eligible peer-review requests, and the other monitors your open PRs and handles
112
112
  authorized repair events.
113
113
 
114
114
  The lanes use staggered 15-minute schedules. Each pass uses a fresh finite
115
- session in an isolated workspace and admits at most five executing PR jobs per
116
- lane, fewer under resource pressure. Waiting PRs remain tracked without consuming
115
+ session in an isolated workspace and admits eligible actionable PR events within
116
+ measured host capacity. Waiting PRs remain tracked without consuming
117
117
  execution slots, so a large open-PR backlog does not require an idle agent per PR.
118
118
  Completed passes save continuity and retire their own verified resources.
119
119
  Held jobs preserve evidence, use private worktree-local temporary paths, and
package/docs/workflows.md CHANGED
@@ -192,9 +192,9 @@ read-only observer for standalone watches and never sends.
192
192
  The accepted contract has exactly two logical native manager lanes: review at
193
193
  minutes `0,15,30,45` and watch at `7,22,37,52`. Each scheduled pass uses a
194
194
  fresh finite session in a new isolated workspace, scans complete
195
- discovery pages, and admits at most five executing
196
- PR jobs. Waiting PRs stay covered and consume no slot after owned descendants
197
- settle. Each job uses one repository-parented worktree; managers never check out
195
+ discovery pages, and admits eligible actionable PR events within measured host
196
+ capacity across both lanes. Waiting PRs stay covered and consume no slot after
197
+ owned descendants settle. Each job uses one repository-parented worktree; managers never check out
198
198
  PR branches in their own workspaces.
199
199
 
200
200
  Every pass reconciles saved, GitHub, and native Orca state across all same-lane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axstack",
3
- "version": "0.20.11",
3
+ "version": "0.20.13",
4
4
  "description": "Axstack installer and setup CLI: installs owned chat skills and role data, configures supported harness settings, and checks Orca capabilities.",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -150,11 +150,15 @@ all scanned; those ten occupy zero slots.
150
150
 
151
151
  ## Admission and fairness
152
152
 
153
- Each manager admits at most five concurrently executing PR tasks across ticks.
154
- The review manager admits at most five, and the watch manager admits at most
155
- five. Their caps are separate; never borrow unused capacity from the other
156
- lane. Admit fewer when the whole worker tree would put the host under resource
157
- pressure.
153
+ The review manager and watch manager admit all eligible actionable PR events
154
+ that measured host capacity can support across ticks. Before each admission,
155
+ inspect available memory, CPU load, and active worker trees across both lanes;
156
+ account for the whole proposed worker tree, dependencies, spending limits, and
157
+ exclusive ownership. Report unavailable metrics as unknown; use the remaining
158
+ host evidence rather than treating a missing metric alone as a blocker. Defer
159
+ an event when observed pressure or uncertain headroom cannot support its whole
160
+ tree, record the reason, and remeasure on the next pass. Do not use a fixed
161
+ PR-job count or reserve capacity for either lane.
158
162
 
159
163
  A slot covers one bounded PR event and remains occupied while its author,
160
164
  reviewers, or other owned descendants are active or unsettled. Leaf workers do
@@ -163,8 +167,10 @@ frees the slot even while the PR stays open.
163
167
 
164
168
  Inspect all eligible PRs before admission. Preserve unserved work in the
165
169
  compact run record and select the oldest actionable unserved event first, with
166
- ascending repository and PR-number tie breaks. A sixth event is admitted after
167
- a slot settles; repeatedly changing PRs cannot starve older unserved work.
170
+ ascending repository and PR-number tie breaks. Continue admitting eligible
171
+ events while measured capacity supports their whole worker trees. Reconsider
172
+ deferred events as trees settle or host capacity changes; repeatedly changing
173
+ PRs cannot starve older unserved work.
168
174
 
169
175
  ## Per-PR jobs
170
176
 
@@ -238,9 +244,12 @@ or send outcome, not pending CI. Waiting state belongs in GitHub and the compact
238
244
  record, never in an idle model, per-PR timer, or polling loop.
239
245
  Follow the [private evidence archive](evidence-archive.md) when evidence is the
240
246
  only local state to preserve; archive success does not relax any other guard.
241
- For a completed, forge-merged PR-job, classified reviewer scratch may instead
242
- follow [axstack-cleanup](../../axstack-cleanup/SKILL.md)'s compact receipt and
243
- exact-path guards. This does not release active jobs or manager pass workspaces.
247
+ For a completed PR-job, including one whose PR remains open, archive classified
248
+ reviewer scratch through the [private evidence archive](evidence-archive.md),
249
+ read back the archive and compact receipt, then follow
250
+ [axstack-cleanup](../../axstack-cleanup/SKILL.md)'s exact-path guards to retire
251
+ the reviewer checkout before merge. This does not release active jobs or manager
252
+ pass workspaces.
244
253
 
245
254
  ## Review and repair authority
246
255
 
@@ -310,8 +319,8 @@ terminals, unknown liveness, `user_takeover`, and ambiguous publication state.
310
319
  Never classify all dirt as evidence. If explicitly classified evidence is the
311
320
  last retention reason, apply and verify the [private evidence archive](evidence-archive.md),
312
321
  update durable continuity, and read it back before native retirement.
313
- The completed, forge-merged PR-job reviewer scratch exception above uses
314
- axstack-cleanup; it never changes manager pass preservation or retirement guards.
322
+ Completed PR-job reviewer scratch uses axstack-cleanup after archive and readback;
323
+ it never changes manager pass preservation or retirement guards.
315
324
 
316
325
  For the manager pass only, verify native run/workspace identity, exclusive
317
326
  automation ownership, no unsettled descendants, and a fresh terminal inventory
@@ -1,14 +1,14 @@
1
1
  # Private evidence archive
2
2
 
3
3
  Use this only when local review or coordinator evidence is the last reason a
4
- finished automation-owned worktree cannot be retired. It archives evidence; it
4
+ finished Orca-owned worktree cannot be retired. It archives evidence; it
5
5
  never decides that a terminal or worktree is safe to remove and never performs
6
6
  native cleanup.
7
7
 
8
8
  ## Eligibility
9
9
 
10
10
  First prove the exact repository, PR or Run/Task, 40-character head SHA, Dispatch,
11
- workspace, terminal incarnation, automation ownership, descendant settlement,
11
+ workspace, terminal incarnation, Orca ownership, descendant settlement,
12
12
  and liveness from current native state. A manual chat, `user_takeover`, an
13
13
  active or unknown task terminal, an unsettled descendant, unpushed commits,
14
14
  dirty source, ambiguous publication, or an unknown file remains protected.
@@ -51,6 +51,14 @@ identities in durable lane continuity, then read the continuity and archive
51
51
  manifest back before cleanup. If either readback differs or is unavailable,
52
52
  preserve the worktree.
53
53
 
54
+ For a reviewer checkout with another Dispatch's scratch, archive and read back
55
+ each Dispatch's complete file set independently. The installed helper's retire
56
+ operation may reject another Dispatch's scratch as unclassified dirt. After
57
+ full union classification and verified per-Dispatch archives, use
58
+ [axstack-cleanup](../../axstack-cleanup/SKILL.md)'s exact per-prefix dry-run and
59
+ clean recovery; never force, use a broad target, or treat archive success as
60
+ removal authority.
61
+
54
62
  ## Native retirement
55
63
 
56
64
  Retire descendants before their parent. For each positively identified unused
@@ -83,10 +91,12 @@ to matching listed files and never removes directories.
83
91
  Record the retirement receipt's `removed`, `alreadyAbsent`, and `pending` file
84
92
  sets. A repeat invocation reconciles already absent files without changing the
85
93
  manifest. A partial or failed invocation preserves the archive; resolve its
86
- exact hold and retry the same operation until `pending` is empty. Never replace
87
- this operation with a shell loop, broad deletion, force, or a waiver.
94
+ exact hold and retry the same operation until `pending` is empty. The verified
95
+ multiple-Dispatch recovery above uses only axstack-cleanup's exact per-prefix
96
+ path. Never replace either path with a shell loop, broad deletion, force, or a
97
+ waiver.
88
98
 
89
- Re-read Git and native state after successful retirement. Any remaining or
99
+ Re-read Git and native state after successful evidence removal. Any remaining or
90
100
  uncertain dirt holds worktree removal. Settlement, liveness/no-writer proof,
91
101
  useful-work and publication checks, evidence classification, and removal
92
102
  authority remain driver decisions; archive or retirement success proves none of
@@ -113,8 +113,9 @@ differs from merged; human merges.
113
113
  ## Watch health
114
114
 
115
115
  Native review and watch lanes use fresh finite sessions in isolated per-pass
116
- workspaces on staggered 15-minute schedules. Each admits at most five executing PR jobs;
117
- waiting PRs remain covered without reserving slots. Bounded PR jobs own their
116
+ workspaces on staggered 15-minute schedules. Each admits eligible actionable PR
117
+ events within measured host capacity; waiting PRs remain covered without
118
+ reserving slots. Bounded PR jobs own their
118
119
  events, use per-PR worktrees, and settle after descendants settle. Build no
119
120
  custom scheduler, state engine, or legacy fallback. Details live in
120
121
  [Watch runtime](../../axstack-watch/references/watch-runtime.md).
@@ -78,8 +78,9 @@ authorized retry so no duplicate writer starts.
78
78
 
79
79
  Give each reviewer a separate Orca-managed child worktree under the candidate's
80
80
  worktree, including report-only reviews and rechecks; never share the author's
81
- checkout or another reviewer's checkout. Reuse that reviewer's own child only
82
- after its previous Dispatch has settled. Use the runtime-owned worktree guide,
81
+ checkout or another reviewer's checkout. A later review gets a fresh Orca-managed
82
+ child worktree after the prior settled review's evidence and cleanup are
83
+ reconciled. Use the runtime-owned worktree guide,
83
84
  not a raw Git worktree or temporary clone. Before dispatch, verify a detached
84
85
  checkout of the exact candidate SHA and the pinned base in that child.
85
86
 
@@ -95,11 +96,11 @@ owner. Remove only that exact validated owned path, with no glob or parent-root
95
96
  deletion; never wipe a general cache. Uncertain temporary files are preserved
96
97
  for later reconciliation. Incidental tool-managed caches are not review evidence.
97
98
  Before removing a reviewer worktree, preserve its report and supporting evidence
98
- in the driver's Orca workspace and update the run record's paths. For a settled
99
- merged run with a confirmed forge merge, the compact durable receipt in
100
- [axstack-cleanup](../../axstack-cleanup/SKILL.md) satisfies this preservation
101
- rule only after its classification, readback, and removal guards pass. Preserve
102
- active or unmerged review evidence and unique evidence whose bytes must survive;
99
+ in the private evidence archive outside the disposable checkout, verify manifest
100
+ readback, and update the run record's paths. A settled reviewer Dispatch can be
101
+ cleaned before PR merge through [axstack-cleanup](../../axstack-cleanup/SKILL.md)
102
+ only after its classification, readback, and removal guards pass. Preserve
103
+ active or unknown review evidence and unique evidence whose bytes must survive;
103
104
  uncertain ownership or evidence holds. Terminal release alone is not permission
104
105
  to discard evidence or remove the worktree.
105
106
 
@@ -4,8 +4,9 @@ You are a fresh finite review-manager session in its isolated per-pass Orca work
4
4
  through the installed `axstack-review` skill; that skill loads its packaged
5
5
  `../axstack/references/automations.md` contract by relative reference. Discover
6
6
  every eligible peer-review event and invoke the skill through Orca for each
7
- admitted bounded PR job. Keep complete coverage separate from the five-job
8
- execution cap, preserve exact ownership and receipts, settle completed trees,
7
+ admitted bounded PR job. Keep complete coverage and admit actionable events
8
+ within measured host capacity, preserve exact ownership and receipts, settle
9
+ completed trees,
9
10
  and stay quiet when nothing changed. Reconcile before admission, save durable
10
11
  continuity outside this workspace, then retire only this pass workspace as the
11
12
  final action under the contract's ownership guards. Reconcile the whole lane,
@@ -4,9 +4,9 @@ You are a fresh finite watch-manager session in its isolated per-pass Orca works
4
4
  through the installed `axstack-watch` skill; that skill loads its packaged
5
5
  `../axstack/references/automations.md` contract by relative reference. Discover
6
6
  every eligible own-PR event and invoke the skill through Orca for each admitted
7
- bounded PR job. Keep complete coverage separate from the five-job execution
8
- cap, preserve exact ownership, candidates, holds, and receipts, settle
9
- completed trees, and stay quiet when nothing changed. Reconcile before
7
+ bounded PR job. Keep complete coverage and admit actionable events within
8
+ measured host capacity, preserve exact ownership, candidates, holds, and receipts,
9
+ settle completed trees, and stay quiet when nothing changed. Reconcile before
10
10
  admission, save durable continuity outside this workspace, then retire only this
11
11
  pass workspace as the final action under the contract's ownership guards.
12
12
  Reconcile the whole lane, not just this workspace. Never check out a PR branch here.
@@ -64,21 +64,30 @@ removing any source copy or workspace.
64
64
  Archive success proves only preservation of the listed bytes. It does not prove
65
65
  settlement, exit, ownership, a clean worktree, publication, or removal safety.
66
66
 
67
- For a settled merged run whose forge merge is confirmed, generated reviewer
68
- scratch is disposable after a compact durable receipt is written outside the
69
- review worktree and read back. Bind that receipt to the exact repository, Run,
67
+ For a settled reviewer Dispatch, the reviewer worktree can be retired while its
68
+ PR remains open, before merge, after its report and supporting evidence are
69
+ archived privately and read back. Generated reviewer scratch is disposable
70
+ after a compact durable receipt is written outside the review worktree and read
71
+ back. Bind that receipt to the exact repository, Run,
70
72
  Task, Dispatch, reviewer workspace and terminal, exact head SHA and base SHA,
71
73
  review verdict, coverage and limitations, test and CI result pointers, and the
72
74
  user authorization and scope for cleanup. A raw reviewer report may be discarded
73
75
  after its verdict and limitations are compacted into that read-back receipt;
74
- use the private evidence archive for unique evidence whose exact bytes must
75
- survive. Raw reproducible probes and logs need not be archived solely to retire
76
- a completed review worktree.
77
-
78
- Use only a named run-owned scratch prefix recorded with the Dispatch. Require
79
- `git status --porcelain=v1 -z --untracked-files=all` to show all dirt as
80
- untracked files inside that run-owned scratch prefix; any tracked, staged,
81
- unmerged or unpushed work, dirty source, or dirt outside it holds. Validate that
76
+ use the private evidence archive for the report and supporting evidence. Verify
77
+ each Dispatch archive and manifest readback independently. Preserve the separate
78
+ author candidate with useful unmerged work; reviewer cleanup never removes it.
79
+
80
+ Use only a named run-owned scratch prefix recorded with the Dispatch. Multiple
81
+ Dispatches in the same reviewer worktree are recovery for missed earlier
82
+ cleanup; after independent archives and readback, use per-prefix removal. Two or
83
+ more review passes in the same reviewer worktree may leave distinct prefixes;
84
+ each named run-owned scratch prefix must belong to an accepted settled Dispatch
85
+ in the Run. Require `git status --porcelain=v1 -z --untracked-files=all`
86
+ to show all dirt as untracked files inside a run-owned scratch prefix. Prove
87
+ every remaining untracked file individually belongs to one of those named
88
+ run-owned scratch prefixes; any tracked, staged, unmerged or unpushed work,
89
+ dirty source, or dirt outside them holds. Check ignored files across the whole
90
+ worktree too; unknown or ignored content holds. Validate that
82
91
  the detached checkout still matches the reviewed head and check local commits
83
92
  against recorded remote refs; unknown divergence holds. Validate that
84
93
  the exact reviewed scratch prefix names the recorded directory inside the exact
@@ -87,17 +96,25 @@ descendant for symlinks, hard links, special files, unknown content, user-owned
87
96
  files, or ignored files; any mismatch holds. Active or `user_takeover` terminals
88
97
  also hold.
89
98
 
90
- List the exact scoped path and all descendants with their types, confirm each
91
- belongs to generated reviewer scratch, and record that inventory. Dry-run the
92
- exact scoped path from the reviewer worktree root with
99
+ For each prefix, list the exact scoped path and all descendants with their
100
+ types, confirm each belongs to generated reviewer scratch, and record that
101
+ inventory. For each prefix, perform an exact-path dry-run and exact-path deletion
102
+ separately. Dry-run the exact scoped path from the reviewer worktree root with
93
103
  `git clean -nd -- <exact reviewed scratch prefix>`
94
104
  with the concrete reviewed relative prefix substituted for the angle-bracket
95
105
  notation. Compare its sole target to the classified directory; an empty,
96
- partial, or different result holds. Re-read the compact receipt, complete Git
97
- status, directory contents, native ownership and liveness immediately before
98
- removal; any change holds. Then run `git clean -fd -- <same exact prefix>` with
99
- the identical concrete path and recheck clean Git status, recording the path and
100
- outcome. Use no unresolved variable as a destructive target. Never use `-x`, a
106
+ partial, or different result holds. Immediately before each deletion, including
107
+ each next deletion, re-read the compact receipt, complete Git status with
108
+ whole-worktree dirt and ignored files, every remaining prefix inventory, and
109
+ native ownership and liveness. Compare these reads against the expected
110
+ post-deletion state: previously deleted proven prefixes and their files are
111
+ absent, while remaining classified prefixes and outside content still match.
112
+ Only unexpected changes hold. Then run
113
+ `git clean -fd -- <same exact prefix>` with the identical concrete path, record
114
+ that path and outcome, and repeat for the next proven prefix. Recheck clean Git status
115
+ after the last deletion. Require final clean Git status before native
116
+ exact-workspace removal without force. Use no unresolved variable as a destructive target.
117
+ Never use `-x`, a
101
118
  glob, a repository-root target, extra force, or broad clean.
102
119
  This scratch decision does not waive any other preservation or native removal
103
120
  guard.
@@ -119,15 +136,27 @@ Treat these operations as separate decisions and receipts:
119
136
  3. **Worktree removal.** Re-read Git status, branch/upstream divergence,
120
137
  unpushed commits, forge merge/publication state, children, terminals, and
121
138
  archived evidence immediately before the native exact-workspace removal.
122
- When archived evidence is the last dirt, use the evidence archive helper's
123
- manifest-bound retirement operation and require an empty pending set; never
124
- unlink through prose or a shell loop. Verify the effective Archive Script
139
+ When archived evidence is the last dirt for one Dispatch, use the evidence
140
+ archive helper's manifest-bound retirement operation and require an empty
141
+ pending set. If multiple Dispatch scratch prefixes remain in one checkout,
142
+ the helper may reject the other Dispatch's files as unclassified; after
143
+ independently verified per-Dispatch archives and full union classification,
144
+ use the exact per-prefix dry-run and clean above. Never unlink through prose
145
+ or a shell loop. Verify the effective Archive Script
125
146
  provenance before native removal: an unknown or required-but-untrusted hook
126
147
  holds. Record its native outcome as `unconfigured`, `passed`, `failed`, or
127
148
  `unknown`; only `unconfigured` or trusted `passed` may advance. Account for
128
149
  branch-deletion side effects explicitly, then re-list both native workspaces
129
- and Git refs. A failed or unknown hook outcome or uncertain response preserves
130
- the resource; never force or substitute shell deletion.
150
+ and Git refs. Read back each remaining local review ref against its recorded
151
+ name and tip. Any branch with unknown origin, unique commits, an active
152
+ worktree, or a remote counterpart must be preserved. Only when provenance
153
+ proves a ref was created for the removed reviewer checkout and its tip is
154
+ already reachable from the preserved author candidate or confirmed remote PR
155
+ head, permit
156
+ exact-ref expected-old ref deletion and read back its absence. Never delete
157
+ the author branch or use generic force. A failed or unknown hook outcome or
158
+ uncertain response preserves the resource; never force or substitute shell
159
+ deletion.
131
160
  4. **Chat archival.** Attempt it only if the version-matched runtime guide
132
161
  advertises a distinct supported operation and the scoped chat is eligible.
133
162
  Otherwise record chat archival as unsupported. Process exit, worker release,
@@ -163,7 +163,11 @@ For each PR:
163
163
  1. Dispatch `axstack-author` under §§3-5 and consume its strict-TDD receipt.
164
164
  2. Publish through candidate-publication and read back the exact SHA.
165
165
  3. Dispatch and consume the authored-mode `axstack-review` selected from actual
166
- author provenance.
166
+ author provenance. After each settled review, run `axstack-cleanup` for its
167
+ exact reviewer resources before PR merge, preserving and reading back the
168
+ private evidence archive before eligible worktree retirement. A later review
169
+ uses a fresh child checkout. Keep the author candidate until merge and
170
+ Close-out; a cleanup hold preserves only the affected reviewer resource.
167
171
  4. Route the verdict. `APPROVE` at that head plus `axstack-watch` §5's full
168
172
  predicate—required checks, all feedback, approvals, mergeability, and
169
173
  exact-revision receipts—records `merge-ready`. With required checks pending,
@@ -187,7 +191,7 @@ all-merged event—two per run—and (c) serious risk; never progress.
187
191
  Merge-ready is the human boundary: the user merges, bottom-up for a stack. The
188
192
  driver resumes on the user's next message or `/axstack-watch`; no Orca merge
189
193
  wake exists today. Re-read forge state: record forge-merged PRs as `merged`;
190
- changed heads or feedback return to step 1; release nothing before Close-out.
194
+ changed heads or feedback return to step 1; retain useful author work before Close-out.
191
195
  Run Close-out once only after every required PR is forge-merged and acceptance
192
196
  passes. It settles workers, records counts, makes the auditor decision and
193
197
  settlement, releases worktrees, closes eligible tickets, and archives the run.
@@ -18,8 +18,8 @@ The separate native watch manager lane follows the
18
18
  uses a new isolated workspace and fresh finite session at minutes `7,22,37,52`.
19
19
  Continuity survives outside disposable workspaces; admission reconciles the
20
20
  whole lane across workspaces. It scans every eligible own PR and
21
- admits at most five bounded actionable-event jobs. Waiting PRs stay covered
22
- without reserving slots. Each job uses its own repository-parented worktree and
21
+ admits bounded actionable-event jobs within measured host capacity. Waiting PRs
22
+ stay covered without reserving slots. Each job uses its own repository-parented worktree and
23
23
  settles with all descendants; no model, per-PR timer, or polling loop waits for
24
24
  CI, review, a user decision, or merge.
25
25