Back to Prisma

Walkthrough

projects/prisma7-compatibility-cli/slices/downstream-actionable-guidance/walkthrough.md

7.10.0-integration-fix-prisma-publish-token.112.7 KB
Original Source

Sources

Intent

Make downstream guidance identity-complete for the unpublished prisma7 distribution without teaching lower packages what prisma7 is. The CLI remains the only owner of executable identity, and lower packages now accept a primitive command name only where they need to render actionable user instructions.

Change map

The story

  1. The branch turns executable identity into an explicit handoff: packages/cli decides whether the user invoked prisma or prisma7, then passes only that primitive downstream.
  2. Migrate and db help stop being effectively static text and become instance-rendered surfaces, so help, examples, unknown-command output, and later recovery paths all speak with the same executable name.
  3. Runtime guidance in migrate/db is then normalized around full command strings, which preserves existing package-manager/executor formatting while swapping only the executable token that users must rerun.
  4. Generator diagnostics get the same treatment, but only for messages causally emitted by the current CLI invocation; the registry is made invocation-scoped so prisma7 guidance cannot leak through shared mutable state.
  5. The slice closes with packed installed-artifact proof that representative prisma7 migrate, prisma7 db, and prisma7 generate flows all surface actionable prisma7 commands while stable Prisma names and the ordinary prisma control remain intact.

Behavior changes & evidence

Compatibility / migration / risk

  • The behavioral contract is intentionally narrow: only actionable command/package guidance emitted during the active CLI or generator invocation changes.
  • Stable Prisma domain names remain stable: Prisma, schema.prisma, prisma.config.ts, prisma/, .prisma, @prisma/client, docs URLs, environment variables, and low-level package resolution stay ordinary.
  • The default ordinary path remains explicit, not implicit: standalone migrate and the exported defaultRegistry still pass 'prisma', which keeps existing consumers from inheriting prisma7 accidentally.
  • The main risk was identity leakage through shared generator state; the shift from a module-global default registry in CLI generate flows to createDefaultRegistry(this.identity) per invocation is the guardrail against that.

Non-goals / intentionally out of scope

  • Rebranding Prisma domain terminology, file names, package names, engine paths, or docs links.
  • Propagating identity into generated-client runtime diagnostics that can fire later without an originating CLI invocation context.
  • Adding a shared branding framework, global/env identity channel, CLI imports in lower packages, or protocol/RPC surface expansion.
  • Release/publication work, package-manager acceptance, or broader Prisma 8 behavior beyond preserving the explicit ordinary-prisma control.