Repository navigation
docs(skills): the object enable table names aiReadable - #33458
Conversation
One row in the Object Capabilities table of the data skill: aiReadable opens read-only AI access on a platform sys_* object (never the stored-metadata family), and an app object never declares it, false included, because the parse refuses it there. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5nzn5SncinMdswdSzM
|
domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentskills/objectstack-data/SKILL.md, the new
Implemented-by: VERDICT: PASS Adopted by the seat 2026-11-14T21:42Z · isolated sub-agent at CONTRACT_REVIEW_TIER · Ruling-ref: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb, option A, tapped 2026-11-14T15:37Z |
…a objects Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5nzn5SncinMdswdSzM
|
domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb Contract review (delta)Served-tier: This is a DELTA record. It judges the move from ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentskills/objectstack-data/SKILL.md, the corrected
Implemented-by: VERDICT: PASS Adopted by the seat 2026-11-14T22:11Z · isolated sub-agent at CONTRACT_REVIEW_TIER · Ruling-ref: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb, option A, tapped 2026-11-14T15:37Z |
|
domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb 维护者速读
席位核对Verdict: ACCEPT, held for the maintainer · head
|
|
domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb Contract reviewServed-tier: This is the at-tier re-review of this head. It judges the tree on its own reading and does not rest on records 6884644527 or 6884995626; ③ says which of their findings it confirms. ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentskills/objectstack-data/SKILL.md, the
No must-fix and no should-fix. Nits alone end the round. Implemented-by: VERDICT: PASS Adopted by the seat 2026-11-15T00:28Z · isolated sub-agent at CONTRACT_REVIEW_TIER (served model verified by the seat) · Ruling-ref: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb, option A, tapped 2026-11-14T15:37Z |
|
domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb Correction: contract-review tierThe contract-review record(s) 6884644527, 6884995626 on this PR say The seat re-runs the review at |
…medFrom (objectstack-ai#33480) <!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XN1KQUNRJ7VHD5gA6zvtVHD)_ Fixes objectstack-ai#33044 domain:skills#1 · os-project-manager · session_01FEkQ5k9eHen9BJozXn3f7Q Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:`skills/objectstack-data/rules/security.md` 的「Renaming or removing a shipped access item」节末新增一段:岗位改名要在新岗位上声明 `renamedFrom: ['old_name']`,不要删了重建;启动时平台在每个组织里把旧名的持有人(`sys_user_position`)挪到新名,幂等;只挪持有人,共享规则/队列/记录共享接收方、待审批人、邀请里的旧名只在启动日志里列给管理员;列出不挪的五种情况。 - 为什么改:PR objectstack-ai#33008 给 `PositionSchema` 加了 `renamedFrom`,但对外发布的技能没教,AI 写应用时改岗位名会删了重建,所有持有人静默失去权限集。 - 风险与回滚:纯技能文本(+1 changeset),不动代码与 schema;token 天花板未抬,在同一文件里删等量的示例和旁注付账;回滚即还原本 PR。 - 先看:`skills/objectstack-data/rules/security.md` 文末新段;其次同文件的付账删减(下方表格逐条列出去处)。 - 两分钟验证:`node scripts/check-skills-token-ratchet.mjs | grep rules/security.md`,预期 `3959 / 3959`,exit 0。 - 需要你做的:受管面 Tier H(`skills/**`):请批准或合并。 ## What changes `skills/objectstack-data/rules/security.md`, § Renaming or removing a shipped access item, gains one paragraph, **Renaming a position**: - declare `renamedFrom: ['old_name']` on the renamed position, never delete and re-add (holders name a position by its bare name, so a deleted one leaves them granted nothing); - at boot the old name's holders (`sys_user_position`) move to the new name in every organization, idempotently; - holders only: the boot log lists the old name's other references (sharing-rule, queue and record-share recipients, pending approvers, invitations) for an administrator; - not carried, warned: an old name still a position anywhere, claimed twice, recorded under another package, switched off, or a disabled claimant. One changeset, `.changeset/33044-skills-position-renamed-from.md`, `'@objectstack/skills': patch`. ### Paid in place (token ceiling unchanged) `rules/security.md` was 15828 bytes (3957 tokens, ceiling 3959, headroom 2) on the merge base `34c05229`; it is now 15834 bytes, 3959 tokens, headroom 0. The card carries no maintainer words that order the text, so no raise; the new paragraph is paid by deletions in the same file: | Cut | Where the fact still lives | |---|---| | `(ADR-0090 D12)` after the delegated-admin clause | ADR-0090 | | `(explaining another user needs manage_users)` | an operator detail of the explain door, not an authoring rule; its contract is `packages/spec/src/security/explain.zod.ts` | | `(no read on the roster needed)` on membership keys | "as a system read" in the same sentence says it | | the `com.acme.crm` / `hd_agent` example of `outside-closure` | eval `hooks-security-seeds-datasources.json` asks exactly this scenario; the rule sentence stays | | the `hr` / `ops` / `auditor` example of `ambiguous-in-closure` | illustrative; the install refusal of a second shipper is KEPT (that eval expects it) | | `Ciphertext lives in sys_secret, only an opaque ref on the row.` | `rules/field-types.md` `secret` row (encrypted at rest, masked, fail-closed, ADR-0100) | | `e.g. identity tables a plugin writes via its own adapter (sys_sso_provider, OAuth clients)` and `(adapter-written rows often lack it)` | plugin-internal; the rule (a null `organization_id` row is denied) stays | | `— the list renders empty` | UI symptom of the denial stated beside it | | `an app-declared default profile, a customer-authored set` | "any set with a wildcard read grant" states the rule; `viewer_readonly` and the `member_default` contrast stay | Whole-file reading: 327 → 329 lines, 3957 → 3959 tokens. Whole-package reading (every `skills/**/SKILL.md`): unchanged, no `SKILL.md` is touched (4602 lines at the merge base). ## Acceptance notes Every claim in the paragraph was read from the code on `origin/main` (`34c05229`): | Claim | Read from | |---|---| | `renamedFrom` is a list of earlier position names | `packages/spec/src/identity/position.zod.ts` (`renamedFrom`, its JSDoc and `.describe`) | | own name / repeated entry refused at parse; still-declared and claimed-twice refused per collection | `packages/spec/src/identity/position-renamed-from.ts` (`refuseSelfRenamedFrom`, `refuseDishonestPositionRenamedFrom`) | | moves holders at boot, as the system, every organization, `position` column only, idempotent | `packages/plugins/plugin-security/src/position-renamed-holder-carry.ts` header § What it does | | the six boot refusals (`claimed-twice`, `claimant-disabled`, `still-declared`, `held-by-other`, `owned-by-other`, `switched-off`), each logged at `warn`, holders left | same file, `PositionRenameRefusal` and `logPositionRenameCarry` | | other references named, never rewritten: sharing-rule, queue-member and record-share recipients, pending approver slots, pending invitations, activation-ledger rows | same file, header § What it names and never writes, and the `leftBehind` warning | | deleting the position leaves holders granted nothing | same file, header § Why | - The code also carries after a marketplace hot install or upgrade (`metadata:reloaded`, objectstack-ai#33238); the paragraph says "at boot" only, which always holds, since a reload carries a narrower scope and some install doors do not announce a reload. - Not taught (detail an author does not act on): a holder who already holds the new name keeps both rows and is warned; a failed row write is retried at the next boot. - Serial constraints held: this PR does not touch `skills/objectstack-data/evals/objects-fields-relationships.json` (PR objectstack-ai#33394) or `skills/objectstack-data/SKILL.md` (PR objectstack-ai#33458). No eval added: no existing eval asks about renaming a position. ## Verification <details><summary>Derived gates on head 47d3f8e (42 of 44 exit 0, 2 NOT MEASURED)</summary> `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 44 commands; each ran with its exit captured before any pipe. `--ran`: "44 derived famil(ies) accounted for — 42 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)". `check:doc-formula-expressions` ran after `turbo run build --filter=@objectstack/formula --filter=@objectstack/lint` under the lock (VERDICT command-exit 0). `check:dual-build-cjs-loads` and `check:lean-entry-closure` read every package's `dist/` and exit 3 without a full build; this diff touches no package, so no build closure is owed and CI measures them. ``` node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0 node scripts/check-adr-0087-registration.mjs --self-test :: exit 0 node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0 node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 node scripts/check-doc-route-spelling.mjs --advisory :: exit 0 node scripts/check-doc-route-spelling.mjs --self-test :: exit 0 node scripts/check-dts-emitted.mjs --self-test :: exit 0 node scripts/check-empty-changeset.mjs --base origin/main :: exit 0 node scripts/check-empty-changeset.mjs --self-test :: exit 0 node scripts/check-skills-token-ratchet.mjs :: exit 0 node scripts/check-skills-token-ratchet.mjs --self-test :: exit 0 node scripts/ci/assert-turbo-remote-cache.mjs --self-test :: exit 0 node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0 node scripts/ci/prune-turbo-cache.mjs --self-test :: exit 0 node scripts/ci/snapshot-next.mjs --self-test :: exit 0 node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0 node scripts/release-pending-publish.mjs --self-test :: exit 0 pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0 pnpm check:agent-test-spelling :: exit 0 pnpm check:changeset-gate-self-tests :: exit 0 pnpm check:ci-filter-parity :: exit 0 pnpm check:closed-ceremony-text :: exit 0 pnpm check:corpus-claim-drift :: exit 0 pnpm check:cross-package-test-inputs :: exit 0 pnpm check:doc-authoring :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:dts-closure :: exit 0 pnpm check:dual-build-cjs-loads :: exit 3 pnpm check:gitlink-declared :: exit 0 pnpm check:lean-entry-closure :: exit 3 pnpm check:nul-bytes :: exit 0 pnpm check:pm-governed-merges :: exit 0 pnpm check:pm-skill-id-lint :: exit 0 pnpm check:published-files :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:role-word :: exit 0 pnpm check:skill-compatibility :: exit 0 pnpm check:skill-frame-sync :: exit 0 pnpm check:skill-identifier-liveness :: exit 0 pnpm check:skill-links :: exit 0 pnpm check:sourcemap-no-sources-content :: exit 0 pnpm check:watch-hint-literal :: exit 0 node scripts/pm/check-skill-line-ratchet.mjs :: exit 0 ``` `check:dts-closure` and `check:sourcemap-no-sources-content` exit 0 over the packages built here only (formula, lint and their closure). </details> <details><summary>Tier and governed-merge verdicts</summary> - `dispatch-gates --tier`: MANDATORY contract-review tier for `skills/**` (no one-line exit). This card thread ran on the claim's default tier; named as a deviation in the report, and the seat's in-seat contract review at tier is the owed record. - `check-governed-merges.mjs --branch claude/project-thread-6ouxnr`: exit 3, GOVERNED, landing tier H (人合), `skills/** ×1`; 52 changed lines, under the 3000 threshold. - Changeset: `'@objectstack/skills': patch` (`skills/**` ships in `@objectstack/skills`). </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01FEkQ5k9eHen9BJozXn3f7Q)_ <!-- signed: domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…and refuses by code (objectstack-ai#33488) <!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XGXLb9PDJwB4m9YQYXKR1Y1)_ Fixes objectstack-ai#33257 domain:skills#1 · os-project-manager · session_01FEkQ5njvc1ya6PypTHRBe5 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:`objectstack-data` 技能的 hook 参考文档「Declared refusals」一节,开头改为一条规则:执行业务规则的 hook 声明 `refusals` 目录、每条规则一个代码、body 抛出该代码;没有目录时随手抛的文字错误会被平台答成 `HOOK_ABORTED`,只适合意料之外的失败。示例换成跨对象状态守卫「只有在库资产才能借出」(`ASSET_NOT_IN_STOCK`,409),并写明今天只有沙箱 `js` body 能声明 `refusals`,`handler` 写法(含内联 TS)保存时被拒。`rules/validation.md` 里指向该文档的税号 hook 示例同步改为声明 `TAX_ID_BLOCKED` 并抛代码。 - 为什么改:一次画廊场景实测里,AI 用 hook 正确拦下了「维修中的资产借出」,但抛的是无代码的文字错误,线上得到平台通用的 `HOOK_ABORTED`,用户与 agent 都拿不到有意义的代码和译文;技能原文的验证规则示例恰好教的就是这种写法。 - 风险与回滚:纯技能文字,两文件 +47 / -29 行,token 在各自文件内用删除重复内容付清,未抬任何上限;不动 schema、不动运行时;回滚即还原本 PR。 - 先看:`skills/objectstack-data/references/data-hooks.md` 的「Declared refusals」一节;再看 `skills/objectstack-data/rules/validation.md` 的税号 hook 示例。 - 两分钟验证:`git diff origin/main -- skills/`,预期新示例声明 `refusals: { ASSET_NOT_IN_STOCK: … status: 409 }` 并 `throw Object.assign(new Error(), { code: 'ASSET_NOT_IN_STOCK' })`,税号示例不再有 `throw new Error('Tax ID is blocked')`。 - 需要你做的:受管面 Tier H(`skills/**`):请批准或合并。 ## What changes - **`skills/objectstack-data/references/data-hooks.md` § Declared refusals** opens with the rule the card asks for: a hook that enforces a business rule declares a `refusals` catalogue, one SCREAMING_SNAKE code per rule, and its body throws the code. Without a catalogue, a throw is answered `HOOK_ABORTED`, the platform's code, which suits a failure nobody planned and not a rule the user can act on. - The section's example (two single-object codes, `CREDIT_LIMIT` / `ON_HOLD`, as an unchecked fragment) is replaced by the card's case as a full `os:check` hook: `checkout_requires_stock`, a `beforeInsert` on `asset_checkout` that reads the asset through `ctx.api` (`api.read`) and throws `ASSET_NOT_IN_STOCK` (declared at 409) unless the asset's status is `in_stock`. It fails closed: a checkout with no `asset_id` or an unknown id is refused too (probed below); an asset the saver cannot read finds nothing, so it is refused the same way (read, not probed). - Which hook forms can declare `refusals` on `main` today: only a sandboxed `js` `body`; a `handler` hook, an inline TS function included, is refused (bullet replaces "Refused at save without a `js` body (e.g. a bare `handler`)"). Nothing objectstack-ai#33214 would add is taught. - What reaches the wire: the status's registered `code` (default 400), with the hook's code as `declaredCode` (bullet replaces "the envelope carries one as `declaredCode`"). - The Error Handling intro now says `onError` gives no code; Best Practices' "give a thrown error a message the caller can act on" becomes "refuse a business rule by a declared code", linking the section. - **`skills/objectstack-data/rules/validation.md` § External / Custom Validation → Lifecycle Hooks**, the hook rule that points to `data-hooks.md`: the pointer sentence says the body "throws a declared code" (linked to the section) instead of "throws on failure", and its `os:check` tax-ID hook declares `refusals: { TAX_ID_BLOCKED: { message: 'This tax ID is blocked.' } }` and throws that code instead of `throw new Error('Tax ID is blocked')`, which is exactly the `HOOK_ABORTED` shape the card measured. This file was outside the order's expected surface; the seat approved it in its thread before the edit (pointer sentence plus the example's two lines). - **`.changeset/33257-skills-hook-refuses-by-declared-code.md`**: `'@objectstack/skills': patch`, carrying both declaration lines. ## Why The card's measured build (gallery debut refresh 2026-11-14, card `asset_lifecycle`, recorded build `2026-11-14-scenario-asset_lifecycle.json`, cited and not re-run: a live run needs the maintainer's word, per the order) enforced "only an in-stock asset can be checked out" with a sandboxed hook that declared no `refusals`; the probe write was refused `HOOK_ABORTED` (400), a platform code. The skill taught the catalogue only as a mechanism, not as the rule for business refusals, and `rules/validation.md` taught the free-text throw outright. Mechanism, read on `origin/main` `b5f2f516`: - `packages/spec/src/data/hook.zod.ts`: `HookSchema.refusals` is a record keyed by a SCREAMING_SNAKE code of `HookRefusalSchema` (`message`: plain text, a `{{ }}` hole refused; `status`: 400 to 499, absent means 400). `refuseUndeclaredLiteralRefusalCode` refuses `refusals` on a hook whose `body.language` is not `js` (message from `hookRefusalsWithoutSandboxedBody`, `packages/spec/src/data/hook-refusal-codes.ts:201`), and refuses a literally thrown code the catalogue does not declare. - `packages/runtime/src/sandbox/hook-refusal-catalogue.ts` `resolveHookRefusal`: a body throw carrying a declared code is answered with the entry's message (translated through `hooks.HOOK.refusals.CODE.message` in the caller's locale) as `userMessage`, the entry's status (default `DEFAULT_HOOK_REFUSAL_STATUS` 400) and the code; an undeclared code, or none, becomes a sandbox fault (500); host-relayed errors and crashes pass through. - `packages/types/src/thrown-http-error.ts` `resolveThrownHttpError`: a code outside the ADR-0112 ledger resolves the wire `code` from the status (`standardErrorCodeForHttpStatus`: 400 `VALIDATION_ERROR`, 409 `RESOURCE_CONFLICT`) and keeps the thrown code as `declaredCode`. A sandbox business throw with no code at a 4xx is answered `UNDECLARED_HOOK_REFUSAL_CODE` = `HOOK_ABORTED` (ledger row in `packages/spec/src/api/error-code-ledger.zod.ts`). So `HOOK_ABORTED` does not come from `onError: 'abort'` as such: `onError: 'abort'` (the default) only makes the throw abort the write; the code comes from the throw carrying none. ## Acceptance notes - Ask item 2 (an authoring rule or lint that a hook whose body refuses on a business condition carries `refusals`) is not built here; the order rules it a proposal in the report. Proposed there with the four-axis reading. - The ratchet row for `data-hooks.md` is left at 10011 with 2 tokens of headroom and `validation.md` at 2761 with 1; no ceiling moved in either direction (`scripts/` is outside this card's surface). - Other teaching of the free-text throw in `skills/` was not swept beyond the two files the card names; the order's serial constraints keep `objectstack-data/SKILL.md` (PR objectstack-ai#33458), the data evals file (PR objectstack-ai#33394) and `rules/security.md` (card objectstack-ai#33044) untouched. ## Verification Head `47af59e9`, base `origin/main` `b5f2f516`. <details><summary>Both new examples run in the real runtime (scratch probe, not committed)</summary> A throwaway vitest file in `packages/runtime/src/sandbox/`, on the harness of `overlap-hook-template.integration.test.ts` (real `ObjectQL`, SQLite driver, `QuickJSScriptRunner`, `bindHooksToEngine`, answers read off `mapDataError`), each hook passed through `HookSchema.parse` first. Run after building runtime's dependency closure under the verify lock (VERDICT command-exit 0); then deleted (`git status` clean). Result: Test Files 1 passed, Tests 3 passed, exit 0. - `checkout_requires_stock`: an in-stock asset checks out; an `in_repair` asset, a checkout with no `asset_id`, and an unknown id each answer `409 {"error":"Only an in-stock asset can be checked out.","code":"RESOURCE_CONFLICT","declaredCode":"ASSET_NOT_IN_STOCK","userMessage":"Only an in-stock asset can be checked out."}`; one checkout row stored. - `crm_tax_id_blocklist_check` (new shape): `400 {"error":"This tax ID is blocked.","code":"VALIDATION_ERROR","declaredCode":"TAX_ID_BLOCKED","userMessage":"This tax ID is blocked."}`. - The old tax shape (free text, no catalogue): `400 {"error":"Tax ID is blocked","code":"HOOK_ABORTED"}`, the card's symptom. - `HookSchema.safeParse` of a hook with `refusals` and a string `handler`, and with an inline function `handler`: both `success: false`, one issue at `refusals` ("`refusals` is answered only for a sandboxed `body` (`language: 'js'`) ..."). </details> <details><summary>Line and token budget (skills/**)</summary> - `skills/objectstack-data/references/data-hooks.md`: 884 to 893 lines; tokens 9962 to 10009 (ceiling 10011, headroom 2). Paid in the same file: the protocol-17 history sentence under "An unevaluable condition ABORTS" (its point is restated by the paragraph after it), that paragraph shortened, and the old fragment example. - `skills/objectstack-data/rules/validation.md`: 331 to 330 lines; tokens 2754 to 2760 (ceiling 2761, headroom 1). Paid by deleting the "Date range validation" line from Common Script Patterns, which restates the `date_range` `cross_field` example in the same file. - Whole package, all `skills/*/SKILL.md`: 4603 to 4603 lines (no SKILL.md touched). Bundle total (whole shipped tree): 244659 to 244712 tokens. - `node scripts/check-skills-token-ratchet.mjs`: exit 0. `node scripts/pm/check-skill-line-ratchet.mjs`: exit 0 (neither file is on its register). No ceiling raised. </details> <details><summary>Derived gates: 45 derived, 44 run green, 1 NOT MEASURED</summary> `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 45 families for the three paths. All run on head `47af59e9`, exit captured before any pipe, after building `@objectstack/lint...`, `@objectstack/client-react...` and `@objectstack/runtime^...` under the verify lock (VERDICT command-exit 0, 320s): - 44 exit 0, among them `check-skills-token-ratchet` (scan and `--self-test`), `check-adr-0087-registration`, `check-changeset-no-major`, `check-empty-changeset`, `check:doc-authoring`, `check:skill-links`, `check:skill-identifier-liveness`, `check:skill-frame-sync`, `check:corpus-claim-drift`, `check:nul-bytes`, `check:pm-skill-id-lint`, `@objectstack/lint check:doc-formula-expressions`, `@objectstack/spec check:skill-refs`, `check:dts-closure`, `check:lean-entry-closure`, `check:sourcemap-no-sources-content`. - NOT MEASURED, exit 3 PREREQUISITE NOT MET: `check:dual-build-cjs-loads` (reads every package's dist; no package source is touched, so no full build was paid locally; CI builds and runs it). - `--ran` reconciliation: "45 derived famil(ies) accounted for — 44 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)". - Extra, not derived: `pnpm --filter @objectstack/spec check:skill-examples` exit 0, "346 prose examples type-check across 3 surface(s)", which covers the new and the edited `os:check` blocks. - CI families are read from this PR's check-runs, not re-run here. </details> <details><summary>Tier and governed readings</summary> - `dispatch-gates --tier`: MANDATORY contract-review tier, both `skills/**` paths under clause ① (the published catalog); no one-line exit for this surface. - `node scripts/pm/check-governed-merges.mjs --branch claude/project-thread-g605co`: exit 3, GOVERNED, landing tier H (人合). 2 of 3 paths hit the register (`skills/**` x2); the changeset is not on it. Size +47 / -29, under the 3000 threshold. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01FEkQ5njvc1ya6PypTHRBe5 ## Round 1 (head `652a4a09`, after contract review 6885289276) - **Delete guard (S1):** `data-hooks.md` Common Patterns "1. Preventing Deletion (sandboxed `body`)" now declares `refusals` `STRATEGIC_ACCOUNT` (400) and `OPEN_OPPORTUNITIES` (409) and throws each by code. The second message drops the count, because a catalogue message takes no parameters. - **Wording (N1, N2):** "a `body`'s throw is answered `HOOK_ABORTED`"; `onError` "gives no code of the hook's own". - **Paid in place:** the "Because the VM only holds a snapshot…" paragraph (restated elsewhere in the file) and "(declared, never produced)" in the `ctx.session` row. - **Figures:** data-hooks.md 884 → 892 lines, 9962 → 10004 tokens (ceiling 10011); validation.md 2760/2761, unchanged. No ceiling moved. - **Verification on `652a4a09`:** 45 derived gates, 44 exit 0, 1 NOT MEASURED (`check:dual-build-cjs-loads`). Scratch runtime probe, 4 passed: the guard answers 400 `VALIDATION_ERROR` with `declaredCode: STRATEGIC_ACCOUNT`, then 409 `RESOURCE_CONFLICT` with `declaredCode: OPEN_OPPORTUNITIES`, and deletes an account whose only opportunity is closed. <!-- signed: domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…owner_id (objectstack-ai#33555) <!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XACQi5GZRKaJH4A4nUXpUQP)_ Fixes objectstack-ai#33506 domain:skills#1 · os-project-manager · session_01FEkQ5ocBJgBm6Bz2yqoibS Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:objectstack-data 技能的「Record owner」规则写明:需求里的负责人、处理人、assignee、owner 就是平台注入的 `owner_id`,不另建字段;只有需求明确区分「负责人」和另一位处理者时才加一个 `user` 字段,且标签不得与对象上任何可见字段重名(点名注入列 `owner_id` Owner/负责人、`created_by` 创建人、`updated_by` 更新人、`created_at`、`updated_at`),并说明它不授予访问权。快速模板里的工单示例去掉了 `assigned_to` 字段,新增 eval 19(工单应用 + 负责人)。 - 为什么改:staging 上 AI 搭建的工单应用多建了一个标签也叫「负责人」的 `assignee` 字段,表格两列「负责人」、看板重复显示,而只有 `owner_id` 决定记录可见性。技能里的快速模板正好教了一个 `assigned_to` 用户字段。 - 风险与回滚:只改对外发布的技能文字和一条 eval,无代码、无契约改动;`@objectstack/skills` patch。回滚即还原本 PR。 - 先看:`skills/objectstack-data/SKILL.md` 的 Record owner 行;`references/examples-objects.md` 快速模板的 `// assignee` 行;`evals/objects-fields-relationships.json` 的 id 19。 - 两分钟验证:`node scripts/check-skills-token-ratchet.mjs | grep objectstack-data/SKILL.md`,预期 `6657 tokens (ceiling 6665; headroom 8)`。 - 需要你做的:审阅并合并(`skills/**` 属 Tier H,需你亲手合并或授权批准)。 ## What changes All in `skills/objectstack-data/` (one owner file for the rule, two cross-references, one eval): - **`SKILL.md`, Relationship Patterns → Record owner row (the rule).** The row already said "never a hand-added owner / person in charge lookup". It now says the same `owner_id` answers a request's assignee, 负责人 or 处理人, and that a handler the request names apart from the owner is a `user` field that grants no access, with a label no other visible field carries, the injected columns included: `owner_id` (Owner, 负责人), `created_by` (创建人), `updated_by` (更新人), `created_at` (创建时间), `updated_at` (更新时间). The Field Type Selection bullet drops `assignee` from its `user`-field examples so the two places no longer disagree. - **`references/examples-objects.md`, Quick-Start Template (cross-reference 1).** The `support_case` template declared `assigned_to: { type: 'user' }` beside the injected `owner_id`: the exact shape the staging build produced. It is replaced by the comment `// assignee: the injected owner_id`. - **`rules/field-types.md`, `user` row (cross-reference 2).** The example list reads `(reviewer, watchers)` instead of `(assignee, watchers)`; same byte count. - **`evals/objects-fields-relationships.json`, eval 19** (and one README phrase). The prompt asks, in Chinese, for a ticket app whose 负责人 can be reassigned. It expects `owner_id` reused and must not contain `assignee:`, `assigned_to:` or `label: '负责人'`. The label set is measured, not guessed: `packages/spec/src/data/injected-system-column-provenance.ts` defines the injected columns (`owner_id` label `Owner`, not hidden; `created_at`, `created_by`, `updated_at`, `updated_by` not hidden; `organization_id`, `owning_business_unit_id`, `queue` hidden), and `SYSTEM_FIELD_LABELS` in `packages/spec/src/system/i18n-resolver.ts` serves their zh-CN labels (`owner_id` → 负责人, `created_by` → 创建人, `updated_by` → 更新人, `created_at` → 创建时间, `updated_at` → 更新时间). ## Acceptance notes - **No build check exists today.** `git grep` over `packages/lint/src`, `packages/spec/src`, `packages/objectql/src` and `packages/cli/src` for a duplicate- or colliding-label rule has no hit. The check is split to objectstack-ai#33545 and is not touched here. - **The objectstack-ui skill still teaches `assigned_to` as the owner column.** `skills/objectstack-ui/rules/list-views.md` has `{ field: 'assigned_to', label: 'Owner' }` and a "mine" filter on `assigned_to` (lines 53, 60, 101, 321), `rules/actions.md:44` uses it as a param, and `evals/views-apps-actions-pages.json` eval 1 answers a prompt's "owner" column with `assigned_to`. That is outside this order's surface (two cross-references); reported to the seat as a follow-up. - **Token payment, no ceiling raised.** `SKILL.md` is 6657 tokens against its 6665 ceiling (6606 on the original base `e3f0cfd4`; 6665 on today's `main`, after objectstack-ai#33458's `aiReadable` row spent the headroom round 1 had used). The new text costs about 82 tokens, all paid by deleting restatement in the same file: the `(maintainer ruling 2026-08-13)` aside; the `(ADR-0113)`, `(ADR-0061)`, `ADR-0120` and `(ADR-0146 D10)` asides; the line "Toggle system behaviours per object:" that restates its heading; the `ObjectExtensionSchema` and `PermissionSetSchema.objects.*` schema pointers (`references/_index.md` already points at `object.zod.ts` and `permission.zod.ts`); the internal constant name `BASE_FIELD_DISPLAY_WHITELIST`; "See rules/validation.md for all types and examples." (the Quick Reference list links it); and a shorter new sentence. No eval expects any of the deleted text. - **Round 2 merge (`4fccfc87`, `origin/main` `7f0e38a2`).** objectstack-ai#33586 added its own eval 18 to `objects-fields-relationships.json`; main's file is kept whole and this PR's eval follows unchanged as id 19. objectstack-ai#33589's `field-types.md` lines are intact; this PR's diff there is still only the `user` row's example word. ## Verification Changed: 6 files, +40 / -19 (head `a2d3008d`). `dispatch-gates --tier`: `Model tier — MANDATORY: claude-fable-5-2` (`skills/**`, no one-line exit). `check-governed-merges --branch`: GOVERNED, Tier H (5 of 6 paths on the register; the changeset is not), 59 changed lines, under 3000. Changeset: `.changeset/33506-skills-owner-id-for-assignee.md`, `'@objectstack/skills': patch` (`skills/**` ships in `dist/skills`). Readings against today's `main` `7f0e38a2` (lines, then tokens; the gate's count, which leaves out the release-stamp line): | File | Lines before → after | Tokens before → after (ceiling) | |:--|:--|:--| | `skills/objectstack-data/SKILL.md` | 478 → 473 | 6665 → 6657 (6665) | | `skills/objectstack-data/references/examples-objects.md` | 191 → 191 | 1723 → 1724 (1728) | | `skills/objectstack-data/rules/field-types.md` | 246 → 246 | 3206 → 3206 (3208) | | `skills/objectstack-data/evals/objects-fields-relationships.json` | 332 → 348 | eval fixture, not ratcheted | | All `skills/*/SKILL.md` together | 4593 → 4588 | 59058 → 59050 (`ceil(bytes / 4)`, stamp lines included) | <details><summary>47 derived gate families on a2d3008 (round 1 on 0249dda, same list and verdicts): 46 exit 0, 1 NOT MEASURED; `--ran` reconciliation 47 / 47</summary> Closure built first under the verify lock: `turbo run build --filter=@objectstack/lint... --filter=@objectstack/client-react...`, `VERDICT command-exit 0`. ``` node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0 node scripts/check-adr-0087-registration.mjs --self-test :: exit 0 node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0 node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 node scripts/check-doc-route-spelling.mjs --advisory :: exit 0 node scripts/check-doc-route-spelling.mjs --self-test :: exit 0 node scripts/check-dts-emitted.mjs --self-test :: exit 0 node scripts/check-empty-changeset.mjs --base origin/main :: exit 0 node scripts/check-empty-changeset.mjs --self-test :: exit 0 node scripts/check-skills-token-ratchet.mjs :: exit 0 node scripts/check-skills-token-ratchet.mjs --self-test :: exit 0 node scripts/ci/assert-turbo-remote-cache.mjs --self-test :: exit 0 node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0 node scripts/ci/prune-turbo-cache.mjs --self-test :: exit 0 node scripts/ci/snapshot-next.mjs --self-test :: exit 0 node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0 node scripts/release-pending-publish.mjs --self-test :: exit 0 pnpm check:agent-test-spelling :: exit 0 pnpm check:changeset-gate-self-tests :: exit 0 pnpm check:ci-filter-parity :: exit 0 pnpm check:closed-ceremony-text :: exit 0 pnpm check:corpus-claim-drift :: exit 0 pnpm check:cross-package-test-inputs :: exit 0 pnpm check:doc-authoring :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:gitlink-declared :: exit 0 pnpm check:merge-driver :: exit 0 pnpm check:nul-bytes :: exit 0 pnpm check:pm-governed-merges :: exit 0 pnpm check:pm-skill-id-lint :: exit 0 pnpm check:published-files :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:role-word :: exit 0 pnpm check:skill-compatibility :: exit 0 pnpm check:skill-frame-sync :: exit 0 pnpm check:skill-identifier-liveness :: exit 0 pnpm check:skill-links :: exit 0 pnpm check:watch-hint-literal :: exit 0 pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0 pnpm --filter @objectstack/spec run check:skill-docs :: exit 0 pnpm --filter @objectstack/spec run check:skill-refs :: exit 0 pnpm check:dts-closure :: exit 0 pnpm check:dual-build-cjs-loads :: exit 3 pnpm check:lean-entry-closure :: exit 0 pnpm check:sourcemap-no-sources-content :: exit 0 ``` `check:dual-build-cjs-loads` exit 3 is PREREQUISITE NOT MET (it reads every package's `dist/`; no package is touched, so no full build is owed): NOT MEASURED here, CI runs it. Outside the derivation, the edited `os:check` block was verified with `pnpm --filter @objectstack/spec run check:skill-examples` :: exit 0. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01FEkQ5ocBJgBm6Bz2yqoibS <!-- signed: domain:skills#1 · os-project-manager · session_01FEkQ5ocBJgBm6Bz2yqoibS --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Leehom · project thread
Fixes #32974
domain:skills#1 · os-project-manager · session_01FEkQ5nzn5SncinMdswdSzM
Clause-②: no
Metadata-protocol: none
维护者速读
objectstack-data技能的对象能力表(enable)加一行aiReadable:只用于平台系统对象(sys_*,不含sys_metadata、sys_metadata_history),开放只读 AI 访问(查询、取单条、聚合、describe、列表,永不写);应用对象从不声明它,连false也会在解析时被拒。enable.aiReadable,技能文字没教,AI 照着能力表写应用对象时既不知道它存在,也不知道写在业务对象上会被拒。@objectstack/skillspatch changeset;不动 schema、不动运行时;回滚即还原本 PR。skills/objectstack-data/SKILL.md第 121 行(能力表最后一行)。git diff origin/main -- skills/,预期只见能力表末尾新增aiReadable一行,默认列为—。skills/**):请批准或合并。What changes
skills/objectstack-data/SKILL.md, Object Capabilities (enable) table, one row afterclone:| aiReadable | — | Platform sys_* objects only (not sys_metadata, sys_metadata_history): read-only AI access (query, get, aggregate, describe, list; no write). App objects never declare it, false included: refused at parse |(backticks around the identifiers in the file). The Default column reads
—, notfalse: an absent key is closed, and writingfalseon an app object is itself refused, so afalsedefault would invite the one value that fails..changeset/32974-skills-enable-ai-readable-row.md:'@objectstack/skills': patch, carrying both declaration lines.Why
Read on
origin/mainba35dfd,packages/spec/src/data/ai-read-exposure.ts:aiReadExposureRefusal(objectName, enable)judges any declared value (falseincluded; only an absent orundefinedkey passes) in this order: first the stored-metadata family (isStoredMetadataBodyObject,STORED_METADATA_BODY_OBJECTS=sys_metadata,sys_metadata_history, inpackages/spec/src/kernel/stored-metadata-body-objects.ts) is refused whatever the key says; then asys_name (/^sys_/i) is accepted; every other name is refused ("is not a system object ... Remove it").ObjectSchema's refinement calls it throughrefuseMisplacedAiReadExposure(object.zod.ts), so every door that parses an object refuses it:ObjectSchema.create,defineStack,os validateand the object save door.isAiReadExposed(schema)answerstrueonly for the booleantrueon asys_*object outside that family.isAiReadExposedis read bypackages/runtime/src/domains/mcp.ts,packages/mcp/src/mcp-http-tools.tsandpackages/mcp/src/stdio-data-bridge.ts, and two platform objects declare it (sys_userinplatform-objects,sys_approval_requestinplugin-approvals). The.describetext inObjectCapabilitiessays the same as the new row.Acceptance notes
skills/objectstack-data/evals/asks for theenabletable (the onlytrackHistoryhit is amust_not_containin a lifecycle eval), andobjects-fields-relationships.jsonandrules/relationships.mdbelong to open PRs docs(skills): parent-path record-currency amounts admit no grouping; data eval for the parent-path currencyField #33394 and docs(skills): teach sharing.controlledByParent.writeRequiresMasterRead in the controlled_by_parent rules #33427 and are untouched.SKILL.mdmight sit at its token ceiling; measured headroom was 59 tokens before the row and 0 after, so no other text was cut and no ceiling moved. The review round's fix (naming the two refused objects) was paid inside the row itself (never a writetono write,An app object never declarestoApp objects never declare).Verification
Head
fa4ef05c, baseorigin/mainba35dfd.Line and token budget (skills/**)
skills/objectstack-data/SKILL.md: 477 to 478 lines, 26441 to 26678 bytes; token ratchet 6606 to 6665 (ceiling 6665, headroom 0). No ceiling raised.skills/*/SKILL.md: 4602 to 4603 lines, 235787 to 236024 bytes. Bundle total (whole shipped tree): 244310 to 244369 tokens.node scripts/pm/check-skill-line-ratchet.mjs: exit 0.node scripts/check-skills-token-ratchet.mjs: exit 0.Derived gates: 46 derived, 44 run green, 2 NOT MEASURED
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 46 families for the two paths; each was run with its exit code captured before any pipe.check-adr-0087-registration,check-empty-changeset,check-skills-token-ratchet(scan and--self-testeach),@objectstack/spec check:skill-docs,check:doc-authoring,check:nul-bytes,check:pm-governed-merges,check:published-files,check:skill-compatibility,check:skill-frame-sync,check:skill-identifier-liveness,check:skill-links.@objectstack/lint check:doc-formula-expressions: first exit 3 (no lint dist); exit 0 afterpnpm --filter "@objectstack/lint..." buildunder the verify lock (VERDICT command-exit 0, 89s; rebuilt for head fa4ef05, 73s).check:dts-closureandcheck:sourcemap-no-sources-content: first exit 3, then exit 0 after that build, sweeping only the 5 built packages, not every package'sdist/.dist/):check:dual-build-cjs-loads,check:lean-entry-closure. No package source is touched, so no full build was paid; CI builds and runs them.--ran: "46 derived famil(ies) accounted for — 44 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)".Tier and governed readings
dispatch-gates --tier: MANDATORY contract-review tier,skills/**under clause ① (the published catalog); no one-line exit for this surface.node scripts/pm/check-governed-merges.mjs --branch claude/project-thread-7ha66d: exit 3, GOVERNED, landing tier H (人合). 1 of 2 paths on the register (skills/**); the changeset is not. Size +11 / -0, under the 3000 threshold.🤖 Generated with Claude Code
https://claude.ai/code/session_01FEkQ5nzn5SncinMdswdSzM