Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .changeset/34770-upgrade-skill-router.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
'@objectstack/skills': patch
---

docs(skills): the objectstack-upgrade entry file becomes a router

Clause-②: no
Metadata-protocol: none

`skills/objectstack-upgrade/SKILL.md` goes from 24.7 KB to 9.0 KB (481 lines to 159). It now holds five things: the boundary (the four "never" rules and one `conversionId` per commit), four first checks (the authored major, the `os validate` control, where the prescriptions ship, the skills re-install), the Quickstart command block, seven traps that each look finished and are not, and the rule for when you decide a residue item alone and when you ask the owner. A table at the end says which section of the reference file to open. No rule's teaching changes. Text moved, and this entry says where it went. The skill's two authored files are 0.3 KB smaller together (29.5 KB to 29.2 KB).

**What the entry keeps.** The seven traps: `os migrate meta` rewrites no source file by default, so the printed edits are ported by hand, or `--write` is passed and the edits it only lists are ported, then the range is replayed; a green `validate` does not mean the chain has nothing left, so replay `--from <authored-major> --to <target-major> --json` until `applied` is `[]` with no `replayedNothing`; stored `sys_metadata` rows are rewritten only at read and only while the release carries their conversions, so run the `--stored` pass before you leave it; data migrations are per-deployment gates the report carries as `pending`; code on a retired API can keep compiling while it reads `undefined`; prose that still teaches the old shape fails nothing; and the parse-gate probe is a plain data literal with no `define*` call.

**What left, and where it is now.** `references/examples-upgrade.md` now holds the whole run in order, around the three blocks it already had (the worked R1, the report template, the v17-canonical shapes, all unchanged):

- `0 · Preflight` (`#0--preflight`): the three sources of the FROM major, the `.upgrade/` workspace, the commands that re-install the skills.
- `1 · Mechanical layer` (`#1--mechanical-layer`): what a run does and prints, stored rows, data gates.
- `2 · Semantic residue` (`#2--semantic-residue`): where the prescriptions ship and how to harvest them, the residue classes, what each decide-or-ask condition looks like, the R2 and R3 searches.
- `3 · Acceptance` (`#3--acceptance`): typed, parse-gated, validate, the reverse check (`#reverse-check`) with its three outcomes, the stored-row assertion.
- `Failure modes` (`#failure-modes`) and the `--json` error codes.
- Anchors that no longer exist in `SKILL.md`: `#-the-boundary--read-this-before-the-first-command` (now `#-the-boundary`), `#0--preflight`, `#establish-the-from-major--do-not-guess-it`, `#make-the-work-reviewable-before-you-change-anything`, `#re-install-the-skills-from-the-moved-catalog`, `#1--mechanical-layer--invoke-the-chain`, `#what-os-migrate-meta-actually-does`, `#-the-one-fact-that-surprises-every-operator`, `#stored-rows-rehydration-replays-what-the-release-carries`, `#data-migrations-are-not-metadata-migrations`, `#2--semantic-residue--the-part-that-is-yours` and its `2.1` to `2.6` sections, `#3--acceptance--what-upgraded-means` and its `3.1` to `3.6` sections, `#reverse-check`, `#failure-modes`. `#quickstart`, `#decide-alone-or-ask` and `#cross-skill-routing` still do.

**Not carried over, because something else already says it.** The list of `os migrate meta` forms (`os migrate meta --help` prints the same forms and describes every flag; the Quickstart keeps the ones a run needs), and two `Failure modes` rows. "Reports changes, but the files are unchanged": its symptom and cause are trap 1, and its fix (pass `--write`, or port the printed edits by hand, then replay) is kept as that trap's last sentence. "Findings that have nothing to do with retired keys" restated first check 2, the control.
27 changes: 25 additions & 2 deletions scripts/check-skills-token-ratchet.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,16 @@ export const CEILINGS = new Map([
// `references/examples-upgrade.md` (row below), one pointer line each.
// 6193 -> 6188: A2′ — the release-stamp line left the count (see
// STAMP_LINE_REPIN); the file's count fell by the same 5, headroom unchanged.
['skills/objectstack-upgrade/SKILL.md', 6170], // -18 to the measurement (was 6188)
// 6170 -> 2244 (#34770): the entry becomes a router. It keeps the boundary, four first
// checks, the Quickstart, seven traps (each looks finished and is not) and the decide-alone-
// or-ask rule, then a routing table into `references/examples-upgrade.md` (row below), which
// RECEIVES the rest as the complement of what stays, so nothing is stated twice. The file is
// 24707 bytes (24680 priced) -> 9000 (8973 priced) -> 2244 tokens, pinned AT the measurement.
// The two objectstack-upgrade rows sum 7363 -> 7288 (-75), so the sum of all ceilings falls.
// Authority: the ruling of record that orders the entry file down to router size, decision
// record #34691 S3 = A, and ruling 7128031203 fork 4 = A on #34770 for the row that rises.
// ceil(($(wc -c < skills/objectstack-upgrade/SKILL.md) - 27) / 4) == ceil(8973 / 4)
['skills/objectstack-upgrade/SKILL.md', 2244],

// ── the #12392 extension: the rest of the AUTHORED bundle ────────────────
// Every row below is an INITIAL measurement, taken on
Expand Down Expand Up @@ -2562,7 +2571,21 @@ export const CEILINGS = new Map([
// silent failure and links the rest. 12505 -> 11360 bytes (-1145) -> 2840 tokens.
// ceil($(wc -c < skills/objectstack-platform/references/plugin-development.md) / 4) == ceil(11360 / 4)
['skills/objectstack-platform/references/plugin-development.md', 2840],
['skills/objectstack-upgrade/references/examples-upgrade.md', 1193], // -4 to the measurement (was 1197)
// 1193 -> 5044 (#34770): RECEIVES from SKILL.md, no new teaching: `## 0 · Preflight`,
// `## 1 · Mechanical layer`, `## 2 · Semantic residue` (2.1, 2.2, 2.4 to 2.6 around the worked
// R1 already here), `## 3 · Acceptance` (3.1 to 3.3, 3.5, 3.6 around the report template
// already here) and `## Failure modes`. PAID DOWN FIRST: each section was cut to the complement
// of what the entry still says, the `os migrate meta` form list is one pointer at
// `os migrate meta --help` (the CLI prints the same forms and every flag), and two Failure
// modes rows are gone: one whose symptom is entry trap 1 and whose fix is that trap's last
// sentence, and one that restated the control. The three blocks that were
// here are byte-identical. The file is 4772 -> 20174 bytes (+15402) -> 5044 tokens, zero
// headroom before, ceiling +3851, pinned AT the measurement; the entry row above falls 3926,
// so both conditions of ruling 7128031203 fork 4 = A hold (moved text at the measurement, and
// the sum of ceilings does not rise). The skill's two authored files are 305 bytes smaller
// together (29479 -> 29174).
// ceil($(wc -c < skills/objectstack-upgrade/references/examples-upgrade.md) / 4) == ceil(20174 / 4)
['skills/objectstack-upgrade/references/examples-upgrade.md', 5044],
// NEW FILE, pinned AT the measurement: the context pack (`ai_context`, ADR-0160)
// is a metadata kind no published skill taught beyond its key name. Card #37177
// (the `Skills-docs: follow-up` of the PR that admitted the kind) asks for the
Expand Down
Loading
Loading