Skip to content
Merged
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
52 changes: 52 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Supabase SDK Specifications

Stack-agnostic behavior contracts for Supabase client libraries. Specs in this repo are the single source of truth for how Supabase SDKs behave across all languages.

## Structure

```
specs/ # Behavior specifications (NNNN-<topic>.md)
skills/ # Claude Code skills for working with specs
scripts/ # Tooling for SDK team members
```

## Specs

| # | Topic | Status |
|---|-------|--------|
| [0001](specs/0001-postgrest-retry.md) | PostgREST — Automatic Retry | Draft |

## Writing a Spec

Install the `sdk-spec` skill (see below), then ask Claude to write a new spec. The skill enforces the format — RFC 2119 requirements, named scenario slugs, status lifecycle, and changelog.

New specs go in `specs/` with the next available number:

```bash
ls specs/ | sort | tail -1 # find next number
```

## Installing Skills

The `skills/` directory contains Claude Code skills for the SDK team. Install them with:

```bash
./scripts/install-skills.sh # install all skills
./scripts/install-skills.sh sdk-spec # install a specific skill
```

Skills are copied to `~/.claude/skills/`. Restart Claude Code after installing.

## Spec Format

Every spec has seven sections in this order:

1. **Header table** — version, status, date, authors
2. **Abstract** — 2–3 sentence summary
3. **Definitions** — RFC 2119 boilerplate + domain terms
4. **Requirements** — normative behavior in `MUST`/`SHOULD`/`MAY` language, grouped as `R{n}.{m}`
5. **Scenarios** — named test cases (`slug`, Stimulus → Expected)
6. **Rationale** — non-normative explanation of non-obvious decisions
7. **Changelog** — version history

See [skills/sdk-spec/SKILL.md](skills/sdk-spec/SKILL.md) for the complete authoring guide.