@sassywares/skills 0.13.1 → 0.13.2

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/CONCEPTS.md CHANGED
@@ -93,6 +93,11 @@ owns the workflow; the scripts in `.sassywares/worktree/` own the git.
93
93
  `# sassywares:scaffold v1 skill=<name> version=<version> date=<YYYY-MM-DD>`.
94
94
  The `sassy-setup` skill's `references/scaffold-header.md` owns its bytes and the
95
95
  offer-only upgrade rule.
96
+ - **Toolbox** — the installed `.sassywares/worktree/` set of git-mechanics
97
+ scripts, versioned by an integer *contract* header that the project's own
98
+ wrappers are written against. That number is not the suite release a scaffold
99
+ header records, so the two are not comparable; a toolbox older than the shipped
100
+ one is drift, not an upgrade, because the wrappers call flags it never had.
96
101
  - **Managed checkout** — one under `worktrees.dir` that also carries
97
102
  `.sassywares/config.yaml`. The tooling lists and removes only those; anything
98
103
  else belongs to another tool or predates the wiring.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sassywares/skills",
3
- "version": "0.13.1",
3
+ "version": "0.13.2",
4
4
  "description": "Lean, explicit-invocation Agent Skills for shipping fast: plan, work, review, validate, ship.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -586,8 +586,13 @@ report layout, the verdict classes, and the lint are in
586
586
  exact line to delete, and the lifecycle now lives in the two script keys.
587
587
  - `worktrees.enabled` is `true` or `false`. A checkout must resolve outside the
588
588
  working tree and must not hold a branch `base_map` names as a base. An
589
- `enabled: true` with no tooling installed, or with the wrong tooling version,
590
- is drift.
589
+ `enabled: true` with no tooling installed is drift, and so is an older tooling
590
+ set than the one this skill ships: a stale set lacks the flags and helpers the
591
+ project's own create/remove scripts were written against, so a run stops
592
+ mid-operation. `--check` names it stale and then lists every file that differs
593
+ or is no longer shipped; the fix is re-running setup. A set carrying a *newer*
594
+ header is drift too, reported file by file without the stale wording — it
595
+ works, it is simply not the set this skill ships.
591
596
  - `commit.branch` is `current` or `new`; `pr.*` are `true` or `false`. Write
592
597
  booleans as `true`/`false`, never `on`/`off` — bare `on`/`off` are YAML 1.1
593
598
  booleans and parse inconsistently.
@@ -11,10 +11,12 @@
11
11
  // state file records it and no second hash definition exists.
12
12
  //
13
13
  // The shipped set is four files — _lib.sh, create, list, remove. `prune` is
14
- // gone. A v12 install is therefore stale by construction, and its hash cannot
15
- // match: that is an upgrade, not tampering, so the version header earns its
16
- // one job here — an older header is reported as a note and the caller proceeds
17
- // to reinstall. An equal header whose hashes differ is still drift.
14
+ // gone, so an older install is stale by construction and its hash cannot match.
15
+ // That is not tampering, but it is not harmless either: the project's own
16
+ // create/remove scripts are written against the set this skill ships, and an
17
+ // older one lacks the flags and helpers they call, so a run stops mid-operation
18
+ // where no check is watching. A stale set is therefore drift, never a shrugged
19
+ // "upgrade": named once as stale, then by file.
18
20
  //
19
21
  // Usage: worktree-check.mjs --installed DIR --shipped DIR
20
22
  // Prints "<drift|note>\t<message>" per finding and always exits 0: the caller
@@ -69,17 +71,16 @@ const headerVersion = (dir) => {
69
71
 
70
72
  const installedVersion = headerVersion(installed);
71
73
  const shippedVersion = headerVersion(shipped);
72
- if (
74
+
75
+ // A lower header than the shipped one is the stale case: the set installed is
76
+ // not the set the project's scripts were written against, so they stop mid-run
77
+ // on a flag it never had. A higher header is not stale — a newer set works, it
78
+ // is simply not the one this skill ships — so it reports through the file walk
79
+ // alone and never borrows the "falls over" wording.
80
+ const stale =
73
81
  installedVersion !== null &&
74
82
  shippedVersion !== null &&
75
- installedVersion < shippedVersion
76
- ) {
77
- note(
78
- `worktree tooling is v${installedVersion}; this skill ships v${shippedVersion} — an upgrade, not drift — re-run setup, then delete .sassywares/worktree/prune, which v${shippedVersion} no longer ships`,
79
- );
80
- console.log(lines.join("\n"));
81
- process.exit(0);
82
- }
83
+ installedVersion < shippedVersion;
83
84
 
84
85
  // Walk each side once: the hash is the verdict and the same arrays name which
85
86
  // bytes moved, so the per-file report cannot contradict the folder hash.
@@ -97,6 +98,12 @@ if (got === want) {
97
98
  process.exit(0);
98
99
  }
99
100
 
101
+ // Verdict first, evidence after: the stale line says what it costs, and the walk
102
+ // below names the files so the report cannot be read as vague.
103
+ if (stale) {
104
+ drift("worktree setup is stale — it goes off mid-run, not here; re-run setup");
105
+ }
106
+
100
107
  const byPath = (files) => new Map(files.map((file) => [file.path, file.body]));
101
108
  const installedByPath = byPath(installedFiles);
102
109
  const shippedByPath = byPath(shippedFiles);
@@ -108,9 +115,12 @@ for (const [path, body] of shippedByPath) {
108
115
  drift(`.sassywares/worktree/${path} differs from the shipped copy — re-run setup`);
109
116
  }
110
117
  }
118
+ // A file this skill no longer ships is left over from an older set, and the
119
+ // `_lib.sh` helpers it calls went with it — so it is not merely untidy, it is a
120
+ // command that cannot work.
111
121
  for (const path of installedByPath.keys()) {
112
122
  if (!shippedByPath.has(path)) {
113
- drift(`.sassywares/worktree/${path} is not shipped by this skill — remove it, or re-run setup`);
123
+ drift(`${path} is retired and its helpers went with it — it cannot run; re-run setup`);
114
124
  }
115
125
  }
116
126