Skip to content

feat: move SDK compliance to per-repo files - #15

Merged
grdsdev merged 36 commits into
mainfrom
claude/hungry-wilson-af8300
Jun 11, 2026
Merged

grdsdev merged 36 commits into
mainfrom
claude/hungry-wilson-af8300

Conversation

@grdsdev

@grdsdev grdsdev commented Jun 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Removes sdks: blocks from capabilities/*.yaml — the central repo is now a pure feature registry (id, name, description, group)
  • SDK compliance (which features each SDK has implemented) moves to a sdk-compliance.yaml file in each SDK repo, updated in the same PR that adds the implementation
  • Adds a reusable GitHub Actions workflow that SDK repos call to validate their compliance file against the canonical spec
  • Adds a scheduled workflow that aggregates compliance from all SDK repos hourly and redeploys the capability matrix site
  • Adds partially_implemented as a new status with a required note field
  • Spec files in specs/{area}/{stem}.me are validated against canonical feature IDs — orphaned specs fail CI
  • Feature names in the generated matrix link to their spec file when one exists

How SDK repos opt in

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

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

And add sdk-compliance.yaml at the repo root:

sdk: javascript

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

Changes

capabilities/*.yaml

  • sdks: block removed from every feature across all 5 area files (67 features total)
  • groups: metadata block preserved in auth.yaml
  • Schema updated to match: features now only allow id, name, description, group

New compliance format (supabase-capabilities.yaml)

  • Sparse: only list features that differ from not_implemented
  • Scalar shorthand (auth.sign_up: implemented) or map form when a note is needed
  • note is optional on all statuses, required only on partially_implemented
  • Unknown feature IDs and invalid statuses fail CI

Spec file validation

  • checkSpecs() in structural.ts scans specs/{area}/{stem}.md and errors if {area}.{stem} has no matching feature ID in the capabilities YAML
  • Wired into the standard npm run validate pipeline

Capability matrix site

  • Feature names link to their spec file (specs/{area}/{stem}.md) when one exists, pointing at the GitHub URL
  • partially_implemented features render as 🔶 with an amber background
  • Legend updated to include the new status

New scripts

Script Purpose
npm run validate-compliance <file> Validate a compliance file against the canonical spec
npm run aggregate Fetch all SDK compliance files and write site/compliance.json
npm run build-site [compliance.json] Build the site (compliance data optional; defaults to all not_implemented)

New GitHub Actions workflows

Workflow Trigger Purpose
validate-sdk-compliance.yml workflow_call Reusable — SDK repos call this on PR
aggregate-capabilities.yml hourly cron + workflow_dispatch Aggregate compliance → build → deploy

TypeScript / validator changes

  • Added partially_implemented to STATUSES
  • Added ComplianceEntry, ComplianceMap types; retired SdkEntry and Reference
  • computeParity and renderHtml now accept an external compliance map
  • structural.ts cleaned of sdks-specific checks; gained checkSpecs()
  • checkReferences retired (source references no longer live in capability YAML)

Out of scope

No SDK repo is bootstrapped in this PR. The matrix will show all SDKs as not_implemented until each SDK team adds their compliance file.

grdsdev and others added 3 commits June 8, 2026 11:38
Replace five monolithic YAML area files with one markdown file per
feature, following a Swift Evolution-style proposal structure.

- `capabilities/areas.yaml` — area registry with titles, descriptions,
  and ordered group definitions
- `capabilities/{area}/NNNN-slug.md` — one file per feature; ID is
  derived from folder + stem (hyphens → underscores, numeric prefix
  stripped); SDK entries are sparse (unlisted = not_implemented)
- `capabilities/TEMPLATE.md` — blank template with HTML comment
  guidance for each section; `capabilities/auth/0001-sign-up.md`
  serves as the canonical worked example

Spec template sections: Behavior (required), Prerequisites, Errors,
Notes, Related (all optional). Body is reserved for feature
specification; all matrix data remains in YAML frontmatter.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Each auth feature frontmatter now includes an `openapi` block pointing
to supabase/auth openapi.yaml and the specific operation(s) it maps to.

Format:
  openapi:
    repo: supabase/auth
    path: openapi.yaml
    operations:
      - method: POST
        path: "/signup"
      - method: POST          # optional params for /token variants
        path: "/token"
        params:
          grant_type: password

7 features have no spec operation (client-side only or missing from spec):
set_session, get_claims, on_auth_state_change, restore_session,
mfa_get_aal, mfa_webauthn_update, admin_create_user.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ection

The openapi: frontmatter field is replaced by a ## API section in the
markdown body, keeping all spec/documentation content in the body and
all structured matrix data in the frontmatter.

Format in body:
  ## API
  Spec: https://github.com/supabase/auth/blob/master/openapi.yaml
  - `POST /signup`
  - `POST /token` — `grant_type=password`

TEMPLATE.md updated to include ## API as the first body section
(optional — omit for client-side-only features).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@grdsdev
grdsdev requested a review from a team June 9, 2026 19:26

@QuintinWillison QuintinWillison left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, @grdsdev, this is pretty impressive and I see value in having the objective, semantically-clear YAML frontmatter versus the more subjective markdown "commentary". I also like how you're using folders (e.g. auth) to segment the feature set. Nice!

I've not read the detail on each feature as, apart from anything else, my Supabase product knowledge is not yet deep enough (having only just joined the team) to be able to comment there without a lot of time on independent research.

I think the things that I would query, because they set hard direction going forwards that will be more difficult to unwind later...

  1. Could we drop the numerical prefix from the file names (that is, 0001-sign-up.md would become just sign-up.md)? I can kind of see why swift-evolution name their proposals this way - where "evolution" is the key facet that turns them into more a time-series in nature. Whereas, for what we're doing here, unless I'm missing something, is more of a "snapshot" of features. When we add new features downstream then I don't think there's value for anybody in "knowing" in what sequence they were added.
  2. I mentioned already, perhaps in Slack, but I am wondering how the day-to-day workflow will look for SDK engineers adding. improving, deleting or otherwise-aligning features in SDK codebases "alongside" this. My concern is that the sdks key and the nodes that sit underneath it are discretely maintained in this repository, thus could more-easily drift in terms of correctness as source-of-truth for each SDK. We might also end up finding that we need to start tracking SDK version numbers, perhaps components/modules too, from here - so it could all start getting quite busy and potentially messy. The alternative is that the portion of this YAML frontmatter that relates to each SDK is actually kept in that SDK's repository (or repositories) so that it can be atomically evolved as features are maintained in that SDK (like a supabase-capabilities.yaml file at root or similar). The other advantage of that approach is that it means that this repository will only ever need to evolve when the canonical features are defined/templated, not needing to track per-SDK compliance. We can automate the reporting, perhaps from this repo, that reaches out to SDK repositories to obtain their declared compliance.
  3. There's also a wider-question around whether the capabilities set defined by this repository could or should be versioned itself. That conversation is perhaps easier to reason about if my point 2 suggestion is actioned (that is, SDK capability compliance sets managed as code in each SDK repo).

grdsdev and others added 15 commits June 10, 2026 09:13
Rolls back the per-feature markdown structure in response to review
feedback. Restores the original per-area YAML files which naturally
solve ordering (list position), compactness, and cross-feature scanning.

Changes:
- capabilities/{area}.yaml — restored to original per-area structure,
  with a new `groups:` block added to each file carrying group titles
  and display order (replaces the standalone areas.yaml)
- specs/{area}/{feature_id}.md — new directory for optional per-feature
  specs, linked by convention from the feature id (auth.sign_up →
  specs/auth/sign_up.md); no explicit field needed in the YAML
- specs/TEMPLATE.md — blank spec template (## API, ## Behavior,
  ## Prerequisites, ## Errors, ## Notes, ## Related)
- specs/auth/sign_up.md — canonical worked example

This cleanly separates structured machine-readable data (YAML) from
human/LLM-readable specification prose (Markdown).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Draft design for moving SDK compliance data out of the central
capabilities YAML and into each SDK's own repository.

Key decisions:
- supabase-capabilities.yaml at root of each SDK repo (sparse, flat)
- Reusable GitHub Actions validation workflow published from this repo
- Hourly aggregation workflow fetches compliance via GitHub API
- Central YAML becomes pure feature registry (no sdks: block)
- No SDK repos touched until team review

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…es.yaml

- Add validateCompliance() to check sdk name, feature ids, and statuses
- Add normalizeCompliance() to convert sparse YAML entries to ComplianceEntry objects
- Add collectFeatureIds() to gather all known feature ids from loaded areas
- Update types.ts: add partially_implemented status, Group interface, ComplianceEntry, ComplianceMap; remove SdkEntry/Reference and sdks field from Feature
… on features)

- Remove sdks: blocks from test YAML (schema now has additionalProperties: false)
- Fix schema-invalid test to use missing required field instead of partial sdks
- Update changedFiles test to verify filtering without reference queries (references moved to compliance files)
- Update report mode assertion (parity=1 when no sdks applicable languages)
@grdsdev grdsdev changed the title feat: migrate capabilities to per-feature markdown files feat: move SDK compliance to per-repo files Jun 10, 2026
grdsdev and others added 4 commits June 10, 2026 10:15
When a spec file exists at specs/{area}/{stem}.md, the feature name in
the generated matrix becomes a clickable link to the GitHub URL. Hovering
shows a Supabase green underline; default style is subtle dotted underline.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
checkSpecs() errors on any specs/{area}/{stem}.md that has no matching
{area}.{stem} feature in the capabilities YAML, catching orphaned specs
and typos early. Wired into the validate pipeline via the new specsDir
option on RunOptions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@grdsdev

grdsdev commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator Author

@QuintinWillison thanks for the great review. I reshaped the PR to address your points. Only the 3rd wasn't done. I think we could start without concerning ourselves with that.

Can you review it again?

@QuintinWillison QuintinWillison left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating, this is definitely more the approach I was proposing we aim for.

Ideally it would be nice to see the README updated as an atomic component of this PR, just to set the scene and describe the moving parts / actors involved.

Momentarily, on inspecting your shared workflow, I was about to suggest more composability by using a composite action - but then I noticed that it's also checking out this repo, so that makes that call a lot more nuanced, so I think on balance I agree with the route you're choosing right now. It's also something that's easy enough to change later on.

Comment thread .gitignore Resolved
grdsdev and others added 2 commits June 10, 2026 11:06
Removes outdated sdks/references instructions and documents the new
model: central repo as pure feature registry, SDK compliance in
per-repo supabase-capabilities.yaml, partially_implemented status,
spec file validation, and the three new CI workflows.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Shorter, clearer name that reads naturally in an SDK repo context.
Updated across aggregate.ts, compliance-cli.ts, references.ts,
the reusable workflow, and the README.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread specs/TEMPLATE.md Resolved
Comment thread specs/auth/sign_up.md Resolved
Comment thread specs/auth/sign_up.md Resolved
Comment thread specs/TEMPLATE.md Resolved
- Remove JS-specific function signature; spec now describes behavior,
  not a method API surface
- Document all inputs per credential type (email vs phone) with a table
  covering data, captchaToken, channel, and emailRedirectTo
- Clarify that redirect_to is a query parameter, not a request body field
- Split confirmation flow into two explicit branches (autoconfirm on/off)
- Add PKCE subsection with S256 + verifier storage semantics
- Document obfuscation behavior for existing confirmed accounts in Notes
- Add over_request_rate_limit to Errors

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread specs/auth/sign_up.md Resolved
Comment thread scripts/capability-matrix/src/report.ts Resolved
Comment thread specs/TEMPLATE.md Resolved
Comment thread specs/TEMPLATE.md Resolved
Comment thread specs/TEMPLATE.md Resolved
@linear-code

linear-code Bot commented Jun 11, 2026

Copy link
Copy Markdown
SDK-1045 Bootstrap supabase-js compliance with supabase/sdk capability matrix

Follow-up work after supabase/sdk#15 merges. That PR moves SDK compliance reporting out of the central supabase/sdk repo and into per-SDK files (sdk-compliance.yaml) in each SDK repo. Once merged, supabase-js needs to be wired up.

1. Write sdk-compliance.yaml in supabase-js

Two PRs recommended (decouple plumbing from audit work):

PR 1 — plumbing (small):

  • Add .github/workflows/validate-capabilities.yml calling the reusable workflow from supabase/sdk:

    on: [pull_request]
    jobs:
      validate:
        uses: supabase/sdk/.github/workflows/validate-sdk-compliance.yml@main
  • Add a skeleton sdk-compliance.yaml at the repo root with sdk: javascript and an empty features: {} (sparse — defaults to not_implemented).

  • Confirm CI passes against the canonical spec.

PR 2 — actual audit:

  • Walk every feature ID across all 5 areas in supabase/sdk/capabilities/*.yaml (~67 features).
  • Mark each as implemented / partially_implemented / not_implemented / not_applicable.
  • Add note for partials and notable quirks (e.g. method named differently in JS, parameter not exposed, etc.).
  • Document the baseline supabase-js version being audited (top comment in the file).

2. Audit the canonical capability list for completeness

While doing (1), cross-check the registry. Anything in supabase-js that doesn't map cleanly to a feature ID = gap in the registry. Open a PR against supabase/sdk to add missing feature IDs.

Bonus: cross-check capabilities/auth.yaml against supabase/auth/openapi.yaml operations. Auth is the largest surface; if those line up, the registry is in good shape.

3. Things to flag back to supabase/sdk (post-merge follow-ups)

These came out of reviewing PR #15 and are worth tracking separately or feeding back as issues against supabase/sdk:

  • Rollout/migration plan for the other 6 SDKs — without one, the public matrix sits at 0% for everyone but JS indefinitely.
  • since: field on compliance entries — the old sdks: block had since: 1.2.3 per SDK. Lost in the redesign; would be nice to recover.
  • deprecated status — currently no clean way to mark a feature an SDK once shipped but is removing.
  • Versioning of the capability set — Quintin raised this in his review and it was punted. Once SDKs reference feature IDs, a rename in supabase/sdk@main breaks every SDK's CI immediately.
  • Server-spec drift detection — if supabase/auth adds an error code or changes a response shape, surface that as "supabase-js needs updating." The rolled-back openapi: block was reaching for this.
  • Conformance tests — nothing today verifies that "implemented" actually means anything ships. SDK teams self-report. Once ## API sections in specs/*.md point at server OpenAPI operations, a check could confirm the operations exist.

Some of these were left as PR comments on #15; others are post-merge work for either repo.

Dependencies

grdsdev and others added 11 commits June 11, 2026 13:39
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Prevents the nightly job from hanging indefinitely if api.github.com
is unresponsive.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Makes missing compliance files visible in the workflow logs rather than
silently defaulting to not_implemented.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tracks errorCount across all skip paths (fetch error, missing file,
parse error, validation error). If every SDK errored and result is
empty, exits with code 1 instead of writing an empty compliance.json
and triggering a deploy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
checkReferences() was already a no-op after the compliance redesign.
Deleting the dead code removes references.ts, github.ts, github.test.ts,
and references.test.ts, and strips the online/token/repoClient options
from RunOptions and the --online CLI flag.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a note pointing new contributors to capabilities/{area}.yaml for
structured data and explaining that spec files are free-form prose for
humans and LLMs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Katerina Skroumpelou <mandarini@users.noreply.github.com>
The Behavior comment previously suggested including a function signature,
which locks in a JS-style calling convention. Replaced with guidance to
describe observable behavior without prescribing SDK API surface.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Split the vague "obfuscated success response" note into two precise cases
sourced from the GoTrueClient JSDoc: obfuscated error when only email
confirmation is enabled, fake user object when both email and phone
confirmation are enabled.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@grdsdev
grdsdev merged commit 4d32675 into main Jun 11, 2026
2 checks passed
@grdsdev
grdsdev deleted the claude/hungry-wilson-af8300 branch June 11, 2026 17:10
grdsdev pushed a commit that referenced this pull request Aug 12, 2026
🤖 I have created a release *beep* *boop*
---


## [1.0.0](v1.0.0...v1.0.0)
(2026-08-12)


### ⚠ BREAKING CHANGES

* reconcile capability matrix inconsistencies from skill audit
([#74](#74))

### Features

* add capabilities based on supabase-js public methods
([#19](#19))
([8b07e38](8b07e38))
* add capability-matrix maintenance skill
([#73](#73))
([070e2c9](070e2c9))
* add review-spec and review-spec-compliance skills
([#6](#6))
([b2646c1](b2646c1))
* add SDK implementation status matrix to README and skill
([#4](#4))
([753f06c](753f06c))
* **api-check:** include file path and line number in compliance failure
messages ([#45](#45))
([2f4be47](2f4be47))
* **auth:** add sign-out reason capability
([#47](#47))
([51a3abd](51a3abd))
* canonical SDK capability matrix
([#8](#8))
([215bc3e](215bc3e))
* **capability-matrix:** strict cross-SDK parity score + coverage scope
([#63](#63))
([de1abe1](de1abe1))
* CI check 1 — block PRs adding public API not in capability matrix
([#31](#31))
([293440c](293440c))
* **compliance:** list undeclared features after validation
([#48](#48))
([29f396a](29f396a))
* **compliance:** list undeclared features as notes after validation
([29f396a](29f396a))
* **compliance:** split symbol evidence from symbol coverage
([#75](#75))
([abc8e71](abc8e71))
* initial SDK specs, skills, and install script
([e662b17](e662b17))
* move SDK compliance to per-repo files
([#15](#15))
([4d32675](4d32675))
* **parsers:** add Dart public API parser via package:analyzer
(alternative to [#35](#35))
([#41](#41))
([e3ba07a](e3ba07a))
* **parsers:** add griffe-based Python public API surface parser
([#36](#36))
([c44f836](c44f836))
* **parsers:** replace Swift regex parser with swift-symbolgraph-extract
([#38](#38))
([80529a7](80529a7))
* **realtime:** add multiple postgres_changes filters capability
([#70](#70))
([825ab0c](825ab0c))
* reconcile capability matrix inconsistencies from skill audit
([#74](#74))
([9c53a70](9c53a70))
* rename sdk-parse-ignore to .sdk-parse-ignore
([#37](#37))
([4f4ab61](4f4ab61))
* render symbol names as clickable links in capability matrix
([#14](#14))
([dcaf122](dcaf122))
* show feature description as visible sub-text in capability matrix
([#13](#13))
([3a750ab](3a750ab))
* **site:** serve compliance.json with precomputed parity from GitHub
Pages ([#46](#46))
([0d9106c](0d9106c))
* **storage:** add purge_cache and purge_bucket_cache canonical
capabilities ([#44](#44))
([9a6f864](9a6f864))
* **storage:** add storage.errors.error_codes capability
([#71](#71))
([fabb9a7](fabb9a7))
* **storage:** add the five missing Iceberg catalog capabilities
([#76](#76))
([c3c8f9e](c3c8f9e))


### Bug Fixes

* **aggregate:** point csharp and go SDKs at correct repo slugs
([#62](#62))
([8b7320f](8b7320f))
* **aggregate:** point kotlin SDK at supabase-community/supabase-kt
([#61](#61))
([b1a99e9](b1a99e9))
* **capability-matrix:** correct coverage scope metric description
([#64](#64))
([5daeaf5](5daeaf5))
* **ci:** repair python pipeline and simplify sdk-compliance workflow
([#42](#42))
([2140f44](2140f44))
* **ci:** use nx to run docs:json so workspace deps are built first
([#56](#56))
([9b449bb](9b449bb))
* **dart-extractor:** exclude
[@internal-annotated](https://github.com/internal-annotated) symbols
from the public API surface
([9bd358e](9bd358e))
* **dart-extractor:** exclude [@internal](https://github.com/internal)
symbols from the public API surface
([#54](#54))
([9bd358e](9bd358e))
* remove broken sticky thead, add scroll-margin-top and group-row
borders ([#10](#10))
([68761cd](68761cd))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: supabase-releaser[bot] <223506987+supabase-releaser[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants