Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
01ab9b4
feat: migrate capabilities to per-feature markdown files
grdsdev Jun 8, 2026
47a97d3
feat: add OpenAPI spec references to auth feature files
grdsdev Jun 9, 2026
41da7ce
refactor: move openapi operations from frontmatter into body ## API s…
grdsdev Jun 9, 2026
edda690
refactor: restore per-area YAML + introduce separate specs/ directory
grdsdev Jun 10, 2026
eca1c7c
docs: add SDK compliance per-repo design spec
grdsdev Jun 10, 2026
79d7408
feat: add partially_implemented status and compliance types; retire S…
grdsdev Jun 10, 2026
1a26761
refactor: remove sdks from capability feature schema, add optional gr…
grdsdev Jun 10, 2026
0076594
feat: add compliance module to parse and validate supabase-capabiliti…
grdsdev Jun 10, 2026
532fa3a
refactor: remove sdks-specific checks from structural validator
grdsdev Jun 10, 2026
90bf7c3
refactor: retire source-code reference checking (references moved to …
grdsdev Jun 10, 2026
4da729c
fix: update cli.test.ts for compliance-redesign schema (no sdks field…
grdsdev Jun 10, 2026
0862e5a
refactor: computeParity accepts external compliance map instead of re…
grdsdev Jun 10, 2026
36517f6
refactor: generate-site accepts external compliance map; add partiall…
grdsdev Jun 10, 2026
cee7b8c
feat: add compliance-cli and aggregate scripts for SDK compliance wor…
grdsdev Jun 10, 2026
188cb13
fix: correct repoRoot() path resolution in compliance-cli and aggregate
grdsdev Jun 10, 2026
c0f455f
feat: add reusable validate-sdk-compliance workflow for SDK repos
grdsdev Jun 10, 2026
d255cd6
refactor: strip sdks blocks from all capability YAML files
grdsdev Jun 10, 2026
92dc8a6
feat: add hourly aggregate-capabilities workflow for compliance data …
grdsdev Jun 10, 2026
bdf8bc3
chore: ignore docs/superpowers/ from git tracking
grdsdev Jun 10, 2026
0eb24ff
remove docs
grdsdev Jun 10, 2026
9950d83
feat: link feature names to spec files in capability matrix
grdsdev Jun 10, 2026
505ce64
feat: validate spec files against canonical capability IDs
grdsdev Jun 10, 2026
2fb0464
docs: rewrite README for per-repo compliance model
grdsdev Jun 10, 2026
184f22a
refactor: rename supabase-capabilities.yaml to sdk-compliance.yaml
grdsdev Jun 10, 2026
7992c35
docs: rewrite auth.sign_up spec to be stack-agnostic
grdsdev Jun 10, 2026
a3146ad
ci: change aggregate workflow to run nightly at 2am
grdsdev Jun 11, 2026
dd4595c
chore: add explanatory comments to .gitignore entries
grdsdev Jun 11, 2026
082dc99
fix: add 10s timeout to GitHub API fetch in aggregate
grdsdev Jun 11, 2026
c1218a6
fix: log error when sdk-compliance.yaml is missing from an SDK repo
grdsdev Jun 11, 2026
364de10
fix: abort aggregate job if all SDKs fail to avoid blank matrix deploy
grdsdev Jun 11, 2026
e96e5cf
fix: use replaceAll for spec URL path segment replacement
grdsdev Jun 11, 2026
1d9454b
refactor: remove references.ts, github.ts and the online validation path
grdsdev Jun 11, 2026
07b83f7
docs: clarify spec template header — prose vs structured metadata
grdsdev Jun 11, 2026
b8b06f7
Update specs/TEMPLATE.md
grdsdev Jun 11, 2026
6a82792
docs: remove language-specific signature guidance from spec template
grdsdev Jun 11, 2026
c33c974
docs: clarify account-exists obfuscation behavior in sign_up spec
grdsdev Jun 11, 2026
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
56 changes: 56 additions & 0 deletions .github/workflows/aggregate-capabilities.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Aggregate SDK Compliance

on:
schedule:
- cron: "0 2 * * *"
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

defaults:
run:
working-directory: scripts/capability-matrix

jobs:
aggregate-and-deploy:
name: Aggregate compliance and deploy site
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: "22"

- name: Install dependencies
run: npm ci

- name: Aggregate compliance data from SDK repos
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run aggregate

- name: Build site with compliance data
run: npm run build-site -- ../../site/compliance.json

- name: Configure Pages
uses: actions/configure-pages@v4

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: site/

- id: deployment
name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
35 changes: 35 additions & 0 deletions .github/workflows/validate-sdk-compliance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Validate SDK Compliance (reusable)

on:
workflow_call:
inputs:
file:
description: Path to sdk-compliance.yaml in the calling repo
type: string
default: sdk-compliance.yaml

jobs:
validate:
name: Validate compliance file
runs-on: ubuntu-latest
steps:
- name: Checkout SDK repo
uses: actions/checkout@v4

- name: Checkout capability spec
uses: actions/checkout@v4
with:
repository: supabase/sdk
path: _sdk-spec

- uses: actions/setup-node@v4
with:
node-version: "22"

- name: Install dependencies
run: npm ci
working-directory: _sdk-spec/scripts/capability-matrix

- name: Validate compliance file
run: npm run validate-compliance -- "${{ github.workspace }}/${{ inputs.file }}"
working-directory: _sdk-spec/scripts/capability-matrix
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# Claude Code internal state (worktree metadata, session files)
.claude/

# Generated site output
site/

# AI-assisted planning docs (agentic skill framework artefacts — not project documentation)
docs/superpowers/
Comment thread
grdsdev marked this conversation as resolved.
Resolved
84 changes: 54 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,94 @@
# Supabase SDK Capability Matrix

The canonical, machine-readable record of which features each official Supabase client SDK implements. One YAML file per product area, validated in CI against a JSON Schema, with every claim of "implemented" backed by a verifiable reference to source code in the SDK's repository.
The canonical, machine-readable record of which features exist across Supabase client SDKs. This repository is a **pure feature registry** — it defines what features exist and what they mean. Each SDK repo is responsible for declaring which features it implements.

A static site rendered from these files is published at **https://shiny-adventure-ww2255r.pages.github.io/** (see `.github/workflows/deploy-pages.yml`).
A static site rendered from this data is published at **https://shiny-adventure-ww2255r.pages.github.io/**.

## Repository layout

```
capabilities/ # One YAML file per product area (auth, database, storage, realtime, functions)
specs/ # Optional human-readable spec per feature: specs/{area}/{feature}.md
schema/ # JSON Schema for area files
scripts/ # TypeScript validator + site generator (scripts/capability-matrix)
.github/ # CI: structural validation, nightly reference drift, Pages deploy
.github/ # CI workflows (see below)
```

## SDKs tracked

Every feature must declare a status for all seven official SDKs:

`javascript` · `flutter` · `python` · `swift` · `csharp` · `go` · `kotlin`

## Status values

| Status | Meaning |
|---|---|
| `implemented` | Feature ships in the SDK. Requires at least one `references` entry pointing to the implementation. |
| `not_implemented` | Feature is in scope but not yet shipped. Must not include references. |
| `not_applicable` | Feature does not apply to this SDK (e.g. browser-only APIs in server SDKs). Must not include references. |
| `implemented` | Feature is fully implemented in the SDK. |
| `partially_implemented` | Feature is partially implemented. A `note` explaining what is missing is required. |
| `not_implemented` | Feature is in scope but not yet shipped (default for unlisted features). |
| `not_applicable` | Feature does not apply to this SDK (e.g. browser-only APIs in a server SDK). |

## Adding or updating a capability

1. Open the YAML for the relevant area under `capabilities/` (or create a new file matching the schema).
2. Add or edit a feature entry. Each feature needs `id` (`<area>.<snake_case>`), `name`, `description`, optional `group`, and an `sdks` block covering all seven languages.
3. For any SDK marked `implemented`, add `references` pointing to the source:
2. Add or edit a feature entry. Each feature needs `id` (`<area>.<snake_case>`), `name`, `description`, and an optional `group`.
3. Optionally add a spec file at `specs/<area>/<feature>.md` documenting the expected behavior. The validator enforces that every spec file has a matching feature ID.
4. Validate locally and open a PR. CI runs structural checks (including spec file validation) on every PR.

The full schema lives in `schema/capability-matrix.schema.json`.

## SDK compliance

SDK compliance is **declared in each SDK repo**, not here. To report which features your SDK implements, add a `sdk-compliance.yaml` file to the root of your SDK repo:

```yaml
references:
- repo: supabase/postgrest-js
path: src/PostgrestQueryBuilder.ts
symbols: [select]
ref: v1.2.3 # optional pin to a tag, branch, or commit
```
```yaml
sdk: javascript # one of: javascript, flutter, python, swift, csharp, go, kotlin

4. Validate locally (see below).
5. Open a PR. CI runs structural checks on every PR and reference checks on changed files. A nightly job re-runs reference checks across the whole matrix to catch upstream renames.
features:
auth.sign_up: implemented
auth.sign_in_with_password: implemented

auth.mfa_enroll:
status: partially_implemented
note: "TOTP only — phone factor not yet supported"

# Unlisted features default to not_implemented
```

The full schema lives in `schema/capability-matrix.schema.json` — the validator and editors that understand JSON Schema (via the `yaml-language-server` header at the top of each area file) will autocomplete and error-check as you type.
The file is **sparse** — only list features that differ from `not_implemented`. Unknown feature IDs and invalid status values fail CI.

### Opt-in to validation

Add `.github/workflows/validate-capabilities.yml` to your SDK repo:

```yaml
on: [pull_request]
jobs:
validate:
uses: supabase/sdk/.github/workflows/validate-sdk-compliance.yml@main
```

This checks out the canonical feature list from this repo and validates your compliance file against it on every PR.

## Local development

```bash
cd scripts/capability-matrix
npm ci

npm test # vitest suite for the validator
npm run typecheck # tsc --noEmit
npm run validate # tier 1: schema + structural checks (no network)
npm run validate:online # tier 2: also fetch each reference and verify the file/symbol exists
npm run report # parity report as JSON (overall, per-area, per-language)
npm run build-site # render the static site to scripts/capability-matrix/site/
npm test # vitest suite for the validator
npm run typecheck # tsc --noEmit
npm run validate # schema + structural checks (no network)
npm run report # parity report as JSON (overall, per-area, per-language)
npm run validate-compliance <file> # validate a sdk-compliance.yaml against the canonical spec
npm run aggregate # fetch all SDK compliance files → site/compliance.json
npm run build-site # render the static site to site/index.html
npm run build-site compliance.json # render the site with compliance data
```

`validate:online` and the nightly CI job hit the GitHub REST API; set `GITHUB_TOKEN` in the environment to avoid rate limits.

## CI

| Workflow | Trigger | What it does |
|---|---|---|
| `validate-capabilities.yml` | push to `main`, PRs touching matrix files, nightly cron | Tier 1 structural on every run; tier 2 references on PRs (changed files) and nightly (all files). |
| `deploy-pages.yml` | push to `main` touching matrix files, manual dispatch | Builds the site and deploys to GitHub Pages. |
| `validate-capabilities.yml` | push to `main`, PRs touching matrix files | Schema + structural checks including spec file validation. |
| `validate-sdk-compliance.yml` | `workflow_call` from SDK repos | Validates an SDK's `sdk-compliance.yaml` against the canonical feature list. |
| `aggregate-capabilities.yml` | hourly cron + `workflow_dispatch` | Fetches all SDK compliance files, builds the site, deploys to GitHub Pages. |
Loading
Loading