@cyanheads/mcp-ts-core 0.8.20 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/CLAUDE.md +21 -13
  2. package/README.md +45 -9
  3. package/biome.json +1 -1
  4. package/changelog/0.9.x/0.9.0.md +80 -0
  5. package/changelog/0.9.x/0.9.1.md +41 -0
  6. package/changelog/template.md +1 -1
  7. package/dist/config/index.d.ts.map +1 -1
  8. package/dist/config/index.js +1 -1
  9. package/dist/config/index.js.map +1 -1
  10. package/dist/core/app.d.ts +11 -2
  11. package/dist/core/app.d.ts.map +1 -1
  12. package/dist/core/app.js +6 -19
  13. package/dist/core/app.js.map +1 -1
  14. package/dist/core/context.d.ts +6 -0
  15. package/dist/core/context.d.ts.map +1 -1
  16. package/dist/core/context.js +2 -0
  17. package/dist/core/context.js.map +1 -1
  18. package/dist/core/worker.d.ts +17 -2
  19. package/dist/core/worker.d.ts.map +1 -1
  20. package/dist/core/worker.js +6 -2
  21. package/dist/core/worker.js.map +1 -1
  22. package/dist/linter/rules/index.d.ts +1 -0
  23. package/dist/linter/rules/index.d.ts.map +1 -1
  24. package/dist/linter/rules/index.js +1 -0
  25. package/dist/linter/rules/index.js.map +1 -1
  26. package/dist/linter/rules/portability-rules.d.ts +49 -0
  27. package/dist/linter/rules/portability-rules.d.ts.map +1 -0
  28. package/dist/linter/rules/portability-rules.js +209 -0
  29. package/dist/linter/rules/portability-rules.js.map +1 -0
  30. package/dist/linter/rules/prompt-rules.d.ts +2 -1
  31. package/dist/linter/rules/prompt-rules.d.ts.map +1 -1
  32. package/dist/linter/rules/prompt-rules.js +7 -2
  33. package/dist/linter/rules/prompt-rules.js.map +1 -1
  34. package/dist/linter/rules/resource-rules.d.ts +2 -1
  35. package/dist/linter/rules/resource-rules.d.ts.map +1 -1
  36. package/dist/linter/rules/resource-rules.js +12 -3
  37. package/dist/linter/rules/resource-rules.js.map +1 -1
  38. package/dist/linter/rules/schema-rules.d.ts +2 -0
  39. package/dist/linter/rules/schema-rules.d.ts.map +1 -1
  40. package/dist/linter/rules/schema-rules.js +1 -1
  41. package/dist/linter/rules/schema-rules.js.map +1 -1
  42. package/dist/linter/rules/tool-rules.d.ts +2 -1
  43. package/dist/linter/rules/tool-rules.d.ts.map +1 -1
  44. package/dist/linter/rules/tool-rules.js +12 -3
  45. package/dist/linter/rules/tool-rules.js.map +1 -1
  46. package/dist/linter/types.d.ts +15 -0
  47. package/dist/linter/types.d.ts.map +1 -1
  48. package/dist/linter/validate.d.ts.map +1 -1
  49. package/dist/linter/validate.js +22 -3
  50. package/dist/linter/validate.js.map +1 -1
  51. package/dist/logs/combined.log +7 -7
  52. package/dist/logs/error.log +5 -5
  53. package/dist/mcp-server/resources/resource-registration.d.ts.map +1 -1
  54. package/dist/mcp-server/resources/resource-registration.js +2 -0
  55. package/dist/mcp-server/resources/resource-registration.js.map +1 -1
  56. package/dist/mcp-server/resources/utils/resourceHandlerFactory.d.ts +2 -0
  57. package/dist/mcp-server/resources/utils/resourceHandlerFactory.d.ts.map +1 -1
  58. package/dist/mcp-server/resources/utils/resourceHandlerFactory.js +2 -0
  59. package/dist/mcp-server/resources/utils/resourceHandlerFactory.js.map +1 -1
  60. package/dist/mcp-server/server.d.ts +15 -0
  61. package/dist/mcp-server/server.d.ts.map +1 -1
  62. package/dist/mcp-server/server.js +12 -7
  63. package/dist/mcp-server/server.js.map +1 -1
  64. package/dist/mcp-server/tools/tool-registration.d.ts.map +1 -1
  65. package/dist/mcp-server/tools/tool-registration.js +4 -0
  66. package/dist/mcp-server/tools/tool-registration.js.map +1 -1
  67. package/dist/mcp-server/tools/utils/toolHandlerFactory.d.ts +2 -0
  68. package/dist/mcp-server/tools/utils/toolHandlerFactory.d.ts.map +1 -1
  69. package/dist/mcp-server/tools/utils/toolHandlerFactory.js +2 -0
  70. package/dist/mcp-server/tools/utils/toolHandlerFactory.js.map +1 -1
  71. package/dist/mcp-server/transports/http/httpServer.d.ts +22 -0
  72. package/dist/mcp-server/transports/http/httpServer.d.ts.map +1 -0
  73. package/dist/mcp-server/transports/http/httpServer.js +121 -0
  74. package/dist/mcp-server/transports/http/httpServer.js.map +1 -0
  75. package/dist/mcp-server/transports/http/httpTransport.d.ts +5 -14
  76. package/dist/mcp-server/transports/http/httpTransport.d.ts.map +1 -1
  77. package/dist/mcp-server/transports/http/httpTransport.js +15 -114
  78. package/dist/mcp-server/transports/http/httpTransport.js.map +1 -1
  79. package/dist/mcp-server/transports/manager.js +1 -1
  80. package/dist/mcp-server/transports/manager.js.map +1 -1
  81. package/dist/storage/core/storageValidation.js +2 -2
  82. package/dist/storage/providers/fileSystem/fileSystemProvider.d.ts.map +1 -1
  83. package/dist/storage/providers/fileSystem/fileSystemProvider.js +15 -10
  84. package/dist/storage/providers/fileSystem/fileSystemProvider.js.map +1 -1
  85. package/dist/testing/index.d.ts +4 -0
  86. package/dist/testing/index.d.ts.map +1 -1
  87. package/dist/testing/index.js +2 -0
  88. package/dist/testing/index.js.map +1 -1
  89. package/dist/utils/internal/logger.d.ts.map +1 -1
  90. package/dist/utils/internal/logger.js +25 -10
  91. package/dist/utils/internal/logger.js.map +1 -1
  92. package/dist/utils/internal/runtime.d.ts +18 -2
  93. package/dist/utils/internal/runtime.d.ts.map +1 -1
  94. package/dist/utils/internal/runtime.js +18 -3
  95. package/dist/utils/internal/runtime.js.map +1 -1
  96. package/dist/utils/network/fetchWithTimeout.d.ts +19 -16
  97. package/dist/utils/network/fetchWithTimeout.d.ts.map +1 -1
  98. package/dist/utils/network/fetchWithTimeout.js +66 -32
  99. package/dist/utils/network/fetchWithTimeout.js.map +1 -1
  100. package/dist/utils/scheduling/scheduler.js +1 -1
  101. package/dist/utils/scheduling/scheduler.js.map +1 -1
  102. package/dist/utils/security/rateLimiter.d.ts.map +1 -1
  103. package/dist/utils/security/rateLimiter.js +4 -1
  104. package/dist/utils/security/rateLimiter.js.map +1 -1
  105. package/dist/utils/telemetry/instrumentation.d.ts.map +1 -1
  106. package/dist/utils/telemetry/instrumentation.js +10 -7
  107. package/dist/utils/telemetry/instrumentation.js.map +1 -1
  108. package/package.json +27 -26
  109. package/scripts/build-changelog.ts +3 -3
  110. package/scripts/devcheck.ts +8 -4
  111. package/skills/add-tool/SKILL.md +17 -1
  112. package/skills/api-errors/SKILL.md +7 -1
  113. package/skills/api-linter/SKILL.md +75 -1
  114. package/skills/api-workers/SKILL.md +15 -1
  115. package/skills/design-mcp-server/SKILL.md +2 -1
  116. package/skills/field-test/SKILL.md +2 -1
  117. package/skills/polish-docs-meta/SKILL.md +2 -2
  118. package/skills/polish-docs-meta/references/readme.md +1 -1
  119. package/skills/tool-defs-analysis/SKILL.md +19 -3
  120. package/templates/AGENTS.md +9 -9
  121. package/templates/CLAUDE.md +9 -9
  122. package/templates/changelog/template.md +1 -1
  123. package/templates/src/index.ts +3 -0
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: tool-defs-analysis
3
3
  description: >
4
- Read-only audit of MCP definition language across an existing surface — tools, resources, prompts. Walks every definition file and checks 10 categories the LLM reads to decide whether and how to call: voice & tense, internal leaks, audience leaks, defaults, recovery hints, output descriptions, cross-references, sparsity, examples, structure. Produces grouped findings with file:line citations and a numbered options list. Use during polish, after a refactor, or before a release. Complements `field-test` (behavior testing) and `security-pass` (security audit).
4
+ Read-only audit of MCP definition language across an existing surface — tools, resources, prompts. Walks every definition file and checks 12 categories the LLM reads to decide whether and how to call: voice & tense, internal leaks, audience leaks, defaults, recovery hints, output descriptions, cross-references, sparsity, examples, structure, mutator observability, unit-bearing numeric names. Produces grouped findings with file:line citations and a numbered options list. Use during polish, after a refactor, or before a release. Complements `field-test` (behavior testing) and `security-pass` (security audit).
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "1.1"
7
+ version: "1.2"
8
8
  audience: external
9
9
  type: audit
10
10
  ---
@@ -57,7 +57,7 @@ The `*tool.ts` / `*resource.ts` patterns also catch `*.app-tool.ts` / `*.app-res
57
57
 
58
58
  Use `TaskCreate` — one task per file. Mark each complete after its findings are captured.
59
59
 
60
- ### 2. Walk the 10 categories per file
60
+ ### 2. Walk the 12 categories per file
61
61
 
62
62
  Read each definition file in full. Apply every category — most files trip more than one. Capture each hit with `file:line`, the offending excerpt, and a one-line fix.
63
63
 
@@ -159,6 +159,22 @@ Prior art: #74. Field-test catches this in its leak audit; this skill is the mor
159
159
 
160
160
  Prior art: #33.
161
161
 
162
+ #### 11. Mutator observability
163
+
164
+ **Look in:** tool definitions without `annotations.readOnlyHint: true` (writes/updates/deletes/appends/patches).
165
+
166
+ **Check:** `output` carries a state-change discriminator (`created`, `updated`, `mutated`, `unchanged`) or before/after observable state the agent can use to confirm intent-effect match. The server reports what it observed; the agent decides whether it matches what it meant.
167
+
168
+ **Smell:** mutator output is `{ path, ok }` or `{ success: true }` — no pre/post state, no discriminator. Server-side defensive throws on synthetic deltas (`file shrunk`, `count decreased`) the server can't authoritatively classify as bugs.
169
+
170
+ #### 12. Unit-bearing numeric names
171
+
172
+ **Look in:** every `z.number()` field in `output` schemas.
173
+
174
+ **Check:** the field name carries a unit when not pinned by context — `sizeInBytes`, `durationInMs`, `priceInCents`, `latencyInMs`. The `.describe()` drops in summarization or gets truncated; the field name persists into the JSON the agent reads.
175
+
176
+ **Smell:** `size`, `duration`, `price`, `latency` — bare names that force the agent to guess units or rely on description text. Exempt: `index`, `position`, `totalCount`, `itemCount` (dimensionless).
177
+
162
178
  ### 3. Report
163
179
 
164
180
  Three sections.
@@ -17,7 +17,7 @@ This project was just scaffolded with `bunx @cyanheads/mcp-ts-core init`. The fr
17
17
 
18
18
  > **Remove this section** from CLAUDE.md / AGENTS.md after completing these steps. The skills and conventions below remain — this block is one-time onboarding only.
19
19
 
20
- 1. **Get your bearings.** Take stock of your current environment — think through the project tree, the skills in `skills/`, and the tools/MCP servers you have available. Light tool use is fine if something isn't already in context; you're building a mental map for later, not committing to anything yet.
20
+ 1. **Get your bearings.** Take stock of the project tree, the skills in `skills/`, and the tools/MCP servers available. Light tool use is fine for context-building you're mapping the territory, not committing yet.
21
21
  2. **Read the framework docs** — `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` (builders, Context, errors, exports, conventions)
22
22
  3. **Run the `setup` skill** — read `skills/setup/SKILL.md` and follow its checklist (project orientation, agent protocol file selection, echo definition cleanup, skill sync)
23
23
  4. **Design the server** — read `skills/design-mcp-server/SKILL.md` and work through it with the user to map the domain into tools, resources, and services before scaffolding
@@ -26,7 +26,7 @@ This project was just scaffolded with `bunx @cyanheads/mcp-ts-core init`. The fr
26
26
 
27
27
  ## What's Next?
28
28
 
29
- When the user asks what to do next, what's left, or needs direction, you can suggest relevant options based on the current project state. Some common next steps:
29
+ When the user asks what's next or needs direction, suggest options based on the current project state. Common next steps:
30
30
 
31
31
  1. **Re-run the `setup` skill** — ensures CLAUDE.md, skills, structure, and metadata are populated and up to date with the current codebase
32
32
  2. **Run the `design-mcp-server` skill** — if the tool/resource surface hasn't been mapped yet, work through domain design
@@ -149,7 +149,7 @@ export function getServerConfig() {
149
149
  }
150
150
  ```
151
151
 
152
- `parseEnvConfig` maps Zod schema paths → env var names so validation errors name the actual variable (`MY_API_KEY`) rather than the internal path (`apiKey`). It throws a `ConfigurationError` the framework catches and prints as a clean startup banner.
152
+ `parseEnvConfig` maps Zod schema paths → env var names so errors name the variable (`MY_API_KEY`) not the path (`apiKey`). Throws `ConfigurationError`, which the framework prints as a clean startup banner.
153
153
 
154
154
  ---
155
155
 
@@ -174,7 +174,7 @@ Handlers receive a unified `ctx` object. Key properties:
174
174
 
175
175
  Handlers throw — the framework catches, classifies, and formats.
176
176
 
177
- **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive a typed `ctx.fail(reason, …)` keyed by the declared reason union. TypeScript catches `ctx.fail('typo')` at compile time, `data.reason` is auto-populated for observability, and the linter enforces conformance against the handler body. The `recovery` field is required descriptive metadata for the agent's next move (≥ 5 words, lint-validated); for the wire payload's `data.recovery.hint` (which the framework mirrors into `content[]` text), pass it explicitly at the throw site when dynamic context matters: `ctx.fail('reason', msg, { recovery: { hint: '...' } })`. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
177
+ **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required descriptive metadata for the agent's next move (≥ 5 words, lint-validated); for the wire `data.recovery.hint` (mirrored into `content[]` text), pass explicitly at the throw site when dynamic context matters: `ctx.fail('reason', msg, { recovery: { hint: '...' } })`. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
178
178
 
179
179
  ```ts
180
180
  errors: [
@@ -189,7 +189,7 @@ async handler(input, ctx) {
189
189
  }
190
190
  ```
191
191
 
192
- **Declare contracts inline on each tool, even when similar across tools.** The contract is part of the tool's documented public surface — reading one tool definition file should give the full picture. Don't extract a shared `errors[]` constant or contract module to deduplicate; per-tool repetition is the intended cost of locality.
192
+ **Declare contracts inline on each tool.** The contract is part of the tool's public surface — one file should give the full picture. Don't extract a shared `errors[]` constant; per-tool repetition is the intended cost of locality.
193
193
 
194
194
  **Fallback (no contract entry fits):** throw via factories or plain `Error`.
195
195
 
@@ -249,7 +249,7 @@ src/
249
249
 
250
250
  Skills are modular instructions in `skills/` at the project root. Read them directly when a task matches — e.g., `skills/add-tool/SKILL.md` when adding a tool.
251
251
 
252
- **Agent skill directory:** Copy skills into the directory your agent discovers (Claude Code: `.claude/skills/`, others: equivalent). This makes skills available as context without needing to reference `skills/` paths manually. After framework updates, run the `maintenance` skill — it re-syncs the agent directory automatically (Phase B).
252
+ **Agent skill directory:** Copy skills into the directory your agent discovers (Claude Code: `.claude/skills/`, others: equivalent). Skills then load as context without referencing `skills/` paths. After framework updates, run the `maintenance` skill — Phase B re-syncs the agent directory.
253
253
 
254
254
  Available skills:
255
255
 
@@ -287,7 +287,7 @@ When you complete a skill's checklist, check the boxes and add a completion time
287
287
 
288
288
  ## Commands
289
289
 
290
- **Runtime:** Scripts use `tsx` — both `npm run <cmd>` and `bun run <cmd>` work. Use whichever package manager you have; `bun` is slightly faster for invoking scripts but not required.
290
+ **Runtime:** Scripts use `tsx` — both `npm run <cmd>` and `bun run <cmd>` work. `bun` is slightly faster for script invocation but not required.
291
291
 
292
292
  | Command | Purpose |
293
293
  |:--------|:--------|
@@ -307,13 +307,13 @@ When you complete a skill's checklist, check the boxes and add a completion time
307
307
 
308
308
  ## Changelog
309
309
 
310
- Directory-based, grouped by minor series using the `.x` semver-wildcard convention. Source of truth is `changelog/<major.minor>.x/<version>.md` (e.g. `changelog/0.1.x/0.1.0.md`) — one file per released version, shipped in the npm package. At release time, author the per-version file with a concrete version and date, then run `npm run changelog:build` to regenerate the rollup. `changelog/template.md` is a **pristine format reference** — never edited, never renamed, never moved. Read it to remember the frontmatter + section layout when scaffolding a new per-version file. `CHANGELOG.md` is a **navigation index** (header + link + one-line summary per version), regenerated by `npm run changelog:build`. Devcheck hard-fails on drift. Never hand-edit `CHANGELOG.md`.
310
+ Directory-based, grouped by minor series via the `.x` semver-wildcard convention. Source of truth: `changelog/<major.minor>.x/<version>.md` (e.g. `changelog/0.1.x/0.1.0.md`) — one file per release, shipped in the npm package. At release, author the per-version file with a concrete version and date, then run `npm run changelog:build` to regenerate the rollup. `changelog/template.md` is a **pristine format reference** — never edited or moved; read it for the frontmatter + section layout when scaffolding. `CHANGELOG.md` is a **navigation index** (header + link + summary per version), regenerated by `npm run changelog:build` devcheck hard-fails on drift; never hand-edit it.
311
311
 
312
312
  Each per-version file opens with YAML frontmatter:
313
313
 
314
314
  ```markdown
315
315
  ---
316
- summary: "One-line headline, ≤250 chars" # required — powers the rollup index
316
+ summary: "One-line headline, ≤350 chars" # required — powers the rollup index
317
317
  breaking: false # optional — true flags breaking changes
318
318
  security: false # optional — true flags security fixes
319
319
  ---
@@ -17,7 +17,7 @@ This project was just scaffolded with `bunx @cyanheads/mcp-ts-core init`. The fr
17
17
 
18
18
  > **Remove this section** from CLAUDE.md / AGENTS.md after completing these steps. The skills and conventions below remain — this block is one-time onboarding only.
19
19
 
20
- 1. **Get your bearings.** Take stock of your current environment — think through the project tree, the skills in `skills/`, and the tools/MCP servers you have available. Light tool use is fine if something isn't already in context; you're building a mental map for later, not committing to anything yet.
20
+ 1. **Get your bearings.** Take stock of the project tree, the skills in `skills/`, and the tools/MCP servers available. Light tool use is fine for context-building you're mapping the territory, not committing yet.
21
21
  2. **Read the framework docs** — `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` (builders, Context, errors, exports, conventions)
22
22
  3. **Run the `setup` skill** — read `skills/setup/SKILL.md` and follow its checklist (project orientation, agent protocol file selection, echo definition cleanup, skill sync)
23
23
  4. **Design the server** — read `skills/design-mcp-server/SKILL.md` and work through it with the user to map the domain into tools, resources, and services before scaffolding
@@ -26,7 +26,7 @@ This project was just scaffolded with `bunx @cyanheads/mcp-ts-core init`. The fr
26
26
 
27
27
  ## What's Next?
28
28
 
29
- When the user asks what to do next, what's left, or needs direction, you can suggest relevant options based on the current project state. Some common next steps:
29
+ When the user asks what's next or needs direction, suggest options based on the current project state. Common next steps:
30
30
 
31
31
  1. **Re-run the `setup` skill** — ensures CLAUDE.md, skills, structure, and metadata are populated and up to date with the current codebase
32
32
  2. **Run the `design-mcp-server` skill** — if the tool/resource surface hasn't been mapped yet, work through domain design
@@ -149,7 +149,7 @@ export function getServerConfig() {
149
149
  }
150
150
  ```
151
151
 
152
- `parseEnvConfig` maps Zod schema paths → env var names so validation errors name the actual variable (`MY_API_KEY`) rather than the internal path (`apiKey`). It throws a `ConfigurationError` the framework catches and prints as a clean startup banner.
152
+ `parseEnvConfig` maps Zod schema paths → env var names so errors name the variable (`MY_API_KEY`) not the path (`apiKey`). Throws `ConfigurationError`, which the framework prints as a clean startup banner.
153
153
 
154
154
  ---
155
155
 
@@ -174,7 +174,7 @@ Handlers receive a unified `ctx` object. Key properties:
174
174
 
175
175
  Handlers throw — the framework catches, classifies, and formats.
176
176
 
177
- **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive a typed `ctx.fail(reason, …)` keyed by the declared reason union. TypeScript catches `ctx.fail('typo')` at compile time, `data.reason` is auto-populated for observability, and the linter enforces conformance against the handler body. The `recovery` field is required descriptive metadata for the agent's next move (≥ 5 words, lint-validated); for the wire payload's `data.recovery.hint` (which the framework mirrors into `content[]` text), pass it explicitly at the throw site when dynamic context matters: `ctx.fail('reason', msg, { recovery: { hint: '...' } })`. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
177
+ **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required descriptive metadata for the agent's next move (≥ 5 words, lint-validated); for the wire `data.recovery.hint` (mirrored into `content[]` text), pass explicitly at the throw site when dynamic context matters: `ctx.fail('reason', msg, { recovery: { hint: '...' } })`. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
178
178
 
179
179
  ```ts
180
180
  errors: [
@@ -189,7 +189,7 @@ async handler(input, ctx) {
189
189
  }
190
190
  ```
191
191
 
192
- **Declare contracts inline on each tool, even when similar across tools.** The contract is part of the tool's documented public surface — reading one tool definition file should give the full picture. Don't extract a shared `errors[]` constant or contract module to deduplicate; per-tool repetition is the intended cost of locality.
192
+ **Declare contracts inline on each tool.** The contract is part of the tool's public surface — one file should give the full picture. Don't extract a shared `errors[]` constant; per-tool repetition is the intended cost of locality.
193
193
 
194
194
  **Fallback (no contract entry fits):** throw via factories or plain `Error`.
195
195
 
@@ -249,7 +249,7 @@ src/
249
249
 
250
250
  Skills are modular instructions in `skills/` at the project root. Read them directly when a task matches — e.g., `skills/add-tool/SKILL.md` when adding a tool.
251
251
 
252
- **Agent skill directory:** Copy skills into the directory your agent discovers (Claude Code: `.claude/skills/`, others: equivalent). This makes skills available as context without needing to reference `skills/` paths manually. After framework updates, run the `maintenance` skill — it re-syncs the agent directory automatically (Phase B).
252
+ **Agent skill directory:** Copy skills into the directory your agent discovers (Claude Code: `.claude/skills/`, others: equivalent). Skills then load as context without referencing `skills/` paths. After framework updates, run the `maintenance` skill — Phase B re-syncs the agent directory.
253
253
 
254
254
  Available skills:
255
255
 
@@ -287,7 +287,7 @@ When you complete a skill's checklist, check the boxes and add a completion time
287
287
 
288
288
  ## Commands
289
289
 
290
- **Runtime:** Scripts use `tsx` — both `npm run <cmd>` and `bun run <cmd>` work. Use whichever package manager you have; `bun` is slightly faster for invoking scripts but not required.
290
+ **Runtime:** Scripts use `tsx` — both `npm run <cmd>` and `bun run <cmd>` work. `bun` is slightly faster for script invocation but not required.
291
291
 
292
292
  | Command | Purpose |
293
293
  |:--------|:--------|
@@ -307,13 +307,13 @@ When you complete a skill's checklist, check the boxes and add a completion time
307
307
 
308
308
  ## Changelog
309
309
 
310
- Directory-based, grouped by minor series using the `.x` semver-wildcard convention. Source of truth is `changelog/<major.minor>.x/<version>.md` (e.g. `changelog/0.1.x/0.1.0.md`) — one file per released version, shipped in the npm package. At release time, author the per-version file with a concrete version and date, then run `npm run changelog:build` to regenerate the rollup. `changelog/template.md` is a **pristine format reference** — never edited, never renamed, never moved. Read it to remember the frontmatter + section layout when scaffolding a new per-version file. `CHANGELOG.md` is a **navigation index** (header + link + one-line summary per version), regenerated by `npm run changelog:build`. Devcheck hard-fails on drift. Never hand-edit `CHANGELOG.md`.
310
+ Directory-based, grouped by minor series via the `.x` semver-wildcard convention. Source of truth: `changelog/<major.minor>.x/<version>.md` (e.g. `changelog/0.1.x/0.1.0.md`) — one file per release, shipped in the npm package. At release, author the per-version file with a concrete version and date, then run `npm run changelog:build` to regenerate the rollup. `changelog/template.md` is a **pristine format reference** — never edited or moved; read it for the frontmatter + section layout when scaffolding. `CHANGELOG.md` is a **navigation index** (header + link + summary per version), regenerated by `npm run changelog:build` devcheck hard-fails on drift; never hand-edit it.
311
311
 
312
312
  Each per-version file opens with YAML frontmatter:
313
313
 
314
314
  ```markdown
315
315
  ---
316
- summary: "One-line headline, ≤250 chars" # required — powers the rollup index
316
+ summary: "One-line headline, ≤350 chars" # required — powers the rollup index
317
317
  breaking: false # optional — true flags breaking changes
318
318
  security: false # optional — true flags security fixes
319
319
  ---
@@ -4,7 +4,7 @@
4
4
  # to author a new release. Set that file's H1 to `# <version> — YYYY-MM-DD`
5
5
  # with a concrete date.
6
6
 
7
- # Required. One-line GitHub Release-style headline. ~250 character soft cap.
7
+ # Required. One-line GitHub Release-style headline. 350 character cap.
8
8
  # Default short and scannable. Don't pad, don't stitch unrelated changes with
9
9
  # semicolons — pick the headline. Quotes required: unquoted YAML treats `: `
10
10
  # inside the value as a key separator and fails GitHub's strict parser.
@@ -15,4 +15,7 @@ await createApp({
15
15
  tools: [echoTool, echoAppTool],
16
16
  resources: [echoResource, echoAppUiResource],
17
17
  prompts: [echoPrompt],
18
+ // instructions: 'Server-level orientation forwarded to the model on every initialize.\n' +
19
+ // '- Use shortcut `X` for the most common case\n' +
20
+ // '- Tools require auth via the `inventory:read` scope',
18
21
  });