skills(data): split security into rules/security.md under #14296 item 1 (package net −64 tokens) + DATA-B-06 - #14673

Merged
os-zhuang merged 5 commits into
mainfrom
claude/issue-14297-skills-data-security-split
Sep 2, 2026
Merged

skills(data): split security into rules/security.md under #14296 item 1 (package net −64 tokens) + DATA-B-06#14673
os-zhuang merged 5 commits into
mainfrom
claude/issue-14297-skills-data-security-split

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Part of #14297 — round 2 takes the deferred DATA-I-04 split plus DATA-B-06. The card stays open because DATA-F-07 (the defineHook() prescription) is a maintainer call parked on decision batch 3, so this PR must not carry a closing keyword for that card.

The two rulings

The three conditions, with numbers

(a) Token-neutral or negative on the package. Package = every file under skills/objectstack-data/, generated included, measured with node scripts/check-skills-token-ratchet.mjs before and after.

authored (the ratchet's own subtotal)references/_index.md (generated)package
base ca48cf3736,7361,48338,219
head b3b3cdab36,6721,48338,155
delta−640−64

Programme-level account for this package: 45,780 authored at the audit pin → 36,736 after round 1 (−9,044) → 36,672 after this PR (−64). Programme total −9,108, −19.9%.

(b) Ceiling rows — exactly two, no others.

rowbeforeafter
skills/objectstack-data/rules/security.md(no row — a discovered authored file without one is RED)2,480 (landed count, headroom 0)
skills/objectstack-data/SKILL.md13,89210,009 (landed count, headroom 0)

The entry row carried 1,339 of headroom at base, left un-re-locked by round 1; the re-lock takes all of it. git diff on scripts/check-skills-token-ratchet.mjs is those two rows and their comments — no third row moves.

(c) No added prose. Every sentence in rules/security.md is a sentence moved out of SKILL.md. The new file's only new bytes are its H1 (# Security & Access Control, 28 bytes); six moved ### headings are demoted to ## (−6 bytes). The entry gains one pointer line and one routing-table row, inside the "at most one line per moved section" allowance for six moved sections. Three sentences were deleted rather than moved — each listed below.

File map

moved section (entry, at base)linesbeforeafter
### Object-level permissions (RBAC)547–580350 tokrules/security.md## Object-level permissions (RBAC)
### Assigning a permission set to a user581–608406 tokrules/security.md## Assigning a permission set to a user
### Row-Level Security (RLS)621–672630 tokrules/security.md## Row-Level Security (RLS)
### Sensitive fields — secret type + requiredPermissions673–708321 tokrules/security.md## Sensitive fields …
### Multi-tenancy709–726167 tokrules/security.md## Multi-tenancy
### Platform-global / admin-only objects (visibility posture)727–769657 tokrules/security.md## Platform-global / admin-only objects …
### Access depth (scope-depth) — …609–620197 tokstays in SKILL.md — Leg-2 bound, see below
section lead (no object-level permissions / hooks key)541–54663 tokstays in SKILL.md — it is a rule about what ObjectSchema.create() refuses, and that belongs where objects are authored
### Cross-skill notes770–77777 tokdeleted, see below

Per-move record

findinglanding sitebeforeafter
DATA-I-04 (MOVE-TO rules/)skills/objectstack-data/rules/security.md (new)SKILL.md 12,553 tok; the Security & Access Control block is 239 lines / 2,867 tok of itSKILL.md 10,009 tok (−2,544); rules/security.md 2,480 tok; package −64
DATA-B-06 (MOVE-TO)skills/objectstack-data/SKILL.md, directly after the Skill Boundaries tablethe 9-row rules/ routing table sat at line 283 of 1,067, behind Core Concepts, the searchableFields section and Field Groupsit sits at line 40, beside the other routing construct in the file; byte-neutralSKILL.md is 40,034 bytes immediately before and immediately after the move

The Leg-2 constraint and its cost

check:skill-identifier-liveness Leg 2 registers access-scope-depth — file skills/objectstack-data/SKILL.md, heading ### Access depth (scope-depth) — the ERP "see my unit / my unit and below" axis, symbol ObjectAccessScopeSchema — and the binding is keyed by file path plus heading, so a bound heading never leaves its file. That section and its exhaustive value list (own · own_and_reports · unit · unit_and_below · org) therefore stay in the entry while the rest of the security topic moves.

The cost, stated rather than hidden: one topic now spans two files. A reader of rules/security.md gets RBAC bits, assignment, RLS, secret / requiredPermissions, tenancy and the platform-global posture; the declarative widening axis that composes with all of them is in the entry. The entry's pointer names the split so the reader is not left to discover it. scripts/check-skill-identifier-liveness.mjs is not edited by this PR.

Declared deletions (three)

Each is a duplicate the split would otherwise have carried across a file boundary, and each is inside the moved text, which is what "minus deletions" in condition (c) permits.

  1. ### Cross-skill notes (3 bullets, 77 tok). objectstack-api and objectstack-platform are already routed by the entry's own Skill Boundaries table; objectstack-formula is routed by the frontmatter and by three other entry sites (Conditional Field Rules, Field Type Selection, Linting & Generation Quality).
  2. The sharingModel four-value re-enumeration in the RLS section's owner-scoping bullet. The exhaustive table for those four values is in the entry's Required-properties block (added by round 1's DATA-F-01); after the split the parenthetical would be a second, unratcheted copy in another file. The bullet keeps sharingModel and its ADR-0056 D1 citation.
  3. Multi-tenancy's forward-pointer bullet ("Platform/env-global objects declare tenancy: { enabled: false } … see the visibility-posture recipe below"), which points at the section immediately beneath it, where the same two keys are stated and explained at length.

Premise notes

No finding was skipped as premise_false. One recorded qualification: DATA-I-04's stated rationale included "sits exactly at its ceiling, so any true addition must be paid for inside it", which round 1 already retired — at this PR's base SKILL.md measured 12,553 against a 13,892 ceiling, 1,339 of headroom. The finding's primary ground (progressive disclosure: the entry did not shrink to match the eight rules/ files it already has) is untouched, and #14568 = A ordered the split independently, so it is executed as written and the ceiling is re-locked to take the stale headroom back.

DATA-B-06's premise holds as written, with re-measured numbers: an 8-row table at line 312 of 1,216 at the audit pin is a 9-row table at line 283 of 1,067 at this base.

Gates — head b3b3cdab

The derived family is node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands re-derived after the last move against the real 4-path change set (scripts/check-skills-token-ratchet.mjs, scripts/role-word-baseline.json, skills/objectstack-data/SKILL.md, skills/objectstack-data/rules/security.md): 25 commands. Seven more were run that the derivation does not name but this change owes: the card's fence gates and the self-tests. All 32 ran under scripts/pm/os-verify-lock.sh with OS_VERIFY_LOCK_SLOT=issue-14297-r2; every exit code was captured by redirecting first and reading $? before any pipe.

31 exit 0, 1 exit 3 (NOT MEASURED). Each gate's own verdict line:

gateexitits own verdict line
node scripts/check-skills-token-ratchet.mjs032 authored bundle file(s) within their ceilings; 11 generator-owned file(s) measured, not ratcheted
node scripts/check-skills-token-ratchet.mjs --self-test064 cases pass
pnpm check:skill-identifier-liveness0Leg 1: 465 citation(s) over 42 published file(s) … Leg 2: 8 registered exhaustive section(s), 0 ledgered gap(s)
pnpm --filter @objectstack/spec run check:skill-examples0256 prose examples type-check across 3 surface(s) — every marked block parsed, so tsc ran the SEMANTIC pass on all of them
pnpm --filter @objectstack/spec run check:skill-docs0Skill docs in sync
pnpm --filter @objectstack/spec run check:skill-refs09 generated files in sync with packages/spec
pnpm check:skill-compatibility011 SKILL.md file(s) reconciled against 79 workspace packages
pnpm check:role-word0OK, no new occurrences of the reserved word
pnpm check:published-readme-links0176 outbound link(s) across 60 published markdown file(s): 0 root-relative, 0 non-canonical origin(s)
pnpm check:nul-bytes0scanned 8000 text file(s) … no raw ASCII control bytes
pnpm check:pm-skill-ratchet0CLAUDE.md is 86 lines (ceiling 86; headroom 0) — untouched, as required
pnpm check:pm-dispatch-gates0dispatch-gates self-test: 1240 cases pass
pnpm check:pm-governed-merges0243 assertions
pnpm check:skill-frame-sync04 copies of the decision frame are structurally isomorphic across 3 files
pnpm check:ratchet-remedy-authority0184 scripts swept … 12 mark the expanding remedy MAINTAINER-ONLY
node scripts/check-ci-filter-parity.mjs0all 130 declared cross-package glob(s) (92 unique) are covered
node scripts/check-cross-package-test-inputs.mjs · pnpm check:cross-package-test-inputs025 package(s) read outside themselves, all declared
node scripts/check-shard-attestation.mjs02 aggregate gate(s) count 3 declared leg(s) across 3 attesting job(s)
node scripts/pm/bare-root-worklist.mjs --self-test057 live row(s), 49 unreachable as spelled, 49 recorded verdict(s)
pnpm --filter @objectstack/lint run check:doc-formula-expressions014 predicate(s) on a statically determinable field layer judged clean
pnpm check:agent-test-spelling00 violations — 426 file(s)
pnpm check:bash32-floor026 tracked shell file(s) … name no bash 4+ construct
pnpm check:cli-command-ids0315 command-id literal(s) across 112 file(s) … all resolve
pnpm check:corpus-claim-drift0OK, no new claim sites beside a pinned spelling
pnpm check:doc-authoring0831 pinned site(s) across 231 file(s)
pnpm check:entry-guard0199 scripts/ file(s) — every entry guard goes through invoked-as.mjs
pnpm check:parse-guard0198 scripts/ file(s) — every TypeScript parse goes through ts-parse.mjs
pnpm check:pnpm-filter-targets0142/181 --filter occurrence(s) across 32 file(s) resolve
pnpm check:watch-hint-literal045 declaration(s) across 4 rostered name(s)
node scripts/check-skill-identifier-liveness.mjs --list0lists the 8 bindings; access-scope-depth still resolves in SKILL.md
node scripts/check-test-completeness.mjs3PREREQUISITE NOT MET — this gate grades a saved turbo run test log, and no log was named

check:skill-examples failed once, at exit 1, before it was measured: packages/spec/dist/**/*.d.ts is OLDER than packages/spec/src after origin/main was merged in. That is the gate refusing to compute a verdict against a stale build, not a finding. It was re-run after pnpm --workspace-concurrency=2 --filter '@objectstack/spec...' --filter '@objectstack/client-react...' --filter '@objectstack/client...' run build and is the exit 0 recorded above.

NOT MEASURED

  • node scripts/check-test-completeness.mjs — exit 3 by its own definition ("this gate exited before parsing a single summary line, so this result says NOTHING"). Not a red.
  • Repo-wide pnpm lint — narrowed to the one changed file in ESLint's population, and the narrowing is measured rather than assumed: (i) the population is read from eslint.config.mjs itself, whose one linting block is files: ['**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}'] — markdown and JSON are not members, so three of the four changed paths are outside it by the config's own declaration; (ii) pnpm exec eslint --no-inline-config --format json scripts/check-skills-token-ratchet.mjs reports 1 file linted, 0 errors, 0 warnings, exit 0; (iii) the config never enables type-aware linting (no parserOptions.project, no typed rules — eslint.config.mjs states this at :327 and a grep of every parserOptions confirms only ecmaVersion / sourceType), so this diff cannot move the verdict on any file it does not touch.
  • The always-runs CI tail (Type Check jobs, Test Core shards, Build Docs, the governed-surface guard) — CI owns those and runs them on this PR.

Follow-up for other packages (not edited here)

  • skills/objectstack-platform/SKILL.md:1212 routes a reader to "Assigning a permission set to a user" in objectstack-data. That section still exists under that exact heading, now one file deeper in rules/security.md, so nothing is broken and no gate is red; a future platform flight may want to name the file. Not touched — another package.
  • No #anchor link anywhere in skills/**, content/docs/** or packages/** points into the moved sections, so no link was rewritten. Swept for objectstack-data/SKILL.md#, and for each moved heading's slug.

Landing

Governed surface (skills/**) ⇒ this PR stays draft; review requests are the seat's step. Labels: skip-changeset (this PR releases nothing — scripts/check-empty-changeset.mjs enumerates ".github/, .claude/, skills/, docs/, content/, examples/, tests-only, and the like" as route 2, and its GREEN 3 self-test case pins a skills/**-only PR with no changeset as green) and needs:contract-review (published security-contract text — sharingModel, the permission scopes, the security lint ids, the tenant-wall posture — changes file).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1


Generated by Claude Code

DATA-I-04. The entry file carried a 239-line Security & Access Control
block; six of its seven subsections move verbatim into a new
`skills/objectstack-data/rules/security.md`. No sentence is added: the
new file's only new bytes are its H1, and the entry keeps a one-line
pointer plus one row in the routing table.
`### Access depth (scope-depth)` stays in SKILL.md. It is a registered
exhaustive section in `check:skill-identifier-liveness` Leg 2
(`access-scope-depth` -> `ObjectAccessScopeSchema`), keyed by file path
plus heading, and a bound heading never leaves its file.
Three declared deletions inside the moved text, each a duplicate that
the split would otherwise carry across a file boundary:
- `### Cross-skill notes` (3 bullets) — objectstack-api and
objectstack-platform are routed by the entry's Skill Boundaries table,
objectstack-formula by the frontmatter and by three other entry sites.
- the `sharingModel` four-value re-enumeration in the RLS bullet — the
exhaustive table lives in the entry's Required properties block.
- Multi-tenancy's forward-pointer bullet to the visibility-posture
recipe directly beneath it.
Ceilings, per the ruling's condition (b): one row for the new file
pinned at its landed count (2480), the entry row re-locked at its
landed count (13892 -> 10009). No other row changes.
Package (every file under skills/objectstack-data/, generated included):
38,219 -> 38,155 tokens, net -64.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
DATA-B-06 (MOVE-TO). The 9-row table telling an agent which `rules/`
file answers its question sat at line 283 of 1,067, behind Core
Concepts, the `searchableFields` section and Field Groups; an agent that
stops reading early never learns `rules/` exists. It now sits directly
after the Skill Boundaries table, which is the other routing construct
in the file.
Byte-neutral: the same 16 lines, moved. SKILL.md is 40,034 bytes before
and after, so the ceiling re-locked in the previous commit still holds
exactly.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
`check:role-word` went red as a ratchet-DOWN: the entry file's count
improved 2 -> 1 because the deleted `### Cross-skill notes` bullet
carried "role inheritance". The other occurrence is untouched, and the
new `rules/security.md` carries none, so no entry is added. The remedy
is the gate's own author-side one (`--update`), one shrinking line.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@os-litant@os-zhuang@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

skills(data): split security into rules/security.md under #14296 item 1 (package net −64 tokens) + DATA-B-06 - #14673

Merged
os-zhuang merged 5 commits into
mainfrom
claude/issue-14297-skills-data-security-split
Sep 2, 2026
Merged

skills(data): split security into rules/security.md under #14296 item 1 (package net −64 tokens) + DATA-B-06#14673
os-zhuang merged 5 commits into
mainfrom
claude/issue-14297-skills-data-security-split

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Part of #14297 — round 2 takes the deferred DATA-I-04 split plus DATA-B-06. The card stays open because DATA-F-07 (the defineHook() prescription) is a maintainer call parked on decision batch 3, so this PR must not carry a closing keyword for that card.

The two rulings

The three conditions, with numbers

(a) Token-neutral or negative on the package. Package = every file under skills/objectstack-data/, generated included, measured with node scripts/check-skills-token-ratchet.mjs before and after.

authored (the ratchet's own subtotal)references/_index.md (generated)package
base ca48cf3736,7361,48338,219
head b3b3cdab36,6721,48338,155
delta−640−64

Programme-level account for this package: 45,780 authored at the audit pin → 36,736 after round 1 (−9,044) → 36,672 after this PR (−64). Programme total −9,108, −19.9%.

(b) Ceiling rows — exactly two, no others.

rowbeforeafter
skills/objectstack-data/rules/security.md(no row — a discovered authored file without one is RED)2,480 (landed count, headroom 0)
skills/objectstack-data/SKILL.md13,89210,009 (landed count, headroom 0)

The entry row carried 1,339 of headroom at base, left un-re-locked by round 1; the re-lock takes all of it. git diff on scripts/check-skills-token-ratchet.mjs is those two rows and their comments — no third row moves.

(c) No added prose. Every sentence in rules/security.md is a sentence moved out of SKILL.md. The new file's only new bytes are its H1 (# Security & Access Control, 28 bytes); six moved ### headings are demoted to ## (−6 bytes). The entry gains one pointer line and one routing-table row, inside the "at most one line per moved section" allowance for six moved sections. Three sentences were deleted rather than moved — each listed below.

File map

moved section (entry, at base)linesbeforeafter
### Object-level permissions (RBAC)547–580350 tokrules/security.md## Object-level permissions (RBAC)
### Assigning a permission set to a user581–608406 tokrules/security.md## Assigning a permission set to a user
### Row-Level Security (RLS)621–672630 tokrules/security.md## Row-Level Security (RLS)
### Sensitive fields — secret type + requiredPermissions673–708321 tokrules/security.md## Sensitive fields …
### Multi-tenancy709–726167 tokrules/security.md## Multi-tenancy
### Platform-global / admin-only objects (visibility posture)727–769657 tokrules/security.md## Platform-global / admin-only objects …
### Access depth (scope-depth) — …609–620197 tokstays in SKILL.md — Leg-2 bound, see below
section lead (no object-level permissions / hooks key)541–54663 tokstays in SKILL.md — it is a rule about what ObjectSchema.create() refuses, and that belongs where objects are authored
### Cross-skill notes770–77777 tokdeleted, see below

Per-move record

findinglanding sitebeforeafter
DATA-I-04 (MOVE-TO rules/)skills/objectstack-data/rules/security.md (new)SKILL.md 12,553 tok; the Security & Access Control block is 239 lines / 2,867 tok of itSKILL.md 10,009 tok (−2,544); rules/security.md 2,480 tok; package −64
DATA-B-06 (MOVE-TO)skills/objectstack-data/SKILL.md, directly after the Skill Boundaries tablethe 9-row rules/ routing table sat at line 283 of 1,067, behind Core Concepts, the searchableFields section and Field Groupsit sits at line 40, beside the other routing construct in the file; byte-neutralSKILL.md is 40,034 bytes immediately before and immediately after the move

The Leg-2 constraint and its cost

check:skill-identifier-liveness Leg 2 registers access-scope-depth — file skills/objectstack-data/SKILL.md, heading ### Access depth (scope-depth) — the ERP "see my unit / my unit and below" axis, symbol ObjectAccessScopeSchema — and the binding is keyed by file path plus heading, so a bound heading never leaves its file. That section and its exhaustive value list (own · own_and_reports · unit · unit_and_below · org) therefore stay in the entry while the rest of the security topic moves.

The cost, stated rather than hidden: one topic now spans two files. A reader of rules/security.md gets RBAC bits, assignment, RLS, secret / requiredPermissions, tenancy and the platform-global posture; the declarative widening axis that composes with all of them is in the entry. The entry's pointer names the split so the reader is not left to discover it. scripts/check-skill-identifier-liveness.mjs is not edited by this PR.

Declared deletions (three)

Each is a duplicate the split would otherwise have carried across a file boundary, and each is inside the moved text, which is what "minus deletions" in condition (c) permits.

  1. ### Cross-skill notes (3 bullets, 77 tok). objectstack-api and objectstack-platform are already routed by the entry's own Skill Boundaries table; objectstack-formula is routed by the frontmatter and by three other entry sites (Conditional Field Rules, Field Type Selection, Linting & Generation Quality).
  2. The sharingModel four-value re-enumeration in the RLS section's owner-scoping bullet. The exhaustive table for those four values is in the entry's Required-properties block (added by round 1's DATA-F-01); after the split the parenthetical would be a second, unratcheted copy in another file. The bullet keeps sharingModel and its ADR-0056 D1 citation.
  3. Multi-tenancy's forward-pointer bullet ("Platform/env-global objects declare tenancy: { enabled: false } … see the visibility-posture recipe below"), which points at the section immediately beneath it, where the same two keys are stated and explained at length.

Premise notes

No finding was skipped as premise_false. One recorded qualification: DATA-I-04's stated rationale included "sits exactly at its ceiling, so any true addition must be paid for inside it", which round 1 already retired — at this PR's base SKILL.md measured 12,553 against a 13,892 ceiling, 1,339 of headroom. The finding's primary ground (progressive disclosure: the entry did not shrink to match the eight rules/ files it already has) is untouched, and #14568 = A ordered the split independently, so it is executed as written and the ceiling is re-locked to take the stale headroom back.

DATA-B-06's premise holds as written, with re-measured numbers: an 8-row table at line 312 of 1,216 at the audit pin is a 9-row table at line 283 of 1,067 at this base.

Gates — head b3b3cdab

The derived family is node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands re-derived after the last move against the real 4-path change set (scripts/check-skills-token-ratchet.mjs, scripts/role-word-baseline.json, skills/objectstack-data/SKILL.md, skills/objectstack-data/rules/security.md): 25 commands. Seven more were run that the derivation does not name but this change owes: the card's fence gates and the self-tests. All 32 ran under scripts/pm/os-verify-lock.sh with OS_VERIFY_LOCK_SLOT=issue-14297-r2; every exit code was captured by redirecting first and reading $? before any pipe.

31 exit 0, 1 exit 3 (NOT MEASURED). Each gate's own verdict line:

gateexitits own verdict line
node scripts/check-skills-token-ratchet.mjs032 authored bundle file(s) within their ceilings; 11 generator-owned file(s) measured, not ratcheted
node scripts/check-skills-token-ratchet.mjs --self-test064 cases pass
pnpm check:skill-identifier-liveness0Leg 1: 465 citation(s) over 42 published file(s) … Leg 2: 8 registered exhaustive section(s), 0 ledgered gap(s)
pnpm --filter @objectstack/spec run check:skill-examples0256 prose examples type-check across 3 surface(s) — every marked block parsed, so tsc ran the SEMANTIC pass on all of them
pnpm --filter @objectstack/spec run check:skill-docs0Skill docs in sync
pnpm --filter @objectstack/spec run check:skill-refs09 generated files in sync with packages/spec
pnpm check:skill-compatibility011 SKILL.md file(s) reconciled against 79 workspace packages
pnpm check:role-word0OK, no new occurrences of the reserved word
pnpm check:published-readme-links0176 outbound link(s) across 60 published markdown file(s): 0 root-relative, 0 non-canonical origin(s)
pnpm check:nul-bytes0scanned 8000 text file(s) … no raw ASCII control bytes
pnpm check:pm-skill-ratchet0CLAUDE.md is 86 lines (ceiling 86; headroom 0) — untouched, as required
pnpm check:pm-dispatch-gates0dispatch-gates self-test: 1240 cases pass
pnpm check:pm-governed-merges0243 assertions
pnpm check:skill-frame-sync04 copies of the decision frame are structurally isomorphic across 3 files
pnpm check:ratchet-remedy-authority0184 scripts swept … 12 mark the expanding remedy MAINTAINER-ONLY
node scripts/check-ci-filter-parity.mjs0all 130 declared cross-package glob(s) (92 unique) are covered
node scripts/check-cross-package-test-inputs.mjs · pnpm check:cross-package-test-inputs025 package(s) read outside themselves, all declared
node scripts/check-shard-attestation.mjs02 aggregate gate(s) count 3 declared leg(s) across 3 attesting job(s)
node scripts/pm/bare-root-worklist.mjs --self-test057 live row(s), 49 unreachable as spelled, 49 recorded verdict(s)
pnpm --filter @objectstack/lint run check:doc-formula-expressions014 predicate(s) on a statically determinable field layer judged clean
pnpm check:agent-test-spelling00 violations — 426 file(s)
pnpm check:bash32-floor026 tracked shell file(s) … name no bash 4+ construct
pnpm check:cli-command-ids0315 command-id literal(s) across 112 file(s) … all resolve
pnpm check:corpus-claim-drift0OK, no new claim sites beside a pinned spelling
pnpm check:doc-authoring0831 pinned site(s) across 231 file(s)
pnpm check:entry-guard0199 scripts/ file(s) — every entry guard goes through invoked-as.mjs
pnpm check:parse-guard0198 scripts/ file(s) — every TypeScript parse goes through ts-parse.mjs
pnpm check:pnpm-filter-targets0142/181 --filter occurrence(s) across 32 file(s) resolve
pnpm check:watch-hint-literal045 declaration(s) across 4 rostered name(s)
node scripts/check-skill-identifier-liveness.mjs --list0lists the 8 bindings; access-scope-depth still resolves in SKILL.md
node scripts/check-test-completeness.mjs3PREREQUISITE NOT MET — this gate grades a saved turbo run test log, and no log was named

check:skill-examples failed once, at exit 1, before it was measured: packages/spec/dist/**/*.d.ts is OLDER than packages/spec/src after origin/main was merged in. That is the gate refusing to compute a verdict against a stale build, not a finding. It was re-run after pnpm --workspace-concurrency=2 --filter '@objectstack/spec...' --filter '@objectstack/client-react...' --filter '@objectstack/client...' run build and is the exit 0 recorded above.

NOT MEASURED

  • node scripts/check-test-completeness.mjs — exit 3 by its own definition ("this gate exited before parsing a single summary line, so this result says NOTHING"). Not a red.
  • Repo-wide pnpm lint — narrowed to the one changed file in ESLint's population, and the narrowing is measured rather than assumed: (i) the population is read from eslint.config.mjs itself, whose one linting block is files: ['**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}'] — markdown and JSON are not members, so three of the four changed paths are outside it by the config's own declaration; (ii) pnpm exec eslint --no-inline-config --format json scripts/check-skills-token-ratchet.mjs reports 1 file linted, 0 errors, 0 warnings, exit 0; (iii) the config never enables type-aware linting (no parserOptions.project, no typed rules — eslint.config.mjs states this at :327 and a grep of every parserOptions confirms only ecmaVersion / sourceType), so this diff cannot move the verdict on any file it does not touch.
  • The always-runs CI tail (Type Check jobs, Test Core shards, Build Docs, the governed-surface guard) — CI owns those and runs them on this PR.

Follow-up for other packages (not edited here)

  • skills/objectstack-platform/SKILL.md:1212 routes a reader to "Assigning a permission set to a user" in objectstack-data. That section still exists under that exact heading, now one file deeper in rules/security.md, so nothing is broken and no gate is red; a future platform flight may want to name the file. Not touched — another package.
  • No #anchor link anywhere in skills/**, content/docs/** or packages/** points into the moved sections, so no link was rewritten. Swept for objectstack-data/SKILL.md#, and for each moved heading's slug.

Landing

Governed surface (skills/**) ⇒ this PR stays draft; review requests are the seat's step. Labels: skip-changeset (this PR releases nothing — scripts/check-empty-changeset.mjs enumerates ".github/, .claude/, skills/, docs/, content/, examples/, tests-only, and the like" as route 2, and its GREEN 3 self-test case pins a skills/**-only PR with no changeset as green) and needs:contract-review (published security-contract text — sharingModel, the permission scopes, the security lint ids, the tenant-wall posture — changes file).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1


Generated by Claude Code

DATA-I-04. The entry file carried a 239-line Security & Access Control
block; six of its seven subsections move verbatim into a new
`skills/objectstack-data/rules/security.md`. No sentence is added: the
new file's only new bytes are its H1, and the entry keeps a one-line
pointer plus one row in the routing table.
`### Access depth (scope-depth)` stays in SKILL.md. It is a registered
exhaustive section in `check:skill-identifier-liveness` Leg 2
(`access-scope-depth` -> `ObjectAccessScopeSchema`), keyed by file path
plus heading, and a bound heading never leaves its file.
Three declared deletions inside the moved text, each a duplicate that
the split would otherwise carry across a file boundary:
- `### Cross-skill notes` (3 bullets) — objectstack-api and
objectstack-platform are routed by the entry's Skill Boundaries table,
objectstack-formula by the frontmatter and by three other entry sites.
- the `sharingModel` four-value re-enumeration in the RLS bullet — the
exhaustive table lives in the entry's Required properties block.
- Multi-tenancy's forward-pointer bullet to the visibility-posture
recipe directly beneath it.
Ceilings, per the ruling's condition (b): one row for the new file
pinned at its landed count (2480), the entry row re-locked at its
landed count (13892 -> 10009). No other row changes.
Package (every file under skills/objectstack-data/, generated included):
38,219 -> 38,155 tokens, net -64.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
DATA-B-06 (MOVE-TO). The 9-row table telling an agent which `rules/`
file answers its question sat at line 283 of 1,067, behind Core
Concepts, the `searchableFields` section and Field Groups; an agent that
stops reading early never learns `rules/` exists. It now sits directly
after the Skill Boundaries table, which is the other routing construct
in the file.
Byte-neutral: the same 16 lines, moved. SKILL.md is 40,034 bytes before
and after, so the ceiling re-locked in the previous commit still holds
exactly.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
`check:role-word` went red as a ratchet-DOWN: the entry file's count
improved 2 -> 1 because the deleted `### Cross-skill notes` bullet
carried "role inheritance". The other occurrence is untouched, and the
new `rules/security.md` carries none, so no entry is added. The remedy
is the gate's own author-side one (`--update`), one shrinking line.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@os-litant@os-zhuang@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

skills(data): split security into rules/security.md under #14296 item 1 (package net −64 tokens) + DATA-B-06 - #14673

Merged
os-zhuang merged 5 commits into
mainfrom
claude/issue-14297-skills-data-security-split
Sep 2, 2026
Merged

skills(data): split security into rules/security.md under #14296 item 1 (package net −64 tokens) + DATA-B-06#14673
os-zhuang merged 5 commits into
mainfrom
claude/issue-14297-skills-data-security-split

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Part of #14297 — round 2 takes the deferred DATA-I-04 split plus DATA-B-06. The card stays open because DATA-F-07 (the defineHook() prescription) is a maintainer call parked on decision batch 3, so this PR must not carry a closing keyword for that card.

The two rulings

The three conditions, with numbers

(a) Token-neutral or negative on the package. Package = every file under skills/objectstack-data/, generated included, measured with node scripts/check-skills-token-ratchet.mjs before and after.

authored (the ratchet's own subtotal)references/_index.md (generated)package
base ca48cf3736,7361,48338,219
head b3b3cdab36,6721,48338,155
delta−640−64

Programme-level account for this package: 45,780 authored at the audit pin → 36,736 after round 1 (−9,044) → 36,672 after this PR (−64). Programme total −9,108, −19.9%.

(b) Ceiling rows — exactly two, no others.

rowbeforeafter
skills/objectstack-data/rules/security.md(no row — a discovered authored file without one is RED)2,480 (landed count, headroom 0)
skills/objectstack-data/SKILL.md13,89210,009 (landed count, headroom 0)

The entry row carried 1,339 of headroom at base, left un-re-locked by round 1; the re-lock takes all of it. git diff on scripts/check-skills-token-ratchet.mjs is those two rows and their comments — no third row moves.

(c) No added prose. Every sentence in rules/security.md is a sentence moved out of SKILL.md. The new file's only new bytes are its H1 (# Security & Access Control, 28 bytes); six moved ### headings are demoted to ## (−6 bytes). The entry gains one pointer line and one routing-table row, inside the "at most one line per moved section" allowance for six moved sections. Three sentences were deleted rather than moved — each listed below.

File map

moved section (entry, at base)linesbeforeafter
### Object-level permissions (RBAC)547–580350 tokrules/security.md## Object-level permissions (RBAC)
### Assigning a permission set to a user581–608406 tokrules/security.md## Assigning a permission set to a user
### Row-Level Security (RLS)621–672630 tokrules/security.md## Row-Level Security (RLS)
### Sensitive fields — secret type + requiredPermissions673–708321 tokrules/security.md## Sensitive fields …
### Multi-tenancy709–726167 tokrules/security.md## Multi-tenancy
### Platform-global / admin-only objects (visibility posture)727–769657 tokrules/security.md## Platform-global / admin-only objects …
### Access depth (scope-depth) — …609–620197 tokstays in SKILL.md — Leg-2 bound, see below
section lead (no object-level permissions / hooks key)541–54663 tokstays in SKILL.md — it is a rule about what ObjectSchema.create() refuses, and that belongs where objects are authored
### Cross-skill notes770–77777 tokdeleted, see below

Per-move record

findinglanding sitebeforeafter
DATA-I-04 (MOVE-TO rules/)skills/objectstack-data/rules/security.md (new)SKILL.md 12,553 tok; the Security & Access Control block is 239 lines / 2,867 tok of itSKILL.md 10,009 tok (−2,544); rules/security.md 2,480 tok; package −64
DATA-B-06 (MOVE-TO)skills/objectstack-data/SKILL.md, directly after the Skill Boundaries tablethe 9-row rules/ routing table sat at line 283 of 1,067, behind Core Concepts, the searchableFields section and Field Groupsit sits at line 40, beside the other routing construct in the file; byte-neutralSKILL.md is 40,034 bytes immediately before and immediately after the move

The Leg-2 constraint and its cost

check:skill-identifier-liveness Leg 2 registers access-scope-depth — file skills/objectstack-data/SKILL.md, heading ### Access depth (scope-depth) — the ERP "see my unit / my unit and below" axis, symbol ObjectAccessScopeSchema — and the binding is keyed by file path plus heading, so a bound heading never leaves its file. That section and its exhaustive value list (own · own_and_reports · unit · unit_and_below · org) therefore stay in the entry while the rest of the security topic moves.

The cost, stated rather than hidden: one topic now spans two files. A reader of rules/security.md gets RBAC bits, assignment, RLS, secret / requiredPermissions, tenancy and the platform-global posture; the declarative widening axis that composes with all of them is in the entry. The entry's pointer names the split so the reader is not left to discover it. scripts/check-skill-identifier-liveness.mjs is not edited by this PR.

Declared deletions (three)

Each is a duplicate the split would otherwise have carried across a file boundary, and each is inside the moved text, which is what "minus deletions" in condition (c) permits.

  1. ### Cross-skill notes (3 bullets, 77 tok). objectstack-api and objectstack-platform are already routed by the entry's own Skill Boundaries table; objectstack-formula is routed by the frontmatter and by three other entry sites (Conditional Field Rules, Field Type Selection, Linting & Generation Quality).
  2. The sharingModel four-value re-enumeration in the RLS section's owner-scoping bullet. The exhaustive table for those four values is in the entry's Required-properties block (added by round 1's DATA-F-01); after the split the parenthetical would be a second, unratcheted copy in another file. The bullet keeps sharingModel and its ADR-0056 D1 citation.
  3. Multi-tenancy's forward-pointer bullet ("Platform/env-global objects declare tenancy: { enabled: false } … see the visibility-posture recipe below"), which points at the section immediately beneath it, where the same two keys are stated and explained at length.

Premise notes

No finding was skipped as premise_false. One recorded qualification: DATA-I-04's stated rationale included "sits exactly at its ceiling, so any true addition must be paid for inside it", which round 1 already retired — at this PR's base SKILL.md measured 12,553 against a 13,892 ceiling, 1,339 of headroom. The finding's primary ground (progressive disclosure: the entry did not shrink to match the eight rules/ files it already has) is untouched, and #14568 = A ordered the split independently, so it is executed as written and the ceiling is re-locked to take the stale headroom back.

DATA-B-06's premise holds as written, with re-measured numbers: an 8-row table at line 312 of 1,216 at the audit pin is a 9-row table at line 283 of 1,067 at this base.

Gates — head b3b3cdab

The derived family is node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands re-derived after the last move against the real 4-path change set (scripts/check-skills-token-ratchet.mjs, scripts/role-word-baseline.json, skills/objectstack-data/SKILL.md, skills/objectstack-data/rules/security.md): 25 commands. Seven more were run that the derivation does not name but this change owes: the card's fence gates and the self-tests. All 32 ran under scripts/pm/os-verify-lock.sh with OS_VERIFY_LOCK_SLOT=issue-14297-r2; every exit code was captured by redirecting first and reading $? before any pipe.

31 exit 0, 1 exit 3 (NOT MEASURED). Each gate's own verdict line:

gateexitits own verdict line
node scripts/check-skills-token-ratchet.mjs032 authored bundle file(s) within their ceilings; 11 generator-owned file(s) measured, not ratcheted
node scripts/check-skills-token-ratchet.mjs --self-test064 cases pass
pnpm check:skill-identifier-liveness0Leg 1: 465 citation(s) over 42 published file(s) … Leg 2: 8 registered exhaustive section(s), 0 ledgered gap(s)
pnpm --filter @objectstack/spec run check:skill-examples0256 prose examples type-check across 3 surface(s) — every marked block parsed, so tsc ran the SEMANTIC pass on all of them
pnpm --filter @objectstack/spec run check:skill-docs0Skill docs in sync
pnpm --filter @objectstack/spec run check:skill-refs09 generated files in sync with packages/spec
pnpm check:skill-compatibility011 SKILL.md file(s) reconciled against 79 workspace packages
pnpm check:role-word0OK, no new occurrences of the reserved word
pnpm check:published-readme-links0176 outbound link(s) across 60 published markdown file(s): 0 root-relative, 0 non-canonical origin(s)
pnpm check:nul-bytes0scanned 8000 text file(s) … no raw ASCII control bytes
pnpm check:pm-skill-ratchet0CLAUDE.md is 86 lines (ceiling 86; headroom 0) — untouched, as required
pnpm check:pm-dispatch-gates0dispatch-gates self-test: 1240 cases pass
pnpm check:pm-governed-merges0243 assertions
pnpm check:skill-frame-sync04 copies of the decision frame are structurally isomorphic across 3 files
pnpm check:ratchet-remedy-authority0184 scripts swept … 12 mark the expanding remedy MAINTAINER-ONLY
node scripts/check-ci-filter-parity.mjs0all 130 declared cross-package glob(s) (92 unique) are covered
node scripts/check-cross-package-test-inputs.mjs · pnpm check:cross-package-test-inputs025 package(s) read outside themselves, all declared
node scripts/check-shard-attestation.mjs02 aggregate gate(s) count 3 declared leg(s) across 3 attesting job(s)
node scripts/pm/bare-root-worklist.mjs --self-test057 live row(s), 49 unreachable as spelled, 49 recorded verdict(s)
pnpm --filter @objectstack/lint run check:doc-formula-expressions014 predicate(s) on a statically determinable field layer judged clean
pnpm check:agent-test-spelling00 violations — 426 file(s)
pnpm check:bash32-floor026 tracked shell file(s) … name no bash 4+ construct
pnpm check:cli-command-ids0315 command-id literal(s) across 112 file(s) … all resolve
pnpm check:corpus-claim-drift0OK, no new claim sites beside a pinned spelling
pnpm check:doc-authoring0831 pinned site(s) across 231 file(s)
pnpm check:entry-guard0199 scripts/ file(s) — every entry guard goes through invoked-as.mjs
pnpm check:parse-guard0198 scripts/ file(s) — every TypeScript parse goes through ts-parse.mjs
pnpm check:pnpm-filter-targets0142/181 --filter occurrence(s) across 32 file(s) resolve
pnpm check:watch-hint-literal045 declaration(s) across 4 rostered name(s)
node scripts/check-skill-identifier-liveness.mjs --list0lists the 8 bindings; access-scope-depth still resolves in SKILL.md
node scripts/check-test-completeness.mjs3PREREQUISITE NOT MET — this gate grades a saved turbo run test log, and no log was named

check:skill-examples failed once, at exit 1, before it was measured: packages/spec/dist/**/*.d.ts is OLDER than packages/spec/src after origin/main was merged in. That is the gate refusing to compute a verdict against a stale build, not a finding. It was re-run after pnpm --workspace-concurrency=2 --filter '@objectstack/spec...' --filter '@objectstack/client-react...' --filter '@objectstack/client...' run build and is the exit 0 recorded above.

NOT MEASURED

  • node scripts/check-test-completeness.mjs — exit 3 by its own definition ("this gate exited before parsing a single summary line, so this result says NOTHING"). Not a red.
  • Repo-wide pnpm lint — narrowed to the one changed file in ESLint's population, and the narrowing is measured rather than assumed: (i) the population is read from eslint.config.mjs itself, whose one linting block is files: ['**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}'] — markdown and JSON are not members, so three of the four changed paths are outside it by the config's own declaration; (ii) pnpm exec eslint --no-inline-config --format json scripts/check-skills-token-ratchet.mjs reports 1 file linted, 0 errors, 0 warnings, exit 0; (iii) the config never enables type-aware linting (no parserOptions.project, no typed rules — eslint.config.mjs states this at :327 and a grep of every parserOptions confirms only ecmaVersion / sourceType), so this diff cannot move the verdict on any file it does not touch.
  • The always-runs CI tail (Type Check jobs, Test Core shards, Build Docs, the governed-surface guard) — CI owns those and runs them on this PR.

Follow-up for other packages (not edited here)

  • skills/objectstack-platform/SKILL.md:1212 routes a reader to "Assigning a permission set to a user" in objectstack-data. That section still exists under that exact heading, now one file deeper in rules/security.md, so nothing is broken and no gate is red; a future platform flight may want to name the file. Not touched — another package.
  • No #anchor link anywhere in skills/**, content/docs/** or packages/** points into the moved sections, so no link was rewritten. Swept for objectstack-data/SKILL.md#, and for each moved heading's slug.

Landing

Governed surface (skills/**) ⇒ this PR stays draft; review requests are the seat's step. Labels: skip-changeset (this PR releases nothing — scripts/check-empty-changeset.mjs enumerates ".github/, .claude/, skills/, docs/, content/, examples/, tests-only, and the like" as route 2, and its GREEN 3 self-test case pins a skills/**-only PR with no changeset as green) and needs:contract-review (published security-contract text — sharingModel, the permission scopes, the security lint ids, the tenant-wall posture — changes file).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1


Generated by Claude Code

DATA-I-04. The entry file carried a 239-line Security & Access Control
block; six of its seven subsections move verbatim into a new
`skills/objectstack-data/rules/security.md`. No sentence is added: the
new file's only new bytes are its H1, and the entry keeps a one-line
pointer plus one row in the routing table.
`### Access depth (scope-depth)` stays in SKILL.md. It is a registered
exhaustive section in `check:skill-identifier-liveness` Leg 2
(`access-scope-depth` -> `ObjectAccessScopeSchema`), keyed by file path
plus heading, and a bound heading never leaves its file.
Three declared deletions inside the moved text, each a duplicate that
the split would otherwise carry across a file boundary:
- `### Cross-skill notes` (3 bullets) — objectstack-api and
objectstack-platform are routed by the entry's Skill Boundaries table,
objectstack-formula by the frontmatter and by three other entry sites.
- the `sharingModel` four-value re-enumeration in the RLS bullet — the
exhaustive table lives in the entry's Required properties block.
- Multi-tenancy's forward-pointer bullet to the visibility-posture
recipe directly beneath it.
Ceilings, per the ruling's condition (b): one row for the new file
pinned at its landed count (2480), the entry row re-locked at its
landed count (13892 -> 10009). No other row changes.
Package (every file under skills/objectstack-data/, generated included):
38,219 -> 38,155 tokens, net -64.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
DATA-B-06 (MOVE-TO). The 9-row table telling an agent which `rules/`
file answers its question sat at line 283 of 1,067, behind Core
Concepts, the `searchableFields` section and Field Groups; an agent that
stops reading early never learns `rules/` exists. It now sits directly
after the Skill Boundaries table, which is the other routing construct
in the file.
Byte-neutral: the same 16 lines, moved. SKILL.md is 40,034 bytes before
and after, so the ceiling re-locked in the previous commit still holds
exactly.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
`check:role-word` went red as a ratchet-DOWN: the entry file's count
improved 2 -> 1 because the deleted `### Cross-skill notes` bullet
carried "role inheritance". The other occurrence is untouched, and the
new `rules/security.md` carries none, so no entry is added. The remedy
is the gate's own author-side one (`--update`), one shrinking line.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@os-litant@os-zhuang@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

skills(data): split security into rules/security.md under #14296 item 1 (package net −64 tokens) + DATA-B-06 - #14673

Merged
os-zhuang merged 5 commits into
mainfrom
claude/issue-14297-skills-data-security-split
Sep 2, 2026
Merged

skills(data): split security into rules/security.md under #14296 item 1 (package net −64 tokens) + DATA-B-06#14673
os-zhuang merged 5 commits into
mainfrom
claude/issue-14297-skills-data-security-split

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Part of #14297 — round 2 takes the deferred DATA-I-04 split plus DATA-B-06. The card stays open because DATA-F-07 (the defineHook() prescription) is a maintainer call parked on decision batch 3, so this PR must not carry a closing keyword for that card.

The two rulings

The three conditions, with numbers

(a) Token-neutral or negative on the package. Package = every file under skills/objectstack-data/, generated included, measured with node scripts/check-skills-token-ratchet.mjs before and after.

authored (the ratchet's own subtotal)references/_index.md (generated)package
base ca48cf3736,7361,48338,219
head b3b3cdab36,6721,48338,155
delta−640−64

Programme-level account for this package: 45,780 authored at the audit pin → 36,736 after round 1 (−9,044) → 36,672 after this PR (−64). Programme total −9,108, −19.9%.

(b) Ceiling rows — exactly two, no others.

rowbeforeafter
skills/objectstack-data/rules/security.md(no row — a discovered authored file without one is RED)2,480 (landed count, headroom 0)
skills/objectstack-data/SKILL.md13,89210,009 (landed count, headroom 0)

The entry row carried 1,339 of headroom at base, left un-re-locked by round 1; the re-lock takes all of it. git diff on scripts/check-skills-token-ratchet.mjs is those two rows and their comments — no third row moves.

(c) No added prose. Every sentence in rules/security.md is a sentence moved out of SKILL.md. The new file's only new bytes are its H1 (# Security & Access Control, 28 bytes); six moved ### headings are demoted to ## (−6 bytes). The entry gains one pointer line and one routing-table row, inside the "at most one line per moved section" allowance for six moved sections. Three sentences were deleted rather than moved — each listed below.

File map

moved section (entry, at base)linesbeforeafter
### Object-level permissions (RBAC)547–580350 tokrules/security.md## Object-level permissions (RBAC)
### Assigning a permission set to a user581–608406 tokrules/security.md## Assigning a permission set to a user
### Row-Level Security (RLS)621–672630 tokrules/security.md## Row-Level Security (RLS)
### Sensitive fields — secret type + requiredPermissions673–708321 tokrules/security.md## Sensitive fields …
### Multi-tenancy709–726167 tokrules/security.md## Multi-tenancy
### Platform-global / admin-only objects (visibility posture)727–769657 tokrules/security.md## Platform-global / admin-only objects …
### Access depth (scope-depth) — …609–620197 tokstays in SKILL.md — Leg-2 bound, see below
section lead (no object-level permissions / hooks key)541–54663 tokstays in SKILL.md — it is a rule about what ObjectSchema.create() refuses, and that belongs where objects are authored
### Cross-skill notes770–77777 tokdeleted, see below

Per-move record

findinglanding sitebeforeafter
DATA-I-04 (MOVE-TO rules/)skills/objectstack-data/rules/security.md (new)SKILL.md 12,553 tok; the Security & Access Control block is 239 lines / 2,867 tok of itSKILL.md 10,009 tok (−2,544); rules/security.md 2,480 tok; package −64
DATA-B-06 (MOVE-TO)skills/objectstack-data/SKILL.md, directly after the Skill Boundaries tablethe 9-row rules/ routing table sat at line 283 of 1,067, behind Core Concepts, the searchableFields section and Field Groupsit sits at line 40, beside the other routing construct in the file; byte-neutralSKILL.md is 40,034 bytes immediately before and immediately after the move

The Leg-2 constraint and its cost

check:skill-identifier-liveness Leg 2 registers access-scope-depth — file skills/objectstack-data/SKILL.md, heading ### Access depth (scope-depth) — the ERP "see my unit / my unit and below" axis, symbol ObjectAccessScopeSchema — and the binding is keyed by file path plus heading, so a bound heading never leaves its file. That section and its exhaustive value list (own · own_and_reports · unit · unit_and_below · org) therefore stay in the entry while the rest of the security topic moves.

The cost, stated rather than hidden: one topic now spans two files. A reader of rules/security.md gets RBAC bits, assignment, RLS, secret / requiredPermissions, tenancy and the platform-global posture; the declarative widening axis that composes with all of them is in the entry. The entry's pointer names the split so the reader is not left to discover it. scripts/check-skill-identifier-liveness.mjs is not edited by this PR.

Declared deletions (three)

Each is a duplicate the split would otherwise have carried across a file boundary, and each is inside the moved text, which is what "minus deletions" in condition (c) permits.

  1. ### Cross-skill notes (3 bullets, 77 tok). objectstack-api and objectstack-platform are already routed by the entry's own Skill Boundaries table; objectstack-formula is routed by the frontmatter and by three other entry sites (Conditional Field Rules, Field Type Selection, Linting & Generation Quality).
  2. The sharingModel four-value re-enumeration in the RLS section's owner-scoping bullet. The exhaustive table for those four values is in the entry's Required-properties block (added by round 1's DATA-F-01); after the split the parenthetical would be a second, unratcheted copy in another file. The bullet keeps sharingModel and its ADR-0056 D1 citation.
  3. Multi-tenancy's forward-pointer bullet ("Platform/env-global objects declare tenancy: { enabled: false } … see the visibility-posture recipe below"), which points at the section immediately beneath it, where the same two keys are stated and explained at length.

Premise notes

No finding was skipped as premise_false. One recorded qualification: DATA-I-04's stated rationale included "sits exactly at its ceiling, so any true addition must be paid for inside it", which round 1 already retired — at this PR's base SKILL.md measured 12,553 against a 13,892 ceiling, 1,339 of headroom. The finding's primary ground (progressive disclosure: the entry did not shrink to match the eight rules/ files it already has) is untouched, and #14568 = A ordered the split independently, so it is executed as written and the ceiling is re-locked to take the stale headroom back.

DATA-B-06's premise holds as written, with re-measured numbers: an 8-row table at line 312 of 1,216 at the audit pin is a 9-row table at line 283 of 1,067 at this base.

Gates — head b3b3cdab

The derived family is node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands re-derived after the last move against the real 4-path change set (scripts/check-skills-token-ratchet.mjs, scripts/role-word-baseline.json, skills/objectstack-data/SKILL.md, skills/objectstack-data/rules/security.md): 25 commands. Seven more were run that the derivation does not name but this change owes: the card's fence gates and the self-tests. All 32 ran under scripts/pm/os-verify-lock.sh with OS_VERIFY_LOCK_SLOT=issue-14297-r2; every exit code was captured by redirecting first and reading $? before any pipe.

31 exit 0, 1 exit 3 (NOT MEASURED). Each gate's own verdict line:

gateexitits own verdict line
node scripts/check-skills-token-ratchet.mjs032 authored bundle file(s) within their ceilings; 11 generator-owned file(s) measured, not ratcheted
node scripts/check-skills-token-ratchet.mjs --self-test064 cases pass
pnpm check:skill-identifier-liveness0Leg 1: 465 citation(s) over 42 published file(s) … Leg 2: 8 registered exhaustive section(s), 0 ledgered gap(s)
pnpm --filter @objectstack/spec run check:skill-examples0256 prose examples type-check across 3 surface(s) — every marked block parsed, so tsc ran the SEMANTIC pass on all of them
pnpm --filter @objectstack/spec run check:skill-docs0Skill docs in sync
pnpm --filter @objectstack/spec run check:skill-refs09 generated files in sync with packages/spec
pnpm check:skill-compatibility011 SKILL.md file(s) reconciled against 79 workspace packages
pnpm check:role-word0OK, no new occurrences of the reserved word
pnpm check:published-readme-links0176 outbound link(s) across 60 published markdown file(s): 0 root-relative, 0 non-canonical origin(s)
pnpm check:nul-bytes0scanned 8000 text file(s) … no raw ASCII control bytes
pnpm check:pm-skill-ratchet0CLAUDE.md is 86 lines (ceiling 86; headroom 0) — untouched, as required
pnpm check:pm-dispatch-gates0dispatch-gates self-test: 1240 cases pass
pnpm check:pm-governed-merges0243 assertions
pnpm check:skill-frame-sync04 copies of the decision frame are structurally isomorphic across 3 files
pnpm check:ratchet-remedy-authority0184 scripts swept … 12 mark the expanding remedy MAINTAINER-ONLY
node scripts/check-ci-filter-parity.mjs0all 130 declared cross-package glob(s) (92 unique) are covered
node scripts/check-cross-package-test-inputs.mjs · pnpm check:cross-package-test-inputs025 package(s) read outside themselves, all declared
node scripts/check-shard-attestation.mjs02 aggregate gate(s) count 3 declared leg(s) across 3 attesting job(s)
node scripts/pm/bare-root-worklist.mjs --self-test057 live row(s), 49 unreachable as spelled, 49 recorded verdict(s)
pnpm --filter @objectstack/lint run check:doc-formula-expressions014 predicate(s) on a statically determinable field layer judged clean
pnpm check:agent-test-spelling00 violations — 426 file(s)
pnpm check:bash32-floor026 tracked shell file(s) … name no bash 4+ construct
pnpm check:cli-command-ids0315 command-id literal(s) across 112 file(s) … all resolve
pnpm check:corpus-claim-drift0OK, no new claim sites beside a pinned spelling
pnpm check:doc-authoring0831 pinned site(s) across 231 file(s)
pnpm check:entry-guard0199 scripts/ file(s) — every entry guard goes through invoked-as.mjs
pnpm check:parse-guard0198 scripts/ file(s) — every TypeScript parse goes through ts-parse.mjs
pnpm check:pnpm-filter-targets0142/181 --filter occurrence(s) across 32 file(s) resolve
pnpm check:watch-hint-literal045 declaration(s) across 4 rostered name(s)
node scripts/check-skill-identifier-liveness.mjs --list0lists the 8 bindings; access-scope-depth still resolves in SKILL.md
node scripts/check-test-completeness.mjs3PREREQUISITE NOT MET — this gate grades a saved turbo run test log, and no log was named

check:skill-examples failed once, at exit 1, before it was measured: packages/spec/dist/**/*.d.ts is OLDER than packages/spec/src after origin/main was merged in. That is the gate refusing to compute a verdict against a stale build, not a finding. It was re-run after pnpm --workspace-concurrency=2 --filter '@objectstack/spec...' --filter '@objectstack/client-react...' --filter '@objectstack/client...' run build and is the exit 0 recorded above.

NOT MEASURED

  • node scripts/check-test-completeness.mjs — exit 3 by its own definition ("this gate exited before parsing a single summary line, so this result says NOTHING"). Not a red.
  • Repo-wide pnpm lint — narrowed to the one changed file in ESLint's population, and the narrowing is measured rather than assumed: (i) the population is read from eslint.config.mjs itself, whose one linting block is files: ['**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}'] — markdown and JSON are not members, so three of the four changed paths are outside it by the config's own declaration; (ii) pnpm exec eslint --no-inline-config --format json scripts/check-skills-token-ratchet.mjs reports 1 file linted, 0 errors, 0 warnings, exit 0; (iii) the config never enables type-aware linting (no parserOptions.project, no typed rules — eslint.config.mjs states this at :327 and a grep of every parserOptions confirms only ecmaVersion / sourceType), so this diff cannot move the verdict on any file it does not touch.
  • The always-runs CI tail (Type Check jobs, Test Core shards, Build Docs, the governed-surface guard) — CI owns those and runs them on this PR.

Follow-up for other packages (not edited here)

  • skills/objectstack-platform/SKILL.md:1212 routes a reader to "Assigning a permission set to a user" in objectstack-data. That section still exists under that exact heading, now one file deeper in rules/security.md, so nothing is broken and no gate is red; a future platform flight may want to name the file. Not touched — another package.
  • No #anchor link anywhere in skills/**, content/docs/** or packages/** points into the moved sections, so no link was rewritten. Swept for objectstack-data/SKILL.md#, and for each moved heading's slug.

Landing

Governed surface (skills/**) ⇒ this PR stays draft; review requests are the seat's step. Labels: skip-changeset (this PR releases nothing — scripts/check-empty-changeset.mjs enumerates ".github/, .claude/, skills/, docs/, content/, examples/, tests-only, and the like" as route 2, and its GREEN 3 self-test case pins a skills/**-only PR with no changeset as green) and needs:contract-review (published security-contract text — sharingModel, the permission scopes, the security lint ids, the tenant-wall posture — changes file).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1


Generated by Claude Code

DATA-I-04. The entry file carried a 239-line Security & Access Control
block; six of its seven subsections move verbatim into a new
`skills/objectstack-data/rules/security.md`. No sentence is added: the
new file's only new bytes are its H1, and the entry keeps a one-line
pointer plus one row in the routing table.
`### Access depth (scope-depth)` stays in SKILL.md. It is a registered
exhaustive section in `check:skill-identifier-liveness` Leg 2
(`access-scope-depth` -> `ObjectAccessScopeSchema`), keyed by file path
plus heading, and a bound heading never leaves its file.
Three declared deletions inside the moved text, each a duplicate that
the split would otherwise carry across a file boundary:
- `### Cross-skill notes` (3 bullets) — objectstack-api and
objectstack-platform are routed by the entry's Skill Boundaries table,
objectstack-formula by the frontmatter and by three other entry sites.
- the `sharingModel` four-value re-enumeration in the RLS bullet — the
exhaustive table lives in the entry's Required properties block.
- Multi-tenancy's forward-pointer bullet to the visibility-posture
recipe directly beneath it.
Ceilings, per the ruling's condition (b): one row for the new file
pinned at its landed count (2480), the entry row re-locked at its
landed count (13892 -> 10009). No other row changes.
Package (every file under skills/objectstack-data/, generated included):
38,219 -> 38,155 tokens, net -64.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
DATA-B-06 (MOVE-TO). The 9-row table telling an agent which `rules/`
file answers its question sat at line 283 of 1,067, behind Core
Concepts, the `searchableFields` section and Field Groups; an agent that
stops reading early never learns `rules/` exists. It now sits directly
after the Skill Boundaries table, which is the other routing construct
in the file.
Byte-neutral: the same 16 lines, moved. SKILL.md is 40,034 bytes before
and after, so the ceiling re-locked in the previous commit still holds
exactly.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
`check:role-word` went red as a ratchet-DOWN: the entry file's count
improved 2 -> 1 because the deleted `### Cross-skill notes` bullet
carried "role inheritance". The other occurrence is untouched, and the
new `rules/security.md` carries none, so no entry is added. The remedy
is the gate's own author-side one (`--update`), one shrinking line.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@os-litant@os-zhuang@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

skills(data): split security into rules/security.md under #14296 item 1 (package net −64 tokens) + DATA-B-06 - #14673

Merged
os-zhuang merged 5 commits into
mainfrom
claude/issue-14297-skills-data-security-split
Sep 2, 2026
Merged

skills(data): split security into rules/security.md under #14296 item 1 (package net −64 tokens) + DATA-B-06#14673
os-zhuang merged 5 commits into
mainfrom
claude/issue-14297-skills-data-security-split

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Part of #14297 — round 2 takes the deferred DATA-I-04 split plus DATA-B-06. The card stays open because DATA-F-07 (the defineHook() prescription) is a maintainer call parked on decision batch 3, so this PR must not carry a closing keyword for that card.

The two rulings

The three conditions, with numbers

(a) Token-neutral or negative on the package. Package = every file under skills/objectstack-data/, generated included, measured with node scripts/check-skills-token-ratchet.mjs before and after.

authored (the ratchet's own subtotal)references/_index.md (generated)package
base ca48cf3736,7361,48338,219
head b3b3cdab36,6721,48338,155
delta−640−64

Programme-level account for this package: 45,780 authored at the audit pin → 36,736 after round 1 (−9,044) → 36,672 after this PR (−64). Programme total −9,108, −19.9%.

(b) Ceiling rows — exactly two, no others.

rowbeforeafter
skills/objectstack-data/rules/security.md(no row — a discovered authored file without one is RED)2,480 (landed count, headroom 0)
skills/objectstack-data/SKILL.md13,89210,009 (landed count, headroom 0)

The entry row carried 1,339 of headroom at base, left un-re-locked by round 1; the re-lock takes all of it. git diff on scripts/check-skills-token-ratchet.mjs is those two rows and their comments — no third row moves.

(c) No added prose. Every sentence in rules/security.md is a sentence moved out of SKILL.md. The new file's only new bytes are its H1 (# Security & Access Control, 28 bytes); six moved ### headings are demoted to ## (−6 bytes). The entry gains one pointer line and one routing-table row, inside the "at most one line per moved section" allowance for six moved sections. Three sentences were deleted rather than moved — each listed below.

File map

moved section (entry, at base)linesbeforeafter
### Object-level permissions (RBAC)547–580350 tokrules/security.md## Object-level permissions (RBAC)
### Assigning a permission set to a user581–608406 tokrules/security.md## Assigning a permission set to a user
### Row-Level Security (RLS)621–672630 tokrules/security.md## Row-Level Security (RLS)
### Sensitive fields — secret type + requiredPermissions673–708321 tokrules/security.md## Sensitive fields …
### Multi-tenancy709–726167 tokrules/security.md## Multi-tenancy
### Platform-global / admin-only objects (visibility posture)727–769657 tokrules/security.md## Platform-global / admin-only objects …
### Access depth (scope-depth) — …609–620197 tokstays in SKILL.md — Leg-2 bound, see below
section lead (no object-level permissions / hooks key)541–54663 tokstays in SKILL.md — it is a rule about what ObjectSchema.create() refuses, and that belongs where objects are authored
### Cross-skill notes770–77777 tokdeleted, see below

Per-move record

findinglanding sitebeforeafter
DATA-I-04 (MOVE-TO rules/)skills/objectstack-data/rules/security.md (new)SKILL.md 12,553 tok; the Security & Access Control block is 239 lines / 2,867 tok of itSKILL.md 10,009 tok (−2,544); rules/security.md 2,480 tok; package −64
DATA-B-06 (MOVE-TO)skills/objectstack-data/SKILL.md, directly after the Skill Boundaries tablethe 9-row rules/ routing table sat at line 283 of 1,067, behind Core Concepts, the searchableFields section and Field Groupsit sits at line 40, beside the other routing construct in the file; byte-neutralSKILL.md is 40,034 bytes immediately before and immediately after the move

The Leg-2 constraint and its cost

check:skill-identifier-liveness Leg 2 registers access-scope-depth — file skills/objectstack-data/SKILL.md, heading ### Access depth (scope-depth) — the ERP "see my unit / my unit and below" axis, symbol ObjectAccessScopeSchema — and the binding is keyed by file path plus heading, so a bound heading never leaves its file. That section and its exhaustive value list (own · own_and_reports · unit · unit_and_below · org) therefore stay in the entry while the rest of the security topic moves.

The cost, stated rather than hidden: one topic now spans two files. A reader of rules/security.md gets RBAC bits, assignment, RLS, secret / requiredPermissions, tenancy and the platform-global posture; the declarative widening axis that composes with all of them is in the entry. The entry's pointer names the split so the reader is not left to discover it. scripts/check-skill-identifier-liveness.mjs is not edited by this PR.

Declared deletions (three)

Each is a duplicate the split would otherwise have carried across a file boundary, and each is inside the moved text, which is what "minus deletions" in condition (c) permits.

  1. ### Cross-skill notes (3 bullets, 77 tok). objectstack-api and objectstack-platform are already routed by the entry's own Skill Boundaries table; objectstack-formula is routed by the frontmatter and by three other entry sites (Conditional Field Rules, Field Type Selection, Linting & Generation Quality).
  2. The sharingModel four-value re-enumeration in the RLS section's owner-scoping bullet. The exhaustive table for those four values is in the entry's Required-properties block (added by round 1's DATA-F-01); after the split the parenthetical would be a second, unratcheted copy in another file. The bullet keeps sharingModel and its ADR-0056 D1 citation.
  3. Multi-tenancy's forward-pointer bullet ("Platform/env-global objects declare tenancy: { enabled: false } … see the visibility-posture recipe below"), which points at the section immediately beneath it, where the same two keys are stated and explained at length.

Premise notes

No finding was skipped as premise_false. One recorded qualification: DATA-I-04's stated rationale included "sits exactly at its ceiling, so any true addition must be paid for inside it", which round 1 already retired — at this PR's base SKILL.md measured 12,553 against a 13,892 ceiling, 1,339 of headroom. The finding's primary ground (progressive disclosure: the entry did not shrink to match the eight rules/ files it already has) is untouched, and #14568 = A ordered the split independently, so it is executed as written and the ceiling is re-locked to take the stale headroom back.

DATA-B-06's premise holds as written, with re-measured numbers: an 8-row table at line 312 of 1,216 at the audit pin is a 9-row table at line 283 of 1,067 at this base.

Gates — head b3b3cdab

The derived family is node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands re-derived after the last move against the real 4-path change set (scripts/check-skills-token-ratchet.mjs, scripts/role-word-baseline.json, skills/objectstack-data/SKILL.md, skills/objectstack-data/rules/security.md): 25 commands. Seven more were run that the derivation does not name but this change owes: the card's fence gates and the self-tests. All 32 ran under scripts/pm/os-verify-lock.sh with OS_VERIFY_LOCK_SLOT=issue-14297-r2; every exit code was captured by redirecting first and reading $? before any pipe.

31 exit 0, 1 exit 3 (NOT MEASURED). Each gate's own verdict line:

gateexitits own verdict line
node scripts/check-skills-token-ratchet.mjs032 authored bundle file(s) within their ceilings; 11 generator-owned file(s) measured, not ratcheted
node scripts/check-skills-token-ratchet.mjs --self-test064 cases pass
pnpm check:skill-identifier-liveness0Leg 1: 465 citation(s) over 42 published file(s) … Leg 2: 8 registered exhaustive section(s), 0 ledgered gap(s)
pnpm --filter @objectstack/spec run check:skill-examples0256 prose examples type-check across 3 surface(s) — every marked block parsed, so tsc ran the SEMANTIC pass on all of them
pnpm --filter @objectstack/spec run check:skill-docs0Skill docs in sync
pnpm --filter @objectstack/spec run check:skill-refs09 generated files in sync with packages/spec
pnpm check:skill-compatibility011 SKILL.md file(s) reconciled against 79 workspace packages
pnpm check:role-word0OK, no new occurrences of the reserved word
pnpm check:published-readme-links0176 outbound link(s) across 60 published markdown file(s): 0 root-relative, 0 non-canonical origin(s)
pnpm check:nul-bytes0scanned 8000 text file(s) … no raw ASCII control bytes
pnpm check:pm-skill-ratchet0CLAUDE.md is 86 lines (ceiling 86; headroom 0) — untouched, as required
pnpm check:pm-dispatch-gates0dispatch-gates self-test: 1240 cases pass
pnpm check:pm-governed-merges0243 assertions
pnpm check:skill-frame-sync04 copies of the decision frame are structurally isomorphic across 3 files
pnpm check:ratchet-remedy-authority0184 scripts swept … 12 mark the expanding remedy MAINTAINER-ONLY
node scripts/check-ci-filter-parity.mjs0all 130 declared cross-package glob(s) (92 unique) are covered
node scripts/check-cross-package-test-inputs.mjs · pnpm check:cross-package-test-inputs025 package(s) read outside themselves, all declared
node scripts/check-shard-attestation.mjs02 aggregate gate(s) count 3 declared leg(s) across 3 attesting job(s)
node scripts/pm/bare-root-worklist.mjs --self-test057 live row(s), 49 unreachable as spelled, 49 recorded verdict(s)
pnpm --filter @objectstack/lint run check:doc-formula-expressions014 predicate(s) on a statically determinable field layer judged clean
pnpm check:agent-test-spelling00 violations — 426 file(s)
pnpm check:bash32-floor026 tracked shell file(s) … name no bash 4+ construct
pnpm check:cli-command-ids0315 command-id literal(s) across 112 file(s) … all resolve
pnpm check:corpus-claim-drift0OK, no new claim sites beside a pinned spelling
pnpm check:doc-authoring0831 pinned site(s) across 231 file(s)
pnpm check:entry-guard0199 scripts/ file(s) — every entry guard goes through invoked-as.mjs
pnpm check:parse-guard0198 scripts/ file(s) — every TypeScript parse goes through ts-parse.mjs
pnpm check:pnpm-filter-targets0142/181 --filter occurrence(s) across 32 file(s) resolve
pnpm check:watch-hint-literal045 declaration(s) across 4 rostered name(s)
node scripts/check-skill-identifier-liveness.mjs --list0lists the 8 bindings; access-scope-depth still resolves in SKILL.md
node scripts/check-test-completeness.mjs3PREREQUISITE NOT MET — this gate grades a saved turbo run test log, and no log was named

check:skill-examples failed once, at exit 1, before it was measured: packages/spec/dist/**/*.d.ts is OLDER than packages/spec/src after origin/main was merged in. That is the gate refusing to compute a verdict against a stale build, not a finding. It was re-run after pnpm --workspace-concurrency=2 --filter '@objectstack/spec...' --filter '@objectstack/client-react...' --filter '@objectstack/client...' run build and is the exit 0 recorded above.

NOT MEASURED

  • node scripts/check-test-completeness.mjs — exit 3 by its own definition ("this gate exited before parsing a single summary line, so this result says NOTHING"). Not a red.
  • Repo-wide pnpm lint — narrowed to the one changed file in ESLint's population, and the narrowing is measured rather than assumed: (i) the population is read from eslint.config.mjs itself, whose one linting block is files: ['**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}'] — markdown and JSON are not members, so three of the four changed paths are outside it by the config's own declaration; (ii) pnpm exec eslint --no-inline-config --format json scripts/check-skills-token-ratchet.mjs reports 1 file linted, 0 errors, 0 warnings, exit 0; (iii) the config never enables type-aware linting (no parserOptions.project, no typed rules — eslint.config.mjs states this at :327 and a grep of every parserOptions confirms only ecmaVersion / sourceType), so this diff cannot move the verdict on any file it does not touch.
  • The always-runs CI tail (Type Check jobs, Test Core shards, Build Docs, the governed-surface guard) — CI owns those and runs them on this PR.

Follow-up for other packages (not edited here)

  • skills/objectstack-platform/SKILL.md:1212 routes a reader to "Assigning a permission set to a user" in objectstack-data. That section still exists under that exact heading, now one file deeper in rules/security.md, so nothing is broken and no gate is red; a future platform flight may want to name the file. Not touched — another package.
  • No #anchor link anywhere in skills/**, content/docs/** or packages/** points into the moved sections, so no link was rewritten. Swept for objectstack-data/SKILL.md#, and for each moved heading's slug.

Landing

Governed surface (skills/**) ⇒ this PR stays draft; review requests are the seat's step. Labels: skip-changeset (this PR releases nothing — scripts/check-empty-changeset.mjs enumerates ".github/, .claude/, skills/, docs/, content/, examples/, tests-only, and the like" as route 2, and its GREEN 3 self-test case pins a skills/**-only PR with no changeset as green) and needs:contract-review (published security-contract text — sharingModel, the permission scopes, the security lint ids, the tenant-wall posture — changes file).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1


Generated by Claude Code

DATA-I-04. The entry file carried a 239-line Security & Access Control
block; six of its seven subsections move verbatim into a new
`skills/objectstack-data/rules/security.md`. No sentence is added: the
new file's only new bytes are its H1, and the entry keeps a one-line
pointer plus one row in the routing table.
`### Access depth (scope-depth)` stays in SKILL.md. It is a registered
exhaustive section in `check:skill-identifier-liveness` Leg 2
(`access-scope-depth` -> `ObjectAccessScopeSchema`), keyed by file path
plus heading, and a bound heading never leaves its file.
Three declared deletions inside the moved text, each a duplicate that
the split would otherwise carry across a file boundary:
- `### Cross-skill notes` (3 bullets) — objectstack-api and
objectstack-platform are routed by the entry's Skill Boundaries table,
objectstack-formula by the frontmatter and by three other entry sites.
- the `sharingModel` four-value re-enumeration in the RLS bullet — the
exhaustive table lives in the entry's Required properties block.
- Multi-tenancy's forward-pointer bullet to the visibility-posture
recipe directly beneath it.
Ceilings, per the ruling's condition (b): one row for the new file
pinned at its landed count (2480), the entry row re-locked at its
landed count (13892 -> 10009). No other row changes.
Package (every file under skills/objectstack-data/, generated included):
38,219 -> 38,155 tokens, net -64.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
DATA-B-06 (MOVE-TO). The 9-row table telling an agent which `rules/`
file answers its question sat at line 283 of 1,067, behind Core
Concepts, the `searchableFields` section and Field Groups; an agent that
stops reading early never learns `rules/` exists. It now sits directly
after the Skill Boundaries table, which is the other routing construct
in the file.
Byte-neutral: the same 16 lines, moved. SKILL.md is 40,034 bytes before
and after, so the ceiling re-locked in the previous commit still holds
exactly.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
`check:role-word` went red as a ratchet-DOWN: the entry file's count
improved 2 -> 1 because the deleted `### Cross-skill notes` bullet
carried "role inheritance". The other occurrence is untouched, and the
new `rules/security.md` carries none, so no entry is added. The remedy
is the gate's own author-side one (`--update`), one shrinking line.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@os-litant@os-zhuang@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

skills(data): split security into rules/security.md under #14296 item 1 (package net −64 tokens) + DATA-B-06 - #14673

Merged
os-zhuang merged 5 commits into
mainfrom
claude/issue-14297-skills-data-security-split
Sep 2, 2026
Merged

skills(data): split security into rules/security.md under #14296 item 1 (package net −64 tokens) + DATA-B-06#14673
os-zhuang merged 5 commits into
mainfrom
claude/issue-14297-skills-data-security-split

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Part of #14297 — round 2 takes the deferred DATA-I-04 split plus DATA-B-06. The card stays open because DATA-F-07 (the defineHook() prescription) is a maintainer call parked on decision batch 3, so this PR must not carry a closing keyword for that card.

The two rulings

The three conditions, with numbers

(a) Token-neutral or negative on the package. Package = every file under skills/objectstack-data/, generated included, measured with node scripts/check-skills-token-ratchet.mjs before and after.

authored (the ratchet's own subtotal)references/_index.md (generated)package
base ca48cf3736,7361,48338,219
head b3b3cdab36,6721,48338,155
delta−640−64

Programme-level account for this package: 45,780 authored at the audit pin → 36,736 after round 1 (−9,044) → 36,672 after this PR (−64). Programme total −9,108, −19.9%.

(b) Ceiling rows — exactly two, no others.

rowbeforeafter
skills/objectstack-data/rules/security.md(no row — a discovered authored file without one is RED)2,480 (landed count, headroom 0)
skills/objectstack-data/SKILL.md13,89210,009 (landed count, headroom 0)

The entry row carried 1,339 of headroom at base, left un-re-locked by round 1; the re-lock takes all of it. git diff on scripts/check-skills-token-ratchet.mjs is those two rows and their comments — no third row moves.

(c) No added prose. Every sentence in rules/security.md is a sentence moved out of SKILL.md. The new file's only new bytes are its H1 (# Security & Access Control, 28 bytes); six moved ### headings are demoted to ## (−6 bytes). The entry gains one pointer line and one routing-table row, inside the "at most one line per moved section" allowance for six moved sections. Three sentences were deleted rather than moved — each listed below.

File map

moved section (entry, at base)linesbeforeafter
### Object-level permissions (RBAC)547–580350 tokrules/security.md## Object-level permissions (RBAC)
### Assigning a permission set to a user581–608406 tokrules/security.md## Assigning a permission set to a user
### Row-Level Security (RLS)621–672630 tokrules/security.md## Row-Level Security (RLS)
### Sensitive fields — secret type + requiredPermissions673–708321 tokrules/security.md## Sensitive fields …
### Multi-tenancy709–726167 tokrules/security.md## Multi-tenancy
### Platform-global / admin-only objects (visibility posture)727–769657 tokrules/security.md## Platform-global / admin-only objects …
### Access depth (scope-depth) — …609–620197 tokstays in SKILL.md — Leg-2 bound, see below
section lead (no object-level permissions / hooks key)541–54663 tokstays in SKILL.md — it is a rule about what ObjectSchema.create() refuses, and that belongs where objects are authored
### Cross-skill notes770–77777 tokdeleted, see below

Per-move record

findinglanding sitebeforeafter
DATA-I-04 (MOVE-TO rules/)skills/objectstack-data/rules/security.md (new)SKILL.md 12,553 tok; the Security & Access Control block is 239 lines / 2,867 tok of itSKILL.md 10,009 tok (−2,544); rules/security.md 2,480 tok; package −64
DATA-B-06 (MOVE-TO)skills/objectstack-data/SKILL.md, directly after the Skill Boundaries tablethe 9-row rules/ routing table sat at line 283 of 1,067, behind Core Concepts, the searchableFields section and Field Groupsit sits at line 40, beside the other routing construct in the file; byte-neutralSKILL.md is 40,034 bytes immediately before and immediately after the move

The Leg-2 constraint and its cost

check:skill-identifier-liveness Leg 2 registers access-scope-depth — file skills/objectstack-data/SKILL.md, heading ### Access depth (scope-depth) — the ERP "see my unit / my unit and below" axis, symbol ObjectAccessScopeSchema — and the binding is keyed by file path plus heading, so a bound heading never leaves its file. That section and its exhaustive value list (own · own_and_reports · unit · unit_and_below · org) therefore stay in the entry while the rest of the security topic moves.

The cost, stated rather than hidden: one topic now spans two files. A reader of rules/security.md gets RBAC bits, assignment, RLS, secret / requiredPermissions, tenancy and the platform-global posture; the declarative widening axis that composes with all of them is in the entry. The entry's pointer names the split so the reader is not left to discover it. scripts/check-skill-identifier-liveness.mjs is not edited by this PR.

Declared deletions (three)

Each is a duplicate the split would otherwise have carried across a file boundary, and each is inside the moved text, which is what "minus deletions" in condition (c) permits.

  1. ### Cross-skill notes (3 bullets, 77 tok). objectstack-api and objectstack-platform are already routed by the entry's own Skill Boundaries table; objectstack-formula is routed by the frontmatter and by three other entry sites (Conditional Field Rules, Field Type Selection, Linting & Generation Quality).
  2. The sharingModel four-value re-enumeration in the RLS section's owner-scoping bullet. The exhaustive table for those four values is in the entry's Required-properties block (added by round 1's DATA-F-01); after the split the parenthetical would be a second, unratcheted copy in another file. The bullet keeps sharingModel and its ADR-0056 D1 citation.
  3. Multi-tenancy's forward-pointer bullet ("Platform/env-global objects declare tenancy: { enabled: false } … see the visibility-posture recipe below"), which points at the section immediately beneath it, where the same two keys are stated and explained at length.

Premise notes

No finding was skipped as premise_false. One recorded qualification: DATA-I-04's stated rationale included "sits exactly at its ceiling, so any true addition must be paid for inside it", which round 1 already retired — at this PR's base SKILL.md measured 12,553 against a 13,892 ceiling, 1,339 of headroom. The finding's primary ground (progressive disclosure: the entry did not shrink to match the eight rules/ files it already has) is untouched, and #14568 = A ordered the split independently, so it is executed as written and the ceiling is re-locked to take the stale headroom back.

DATA-B-06's premise holds as written, with re-measured numbers: an 8-row table at line 312 of 1,216 at the audit pin is a 9-row table at line 283 of 1,067 at this base.

Gates — head b3b3cdab

The derived family is node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands re-derived after the last move against the real 4-path change set (scripts/check-skills-token-ratchet.mjs, scripts/role-word-baseline.json, skills/objectstack-data/SKILL.md, skills/objectstack-data/rules/security.md): 25 commands. Seven more were run that the derivation does not name but this change owes: the card's fence gates and the self-tests. All 32 ran under scripts/pm/os-verify-lock.sh with OS_VERIFY_LOCK_SLOT=issue-14297-r2; every exit code was captured by redirecting first and reading $? before any pipe.

31 exit 0, 1 exit 3 (NOT MEASURED). Each gate's own verdict line:

gateexitits own verdict line
node scripts/check-skills-token-ratchet.mjs032 authored bundle file(s) within their ceilings; 11 generator-owned file(s) measured, not ratcheted
node scripts/check-skills-token-ratchet.mjs --self-test064 cases pass
pnpm check:skill-identifier-liveness0Leg 1: 465 citation(s) over 42 published file(s) … Leg 2: 8 registered exhaustive section(s), 0 ledgered gap(s)
pnpm --filter @objectstack/spec run check:skill-examples0256 prose examples type-check across 3 surface(s) — every marked block parsed, so tsc ran the SEMANTIC pass on all of them
pnpm --filter @objectstack/spec run check:skill-docs0Skill docs in sync
pnpm --filter @objectstack/spec run check:skill-refs09 generated files in sync with packages/spec
pnpm check:skill-compatibility011 SKILL.md file(s) reconciled against 79 workspace packages
pnpm check:role-word0OK, no new occurrences of the reserved word
pnpm check:published-readme-links0176 outbound link(s) across 60 published markdown file(s): 0 root-relative, 0 non-canonical origin(s)
pnpm check:nul-bytes0scanned 8000 text file(s) … no raw ASCII control bytes
pnpm check:pm-skill-ratchet0CLAUDE.md is 86 lines (ceiling 86; headroom 0) — untouched, as required
pnpm check:pm-dispatch-gates0dispatch-gates self-test: 1240 cases pass
pnpm check:pm-governed-merges0243 assertions
pnpm check:skill-frame-sync04 copies of the decision frame are structurally isomorphic across 3 files
pnpm check:ratchet-remedy-authority0184 scripts swept … 12 mark the expanding remedy MAINTAINER-ONLY
node scripts/check-ci-filter-parity.mjs0all 130 declared cross-package glob(s) (92 unique) are covered
node scripts/check-cross-package-test-inputs.mjs · pnpm check:cross-package-test-inputs025 package(s) read outside themselves, all declared
node scripts/check-shard-attestation.mjs02 aggregate gate(s) count 3 declared leg(s) across 3 attesting job(s)
node scripts/pm/bare-root-worklist.mjs --self-test057 live row(s), 49 unreachable as spelled, 49 recorded verdict(s)
pnpm --filter @objectstack/lint run check:doc-formula-expressions014 predicate(s) on a statically determinable field layer judged clean
pnpm check:agent-test-spelling00 violations — 426 file(s)
pnpm check:bash32-floor026 tracked shell file(s) … name no bash 4+ construct
pnpm check:cli-command-ids0315 command-id literal(s) across 112 file(s) … all resolve
pnpm check:corpus-claim-drift0OK, no new claim sites beside a pinned spelling
pnpm check:doc-authoring0831 pinned site(s) across 231 file(s)
pnpm check:entry-guard0199 scripts/ file(s) — every entry guard goes through invoked-as.mjs
pnpm check:parse-guard0198 scripts/ file(s) — every TypeScript parse goes through ts-parse.mjs
pnpm check:pnpm-filter-targets0142/181 --filter occurrence(s) across 32 file(s) resolve
pnpm check:watch-hint-literal045 declaration(s) across 4 rostered name(s)
node scripts/check-skill-identifier-liveness.mjs --list0lists the 8 bindings; access-scope-depth still resolves in SKILL.md
node scripts/check-test-completeness.mjs3PREREQUISITE NOT MET — this gate grades a saved turbo run test log, and no log was named

check:skill-examples failed once, at exit 1, before it was measured: packages/spec/dist/**/*.d.ts is OLDER than packages/spec/src after origin/main was merged in. That is the gate refusing to compute a verdict against a stale build, not a finding. It was re-run after pnpm --workspace-concurrency=2 --filter '@objectstack/spec...' --filter '@objectstack/client-react...' --filter '@objectstack/client...' run build and is the exit 0 recorded above.

NOT MEASURED

  • node scripts/check-test-completeness.mjs — exit 3 by its own definition ("this gate exited before parsing a single summary line, so this result says NOTHING"). Not a red.
  • Repo-wide pnpm lint — narrowed to the one changed file in ESLint's population, and the narrowing is measured rather than assumed: (i) the population is read from eslint.config.mjs itself, whose one linting block is files: ['**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}'] — markdown and JSON are not members, so three of the four changed paths are outside it by the config's own declaration; (ii) pnpm exec eslint --no-inline-config --format json scripts/check-skills-token-ratchet.mjs reports 1 file linted, 0 errors, 0 warnings, exit 0; (iii) the config never enables type-aware linting (no parserOptions.project, no typed rules — eslint.config.mjs states this at :327 and a grep of every parserOptions confirms only ecmaVersion / sourceType), so this diff cannot move the verdict on any file it does not touch.
  • The always-runs CI tail (Type Check jobs, Test Core shards, Build Docs, the governed-surface guard) — CI owns those and runs them on this PR.

Follow-up for other packages (not edited here)

  • skills/objectstack-platform/SKILL.md:1212 routes a reader to "Assigning a permission set to a user" in objectstack-data. That section still exists under that exact heading, now one file deeper in rules/security.md, so nothing is broken and no gate is red; a future platform flight may want to name the file. Not touched — another package.
  • No #anchor link anywhere in skills/**, content/docs/** or packages/** points into the moved sections, so no link was rewritten. Swept for objectstack-data/SKILL.md#, and for each moved heading's slug.

Landing

Governed surface (skills/**) ⇒ this PR stays draft; review requests are the seat's step. Labels: skip-changeset (this PR releases nothing — scripts/check-empty-changeset.mjs enumerates ".github/, .claude/, skills/, docs/, content/, examples/, tests-only, and the like" as route 2, and its GREEN 3 self-test case pins a skills/**-only PR with no changeset as green) and needs:contract-review (published security-contract text — sharingModel, the permission scopes, the security lint ids, the tenant-wall posture — changes file).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1


Generated by Claude Code

DATA-I-04. The entry file carried a 239-line Security & Access Control
block; six of its seven subsections move verbatim into a new
`skills/objectstack-data/rules/security.md`. No sentence is added: the
new file's only new bytes are its H1, and the entry keeps a one-line
pointer plus one row in the routing table.
`### Access depth (scope-depth)` stays in SKILL.md. It is a registered
exhaustive section in `check:skill-identifier-liveness` Leg 2
(`access-scope-depth` -> `ObjectAccessScopeSchema`), keyed by file path
plus heading, and a bound heading never leaves its file.
Three declared deletions inside the moved text, each a duplicate that
the split would otherwise carry across a file boundary:
- `### Cross-skill notes` (3 bullets) — objectstack-api and
objectstack-platform are routed by the entry's Skill Boundaries table,
objectstack-formula by the frontmatter and by three other entry sites.
- the `sharingModel` four-value re-enumeration in the RLS bullet — the
exhaustive table lives in the entry's Required properties block.
- Multi-tenancy's forward-pointer bullet to the visibility-posture
recipe directly beneath it.
Ceilings, per the ruling's condition (b): one row for the new file
pinned at its landed count (2480), the entry row re-locked at its
landed count (13892 -> 10009). No other row changes.
Package (every file under skills/objectstack-data/, generated included):
38,219 -> 38,155 tokens, net -64.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
DATA-B-06 (MOVE-TO). The 9-row table telling an agent which `rules/`
file answers its question sat at line 283 of 1,067, behind Core
Concepts, the `searchableFields` section and Field Groups; an agent that
stops reading early never learns `rules/` exists. It now sits directly
after the Skill Boundaries table, which is the other routing construct
in the file.
Byte-neutral: the same 16 lines, moved. SKILL.md is 40,034 bytes before
and after, so the ceiling re-locked in the previous commit still holds
exactly.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
`check:role-word` went red as a ratchet-DOWN: the entry file's count
improved 2 -> 1 because the deleted `### Cross-skill notes` bullet
carried "role inheritance". The other occurrence is untouched, and the
new `rules/security.md` carries none, so no entry is added. The remedy
is the gate's own author-side one (`--update`), one shrinking line.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@os-litant@os-zhuang@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

skills(data): split security into rules/security.md under #14296 item 1 (package net −64 tokens) + DATA-B-06 - #14673

Merged
os-zhuang merged 5 commits into
mainfrom
claude/issue-14297-skills-data-security-split
Sep 2, 2026
Merged

skills(data): split security into rules/security.md under #14296 item 1 (package net −64 tokens) + DATA-B-06#14673
os-zhuang merged 5 commits into
mainfrom
claude/issue-14297-skills-data-security-split

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Part of #14297 — round 2 takes the deferred DATA-I-04 split plus DATA-B-06. The card stays open because DATA-F-07 (the defineHook() prescription) is a maintainer call parked on decision batch 3, so this PR must not carry a closing keyword for that card.

The two rulings

The three conditions, with numbers

(a) Token-neutral or negative on the package. Package = every file under skills/objectstack-data/, generated included, measured with node scripts/check-skills-token-ratchet.mjs before and after.

authored (the ratchet's own subtotal)references/_index.md (generated)package
base ca48cf3736,7361,48338,219
head b3b3cdab36,6721,48338,155
delta−640−64

Programme-level account for this package: 45,780 authored at the audit pin → 36,736 after round 1 (−9,044) → 36,672 after this PR (−64). Programme total −9,108, −19.9%.

(b) Ceiling rows — exactly two, no others.

rowbeforeafter
skills/objectstack-data/rules/security.md(no row — a discovered authored file without one is RED)2,480 (landed count, headroom 0)
skills/objectstack-data/SKILL.md13,89210,009 (landed count, headroom 0)

The entry row carried 1,339 of headroom at base, left un-re-locked by round 1; the re-lock takes all of it. git diff on scripts/check-skills-token-ratchet.mjs is those two rows and their comments — no third row moves.

(c) No added prose. Every sentence in rules/security.md is a sentence moved out of SKILL.md. The new file's only new bytes are its H1 (# Security & Access Control, 28 bytes); six moved ### headings are demoted to ## (−6 bytes). The entry gains one pointer line and one routing-table row, inside the "at most one line per moved section" allowance for six moved sections. Three sentences were deleted rather than moved — each listed below.

File map

moved section (entry, at base)linesbeforeafter
### Object-level permissions (RBAC)547–580350 tokrules/security.md## Object-level permissions (RBAC)
### Assigning a permission set to a user581–608406 tokrules/security.md## Assigning a permission set to a user
### Row-Level Security (RLS)621–672630 tokrules/security.md## Row-Level Security (RLS)
### Sensitive fields — secret type + requiredPermissions673–708321 tokrules/security.md## Sensitive fields …
### Multi-tenancy709–726167 tokrules/security.md## Multi-tenancy
### Platform-global / admin-only objects (visibility posture)727–769657 tokrules/security.md## Platform-global / admin-only objects …
### Access depth (scope-depth) — …609–620197 tokstays in SKILL.md — Leg-2 bound, see below
section lead (no object-level permissions / hooks key)541–54663 tokstays in SKILL.md — it is a rule about what ObjectSchema.create() refuses, and that belongs where objects are authored
### Cross-skill notes770–77777 tokdeleted, see below

Per-move record

findinglanding sitebeforeafter
DATA-I-04 (MOVE-TO rules/)skills/objectstack-data/rules/security.md (new)SKILL.md 12,553 tok; the Security & Access Control block is 239 lines / 2,867 tok of itSKILL.md 10,009 tok (−2,544); rules/security.md 2,480 tok; package −64
DATA-B-06 (MOVE-TO)skills/objectstack-data/SKILL.md, directly after the Skill Boundaries tablethe 9-row rules/ routing table sat at line 283 of 1,067, behind Core Concepts, the searchableFields section and Field Groupsit sits at line 40, beside the other routing construct in the file; byte-neutralSKILL.md is 40,034 bytes immediately before and immediately after the move

The Leg-2 constraint and its cost

check:skill-identifier-liveness Leg 2 registers access-scope-depth — file skills/objectstack-data/SKILL.md, heading ### Access depth (scope-depth) — the ERP "see my unit / my unit and below" axis, symbol ObjectAccessScopeSchema — and the binding is keyed by file path plus heading, so a bound heading never leaves its file. That section and its exhaustive value list (own · own_and_reports · unit · unit_and_below · org) therefore stay in the entry while the rest of the security topic moves.

The cost, stated rather than hidden: one topic now spans two files. A reader of rules/security.md gets RBAC bits, assignment, RLS, secret / requiredPermissions, tenancy and the platform-global posture; the declarative widening axis that composes with all of them is in the entry. The entry's pointer names the split so the reader is not left to discover it. scripts/check-skill-identifier-liveness.mjs is not edited by this PR.

Declared deletions (three)

Each is a duplicate the split would otherwise have carried across a file boundary, and each is inside the moved text, which is what "minus deletions" in condition (c) permits.

  1. ### Cross-skill notes (3 bullets, 77 tok). objectstack-api and objectstack-platform are already routed by the entry's own Skill Boundaries table; objectstack-formula is routed by the frontmatter and by three other entry sites (Conditional Field Rules, Field Type Selection, Linting & Generation Quality).
  2. The sharingModel four-value re-enumeration in the RLS section's owner-scoping bullet. The exhaustive table for those four values is in the entry's Required-properties block (added by round 1's DATA-F-01); after the split the parenthetical would be a second, unratcheted copy in another file. The bullet keeps sharingModel and its ADR-0056 D1 citation.
  3. Multi-tenancy's forward-pointer bullet ("Platform/env-global objects declare tenancy: { enabled: false } … see the visibility-posture recipe below"), which points at the section immediately beneath it, where the same two keys are stated and explained at length.

Premise notes

No finding was skipped as premise_false. One recorded qualification: DATA-I-04's stated rationale included "sits exactly at its ceiling, so any true addition must be paid for inside it", which round 1 already retired — at this PR's base SKILL.md measured 12,553 against a 13,892 ceiling, 1,339 of headroom. The finding's primary ground (progressive disclosure: the entry did not shrink to match the eight rules/ files it already has) is untouched, and #14568 = A ordered the split independently, so it is executed as written and the ceiling is re-locked to take the stale headroom back.

DATA-B-06's premise holds as written, with re-measured numbers: an 8-row table at line 312 of 1,216 at the audit pin is a 9-row table at line 283 of 1,067 at this base.

Gates — head b3b3cdab

The derived family is node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands re-derived after the last move against the real 4-path change set (scripts/check-skills-token-ratchet.mjs, scripts/role-word-baseline.json, skills/objectstack-data/SKILL.md, skills/objectstack-data/rules/security.md): 25 commands. Seven more were run that the derivation does not name but this change owes: the card's fence gates and the self-tests. All 32 ran under scripts/pm/os-verify-lock.sh with OS_VERIFY_LOCK_SLOT=issue-14297-r2; every exit code was captured by redirecting first and reading $? before any pipe.

31 exit 0, 1 exit 3 (NOT MEASURED). Each gate's own verdict line:

gateexitits own verdict line
node scripts/check-skills-token-ratchet.mjs032 authored bundle file(s) within their ceilings; 11 generator-owned file(s) measured, not ratcheted
node scripts/check-skills-token-ratchet.mjs --self-test064 cases pass
pnpm check:skill-identifier-liveness0Leg 1: 465 citation(s) over 42 published file(s) … Leg 2: 8 registered exhaustive section(s), 0 ledgered gap(s)
pnpm --filter @objectstack/spec run check:skill-examples0256 prose examples type-check across 3 surface(s) — every marked block parsed, so tsc ran the SEMANTIC pass on all of them
pnpm --filter @objectstack/spec run check:skill-docs0Skill docs in sync
pnpm --filter @objectstack/spec run check:skill-refs09 generated files in sync with packages/spec
pnpm check:skill-compatibility011 SKILL.md file(s) reconciled against 79 workspace packages
pnpm check:role-word0OK, no new occurrences of the reserved word
pnpm check:published-readme-links0176 outbound link(s) across 60 published markdown file(s): 0 root-relative, 0 non-canonical origin(s)
pnpm check:nul-bytes0scanned 8000 text file(s) … no raw ASCII control bytes
pnpm check:pm-skill-ratchet0CLAUDE.md is 86 lines (ceiling 86; headroom 0) — untouched, as required
pnpm check:pm-dispatch-gates0dispatch-gates self-test: 1240 cases pass
pnpm check:pm-governed-merges0243 assertions
pnpm check:skill-frame-sync04 copies of the decision frame are structurally isomorphic across 3 files
pnpm check:ratchet-remedy-authority0184 scripts swept … 12 mark the expanding remedy MAINTAINER-ONLY
node scripts/check-ci-filter-parity.mjs0all 130 declared cross-package glob(s) (92 unique) are covered
node scripts/check-cross-package-test-inputs.mjs · pnpm check:cross-package-test-inputs025 package(s) read outside themselves, all declared
node scripts/check-shard-attestation.mjs02 aggregate gate(s) count 3 declared leg(s) across 3 attesting job(s)
node scripts/pm/bare-root-worklist.mjs --self-test057 live row(s), 49 unreachable as spelled, 49 recorded verdict(s)
pnpm --filter @objectstack/lint run check:doc-formula-expressions014 predicate(s) on a statically determinable field layer judged clean
pnpm check:agent-test-spelling00 violations — 426 file(s)
pnpm check:bash32-floor026 tracked shell file(s) … name no bash 4+ construct
pnpm check:cli-command-ids0315 command-id literal(s) across 112 file(s) … all resolve
pnpm check:corpus-claim-drift0OK, no new claim sites beside a pinned spelling
pnpm check:doc-authoring0831 pinned site(s) across 231 file(s)
pnpm check:entry-guard0199 scripts/ file(s) — every entry guard goes through invoked-as.mjs
pnpm check:parse-guard0198 scripts/ file(s) — every TypeScript parse goes through ts-parse.mjs
pnpm check:pnpm-filter-targets0142/181 --filter occurrence(s) across 32 file(s) resolve
pnpm check:watch-hint-literal045 declaration(s) across 4 rostered name(s)
node scripts/check-skill-identifier-liveness.mjs --list0lists the 8 bindings; access-scope-depth still resolves in SKILL.md
node scripts/check-test-completeness.mjs3PREREQUISITE NOT MET — this gate grades a saved turbo run test log, and no log was named

check:skill-examples failed once, at exit 1, before it was measured: packages/spec/dist/**/*.d.ts is OLDER than packages/spec/src after origin/main was merged in. That is the gate refusing to compute a verdict against a stale build, not a finding. It was re-run after pnpm --workspace-concurrency=2 --filter '@objectstack/spec...' --filter '@objectstack/client-react...' --filter '@objectstack/client...' run build and is the exit 0 recorded above.

NOT MEASURED

  • node scripts/check-test-completeness.mjs — exit 3 by its own definition ("this gate exited before parsing a single summary line, so this result says NOTHING"). Not a red.
  • Repo-wide pnpm lint — narrowed to the one changed file in ESLint's population, and the narrowing is measured rather than assumed: (i) the population is read from eslint.config.mjs itself, whose one linting block is files: ['**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}'] — markdown and JSON are not members, so three of the four changed paths are outside it by the config's own declaration; (ii) pnpm exec eslint --no-inline-config --format json scripts/check-skills-token-ratchet.mjs reports 1 file linted, 0 errors, 0 warnings, exit 0; (iii) the config never enables type-aware linting (no parserOptions.project, no typed rules — eslint.config.mjs states this at :327 and a grep of every parserOptions confirms only ecmaVersion / sourceType), so this diff cannot move the verdict on any file it does not touch.
  • The always-runs CI tail (Type Check jobs, Test Core shards, Build Docs, the governed-surface guard) — CI owns those and runs them on this PR.

Follow-up for other packages (not edited here)

  • skills/objectstack-platform/SKILL.md:1212 routes a reader to "Assigning a permission set to a user" in objectstack-data. That section still exists under that exact heading, now one file deeper in rules/security.md, so nothing is broken and no gate is red; a future platform flight may want to name the file. Not touched — another package.
  • No #anchor link anywhere in skills/**, content/docs/** or packages/** points into the moved sections, so no link was rewritten. Swept for objectstack-data/SKILL.md#, and for each moved heading's slug.

Landing

Governed surface (skills/**) ⇒ this PR stays draft; review requests are the seat's step. Labels: skip-changeset (this PR releases nothing — scripts/check-empty-changeset.mjs enumerates ".github/, .claude/, skills/, docs/, content/, examples/, tests-only, and the like" as route 2, and its GREEN 3 self-test case pins a skills/**-only PR with no changeset as green) and needs:contract-review (published security-contract text — sharingModel, the permission scopes, the security lint ids, the tenant-wall posture — changes file).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1


Generated by Claude Code

DATA-I-04. The entry file carried a 239-line Security & Access Control
block; six of its seven subsections move verbatim into a new
`skills/objectstack-data/rules/security.md`. No sentence is added: the
new file's only new bytes are its H1, and the entry keeps a one-line
pointer plus one row in the routing table.
`### Access depth (scope-depth)` stays in SKILL.md. It is a registered
exhaustive section in `check:skill-identifier-liveness` Leg 2
(`access-scope-depth` -> `ObjectAccessScopeSchema`), keyed by file path
plus heading, and a bound heading never leaves its file.
Three declared deletions inside the moved text, each a duplicate that
the split would otherwise carry across a file boundary:
- `### Cross-skill notes` (3 bullets) — objectstack-api and
objectstack-platform are routed by the entry's Skill Boundaries table,
objectstack-formula by the frontmatter and by three other entry sites.
- the `sharingModel` four-value re-enumeration in the RLS bullet — the
exhaustive table lives in the entry's Required properties block.
- Multi-tenancy's forward-pointer bullet to the visibility-posture
recipe directly beneath it.
Ceilings, per the ruling's condition (b): one row for the new file
pinned at its landed count (2480), the entry row re-locked at its
landed count (13892 -> 10009). No other row changes.
Package (every file under skills/objectstack-data/, generated included):
38,219 -> 38,155 tokens, net -64.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
DATA-B-06 (MOVE-TO). The 9-row table telling an agent which `rules/`
file answers its question sat at line 283 of 1,067, behind Core
Concepts, the `searchableFields` section and Field Groups; an agent that
stops reading early never learns `rules/` exists. It now sits directly
after the Skill Boundaries table, which is the other routing construct
in the file.
Byte-neutral: the same 16 lines, moved. SKILL.md is 40,034 bytes before
and after, so the ceiling re-locked in the previous commit still holds
exactly.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
`check:role-word` went red as a ratchet-DOWN: the entry file's count
improved 2 -> 1 because the deleted `### Cross-skill notes` bullet
carried "role inheritance". The other occurrence is untouched, and the
new `rules/security.md` carries none, so no entry is added. The remedy
is the gate's own author-side one (`--update`), one shrinking line.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@os-litant@os-zhuang@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

skills(data): split security into rules/security.md under #14296 item 1 (package net −64 tokens) + DATA-B-06 - #14673

Merged
os-zhuang merged 5 commits into
mainfrom
claude/issue-14297-skills-data-security-split
Sep 2, 2026
Merged

skills(data): split security into rules/security.md under #14296 item 1 (package net −64 tokens) + DATA-B-06#14673
os-zhuang merged 5 commits into
mainfrom
claude/issue-14297-skills-data-security-split

Conversation

@os-litant

Copy link
Copy Markdown
Collaborator

Part of #14297 — round 2 takes the deferred DATA-I-04 split plus DATA-B-06. The card stays open because DATA-F-07 (the defineHook() prescription) is a maintainer call parked on decision batch 3, so this PR must not carry a closing keyword for that card.

The two rulings

The three conditions, with numbers

(a) Token-neutral or negative on the package. Package = every file under skills/objectstack-data/, generated included, measured with node scripts/check-skills-token-ratchet.mjs before and after.

authored (the ratchet's own subtotal)references/_index.md (generated)package
base ca48cf3736,7361,48338,219
head b3b3cdab36,6721,48338,155
delta−640−64

Programme-level account for this package: 45,780 authored at the audit pin → 36,736 after round 1 (−9,044) → 36,672 after this PR (−64). Programme total −9,108, −19.9%.

(b) Ceiling rows — exactly two, no others.

rowbeforeafter
skills/objectstack-data/rules/security.md(no row — a discovered authored file without one is RED)2,480 (landed count, headroom 0)
skills/objectstack-data/SKILL.md13,89210,009 (landed count, headroom 0)

The entry row carried 1,339 of headroom at base, left un-re-locked by round 1; the re-lock takes all of it. git diff on scripts/check-skills-token-ratchet.mjs is those two rows and their comments — no third row moves.

(c) No added prose. Every sentence in rules/security.md is a sentence moved out of SKILL.md. The new file's only new bytes are its H1 (# Security & Access Control, 28 bytes); six moved ### headings are demoted to ## (−6 bytes). The entry gains one pointer line and one routing-table row, inside the "at most one line per moved section" allowance for six moved sections. Three sentences were deleted rather than moved — each listed below.

File map

moved section (entry, at base)linesbeforeafter
### Object-level permissions (RBAC)547–580350 tokrules/security.md## Object-level permissions (RBAC)
### Assigning a permission set to a user581–608406 tokrules/security.md## Assigning a permission set to a user
### Row-Level Security (RLS)621–672630 tokrules/security.md## Row-Level Security (RLS)
### Sensitive fields — secret type + requiredPermissions673–708321 tokrules/security.md## Sensitive fields …
### Multi-tenancy709–726167 tokrules/security.md## Multi-tenancy
### Platform-global / admin-only objects (visibility posture)727–769657 tokrules/security.md## Platform-global / admin-only objects …
### Access depth (scope-depth) — …609–620197 tokstays in SKILL.md — Leg-2 bound, see below
section lead (no object-level permissions / hooks key)541–54663 tokstays in SKILL.md — it is a rule about what ObjectSchema.create() refuses, and that belongs where objects are authored
### Cross-skill notes770–77777 tokdeleted, see below

Per-move record

findinglanding sitebeforeafter
DATA-I-04 (MOVE-TO rules/)skills/objectstack-data/rules/security.md (new)SKILL.md 12,553 tok; the Security & Access Control block is 239 lines / 2,867 tok of itSKILL.md 10,009 tok (−2,544); rules/security.md 2,480 tok; package −64
DATA-B-06 (MOVE-TO)skills/objectstack-data/SKILL.md, directly after the Skill Boundaries tablethe 9-row rules/ routing table sat at line 283 of 1,067, behind Core Concepts, the searchableFields section and Field Groupsit sits at line 40, beside the other routing construct in the file; byte-neutralSKILL.md is 40,034 bytes immediately before and immediately after the move

The Leg-2 constraint and its cost

check:skill-identifier-liveness Leg 2 registers access-scope-depth — file skills/objectstack-data/SKILL.md, heading ### Access depth (scope-depth) — the ERP "see my unit / my unit and below" axis, symbol ObjectAccessScopeSchema — and the binding is keyed by file path plus heading, so a bound heading never leaves its file. That section and its exhaustive value list (own · own_and_reports · unit · unit_and_below · org) therefore stay in the entry while the rest of the security topic moves.

The cost, stated rather than hidden: one topic now spans two files. A reader of rules/security.md gets RBAC bits, assignment, RLS, secret / requiredPermissions, tenancy and the platform-global posture; the declarative widening axis that composes with all of them is in the entry. The entry's pointer names the split so the reader is not left to discover it. scripts/check-skill-identifier-liveness.mjs is not edited by this PR.

Declared deletions (three)

Each is a duplicate the split would otherwise have carried across a file boundary, and each is inside the moved text, which is what "minus deletions" in condition (c) permits.

  1. ### Cross-skill notes (3 bullets, 77 tok). objectstack-api and objectstack-platform are already routed by the entry's own Skill Boundaries table; objectstack-formula is routed by the frontmatter and by three other entry sites (Conditional Field Rules, Field Type Selection, Linting & Generation Quality).
  2. The sharingModel four-value re-enumeration in the RLS section's owner-scoping bullet. The exhaustive table for those four values is in the entry's Required-properties block (added by round 1's DATA-F-01); after the split the parenthetical would be a second, unratcheted copy in another file. The bullet keeps sharingModel and its ADR-0056 D1 citation.
  3. Multi-tenancy's forward-pointer bullet ("Platform/env-global objects declare tenancy: { enabled: false } … see the visibility-posture recipe below"), which points at the section immediately beneath it, where the same two keys are stated and explained at length.

Premise notes

No finding was skipped as premise_false. One recorded qualification: DATA-I-04's stated rationale included "sits exactly at its ceiling, so any true addition must be paid for inside it", which round 1 already retired — at this PR's base SKILL.md measured 12,553 against a 13,892 ceiling, 1,339 of headroom. The finding's primary ground (progressive disclosure: the entry did not shrink to match the eight rules/ files it already has) is untouched, and #14568 = A ordered the split independently, so it is executed as written and the ceiling is re-locked to take the stale headroom back.

DATA-B-06's premise holds as written, with re-measured numbers: an 8-row table at line 312 of 1,216 at the audit pin is a 9-row table at line 283 of 1,067 at this base.

Gates — head b3b3cdab

The derived family is node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands re-derived after the last move against the real 4-path change set (scripts/check-skills-token-ratchet.mjs, scripts/role-word-baseline.json, skills/objectstack-data/SKILL.md, skills/objectstack-data/rules/security.md): 25 commands. Seven more were run that the derivation does not name but this change owes: the card's fence gates and the self-tests. All 32 ran under scripts/pm/os-verify-lock.sh with OS_VERIFY_LOCK_SLOT=issue-14297-r2; every exit code was captured by redirecting first and reading $? before any pipe.

31 exit 0, 1 exit 3 (NOT MEASURED). Each gate's own verdict line:

gateexitits own verdict line
node scripts/check-skills-token-ratchet.mjs032 authored bundle file(s) within their ceilings; 11 generator-owned file(s) measured, not ratcheted
node scripts/check-skills-token-ratchet.mjs --self-test064 cases pass
pnpm check:skill-identifier-liveness0Leg 1: 465 citation(s) over 42 published file(s) … Leg 2: 8 registered exhaustive section(s), 0 ledgered gap(s)
pnpm --filter @objectstack/spec run check:skill-examples0256 prose examples type-check across 3 surface(s) — every marked block parsed, so tsc ran the SEMANTIC pass on all of them
pnpm --filter @objectstack/spec run check:skill-docs0Skill docs in sync
pnpm --filter @objectstack/spec run check:skill-refs09 generated files in sync with packages/spec
pnpm check:skill-compatibility011 SKILL.md file(s) reconciled against 79 workspace packages
pnpm check:role-word0OK, no new occurrences of the reserved word
pnpm check:published-readme-links0176 outbound link(s) across 60 published markdown file(s): 0 root-relative, 0 non-canonical origin(s)
pnpm check:nul-bytes0scanned 8000 text file(s) … no raw ASCII control bytes
pnpm check:pm-skill-ratchet0CLAUDE.md is 86 lines (ceiling 86; headroom 0) — untouched, as required
pnpm check:pm-dispatch-gates0dispatch-gates self-test: 1240 cases pass
pnpm check:pm-governed-merges0243 assertions
pnpm check:skill-frame-sync04 copies of the decision frame are structurally isomorphic across 3 files
pnpm check:ratchet-remedy-authority0184 scripts swept … 12 mark the expanding remedy MAINTAINER-ONLY
node scripts/check-ci-filter-parity.mjs0all 130 declared cross-package glob(s) (92 unique) are covered
node scripts/check-cross-package-test-inputs.mjs · pnpm check:cross-package-test-inputs025 package(s) read outside themselves, all declared
node scripts/check-shard-attestation.mjs02 aggregate gate(s) count 3 declared leg(s) across 3 attesting job(s)
node scripts/pm/bare-root-worklist.mjs --self-test057 live row(s), 49 unreachable as spelled, 49 recorded verdict(s)
pnpm --filter @objectstack/lint run check:doc-formula-expressions014 predicate(s) on a statically determinable field layer judged clean
pnpm check:agent-test-spelling00 violations — 426 file(s)
pnpm check:bash32-floor026 tracked shell file(s) … name no bash 4+ construct
pnpm check:cli-command-ids0315 command-id literal(s) across 112 file(s) … all resolve
pnpm check:corpus-claim-drift0OK, no new claim sites beside a pinned spelling
pnpm check:doc-authoring0831 pinned site(s) across 231 file(s)
pnpm check:entry-guard0199 scripts/ file(s) — every entry guard goes through invoked-as.mjs
pnpm check:parse-guard0198 scripts/ file(s) — every TypeScript parse goes through ts-parse.mjs
pnpm check:pnpm-filter-targets0142/181 --filter occurrence(s) across 32 file(s) resolve
pnpm check:watch-hint-literal045 declaration(s) across 4 rostered name(s)
node scripts/check-skill-identifier-liveness.mjs --list0lists the 8 bindings; access-scope-depth still resolves in SKILL.md
node scripts/check-test-completeness.mjs3PREREQUISITE NOT MET — this gate grades a saved turbo run test log, and no log was named

check:skill-examples failed once, at exit 1, before it was measured: packages/spec/dist/**/*.d.ts is OLDER than packages/spec/src after origin/main was merged in. That is the gate refusing to compute a verdict against a stale build, not a finding. It was re-run after pnpm --workspace-concurrency=2 --filter '@objectstack/spec...' --filter '@objectstack/client-react...' --filter '@objectstack/client...' run build and is the exit 0 recorded above.

NOT MEASURED

  • node scripts/check-test-completeness.mjs — exit 3 by its own definition ("this gate exited before parsing a single summary line, so this result says NOTHING"). Not a red.
  • Repo-wide pnpm lint — narrowed to the one changed file in ESLint's population, and the narrowing is measured rather than assumed: (i) the population is read from eslint.config.mjs itself, whose one linting block is files: ['**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}'] — markdown and JSON are not members, so three of the four changed paths are outside it by the config's own declaration; (ii) pnpm exec eslint --no-inline-config --format json scripts/check-skills-token-ratchet.mjs reports 1 file linted, 0 errors, 0 warnings, exit 0; (iii) the config never enables type-aware linting (no parserOptions.project, no typed rules — eslint.config.mjs states this at :327 and a grep of every parserOptions confirms only ecmaVersion / sourceType), so this diff cannot move the verdict on any file it does not touch.
  • The always-runs CI tail (Type Check jobs, Test Core shards, Build Docs, the governed-surface guard) — CI owns those and runs them on this PR.

Follow-up for other packages (not edited here)

  • skills/objectstack-platform/SKILL.md:1212 routes a reader to "Assigning a permission set to a user" in objectstack-data. That section still exists under that exact heading, now one file deeper in rules/security.md, so nothing is broken and no gate is red; a future platform flight may want to name the file. Not touched — another package.
  • No #anchor link anywhere in skills/**, content/docs/** or packages/** points into the moved sections, so no link was rewritten. Swept for objectstack-data/SKILL.md#, and for each moved heading's slug.

Landing

Governed surface (skills/**) ⇒ this PR stays draft; review requests are the seat's step. Labels: skip-changeset (this PR releases nothing — scripts/check-empty-changeset.mjs enumerates ".github/, .claude/, skills/, docs/, content/, examples/, tests-only, and the like" as route 2, and its GREEN 3 self-test case pins a skills/**-only PR with no changeset as green) and needs:contract-review (published security-contract text — sharingModel, the permission scopes, the security lint ids, the tenant-wall posture — changes file).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1


Generated by Claude Code

DATA-I-04. The entry file carried a 239-line Security & Access Control
block; six of its seven subsections move verbatim into a new
`skills/objectstack-data/rules/security.md`. No sentence is added: the
new file's only new bytes are its H1, and the entry keeps a one-line
pointer plus one row in the routing table.
`### Access depth (scope-depth)` stays in SKILL.md. It is a registered
exhaustive section in `check:skill-identifier-liveness` Leg 2
(`access-scope-depth` -> `ObjectAccessScopeSchema`), keyed by file path
plus heading, and a bound heading never leaves its file.
Three declared deletions inside the moved text, each a duplicate that
the split would otherwise carry across a file boundary:
- `### Cross-skill notes` (3 bullets) — objectstack-api and
objectstack-platform are routed by the entry's Skill Boundaries table,
objectstack-formula by the frontmatter and by three other entry sites.
- the `sharingModel` four-value re-enumeration in the RLS bullet — the
exhaustive table lives in the entry's Required properties block.
- Multi-tenancy's forward-pointer bullet to the visibility-posture
recipe directly beneath it.
Ceilings, per the ruling's condition (b): one row for the new file
pinned at its landed count (2480), the entry row re-locked at its
landed count (13892 -> 10009). No other row changes.
Package (every file under skills/objectstack-data/, generated included):
38,219 -> 38,155 tokens, net -64.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
DATA-B-06 (MOVE-TO). The 9-row table telling an agent which `rules/`
file answers its question sat at line 283 of 1,067, behind Core
Concepts, the `searchableFields` section and Field Groups; an agent that
stops reading early never learns `rules/` exists. It now sits directly
after the Skill Boundaries table, which is the other routing construct
in the file.
Byte-neutral: the same 16 lines, moved. SKILL.md is 40,034 bytes before
and after, so the ceiling re-locked in the previous commit still holds
exactly.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
`check:role-word` went red as a ratchet-DOWN: the entry file's count
improved 2 -> 1 because the deleted `### Cross-skill notes` bullet
carried "role inheritance". The other occurrence is untouched, and the
new `rules/security.md` carries none, so no entry is added. The remedy
is the gate's own author-side one (`--update`), one shrinking line.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@os-litant@os-zhuang@claude