[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-prisma-prisma-next-quickstart":3,"mdc-34nc1o-key":35,"related-repo-prisma-prisma-next-quickstart":4904,"related-org-prisma-prisma-next-quickstart":4997},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":31,"sourceUrl":33,"mdContent":34},"prisma-next-quickstart","adopt Prisma Next in projects","Adopt Prisma Next into a new project, onto an existing database, or as the first move after a bootstrap tool dropped you into a scaffold. Use for \"what can I do with Prisma Next\", \"what can I do next with Prisma\", \"where do I start\", \"what should I do first\", \"just ran createprisma\", \"createprisma\", \"npx createprisma\", \"npx create-prisma\", \"first steps\", \"first query\", \"I have a scaffolded Prisma Next project what now\"; for `pnpm dlx prisma-next init` greenfield setup; and for `prisma-next contract infer` + `db sign` against an existing database. Also covers the connect-write-read first-arc orientation, the day-to-day commands (`contract emit`, `db init`, `db update`, `migration plan`, `migrate`, `db schema`, `db verify`), and routing to `prisma-next-contract` \u002F `prisma-next-queries` \u002F `prisma-next-runtime` for the next move. Flags: --target, --authoring, --schema-path, --probe-db, --output.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"prisma","Prisma","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fprisma.png",[12,16,19,22],{"name":13,"slug":14,"type":15},"TypeScript","typescript","tag",{"name":17,"slug":18,"type":15},"Database","database",{"name":20,"slug":21,"type":15},"ORM","orm",{"name":9,"slug":8,"type":15},415,"https:\u002F\u002Fgithub.com\u002Fprisma\u002Fprisma-next","2026-07-24T05:37:12.462072",null,15,[29,30],"loggy-core","loggy-terminal",{"repoUrl":24,"stars":23,"forks":27,"topics":32,"description":26},[29,30],"https:\u002F\u002Fgithub.com\u002Fprisma\u002Fprisma-next\u002Ftree\u002FHEAD\u002Fskills\u002Fprisma-next-quickstart","---\nname: prisma-next-quickstart\ndescription: >-\n  Adopt Prisma Next into a new project, onto an existing database, or as the\n  first move after a bootstrap tool dropped you into a scaffold. Use for \"what\n  can I do with Prisma Next\", \"what can I do next with Prisma\", \"where do I\n  start\", \"what should I do first\", \"just ran createprisma\", \"createprisma\",\n  \"npx createprisma\", \"npx create-prisma\", \"first steps\", \"first query\", \"I\n  have a scaffolded Prisma Next project what now\"; for `pnpm dlx prisma-next\n  init` greenfield setup; and for `prisma-next contract infer` + `db sign`\n  against an existing database. Also covers the connect-write-read first-arc\n  orientation, the day-to-day commands (`contract emit`, `db init`, `db\n  update`, `migration plan`, `migrate`, `db schema`, `db verify`), and\n  routing to `prisma-next-contract` \u002F `prisma-next-queries` \u002F\n  `prisma-next-runtime` for the next move. Flags: --target, --authoring,\n  --schema-path, --probe-db, --output.\n---\n\n# Prisma Next — Quickstart (Adoption)\n\n> **Edit your data contract. Prisma handles the rest.**\n\nThis skill takes the user from zero (or near-zero) to a first working query against Prisma Next. Three paths — and they all converge on the same first arc: **connect → write → read**. Schema editing comes *after* the first arc, not before.\n\n- **First-touch orientation** — the user has arrived at a Prisma Next project for the first time (a scaffold tool like `npx createprisma` dropped them in, they cloned a teammate's repo, or they ran `prisma-next init` themselves and now want to make their first move) and they're asking *\"what can I do with Prisma Next?\"*, *\"where do I start?\"*, or *\"what's next?\"*. The goal is to anchor them on the contract, get them connected to a database, round-trip one row, and let further commands surface organically.\n- **Greenfield** — new project, fresh database. User runs `prisma-next init` themselves. `init` seeds a starter contract with a sample model, so the path joins the first-touch orientation arc as soon as the database is initialised.\n- **Brownfield-DB** — existing database, no contract yet. Infer the contract from the database with `contract infer`, sign the marker with `db sign`, then write queries against one of the existing tables.\n\nThis skill does **not** cover migrating from another ORM (Drizzle, Prisma 6\u002F7, Sequelize, TypeORM, Kysely, Knex, raw drivers). Those are separately-installable skills.\n\n## When to Use\n\n- User asks *\"what can I do with Prisma Next?\"*, *\"what can I do next with Prisma?\"*, *\"where do I start?\"*, *\"what should I do first?\"* — and a PN project already exists on disk. **First-touch orientation** path below.\n- User just ran `createprisma` (or equivalent scaffold tool) and is asking what to do next. **First-touch orientation** path.\n- User is starting a new project and wants to use Prisma Next. **Greenfield** path.\n- User has an existing database (no PN contract) and wants to introduce PN. **Brownfield-DB** path.\n- User typed *\"prisma-next init\"*, *\"get started with PN\"*, *\"set up PN\"*, *\"how do I scaffold a project\"*. **Greenfield** path.\n- User says *\"I have an existing Postgres\u002FMongo, how do I start using PN?\"*. **Brownfield-DB** path.\n\n## When Not to Use\n\n- User already has a PN project and wants to add a model → `prisma-next-contract`.\n- User wants to migrate FROM a specific ORM → install `@prisma-next\u002Fmigrate-from-\u003Corm>-skill` (separate).\n- User wants to wire `db.ts` in a project that already has a contract → `prisma-next-runtime`.\n- User wants to integrate Prisma Next with a build tool (Vite plugin, Next.js, …) → `prisma-next-build`.\n\n## Key Concepts\n\n- **Contract**: the data model. Authored as `contract.prisma` (PSL, the canonical surface) or `contract.ts` (TypeScript builder). The framework reads it and emits two artefacts: `contract.json` (runtime IR) and `contract.d.ts` (types).\n- **Target**: the backing store. Today: `postgres` or `mongodb`. Picked at `init` time; baked into the `@prisma-next\u002F\u003Ctarget>` façade the scaffold imports from.\n- **Authoring mode**: how you write the contract. `psl` (Prisma Schema Language, default) or `typescript` (programmatic builder, optionally paired with the Vite plugin for auto-emit during `vite dev` — see `prisma-next-build`).\n- **Façade packages.** The scaffold installs exactly one façade per target — `@prisma-next\u002Fpostgres` (or `@prisma-next\u002Fmongo`). User code imports from façade subpaths (`@prisma-next\u002Fpostgres\u002Fconfig`, `@prisma-next\u002Fpostgres\u002Fruntime`, `@prisma-next\u002Fpostgres\u002Fcontract-builder`). The façade bakes in the family \u002F target \u002F adapter \u002F driver wiring; never reach past it. See `prisma-next-contract` for the full list.\n- **`db.ts`**: the runtime entry point. Lives next to the contract source at `src\u002Fprisma\u002Fdb.ts`. Imports the contract artefacts and exports a `db` value the rest of the app uses.\n- **Marker**: a `pn_meta_marker` row in your database that records the contract hash. Lets PN detect drift between contract and live DB. Created by `db init` (greenfield \u002F first-touch orientation) or `db sign` (brownfield).\n\n### Canonical on-disk layout\n\nEvery application that consumes Prisma Next uses the same shape:\n\n```text\n\u003Capp-root>\u002F\n├── prisma-next.config.ts             ← project config at repo root\n├── src\u002F\n│   └── prisma\u002F\n│       ├── contract.prisma           ← (or contract.ts) — schema source you author\n│       ├── contract.json             ← emitted by `contract emit` — do not edit\n│       ├── contract.d.ts             ← emitted by `contract emit` — do not edit\n│       └── db.ts                     ← runtime entry; the rest of `src\u002F` imports from here\n└── migrations\u002F\n    ├── snapshots\u002F                    ← content-addressed contract store, shared across spaces\n    │   └── \u003Chex>\u002F\n    │       ├── contract.json\n    │       └── contract.d.ts\n    └── app\u002F                          ← created on first `migration plan` \u002F `db init`\n        ├── refs\u002Fhead.json\n        └── \u003Ctimestamp>_\u003Cslug>\u002F\n            ├── migration.json\n            ├── ops.json\n            └── migration.ts\n```\n\nThree things to internalise:\n\n- **`src\u002Fprisma\u002F` is the home for the contract** — source + emitted artefacts + `db.ts` all colocated. The rest of `src\u002F` imports from `.\u002Fprisma\u002Fdb` (or `..\u002Fprisma\u002Fdb`, depending on file depth).\n- **`migrations\u002Fapp\u002F`** — the `app\u002F` segment is the consuming application's space-id. Extensions you depend on get sibling directories under `migrations\u002F` (one per extension contract-space), but you don't write into those — only the `app\u002F` subtree is your migrations.\n- **`prisma-next.config.ts` lives at the repo root**, not under `src\u002F`. Every command resolves paths relative to the config's directory.\n\n**Contributors building extension packages or aggregate-root monorepo packages use a different layout** — `src\u002Fcontract.{prisma,ts}` (no `prisma\u002F` subdir) + `migrations\u002F\u003Ctimestamp>_\u003Cslug>\u002F` (no `app\u002F` segment). That distinction is intentional; see `prisma-next-contract` for which path applies to you.\n\n> **Heads up — `prisma-next init` currently scaffolds the wrong layout.** It writes `prisma\u002Fcontract.{prisma,ts}` and `prisma\u002Fdb.ts` at the repo root instead of under `src\u002Fprisma\u002F`. Tracked as [TML-2532](https:\u002F\u002Flinear.app\u002Fprisma-company\u002Fissue\u002FTML-2532). Until the fix lands, either pass `--schema-path src\u002Fprisma\u002Fcontract.prisma` to `init`, or move the scaffolded `prisma\u002F` directory into `src\u002Fprisma\u002F` after `init` and update the `contract` path in `prisma-next.config.ts` to match. The canonical layout above is what the demo example uses and what the rest of the framework expects.\n\n## Your first arc — connect, write, read\n\nAll three paths in this skill converge here. Once the project is scaffolded and the database is reachable, the first move is **always** the same: connect, write a row, read it back, against whatever model the contract already declares. Don't touch the contract source on this first move — extend it later, after the round-trip works.\n\nWrite the snippet in a fresh file directly under `src\u002F` (e.g. `src\u002Ffirst-arc.ts`) so the relative import resolves to one level deep:\n\n```typescript\n\u002F\u002F src\u002Ffirst-arc.ts\nimport 'dotenv\u002Fconfig';\nimport { db } from '.\u002Fprisma\u002Fdb';\n\n\u002F\u002F Write a row against the starter model. Adapt the field names to whatever\n\u002F\u002F model your contract source actually declares — read it first.\nawait db.orm.User.create({ email: 'alice@example.com' });\n\n\u002F\u002F Read it back.\nconst users = await db.orm.User.select('id', 'email').all();\nconsole.log(users);\n```\n\nIf that prints `[{ id: 1, email: 'alice@example.com' }]`, the project is wired end-to-end and the user has crossed from *\"I have a project\"* to *\"I'm building.\"*\n\n`db.orm.\u003CModel>` is the default ORM lane — model-shaped, fully typed against the contract, lazily connects to the database on first use (it picks up `DATABASE_URL` from `.env` via the runtime's `dotenv\u002Fconfig`-loaded environment). The deeper `prisma-next-queries` skill covers the rest of the surface (filters, joins, transactions, the SQL builder, raw SQL, TypedSQL) when the user is ready.\n\n> **Mongo target:** the snippet above is SQL-target shape. On `@prisma-next\u002Fmongo`, `db.orm` is keyed by the collection's storage name (`@@map(...)`, or the lowercased model name if no `@@map`), so the same arc reads `await db.orm.users.create(...)` \u002F `await db.orm.users.select('id', 'email').all()` — not `db.orm.User`. Full rule and rewrite recipe in `prisma-next-queries` § *MongoDB ORM addressing*.\n\n**Prerequisites for the arc to work.** All three paths leave these in place by the time you reach the arc:\n\n- `prisma-next.config.ts` exists at the repo root and declares the target + contract source (typically `src\u002Fprisma\u002Fcontract.prisma` or `src\u002Fprisma\u002Fcontract.ts`).\n- The contract source exists at `src\u002Fprisma\u002Fcontract.{prisma,ts}` (a starter model from `init`, or the inferred contract from `contract infer`, or whatever the bootstrap tool generated).\n- `src\u002Fprisma\u002Fdb.ts` exists and instantiates the runtime with the emitted contract.\n- `DATABASE_URL` is set in `.env` (or wherever the runtime's config tells it to look).\n- The database has been initialised (`db init`) or marker-signed (`db sign`), so the marker row exists and the schema matches the contract.\n\nThe three workflows below each describe how their path gets the user to that state. After that, the arc above is the same.\n\n## Workflow — First-touch orientation\n\nTriggers: *\"what can I do with Prisma Next?\"*, *\"what can I do next with Prisma?\"*, *\"where do I start?\"*, *\"I just ran createprisma\"*, *\"what's next?\"*, or any close variant — paired with a PN project already on disk (scaffolded by `createprisma`, by `prisma-next init`, by a teammate, however).\n\nThe user's high-level intent is *\"I want to be running an application against my database, against this thing called Prisma Next.\"* The job of this workflow is to anchor them on the contract, get one round-trip working, and let further commands surface organically as their next move requires them. **It is orientation, not a tour, not a feature inventory, not a syllabus.**\n\n### Concept — what to communicate first\n\nPrisma Next is contract-first. Everything the framework does — query types, migrations, runtime types, drift detection — flows from a single source of truth: the **contract**. The contract describes the user's application's data model. The framework reads it; the framework derives the rest. Lead with this.\n\nThe first response to *\"what can I do with Prisma Next?\"* names the contract path, frames its role in one sentence, and then steers toward getting the user's application running. Don't open with a feature inventory. Don't open with a list of commands. Open with: *\"Your contract is at `\u003Cpath>`. It describes your application — your query types, migrations, and runtime types all flow from it. Let's get you connected to a database so your app can actually run against it.\"*\n\nThe first **arc** — once oriented — is **connect → write → read**. Not edit-the-contract-first, not plan-a-migration-first. The user's win is *I have application code running against my database*.\n\n### Step 1 — Read the project, name the contract\n\nBefore saying anything specific to the user, read:\n\n- `prisma-next.config.ts` at the repo root — what target (`postgres` \u002F `mongodb`) is wired, what `contract:` path it declares, what extensions are installed.\n- The contract source the config declares (canonically `src\u002Fprisma\u002Fcontract.prisma` or `src\u002Fprisma\u002Fcontract.ts`; a project that pre-dates [TML-2532](https:\u002F\u002Flinear.app\u002Fprisma-company\u002Fissue\u002FTML-2532) may have it at `prisma\u002Fcontract.{prisma,ts}` instead — check the `contract` field of the config) — what starter models, if any, exist.\n- `src\u002Fprisma\u002Fdb.ts` (next to the contract) — the runtime entry point.\n- `.env` \u002F `.env.example` — is `DATABASE_URL` set, or only the example?\n- Optionally `pnpm prisma-next db verify` — does the live DB match the contract?\n\nThen **say the contract path back to the user, with its role attached**. Something like: *\"Your contract is at `src\u002Fprisma\u002Fcontract.prisma`, and it currently declares a `User` model. The contract describes your app — every query type, migration, and runtime type the framework gives you flows from this file. Let's get your app connected to a database next.\"* The exact wording is up to the agent; what matters is that the user leaves the first response knowing *where the contract is* and *that it is the source of truth*.\n\n### Step 2 — Get the user's app connected and round-tripping\n\nThe motivation is *\"so your app can actually run against your database\"*, not *\"so the prerequisite checklist passes\"*. The mechanics depend on what's already in place from Step 1:\n\n- **Everything already wired.** Go straight to writing and reading a row (see *Your first arc — connect, write, read* above). Adapt the snippet to whatever model the contract declares.\n- **`DATABASE_URL` not set.** Have the user set it in `.env` (not in `prisma-next.config.ts` — see Pitfall 5). Then `pnpm prisma-next db init` to apply the current contract to that database and write the marker row. Now the app can connect.\n- **Database is connectable but not yet aware of the contract** (marker row missing; `db verify` reports drift). Run `pnpm prisma-next db init`. (`db update` is the alternative for quick dev cycles — it's looser, doesn't write a migration history, and is what users reach for when they want to iterate on the schema fast. Mention it if the user asks how to make schema changes flow to the DB; don't pre-explain it.)\n- **Contract is empty** (bootstrap left the source blank). Add **one** model with **two** fields (e.g. `User { id, email }`), `pnpm prisma-next contract emit`, then `pnpm prisma-next db init`. Minimal — get the round-trip working, *then* extend.\n\nThe user encounters `db init` (and optionally `db update`, `contract emit`) here because they're the commands their current move *requires*. They learn what those commands are by using them.\n\n### Step 3 — Round-trip a row\n\nRun the snippet from *Your first arc — connect, write, read* above against whatever model the contract declares. When it prints the row back, the user has crossed from *\"I have a project\"* to *\"my app runs against my database\"*. That's the win.\n\n### Step 4 — Hand off to the next move\n\nNow ask the user what they want to build. Route to the skill that owns that move:\n\n- More queries (filters, joins, transactions, raw SQL, TypedSQL) → `prisma-next-queries`.\n- Add a model, change a field, add a relation → `prisma-next-contract`. They'll touch `contract emit` and `db update` (or `migration plan` + `migrate`) as part of that workflow.\n- Middleware, environment config, multiple targets → `prisma-next-runtime`.\n- Vite \u002F Next.js \u002F dev-server integration → `prisma-next-build`.\n- They want a fuller toolbelt overview at this point — *Commands you'll use day-to-day* below is the one-glance summary.\n\n### Anti-patterns on this path\n\n- **Leading with a feature tour or capability inventory.** The user asked what they can *do*. Get them doing it.\n- **Listing commands before any have been used.** Commands belong to specific moves; surface them when the move requires them.\n- **Diving into migration concepts before one query has run.** Migrations exist; their value lands later.\n- **Adding several models in one go.** Add one, get one query green, then iterate.\n- **Walking the user through `prisma-next.config.ts` keys.** The scaffold's defaults are correct; revisit when the user needs to change something.\n- **Skipping the contract framing.** Even one line — *\"your contract is at `\u003Cpath>`, it's the source of truth\"* — anchors the user; without it, the rest of the workflow lands as disconnected ceremony.\n\n## Workflow — Greenfield\n\nThe concept: `prisma-next init` is one CLI command that scaffolds config, schema, runtime, dependencies, and the contract emit step. It operates on the current working directory — there is no positional project-name argument. Make the directory, `cd` in, then run init.\n\n```bash\nmkdir my-app && cd my-app\npnpm init                                          # if no package.json yet\npnpm dlx prisma-next init                          # interactive\n# or non-interactive (CI \u002F agent runs):\npnpm dlx prisma-next init --yes --target postgres --authoring psl\n```\n\n> **Telemetry is opt-out.** The CLI collects anonymous usage data by default. Every command — including `init` — prints a one-time notice to **stderr** on first use, then sends; there is no interactive consent prompt. Opt out anytime by running `prisma-next telemetry disable`, with `DO_NOT_TRACK=1` or `PRISMA_NEXT_DISABLE_TELEMETRY=1`, or by setting `\"enableTelemetry\": false` in your user config (`prisma-next` config dir, **not** `prisma-next.config.ts`). Run `prisma-next telemetry status` to see what's currently in effect. This is relevant for agent-driven runs — the CLI records that an agent invoked it. What's collected, the per-user config path, and how to fully reset are documented in `docs\u002FTelemetry.md`.\n\nThe flags `init` accepts (run `prisma-next init --help` for the source of truth):\n\n- `--target \u003Cdb>` — `postgres` or `mongodb`.\n- `--authoring \u003Cstyle>` — `psl` or `typescript`.\n- `--schema-path \u003Cpath>` — defaults to `prisma\u002Fcontract.prisma` (or `prisma\u002Fcontract.ts`). **Pass `--schema-path src\u002Fprisma\u002Fcontract.prisma` (or `...\u002Fcontract.ts`)** to scaffold into the canonical `src\u002Fprisma\u002F` location directly — `init`'s default is wrong today, see [TML-2532](https:\u002F\u002Flinear.app\u002Fprisma-company\u002Fissue\u002FTML-2532).\n- `--force` — overwrite an existing scaffold without prompting (re-running init in a scaffolded directory triggers the reinit flow — `--force` skips the confirmation).\n- `--write-env` — also write `.env` (default writes only `.env.example`; `.env` stays under your control).\n- `--probe-db` — connect to `DATABASE_URL` once and check the server version against the target's minimum.\n- `--strict-probe` — fail init if the probe fails (no-op without `--probe-db`).\n- `--no-install` — skip dependency install + initial contract emit.\n- `--no-skill` — skip Prisma Next skills installation (air-gapped \u002F restricted environments). The skill cluster is always installed at the project level — never globally — so its version stays locked to the project's Prisma Next version.\n\n`init` writes (when it runs cleanly):\n\n- `prisma-next.config.ts` at the project root.\n- The contract source at `--schema-path` — `src\u002Fprisma\u002Fcontract.prisma` if you passed the canonical override, `prisma\u002Fcontract.prisma` if you accepted the (currently-wrong) default.\n- `db.ts` in the same directory as the contract source.\n- `prisma-next.md` — a human quick-reference.\n- `.env.example` (and `.env` if `--write-env`).\n- Updates `package.json` (deps + scripts) and `tsconfig.json` (required compiler options).\n- Installs deps and runs `prisma-next contract emit` once.\n- Registers Prisma Next skills with the local agent runtime.\n\n**If you took `init`'s default and ended up with a top-level `prisma\u002F` directory** (TML-2532), the cleanup is one move + one config edit:\n\n```bash\nmkdir -p src && mv prisma src\u002Fprisma\n# Then update prisma-next.config.ts so `contract` reads\n# 'src\u002Fprisma\u002Fcontract.prisma' (or .ts) instead of 'prisma\u002Fcontract.prisma'.\npnpm prisma-next contract emit   # re-emits contract.json + contract.d.ts under src\u002Fprisma\u002F\n```\n\nDo this before running `db init` — once the marker row is written, restructuring is harder.\n\nAfter init succeeds, the path converges on *Your first arc — connect, write, read* above. `init` has already seeded a starter contract with `User` and `Post` models (with a relation between them) and run `contract emit` once; the only remaining prerequisites are setting `DATABASE_URL` and initialising the database. Two commands:\n\n1. Set `DATABASE_URL` in `.env` (copy from `.env.example`).\n2. Initialise the database: `pnpm prisma-next db init`. Creates tables, indexes, constraints, and writes the marker row — using the starter contract `init` generated.\n\nThen run the snippet from *Your first arc* above against the `User` model. When the user is ready to extend the contract — add more models, change fields, add relations — chain to `prisma-next-contract`. For more queries, chain to `prisma-next-queries`.\n\n**Why this is queries-first, not schema-editing-first.** `init` ships with `User` and `Post` on purpose: the user shouldn't have to design a schema to prove their setup works. Extending the contract is the next move *after* the first arc lands, not part of getting there. If the user asks you to skip straight to *\"add a Comment model\"* — sure, do that — but get one query green against `User` or `Post` first if there's any doubt the project is wired correctly.\n\n## Workflow — Brownfield-DB (existing database, no contract)\n\nThe concept: against an existing database with no PN contract, `contract infer` walks the live schema (tables, columns, indexes, constraints) and writes a PSL contract that describes it. The result is a *starting point*, not the final contract — review and clean it up, then `db sign` to record the current contract hash as the marker (instead of letting `db init` try to recreate the schema from scratch).\n\n```bash\nmkdir my-app && cd my-app\npnpm init\npnpm dlx prisma-next init --yes --target postgres --authoring psl\n# scaffold lands; you'll overwrite the starter schema below\n```\n\nThen, with `DATABASE_URL` set in `.env`:\n\n```bash\npnpm prisma-next contract infer --db \"$DATABASE_URL\" --output src\u002Fprisma\u002Fcontract.prisma\n```\n\n(Note: the flag is `--output`, not `--out`. Run `prisma-next contract infer --help` for the full surface.)\n\nThe agent should pause here and read the inferred PSL. Symptoms a re-author pass is needed:\n\n- Tables PN couldn't categorise (e.g. legacy linking tables you could express as relations).\n- Columns where PN's type guess is wrong (e.g. `String` where you want an extension type like `pgvector.Vector(length: 1536)`).\n- Missing `@unique` \u002F `@index` hints PN couldn't see.\n- Field names you'd prefer to alias.\n\nThen re-emit and sign:\n\n```bash\npnpm prisma-next contract emit\npnpm prisma-next db sign\npnpm prisma-next db verify   # confirms the DB matches the contract; reports drift if not\n```\n\nThen run the snippet from *Your first arc — connect, write, read* above, using one of your existing tables in place of the starter model. The arc is the same; only the path that got you there differs.\n\n## Commands you'll use day-to-day\n\nA reference table — not a script to recite at the user. Commands surface in the workflow above as the user's next move requires them; this table is here for the moment the user asks for a wider view (typically after the first round-trip), and as a one-glance summary anyone newly oriented to Prisma Next can scan. For flag-level detail, run `\u003Ccommand> --help`; the help output is the source of truth.\n\n| What you want to do | Command | Deeper skill |\n|---|---|---|\n| Apply the current contract to the DB the first time | `prisma-next db init` | this skill |\n| Re-emit `contract.json` + `contract.d.ts` after editing the contract source | `prisma-next contract emit` | `prisma-next-contract` |\n| Quick dev-only schema sync (no migration history kept) | `prisma-next db update` | `prisma-next-migrations` |\n| Plan a migration from a contract diff | `prisma-next migration plan --name \u003Cslug>` | `prisma-next-migrations` |\n| Apply pending migrations | `prisma-next migrate` | `prisma-next-migrations` |\n| Inspect the live database | `prisma-next db schema` | `prisma-next-debug` |\n| Confirm the DB matches the contract (drift check) | `prisma-next db verify` | `prisma-next-debug` |\n| Bring an existing DB into a PN contract | `prisma-next contract infer --db \"$DATABASE_URL\"` | this skill (brownfield) |\n| Decode a structured error envelope | (read the `code` \u002F `why` \u002F `fix` fields) | `prisma-next-debug` |\n| Report a bug or request a feature | (file via the feedback skill) | `prisma-next-feedback` |\n\n## Decision — PSL vs TypeScript authoring\n\n- **PSL** (`contract.prisma`) — the default. Concise, declarative, familiar to anyone who has used Prisma. Recommended for most projects.\n- **TypeScript** (`contract.ts`) — a programmatic builder. Use when the contract is genuinely computed (multi-tenant per-tenant variants), when you reuse contract fragments across files, or when an extension requires constructs PSL doesn't yet express (e.g. pgvector's parameterised storage-type registration). Pairs with the Vite plugin from `prisma-next-build` for auto-emit on save.\n\nSwitch authoring later by re-running `prisma-next init` in the same directory. The init flow detects the existing scaffold and prompts to reinit (use `--force` to skip the prompt in non-interactive runs). Existing contract content is *not* automatically translated — you'll re-author by hand in the target language.\n\n## Common Pitfalls\n\n1. **Running `prisma-next init \u003Cproject-name>` with a positional argument.** `init` operates on the current working directory; there is no positional project-name argument. `mkdir foo && cd foo && pnpm dlx prisma-next init`.\n2. **`init` doesn't connect to your database.** It only scaffolds files and installs dependencies (and runs the initial `contract emit`). You connect with `db init` \u002F `db update` \u002F `migrate`. If `init` succeeds and queries fail, the issue is `DATABASE_URL`, not `init`.\n3. **Treating inferred PSL as the final contract.** `contract infer` produces a starting point. Don't `db sign` against a contract you haven't read.\n4. **Forgetting to emit after editing the contract.** The contract artefacts (`contract.json`, `contract.d.ts`) are stale until you run `contract emit`. If the type-checker says a model \"doesn't exist\", you skipped emit.\n5. **Setting `DATABASE_URL` in `prisma-next.config.ts` instead of `.env`.** The config reads `.env` automatically via `dotenv\u002Fconfig`. Hardcoding the URL leaks credentials and bypasses per-environment overrides. See `prisma-next-runtime`.\n6. **Hand-editing `contract.json` or `contract.d.ts`.** They're emitted artefacts; the next `contract emit` overwrites your changes. Edit the source instead.\n7. **Using `--out` for `contract infer`.** The flag is `--output`.\n\n## What Prisma Next doesn't do yet\n\n- **Migration from another ORM.** Prisma Next doesn't migrate your schema *from* Drizzle \u002F Prisma 6\u002F7 \u002F Sequelize \u002F TypeORM \u002F Kysely \u002F Knex \u002F a raw driver. Workaround: install the matching `@prisma-next\u002Fmigrate-from-\u003Corm>-skill` if one exists for your source, or treat the source as a brownfield database and `contract infer` from it. If you need a guided migration flow built-in, file a feature request via the `prisma-next-feedback` skill.\n- **`prisma db push`-style production sync.** `db update` is the quick development path; for production, use migrations (`migration plan` + `migrate`). PN deliberately does not offer a \"push-to-prod-without-a-migration\" surface — see `prisma-next-migrations`.\n- **Studio \u002F GUI database browser.** Use `prisma-next db schema` for a CLI tree-style summary of the live DB. If you need an interactive UI, file a feature request via the `prisma-next-feedback` skill.\n\n## Reference Files\n\nThis skill is intentionally body-only; `prisma-next init --help`, `contract infer --help`, and `db sign --help` are the authoritative surfaces for flag-level detail. When in doubt, run `--help` and read the actual command's description rather than guessing from this skill.\n\n## Checklist\n\n- [ ] Confirmed which path applies (first-touch orientation \u002F greenfield \u002F brownfield) before proposing commands.\n- [ ] **First-touch orientation:** named the contract path back to the user and framed its role (*source of truth from which query types, migrations, and runtime types flow*) before proposing any commands.\n- [ ] **All paths:** brought the project to the *Your first arc* prerequisites (config, contract source, `db.ts`, `DATABASE_URL`, marker row) *before* writing application code.\n- [ ] **All paths:** ran the first arc — one `create` + one `select` against the starter (or inferred) model — and got the round-trip working green.\n- [ ] **All paths:** did *not* edit the contract source as part of the first arc. Schema extension is the *next* move, not the first.\n- [ ] **All paths:** did *not* lead with a feature tour, capability inventory, or recital of CLI commands. Commands surfaced as the user's current move required them.\n- [ ] Confirmed the user's target (`postgres` \u002F `mongodb`) and authoring mode (`psl` \u002F `typescript`).\n- [ ] **First-touch orientation:** read `prisma-next.config.ts`, the contract source, `db.ts`, and `.env` before proposing anything — didn't assume what the scaffold tool \u002F teammate left in place.\n- [ ] **Greenfield path:** ran `prisma-next init` from the project directory — no positional project-name argument.\n- [ ] **All paths:** the project ended up in the canonical `src\u002Fprisma\u002Fcontract.{prisma,ts}` + `src\u002Fprisma\u002Fdb.ts` + `migrations\u002Fapp\u002F` layout — including moving the scaffolded directory out of a top-level `prisma\u002F` if `init` produced one (TML-2532).\n- [ ] **Brownfield path:** ran `contract infer --db \"$DATABASE_URL\" --output src\u002Fprisma\u002Fcontract.prisma`, reviewed the result, then `contract emit` + `db sign`.\n- [ ] Set `DATABASE_URL` in `.env` and confirmed the value is reachable.\n- [ ] Initialised the DB (`db init` greenfield \u002F first-touch orientation) or signed the marker (`db sign` brownfield).\n- [ ] Did NOT hand-edit `contract.json` or `contract.d.ts`.\n- [ ] Did NOT set `DATABASE_URL` in `prisma-next.config.ts`.\n- [ ] Confirmed the user understands what the *next* skill is for their workflow (typically `prisma-next-queries` for more queries, then `prisma-next-contract` when they're ready to extend the schema).\n",{"data":36,"body":37},{"name":4,"description":6},{"type":38,"children":39},"root",[40,49,63,83,187,199,206,333,339,400,406,649,656,661,673,678,787,834,939,945,957,977,1344,1368,1410,1490,1500,1600,1605,1611,1657,1674,1680,1691,1715,1739,1745,1750,1870,1914,1920,1939,2082,2115,2121,2144,2150,2155,2243,2249,2340,2346,2366,2500,2594,2614,2834,2844,2966,2990,3075,3087,3133,3181,3213,3268,3274,3307,3396,3414,3471,3499,3504,3557,3562,3634,3644,3649,3662,3967,3973,4015,4040,4046,4300,4306,4411,4417,4452,4458,4898],{"type":41,"tag":42,"props":43,"children":45},"element","h1",{"id":44},"prisma-next-quickstart-adoption",[46],{"type":47,"value":48},"text","Prisma Next — Quickstart (Adoption)",{"type":41,"tag":50,"props":51,"children":52},"blockquote",{},[53],{"type":41,"tag":54,"props":55,"children":56},"p",{},[57],{"type":41,"tag":58,"props":59,"children":60},"strong",{},[61],{"type":47,"value":62},"Edit your data contract. Prisma handles the rest.",{"type":41,"tag":54,"props":64,"children":65},{},[66,68,73,75,81],{"type":47,"value":67},"This skill takes the user from zero (or near-zero) to a first working query against Prisma Next. Three paths — and they all converge on the same first arc: ",{"type":41,"tag":58,"props":69,"children":70},{},[71],{"type":47,"value":72},"connect → write → read",{"type":47,"value":74},". Schema editing comes ",{"type":41,"tag":76,"props":77,"children":78},"em",{},[79],{"type":47,"value":80},"after",{"type":47,"value":82}," the first arc, not before.",{"type":41,"tag":84,"props":85,"children":86},"ul",{},[87,136,161],{"type":41,"tag":88,"props":89,"children":90},"li",{},[91,96,98,105,107,113,115,120,122,127,129,134],{"type":41,"tag":58,"props":92,"children":93},{},[94],{"type":47,"value":95},"First-touch orientation",{"type":47,"value":97}," — the user has arrived at a Prisma Next project for the first time (a scaffold tool like ",{"type":41,"tag":99,"props":100,"children":102},"code",{"className":101},[],[103],{"type":47,"value":104},"npx createprisma",{"type":47,"value":106}," dropped them in, they cloned a teammate's repo, or they ran ",{"type":41,"tag":99,"props":108,"children":110},{"className":109},[],[111],{"type":47,"value":112},"prisma-next init",{"type":47,"value":114}," themselves and now want to make their first move) and they're asking ",{"type":41,"tag":76,"props":116,"children":117},{},[118],{"type":47,"value":119},"\"what can I do with Prisma Next?\"",{"type":47,"value":121},", ",{"type":41,"tag":76,"props":123,"children":124},{},[125],{"type":47,"value":126},"\"where do I start?\"",{"type":47,"value":128},", or ",{"type":41,"tag":76,"props":130,"children":131},{},[132],{"type":47,"value":133},"\"what's next?\"",{"type":47,"value":135},". The goal is to anchor them on the contract, get them connected to a database, round-trip one row, and let further commands surface organically.",{"type":41,"tag":88,"props":137,"children":138},{},[139,144,146,151,153,159],{"type":41,"tag":58,"props":140,"children":141},{},[142],{"type":47,"value":143},"Greenfield",{"type":47,"value":145}," — new project, fresh database. User runs ",{"type":41,"tag":99,"props":147,"children":149},{"className":148},[],[150],{"type":47,"value":112},{"type":47,"value":152}," themselves. ",{"type":41,"tag":99,"props":154,"children":156},{"className":155},[],[157],{"type":47,"value":158},"init",{"type":47,"value":160}," seeds a starter contract with a sample model, so the path joins the first-touch orientation arc as soon as the database is initialised.",{"type":41,"tag":88,"props":162,"children":163},{},[164,169,171,177,179,185],{"type":41,"tag":58,"props":165,"children":166},{},[167],{"type":47,"value":168},"Brownfield-DB",{"type":47,"value":170}," — existing database, no contract yet. Infer the contract from the database with ",{"type":41,"tag":99,"props":172,"children":174},{"className":173},[],[175],{"type":47,"value":176},"contract infer",{"type":47,"value":178},", sign the marker with ",{"type":41,"tag":99,"props":180,"children":182},{"className":181},[],[183],{"type":47,"value":184},"db sign",{"type":47,"value":186},", then write queries against one of the existing tables.",{"type":41,"tag":54,"props":188,"children":189},{},[190,192,197],{"type":47,"value":191},"This skill does ",{"type":41,"tag":58,"props":193,"children":194},{},[195],{"type":47,"value":196},"not",{"type":47,"value":198}," cover migrating from another ORM (Drizzle, Prisma 6\u002F7, Sequelize, TypeORM, Kysely, Knex, raw drivers). Those are separately-installable skills.",{"type":41,"tag":200,"props":201,"children":203},"h2",{"id":202},"when-to-use",[204],{"type":47,"value":205},"When to Use",{"type":41,"tag":84,"props":207,"children":208},{},[209,243,262,272,282,317],{"type":41,"tag":88,"props":210,"children":211},{},[212,214,218,219,224,225,229,230,235,237,241],{"type":47,"value":213},"User asks ",{"type":41,"tag":76,"props":215,"children":216},{},[217],{"type":47,"value":119},{"type":47,"value":121},{"type":41,"tag":76,"props":220,"children":221},{},[222],{"type":47,"value":223},"\"what can I do next with Prisma?\"",{"type":47,"value":121},{"type":41,"tag":76,"props":226,"children":227},{},[228],{"type":47,"value":126},{"type":47,"value":121},{"type":41,"tag":76,"props":231,"children":232},{},[233],{"type":47,"value":234},"\"what should I do first?\"",{"type":47,"value":236}," — and a PN project already exists on disk. ",{"type":41,"tag":58,"props":238,"children":239},{},[240],{"type":47,"value":95},{"type":47,"value":242}," path below.",{"type":41,"tag":88,"props":244,"children":245},{},[246,248,254,256,260],{"type":47,"value":247},"User just ran ",{"type":41,"tag":99,"props":249,"children":251},{"className":250},[],[252],{"type":47,"value":253},"createprisma",{"type":47,"value":255}," (or equivalent scaffold tool) and is asking what to do next. ",{"type":41,"tag":58,"props":257,"children":258},{},[259],{"type":47,"value":95},{"type":47,"value":261}," path.",{"type":41,"tag":88,"props":263,"children":264},{},[265,267,271],{"type":47,"value":266},"User is starting a new project and wants to use Prisma Next. ",{"type":41,"tag":58,"props":268,"children":269},{},[270],{"type":47,"value":143},{"type":47,"value":261},{"type":41,"tag":88,"props":273,"children":274},{},[275,277,281],{"type":47,"value":276},"User has an existing database (no PN contract) and wants to introduce PN. ",{"type":41,"tag":58,"props":278,"children":279},{},[280],{"type":47,"value":168},{"type":47,"value":261},{"type":41,"tag":88,"props":283,"children":284},{},[285,287,292,293,298,299,304,305,310,312,316],{"type":47,"value":286},"User typed ",{"type":41,"tag":76,"props":288,"children":289},{},[290],{"type":47,"value":291},"\"prisma-next init\"",{"type":47,"value":121},{"type":41,"tag":76,"props":294,"children":295},{},[296],{"type":47,"value":297},"\"get started with PN\"",{"type":47,"value":121},{"type":41,"tag":76,"props":300,"children":301},{},[302],{"type":47,"value":303},"\"set up PN\"",{"type":47,"value":121},{"type":41,"tag":76,"props":306,"children":307},{},[308],{"type":47,"value":309},"\"how do I scaffold a project\"",{"type":47,"value":311},". ",{"type":41,"tag":58,"props":313,"children":314},{},[315],{"type":47,"value":143},{"type":47,"value":261},{"type":41,"tag":88,"props":318,"children":319},{},[320,322,327,328,332],{"type":47,"value":321},"User says ",{"type":41,"tag":76,"props":323,"children":324},{},[325],{"type":47,"value":326},"\"I have an existing Postgres\u002FMongo, how do I start using PN?\"",{"type":47,"value":311},{"type":41,"tag":58,"props":329,"children":330},{},[331],{"type":47,"value":168},{"type":47,"value":261},{"type":41,"tag":200,"props":334,"children":336},{"id":335},"when-not-to-use",[337],{"type":47,"value":338},"When Not to Use",{"type":41,"tag":84,"props":340,"children":341},{},[342,355,368,388],{"type":41,"tag":88,"props":343,"children":344},{},[345,347,353],{"type":47,"value":346},"User already has a PN project and wants to add a model → ",{"type":41,"tag":99,"props":348,"children":350},{"className":349},[],[351],{"type":47,"value":352},"prisma-next-contract",{"type":47,"value":354},".",{"type":41,"tag":88,"props":356,"children":357},{},[358,360,366],{"type":47,"value":359},"User wants to migrate FROM a specific ORM → install ",{"type":41,"tag":99,"props":361,"children":363},{"className":362},[],[364],{"type":47,"value":365},"@prisma-next\u002Fmigrate-from-\u003Corm>-skill",{"type":47,"value":367}," (separate).",{"type":41,"tag":88,"props":369,"children":370},{},[371,373,379,381,387],{"type":47,"value":372},"User wants to wire ",{"type":41,"tag":99,"props":374,"children":376},{"className":375},[],[377],{"type":47,"value":378},"db.ts",{"type":47,"value":380}," in a project that already has a contract → ",{"type":41,"tag":99,"props":382,"children":384},{"className":383},[],[385],{"type":47,"value":386},"prisma-next-runtime",{"type":47,"value":354},{"type":41,"tag":88,"props":389,"children":390},{},[391,393,399],{"type":47,"value":392},"User wants to integrate Prisma Next with a build tool (Vite plugin, Next.js, …) → ",{"type":41,"tag":99,"props":394,"children":396},{"className":395},[],[397],{"type":47,"value":398},"prisma-next-build",{"type":47,"value":354},{"type":41,"tag":200,"props":401,"children":403},{"id":402},"key-concepts",[404],{"type":47,"value":405},"Key Concepts",{"type":41,"tag":84,"props":407,"children":408},{},[409,451,492,532,587,616],{"type":41,"tag":88,"props":410,"children":411},{},[412,417,419,425,427,433,435,441,443,449],{"type":41,"tag":58,"props":413,"children":414},{},[415],{"type":47,"value":416},"Contract",{"type":47,"value":418},": the data model. Authored as ",{"type":41,"tag":99,"props":420,"children":422},{"className":421},[],[423],{"type":47,"value":424},"contract.prisma",{"type":47,"value":426}," (PSL, the canonical surface) or ",{"type":41,"tag":99,"props":428,"children":430},{"className":429},[],[431],{"type":47,"value":432},"contract.ts",{"type":47,"value":434}," (TypeScript builder). The framework reads it and emits two artefacts: ",{"type":41,"tag":99,"props":436,"children":438},{"className":437},[],[439],{"type":47,"value":440},"contract.json",{"type":47,"value":442}," (runtime IR) and ",{"type":41,"tag":99,"props":444,"children":446},{"className":445},[],[447],{"type":47,"value":448},"contract.d.ts",{"type":47,"value":450}," (types).",{"type":41,"tag":88,"props":452,"children":453},{},[454,459,461,467,469,475,477,482,484,490],{"type":41,"tag":58,"props":455,"children":456},{},[457],{"type":47,"value":458},"Target",{"type":47,"value":460},": the backing store. Today: ",{"type":41,"tag":99,"props":462,"children":464},{"className":463},[],[465],{"type":47,"value":466},"postgres",{"type":47,"value":468}," or ",{"type":41,"tag":99,"props":470,"children":472},{"className":471},[],[473],{"type":47,"value":474},"mongodb",{"type":47,"value":476},". Picked at ",{"type":41,"tag":99,"props":478,"children":480},{"className":479},[],[481],{"type":47,"value":158},{"type":47,"value":483}," time; baked into the ",{"type":41,"tag":99,"props":485,"children":487},{"className":486},[],[488],{"type":47,"value":489},"@prisma-next\u002F\u003Ctarget>",{"type":47,"value":491}," façade the scaffold imports from.",{"type":41,"tag":88,"props":493,"children":494},{},[495,500,502,508,510,515,517,523,525,530],{"type":41,"tag":58,"props":496,"children":497},{},[498],{"type":47,"value":499},"Authoring mode",{"type":47,"value":501},": how you write the contract. ",{"type":41,"tag":99,"props":503,"children":505},{"className":504},[],[506],{"type":47,"value":507},"psl",{"type":47,"value":509}," (Prisma Schema Language, default) or ",{"type":41,"tag":99,"props":511,"children":513},{"className":512},[],[514],{"type":47,"value":14},{"type":47,"value":516}," (programmatic builder, optionally paired with the Vite plugin for auto-emit during ",{"type":41,"tag":99,"props":518,"children":520},{"className":519},[],[521],{"type":47,"value":522},"vite dev",{"type":47,"value":524}," — see ",{"type":41,"tag":99,"props":526,"children":528},{"className":527},[],[529],{"type":47,"value":398},{"type":47,"value":531},").",{"type":41,"tag":88,"props":533,"children":534},{},[535,540,542,548,550,556,558,564,565,571,572,578,580,585],{"type":41,"tag":58,"props":536,"children":537},{},[538],{"type":47,"value":539},"Façade packages.",{"type":47,"value":541}," The scaffold installs exactly one façade per target — ",{"type":41,"tag":99,"props":543,"children":545},{"className":544},[],[546],{"type":47,"value":547},"@prisma-next\u002Fpostgres",{"type":47,"value":549}," (or ",{"type":41,"tag":99,"props":551,"children":553},{"className":552},[],[554],{"type":47,"value":555},"@prisma-next\u002Fmongo",{"type":47,"value":557},"). User code imports from façade subpaths (",{"type":41,"tag":99,"props":559,"children":561},{"className":560},[],[562],{"type":47,"value":563},"@prisma-next\u002Fpostgres\u002Fconfig",{"type":47,"value":121},{"type":41,"tag":99,"props":566,"children":568},{"className":567},[],[569],{"type":47,"value":570},"@prisma-next\u002Fpostgres\u002Fruntime",{"type":47,"value":121},{"type":41,"tag":99,"props":573,"children":575},{"className":574},[],[576],{"type":47,"value":577},"@prisma-next\u002Fpostgres\u002Fcontract-builder",{"type":47,"value":579},"). The façade bakes in the family \u002F target \u002F adapter \u002F driver wiring; never reach past it. See ",{"type":41,"tag":99,"props":581,"children":583},{"className":582},[],[584],{"type":47,"value":352},{"type":47,"value":586}," for the full list.",{"type":41,"tag":88,"props":588,"children":589},{},[590,598,600,606,608,614],{"type":41,"tag":58,"props":591,"children":592},{},[593],{"type":41,"tag":99,"props":594,"children":596},{"className":595},[],[597],{"type":47,"value":378},{"type":47,"value":599},": the runtime entry point. Lives next to the contract source at ",{"type":41,"tag":99,"props":601,"children":603},{"className":602},[],[604],{"type":47,"value":605},"src\u002Fprisma\u002Fdb.ts",{"type":47,"value":607},". Imports the contract artefacts and exports a ",{"type":41,"tag":99,"props":609,"children":611},{"className":610},[],[612],{"type":47,"value":613},"db",{"type":47,"value":615}," value the rest of the app uses.",{"type":41,"tag":88,"props":617,"children":618},{},[619,624,626,632,634,640,642,647],{"type":41,"tag":58,"props":620,"children":621},{},[622],{"type":47,"value":623},"Marker",{"type":47,"value":625},": a ",{"type":41,"tag":99,"props":627,"children":629},{"className":628},[],[630],{"type":47,"value":631},"pn_meta_marker",{"type":47,"value":633}," row in your database that records the contract hash. Lets PN detect drift between contract and live DB. Created by ",{"type":41,"tag":99,"props":635,"children":637},{"className":636},[],[638],{"type":47,"value":639},"db init",{"type":47,"value":641}," (greenfield \u002F first-touch orientation) or ",{"type":41,"tag":99,"props":643,"children":645},{"className":644},[],[646],{"type":47,"value":184},{"type":47,"value":648}," (brownfield).",{"type":41,"tag":650,"props":651,"children":653},"h3",{"id":652},"canonical-on-disk-layout",[654],{"type":47,"value":655},"Canonical on-disk layout",{"type":41,"tag":54,"props":657,"children":658},{},[659],{"type":47,"value":660},"Every application that consumes Prisma Next uses the same shape:",{"type":41,"tag":662,"props":663,"children":668},"pre",{"className":664,"code":666,"language":47,"meta":667},[665],"language-text","\u003Capp-root>\u002F\n├── prisma-next.config.ts             ← project config at repo root\n├── src\u002F\n│   └── prisma\u002F\n│       ├── contract.prisma           ← (or contract.ts) — schema source you author\n│       ├── contract.json             ← emitted by `contract emit` — do not edit\n│       ├── contract.d.ts             ← emitted by `contract emit` — do not edit\n│       └── db.ts                     ← runtime entry; the rest of `src\u002F` imports from here\n└── migrations\u002F\n    ├── snapshots\u002F                    ← content-addressed contract store, shared across spaces\n    │   └── \u003Chex>\u002F\n    │       ├── contract.json\n    │       └── contract.d.ts\n    └── app\u002F                          ← created on first `migration plan` \u002F `db init`\n        ├── refs\u002Fhead.json\n        └── \u003Ctimestamp>_\u003Cslug>\u002F\n            ├── migration.json\n            ├── ops.json\n            └── migration.ts\n","",[669],{"type":41,"tag":99,"props":670,"children":671},{"__ignoreMap":667},[672],{"type":47,"value":666},{"type":41,"tag":54,"props":674,"children":675},{},[676],{"type":47,"value":677},"Three things to internalise:",{"type":41,"tag":84,"props":679,"children":680},{},[681,727,764],{"type":41,"tag":88,"props":682,"children":683},{},[684,695,697,702,704,710,712,718,719,725],{"type":41,"tag":58,"props":685,"children":686},{},[687,693],{"type":41,"tag":99,"props":688,"children":690},{"className":689},[],[691],{"type":47,"value":692},"src\u002Fprisma\u002F",{"type":47,"value":694}," is the home for the contract",{"type":47,"value":696}," — source + emitted artefacts + ",{"type":41,"tag":99,"props":698,"children":700},{"className":699},[],[701],{"type":47,"value":378},{"type":47,"value":703}," all colocated. The rest of ",{"type":41,"tag":99,"props":705,"children":707},{"className":706},[],[708],{"type":47,"value":709},"src\u002F",{"type":47,"value":711}," imports from ",{"type":41,"tag":99,"props":713,"children":715},{"className":714},[],[716],{"type":47,"value":717},".\u002Fprisma\u002Fdb",{"type":47,"value":549},{"type":41,"tag":99,"props":720,"children":722},{"className":721},[],[723],{"type":47,"value":724},"..\u002Fprisma\u002Fdb",{"type":47,"value":726},", depending on file depth).",{"type":41,"tag":88,"props":728,"children":729},{},[730,739,741,747,749,755,757,762],{"type":41,"tag":58,"props":731,"children":732},{},[733],{"type":41,"tag":99,"props":734,"children":736},{"className":735},[],[737],{"type":47,"value":738},"migrations\u002Fapp\u002F",{"type":47,"value":740}," — the ",{"type":41,"tag":99,"props":742,"children":744},{"className":743},[],[745],{"type":47,"value":746},"app\u002F",{"type":47,"value":748}," segment is the consuming application's space-id. Extensions you depend on get sibling directories under ",{"type":41,"tag":99,"props":750,"children":752},{"className":751},[],[753],{"type":47,"value":754},"migrations\u002F",{"type":47,"value":756}," (one per extension contract-space), but you don't write into those — only the ",{"type":41,"tag":99,"props":758,"children":760},{"className":759},[],[761],{"type":47,"value":746},{"type":47,"value":763}," subtree is your migrations.",{"type":41,"tag":88,"props":765,"children":766},{},[767,778,780,785],{"type":41,"tag":58,"props":768,"children":769},{},[770,776],{"type":41,"tag":99,"props":771,"children":773},{"className":772},[],[774],{"type":47,"value":775},"prisma-next.config.ts",{"type":47,"value":777}," lives at the repo root",{"type":47,"value":779},", not under ",{"type":41,"tag":99,"props":781,"children":783},{"className":782},[],[784],{"type":47,"value":709},{"type":47,"value":786},". Every command resolves paths relative to the config's directory.",{"type":41,"tag":54,"props":788,"children":789},{},[790,795,797,803,805,811,813,819,820,825,827,832],{"type":41,"tag":58,"props":791,"children":792},{},[793],{"type":47,"value":794},"Contributors building extension packages or aggregate-root monorepo packages use a different layout",{"type":47,"value":796}," — ",{"type":41,"tag":99,"props":798,"children":800},{"className":799},[],[801],{"type":47,"value":802},"src\u002Fcontract.{prisma,ts}",{"type":47,"value":804}," (no ",{"type":41,"tag":99,"props":806,"children":808},{"className":807},[],[809],{"type":47,"value":810},"prisma\u002F",{"type":47,"value":812}," subdir) + ",{"type":41,"tag":99,"props":814,"children":816},{"className":815},[],[817],{"type":47,"value":818},"migrations\u002F\u003Ctimestamp>_\u003Cslug>\u002F",{"type":47,"value":804},{"type":41,"tag":99,"props":821,"children":823},{"className":822},[],[824],{"type":47,"value":746},{"type":47,"value":826}," segment). That distinction is intentional; see ",{"type":41,"tag":99,"props":828,"children":830},{"className":829},[],[831],{"type":47,"value":352},{"type":47,"value":833}," for which path applies to you.",{"type":41,"tag":50,"props":835,"children":836},{},[837],{"type":41,"tag":54,"props":838,"children":839},{},[840,852,854,860,862,868,870,875,877,886,888,894,896,901,903,908,910,915,917,922,924,930,932,937],{"type":41,"tag":58,"props":841,"children":842},{},[843,845,850],{"type":47,"value":844},"Heads up — ",{"type":41,"tag":99,"props":846,"children":848},{"className":847},[],[849],{"type":47,"value":112},{"type":47,"value":851}," currently scaffolds the wrong layout.",{"type":47,"value":853}," It writes ",{"type":41,"tag":99,"props":855,"children":857},{"className":856},[],[858],{"type":47,"value":859},"prisma\u002Fcontract.{prisma,ts}",{"type":47,"value":861}," and ",{"type":41,"tag":99,"props":863,"children":865},{"className":864},[],[866],{"type":47,"value":867},"prisma\u002Fdb.ts",{"type":47,"value":869}," at the repo root instead of under ",{"type":41,"tag":99,"props":871,"children":873},{"className":872},[],[874],{"type":47,"value":692},{"type":47,"value":876},". Tracked as ",{"type":41,"tag":878,"props":879,"children":883},"a",{"href":880,"rel":881},"https:\u002F\u002Flinear.app\u002Fprisma-company\u002Fissue\u002FTML-2532",[882],"nofollow",[884],{"type":47,"value":885},"TML-2532",{"type":47,"value":887},". Until the fix lands, either pass ",{"type":41,"tag":99,"props":889,"children":891},{"className":890},[],[892],{"type":47,"value":893},"--schema-path src\u002Fprisma\u002Fcontract.prisma",{"type":47,"value":895}," to ",{"type":41,"tag":99,"props":897,"children":899},{"className":898},[],[900],{"type":47,"value":158},{"type":47,"value":902},", or move the scaffolded ",{"type":41,"tag":99,"props":904,"children":906},{"className":905},[],[907],{"type":47,"value":810},{"type":47,"value":909}," directory into ",{"type":41,"tag":99,"props":911,"children":913},{"className":912},[],[914],{"type":47,"value":692},{"type":47,"value":916}," after ",{"type":41,"tag":99,"props":918,"children":920},{"className":919},[],[921],{"type":47,"value":158},{"type":47,"value":923}," and update the ",{"type":41,"tag":99,"props":925,"children":927},{"className":926},[],[928],{"type":47,"value":929},"contract",{"type":47,"value":931}," path in ",{"type":41,"tag":99,"props":933,"children":935},{"className":934},[],[936],{"type":47,"value":775},{"type":47,"value":938}," to match. The canonical layout above is what the demo example uses and what the rest of the framework expects.",{"type":41,"tag":200,"props":940,"children":942},{"id":941},"your-first-arc-connect-write-read",[943],{"type":47,"value":944},"Your first arc — connect, write, read",{"type":41,"tag":54,"props":946,"children":947},{},[948,950,955],{"type":47,"value":949},"All three paths in this skill converge here. Once the project is scaffolded and the database is reachable, the first move is ",{"type":41,"tag":58,"props":951,"children":952},{},[953],{"type":47,"value":954},"always",{"type":47,"value":956}," the same: connect, write a row, read it back, against whatever model the contract already declares. Don't touch the contract source on this first move — extend it later, after the round-trip works.",{"type":41,"tag":54,"props":958,"children":959},{},[960,962,967,969,975],{"type":47,"value":961},"Write the snippet in a fresh file directly under ",{"type":41,"tag":99,"props":963,"children":965},{"className":964},[],[966],{"type":47,"value":709},{"type":47,"value":968}," (e.g. ",{"type":41,"tag":99,"props":970,"children":972},{"className":971},[],[973],{"type":47,"value":974},"src\u002Ffirst-arc.ts",{"type":47,"value":976},") so the relative import resolves to one level deep:",{"type":41,"tag":662,"props":978,"children":981},{"className":979,"code":980,"language":14,"meta":667,"style":667},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F src\u002Ffirst-arc.ts\nimport 'dotenv\u002Fconfig';\nimport { db } from '.\u002Fprisma\u002Fdb';\n\n\u002F\u002F Write a row against the starter model. Adapt the field names to whatever\n\u002F\u002F model your contract source actually declares — read it first.\nawait db.orm.User.create({ email: 'alice@example.com' });\n\n\u002F\u002F Read it back.\nconst users = await db.orm.User.select('id', 'email').all();\nconsole.log(users);\n",[982],{"type":41,"tag":99,"props":983,"children":984},{"__ignoreMap":667},[985,997,1029,1074,1084,1093,1102,1189,1197,1206,1317],{"type":41,"tag":986,"props":987,"children":990},"span",{"class":988,"line":989},"line",1,[991],{"type":41,"tag":986,"props":992,"children":994},{"style":993},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[995],{"type":47,"value":996},"\u002F\u002F src\u002Ffirst-arc.ts\n",{"type":41,"tag":986,"props":998,"children":1000},{"class":988,"line":999},2,[1001,1007,1013,1019,1024],{"type":41,"tag":986,"props":1002,"children":1004},{"style":1003},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[1005],{"type":47,"value":1006},"import",{"type":41,"tag":986,"props":1008,"children":1010},{"style":1009},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[1011],{"type":47,"value":1012}," '",{"type":41,"tag":986,"props":1014,"children":1016},{"style":1015},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[1017],{"type":47,"value":1018},"dotenv\u002Fconfig",{"type":41,"tag":986,"props":1020,"children":1021},{"style":1009},[1022],{"type":47,"value":1023},"'",{"type":41,"tag":986,"props":1025,"children":1026},{"style":1009},[1027],{"type":47,"value":1028},";\n",{"type":41,"tag":986,"props":1030,"children":1032},{"class":988,"line":1031},3,[1033,1037,1042,1048,1053,1058,1062,1066,1070],{"type":41,"tag":986,"props":1034,"children":1035},{"style":1003},[1036],{"type":47,"value":1006},{"type":41,"tag":986,"props":1038,"children":1039},{"style":1009},[1040],{"type":47,"value":1041}," {",{"type":41,"tag":986,"props":1043,"children":1045},{"style":1044},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[1046],{"type":47,"value":1047}," db",{"type":41,"tag":986,"props":1049,"children":1050},{"style":1009},[1051],{"type":47,"value":1052}," }",{"type":41,"tag":986,"props":1054,"children":1055},{"style":1003},[1056],{"type":47,"value":1057}," from",{"type":41,"tag":986,"props":1059,"children":1060},{"style":1009},[1061],{"type":47,"value":1012},{"type":41,"tag":986,"props":1063,"children":1064},{"style":1015},[1065],{"type":47,"value":717},{"type":41,"tag":986,"props":1067,"children":1068},{"style":1009},[1069],{"type":47,"value":1023},{"type":41,"tag":986,"props":1071,"children":1072},{"style":1009},[1073],{"type":47,"value":1028},{"type":41,"tag":986,"props":1075,"children":1077},{"class":988,"line":1076},4,[1078],{"type":41,"tag":986,"props":1079,"children":1081},{"emptyLinePlaceholder":1080},true,[1082],{"type":47,"value":1083},"\n",{"type":41,"tag":986,"props":1085,"children":1087},{"class":988,"line":1086},5,[1088],{"type":41,"tag":986,"props":1089,"children":1090},{"style":993},[1091],{"type":47,"value":1092},"\u002F\u002F Write a row against the starter model. Adapt the field names to whatever\n",{"type":41,"tag":986,"props":1094,"children":1096},{"class":988,"line":1095},6,[1097],{"type":41,"tag":986,"props":1098,"children":1099},{"style":993},[1100],{"type":47,"value":1101},"\u002F\u002F model your contract source actually declares — read it first.\n",{"type":41,"tag":986,"props":1103,"children":1105},{"class":988,"line":1104},7,[1106,1111,1115,1119,1123,1127,1132,1136,1142,1147,1152,1158,1163,1167,1172,1176,1180,1185],{"type":41,"tag":986,"props":1107,"children":1108},{"style":1003},[1109],{"type":47,"value":1110},"await",{"type":41,"tag":986,"props":1112,"children":1113},{"style":1044},[1114],{"type":47,"value":1047},{"type":41,"tag":986,"props":1116,"children":1117},{"style":1009},[1118],{"type":47,"value":354},{"type":41,"tag":986,"props":1120,"children":1121},{"style":1044},[1122],{"type":47,"value":21},{"type":41,"tag":986,"props":1124,"children":1125},{"style":1009},[1126],{"type":47,"value":354},{"type":41,"tag":986,"props":1128,"children":1129},{"style":1044},[1130],{"type":47,"value":1131},"User",{"type":41,"tag":986,"props":1133,"children":1134},{"style":1009},[1135],{"type":47,"value":354},{"type":41,"tag":986,"props":1137,"children":1139},{"style":1138},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[1140],{"type":47,"value":1141},"create",{"type":41,"tag":986,"props":1143,"children":1144},{"style":1044},[1145],{"type":47,"value":1146},"(",{"type":41,"tag":986,"props":1148,"children":1149},{"style":1009},[1150],{"type":47,"value":1151},"{",{"type":41,"tag":986,"props":1153,"children":1155},{"style":1154},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[1156],{"type":47,"value":1157}," email",{"type":41,"tag":986,"props":1159,"children":1160},{"style":1009},[1161],{"type":47,"value":1162},":",{"type":41,"tag":986,"props":1164,"children":1165},{"style":1009},[1166],{"type":47,"value":1012},{"type":41,"tag":986,"props":1168,"children":1169},{"style":1015},[1170],{"type":47,"value":1171},"alice@example.com",{"type":41,"tag":986,"props":1173,"children":1174},{"style":1009},[1175],{"type":47,"value":1023},{"type":41,"tag":986,"props":1177,"children":1178},{"style":1009},[1179],{"type":47,"value":1052},{"type":41,"tag":986,"props":1181,"children":1182},{"style":1044},[1183],{"type":47,"value":1184},")",{"type":41,"tag":986,"props":1186,"children":1187},{"style":1009},[1188],{"type":47,"value":1028},{"type":41,"tag":986,"props":1190,"children":1192},{"class":988,"line":1191},8,[1193],{"type":41,"tag":986,"props":1194,"children":1195},{"emptyLinePlaceholder":1080},[1196],{"type":47,"value":1083},{"type":41,"tag":986,"props":1198,"children":1200},{"class":988,"line":1199},9,[1201],{"type":41,"tag":986,"props":1202,"children":1203},{"style":993},[1204],{"type":47,"value":1205},"\u002F\u002F Read it back.\n",{"type":41,"tag":986,"props":1207,"children":1209},{"class":988,"line":1208},10,[1210,1216,1221,1226,1231,1235,1239,1243,1247,1251,1255,1260,1264,1268,1273,1277,1282,1286,1291,1295,1299,1303,1308,1313],{"type":41,"tag":986,"props":1211,"children":1213},{"style":1212},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[1214],{"type":47,"value":1215},"const",{"type":41,"tag":986,"props":1217,"children":1218},{"style":1044},[1219],{"type":47,"value":1220}," users ",{"type":41,"tag":986,"props":1222,"children":1223},{"style":1009},[1224],{"type":47,"value":1225},"=",{"type":41,"tag":986,"props":1227,"children":1228},{"style":1003},[1229],{"type":47,"value":1230}," await",{"type":41,"tag":986,"props":1232,"children":1233},{"style":1044},[1234],{"type":47,"value":1047},{"type":41,"tag":986,"props":1236,"children":1237},{"style":1009},[1238],{"type":47,"value":354},{"type":41,"tag":986,"props":1240,"children":1241},{"style":1044},[1242],{"type":47,"value":21},{"type":41,"tag":986,"props":1244,"children":1245},{"style":1009},[1246],{"type":47,"value":354},{"type":41,"tag":986,"props":1248,"children":1249},{"style":1044},[1250],{"type":47,"value":1131},{"type":41,"tag":986,"props":1252,"children":1253},{"style":1009},[1254],{"type":47,"value":354},{"type":41,"tag":986,"props":1256,"children":1257},{"style":1138},[1258],{"type":47,"value":1259},"select",{"type":41,"tag":986,"props":1261,"children":1262},{"style":1044},[1263],{"type":47,"value":1146},{"type":41,"tag":986,"props":1265,"children":1266},{"style":1009},[1267],{"type":47,"value":1023},{"type":41,"tag":986,"props":1269,"children":1270},{"style":1015},[1271],{"type":47,"value":1272},"id",{"type":41,"tag":986,"props":1274,"children":1275},{"style":1009},[1276],{"type":47,"value":1023},{"type":41,"tag":986,"props":1278,"children":1279},{"style":1009},[1280],{"type":47,"value":1281},",",{"type":41,"tag":986,"props":1283,"children":1284},{"style":1009},[1285],{"type":47,"value":1012},{"type":41,"tag":986,"props":1287,"children":1288},{"style":1015},[1289],{"type":47,"value":1290},"email",{"type":41,"tag":986,"props":1292,"children":1293},{"style":1009},[1294],{"type":47,"value":1023},{"type":41,"tag":986,"props":1296,"children":1297},{"style":1044},[1298],{"type":47,"value":1184},{"type":41,"tag":986,"props":1300,"children":1301},{"style":1009},[1302],{"type":47,"value":354},{"type":41,"tag":986,"props":1304,"children":1305},{"style":1138},[1306],{"type":47,"value":1307},"all",{"type":41,"tag":986,"props":1309,"children":1310},{"style":1044},[1311],{"type":47,"value":1312},"()",{"type":41,"tag":986,"props":1314,"children":1315},{"style":1009},[1316],{"type":47,"value":1028},{"type":41,"tag":986,"props":1318,"children":1320},{"class":988,"line":1319},11,[1321,1326,1330,1335,1340],{"type":41,"tag":986,"props":1322,"children":1323},{"style":1044},[1324],{"type":47,"value":1325},"console",{"type":41,"tag":986,"props":1327,"children":1328},{"style":1009},[1329],{"type":47,"value":354},{"type":41,"tag":986,"props":1331,"children":1332},{"style":1138},[1333],{"type":47,"value":1334},"log",{"type":41,"tag":986,"props":1336,"children":1337},{"style":1044},[1338],{"type":47,"value":1339},"(users)",{"type":41,"tag":986,"props":1341,"children":1342},{"style":1009},[1343],{"type":47,"value":1028},{"type":41,"tag":54,"props":1345,"children":1346},{},[1347,1349,1355,1357,1362,1363],{"type":47,"value":1348},"If that prints ",{"type":41,"tag":99,"props":1350,"children":1352},{"className":1351},[],[1353],{"type":47,"value":1354},"[{ id: 1, email: 'alice@example.com' }]",{"type":47,"value":1356},", the project is wired end-to-end and the user has crossed from ",{"type":41,"tag":76,"props":1358,"children":1359},{},[1360],{"type":47,"value":1361},"\"I have a project\"",{"type":47,"value":895},{"type":41,"tag":76,"props":1364,"children":1365},{},[1366],{"type":47,"value":1367},"\"I'm building.\"",{"type":41,"tag":54,"props":1369,"children":1370},{},[1371,1377,1379,1385,1387,1393,1395,1400,1402,1408],{"type":41,"tag":99,"props":1372,"children":1374},{"className":1373},[],[1375],{"type":47,"value":1376},"db.orm.\u003CModel>",{"type":47,"value":1378}," is the default ORM lane — model-shaped, fully typed against the contract, lazily connects to the database on first use (it picks up ",{"type":41,"tag":99,"props":1380,"children":1382},{"className":1381},[],[1383],{"type":47,"value":1384},"DATABASE_URL",{"type":47,"value":1386}," from ",{"type":41,"tag":99,"props":1388,"children":1390},{"className":1389},[],[1391],{"type":47,"value":1392},".env",{"type":47,"value":1394}," via the runtime's ",{"type":41,"tag":99,"props":1396,"children":1398},{"className":1397},[],[1399],{"type":47,"value":1018},{"type":47,"value":1401},"-loaded environment). The deeper ",{"type":41,"tag":99,"props":1403,"children":1405},{"className":1404},[],[1406],{"type":47,"value":1407},"prisma-next-queries",{"type":47,"value":1409}," skill covers the rest of the surface (filters, joins, transactions, the SQL builder, raw SQL, TypedSQL) when the user is ready.",{"type":41,"tag":50,"props":1411,"children":1412},{},[1413],{"type":41,"tag":54,"props":1414,"children":1415},{},[1416,1421,1423,1428,1429,1435,1437,1443,1445,1451,1453,1459,1461,1467,1469,1475,1477,1482,1484,1489],{"type":41,"tag":58,"props":1417,"children":1418},{},[1419],{"type":47,"value":1420},"Mongo target:",{"type":47,"value":1422}," the snippet above is SQL-target shape. On ",{"type":41,"tag":99,"props":1424,"children":1426},{"className":1425},[],[1427],{"type":47,"value":555},{"type":47,"value":121},{"type":41,"tag":99,"props":1430,"children":1432},{"className":1431},[],[1433],{"type":47,"value":1434},"db.orm",{"type":47,"value":1436}," is keyed by the collection's storage name (",{"type":41,"tag":99,"props":1438,"children":1440},{"className":1439},[],[1441],{"type":47,"value":1442},"@@map(...)",{"type":47,"value":1444},", or the lowercased model name if no ",{"type":41,"tag":99,"props":1446,"children":1448},{"className":1447},[],[1449],{"type":47,"value":1450},"@@map",{"type":47,"value":1452},"), so the same arc reads ",{"type":41,"tag":99,"props":1454,"children":1456},{"className":1455},[],[1457],{"type":47,"value":1458},"await db.orm.users.create(...)",{"type":47,"value":1460}," \u002F ",{"type":41,"tag":99,"props":1462,"children":1464},{"className":1463},[],[1465],{"type":47,"value":1466},"await db.orm.users.select('id', 'email').all()",{"type":47,"value":1468}," — not ",{"type":41,"tag":99,"props":1470,"children":1472},{"className":1471},[],[1473],{"type":47,"value":1474},"db.orm.User",{"type":47,"value":1476},". Full rule and rewrite recipe in ",{"type":41,"tag":99,"props":1478,"children":1480},{"className":1479},[],[1481],{"type":47,"value":1407},{"type":47,"value":1483}," § ",{"type":41,"tag":76,"props":1485,"children":1486},{},[1487],{"type":47,"value":1488},"MongoDB ORM addressing",{"type":47,"value":354},{"type":41,"tag":54,"props":1491,"children":1492},{},[1493,1498],{"type":41,"tag":58,"props":1494,"children":1495},{},[1496],{"type":47,"value":1497},"Prerequisites for the arc to work.",{"type":47,"value":1499}," All three paths leave these in place by the time you reach the arc:",{"type":41,"tag":84,"props":1501,"children":1502},{},[1503,1527,1554,1564,1581],{"type":41,"tag":88,"props":1504,"children":1505},{},[1506,1511,1513,1519,1520,1526],{"type":41,"tag":99,"props":1507,"children":1509},{"className":1508},[],[1510],{"type":47,"value":775},{"type":47,"value":1512}," exists at the repo root and declares the target + contract source (typically ",{"type":41,"tag":99,"props":1514,"children":1516},{"className":1515},[],[1517],{"type":47,"value":1518},"src\u002Fprisma\u002Fcontract.prisma",{"type":47,"value":468},{"type":41,"tag":99,"props":1521,"children":1523},{"className":1522},[],[1524],{"type":47,"value":1525},"src\u002Fprisma\u002Fcontract.ts",{"type":47,"value":531},{"type":41,"tag":88,"props":1528,"children":1529},{},[1530,1532,1538,1540,1545,1547,1552],{"type":47,"value":1531},"The contract source exists at ",{"type":41,"tag":99,"props":1533,"children":1535},{"className":1534},[],[1536],{"type":47,"value":1537},"src\u002Fprisma\u002Fcontract.{prisma,ts}",{"type":47,"value":1539}," (a starter model from ",{"type":41,"tag":99,"props":1541,"children":1543},{"className":1542},[],[1544],{"type":47,"value":158},{"type":47,"value":1546},", or the inferred contract from ",{"type":41,"tag":99,"props":1548,"children":1550},{"className":1549},[],[1551],{"type":47,"value":176},{"type":47,"value":1553},", or whatever the bootstrap tool generated).",{"type":41,"tag":88,"props":1555,"children":1556},{},[1557,1562],{"type":41,"tag":99,"props":1558,"children":1560},{"className":1559},[],[1561],{"type":47,"value":605},{"type":47,"value":1563}," exists and instantiates the runtime with the emitted contract.",{"type":41,"tag":88,"props":1565,"children":1566},{},[1567,1572,1574,1579],{"type":41,"tag":99,"props":1568,"children":1570},{"className":1569},[],[1571],{"type":47,"value":1384},{"type":47,"value":1573}," is set in ",{"type":41,"tag":99,"props":1575,"children":1577},{"className":1576},[],[1578],{"type":47,"value":1392},{"type":47,"value":1580}," (or wherever the runtime's config tells it to look).",{"type":41,"tag":88,"props":1582,"children":1583},{},[1584,1586,1591,1593,1598],{"type":47,"value":1585},"The database has been initialised (",{"type":41,"tag":99,"props":1587,"children":1589},{"className":1588},[],[1590],{"type":47,"value":639},{"type":47,"value":1592},") or marker-signed (",{"type":41,"tag":99,"props":1594,"children":1596},{"className":1595},[],[1597],{"type":47,"value":184},{"type":47,"value":1599},"), so the marker row exists and the schema matches the contract.",{"type":41,"tag":54,"props":1601,"children":1602},{},[1603],{"type":47,"value":1604},"The three workflows below each describe how their path gets the user to that state. After that, the arc above is the same.",{"type":41,"tag":200,"props":1606,"children":1608},{"id":1607},"workflow-first-touch-orientation",[1609],{"type":47,"value":1610},"Workflow — First-touch orientation",{"type":41,"tag":54,"props":1612,"children":1613},{},[1614,1616,1620,1621,1625,1626,1630,1631,1636,1637,1641,1643,1648,1650,1655],{"type":47,"value":1615},"Triggers: ",{"type":41,"tag":76,"props":1617,"children":1618},{},[1619],{"type":47,"value":119},{"type":47,"value":121},{"type":41,"tag":76,"props":1622,"children":1623},{},[1624],{"type":47,"value":223},{"type":47,"value":121},{"type":41,"tag":76,"props":1627,"children":1628},{},[1629],{"type":47,"value":126},{"type":47,"value":121},{"type":41,"tag":76,"props":1632,"children":1633},{},[1634],{"type":47,"value":1635},"\"I just ran createprisma\"",{"type":47,"value":121},{"type":41,"tag":76,"props":1638,"children":1639},{},[1640],{"type":47,"value":133},{"type":47,"value":1642},", or any close variant — paired with a PN project already on disk (scaffolded by ",{"type":41,"tag":99,"props":1644,"children":1646},{"className":1645},[],[1647],{"type":47,"value":253},{"type":47,"value":1649},", by ",{"type":41,"tag":99,"props":1651,"children":1653},{"className":1652},[],[1654],{"type":47,"value":112},{"type":47,"value":1656},", by a teammate, however).",{"type":41,"tag":54,"props":1658,"children":1659},{},[1660,1662,1667,1669],{"type":47,"value":1661},"The user's high-level intent is ",{"type":41,"tag":76,"props":1663,"children":1664},{},[1665],{"type":47,"value":1666},"\"I want to be running an application against my database, against this thing called Prisma Next.\"",{"type":47,"value":1668}," The job of this workflow is to anchor them on the contract, get one round-trip working, and let further commands surface organically as their next move requires them. ",{"type":41,"tag":58,"props":1670,"children":1671},{},[1672],{"type":47,"value":1673},"It is orientation, not a tour, not a feature inventory, not a syllabus.",{"type":41,"tag":650,"props":1675,"children":1677},{"id":1676},"concept-what-to-communicate-first",[1678],{"type":47,"value":1679},"Concept — what to communicate first",{"type":41,"tag":54,"props":1681,"children":1682},{},[1683,1685,1689],{"type":47,"value":1684},"Prisma Next is contract-first. Everything the framework does — query types, migrations, runtime types, drift detection — flows from a single source of truth: the ",{"type":41,"tag":58,"props":1686,"children":1687},{},[1688],{"type":47,"value":929},{"type":47,"value":1690},". The contract describes the user's application's data model. The framework reads it; the framework derives the rest. Lead with this.",{"type":41,"tag":54,"props":1692,"children":1693},{},[1694,1696,1700,1702],{"type":47,"value":1695},"The first response to ",{"type":41,"tag":76,"props":1697,"children":1698},{},[1699],{"type":47,"value":119},{"type":47,"value":1701}," names the contract path, frames its role in one sentence, and then steers toward getting the user's application running. Don't open with a feature inventory. Don't open with a list of commands. Open with: ",{"type":41,"tag":76,"props":1703,"children":1704},{},[1705,1707,1713],{"type":47,"value":1706},"\"Your contract is at ",{"type":41,"tag":99,"props":1708,"children":1710},{"className":1709},[],[1711],{"type":47,"value":1712},"\u003Cpath>",{"type":47,"value":1714},". It describes your application — your query types, migrations, and runtime types all flow from it. Let's get you connected to a database so your app can actually run against it.\"",{"type":41,"tag":54,"props":1716,"children":1717},{},[1718,1720,1725,1727,1731,1733,1738],{"type":47,"value":1719},"The first ",{"type":41,"tag":58,"props":1721,"children":1722},{},[1723],{"type":47,"value":1724},"arc",{"type":47,"value":1726}," — once oriented — is ",{"type":41,"tag":58,"props":1728,"children":1729},{},[1730],{"type":47,"value":72},{"type":47,"value":1732},". Not edit-the-contract-first, not plan-a-migration-first. The user's win is ",{"type":41,"tag":76,"props":1734,"children":1735},{},[1736],{"type":47,"value":1737},"I have application code running against my database",{"type":47,"value":354},{"type":41,"tag":650,"props":1740,"children":1742},{"id":1741},"step-1-read-the-project-name-the-contract",[1743],{"type":47,"value":1744},"Step 1 — Read the project, name the contract",{"type":41,"tag":54,"props":1746,"children":1747},{},[1748],{"type":47,"value":1749},"Before saying anything specific to the user, read:",{"type":41,"tag":84,"props":1751,"children":1752},{},[1753,1784,1823,1833,1857],{"type":41,"tag":88,"props":1754,"children":1755},{},[1756,1761,1763,1768,1769,1774,1776,1782],{"type":41,"tag":99,"props":1757,"children":1759},{"className":1758},[],[1760],{"type":47,"value":775},{"type":47,"value":1762}," at the repo root — what target (",{"type":41,"tag":99,"props":1764,"children":1766},{"className":1765},[],[1767],{"type":47,"value":466},{"type":47,"value":1460},{"type":41,"tag":99,"props":1770,"children":1772},{"className":1771},[],[1773],{"type":47,"value":474},{"type":47,"value":1775},") is wired, what ",{"type":41,"tag":99,"props":1777,"children":1779},{"className":1778},[],[1780],{"type":47,"value":1781},"contract:",{"type":47,"value":1783}," path it declares, what extensions are installed.",{"type":41,"tag":88,"props":1785,"children":1786},{},[1787,1789,1794,1795,1800,1802,1807,1809,1814,1816,1821],{"type":47,"value":1788},"The contract source the config declares (canonically ",{"type":41,"tag":99,"props":1790,"children":1792},{"className":1791},[],[1793],{"type":47,"value":1518},{"type":47,"value":468},{"type":41,"tag":99,"props":1796,"children":1798},{"className":1797},[],[1799],{"type":47,"value":1525},{"type":47,"value":1801},"; a project that pre-dates ",{"type":41,"tag":878,"props":1803,"children":1805},{"href":880,"rel":1804},[882],[1806],{"type":47,"value":885},{"type":47,"value":1808}," may have it at ",{"type":41,"tag":99,"props":1810,"children":1812},{"className":1811},[],[1813],{"type":47,"value":859},{"type":47,"value":1815}," instead — check the ",{"type":41,"tag":99,"props":1817,"children":1819},{"className":1818},[],[1820],{"type":47,"value":929},{"type":47,"value":1822}," field of the config) — what starter models, if any, exist.",{"type":41,"tag":88,"props":1824,"children":1825},{},[1826,1831],{"type":41,"tag":99,"props":1827,"children":1829},{"className":1828},[],[1830],{"type":47,"value":605},{"type":47,"value":1832}," (next to the contract) — the runtime entry point.",{"type":41,"tag":88,"props":1834,"children":1835},{},[1836,1841,1842,1848,1850,1855],{"type":41,"tag":99,"props":1837,"children":1839},{"className":1838},[],[1840],{"type":47,"value":1392},{"type":47,"value":1460},{"type":41,"tag":99,"props":1843,"children":1845},{"className":1844},[],[1846],{"type":47,"value":1847},".env.example",{"type":47,"value":1849}," — is ",{"type":41,"tag":99,"props":1851,"children":1853},{"className":1852},[],[1854],{"type":47,"value":1384},{"type":47,"value":1856}," set, or only the example?",{"type":41,"tag":88,"props":1858,"children":1859},{},[1860,1862,1868],{"type":47,"value":1861},"Optionally ",{"type":41,"tag":99,"props":1863,"children":1865},{"className":1864},[],[1866],{"type":47,"value":1867},"pnpm prisma-next db verify",{"type":47,"value":1869}," — does the live DB match the contract?",{"type":41,"tag":54,"props":1871,"children":1872},{},[1873,1875,1880,1882,1900,1902,1907,1908,1913],{"type":47,"value":1874},"Then ",{"type":41,"tag":58,"props":1876,"children":1877},{},[1878],{"type":47,"value":1879},"say the contract path back to the user, with its role attached",{"type":47,"value":1881},". Something like: ",{"type":41,"tag":76,"props":1883,"children":1884},{},[1885,1886,1891,1893,1898],{"type":47,"value":1706},{"type":41,"tag":99,"props":1887,"children":1889},{"className":1888},[],[1890],{"type":47,"value":1518},{"type":47,"value":1892},", and it currently declares a ",{"type":41,"tag":99,"props":1894,"children":1896},{"className":1895},[],[1897],{"type":47,"value":1131},{"type":47,"value":1899}," model. The contract describes your app — every query type, migration, and runtime type the framework gives you flows from this file. Let's get your app connected to a database next.\"",{"type":47,"value":1901}," The exact wording is up to the agent; what matters is that the user leaves the first response knowing ",{"type":41,"tag":76,"props":1903,"children":1904},{},[1905],{"type":47,"value":1906},"where the contract is",{"type":47,"value":861},{"type":41,"tag":76,"props":1909,"children":1910},{},[1911],{"type":47,"value":1912},"that it is the source of truth",{"type":47,"value":354},{"type":41,"tag":650,"props":1915,"children":1917},{"id":1916},"step-2-get-the-users-app-connected-and-round-tripping",[1918],{"type":47,"value":1919},"Step 2 — Get the user's app connected and round-tripping",{"type":41,"tag":54,"props":1921,"children":1922},{},[1923,1925,1930,1932,1937],{"type":47,"value":1924},"The motivation is ",{"type":41,"tag":76,"props":1926,"children":1927},{},[1928],{"type":47,"value":1929},"\"so your app can actually run against your database\"",{"type":47,"value":1931},", not ",{"type":41,"tag":76,"props":1933,"children":1934},{},[1935],{"type":47,"value":1936},"\"so the prerequisite checklist passes\"",{"type":47,"value":1938},". The mechanics depend on what's already in place from Step 1:",{"type":41,"tag":84,"props":1940,"children":1941},{},[1942,1958,1995,2028],{"type":41,"tag":88,"props":1943,"children":1944},{},[1945,1950,1952,1956],{"type":41,"tag":58,"props":1946,"children":1947},{},[1948],{"type":47,"value":1949},"Everything already wired.",{"type":47,"value":1951}," Go straight to writing and reading a row (see ",{"type":41,"tag":76,"props":1953,"children":1954},{},[1955],{"type":47,"value":944},{"type":47,"value":1957}," above). Adapt the snippet to whatever model the contract declares.",{"type":41,"tag":88,"props":1959,"children":1960},{},[1961,1971,1973,1978,1980,1985,1987,1993],{"type":41,"tag":58,"props":1962,"children":1963},{},[1964,1969],{"type":41,"tag":99,"props":1965,"children":1967},{"className":1966},[],[1968],{"type":47,"value":1384},{"type":47,"value":1970}," not set.",{"type":47,"value":1972}," Have the user set it in ",{"type":41,"tag":99,"props":1974,"children":1976},{"className":1975},[],[1977],{"type":47,"value":1392},{"type":47,"value":1979}," (not in ",{"type":41,"tag":99,"props":1981,"children":1983},{"className":1982},[],[1984],{"type":47,"value":775},{"type":47,"value":1986}," — see Pitfall 5). Then ",{"type":41,"tag":99,"props":1988,"children":1990},{"className":1989},[],[1991],{"type":47,"value":1992},"pnpm prisma-next db init",{"type":47,"value":1994}," to apply the current contract to that database and write the marker row. Now the app can connect.",{"type":41,"tag":88,"props":1996,"children":1997},{},[1998,2003,2005,2011,2013,2018,2020,2026],{"type":41,"tag":58,"props":1999,"children":2000},{},[2001],{"type":47,"value":2002},"Database is connectable but not yet aware of the contract",{"type":47,"value":2004}," (marker row missing; ",{"type":41,"tag":99,"props":2006,"children":2008},{"className":2007},[],[2009],{"type":47,"value":2010},"db verify",{"type":47,"value":2012}," reports drift). Run ",{"type":41,"tag":99,"props":2014,"children":2016},{"className":2015},[],[2017],{"type":47,"value":1992},{"type":47,"value":2019},". (",{"type":41,"tag":99,"props":2021,"children":2023},{"className":2022},[],[2024],{"type":47,"value":2025},"db update",{"type":47,"value":2027}," is the alternative for quick dev cycles — it's looser, doesn't write a migration history, and is what users reach for when they want to iterate on the schema fast. Mention it if the user asks how to make schema changes flow to the DB; don't pre-explain it.)",{"type":41,"tag":88,"props":2029,"children":2030},{},[2031,2036,2038,2043,2045,2050,2052,2058,2060,2066,2068,2073,2075,2080],{"type":41,"tag":58,"props":2032,"children":2033},{},[2034],{"type":47,"value":2035},"Contract is empty",{"type":47,"value":2037}," (bootstrap left the source blank). Add ",{"type":41,"tag":58,"props":2039,"children":2040},{},[2041],{"type":47,"value":2042},"one",{"type":47,"value":2044}," model with ",{"type":41,"tag":58,"props":2046,"children":2047},{},[2048],{"type":47,"value":2049},"two",{"type":47,"value":2051}," fields (e.g. ",{"type":41,"tag":99,"props":2053,"children":2055},{"className":2054},[],[2056],{"type":47,"value":2057},"User { id, email }",{"type":47,"value":2059},"), ",{"type":41,"tag":99,"props":2061,"children":2063},{"className":2062},[],[2064],{"type":47,"value":2065},"pnpm prisma-next contract emit",{"type":47,"value":2067},", then ",{"type":41,"tag":99,"props":2069,"children":2071},{"className":2070},[],[2072],{"type":47,"value":1992},{"type":47,"value":2074},". Minimal — get the round-trip working, ",{"type":41,"tag":76,"props":2076,"children":2077},{},[2078],{"type":47,"value":2079},"then",{"type":47,"value":2081}," extend.",{"type":41,"tag":54,"props":2083,"children":2084},{},[2085,2087,2092,2094,2099,2100,2106,2108,2113],{"type":47,"value":2086},"The user encounters ",{"type":41,"tag":99,"props":2088,"children":2090},{"className":2089},[],[2091],{"type":47,"value":639},{"type":47,"value":2093}," (and optionally ",{"type":41,"tag":99,"props":2095,"children":2097},{"className":2096},[],[2098],{"type":47,"value":2025},{"type":47,"value":121},{"type":41,"tag":99,"props":2101,"children":2103},{"className":2102},[],[2104],{"type":47,"value":2105},"contract emit",{"type":47,"value":2107},") here because they're the commands their current move ",{"type":41,"tag":76,"props":2109,"children":2110},{},[2111],{"type":47,"value":2112},"requires",{"type":47,"value":2114},". They learn what those commands are by using them.",{"type":41,"tag":650,"props":2116,"children":2118},{"id":2117},"step-3-round-trip-a-row",[2119],{"type":47,"value":2120},"Step 3 — Round-trip a row",{"type":41,"tag":54,"props":2122,"children":2123},{},[2124,2126,2130,2132,2136,2137,2142],{"type":47,"value":2125},"Run the snippet from ",{"type":41,"tag":76,"props":2127,"children":2128},{},[2129],{"type":47,"value":944},{"type":47,"value":2131}," above against whatever model the contract declares. When it prints the row back, the user has crossed from ",{"type":41,"tag":76,"props":2133,"children":2134},{},[2135],{"type":47,"value":1361},{"type":47,"value":895},{"type":41,"tag":76,"props":2138,"children":2139},{},[2140],{"type":47,"value":2141},"\"my app runs against my database\"",{"type":47,"value":2143},". That's the win.",{"type":41,"tag":650,"props":2145,"children":2147},{"id":2146},"step-4-hand-off-to-the-next-move",[2148],{"type":47,"value":2149},"Step 4 — Hand off to the next move",{"type":41,"tag":54,"props":2151,"children":2152},{},[2153],{"type":47,"value":2154},"Now ask the user what they want to build. Route to the skill that owns that move:",{"type":41,"tag":84,"props":2156,"children":2157},{},[2158,2169,2209,2220,2231],{"type":41,"tag":88,"props":2159,"children":2160},{},[2161,2163,2168],{"type":47,"value":2162},"More queries (filters, joins, transactions, raw SQL, TypedSQL) → ",{"type":41,"tag":99,"props":2164,"children":2166},{"className":2165},[],[2167],{"type":47,"value":1407},{"type":47,"value":354},{"type":41,"tag":88,"props":2170,"children":2171},{},[2172,2174,2179,2181,2186,2187,2192,2193,2199,2201,2207],{"type":47,"value":2173},"Add a model, change a field, add a relation → ",{"type":41,"tag":99,"props":2175,"children":2177},{"className":2176},[],[2178],{"type":47,"value":352},{"type":47,"value":2180},". They'll touch ",{"type":41,"tag":99,"props":2182,"children":2184},{"className":2183},[],[2185],{"type":47,"value":2105},{"type":47,"value":861},{"type":41,"tag":99,"props":2188,"children":2190},{"className":2189},[],[2191],{"type":47,"value":2025},{"type":47,"value":549},{"type":41,"tag":99,"props":2194,"children":2196},{"className":2195},[],[2197],{"type":47,"value":2198},"migration plan",{"type":47,"value":2200}," + ",{"type":41,"tag":99,"props":2202,"children":2204},{"className":2203},[],[2205],{"type":47,"value":2206},"migrate",{"type":47,"value":2208},") as part of that workflow.",{"type":41,"tag":88,"props":2210,"children":2211},{},[2212,2214,2219],{"type":47,"value":2213},"Middleware, environment config, multiple targets → ",{"type":41,"tag":99,"props":2215,"children":2217},{"className":2216},[],[2218],{"type":47,"value":386},{"type":47,"value":354},{"type":41,"tag":88,"props":2221,"children":2222},{},[2223,2225,2230],{"type":47,"value":2224},"Vite \u002F Next.js \u002F dev-server integration → ",{"type":41,"tag":99,"props":2226,"children":2228},{"className":2227},[],[2229],{"type":47,"value":398},{"type":47,"value":354},{"type":41,"tag":88,"props":2232,"children":2233},{},[2234,2236,2241],{"type":47,"value":2235},"They want a fuller toolbelt overview at this point — ",{"type":41,"tag":76,"props":2237,"children":2238},{},[2239],{"type":47,"value":2240},"Commands you'll use day-to-day",{"type":47,"value":2242}," below is the one-glance summary.",{"type":41,"tag":650,"props":2244,"children":2246},{"id":2245},"anti-patterns-on-this-path",[2247],{"type":47,"value":2248},"Anti-patterns on this path",{"type":41,"tag":84,"props":2250,"children":2251},{},[2252,2269,2279,2289,2299,2316],{"type":41,"tag":88,"props":2253,"children":2254},{},[2255,2260,2262,2267],{"type":41,"tag":58,"props":2256,"children":2257},{},[2258],{"type":47,"value":2259},"Leading with a feature tour or capability inventory.",{"type":47,"value":2261}," The user asked what they can ",{"type":41,"tag":76,"props":2263,"children":2264},{},[2265],{"type":47,"value":2266},"do",{"type":47,"value":2268},". Get them doing it.",{"type":41,"tag":88,"props":2270,"children":2271},{},[2272,2277],{"type":41,"tag":58,"props":2273,"children":2274},{},[2275],{"type":47,"value":2276},"Listing commands before any have been used.",{"type":47,"value":2278}," Commands belong to specific moves; surface them when the move requires them.",{"type":41,"tag":88,"props":2280,"children":2281},{},[2282,2287],{"type":41,"tag":58,"props":2283,"children":2284},{},[2285],{"type":47,"value":2286},"Diving into migration concepts before one query has run.",{"type":47,"value":2288}," Migrations exist; their value lands later.",{"type":41,"tag":88,"props":2290,"children":2291},{},[2292,2297],{"type":41,"tag":58,"props":2293,"children":2294},{},[2295],{"type":47,"value":2296},"Adding several models in one go.",{"type":47,"value":2298}," Add one, get one query green, then iterate.",{"type":41,"tag":88,"props":2300,"children":2301},{},[2302,2314],{"type":41,"tag":58,"props":2303,"children":2304},{},[2305,2307,2312],{"type":47,"value":2306},"Walking the user through ",{"type":41,"tag":99,"props":2308,"children":2310},{"className":2309},[],[2311],{"type":47,"value":775},{"type":47,"value":2313}," keys.",{"type":47,"value":2315}," The scaffold's defaults are correct; revisit when the user needs to change something.",{"type":41,"tag":88,"props":2317,"children":2318},{},[2319,2324,2326,2338],{"type":41,"tag":58,"props":2320,"children":2321},{},[2322],{"type":47,"value":2323},"Skipping the contract framing.",{"type":47,"value":2325}," Even one line — ",{"type":41,"tag":76,"props":2327,"children":2328},{},[2329,2331,2336],{"type":47,"value":2330},"\"your contract is at ",{"type":41,"tag":99,"props":2332,"children":2334},{"className":2333},[],[2335],{"type":47,"value":1712},{"type":47,"value":2337},", it's the source of truth\"",{"type":47,"value":2339}," — anchors the user; without it, the rest of the workflow lands as disconnected ceremony.",{"type":41,"tag":200,"props":2341,"children":2343},{"id":2342},"workflow-greenfield",[2344],{"type":47,"value":2345},"Workflow — Greenfield",{"type":41,"tag":54,"props":2347,"children":2348},{},[2349,2351,2356,2358,2364],{"type":47,"value":2350},"The concept: ",{"type":41,"tag":99,"props":2352,"children":2354},{"className":2353},[],[2355],{"type":47,"value":112},{"type":47,"value":2357}," is one CLI command that scaffolds config, schema, runtime, dependencies, and the contract emit step. It operates on the current working directory — there is no positional project-name argument. Make the directory, ",{"type":41,"tag":99,"props":2359,"children":2361},{"className":2360},[],[2362],{"type":47,"value":2363},"cd",{"type":47,"value":2365}," in, then run init.",{"type":41,"tag":662,"props":2367,"children":2371},{"className":2368,"code":2369,"language":2370,"meta":667,"style":667},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","mkdir my-app && cd my-app\npnpm init                                          # if no package.json yet\npnpm dlx prisma-next init                          # interactive\n# or non-interactive (CI \u002F agent runs):\npnpm dlx prisma-next init --yes --target postgres --authoring psl\n","bash",[2372],{"type":41,"tag":99,"props":2373,"children":2374},{"__ignoreMap":667},[2375,2404,2422,2448,2456],{"type":41,"tag":986,"props":2376,"children":2377},{"class":988,"line":989},[2378,2384,2389,2394,2399],{"type":41,"tag":986,"props":2379,"children":2381},{"style":2380},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[2382],{"type":47,"value":2383},"mkdir",{"type":41,"tag":986,"props":2385,"children":2386},{"style":1015},[2387],{"type":47,"value":2388}," my-app",{"type":41,"tag":986,"props":2390,"children":2391},{"style":1009},[2392],{"type":47,"value":2393}," &&",{"type":41,"tag":986,"props":2395,"children":2396},{"style":1138},[2397],{"type":47,"value":2398}," cd",{"type":41,"tag":986,"props":2400,"children":2401},{"style":1015},[2402],{"type":47,"value":2403}," my-app\n",{"type":41,"tag":986,"props":2405,"children":2406},{"class":988,"line":999},[2407,2412,2417],{"type":41,"tag":986,"props":2408,"children":2409},{"style":2380},[2410],{"type":47,"value":2411},"pnpm",{"type":41,"tag":986,"props":2413,"children":2414},{"style":1015},[2415],{"type":47,"value":2416}," init",{"type":41,"tag":986,"props":2418,"children":2419},{"style":993},[2420],{"type":47,"value":2421},"                                          # if no package.json yet\n",{"type":41,"tag":986,"props":2423,"children":2424},{"class":988,"line":1031},[2425,2429,2434,2439,2443],{"type":41,"tag":986,"props":2426,"children":2427},{"style":2380},[2428],{"type":47,"value":2411},{"type":41,"tag":986,"props":2430,"children":2431},{"style":1015},[2432],{"type":47,"value":2433}," dlx",{"type":41,"tag":986,"props":2435,"children":2436},{"style":1015},[2437],{"type":47,"value":2438}," prisma-next",{"type":41,"tag":986,"props":2440,"children":2441},{"style":1015},[2442],{"type":47,"value":2416},{"type":41,"tag":986,"props":2444,"children":2445},{"style":993},[2446],{"type":47,"value":2447},"                          # interactive\n",{"type":41,"tag":986,"props":2449,"children":2450},{"class":988,"line":1076},[2451],{"type":41,"tag":986,"props":2452,"children":2453},{"style":993},[2454],{"type":47,"value":2455},"# or non-interactive (CI \u002F agent runs):\n",{"type":41,"tag":986,"props":2457,"children":2458},{"class":988,"line":1086},[2459,2463,2467,2471,2475,2480,2485,2490,2495],{"type":41,"tag":986,"props":2460,"children":2461},{"style":2380},[2462],{"type":47,"value":2411},{"type":41,"tag":986,"props":2464,"children":2465},{"style":1015},[2466],{"type":47,"value":2433},{"type":41,"tag":986,"props":2468,"children":2469},{"style":1015},[2470],{"type":47,"value":2438},{"type":41,"tag":986,"props":2472,"children":2473},{"style":1015},[2474],{"type":47,"value":2416},{"type":41,"tag":986,"props":2476,"children":2477},{"style":1015},[2478],{"type":47,"value":2479}," --yes",{"type":41,"tag":986,"props":2481,"children":2482},{"style":1015},[2483],{"type":47,"value":2484}," --target",{"type":41,"tag":986,"props":2486,"children":2487},{"style":1015},[2488],{"type":47,"value":2489}," postgres",{"type":41,"tag":986,"props":2491,"children":2492},{"style":1015},[2493],{"type":47,"value":2494}," --authoring",{"type":41,"tag":986,"props":2496,"children":2497},{"style":1015},[2498],{"type":47,"value":2499}," psl\n",{"type":41,"tag":50,"props":2501,"children":2502},{},[2503],{"type":41,"tag":54,"props":2504,"children":2505},{},[2506,2511,2513,2518,2520,2525,2527,2533,2535,2541,2542,2548,2550,2556,2558,2564,2566,2570,2572,2577,2579,2585,2587,2593],{"type":41,"tag":58,"props":2507,"children":2508},{},[2509],{"type":47,"value":2510},"Telemetry is opt-out.",{"type":47,"value":2512}," The CLI collects anonymous usage data by default. Every command — including ",{"type":41,"tag":99,"props":2514,"children":2516},{"className":2515},[],[2517],{"type":47,"value":158},{"type":47,"value":2519}," — prints a one-time notice to ",{"type":41,"tag":58,"props":2521,"children":2522},{},[2523],{"type":47,"value":2524},"stderr",{"type":47,"value":2526}," on first use, then sends; there is no interactive consent prompt. Opt out anytime by running ",{"type":41,"tag":99,"props":2528,"children":2530},{"className":2529},[],[2531],{"type":47,"value":2532},"prisma-next telemetry disable",{"type":47,"value":2534},", with ",{"type":41,"tag":99,"props":2536,"children":2538},{"className":2537},[],[2539],{"type":47,"value":2540},"DO_NOT_TRACK=1",{"type":47,"value":468},{"type":41,"tag":99,"props":2543,"children":2545},{"className":2544},[],[2546],{"type":47,"value":2547},"PRISMA_NEXT_DISABLE_TELEMETRY=1",{"type":47,"value":2549},", or by setting ",{"type":41,"tag":99,"props":2551,"children":2553},{"className":2552},[],[2554],{"type":47,"value":2555},"\"enableTelemetry\": false",{"type":47,"value":2557}," in your user config (",{"type":41,"tag":99,"props":2559,"children":2561},{"className":2560},[],[2562],{"type":47,"value":2563},"prisma-next",{"type":47,"value":2565}," config dir, ",{"type":41,"tag":58,"props":2567,"children":2568},{},[2569],{"type":47,"value":196},{"type":47,"value":2571}," ",{"type":41,"tag":99,"props":2573,"children":2575},{"className":2574},[],[2576],{"type":47,"value":775},{"type":47,"value":2578},"). Run ",{"type":41,"tag":99,"props":2580,"children":2582},{"className":2581},[],[2583],{"type":47,"value":2584},"prisma-next telemetry status",{"type":47,"value":2586}," to see what's currently in effect. This is relevant for agent-driven runs — the CLI records that an agent invoked it. What's collected, the per-user config path, and how to fully reset are documented in ",{"type":41,"tag":99,"props":2588,"children":2590},{"className":2589},[],[2591],{"type":47,"value":2592},"docs\u002FTelemetry.md",{"type":47,"value":354},{"type":41,"tag":54,"props":2595,"children":2596},{},[2597,2599,2604,2606,2612],{"type":47,"value":2598},"The flags ",{"type":41,"tag":99,"props":2600,"children":2602},{"className":2601},[],[2603],{"type":47,"value":158},{"type":47,"value":2605}," accepts (run ",{"type":41,"tag":99,"props":2607,"children":2609},{"className":2608},[],[2610],{"type":47,"value":2611},"prisma-next init --help",{"type":47,"value":2613}," for the source of truth):",{"type":41,"tag":84,"props":2615,"children":2616},{},[2617,2639,2661,2727,2745,2777,2795,2812,2823],{"type":41,"tag":88,"props":2618,"children":2619},{},[2620,2626,2627,2632,2633,2638],{"type":41,"tag":99,"props":2621,"children":2623},{"className":2622},[],[2624],{"type":47,"value":2625},"--target \u003Cdb>",{"type":47,"value":796},{"type":41,"tag":99,"props":2628,"children":2630},{"className":2629},[],[2631],{"type":47,"value":466},{"type":47,"value":468},{"type":41,"tag":99,"props":2634,"children":2636},{"className":2635},[],[2637],{"type":47,"value":474},{"type":47,"value":354},{"type":41,"tag":88,"props":2640,"children":2641},{},[2642,2648,2649,2654,2655,2660],{"type":41,"tag":99,"props":2643,"children":2645},{"className":2644},[],[2646],{"type":47,"value":2647},"--authoring \u003Cstyle>",{"type":47,"value":796},{"type":41,"tag":99,"props":2650,"children":2652},{"className":2651},[],[2653],{"type":47,"value":507},{"type":47,"value":468},{"type":41,"tag":99,"props":2656,"children":2658},{"className":2657},[],[2659],{"type":47,"value":14},{"type":47,"value":354},{"type":41,"tag":88,"props":2662,"children":2663},{},[2664,2670,2672,2678,2679,2685,2687,2705,2707,2712,2714,2719,2721,2726],{"type":41,"tag":99,"props":2665,"children":2667},{"className":2666},[],[2668],{"type":47,"value":2669},"--schema-path \u003Cpath>",{"type":47,"value":2671}," — defaults to ",{"type":41,"tag":99,"props":2673,"children":2675},{"className":2674},[],[2676],{"type":47,"value":2677},"prisma\u002Fcontract.prisma",{"type":47,"value":549},{"type":41,"tag":99,"props":2680,"children":2682},{"className":2681},[],[2683],{"type":47,"value":2684},"prisma\u002Fcontract.ts",{"type":47,"value":2686},"). ",{"type":41,"tag":58,"props":2688,"children":2689},{},[2690,2692,2697,2698,2704],{"type":47,"value":2691},"Pass ",{"type":41,"tag":99,"props":2693,"children":2695},{"className":2694},[],[2696],{"type":47,"value":893},{"type":47,"value":549},{"type":41,"tag":99,"props":2699,"children":2701},{"className":2700},[],[2702],{"type":47,"value":2703},"...\u002Fcontract.ts",{"type":47,"value":1184},{"type":47,"value":2706}," to scaffold into the canonical ",{"type":41,"tag":99,"props":2708,"children":2710},{"className":2709},[],[2711],{"type":47,"value":692},{"type":47,"value":2713}," location directly — ",{"type":41,"tag":99,"props":2715,"children":2717},{"className":2716},[],[2718],{"type":47,"value":158},{"type":47,"value":2720},"'s default is wrong today, see ",{"type":41,"tag":878,"props":2722,"children":2724},{"href":880,"rel":2723},[882],[2725],{"type":47,"value":885},{"type":47,"value":354},{"type":41,"tag":88,"props":2728,"children":2729},{},[2730,2736,2738,2743],{"type":41,"tag":99,"props":2731,"children":2733},{"className":2732},[],[2734],{"type":47,"value":2735},"--force",{"type":47,"value":2737}," — overwrite an existing scaffold without prompting (re-running init in a scaffolded directory triggers the reinit flow — ",{"type":41,"tag":99,"props":2739,"children":2741},{"className":2740},[],[2742],{"type":47,"value":2735},{"type":47,"value":2744}," skips the confirmation).",{"type":41,"tag":88,"props":2746,"children":2747},{},[2748,2754,2756,2761,2763,2768,2770,2775],{"type":41,"tag":99,"props":2749,"children":2751},{"className":2750},[],[2752],{"type":47,"value":2753},"--write-env",{"type":47,"value":2755}," — also write ",{"type":41,"tag":99,"props":2757,"children":2759},{"className":2758},[],[2760],{"type":47,"value":1392},{"type":47,"value":2762}," (default writes only ",{"type":41,"tag":99,"props":2764,"children":2766},{"className":2765},[],[2767],{"type":47,"value":1847},{"type":47,"value":2769},"; ",{"type":41,"tag":99,"props":2771,"children":2773},{"className":2772},[],[2774],{"type":47,"value":1392},{"type":47,"value":2776}," stays under your control).",{"type":41,"tag":88,"props":2778,"children":2779},{},[2780,2786,2788,2793],{"type":41,"tag":99,"props":2781,"children":2783},{"className":2782},[],[2784],{"type":47,"value":2785},"--probe-db",{"type":47,"value":2787}," — connect to ",{"type":41,"tag":99,"props":2789,"children":2791},{"className":2790},[],[2792],{"type":47,"value":1384},{"type":47,"value":2794}," once and check the server version against the target's minimum.",{"type":41,"tag":88,"props":2796,"children":2797},{},[2798,2804,2806,2811],{"type":41,"tag":99,"props":2799,"children":2801},{"className":2800},[],[2802],{"type":47,"value":2803},"--strict-probe",{"type":47,"value":2805}," — fail init if the probe fails (no-op without ",{"type":41,"tag":99,"props":2807,"children":2809},{"className":2808},[],[2810],{"type":47,"value":2785},{"type":47,"value":531},{"type":41,"tag":88,"props":2813,"children":2814},{},[2815,2821],{"type":41,"tag":99,"props":2816,"children":2818},{"className":2817},[],[2819],{"type":47,"value":2820},"--no-install",{"type":47,"value":2822}," — skip dependency install + initial contract emit.",{"type":41,"tag":88,"props":2824,"children":2825},{},[2826,2832],{"type":41,"tag":99,"props":2827,"children":2829},{"className":2828},[],[2830],{"type":47,"value":2831},"--no-skill",{"type":47,"value":2833}," — skip Prisma Next skills installation (air-gapped \u002F restricted environments). The skill cluster is always installed at the project level — never globally — so its version stays locked to the project's Prisma Next version.",{"type":41,"tag":54,"props":2835,"children":2836},{},[2837,2842],{"type":41,"tag":99,"props":2838,"children":2840},{"className":2839},[],[2841],{"type":47,"value":158},{"type":47,"value":2843}," writes (when it runs cleanly):",{"type":41,"tag":84,"props":2845,"children":2846},{},[2847,2857,2883,2893,2904,2927,2948,2961],{"type":41,"tag":88,"props":2848,"children":2849},{},[2850,2855],{"type":41,"tag":99,"props":2851,"children":2853},{"className":2852},[],[2854],{"type":47,"value":775},{"type":47,"value":2856}," at the project root.",{"type":41,"tag":88,"props":2858,"children":2859},{},[2860,2862,2868,2869,2874,2876,2881],{"type":47,"value":2861},"The contract source at ",{"type":41,"tag":99,"props":2863,"children":2865},{"className":2864},[],[2866],{"type":47,"value":2867},"--schema-path",{"type":47,"value":796},{"type":41,"tag":99,"props":2870,"children":2872},{"className":2871},[],[2873],{"type":47,"value":1518},{"type":47,"value":2875}," if you passed the canonical override, ",{"type":41,"tag":99,"props":2877,"children":2879},{"className":2878},[],[2880],{"type":47,"value":2677},{"type":47,"value":2882}," if you accepted the (currently-wrong) default.",{"type":41,"tag":88,"props":2884,"children":2885},{},[2886,2891],{"type":41,"tag":99,"props":2887,"children":2889},{"className":2888},[],[2890],{"type":47,"value":378},{"type":47,"value":2892}," in the same directory as the contract source.",{"type":41,"tag":88,"props":2894,"children":2895},{},[2896,2902],{"type":41,"tag":99,"props":2897,"children":2899},{"className":2898},[],[2900],{"type":47,"value":2901},"prisma-next.md",{"type":47,"value":2903}," — a human quick-reference.",{"type":41,"tag":88,"props":2905,"children":2906},{},[2907,2912,2914,2919,2921,2926],{"type":41,"tag":99,"props":2908,"children":2910},{"className":2909},[],[2911],{"type":47,"value":1847},{"type":47,"value":2913}," (and ",{"type":41,"tag":99,"props":2915,"children":2917},{"className":2916},[],[2918],{"type":47,"value":1392},{"type":47,"value":2920}," if ",{"type":41,"tag":99,"props":2922,"children":2924},{"className":2923},[],[2925],{"type":47,"value":2753},{"type":47,"value":531},{"type":41,"tag":88,"props":2928,"children":2929},{},[2930,2932,2938,2940,2946],{"type":47,"value":2931},"Updates ",{"type":41,"tag":99,"props":2933,"children":2935},{"className":2934},[],[2936],{"type":47,"value":2937},"package.json",{"type":47,"value":2939}," (deps + scripts) and ",{"type":41,"tag":99,"props":2941,"children":2943},{"className":2942},[],[2944],{"type":47,"value":2945},"tsconfig.json",{"type":47,"value":2947}," (required compiler options).",{"type":41,"tag":88,"props":2949,"children":2950},{},[2951,2953,2959],{"type":47,"value":2952},"Installs deps and runs ",{"type":41,"tag":99,"props":2954,"children":2956},{"className":2955},[],[2957],{"type":47,"value":2958},"prisma-next contract emit",{"type":47,"value":2960}," once.",{"type":41,"tag":88,"props":2962,"children":2963},{},[2964],{"type":47,"value":2965},"Registers Prisma Next skills with the local agent runtime.",{"type":41,"tag":54,"props":2967,"children":2968},{},[2969,2988],{"type":41,"tag":58,"props":2970,"children":2971},{},[2972,2974,2979,2981,2986],{"type":47,"value":2973},"If you took ",{"type":41,"tag":99,"props":2975,"children":2977},{"className":2976},[],[2978],{"type":47,"value":158},{"type":47,"value":2980},"'s default and ended up with a top-level ",{"type":41,"tag":99,"props":2982,"children":2984},{"className":2983},[],[2985],{"type":47,"value":810},{"type":47,"value":2987}," directory",{"type":47,"value":2989}," (TML-2532), the cleanup is one move + one config edit:",{"type":41,"tag":662,"props":2991,"children":2993},{"className":2368,"code":2992,"language":2370,"meta":667,"style":667},"mkdir -p src && mv prisma src\u002Fprisma\n# Then update prisma-next.config.ts so `contract` reads\n# 'src\u002Fprisma\u002Fcontract.prisma' (or .ts) instead of 'prisma\u002Fcontract.prisma'.\npnpm prisma-next contract emit   # re-emits contract.json + contract.d.ts under src\u002Fprisma\u002F\n",[2994],{"type":41,"tag":99,"props":2995,"children":2996},{"__ignoreMap":667},[2997,3033,3041,3049],{"type":41,"tag":986,"props":2998,"children":2999},{"class":988,"line":989},[3000,3004,3009,3014,3018,3023,3028],{"type":41,"tag":986,"props":3001,"children":3002},{"style":2380},[3003],{"type":47,"value":2383},{"type":41,"tag":986,"props":3005,"children":3006},{"style":1015},[3007],{"type":47,"value":3008}," -p",{"type":41,"tag":986,"props":3010,"children":3011},{"style":1015},[3012],{"type":47,"value":3013}," src",{"type":41,"tag":986,"props":3015,"children":3016},{"style":1009},[3017],{"type":47,"value":2393},{"type":41,"tag":986,"props":3019,"children":3020},{"style":2380},[3021],{"type":47,"value":3022}," mv",{"type":41,"tag":986,"props":3024,"children":3025},{"style":1015},[3026],{"type":47,"value":3027}," prisma",{"type":41,"tag":986,"props":3029,"children":3030},{"style":1015},[3031],{"type":47,"value":3032}," src\u002Fprisma\n",{"type":41,"tag":986,"props":3034,"children":3035},{"class":988,"line":999},[3036],{"type":41,"tag":986,"props":3037,"children":3038},{"style":993},[3039],{"type":47,"value":3040},"# Then update prisma-next.config.ts so `contract` reads\n",{"type":41,"tag":986,"props":3042,"children":3043},{"class":988,"line":1031},[3044],{"type":41,"tag":986,"props":3045,"children":3046},{"style":993},[3047],{"type":47,"value":3048},"# 'src\u002Fprisma\u002Fcontract.prisma' (or .ts) instead of 'prisma\u002Fcontract.prisma'.\n",{"type":41,"tag":986,"props":3050,"children":3051},{"class":988,"line":1076},[3052,3056,3060,3065,3070],{"type":41,"tag":986,"props":3053,"children":3054},{"style":2380},[3055],{"type":47,"value":2411},{"type":41,"tag":986,"props":3057,"children":3058},{"style":1015},[3059],{"type":47,"value":2438},{"type":41,"tag":986,"props":3061,"children":3062},{"style":1015},[3063],{"type":47,"value":3064}," contract",{"type":41,"tag":986,"props":3066,"children":3067},{"style":1015},[3068],{"type":47,"value":3069}," emit",{"type":41,"tag":986,"props":3071,"children":3072},{"style":993},[3073],{"type":47,"value":3074},"   # re-emits contract.json + contract.d.ts under src\u002Fprisma\u002F\n",{"type":41,"tag":54,"props":3076,"children":3077},{},[3078,3080,3085],{"type":47,"value":3079},"Do this before running ",{"type":41,"tag":99,"props":3081,"children":3083},{"className":3082},[],[3084],{"type":47,"value":639},{"type":47,"value":3086}," — once the marker row is written, restructuring is harder.",{"type":41,"tag":54,"props":3088,"children":3089},{},[3090,3092,3096,3098,3103,3105,3110,3111,3117,3119,3124,3126,3131],{"type":47,"value":3091},"After init succeeds, the path converges on ",{"type":41,"tag":76,"props":3093,"children":3094},{},[3095],{"type":47,"value":944},{"type":47,"value":3097}," above. ",{"type":41,"tag":99,"props":3099,"children":3101},{"className":3100},[],[3102],{"type":47,"value":158},{"type":47,"value":3104}," has already seeded a starter contract with ",{"type":41,"tag":99,"props":3106,"children":3108},{"className":3107},[],[3109],{"type":47,"value":1131},{"type":47,"value":861},{"type":41,"tag":99,"props":3112,"children":3114},{"className":3113},[],[3115],{"type":47,"value":3116},"Post",{"type":47,"value":3118}," models (with a relation between them) and run ",{"type":41,"tag":99,"props":3120,"children":3122},{"className":3121},[],[3123],{"type":47,"value":2105},{"type":47,"value":3125}," once; the only remaining prerequisites are setting ",{"type":41,"tag":99,"props":3127,"children":3129},{"className":3128},[],[3130],{"type":47,"value":1384},{"type":47,"value":3132}," and initialising the database. Two commands:",{"type":41,"tag":3134,"props":3135,"children":3136},"ol",{},[3137,3162],{"type":41,"tag":88,"props":3138,"children":3139},{},[3140,3142,3147,3149,3154,3156,3161],{"type":47,"value":3141},"Set ",{"type":41,"tag":99,"props":3143,"children":3145},{"className":3144},[],[3146],{"type":47,"value":1384},{"type":47,"value":3148}," in ",{"type":41,"tag":99,"props":3150,"children":3152},{"className":3151},[],[3153],{"type":47,"value":1392},{"type":47,"value":3155}," (copy from ",{"type":41,"tag":99,"props":3157,"children":3159},{"className":3158},[],[3160],{"type":47,"value":1847},{"type":47,"value":531},{"type":41,"tag":88,"props":3163,"children":3164},{},[3165,3167,3172,3174,3179],{"type":47,"value":3166},"Initialise the database: ",{"type":41,"tag":99,"props":3168,"children":3170},{"className":3169},[],[3171],{"type":47,"value":1992},{"type":47,"value":3173},". Creates tables, indexes, constraints, and writes the marker row — using the starter contract ",{"type":41,"tag":99,"props":3175,"children":3177},{"className":3176},[],[3178],{"type":47,"value":158},{"type":47,"value":3180}," generated.",{"type":41,"tag":54,"props":3182,"children":3183},{},[3184,3186,3191,3193,3198,3200,3205,3207,3212],{"type":47,"value":3185},"Then run the snippet from ",{"type":41,"tag":76,"props":3187,"children":3188},{},[3189],{"type":47,"value":3190},"Your first arc",{"type":47,"value":3192}," above against the ",{"type":41,"tag":99,"props":3194,"children":3196},{"className":3195},[],[3197],{"type":47,"value":1131},{"type":47,"value":3199}," model. When the user is ready to extend the contract — add more models, change fields, add relations — chain to ",{"type":41,"tag":99,"props":3201,"children":3203},{"className":3202},[],[3204],{"type":47,"value":352},{"type":47,"value":3206},". For more queries, chain to ",{"type":41,"tag":99,"props":3208,"children":3210},{"className":3209},[],[3211],{"type":47,"value":1407},{"type":47,"value":354},{"type":41,"tag":54,"props":3214,"children":3215},{},[3216,3221,3222,3227,3229,3234,3235,3240,3242,3246,3248,3253,3255,3260,3261,3266],{"type":41,"tag":58,"props":3217,"children":3218},{},[3219],{"type":47,"value":3220},"Why this is queries-first, not schema-editing-first.",{"type":47,"value":2571},{"type":41,"tag":99,"props":3223,"children":3225},{"className":3224},[],[3226],{"type":47,"value":158},{"type":47,"value":3228}," ships with ",{"type":41,"tag":99,"props":3230,"children":3232},{"className":3231},[],[3233],{"type":47,"value":1131},{"type":47,"value":861},{"type":41,"tag":99,"props":3236,"children":3238},{"className":3237},[],[3239],{"type":47,"value":3116},{"type":47,"value":3241}," on purpose: the user shouldn't have to design a schema to prove their setup works. Extending the contract is the next move ",{"type":41,"tag":76,"props":3243,"children":3244},{},[3245],{"type":47,"value":80},{"type":47,"value":3247}," the first arc lands, not part of getting there. If the user asks you to skip straight to ",{"type":41,"tag":76,"props":3249,"children":3250},{},[3251],{"type":47,"value":3252},"\"add a Comment model\"",{"type":47,"value":3254}," — sure, do that — but get one query green against ",{"type":41,"tag":99,"props":3256,"children":3258},{"className":3257},[],[3259],{"type":47,"value":1131},{"type":47,"value":468},{"type":41,"tag":99,"props":3262,"children":3264},{"className":3263},[],[3265],{"type":47,"value":3116},{"type":47,"value":3267}," first if there's any doubt the project is wired correctly.",{"type":41,"tag":200,"props":3269,"children":3271},{"id":3270},"workflow-brownfield-db-existing-database-no-contract",[3272],{"type":47,"value":3273},"Workflow — Brownfield-DB (existing database, no contract)",{"type":41,"tag":54,"props":3275,"children":3276},{},[3277,3279,3284,3286,3291,3293,3298,3300,3305],{"type":47,"value":3278},"The concept: against an existing database with no PN contract, ",{"type":41,"tag":99,"props":3280,"children":3282},{"className":3281},[],[3283],{"type":47,"value":176},{"type":47,"value":3285}," walks the live schema (tables, columns, indexes, constraints) and writes a PSL contract that describes it. The result is a ",{"type":41,"tag":76,"props":3287,"children":3288},{},[3289],{"type":47,"value":3290},"starting point",{"type":47,"value":3292},", not the final contract — review and clean it up, then ",{"type":41,"tag":99,"props":3294,"children":3296},{"className":3295},[],[3297],{"type":47,"value":184},{"type":47,"value":3299}," to record the current contract hash as the marker (instead of letting ",{"type":41,"tag":99,"props":3301,"children":3303},{"className":3302},[],[3304],{"type":47,"value":639},{"type":47,"value":3306}," try to recreate the schema from scratch).",{"type":41,"tag":662,"props":3308,"children":3310},{"className":2368,"code":3309,"language":2370,"meta":667,"style":667},"mkdir my-app && cd my-app\npnpm init\npnpm dlx prisma-next init --yes --target postgres --authoring psl\n# scaffold lands; you'll overwrite the starter schema below\n",[3311],{"type":41,"tag":99,"props":3312,"children":3313},{"__ignoreMap":667},[3314,3337,3349,3388],{"type":41,"tag":986,"props":3315,"children":3316},{"class":988,"line":989},[3317,3321,3325,3329,3333],{"type":41,"tag":986,"props":3318,"children":3319},{"style":2380},[3320],{"type":47,"value":2383},{"type":41,"tag":986,"props":3322,"children":3323},{"style":1015},[3324],{"type":47,"value":2388},{"type":41,"tag":986,"props":3326,"children":3327},{"style":1009},[3328],{"type":47,"value":2393},{"type":41,"tag":986,"props":3330,"children":3331},{"style":1138},[3332],{"type":47,"value":2398},{"type":41,"tag":986,"props":3334,"children":3335},{"style":1015},[3336],{"type":47,"value":2403},{"type":41,"tag":986,"props":3338,"children":3339},{"class":988,"line":999},[3340,3344],{"type":41,"tag":986,"props":3341,"children":3342},{"style":2380},[3343],{"type":47,"value":2411},{"type":41,"tag":986,"props":3345,"children":3346},{"style":1015},[3347],{"type":47,"value":3348}," init\n",{"type":41,"tag":986,"props":3350,"children":3351},{"class":988,"line":1031},[3352,3356,3360,3364,3368,3372,3376,3380,3384],{"type":41,"tag":986,"props":3353,"children":3354},{"style":2380},[3355],{"type":47,"value":2411},{"type":41,"tag":986,"props":3357,"children":3358},{"style":1015},[3359],{"type":47,"value":2433},{"type":41,"tag":986,"props":3361,"children":3362},{"style":1015},[3363],{"type":47,"value":2438},{"type":41,"tag":986,"props":3365,"children":3366},{"style":1015},[3367],{"type":47,"value":2416},{"type":41,"tag":986,"props":3369,"children":3370},{"style":1015},[3371],{"type":47,"value":2479},{"type":41,"tag":986,"props":3373,"children":3374},{"style":1015},[3375],{"type":47,"value":2484},{"type":41,"tag":986,"props":3377,"children":3378},{"style":1015},[3379],{"type":47,"value":2489},{"type":41,"tag":986,"props":3381,"children":3382},{"style":1015},[3383],{"type":47,"value":2494},{"type":41,"tag":986,"props":3385,"children":3386},{"style":1015},[3387],{"type":47,"value":2499},{"type":41,"tag":986,"props":3389,"children":3390},{"class":988,"line":1076},[3391],{"type":41,"tag":986,"props":3392,"children":3393},{"style":993},[3394],{"type":47,"value":3395},"# scaffold lands; you'll overwrite the starter schema below\n",{"type":41,"tag":54,"props":3397,"children":3398},{},[3399,3401,3406,3408,3413],{"type":47,"value":3400},"Then, with ",{"type":41,"tag":99,"props":3402,"children":3404},{"className":3403},[],[3405],{"type":47,"value":1384},{"type":47,"value":3407}," set in ",{"type":41,"tag":99,"props":3409,"children":3411},{"className":3410},[],[3412],{"type":47,"value":1392},{"type":47,"value":1162},{"type":41,"tag":662,"props":3415,"children":3417},{"className":2368,"code":3416,"language":2370,"meta":667,"style":667},"pnpm prisma-next contract infer --db \"$DATABASE_URL\" --output src\u002Fprisma\u002Fcontract.prisma\n",[3418],{"type":41,"tag":99,"props":3419,"children":3420},{"__ignoreMap":667},[3421],{"type":41,"tag":986,"props":3422,"children":3423},{"class":988,"line":989},[3424,3428,3432,3436,3441,3446,3451,3456,3461,3466],{"type":41,"tag":986,"props":3425,"children":3426},{"style":2380},[3427],{"type":47,"value":2411},{"type":41,"tag":986,"props":3429,"children":3430},{"style":1015},[3431],{"type":47,"value":2438},{"type":41,"tag":986,"props":3433,"children":3434},{"style":1015},[3435],{"type":47,"value":3064},{"type":41,"tag":986,"props":3437,"children":3438},{"style":1015},[3439],{"type":47,"value":3440}," infer",{"type":41,"tag":986,"props":3442,"children":3443},{"style":1015},[3444],{"type":47,"value":3445}," --db",{"type":41,"tag":986,"props":3447,"children":3448},{"style":1009},[3449],{"type":47,"value":3450}," \"",{"type":41,"tag":986,"props":3452,"children":3453},{"style":1044},[3454],{"type":47,"value":3455},"$DATABASE_URL",{"type":41,"tag":986,"props":3457,"children":3458},{"style":1009},[3459],{"type":47,"value":3460},"\"",{"type":41,"tag":986,"props":3462,"children":3463},{"style":1015},[3464],{"type":47,"value":3465}," --output",{"type":41,"tag":986,"props":3467,"children":3468},{"style":1015},[3469],{"type":47,"value":3470}," src\u002Fprisma\u002Fcontract.prisma\n",{"type":41,"tag":54,"props":3472,"children":3473},{},[3474,3476,3482,3483,3489,3491,3497],{"type":47,"value":3475},"(Note: the flag is ",{"type":41,"tag":99,"props":3477,"children":3479},{"className":3478},[],[3480],{"type":47,"value":3481},"--output",{"type":47,"value":1931},{"type":41,"tag":99,"props":3484,"children":3486},{"className":3485},[],[3487],{"type":47,"value":3488},"--out",{"type":47,"value":3490},". Run ",{"type":41,"tag":99,"props":3492,"children":3494},{"className":3493},[],[3495],{"type":47,"value":3496},"prisma-next contract infer --help",{"type":47,"value":3498}," for the full surface.)",{"type":41,"tag":54,"props":3500,"children":3501},{},[3502],{"type":47,"value":3503},"The agent should pause here and read the inferred PSL. Symptoms a re-author pass is needed:",{"type":41,"tag":84,"props":3505,"children":3506},{},[3507,3512,3532,3552],{"type":41,"tag":88,"props":3508,"children":3509},{},[3510],{"type":47,"value":3511},"Tables PN couldn't categorise (e.g. legacy linking tables you could express as relations).",{"type":41,"tag":88,"props":3513,"children":3514},{},[3515,3517,3523,3525,3531],{"type":47,"value":3516},"Columns where PN's type guess is wrong (e.g. ",{"type":41,"tag":99,"props":3518,"children":3520},{"className":3519},[],[3521],{"type":47,"value":3522},"String",{"type":47,"value":3524}," where you want an extension type like ",{"type":41,"tag":99,"props":3526,"children":3528},{"className":3527},[],[3529],{"type":47,"value":3530},"pgvector.Vector(length: 1536)",{"type":47,"value":531},{"type":41,"tag":88,"props":3533,"children":3534},{},[3535,3537,3543,3544,3550],{"type":47,"value":3536},"Missing ",{"type":41,"tag":99,"props":3538,"children":3540},{"className":3539},[],[3541],{"type":47,"value":3542},"@unique",{"type":47,"value":1460},{"type":41,"tag":99,"props":3545,"children":3547},{"className":3546},[],[3548],{"type":47,"value":3549},"@index",{"type":47,"value":3551}," hints PN couldn't see.",{"type":41,"tag":88,"props":3553,"children":3554},{},[3555],{"type":47,"value":3556},"Field names you'd prefer to alias.",{"type":41,"tag":54,"props":3558,"children":3559},{},[3560],{"type":47,"value":3561},"Then re-emit and sign:",{"type":41,"tag":662,"props":3563,"children":3565},{"className":2368,"code":3564,"language":2370,"meta":667,"style":667},"pnpm prisma-next contract emit\npnpm prisma-next db sign\npnpm prisma-next db verify   # confirms the DB matches the contract; reports drift if not\n",[3566],{"type":41,"tag":99,"props":3567,"children":3568},{"__ignoreMap":667},[3569,3589,3609],{"type":41,"tag":986,"props":3570,"children":3571},{"class":988,"line":989},[3572,3576,3580,3584],{"type":41,"tag":986,"props":3573,"children":3574},{"style":2380},[3575],{"type":47,"value":2411},{"type":41,"tag":986,"props":3577,"children":3578},{"style":1015},[3579],{"type":47,"value":2438},{"type":41,"tag":986,"props":3581,"children":3582},{"style":1015},[3583],{"type":47,"value":3064},{"type":41,"tag":986,"props":3585,"children":3586},{"style":1015},[3587],{"type":47,"value":3588}," emit\n",{"type":41,"tag":986,"props":3590,"children":3591},{"class":988,"line":999},[3592,3596,3600,3604],{"type":41,"tag":986,"props":3593,"children":3594},{"style":2380},[3595],{"type":47,"value":2411},{"type":41,"tag":986,"props":3597,"children":3598},{"style":1015},[3599],{"type":47,"value":2438},{"type":41,"tag":986,"props":3601,"children":3602},{"style":1015},[3603],{"type":47,"value":1047},{"type":41,"tag":986,"props":3605,"children":3606},{"style":1015},[3607],{"type":47,"value":3608}," sign\n",{"type":41,"tag":986,"props":3610,"children":3611},{"class":988,"line":1031},[3612,3616,3620,3624,3629],{"type":41,"tag":986,"props":3613,"children":3614},{"style":2380},[3615],{"type":47,"value":2411},{"type":41,"tag":986,"props":3617,"children":3618},{"style":1015},[3619],{"type":47,"value":2438},{"type":41,"tag":986,"props":3621,"children":3622},{"style":1015},[3623],{"type":47,"value":1047},{"type":41,"tag":986,"props":3625,"children":3626},{"style":1015},[3627],{"type":47,"value":3628}," verify",{"type":41,"tag":986,"props":3630,"children":3631},{"style":993},[3632],{"type":47,"value":3633},"   # confirms the DB matches the contract; reports drift if not\n",{"type":41,"tag":54,"props":3635,"children":3636},{},[3637,3638,3642],{"type":47,"value":3185},{"type":41,"tag":76,"props":3639,"children":3640},{},[3641],{"type":47,"value":944},{"type":47,"value":3643}," above, using one of your existing tables in place of the starter model. The arc is the same; only the path that got you there differs.",{"type":41,"tag":200,"props":3645,"children":3647},{"id":3646},"commands-youll-use-day-to-day",[3648],{"type":47,"value":2240},{"type":41,"tag":54,"props":3650,"children":3651},{},[3652,3654,3660],{"type":47,"value":3653},"A reference table — not a script to recite at the user. Commands surface in the workflow above as the user's next move requires them; this table is here for the moment the user asks for a wider view (typically after the first round-trip), and as a one-glance summary anyone newly oriented to Prisma Next can scan. For flag-level detail, run ",{"type":41,"tag":99,"props":3655,"children":3657},{"className":3656},[],[3658],{"type":47,"value":3659},"\u003Ccommand> --help",{"type":47,"value":3661},"; the help output is the source of truth.",{"type":41,"tag":3663,"props":3664,"children":3665},"table",{},[3666,3690],{"type":41,"tag":3667,"props":3668,"children":3669},"thead",{},[3670],{"type":41,"tag":3671,"props":3672,"children":3673},"tr",{},[3674,3680,3685],{"type":41,"tag":3675,"props":3676,"children":3677},"th",{},[3678],{"type":47,"value":3679},"What you want to do",{"type":41,"tag":3675,"props":3681,"children":3682},{},[3683],{"type":47,"value":3684},"Command",{"type":41,"tag":3675,"props":3686,"children":3687},{},[3688],{"type":47,"value":3689},"Deeper skill",{"type":41,"tag":3691,"props":3692,"children":3693},"tbody",{},[3694,3717,3754,3780,3805,3830,3856,3881,3903,3945],{"type":41,"tag":3671,"props":3695,"children":3696},{},[3697,3703,3712],{"type":41,"tag":3698,"props":3699,"children":3700},"td",{},[3701],{"type":47,"value":3702},"Apply the current contract to the DB the first time",{"type":41,"tag":3698,"props":3704,"children":3705},{},[3706],{"type":41,"tag":99,"props":3707,"children":3709},{"className":3708},[],[3710],{"type":47,"value":3711},"prisma-next db init",{"type":41,"tag":3698,"props":3713,"children":3714},{},[3715],{"type":47,"value":3716},"this skill",{"type":41,"tag":3671,"props":3718,"children":3719},{},[3720,3738,3746],{"type":41,"tag":3698,"props":3721,"children":3722},{},[3723,3725,3730,3731,3736],{"type":47,"value":3724},"Re-emit ",{"type":41,"tag":99,"props":3726,"children":3728},{"className":3727},[],[3729],{"type":47,"value":440},{"type":47,"value":2200},{"type":41,"tag":99,"props":3732,"children":3734},{"className":3733},[],[3735],{"type":47,"value":448},{"type":47,"value":3737}," after editing the contract source",{"type":41,"tag":3698,"props":3739,"children":3740},{},[3741],{"type":41,"tag":99,"props":3742,"children":3744},{"className":3743},[],[3745],{"type":47,"value":2958},{"type":41,"tag":3698,"props":3747,"children":3748},{},[3749],{"type":41,"tag":99,"props":3750,"children":3752},{"className":3751},[],[3753],{"type":47,"value":352},{"type":41,"tag":3671,"props":3755,"children":3756},{},[3757,3762,3771],{"type":41,"tag":3698,"props":3758,"children":3759},{},[3760],{"type":47,"value":3761},"Quick dev-only schema sync (no migration history kept)",{"type":41,"tag":3698,"props":3763,"children":3764},{},[3765],{"type":41,"tag":99,"props":3766,"children":3768},{"className":3767},[],[3769],{"type":47,"value":3770},"prisma-next db update",{"type":41,"tag":3698,"props":3772,"children":3773},{},[3774],{"type":41,"tag":99,"props":3775,"children":3777},{"className":3776},[],[3778],{"type":47,"value":3779},"prisma-next-migrations",{"type":41,"tag":3671,"props":3781,"children":3782},{},[3783,3788,3797],{"type":41,"tag":3698,"props":3784,"children":3785},{},[3786],{"type":47,"value":3787},"Plan a migration from a contract diff",{"type":41,"tag":3698,"props":3789,"children":3790},{},[3791],{"type":41,"tag":99,"props":3792,"children":3794},{"className":3793},[],[3795],{"type":47,"value":3796},"prisma-next migration plan --name \u003Cslug>",{"type":41,"tag":3698,"props":3798,"children":3799},{},[3800],{"type":41,"tag":99,"props":3801,"children":3803},{"className":3802},[],[3804],{"type":47,"value":3779},{"type":41,"tag":3671,"props":3806,"children":3807},{},[3808,3813,3822],{"type":41,"tag":3698,"props":3809,"children":3810},{},[3811],{"type":47,"value":3812},"Apply pending migrations",{"type":41,"tag":3698,"props":3814,"children":3815},{},[3816],{"type":41,"tag":99,"props":3817,"children":3819},{"className":3818},[],[3820],{"type":47,"value":3821},"prisma-next migrate",{"type":41,"tag":3698,"props":3823,"children":3824},{},[3825],{"type":41,"tag":99,"props":3826,"children":3828},{"className":3827},[],[3829],{"type":47,"value":3779},{"type":41,"tag":3671,"props":3831,"children":3832},{},[3833,3838,3847],{"type":41,"tag":3698,"props":3834,"children":3835},{},[3836],{"type":47,"value":3837},"Inspect the live database",{"type":41,"tag":3698,"props":3839,"children":3840},{},[3841],{"type":41,"tag":99,"props":3842,"children":3844},{"className":3843},[],[3845],{"type":47,"value":3846},"prisma-next db schema",{"type":41,"tag":3698,"props":3848,"children":3849},{},[3850],{"type":41,"tag":99,"props":3851,"children":3853},{"className":3852},[],[3854],{"type":47,"value":3855},"prisma-next-debug",{"type":41,"tag":3671,"props":3857,"children":3858},{},[3859,3864,3873],{"type":41,"tag":3698,"props":3860,"children":3861},{},[3862],{"type":47,"value":3863},"Confirm the DB matches the contract (drift check)",{"type":41,"tag":3698,"props":3865,"children":3866},{},[3867],{"type":41,"tag":99,"props":3868,"children":3870},{"className":3869},[],[3871],{"type":47,"value":3872},"prisma-next db verify",{"type":41,"tag":3698,"props":3874,"children":3875},{},[3876],{"type":41,"tag":99,"props":3877,"children":3879},{"className":3878},[],[3880],{"type":47,"value":3855},{"type":41,"tag":3671,"props":3882,"children":3883},{},[3884,3889,3898],{"type":41,"tag":3698,"props":3885,"children":3886},{},[3887],{"type":47,"value":3888},"Bring an existing DB into a PN contract",{"type":41,"tag":3698,"props":3890,"children":3891},{},[3892],{"type":41,"tag":99,"props":3893,"children":3895},{"className":3894},[],[3896],{"type":47,"value":3897},"prisma-next contract infer --db \"$DATABASE_URL\"",{"type":41,"tag":3698,"props":3899,"children":3900},{},[3901],{"type":47,"value":3902},"this skill (brownfield)",{"type":41,"tag":3671,"props":3904,"children":3905},{},[3906,3911,3937],{"type":41,"tag":3698,"props":3907,"children":3908},{},[3909],{"type":47,"value":3910},"Decode a structured error envelope",{"type":41,"tag":3698,"props":3912,"children":3913},{},[3914,3916,3921,3922,3928,3929,3935],{"type":47,"value":3915},"(read the ",{"type":41,"tag":99,"props":3917,"children":3919},{"className":3918},[],[3920],{"type":47,"value":99},{"type":47,"value":1460},{"type":41,"tag":99,"props":3923,"children":3925},{"className":3924},[],[3926],{"type":47,"value":3927},"why",{"type":47,"value":1460},{"type":41,"tag":99,"props":3930,"children":3932},{"className":3931},[],[3933],{"type":47,"value":3934},"fix",{"type":47,"value":3936}," fields)",{"type":41,"tag":3698,"props":3938,"children":3939},{},[3940],{"type":41,"tag":99,"props":3941,"children":3943},{"className":3942},[],[3944],{"type":47,"value":3855},{"type":41,"tag":3671,"props":3946,"children":3947},{},[3948,3953,3958],{"type":41,"tag":3698,"props":3949,"children":3950},{},[3951],{"type":47,"value":3952},"Report a bug or request a feature",{"type":41,"tag":3698,"props":3954,"children":3955},{},[3956],{"type":47,"value":3957},"(file via the feedback skill)",{"type":41,"tag":3698,"props":3959,"children":3960},{},[3961],{"type":41,"tag":99,"props":3962,"children":3964},{"className":3963},[],[3965],{"type":47,"value":3966},"prisma-next-feedback",{"type":41,"tag":200,"props":3968,"children":3970},{"id":3969},"decision-psl-vs-typescript-authoring",[3971],{"type":47,"value":3972},"Decision — PSL vs TypeScript authoring",{"type":41,"tag":84,"props":3974,"children":3975},{},[3976,3993],{"type":41,"tag":88,"props":3977,"children":3978},{},[3979,3984,3986,3991],{"type":41,"tag":58,"props":3980,"children":3981},{},[3982],{"type":47,"value":3983},"PSL",{"type":47,"value":3985}," (",{"type":41,"tag":99,"props":3987,"children":3989},{"className":3988},[],[3990],{"type":47,"value":424},{"type":47,"value":3992},") — the default. Concise, declarative, familiar to anyone who has used Prisma. Recommended for most projects.",{"type":41,"tag":88,"props":3994,"children":3995},{},[3996,4000,4001,4006,4008,4013],{"type":41,"tag":58,"props":3997,"children":3998},{},[3999],{"type":47,"value":13},{"type":47,"value":3985},{"type":41,"tag":99,"props":4002,"children":4004},{"className":4003},[],[4005],{"type":47,"value":432},{"type":47,"value":4007},") — a programmatic builder. Use when the contract is genuinely computed (multi-tenant per-tenant variants), when you reuse contract fragments across files, or when an extension requires constructs PSL doesn't yet express (e.g. pgvector's parameterised storage-type registration). Pairs with the Vite plugin from ",{"type":41,"tag":99,"props":4009,"children":4011},{"className":4010},[],[4012],{"type":47,"value":398},{"type":47,"value":4014}," for auto-emit on save.",{"type":41,"tag":54,"props":4016,"children":4017},{},[4018,4020,4025,4027,4032,4034,4038],{"type":47,"value":4019},"Switch authoring later by re-running ",{"type":41,"tag":99,"props":4021,"children":4023},{"className":4022},[],[4024],{"type":47,"value":112},{"type":47,"value":4026}," in the same directory. The init flow detects the existing scaffold and prompts to reinit (use ",{"type":41,"tag":99,"props":4028,"children":4030},{"className":4029},[],[4031],{"type":47,"value":2735},{"type":47,"value":4033}," to skip the prompt in non-interactive runs). Existing contract content is ",{"type":41,"tag":76,"props":4035,"children":4036},{},[4037],{"type":47,"value":196},{"type":47,"value":4039}," automatically translated — you'll re-author by hand in the target language.",{"type":41,"tag":200,"props":4041,"children":4043},{"id":4042},"common-pitfalls",[4044],{"type":47,"value":4045},"Common Pitfalls",{"type":41,"tag":3134,"props":4047,"children":4048},{},[4049,4080,4140,4163,4193,4242,4271],{"type":41,"tag":88,"props":4050,"children":4051},{},[4052,4065,4066,4071,4073,4079],{"type":41,"tag":58,"props":4053,"children":4054},{},[4055,4057,4063],{"type":47,"value":4056},"Running ",{"type":41,"tag":99,"props":4058,"children":4060},{"className":4059},[],[4061],{"type":47,"value":4062},"prisma-next init \u003Cproject-name>",{"type":47,"value":4064}," with a positional argument.",{"type":47,"value":2571},{"type":41,"tag":99,"props":4067,"children":4069},{"className":4068},[],[4070],{"type":47,"value":158},{"type":47,"value":4072}," operates on the current working directory; there is no positional project-name argument. ",{"type":41,"tag":99,"props":4074,"children":4076},{"className":4075},[],[4077],{"type":47,"value":4078},"mkdir foo && cd foo && pnpm dlx prisma-next init",{"type":47,"value":354},{"type":41,"tag":88,"props":4081,"children":4082},{},[4083,4093,4095,4100,4102,4107,4108,4113,4114,4119,4121,4126,4128,4133,4134,4139],{"type":41,"tag":58,"props":4084,"children":4085},{},[4086,4091],{"type":41,"tag":99,"props":4087,"children":4089},{"className":4088},[],[4090],{"type":47,"value":158},{"type":47,"value":4092}," doesn't connect to your database.",{"type":47,"value":4094}," It only scaffolds files and installs dependencies (and runs the initial ",{"type":41,"tag":99,"props":4096,"children":4098},{"className":4097},[],[4099],{"type":47,"value":2105},{"type":47,"value":4101},"). You connect with ",{"type":41,"tag":99,"props":4103,"children":4105},{"className":4104},[],[4106],{"type":47,"value":639},{"type":47,"value":1460},{"type":41,"tag":99,"props":4109,"children":4111},{"className":4110},[],[4112],{"type":47,"value":2025},{"type":47,"value":1460},{"type":41,"tag":99,"props":4115,"children":4117},{"className":4116},[],[4118],{"type":47,"value":2206},{"type":47,"value":4120},". If ",{"type":41,"tag":99,"props":4122,"children":4124},{"className":4123},[],[4125],{"type":47,"value":158},{"type":47,"value":4127}," succeeds and queries fail, the issue is ",{"type":41,"tag":99,"props":4129,"children":4131},{"className":4130},[],[4132],{"type":47,"value":1384},{"type":47,"value":1931},{"type":41,"tag":99,"props":4135,"children":4137},{"className":4136},[],[4138],{"type":47,"value":158},{"type":47,"value":354},{"type":41,"tag":88,"props":4141,"children":4142},{},[4143,4148,4149,4154,4156,4161],{"type":41,"tag":58,"props":4144,"children":4145},{},[4146],{"type":47,"value":4147},"Treating inferred PSL as the final contract.",{"type":47,"value":2571},{"type":41,"tag":99,"props":4150,"children":4152},{"className":4151},[],[4153],{"type":47,"value":176},{"type":47,"value":4155}," produces a starting point. Don't ",{"type":41,"tag":99,"props":4157,"children":4159},{"className":4158},[],[4160],{"type":47,"value":184},{"type":47,"value":4162}," against a contract you haven't read.",{"type":41,"tag":88,"props":4164,"children":4165},{},[4166,4171,4173,4178,4179,4184,4186,4191],{"type":41,"tag":58,"props":4167,"children":4168},{},[4169],{"type":47,"value":4170},"Forgetting to emit after editing the contract.",{"type":47,"value":4172}," The contract artefacts (",{"type":41,"tag":99,"props":4174,"children":4176},{"className":4175},[],[4177],{"type":47,"value":440},{"type":47,"value":121},{"type":41,"tag":99,"props":4180,"children":4182},{"className":4181},[],[4183],{"type":47,"value":448},{"type":47,"value":4185},") are stale until you run ",{"type":41,"tag":99,"props":4187,"children":4189},{"className":4188},[],[4190],{"type":47,"value":2105},{"type":47,"value":4192},". If the type-checker says a model \"doesn't exist\", you skipped emit.",{"type":41,"tag":88,"props":4194,"children":4195},{},[4196,4220,4222,4227,4229,4234,4236,4241],{"type":41,"tag":58,"props":4197,"children":4198},{},[4199,4201,4206,4207,4212,4214,4219],{"type":47,"value":4200},"Setting ",{"type":41,"tag":99,"props":4202,"children":4204},{"className":4203},[],[4205],{"type":47,"value":1384},{"type":47,"value":3148},{"type":41,"tag":99,"props":4208,"children":4210},{"className":4209},[],[4211],{"type":47,"value":775},{"type":47,"value":4213}," instead of ",{"type":41,"tag":99,"props":4215,"children":4217},{"className":4216},[],[4218],{"type":47,"value":1392},{"type":47,"value":354},{"type":47,"value":4221}," The config reads ",{"type":41,"tag":99,"props":4223,"children":4225},{"className":4224},[],[4226],{"type":47,"value":1392},{"type":47,"value":4228}," automatically via ",{"type":41,"tag":99,"props":4230,"children":4232},{"className":4231},[],[4233],{"type":47,"value":1018},{"type":47,"value":4235},". Hardcoding the URL leaks credentials and bypasses per-environment overrides. See ",{"type":41,"tag":99,"props":4237,"children":4239},{"className":4238},[],[4240],{"type":47,"value":386},{"type":47,"value":354},{"type":41,"tag":88,"props":4243,"children":4244},{},[4245,4262,4264,4269],{"type":41,"tag":58,"props":4246,"children":4247},{},[4248,4250,4255,4256,4261],{"type":47,"value":4249},"Hand-editing ",{"type":41,"tag":99,"props":4251,"children":4253},{"className":4252},[],[4254],{"type":47,"value":440},{"type":47,"value":468},{"type":41,"tag":99,"props":4257,"children":4259},{"className":4258},[],[4260],{"type":47,"value":448},{"type":47,"value":354},{"type":47,"value":4263}," They're emitted artefacts; the next ",{"type":41,"tag":99,"props":4265,"children":4267},{"className":4266},[],[4268],{"type":47,"value":2105},{"type":47,"value":4270}," overwrites your changes. Edit the source instead.",{"type":41,"tag":88,"props":4272,"children":4273},{},[4274,4292,4294,4299],{"type":41,"tag":58,"props":4275,"children":4276},{},[4277,4279,4284,4286,4291],{"type":47,"value":4278},"Using ",{"type":41,"tag":99,"props":4280,"children":4282},{"className":4281},[],[4283],{"type":47,"value":3488},{"type":47,"value":4285}," for ",{"type":41,"tag":99,"props":4287,"children":4289},{"className":4288},[],[4290],{"type":47,"value":176},{"type":47,"value":354},{"type":47,"value":4293}," The flag is ",{"type":41,"tag":99,"props":4295,"children":4297},{"className":4296},[],[4298],{"type":47,"value":3481},{"type":47,"value":354},{"type":41,"tag":200,"props":4301,"children":4303},{"id":4302},"what-prisma-next-doesnt-do-yet",[4304],{"type":47,"value":4305},"What Prisma Next doesn't do yet",{"type":41,"tag":84,"props":4307,"children":4308},{},[4309,4347,4388],{"type":41,"tag":88,"props":4310,"children":4311},{},[4312,4317,4319,4324,4326,4331,4333,4338,4340,4345],{"type":41,"tag":58,"props":4313,"children":4314},{},[4315],{"type":47,"value":4316},"Migration from another ORM.",{"type":47,"value":4318}," Prisma Next doesn't migrate your schema ",{"type":41,"tag":76,"props":4320,"children":4321},{},[4322],{"type":47,"value":4323},"from",{"type":47,"value":4325}," Drizzle \u002F Prisma 6\u002F7 \u002F Sequelize \u002F TypeORM \u002F Kysely \u002F Knex \u002F a raw driver. Workaround: install the matching ",{"type":41,"tag":99,"props":4327,"children":4329},{"className":4328},[],[4330],{"type":47,"value":365},{"type":47,"value":4332}," if one exists for your source, or treat the source as a brownfield database and ",{"type":41,"tag":99,"props":4334,"children":4336},{"className":4335},[],[4337],{"type":47,"value":176},{"type":47,"value":4339}," from it. If you need a guided migration flow built-in, file a feature request via the ",{"type":41,"tag":99,"props":4341,"children":4343},{"className":4342},[],[4344],{"type":47,"value":3966},{"type":47,"value":4346}," skill.",{"type":41,"tag":88,"props":4348,"children":4349},{},[4350,4361,4362,4367,4369,4374,4375,4380,4382,4387],{"type":41,"tag":58,"props":4351,"children":4352},{},[4353,4359],{"type":41,"tag":99,"props":4354,"children":4356},{"className":4355},[],[4357],{"type":47,"value":4358},"prisma db push",{"type":47,"value":4360},"-style production sync.",{"type":47,"value":2571},{"type":41,"tag":99,"props":4363,"children":4365},{"className":4364},[],[4366],{"type":47,"value":2025},{"type":47,"value":4368}," is the quick development path; for production, use migrations (",{"type":41,"tag":99,"props":4370,"children":4372},{"className":4371},[],[4373],{"type":47,"value":2198},{"type":47,"value":2200},{"type":41,"tag":99,"props":4376,"children":4378},{"className":4377},[],[4379],{"type":47,"value":2206},{"type":47,"value":4381},"). PN deliberately does not offer a \"push-to-prod-without-a-migration\" surface — see ",{"type":41,"tag":99,"props":4383,"children":4385},{"className":4384},[],[4386],{"type":47,"value":3779},{"type":47,"value":354},{"type":41,"tag":88,"props":4389,"children":4390},{},[4391,4396,4398,4403,4405,4410],{"type":41,"tag":58,"props":4392,"children":4393},{},[4394],{"type":47,"value":4395},"Studio \u002F GUI database browser.",{"type":47,"value":4397}," Use ",{"type":41,"tag":99,"props":4399,"children":4401},{"className":4400},[],[4402],{"type":47,"value":3846},{"type":47,"value":4404}," for a CLI tree-style summary of the live DB. If you need an interactive UI, file a feature request via the ",{"type":41,"tag":99,"props":4406,"children":4408},{"className":4407},[],[4409],{"type":47,"value":3966},{"type":47,"value":4346},{"type":41,"tag":200,"props":4412,"children":4414},{"id":4413},"reference-files",[4415],{"type":47,"value":4416},"Reference Files",{"type":41,"tag":54,"props":4418,"children":4419},{},[4420,4422,4427,4428,4434,4436,4442,4444,4450],{"type":47,"value":4421},"This skill is intentionally body-only; ",{"type":41,"tag":99,"props":4423,"children":4425},{"className":4424},[],[4426],{"type":47,"value":2611},{"type":47,"value":121},{"type":41,"tag":99,"props":4429,"children":4431},{"className":4430},[],[4432],{"type":47,"value":4433},"contract infer --help",{"type":47,"value":4435},", and ",{"type":41,"tag":99,"props":4437,"children":4439},{"className":4438},[],[4440],{"type":47,"value":4441},"db sign --help",{"type":47,"value":4443}," are the authoritative surfaces for flag-level detail. When in doubt, run ",{"type":41,"tag":99,"props":4445,"children":4447},{"className":4446},[],[4448],{"type":47,"value":4449},"--help",{"type":47,"value":4451}," and read the actual command's description rather than guessing from this skill.",{"type":41,"tag":200,"props":4453,"children":4455},{"id":4454},"checklist",[4456],{"type":47,"value":4457},"Checklist",{"type":41,"tag":84,"props":4459,"children":4462},{"className":4460},[4461],"contains-task-list",[4463,4475,4497,4538,4566,4593,4612,4646,4680,4702,4748,4782,4804,4827,4848,4869],{"type":41,"tag":88,"props":4464,"children":4467},{"className":4465},[4466],"task-list-item",[4468,4473],{"type":41,"tag":4469,"props":4470,"children":4472},"input",{"disabled":1080,"type":4471},"checkbox",[],{"type":47,"value":4474}," Confirmed which path applies (first-touch orientation \u002F greenfield \u002F brownfield) before proposing commands.",{"type":41,"tag":88,"props":4476,"children":4478},{"className":4477},[4466],[4479,4482,4483,4488,4490,4495],{"type":41,"tag":4469,"props":4480,"children":4481},{"disabled":1080,"type":4471},[],{"type":47,"value":2571},{"type":41,"tag":58,"props":4484,"children":4485},{},[4486],{"type":47,"value":4487},"First-touch orientation:",{"type":47,"value":4489}," named the contract path back to the user and framed its role (",{"type":41,"tag":76,"props":4491,"children":4492},{},[4493],{"type":47,"value":4494},"source of truth from which query types, migrations, and runtime types flow",{"type":47,"value":4496},") before proposing any commands.",{"type":41,"tag":88,"props":4498,"children":4500},{"className":4499},[4466],[4501,4504,4505,4510,4512,4516,4518,4523,4524,4529,4531,4536],{"type":41,"tag":4469,"props":4502,"children":4503},{"disabled":1080,"type":4471},[],{"type":47,"value":2571},{"type":41,"tag":58,"props":4506,"children":4507},{},[4508],{"type":47,"value":4509},"All paths:",{"type":47,"value":4511}," brought the project to the ",{"type":41,"tag":76,"props":4513,"children":4514},{},[4515],{"type":47,"value":3190},{"type":47,"value":4517}," prerequisites (config, contract source, ",{"type":41,"tag":99,"props":4519,"children":4521},{"className":4520},[],[4522],{"type":47,"value":378},{"type":47,"value":121},{"type":41,"tag":99,"props":4525,"children":4527},{"className":4526},[],[4528],{"type":47,"value":1384},{"type":47,"value":4530},", marker row) ",{"type":41,"tag":76,"props":4532,"children":4533},{},[4534],{"type":47,"value":4535},"before",{"type":47,"value":4537}," writing application code.",{"type":41,"tag":88,"props":4539,"children":4541},{"className":4540},[4466],[4542,4545,4546,4550,4552,4557,4559,4564],{"type":41,"tag":4469,"props":4543,"children":4544},{"disabled":1080,"type":4471},[],{"type":47,"value":2571},{"type":41,"tag":58,"props":4547,"children":4548},{},[4549],{"type":47,"value":4509},{"type":47,"value":4551}," ran the first arc — one ",{"type":41,"tag":99,"props":4553,"children":4555},{"className":4554},[],[4556],{"type":47,"value":1141},{"type":47,"value":4558}," + one ",{"type":41,"tag":99,"props":4560,"children":4562},{"className":4561},[],[4563],{"type":47,"value":1259},{"type":47,"value":4565}," against the starter (or inferred) model — and got the round-trip working green.",{"type":41,"tag":88,"props":4567,"children":4569},{"className":4568},[4466],[4570,4573,4574,4578,4580,4584,4586,4591],{"type":41,"tag":4469,"props":4571,"children":4572},{"disabled":1080,"type":4471},[],{"type":47,"value":2571},{"type":41,"tag":58,"props":4575,"children":4576},{},[4577],{"type":47,"value":4509},{"type":47,"value":4579}," did ",{"type":41,"tag":76,"props":4581,"children":4582},{},[4583],{"type":47,"value":196},{"type":47,"value":4585}," edit the contract source as part of the first arc. Schema extension is the ",{"type":41,"tag":76,"props":4587,"children":4588},{},[4589],{"type":47,"value":4590},"next",{"type":47,"value":4592}," move, not the first.",{"type":41,"tag":88,"props":4594,"children":4596},{"className":4595},[4466],[4597,4600,4601,4605,4606,4610],{"type":41,"tag":4469,"props":4598,"children":4599},{"disabled":1080,"type":4471},[],{"type":47,"value":2571},{"type":41,"tag":58,"props":4602,"children":4603},{},[4604],{"type":47,"value":4509},{"type":47,"value":4579},{"type":41,"tag":76,"props":4607,"children":4608},{},[4609],{"type":47,"value":196},{"type":47,"value":4611}," lead with a feature tour, capability inventory, or recital of CLI commands. Commands surfaced as the user's current move required them.",{"type":41,"tag":88,"props":4613,"children":4615},{"className":4614},[4466],[4616,4619,4621,4626,4627,4632,4634,4639,4640,4645],{"type":41,"tag":4469,"props":4617,"children":4618},{"disabled":1080,"type":4471},[],{"type":47,"value":4620}," Confirmed the user's target (",{"type":41,"tag":99,"props":4622,"children":4624},{"className":4623},[],[4625],{"type":47,"value":466},{"type":47,"value":1460},{"type":41,"tag":99,"props":4628,"children":4630},{"className":4629},[],[4631],{"type":47,"value":474},{"type":47,"value":4633},") and authoring mode (",{"type":41,"tag":99,"props":4635,"children":4637},{"className":4636},[],[4638],{"type":47,"value":507},{"type":47,"value":1460},{"type":41,"tag":99,"props":4641,"children":4643},{"className":4642},[],[4644],{"type":47,"value":14},{"type":47,"value":531},{"type":41,"tag":88,"props":4647,"children":4649},{"className":4648},[4466],[4650,4653,4654,4658,4660,4665,4667,4672,4673,4678],{"type":41,"tag":4469,"props":4651,"children":4652},{"disabled":1080,"type":4471},[],{"type":47,"value":2571},{"type":41,"tag":58,"props":4655,"children":4656},{},[4657],{"type":47,"value":4487},{"type":47,"value":4659}," read ",{"type":41,"tag":99,"props":4661,"children":4663},{"className":4662},[],[4664],{"type":47,"value":775},{"type":47,"value":4666},", the contract source, ",{"type":41,"tag":99,"props":4668,"children":4670},{"className":4669},[],[4671],{"type":47,"value":378},{"type":47,"value":4435},{"type":41,"tag":99,"props":4674,"children":4676},{"className":4675},[],[4677],{"type":47,"value":1392},{"type":47,"value":4679}," before proposing anything — didn't assume what the scaffold tool \u002F teammate left in place.",{"type":41,"tag":88,"props":4681,"children":4683},{"className":4682},[4466],[4684,4687,4688,4693,4695,4700],{"type":41,"tag":4469,"props":4685,"children":4686},{"disabled":1080,"type":4471},[],{"type":47,"value":2571},{"type":41,"tag":58,"props":4689,"children":4690},{},[4691],{"type":47,"value":4692},"Greenfield path:",{"type":47,"value":4694}," ran ",{"type":41,"tag":99,"props":4696,"children":4698},{"className":4697},[],[4699],{"type":47,"value":112},{"type":47,"value":4701}," from the project directory — no positional project-name argument.",{"type":41,"tag":88,"props":4703,"children":4705},{"className":4704},[4466],[4706,4709,4710,4714,4716,4721,4722,4727,4728,4733,4735,4740,4741,4746],{"type":41,"tag":4469,"props":4707,"children":4708},{"disabled":1080,"type":4471},[],{"type":47,"value":2571},{"type":41,"tag":58,"props":4711,"children":4712},{},[4713],{"type":47,"value":4509},{"type":47,"value":4715}," the project ended up in the canonical ",{"type":41,"tag":99,"props":4717,"children":4719},{"className":4718},[],[4720],{"type":47,"value":1537},{"type":47,"value":2200},{"type":41,"tag":99,"props":4723,"children":4725},{"className":4724},[],[4726],{"type":47,"value":605},{"type":47,"value":2200},{"type":41,"tag":99,"props":4729,"children":4731},{"className":4730},[],[4732],{"type":47,"value":738},{"type":47,"value":4734}," layout — including moving the scaffolded directory out of a top-level ",{"type":41,"tag":99,"props":4736,"children":4738},{"className":4737},[],[4739],{"type":47,"value":810},{"type":47,"value":2920},{"type":41,"tag":99,"props":4742,"children":4744},{"className":4743},[],[4745],{"type":47,"value":158},{"type":47,"value":4747}," produced one (TML-2532).",{"type":41,"tag":88,"props":4749,"children":4751},{"className":4750},[4466],[4752,4755,4756,4761,4762,4768,4770,4775,4776,4781],{"type":41,"tag":4469,"props":4753,"children":4754},{"disabled":1080,"type":4471},[],{"type":47,"value":2571},{"type":41,"tag":58,"props":4757,"children":4758},{},[4759],{"type":47,"value":4760},"Brownfield path:",{"type":47,"value":4694},{"type":41,"tag":99,"props":4763,"children":4765},{"className":4764},[],[4766],{"type":47,"value":4767},"contract infer --db \"$DATABASE_URL\" --output src\u002Fprisma\u002Fcontract.prisma",{"type":47,"value":4769},", reviewed the result, then ",{"type":41,"tag":99,"props":4771,"children":4773},{"className":4772},[],[4774],{"type":47,"value":2105},{"type":47,"value":2200},{"type":41,"tag":99,"props":4777,"children":4779},{"className":4778},[],[4780],{"type":47,"value":184},{"type":47,"value":354},{"type":41,"tag":88,"props":4783,"children":4785},{"className":4784},[4466],[4786,4789,4791,4796,4797,4802],{"type":41,"tag":4469,"props":4787,"children":4788},{"disabled":1080,"type":4471},[],{"type":47,"value":4790}," Set ",{"type":41,"tag":99,"props":4792,"children":4794},{"className":4793},[],[4795],{"type":47,"value":1384},{"type":47,"value":3148},{"type":41,"tag":99,"props":4798,"children":4800},{"className":4799},[],[4801],{"type":47,"value":1392},{"type":47,"value":4803}," and confirmed the value is reachable.",{"type":41,"tag":88,"props":4805,"children":4807},{"className":4806},[4466],[4808,4811,4813,4818,4820,4825],{"type":41,"tag":4469,"props":4809,"children":4810},{"disabled":1080,"type":4471},[],{"type":47,"value":4812}," Initialised the DB (",{"type":41,"tag":99,"props":4814,"children":4816},{"className":4815},[],[4817],{"type":47,"value":639},{"type":47,"value":4819}," greenfield \u002F first-touch orientation) or signed the marker (",{"type":41,"tag":99,"props":4821,"children":4823},{"className":4822},[],[4824],{"type":47,"value":184},{"type":47,"value":4826}," brownfield).",{"type":41,"tag":88,"props":4828,"children":4830},{"className":4829},[4466],[4831,4834,4836,4841,4842,4847],{"type":41,"tag":4469,"props":4832,"children":4833},{"disabled":1080,"type":4471},[],{"type":47,"value":4835}," Did NOT hand-edit ",{"type":41,"tag":99,"props":4837,"children":4839},{"className":4838},[],[4840],{"type":47,"value":440},{"type":47,"value":468},{"type":41,"tag":99,"props":4843,"children":4845},{"className":4844},[],[4846],{"type":47,"value":448},{"type":47,"value":354},{"type":41,"tag":88,"props":4849,"children":4851},{"className":4850},[4466],[4852,4855,4857,4862,4863,4868],{"type":41,"tag":4469,"props":4853,"children":4854},{"disabled":1080,"type":4471},[],{"type":47,"value":4856}," Did NOT set ",{"type":41,"tag":99,"props":4858,"children":4860},{"className":4859},[],[4861],{"type":47,"value":1384},{"type":47,"value":3148},{"type":41,"tag":99,"props":4864,"children":4866},{"className":4865},[],[4867],{"type":47,"value":775},{"type":47,"value":354},{"type":41,"tag":88,"props":4870,"children":4872},{"className":4871},[4466],[4873,4876,4878,4882,4884,4889,4891,4896],{"type":41,"tag":4469,"props":4874,"children":4875},{"disabled":1080,"type":4471},[],{"type":47,"value":4877}," Confirmed the user understands what the ",{"type":41,"tag":76,"props":4879,"children":4880},{},[4881],{"type":47,"value":4590},{"type":47,"value":4883}," skill is for their workflow (typically ",{"type":41,"tag":99,"props":4885,"children":4887},{"className":4886},[],[4888],{"type":47,"value":1407},{"type":47,"value":4890}," for more queries, then ",{"type":41,"tag":99,"props":4892,"children":4894},{"className":4893},[],[4895],{"type":47,"value":352},{"type":47,"value":4897}," when they're ready to extend the schema).",{"type":41,"tag":4899,"props":4900,"children":4901},"style",{},[4902],{"type":47,"value":4903},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":4905,"total":1319},[4906,4918,4932,4944,4956,4969,4987],{"slug":2563,"name":2563,"fn":4907,"description":4908,"org":4909,"tags":4910,"stars":23,"repoUrl":24,"updatedAt":4917},"guide Prisma Next project setup and usage","Route a vague Prisma Next prompt to the right specific skill. Use for \"help me with Prisma Next\", \"what is Prisma Next\", \"explain Prisma Next\", \"I'm new to PN\", \"where do I start\", \"what can I do with Prisma Next\", \"what can I do next with Prisma\", \"just ran createprisma\", \"tour of Prisma Next\", \"Prisma Next overview\", and comparison questions like \"Prisma Next vs Prisma 7\", \"PN vs Drizzle\", \"PN vs Kysely\", \"PN vs TypeORM\". Do NOT use when the prompt clearly matches a workflow skill — adoption \u002F quickstart \u002F first-touch orientation \u002F brownfield introspection, schema \u002F contract editing, migration authoring (db update \u002F migration plan \u002F migrate), migration review on deploy \u002F concurrent migrations, queries \u002F db.orm \u002F db.sql \u002F TypedSQL, Supabase \u002F RLS \u002F role binding, runtime \u002F db.ts \u002F middleware wiring, build \u002F Vite plugin \u002F Next.js plugin, debug \u002F structured error envelopes \u002F PN-* error codes, or feedback \u002F bug report \u002F feature request — load that sibling skill directly.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4911,4912,4915,4916],{"name":17,"slug":18,"type":15},{"name":4913,"slug":4914,"type":15},"Next.js","next-js",{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},"2026-07-17T05:32:04.322957",{"slug":398,"name":398,"fn":4919,"description":4920,"org":4921,"tags":4922,"stars":23,"repoUrl":24,"updatedAt":4931},"integrate Prisma Next into build systems","Wire Prisma Next into the project's build system with the right build-tool plugin — Vite today via @prisma-next\u002Fvite-plugin-contract-emit (Vite 7 \u002F 8); Next.js \u002F Webpack \u002F esbuild \u002F Rollup \u002F Turbopack are named as gaps rather than fabricated. Always offers the Vite plugin proactively when the project is using Vite. Use for vite plugin, vite-plugin, vite.config.ts, prismaVitePlugin, contract emit on save, HMR, hot reload contract, dev server, Next.js plugin, next plugin, withPrismaNext, webpack plugin, esbuild plugin, rollup plugin, build integration, dev server plugin, vite 7, vite 8.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4923,4926,4927,4928],{"name":4924,"slug":4925,"type":15},"Deployment","deployment",{"name":4913,"slug":4914,"type":15},{"name":9,"slug":8,"type":15},{"name":4929,"slug":4930,"type":15},"Vite","vite","2026-07-02T07:31:36.108254",{"slug":352,"name":352,"fn":4933,"description":4934,"org":4935,"tags":4936,"stars":23,"repoUrl":24,"updatedAt":4943},"edit Prisma Next data contracts and models","Edit the Prisma Next data contract — add models, fields, relations, indexes, enums, value objects (composite types), type aliases, namespaces (Postgres schemas), cross-contract foreign keys (cross-space FK), polymorphic types (`@@discriminator` \u002F `@@base`), use extension namespaces (`pgvector.Vector(...)`, `cipherstash.EncryptedString(...)`), wire `prisma-next.config.ts` with `defineConfig` from the `@prisma-next\u002F\u003Ctarget>\u002Fconfig` façade, and run `prisma-next contract emit`. Use for schema, models, fields, attributes, soft delete, paranoid, scopes, validations, callbacks, prisma schema, PSL, contract.prisma, contract.ts, contract.json, contract.d.ts, `@prisma-next\u002Fpostgres\u002Fconfig`, `@prisma-next\u002Fpostgres\u002Fcontract-builder`, `@prisma-next\u002Fpostgres\u002Fcontrol`, `@prisma-next\u002Fmongo\u002Fconfig`, `@prisma-next\u002Fmongo\u002Fcontract-builder`, `extensions:`, pgvector, cipherstash, postgis, paradedb, supabase, `@prisma-next\u002Fextension-supabase`, `@@control`, control policy, managed, tolerated, external, observed.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4937,4940,4941,4942],{"name":4938,"slug":4939,"type":15},"Data Modeling","data-modeling",{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},"2026-07-30T05:30:10.426962",{"slug":3855,"name":3855,"fn":4945,"description":4946,"org":4947,"tags":4948,"stars":23,"repoUrl":24,"updatedAt":4955},"debug and recover from Prisma Next errors","Read a Prisma Next structured error envelope and route to the right recovery — code, domain, severity, why, fix, meta. Use for error, exception, my emit failed, my query won't typecheck, my query crashed, my migration won't apply, MIGRATION.HASH_MISMATCH, BUDGET.ROWS_EXCEEDED, BUDGET.TIME_EXCEEDED, RUNTIME.ABORTED, PLAN.HASH_MISMATCH, CONTRACT.MARKER_MISSING, PN-RUN-3001, PN-RUN-3002, PN-RUN-3030, PN-MIG-2001, PN-CLI-4011, PN-SCHEMA-0001, drift, capability missing, planner conflict, prisma studio, EXPLAIN, query log, db.end, db.close, script won't exit, hangs, close connection, pool.end, client is closed.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4949,4950,4953,4954],{"name":17,"slug":18,"type":15},{"name":4951,"slug":4952,"type":15},"Debugging","debugging",{"name":4913,"slug":4914,"type":15},{"name":9,"slug":8,"type":15},"2026-07-24T05:37:10.436314",{"slug":3966,"name":3966,"fn":4957,"description":4958,"org":4959,"tags":4960,"stars":23,"repoUrl":24,"updatedAt":4968},"report Prisma Next issues and feedback","Hand a Prisma Next question or report off to the team — file a GitHub issue (bug or feature request), or route Q&A \u002F design discussion \u002F direct-team-contact to the Prisma Discord at pris.ly\u002Fdiscord. Use for bug, bug report, file an issue, report a bug, feature request, missing feature, this should be a feature, file this, this is a bug, this is broken, surprising behaviour, this doesn't work, file feedback, send feedback, capability gap, file via prisma-next-feedback, ask the team, talk to the team, talk to the Prisma team, talk to Prisma, Discord, Prisma Discord, Q&A, design feedback, is this the intended way, how should I do X, extension author question, extension author needs help.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4961,4964,4967],{"name":4962,"slug":4963,"type":15},"Documentation","documentation",{"name":4965,"slug":4966,"type":15},"GitHub","github",{"name":9,"slug":8,"type":15},"2026-07-02T07:31:34.870809",{"slug":4970,"name":4970,"fn":4971,"description":4972,"org":4973,"tags":4974,"stars":23,"repoUrl":24,"updatedAt":4986},"prisma-next-migration-review","review and resolve Prisma Next migrations","Review what Prisma Next migrations will run on merge or deploy, render the migration graph, resolve concurrent \u002F diamond-convergence conflicts, and configure environment refs for CI. Use for \"what migrations are going to run\", \"what runs on deploy\", merge conflict, diamond convergence, concurrent migrations, migration status, ref management, staging, production, MIGRATION.DIVERGED, MIGRATION.NO_MARKER, MIGRATION.MARKER_NOT_IN_HISTORY, prisma migrate status, prisma migrate diff, prisma migrate resolve.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4975,4978,4981,4982,4985],{"name":4976,"slug":4977,"type":15},"CI\u002FCD","ci-cd",{"name":4979,"slug":4980,"type":15},"Code Review","code-review",{"name":17,"slug":18,"type":15},{"name":4983,"slug":4984,"type":15},"Migration","migration",{"name":9,"slug":8,"type":15},"2026-07-24T05:37:11.422323",{"slug":3779,"name":3779,"fn":4988,"description":4989,"org":4990,"tags":4991,"stars":23,"repoUrl":24,"updatedAt":4996},"author and manage Prisma Next migrations","Author Prisma Next migrations — choose db update vs migration plan, edit the framework-rendered migration.ts (replace placeholder sentinels with dataTransform closures), recover from MIGRATION.HASH_MISMATCH or PN-MIG-2001 unfilled placeholder. Use for prisma migrate dev, prisma migrate deploy, prisma db push, db update, db update --dry-run, migration plan, migrate, migration new, migration show, db verify, db sign, data migration, this.dataTransform, dataTransform, placeholder, generated migration.ts, edit migration.ts, MIGRATION.HASH_MISMATCH, schema drift.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4992,4993,4994,4995],{"name":17,"slug":18,"type":15},{"name":4983,"slug":4984,"type":15},{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},"2026-07-24T05:37:13.469138",{"items":4998,"total":5112},[4999,5006,5013,5020,5027,5033,5041,5048,5063,5070,5080,5096],{"slug":2563,"name":2563,"fn":4907,"description":4908,"org":5000,"tags":5001,"stars":23,"repoUrl":24,"updatedAt":4917},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5002,5003,5004,5005],{"name":17,"slug":18,"type":15},{"name":4913,"slug":4914,"type":15},{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"slug":398,"name":398,"fn":4919,"description":4920,"org":5007,"tags":5008,"stars":23,"repoUrl":24,"updatedAt":4931},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5009,5010,5011,5012],{"name":4924,"slug":4925,"type":15},{"name":4913,"slug":4914,"type":15},{"name":9,"slug":8,"type":15},{"name":4929,"slug":4930,"type":15},{"slug":352,"name":352,"fn":4933,"description":4934,"org":5014,"tags":5015,"stars":23,"repoUrl":24,"updatedAt":4943},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5016,5017,5018,5019],{"name":4938,"slug":4939,"type":15},{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"slug":3855,"name":3855,"fn":4945,"description":4946,"org":5021,"tags":5022,"stars":23,"repoUrl":24,"updatedAt":4955},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5023,5024,5025,5026],{"name":17,"slug":18,"type":15},{"name":4951,"slug":4952,"type":15},{"name":4913,"slug":4914,"type":15},{"name":9,"slug":8,"type":15},{"slug":3966,"name":3966,"fn":4957,"description":4958,"org":5028,"tags":5029,"stars":23,"repoUrl":24,"updatedAt":4968},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5030,5031,5032],{"name":4962,"slug":4963,"type":15},{"name":4965,"slug":4966,"type":15},{"name":9,"slug":8,"type":15},{"slug":4970,"name":4970,"fn":4971,"description":4972,"org":5034,"tags":5035,"stars":23,"repoUrl":24,"updatedAt":4986},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5036,5037,5038,5039,5040],{"name":4976,"slug":4977,"type":15},{"name":4979,"slug":4980,"type":15},{"name":17,"slug":18,"type":15},{"name":4983,"slug":4984,"type":15},{"name":9,"slug":8,"type":15},{"slug":3779,"name":3779,"fn":4988,"description":4989,"org":5042,"tags":5043,"stars":23,"repoUrl":24,"updatedAt":4996},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5044,5045,5046,5047],{"name":17,"slug":18,"type":15},{"name":4983,"slug":4984,"type":15},{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"slug":1407,"name":1407,"fn":5049,"description":5050,"org":5051,"tags":5052,"stars":23,"repoUrl":24,"updatedAt":5062},"write Prisma Next queries for database operations","Write Prisma Next queries for Postgres, SQLite, or Mongo — pick a lane (Postgres\u002FSQLite `db.orm.\u003CModel>` + `db.sql.\u003Ctable>`; Mongo `db.orm.\u003Croot>` + `db.query.from(...)` pipeline builder), filter \u002F project \u002F sort \u002F paginate, eager-load with `.include(...)`, Postgres\u002FSQLite `db.transaction(...)`, Postgres\u002FSQLite ORM `.aggregate(...)`, Mongo aggregations via query builder, namespace-aware accessors (`db.orm.\u003Cns>.\u003CModel>`, `db.sql.\u003Cns>.\u003Ctable>`). Triggers: query, where, match, select, project, orderBy, take, skip, include, lookup, first, all, count, aggregate, group, create, update, delete, upsert, returning, transaction, db.close, script teardown, variant, polymorphism, drizzle-style, kysely-style. Notes: `.all()` is a Thenable (just `await` it), iterators are single-use (`RUNTIME.ITERATOR_CONSUMED`), Postgres `count` is `number` while sum\u002Favg\u002Fmin\u002Fmax are `number | null`, ranges use chained `.where()` or `and(...)` (no `.between(...)`).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5053,5054,5055,5058,5059],{"name":17,"slug":18,"type":15},{"name":4913,"slug":4914,"type":15},{"name":5056,"slug":5057,"type":15},"PostgreSQL","postgresql",{"name":9,"slug":8,"type":15},{"name":5060,"slug":5061,"type":15},"SQL","sql","2026-07-17T05:32:03.35373",{"slug":4,"name":4,"fn":5,"description":6,"org":5064,"tags":5065,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5066,5067,5068,5069],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"slug":386,"name":386,"fn":5071,"description":5072,"org":5073,"tags":5074,"stars":23,"repoUrl":24,"updatedAt":5079},"configure Prisma Next runtime and database connections","Wire the Prisma Next runtime — `db.ts` setup using `postgres\u003CContract>(...)` from `@prisma-next\u002Fpostgres\u002Fruntime`, `sqlite\u003CContract>(...)` from `@prisma-next\u002Fsqlite\u002Fruntime`, or `mongo\u003CContract>(...)` from `@prisma-next\u002Fmongo\u002Fruntime`; middleware composition (telemetry from `@prisma-next\u002Fmiddleware-telemetry`; lints and budgets), `DATABASE_URL` config, per-environment branching, switching between Postgres, SQLite, and Mongo façades. Use for db.ts, postgres(), sqlite(), mongo(), middleware, telemetry, lints, budgets, DATABASE_URL, .env, connection pool, poolOptions, dev vs prod config, transactions, db.transaction, read replicas, multi-database, script won't exit, hangs, close connection, db.end, db.close, pool.end, [Symbol.asyncDispose], await using.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5075,5076,5077,5078],{"name":17,"slug":18,"type":15},{"name":4913,"slug":4914,"type":15},{"name":5056,"slug":5057,"type":15},{"name":9,"slug":8,"type":15},"2026-07-17T05:32:05.347316",{"slug":5081,"name":5081,"fn":5082,"description":5083,"org":5084,"tags":5085,"stars":23,"repoUrl":24,"updatedAt":5095},"prisma-next-supabase","integrate Prisma with Supabase","Use Prisma Next with a Supabase project via `@prisma-next\u002Fextension-supabase` — wire `extensions: [supabasePack]`, declare cross-space FKs to `supabase:auth.AuthUser`, author RLS policies (`policy_select` \u002F `policy_update` \u002F `@@rls`, `auth.uid()` predicates), build `db.ts` with the `supabase()` factory, bind roles per request (`asUser(jwt)` \u002F `asAnon()` \u002F `asServiceRole()`), query `auth.*` \u002F `storage.*` via the `db.asServiceRole().supabase` admin root, and validate JWTs (`jwksUrl` for current projects \u002F `jwtSecret` for legacy HS256). Use for supabase, RLS, row level security, policy, role binding, anon, authenticated, service_role, auth.users, auth.uid(), JWT, JWKS, SUPABASE_JWKS_URL, SUPABASE_JWT_SECRET, SUPABASE.JWT_INVALID, SUPABASE.CONFIG_INVALID, RoleBoundDb, session pooler, supabase:auth.AuthUser, @prisma-next\u002Fextension-supabase.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5086,5089,5090,5091,5092],{"name":5087,"slug":5088,"type":15},"Auth","auth",{"name":20,"slug":21,"type":15},{"name":5056,"slug":5057,"type":15},{"name":9,"slug":8,"type":15},{"name":5093,"slug":5094,"type":15},"Supabase","supabase","2026-07-30T05:30:11.065251",{"slug":5097,"name":5097,"fn":5098,"description":5099,"org":5100,"tags":5101,"stars":5109,"repoUrl":5110,"updatedAt":5111},"prisma-cli","run Prisma CLI commands","Prisma ORM CLI commands reference covering init, generate, migrate, db, dev, studio, validate, format, debug, and mcp. Use for ORM\u002Fdatabase CLI workflows, not Prisma Compute app deployment. For Prisma Compute, `@prisma\u002Fcli app deploy`, `compute:deploy`, `create-prisma --deploy`, apps, deployments, logs, or domains, use the `prisma-compute` skill instead. Triggers on \"prisma init\", \"prisma generate\", \"prisma migrate\", \"prisma db\", \"prisma studio\", \"prisma mcp\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5102,5105,5106,5107,5108],{"name":5103,"slug":5104,"type":15},"CLI","cli",{"name":17,"slug":18,"type":15},{"name":4983,"slug":4984,"type":15},{"name":20,"slug":21,"type":15},{"name":9,"slug":8,"type":15},44,"https:\u002F\u002Fgithub.com\u002Fprisma\u002Fskills","2026-04-06T18:48:29.140467",21]