docs(skills): add /kb to the write-the-docs content types and checklist (#53990)

## I have read the CONTRIBUTING.md file.

YES

## What kind of change does this PR introduce?

**Skill update.** The `write-the-docs` and `edit-the-docs` skills and
the `pm-the-docs` checklist now say when content belongs in `/kb`
instead of `/docs`. The docs skills also get a consistency pass.

Closes DOCS-1559.

## What is the current behavior?

The skills and the checklist do not mention `/kb`. Writers get no prompt
to put comparisons or migration guides there. The skills also still
place troubleshooting in `apps/docs`, disagree about which skill owns
the Shape stage, and link to skills that are not in this repo.

## What is the new behavior?

| File | Change |
|---|---|
| `.agents/skills/write-the-docs/reference/content-type-gate.md` | Adds
a `/kb` row and a short "What goes in `/docs` and what goes in `/kb`"
section. Troubleshooting now points to `/kb`. |
| `.agents/skills/write-the-docs/SKILL.md` | Adds `/kb` to the content
types. `/kb` guides use the template gate, and `/kb` FAQs are exempt.
Phase 2 sends `/kb` content to `apps/kb/AGENTS.md`. Removes duplicate
steps and links to skills outside this repo. |
| `.agents/skills/write-the-docs/reference/drafting-mechanics.md` | Says
oxfmt instead of Prettier |
| `.agents/skills/edit-the-docs/SKILL.md` | Adds a content-type gate
check before additions |
| `.agents/skills/pm-the-docs/reference/write-the-docs-checklist.md` |
Adds a stage 2 (Shape) item to decide if content belongs in `/kb`. Shape
now points to `/pm-the-docs` for placement decisions. |
| `.agents/skills/pm-the-docs/SKILL.md`,
`.agents/skills/ask-the-docs/SKILL.md` | Agree that `pm-the-docs` owns
Frame and Shape, and `ask-the-docs` owns docs-app mechanics. Removes
links to skills outside this repo. |
| `.agents/skills/ask-the-docs/reference/*.md` | Says oxfmt instead of
Prettier, updates the troubleshooting known issue, and removes links to
skills outside this repo |

## Additional context

Skill docs only. No preview needed. Troubleshooting now lives in `/kb`
and takes no direct contributions. The skills now say so.

### Test plan

- [ ] Read the diffs. The `/docs` and `/kb` rule matches the
content-type gate.
- [ ] `grep -rn docs-agent-skills
.agents/skills/{write,ask,pm}-the-docs` returns nothing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Nik Richers <nik@validmind.ai>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2026-11-25 23:11:12 +00:00
1 parent 7c6366d979
commit 3089aa3f67
11 files changed
+50 -53

No files matched your search

+4 -10
View File
@@ -47,7 +47,7 @@ Two jobs:
principles.
**Not for:** general Supabase docs _content_ questions (use
`work-linear-issue`, `audit-quickstarts`, etc.), or app-level work outside
`write-the-docs`, `edit-the-docs`, or `review-the-docs`), or app-level work outside
`apps/docs/`.
## Answering with diagrams
@@ -86,7 +86,7 @@ at hand — they cite each other where context matters.
| [`reference/llm-agent-surface.md`](./reference/llm-agent-surface.md) | Audience routing, `llms.txt`, content negotiation, bulk exports. |
| [`reference/llm-agent-parity.md`](./reference/llm-agent-parity.md) | HTML↔markdown fidelity (e.g. AI prompts), search caveat, agent onboarding guides, in-flux wiring. |
| [`reference/federated-docs.md`](./reference/federated-docs.md) | How docs pulls markdown from external repos at build time. Routes, `pageMap`, remark/rehype plugins, link transforms, known failure modes. |
| [`reference/ci-and-lint.md`](./reference/ci-and-lint.md) | GitHub Actions on every PR — `Docs Tests`, typecheck, prettier, Vercel preview gate. Where to add a check before creating a new one. |
| [`reference/ci-and-lint.md`](./reference/ci-and-lint.md) | GitHub Actions on every PR — `Docs Tests`, typecheck, oxfmt, Vercel preview gate. Where to add a check before creating a new one. |
| [`reference/management-api-reference.md`](./reference/management-api-reference.md) | Management API OpenAPI → reference generation, including scoped PAT permission tables; why not to swap in Scalar/Redoc. |
| [`reference/graphql-endpoint.md`](./reference/graphql-endpoint.md) | The `/api/graphql` endpoint under `apps/docs/resources/` — per-query folder layout, `rootSchema.ts`, connection/field utils, and the steps to add a new top-level query. |
| [`reference/search-embeddings.md`](./reference/search-embeddings.md) | The `scripts/search/` embeddings pipeline behind `searchDocs` — content sources, processing flow, change detection, and the `page` / `page_section` tables. |
@@ -124,17 +124,11 @@ write it down.
## Related skills
- [`pm-the-docs`](../pm-the-docs/SKILL.md) — audience, stage, and
cross-cutting scope calls (Frame stage of the "Write the docs" checklist,
- [`pm-the-docs`](../pm-the-docs/SKILL.md) — audience, stage, content type,
and placement calls (Frame and Shape stages of the "Write the docs" checklist,
mirrored in `pm-the-docs`'s reference file). Cross-repo **product** lookup
(universe) lives there, not in this skill.
- [`test-the-docs`](../test-the-docs/SKILL.md) — execute docs snippets against a
Docker-isolated local stack; verification report.
- [`work-linear-issue`](https://github.com/supabase/docs-agent-skills/blob/main/.claude/skills/work-linear-issue/SKILL.md) — implementing
assigned DOCS-\* tickets.
- [`review-the-docs`](../review-the-docs/SKILL.md) — reviewing open docs
PRs with type-specific verification.
- [`audit-content-listings`](https://github.com/supabase/docs-agent-skills/blob/main/.claude/skills/audit-content-listings/SKILL.md) — batch
conversion of overview pages to content listings.
- [`create-pull-request`](https://github.com/supabase/docs-agent-skills/blob/main/.claude/skills/create-pull-request/SKILL.md) — opening or
updating a docs PR.
@@ -134,9 +134,7 @@ pattern in production:
| Markdown handler | `apps/docs/internals/markdown-schema/ContentListings.ts` |
| MDX registration | `apps/docs/features/docs/MdxBase.shared.tsx` |
MDX usage: `<ContentListings id="storage-get-started" />`. For batch
overview-page migration, see the `audit-content-listings` skill in
[`docs-agent-skills`](https://github.com/supabase/docs-agent-skills).
MDX usage: `<ContentListings id="storage-get-started" />`.
When adding a new component that has a markdown representation:
@@ -196,7 +194,7 @@ commands:
| Tool | Where | What it catches |
| --------------------------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------- |
| `pnpm test:local:unwatch <path>` (from `apps/docs`) | per-test | Vitest suite for `lib/` and `data/` schemas; needs local Supabase + DB reset first — see `apps/docs/AGENTS.md` |
| `pnpm format` | repo root | Prettier — run before opening a PR |
| `pnpm format` | repo root | oxfmt — run before opening a PR |
| `pnpm lint --filter=docs` | repo root | ESLint over `apps/docs` |
| `pnpm typecheck` | repo root | TS across packages |
| `pnpm build --filter=docs` | repo root | Includes markdown generation; failures here block release |
@@ -230,8 +228,6 @@ Wraps the app with:
changing URL shapes.
- **www** (`apps/www`) sometimes embeds docs sections.
- **PostHog** receives `docs_*` events for analytics.
- **`docs-agent-skills`** repo (https://github.com/supabase/docs-agent-skills)
holds batch audit/conversion skills that drive multi-PR docs migrations.
- **Federated upstream repos** — see [`federated-docs.md`](./federated-docs.md)
for the full list (pg_graphql, vecs, wrappers, terraform-provider, setup-cli,
splinter, agent-skills).
@@ -14,7 +14,7 @@ PR opened / updated
│
├── Docs Tests (pnpm test:docs on relevant docs code/spec changes)
├── TypeScript & Lint (tsc + eslint)
├── Prettier (format check)
├── Check Code Formatting (oxfmt format check)
├── reviewdog (inline annotations)
├── Validate pull request (PR metadata)
└── Authorize Vercel Deploys → Vercel builds preview deploy → Preview on CDN
@@ -46,9 +46,9 @@ Ubuntu runner with concurrency controls to cancel stale builds.
TypeScript type checking and ESLint across the monorepo.
### 3. Prettier (`prettier.yml`)
### 3. Check Code Formatting (`prettier.yml`)
Format checking across the whole repo including `apps/docs`.
Format checking with oxfmt across the whole repo including `apps/docs`.
### 4. Authorize Vercel Deploys
@@ -84,7 +84,7 @@ Specific traps to watch for. One-liner per item.
- `pnpm build --filter=docs` runs markdown generation. A failure in
`generate-guides-markdown.ts` blocks the build — read its console output
rather than the cryptic CI error.
- `pnpm format` from the repo root catches most prettier drift. Run it
- `pnpm format` from the repo root catches most oxfmt drift. Run it
before opening a PR; CI is unforgiving.
- Auto-import sorting can silently shuffle imports across files you didn't
touch. Reset those files (`git checkout master -- <path>`) before pushing.
@@ -35,13 +35,14 @@ failure modes. Implication: **don't add new federated sources** without
strong justification; **don't extend federated patterns** to new content
types.
## Troubleshooting guides currently live in an external repo
## Troubleshooting articles come from a private repo
**Severity:** ongoing sync issues.
This causes synchronization problems between the docs site and the source
of truth. Proposed direction: bring them in-house and require support
teams to contribute directly to `supabase/supabase` to ensure accuracy.
Troubleshooting articles moved from `apps/docs` to `/kb`. The build fetches
them into `apps/kb/src/content/troubleshooting/` from a private repo, so
they don't take direct contributions in `supabase/supabase`, and the site
can drift from the source repo. See `apps/kb/README.md`.
## Reference pages can't go through standard MDX
+1
View File
@@ -159,6 +159,7 @@ Testing covers procedural content only. Claims that nothing executes, such as li
Once it's scoped:
- Crawl reader feedback for candidate gaps. Linear is an internal Supabase tool, preferred when available and not required for open-source contributors.
- Before you add content, check the [content-type gate](../write-the-docs/reference/content-type-gate.md#what-goes-in-docs-and-what-goes-in-kb). Put situation-specific content and fixes for specific problems in `/kb`, and link to them from the page.
- Ground additions the same way as PR 3. Read the code before making a behavior claim, and flag what you inferred.
- **Run every new runnable snippet through [`test-the-docs`](../test-the-docs/SKILL.md) before it ships.** New content is where an untested snippet is likeliest to be wrong, because nothing has ever executed it.
- Strip internal business context before the draft ships: PRD intent, roadmap speculation, and ticket discussion. It belongs in the PR description, not in the MDX.
+1 -1
View File
@@ -58,7 +58,7 @@ For the code view, see [`ask-the-docs` `reference/feature-flags.md`](../ask-the-
## Related skills
- [`ask-the-docs`](../ask-the-docs/SKILL.md) — IA placement and docs-app architecture (Shape stage). Cross-repo **product** lookup lives here in `universe-lookup.md`, not in `ask-the-docs`.
- [`ask-the-docs`](../ask-the-docs/SKILL.md) — docs-app architecture and IA placement mechanics, such as nav registration. Cross-repo **product** lookup lives here in `universe-lookup.md`, not in `ask-the-docs`.
- [`write-the-docs`](../write-the-docs/SKILL.md) — drafting once Frame/Shape are settled
- [`test-the-docs`](../test-the-docs/SKILL.md) — run snippets against a Docker-isolated local stack; verification report
- [`edit-the-docs`](../edit-the-docs/SKILL.md) — restructure and improve existing pages
@@ -32,15 +32,16 @@ _Skills:_ `/ask-the-docs` for how the docs surface works today; `/pm-the-docs` f
### 2. Shape
_Skill:_ `/ask-the-docs` for IA placement, architecture, and where content lives.
_Skills:_ `/pm-the-docs` for content type and placement decisions; `/ask-the-docs` for docs-app architecture and where content lives.
- [ ] P: Pick the content type(s): tutorial (learning), how-to (a task), reference (lookup), explanation (the why). Do not mix types on one page (refer to [Diátaxis](https://diataxis.fr/))
- [ ] P: Decide where the page lives in the existing IA and what links in and out (avoid orphan pages)
- [ ] P: Decide if part of the content belongs in `/kb` instead of `/docs`: comparisons, migration guides, or anything where the answer depends on the user's stack. Product facts stay in `/docs`, and `/kb` links to them ([content-type gate](../../write-the-docs/reference/content-type-gate.md#what-goes-in-docs-and-what-goes-in-kb))
- [ ] P: List prerequisites and assumed knowledge up front
### 3. Draft
_Skill:_ `/write-the-docs` to draft net-new content grounded in Linear and the code (`/pm-the-docs` → universe when accessible, else public search / named product repos).
_Skill:_ `/write-the-docs` to draft net-new content grounded in Linear and the code.
- [ ] P: Lead with the why and the outcome, then the how/what (product story first)
- [ ] P: Include at least one runnable, copy-pasteable example that you have actually run (or will run in Self-review via `/test-the-docs`)
+21 -21
View File
@@ -6,28 +6,28 @@ description: >-
code, and the docs style guide. Use when asked to write
docs for a new feature, a product launch, or a Linear ticket that needs
net-new content rather than a bug fix. Not for implementing existing docs
bug reports — use work-linear-issue for that. Not for restructuring
bug reports. Not for restructuring
existing pages — use edit-the-docs for that.
---
# Write the docs
Drafts net-new Supabase docs content (or product-grounded rewrites) for a feature or launch. Distinct from [`work-linear-issue`](https://github.com/supabase/docs-agent-skills/blob/main/.claude/skills/work-linear-issue/SKILL.md), which implements and fixes existing docs tickets, and from [`edit-the-docs`](../edit-the-docs/SKILL.md), which restructures and tightens pages that already exist without gathering net-new product intent. This skill is for the case where the content doesn't exist yet (or must be rewritten from intent + code), grounded in four inputs rather than guessed.
Drafts net-new Supabase docs content (or product-grounded rewrites) for a feature or launch. Distinct from [`edit-the-docs`](../edit-the-docs/SKILL.md), which restructures and tightens pages that already exist without gathering net-new product intent. This skill is for the case where the content doesn't exist yet (or must be rewritten from intent + code), grounded in four inputs rather than guessed.
## Core rules
1. **Gather before drafting.** Never draft from a ticket title alone. Pull all four inputs below first; a thin gather phase produces a draft that's wrong about how the feature actually works.
2. **Separate confirmed behavior from product intent from inference.** Code tells you what the feature does today. Linear/PRD/PRFAQ (or prior Frame/Shape output) tells you what it's meant to do and how it should be positioned. Anything you had to guess, flag explicitly rather than stating it as fact.
3. **Follow the [style guide](../../../apps/docs/style-guide/README.md) for writing conventions, including voice, terminology, formatting, page structure, and elements. Never follow it for content accuracy.** It is a style reference, not a source of truth: rule 2's Linear+code read is what governs what the page actually says. Don't invent voice or structure rules. When the guide and Google's developer documentation style guide both come up short, say so in the handoff rather than copying whatever the nearest page happens to do.
4. **Reuse, don't duplicate.** For docs-app architecture/placement questions, use [`ask-the-docs`](../ask-the-docs/SKILL.md) and [`audit-docs-ia`](https://github.com/supabase/docs-agent-skills/blob/main/.claude/skills/audit-docs-ia/SKILL.md) rather than re-deriving that knowledge here.
4. **Reuse, don't duplicate.** Use [`ask-the-docs`](../ask-the-docs/SKILL.md) for docs-app architecture and [`pm-the-docs`](../pm-the-docs/SKILL.md) for placement decisions rather than re-deriving that knowledge here.
5. **Know what you're actually drafting.** Not everything that looks like "docs for a feature" is a hand-written page — see the content-type gate below before you start writing. If the ask is restructure, reorder, connective text, or clarity on an existing page (no new product story), use [`edit-the-docs`](../edit-the-docs/SKILL.md) instead.
## Phase 1 — Gather (read-only)
Four inputs, read in this sequence (sequence, not priority; Linear remains the product-intent source and code remains the behavior source per rule 2 and Phase 1 step 3):
1. **Style guide — voice/terminology reference.** Read [`style-guide/README.md`](../../../apps/docs/style-guide/README.md) and follow the step that matches what you're drafting. Check [`WORD_LIST.md`](../../../apps/docs/style-guide/WORD_LIST.md) for the terms you plan to introduce. The guide's closing section says what to consult when it's silent; follow that rather than matching a neighbouring page.
2. **Linear — the ticket and its product context.** Linear is an internal Supabase tool: preferred when available, not required for open-source contributors. When a Linear issue is available, pull it, then its parent project/initiative description too (PRD, PRFAQ, RFC, or initiative narrative) and any PM comments. Product framing/positioning language usually lives one level up from the ticket, in the parent project or initiative description rather than the ticket body. Distinguish scope the ticket actually commits to from aspirational language in the PRD. If there is no Linear issue and no prior Frame/Shape product-intent output, stop drafting: ask internal authors for a Linear URL, otherwise hand off to [`pm-the-docs`](../pm-the-docs/SKILL.md) (Frame) and [`ask-the-docs`](../ask-the-docs/SKILL.md) when Shape/IA is unsettled. Resume only after product intent exists — never invent positioning, and never run Frame/Shape inside this Draft skill.
1. **Style guide — voice/terminology reference.** Read [`style-guide/README.md`](../../../apps/docs/style-guide/README.md) and follow the step that matches what you're drafting. The guide's closing section says what to consult when it's silent; follow that rather than matching a neighbouring page.
2. **Linear — the ticket and its product context.** Linear is an internal Supabase tool: preferred when available, not required for open-source contributors. When a Linear issue is available, pull it, then its parent project/initiative description too (PRD, PRFAQ, RFC, or initiative narrative) and any PM comments. Product framing/positioning language usually lives one level up from the ticket, in the parent project or initiative description rather than the ticket body. Distinguish scope the ticket actually commits to from aspirational language in the PRD. If there is no Linear issue and no prior Frame/Shape product-intent output, stop drafting: ask internal authors for a Linear URL, otherwise hand off to [`pm-the-docs`](../pm-the-docs/SKILL.md) (Frame and Shape). Resume only after product intent exists — never invent positioning, and never run Frame/Shape inside this Draft skill.
3. **Code.** Read the actual implementation before writing a single behavior claim — the PRD describes intent, the code describes what shipped. Check the Linear issue/project first for a linked `supabase/supabase` PR — its diff and description are the most precise "what actually shipped" source, more precise than a general codebase read. If no PR is linked, locate the feature directly in `supabase/supabase` (or the product's own repo), and apply [`ask-the-docs`](../ask-the-docs/SKILL.md)'s reuse/minimalism lens: understand what exists before describing it. When behavior spans services (CLI, Auth, migrations, platform, …), follow [`pm-the-docs`](../pm-the-docs/SKILL.md) → [universe-lookup](../pm-the-docs/reference/universe-lookup.md) **capability gate** (universe when accessible, else OSS public search / linked repos — not `ask-the-docs`). If code and PRD disagree, the code wins for behavior claims — flag the mismatch rather than silently picking one.
4. **Whatever else the author supplies.** Screenshots, example projects, related pages, Slack threads, a specific voice sample. Screenshots are for more than general context — use them to verify the _exact_ button/menu/field labels before writing instructional steps that reference them; a mismatched UI label is one of the easiest, most avoidable errors in a draft. Ask for these when the feature's user-facing shape is still unclear after 1–3, rather than guessing.
@@ -37,13 +37,14 @@ Summarize all four back to the requester before drafting: what's confirmed, what
## Phase 1.5 — Content-type gate
Before drafting, classify what's actually being asked for against `apps/docs`'s real content types (see [`ask-the-docs`](../ask-the-docs/SKILL.md)'s `app-map.md` "Content types" table, and [reference/content-type-gate.md](reference/content-type-gate.md) here):
Before drafting, classify what's actually being asked for against the real content types (see [`ask-the-docs`](../ask-the-docs/SKILL.md)'s `app-map.md` "Content types" table, and [reference/content-type-gate.md](reference/content-type-gate.md) here):
- **Guide / tutorial** — hand-written MDX under `content/guides/`. This is what this skill drafts.
- **Troubleshooting** — hand-written MDX under `content/troubleshooting/`, sometimes synced from GitHub issues. Also in scope.
- **Troubleshooting**: not in `apps/docs`. Troubleshooting articles live in `/kb`, fetched into `apps/kb/src/content/troubleshooting/` from a private repo at build time, and they don't take direct contributions. See `apps/kb/README.md`.
- **Knowledge base (`/kb`)**: plain Markdown under `apps/kb/src/content/` for content where the answer depends on the user's stack: comparisons, migration guides, buy-vs-build, applied how-tos. Also in scope, but follow `apps/kb/AGENTS.md`, not the `apps/docs` MDX conventions. Product facts stay in `/docs`; the `/kb` article links to them. See [reference/content-type-gate.md](reference/content-type-gate.md#what-goes-in-docs-and-what-goes-in-kb).
- **Reference** — generated from `spec/` (OpenAPI, SDK YAML, CLI config) → `features/docs/generated/**`. **Not hand-authored via the standard MDX path.** If the ask is actually reference-type content (a new API endpoint, config option, or SDK method that needs a reference entry), stop drafting MDX — it would diverge from or get silently overwritten by the generator. Instead point to the spec/codegen pipeline (`apps/docs/spec/`, `apps/docs/generator/`; see `ask-the-docs`'s `management-api-reference.md` for the OpenAPI-specific flow) and say so explicitly rather than producing a page that looks done but isn't the real fix.
When in doubt, ask `ask-the-docs` rather than guessing — this classification is the one call in this skill most likely to be wrong if made from outside knowledge of the app.
When in doubt, ask `ask-the-docs` (Reference or Federated) or `pm-the-docs` (`/docs` vs `/kb`) rather than guessing — this classification is the one call in this skill most likely to be wrong if made from outside knowledge of the app.
## Phase 1.6 — Template gate
@@ -54,11 +55,13 @@ Before drafting, pick the page's template and confirm it with the requester.
3. If no row fits, say so and ask. Don't invent a structure.
4. Draft from the template's headings, and run its checklist in Phase 2.5.
For `/kb`, this gate applies to guides (`apps/kb/src/content/guides/`). Skip it for FAQs (`apps/kb/src/content/faqs/`): an FAQ answers its question in the first sentence of the body, as `apps/kb/AGENTS.md` defines.
## Phase 2 — Draft
- Follow `apps/docs` MDX conventions (component usage, frontmatter, code sample wiring) — see [`ask-the-docs`](../ask-the-docs/SKILL.md) for the pipeline details rather than re-deriving them.
- Place the page using existing IA precedent; for a placement call that isn't obvious, consult [`audit-docs-ia`](https://github.com/supabase/docs-agent-skills/blob/main/.claude/skills/audit-docs-ia/SKILL.md)'s nav/IA knowledge rather than guessing a nav slot.
- **Wire it into navigation, not just onto disk.** Placement (which section) and nav enablement (whether it actually shows up) are separate — confirm the current nav-registration mechanism via `ask-the-docs`/`audit-docs-ia` rather than assuming a page is discoverable just because the file exists in the right folder.
- For `apps/docs` pages, follow `apps/docs` MDX conventions (component usage, frontmatter, code sample wiring). See [`ask-the-docs`](../ask-the-docs/SKILL.md) for the pipeline details rather than re-deriving them. For `/kb` content, follow `apps/kb/AGENTS.md` instead: plain GitHub-flavored Markdown, no components, and frontmatter with `title`, `description`, and `topics`.
- Place the page using existing IA precedent; for a placement call that isn't obvious, consult [`pm-the-docs`](../pm-the-docs/SKILL.md) (Shape) rather than guessing a nav slot.
- **Wire it into navigation, not just onto disk.** Placement (which section) and nav enablement (whether it actually shows up) are separate — confirm the current nav-registration mechanism via `ask-the-docs` rather than assuming a page is discoverable just because the file exists in the right folder.
- Ground every behavior claim in Phase 1's code read (the linked PR when there is one); ground every "why this matters" framing in Linear/PM context or prior Frame/Shape output; mark inferred material inline (e.g. an HTML comment or a flagged line in the handoff summary) so a reviewer can find it fast.
- **Write timeless documentation, cut redundancy, and prefer a paragraph to a single-item list.** See [timeless documentation](../../../apps/docs/style-guide/03-page-structure.md#write-timeless-documentation), [brevity](../../../apps/docs/style-guide/01-voice-and-tone.md#brevity), and [lists](../../../apps/docs/style-guide/02-elements.md#lists).
- **Strip internal business context before the final draft.** HTML comments flagging PRD intent, roadmap speculation, internal ticket discussions, or "gap-fill" notes must be removed from MDX before handoff. Open-source docs shouldn't expose internal planning. Flag assumptions and open questions for reviewers in the PR description instead, not in the shipped content.
@@ -73,10 +76,10 @@ Before handing off, confirm:
- [ ] Every behavior claim traces to the code read (ideally the linked PR), not just the PRD, checked claim by claim in the [accuracy pass](#accuracy-pass)
- [ ] Every "why it matters" / positioning line traces to Linear/PM context or prior Frame/Shape output, not invented
- [ ] Inferred or assumed material is flagged, not stated as fact
- [ ] Content type confirmed as Guide/Troubleshooting (not something that belongs in generated Reference instead)
- [ ] Content type confirmed as Guide or `/kb` (not Reference that belongs in generated output, and not Troubleshooting, which takes no direct contributions)
- [ ] Nav placement and nav enablement both wired, not just the placement
- [ ] Internal links resolve; first-use of new terms/acronyms is defined
- [ ] If the draft has procedural snippets (CLI, SQL, client code, or example apps), **offered** to run [`test-the-docs`](../test-the-docs/SKILL.md) (optional; Docker Compose sandbox — stack profile for DB/API, examples profile for `example-app`)
- [ ] Offered [`test-the-docs`](../test-the-docs/SKILL.md) for runnable snippets (CLI, SQL, client code, or example apps)
- [ ] Future promises minimized where possible (timeless documentation principle)
- [ ] No unnecessary redundancy (same point restated multiple ways)
- [ ] Single-item lists avoided unless there's a specific reason
@@ -92,7 +95,7 @@ Before handoff, run both passes from [Use with an AI agent](../../../apps/docs/s
- [ ] Terminology matches [`WORD_LIST.md`](../../../apps/docs/style-guide/WORD_LIST.md) (including any terms flagged as imprecise, not just spelling/capitalization)
- [ ] Voice, tense, and brevity follow [`01-voice-and-tone.md`](../../../apps/docs/style-guide/01-voice-and-tone.md)
- [ ] Document type, section grouping, and chunking follow [`03-page-structure.md`](../../../apps/docs/style-guide/03-page-structure.md)
- [ ] The page follows the template named in [Choose a template](../../../apps/docs/style-guide/03-page-structure.md#choose-a-template)
- [ ] The page follows the template named in [Choose a template](../../../apps/docs/style-guide/03-page-structure.md#choose-a-template) (`/kb` FAQs are exempt; they answer the question in the first sentence)
- [ ] Admonitions, headings, links, and other components follow [`02-elements.md`](../../../apps/docs/style-guide/02-elements.md)
### Accuracy pass
@@ -124,10 +127,9 @@ Only apply this phase when the draft renames, moves, or deletes an existing page
This skill stops at a reviewable draft. It does not open worktrees or PRs itself:
- **Offer** [`test-the-docs`](../test-the-docs/SKILL.md) when the draft includes runnable procedural snippets. Ask before starting verification. Gate prerequisites **per artifact class** (Docker Compose stack profile for DB/API artifacts; examples profile / Node in-runner for `example-app`). If declined, or a required prerequisite for that class is missing, record `deferred` for those artifacts only and continue. When accepted, attach the verification report to the PR body / self-review note.
- Then run [`review-the-docs`](../review-the-docs/SKILL.md) local self-review (build, classify, and read the change as a reader).
- Hand off to [`create-pull-request`](https://github.com/supabase/docs-agent-skills/blob/main/.claude/skills/create-pull-request/SKILL.md) (and [`work-linear-issue`](https://github.com/supabase/docs-agent-skills/blob/main/.claude/skills/work-linear-issue/SKILL.md) if the ticket needs a full worktree+PR flow) for the actual PR mechanics. Carry the Phase 1/2 flagged-assumptions list forward explicitly into that handoff — it belongs in the PR description (e.g. a "needs review" section) so a reviewer sees it, not just as an inline comment buried in the draft.
- If the feature is UI-driven and the PR will need screenshots/GIFs, flag [`proof-it-works`](https://github.com/supabase/docs-agent-skills/blob/main/.claude/skills/proof-it-works/SKILL.md) as the next step rather than capturing evidence here.
- Before opening the PR, run [`review-the-docs`](../review-the-docs/SKILL.md) local self-review: `pnpm build:guides-markdown` where applicable, and anchor checks per [reference/drafting-mechanics.md](reference/drafting-mechanics.md).
- Before opening the PR, run [`review-the-docs`](../review-the-docs/SKILL.md) local self-review (build, classify, and read the change as a reader), including `pnpm build:guides-markdown` where applicable and the anchor checks in [reference/drafting-mechanics.md](reference/drafting-mechanics.md).
- When the PR is opened, carry the Phase 1/2 flagged-assumptions list into the PR description (for example, a "needs review" section) so a reviewer sees it, not just as an inline comment buried in the draft.
- If the feature is UI-driven and the PR will need screenshots or GIFs, say so in the handoff rather than capturing evidence here.
## Additional resources
@@ -139,6 +141,4 @@ This skill stops at a reviewable draft. It does not open worktrees or PRs itself
- "Write the docs" checklist (Draft stage): [`pm-the-docs`](../pm-the-docs/SKILL.md)'s [reference/write-the-docs-checklist.md](../pm-the-docs/reference/write-the-docs-checklist.md)
- Cross-repo product lookup: [`pm-the-docs`](../pm-the-docs/SKILL.md) → [universe-lookup](../pm-the-docs/reference/universe-lookup.md)
- Runnable verification: [`test-the-docs`](../test-the-docs/SKILL.md)
- Docs-app architecture/placement: [`ask-the-docs`](../ask-the-docs/SKILL.md), [`audit-docs-ia`](https://github.com/supabase/docs-agent-skills/blob/main/.claude/skills/audit-docs-ia/SKILL.md)
- PR mechanics: [`create-pull-request`](https://github.com/supabase/docs-agent-skills/blob/main/.claude/skills/create-pull-request/SKILL.md), [`work-linear-issue`](https://github.com/supabase/docs-agent-skills/blob/main/.claude/skills/work-linear-issue/SKILL.md)
- Screenshots/proof: [`proof-it-works`](https://github.com/supabase/docs-agent-skills/blob/main/.claude/skills/proof-it-works/SKILL.md)
- Docs-app architecture and nav mechanics: [`ask-the-docs`](../ask-the-docs/SKILL.md)
@@ -1,13 +1,18 @@
# Content-type gate
Before drafting anything, classify the request against `apps/docs`'s real content types. This is grounded in `ask-the-docs`'s `app-map.md` "Content types" table — re-check that table if this note and the live app-map ever disagree, since the app-map is the source of truth.
Before drafting anything, classify the request against the real content types. `ask-the-docs`'s `app-map.md` "Content types" table covers `apps/docs`; for `/kb`, see `apps/kb/AGENTS.md`.
| Type | Location | Hand-authored by this skill? |
|---|---|---|
| **Guide / tutorial** | `content/guides/` | Yes — hand-written MDX, goal-oriented. This is the default case. |
| **Troubleshooting** | `content/troubleshooting/` | Yes, though some entries sync from GitHub issues — check before assuming a fresh page is needed. |
| **Troubleshooting** | `/kb/troubleshooting/`, fetched into `apps/kb/src/content/troubleshooting/` from a private repo | No. Troubleshooting articles go through an internal process, not direct contributions. See `apps/kb/README.md`. |
| **Reference** | Generated from `spec/` (OpenAPI, SDK YAML, CLI config) → `features/docs/generated/**` | **No.** Reference pages do not use the standard MDX path — see `ask-the-docs`'s `docs-app-direction.md` for why, and `management-api-reference.md` for the OpenAPI-specific spec → codegen → reference-page flow. |
| **Federated** | External repos, pulled at build time | No — out of scope for this skill; see `ask-the-docs`'s `federated-docs.md`. |
| **Knowledge base (`/kb`)** | `apps/kb/src/content/guides/` and `apps/kb/src/content/faqs/` | Yes, but not as `apps/docs` MDX. Use `/kb` when the answer depends on the user's stack, scale, or alternatives: comparisons, migration guides, buy-vs-build, applied how-tos. Plain GitHub-flavored Markdown with no components; frontmatter needs `title`, `description`, and `topics`. See `apps/kb/AGENTS.md`. |
## What goes in `/docs` and what goes in `/kb`
`/docs` holds product facts: concepts, configuration, API and SDK usage, getting started. Supabase alone sets the answer. `/kb` holds content where the answer depends on the user's situation. Keep product facts (API signatures, config values, limits, pricing) in `/docs` only, and link to them from `/kb`. A launch can need both: a `/docs` guide for the feature, and a `/kb` comparison or migration guide. Fixes for specific problems, such as what one error message means, are troubleshooting articles in `/kb`, and the `/docs` page links to them.
## What to do when the ask is actually Reference-type
@@ -36,9 +36,8 @@ pnpm build:guides-markdown
`pnpm build:guides-markdown` only applies to guides, explainers, and tutorials.
From the repository root, run `pnpm format` to apply Prettier to changed MDX
files. This enforces repo-wide formatting rules, including lowercase SQL
keyword casing in code samples.
From the repository root, run `pnpm format` to apply oxfmt to changed MDX
files. This enforces repo-wide formatting rules.
Check terminology against [`WORD_LIST.md`](../../../../apps/docs/style-guide/WORD_LIST.md)
yourself. Treat its replacements as suggestions when context matters: rewrite the