ADR Index
August 14, 2026 · View on GitHub
This document provides a comprehensive index of all Architectural Decision Records (ADRs) for the Prisma Next prototype, organized by category and ADR number.
Core Architecture
| ADR | Title | Description | Link |
|---|---|---|---|
| 001 | Migrations as Edges | Defines migrations as contract-to-contract transitions rather than sequential SQL files | ADR 001 - Migrations as Edges.md |
| 002 | Plans are Immutable | Establishes Plans as immutable, auditable objects with contract hash and references | ADR 002 - Plans are Immutable.md |
| 003 | One Query One Statement | Ensures Plans map to single SQL statements for predictability and guardrails | ADR 003 - One Query One Statement.md |
| 004 | Storage Hash vs Profile Hash | Separates storage identity hashing (storageHash) from pinned capability profile hashing (profileHash) | ADR 004 - Storage Hash vs Profile Hash.md |
| 005 | Thin Core Fat Targets | Keeps core minimal while pushing target-specific behavior into adapters | ADR 005 - Thin Core Fat Targets.md |
| 140 | Package Layering & Target-Family Namespacing | Establishes ring-based package layout and per-family namespaces; introduces target-agnostic runtime core and family runtimes | ADR 140 - Package Layering & Target-Family Namespacing.md |
| 150 | Family-Agnostic CLI and Pack Entry Points | Config-only CLI, /cli vs /runtime entrypoints, family helpers + TargetFamilyHook | ADR 150 - Family-Agnostic CLI and Pack Entry Points.md |
| 204 | Domain actions vs composable primitives in the control plane | Distinguishes action methods (single user intents, CLI envelopes, audit boundaries) from composable primitives (raw data, no audit), and forbids compound actions from calling peer actions | ADR 204 - Domain actions vs composable primitives in the control plane.md |
Contract & Schema
| ADR | Title | Description | Link |
|---|---|---|---|
| 006 | Dual Authoring Modes | Supports both PSL-first and TS-first authoring with identical canonical artifacts | ADR 006 - Dual Authoring Modes.md |
| 007 | Types Only Emission | Emits only TypeScript declarations, no runtime client code generation | ADR 007 - Types Only Emission.md |
| 008 | Dev Auto Emit CI Explicit Emit | Removes explicit generate step in development via plugins, requires explicit emit in CI | ADR 008 - Dev Auto Emit CI Explicit Emit.md |
| 009 | Deterministic Naming Scheme | Establishes consistent naming patterns for constraints to ensure stable emission | ADR 009 - Deterministic Naming Scheme.md |
| 010 | Canonicalization Rules | Defines exact key ordering and normalization rules for deterministic contract hashing | ADR 010 - Canonicalization Rules.md |
| 021 | Contract Marker Storage | Defines database storage for contract identity verification and alignment checks | ADR 021 - Contract Marker Storage.md |
| 042 | Contract Marker Evolution | Specifies marker table schema evolution and forward-compatible field additions | ADR 042 - Contract Marker Evolution.md |
| 156 | Storage sets and check constraints | Partially superseded. Adds storage.sets to express “column value is in this set” explicitly in storage — that half stands. Its structured checks[] ({ kind: "inSet", column, setRef }) shape is superseded by ADR 244: a check is now an opaque wire-named predicate | ADR 156 - Storage sets and check constraints.md |
| 159 | Definition-only contracts and separate TypeMaps for lane typing | Keeps contracts stack-independent and traversable; keeps runtime-real structural mappings on the runtime contract value; exports codec/operation type maps as a separate TypeMaps type (not part of Contract) | ADR 159 - Definition-only contracts and type-only codec-operation maps.md |
| 163 | Provider-invoked source interpretation packages | Keeps parsing/interpretation logic in provider-invoked authoring packages so CLI/control plane stay source-agnostic and IO-free | ADR 163 - Provider-invoked source interpretation packages.md |
| 167 | Typed default literal pipeline and extensibility | Documents typed literal default flow across authoring/emission/verification/rendering and records deferred codec-keyed SPI follow-up | ADR 167 - Typed default literal pipeline and extensibility.md |
| 170 | Pack-provided type constructors and field presets | Composed registries for parameterized types and presets across PSL + TS; dot namespacing; hard-error duplicates; presets may imply constraints | ADR 170 - Pack-provided type constructors and field presets.md |
| 171 | Parameterized native types in contracts | Contracts represent parameterized storage types as base nativeType + structured typeParams; expansion to SQL strings is hook-driven per component | ADR 171 - Parameterized native types in contracts.md |
| 246 | Option arguments and select templates for authoring helpers | Adds a shared option argument kind (bare token in PSL, literal union in TS; one type across block parameters and helper arguments) and a select template node — registration-validated against the option's values — so preset vocabulary never leaks generator ids. An undefined execution-defaults phase omits the phase; an empty resolved typeParams omits the key — the two rules carry each other, and the updatedAt() ≡ timestamptz(now, now) shorthand is test-enforced, not structural. Per-codec preset name = codec base name. Records which check protects which surface (PSL validator vs TS literal union; the TS surface has no runtime validation) and which protects which argument object (weak type vs excess-property). | ADR 246 - Option arguments and select templates for authoring helpers.md |
Query System
| ADR | Title | Description | Link |
|---|---|---|---|
| 011 | Unified Plan Model | Establishes common Plan structure across all query lanes with AST, SQL, and metadata | ADR 011 - Unified Plan Model.md |
| 012 | Raw SQL Escape Hatch | Plan construction superseded by ADR 247. Provides safe raw SQL execution with required annotations and verification; the annotation schema stands, the AST-less plan shape does not | ADR 012 - Raw SQL Escape Hatch.md |
| 013 | Lane Agnostic Plan Identity | Ensures Plan identity and hashing work consistently across all query lanes | ADR 013 - Lane Agnostic Plan Identity.md |
| 162 | Kysely lane emits PN SQL AST | Superseded. The Kysely lane was removed from Prisma Next; this ADR is retained for historical context only | ADR 162 - Kysely lane emits PN SQL AST.md |
| 165 | ORM WhereArg literal normalization | Records Phase 2 decision to validate bound ToWhereExpr payloads then normalize ParamRef values into literals at ORM boundaries | ADR 165 - ORM WhereArg literal normalization.md |
| 018 | Plan Annotations Schema | Defines canonical JSON schema for Plan annotations and validation rules | ADR 018 - Plan Annotations Schema.md |
| 019 | TypedSQL as Separate CLI | Establishes TypedSQL as out-of-tree tool that emits Plan factories | ADR 019 - TypedSQL as Separate CLI.md |
| 020 | Result Typing Rules | Defines how DSL and ORM compute result types from projections and joins | ADR 020 - Result Typing Rules.md |
| 025 | Plan Caching Memoization | Establishes Plan caching strategy with memoization and invalidation | ADR 025 - Plan Caching Memoization.md |
| 180 | Dot-path field accessor | Callable string accessor (u("homeAddress.city")) for value object fields and Mongo update operators; unified FieldAccessor used by both read and write callbacks in the Mongo query builder | ADR 180 - Dot-path field accessor.md |
| 201 | State-machine pattern for typed DSL builders | Three-class state machine (CollectionHandle → FilteredCollection → PipelineChain) with phantom marker types gating conditional terminals; pattern used in mongo-query-builder, candidate for reuse in a typed SQL query builder | ADR 201 - State-machine pattern for typed DSL builders.md |
| 247 | Whole-query raw SQL is the fragment mechanism at statement position | A raw-query node in AnyQueryAst sharing the fragment tag's parts representation; .returnsRow(spec) / .affectedCount() terminators, a hybrid row spec (contract column refs or explicit codec ids), embeddable iff row-returning (so data-modifying CTEs compose), strict-on-missing / drop-surplus decode. Supersedes ADR 012's AST-less plan construction | ADR 247 - Whole-query raw SQL is the fragment mechanism at statement position.md |
Runtime & Execution
| ADR | Title | Description | Link |
|---|---|---|---|
| 014 | Runtime Hook API | Defines composable hook system for Plan lifecycle events and plugin integration | ADR 014 - Runtime Hook API.md |
| 015 | ORM as Optional Extension | Establishes ORM layer as optional extension built on core DSL primitives | ADR 015 - ORM as Optional Extension.md |
| 016 | Adapter SPI for Lowering | Defines stable adapter interface for SQL lowering and dialect-specific behavior | ADR 016 - Adapter SPI for Lowering.md |
| 030 | Result decoding & codecs registry | Establishes codec registry for type-safe result decoding and parameter encoding | ADR 030 - Result decoding & codecs registry.md |
| 031 | Adapter capability discovery & negotiation | Defines capability discovery and negotiation flow between adapters and runtime | ADR 031 - Adapter capability discovery & negotiation.md |
| 155 | Driver/Codec boundary and lowering responsibilities | Separates lowering vs codec encoding/decoding vs driver transport; standardizes codec↔driver boundary values as string | Uint8Array | null | ADR 155 - Driver Codec Boundary and Lowering Responsibilities.md |
| 157 | Execution enums | Defines execution-plane enum behavior derived from explicit storage enforcement; builds on ADR 155 and ADR 156 | ADR 157 - Execution enums.md |
| 158 | Execution mutation defaults | Defines execution-plane mutation defaults (execution.mutations.defaults) and a section-owned hashing model to avoid marker churn | ADR 158 - Execution mutation defaults.md |
| 168 | Postgres JSON and JSONB typed columns | Adds first-class PostgreSQL json/jsonb codec and column support with Standard Schema-based typed emission in contract.d.ts | ADR 168 - Postgres JSON and JSONB typed columns.md |
| 186 | Codec-dispatched type rendering | Codecs own TypeScript type rendering via renderOutputType and FieldOutputTypes; removes EmissionSpi.generateModelsType? override and legacy renderer infrastructure | ADR 186 - Codec-dispatched type rendering.md |
| 169 | Declared applicability for mutation default generators | Records the decision to validate generator/column compatibility via contributor-declared applicability and to assemble generator implementations via composed registries | ADR 169 - Declared applicability for mutation default generators.md |
| 160 | Plan grouping keys for multi-statement orchestration | Adds meta.groupingKey to correlate multiple statement executions that serve one higher-level operation | ADR 160 - Plan grouping keys for multi-statement orchestration.md |
| 164 | Repository Layer | Defines @internal/sql-orm-client as a multi-query orchestration surface in the extensions integrations layer | ADR 164 - Repository Layer.md |
| 202 | Codec trait system | Semantic capability traits (equality, order, numeric, textual, boolean) declared on codecs and consumed by query surfaces to gate operator availability by data type | ADR 202 - Codec trait system.md |
| 203 | Trait-targeted operation arguments | Extends operation argument specs with traits to accept any codec carrying the required capability, alongside exact codecId targeting | ADR 203 - Trait-targeted operation arguments.md |
| 204 | Single-tier runtime | Collapses runtime-executor into framework-components; family runtimes (@internal/sql-runtime, @internal/mongo-runtime) extend RuntimeCore directly via the /runtime subpath. Partially supersedes ADR 140's "Runtime Separation" two-tier model. | ADR 204 - Single-tier runtime.md |
| 206 | Operations as TypeScript functions | Operations are authored as real TS functions — signature is the type surface, body builds the AST — with a minimal self dispatch hint for ORM column-helper reachability | ADR 206 - Operations as TypeScript functions.md |
| 210 | Prepared Statements: Author Surface and Driver SPI | Adds runtime.prepare(declaration, callback) (re-exposed on each DB facade as db.prepare(...)) and prepared execution through the existing query() driver SPI; lazy driver-allocated opaque handle, no global cache, cache lifetime bounded by user reference and connection. Family-level: per-driver caching strategies are out of scope here. | ADR 210 - Prepared Statements - Author Surface and Driver SPI.md |
| 215 | Runtime middleware lifecycle: beforeExecute fires before encodeParams | Reorders the SQL family runtime so beforeExecute fires between lowerToDraft and encodeDraftParams, with a pre-encode paramsMutator over user-domain values. Extracts runBeforeExecuteChain from runWithMiddleware; intercept always observes a post-beforeExecute plan. SPI shape unchanged. | ADR 215 - Runtime middleware lifecycle beforeExecute before encodeParams.md |
| 220 | Plan execution identity for middleware correlation | Adds planExecutionId: string to RuntimeMiddlewareContext, minted by the runtime via crypto.randomUUID() at the start of every runtime operation (query, prepared statement query, or execute). Per-operation identity (not per-plan), shared across all hooks within one operation, distinct across two operations of the same plan. Lives on the per-operation context, not on PlanMeta. Distinct from ADR 013's content-based planId and ADR 160's groupingKey. | ADR 220 - Plan execution identity for middleware correlation.md |
Migration System
| ADR | Title | Description | Link |
|---|---|---|---|
| 028 | Migration Structure & Operations | Defines migration file structure, on-disk formats, schemas, and operations for working with migration graphs | ADR 028 - Migration Structure & Operations.md |
| 037 | Transactional DDL Fallback | Specifies fallback behavior when adapters lack full transactional DDL support | ADR 037 - Transactional DDL Fallback.md |
| 038 | Operation idempotency classification & enforcement | Defines idempotency classification and enforcement for migration operations | ADR 038 - Operation idempotency classification & enforcement.md |
| 039 | Migration graph path resolution & integrity | Specifies migration graph path computation, cycle detection, and deterministic tie-breaking | ADR 039 - Migration graph path resolution & integrity.md |
| 040 | Node task execution environment & sandboxing | Defines execution environment and sandboxing for migration node tasks | ADR 040 - Node task execution environment & sandboxing.md |
| 041 | Custom operation loading via local packages + preflight bundles | Establishes custom operation loading with security constraints and bundle support | ADR 041 - Custom operation loading via local packages + preflight bundles.md |
| 043 | Advisory lock domain & key strategy | Defines advisory locking strategy for migration coordination and collision prevention | ADR 043 - Advisory lock domain & key strategy.md |
| 044 | Pre & post check vocabulary v1 | Superseded. Check shapes are now per-family: { description, sql } for SQL (ADR 028), { description, source, filter, expect } for MongoDB (ADR 188) | ADR 044 - Pre & post check vocabulary v1.md |
| 154 | Component-owned database dependencies | Sets component-owned verification as the target architecture; v1 uses adapter-owned ID-presence checks as a temporary compromise | ADR 154 - Component-owned database dependencies.md |
| 161 | Explicit foreign key constraint and index configuration | Adds two independent knobs (foreignKeys.constraints, foreignKeys.indexes) to control FK constraint and FK-backing index emission in migration DDL | ADR 161 - Explicit foreign key constraint and index configuration.md |
| 166 | Referential actions for foreign keys | Adds optional onDelete / onUpdate action semantics to foreign keys and Postgres planner DDL emission (ON DELETE / ON UPDATE) | ADR 166 - Referential actions for foreign keys.md |
| 227 | Migration read commands share one graphical renderer with command-specific annotations | migration list, graph, and status all draw the same condensed tree; commands diverge only in per-edge MigrationEdgeAnnotation overlays keyed by migrationHash. Dagre deleted. Trunk = live-contract chain. @contract is app-space-only. Machine output stays flat. | ADR 227 - Migration read commands share one graphical renderer with command-specific annotations.md |
| 228 | Migration apply ledger is a per-migration journal | One ledger row per applied edge (space + migrationName + migrationHash + from/to + operationCount + appliedAt). migration status reads it for applied/pending classification; migration log reads the unscoped flat table as the real apply history. | ADR 228 - Migration apply ledger is a per-migration journal.md |
| 229 | Migration graph renderer uses a line/plane/occlusion model | The renderer is modelled around lines (not cells): each edge is a routed line carrying its own identity and colour, cells hold a z-ordered stack of lines, and the topmost line is drawn while the rest are occluded. Layout guarantees one drawable owner per cell (no tees, two columns per lane), so colour is correct by construction with no junction logic. | ADR 229 - Migration graph renderer uses a line-plane-occlusion model.md |
| 234 | Content-addressed wire names for Postgres-normalized objects | A Postgres-normalized object's physical name is <user prefix>_<8 hex of SHA-256(canonical content)>, so equivalence is a name match and the verifier never compares bodies the database reprints; a matching suffix under a different prefix is the rename signal | ADR 234 - Content-addressed wire names for Postgres-normalized objects.md |
| 240 | Contract snapshots live in a content-addressed store | Every distinct migration contract is stored once per migrations root at migrations/snapshots/<hex>/contract.{json,d.ts}, keyed by storage hash; the old per-package sibling contract files and per-space head copies are gone, and migration.ts imports resolve through the store. Amends ADR 197 and ADR 232. | ADR 240 - Contract snapshots live in a content-addressed store.md |
| 243 | Name-identified indexes and exact-name adoption | Extends ADR 234's content-addressed wire names from RLS policies to every index, so expression and partial indexes become authorable and verifiable without comparing SQL bodies; adds an exact-name mode (map:/@@map) whose equivalence is content comparison, which makes a foreign database adoptable with zero operations; naming is a two-arm union (wire/exact) at construction with flat derived storage. Constraints stay outside the rule (amended: check constraints joined it in ADR 244). | ADR 243 - Name-identified indexes and exact-name adoption.md |
| 244 | Check constraints are opaque wire-named expressions | Extends ADR 234's content-addressed wire names to a third object kind: a check is one opaque SQL predicate whose name commits to its content, so equivalence is name equality and introspection never parses a predicate. Supersedes ADR 156's structured inSet check shape (its storage.sets half stands). The target renders the SQL, the family composes and byte-caps the wire prefix, legacy exact-named checks adopt by drop + add rather than rename, and derivation is scoped to managed tables — the contract describes an external schema without prescribing enforcement for it. | ADR 244 - Check constraints are opaque wire-named expressions.md |
| 239 | Errors are structural envelopes with dotted namespace codes | Every user-facing error is a structural envelope with a dotted NAMESPACE.SUBCODE code, recognized by field shape rather than instanceof, so it survives the control/execution split, the wire, and duplicate library copies; bugs take the separate InternalError path; the numeric PN-DOMAIN-NNNN codes retire against a published crosswalk. Amended 2026-08-11: a command that ran to its end and found problems reports them as diagnostics in a completed envelope with a documented 4–99 exit code (never a thrown failure at exit 2), and the freeform fix prose field becomes typed nextActions. | ADR 239 - Errors are structural envelopes with dotted namespace codes.md |
| 245 | Errors are structured at origin; results carry one ok discriminator | Governs how ADR 239’s envelopes are built and carried: every surfaced failure is structured where it is raised, with its own dotted code, why, and typed nextActions (no catch-all codes; the generic factory takes the code as a required first argument; a non-structured error at a process boundary is a bug, exit 1); code is the error’s only machine identity (meta never carries an alternative one, and the error-reference registry records each code’s producing sites and meta shapes); every operation returns the shared Result with the single ok discriminator and a CliStructuredError failure (per-operation outcome enums banned). Error subclasses extend the one base class — structured data in meta, name untouched so structural recognition holds, no boundary mappers. Composer records the same rules as its ADR-0043/0044. | ADR 245 - Errors are structured at origin; results carry one ok discriminator.md |
Guardrails & CI
| ADR | Title | Description | Link |
|---|---|---|---|
| 022 | Lint Rule Taxonomy | Defines taxonomy and classification system for lint rules and violations | ADR 022 - Lint Rule Taxonomy.md |
| 023 | Budget Evaluation | Establishes query budget evaluation and enforcement mechanisms | ADR 023 - Budget Evaluation.md |
| 024 | Telemetry Schema | Defines telemetry schema and privacy controls for runtime observability | ADR 024 - Telemetry Schema.md |
| 029 | Shadow DB preflight semantics | Superseded — no shadow database will ever exist; diffing is fully offline against on-disk snapshots | ADR 029 - Shadow DB preflight semantics.md |
| 051 | PPg preflight-as-a-service contract | Superseded — the preflight concept is abandoned; no shadow database will ever exist | ADR 051 - PPg preflight-as-a-service contract.md |
Extensions & Packs
| ADR | Title | Description | Link |
|---|---|---|---|
| 017 | Extension Compatibility Policy | Establishes compatibility policy for extensions and alternate runtimes | ADR 017 - Extension Compatibility Policy.md |
| 104 | PSL extension namespacing & syntax | Defines namespaced PSL extension syntax and mapping to contract JSON | ADR 104 - PSL extension namespacing & syntax.md |
| 105 | Contract extension encoding | Specifies canonical extension section structure in contract JSON | ADR 105 - Contract extension encoding.md |
| 106 | Canonicalization for extensions | Defines deterministic normalization rules for extension data | ADR 106 - Canonicalization for extensions.md |
| 112 | Target Extension Packs | Establishes extension pack model as versioned, installable modules | ADR 112 - Target Extension Packs.md |
| 113 | Extension function & operator registry | Defines function and operator registry for extension capabilities | ADR 113 - Extension function & operator registry.md |
| 114 | Extension codecs & branded types | Establishes codec model and branded types for extension values | ADR 114 - Extension codecs & branded types.md |
| 115 | Extension guardrails & EXPLAIN policies | Defines guardrails and EXPLAIN policies for extension operations | ADR 115 - Extension guardrails & EXPLAIN policies.md |
| 116 | Extension-aware migration ops | Specifies extension-aware migration operations and capability gating | ADR 116 - Extension-aware migration ops.md |
| 117 | Extension capability keys | Defines canonical capability keys and reserved namespaces | ADR 117 - Extension capability keys.md |
| 118 | Bundle inclusion policy for packs | Establishes bundle inclusion policy and security constraints for packs | ADR 118 - Bundle inclusion policy for packs.md |
| 121 | Contract.d.ts structure and relation typing | Complete specification for Tables, Models, and Relations namespaces with proper relation field typing | ADR 121 - Contract.d.ts structure and relation typing.md |
| 126 | PSL top-level block SPI | Defines SPI for packs to register new top-level blocks (views, enums, etc.) with parsing, validation, and deterministic emission | ADR 126 - PSL top-level block SPI.md |
| 153 | Extension Package Naming Convention | Standardizes on extension-* prefix exclusively for extension pack npm names | ADR 153 - Extension Package Naming Convention.md |
| 214 | Extension operator surface: namespaced replacement operators and the predicate/helper split | Pattern for extension operators whose codec output cannot back a framework built-in's wire semantics: declare zero of the relevant traits + ship namespaced replacements. Predicate operators register as column methods through the operation registry; non-predicate operators (sort comparators, SELECT-expression accessors) ship as free-standing helper functions. Cipherstash is the canonical worked example. | ADR 214 - Extension operator surface namespaced replacement operators.md |
Adapters & Targets
| ADR | Title | Description | Link |
|---|---|---|---|
| 065 | Adapter capability schema & negotiation v1 | Defines adapter capability schema and negotiation protocol | ADR 065 - Adapter capability schema & negotiation v1.md |
| 068 | Error mapping to RuntimeError | Establishes stable mapping from engine/driver errors to RuntimeError envelope | ADR 068 - Error mapping to RuntimeError.md |
| 207 | Per-environment facade asymmetry | Records why postgres() (long-lived) and postgresServerless() (per-request) ship asymmetric runtime-bound surfaces — same authoring surface, different lifecycle ergonomics — and rejects AsyncLocalStorage / single-facade / per-product alternatives | ADR 207 - Per-environment facade asymmetry.md |
Development & Tooling
| ADR | Title | Description | Link |
|---|---|---|---|
| 026 | Conformance Kit Certification | Defines conformance testing levels and certification requirements | ADR 026 - Conformance Kit Certification.md |
| 027 | Error Envelope Stable Codes | Establishes stable error codes and envelope structure for consistent error handling | ADR 027 - Error Envelope Stable Codes.md |
| 032 | Dev Auto Emit Integration | Specifies development tool integration for automatic contract emission | ADR 032 - Dev Auto Emit Integration.md |
| 034 | Raw Plan factory manifest | Defines optional manifest for raw Plan factories with metadata | ADR 034 - Raw Plan factory manifest.md |
| 035 | Dual authoring conflict resolution | Specifies conflict resolution when both PSL and TS authoring exist | ADR 035 - Dual authoring conflict resolution.md |
| 216 | CLI telemetry installation ID is a stored random UUID, not a system fingerprint | Adopts a stored v4 UUID under the user's config dir as the MAU dedup key; rejects MAC-hash, machine-id, IORegistry UUID, and Windows MachineGuid alternatives on trust, regulatory, and reset-symmetry grounds | ADR 216 - CLI telemetry installation ID is a stored random UUID not a system fingerprint.md |
| 217 | CLI telemetry runs in a detached subprocess spawned at command start | Forks the telemetry sender via child_process.fork() at command start (not exit); parent disconnects and unrefs immediately; child owns all I/O and swallows all errors; satisfies the strict isolation contract by construction rather than diligence | ADR 217 - CLI telemetry runs in a detached subprocess spawned at command start.md |
| 242 | Public npm surface: single @prisma scope with consolidated publish packages | The public surface is 17 @prisma/* packages — database facades, extension packs, framework/toolchain, families, targets — plus the prisma bin shim, all under packages/9-public/; every other workspace package is private and reaches npm only as a subpath entrypoint of a published shell (one module, one package, preserving registry/instanceof identity); framework runtime and tooling publish separately for serverless bundle weight; rejects a second @prisma-orm scope | ADR 242 - Public npm surface - single @prisma scope with consolidated publish packages.md |
No-Emit Workflow
| ADR | Title | Description | Link |
|---|---|---|---|
| 096 | TS-authored contract parity & purity rules | Ensures TS-authored contracts produce identical artifacts to PSL-first mode | ADR 096 - TS-authored contract parity & purity rules.md |
| 097 | Tooling runs on canonical JSON only | Ensures tools consume canonical JSON artifacts, not TS source code | ADR 097 - Tooling runs on canonical JSON only.md |
| 098 | Runtime accepts contract object or JSON | Defines runtime API for accepting both TS objects and JSON artifacts | ADR 098 - Runtime accepts contract object or JSON.md |
| 099 | Contract authoring lint rules | Establishes ESLint rules for preventing non-deterministic contract authoring | ADR 099 - Contract authoring lint rules.md |
| 100 | CI contract emission trust model | Defines sandbox and trust model for TS evaluation in CI environments | ADR 100 - CI contract emission trust model.md |
Migration Advisors
| ADR | Title | Description | Link |
|---|---|---|---|
| 101 | Advisors Framework | Establishes uniform API for computing and surfacing migration advisories | ADR 101 - Advisors Framework.md |
| 102 | Squash-first policy & squash advisor | Defines policy for keeping migration graphs small through regular baselines | ADR 102 - Squash-first policy & squash advisor.md |
| 122 | Database Initialization & Adoption | Covers greenfield, brownfield-conservative, and brownfield-incremental adoption strategies including introspection, multi-service namespacing, and incremental contract expansion | ADR 122 - Database Initialization & Adoption.md |
| 123 | Drift Detection, Recovery & Reconciliation | Comprehensive drift taxonomy (marker, schema, graph, capability, transactional, cache, canonicalization), detection mechanisms, and recovery strategies with idempotency patterns | ADR 123 - Drift Detection, Recovery & Reconciliation.md |
Notes
- ADRs 029 and 051 are superseded: the shadow-DB preflight design is abandoned (diffing is fully offline against on-disk snapshots)
- ADR 156 is partially superseded by ADR 244: its check-constraint half only;
storage.setsremains in force - ADRs 104-118 form the core extension system architecture (decorators, attributes, capabilities, packs)
- ADRs 126-127 introduce PSL top-level blocks and views as composable extensions
- ADRs 096-100 cover the no-emit workflow for TypeScript-authored contracts
Related Documentation
- Architecture Overview - High-level system architecture
- Subsystem Specifications - Detailed subsystem documentation
- Extensions Glossary - Extension terminology reference
- Capabilities Reference - Capability keys and namespaces