docs: record module authorization architecture

Adds ADR 0014 recording the durable architecture Phase 5A established
across both passes: the shared contracts-layer PermissionDeclaration,
manifest version 3 replacing version 2's bare permission strings, the
reserved core.* namespace and the structural guarantee that a
module-vs-Core collision always surfaces as
ModulePermissionCompositionError rather than the generic
PermissionRegistryError duplicate path, deterministic registry
composition, startup ordering, repository-root/package-version
resolution, registry injection into apps/api's enforcement and
explicit-grant HTTP API, the static-snapshot/historical-record
preservation guarantees, and Doctor/modules:validate integration.
Indexes it in the ADR README, cross-references it from ADR 0006 (only
its manifestVersion 2 / permission-string decision is superseded; the
rest of ADR 0006 remains accepted, and its historical text is left
untouched) and ADR 0013 (module permission registration, deferred
there, is what ADR 0014 implements), and links it from the relevant
development documentation.

Corrects two comments discovered during a direct source audit that
overstated where a module-vs-Core permission collision is actually
caught (core/src/modules/permissions.ts,
apps/api/src/platform-permissions.ts) — comment-only, no behavior
change, already covered by existing tests. Also corrects a
documentation claim in docs/development/authorization.md that
incorrectly implied removing a module blocks explicit revocation of
its historical grants; grants-routes.ts's revoke handler never
consults the permission registry, so revocation remains unaffected.
This commit is contained in:
ekklesia
2026-07-24 17:49:42 -05:00
parent edd7148aa8
commit 9fa051be61
8 changed files with 329 additions and 52 deletions
@@ -19,6 +19,15 @@ registry, which conflicts with install-by-cloning discovery.
## Decision
> **Partial correction — see [ADR 0014](0014-module-permission-declarations-and-platform-registry.md).**
> `manifestVersion: 2` and the permission-string-array shape described immediately below (the
> `permissions` field of the static manifest) were superseded by ADR 0014's `manifestVersion: 3`,
> which represents each permission as a complete `{id, baseline, description}` declaration instead
> of a bare identifier string. Every other decision in this ADR — versioned capabilities,
> `defineModuleRuntime`, the compiled-runtime production loading boundary, and registration/lifecycle
> ordering — remains accepted and unchanged. This section is left as originally accepted, as the
> historical record of the manifest's prior shape.
`ekklesia.module.json` remains the one canonical static manifest and moves to
`manifestVersion: 2`. Provided capabilities are declarations containing an identifier and an exact
semantic version. Required and optional capability dependencies map identifiers to semantic-version