Files
supabase/.agents/skills/test-the-docs/sandbox/compose.yaml
Nik RichersandNik Richers 0322720743 docs: add test-the-docs skill and pm-the-docs universe lookup (#49913)
## I have read the CONTRIBUTING.md file.

YES

## What kind of change does this PR introduce?

Docs authoring skills / contributor enablement.

## What is the current behavior?

- The "Write the docs" bar asks for runnable examples, but skills stop
at lint/build (`/review-the-docs`) and do not execute inline MDX
snippets.
- Cross-repo product grounding depends on a single-repo read; there is
no skill guidance for `supabase/universe` when you have Supabase org
access.

## What is the new behavior?

- Adds `/test-the-docs` to run procedural snippets against a
Docker-isolated local stack (`supabase start` in a temp project), with
Verification table output.
- Teaches `/pm-the-docs` cross-repo product lookup
(`reference/universe-lookup.md`) with a capability gate: universe when
you have Supabase org access (or a local clone), otherwise a first-class
OSS public-search path. `ask-the-docs` stays docs-app only.
- Updates the checklist mirror, CONTRIBUTING skills table, and light
handoffs in `write-the-docs` / `review-the-docs`.

## Additional context

Vault "Write the docs" checklist updated separately; Linear document
needs a Claude-side delta sync after merge.

### Test plan

- [ ] Symlinks: `.claude/skills` is a Git symlink to
`../.agents/skills`; `.claude/skills/test-the-docs/SKILL.md` resolves
- [ ] No hardcoded personal absolute paths under `.agents/skills/`
- [ ] CONTRIBUTING lists skills including `/test-the-docs`
- [ ] `/pm-the-docs` references `universe-lookup.md` capability gate;
`/ask-the-docs` Related points there for product lookup
- [ ] OSS path: no universe clone / submodule init when `gh api
repos/supabase/universe` fails
- [ ] Docker up: dry-run `/test-the-docs` against one MDX page with
SQL/CLI (optional smoke)
- [ ] Docker down: skill documents graceful `deferred` (not silent skip)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Added documentation guidance for testing runnable examples in an
isolated local environment.
- Added cross-repository product lookup guidance, including capability
checks and source tracking.
- Added verification report templates with standardized results and
environment details.

- **Documentation**
  - Expanded authoring, review, self-review, and contribution guidance.
- Improved safety instructions for local snippet testing, including
credential protection and cleanup.
- Updated repository layout, tooling, links, and workflow references for
documentation skills.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Nik Richers <nik@validmind.ai>
2026-09-04 00:34:45 +00:00

82 lines
2.0 KiB
YAML

# Disposable compose project for /test-the-docs.
# Host only starts/stops this project; MDX fences run inside the runner.
#
# Profiles:
# stack — privileged DinD + runner sharing DinD network (supabase start uses 127.0.0.1)
# examples — runner only; copies /examples into /work/example for npm install (no DinD)
services:
dind:
image: docker:27-dind
privileged: true
environment:
DOCKER_TLS_CERTDIR: ''
command: ['dockerd', '--host=tcp://0.0.0.0:2375', '--host=unix:///var/run/docker.sock']
healthcheck:
test: ['CMD', 'docker', 'info']
interval: 2s
timeout: 5s
retries: 30
start_period: 5s
profiles:
- stack
runner:
build:
context: .
dockerfile: Dockerfile
working_dir: /work
user: '1001:1001'
environment:
TTD_IN_CONTAINER: '1'
command: ['sleep', 'infinity']
volumes:
- type: bind
source: ${TTD_WORK_DIR:?set TTD_WORK_DIR}
target: /work
- type: bind
source: ${TTD_OUTPUT_DIR:?set TTD_OUTPUT_DIR}
target: /output
- type: bind
source: ${TTD_EXAMPLE_DIR:-./.empty}
target: /examples
read_only: true
networks:
- ttd
profiles:
- examples
runner-stack:
build:
context: .
dockerfile: Dockerfile
working_dir: /work
user: '1001:1001'
# Share DinD's network namespace so supabase healthchecks on 127.0.0.1 succeed
network_mode: 'service:dind'
environment:
TTD_IN_CONTAINER: '1'
DOCKER_HOST: tcp://127.0.0.1:2375
command: ['sleep', 'infinity']
volumes:
- type: bind
source: ${TTD_WORK_DIR:?set TTD_WORK_DIR}
target: /work
- type: bind
source: ${TTD_OUTPUT_DIR:?set TTD_OUTPUT_DIR}
target: /output
- type: bind
source: ${TTD_EXAMPLE_DIR:-./.empty}
target: /examples
read_only: true
depends_on:
dind:
condition: service_healthy
profiles:
- stack
networks:
ttd:
driver: bridge
name: ${TTD_NETWORK_NAME:-ttd-sandbox}