# keystonejs/keystone — codebase unpack

> Canonical page: https://codevetter.com/unpack/keystone

This is a deterministic Repo Unpack scan of keystonejs/keystone — a structural map, not a review, security audit, or maintainer-endorsed description.

- Scanned commit: 1a8f2b7fae39ea5dac415745caea4f766109e669 (2026-09-14)
- Last upstream commit: Remove minio in CI (#10036)
- Generated by codevetter 1.15.0 on 2026-10-02
- 1474 files scanned · 5.6 MB

Source inspection; upstream code and tests were not executed.

## Languages

- TypeScript: 978 files
- Markdown: 137 files
- JSON: 109 files
- YAML: 37 files
- JavaScript: 18 files
- CSS: 11 files
- HTML: 2 files
- SQL: 1 files

## Repository structure

- examples/ — 575 files
- packages/ — 344 files
- docs/ — 302 files
- tests/ — 194 files
- tests2/ — 17 files
- .github/ — 15 files
- prisma-utils/ — 4 files
- scripts/ — 3 files

Probable source entrypoint: `packages/` (inferred from the tree, not upstream docs)

## Package

- package.json: @keystone-6/mono-repo — 20 declared dependencies

## Structural health signals

Average score 7.2/10 across 96 files; 21 hotspots. These are deterministic review leads, not proof of a bug.

## Recent history

- 1a8f2b7fae39 (2026-09-14) Remove minio in CI (#10036)
- 77f4965fe526 (2026-09-14) Deploy site with GH Pages (#10035)
- 5d58de638a75 (2026-09-02) Add verifyDepsBeforeRun: false to pnpm-workspace.yaml (#10033)
- 928a45b4b05d (2026-09-01) Simplify examples/custom-session-passport (#10032)
- 311188d29dba (2026-09-01) Use jose instead of jsonwebtoken in examples/custom-session-jwt (#10031)

## Overview

Keystone is a TypeScript CMS and application backend framework for developers who define data models in code and give editors a generated management interface. List and field definitions produce GraphQL APIs, Prisma database schemas, typed server contexts, and a Next.js Admin UI, with configurable authentication, access control, hooks, actions, and asset storage. This brief describes the source inspected at commit 1a8f2b7fae39ea5dac415745caea4f766109e669; the investigation is bounded and no repository code or tests were executed.

## System map

The repository packages a configurable backend framework alongside authentication, document editing, Cloudinary integration, examples, and a documentation website. Core separates configuration/schema construction, Prisma-backed execution, Express/Apollo transport, and a generated Next.js Admin UI. Package publication and static website deployment have separate GitHub Actions workflows.
- The private monorepo pins pnpm 11.21.0; its workspace includes packages, examples, documentation, multiple test workspaces, and prisma-utils, with shared dependency versions in the catalog. — [package.json#L2-10](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/package.json#L2-L10) [pnpm-workspace.yaml#L1-37](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/pnpm-workspace.yaml#L1-L37)
- The keystone executable imports @keystone-6/core/scripts; main() passes process.cwd() and CLI arguments to cli(), which dispatches dev, build, start, postinstall, and telemetry. — [packages/core/bin/cli.js#L1-3](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/bin/cli.js#L1-L3) [packages/core/src/scripts/index.ts#L4-19](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/scripts/index.ts#L4-L19) [packages/core/src/scripts/cli.ts#L76-103](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/scripts/cli.ts#L76-L103)
- Core's public index exports config, list, group, action, and GraphQL schema builders; its package exposes separate context, session, fields, testing, and Admin UI entrypoints. — [packages/core/src/index.ts#L1-9](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/index.ts#L1-L9) [packages/core/package.json#L7-28](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/package.json#L7-L28)
- createContextSystem() initializes lists and Admin metadata, builds public/internal schemas, creates or accepts a Prisma client, and exposes connect()/disconnect(); connect() invokes db.onConnect after $connect(). — [packages/core/src/lib/getContext.ts#L77-118](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/getContext.ts#L77-L118)
- createExpressServer() owns the HTTP server and Apollo transport; Admin UI middleware is attached separately after Next preparation, allowing UI-disabled deployments. — [packages/core/src/lib/express.ts#L53-103](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/express.ts#L53-L103) [packages/core/src/scripts/start.ts#L30-40](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/scripts/start.ts#L30-L40)
- config() accepts PostgreSQL, SQLite, or MySQL; applications supply prismaClientOptions(), while schema/client/type paths and Prisma extension callbacks are normalized centrally. — [packages/core/src/schema.ts#L121-158](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/schema.ts#L121-L158) [examples/assets-local/keystone.ts#L8-23](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/examples/assets-local/keystone.ts#L8-L23)
- Root build uses Preconstruct, lint uses oxlint, types use tsc, document tests use Vitest, and tests2 uses node:test; prisma-utils separately verifies generated filter material. — [package.json#L11-26](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/package.json#L11-L26) [prisma-utils/package.json#L6-13](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/prisma-utils/package.json#L6-L13)
- Packages publish through Changesets after pnpm build; the docs build validates links and generates llms material, while production website CI enables STATIC_EXPORT and deploys docs/out to GitHub Pages. — [.github/workflows/publish.yml#L36-58](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/.github/workflows/publish.yml#L36-L58) [docs/package.json#L7-17](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/docs/package.json#L7-L17) [.github/workflows/website_production.yml#L47-70](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/.github/workflows/website_production.yml#L47-L70)

## Feature catalog

Keystone exposes generated CRUD APIs and an editor-facing interface from the same configured lists. Built-in fields cover scalar, relationship, password, and asset data, with a separate rich-document package. Authentication, custom actions, storage integrations, and project scaffolding provide additional application capabilities.
- Each generated list context exposes findOne, findMany, count, createOne/createMany, updateOne/updateMany, and deleteOne/deleteMany; omitted GraphQL operations become unsupported context calls. — [packages/core/src/lib/context/api.ts#L10-54](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/context/api.ts#L10-L54) [packages/core/src/lib/context/api.ts#L63-83](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/context/api.ts#L63-L83)
- writeAdminFiles() generates home, no-access, list, item, and create pages; CreateItemPage submits the configured fields and navigates to the new item's route. — [packages/core/src/admin-ui/templates/index.ts#L27-50](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/admin-ui/templates/index.ts#L27-L50) [packages/core/src/admin-ui/pages/CreateItemPage/index.tsx#L34-60](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/admin-ui/pages/CreateItemPage/index.tsx#L34-L60)
- ListPage supports field filters, search, sorting, selectable columns, pagination, and custom actions; list preferences are restored from localStorage with URL query values taking precedence. — [packages/core/src/admin-ui/pages/ListPage/index.tsx#L291-337](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/admin-ui/pages/ListPage/index.tsx#L291-L337) [packages/core/src/admin-ui/pages/ListPage/index.tsx#L387-416](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/admin-ui/pages/ListPage/index.tsx#L387-L416) [packages/core/src/admin-ui/pages/ListPage/index.tsx#L444-480](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/admin-ui/pages/ListPage/index.tsx#L444-L480)
- Core exports checkbox, numeric types, text, select/multiselect, JSON, bytes, timestamp/calendarDay, password, virtual, relationship, file, and image field factories. — [packages/core/src/fields/index.ts#L1-34](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/fields/index.ts#L1-L34)
- The document field supports configurable formatting, links, dividers, layouts, relationships, and component blocks; document output can optionally hydrate relationship data. — [packages/fields-document/src/index.ts#L36-82](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/fields-document/src/index.ts#L36-L82) [packages/fields-document/src/index.ts#L155-185](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/fields-document/src/index.ts#L155-L185)
- createAuth() adds password authentication, authenticatedItem, endSession, generated sign-in files, session-data hydration, and denied-access redirects to sign-in. — [packages/auth/src/index.ts#L65-78](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/auth/src/index.ts#L65-L78) [packages/auth/src/index.ts#L108-148](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/auth/src/index.ts#L108-L148) [packages/auth/src/gql/getBaseAuthSchema.ts#L55-84](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/auth/src/gql/getBaseAuthSchema.ts#L55-L84)
- Custom list actions can collect field-rendered arguments and configure prompts, success/failure messages, visibility, and navigation; the actions example implements vote, report, and hideWithReason. — [examples/actions/schema.ts#L60-98](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/examples/actions/schema.ts#L60-L98) [examples/actions/schema.ts#L99-139](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/examples/actions/schema.ts#L99-L139) [examples/actions/schema.ts#L142-190](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/examples/actions/schema.ts#L142-L190)
- Asset examples provide local filesystem storage and S3 public/signed URLs; Cloudinary exposes transformed image URLs, and create-keystone-app copies a starter project into a selected directory. — [examples/assets-local/schema.ts#L28-56](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/examples/assets-local/schema.ts#L28-L56) [examples/assets-s3/schema.ts#L28-70](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/examples/assets-s3/schema.ts#L28-L70) [packages/cloudinary/src/index.ts#L93-115](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/cloudinary/src/index.ts#L93-L115) [packages/create/src/index.ts#L58-90](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/create/src/index.ts#L58-L90)

## Data flow

Configuration is transformed into executable schemas, generated artifacts, and browser metadata before requests arrive. Each HTTP GraphQL request receives a context containing its decoded session and shared Prisma access. Persistence flows through input resolvers and hooks, while browser preferences, session stores, asset stores, and telemetry use separate state boundaries.
- config() adds IDs and list defaults; initialise-lists invokes each field factory with provider, list metadata, listKey, and fieldKey, then resolves its access, hooks, GraphQL enablement, and UI metadata. — [packages/core/src/schema.ts#L64-104](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/schema.ts#L64-L104) [packages/core/src/lib/core/initialise-lists.ts#L765-805](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/core/initialise-lists.ts#L765-L805)
- buildArtifacts() prints the public GraphQL schema and formatted Prisma schema; generateArtifacts() writes both, while generateTypes() derives TypeScript from the internal schema and initialized lists. — [packages/core/src/artifacts.ts#L58-98](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/artifacts.ts#L58-L98)
- Express parses GraphQL JSON and multipart uploads, then calls context.withRequest(req,res); withRequest() invokes the session strategy and returns a context bound to the resulting session. — [packages/core/src/lib/express.ts#L88-101](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/express.ts#L88-L101) [packages/core/src/lib/context/createContext.ts#L100-120](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/context/createContext.ts#L100-L120)
- Admin creation serializes field-controller state into mutation variables; server input resolution applies field hooks before list hooks, validates resolved data, transforms it for Prisma, and returns before/after callbacks. — [packages/core/src/admin-ui/utils/useCreateItem.ts#L80-105](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/admin-ui/utils/useCreateItem.ts#L80-L105) [packages/core/src/lib/core/mutations/index.ts#L526-576](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/core/mutations/index.ts#L526-L576) [packages/core/src/lib/core/mutations/index.ts#L579-620](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/core/mutations/index.ts#L579-L620)
- findMany() enforces maxTake, operation access, list filters, field filtering/cursor permissions, and ordering permissions before a Prisma query; access filters are combined with caller filters using AND. — [packages/core/src/lib/core/queries/resolvers.ts#L66-77](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/core/queries/resolvers.ts#L66-L77) [packages/core/src/lib/core/queries/resolvers.ts#L127-161](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/core/queries/resolvers.ts#L127-L161) [packages/core/src/lib/core/queries/resolvers.ts#L194-208](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/core/queries/resolvers.ts#L194-L208)
- File input streams are counted and passed to storage.put(); Prisma receives filename/filesize metadata, output URLs delegate to storage.url(), and changed or deleted assets are removed through afterOperation. — [packages/core/src/fields/types/file/index.ts#L65-81](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/fields/types/file/index.ts#L65-L81) [packages/core/src/fields/types/file/index.ts#L95-127](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/fields/types/file/index.ts#L95-L127) [packages/core/src/fields/types/file/index.ts#L139-148](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/fields/types/file/index.ts#L139-L148)
- Stateless sessions seal data into HTTP-only cookies and return the sealed token; storedSessions instead persists data under a random ID and seals that ID, then resolves or deletes it through the configured store. — [packages/core/src/session.ts#L116-135](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/session.ts#L116-L135) [packages/core/src/session.ts#L138-167](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/session.ts#L138-L167)
- Development telemetry POSTs package versions, database provider, list/field counts, OS, and Node major version; Conf records per-project/device send dates, with CI, production, opt-out, and environment-variable exclusions. — [packages/core/src/lib/telemetry.ts#L205-225](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/telemetry.ts#L205-L225) [packages/core/src/lib/telemetry.ts#L238-273](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/telemetry.ts#L238-L273) [packages/core/src/lib/telemetry.ts#L276-317](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/telemetry.ts#L276-L317)

## Behavior traces

The inspected flows connect CLI startup, browser item creation, password login, and asset persistence to their actual execution functions. Branches such as disabled UI, failed authentication, denied queries, and frozen builds change the sequence materially. These are source-derived walkthroughs, not executed traces.
- Production startup follows cli('start') → start() → importBuiltKeystoneConfiguration() → createSystem() → importBuiltPrismaModule() → getKeystone() → connect() → createExpressServer(); --no-server returns before client/server initialization. — [packages/core/src/scripts/cli.ts#L86-88](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/scripts/cli.ts#L86-L88) [packages/core/src/scripts/start.ts#L19-31](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/scripts/start.ts#L19-L31)
- After API startup, enabled UI follows createNextServer() → prepare() → createAdminUIMiddlewareWithNextApp(); PORT and HOST override listen options before httpServer.listen(). — [packages/core/src/scripts/start.ts#L33-54](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/scripts/start.ts#L33-L54)
- CreateItemPage submits through useCreateItem.create(); invalid fields stop submission, otherwise serialization feeds tryCreateItem(), success clears navigation prevention and emits a toast, then the page navigates to /{list.path}/{id}. — [packages/core/src/admin-ui/pages/CreateItemPage/index.tsx#L34-43](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/admin-ui/pages/CreateItemPage/index.tsx#L34-L43) [packages/core/src/admin-ui/utils/useCreateItem.ts#L80-122](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/admin-ui/utils/useCreateItem.ts#L80-L122)
- The generated create resolver calls createOne() → getOperationAccess() → createSingle__() → list/field access enforcement → resolveInputForCreateOrUpdate() → beforeOperation() → Prisma.create() → afterOperation(); singleton creation forces id=1. — [packages/core/src/lib/core/mutations/index.ts#L75-102](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/core/mutations/index.ts#L75-L102) [packages/core/src/lib/core/mutations/index.ts#L273-286](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/core/mutations/index.ts#L273-L286) [packages/core/src/lib/core/mutations/index.ts#L692-704](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/core/mutations/index.ts#L692-L704)
- SigninPage submits identity/secret to the generated authentication mutation; its resolver performs sudo().db.findOne(), simulated hashing for missing password data, KDF comparison, and sessionStrategy.start(), returning failure if the token is empty. — [packages/auth/src/pages/SigninPage.tsx#L34-70](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/auth/src/pages/SigninPage.tsx#L34-L70) [packages/auth/src/gql/getBaseAuthSchema.ts#L85-118](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/auth/src/gql/getBaseAuthSchema.ts#L85-L118)
- The next authenticated request follows withRequest() → wrapped session get() → stateless getToken()/Iron.unseal() → sudo().query.findOne(sessionData) → withSession(); missing tokens, missing users, or failed hydration leave the request unauthenticated. — [packages/core/src/lib/context/createContext.ts#L105-116](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/context/createContext.ts#L105-L116) [packages/core/src/session.ts#L62-98](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/session.ts#L62-L98) [packages/auth/src/index.ts#L108-132](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/auth/src/index.ts#L108-L132)
- A file create resolves the Upload, opens its stream, transforms the filename, and awaits storage.put() before Prisma persistence; replacement cleanup runs after the update and deletes the old key only when it differs. — [packages/core/src/fields/types/file/index.ts#L65-81](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/fields/types/file/index.ts#L65-L81) [packages/core/src/fields/types/file/index.ts#L98-109](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/fields/types/file/index.ts#L98-L109) [packages/core/src/lib/core/mutations/index.ts#L164-182](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/core/mutations/index.ts#L164-L182)
- build() bundles configuration, ensures Prisma config, then validates schemas when frozen or generates them otherwise; it generates types/client, bundles Prisma, and optionally generates/builds Next UI. postinstall selects frozen=true and ui=false. — [packages/core/src/scripts/build.ts#L28-59](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/scripts/build.ts#L28-L59) [packages/core/src/scripts/cli.ts#L94-98](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/scripts/cli.ts#L94-L98)

## Testing signals

Tests and CI were inspected, not executed; test existence and workflow commands do not establish passing results. The inspected coverage includes access control, authentication, asset lifecycle, editor behavior, CLI artifacts, and browser deletion feedback across several frameworks and database providers. This is a bounded inventory, with explicit suite exclusions and local coverage limits rather than exhaustive coverage claims.
- Vitest has a default 10-second timeout and excludes examples/testing and tests2; separate root scripts run document-package Vitest tests, Admin UI tests, tsc, filter verification, and node:test. — [vitest.config.ts#L1-8](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/vitest.config.ts#L1-L8) [package.json#L11-18](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/package.json#L11-L18)
- API CI shards general tests across PostgreSQL, SQLite, and MySQL/MariaDB, excludes fields/crud.test.ts from those shards, and runs field CRUD separately for each provider. — [.github/workflows/tests_ci.yml#L87-115](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/.github/workflows/tests_ci.yml#L87-L115) [.github/workflows/tests_ci.yml#L128-174](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/.github/workflows/tests_ci.yml#L128-L174) [.github/workflows/tests_ci.yml#L176-194](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/.github/workflows/tests_ci.yml#L176-L194)
- tests2/access.create.test.ts uses node:test and strict assertions to check list create denial, field create/read behavior, and privileged persisted values; its field cases skip lists containing unique fields. — [tests2/access.create.test.ts#L1-13](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/tests2/access.create.test.ts#L1-L13) [tests2/access.create.test.ts#L21-47](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/tests2/access.create.test.ts#L21-L47) [tests2/access.create.test.ts#L84-121](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/tests2/access.create.test.ts#L84-L121)
- auth-header.test.ts exercises unauthenticated query/update behavior, rejects nonunique identity configuration, and verifies bearer-token access after password login. — [tests/api-tests/auth-header.test.ts#L78-126](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/tests/api-tests/auth-header.test.ts#L78-L126) [tests/api-tests/auth-header.test.ts#L129-148](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/tests/api-tests/auth-header.test.ts#L129-L148)
- File tests verify bytes and metadata with in-memory storage plus replacement/deletion cleanup; these inspected cases exercise strategy doubles rather than a live S3 service. — [tests/api-tests/fields/files.test.ts#L24-28](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/tests/api-tests/fields/files.test.ts#L24-L28) [tests/api-tests/fields/files.test.ts#L77-127](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/tests/api-tests/fields/files.test.ts#L77-L127)
- Document heading tests call editor.insertText()/insertBreak() and compare inline snapshots; the architecture guide describes normalization/input tests with UI rendering as smoke coverage. — [packages/fields-document/src/DocumentEditor/heading.test.tsx#L4-34](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/fields-document/src/DocumentEditor/heading.test.tsx#L4-L34) [packages/fields-document/src/DocumentEditor/heading.test.tsx#L36-71](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/fields-document/src/DocumentEditor/heading.test.tsx#L36-L71) [packages/fields-document/ARCHITECTURE.md#L95-101](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/fields-document/ARCHITECTURE.md#L95-L101)
- Admin UI tests combine Vitest and Playwright to check successful, failed, and partial bulk-deletion notifications; CI installs Chromium and runs selected Admin UI files with one worker. — [tests/admin-ui-tests/list-view-crud.test.ts#L1-38](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/tests/admin-ui-tests/list-view-crud.test.ts#L1-L38) [tests/admin-ui-tests/list-view-crud.test.ts#L61-98](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/tests/admin-ui-tests/list-view-crud.test.ts#L61-L98) [.github/workflows/tests_ci.yml#L316-345](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/.github/workflows/tests_ci.yml#L316-L345)
- CLI tests cover missing builds, ESM builds, --no-prisma, and production NODE_ENV; inspected limits include manually triggered Windows CI and docs builds ignoring TypeScript errors while root tsc excludes docs. — [tests/cli-tests/build.test.ts#L16-65](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/tests/cli-tests/build.test.ts#L16-L65) [.github/workflows/tests_ci_windows.yml#L1-20](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/.github/workflows/tests_ci_windows.yml#L1-L20) [docs/next.config.mjs#L11-15](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/docs/next.config.mjs#L11-L15) [tsconfig.json#L19-20](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/tsconfig.json#L19-L20)

## Risk map

The main sensitive boundaries are privileged context APIs, authentication/session configuration, external storage, and commands that generate files or alter databases. Source inspection also reveals example/API drift and a Cloudinary metadata mapping concern. These findings are source observations or explicitly labeled hypotheses, not confirmed vulnerabilities or executed defect reproductions.
- sudo() constructs an internal context with permission bypass enabled, while internal() only changes schema scope; direct Prisma access is exposed separately and the actions example explicitly uses it to bypass Keystone access checks. — [packages/core/src/lib/context/createContext.ts#L79-85](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/context/createContext.ts#L79-L85) [packages/core/src/lib/context/createContext.ts#L123-132](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/context/createContext.ts#L123-L132) [packages/core/src/lib/core/access-control.ts#L93-109](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/core/access-control.ts#L93-L109) [examples/actions/schema.ts#L68-81](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/examples/actions/schema.ts#L68-L81)
- Admin UI access defaults to allowed when no session strategy exists; server.cors=true becomes reflected origins with credentials=true. These configuration choices must be assessed independently of list API permissions. — [packages/core/src/schema.ts#L111-114](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/schema.ts#L111-L114) [packages/core/src/schema.ts#L128-134](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/schema.ts#L128-L134) [packages/core/src/schema.ts#L182-189](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/schema.ts#L182-L189) [packages/core/src/lib/express.ts#L64-69](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/express.ts#L64-L69)
- Hypothesis: omitting a stable session secret can invalidate sessions after strategy reconstruction or across independently initialized instances, because statelessSessions() generates a fresh random default secret. (inferred) — [packages/core/src/session.ts#L73-98](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/session.ts#L73-L98) [packages/core/src/session.ts#L116-133](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/session.ts#L116-L133)
- Hypothesis: a successful storage.put() followed by validation or database failure can leave an orphaned asset, because upload occurs during input resolution and the inspected cleanup hook addresses replaced/deleted old filenames after persistence. (inferred) — [packages/core/src/fields/types/file/index.ts#L65-81](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/fields/types/file/index.ts#L65-L81) [packages/core/src/fields/types/file/index.ts#L95-109](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/fields/types/file/index.ts#L95-L109) [packages/core/src/lib/core/mutations/index.ts#L597-619](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/core/mutations/index.ts#L597-L619) [packages/core/src/lib/core/mutations/index.ts#L94-102](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/core/mutations/index.ts#L94-L102)
- CLI operations have filesystem/database side effects: dev defaults to dbPush=true, Prisma helpers spawn the resolved CLI and use temporary directories, and artifact destinations can be configured through resolved paths. — [packages/core/src/scripts/cli.ts#L76-83](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/scripts/cli.ts#L76-L83) [packages/core/src/scripts/dev.ts#L150-169](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/scripts/dev.ts#L150-L169) [packages/core/src/lib/prisma-cli.ts#L11-19](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/prisma-cli.ts#L11-L19) [packages/core/src/lib/system.ts#L24-43](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/system.ts#L24-L43)
- The magic-link example reads password.extensions.keystoneSecretField and calls generateHash(), whereas current core exports extensions.keystoneKDF with hash()/compare(); the source names disagree on its token redemption path. — [examples/auth-magic-link/schema.ts#L165-181](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/examples/auth-magic-link/schema.ts#L165-L181) [packages/core/src/fields/types/password/index.ts#L54-57](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/fields/types/password/index.ts#L54-L57) [packages/core/src/fields/types/password/index.ts#L218-240](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/fields/types/password/index.ts#L218-L240)
- Cloudinary output maps both width and height from _meta.width, and the field implementation explicitly notes no delete support; dimension reporting and remote asset cleanup warrant focused review. — [packages/cloudinary/src/index.ts#L119-123](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/cloudinary/src/index.ts#L119-L123) [packages/cloudinary/src/index.ts#L183-192](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/cloudinary/src/index.ts#L183-L192)
- The document site can build with TypeScript errors ignored; root tsc excludes docs, and the inspected main types job runs recursive check plus root tsc, while docs/package.json has no check script. — [docs/next.config.mjs#L11-15](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/docs/next.config.mjs#L11-L15) [tsconfig.json#L19-20](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/tsconfig.json#L19-L20) [.github/workflows/tests_ci.yml#L38-50](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/.github/workflows/tests_ci.yml#L38-L50) [docs/package.json#L7-17](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/docs/package.json#L7-L17)

## Extension points

Keystone extensions are primarily configuration callbacks and typed factories rather than a central plugin registry. Lists, fields, hooks, actions, schema extensions, sessions, and storage strategies feed into generated runtime and UI structures. Transport and Admin UI generation expose additional integration boundaries.
- Custom fields plug in as FieldTypeFunc factories receiving provider/list/field metadata; their result supplies database shape, input/output resolvers, access, hooks, views, and Admin metadata. — [packages/core/src/lib/core/initialise-lists.ts#L150-201](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/core/initialise-lists.ts#L150-L201) [packages/core/src/lib/core/initialise-lists.ts#L765-805](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/core/initialise-lists.ts#L765-L805) [packages/core/src/fields/types/file/index.ts#L113-153](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/fields/types/file/index.ts#L113-L153)
- graphql.extendGraphqlSchema() receives the generated schema after core query/mutation assembly; createAuth() composes its authentication extension before the application's existing extension. — [packages/core/src/lib/graphql.ts#L59-82](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/graphql.ts#L59-L82) [packages/auth/src/index.ts#L194-212](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/auth/src/index.ts#L194-L212)
- list.actions entries are initialized into GraphQL argument types, singular/plural operation names, telemetry labels, and UI prompt/navigation metadata; field-rendered arguments cannot suppress the item prompt. — [packages/core/src/lib/core/initialise-lists.ts#L1252-1274](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/core/initialise-lists.ts#L1252-L1274) [packages/core/src/lib/core/initialise-lists.ts#L1275-1300](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/core/initialise-lists.ts#L1275-L1300) [packages/core/src/schema.ts#L245-259](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/schema.ts#L245-L259)
- Field and list resolveInput hooks transform data in that order; validation and beforeOperation/afterOperation hooks provide separate lifecycle stages around CRUD persistence. — [packages/core/src/lib/core/mutations/index.ts#L526-576](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/core/mutations/index.ts#L526-L576) [packages/core/src/lib/core/mutations/index.ts#L597-619](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/core/mutations/index.ts#L597-L619)
- Database customization uses prismaClientOptions(), extendPrismaClient(), extendPrismaSchema(), and onConnect(); getKeystone() also accepts an existing Prisma client. — [packages/core/src/schema.ts#L150-158](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/schema.ts#L150-L158) [packages/core/src/lib/getContext.ts#L92-115](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/getContext.ts#L92-L115)
- Session strategies implement get/start/end, storedSessions accepts a store factory parameterized by maxAge, and asset StorageStrategy delegates put/delete/url with access to the Keystone context. — [packages/core/src/session.ts#L88-135](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/session.ts#L88-L135) [packages/core/src/session.ts#L138-167](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/session.ts#L138-L167) [packages/core/src/fields/types/file/index.ts#L65-80](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/fields/types/file/index.ts#L65-L80) [packages/core/src/fields/types/file/index.ts#L139-148](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/fields/types/file/index.ts#L139-L148)
- Admin UI generation accepts ui.getAdditionalFiles() and discovers admin/pages files; additional files take precedence, and custom pages override matching generated pages. — [packages/core/src/admin-ui/system/generateAdminUI.ts#L78-128](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/admin-ui/system/generateAdminUI.ts#L78-L128)
- server.extendExpressApp() and extendHttpServer() run before Apollo middleware registration; document consumers separately extend editing through componentBlocks and DocumentFeatures without exposing Slate as the public customization contract. — [packages/core/src/lib/express.ts#L61-100](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/express.ts#L61-L100) [packages/fields-document/src/index.ts#L71-82](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/fields-document/src/index.ts#L71-L82) [packages/fields-document/ARCHITECTURE.md#L69-80](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/fields-document/ARCHITECTURE.md#L69-L80) [packages/fields-document/ARCHITECTURE.md#L103-105](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/fields-document/ARCHITECTURE.md#L103-L105)

## Contributor handoff

Begin with the owning package and relevant example, then trace configuration, generated schemas, request context, and persistence together. Tests and CI were inspected, not executed; future validation must distinguish selected test commands from actual results and use disposable databases. Keep source edits small, preserve generated/public API boundaries, and treat this inventory as bounded rather than exhaustive.
- Use the pinned pnpm version and workspace catalog; read root scripts before invoking checks because postinstall runs Preconstruct setup and recursive package checks. — [package.json#L10-26](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/package.json#L10-L26) [pnpm-workspace.yaml#L14-37](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/pnpm-workspace.yaml#L14-L37)
- For runtime changes, read schema.ts, getContext.ts, createContext.ts, and Express startup together: defaults, dual schemas, client construction, and request-session ownership reside in different modules. — [packages/core/src/schema.ts#L145-190](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/schema.ts#L145-L190) [packages/core/src/lib/getContext.ts#L77-107](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/getContext.ts#L77-L107) [packages/core/src/lib/context/createContext.ts#L105-125](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/context/createContext.ts#L105-L125) [packages/core/src/lib/express.ts#L93-100](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/express.ts#L93-L100)
- Change schema generators/configuration rather than generated GraphQL, Prisma, type, or Admin output; frozen builds compare generated schemas to files, and non-live UI generation removes prior output except .next. — [packages/core/src/artifacts.ts#L16-21](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/artifacts.ts#L16-L21) [packages/core/src/artifacts.ts#L34-53](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/artifacts.ts#L34-L53) [packages/core/src/artifacts.ts#L76-98](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/artifacts.ts#L76-L98) [packages/core/src/admin-ui/system/generateAdminUI.ts#L62-75](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/admin-ui/system/generateAdminUI.ts#L62-L75)
- Keep internal(), sudo(), query, db, and Prisma semantics separate; schema omission and permission bypass are distinct switches, and direct Prisma operations do not inherit the example's Keystone access checks. — [packages/core/src/lib/context/createContext.ts#L123-141](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/context/createContext.ts#L123-L141) [packages/core/src/lib/context/api.ts#L10-18](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/context/api.ts#L10-L18) [examples/actions/schema.ts#L68-81](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/examples/actions/schema.ts#L68-L81)
- For authorized validation, select existing scripts or focused suites first: document edits use test:vitest, access changes use test:node/API tests, and Admin UI behavior uses test:admin-ui. These commands and CI were inspected, not executed here. — [package.json#L11-18](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/package.json#L11-L18) [.github/workflows/tests_ci.yml#L60-72](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/.github/workflows/tests_ci.yml#L60-L72) [.github/workflows/tests_ci.yml#L95-115](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/.github/workflows/tests_ci.yml#L95-L115) [.github/workflows/tests_ci.yml#L213-229](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/.github/workflows/tests_ci.yml#L213-L229)
- Use disposable database targets for tests: tests2 selects provider from DATABASE_URL, creates temporary project directories and isolated database locations, then generates artifacts/client and pushes Prisma schema. — [tests2/utils.ts#L27-46](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/tests2/utils.ts#L27-L46) [tests2/utils.ts#L61-89](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/tests2/utils.ts#L61-L89) [tests2/utils.ts#L92-107](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/tests2/utils.ts#L92-L107) [tests2/utils.ts#L136-147](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/tests2/utils.ts#L136-L147)
- Editor work should follow the architecture guide's normalization and rendering conventions: avoid reactive Slate hooks in element/leaf renderers, derive toolbar state centrally, and assert editor structure with snapshots. — [packages/fields-document/ARCHITECTURE.md#L42-47](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/fields-document/ARCHITECTURE.md#L42-L47) [packages/fields-document/ARCHITECTURE.md#L49-62](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/fields-document/ARCHITECTURE.md#L49-L62) [packages/fields-document/ARCHITECTURE.md#L95-101](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/fields-document/ARCHITECTURE.md#L95-L101)
- Before using examples as implementation templates, reconcile magic-link password metadata with core's KDF API and review lifecycle compatibility: bulk mutation errors deliberately preserve input ordering for legacy test expectations. — [examples/auth-magic-link/schema.ts#L165-181](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/examples/auth-magic-link/schema.ts#L165-L181) [packages/core/src/fields/types/password/index.ts#L223-240](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/fields/types/password/index.ts#L223-L240) [packages/core/src/lib/core/mutations/index.ts#L668-681](https://github.com/keystonejs/keystone/blob/1a8f2b7fae39ea5dac415745caea4f766109e669/packages/core/src/lib/core/mutations/index.ts#L668-L681)

Source repository: https://github.com/keystonejs/keystone
Full evidence corpus: https://github.com/Codevetter/codevetter/tree/main/benchmarks/repo-unpacks/keystone.json

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
