Skip to content

Commit 049b557

Browse files
committed
docs(spec): state that skill.permissions is REJECTED, not silently stripped (#7567)
`SkillSchema`'s docblock NOTE paragraph said an authored `permissions` key "is unknown to this schema and silently stripped at parse time." The behaviour changed since that was written: the key is now REFUSED outright by `guidance.permissions`, with a located message telling the author to gate at the agent level instead. Rewrite the NOTE paragraph to state the current truth and point at the refusal message below it in the same file. The refusal message itself is untouched — its own "stripped in silence" phrase narrates history, not current behaviour, and is correct as written. Every input parses byte-identically before and after (git diff touches only comment lines). Claude-Session: https://claude.ai/code/session_016R9de1FqP7NvwKvqXi92Gh
1 parent f1544e2 commit 049b557

2 files changed

Lines changed: 34 additions & 2 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
"@objectstack/spec": patch
3+
---
4+
5+
docs(spec): state that a `permissions` key on a skill is REJECTED, not stripped (#7567)
6+
7+
`SkillSchema`'s docblock carried a `NOTE` paragraph saying an authored
8+
`permissions` key "is unknown to this schema and silently stripped at parse
9+
time." That was true once, but the behaviour changed: `SkillSchema` is a
10+
`strictObject` whose `guidance.permissions` entry now REFUSES an authored
11+
`permissions` key outright, with a located message telling the author to gate
12+
at the agent level instead (`agent.access` / `agent.permissions`, enforced
13+
since #1884). The docblock's stale present tense was the only thing still
14+
saying "stripped" — a reader could conclude the authoring surface was still
15+
lax exactly where it is now strict.
16+
17+
Only the `NOTE` paragraph's wording changes: it now says the key is rejected
18+
at parse time and points at the located refusal message
19+
(`guidance.permissions`) below it in the same file. The refusal message
20+
itself is untouched — its own "this was stripped in silence" phrase narrates
21+
the historical reason for the refusal, not current behaviour, and stays
22+
correct as written. Every input parses byte-identically before and after this
23+
change (`git diff` touches only comment lines); `pnpm --filter @objectstack/spec
24+
typecheck` and the full spec test suite (9840 tests) are green, and
25+
`check:docs` reports all 231 generated files still in sync — this paragraph
26+
is an inner/property-level TSDoc comment, not the module-level blurb
27+
`build-docs.ts` renders, so no generated doc changes.
28+
29+
Adds a patch changeset for `@objectstack/spec`, following the #7444 / #7473 /
30+
#7565 precedent for describe/TSDoc-only spec docs fixes.

packages/spec/src/ai/skill.zod.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,10 @@ export type SkillTriggerCondition = z.input<typeof SkillTriggerConditionSchema>;
240240
* capability is gated at the AGENT level (`agent.access` / `agent.permissions`,
241241
* both enforced at the chat route), and each tool enforces its own authz when
242242
* invoked. A `permissions` key authored on a skill is unknown to this schema
243-
* and silently stripped at parse time — it grants and restricts nothing
244-
* (ADR-0049: no unenforced security-shaped fields). Do not author one.
243+
* and is REJECTED outright at parse time, with a located message keyed on
244+
* `permissions` (see `guidance.permissions` below) pointing the author at the
245+
* agent-level gate instead (ADR-0049: no unenforced security-shaped fields).
246+
* Do not author one.
245247
*
246248
* @example
247249
* ```ts

0 commit comments

Comments
 (0)