Repository navigation
docs(skills): the objectstack-platform demoStaff example teaches the manager key - #26852
Conversation
…manager key The Demo accounts section names a line manager in its example and says what the key does: `manager` is another entry's `email`; the development boot writes `sys_user.manager_id` itself once every account exists and keeps one set by hand, so no seed hook writes it; a display name, an address no entry has, the entry itself or a loop is refused at load. One eval case expects the key and forbids a seed writing `manager_id`. Paid under the standing ruling on these two token-ratchet rows: four restatements cut from SKILL.md (each rule keeps its other home), so that row follows the measurement down 5997 -> 5966; the eval file carried no duplicate, so its row rises by the whole addition 1469 -> 1690. Patch changeset for @objectstack/skills. Claude-Session: https://claude.ai/code/session_01ADHkmTMombCWi6iByM4RdD Co-authored-by: Claude <noreply@anthropic.com>
…r clause check:skill-top-level-keys quotes "the top level refuses it and the stack fails to load" as the page's contract and its self-test pins that the page carries it, so the sentence stays; only its sample refusal output is the duplicate cut. The new manager clause says `manager_id` without its table prefix so the priced text lands inside the ceiling; the row re-pins at the measurement, 5997 -> 5996. Claude-Session: https://claude.ai/code/session_01ADHkmTMombCWi6iByM4RdD Co-authored-by: Claude <noreply@anthropic.com>
… by the remainder The seat's review: the clause "do not add sys_metadata objects to an environment runtime manifest" has its only other home in references/plugin-development.md, which a reader generating objectstack.config.ts never opens, so it comes back. Three restatements stay cut (-257 B) against the +332 B addition; the priced text lands at 24055 bytes -> 6014 tokens and the row moves 5997 -> 6014, the measured remainder under the standing ruling, with the arithmetic in its comment. Claude-Session: https://claude.ai/code/session_01ADHkmTMombCWi6iByM4RdD Co-authored-by: Claude <noreply@anthropic.com>
席位核对ACCEPT ·
|
Contract reviewServed-tier: Director seat (summon #52, ledger objectstack#12708), summoned by the ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Implemented-by: VERDICT: PASS Generated by Claude Code |
Requested by Steve · project thread
Fixes #26764
Clause-②: no
Metadata-protocol: none
维护者速读
objectstack-platform技能的「Demo accounts」一节,示例里给演示账号写上直属上级manager(填同列表另一条目的 email),正文一句话讲清它怎么解析、哪些写法在加载时被拒、以及os dev自己写manager_id并保留手工设过的上级;eval 文件加一例(第 8 例)。两行 token 棘轮按实测重钉(SKILL.md 先削三处重述再按余额 +17,eval +221),@objectstack/skillspatch changeset。demoStaff加了manager键,但技能没教;照技能写 demo 的 AI 不知道这个键,可能自己写 seed hook 去填manager_id,或拿显示名当 manager,到加载时才被拒。skills/objectstack-platform/SKILL.md§ Demo accounts(示例与新句子);②scripts/check-skills-token-ratchet.mjs两行 row 注释里的算术;③evals/config-plugins-ops.json第 8 例。node scripts/check-skills-token-ratchet.mjs | grep objectstack-platform/应见SKILL.md is 6014 tokens (ceiling 6014; headroom 0)与config-plugins-ops.json is 1690 tokens (ceiling 1690; headroom 0)。skills/**为 Tier H,席位不 ready / 不 arm / 不入队)。What changes
skills/objectstack-platform/SKILL.md§ Demo accounts —demoStaffvsdevLogins. The example gains a second entry (Legal Lead) andLegal Counsel 1names it withmanager: 'lead@example.com', so the example is a stack the platform accepts (amanagernaming no entry is refused). The prose adds one clause, read offorigin/main0ea90c7a:Each half has its source:
email, compared without regard to case —packages/spec/src/system/demo-staff.zod.ts(manager: z.string().email(...), its TSDoc) andcollectDemoStaffManagerErrorsinpackages/spec/src/stack.zod.ts;.email('A demo account's manager is named by the email of another demoStaff entry, not by its name')); no entry / self / loop are refused bydefineStackwithSTACK_CROSS_REFERENCE_INVALID422 (stack-demo-staff.test.ts, themanager —describe);manager_idonce every entry has its account, before the seed, and a manager already set is kept —linkDemoStaffManagersinpackages/plugins/plugin-auth/src/demo-staff.ts(the second pass;managersKept).Not taught, on purpose: the alias list (
reportsTo,managerEmail,managerId,supervisor→ refused namingmanager), which the schema's refusal already says, and the set-manager write's own refusals (depth, cross-organization, directory-owned), which are reported with theircodeandreasonat boot.skills/objectstack-platform/evals/config-plugins-ops.json. Case 8: a demo account that reports to another; expectedmanager: 'counsel1@example.com'on the subordinate'sdemoStaffentry and nothing else,os devwritingmanager_iditself.must_contain:demoStaff,manager: ',os dev;must_not_contain:manager_id:(a seed row or hook writing the column),reportsTo:. The file is hand-formatted (inline assertion arrays) and was spliced, not re-serialised;JSON.parsereads 8 cases.scripts/check-skills-token-ratchet.mjs. The two rows re-pinned at the measurement, each with the arithmetic and both notes in its comment (triage 6448202744, spec-seat note 6445537040, the standing ruling 「A:先削重复,余额按实测提高」):SKILL.md(priced = bytes − the 20-byte stamp line)evals/config-plugins-ops.jsonskills/objectstack-platform/**(ratchet report,_index.mdgenerator-owned and excluded)skills/*/SKILL.mdBoth readings are against
origin/main0ea90c7a(the merge base) and this branch's head.The SKILL.md arithmetic, in bytes, per
git diff -U0hunk against the merge base: cuts 127 + 101 + 29 = 257; additions 87 (example) + 245 (prose) = 332; net +75 bytes, so the priced text is 23980 → 24055 bytes and the row moves 5997 → 6014: the 2 tokens of headroom absorbed and the measured remainder (+17) raised under the standing ruling, pinned at the measurement. The eval file's seven fixtures share no sentence (0 bytes of duplicate), so its remainder is the whole addition, +885 bytes..changeset/26764-demo-staff-manager-skill.md—@objectstack/skillspatch; the package'sdistis synced fromskills/**(packages/skills/scripts/sync-catalog.mjs), so the change publishes.Why
#26764: PR #26763 (
Fixes #26616) added the optionalmanagerkey to ademoStaffentry and recordedSkills-docs: follow-up owedfor these two files, both at their token ceiling. An agent writing a demo stack from the skill was not told the key exists, so it could hand-roll a seed hook writingmanager_idor name the manager by display name, and nothing catches that until load.Acceptance notes
The three cuts and where each rule still lives (every one in the same file, read by the same reader):
TS2353). The sentence itself ("the top level refuses it and the stack fails to load") stays:scripts/check-skill-top-level-keys.mjsquotes it as the page's contract and its self-test pins that the page carries it (the first gate round, once024605, caught the cut; restored in3f46225b). −127 B.DriverPlugin (memory in dev, SQL in prod), and the drivers table. −29 B (the paragraph re-wrapped; tokens count bytes, so the re-wrap pays nothing and was not counted).A fourth cut was made and taken back on the seat's review (
02253051): thesys_metadataclause of the config-generation sentence (§ Compile Artifact, "and do not addsys_metadataobjects to an environment runtime manifest"). Its only other home isreferences/plugin-development.md, about a plugin registering those tables — a different reader from one generatingobjectstack.config.ts, who reads only SKILL.md. The +74 B is in the remainder above.No eval fixture names any cut text (
git grepof each cut phrase overskills/**andpackages/spec/scripts/**: only the SKILL.md itself). Thetypescriptfence in § Demo accounts is a fragment, unmarked forcheck:skill-examples(opt-inos:checkmarker; it has none, as before).Triage wording. Triage 6448202744 says "⛔ It does not raise the ceiling"; the seat's order and spec-seat note 6445537040 say raise by the measured remainder under ruling A, the maintainer's standing ruling on these rows, which outranks the triage line. Read together as: room is made inside the package first, and only the measured remainder moves a row. The SKILL.md row rises by +17 after three cuts; the eval row rises by exactly its addition, with no duplicate available to cut — the same path the rows' previous re-pins took.
Forced test edits: none. No test file changed.
Tests
No code changed; the suites that read these files are the gates below.
node scripts/check-skills-token-ratchet.mjs --self-test:79 cases pass, exit 0.Verification
Gate list derived with
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack(no paths; the change set is 4 paths vs merge base0ea90c7a): 64 commands. Run on head02253051from the worktree after the last commit, each with stdin closed and its exit code captured before any pipe (oneCOMMAND :: exit CODEline each), then reconciled:dispatch-gates --ran→64 derived, 64 run, 0 NOT-MEASURED, 0 UNRUN(a DERIVED zero). All 64 exit 0, among them:the families that read the changed files
node scripts/check-skills-token-ratchet.mjs—skills/objectstack-platform/SKILL.md is 6014 tokens (ceiling 6014; headroom 0),evals/config-plugins-ops.json is 1690 tokens (ceiling 1690; headroom 0),81 authored bundle file(s) within their ceilings;--self-test: 79 cases pass.pnpm check:skill-top-level-keys— self-test 14 cases pass;SKILL.md:40 enumerates all 52 authorable top-level keys.pnpm --filter @objectstack/spec run check:skill-docs(frontmatter unchanged, in sync),pnpm check:skill-compatibility,check:skill-frame-sync,check:skill-identifier-liveness,check:pm-skill-id-lint,check:doc-authoring,check:nul-bytes,check:role-word.node scripts/check-empty-changeset.mjs --base origin/main,check-changeset-no-major.mjs --base origin/main,check-adr-0087-registration.mjs --base origin/main,pnpm check:pm-changeset-deadline-census,check:changeset-gate-self-tests.pnpm check:ratchet-remedy-authority,check:scripts-symbol-anchors,check:watch-hint-literal,check:self-test-wired,check:pm-dispatch-gates(the ratchet script's row comments).turbo run build --filter='./packages/**'(75/75, VERDICT exit 0):check:dual-build-cjs-loads,check:dts-closure,check:lean-entry-closure,check:published-files,check:sourcemap-no-sources-content,@objectstack/lint check:doc-formula-expressions.Round 1 (head
ce024605) was 63 of 64 exit 0:check:skill-top-level-keys --self-testred on "live tree — the real page carries the anchor and the contract sentence the drift text quotes", because the first version of cut 1 removed that sentence.3f46225brestored it and the whole list ran green there (64/64);02253051(the seat's round, thesys_metadataclause back) re-ran the whole list again (above).--tieron this diff reads MANDATORY —skills/**, clause ① (no one-line exit); the changed-line count is well under the 3000 human-merge threshold.Not run locally, CI's:
pnpm lint(repo-wide), the type-check lanes, Test Core / Test UI (no code or test file changed).Human Minimum
packages/specholds no runtime logic. (n/a — no schema touched)pnpm lintpasses. (repo-wide lint is CI's run; no.ts/.mjslogic changed, only comment rows and two ceilings)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (n/a — not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmTMombCWi6iByM4RdD