Skip to content

Commit 4ed7c1e

Browse files
committed
feat(sdk,cli): point skills at the bundled SDK docs, not the docs site
The bundled skills now reference the docs shipped alongside them in @trigger.dev/sdk (read from node_modules, pinned to your installed version) instead of the docs website, and the CLI pointer skills name the bundled doc set and its sources explicitly. An assistant reading a skill is sent to the local pinned copy.
1 parent 87f8df6 commit 4ed7c1e

8 files changed

Lines changed: 17 additions & 19 deletions

File tree

packages/cli-v3/skills/authoring-chat-agent/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ library: trigger.dev
1717
The full, version-pinned reference ships **inside your installed `@trigger.dev/sdk`**. Read it before writing code — it always matches the SDK version in this project, so it never drifts:
1818

1919
- **Skill:** `node_modules/@trigger.dev/sdk/skills/authoring-chat-agent/SKILL.md` — the per-turn run loop, `chat.toStreamTextOptions()`, the two server actions, typed tools/data parts, and the React transport.
20-
- **Docs:** `node_modules/@trigger.dev/sdk/docs/ai-chat/` — exhaustive detail. Grep for an API, e.g. `grep -rl "toStreamTextOptions" node_modules/@trigger.dev/sdk/docs/`.
20+
- **Docs:** the full, version-pinned docs ship bundled at `node_modules/@trigger.dev/sdk/docs/ai-chat/`; the skill above lists the exact pages it draws from in its `sources:` frontmatter. Grep for an API, e.g. `grep -rl "toStreamTextOptions" node_modules/@trigger.dev/sdk/docs/`.
2121

2222
If those paths don't exist, `@trigger.dev/sdk` isn't installed yet — install it first. In a non-hoisted layout, resolve the package with `node -p "require.resolve('@trigger.dev/sdk/package.json')"` and read `skills/` + `docs/` beside it.
2323

packages/cli-v3/skills/authoring-tasks/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ library: trigger.dev
1616
The full, version-pinned reference for authoring tasks ships **inside your installed `@trigger.dev/sdk`**. Read it before writing code — it always matches the SDK version in this project, so it never drifts:
1717

1818
- **Skill:** `node_modules/@trigger.dev/sdk/skills/authoring-tasks/SKILL.md` — the complete guide (setup, `schemaTask`, retries, triggering + the Result shape, idempotency, waits, metadata, scheduled tasks, queues/concurrency, `trigger.config.ts`).
19-
- **Docs:** `node_modules/@trigger.dev/sdk/docs/` — exhaustive detail. Grep for an API, e.g. `grep -rl "schemaTask" node_modules/@trigger.dev/sdk/docs/`.
19+
- **Docs:** the full, version-pinned docs ship bundled at `node_modules/@trigger.dev/sdk/docs/`; the skill above lists the exact pages it draws from in its `sources:` frontmatter. Grep for an API, e.g. `grep -rl "schemaTask" node_modules/@trigger.dev/sdk/docs/`.
2020

2121
If those paths don't exist, `@trigger.dev/sdk` isn't installed yet — install it first. In a non-hoisted layout, resolve the package with `node -p "require.resolve('@trigger.dev/sdk/package.json')"` and read `skills/` + `docs/` beside it.
2222

packages/cli-v3/skills/chat-agent-advanced/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ library: trigger.dev
1818
The full, version-pinned reference ships **inside your installed `@trigger.dev/sdk`**. Read it before writing code — it always matches the SDK version in this project, so it never drifts:
1919

2020
- **Skill:** `node_modules/@trigger.dev/sdk/skills/chat-agent-advanced/SKILL.md` — Sessions primitive, custom transports/wire protocol, sub-agents, HITL, steering, actions, background injection, fast starts, resilience (compaction/recovery/OOM/large payloads), `chat.local`, testing, upgrades.
21-
- **Docs:** `node_modules/@trigger.dev/sdk/docs/ai-chat/` (incl. `patterns/`) — exhaustive detail. Grep for an API, e.g. `grep -rl "mockChatAgent" node_modules/@trigger.dev/sdk/docs/`.
21+
- **Docs:** the full, version-pinned docs ship bundled at `node_modules/@trigger.dev/sdk/docs/ai-chat/` (including `patterns/` for HITL, sub-agents, sessions); the skill above lists the exact pages it draws from in its `sources:` frontmatter. Grep for an API, e.g. `grep -rl "mockChatAgent" node_modules/@trigger.dev/sdk/docs/`.
2222

2323
If those paths don't exist, `@trigger.dev/sdk` isn't installed yet — install it first. In a non-hoisted layout, resolve the package with `node -p "require.resolve('@trigger.dev/sdk/package.json')"` and read `skills/` + `docs/` beside it.
2424

packages/cli-v3/skills/realtime-and-frontend/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ library: trigger.dev
2020
The full, version-pinned reference ships **inside your installed `@trigger.dev/sdk`**. Read it before writing code — it always matches the SDK version in this project, so it never drifts:
2121

2222
- **Skill:** `node_modules/@trigger.dev/sdk/skills/realtime-and-frontend/SKILL.md` — run subscriptions, `@trigger.dev/react-hooks`, streams, frontend triggering, and scoped tokens.
23-
- **Docs:** `node_modules/@trigger.dev/sdk/docs/realtime/` — exhaustive detail. Grep for a hook, e.g. `grep -rl "useRealtimeRun" node_modules/@trigger.dev/sdk/docs/`.
23+
- **Docs:** the full, version-pinned docs ship bundled at `node_modules/@trigger.dev/sdk/docs/realtime/`; the skill above lists the exact pages it draws from in its `sources:` frontmatter. Grep for a hook, e.g. `grep -rl "useRealtimeRun" node_modules/@trigger.dev/sdk/docs/`.
2424

2525
If those paths don't exist, `@trigger.dev/sdk` isn't installed yet — install it first. In a non-hoisted layout, resolve the package with `node -p "require.resolve('@trigger.dev/sdk/package.json')"` and read `skills/` + `docs/` beside it.
2626

packages/trigger-sdk/skills/authoring-chat-agent/SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@ There is no API route in this model. The transport replaces the route round-trip
286286
(`chat.createSession`, `chat.customAgent`, `chat.stream`), compaction, HITL approvals, recovery.
287287
- `realtime-and-frontend` skill - Realtime hooks and frontend streaming beyond the chat transport.
288288
- `authoring-tasks` skill - base `task()` semantics, `ctx`, and standard lifecycle hooks.
289-
- Docs: /ai-chat/quick-start, /ai-chat/backend, /ai-chat/tools, /ai-chat/types, /ai-chat/frontend
289+
290+
Reference docs ship beside this skill in the same package, read them locally (no network), pinned to your installed version. The `sources:` frontmatter above lists every doc this skill draws from, all under `@trigger.dev/sdk/docs/ai-chat/`. Start with `quick-start.mdx`, `backend.mdx`, `tools.mdx`, `types.mdx`, `frontend.mdx`.
290291

291292
## Version
292293

packages/trigger-sdk/skills/authoring-tasks/SKILL.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,11 @@ Sibling skills:
243243
- **realtime-and-frontend** for subscribing to runs and triggering from the frontend with React hooks.
244244
- **authoring-chat-agent** and **chat-agent-advanced** for building AI chat agents.
245245

246-
Docs:
246+
Reference docs ship beside this skill in the same package, read them locally (no network), pinned to your installed version. The `sources:` frontmatter above lists every doc this skill draws from, all under `@trigger.dev/sdk/docs/`. Start with:
247247

248-
- [Tasks overview](https://trigger.dev/docs/tasks/overview)
249-
- [Triggering](https://trigger.dev/docs/triggering)
250-
- [Configuration file](https://trigger.dev/docs/config/config-file)
248+
- `@trigger.dev/sdk/docs/tasks/overview.mdx`
249+
- `@trigger.dev/sdk/docs/triggering.mdx`
250+
- `@trigger.dev/sdk/docs/config/config-file.mdx`
251251

252252
## Version
253253

packages/trigger-sdk/skills/chat-agent-advanced/SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,8 @@ TS helpers `SSEStreamSubscription` and `controlSubtype(headers)` (documented in
358358
the `useTriggerChatTransport` happy path. Start there before reaching for this skill.
359359
- `realtime-and-frontend` skill - Realtime hooks and frontend streaming beyond the chat transport.
360360
- `authoring-tasks` skill - base `task()` semantics, `ctx`, and standard lifecycle hooks.
361-
- Docs: /ai-chat/sessions, /ai-chat/server-chat, /ai-chat/client-protocol
361+
362+
Reference docs ship beside this skill in the same package, read them locally (no network), pinned to your installed version. The `sources:` frontmatter above lists every doc this skill draws from, all under `@trigger.dev/sdk/docs/ai-chat/` (including `patterns/`). For HITL, sessions, and sub-agents start with `sessions.mdx`, `server-chat.mdx`, `client-protocol.mdx`, `patterns/human-in-the-loop.mdx`, `patterns/sub-agents.mdx`.
362363

363364
## Version
364365

packages/trigger-sdk/skills/realtime-and-frontend/SKILL.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -265,15 +265,11 @@ Sibling skills:
265265
- `authoring-tasks` for the task side: `streams.define()`, `metadata.set()`, and `wait.createToken`.
266266
- `authoring-chat-agent` and `chat-agent-advanced` for chat agents, which build on these realtime streams.
267267

268-
Docs:
269-
- [React hooks: run updates](/realtime/react-hooks/subscribe)
270-
- [React hooks: streaming](/realtime/react-hooks/streams)
271-
- [Realtime auth](/realtime/auth)
272-
273-
The realtime run object differs from the management-API run object returned by
274-
`useRun`; see [run object reference](/realtime/run-object). For the task side
275-
(`streams.define`, `metadata.set`), see [/tasks/streams](/tasks/streams) and
276-
[/runs/metadata](/runs/metadata).
268+
Reference docs ship beside this skill in the same package, read them locally (no network), pinned to your installed version. The `sources:` frontmatter above lists every doc this skill draws from, all under `@trigger.dev/sdk/docs/`. Start with:
269+
- `@trigger.dev/sdk/docs/realtime/react-hooks/subscribe.mdx`
270+
- `@trigger.dev/sdk/docs/realtime/react-hooks/streams.mdx`
271+
- `@trigger.dev/sdk/docs/realtime/auth.mdx`
272+
- `@trigger.dev/sdk/docs/realtime/run-object.mdx` (the realtime run object differs from the management-API object returned by `useRun`)
277273

278274
## Version
279275

0 commit comments

Comments
 (0)