Commit 5f2e54c
docs(spec): align the skill.tools docblock with ADR-0109's authoring model (#10669)
* docs(spec): align the skill.tools docblock with ADR-0109's authoring model
The `SkillSchema.tools` docblock told authors that tools "should also be
registered as first-class metadata (type: 'tool') unless they are dynamically
materialised at runtime" — the shape ADR-0109 explicitly rejected, with the
exemption inverted: it treated the materialised path as the exception when
ADR-0109 makes it, together with the platform registry, the rule. The sibling
docblock over `stack.zod.ts`'s `tools` already stated the correct model, so the
package shipped two contradictory answers to the same question.
The text now mirrors the resolution universe `validate-ai-tool-references`
implements: a `tool` record is never required, the default third-party path
declares none, and a name resolves against `stack.tools[]` names, the
`PLATFORM_PROVIDED_TOOL_NAMES` registry, or the materialised `action_<name>`
family. It also records that `stack.tools` is the optional Phase-2 refinement
layer with no runtime reader until that phase lands.
Prose only — no schema shape, no `.describe()` text, no code path.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B4h3medzvhB9rpfoja9jcw
* docs(changeset): correct how the skill.tools docblock reaches consumers
Measured after a real DTS build: property-level comments inside the
`z.object({ ... })` literal do NOT survive into `dist/*.d.ts` (the emitted
declaration is a bare `tools: z.ZodArray<z.ZodString>;`). The text ships instead
through `@objectstack/spec`'s `files` list, which publishes `src/**/*.zod.ts`,
so the docblock travels in the npm tarball as source.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B4h3medzvhB9rpfoja9jcw
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 59eb04d commit 5f2e54c
2 files changed
Lines changed: 23 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
348 | | - | |
349 | | - | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
350 | 360 | | |
351 | 361 | | |
352 | 362 | | |
| |||
0 commit comments