axstack 0.53.0 → 0.53.1
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.53.
|
|
3
|
+
"version": "0.53.1",
|
|
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",
|
|
@@ -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
|
|
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
|
|
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
|
-
|
|
41
|
+
advisories.push(`${JSON.stringify(path)}: ${bytes} bytes`);
|
|
37
42
|
}
|
|
38
|
-
if (
|
|
39
|
-
console.error(`
|
|
40
|
-
${
|
|
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
|
|
169
|
+
[staged-file size check](../axstack/scripts/check-staged-file-tokens.js)
|
|
170
170
|
with `bun` from the target repository.
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
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
|
|
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>
|