Skip to content

Rework the command surface: explicit targeting, delete verbs, workflow-grouped commands - #218

Open
wmadden-electric wants to merge 25 commits into
mainfrom
claude/kind-jennings-32a0e4
Open

Rework the command surface: explicit targeting, delete verbs, workflow-grouped commands#218
wmadden-electric wants to merge 25 commits into
mainfrom
claude/kind-jennings-32a0e4

Conversation

@wmadden-electric

@wmadden-electric wmadden-electric commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

This PR reshapes the CLI's command surface in one pass. At a glance, what a user types changes like this:

before after
prisma init (removed — use prisma project link / project create)
prisma service remove prisma service delete <name>
prisma postgres restore prisma postgres backup restore
prisma ref set staging prisma migration ref set staging
prisma migrate / prisma format prisma db migrate / prisma contract format
prisma composer dev / composer deploy prisma dev / prisma deploy
prisma service show (interactive service picker) prisma service show <name> (no picker)

The decision: the CLI is pre-rc, so we owe the old spellings nothing. Every old spelling above now gets the standard unknown-command error — no aliases, no redirects, no deprecation window. That single decision is what keeps this PR mechanical: commands move or rename, and every string that names them (help, examples, error copy, "next action" hints, tests, docs) follows.

Three ideas drive the new shape:

  1. Commands are targeted by parameters, not by ambient state. The only context a command may read from the directory is the project link (.prisma/local.json). Commands that act on a subject resource take its identifier as the first positional argument (service show <name>, with PRISMA_SERVICE_ID as the env fallback; the argument wins) plus scope flags like --branch <name>; commands targeted by a globally-unique version id (service version promote|start|stop|delete <id>, service logs --version-id <id>) need nothing else at all. Missing target → a structured SERVICE.TARGET_REQUIRED error, exit 2, before any network call — even in an interactive terminal. The interactive picker, the remembered per-project selection, and the "use the current git branch" inference are gone. What runs is what was named, which is what makes runs reproducible for humans and scriptable for agents.
  2. delete destroys, remove detaches. Six commands that permanently destroy resources were called remove; they are now delete end to end — help, consent questions, JSON output (removeddeleted), error codes (…REMOVE_FAILED…DELETE_FAILED). git disconnect and auth logout stay: they detach.
  3. Groups follow workflow, not product ownership. composer and build disappear as groups: dev and deploy are the root-level verbs of the main workflow (this also fixes their shipped help examples, which already read prisma deploy …), composer destroy/log are dropped, and the deprecated platform build runner's build logs goes with its group. ref folds into migration ref; restore sits under postgres backup because it acts on a backup.

How it's implemented. The shell owns the command tree in packages/cli/src/cli.ts, so most of the diff is that mount table plus strings. The one structural piece: the composer and ORM command families ship from their own packages, so the shell now wraps both before mounting. The composer wrapper subtracts destroy/log (by subtraction, so a new upstream command still trips the completeness check). The ORM wrapper rewrites shipped metadata the moves invalidated: it drops the package's migration refref redirect (which would collide with the now-live migration ref mounts at construction time), respells the migration apply redirect's replacement to db migrate, and respells the six commands' help examples whose mount path differs from their family key.

Also removed outright: the deprecated prisma.compute.ts/.json config and everything that read it — the init wizard, the config-driven service targeting positional, the SERVICE.COMPUTE_CONFIG_* error codes, and the agent-status config probe (~5k lines).

Guard rails. The grammar-completeness test (packages/cli/tests/mount-coverage.test.ts) asserts the mounted tree equals the agreed 86-command tree, and runs before publish. Docs, both package READMEs, and the product convention docs (including the new delete/remove verb rule) are updated in the same PR. Verified: pnpm typecheck, pnpm lint, unit suites (841 + 11 passed), pnpm check:grammar; e2e runs in CI (local run skipped without credentials).

Alternatives considered.

  • Aliases or redirects for old spellings — rejected: pre-rc there is no installed base to migrate, and the deployment-subgroup rename already set the no-redirect precedent. A redirect table we ship now is debt we carry forever.
  • Editing the composer/orm-toolchain packages instead of wrapping them — rejected for this PR: those live in other repos on their own release trains. Wrapping keeps this a single-repo change; the upstream retirements are recorded as follow-ups.
  • Keeping the interactive service picker for humans and requiring flags only for scripts — rejected: two resolution paths for one command make target resolution unpredictable, and the picker silently depended on remembered local state that no longer exists.

🤖 Generated with Claude Code

ADR-012 vocabulary (added in review). pdp-control-plane ADR-012 retires "Deployment" as a noun — a deploy produces a Version — so this PR also lands that rename on the CLI surface before any rc teaches users the retired word: service deployment * is service version *, JSON fields and error codes respell (deploymentversion, SERVICE.DEPLOYMENT_*SERVICE.VERSION_*, …), and prose says "service version". The wire layer (/v1/deployments, compute-sdk names, appId) deliberately keeps platform vocabulary until the platform's own coordinated rename; the adapter in lib/app/app-provider.ts is the seam where the two meet.

The compute config it wrote is unsupported, so the wizard that
created it goes with it.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Service commands drop the config-target positional and resolve the
project from the invocation directory's link file alone. Agent setup
status and the state directory no longer walk up to a config file.
The local build-and-deploy path the config fed had no callers left,
so app-provider loses deployApp with it.

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>
pnpm --recursive exec tsc --noEmit fails on packages/tsconfig, which has
no typescript dependency. The root typecheck script (turbo run typecheck,
per-package tsc --noEmit) already covers every TypeScript package.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Every service command that acts on an existing service now resolves it
from --service (by name) or PRISMA_SERVICE_ID (by id, the domain-flow
mechanics generalized), with the flag winning. Neither present settles
SERVICE.TARGET_REQUIRED at exit 2, interactive terminals included: the
interactive picker, the saved selection (rememberSelectedService,
LocalStateStore.readSelectedApp/setSelectedApp/clearSelectedApp, the
selectedByProject state shape), and service remove's selection cleanup
are gone. Branch targeting is --branch only: the git-branch inference
is deleted, read flows keep their "main" default and the domain flow
keeps "production" with its production-only check.

lib/git/local-branch.ts stays: controllers/app-env.ts (project env
scope resolution, outside this change's scope) still imports it.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
- project/link.ts: linkDirectoryToProject's doc comment no longer
  claims init runs it; the export drops to in-file scope, its only use.
- cli.ts and mount-coverage note that orm init keeps its path; only the
  top-level init (the compute config wizard) was removed (2026-08-21 PM
  review).
- service/target.ts: resolveServiceProjectContext loses the projectDir
  option no caller passed.
- state-dir.ts: resolveStateDir is synchronous and takes no signal; it
  only joins paths. Call sites adjusted.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
project delete, project env delete, postgres delete, postgres
connection delete, service delete, and service domain delete replace
their remove spellings everywhere: mount paths, source file names,
exported symbols, result types (removed: true becomes deleted: true),
help, examples, next actions, error copy, consent questions, progress
step/status names, unit tests, and e2e describeCommand markers. No
aliases or redirects for the old spellings.

Error codes tied to these commands follow the verb:
SERVICE.REMOVE_FAILED -> SERVICE.DELETE_FAILED, PROJECT_REMOVE_BLOCKED
-> PROJECT_DELETE_BLOCKED (PROJECT.DELETE_BLOCKED). The unused legacy
AppRemoveResult / AppDomainRemoveResult types are deleted. git
disconnect, auth logout, bucket delete, and provider-internal
removeApp/removeProject/removeDatabase/removeConnection/removeDomain
helpers are untouched.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
- service logs --deployment decides scoped-vs-global on whether any
  service target was requested: PRISMA_SERVICE_ID now scopes the lookup
  exactly like --service (D2-1), with tests for the missing-target
  refusal, the service-scoped path and its not-in-this-service
  refusal, and the env-var-scoped path (D2-2).
- ServiceShowResult.service and ServiceDeploymentListResult.service are
  non-null; the "not selected" presenter fallbacks are gone (D2-3).
- ResolveProjectOptions.projectDir deleted; the invocation directory is
  the only pin location (D2-4).
- User-facing copy no longer says "selected service" — the service is
  named, not selected (D2-5).
- serviceTargetRequiredError keeps why to the cause; the
  PRISMA_SERVICE_ID alternative is its own nextActions entry so --json
  consumers see it (D2-6).

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
The mounted tree now equals the slice spec's acceptance tree:
postgres restore moves under postgres backup, ref list|set|delete move
under migration ref, migrate becomes db migrate, format becomes
contract format, and composer's dev and deploy mount at the root. The
composer group, composer destroy, composer log, and the build group
(build logs and its sources and tests) are gone. No aliases or
redirects for the old spellings.

Both external families are re-wrapped with defineCommandFamily,
keeping their configSection and docsBaseUrl. Composer keeps only
deploy and dev, so mount-coverage's family-completeness check stays
honest about the dropped commands. The ORM family passes its commands
through but rewrites its shipped redirects: the migration ref entry is
dropped (that spelling is live again, and mounting it with the
redirect in place fails buildCli's collision check) and migration
apply's replacement is respelled to db migrate.

Root help examples end as auth login, project list, deploy. Coverage
tables, group briefs (postgres backup now covers restore; migration
ref is new), and the bin/orm-mount/postgres tests follow. The
cli-engine redirect fixtures are synthetic and stay as they are.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
- Provider-layer failure summaries follow the verb rename: deleting a
  project, database, database connection, or custom domain now fails
  as "Failed to delete …", and the env branch-not-found why-text says
  delete. A postgres delete failure test pins the summary.
- validateKey narrows to its reachable commands (add | update); the
  unreachable remove template branch goes with it.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Command tables and prose in both package READMEs, the root README,
packages/cli/AGENTS.md, and the example READMEs now name the live
tree: deploy and dev at the root, delete for the destroying commands,
postgres backup restore, and the ORM groups without top-level
migrate/format/init. command-principles drops init from the stable
groups, respells migrate as db, and states the verb rule (delete
destroys, remove detaches). The style/output guides use auth login as
the first-run banner example; error-conventions drops the removed
compute-config and init codes and follows the DELETE_BLOCKED /
DELETE_FAILED renames; cli-engine-requirements respells db migrate
and orm init; output-conventions loses the compute-config build
settings bullet and respells the connection delete rows.

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>
…mand-review

Each s2 parity record that documents a renamed or moved command gets a
short dated entry (2026-08-21 PM review); command-inventory.md gets a
pointer note. command-review.md is recreated in the 76a2c8a format
against the new 86-command tree.

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>
- The wrapped ORM family respells the moved commands' shipped help
  examples to their mounted paths (contract format, db migrate,
  migration ref list|set|delete); a rendered-help test pins that no
  retired spelling survives in any of the five (D4-1).
- The composer wrap subtracts destroy and log from the source family
  instead of selecting deploy and dev, so a command composer adds
  upstream reaches the wrapped family and mount-coverage flags it
  until the shell mounts it (D4-2).

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>
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 147 files, which is 47 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4323f55b-d393-415f-89b0-c8217f082924

📥 Commits

Reviewing files that changed from the base of the PR and between 87ffd44 and 840c748.

📒 Files selected for processing (147)
  • .drive/projects/prisma-cli-v8/assets/command-review.md
  • .drive/projects/prisma-cli-v8/assets/s2/command-inventory.md
  • .drive/projects/prisma-cli-v8/assets/s2/parity-divergences-s3.md
  • .drive/projects/prisma-cli-v8/assets/s2/parity-divergences-s7.md
  • .drive/projects/prisma-cli-v8/assets/s2/parity-divergences-s8.md
  • .drive/projects/prisma-cli-v8/assets/s2/parity-divergences-service-logs.md
  • .drive/projects/prisma-cli-v8/assets/s2/parity-divergences.md
  • .drive/projects/prisma-cli-v8/deferred.md
  • .drive/projects/prisma-cli-v8/plans/command-grammar-cleanup.md
  • .drive/projects/prisma-cli-v8/specs/command-grammar-cleanup.md
  • AGENTS.md
  • README.md
  • docs/architecture/cli-engine-requirements.md
  • docs/product/cli-style-guide.md
  • docs/product/command-principles.md
  • docs/product/error-conventions.md
  • docs/product/output-conventions.md
  • examples/hello-world/README.md
  • examples/next-smoke/README.md
  • packages/cli/AGENTS.md
  • packages/cli/README.md
  • packages/cli/e2e/deployed-service.ts
  • packages/cli/e2e/init.e2e.ts
  • packages/cli/e2e/postgres.e2e.ts
  • packages/cli/e2e/project-lifecycle.e2e.ts
  • packages/cli/e2e/project-read.e2e.ts
  • packages/cli/e2e/scratch.ts
  • packages/cli/e2e/service-version.e2e.ts
  • packages/cli/e2e/service.e2e.ts
  • packages/cli/src/adapters/local-state.ts
  • packages/cli/src/cli.ts
  • packages/cli/src/commands/agent/install.ts
  • packages/cli/src/commands/agent/status.ts
  • packages/cli/src/commands/auth/agent-setup-tip.ts
  • packages/cli/src/commands/build/logs.ts
  • packages/cli/src/commands/init/agent-setup.ts
  • packages/cli/src/commands/init/config-file.ts
  • packages/cli/src/commands/init/errors.ts
  • packages/cli/src/commands/init/init.ts
  • packages/cli/src/commands/init/link.ts
  • packages/cli/src/commands/init/presentation.ts
  • packages/cli/src/commands/init/settings.ts
  • packages/cli/src/commands/init/types-install.ts
  • packages/cli/src/commands/init/types.ts
  • packages/cli/src/commands/postgres/backup-restore.ts
  • packages/cli/src/commands/postgres/connection-delete.ts
  • packages/cli/src/commands/postgres/context.ts
  • packages/cli/src/commands/postgres/delete.ts
  • packages/cli/src/commands/project/delete.ts
  • packages/cli/src/commands/project/env-delete.ts
  • packages/cli/src/commands/project/env-list.ts
  • packages/cli/src/commands/project/env-shared.ts
  • packages/cli/src/commands/project/errors.ts
  • packages/cli/src/commands/project/link.ts
  • packages/cli/src/commands/project/presentation.ts
  • packages/cli/src/commands/project/show.ts
  • packages/cli/src/commands/service/create.ts
  • packages/cli/src/commands/service/delete.ts
  • packages/cli/src/commands/service/deployment-delete.ts
  • packages/cli/src/commands/service/deployment-list.ts
  • packages/cli/src/commands/service/deployment-promote.ts
  • packages/cli/src/commands/service/deployment-run-state.ts
  • packages/cli/src/commands/service/deployment-show.ts
  • packages/cli/src/commands/service/deployment-start.ts
  • packages/cli/src/commands/service/deployment-stop.ts
  • packages/cli/src/commands/service/domain-add.ts
  • packages/cli/src/commands/service/domain-delete.ts
  • packages/cli/src/commands/service/domain-retry.ts
  • packages/cli/src/commands/service/domain-shared.ts
  • packages/cli/src/commands/service/domain-show.ts
  • packages/cli/src/commands/service/domain-wait.ts
  • packages/cli/src/commands/service/errors.ts
  • packages/cli/src/commands/service/list.ts
  • packages/cli/src/commands/service/logs.ts
  • packages/cli/src/commands/service/open.ts
  • packages/cli/src/commands/service/presentation.ts
  • packages/cli/src/commands/service/release.ts
  • packages/cli/src/commands/service/remove.ts
  • packages/cli/src/commands/service/results.ts
  • packages/cli/src/commands/service/show.ts
  • packages/cli/src/commands/service/target.ts
  • packages/cli/src/commands/service/version-delete.ts
  • packages/cli/src/commands/service/version-list.ts
  • packages/cli/src/commands/service/version-promote.ts
  • packages/cli/src/commands/service/version-rollback.ts
  • packages/cli/src/commands/service/version-run-state.ts
  • packages/cli/src/commands/service/version-show.ts
  • packages/cli/src/commands/service/version-start.ts
  • packages/cli/src/commands/service/version-stop.ts
  • packages/cli/src/controllers/app-env.ts
  • packages/cli/src/controllers/database.ts
  • packages/cli/src/controllers/project.ts
  • packages/cli/src/lib/agent/setup-status.ts
  • packages/cli/src/lib/app/app-provider.ts
  • packages/cli/src/lib/app/build-settings.ts
  • packages/cli/src/lib/app/build.ts
  • packages/cli/src/lib/app/bun-project.ts
  • packages/cli/src/lib/app/compute-config.ts
  • packages/cli/src/lib/app/deploy-framework.ts
  • packages/cli/src/lib/app/env-config.ts
  • packages/cli/src/lib/database/provider.ts
  • packages/cli/src/lib/git/local-branch.ts
  • packages/cli/src/lib/project/provider.ts
  • packages/cli/src/lib/project/resolution.ts
  • packages/cli/src/state-dir.ts
  • packages/cli/src/types/app-env.ts
  • packages/cli/src/types/app.ts
  • packages/cli/src/types/database.ts
  • packages/cli/src/types/init.ts
  • packages/cli/src/types/project.ts
  • packages/cli/tests/agent.test.ts
  • packages/cli/tests/app-build.test.ts
  • packages/cli/tests/app-bun-compat.test.ts
  • packages/cli/tests/app-provider.test.ts
  • packages/cli/tests/app-state.test.ts
  • packages/cli/tests/bin.test.ts
  • packages/cli/tests/build-logs.test.ts
  • packages/cli/tests/compute-config.test.ts
  • packages/cli/tests/e2e-coverage.test.ts
  • packages/cli/tests/init-agent-setup.test.ts
  • packages/cli/tests/init.test.ts
  • packages/cli/tests/local-branch.test.ts
  • packages/cli/tests/mount-coverage.test.ts
  • packages/cli/tests/orm-mount.test.ts
  • packages/cli/tests/postgres.test.ts
  • packages/cli/tests/project-resolution.test.ts
  • packages/cli/tests/project.test.ts
  • packages/cli/tests/service-compute-config.test.ts
  • packages/cli/tests/service-create.test.ts
  • packages/cli/tests/service-delete.test.ts
  • packages/cli/tests/service-domain.test.ts
  • packages/cli/tests/service-list.test.ts
  • packages/cli/tests/service-logs.test.ts
  • packages/cli/tests/service-open.test.ts
  • packages/cli/tests/service-session.test.ts
  • packages/cli/tests/service-show.test.ts
  • packages/cli/tests/service-testkit.ts
  • packages/cli/tests/service-version-delete.test.ts
  • packages/cli/tests/service-version-list.test.ts
  • packages/cli/tests/service-version-promote.test.ts
  • packages/cli/tests/service-version-rollback.test.ts
  • packages/cli/tests/service-version-show.test.ts
  • packages/cli/tests/service-version-start.test.ts
  • packages/cli/tests/service-version-stop.test.ts
  • packages/prisma/README.md
  • scripts/output-gallery/build.mjs
  • scripts/output-gallery/capture.zsh

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Aug 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

npx https://pkg.pr.new/@prisma/cli@218
npx https://pkg.pr.new/@prisma/cli-engine@218

commit: 840c748

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
- orm init joins the ORM mount respellings: its six shipped help
  examples now render as orm init, pinned by a sixth row in the
  rendered-help test and init in the retired-spelling check (D5-1).
- The output gallery drops its two init shots (init --help and the
  hono wizard run) and the wizard's caption panel; both would now
  capture an unknown-command error (D5-2).

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>
@wmadden-electric wmadden-electric changed the title Command grammar cleanup: parameter-only targeting, delete verbs, final mounts Rework the command surface: explicit targeting, delete verbs, workflow-grouped commands Aug 21, 2026
Review of the grammar-cleanup branch surfaced that removing the
git-branch inference left most service commands with no way to reach a
service on a non-default branch, and that many help examples and
next-action hints named invocations the new parameter-only grammar
refuses.

- service show/open/logs and every service deployment verb take
  --branch, threaded into the existing branchName resolution, so
  preview-branch services and deployments are reachable again.
- An empty --branch is refused centrally in the target resolvers
  instead of only in service delete, and the error's copy no longer
  describes the deleted git inference.
- Every shipped help example and next-action hint that named a service
  command now carries --service — interpolated where the name is in
  scope, a <name> placeholder where it is not — and
  projectDeleteBlockedError suggests the flags-only service delete
  shape. After service delete, the next action is service list, since
  nothing service-scoped can run.
- The knownLiveDeployment local state had no writers left: the schema,
  its store methods, and service delete's cleanup pass are gone.
- resolveServiceReleaseState had become a passthrough around
  resolveServiceReadState; the callers use the read state directly.
- types/app.ts kept ~18 interfaces nothing produced; the two live
  domain types moved into service/results.ts as ServiceDomainStatus and
  ServiceDomainDnsRecord.
- New/edited markdown prose is unwrapped to one line per paragraph.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…oyments by id alone

Operator ruling on the review round: any command that operates on a
subject resource takes that resource's identifier as its first
positional argument — the established CLI convention — and flags only
scope or qualify. Recorded as "Subjects are positional" in
docs/product/command-principles.md and as a dated amendment in the
slice spec.

- service show/open/logs/delete and service deployment list/rollback
  take the service name as an optional positional (PRISMA_SERVICE_ID
  stays as the env fallback; neither present is still the
  SERVICE.TARGET_REQUIRED refusal, its copy respelled).
- service deployment promote/start/stop/delete and service logs
  --deployment are targeted by the globally-unique deployment id alone,
  resolved through the same global lookup service deployment show
  always used (a shared resolveDeploymentSubject). They take no
  --service, --project, or --branch, and their results drop projectId,
  matching deployment show. SERVICE.DEPLOYMENT_OUTSIDE_PROJECT is gone
  with the project check it belonged to.
- project show takes the project as an optional positional instead of
  --project, with a retryCommand override so the shared project-setup
  hint stops suggesting a flag the command no longer has.
- Domain commands keep --service as a scope flag: their positional is
  the hostname, and the management API has no global hostname lookup.
  The API's missing deployment-to-service lookup (each id-targeted run
  pays a project-by-project scan) is recorded in the deferred ledger.
- Help examples, error hints, unit tests, and the e2e suite follow the
  new grammar.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Operator ruling: extend parameters-only targeting to project env. A
bare `project env list` now lists the overview of every scope instead
of resolving the checkout's branch against the platform; --role and
--branch are the only scope selectors, as they already were for
add/update/delete. readLocalGitBranch and lib/git/local-branch.ts are
deleted — nothing else imported them — and the "local-git" target
source is gone from the list result shape.

Also sharpened the deferred-ledger entry on deployment lookups with
what the API actually returns: GET /v1/deployments/{id} omits the
parent appId, which is why the CLI scans for the owner. The fix
belongs in pdp-control-plane's deployment representation.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Operator ruling: the env var existed for the headless app deploy flow,
which this PR already deleted; the domain commands were its only
surviving reader, by accident rather than decision. Project targeting
is --project and the link file. The envProjectId option and the
allowEnvProjectId split between resolveProjectTarget and
inspectProjectBinding collapse with it, and the "env" project source
leaves the result types.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…ys so

pdp-control-plane ADR-012 retires "Deployment" as a noun — a deploy
produces a Version — and the CLI adopts it now, pre-rc, before any
release teaches users the retired word.

- Commands: service deployment list|show|promote|rollback|start|stop|
  delete mount as service version …; service logs --deployment becomes
  --version-id (the engine reserves the flag name "version" for the
  shared --version flag).
- JSON contract: deployment→version, deployments→versions,
  deploymentId→versionId, liveDeployment→liveVersion,
  recentDeployments→recentVersions, previousLiveDeploymentId→
  previousLiveVersionId, and liveDeploymentId→liveVersionId on list
  entries. Progress steps stop-deployments/delete-deployments become
  stop-versions/delete-versions.
- Error codes: SERVICE.DEPLOYMENT_*→SERVICE.VERSION_*,
  NO_DEPLOYMENTS→NO_VERSIONS, NO_PREVIOUS_DEPLOYMENT→
  NO_PREVIOUS_VERSION, LIVE_DEPLOYMENT_UNKNOWN→LIVE_VERSION_UNKNOWN.
- Copy: help and error prose says "service version" (qualified, per
  the ADR); example ids use the real cpv_ prefix.
- The wire layer deliberately keeps platform vocabulary until the
  platform's own coordinated rename: /v1/deployments paths, compute-sdk
  names, appId, and the adapter in lib/app/app-provider.ts, which is
  the seam where the two vocabularies meet. Recorded in the ledger.
- docs/product/command-principles.md's noun table now says service and
  version; READMEs, the slice-spec amendment, tests, and the e2e suite
  follow.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
The create/show e2e asserted liveDeploymentId, liveDeployment, and
recentDeployments, which the ADR-012 rename respelled to liveVersionId,
liveVersion, and recentVersions — caught by the credentialed CI run,
which the local suite cannot reach.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant