Skip to content

Discoverability lift: link KB guides, broaden npm keywords, mirror to AGENTS.md#560

Merged
bensabic merged 11 commits into
mainfrom
docs/add-kb-resources
May 29, 2026
Merged

Discoverability lift: link KB guides, broaden npm keywords, mirror to AGENTS.md#560
bensabic merged 11 commits into
mainfrom
docs/add-kb-resources

Conversation

@bensabic
Copy link
Copy Markdown
Contributor

@bensabic bensabic commented May 28, 2026

Broad SEO/AEO pass across the docs site, adapter READMEs and AGENTS.md files, and npm package metadata so Chat SDK content shows up better in search engines, in LLM-driven package recommendations, and in IDE/coding-agent context.

Docs site

  • Adds a ## Resources section to the Getting Started and AI overview pages and to the Slack, Discord, GitHub, Liveblocks, and Sendblue adapter pages, each linking to applicable guides/templates with descriptions sourced from resources-edge-config.json and a cross-link back to the central /resources hub.

Adapter packages

  • Mirrors the same Resources sections into the Slack, Discord, and GitHub READMEs (so they surface on npm) and into their AGENTS.md files (so coding agents see them alongside the API notes).
  • Expands keywords on every published adapter and state package — adds chat-sdk, chatbot, ai-agent, ai-sdk, vercel, plus platform-specific terms like slack-bot, block-kit, slash-commands, github-app, whatsapp-business, state-adapter.

Resources registry

  • Registers four new entries in resources-edge-config.json (Human-in-the-Loop guide, Liveblocks AI agent guide, Slack + Vercel Blob guide, Durable iMessage Agent template) and runs pnpm sync-resources so the bundled chat package guides, templates.json, and skills/chat/SKILL.md all pick them up.
  • Fixes the synced Slack AI agent guide to import toAiMessages from chat/ai instead of the deprecated chat re-export path (the upstream KB source has also been updated, so future syncs will preserve this).

Drive-by fixes

  • Resend adapter doc quick start: corrects MemoryStateAdapter class import to the createMemoryState() factory (matching every other adapter doc).
  • Zalo adapter doc: drops the "community adapter" callout that duplicated frontmatter.

Tooling / CI

  • Adds tsx as a root devDependency so pnpm sync-resources works out of the box (it previously relied on npx tsx, which hung when not pre-cached).
  • Loosens the CI changeset gate to also skip packages/chat/resources/ (generated data), matching the existing *.md carve-out.

bensabic added 5 commits May 28, 2026 18:04
The Resend adapter doc imported and instantiated `MemoryStateAdapter` as
a class, but `@chat-adapter/state-memory` exposes a `createMemoryState`
factory function (matching every other adapter doc in the repo).
The "Community adapter — not part of the official @chat-adapter/* scope"
callout duplicates information already conveyed by the page's
`community: true` frontmatter and adapter card placement.
`pnpm sync-resources` previously called `npx tsx`, but `tsx` was only
installed in two example packages. `npx` would try to fetch it on demand,
which hung or failed depending on cache state. Add it as a root
devDependency and call it directly so the script works out of the box.
Adds four new entries to the resources edge config:

- "Human-in-the-Loop with Chat SDK and Workflow SDK" (guide)
- "How to build an agent for Liveblocks" (guide)
- "How to build a Slack bot that manages files in Vercel Blob" (guide)
- "Durable iMessage Agent" (template)

Runs `pnpm sync-resources` to fetch the new guide markdown bodies into
`packages/chat/resources/guides/`, regenerate `templates.json`, and
update the auto-generated RESOURCES block in `skills/chat/SKILL.md`.
The six previously-synced guides also pick up upstream content changes
from this resync.
Adds a `## Resources` section linking to applicable Vercel Knowledge
Base guides and templates from each relevant adapter doc and README,
plus the Getting Started and AI overview pages.

- Each bullet pairs the canonical KB title with the description from
  `resources-edge-config.json` so the same wording surfaces in the
  docs, npm READMEs, search, and llms.txt.
- Each section closes with a "See all guides and templates on the
  resources page" cross-link to build topical authority around the
  central /resources hub (using the absolute chat-sdk.dev URL in
  READMEs so the link still works on npm).

Pages updated:

- docs: getting-started, ai/index
- adapters: slack, discord, github, liveblocks, sendblue
- READMEs: @chat-adapter/slack, @chat-adapter/discord, @chat-adapter/github
@bensabic bensabic requested a review from a team as a code owner May 28, 2026 08:08
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat Ready Ready Preview, Comment, Open in v0 May 28, 2026 4:23pm
chat-sdk-nextjs-chat Ready Ready Preview, Comment, Open in v0 May 28, 2026 4:23pm

@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 28, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​tsx@​4.22.31001008293100

View full report

bensabic added 4 commits May 29, 2026 01:06
…uide

The synced Slack AI agent guide imported `toAiMessages` from `"chat"`,
which is the deprecated re-export path. Switch it to the canonical
`"chat/ai"` subpath. The upstream KB source has also been updated, so
future syncs will preserve this fix.
Adds the same Knowledge Base Resources section that already exists in
each adapter's README to its AGENTS.md, so coding agents picking up
context from AGENTS.md see the canonical guides alongside the API
notes.

Updated: @chat-adapter/slack, @chat-adapter/discord, @chat-adapter/github.
`packages/chat/resources/` holds files generated by `pnpm sync-resources`
(guide markdown, `templates.json`) from the canonical
`apps/docs/resources-edge-config.json`. The existing changeset
gatekeeper already excluded `*.md` to allow doc-only updates, but
`templates.json` still tripped it even though it's purely regenerated
data and not package source code.

Extend the exclusion to also skip anything under
`packages/chat/resources/`, matching the spirit of the existing
markdown carve-out.
Broadens the `keywords` array on every published adapter and state
package to improve discoverability on npm and in LLM-driven package
recommendations. Adds the SDK name (`chat-sdk`), search-friendly terms
(`chatbot`, `ai-agent`, `ai-sdk`), the `vercel` brand association, and
platform-specific terms (e.g. `slack-bot`, `block-kit`, `slash-commands`,
`github-app`, `whatsapp-business`, `state-adapter`).

Packages updated:

- @chat-adapter/{slack,discord,teams,gchat,telegram,whatsapp,messenger,github,linear,twilio,web}
- @chat-adapter/state-{redis,ioredis,pg,memory}
@bensabic bensabic changed the title docs: link Vercel Knowledge Base guides and templates from adapter and overview pages Discoverability lift: link KB guides, broaden npm keywords, mirror to AGENTS.md May 28, 2026
Community adapter pages render either MDX bodies (`mdxBody: true`, used
by every community adapter today) or, as a fallback for adapters without
an MDX file, content fetched live from a third-party GitHub repo. Both
render paths previously emitted bare `<a href>` tags for external links,
which passes editorial link equity to unmoderated third-party
destinations.

Adds `rel="nofollow ugc noopener noreferrer"` and `target="_blank"` to
all `http(s)://` links rendered through:

- The page-level MDX renderer in `community/[slug]/page.tsx` — wraps the
  existing `createRelativeLink` so relative/internal links still resolve
  through the standard fumadocs path.
- The `ReadmeContent` component (fallback path for fetched READMEs).

In-page anchors, relative paths, and non-HTTP schemes (e.g. `mailto:`)
are left untouched in both paths.

Official, vendor-official, and core docs pages are unaffected.
`createRelativeLink` returns an `FC` whose render type permits a
Promise<ReactNode>, while my custom `(props) => ReactNode` signature
did not — typecheck failed in the docs build. Switch to
`FC<ComponentProps<"a">>` to match the surrounding fumadocs typing
exactly and call the wrapped component via JSX instead of as a
function.
Comment thread apps/docs/app/[lang]/adapters/(detail)/community/[slug]/page.tsx
@bensabic bensabic merged commit 9b8d8c4 into main May 29, 2026
17 checks passed
@bensabic bensabic deleted the docs/add-kb-resources branch May 29, 2026 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants