Repository navigation
skills(objectstack-platform): teach demoStaff and when to pick it over devLogins - #26420
Conversation
… it over devLogins The platform skill named `demoStaff` only in its top-level key list, so an author preparing a demo declared banner logins and hand-wrote user seed rows. The Seed Data section now says what each key does and which to pick, with one example and the refusals an author meets, and the package's eval file gains one prompt for it. Paid under the token ratchet's ruling A: four restatements cut from SKILL.md first, then the two touched CEILINGS rows raised by exactly the measured remainder, each row comment carrying the arithmetic. Claude-Session: https://claude.ai/code/session_01JQwxbX1XjSzpntF9n85TgB Co-authored-by: Claude <noreply@anthropic.com>
…-sfzn7w # Conflicts: # scripts/check-skills-token-ratchet.mjs
Contract reviewReviewed at 2026-10-27T03:30Z — independent contract review of PR #26420 (card #26302, Served-tier: Landing state when read (2026-10-27T03:21Z): ① Derived judgments(a) Every new sentence against the spec and runtime on
(b) The cuts — duplicates with a surviving home (ruling A 「先削重复」), judged on the whole head SKILL.md
(c) Ratchet rows pinned at the measurement; ruling quoted where the script requires
(d) Eval
(e) Card Wanted met, nothing beyond
(f) PR body
(g) Report and claim
② Semver level
③ Boundary flags
Implemented-by: VERDICT: FAIL — ①(a) item 1: the new section's opening reason "a Generated by Claude Code |
Requested by Warren · project thread
Fixes #26302
Clause-②: no
Metadata-protocol: none
维护者速读
demoStaffvsdevLogins」:种子数据把记录分给人,但造不出人(data里写sys_user行会被拒),人声明在demoStaff,os dev在开发管理员之后创建账号(用种子密码,条目不带password;position/permissionSets只能是本 stack 自己声明的;os build不写进产物,非开发启动不创建);devLogins只是启动横幅文字,不创建、不授权。配一条 eval。demoStaff,AI 作者准备 demo 时只声明横幅登录、手写用户种子行,启动后owner_id解析不到人。scripts/check-skills-token-ratchet.mjs两行天花板数字;不发版、无运行时改动,回滚 = revert 本 PR。风险在教学措辞与 spec 是否一致 —— 六个探针(合法条目、role:别名、平台权限集、password键、重名、未声明职位)都用构建后的defineStack跑过,结果见 Tests。skills/objectstack-platform/SKILL.md新小节(Seed Data 表之后);② 同文件四处删重复(defineStack()开头两句、「读源码看精确形状」段、启动序列第 6 步的括号、速查表两条端口注释);③scripts/check-skills-token-ratchet.mjs两行天花板(5828→5981、1211→1458)。node scripts/check-skills-token-ratchet.mjs—— 全绿,objectstack-platform 的 SKILL.md 与 eval 文件 headroom 都是 0。skills/**是发布面),席位随后落地。What changes
Row P1 of the audit on #26184 (comment 6425678185, § objectstack-platform), taught in the fewest lines an AI author needs, in the file that names
devLogins:skills/objectstack-platform/SKILL.md— a Demo accounts —demoStaffvsdevLoginssubsection under Seed Data, next to the mode table and the bootstrap cheat sheet: a seed deals records to people and cannot create one (asys_userrow indatais refused, ADR-0092); the people go indemoStaffandos devcreates each account after the development admin, signing in with the seed password (an entry carries nopassword); one example entry;nameis what a seed reference resolves by;position/permissionSetsname only what this stack declares (a platform set such asadmin_full_accessis refused);os builddrops the key and a non-dev boot creates nothing;devLoginscreates and grants nothing, it only prints an existing account on the boot banner. The choice rule: pickdemoStaffwhenever the demo needs an account to exist.skills/objectstack-platform/evals/config-plugins-ops.json— eval 7: a demo whose seed names two people and should open signed in as one of them. Expected: both indemoStaffwith a declared position / permission set, created byos dev;must_not_containtherole:alias andadmin_full_access.scripts/check-skills-token-ratchet.mjs— the two touchedCEILINGSrows, each raised by exactly the measured remainder with the arithmetic in the row comment (below).Every sentence of the section is read off the spec:
packages/spec/src/system/demo-staff.zod.ts(the schema, itsaliasesandguidance),stack.zod.ts(collectDemoStaffErrors, thedemoStaff/devLoginsTSDoc, the envelope-key note),packages/plugins/plugin-auth/src/demo-staff.ts(the environment gate and the provisioning order) andpackages/cli/src/commands/compile.ts(the artifact drops the key). Nothing was taught beyond the card's Wanted.Why
Who pays: an AI author preparing a demo. The package named
demoStaffonly in its top-level key list, so the author declared banner logins and hand-wrote user seed rows, and the seed'sowner_idreferences resolved to nobody on the first boot.Line budget (
skills/**is a published surface)Whole-file, before → after, lines:
skills/objectstack-platform/SKILL.mdskills/objectstack-platform/evals/config-plugins-ops.jsonWhole-package (
SKILL.md+references/**/*.md+rules/**/*.md): 2092 → 2107 (+15; the seven other.mdfiles are untouched).references/_index.mdis generator-owned and unchanged (41).Token ratchet — maintainer ruling A
Both touched files sat at the ceiling (
SKILL.mdheadroom 4, the eval file 0). Paid as the maintainer ruled on the seat thread's decision card 「skills 修复卡的教学和 eval 都撞 token 天花板,怎么付?」 (2026-10-27T01:21Z), his tap verbatim and untranslated: 「A:先削重复,余额按实测提高」.Cut first — four genuine restatements in
SKILL.md, each with its surviving home in the same file:## defineStack() — The Core Configuration("objectstack.config.tsis the single entry point … callsdefineStack()")defineStack()surface overobjectstack.config.ts) and the project-tree comment← THE entry point — defineStack()stack.zod.ts…" paragraph, compacted to one pointer line## References("AlwaysReadthe source for exact field shapes"); theObjectStackDefinitionSchemapointer stays(see "Ports & networking" in Part 3)(auto-hops port if taken)and(see Ports & networking)Then raised by the measured remainder (bytes, because
ceil(utf8 bytes / 4)is the convention; theSKILL.mdcount excludes its 20-byte release-stamp line):SKILL.mdevals/config-plugins-ops.jsonBoth rows are pinned AT the measurement (headroom 0). No other row of the script is touched.
Tests
Spec parse probe — the six shapes the section describes, against the built `@objectstack/spec` (`dist/index.mjs`), exit 0
No TypeScript changed, so no package
test/typecheckis owed; the newtypescriptblock is a fragment (notos:check-marked), andcheck:skill-examplesstill type-checks the package's marked blocks (below). Dogfood battery: n/a — no!in the title and no(narrowing)arm.Acceptance notes
SKILL.md(the routing file, loaded first) rather thanreferences/bootstrap.md: the failure the card names happens while writing seed data, andSKILL.mdis where the package's Seed Data section and its onlydevLoginsmention sit. The dispatch order allowed either.references/_index.mdis generator-owned;check:skill-refsreports it in sync, so it is not touched.Metadata-protocol: none⇒ noSkills-docs:line is owed.packages/spec/src/system/dev-login.zod.tscarries threeguidancestrings telling the author to "seed the account itself indata" / "Seed the user record in the stack'sdatafixtures", whiledemo-staff.zod.tssays asys_userrow written throughdatais refused (ADR-0092) — the refusal prescription points at a write the runtime refuses. Reported to the seat in the os-dev report; not reproduced with a boot here.os-warrenauthor override instead of the clone's configuredClaudeidentity; the branch is a harness-owned thread branch, so it was not rewritten. Reported as a deviation.Verification
Derived with
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackon the branch tree (54 families; the derived set is identical before and after the merge oforigin/mainat5507225e), each command run locally with its exit code captured before any pipe, then reconciled.dispatch-gates --ranat headf0926209: 54 derived families accounted for — 53 run (exit 0), 1 NOT-MEASURED, 0 UNRUN. The one NOT-MEASURED ispnpm check:dual-build-cjs-loads, recorded exit 3 (PREREQUISITE NOT MET: it needs every package'sdist), so CI's run is its reading.Readings
f0926209:node scripts/check-skills-token-ratchet.mjsexit 0 — "81 authored bundle file(s) within their ceilings";objectstack-platform/SKILL.md5981 / 5981 (headroom 0),evals/config-plugins-ops.json1458 / 1458 (headroom 0);--self-testexit 0 (79 cases).pnpm --filter @objectstack/spec check:skill-docsexit 0 ("Skill docs in sync");check:skill-refsexit 0 ("9 generated files in sync with packages/spec");check:skill-examplesexit 0 ("264 prose examples type-check across 3 surface(s)"). The latter two sit outside the derived set and were run for the card's acceptance line.01d2b0f8, whose diff againstmainis byte-identical to the merged head's (the merge brought other packages' ratchet rows and unrelated files): every exit 0, includingpnpm check:pm-dispatch-gates(run detached),pnpm --filter @objectstack/lint run check:doc-formula-expressionsandpnpm check:lean-entry-closure.scripts/pm/os-verify-lock.sh(slotissue-26302):pnpm --filter '@objectstack/client-react...' buildVERDICT command-exit 0 (265 s held), which is what letscheck:skill-examplestype-check the client blocks.test/typecheck(no TypeScript changed);test:repo,pnpm lintand the whole-tree scans are CI's.Human Minimum
packages/specholds no runtime logic. (no schema touched)pnpm lintis CI's whole-tree run.main, one pull request.skills/**has nopackage.json;skip-changeset); both declaration lines are above.packages/specnot touched.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code