Skip to content

Commit 220a3d7

Browse files
ankur-archclaudenurul3101
authored
docs: align Compute, Composer, Prisma 8, and Postgres docs with the current implementation (#8151)
* docs: align Compute, Composer, Prisma 8, and Postgres docs with the current implementation Validated against prisma-cli 8.0.0-rc.4, @prisma/composer 0.7.0, and @prisma/orm-postgres 8.0.0-rc.2, with the ORM quickstart, Composer dev/deploy/destroy, and a Compute app deploy run end to end. - Rewrite the Composer landing page: technical framing, a terminology section, and two ConceptAnimation flow scenes (app graph and declaration-to-runtime) in place of slogan prose. - Reconcile the two CLI generations: the unified @next CLI has no deploy verb (git push / Console / Composer); the @latest beta still ships the one-shot app deploy the homepage flows use. State this once per section instead of contradicting across pages. - Fix stale facts: rc.4 command groups and PRISMA_PROJECT_ID / PRISMA_SERVICE_ID in limitations and the CLI reference, postgres usage in pricing, effect pin 4.0.0-beta.103 for Composer 0.7.0, Node 22.18 floors. - Normalize service vs app terminology across Compute pages; explain the app/apps config keys once in configuration.mdx. - Make Prisma Postgres database-first, resolve its contradictory ORM recommendations, and add cross-product next steps (orm/v8 -> Compute, Composer stage = Compute preview branch, data- vs service-contract note in Composer databases). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs: standardize on prisma@next, complete the CLI reference, fix E2E-found gaps Standardize every Prisma 8 RC page on `npx prisma@next` and drop the repeated CLI-history callouts. Audit the Compute, Composer, and Prisma 8 CLI references against the real rc.4 help output: add the missing service logs, telemetry, feedback, auth workspace, postgres backup/connection, and bucket key commands, fix flag shapes, and list the platform command groups from the Prisma 8 CLI page. Correct the CLI config-file docs: the unified CLI reads a sectioned prisma.config.ts (defineConfig from @prisma/cli-engine wrapping an orm section), not prisma-next.config.ts. Fixes driven by a fresh E2E run (Composer quote app with a Prisma 8-typed Postgres, deployed to Compute and torn down): composer deploy works with the stored auth login session (service token is the CI path), "type": "module" is required in Composer projects, stale local dev emulators need --fresh, orm init scaffold facts, and a known-issue callout for the current create-prisma@next scaffold bugs. Restructure the Prisma 8 overview (mental model first, blog series compressed) and the Prisma Postgres overview (create → connect → query as the primary journey). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs: move platform CLI commands into the v8 CLI section as dedicated pages Each platform command group (auth, init, project, service, build, git, branch, postgres, bucket, agent, telemetry, feedback) now has its own page under /cli/v8; composer stays a sidebar link to its own reference. Platform env vars and the JSON envelope move to CLI configuration. /compute/cli-reference becomes a pointer page that keeps its URL, and inbound links across compute and postgres docs are retargeted. * docs: address CodeRabbit review findings with CLI-verified fixes - mongodb upgrade guide: add the missing 'contract emit' before 'migration plan' (verified live: without emit, plan silently uses the stale contract) - migration pages: show the CLI's real next-step hints (rc prints 'prisma-cli ...', not 'prisma-next ...') and note the bin-name quirk once per page - migration + studio pages: npm fences for plain npx commands so package-manager tabs render, matching the cli/v8 convention - cli/v8/configuration: document the verified --json NDJSON shape (envelope.error.*, envelope.nextActions) - compute/index + branching: scope the preview-isolation claim to Compute resources; data isolation depends on the preview DATABASE_URL - composer/getting-started: copyable effect-override manifests for npm and pnpm - cli/v8/auth: Afterwards -> Afterward Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs: add Prisma 7 to Prisma 8 PostgreSQL migration guide (#8152) * docs: add Prisma 7 to Prisma 8 PostgreSQL migration guide Procedural guide for migrating a Prisma 7 PostgreSQL app to Prisma 8 incrementally, with both versions running side by side: isolate Prisma 7 behind @prisma/prisma7, add prisma@next alongside it, migrate one route at a time, transfer migration ownership via baseline plan + db sign + db ref, then remove Prisma 7. Every command validated end-to-end twice in a sandbox app (Hono + Prisma Postgres via create-db): once while authoring and once replaying the finished guide from the Prisma 7 checkpoint on a fresh database. Validated against prisma@8.0.0-rc.6, @prisma/orm-postgres@8.0.0-rc.4, @prisma/cli-engine@0.2.0, @prisma/prisma7@7.10.0-dev.58. Follows the side-by-side approach of prisma/prisma8-and-7-example (step-0..step-3), with two reproduced deviations: contract infer on rc.6 omits @@Map (the guide adds it, otherwise Prisma 8 queries public.user instead of "User") and includes Prisma 7's _prisma_migrations ledger as a PrismaMigrations model (the guide deletes it). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs: editorial rewrite of the Prisma 7 to 8 PostgreSQL guide Restructure into outcome-oriented phases, add an incremental-migration overview with an explicit ownership timeline, explain the migration mental model (contract hash, migration, marker, ref) before the ownership handoff, frame that handoff as a decision point, and replace command-paraphrasing paragraphs with Check / Expected result notes. Task-oriented title. All commands, code, versions, and warnings unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> * docs: remove model-voice patterns from product landing and deploy pages Reviewer feedback on this PR identified a uniform synthetic voice across the new pages: frontmatter descriptions echoed as opening sentences, contrast slogans ("injected, not discovered", "refuses to guess"), stacked absolutes, exception-packed sentences, prose restating code, and exhaustive what-to-read- next lists. This rewrites the flagged passages on the Composer, Compute, Prisma 8, and Postgres pages without changing any technical claims, and adds a "Don't write like a model" section to the docs-writer skill so the patterns are checked on future pages. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs: address review feedback on CLI reference voice and JSON import requirements Rewrite CLI and Composer reference prose per review comments: lead with the user action, one idea per sentence, default path before exceptions, consistent user-facing terms, and caveats as direct instructions. Document the TypeScript 5.3+ / module setting requirement for the JSON import attribute in the PostgreSQL upgrade guide. Fold the same patterns into the docs-writer skill. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs: sweep remaining model-voice prose across the PR's pages Apply the reference-prose style throughout: lead with the user action, one idea per sentence, default path before exceptions, caveats as direct instructions, purposeful links, and no coined shorthand or implementation language. Commands, code blocks, captured CLI output, links, and technical claims are unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs: align agent-skills docs with the three real skill sources and surface them in skill.md Audited against the actual repositories: the prisma/skills registry (what `prisma agent install` wraps at rc.6 — all skills for claude-code+codex by default, no interactive picker), the prisma/prisma skills/ directory (the consolidated prisma-8 usage skill plus two upgrade skills, installed by `orm init`), and the single prisma-composer skill in prisma/composer. - /ai/tools/skills: per-repo source table up front, `prisma agent install` as the CLI path, version-pinning guidance for the prisma-8 skill, and a Composer skill section (it was missing entirely). - /cli/v8/agent: names the registry it installs from, states the real defaults, options as a table, and routes to the other two skill sources. - /compute/getting-started: replaces the incorrect "interactive picker" claim with what no-flags install actually does; notes the one-time `prisma init` offer. - /cli/v8/init: --skip-skills row says which skills it skips. - Both skill.md endpoints (docs + site) gain an "Installable agent skills" section so an agent that discovers Prisma via skill.md finds the three `skills add` commands and the catalog page as markdown. Validated: lint:agent-ready, lint:links, lint:spellcheck, docs+site types:check all pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Nurul Sundarani <sundarani@prisma.io>
1 parent 34f3227 commit 220a3d7

84 files changed

Lines changed: 2295 additions & 1092 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/skills/docs-writer/SKILL.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ A how-to gets the reader through a task. Two other types come up often. Same voi
6464
- List every parameter with type, whether it's required, and the default.
6565
- Give one runnable example per entry.
6666
- No narrative. The reader is scanning, not reading.
67+
- Order options the way readers need them: the common case first, then selection and targeting, then advanced or CI-specific behavior.
6768

6869
## Improving an existing page
6970

@@ -154,6 +155,27 @@ Delete these on sight. They add length, not clarity.
154155
- **Em dashes**. Use a comma, colon, or period instead.
155156
- **Hype**: don't sell inside docs. The reader already chose the product; they want it to work.
156157
158+
## Don't write like a model
159+
160+
Model-drafted docs share habits a reviewer can spot in one pass. None of these is wrong in isolation; their density is what gives a page a synthetic voice. Check for each before finishing.
161+
162+
- **Frontmatter echo**: the body's first sentence repeats the frontmatter `description` almost verbatim. The description summarizes the page for cards and search results; the opening orients the reader. Write them differently, and define the product once, not once per metadata field.
163+
- **Contrast slogans**: "X, not Y" constructions ("injected, not discovered", "built for agents, not just terminals", "refuses to guess"). One per page at most. A page of balanced contrasts reads like ad copy; state the behavior plainly instead.
164+
- **Absolute stacking**: "never", "every", "nothing", "always", "cannot drift" piling up across a page. Each absolute is a promise the product has to keep. Keep the ones you can verify and that the reader needs; describe what happens rather than asserting what can't.
165+
- **Exception-packed sentences**: one sentence carrying the normal case, an exception, its reason, the alternative, and a safety condition, held together by semicolons. One idea per sentence: state the default first ("By default, the command uses…"), then the exception as its own sentence ("In CI or other headless environments, set…"). A semicolon joining distinct ideas is usually two sentences.
166+
- **Manager-voice openers**: "`service` manages services…", "handles", "manages everything around". Lead with the user action or outcome ("Use `service` commands to manage…") and use concrete verbs: creates, stores, uses, selects, targets, deploys, builds.
167+
- **Coined shorthand**: compressed phrases invented mid-page ("local pin", "pick a target") instead of saying what actually happens. Spell out the relationship, and keep one consistent user-facing vocabulary: service, project, configuration, deployment, credentials.
168+
- **Implementation language**: internal detail that doesn't help the reader act ("the root node is `<entry>`'s default export"). Translate it into the behavior they observe ("the application exported as the default export from `<entry>`").
169+
- **Buried caveats**: a warning folded into a trailing clause. Turn it into a direct instruction: "The deploy command does not build your application. Run your build command before deploying."
170+
- **Confusable state left implicit**: when two things could be mixed up (local state vs committed configuration), contrast them directly: what is local, what is committed, and what each is used for.
171+
- **Mid-clause links**: a link dropped between unrelated clauses. Introduce it after the context it supports: "See [Deploying](…) for details."
172+
- **Definition cascade**: a landing page that defines every noun in identical rhythm ("An application is… A service is… A branch is…"). Define a term where the reader first needs it. If a glossary earns its place, keep it short and hand off to a page that goes deeper.
173+
- **Prose restating code**: after a code block, narrating what each line does. Explain only what the code can't show: why, or a non-obvious consequence.
174+
- **Triad reflex**: three-part lists everywhere ("reviewable, repeatable, and versioned"). Vary list length; cut members that don't earn their place.
175+
- **Exhaustive nav dumps**: a "What to read next" that lists every sibling page in the same grammatical form. Pick the two or three pages this reader most likely needs next; the sidebar already lists everything.
176+
177+
The same applies to PR descriptions for docs changes: write a short reviewer-facing summary of what changed and why, and put validation details (commands run, environments used) in a collapsed section. Don't paste the working session's log.
178+
157179
## Voice
158180
159181
- Calm and direct. The reader is mid-task, not browsing a landing page.
@@ -169,4 +191,5 @@ Before you finish, check:
169191
- [ ] Does each step say what it does before showing the command?
170192
- [ ] Is there a way to verify success at the end?
171193
- [ ] Did you cut every phrase from "Cut the slop"?
194+
- [ ] Did you check the page against every pattern in "Don't write like a model"?
172195
- [ ] Are product names and limitations accurate?

apps/docs/content/docs/(index)/getting-started.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ metaTitle: Prisma 7 getting started
66
metaDescription: Choose the fastest Prisma 7 setup path. Quickstarts and existing-project guides for Prisma ORM 7, Prisma Postgres, and Prisma Compute, plus an agent prompt.
77
---
88

9-
Prisma 7 is the current generally available release of Prisma ORM, and `npx prisma@latest init` installs it. This page collects the Prisma 7 starting points: start a new project, add Prisma to an existing one, then deploy.
9+
Prisma 7 is the current generally available release of Prisma ORM. Install it with `npx prisma@latest init`. This page collects the Prisma 7 starting points: start a new project, add Prisma to an existing one, then deploy.
1010

1111
:::note
1212

13-
Starting a new project? [Prisma 8](/v8) is the recommended path for new apps. It is the next major version of Prisma ORM, now available as a Release Candidate. The [getting started page](/) covers it.
13+
Starting a new project? [Prisma 8](/v8) is the recommended path for new apps. It is the next major version of Prisma ORM, now available as a Release Candidate. To start with Prisma 8, see the [getting started page](/).
1414

1515
:::
1616

@@ -41,10 +41,10 @@ Once your app runs locally, [Prisma Compute](/compute) (currently in Public Beta
4141

4242
1. Sign in with `npx @prisma/cli@latest auth login`.
4343
2. Run `npx @prisma/cli@latest app deploy` from your app directory to get a live URL, adding `--env .env` so environment variables like `DATABASE_URL` reach the deployment.
44-
3. `--env .env` applies to that one deployment. Persist variables for future deploys with `npx @prisma/cli@latest project env add --file .env --role production`; see [environment variables](/compute/environment-variables).
44+
3. `--env .env` applies to that one deployment. Persist variables for future deployments with `npx @prisma/cli@latest project env add --file .env --role production`. See [environment variables](/compute/environment-variables).
4545
4. Keep deploying from the CLI, or [connect GitHub](/compute/github) to deploy on push.
4646

47-
The [deploy guide](/prisma-compute/deploy) covers build settings, frameworks, and troubleshooting.
47+
`app deploy` is part of the earlier beta CLI (`@prisma/cli@latest`). The Prisma 8 RC CLI (`prisma@next`) that the [Compute docs](/compute) describe deploys through a git push, the Console, or [Prisma Composer](/composer) instead. Both CLIs talk to the same platform. For the git-push path, follow the [deploy quickstart](/prisma-compute/deploy).
4848

4949
## Use with your agent
5050

apps/docs/content/docs/(index)/index.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ If I have not told you which framework, stop and ask before scaffolding. Valid -
5151
5252
1. Scaffold the app: `npx create-prisma@next create my-app --template [framework] --provider postgres --prisma-postgres --yes`. The `--prisma-postgres` flag provisions a Prisma Postgres database. If I give you a connection string, pass `--database-url "<url>"` instead of `--prisma-postgres`.
5353
2. From the project directory, apply the starter contract and seed: `npm run db:init`, then `npm run db:seed`. If seeding fails with `Cannot read properties of undefined (reading 'where')`, change `db.orm.User` to `db.orm.public.User` in `src/prisma/seed.ts`, `src/prisma/users.ts`, and any route files that query `db.orm`, then rerun.
54-
3. Edit the starter contract under `src/prisma/` into a small schema for my use case, then run `npm run contract:emit` and plan and apply the migration: `npx @prisma/cli@next migration plan`, then `npx @prisma/cli@next migrate --yes`. Migration planning diffs the emitted contract, so the emit step is required.
54+
3. Edit the starter contract under `src/prisma/` into a small schema for my use case, then run `npm run contract:emit` and plan and apply the migration: `npx prisma@next migration plan`, then `npx prisma@next migrate --yes`. Migration planning diffs the emitted contract, so the emit step is required.
5555
4. Update the seed script and the app routes to query the new schema, start `npm run dev` in the background, and verify with a request against the running app. For the `nest` template, if routes return 500s with `reading 'findAll'` in the logs, add explicit `@Inject()` tokens as shown in https://www.prisma.io/docs/guides/v8/frameworks/nestjs.md.
5656
5. Deploy with Prisma Compute. First apply the framework's deploy requirement from the guide at https://www.prisma.io/docs/guides/v8/frameworks/[guide].md, where [guide] is the template name except: template `next` → guide `nextjs`, `nest` → `nestjs`, `svelte` → `sveltekit`. The requirements: Next.js needs `output: "standalone"` in `next.config.ts` (without it the deployed app returns 504s), TanStack Start needs the nitro build plugin, Astro needs the `@astrojs/node` adapter plus `--env HOST=0.0.0.0`, and Elysia needs `--framework bun --entry src/index.ts` on the deploy command. If the template is `svelte`, skip this step; Compute does not support SvelteKit yet. Check `npx @prisma/cli@latest auth whoami`. If I am not signed in, stop and ask me to run `npx @prisma/cli@latest auth login`, because that step opens a browser. Then run `npx @prisma/cli@latest app deploy --create-project my-app --env .env` so DATABASE_URL reaches the deployment, and verify the deployed URL with curl.
5757
@@ -79,7 +79,7 @@ If you're using Express or another Node.js server, follow the [existing-project
7979

8080
</SectionRow>
8181

82-
<SectionRow title="Using Prisma 7?" description="Prisma 7 is the current generally available release of Prisma ORM, fully supported, and `npx prisma@latest init` installs it. It pairs with Prisma Postgres and Prisma Compute the same way. When you're ready, Prisma 8 is the upgrade path.">
82+
<SectionRow title="Using Prisma 7?" description="Prisma 7 is the current generally available release of Prisma ORM and remains fully supported. Install it with `npx prisma@latest init`. It pairs with Prisma Postgres and Prisma Compute the same way. When you're ready, Prisma 8 is the upgrade path.">
8383

8484
<IconGrid>
8585
<IconLink href="/getting-started" title="Prisma 7 setup paths" description="All database quickstarts, plus the agent prompt" icon={<Milestone />} />
@@ -107,9 +107,9 @@ Add Prisma 8 to this existing project.
107107
108108
This flow is for PostgreSQL. If the project uses MongoDB, follow https://www.prisma.io/docs/v8/add-to-existing-project/mongodb.md instead; for other databases, stop and tell me.
109109
110-
1. Run `npx @prisma/cli@next orm init`. It writes `prisma-next.config.ts`, a starter contract and `db.ts` under `src/prisma/`, and installs Prisma 8 skills for you.
110+
1. Run `npx prisma@next orm init`. It writes `prisma.config.ts`, a starter contract and `db.ts` under `src/prisma/`, and installs Prisma 8 skills for you.
111111
2. Set `DATABASE_URL` in `.env` to my database. If I did not give you one, create a Prisma Postgres database with `npx create-db@latest`, put its connection string in `.env`, and show me the claim URL it prints so I can keep the database.
112-
3. If the database already has tables, infer the contract from it: `npx @prisma/cli@next contract infer`, then `npx @prisma/cli@next contract emit`, then sign it with `npx @prisma/cli@next db sign`. If the database is empty, keep the starter contract and run `npx @prisma/cli@next db init`.
112+
3. If the database already has tables, infer the contract from it: `npx prisma@next contract infer`, then `npx prisma@next contract emit`, then sign it with `npx prisma@next db sign`. If the database is empty, keep the starter contract and run `npx prisma@next db init`.
113113
4. Write one query with the generated `db` client in an existing code path, run it, and show me the returned rows.
114114
115115
Follow https://www.prisma.io/docs/v8/add-to-existing-project/postgresql.md and the installed Prisma 8 skills.
@@ -126,7 +126,7 @@ If I have not given you a connection string, stop and ask; do not invent one. Va
126126
127127
1. Scaffold: `npx create-prisma@next create my-app --template [framework] --provider postgres --database-url "<my connection string>" --yes`.
128128
2. From the project directory: `npm run db:init`, then `npm run db:seed`, then start `npm run dev` in the background and verify the sample query returns data. If seeding fails with `Cannot read properties of undefined (reading 'where')`, change `db.orm.User` to `db.orm.public.User` in `src/prisma/seed.ts`, `src/prisma/users.ts`, and any route files that query `db.orm`, then rerun.
129-
3. Evolve the starter contract under `src/prisma/` into my schema, then run `npm run contract:emit`, `npx @prisma/cli@next migration plan`, and `npx @prisma/cli@next migrate --yes`.
129+
3. Evolve the starter contract under `src/prisma/` into my schema, then run `npm run contract:emit`, `npx prisma@next migration plan`, and `npx prisma@next migrate --yes`.
130130
131131
Do not provision any hosted database. Use the installed Prisma 8 skills and https://www.prisma.io/docs/llms.txt for current docs.
132132
```
@@ -179,7 +179,7 @@ Current docs: https://www.prisma.io/docs/prisma-compute/deploy.md.
179179

180180
</AgentPrompt>
181181

182-
If you're using MongoDB, follow the [MongoDB quickstart](/v8/quickstart/mongodb) or [add Prisma 8 to an existing MongoDB app](/v8/add-to-existing-project/mongodb). If you work with [Kysely](/prisma-postgres/quickstart/kysely), [Drizzle](/prisma-postgres/quickstart/drizzle-orm), or [TypeORM](/prisma-postgres/quickstart/typeorm), the Prisma Postgres quickstarts cover those tools.
182+
If you're using MongoDB, follow the [MongoDB quickstart](/v8/quickstart/mongodb) or [add Prisma 8 to an existing MongoDB app](/v8/add-to-existing-project/mongodb). If you work with [Kysely](/prisma-postgres/quickstart/kysely), [Drizzle](/prisma-postgres/quickstart/drizzle-orm), or [TypeORM](/prisma-postgres/quickstart/typeorm), follow the Prisma Postgres quickstart for that tool.
183183

184184
</ModalRow>
185185

0 commit comments

Comments
 (0)