Skip to content
Open
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
13 changes: 11 additions & 2 deletions .claude/skills/write-docs/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Eighteen principles govern Ably docs pages, distilled from the AI Transport wire
14. **Layer 0 hook in the first 5 seconds.** Every page opens with a hook that answers "what is this, why should I care?". The `intro:` frontmatter feeds the auto-generated PageHeader; the body's first paragraph reinforces it. On feature pages, the hook is two sentences: outcome first ("Your users can change direction mid-response"), mechanism second ("AI Transport's session layer lets a client cancel and re-prompt without breaking the stream"). **Per-interface API reference pages are the one exception**: they drop `intro:` and let the opening paragraph carry the hook. Navigational API pages (the API reference hub, the errors page) keep `intro:` like every other page type. See the `## API reference pages` section for the full standard.
15. **Cover unhappy paths.** Every feature page has an edge-cases section. Race conditions, timeouts, network drops, capability-missing failures, what happens when the LLM errors. This is what separates trusted docs from marketing.
16. **FAQ with three to five real entries on feature pages.** Surface what developers actually ask. Do not pad to meet a count.
17. **No API keys in client code.** Ever. Use `authUrl: '/auth'` as the placeholder and link out to `concepts/authentication` (or the equivalent setup page) once.
17. **No API keys in client code — but server-side agent code is the opposite.** In client (browser) code, never show an API key; use `authUrl: '/auth'` as the placeholder and link out to `concepts/authentication` (or the equivalent setup page) once. In **server-side or agent code** (durable-execution activities, agent routes, workers, anything that runs on your own infrastructure), do the reverse: construct the Realtime client with `new Ably.Realtime({ key: process.env.ABLY_API_KEY })`. An `authUrl` on the server is wrong — there is no browser to fetch a token, and the key is already trusted in that environment. When you see `authUrl` in an agent/server snippet, that is a bug to fix, not a rule to preserve. (The line 380 verification grep excludes `process.env`-sourced keys, so this pattern passes it.)
18. **Visual rhythm.** Diagram, code block, card layout, or icon table every few paragraphs. No walls of text.

### Cross-product orientation
Expand Down Expand Up @@ -354,6 +354,10 @@ The canonical source is [`writing-style-guide.md`](../../../writing-style-guide.

The style guide takes precedence over anything else in this skill. If a rule here ever conflicts with the style guide, the style guide wins.

Spelling to enforce on every page:

- **"realtime", one word.** Never "real time" or "real-time" when describing Ably delivery ("sees the same conversation in realtime", "realtime messaging"). This is Ably house spelling. Sweep with `grep -rn "real[- ]time" "$P"` and expect zero hits.

## Per-page workflow

1. **Identify the page type.** Pick the matching template above.
Expand All @@ -376,7 +380,9 @@ for field in title meta_description meta_keywords intro; do
find "$P" -name "*.mdx" -exec grep -L "^$field:" {} \;
done

# No API keys in client code (excluding authUrl)
# No API keys in client code: flags string-literal keys only.
# `key: process.env.ABLY_API_KEY` (correct in server/agent code, principle 17) has no
# quoted literal so it passes. A quoted key in a browser snippet is the real violation.
grep -rn -E "key\s*:\s*['\"][^'\"]+['\"]" "$P" | grep -v authUrl

# No "docs under construction" / WIP markers
Expand All @@ -392,6 +398,9 @@ done
# No em dashes (style guide forbids)
grep -rn "—" "$P"

# "realtime" is one word (no "real time" / "real-time")
grep -rn "real[- ]time" "$P"

# No bold-prefix bullets
grep -rnE "^\s*[\*\-]\s+\*\*[^*]+:\*\*" "$P"

Expand Down
2 changes: 1 addition & 1 deletion src/data/languages/languageData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default {
android: '1.2',
},
aiTransport: {
javascript: '0.4',
javascript: '0.5',
},
spaces: {
javascript: '0.5',
Expand Down
25 changes: 25 additions & 0 deletions src/data/nav/aitransport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ export default {
name: 'Vercel AI SDK',
link: '/docs/ai-transport/getting-started/vercel-ai-sdk',
},
{
name: 'Temporal',
link: '/docs/ai-transport/getting-started/temporal',
},
],
},
{
Expand Down Expand Up @@ -73,6 +77,10 @@ export default {
name: 'Runs',
link: '/docs/ai-transport/concepts/runs',
},
{
name: 'Steps',
link: '/docs/ai-transport/concepts/steps',
},
{
name: 'Invocations',
link: '/docs/ai-transport/concepts/invocations',
Expand Down Expand Up @@ -106,6 +114,10 @@ export default {
name: 'Vercel AI SDK Core',
link: '/docs/ai-transport/frameworks/vercel-ai-sdk-core',
},
{
name: 'Temporal',
link: '/docs/ai-transport/frameworks/temporal',
},
],
},
{
Expand Down Expand Up @@ -151,6 +163,10 @@ export default {
name: 'Tool calling',
link: '/docs/ai-transport/features/tool-calling',
},
{
name: 'Durable execution',
link: '/docs/ai-transport/features/durable-execution',
},
{
name: 'Human-in-the-loop',
link: '/docs/ai-transport/features/human-in-the-loop',
Expand Down Expand Up @@ -243,6 +259,15 @@ export default {
},
],
},
{
name: 'Temporal',
pages: [
{
name: 'stepIdFor',
link: '/docs/ai-transport/api/javascript/temporal',
},
],
},
],
},
{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading