axstack 0.53.0 → 0.54.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/docs/workflows.md CHANGED
@@ -256,7 +256,10 @@ for explicit ownership transfer.
256
256
  fenced. Fable also serves the bounded triggers in
257
257
  [Standing contracts](../skills/axstack/references/contracts.md).
258
258
  - `axstack-spec` writes observable acceptance, exclusions, decisions, and one
259
- user-approved revision baseline. Linear through the executor MCP is the
259
+ user-approved revision baseline. Its [shared format](../skills/axstack-spec/references/format.md)
260
+ opens with the human decision brief, groups binding requirements by capability,
261
+ and separates evidence/history. Review checks readability alongside completeness.
262
+ Linear through the executor MCP is the
260
263
  default only for `defi-com` repositories; GitHub Issues and repository
261
264
  Markdown are explicit alternatives and the stores for other repositories.
262
265
  A GitHub baseline pins the issue URL and approved body digest. Preflight
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axstack",
3
- "version": "0.53.0",
3
+ "version": "0.54.0",
4
4
  "description": "Axstack installer and setup CLI: installs owned chat skills and role data, configures supported harness settings, and checks T3 Code capabilities.",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -29,7 +29,10 @@ paths, and stale references. Bind the result to the exact head and base.
29
29
 
30
30
  For research, reopen cited sources for answer-changing claims before the
31
31
  driver folds verified claims. For a draft spec, compare it with Align decisions
32
- before user approval: flag anything dropped, added, or softened. For tickets,
32
+ before user approval: flag anything dropped, added, or softened. For a draft spec,
33
+ check readability alongside completeness using the
34
+ [shared format](../../axstack-spec/references/format.md#readability-review).
35
+ For tickets,
33
36
  map every spec acceptance item to a capability's acceptance. Before candidate
34
37
  publication, compare the author receipt with its evidence folder: red/green
35
38
  logs exist, and counts, SHAs, and paths match. For release preparation, compare
@@ -22,38 +22,28 @@ try {
22
22
  } catch (error) {
23
23
  if (error.code !== 'ENOENT') throw error;
24
24
  }
25
+ if (git('ls-files', '--unmerged', '-z')) throw Error('Unmerged index entries must be resolved before measurement');
25
26
  const paths = git('diff', '--cached', '--name-only', '--diff-filter=ACMR', '-z').split('\0').filter(Boolean);
26
- const offenders = [];
27
+ const advisories = [];
27
28
  for (const path of paths) {
28
29
  if (ignoredPath.test(path) || asset.test(path) || ignores.some((glob) => glob.match(path))) continue;
29
30
  if (git('ls-files', '--stage', '-z', '--', path).startsWith('160000 ')) continue;
30
- const bytes = Number(git('cat-file', '-s', `:${path}`));
31
+ const size = git('cat-file', '-s', `:${path}`).trim();
32
+ const bytes = Number(size);
33
+ if (!/^\d+$/.test(size) || !Number.isSafeInteger(bytes)) {
34
+ throw Error(`Invalid blob size for ${JSON.stringify(path)}: ${JSON.stringify(size)}`);
35
+ }
31
36
  if (bytes <= 20000) continue;
32
37
  if (git('diff', '--cached', '--numstat', '--no-renames', '-z', '--', path).startsWith('-\t')) continue;
33
38
  // Consume the blob fully: closing a pipeline at line five can cause SIGPIPE.
34
39
  const firstLines = git('cat-file', 'blob', `:${path}`).split('\n', 5).join('\n');
35
40
  if (/@generated|auto[- ]?generated|do not edit|code generated by/i.test(firstLines)) continue;
36
- offenders.push(`${JSON.stringify(path)}: ${Math.floor(bytes / 4)} tokens`);
41
+ advisories.push(`${JSON.stringify(path)}: ${bytes} bytes`);
37
42
  }
38
- if (offenders.length) {
39
- console.error(`Staged files exceed 5000 tokens (20000 bytes; tokens = floor(bytes / 4)):
40
- ${offenders.join('\n')}
41
-
42
- Split each file before committing:
43
- 1. Find seams: group top-level units by responsibility.
44
- 2. Create a folder named after the original file, with one module per responsibility.
45
- TS: foo.ts -> foo/types.ts, foo/parse.ts, foo/index.ts.
46
- Rust: foo.rs -> foo/mod.rs + submodules with re-exports.
47
- Svelte: child components + a .ts module for pure logic.
48
- Specs: one spec per describe block or behaviour.
49
- HTML docs: one doc per topic, linked from an index.
50
- 3. Keep the public surface stable via re-exports, or update all imports in the same commit.
51
- 4. Move code verbatim first, then refactor in a separate commit.
52
- 5. Aim for ~3000 tokens per file.
53
- 6. Stage the new files and re-commit.
54
- If truly generated or recorded data, add a glob to ${JSON.stringify(ignoreFile)}
55
- or give the file a generated banner in its first 5 lines.`);
56
- process.exit(1);
43
+ if (advisories.length) {
44
+ console.error(`Advisory: staged files above 20000 bytes (size alone does not block committing):
45
+ ${advisories.join('\n')}
46
+ Review file structure and responsibilities; no size-only split or approval is required.`);
57
47
  }
58
48
  } catch (error) {
59
49
  console.error(`Staged-file token check failed: ${error.message}`);
@@ -166,11 +166,17 @@ applied or found not applicable in the `Simplification:` line of the
166
166
  including evidence and retained complexity.
167
167
 
168
168
  Before every commit, the author runs the
169
- [staged-file token gate](../axstack/scripts/check-staged-file-tokens.js)
169
+ [staged-file size check](../axstack/scripts/check-staged-file-tokens.js)
170
170
  with `bun` from the target repository.
171
- If the gate fails, split files per its instructions before retrying.
172
- Never bypass the staged-file token gate.
173
- Record the staged-file token gate result in the implementation receipt.
171
+ Successful staged-file size measurements, including files above 20,000 bytes,
172
+ are advisory and exit 0.
173
+ Never require splitting files solely for size.
174
+ Never request user approval solely for file size.
175
+ Review file structure and responsibilities even when size is advisory.
176
+ Git, read, malformed-size and unmerged-index errors must fail with a nonzero exit.
177
+ Resolve measurement errors before committing; keep repository-owned checks enforceable.
178
+ Preserve the check's exclusions, but never hide authored files behind generated banners or ignore globs.
179
+ Record the staged-file size check result in the implementation receipt.
174
180
 
175
181
  ## 5. Verify and return the candidate
176
182
 
@@ -199,7 +205,7 @@ Owner: <profile + session ID + worktree>
199
205
  Scope: <approved spec + capability | small-change intent | maintenance snapshot>
200
206
  Shape: <total> lines vs base <sha>; bulk: <buckets>; theme: <one line>
201
207
  TDD: <normal red/green | structure-preserving old-green/same-check-new-green evidence | F-repair base-green/removal-inversion-red/rewording-green evidence>
202
- Token limit: <staged-file gate command + observed result before each commit>
208
+ Token limit: <staged-file size check command + observed advisories/errors before each commit>
203
209
  Simplification: <applied | not-applicable> — evidence: <diff locations and checks>; retained complexity: <necessary complexity and why>
204
210
  Acceptance: <checks + observed results>
205
211
  Dependencies: <parent revisions or none>
@@ -43,8 +43,9 @@ and the lifecycle's [audit skill](../axstack-audit/SKILL.md) hook.
43
43
  access before any issue write. Record the repository and identity checked.
44
44
  Missing access preserves the GitHub selection and stops the phase without
45
45
  mutation or fallback. Markdown mode skips external access preflight.
46
- 3. **Draft with decision evidence.** Write observable acceptance criteria
47
- and explicit exclusions in the selected store. Only when the scope identity
46
+ 3. **Draft with decision evidence.** Follow the
47
+ [readable specification format](references/format.md) when drafting in the
48
+ selected store. Only when the scope identity
48
49
  carries a sketch, include the [design lens](../axstack/references/design-lens.md)
49
50
  sketch in the approved revision's `Design` section and its `Usage` line in
50
51
  acceptance. First record the driver's
@@ -90,7 +91,8 @@ and the lifecycle's [audit skill](../axstack-audit/SKILL.md) hook.
90
91
  [Diligence](../axstack/references/diligence.md) to check the draft against
91
92
  the Align decisions for anything dropped, added, or softened.
92
93
  5. **Snapshot the baseline.** Record the approved revision identity and a
93
- concise repository Markdown counterpart. In Linear mode, the native
94
+ concise repository Markdown counterpart pointing to the same requirements,
95
+ not a second human or agent contract. In Linear mode, the native
94
96
  document remains authoritative. In GitHub mode, the approved issue body is
95
97
  authoritative and its GitHub issue URL plus SHA-256 body digest identifies
96
98
  the exact approved revision. In Markdown mode, the agreed repository path does.
@@ -0,0 +1,88 @@
1
+ # Readable specification format
2
+
3
+ Use this structure inside the selected authoritative store. It changes layout,
4
+ not store selection, adviser review, diligence, approval or snapshot authority.
5
+
6
+ ## Decision brief
7
+
8
+ Begin with a decision brief before execution detail and history.
9
+ Keep identity and status compact, with review-round history after current requirements.
10
+ For example: title, revision, draft or approved status, authoritative location.
11
+
12
+ - In the opening, explain the problem, why it matters and the proposed change.
13
+ - When useful, include a concrete before/after example or flow in the opening.
14
+ - State included and excluded scope in the brief.
15
+ - Surface consequential risks, trade-offs and unverified boundaries in the brief.
16
+ - Collect all decisions needed from the user in the opening, with options and
17
+ consequences; say explicitly when none remain.
18
+
19
+ Give enough context for an informed decision. Link each consequential choice
20
+ or risk to its precise execution requirement. Never bury a material decision
21
+ or risk only in supporting detail.
22
+
23
+ ## Execution requirements
24
+
25
+ Group precise requirements and observable acceptance by capability, using stable
26
+ IDs where useful. Include behavior, interfaces, data, invariants, failure cases
27
+ and validation that determine success. Put routine file-by-file task and PR
28
+ sequencing in Tickets, retaining meaningful design and rollout constraints in the spec.
29
+ State each rule once and reference it from other sections.
30
+ Technical execution detail remains binding wherever stored, including linked detail.
31
+ Human and agent views share one authoritative specification.
32
+ Resolve brief/detail conflicts before approval rather than declaring one view expendable.
33
+
34
+ Use headings, short requirement blocks or lists for scanning. Use a table when
35
+ it helps compare choices, rather than putting whole paragraphs in cells.
36
+ Do not impose word caps, mandatory tables, an extra artifact or ceremony.
37
+ The example below is adaptable guidance, not another required document.
38
+ The existing readback identifies and explains this same revision; it is not
39
+ a duplicate whole spec with separate requirements.
40
+
41
+ ## Evidence and history
42
+
43
+ Keep history, evidence and adviser receipts separate from current requirements.
44
+ Place provenance, commands, review-round dispositions and change logs here or
45
+ link their existing records. They explain the requirements, not override them.
46
+ When amending a draft, update current criteria in place and keep the change log
47
+ as history. Preserve approved snapshots immutable and mark supersession through
48
+ metadata or links outside the approved bytes. Use the existing material-revision
49
+ and snapshot procedure for a changed baseline; a new draft is not approval.
50
+
51
+ ## Readability review
52
+
53
+ For readability review, verify a human can identify what changes, why, decisions
54
+ and risks from the opening and an implementer can find exact requirements without
55
+ reconstructing history. Assess this alongside completeness before the existing
56
+ specification checkpoint. Return unclear or conflicting passages for revision
57
+ under the existing review and approval rules.
58
+
59
+ ## Compact example
60
+
61
+ ```markdown
62
+ # Export the filtered view — r2, draft
63
+ Authoritative location: <selected store URL or repository path>
64
+
65
+ ## Decision brief
66
+ Problem/why: exports ignore the table filter, forcing users to clean the file.
67
+ Change: export what the user is viewing.
68
+ Before: export downloads the whole dataset. After: it downloads filtered rows.
69
+ Included: CSV export from this table. Excluded: scheduled exports and new formats.
70
+ Trade-off/risk: an active filter can omit rows users expect; label the action
71
+ “Export filtered rows” (EXP-1). Unverified: large exports on low-memory devices.
72
+ Decision needed: approve filtered export with the explicit label, or retain
73
+ whole-dataset export and its cleanup cost. Proposed choice: filtered export.
74
+
75
+ ## Execution requirements
76
+ ### Filtered export
77
+ EXP-1: On click, capture the active filter and visible column order, label the
78
+ action “Export filtered rows”, and export only matching rows in those columns.
79
+ Acceptance for EXP-1: with a two-row dataset and a filter matching one row,
80
+ the CSV contains that row and the visible columns in order; with a filter
81
+ matching zero rows, the CSV contains the header only.
82
+
83
+ ## Evidence and history
84
+ Source: <observed current behavior and revision>.
85
+ Adviser receipts: <links bound to r2>; approval: pending.
86
+ Change log: r2 incorporates the zero-row case into EXP-1 acceptance.
87
+ Previous approved baseline, if any: <immutable ref>; supersession: pending approval.
88
+ ```