projects/prisma7-config/spec.md
Let Prisma 7 and Prisma 8 run side-by-side during migration without competing for the same automatically discovered config file. Existing Prisma 7 projects must continue working unchanged until users deliberately adopt the version-specific filename.
During the migration period, each major version has its own canonical config:
prisma7.config.ts # Prisma 7
prisma.config.ts # Prisma 8
When no explicit --config path is supplied, both Prisma 7 CLI entry points implemented in this branch use the same discovery policy:
1. prisma7.config.{js,ts,mjs,cjs,mts,cts}
2. .config/prisma7.{js,ts,mjs,cjs,mts,cts}
3. existing prisma.config.* / .config/prisma.* discovery
4. default config when neither family exists
Within each location, the existing supported-extension ordering is preserved. A discovered Prisma 7-specific config is authoritative: if loading or validation fails, Prisma 7 reports the error and stops rather than falling back to prisma.config.*. Fallback occurs only when no Prisma 7-specific candidate exists.
prisma init and prisma7 init generate prisma7.config.ts. Bootstrap project-state detection, seed inspection, shell completion, help examples, and other default-path guidance recognize or advertise the Prisma 7 filename consistently. Loading a legacy prisma.config.* fallback remains silent apart from the existing loaded-file diagnostic.
prisma.config.*..json, .jsonc, .json5, .yaml, .yml, .toml); only the existing supported JavaScript/TypeScript extension family is in scope.prisma.config.*.--config semantics; an explicit path remains authoritative regardless of its filename.schema.prisma, Prisma directories, environment variables, package names, or other Prisma domain conventions.packages/config/src/loadConfigFromFile.ts owns config loading and automatic discovery. Its current c12-backed behavior discovers the prisma.config.* extension family and .config/prisma.* fallback location.packages/cli/src/utils/loadConfig.ts turns loader results into CLI diagnostics. It should continue reporting selected-file failures rather than acquiring separate fallback logic.packages/cli/src/bootstrap/project-state.ts currently checks prisma.config.ts directly for project presence and seed metadata. Its non-executing inspection must select the same effective filename as automatic discovery.packages/cli/src/Init.ts owns generated config files and initialization guidance.packages/internals/src/cli/completion-values.ts owns the shared default config completion value used by CLI and migrate commands.prisma and @prisma/prisma7 executables in this branch both run the same Prisma 7 implementation. They intentionally remain identical for config discovery and initialization; the future Prisma 8 CLI will be implemented by a different package.--config path wins; otherwise every supported Prisma 7-specific root candidate precedes every .config/prisma7.* candidate, and the complete Prisma 7 family precedes existing legacy discovery..config/ locations.prisma.config.* behaves as it did before this project, including path resolution relative to the selected config and the existing loaded-file diagnostic.prisma7.config.ts, and user-facing default-path examples and completion guidance name that file rather than prisma.config.ts.N/A — this is intended as a single-slice project. The slice must land discovery, bootstrap recognition, initialization, guidance, and compatibility coverage together so no merged state advertises a filename that runtime discovery does not honor.
The team-DoD floor document is absent in this checkout; the standard repository floor applies. Project-specific conditions:
--config, each supported prisma7.config.* extension is discovered at the project root and under .config/.--config path takes precedence over both automatically discovered families.prisma.config.* and .config/prisma.* discovery behaves unchanged and emits no new warning.prisma init and prisma7 init generate prisma7.config.ts with their existing identity-appropriate config-package imports.prisma7.config.ts; generic references remain phrased as “Prisma config file.”None.
design-notes.mdpackages/config/src/loadConfigFromFile.tspackages/config/src/__tests__/loadConfigFromFile.test.tspackages/cli/src/utils/loadConfig.tspackages/cli/src/Init.tspackages/cli/src/bootstrap/project-state.tspackages/internals/src/cli/completion-values.ts