axstack 0.20.20 → 0.20.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axstack",
3
- "version": "0.20.20",
3
+ "version": "0.20.22",
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",
@@ -0,0 +1,81 @@
1
+ # Design lens
2
+
3
+ In Align, set the rung from researched facts, not a user choice. Carry the
4
+ sketch through the scope identity.
5
+
6
+ ## Ladder
7
+
8
+ - **Rung 0 — skip.** The change stays inside one module's existing interface,
9
+ ownership, data flow, and failure guarantees. Ask no design questions and
10
+ carry no sketch. “Might be small” is not a reason to skip.
11
+ - **Rung 1 — design questions.** Any change that fails Rung 0. Typical triggers:
12
+ crossing a module boundary; adding a module, service, interface, or external
13
+ dependency; changing an interface or failure guarantee; changing data
14
+ ownership, schema, wire format, or persisted format. A design question does
15
+ not reclassify work: Rung 1 can stay small. An unsettled material design
16
+ question still makes routing reassess size.
17
+ - **Rung 2 — arena.** A Rung 1 design that also meets the existing ADR test:
18
+ a meaningful, hard-to-reverse, non-obvious trade-off. Use Align's existing
19
+ arena for that question.
20
+
21
+ There is no numeric threshold, file-count gate, or class-count gate.
22
+
23
+ ## Questions in order
24
+
25
+ Ask only unresolved areas in numbered `Qn` rounds of one to three. Give each a
26
+ recommendation, reason, and trade-off; use Align's adviser critique. Design and
27
+ arena questions share its unchanged budget: 20 normally, a justified extension
28
+ to 35, then opted-in refinement of at most five.
29
+
30
+ 1. **Scope:** What exists, the minimum change, and what is explicitly excluded?
31
+ 2. **Caller first:** Write realistic usage before drawing the shape.
32
+ 3. **Shape:** Which boundaries, module depth, ownership, invariants, seams,
33
+ and adapters serve that usage?
34
+ 4. **Flow and failure:** Trace the data flow. For each materially new path,
35
+ name one realistic production failure and its observable behavior.
36
+ 5. **Reversibility:** Name compatibility, migration, rejected alternatives, and
37
+ what we accept for what benefit.
38
+
39
+ ## Vocabulary and red flags
40
+
41
+ A **deep module** hides substantial behavior behind a small interface. A
42
+ **shallow module** exposes most of its machinery. Treat an **interface as test
43
+ surface**: test caller behavior and observable failures. A **seam** permits a
44
+ second implementation; one adapter is hypothetical, two make it real. Prefer
45
+ **locality** and explicit **ownership** of state and invariants. The **deletion
46
+ test** asks what contract would be lost if a layer vanished. Choose **boring by
47
+ default** and **reversible over clever**.
48
+
49
+ Red flags—shallow module, information leakage, temporal decomposition, and
50
+ pass-through layers—are prompts for evidence, not automatic defects. Ask what
51
+ crosses each boundary and whether a layer can be removed.
52
+
53
+ ## Sketch
54
+
55
+ For Rung 1 or 2, put this block in the spec's `Design` section or the returned
56
+ small-change intent. `Binding` names commitments; other lines may illustrate.
57
+
58
+ ```text
59
+ Usage: <call site or command as the caller writes it>
60
+ Shape: <signatures or a <=10-line ASCII/Mermaid diagram>
61
+ Binding: <which lines are committed; the rest is illustrative>
62
+ Flow + failure: <path -> one realistic failure -> observable behavior>
63
+ We accept: <X> for <Y>
64
+ Rejected: <alternative -> why>
65
+ Open: <question?>
66
+ ```
67
+
68
+ Keep settled choices in `Decisions` rows. `CONTEXT.md` stays a glossary; ADRs
69
+ keep their existing test. Add no design document or phase.
70
+
71
+ ## Arena rubric candidates
72
+
73
+ For each arena, the driver selects three to six and tailors the rubric criteria
74
+ to the question. Score candidate designs on evidence, not a generic checklist:
75
+
76
+ - Is `Usage` realistic and simple for the caller?
77
+ - Are module boundaries deep enough and ownership unambiguous?
78
+ - Is behavior local with a useful test surface?
79
+ - Are materially new failure paths observable and recoverable?
80
+ - Are compatibility, migration, and deletion costs explicit?
81
+ - Does the trade-off justify complexity against rejected options?
@@ -56,7 +56,7 @@ Only an explicit user request to transfer ownership enters this branch.
56
56
  prior owner seeing a different valid accepted owner stops.
57
57
 
58
58
  Complete record: goal, authority, intent, IDs, revisions, evidence, pending
59
- receipts/timers, unresolved decisions, next action, and transfer ownership/gap.
59
+ receipts/timers, unresolved decisions, next action, and transfer status.
60
60
 
61
61
  ## Receipts (bind each decision to evidence)
62
62
 
@@ -87,8 +87,8 @@ covers only ordinary reading, writing, and local checks. Heartbeat deliveries
87
87
  are acknowledged with no user-facing text. Process each whole delivery before
88
88
  acknowledgment and validate its Task, Dispatch, sender, authority, revisions,
89
89
  and receipts before advancing the run record. Duplicate deliveries are
90
- deduplicated by runtime identity. Healthy unchanged observations produce no
91
- user-facing update. After accepting worker, Task, or Run completion, the driver
90
+ deduplicated by runtime identity. Healthy unchanged passes are silent.
91
+ After accepting worker, Task, or Run completion, the driver
92
92
  invokes [axstack-cleanup](../../axstack-cleanup/SKILL.md) inline; it never
93
93
  dispatches cleanup work.
94
94
 
@@ -99,8 +99,8 @@ session liveness, delivery, and verified advancement are distinct evidence.
99
99
  On `consumer_fenced`, reconcile the active coordinator rather than borrowing an
100
100
  identity. Respect settlement protection including `user_takeover`.
101
101
 
102
- No execution heartbeat or substitute scheduler is created by Axstack. Native
103
- review automation follows [Review automation health](#review-automation-health).
102
+ Axstack creates no execution heartbeat or substitute scheduler. See
103
+ [Review automation health](#review-automation-health).
104
104
  Tracking grants no merge, release, model-substitution, or scope authority.
105
105
 
106
106
  ## Deadline (one rule for every owned timer)
@@ -131,15 +131,16 @@ nothing without tested independent review.
131
131
 
132
132
  ## Close-out
133
133
 
134
- PRs merge by forge state—not branch ancestry; close out: (1) settle every worker
134
+ PRs merge by forge state; close out: (1) settle every worker
135
135
  terminal; (2) compact record with counts and denominators—user
136
136
  interventions/deviations from plan/repairs; (3) `axstack-auditor`: settle
137
137
  non-zero/requested, else `counts zero`; an unavailable auditor leaves close-out
138
138
  pending, never skipped silently; (4) release merged run worktrees and branches;
139
- use `axstack-cleanup` and close selected external-tracker tickets when applicable;
139
+ use `axstack-cleanup`, remove the run's own automations under
140
+ [Workspace hygiene](workspace-hygiene.md), and close selected external-tracker tickets;
140
141
  (5) mark the
141
142
  [Run record](run-record.md) `Archived`. `Archived`—one each:
142
143
  settlement receipt; compact record path; auditor decision plus settlement
143
- receipt or `counts zero`; release and ticket receipts; archive timestamp.
144
+ receipt or `counts zero`; automation, release, and ticket receipts; archive timestamp.
144
145
  `active`/receipt-incomplete record: close-out pending, never done. One-step
145
146
  lookups exempt.
@@ -14,10 +14,10 @@ tools, credentials, quota, subscription, or default to `mixed`.
14
14
 
15
15
  At run start, snapshot all 24 role IDs with provider/model/mode/effort; absent
16
16
  or unconfigured roles are recorded explicitly; invent no provider default.
17
- Such a role holds only that role's work, not the run. A role installed or changed later
18
- must not silently enter the snapshot; adding it needs an explicit user
19
- decision. Live profiles are authoritative at snapshot time and for availability;
20
- bundled presets are setup inputs, not runtime proof.
17
+ Such a role holds only that role's work. A role installed or changed later must not
18
+ silently enter the snapshot; adding it needs an explicit user decision. Live profiles
19
+ are authoritative at snapshot time and for availability; bundled presets are setup
20
+ inputs, not runtime proof.
21
21
 
22
22
  Preset changes apply to new runs only; an active run keeps its snapshot.
23
23
  Changing it or replacing a session needs an explicit user decision and
@@ -102,13 +102,13 @@ reason in the run record, or in the brief for tiny direct work.
102
102
  - **Small:** clear, bounded one-PR work. The driver captures the named
103
103
  **small-change intent** from the current request or user-chosen existing
104
104
  issue plus explicit acceptance checks and exclusions, snapshots it once, and
105
- proceeds. No earlier snapshot, spec, ticket ceremony, or second approval is
106
- required; do not route to `axstack-align` solely because that snapshot is
107
- not yet written. Strict TDD, mode-specific review, model, risk, and human-merge
105
+ proceeds. No prior snapshot, spec, tickets, or second approval is required; do not route
106
+ to `axstack-align` solely because the snapshot is not yet written. Strict TDD,
107
+ mode-specific review, model, risk, and human-merge
108
108
  contracts still apply.
109
- - **Unclear:** clarify the uncertainty through `axstack-align` or one bounded
110
- question, then classify it as small or substantial; a small ambiguity does
111
- not force substantial-work paperwork.
109
+ - **Unclear:** clarify via `axstack-align` or a bounded question, then
110
+ classify small or substantial; it does not force substantial-work paperwork.
111
+ [Design lens](design-lens.md) Rung 1 is Unclear; use `axstack-align`.
112
112
 
113
113
  Reassess size when growth adds an additional PR, a new execution dependency
114
114
  that materially expands scope, an unsettled material design question, or a
@@ -33,8 +33,8 @@ and Dispatch decides; parent/child display lineage does not. The creator closes
33
33
  what it created at ordinary settlement; the cross-run sweep below may retire
34
34
  its settled leftovers. A finite scheduled pass closes only its own exact terminal as
35
35
  its final action. Manual chats, automation dedicated workspaces, and genuine
36
- `user_takeover` sessions are never removed. Deleting a session means closing
37
- its terminal; agent chat history is not deleted.
36
+ `user_takeover` sessions are never removed by ordinary settlement or sweep.
37
+ Deleting a session means closing its terminal; agent chat history is not deleted.
38
38
 
39
39
  If native exact terminal close returns `runtime_error` for a provably finished
40
40
  agent, send `/quit` + Enter to that exact terminal, wait about 5 seconds, then
@@ -45,6 +45,30 @@ leaves its terminal for the next pass, without treating that expected failure
45
45
  as a hold. At pass start, clear only provably finished predecessor terminals
46
46
  of the same automation in its dedicated workspace by this exact-handle path.
47
47
 
48
+ ## Owned automation retirement
49
+
50
+ At Close-out, reconcile the run record with native inventory: the recorded
51
+ owning Run must have created the exact automation IDs selected for retirement.
52
+ The sweeping pass uses that recorded owning Run, not its own Run, for cross-run
53
+ watches. A cross-run sweep may retire a disabled per-run watch only when its
54
+ owning run is closed or every watched PR is merged or closed. Uncertain recorded
55
+ ownership, watch state, or disable result holds the affected automation.
56
+
57
+ For each eligible automation, disable it and verify native readback before
58
+ `orca automations remove <id>` on its exact ID, and verify absence by native
59
+ readback. The observer only disables and reports; the driver removes its own
60
+ run's automation. Only a retired owned per-run watch's workspace may be removed
61
+ under these guards. Never remove the durable review manager and its dedicated
62
+ workspace or a user-created automation and its dedicated workspace.
63
+
64
+ Remove that dedicated workspace only after confirming its exact ownership, no
65
+ live terminal, a clean worktree, and a head on the remote. Recheck ownership and
66
+ liveness immediately before workspace removal. If dirty or unpublished, use the
67
+ salvage and bundle verification below before removal; failed verification or
68
+ uncertain liveness is a hold. The current scheduled pass cannot remove its own
69
+ workspace while its terminal is live; the driver or a later sweep finishes that
70
+ step. Record separate automation and workspace receipts.
71
+
48
72
  ## Preserve before removal
49
73
 
50
74
  Workers write reports, probes, logs, evidence, and scratch to the private
@@ -17,6 +17,17 @@ Load before acting:
17
17
 
18
18
  This preserves the required contracts -> lifecycle -> audit load edge.
19
19
 
20
+ ## Design the shape
21
+
22
+ Set the rung from researched facts; never ask the user to choose it. A change
23
+ inside one module's existing interface, ownership, data flow, and failure
24
+ guarantees is Rung 0: no design questions or sketch. Otherwise load the
25
+ [design lens ladder](../axstack/references/design-lens.md) for Rung 1 or 2
26
+ and settle only unresolved areas in its order within the existing budget. Carry a
27
+ Rung 1 or 2 sketch in the substantial spec's `Design` section or the returned
28
+ small-change intent. A design question alone does not make small work
29
+ substantial; apply routing's existing size reassessment rule.
30
+
20
31
  ## Settle the frontier
21
32
 
22
33
  1. **Research and map dependencies.** Inspect the available code, docs, and
@@ -84,8 +84,17 @@ Size alone never requires user approval.
84
84
  Use the normal behavior path unless the accepted improvement scope is
85
85
  explicitly marked **structure-preserving**. The author never chooses that tag.
86
86
 
87
+ Only when the scope identity carries a sketch, copy it into the author brief
88
+ under the [design lens](../axstack/references/design-lens.md).
89
+
87
90
  ### Normal behavior path
88
91
 
92
+ When that sketch exists, make the first red check target its `Usage` line.
93
+ The structure-preserving path stays as is.
94
+ If a repeated workaround or unnamed boundary conflicts with the sketch, the
95
+ author stops and returns a sketch conflict. The driver reopens only the
96
+ affected decision through Align under the existing material-revision rule.
97
+
89
98
  Choose a behavior from the accepted scope, including its failure behavior or a
90
99
  real integration boundary. Test it through an observable interface rather than
91
100
  restating source text or mirroring the intended implementation. Execute the
@@ -42,7 +42,9 @@ specialization materially helps; create no new profile.
42
42
  Produce a small ranked candidate set. For each candidate include:
43
43
 
44
44
  1. Source evidence and the scoped problem.
45
- 2. Current and proposed shape.
45
+ 2. Current and proposed shape. Only when the scope identity carries a sketch,
46
+ use the [design lens](../axstack/references/design-lens.md) vocabulary and
47
+ red flags and return candidates in sketch form.
46
48
  3. Concrete benefit and tradeoffs.
47
49
  4. Behavior to preserve and test approach.
48
50
  5. Uncertainty and recommendation strength.
@@ -243,7 +243,10 @@ This section applies to peer and authored PR modes.
243
243
  is safe because of on the evidence ladder; below "ran it" is unproven.
244
244
  4. Requirements, acceptance, and user behavior.
245
245
  5. Architecture and solution design, including SOLID and credible simpler
246
- alternatives.
246
+ alternatives. Only when the scope identity carries a sketch, compare
247
+ the architecture with the [design lens](../axstack/references/design-lens.md)
248
+ sketch and red flags. A deviation from a `Binding` line without an
249
+ accepted spec revision is a finding.
247
250
  6. Simplicity and maintainability: KISS, YAGNI, and cyclomatic complexity
248
251
  where measurement is useful. Never invent a metric or demand an
249
252
  abstraction merely to satisfy a principle.
@@ -35,7 +35,10 @@ and the lifecycle's [audit skill](../axstack-audit/SKILL.md) hook.
35
35
  Missing access preserves the GitHub selection and stops the phase without
36
36
  mutation or fallback. Markdown mode skips external access preflight.
37
37
  3. **Draft with decision evidence.** Write observable acceptance criteria
38
- and explicit exclusions in the selected store. First record the driver's
38
+ and explicit exclusions in the selected store. Only when the scope identity
39
+ carries a sketch, include the [design lens](../axstack/references/design-lens.md)
40
+ sketch in the approved revision's `Design` section and its `Usage` line in
41
+ acceptance. First record the driver's
39
42
  independent assessment, then load
40
43
  [Orca runtime](../axstack/references/orca-runtime.md) before dispatching the
41
44
  configured `axstack-advisor-astra` and `axstack-advisor-fable` independently,
@@ -41,8 +41,12 @@ an actual checker dispatch, not for ordinary mapping or state reconciliation.
41
41
  issues represent user-visible capabilities; one capability may span several
42
42
  tasks and PRs. GitHub capability issues link the approved spec issue and its
43
43
  SHA-256 body digest. Keep detailed execution breakdowns in the repository.
44
- For every capability, derive acceptance checks from the pinned spec and
45
- identify internal tasks, dependencies, PR ownership, and worktrees. For each task the driver records
44
+ For every capability, derive acceptance checks from the pinned spec. Only
45
+ when its scope identity carries a sketch, follow the
46
+ [design lens](../axstack/references/design-lens.md) sketch's modules, put
47
+ its named failure in capability acceptance, and treat a task spanning a
48
+ sketch boundary as a split signal. Identify internal tasks, dependencies,
49
+ PR ownership, and worktrees. For each task the driver records
46
50
  one theme and a coarse size estimate from the ownership, interface, and
47
51
  dependency map. A task estimated in the exception band is assessed for a
48
52
  split at mapping time and split where a green, atomic, reviewable split
@@ -137,8 +137,9 @@ observed state distinct from merged, and the human merges by default.
137
137
  ## 6. End and preserve continuity
138
138
 
139
139
  End a chat-run watch only after all members merged or closed or user
140
- cancellation, with own-automation disable/readback and driver-owned cleanup
141
- receipts in [Watch runtime](references/watch-runtime.md#chat-run-watch).
140
+ cancellation, with own-automation disable/readback and driver-owned automation
141
+ removal and workspace cleanup receipts in
142
+ [Watch runtime](references/watch-runtime.md#chat-run-watch).
142
143
 
143
144
  End a standalone watch early when all required PRs merge, at cancellation, or
144
145
  at its shared default 24 h deadline. In every case, stop all owned
@@ -10,7 +10,10 @@ A standalone PR owner remains accountable through the default 24-hour window.
10
10
  current GitHub state, persists event IDs, wakes the owner only for a new
11
11
  actionable event, and never sends or mutates. Healthy observations update
12
12
  quietly. Reuse prior watch identity rather than registering a duplicate, and
13
- stop task-owned registrations at completion, cancellation, or expiry.
13
+ stop task-owned registrations at completion, cancellation, or expiry. The owner
14
+ must disable and read back its own automation, then remove it by exact ID under
15
+ [Workspace hygiene](../../axstack/references/workspace-hygiene.md#owned-automation-retirement).
16
+ Remove its dedicated workspace only after the terminal and preservation guards pass.
14
17
 
15
18
  ## Chat-run watch
16
19
 
@@ -109,8 +112,11 @@ Stop only when all members merged or closed, or on user cancellation recorded
109
112
  by the driver in the run record. Re-read membership and confirm no ambiguous
110
113
  publication or unsettled pass; cancellation
111
114
  prevents new work but does not prove running workers exited. The observer may
112
- disable only its own automation and must verify native disable/readback. A
113
- failed or uncertain disable is a hold. Report the stop receipt to the driver.
115
+ disable only its own automation and must verify native disable/readback. A failed
116
+ or uncertain disable is a hold. Report the stop receipt to the driver; the
117
+ driver removes the automation by exact ID, verifies absence, and removes the
118
+ dedicated workspace after the observer terminal closes under
119
+ [Workspace hygiene](../../axstack/references/workspace-hygiene.md#owned-automation-retirement).
114
120
  The driver separately settles workers, preserves evidence, and archives the run;
115
121
  an unavailable driver leaves those steps pending. The standalone 24-hour expiry
116
122
  and peer observation contracts are unchanged.