Files
supabase/.agents/skills/ask-the-docs/reference/ci-and-lint.md
3089aa3f67 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>
2026-11-25 23:11:12 +00:00

4.3 KiB

Docs CI and lint surface

GitHub Actions running on every PR touching supabase/supabase, plus the deploy path. Confirm against the current .github/workflows/ if behavior surprises you.

Before adding a new lint job or CI check, scan this list first — see adding-features.md "Reuse pipelines, don't fork them."

PR flow

PR opened / updated
    │
    ├── Docs Tests                 (pnpm test:docs on relevant docs code/spec changes)
    ├── TypeScript & Lint          (tsc + eslint)
    ├── Check Code Formatting      (oxfmt format check)
    ├── reviewdog                  (inline annotations)
    ├── Validate pull request      (PR metadata)
    └── Authorize Vercel Deploys → Vercel builds preview deploy → Preview on CDN

Merge to master
    └── Vercel → next build (after turbo runs markdown generation) → deploy

On every pull request

Workflows run in parallel against any PR touching the repo:

1. Docs Tests (docs-tests.yml)

Triggered on relevant docs code/spec changes, including the generated scoped PAT partials and their shared permission catalog. Runs on a Blacksmith 4-vCPU Ubuntu runner with concurrency controls to cancel stale builds.

  • Sparse checkout of apps/docs, examples, packages, supabase, and patches.
  • Install pnpm (pinned hash).
  • Set up Node.js from .nvmrc.
  • pnpm install --frozen-lockfile.
  • Regenerate the scoped PAT partials and fail if the committed output drifts.
  • Run pnpm run test:docs (with dummy GitHub OAuth env vars to prevent local Supabase startup errors).

2. TypeScript & Lint (typecheck.yml)

TypeScript type checking and ESLint across the monorepo.

3. Check Code Formatting (prettier.yml)

Format checking with oxfmt across the whole repo including apps/docs.

4. Authorize Vercel Deploys

Gates Vercel preview deployment on a GitHub-side check first. Prevents arbitrary forks from triggering Vercel builds.

5. reviewdog

Inline code review annotations via reviewdog.

6. Validate pull request

PR metadata validation (title format, labels, etc.).

Deployment (on merge to master)

Production deployment is handled by Vercel. Supabase employees branch the repo directly rather than fork it, so CI checks auto-run and Vercel deploys can be authorized without the external PR security gate.

Markdown for every guide is generated as a turbo dependency of build so Vercel can bundle it with middleware and functions — see build-pipeline.md for the task graph.

The Authorize Vercel Deploys workflow is the glue between GitHub Actions and Vercel: it runs first to approve the deploy, then Vercel picks it up and builds/deploys the Next.js site to their CDN.

Notable design choices

  • Sparse checkout keeps CI fast by only pulling the relevant workspace packages.
  • Blacksmith runners are used instead of standard GitHub-hosted runners for speed.
  • All workflow steps use pinned action hashes rather than floating tags for supply chain security.

Where to add a new check

Before adding a new GitHub Actions workflow:

  1. Is it a prose or terminology check? — it belongs in the authoring skills, not in a workflow. The repo ran a blocking MDX linter and retired it.
  2. Can Docs Tests absorb it? — TypeScript / vitest checks for new functionality fit here.
  3. Is it cross-cutting? — typecheck, prettier, and reviewdog already cover the cross-cutting cases.
  4. Last resort — a new workflow file. Use a Blacksmith runner, sparse checkout, pinned action hashes, and a concurrency group. Add a clear trigger filter so it doesn't run on unrelated PRs.

Vale and prose linting (future)

Chris Ward's wishlist (source: hiring conversations, not yet in the repo):

  • Vale linting MCP server.
  • Vale extension for VS Code.
  • More async automation that doesn't block PR merges.

If adding prose linting, prefer async (commenting) checks over blocking ones to keep merge cadence high.