Skip to content

docs(adr): ADR-0090 — Permission Model v2: concept convergence, final naming, AI-authoring safety#2695

Draft
os-zhuang wants to merge 1 commit into
mainfrom
claude/adr-0090-permission-model-v2
Draft

docs(adr): ADR-0090 — Permission Model v2: concept convergence, final naming, AI-authoring safety#2695
os-zhuang wants to merge 1 commit into
mainfrom
claude/adr-0090-permission-model-v2

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

What

Two documents, deciding and describing the converged permission model ahead of launch:

  • docs/adr/0090-permission-model-v2-concept-convergence.md — the decision record (Status: Proposed). Eight decisions:
    • D1 — custom objects default to OWD private; the unset state ceases to exist (existing metadata grandfathered by explicit stamping, no silent behavior change)
    • D2 — the Profile concept is removed (isProfile deleted from PermissionSetSchema); isDefault narrows to an install-time package suggestion
    • D3sys_role / sys_user_role / sys_role_permission_set / ctx.roles[] / current_user.role renamed to position; "role" becomes a lint-enforced reserved-forbidden word (single exception: better-auth's sys_member.role, already projected as org_membership_level)
    • D4 — OWD enum drops the read / read_write / full aliases; authoring rejects, no lenient parse
    • D5 — a built-in, undeletable everyone position carries default grants: packages suggest, admins confirm, resolution is per-request (abolishes the fallback cliff; no second distribution channel)
    • D6 — an explain engine is promoted to P0, and an access-matrix snapshot gates security-domain publishes with semantic diffs
    • D7 — security-domain publish linter + tiered human gates (AI may draft anything; it may not silently publish capability)
    • D8teams receive sharing and never carry capability (no permission-set bindings, no record ownership)
  • docs/design/permission-model.md — the companion complete reference for the decided model: the five concepts, the evaluation pipeline, OWD semantics, a worked CRM-package example (developer story + admin story), the everyone baseline, the AI-safety layers, a "if you come from Salesforce/Dataverse/ServiceNow/SAP/AWS" mapping table, and the glossary/naming rules.

Why

Three forcing facts, argued in the ADR's Context: the pre-launch window is the only zero-cost moment for breaking renames (hence no aliases — explicitly superseding ADR-0057 D5/D7's alias clauses); the metadata is AI-authored, so vocabulary size is attack surface; and a dogfood incident (objectstack-ai/objectui#2348) proved the current "unset OWD = fully public" default silently inverts the admin's mental model into org-wide read/write.

Relationship to existing ADRs

Builds on 0049 / 0056 / 0057 / 0066 / 0086. Amends: ADR-0056 D7 (default-profile fallback → replaced by the everyone position), ADR-0057 D5/D7 (deprecated-alias discipline → superseded pre-launch). ADR-0057's core (BU tree, scope depth, sys_user_role decoupling) is untouched and load-bearing.

What this PR does NOT do

Docs only — no spec, plugin, or runtime changes. Implementation is phased in the ADR (P1 breaking wave → P2 everyone-position → P3 linter/gates → P4 explain/matrix), each phase with its own proofs per ADR-0054 discipline.

🤖 Generated with Claude Code

https://claude.ai/code/session_012oLzaP8n7A3YKFmgaHWC8H


Generated by Claude Code

…naming, AI-authoring safety

Records the eight decisions converging the authorization model ahead of
launch: OWD defaults to private for custom objects (D1), the Profile
concept is removed (D2), sys_role and friends are renamed to position
with "role" as a lint-enforced forbidden word (D3), the OWD enum drops
its legacy aliases (D4), a built-in `everyone` position carries default
grants (D5), an explain engine plus access-matrix snapshot gate is
promoted to P0 (D6), security-domain publishes get a linter and tiered
human gates (D7), and teams are confirmed as sharing recipients that
never carry capability (D8).

Ships with the companion reference docs/design/permission-model.md —
the maintained source of truth for the decided model (concepts,
evaluation pipeline, CRM worked example, AI-safety layers, glossary).

Supersedes ADR-0056 D7 (default-profile fallback) and ADR-0057 D5/D7
alias clauses (pre-launch one-step renames, no compatibility layers).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012oLzaP8n7A3YKFmgaHWC8H
@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jul 8, 2026 5:39pm

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation size/l and removed documentation Improvements or additions to documentation labels Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants