docs(api-keys): capability-based scope vocabulary (ADR-049)#96
Merged
alexgarden-mnemom merged 2 commits intomainfrom May 8, 2026
Merged
docs(api-keys): capability-based scope vocabulary (ADR-049)#96alexgarden-mnemom merged 2 commits intomainfrom
alexgarden-mnemom merged 2 commits intomainfrom
Conversation
Closes the doc/code drift surfaced by T1-4 deploy-gate closeout: the
docs previously said scopes were "Owner / Admin / Member" while the
code shipped "gateway / api". Both sides now agree on the
capability-based vocabulary (gateway, api:read, api:write, admin:org,
admin:platform).
guides/api-keys.mdx — full rewrite of the scope section
- Per-scope reference table (grants + mintable-by)
- Scope semantics (capabilities are independent; mint-time ceiling;
request-time role re-check; demotion semantics)
- "Picking scopes for common patterns" — concrete recipes
- Legacy keys section: documents the auto-alias and migration path
- Hygiene checklist updated for admin-scope discipline
guides/authentication.mdx — replaces the "Owner / Admin / Member"
copy with the capability-based vocabulary table; cross-links to the
api-keys.mdx deep dive; documents the legacy-key path.
api-reference/openapi.json
- New ApiKeyScope schema component (closed enum: gateway, api:read,
api:write, admin:org, admin:platform; legacy `api` accepted for
backcompat).
- ApiKey.scopes now references the enum; description points to the
guide.
- POST /v1/api-keys + POST /v1/orgs/{org_id}/api-keys request bodies
declare the `scopes` parameter with the canonical default and the
mint-time ceiling behavior.
- 400 / 403 responses documented for unknown scope + mint-time
ceiling rejections.
Refs: ADR-049 (mnemom/scale#19), mnemom-api#351 + #352, mnemom-website
PR #364 (sibling scope-picker UI), safe-house-hardening T1-4.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
… tables
The openapi-drift-check workflow flagged that the scope tables in
api-keys.mdx and authentication.mdx referenced /v1/admin/* literally,
which violates the customer-docs-don't-mention-staff-routes invariant.
Rephrased the admin:platform row to describe the capability
('Mnemom-staff platform operations') without the path. The vocabulary
is unchanged; the docs are just more careful about which surfaces
they expose to customer-facing rendering.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes the doc/code drift surfaced by T1-4 deploy-gate closeout: the docs previously said scopes were "Owner / Admin / Member" while the code shipped "gateway / api". Both sides now agree on the capability-based vocabulary defined in ADR-049: `gateway`, `api:read`, `api:write`, `admin:org`, `admin:platform`.
Changes
`guides/api-keys.mdx` — full rewrite of the scope section
`guides/authentication.mdx` — auth-flow summary alignment
`api-reference/openapi.json` — schema + endpoint updates
What this enables
Test plan
Refs
🤖 Generated with Claude Code