Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .changeset/35171-skills-verify-capabilities.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
'@objectstack/skills': patch
---

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`

Clause-②: no
Metadata-protocol: none

`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']`.

`objectstack-project`'s `os verify` row now says that `os validate`'s capability findings are advisory there, carried on `--json` as `capabilities`.

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.
10 changes: 4 additions & 6 deletions skills/objectstack-data/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ record's title, copy that title into a **stored field on this object** and
declare *that* field searchable. A task list searched by project name:

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

Full rules: **[Security & Access Control](./rules/security.md)**.

### Access depth (scope-depth) — the ERP "see my unit / my unit and below" axis

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

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

Expand Down
9 changes: 4 additions & 5 deletions skills/objectstack-project/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,17 @@ use it instead of re-checking them in a test.
pnpm validate && pnpm lint && pnpm typecheck && pnpm test
```

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

| Tool | Checks |
|:--|:--|
| `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 |
| `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`) |
| `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 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`) |
| `pnpm typecheck` | Types against `@objectstack/spec` |

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