Skip to content

Commit be0d4d9

Browse files
docs(cli): agent skills in a workspace live at the root (prisma 8.0.0-rc.38), and regenerate the CLI error reference (#9029)
* docs(cli): skills in a workspace use the workspace root, as since prisma 8.0.0-rc.38 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> * docs(cli): regenerate the CLI error reference from prisma 8.0.0-rc.39 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> * docs(cli): address review of the workspace skills pages Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> * docs(cli): limit the --postinstall advice to packages outside a workspace Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> * docs(cli): say where to record no agents in a workspace member Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> * docs(cli): label the scaffold example as the case outside a workspace member Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> --------- Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent a471aed commit be0d4d9

5 files changed

Lines changed: 65 additions & 15 deletions

File tree

‎apps/docs/content/docs/ai/tools/skills.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ The Prisma ORM docs reference the `prisma-8` skill in each page's "Use with your
121121
npx prisma skills sync
122122
```
123123

124-
[`npx prisma@latest init`](/cli/init) runs the same sync and also adds a `postinstall` hook that repeats it after every install and upgrade. If the project has the Prisma ORM 7 CLI installed, write `npx prisma@latest skills sync`, because the version 7 CLI has no `skills` command.
124+
[`npx prisma@latest init`](/cli/init) runs the same sync and also adds a `postinstall` hook that repeats it after every install and upgrade. In a package-manager workspace, run it at the workspace root; see [Skills in a workspace](/cli/skills#in-a-workspace). If the project has the Prisma ORM 7 CLI installed, write `npx prisma@latest skills sync`, because the version 7 CLI has no `skills` command.
125125

126126
If you want the skill without installing the package, `npx skills add prisma/composer` still reads the [prisma/composer](https://github.com/prisma/composer) repository. That is a fallback: nothing keeps a copy installed that way up to date.
127127

‎apps/docs/content/docs/cli/configuration.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ export default definePrismaConfig({
330330
| `agents` | The agent harnesses `skills sync` writes and `skills list` reports: `claude`, `cursor`, `agents`, `devin`. An empty array records that no agent skills are wanted, and the next `skills sync` removes the copies already on disk. Default: all of them. |
331331
| `check` | Set `false` to stop commands reporting out-of-date skills, for everyone working in the project. Default: `true`. |
332332

333-
[`init`](/cli/init) scaffolds this section for you.
333+
[`init`](/cli/init) scaffolds this section for you. In a package-manager workspace, the settings come from the workspace root's config, and a `skills` section in a workspace member's own config has no effect; see [Skills in a workspace](/cli/skills#in-a-workspace).
334334

335335
## Database URLs
336336

‎apps/docs/content/docs/cli/error-reference.mdx‎

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ metaDescription: The structured error codes of the Prisma CLI platform commands,
77
---
88

99
{/* Generated by scripts/generate-error-reference.mjs from
10-
https://github.com/prisma/prisma-cli/blob/v8.0.0-rc.36/docs/reference/error-reference.md
10+
https://github.com/prisma/prisma-cli/blob/v8.0.0-rc.39/docs/reference/error-reference.md
1111
Do not edit by hand. The sync workflow overwrites changes. */}
1212
{/* lint-versions-ignore-file: the page is the release's own error reference, and the earlier versions it names are history written by that release. */}
1313

14-
Every user-facing error the unified Prisma CLI emits is a structured envelope identified by a dotted `NAMESPACE.SUBCODE` code (see [Error Conventions](https://github.com/prisma/prisma-cli/blob/v8.0.0-rc.36/docs/product/error-conventions.md) and [ADR 0003](https://github.com/prisma/prisma-cli/blob/v8.0.0-rc.36/docs/architecture/adrs/0003-structured-output-and-errors.md)). This page lists the codes from every `prisma` command except the Prisma ORM ones. The codes from `prisma contract`, `prisma db`, `prisma migration`, and `prisma orm`, and the codes your app can raise at runtime, are on the [Prisma ORM error reference](/orm/reference/error-reference). When an error prints a `docsUrl`, that link opens the code's entry on this page. This page is generated from the `prisma/prisma-cli` repository.
14+
Every user-facing error the unified Prisma CLI emits is a structured envelope identified by a dotted `NAMESPACE.SUBCODE` code (see [Error Conventions](https://github.com/prisma/prisma-cli/blob/v8.0.0-rc.39/docs/product/error-conventions.md) and [ADR 0003](https://github.com/prisma/prisma-cli/blob/v8.0.0-rc.39/docs/architecture/adrs/0003-structured-output-and-errors.md)). This page lists the codes from every `prisma` command except the Prisma ORM ones. The codes from `prisma contract`, `prisma db`, `prisma migration`, and `prisma orm`, and the codes your app can raise at runtime, are on the [Prisma ORM error reference](/orm/reference/error-reference). When an error prints a `docsUrl`, that link opens the code's entry on this page. This page is generated from the `prisma/prisma-cli` repository.
1515

1616
One exception: the `CLI.*` codes on this page come from the command-line layer that every `prisma` command runs through, for its arguments, for loading `prisma.config.ts`, for prompts, and for consent. They are on this page even when you ran a Prisma ORM command. `CLI.CONFIG_SECTION_INVALID` from `prisma contract emit` is one of them. When a Prisma ORM command raises one of them, its `docsUrl` points to the [Prisma ORM error reference](/orm/reference/error-reference) instead of this page. The Prisma ORM commands also raise `CLI.*` codes of their own, and those are on the [Prisma ORM error reference](/orm/reference/error-reference). If a `CLI.*` code is not on this page, it is on the other.
1717

1818
Recognize an error programmatically by running with `--json` and matching on `error.code` in the emitted envelope — never on message text. Envelopes carry `message`, and optionally `why`, `fix`, `where`, `meta`, `cause`, `nextActions`, and `docsUrl`.
1919

20-
Most codes on this page are expected failures. Some are warn-severity diagnostics that ride a successful run: the command completes and exits `0`, and the diagnostic carries the code (the entry says so where it applies). The process exit-code contract is in [Error Conventions](https://github.com/prisma/prisma-cli/blob/v8.0.0-rc.36/docs/product/error-conventions.md).
20+
Most codes on this page are expected failures. Some are warn-severity diagnostics that ride a successful run: the command completes and exits `0`, and the diagnostic carries the code (the entry says so where it applies). The process exit-code contract is in [Error Conventions](https://github.com/prisma/prisma-cli/blob/v8.0.0-rc.39/docs/product/error-conventions.md).
2121

2222
Codes raised by the command families the CLI mounts are listed here too, because the hosted reference is where their errors' docs links point. `pnpm check:error-reference` verifies only the codes in this repository's source, so a family's entries are kept current by hand when the CLI moves to a new release of that family.
2323

@@ -31,7 +31,7 @@ Namespaces on this page:
3131
- [`BUCKET`](#bucket): Bucket and bucket-key management (`prisma bucket`)
3232
- [`CLI`](#cli): Engine-level invocation: arguments, config loading, prompts, consent, credentials, child processes
3333
- [`CONFIG`](#config): The `composer` section of `prisma.config.ts` and its `config` and `secrets` adapters (`prisma dev`, `prisma deploy`)
34-
- [`DEPLOY`](#deploy): Deploying, listing and destroying a Composer app (`prisma deploy`, `prisma deploy list`, and the `deploy` and `destroy` operations of `@prisma/composer/control`)
34+
- [`DEPLOY`](#deploy): Deploying, listing and destroying a Composer app (`prisma deploy`, `prisma deploy list`, and the `deploy` and `destroy` operations of `@prisma/composer/control`), and building the one Service of a repository with no Composer config (`prisma deploy`), whose codes start with `DEPLOY.SERVICE_`
3535
- [`DEV`](#dev): Running an app on this machine with Composer (`prisma dev`, `prisma dev url`, `prisma dev stop`, `prisma emulator list`)
3636
- [`FEEDBACK`](#feedback): Sending product feedback (`prisma feedback`)
3737
- [`GIT`](#git): Git repository connections (`prisma git`)
@@ -247,6 +247,10 @@ An answer could not be interpreted: not a yes/no for a confirm, not one of a sel
247247

248248
A prompt with no declared default was reached where it cannot be shown — under `--yes` or in a non-interactive session — so the run halts; the fix is to run from an interactive terminal or pass a flag that answers the prompt. Meta: none.
249249

250+
### CLI.SECOND_PACKAGE_COPY [#CLI.SECOND_PACKAGE_COPY]
251+
252+
An ORM or Composer command was refused because the project has its own copy of a Prisma package the command loads (`@prisma/orm-toolchain` or `@prisma/orm-framework`, and `@prisma/composer` for Composer commands), and the running `prisma` would load a different copy: another version, or the same version installed in another place, such as a global `prisma`. Values made by one copy are refused by the other, and what the command writes is read later by the project's own copy, so the run stops before the project's `prisma.config.ts` is evaluated. Refused are the commands that read the project's config, plus `orm init` (it loads the project's own ORM packages and writes files the project reads) and `lsp` (it loads the project's config itself); `emulator list` is not refused. The project's copies are looked for from one directory: the directory of the `--config` file (its real path, when it is a link) when one is given, otherwise the directory of the nearest `prisma.config.ts` at or above the current directory within the repository (the first directory with a `.git` entry), otherwise the current directory. From there, the nearest `node_modules/<package>` up to the repository root counts. Config files further up, and `parent` links, are not followed, so a copy beside a repository-wide config does not refuse a package's own command. Nor are files the config points to in another directory, most often the contract source: they load the packages from where they are, so a copy beside them is not compared. A package the project does not install, or whose copy cannot be read, is not checked. The summary names the first package that differs and both versions; `why` gives every differing package with both versions and both locations, and says so when the versions are equal. Next actions: when the project has its own `prisma`, it is not the one running, and it would not be refused, a run-command with the command path, and the `--config` the user gave, in a form that never downloads a package: the package manager's runner (`npx --no-install prisma`, `pnpm exec prisma`, `yarn exec prisma`, `bunx --no-install prisma`) when that `prisma` is installed in the current directory and the directory has a `package.json`, otherwise the path of its bin from the current directory, such as `../../node_modules/.bin/prisma` (`..\..\node_modules\.bin\prisma` on Windows), because the runners do not search parent folders the way Node does; the user adds their other arguments, which are left out because they can hold a database URL; when that `prisma` is reachable only through `--config`, the same advice in words. When the `prisma` the user would run is refused too, the versions to change the project's packages to, or the project's versions a `prisma` release must use; for the same version installed twice, to reinstall the project's dependencies. When the project has no `prisma`, to install it in the project and run that one. Raised by the shell before the command runs; if the check itself fails, nothing is refused. `--help` is unaffected. Exits 2. Meta: `command` (the command path, such as `db migrate`), `packages` (a list of `{ name, project: { version, path }, cli: { version, path } }`).
253+
250254
### CLI.SPAWN_FAILED [#CLI.SPAWN_FAILED]
251255

252256
`ctx.spawn` could not start the requested program, or the child's lifecycle promise rejected; the first line of the underlying failure is in `why`, and the guidance is to check the program is installed and on PATH. Meta: `command`.
@@ -367,6 +371,18 @@ Composer starts the deploy engine with Node, and no `node` was found on PATH. Th
367371

368372
An extension's preflight step failed before the engine ran, or the preflight results could not be composed into the engine's environment. On the Prisma Cloud target the preflight is the environment-variable check against the connected project and branch, so this is the code behind a failed `check environment variables` step. The underlying error's message rides in the envelope.
369373

374+
### DEPLOY.SERVICE_BUILD_FAILED [#DEPLOY.SERVICE_BUILD_FAILED]
375+
376+
`prisma deploy` in a repository with no `composer` section ran the Service's build command, and it exited with an error. Nothing was deployed. The command's output is printed before the error (in `--json` mode, as `output` events with `source: "build"`), and `meta.output` holds the end of it. The fix is to run the build command in the Service folder and fix what it reports, or to set `build` in the `service` section of `prisma.config.ts`. Meta: `command`, `seconds`, `output`.
377+
378+
### DEPLOY.SERVICE_INSTALL_FAILED [#DEPLOY.SERVICE_INSTALL_FAILED]
379+
380+
`prisma deploy` in a repository with no `composer` section ran the Service's install command, and it exited with an error. Nothing was built or deployed. The command's output is printed before the error (in `--json` mode, as `output` events with `source: "build"`), and `meta.output` holds the end of it. The fix is to run the install command in the Service folder and fix what it reports, or to set `install` in the `service` section of `prisma.config.ts`. Meta: `command`, `seconds`, `output`.
381+
382+
### DEPLOY.SERVICE_NO_START [#DEPLOY.SERVICE_NO_START]
383+
384+
`prisma deploy` in a repository with no `composer` section found no way to start the Service, so nothing was deployed. No rule matched: the `start` script is missing or runs a development server, the build wrote no folder with a server file or a static site, and the folder holds no entry file such as `index.ts`. A folder counts when the build created it or wrote a file in it. The fix is to add a `start` script to `package.json`, or to set `start` (a command) or `static` (a folder of static files) in the `service` section of `prisma.config.ts`. Meta: none.
385+
370386
### DEPLOY.STACK_WRITE_FAILED [#DEPLOY.STACK_WRITE_FAILED]
371387

372388
Writing the generated stack module at `.prisma-composer/alchemy.run.ts` failed. The file is regenerated on every run, so the fix is usually to resolve the filesystem problem (permissions, disk space) and retry. The underlying error rides as the cause.
@@ -463,7 +479,7 @@ The URL given to `prisma git connect` (or read from the local `origin` remote) d
463479

464480
### INIT.CONFIG_KEPT [#INIT.CONFIG_KEPT]
465481

466-
A warn diagnostic from `prisma init`: a `prisma.config.ts` already exists that does not configure `skills.agents`, and init never edits an existing config, so it was left untouched. The nextAction carries the exact `skills: { agents: [...] }` snippet to add to the `definePrismaConfig` call; a config that already sets `skills.agents` produces no diagnostic at all. Meta: none.
482+
A warn diagnostic from `prisma init`: a `prisma.config.ts` already exists that does not configure `skills.agents`, and init never edits an existing config, so it was left untouched. The nextAction carries the exact `skills: { agents: [...] }` snippet to add to the `definePrismaConfig` call; a config that already sets `skills.agents` produces no diagnostic at all. Inside a workspace member the same code reports that `--skills` named other agents than the workspace root's config: init synced the root config's agents, removed nothing, and left that file alone, and the nextAction carries the snippet to add to the root's `prisma.config.ts`. Meta: none.
467483

468484
### INIT.CONFIG_UNWRITABLE [#INIT.CONFIG_UNWRITABLE]
469485

@@ -635,6 +651,10 @@ A `project` or `branch` group command was invoked with unusable arguments — fo
635651

636652
A `--branch` flag was passed with an empty or whitespace-only value to a service command; the check runs before any resolution because a blank value must never fall through to the default-branch behavior of omitting the flag. The fix is to pass a non-empty branch name, or omit `--branch` to target the default branch. Meta: none.
637653

654+
### SERVICE.BRANCH_NOT_FOUND [#SERVICE.BRANCH_NOT_FOUND]
655+
656+
A `service` command was run with `--branch` naming a branch the project does not have, for example a mistyped name. The command stops before it lists or changes any service, so a mistyped branch is not reported as a missing service. `service create` never raises it, because it creates a branch it does not find. The fix is to pass a branch the project has, or omit `--branch` to use the default branch; the next actions offer `branch list` for the project. Meta: `projectId`, `branchName`.
657+
638658
### SERVICE.DEFAULT_BRANCH_MISSING [#SERVICE.DEFAULT_BRANCH_MISSING]
639659

640660
A `service` command was run without `--branch` on a project that has branches but none marked as its default, so there is no branch it can safely act on. It never guesses a branch by name. The fix is to pass `--branch` with the branch to use; the next actions also offer `branch list` for the project. Meta: `projectId`.
@@ -749,6 +769,14 @@ A service command ran without a credential that names a workspace — either no
749769

750770
An error diagnostic from validating the `skills` section of `prisma.config.ts`, surfaced by the commands that consume it (`init`, `skills sync`, `skills list`): the section is not an object, `skills.check` is not a boolean, `skills.agents` is not an array of strings, or an agent name is one this CLI does not know. Each variant's nextAction says what to write instead; code that reads the config outside a command handler (the staleness check, the post-login tip) treats an invalid config as absent and falls back to the default agent set rather than silencing the check. Meta: none.
751771

772+
### SKILLS.MEMBER_CONFIG_IGNORED [#SKILLS.MEMBER_CONFIG_IGNORED]
773+
774+
A warn diagnostic from `skills sync`, `skills list`, and an `init` whose skills sync runs, inside a workspace member: a `prisma.config.ts` on the member's own config chain declares a `skills` section, but the skills settings come from the workspace root's chain, so that section has no effect. The summary names the file; the nextAction names the root config file to move the section to. The staleness notice does not report it. Meta: none.
775+
776+
### SKILLS.MEMBER_LEFTOVER [#SKILLS.MEMBER_LEFTOVER]
777+
778+
A warn diagnostic from `skills sync` and `skills list` run inside a workspace member, about what an earlier CLI, which kept skills in the directory it ran in, left in the member. One diagnostic per kind: skill copies this CLI stamped, which nothing updates any more, a `.prisma/skills.json` opt-out that the check no longer reads, and a postinstall script that runs `skills sync`, which one hook at the workspace root makes redundant. Neither command removes anything; each nextAction says what to delete or change. Meta: `paths`, the files or directories concerned.
779+
752780
### SKILLS.UNMANAGED_DIRECTORY [#SKILLS.UNMANAGED_DIRECTORY]
753781

754782
A warn diagnostic from the skills sync (`skills sync`, and the sync step of `init`): a target agent skill directory already holds a skill this CLI does not manage, so sync left it untouched instead of installing the packaged skill there. The nextAction is to move or remove the unmanaged directory and rerun `skills sync`. Meta: none.

0 commit comments

Comments
 (0)