Repository navigation
docs(skills): objectstack-data says what os migrate meta --from 16 does: lists the edits, --write applies the proven sites - #22199
Conversation
…does
Two published lines said the chain "strips" the retired index keys `type`
and `partial` ("automatically" in rules/indexing.md). The default run writes
no authored source file (the `write` flag defaults to false) and `--write`
rewrites only the sites it can trace to one literal in one project file, so
both lines over-promised. They now carry the house sentence: the run lists
the mechanical edits, `--write` applies the ones it can prove, and the rest
is applied by hand.
SKILL.md sits at its token ceiling, so the longer sentence is paid by
deleting the clause "Access methods and partial predicates are
database-layer migrations", which the same section restates two paragraphs
below ("how to build partial / gin / gist indexes at the database layer").
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CXydFDyiQwNbGFkmwrcRQq
Contract reviewServed-tier: Reviewed in-seat by the skills seat 1 (dispatching seat; this session is served at the contract-review tier, read off ① Derived judgments
② Semver levelNone. Prose-only edits to published skill text; no package ③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
维护者速读(终稿)席位:skills 席 1, 改了什么:只改对外发布的 objectstack-data 技能里两句话。 为什么改:技能包随 风险与代价(含回滚):纯文本,不碰代码、不碰 spec、无 changeset( 席位意见:同意合入,席内契约复核 PASS。两点备注、均未立卡:① 类 pin 你要做的:用授权账号( Generated by Claude Code |
Fixes #22144
Clause-②: no
Two published lines in the objectstack-data skill said
os migrate meta --from 16strips the retired index keystypeandpartial("to strip them automatically" atrules/indexing.md:31, "strips them" atSKILL.md:377). Neither was true of the tool: the default run writes no authored source file, and--writerewrites only the sites it can prove. Both lines now carry the house sentence. The closing enumeration of everyos migrate metasentence inskills/**is below; every other hit reads true and is left byte-for-byte alone.Family: #22120 is landed (PR #22122, the upgrade skill) and #22123 is landed (PR #22145, the
--from 10example); this PR is the family's closing card. #9591 (PR #22142, spec lane) is referenced only: it moves the spec tombstones to the same sentence and holds the class pin.The tool, re-taken on this tree (
0aa5205228, cut fromorigin/mainat1e5d322c1e)packages/cli/src/commands/migrate/meta.ts:762-769, the flag declaration, verbatim:packages/cli/src/utils/authored-source-codemod.ts(module header):--writewrites a diff change only when its path leads, through the authored modules' syntax, to ONE object or array literal in ONE project file and the loaded value agrees with that literal; anything else is refused by a named reason and stays on the list for the author.packages/spec/src/migrations/registry.ts:79:export const MIGRATION_SUPPORT_FLOOR = 16;—applyMetaMigrationsthrowsMigrationFloorErrorfor any--fromunder it (meta.ts:713-716).packages/spec/src/conversions/registry.ts:3906:id: 'object-index-type-partial-removed'— the 16 → 17 step carries the conversion, so "lists the mechanical edits" is true of these two keys specifically, not only in general.House sentence (
packages/spec/src/shared/retired-key.ts: "It must be TRUE of the tool"). The tombstones onmainclose with "Runos migrate meta --from 16to list the mechanical edits for existing sources; apply them by hand." (packages/spec/src/data/object.zod.ts:558,567); PR fix(spec): the retirement sentence names--write: it applies the edits it can prove, you apply the rest #22142 moves that to "…--writeapplies the ones it can prove, and you apply the rest by hand."; the upgrade skill says "By defaultos migrate metarewrites no source file" (skills/objectstack-upgrade/SKILL.md:153) and "--write… rewrite the proven sites in place" (:132). No third vocabulary is introduced here.The two edits
skills/objectstack-data/rules/indexing.md:31-33(headroom 1058 tokens before):os migrate meta --from 16to strip them automatically. What to do instead is the subject of "Access methods and partial indexes" below."os migrate meta --from 16to list the mechanical edits;--writeapplies the ones it can prove, and you apply the rest by hand. What to do instead is the subject of "Access methods and partial indexes" below."skills/objectstack-data/SKILL.md:377-378(ceiling 6128, headroom 0 before — the shortest form that stays true):tscerror and a parse error;os migrate meta --from 16strips them. Access methods and partial predicates are database-layer migrations."tscerror and a parse error;os migrate meta --from 16lists the edits;--writeapplies the ones it can prove, the rest by hand."Token ratchet payment (
node scripts/check-skills-token-ratchet.mjs,ceil(utf8 bytes / 4)per file)The new sentence in
SKILL.mdcosts 63 bytes over the old one. It is paid by deleting one clause the same section restates — never by re-wrapping, never by touching the ceiling:SKILL.md:377-378): "Access methods and partial predicates are database-layer migrations." (70 bytes with its leading space);SKILL.md:387-388"See rules/indexing.md for composite indexes, unique scope, and how to build partial / gin / gist indexes at the database layer." andSKILL.md:44"Index Strategy (rules/indexing.md) — btree/gin/gist/fulltext, composite indexes, partial indexes"; and inrules/indexing.md§ "Access methods and partial indexes", the section the retirement callout points at;scripts/check-skills-token-ratchet.mjsis not touched (see Acceptance notes).skills/**readings — lines, and tokens as the ratchet counts themskills/objectstack-data/SKILL.mdskills/objectstack-data/rules/indexing.mdskills/**/SKILL.mdsummed1e5d322c1e)No eval under
skills/objectstack-data/evals/quotes either sentence (grep -rn strip skills/objectstack-data/evals/— 0 hits). Frontmatter untouched;check:skill-docsandcheck:skill-refsboth report in sync.Closing enumeration — every
os migrate metasentence inskills/**git grep -n "os migrate meta" -- skills/on0aa5205228: 30 hits in 5 files (objectstack-data/SKILL.md1,objectstack-data/rules/indexing.md1,objectstack-upgrade/SKILL.md21,objectstack-upgrade/evals/protocol-major-upgrade.json5,objectstack-upgrade/references/examples-upgrade.md2) — the same lines as onorigin/main, since only the two data-skill lines moved. A widenedgit grep -n "migrate meta" -- skills/adds one bare hit (objectstack-upgrade/SKILL.md:466), judged too. Three tests per hit: (a) the default run lists and writes no source; (b)--writerewrites only the provable sites; (c)--from Nis at or aboveMIGRATION_SUPPORT_FLOOR(16). A line is changed only when it is false.objectstack-data/SKILL.md:377os migrate meta --from 16strips them."--writestrips only the proven sitesobjectstack-data/rules/indexing.md:31os migrate meta --from 16to strip them automatically."objectstack-upgrade/SKILL.md:64-66--from 16 --step,--from 16 --json,--from 16 --out …, under the comment "replay the chain (writes only --out; --write also rewrites the sites it can prove)"--outis a snapshot and not a source; (b) stated; (c) 16objectstack-upgrade/SKILL.md:74os migrate meta --from 17 --json—appliedmust be []"objectstack-upgrade/SKILL.md:103os migrate meta --from 16replays every step in order … down to the chain's support floor, 16 today"objectstack-upgrade/SKILL.md:124-133os migrate metaactually does" and its command block (--out"write the canonicalized stack",--write"rewrite the proven sites in place")objectstack-upgrade/SKILL.md:153os migrate metarewrites no source file …--writerewrites in place each edit it can trace to one literal in one project file, lists every other with the reason …"objectstack-upgrade/SKILL.md:177-179--storedpreview,--stored --type …narrowing,--stored --apply --yeswriteisexclusive: ['stored'];--applyis the only writer there)objectstack-upgrade/SKILL.md:215os migrate meta --from N --json→.specChanges"specChanges(meta.ts:881,928); N is bounded by the floor sentence at:103objectstack-upgrade/SKILL.md:313os migrate meta --from 16 --json" piped intonode -e, reading.todostodosis the key (meta.ts:459)objectstack-upgrade/SKILL.md:404os migrate meta --from TARGET_MAJOR --json—appliedmust be []" (the placeholder is spelled out here)objectstack-upgrade/SKILL.md:449os migrate meta --stored --json— 0 = every row canonical, 1 = work left"storedMigrationClean)objectstack-upgrade/SKILL.md:466migrate metareports changes, but the files are unchanged — working as designed, the default run only lists — pass--write, or port the printed edits by hand"objectstack-upgrade/evals/protocol-major-upgrade.json:7--step,--json, and--out …— the command rewrites nothing on disk, so port the printed edits into the sources"--write;--outwrites a new snapshot and rewrites no source)objectstack-upgrade/evals/protocol-major-upgrade.json:10,20must_containtoken listsobjectstack-upgrade/evals/protocol-major-upgrade.json:17os migrate meta --from AUTHORED_MAJORto attribute the site to itsconversionId, portsrequiredWhen…" (placeholder spelled out)objectstack-upgrade/evals/protocol-major-upgrade.json:37os migrate meta --from 17 --jsonand readsapplied… runsos migrate meta --stored(read-only) then--stored --apply --yes"objectstack-upgrade/references/examples-upgrade.md:57os migrate meta --out."objectstack-upgrade/references/examples-upgrade.md:79os migrate meta --stored --apply— rows rehydrate correctly today; this makes it durable."Local verification (tree
0aa5205228; every exit code captured before any pipe)Derived with
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack(no paths; the tool took the changeset from the merge-base itself): 24 commands. Run after the final commit as one union with the tool's own loop idiom, recorded ascmd :: exit N, and reconciled:dispatch-gates --ran— "24 derived, 24 run, 0 NOT-MEASURED, 0 UNRUN". All 24 exit 0:check-ci-filter-parity·check-closing-keyword-parity(+--self-test) ·check-comment-mask-corpus·check-doc-route-spelling --advisory(+--self-test) ·check-skills-token-ratchet(+--self-test) ·@objectstack/lint check:doc-formula-expressions·@objectstack/spec check:skill-docs·check:agent-test-spelling·check:corpus-claim-drift·check:cross-package-test-inputs·check:doc-authoring·check:driver-memory-census·check:gitlink-declared·check:nul-bytes·check:pm-governed-merges·check:refd-timer-probe·check:role-word·check:skill-compatibility·check:skill-frame-sync·check:skill-identifier-liveness·check:watch-hint-literal.check:doc-formula-expressionsfirst answered exit 3 (PREREQUISITE NOT MET —@objectstack/formulaand@objectstack/lintwere unbuilt; nothing measured). Afterpnpm exec turbo run build --filter=@objectstack/formula --filter=@objectstack/lint --concurrency=2behindscripts/pm/os-verify-lock.sh(VERDICT command-exit 0; held 92 s, waited 0 s) it exits 0.pnpm --filter @objectstack/spec run check:skill-refsexit 0 ("9 generated files in sync");pnpm check:skill-top-level-keysexit 0.skip-changeset).Reverse verification of the ratchet payment (one-off; committed first;
scripts/ablation-replace.mjs)7220a34363d3→efe8f6825326);node scripts/check-skills-token-ratchet.mjsexit 1 — "skills/objectstack-data/SKILL.mdis 6144 tokens; the ratchet ceiling is 6128 (over by 16)". Restore proven: blob == HEAD7220a34363d3,git diff HEADempty,git status --porcelainempty.Acceptance notes
packages/spec/src/shared/retired-key-migrate-sentence.test.ts(WITHDRAWN_CLAIM) matches only "to rewrite … automatically" and the "rewrites (it for you / existing sources / authored sources / your sources / your source files)" spellings — no "strip" — so it never saw these two lines, and nothing in this PR is implied to be covered by it. Widening it is spec-lane work and the file is held by PR fix(spec): the retirement sentence names--write: it applies the edits it can prove, you apply the rest #22142; it is not touched here. Carrier: thedomain:specseat, via the skills seat's relay.skills/objectstack-data/SKILL.mdnow sits 1 token under its unchanged 6128 ceiling. Lowering the ceiling to 6127 is legitimate per the gate's own header and outside this card's file surface. Carrier: the next PR that touchesscripts/check-skills-token-ratchet.mjs, or the skills seat.skills/**): this PR stays draft and lands on an authorized APPROVED review or the maintainer's hand; no seat flips it ready.维护者速读(草稿)
改了什么:objectstack-data 技能里两句话(
rules/indexing.md:31、SKILL.md:377)原本说os migrate meta --from 16会"自动剥掉"/"剥掉"已退役的索引键type和partial。改成工具的真实行为:默认只列出机械修改;--write只落它能证明的那些站点;其余由作者手工完成。顺带把skills/**里所有os migrate meta句子逐条核对了一遍(上表),其余均属实,一字未动。为什么改:这是对外发布的技能包(
npx skills add原样装进客户项目),读到这句的 AI 作者会以为源码已被清理,把退役键留在原地,直到tsc或解析报错才发现。docs/NORTH-STAR.md优先级第 4 条:发布面上的错句就是产品缺陷;retired-key.ts的内部裁决是"这句话必须对工具为真"。风险与代价(含回滚):纯文本改动,不碰代码、不碰 spec、不发包、无 changeset。
SKILL.md已顶在 token 上限,新句子靠删掉同一段里被下文重述的一句付账(内容仍在SKILL.md:387-388与rules/indexing.md)。回滚 = revert 这一个提交。席位意见:
你要做的:确认两句新措辞与 PR #22142 正在采用的 house sentence 一致;同意则 APPROVE,由席位落地。
Generated by Claude Code