Skip to content

Commit 2ade979

Browse files
committed
docs(skills): trap 1 says how the printed edits reach the sources
The Failure modes row that carried the fix for a default run was cut as a restatement, but trap 1 restated only its symptom and cause. Trap 1 now ends with the fix: port the printed edits by hand, or pass --write and port those it only lists, then replay. The Quickstart creates .upgrade/ before its first write into it. Paid inside the entry: comment padding in the Quickstart, one lead-in line above the routing table, and the explicit anchor of the decide-or-ask heading, whose own slug is now the same id. The entry is 9000 bytes; its ratchet row is re-pinned at the measurement (2244), and the changeset says where the cut row's fix lives. Claude-Session: https://claude.ai/code/session_01QsR2jVWxY6Vvb8bdNPPs9y Co-authored-by: Claude <noreply@anthropic.com>
1 parent 1fc4d10 commit 2ade979

3 files changed

Lines changed: 24 additions & 24 deletions

File tree

‎.changeset/34770-upgrade-skill-router.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ docs(skills): the objectstack-upgrade entry file becomes a router
77
Clause-②: no
88
Metadata-protocol: none
99

10-
`skills/objectstack-upgrade/SKILL.md` goes from 24.7 KB to 9.0 KB (481 lines to 160). 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).
10+
`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).
1111

12-
**What the entry keeps.** The seven traps: `os migrate meta` rewrites no source file by default; 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.
12+
**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.
1313

1414
**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):
1515

@@ -20,4 +20,4 @@ Metadata-protocol: none
2020
- `Failure modes` (`#failure-modes`) and the `--json` error codes.
2121
- 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.
2222

23-
**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 that restated what the entry says: "reports changes, but the files are unchanged" (trap 1) and "findings that have nothing to do with retired keys" (first check 2, the control).
23+
**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.

‎scripts/check-skills-token-ratchet.mjs‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,16 +1349,16 @@ export const CEILINGS = new Map([
13491349
// `references/examples-upgrade.md` (row below), one pointer line each.
13501350
// 6193 -> 6188: A2′ — the release-stamp line left the count (see
13511351
// STAMP_LINE_REPIN); the file's count fell by the same 5, headroom unchanged.
1352-
// 6170 -> 2242 (#34770): the entry becomes a router. It keeps the boundary, four first
1352+
// 6170 -> 2244 (#34770): the entry becomes a router. It keeps the boundary, four first
13531353
// checks, the Quickstart, seven traps (each looks finished and is not) and the decide-alone-
13541354
// or-ask rule, then a routing table into `references/examples-upgrade.md` (row below), which
13551355
// RECEIVES the rest as the complement of what stays, so nothing is stated twice. The file is
1356-
// 24707 bytes (24680 priced) -> 8995 (8968 priced) -> 2242 tokens, pinned AT the measurement.
1357-
// The two objectstack-upgrade rows sum 7363 -> 7286 (-77), so the sum of all ceilings falls.
1356+
// 24707 bytes (24680 priced) -> 9000 (8973 priced) -> 2244 tokens, pinned AT the measurement.
1357+
// The two objectstack-upgrade rows sum 7363 -> 7288 (-75), so the sum of all ceilings falls.
13581358
// Authority: the ruling of record that orders the entry file down to router size, decision
13591359
// record #34691 S3 = A, and ruling 7128031203 fork 4 = A on #34770 for the row that rises.
1360-
// ceil(($(wc -c < skills/objectstack-upgrade/SKILL.md) - 27) / 4) == ceil(8968 / 4)
1361-
['skills/objectstack-upgrade/SKILL.md', 2242],
1360+
// ceil(($(wc -c < skills/objectstack-upgrade/SKILL.md) - 27) / 4) == ceil(8973 / 4)
1361+
['skills/objectstack-upgrade/SKILL.md', 2244],
13621362

13631363
// ── the #12392 extension: the rest of the AUTHORED bundle ────────────────
13641364
// Every row below is an INITIAL measurement, taken on
@@ -2577,12 +2577,13 @@ export const CEILINGS = new Map([
25772577
// already here) and `## Failure modes`. PAID DOWN FIRST: each section was cut to the complement
25782578
// of what the entry still says, the `os migrate meta` form list is one pointer at
25792579
// `os migrate meta --help` (the CLI prints the same forms and every flag), and two Failure
2580-
// modes rows that restated an entry trap and the control are gone. The three blocks that were
2580+
// modes rows are gone: one whose symptom is entry trap 1 and whose fix is that trap's last
2581+
// sentence, and one that restated the control. The three blocks that were
25812582
// here are byte-identical. The file is 4772 -> 20174 bytes (+15402) -> 5044 tokens, zero
2582-
// headroom before, ceiling +3851, pinned AT the measurement; the entry row above falls 3928,
2583+
// headroom before, ceiling +3851, pinned AT the measurement; the entry row above falls 3926,
25832584
// so both conditions of ruling 7128031203 fork 4 = A hold (moved text at the measurement, and
2584-
// the sum of ceilings does not rise). The skill's two authored files are 310 bytes smaller
2585-
// together (29479 -> 29169).
2585+
// the sum of ceilings does not rise). The skill's two authored files are 305 bytes smaller
2586+
// together (29479 -> 29174).
25862587
// ceil($(wc -c < skills/objectstack-upgrade/references/examples-upgrade.md) / 4) == ceil(20174 / 4)
25872588
['skills/objectstack-upgrade/references/examples-upgrade.md', 5044],
25882589
// NEW FILE, pinned AT the measurement: the context pack (`ai_context`, ADR-0160)

‎skills/objectstack-upgrade/SKILL.md‎

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,13 @@ metadata:
6464
## Quickstart
6565

6666
```bash
67-
# 0 · preflight — the authored major and the installed one
67+
# 0 · preflight — the authored major, the installed one
6868
grep -rn "protocol" objectstack.config.ts package.json | head
6969
node -p "require('@objectstack/spec/package.json').version"
7070

7171
# 1 · mechanical — replay the chain (trap 1)
72-
os validate > .upgrade/validate-before.txt 2>&1 || true # the control, kept
72+
mkdir -p .upgrade
73+
os validate > .upgrade/validate-before.txt 2>&1 || true # the control, kept
7374
os migrate meta --from 16 --step
7475
os migrate meta --from 16 --json > .upgrade/migrate.json
7576
os migrate meta --from 16 --out .upgrade/migrated.stack.json
@@ -78,9 +79,9 @@ os migrate meta --from 16 --out .upgrade/migrated.stack.json
7879
node -e "console.log(require('fs').readFileSync(require.resolve('@objectstack/spec/package.json').replace('package.json','spec-changes.json'),'utf8'))" > .upgrade/spec-changes.json
7980

8081
# 3 · acceptance — all four, not three
81-
os validate # green (compare against validate-before.txt)
82-
tsc --noEmit # tombstones type the retired keys as `never`
83-
os migrate meta --from 16 --to 18 --json # `applied` [] and no `replayedNothing` (trap 2)
82+
os validate # green (compare against validate-before.txt)
83+
tsc --noEmit # tombstones type the retired keys as `never`
84+
os migrate meta --from 16 --to 18 --json # `applied` [] and no `replayedNothing` (trap 2)
8485
# → write .upgrade/REPORT.md (template: §3.4)
8586
```
8687

@@ -89,7 +90,9 @@ os migrate meta --from 16 --to 18 --json # `applied` [] and no `replayedNothin
8990
1. **By default `os migrate meta` rewrites no source file.** It prints each edit
9091
as `path: from → to (conversionId)` and writes only `--out`. `--write`
9192
rewrites an edit it can trace to one literal in one project file, lists every
92-
other with the reason, and never writes a semantic change.
93+
other with the reason, and never writes a semantic change. Port the printed
94+
edits by hand, or pass `--write` and port those it only lists; then replay
95+
(trap 2).
9396
2. **A green `validate` does not mean the chain has nothing left.** A
9497
migration-chain-only conversion (a default flip) has no tombstone, so the old
9598
shape validates. Replay the range you ported,
@@ -118,9 +121,7 @@ os migrate meta --from 16 --to 18 --json # `applied` [] and no `replayedNothin
118121
call, which throws inside the load and never reaches the gate. A retired key
119122
that still parses is stripped or in a load-path window: find which.
120123

121-
<a id="decide-alone-or-ask"></a>
122-
123-
## Decide alone, or ask the owner
124+
## Decide alone, or ask
124125

125126
**R1, an intent choice**: a key retired with no single lossless target. The
126127
conversion drops it so the project parses; where its purpose goes is a business
@@ -142,9 +143,7 @@ report as `AWAITING DECISION` and keep the mechanical layer moving.
142143

143144
## Where to go
144145

145-
One file holds the rest:
146-
147-
| Section | Open it for |
146+
| Section | For |
148147
|:--|:--|
149148
| [0 · Preflight](./references/examples-upgrade.md#0--preflight) | the FROM major's sources, `.upgrade/`, the skills re-install |
150149
| [1 · Mechanical layer](./references/examples-upgrade.md#1--mechanical-layer) | what a run does and prints, stored rows, data gates |

0 commit comments

Comments
 (0)