Skip to content

Commit 1134519

Browse files
docs(skills): name the capability advisory, the plugins[] wiring check and os verify --json capabilities (#35281)
<!-- claude-projects-attribution: {"github_login":"os-bill"} --> _Requested by **Bill** · [project thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wg1XdbbGasMNVx41tq3hZKV4)_ Fixes #35171 Clause-②: no Metadata-protocol: none ## 维护者速读 - **改了什么**:两处技能文字各补一句。`objectstack-data` 的层级范围(hierarchy scope)说明:企业插件要放进 `plugins[]` 才算接上;缺失或没接上只是提示,`os validate` 报警告,`os verify --json` 列在 `capabilities` 里。`objectstack-project` 的 `os verify` 行:能力检查在这里只是提示,`--json` 字段名 `capabilities`。 - **为什么改**:PR #35168 让 `os verify` 也跑能力检查并加了 `capabilities` 字段,技能还没提到,AI 写应用时不知道去哪看这个提示。 - **风险与回滚**:只改技能文字,不动代码;token 上限一行没动,新增文字由同文件删除的重复句付账。回滚就是 revert 本 PR。 - **先看**:`skills/objectstack-data/SKILL.md`(层级范围那段,看措辞是否与 #35168 实际行为一致);`skills/objectstack-project/SKILL.md`(`os verify` 行与其下的 ⛔ 句);`.changeset/35171-skills-verify-capabilities.md`。 - **两分钟验证**:`node scripts/check-skills-token-ratchet.mjs`,预期两文件 `6709 / 6710 (-1)` 与 `2900 / 2901 (-1)`,末行 ✓。 - **需要你做的**:无,席位落地(Tier S 技能文字,等席位合同审核记录)。 ## What changes The card, as narrowed by its premise correction (comment 6974886591): the skills did not name the capability advisory, the `plugins[]` wiring check, or the `capabilities` field that PR #35168 added to `os verify --json`. Wording follows what shipped: `packages/cli/src/utils/capability-preflight.ts` (`judgeDeclaredCapabilities`, the unwired-provider message), `packages/cli/src/commands/verify.ts` (`runCapabilityAdvisories`, never changes the exit code) and `content/docs/deployment/cli.mdx` (the `capabilities` member: `token`, `message`, `validate`). - `skills/objectstack-data/SKILL.md`, access-depth section: the hierarchy-relative scopes need `@objectstack/security-enterprise` **in `plugins[]`**; a missing or unwired plugin is only advised, `os validate` warns and `os verify --json` lists it in `capabilities`. - `skills/objectstack-project/SKILL.md`, the `os verify` row of the check table: `os validate`'s capability findings are advisory only there (`--json`: `capabilities`). - `.changeset/35171-skills-verify-capabilities.md`: `@objectstack/skills` patch. One pointer-grade line per place; the docs are not restated. ### Ratchet payment Standing ruling, quoted: maintainer 2026-10-27 「A:先削重复,余额按实测提高」 (ruling record 6513306068, letter B). Restatement was cut first in the same files, and the remainder by measurement is zero: no ceiling row moves and `scripts/check-skills-token-ratchet.mjs` is untouched. Deleted, each a restatement in the same file: - data: the "Full rules" link to `rules/security.md`, which the Quick Reference list already gives; the related-title search example's code comment, which restated the sentence directly above it. (The `private` row's sharing pointer, cut in the first head, is restored: contract review 6997435800 S1, it is the served Object Definition section's only widening pointer.) - project: "so the app never hand-writes it" above the check table (the ⛔ paragraph under the table says it); "Nothing in its row is checked until someone runs it", which restated the clause before it. | File | tokens before → after (ceiling) | lines before → after | |:--|:--|:--| | `skills/objectstack-data/SKILL.md` | 6710 → 6709 (6710) | 478 → 477 | | `skills/objectstack-project/SKILL.md` | 2901 → 2900 (2901) | 207 → 206 | | all `SKILL.md` in the bundle | — | 4830 → 4828 | | ratcheted (authored) total | 194843 → 194842 | — | Readings from the token ratchet at `f4dbcc21` and at head `1e736af7`; lines by `wc -l`. ## Tests Text-only change to the published skills; no package source, no test file. Gate readings at head `1e736af7`: <details><summary>Derived gate families (dispatch-gates --commands, 49): 45 exit 0, 4 NOT MEASURED</summary> - `node scripts/check-skills-token-ratchet.mjs` exit 0: "59 authored bundle file(s) within their ceilings". - `pnpm --filter @objectstack/spec run check:skill-docs` exit 0: "Skill docs in sync". - `pnpm --filter @objectstack/spec run check:skill-served-sections` exit 0: "24 served section(s), each heading exactly once in its file". - `pnpm check:skill-links` exit 0: "266 relative link(s) in 73 published skill file(s) resolve". - `pnpm check:skill-identifier-liveness` exit 0: "484 citation(s) over 73 published file(s)". - `pnpm --filter @objectstack/lint run check:doc-formula-expressions` exit 0 after building `@objectstack/formula` and `@objectstack/lint` (first run exit 3, prerequisite not met). - `pnpm check:nul-bytes`, `pnpm check:doc-authoring` and the rest: exit 0. - NOT MEASURED, exit 3, prerequisite not met (they need a whole-workspace `pnpm build`, and this diff changes no package's build output): `check:dts-closure`, `check:dual-build-cjs-loads`, `check:lean-entry-closure`, `check:sourcemap-no-sources-content`. CI's Lint & Repo Gates runs them. - `dispatch-gates --ran` with exit codes: "49 derived famil(ies) accounted for — 45 run, 4 NOT-MEASURED". </details> <details><summary>Overlap</summary> `node scripts/pm/overlap-check.mjs --branch=HEAD`: "VERDICT clean exit 0"; merges cleanly with origin/main, with #35260 and with #35129. The first draft cut the testing section's opening sentences and conflicted with #35260, which rewrites that paragraph; the payment was moved elsewhere in the same file. </details> ## Acceptance notes - `skills/objectstack-platform/SKILL.md`, "Declaring is a demand": it says a declared capability whose provider package is absent is a hard boot error. For `hierarchy-security`, `os serve` prints a warning and boots (`serve.ts`, the start-up advisory). The same file's capability list already says that token loads through `plugins[]`. Not in this card's file surface; recorded here, not changed. - `skills/objectstack-data/evals/hooks-security-seeds-datasources.json` has a case that grades `hierarchy-security`. Its expected output is still correct and was left alone. ## Verification - `os verify` stage 1 runs `judgeDeclaredCapabilities` and maps errors to `validate: 'error'` and warnings to `validate: 'warning'`. The exit code never reads them (`verify.ts` `runCapabilityAdvisories`). - An enterprise package that is installed but not provided by any `plugins[]` entry renders "… is installed, but no entry of `plugins[]` comes from it …", a warning under `os validate` (`preflightProviderWiring`). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Utp6CazXu8zyYD5PC6J2u7 <!-- signed: repo:objectstack#5 · os-bill · session_01Utp6CazXu8zyYD5PC6J2u7 --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 3fb7025 commit 1134519

3 files changed

Lines changed: 22 additions & 11 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the hierarchy-scope row and the `os verify` row name the capability advisory, the `plugins[]` wiring check and `os verify --json`'s `capabilities`
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`objectstack-data`'s access-depth section now says the hierarchy-relative scopes need the `@objectstack/security-enterprise` plugin in `plugins[]`, not only installed, and that the CLI only advises on a missing or unwired plugin: `os validate` warns, and `os verify --json` lists it in `capabilities`. The same sentence now says the stack, not the grant, declares `requires: ['hierarchy-security']`.
11+
12+
`objectstack-project`'s `os verify` row now says that `os validate`'s capability findings are advisory there, carried on `--json` as `capabilities`.
13+
14+
Both files pay for the new text by deleting restatement in the same file: a duplicate link to the security rules that the quick reference already gives, the code comment in the related-title search example, which restated the sentence above it, "so the app never hand-writes it" above the check table (the paragraph under it says so), and "Nothing in its row is checked until someone runs it", which restated the clause before it. Neither file's token ceiling moves.

‎skills/objectstack-data/SKILL.md‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ record's title, copy that title into a **stored field on this object** and
147147
declare *that* field searchable. A task list searched by project name:
148148

149149
```typescript
150-
// `project_name` is a stored, denormalized mirror of the parent's title.
151150
{
152151
name: 'task',
153152
enable: { searchable: true },
@@ -404,8 +403,6 @@ Per-object access control is authored in **permission sets**, not on the object
404403
schema. There is no object-level `permissions` key (and no `hooks` key either) —
405404
`ObjectSchema.create()` **rejects** both as unknown keys.
406405

407-
Full rules: **[Security & Access Control](./rules/security.md)**.
408-
409406
### Access depth (scope-depth) — the ERP "see my unit / my unit and below" axis
410407

411408
On an owner-scoped (`private`) object, a per-object grant in a permission set may
@@ -414,9 +411,10 @@ hand-writing an RLS policy (ADR-0057 D1): `own` (default) · `own_and_reports`
414411
`unit` · `unit_and_below` · `org`. It resolves at request time into an
415412
`owner_id IN (…)` set and AND-injects like RLS. ⚠️ Open-core boundary (ADR-0016):
416413
only `own` and `org` work in open source — the hierarchy-relative three need the
417-
paid `@objectstack/security-enterprise` plugin, **fail closed to `own`** without
418-
it, and `defineStack` errors unless the grant declares
419-
`requires: ['hierarchy-security']`.
414+
paid `@objectstack/security-enterprise` plugin in `plugins[]`, **fail closed to
415+
`own`** without it, and `defineStack` errors unless the stack declares
416+
`requires: ['hierarchy-security']`. The CLI only advises on a missing or unwired
417+
plugin: `os validate` warns, `os verify --json` lists it in `capabilities`.
420418

421419
### Ownership queues — park a record for a team to claim
422420

‎skills/objectstack-project/SKILL.md‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,17 @@ use it instead of re-checking them in a test.
8585
pnpm validate && pnpm lint && pnpm typecheck && pnpm test
8686
```
8787

88-
What the platform checks at 18.x, so the app never hand-writes it:
88+
What the platform checks at 18.x:
8989

9090
| Tool | Checks |
9191
|:--|:--|
9292
| `os validate` (the same rules `os build` runs) | Protocol schema; CEL expressions and their `record.<field>` paths; references between metadata (fields, objects, views, actions, picklists, capabilities, approvers); dashboard widget bindings and dataset members; view, form and page shape; flow trigger readiness and undeclared flow cycles; sharing and row-level security enforceability; seed rows against state machines; package docs; a provider for every required capability |
9393
| `os lint` | The shared author-time rules again, plus its own: naming and label style, hook bodies that stop lowering to metadata-only bodies, and translation coverage (a missing non-source locale is an error only with `--i18n-strict`) |
94-
| `os verify` | Boots the app and writes over REST: every field type round-trips. `--rls`: a user who cannot read a record cannot write it. Also opt-in: `--reference-shapes`, `--delete-behaviors`, `--unique-scopes`, `--parent-write-reach`, `--dashboard-windows`, `--multi-tenant` |
94+
| `os verify` | Boots the app and writes over REST: every field type round-trips. `--rls`: a user who cannot read a record cannot write it. Also opt-in: `--reference-shapes`, `--delete-behaviors`, `--unique-scopes`, `--parent-write-reach`, `--dashboard-windows`, `--multi-tenant`. `os validate`'s capability findings: advisory here (`--json`: `capabilities`) |
9595
| `pnpm typecheck` | Types against `@objectstack/spec` |
9696

97-
⛔ `os verify` is not one of the four and not in the scaffold's CI. Nothing in
98-
its row is checked until someone runs it: `npx os verify --rls` before a
99-
release, or as a CI step.
97+
⛔ `os verify` is not one of the four and not in the scaffold's CI: run
98+
`npx os verify --rls` before a release, or as a CI step.
10099
`npx os explain` lists only the rules that carry an explanation, not every
101100
check. Unsure whether a check exists? Inject the defect and run the command: if
102101
it fails, the platform checks it.

0 commit comments

Comments
 (0)