From 866c433bc107c43a1a09a1e9212eb2e271f7a1f6 Mon Sep 17 00:00:00 2001 From: Steven McClankerton Date: Fri, 14 Aug 2026 12:57:42 +0000 Subject: [PATCH 1/2] docs(drive): record Prisma 7 config project retro --- drive/code-review/README.md | 26 +++++++++++++ drive/pr/README.md | 25 ++++++++++++ drive/project/README.md | 29 ++++++++++++++ projects/prisma7-config/retros.md | 14 +++++++ .../rollups/2026-08-14-closing-rollup.md | 38 +++++++++++++++++++ projects/prisma7-config/trace.jsonl | 3 ++ 6 files changed, 135 insertions(+) create mode 100644 drive/code-review/README.md create mode 100644 drive/pr/README.md create mode 100644 drive/project/README.md create mode 100644 projects/prisma7-config/retros.md create mode 100644 projects/prisma7-config/rollups/2026-08-14-closing-rollup.md diff --git a/drive/code-review/README.md b/drive/code-review/README.md new file mode 100644 index 000000000000..377a73828df4 --- /dev/null +++ b/drive/code-review/README.md @@ -0,0 +1,26 @@ +# Drive `code-review` context + +> Read by `drive-code-review` before it starts. Capture project-specific facts the generic skill can't know. Update when a drive run surfaces something the next run should inherit. + +**Skills served:** `drive-code-review` + +## Review focus areas + +Check Prisma 7 behavior against the repository's current code and accepted project spec rather than historical Prisma assumptions. For config discovery changes, separate runtime c12 behavior from non-executing bootstrap detection and verify the exact supported extension set. + +## Anti-patterns + +- **2026-08-14 — Review-comment scope substitution:** Do not interpret a review comment from its prose alone and then rewrite the accepted spec to match that interpretation. Inspect the exact commented diff lines, reconcile the request with the active spec, and ask the reviewer when they appear inconsistent. In PR #30020, a comment on newly added legacy JSON/JSONC/JSON5/YAML/YML/TOML candidates was incorrectly applied to the separately required Prisma 7 JavaScript/TypeScript extension family. + +## Ownership map + +Use package ownership and requested reviewers from the affected Prisma areas; no additional Drive-specific ownership map is maintained. + +## Known constraints & gaps + +Automated review summaries can describe a larger diff region than the exact human concern. Anchor resolution to the line-level thread and final requested behavior. + +## References + +- Repository agent guidance: [`AGENTS.md`](../../AGENTS.md) +- Incident reference: Prisma PR #30020 diff --git a/drive/pr/README.md b/drive/pr/README.md new file mode 100644 index 000000000000..3740f2c7fb77 --- /dev/null +++ b/drive/pr/README.md @@ -0,0 +1,25 @@ +# Drive `pr` context + +> Read by `drive-pr-description` and `drive-pr-walkthrough` before they start. Capture project-specific facts the generic skills can't know. Update when a drive run surfaces something the next run should inherit. + +**Skills served:** `drive-pr-description`, `drive-pr-walkthrough` + +## PR template + +Use concise sections for overview, changes, rationale, scope, and verification. Close-out PRs additionally include project-DoD evidence, artifact classification, reference-scan results, and the merged implementation PR. + +## Labels & metadata + +Target the same base branch as the merged implementation project unless the operator says otherwise. Do not invent Linear references, labels, or milestones. + +## CI gate context + +Treat required GitHub checks as blocking. Distinguish optional/advisory checks explicitly, and investigate failures against the exact failing test before changing implementation. + +## Known constraints & gaps + +PR review comments are requirements input, not automatically a replacement for the accepted spec. Reconcile comments with the exact diff hunk and active spec before changing scope. + +## References + +- Repository agent guidance: [`AGENTS.md`](../../AGENTS.md) diff --git a/drive/project/README.md b/drive/project/README.md new file mode 100644 index 000000000000..054da43e9f77 --- /dev/null +++ b/drive/project/README.md @@ -0,0 +1,29 @@ +# Drive `project` context + +> Read by `drive-create-project` and `drive-close-project` before they start. Capture project-specific facts the generic skills can't know. Update when a drive run surfaces something the next run should inherit. + +**Skills served:** `drive-create-project`, `drive-close-project` + +## Project tracking + +Transient project workspaces live under `projects//`. No default Linear team or board is assumed; record tracker references explicitly when supplied. Closed project workspaces are deleted rather than archived in-tree. + +## Lanes & ownership + +Use the ownership and review requirements of the affected Prisma packages. No separate Drive lane map is maintained. + +## Acceptance-criteria conventions + +Use binary `AC-` criteria in the project review ledger. At close, retain evidence in the merged implementation PR and its tests; project coordination files remain transient. + +## Closing conventions + +Require all slice PRs to be merged or explicitly deferred, all review threads resolved, CI complete, and the mandatory final retro landed. Migrate only genuinely reusable methodology; specs, plans, briefs, rollups, reviews, walkthroughs, traces, and retros are transient. Open a dedicated close-out PR that deletes the project workspace. + +## Known constraints & gaps + +A project may have no Linear reference. In that case, state this explicitly in the close-out PR instead of inventing one. + +## References + +- Repository agent guidance: [`AGENTS.md`](../../AGENTS.md) diff --git a/projects/prisma7-config/retros.md b/projects/prisma7-config/retros.md new file mode 100644 index 000000000000..2c4c8d037da9 --- /dev/null +++ b/projects/prisma7-config/retros.md @@ -0,0 +1,14 @@ +## 2026-08-14 — Reconcile review comments with the accepted spec + +**Trigger:** Mandatory final project-close retro, incorporating the operator-flagged review-response failure on PR #30020. + +**What happened:** The implementation delivered the requested Prisma 7 config coexistence behavior and CI caught one stale Bun init assertion. During human review, however, a comment rejecting newly added legacy JSON/JSONC/JSON5/YAML/YML/TOML bootstrap candidates was misread as rejecting the separately specified Prisma 7 JavaScript/TypeScript extension family. The response narrowed production behavior and rewrote the project spec before the operator corrected it; a follow-up restored the required family and removed only the unrequested formats. + +**Root cause:** The review-response gate treated comment prose as a complete replacement requirement instead of inspecting the exact commented diff lines and reconciling them with the accepted spec. Once the mistaken interpretation was formed, the workflow made the durable spec conform to the implementation rather than using the spec to detect the contradiction and ask for clarification. + +**What worked:** Installed-artifact coverage exercised both Prisma 7 entrypoints, the focused Docker E2E exposed the stale Bun filename assertion, reviewer rounds caught explicit-path attribution and bootstrap ordering issues, and the final CI suite passed before merge. + +**Landing surface(s):** + +- Project-context: `drive/code-review/README.md` § Anti-patterns — require exact-hunk inspection and spec reconciliation before review feedback changes accepted scope. +- Project-context: `drive/pr/README.md` § Known constraints & gaps — record that review comments are requirements input, not automatic spec replacements. diff --git a/projects/prisma7-config/rollups/2026-08-14-closing-rollup.md b/projects/prisma7-config/rollups/2026-08-14-closing-rollup.md new file mode 100644 index 000000000000..4a93c2778fcc --- /dev/null +++ b/projects/prisma7-config/rollups/2026-08-14-closing-rollup.md @@ -0,0 +1,38 @@ +# Project health rollup: prisma7-config + +**Cadence:** per-slice-merge / closing rollup +**Date:** 2026-08-14 + +## Progress + +- **Slices delivered:** 1 / 1 — `versioned-config-coexistence`, merged in PR #30020. +- **Slices in flight:** none. +- **Slices not started:** none. +- **Direct changes:** none. +- **Project-DoD coverage:** all 10 project conditions met; PR approved, merged, and required CI passed. + +## Drift signals + +- **Warning:** The initial installed E2E audit missed `prisma-init-bun`'s direct read of the old generated filename; CI caught it and focused Docker coverage passed after correction. +- **High:** Review feedback about unrequested legacy data-format candidates was applied to the separately specified Prisma 7 JavaScript/TypeScript family, causing an out-of-spec narrowing and spec rewrite. The correction restored the required family, removed only the data formats, and landed a review anti-pattern in `drive/code-review/README.md`. + +## Throughput + +- **Dispatches/day:** 1.5 across the two active delivery days. +- **Median dispatch wallclock:** not reliably comparable because corrective review rounds spanned CI and operator review. +- **Median rounds-to-satisfied:** 2; D1 required two additional post-PR corrective rounds. + +## Calibration + +- **Size prediction accuracy:** the three planned medium dispatches remained coherent, but D1 was underestimated because review-response correction work doubled its round count. +- **Retro-trigger frequency:** 1 mandatory final retro; the operator-flagged scope-substitution incident is incorporated into it. +- **Spike-driven re-plans:** none. + +## Recommended next pick + +1. **Close `prisma7-config`** — all implementation work is merged; delete the transient project workspace after the retro and classification gates. + +## Triggers + +- Mandatory final retro completed and landed in `drive/code-review/README.md` and `drive/pr/README.md`. +- No remaining scope shift or project-DoD gap. diff --git a/projects/prisma7-config/trace.jsonl b/projects/prisma7-config/trace.jsonl index c8f41bf7ba14..cff6c8ee63e4 100644 --- a/projects/prisma7-config/trace.jsonl +++ b/projects/prisma7-config/trace.jsonl @@ -27,3 +27,6 @@ {"event_id":"50cd99b3-12c6-47ec-a4c2-1e2aa6111d43","schema_version":"1","ts":"2026-08-13T17:28:38.662Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"brief-issued","dispatch_id":"315345c2-82e3-4646-af0f-71a79eabb70c","round_id":"ddc03183-4a3a-4efd-9ba2-091ef4191b3a","brief_byte_length":4197,"brief_content_hash":"69e2011fd41b07d3cc1303ee0f3ef0926c5f8f14538f0e2da67be0c7a5bca9e3","brief_disposition":"initial"} {"event_id":"a684ed14-654f-4e89-9180-cac97db26bde","schema_version":"1","ts":"2026-08-13T17:44:27.462Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"round-end","dispatch_id":"315345c2-82e3-4646-af0f-71a79eabb70c","round_id":"ddc03183-4a3a-4efd-9ba2-091ef4191b3a","verdict":"satisfied","findings_filed":0,"wall_clock_ms":920000} {"event_id":"56b10750-0611-455d-b309-14915a7e942d","schema_version":"1","ts":"2026-08-13T17:44:27.898Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"dispatch-end","dispatch_id":"315345c2-82e3-4646-af0f-71a79eabb70c","result":"completed","wall_clock_ms":930000} +{"event_id":"d8cc821b-2c22-4a8d-979a-5fde38b7e2b0","schema_version":"1","ts":"2026-08-14T12:57:17.616Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"slice-completed","slice_slug":"versioned-config-coexistence","result":"merged","pr_ref":"#30020"} +{"event_id":"d8effc19-cb0c-4998-a892-5b28aec4128e","schema_version":"1","ts":"2026-08-14T12:57:18.250Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"health-check-fired","cadence":"closing-rollup","drift_signal_count":2,"max_drift_severity":"high","recommended_next":"Run the mandatory final retro and close the merged project."} +{"event_id":"5dff8770-594e-4ea7-9d60-d7a03e7ff84a","schema_version":"1","ts":"2026-08-14T12:57:19.716Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"retro-landed","trigger_class":"mandatory-final","landing_surfaces":["project-context-readme"],"is_mandatory_final":true} From ab93581bbe753afa5fc78400ade51f336c003c79 Mon Sep 17 00:00:00 2001 From: Steven McClankerton Date: Fri, 14 Aug 2026 12:58:19 +0000 Subject: [PATCH 2/2] chore: close Prisma 7 config project --- projects/prisma7-config/briefs/D1-R1.md | 45 ---- projects/prisma7-config/briefs/D1-R2.md | 37 ---- projects/prisma7-config/briefs/D1-R3.md | 40 ---- projects/prisma7-config/briefs/D1-R4.md | 41 ---- projects/prisma7-config/briefs/D2-R1.md | 49 ----- projects/prisma7-config/briefs/D2-R2.md | 34 --- projects/prisma7-config/briefs/D3-R1.md | 49 ----- projects/prisma7-config/briefs/D3-R2.md | 31 --- projects/prisma7-config/design-notes.md | 37 ---- projects/prisma7-config/plan.md | 26 --- projects/prisma7-config/pr-description.md | 19 -- projects/prisma7-config/retros.md | 14 -- .../prisma7-config/reviews/code-review.md | 197 ------------------ .../rollups/2026-08-13-opening-rollup.md | 36 ---- .../rollups/2026-08-14-closing-rollup.md | 38 ---- .../versioned-config-coexistence/plan.md | 25 --- .../versioned-config-coexistence/spec.md | 71 ------- projects/prisma7-config/spec.md | 92 -------- projects/prisma7-config/trace.jsonl | 32 --- projects/prisma7-config/walkthrough.md | 94 --------- 20 files changed, 1007 deletions(-) delete mode 100644 projects/prisma7-config/briefs/D1-R1.md delete mode 100644 projects/prisma7-config/briefs/D1-R2.md delete mode 100644 projects/prisma7-config/briefs/D1-R3.md delete mode 100644 projects/prisma7-config/briefs/D1-R4.md delete mode 100644 projects/prisma7-config/briefs/D2-R1.md delete mode 100644 projects/prisma7-config/briefs/D2-R2.md delete mode 100644 projects/prisma7-config/briefs/D3-R1.md delete mode 100644 projects/prisma7-config/briefs/D3-R2.md delete mode 100644 projects/prisma7-config/design-notes.md delete mode 100644 projects/prisma7-config/plan.md delete mode 100644 projects/prisma7-config/pr-description.md delete mode 100644 projects/prisma7-config/retros.md delete mode 100644 projects/prisma7-config/reviews/code-review.md delete mode 100644 projects/prisma7-config/rollups/2026-08-13-opening-rollup.md delete mode 100644 projects/prisma7-config/rollups/2026-08-14-closing-rollup.md delete mode 100644 projects/prisma7-config/slices/versioned-config-coexistence/plan.md delete mode 100644 projects/prisma7-config/slices/versioned-config-coexistence/spec.md delete mode 100644 projects/prisma7-config/spec.md delete mode 100644 projects/prisma7-config/trace.jsonl delete mode 100644 projects/prisma7-config/walkthrough.md diff --git a/projects/prisma7-config/briefs/D1-R1.md b/projects/prisma7-config/briefs/D1-R1.md deleted file mode 100644 index f8b14a04661f..000000000000 --- a/projects/prisma7-config/briefs/D1-R1.md +++ /dev/null @@ -1,45 +0,0 @@ -# Brief: D1 R1 — establish versioned discovery semantics - -## Task - -Change `@prisma/config` automatic discovery so the complete supported `prisma7.config.*` family at the project root, then `.config/prisma7.*`, is authoritative before the existing legacy `prisma.config.*` / `.config/prisma.*` behavior. Preserve exact explicit `configFile` semantics and existing path transformation. The implementation must distinguish family absence from selected-file load/parse/validation failure so a broken Prisma 7-specific config never falls through to a valid legacy file. - -## Scope - -**In:** `packages/config` loader implementation, internal/exported candidate-selection surface if required for the later bootstrap consumer, config fixtures, and `loadConfigFromFile` tests. Error attribution for Prisma 7-specific filenames is in scope. - -**Out:** CLI bootstrap consumption, init generation, completion/help/migrate/internals guidance, packed E2E changes, Prisma 8 behavior, dependency upgrades, fallback warnings, and config-content conversion. - -## Completed when - -- [ ] Tests prove every supported JS/TS extension is discoverable under both versioned locations and that documented root/location/family precedence is deterministic. -- [ ] Tests prove explicit `configFile` remains authoritative, an invalid selected Prisma 7 config hard-fails beside a valid legacy config, and legacy/default fallback remains unchanged and warning-free when the versioned family is absent. -- [ ] Relative schema, migrations, Typed SQL, and views paths still resolve from whichever config file was selected; error results identify the selected Prisma 7 path. -- [ ] `pnpm --filter @prisma/config build` and `pnpm --filter @prisma/config test loadConfigFromFile.test.ts` pass; affected files are formatted; `git diff --check` and the transient-ID scan are clean. -- [ ] The implementation and tests are committed with explicit staging and an intent-driven commit message. - -## Standing instruction - -Stay focused on the goal; control scope. Trivial-and-related fixes that obviously serve the goal go in the same dispatch with a one-line note in your wrap-up message. Anything that pulls you off the goal — even if it looks useful — halts and surfaces. - -## References - -- Slice spec: `projects/prisma7-config/slices/versioned-config-coexistence/spec.md`. -- Slice plan: `projects/prisma7-config/slices/versioned-config-coexistence/plan.md` § Dispatch 1. -- Project spec: `projects/prisma7-config/spec.md`. -- Review log: `projects/prisma7-config/reviews/code-review.md` (read-only for implementer). -- Repository guidance: `AGENTS.md`. - -## Operational metadata - -- **Model tier:** orchestrator — config discovery precedence and failure semantics are load-bearing and c12 behavior needs careful investigation. -- **Time-box:** 60 minutes wall clock. Overrun halts and surfaces rather than silently extending. -- **Halt conditions:** Halt if the agreed precedence cannot be implemented without a dependency upgrade; if completing runtime discovery requires touching an out-of-scope CLI consumer; if a public API expansion is necessary but cannot be kept narrowly candidate-selection-specific; if the spec's assumptions about c12 or supported locations are false; or if any named gate cannot run or remains red for an unrelated reason. - -## Carry-over - -None — first dispatch and first round. - -## Return shape - -Report reconnaissance, decisions, diff highlights with paths, every validation command/result, commit SHA(s), surprises, deferral requests, and pushback. Do not edit project specs/plans/reviews. Write heartbeats to `wip/heartbeats/implementer.txt` per the implementer protocol. diff --git a/projects/prisma7-config/briefs/D1-R2.md b/projects/prisma7-config/briefs/D1-R2.md deleted file mode 100644 index e9cd44d37838..000000000000 --- a/projects/prisma7-config/briefs/D1-R2.md +++ /dev/null @@ -1,37 +0,0 @@ -# Brief: D1 R2 — preserve explicit error attribution - -## Task - -Resolve reviewer finding F1 in `projects/prisma7-config/reviews/code-review.md`: explicit `configFile` load failures must retain and report the authoritative requested file path rather than `configRoot`, including explicit Prisma 7-specific and custom filenames, without weakening automatic Prisma 7 hard-failure semantics or legacy automatic error extraction. - -## Scope - -**In:** Narrow `packages/config` loader correction and focused regression tests for explicit invalid paths beside competing automatic candidates. - -**Out:** Any broader discovery refactor, CLI/bootstrap/init/guidance/e2e work, dependency changes, new warnings, or unrelated cleanup. - -## Completed when - -- [ ] Explicit invalid Prisma 7-specific and custom config paths return the requested resolved path in load errors, with regression tests that would fail against current HEAD. -- [ ] Automatic versioned hard-failure and legacy fallback behavior from D1 R1 remain green. -- [ ] `pnpm --filter @prisma/config build`, `pnpm --filter @prisma/config test loadConfigFromFile.test.ts`, Prettier, `git diff --check`, and transient-ID scan pass on final HEAD. -- [ ] F1 is addressed in a new explicitly staged commit; do not edit the reviewer ledger. - -## Standing instruction - -Stay focused on the goal; control scope. Anything beyond the concrete finding halts and surfaces. - -## Operational metadata - -- **Model tier:** orchestrator — focused but load-error attribution is correctness-sensitive. -- **Time-box:** 30 minutes wall clock. -- **Halt conditions:** Halt if the finding conflicts with evidence, requires a public API redesign, or any validation gate cannot run/remains red for unrelated reasons. - -## Carry-over - -- **F1 (must-fix):** explicit invalid config paths currently report `configRoot`; preserve the explicit requested path and add non-tautological regression coverage. -- Decisions standing: explicit paths remain authoritative; automatic versioned selected-file failures hard-fail; fallback is absence-only. - -## Return shape - -Report reconnaissance, decision, exact diff paths, gate results, commit SHA, surprises, deferrals, and any evidence-based pushback. Write heartbeats to `wip/heartbeats/implementer.txt`; do not edit project specs/plans/reviews. diff --git a/projects/prisma7-config/briefs/D1-R3.md b/projects/prisma7-config/briefs/D1-R3.md deleted file mode 100644 index 9e579d0a83f5..000000000000 --- a/projects/prisma7-config/briefs/D1-R3.md +++ /dev/null @@ -1,40 +0,0 @@ -# Brief: D1 R3 — narrow discovery to the requested filename - -## Task - -Address PR review feedback by removing unrequested automatic discovery for alternate Prisma 7 extensions and `.config/` locations. Automatic Prisma 7 discovery must recognize exactly the root-level `prisma7.config.ts`, then delegate unchanged to c12's existing legacy `prisma.config.*` discovery when that exact file is absent. Keep explicit `--config` semantics unchanged. Also apply the review naming cleanup in the Bun E2E test. - -Reduce the non-executing bootstrap selector to the same requested surface: prefer root `prisma7.config.ts`, otherwise preserve its pre-PR root `prisma.config.ts` behavior. Remove public/internal candidate-family machinery and tests that existed only for the unrequested extension/location expansion. - -## Scope - -**In:** -- `packages/config/src/loadConfigFromFile.ts`, its exports, and focused tests. -- `packages/cli/src/bootstrap/project-state.ts` and its focused tests. -- `packages/client/tests/e2e/prisma-init-bun/tests/prisma7.config.test.ts` test-description wording only. - -**Out:** Init filename/guidance, exact-file precedence and hard-failure semantics, legacy c12 runtime behavior, explicit path behavior, compatibility E2E scenarios, project docs/review ledger, and unrelated cleanup. - -## Completed when - -- [ ] Automatic versioned discovery checks only `/prisma7.config.ts`; `prisma7.config.js`, other suffixes, and `.config/prisma7.ts` are not special automatic candidates. -- [ ] Exact `prisma7.config.ts` wins over legacy discovery and its load/validation errors do not fall through. -- [ ] When exact `prisma7.config.ts` is absent, runtime legacy discovery remains c12-backed and unchanged; explicit `configFile` remains authoritative. -- [ ] Bootstrap recognizes/prefer exact root `prisma7.config.ts`, then root `prisma.config.ts`, without executing either; extension-family and c12-parity machinery added by this PR is removed. -- [ ] Added exports that expose the unrequested candidate family are removed. -- [ ] Bun E2E description reads `prisma7.config.ts matches snapshot`. -- [ ] Focused config and bootstrap suites, package builds/typechecks as needed, lint/Prettier, diff check, and transient-ID scan pass; changes are staged and committed. - -## Operational metadata - -- **Model tier:** high — review correction crosses runtime discovery, bootstrap, and extensive tests; simplification must preserve legacy and explicit semantics. -- **Time-box:** 60 minutes. -- **Halt conditions:** Halt if exact-file loading cannot be implemented without changing legacy c12 behavior, if another package consumes the new candidate exports outside this PR, or if focused tests expose ambiguity about `.config/` support. - -## Carry-over - -Human review on `packages/config/src/loadConfigFromFile.ts` asks why alternate extensions were added and states they were not requested. Treat this as a settled design correction: only root `prisma7.config.ts` receives special automatic discovery. CodeRabbit separately requests removal of “should” from the Bun snapshot test description. - -## Return shape - -Report exact simplifications, tests retained/removed/added, validation, commit SHA, and surprises. Write heartbeat; do not edit project/review artifacts, amend, push, or reply on GitHub. diff --git a/projects/prisma7-config/briefs/D1-R4.md b/projects/prisma7-config/briefs/D1-R4.md deleted file mode 100644 index 49e3c8d83b3a..000000000000 --- a/projects/prisma7-config/briefs/D1-R4.md +++ /dev/null @@ -1,41 +0,0 @@ -# Brief: D1 R4 — correct extension-scope misread - -## Task - -Correct the previous review-response misread. Restore automatic Prisma 7 discovery for the spec-required JavaScript/TypeScript family in both locations: - -```text -prisma7.config.{js,ts,mjs,cjs,mts,cts} -.config/prisma7.{js,ts,mjs,cjs,mts,cts} -``` - -The human review comment rejected the newly enumerated legacy data-format extensions (`.json`, `.jsonc`, `.json5`, `.yaml`, `.yml`, `.toml`), not the Prisma 7 JS/TS family. Remove those data formats from the non-executing bootstrap selector and its tests. Retain supported JS/TS legacy flat/index candidates as needed for bootstrap selection, with root/.config ordering matching the c12 path for those supported extensions. - -## Scope - -**In:** `packages/config/src/loadConfigFromFile.ts`, `packages/config/src/index.ts`, config discovery tests, `packages/cli/src/bootstrap/project-state.ts`, and bootstrap tests. - -**Out:** Runtime c12's pre-existing legacy behavior (including its own handling/rejection of data-format files), explicit `--config`, init/guidance, compatibility E2E exact scenarios, Bun title fix, project/review artifacts, and unrelated cleanup. - -## Completed when - -- [ ] All six supported Prisma 7 JS/TS extensions are automatically discovered at root and `.config/`, with root candidates before `.config/` and all versioned candidates before legacy discovery. -- [ ] Explicit paths remain authoritative; selected versioned load/validation failures remain terminal; legacy runtime fallback remains the existing c12 call. -- [ ] Bootstrap non-executingly recognizes the same supported Prisma 7 family and supported JS/TS legacy flat/index forms. -- [ ] `.json`, `.jsonc`, `.json5`, `.yaml`, `.yml`, and `.toml` are absent from the added non-executing candidate machinery and its added tests; no new support for those formats is introduced. -- [ ] Candidate exports are limited to what consumers need; do not expose the candidate array unless required. -- [ ] Focused config and bootstrap suites, relevant builds/typechecks/lint/Prettier, diff check, and transient-ID scan pass; changes are staged and committed. - -## Operational metadata - -- **Model tier:** high — surgical restoration must preserve the valid prior family behavior while removing only the mistakenly added data formats. -- **Time-box:** 60 minutes. -- **Halt conditions:** Halt if restoring the JS/TS family requires changing c12's existing legacy runtime behavior, or if any consumer genuinely requires the data-format candidates. - -## Carry-over - -Use pre-correction commit `f4a9afd1bb` as a reference, not as a blind restore. Its Prisma 7 family and supported JS/TS bootstrap logic are desired; its `LEGACY_SUPPORTED_EXTENSIONS` data formats are not. Preserve the Bun test-title correction from `b949a1b9f5`. - -## Return shape - -Report exact restored behavior, proof that data-format candidates are gone, tests, commit SHA, and surprises. Write heartbeat; do not edit project/review artifacts, amend, push, or reply on GitHub. diff --git a/projects/prisma7-config/briefs/D2-R1.md b/projects/prisma7-config/briefs/D2-R1.md deleted file mode 100644 index ef4aca711922..000000000000 --- a/projects/prisma7-config/briefs/D2-R1.md +++ /dev/null @@ -1,49 +0,0 @@ -# Brief: D2 R1 — align project lifecycle and guidance - -## Task - -Consume Dispatch 1's tested config-candidate contract so bootstrap detects and inspects the same effective Prisma 7 config without executing it; update both init identities to generate `prisma7.config.ts`; and change production completion, help, examples, and actionable concrete default-filename guidance from `prisma.config.ts` to `prisma7.config.ts`. Preserve package.json seed precedence, identity-specific config imports, explicit `--config` behavior, generic “Prisma config file” language, and other stable Prisma terminology. - -## Scope - -**In:** Bootstrap project-state/config/seed selection and tests; `Init` output/file creation and snapshots for both identities; shared completion default; concrete production default-config literals in CLI, migrate, and internals; directly affected tests/snapshots; a classified audit in the implementer report of intentionally unchanged production `prisma.config.ts` references. - -**Out:** Loader semantics already completed in D1 except narrowly reusable exports; packed/client E2E changes (D3); Prisma 8 behavior; config conversion; warning/deprecation output; explicit `--config` redesign; schema/directory/environment/package renames; test fixtures whose legacy filename is intentionally testing fallback rather than teaching a default; unrelated comments/docs. - -## Completed when - -- [ ] Bootstrap recognizes the complete Prisma 7-specific family and reads seed metadata from the same effective candidate runtime discovery selects, while package.json seed config keeps its existing precedence; focused tests cover competing families, locations, and extensions. -- [ ] Both `Init.new('prisma')` and `Init.new('prisma7')` write `prisma7.config.ts` with their existing identity-appropriate config imports, and initialization output/snapshots name the versioned file. -- [ ] Shared completion and every in-scope production concrete default/config example or actionable message names `prisma7.config.ts`; generic/domain references intentionally unchanged are listed with rationale in the report. -- [ ] Builds pass for `@prisma/config`, `@prisma/internals`, `@prisma/migrate`, and `prisma`; focused config/bootstrap/init/CLI/internals/migrate tests and affected snapshots pass; Prettier, `git diff --check`, and transient-ID scan are clean. -- [ ] Changes are committed with explicit staging and intent-driven commit messages; no packed E2E work is included. - -## Standing instruction - -Stay focused on the goal; control scope. Mechanical snapshot updates belong with the behavior they prove. Do not blindly replace every literal: classify whether it teaches Prisma 7's concrete default, names an intentionally explicit legacy fixture, or is generic/domain commentary. - -## References - -- Slice spec: `projects/prisma7-config/slices/versioned-config-coexistence/spec.md`. -- Slice plan: `projects/prisma7-config/slices/versioned-config-coexistence/plan.md` § Dispatch 2. -- Project spec: `projects/prisma7-config/spec.md`. -- D1 hand-off commits: `817c176693`, `d5d88fbe0e`, `210112ec4e`, `a330332383`. -- Review log: `projects/prisma7-config/reviews/code-review.md` (read-only for implementer). -- Repository guidance: `AGENTS.md`. - -## Operational metadata - -- **Model tier:** orchestrator — the implementation is a cross-package mechanical fan-out with judgment required to classify literals and keep bootstrap/runtime selection aligned. -- **Time-box:** 90 minutes wall clock. Overrun halts and surfaces. -- **Halt conditions:** Halt if bootstrap cannot reuse D1 selection without executing configs or introducing an inappropriate package dependency; if changing a production literal requires a new lower-layer identity mechanism; if the source audit reveals a materially broader user surface than the slice spec anticipates; if any agreed default-path change conflicts with an external contract; or if validation gates cannot run/remain red for unrelated reasons. - -## Carry-over - -- D1's candidate ordering and absence-only fallback are settled and reviewer-SATISFIED. -- Explicit `configFile` remains authoritative. -- Both executables in this branch intentionally share the same Prisma 7 generated filename and discovery policy. -- Legacy fallback remains supported silently; do not rename legacy test fixtures merely because their filename contains `prisma.config.ts`. - -## Return shape - -Report reconnaissance, decisions, diff highlights, exact gate results, commit SHAs, the classified production-literal audit, surprises, deferrals, and pushback. Write heartbeats to `wip/heartbeats/implementer.txt`; do not edit project specs/plans/reviews. diff --git a/projects/prisma7-config/briefs/D2-R2.md b/projects/prisma7-config/briefs/D2-R2.md deleted file mode 100644 index 123a91c876a3..000000000000 --- a/projects/prisma7-config/briefs/D2-R2.md +++ /dev/null @@ -1,34 +0,0 @@ -# Brief: D2 R2 — mirror legacy index discovery - -## Task - -Resolve reviewer finding F2: make bootstrap's non-executing `findPrismaConfigFile` selector cover c12 3.3.4's legacy index-directory candidates in exact runtime precedence, so config presence and seed inspection cannot disagree with runtime automatic discovery. - -## Scope - -**In:** Narrow `@prisma/config` selector correction and parity tests for `prisma.config/index.*`, `.config/prisma/index.*`, and `.config/prisma.config/index.*`, including competition with lower-precedence flat candidates; focused bootstrap regressions if needed to prove consumption. - -**Out:** Runtime D1 discovery changes, init/guidance changes already accepted, packed E2E, dependency upgrades, warnings, or unrelated cleanup. - -## Completed when - -- [ ] The non-executing selector mirrors c12's legacy index-directory forms and exact precedence, with non-tautological tests for all three locations and competing lower-precedence flat candidates. -- [ ] Bootstrap presence and seed inspection tests prove the corrected selector is consumed; AC-7 no longer fails. -- [ ] Relevant config/bootstrap tests, required package builds, Prettier, diff check, and transient-ID scan pass on final HEAD. -- [ ] F2 is fixed in a new explicitly staged commit; reviewer ledger remains reviewer-owned. - -## Operational metadata - -- **Model tier:** orchestrator — narrow fix, but exact third-party precedence must be evidence-grounded. -- **Time-box:** 40 minutes. -- **Halt conditions:** Halt if c12's actual ordering cannot be established from installed source/current tests, if parity requires executing arbitrary project config in bootstrap, or if a dependency upgrade is required. - -## Carry-over - -- F2 must-fix details are in `projects/prisma7-config/reviews/code-review.md`. -- D2 init/guidance/literal classification is accepted; do not churn it. -- Runtime legacy discovery continues delegating to c12. - -## Return shape - -Report evidence for exact ordering, diff/test highlights, every gate result, commit SHA, surprises, deferrals, and pushback. Write heartbeat; do not edit project specs/plans/reviews. diff --git a/projects/prisma7-config/briefs/D3-R1.md b/projects/prisma7-config/briefs/D3-R1.md deleted file mode 100644 index d11822c0a5fb..000000000000 --- a/projects/prisma7-config/briefs/D3-R1.md +++ /dev/null @@ -1,49 +0,0 @@ -# Brief: D3 R1 — prove the installed compatibility contract - -## Task - -Extend the existing packed `prisma7-compatibility` client E2E so real installed Prisma 7 commands prove the finalized config contract: versioned config precedence, invalid versioned config hard-failure without legacy fallback, quiet legacy fallback, `prisma7.config.ts` generation, and equivalent config behavior through both Prisma 7 entrypoints present in this branch. Preserve the existing packed version/generate/migrate/db/client smoke, then complete the production literal audit and final cross-package gates. - -## Scope - -**In:** `packages/client/tests/e2e/prisma7-compatibility/` fixture/tests/steps/package metadata as needed; concise installed-command assertions for loaded config paths, exit status, and generated files; narrow fixes to D1/D2 implementation/tests only if installed evidence exposes a real regression; final production `prisma.config.ts` literal classification; final validation. - -**Out:** New package-manager topology coverage, Prisma 8 implementation, network installs/fetches, release automation, config conversion, warnings/deprecation, unrelated E2E refactors, broad snapshot churn, and renaming legacy fallback fixtures solely for consistency. - -## Completed when - -- [ ] Installed `prisma7` and installed `prisma` commands both demonstrate the shared Prisma 7 versioned-precedence policy without relying only on loader unit tests. -- [ ] A real command with an invalid `prisma7.config.*` beside a valid legacy config exits non-zero and identifies the versioned file; no legacy fallback occurs. -- [ ] A legacy-only project succeeds through fallback with the existing loaded-file diagnostic and no new warning/deprecation output. -- [ ] Real init behavior writes `prisma7.config.ts` (with identity-appropriate import where both entrypoints can be exercised) and existing packed generate/migrate/db/generated-client smoke remains green. -- [ ] Final production-literal audit finds no unclassified stale concrete default guidance; intentional legacy/generic references are recorded in the report. -- [ ] Affected builds/focused package tests and `pnpm --filter @prisma/client test:e2e --verbose --runInBand prisma7-compatibility` pass; relevant lint/Prettier, `git diff --check`, and transient-ID scan pass; changes are committed explicitly. - -## Standing instruction - -Prefer behavior assertions from installed commands over implementation-specific mocks. Keep added scenarios concise and isolated in temporary directories. Never install packages or fetch from the network inside the test. - -## References - -- Slice spec: `projects/prisma7-config/slices/versioned-config-coexistence/spec.md`. -- Slice plan: `projects/prisma7-config/slices/versioned-config-coexistence/plan.md` § Dispatch 3. -- Review ledger: `projects/prisma7-config/reviews/code-review.md` (read-only). -- Existing E2E: `packages/client/tests/e2e/prisma7-compatibility/`. -- D1/D2 hand-off commits through `14d5c875bb`. -- Repository E2E instructions in `AGENTS.md`. - -## Operational metadata - -- **Model tier:** orchestrator — installed-artifact tests are cross-package and must avoid network/fixture false positives. -- **Time-box:** 90 minutes. -- **Halt conditions:** Halt if the E2E harness cannot expose both entrypoints from packed artifacts without changing package topology; if a required test would install/fetch; if installed behavior contradicts the settled spec; if completing proof requires Prisma 8 implementation; or if a gate remains red for unrelated infrastructure reasons. - -## Carry-over - -- D1 and D2 are reviewer-SATISFIED; do not redesign their contracts. -- Accepted unchanged production literals: the historical Prisma 6 compatibility comment and concrete legacy panic-test fixture lookup. Re-audit rather than assuming no new escapees. -- Local engine-backed tests previously lacked `schema-engine-linux-nixos`; the standard client Docker E2E is the intended installed-artifact validation boundary. - -## Return shape - -Report reconnaissance, decisions, diff highlights, every gate result, commits, literal audit classification, surprises, deferrals, and pushback. Write heartbeat; do not edit project specs/plans/reviews. diff --git a/projects/prisma7-config/briefs/D3-R2.md b/projects/prisma7-config/briefs/D3-R2.md deleted file mode 100644 index 1f37a8bc0397..000000000000 --- a/projects/prisma7-config/briefs/D3-R2.md +++ /dev/null @@ -1,31 +0,0 @@ -# Brief: D3 R2 — update Bun init E2E - -## Task - -Fix the related CI failure in Client E2E shard 1: `prisma-init-bun` still asserts and reads `prisma.config.ts`, while the settled init contract now generates `prisma7.config.ts`. Update the fixture's test name, file lookup, and expected content/snapshot as needed so it verifies the new canonical filename under Bun without weakening its existing config-content assertions. - -## Scope - -**In:** `packages/client/tests/e2e/prisma-init-bun/` only, plus narrow directly generated fixture metadata if its focused E2E requires it. - -**Out:** Runtime implementation, other E2E suites, unrelated snapshot churn, dependency changes, test installation behavior, and project/review artifacts. - -## Completed when - -- [ ] The Bun E2E reads and asserts `prisma7.config.ts`, no longer expects `prisma.config.ts`, and still verifies generated config content. -- [ ] `pnpm --filter @prisma/client test:e2e --verbose --runInBand prisma-init-bun` passes. -- [ ] Focused lint/Prettier, diff check, and transient-ID scan pass; change is explicitly staged and committed. - -## Operational metadata - -- **Model tier:** mid — focused fixture correction with one behavior-level assertion. -- **Time-box:** 30 minutes. -- **Halt conditions:** Halt if the failure is not fully explained by the filename change, if fixing it requires product code changes, or if the focused Docker E2E exposes another unrelated failure. - -## Carry-over - -CI job `94539661296` failed because `/test/prisma-init-bun/tests/prisma.config.test.ts` called `fs.readFile('./prisma.config.ts')` after init successfully listed `prisma7.config.ts`. - -## Return shape - -Report exact edits, focused E2E and formatting results, commit SHA, and any surprises. Write heartbeat; do not edit project/review artifacts, amend, or push. diff --git a/projects/prisma7-config/design-notes.md b/projects/prisma7-config/design-notes.md deleted file mode 100644 index 2ad868548ab5..000000000000 --- a/projects/prisma7-config/design-notes.md +++ /dev/null @@ -1,37 +0,0 @@ -# Design notes: prisma7-config - -> Synthesized design document for `prisma7-config`. Read this if you want to understand **what the project's design is**, **what principles it serves**, and **what alternatives were considered and rejected**. This document is not a chronological log of decisions — it captures the settled design, standing independently of the discussions that produced it. -> -> Owned by the Orchestrator. Authored directly (not delegated — see [`drive/roles/README.md § Orchestrator-direct authoring`](../../../drive/roles/README.md)). Updated as design settles; not as decisions happen. Cross-link from the project spec; never block on a design-notes update during execution. - -## Principles this design serves - -- **Side-by-side operation** — Prisma 7 and Prisma 8 need independent default config files during migration. -- **Backward compatibility** — existing Prisma 7 projects continue working without renaming their current config. -- **Deterministic failure** — an invalid Prisma 7-specific config must not silently redirect execution to a different config contract. - -## The model - -Prisma 7 treats `prisma7.config.*` as its canonical automatic-discovery family and `prisma.config.*` as a compatibility fallback. Both root-level and `.config/` locations participate, preserving the supported extension family and existing ordering within each family. - -An explicit `--config` path remains authoritative. Automatic fallback occurs only when no Prisma 7-specific candidate exists; a discovered but invalid Prisma 7 config hard-fails. Both CLI entry points implemented by the Prisma 7 code in this branch use this policy. The future Prisma 8 package owns Prisma 8 config behavior. - -Initialization generates `prisma7.config.ts`. Bootstrap project-state detection and seed inspection recognize the Prisma 7 family plus the supported JavaScript/TypeScript legacy candidates without adding JSON, JSONC, JSON5, YAML, YML, or TOML candidates. Completion and user-facing default-path guidance advertise the canonical TypeScript filename. Loading a legacy fallback adds no warning beyond the existing loaded-file diagnostic. - -## Alternatives considered - -- **Change only the `prisma7` wrapper** — attractive because it isolates the compatibility executable. **Rejected because:** both CLI entry points in this branch are Prisma 7 implementations and are intended to remain behaviorally identical. -- **Support only `prisma7.config.ts`** — attractive because it minimizes discovery work. **Rejected because:** Prisma config discovery already supports an extension family and a `.config/` location; a partial mirror would be inconsistent. -- **Fall back after a Prisma 7 config load error** — attractive as resilience. **Rejected because:** it could silently load Prisma 8's config and conceal the exact migration failure the filename split is intended to prevent. -- **Warn when using `prisma.config.*`** — attractive as migration encouragement. **Rejected because:** legacy fallback is a compatibility guarantee and new stderr output would create noise or disrupt automation. - -## Open questions - -None. - -## References - -- Project spec: [`./spec.md`](./spec.md) -- Project plan: [`./plan.md`](./plan.md) -- Config loader: [`../../packages/config/src/loadConfigFromFile.ts`](../../packages/config/src/loadConfigFromFile.ts) -- Bootstrap project state: [`../../packages/cli/src/bootstrap/project-state.ts`](../../packages/cli/src/bootstrap/project-state.ts) diff --git a/projects/prisma7-config/plan.md b/projects/prisma7-config/plan.md deleted file mode 100644 index 8099546052f0..000000000000 --- a/projects/prisma7-config/plan.md +++ /dev/null @@ -1,26 +0,0 @@ -# Prisma 7 config coexistence — Plan - -**Spec:** `projects/prisma7-config/spec.md` -**Linear Project:** N/A — operator-directed repository project; no tracker reference was supplied - -## At a glance - -This is a single-slice project. Config discovery, bootstrap recognition, initialization, user-facing guidance, and compatibility proof land together because each is one surface of the same Prisma 7 filename contract and an intermediate split would either advertise unsupported behavior or support behavior the CLI does not teach. - -## Composition - -### Stack (deliver in order) - -1. **Slice `versioned-config-coexistence`** — Linear: N/A - - **Outcome:** Both Prisma 7 entry points automatically prefer the complete `prisma7.config.*` family across root and `.config/` locations, hard-fail selected-file errors, fall back quietly to existing `prisma.config.*` discovery only when the Prisma 7 family is absent, generate `prisma7.config.ts` from init, and recognize or advertise that filename consistently across bootstrap and user-facing default-path guidance. - - **Builds on:** The current c12-backed loader in `@prisma/config`, the existing CLI distribution-identity seam, bootstrap's project-state inspection, and the packed Prisma 7 compatibility E2E. - - **Hands to:** A complete, backward-compatible Prisma 7 config contract that projects can use beside Prisma 8 without routine `--config` arguments, with focused loader/CLI tests and installed-artifact evidence suitable for release. - - **Focus:** Centralized candidate selection and error attribution; root and `.config/` extension-family precedence; explicit-path preservation; legacy fallback; relative-path behavior; bootstrap config/seed selection across supported JavaScript/TypeScript candidates only; init output; completion, help, and actionable default-filename guidance; focused unit, snapshot, and packed dual-entrypoint coverage. Legacy JSON/JSONC/JSON5/YAML/YML/TOML bootstrap candidates, Prisma 8 parsing, config conversion, warnings, and unrelated Prisma naming remain out of scope. - -## Dependencies (external) - -None. c12 3.3.4 is already pinned by `@prisma/config`; the slice may constrain how it is invoked or preselect candidates but does not require a dependency upgrade. - -## Sequencing rationale - -The project spec deliberately requires a single coherent slice. Runtime discovery, non-executing bootstrap detection, generated files, and guidance all express the same default-filename invariant: splitting them would temporarily leave users with either an undiscoverable generated file or an undisclosed runtime capability. The resulting slice remains reviewable as one end-to-end compatibility change, with the loader contract as the center and CLI surfaces as its bounded consumers. diff --git a/projects/prisma7-config/pr-description.md b/projects/prisma7-config/pr-description.md deleted file mode 100644 index b0ff53aa22ff..000000000000 --- a/projects/prisma7-config/pr-description.md +++ /dev/null @@ -1,19 +0,0 @@ -## Overview - -Give Prisma 7 its own canonical config filename so Prisma 7 and Prisma 8 can coexist during migration. Automatic discovery now prefers `prisma7.config.*`, while existing `prisma.config.*` projects continue to work through a quiet compatibility fallback. - -## Changes - -- Prefer the complete `prisma7.config.{js,ts,mjs,cjs,mts,cts}` family at the project root, then `.config/prisma7.*`, before invoking legacy discovery. Explicit `--config` paths remain authoritative, and relative schema, migration, Typed SQL, and view paths still resolve from the selected file. -- Treat a discovered Prisma 7 config as authoritative: load or validation failures report that file and stop instead of falling through to a valid legacy config. Legacy fallback occurs only when no versioned candidate exists and adds no warning beyond the existing loaded-file diagnostic. -- Reuse the supported JavaScript/TypeScript selection policy for bootstrap project detection and seed inspection, including legacy flat and `index.*` locations and ordering, while preserving `package.json` seed precedence. Do not add legacy JSON, JSONC, JSON5, YAML, YML, or TOML candidates. -- Make both `prisma init` and `prisma7 init` generate `prisma7.config.ts` with their identity-appropriate config imports, and update completion, help, initialization output, and actionable CLI guidance to teach the versioned filename. -- Extend the packed Prisma 7 compatibility E2E to prove precedence, hard-failure behavior, quiet fallback, and init output through both installed entrypoints: `.bin/prisma7` and the packed transitive `prisma` CLI entry. - -## Why - -Prisma 7 and Prisma 8 cannot safely auto-discover the same filename when their config contracts may differ. A versioned namespace prevents accidental cross-version loading, while absence-only, warning-free fallback keeps existing Prisma 7 projects working unchanged. - -## Scope - -This PR is limited to Prisma 7 config discovery, bootstrap inspection of supported JavaScript/TypeScript candidates, init output, concrete filename guidance, and compatibility coverage. It does not add bootstrap support for legacy JSON/JSONC/JSON5/YAML/YML/TOML configs, implement or parse Prisma 8 config, convert config contents, add legacy-fallback warnings, change explicit `--config` semantics, or rename other Prisma conventions. diff --git a/projects/prisma7-config/retros.md b/projects/prisma7-config/retros.md deleted file mode 100644 index 2c4c8d037da9..000000000000 --- a/projects/prisma7-config/retros.md +++ /dev/null @@ -1,14 +0,0 @@ -## 2026-08-14 — Reconcile review comments with the accepted spec - -**Trigger:** Mandatory final project-close retro, incorporating the operator-flagged review-response failure on PR #30020. - -**What happened:** The implementation delivered the requested Prisma 7 config coexistence behavior and CI caught one stale Bun init assertion. During human review, however, a comment rejecting newly added legacy JSON/JSONC/JSON5/YAML/YML/TOML bootstrap candidates was misread as rejecting the separately specified Prisma 7 JavaScript/TypeScript extension family. The response narrowed production behavior and rewrote the project spec before the operator corrected it; a follow-up restored the required family and removed only the unrequested formats. - -**Root cause:** The review-response gate treated comment prose as a complete replacement requirement instead of inspecting the exact commented diff lines and reconciling them with the accepted spec. Once the mistaken interpretation was formed, the workflow made the durable spec conform to the implementation rather than using the spec to detect the contradiction and ask for clarification. - -**What worked:** Installed-artifact coverage exercised both Prisma 7 entrypoints, the focused Docker E2E exposed the stale Bun filename assertion, reviewer rounds caught explicit-path attribution and bootstrap ordering issues, and the final CI suite passed before merge. - -**Landing surface(s):** - -- Project-context: `drive/code-review/README.md` § Anti-patterns — require exact-hunk inspection and spec reconciliation before review feedback changes accepted scope. -- Project-context: `drive/pr/README.md` § Known constraints & gaps — record that review comments are requirements input, not automatic spec replacements. diff --git a/projects/prisma7-config/reviews/code-review.md b/projects/prisma7-config/reviews/code-review.md deleted file mode 100644 index e6b1779092b5..000000000000 --- a/projects/prisma7-config/reviews/code-review.md +++ /dev/null @@ -1,197 +0,0 @@ -# Code review — `prisma7-config` - -> Initial scaffold. The reviewer maintains this document across rounds. The orchestrator and implementer read it but do not edit reviewer-owned sections. - -## Summary - -- **Current verdict:** SATISFIED -- **Dispatches SATISFIED:** D1, D2, D3 -- **AC scoreboard totals:** 12 PASS / 0 FAIL / 0 NOT VERIFIED -- **Open findings:** 0 -- **Open escalations:** 0 - -## Acceptance criteria scoreboard - -| AC ID | Description (short) | Dispatch | Status | Evidence | -| ----- | ---------------------------------------------------------------------- | -------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| AC-1 | Discover the full Prisma 7 JS/TS family at root and `.config/` | D1 | PASS | All six `.js/.ts/.mjs/.cjs/.mts/.cts` extensions are covered at both `prisma7.config.*` and `.config/prisma7.*` locations in `packages/config/src/__tests__/loadConfigFromFile.test.ts`, corrective commit `be55dae684` | -| AC-2 | Complete versioned family wins in documented location/extension order | D1 | PASS | Focused tests prove root-before-`.config/`, `.js/.ts/.mjs/.cjs/.mts/.cts` order within each location, and every versioned candidate before legacy discovery; corrective commit `be55dae684` | -| AC-3 | Explicit `--config` wins | D1 | PASS | Explicit valid and invalid custom/versioned paths remain authoritative beside automatic family candidates in `packages/config/src/__tests__/loadConfigFromFile.test.ts`, commits `a330332383`, `be55dae684` | -| AC-4 | Invalid selected Prisma 7 config hard-fails without legacy fallback | D1/D3 | PASS | Unit coverage exercises a selected `.config/prisma7.ts` validation failure beside valid legacy; both installed entrypoints exit non-zero on the versioned-file error without selecting legacy in `packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts`, commits `be55dae684`, `cbdef5fd11` | -| AC-5 | Legacy c12 discovery remains quiet and compatible | D1/D3 | PASS | Runtime fallback remains the unchanged c12 call; unit coverage plus exact installed stderr for both entrypoints (`Loaded Prisma config from prisma.config.ts.`) is retained in `packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts`, commits `be55dae684`, `cbdef5fd11` | -| AC-6 | Relative config paths resolve from the selected versioned file | D1 | PASS | Schema, migrations, Typed SQL, and views resolve relative to selected root and `.config/` Prisma 7 configs in `packages/config/src/__tests__/loadConfigFromFile.test.ts`, corrective commit `be55dae684` | -| AC-7 | Bootstrap mirrors versioned and supported legacy JS/TS selection | D2 | PASS | Non-executing project-state/seed tests cover the full versioned family plus legacy JS/TS flat/index forms and precedence; data formats are explicitly excluded from the selector without changing c12 runtime behavior, corrective commit `be55dae684` | -| AC-8 | Both init identities generate `prisma7.config.ts` with correct imports | D2/D3 | PASS | Unit and installed coverage verifies both identities write only the versioned file with `prisma/config` or `@prisma/prisma7/config`; Bun E2E reads the canonical filename and snapshots the full generated config, commits `8c0a07a5b6`, `cbdef5fd11`, `1f650903c2` | -| AC-9 | Completion/help/concrete default guidance teaches `prisma7.config.ts` | D2 | PASS | Focused CLI, completion, internals, and migrate assertions including `packages/migrate/src/__tests__/config-guidance.test.ts`, commit `8c0a07a5b6` | -| AC-10 | Both Prisma 7 entrypoints share one policy | D3 | PASS | Installed `.bin/prisma7` and the packed transitive `prisma/build/index.js` bin target run the same precedence, failure, fallback, and init matrix in `packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts`, commit `cbdef5fd11` | -| AC-11 | Production literal audit has no stale concrete default guidance | D2/D3 | PASS | Final production scan at `cbdef5fd11` leaves only the accepted Prisma 6 compatibility comment and concrete legacy panic fixture lookup | -| AC-12 | Installed evidence covers precedence, hard failure, and fallback | D3 | PASS | Non-tautological installed-command assertions cover selected-path diagnostics, failure status/error and negative legacy selection, and exact quiet fallback stderr for both entrypoints in `packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts`, commit `cbdef5fd11` | - -Status values: `PASS` / `FAIL` / `NOT VERIFIED — ` / `ACCEPTED DEFERRAL — ` / `OUT OF SCOPE`. - -## Subagent IDs - -- **Implementer:** `general-purpose` (harness did not expose a resumable ID) — first spawned in D1 R1; replacement validation-only agent spawned before review because the original invocation hit its turn limit. -- **Reviewer:** `general-purpose` (harness did not expose a resumable ID) — first spawned after D1 R1; subsequent rounds use replacement reviewers with the on-disk ledger as continuity. - -## Orchestrator notes - -None. - -## Findings log - -### F1 — Preserve explicit load-error path attribution - -**Severity:** must-fix - -**Where:** `packages/config/src/loadConfigFromFile.ts:123-129,270-274` - -**What:** Explicit `configFile` load failures pass `null` as the attribution path, so the catch branch returns `configRoot` unless the requested filename happens to match `prisma.config.*`. An explicit invalid `prisma7.config.ts` or custom filename therefore reports the directory rather than the authoritative requested file. - -**Why it matters:** CLI diagnostics interpolate `resolvedPath`; users who explicitly select a broken config receive a misleading file location, contrary to the explicit-path and selected-file attribution contract. - -**Recommended next action:** Preserve the explicit requested path for catch attribution while retaining legacy automatic error extraction, and add a regression test for an explicitly selected invalid Prisma 7/custom config beside competing automatic candidates. - -**Status:** resolved (`a330332383036956f84fbed8277c9ea79305fd87`) - -### F2 — Mirror c12 legacy index-directory discovery - -**Severity:** must-fix - -**Where:** `packages/config/src/loadConfigFromFile.ts:26-50` - -**What:** `findPrismaConfigFile` manually enumerates flat legacy filenames, but c12 3.3.4 also resolves `/index` suffixes. Runtime automatic discovery therefore loads `prisma.config/index.{ext}`, `.config/prisma/index.{ext}`, and `.config/prisma.config/index.{ext}`, while bootstrap reports no config or can inspect a lower-precedence flat candidate. - -**Why it matters:** Bootstrap project detection and seed inspection can disagree with runtime discovery, violating AC-7 and potentially initializing over an existing project or using seed metadata from the wrong config. - -**Recommended next action:** Extend the non-executing selector to cover c12's index-directory forms in c12's exact precedence, and add parity regressions for all three locations plus competition with a lower-precedence flat candidate. - -**Status:** resolved (`be55dae684d9648e6bc570bdfbe097a6c87092fa`) — restored for the supported JS/TS flat/index forms only; unrequested data formats remain excluded. - -### F3 — Remove unrequested alternate Prisma 7 automatic discovery - -**Severity:** must-fix - -**Where:** `packages/config/src/loadConfigFromFile.ts`, `packages/config/src/index.ts`, and `packages/cli/src/bootstrap/project-state.ts` - -**What:** The prior implementation expanded automatic Prisma 7 discovery into an extension/location family and exported candidate-selection machinery that human review explicitly rejected. The settled contract special-cases only root `prisma7.config.ts`, then leaves c12 legacy discovery and pre-PR root `prisma.config.ts` bootstrap behavior unchanged. - -**Why it matters:** Unrequested filename support creates a broader compatibility surface and makes bootstrap/runtime behavior more complex than the product contract requires. - -**Recommended next action:** Select only root `prisma7.config.ts` before the existing c12 call, remove candidate-family exports/helpers, and reduce bootstrap to root `prisma7.config.ts` followed by root `prisma.config.ts`; retain focused precedence, hard-failure, explicit-path, fallback, and non-execution tests. - -**Status:** superseded — this finding was based on an orchestrator misinterpretation of the human comment. The original spec-required Prisma 7 JS/TS family and both locations remain required; D1 R4 restores them in `be55dae684d9648e6bc570bdfbe097a6c87092fa`. - -### F4 — Exclude unrequested legacy data formats from bootstrap selection - -**Severity:** must-fix - -**Where:** `packages/config/src/loadConfigFromFile.ts` non-executing legacy candidate construction - -**What:** The pre-correction selector manually added `.json`, `.jsonc`, `.json5`, `.yaml`, `.yml`, and `.toml` as bootstrap candidates even though the requested parity surface was limited to the supported JavaScript/TypeScript family. - -**Why it matters:** Bootstrap could treat a data-format file as the effective config even though this change was not intended to add that production selection surface. Runtime c12's pre-existing discovery and rejection behavior is a separate compatibility concern and must remain unchanged. - -**Recommended next action:** Build the non-executing legacy flat/index candidates from `SUPPORTED_EXTENSIONS` only, retain c12 runtime behavior, and keep selector-specific exclusion coverage distinct from the pre-existing runtime c12 rejection tests. - -**Status:** resolved (`be55dae684d9648e6bc570bdfbe097a6c87092fa`) - -## Round notes - -### D1 R1 — ANOTHER ROUND NEEDED - -**Scope:** Dispatch 1. Commits `817c176693`..`210112ec4e`. - -**Tasks:** D1 partial: automatic discovery, fallback, and path transformation are clean; explicit load-error attribution is not. - -**AC delta:** AC-1 through AC-6 NOT VERIFIED → PASS from focused loader tests in commit `817c176693`. - -**Findings:** F1 (must-fix). - -**For orchestrator:** none. - -### D1 R2 — SATISFIED - -**Scope:** Dispatch 1. Commit `a330332383036956f84fbed8277c9ea79305fd87`. - -**Tasks:** D1 clean: explicit invalid versioned/custom attribution is fixed; automatic hard-failure attribution and legacy fallback remain intact. - -**AC delta:** AC-3 evidence widened by explicit invalid-path regressions in `packages/config/src/__tests__/loadConfigFromFile.test.ts`; totals remain 6 PASS / 0 FAIL / 6 NOT VERIFIED. - -**Findings:** F1 resolved (must-fix); no open findings. - -**For orchestrator:** none. - -### D2 R1 — ANOTHER ROUND NEEDED - -**Scope:** Dispatch 2. Commit `8c0a07a5b6488ffd94ca3306a885a92fb4b53283`. - -**Tasks:** D2 partial: init and guidance are clean; bootstrap omits c12's legacy index-directory candidates. - -**AC delta:** AC-7 NOT VERIFIED → FAIL (F2); AC-8, AC-9, and AC-11 NOT VERIFIED → PASS (commit `8c0a07a5b6`, focused tests and production audit). - -**Findings:** F2 (must-fix). - -**For orchestrator:** none. - -### D2 R2 — SATISFIED - -**Scope:** Dispatch 2 fix. Commit `14d5c875bbd79f25f12091904aef3be484db54c9`. - -**Tasks:** D2 clean: non-executing legacy selection now matches c12's flat/index ordering and bootstrap consumes it without executing config. - -**AC delta:** AC-7 FAIL → PASS; totals 10 PASS / 0 FAIL / 2 NOT VERIFIED. - -**Findings:** F2 resolved; no open findings. - -**For orchestrator:** none. - -### D3 R1 — SATISFIED - -**Scope:** Dispatch 3 and final slice review. Commit `cbdef5fd11f119204e0685b26b0744488fad766c`. - -**Tasks:** D3 clean: isolated installed-command coverage proves both legitimate entrypoints; lockfile changes are local-tarball integrity refreshes only. - -**AC delta:** AC-10 and AC-12 NOT VERIFIED → PASS; AC-4, AC-5, AC-8, and AC-11 evidence widened; totals 12 PASS / 0 FAIL / 0 NOT VERIFIED. - -**Findings:** none; final slice has no open findings. - -**For orchestrator:** slice DoD met; transient-ID scans of D3 and the cumulative slice diff emitted zero hits. - -### D3 R2 — SATISFIED - -**Scope:** CI correction. Commit `1f650903c2b43be8aea6cefee0481f3f90af3077` against parent `996f10510e4c4e840c7a70f3191d2b77e6b5f343`. - -**Tasks:** Bun init E2E clean: test filename and lookup use `prisma7.config.ts`; the full generated-content snapshot remains intact; README matches. Diff is limited to the fixture's two files. - -**AC delta:** AC-8 evidence widened by Bun E2E coverage; totals remain 12 PASS / 0 FAIL / 0 NOT VERIFIED. - -**Findings:** none; old Bun fixture references and transient-ID scan both emitted zero hits. Focused ESLint, Prettier, and diff checks pass; implementer reports Docker E2E 1/1 PASS. - -**For orchestrator:** CI correction is review-satisfied; no scope expansion or follow-up finding. - -### D1 R3 — SATISFIED (SUPERSEDED) - -**Scope:** Human-feedback correction. Commit `b949a1b9f52f4780cb1e60990a9830d830026865` against parent `f4a9afd1bbd3dc54128fba5021a63a2ebead5175`. - -**Tasks:** This round implemented and approved an exact-root-`.ts` contract based on an orchestrator misinterpretation of the human comment. The human rejected only the manually added legacy data-format candidates, not the original spec-required Prisma 7 JS/TS family at root and `.config/`. Its implementation conclusions are superseded by D1 R4; the historical validation results remain recorded here. - -**AC delta:** The exact-file rewrites of AC-1, AC-2, AC-6, and AC-7 were incorrect and are superseded. The scoreboard is restored to the family requirement in D1 R4; totals remain 12 PASS / 0 FAIL / 0 NOT VERIFIED. - -**Findings:** F3 and its claimed resolution were based on the same orchestrator misinterpretation and are superseded. F2's legacy JS/TS flat/index parity remains applicable. The historical focused config tests passed (78 passed, 2 skipped), bootstrap tests passed (27 passed), `@prisma/config` build and Prisma CLI typecheck passed, focused ESLint and Prettier checks passed, `git diff --check` passed, and the mandatory transient-ID scan emitted zero hits. - -**For orchestrator:** Superseded by clarified human intent and D1 R4; do not use this round as evidence for narrowing the versioned family. - -### D1 R4 — SATISFIED - -**Scope:** Corrective commit `be55dae684d9648e6bc570bdfbe097a6c87092fa` against parent `111fecc409e2ef6646ac10980f45277d3f3d2ea9`. Review basis is the clarified human intent and the pre-misinterpretation project/slice specs at `f4a9afd1bb`; the narrowed specs currently on disk came from the same superseded interpretation as D1 R3. - -**Tasks:** The full versioned family is restored exactly as required: root `prisma7.config.{js,ts,mjs,cjs,mts,cts}` precedes `.config/prisma7.{js,ts,mjs,cjs,mts,cts}`, extensions retain c12's `.js`, `.ts`, `.mjs`, `.cjs`, `.mts`, `.cts` order, and all versioned candidates precede the unchanged c12 legacy runtime call. Explicit paths remain authoritative; selected versioned load and validation failures remain terminal; relative paths continue resolving from the selected file. Bootstrap consumes one exported non-executing selector that recognizes the same versioned family plus supported legacy JS/TS flat/index forms in c12 order without executing config code. Candidate arrays and the versioned-only finder remain private. - -**AC delta:** AC-1, AC-2, AC-6, and AC-7 are corrected back to the original family/location/order requirement and remain PASS. AC-3 through AC-5 retain explicit-path, terminal-failure, and unchanged-runtime-fallback evidence. Totals remain 12 PASS / 0 FAIL / 0 NOT VERIFIED. - -**Findings:** F2 is resolved again for supported JS/TS flat/index bootstrap parity. F3 is superseded because it encoded the orchestrator's extension-scope misinterpretation. F4 is resolved: production non-executing candidates are built only from `SUPPORTED_EXTENSIONS`; `.json`, `.jsonc`, `.json5`, `.yaml`, `.yml`, and `.toml` are not candidates. The new selector-specific exclusion test calls only `findPrismaConfigFile`, while the pre-existing `.json`/`.jsonc` tests continue to exercise c12 runtime discovery and rejection, so the two contracts remain explicit. - -**Validation:** `@prisma/config` focused suite PASS (128 passed, 2 skipped); bootstrap focused suite PASS (75 passed); `@prisma/config` build PASS; Prisma CLI TypeScript build PASS; focused ESLint and Prettier PASS; `git diff --check` PASS. The five-file implementation diff is scoped to config selection/export and bootstrap consumers/tests. Mandatory transient-ID scan of the corrective diff emitted zero hits. - -**For orchestrator:** Corrective commit is review-satisfied under the clarified human intent. No implementation follow-up is required. diff --git a/projects/prisma7-config/rollups/2026-08-13-opening-rollup.md b/projects/prisma7-config/rollups/2026-08-13-opening-rollup.md deleted file mode 100644 index 4ec6544beb7b..000000000000 --- a/projects/prisma7-config/rollups/2026-08-13-opening-rollup.md +++ /dev/null @@ -1,36 +0,0 @@ -# Project health rollup: prisma7-config - -**Cadence:** opening rollup -**Date:** 2026-08-13 16:10 UTC - -## Progress - -- **Slices delivered:** 0 / 1. -- **Slices in flight:** None. -- **Slices not started:** `versioned-config-coexistence` — project outcome and boundary are settled; slice spec and dispatch plan are not yet authored. -- **Direct changes:** N/A — this project is composed of one slice. -- **Project-DoD coverage:** All ten project-specific conditions map to `versioned-config-coexistence`; none are implemented or verified yet. - -## Drift signals - -None. The project has not entered implementation, the one-slice boundary remains coherent with the spec, and no scope-shift signal is present. - -## Throughput - -- **Dispatches/day:** N/A — no dispatches started. -- **Median dispatch wallclock:** N/A. -- **Median rounds-to-satisfied:** N/A. - -## Calibration - -- **Size prediction accuracy:** N/A — no dispatch outcomes yet. -- **Retro-trigger frequency:** 0 — expected before implementation. -- **Spike-driven re-plans:** 0. - -## Recommended next pick - -1. **`versioned-config-coexistence`** — author its slice contract and dispatch decomposition, then enter the build loop. It is the project's only slice and has no dependency blocker. - -## Triggers - -- No scope-shift, retro, or project-plan amendment trigger. diff --git a/projects/prisma7-config/rollups/2026-08-14-closing-rollup.md b/projects/prisma7-config/rollups/2026-08-14-closing-rollup.md deleted file mode 100644 index 4a93c2778fcc..000000000000 --- a/projects/prisma7-config/rollups/2026-08-14-closing-rollup.md +++ /dev/null @@ -1,38 +0,0 @@ -# Project health rollup: prisma7-config - -**Cadence:** per-slice-merge / closing rollup -**Date:** 2026-08-14 - -## Progress - -- **Slices delivered:** 1 / 1 — `versioned-config-coexistence`, merged in PR #30020. -- **Slices in flight:** none. -- **Slices not started:** none. -- **Direct changes:** none. -- **Project-DoD coverage:** all 10 project conditions met; PR approved, merged, and required CI passed. - -## Drift signals - -- **Warning:** The initial installed E2E audit missed `prisma-init-bun`'s direct read of the old generated filename; CI caught it and focused Docker coverage passed after correction. -- **High:** Review feedback about unrequested legacy data-format candidates was applied to the separately specified Prisma 7 JavaScript/TypeScript family, causing an out-of-spec narrowing and spec rewrite. The correction restored the required family, removed only the data formats, and landed a review anti-pattern in `drive/code-review/README.md`. - -## Throughput - -- **Dispatches/day:** 1.5 across the two active delivery days. -- **Median dispatch wallclock:** not reliably comparable because corrective review rounds spanned CI and operator review. -- **Median rounds-to-satisfied:** 2; D1 required two additional post-PR corrective rounds. - -## Calibration - -- **Size prediction accuracy:** the three planned medium dispatches remained coherent, but D1 was underestimated because review-response correction work doubled its round count. -- **Retro-trigger frequency:** 1 mandatory final retro; the operator-flagged scope-substitution incident is incorporated into it. -- **Spike-driven re-plans:** none. - -## Recommended next pick - -1. **Close `prisma7-config`** — all implementation work is merged; delete the transient project workspace after the retro and classification gates. - -## Triggers - -- Mandatory final retro completed and landed in `drive/code-review/README.md` and `drive/pr/README.md`. -- No remaining scope shift or project-DoD gap. diff --git a/projects/prisma7-config/slices/versioned-config-coexistence/plan.md b/projects/prisma7-config/slices/versioned-config-coexistence/plan.md deleted file mode 100644 index 9f8d6b067643..000000000000 --- a/projects/prisma7-config/slices/versioned-config-coexistence/plan.md +++ /dev/null @@ -1,25 +0,0 @@ -## Dispatch plan - -### Dispatch 1: establish versioned discovery semantics - -- **Outcome:** `@prisma/config` automatically selects the complete Prisma 7-specific family before legacy discovery, preserves explicit paths and relative-path resolution, and returns the selected Prisma 7 file's error without fallback when loading or validation fails. -- **Builds on:** The slice spec's precedence and absence-only fallback contract, plus the existing c12-backed loader behavior. -- **Hands to:** One tested lower-layer candidate-order and loading contract that distinguishes Prisma 7-family absence from selected-file failure and can be consumed by non-executing detection. -- **Focus:** Candidate ordering across root and `.config/`; all supported JS/TS extensions; explicit `configFile`; error-path attribution; invalid-file hard failure beside a valid legacy file; quiet legacy/default fallback; path transformation regressions. Do not change CLI-generated files or user-facing guidance yet. -- **Validation gate:** `pnpm --filter @prisma/config build`; `pnpm --filter @prisma/config test loadConfigFromFile.test.ts`; Prettier on affected files; `git diff --check`. - -### Dispatch 2: align project lifecycle and guidance - -- **Outcome:** Bootstrap selects the same effective config for project-state and seed inspection, both init identities generate `prisma7.config.ts`, and production completion/help/actionable default-path guidance consistently teaches the Prisma 7 filename while generic Prisma terminology remains unchanged. -- **Builds on:** Dispatch 1's shared, tested candidate-order contract. -- **Hands to:** A source-complete Prisma 7 filename contract spanning runtime discovery, project detection, initialization, completion, and concrete user-facing guidance, with updated focused tests and snapshots. -- **Focus:** Non-executing bootstrap selection with existing package.json seed precedence; init output and identity-specific config imports; completion value; CLI, migrate, and internals production literals classified as concrete defaults versus intentional generic/domain references; focused snapshot updates. Do not redesign explicit `--config`, add fallback warnings, or implement packed E2E coverage yet. -- **Validation gate:** builds for `@prisma/config`, `@prisma/internals`, `@prisma/migrate`, and `prisma`; focused config, init, bootstrap, CLI, internals, and migrate tests covering changed behavior/snapshots; Prettier on affected files; `git diff --check`. - -### Dispatch 3: prove the installed compatibility contract - -- **Outcome:** Installed-command evidence exercises Prisma 7-specific precedence, invalid-file hard failure, quiet legacy fallback, and generated filename behavior through both Prisma 7 entry points; the final production-literal audit and package gates leave the slice reviewer-ready. -- **Builds on:** Dispatch 2's source-complete runtime and user-facing contract. -- **Hands to:** A fully verified slice satisfying the project DoD, with real CLI evidence and a classified record of intentionally unchanged `prisma.config.ts` references. -- **Focus:** Extend the existing packed `prisma7-compatibility` scenario or equivalent installed-artifact boundary; assert selected loaded paths and negative fallback behavior without network activity; preserve the existing generated-client smoke; run the final literal audit and fix only in-scope escapees; complete cross-package validation. Do not broaden into package-manager topology or Prisma 8 behavior. -- **Validation gate:** affected package builds and focused tests from Dispatches 1–2; `pnpm --filter @prisma/client test:e2e --verbose --runInBand prisma7-compatibility`; relevant root lint/format checks; `git diff --check`. diff --git a/projects/prisma7-config/slices/versioned-config-coexistence/spec.md b/projects/prisma7-config/slices/versioned-config-coexistence/spec.md deleted file mode 100644 index 44e7d0aed09d..000000000000 --- a/projects/prisma7-config/slices/versioned-config-coexistence/spec.md +++ /dev/null @@ -1,71 +0,0 @@ -# Slice: versioned-config-coexistence - -_(Parent project `projects/prisma7-config/`. This slice gives Prisma 7 an independent automatic config namespace while preserving legacy projects.)_ - -## At a glance - -Teach the shared Prisma 7 implementation to prefer `prisma7.config.*` and `.config/prisma7.*`, then fall back to existing config discovery only when that family is absent. Land the runtime contract together with bootstrap recognition, `prisma7.config.ts` generation, user-facing guidance, and dual-entrypoint proof. - -## Chosen design - -`@prisma/config` owns one deterministic automatic-discovery policy: - -```text -explicit --config - └─ exact requested path - -automatic discovery - ├─ prisma7.config.{js,ts,mjs,cjs,mts,cts} - ├─ .config/prisma7.{js,ts,mjs,cjs,mts,cts} - └─ existing prisma.config.* / .config/prisma.* discovery -``` - -The existing supported-extension order is preserved within each location. Automatic discovery distinguishes “no Prisma 7 candidate exists” from “the selected Prisma 7 candidate failed”: only absence enters legacy discovery. Load, import, syntax, default-export, and config-shape failures retain the selected Prisma 7 path in diagnostics and terminate the command. - -Candidate ordering has a single lower-layer definition for supported JavaScript/TypeScript files. Runtime loading consumes the versioned selection, while bootstrap uses a non-executing selection path so project-state and seed inspection identify the same effective supported config without importing arbitrary project code. Legacy JSON, JSONC, JSON5, YAML, YML, and TOML candidates are not added to bootstrap. Existing package.json seed precedence remains unchanged. - -Both executable identities in this branch use this policy without identity branching. `Init` always writes `prisma7.config.ts`, retaining its existing identity-specific import (`prisma/config` or `@prisma/prisma7/config`). Shared completion and concrete default-path guidance switch to `prisma7.config.ts`; generic “Prisma config file” language and stable Prisma domain terminology remain generic. - -The existing legacy loaded-file diagnostic remains the only output when fallback selects `prisma.config.*`; no warning or deprecation message is introduced. - -## Coherence rationale - -This is one reviewable compatibility contract: discovery, non-executing detection, generated files, guidance, and installed behavior must agree on one filename namespace. Splitting these surfaces would create an intermediate PR that either generates an undiscoverable file or silently supports a convention the CLI does not teach. - -## Scope - -**In:** `@prisma/config` automatic candidate selection, selected-file error attribution, and relative-path regressions; bootstrap config presence and seed selection; init file creation and output; shared completion values; concrete CLI, migrate, and internals default-config examples or actionable messages; affected fixtures and snapshots; focused config/CLI tests; packed Prisma 7 compatibility coverage proving both entrypoints share the policy. - -**Out:** Prisma 8 config parsing or package behavior; config-content conversion; non-executing bootstrap support for legacy JSON/JSONC/JSON5/YAML/YML/TOML configs; warnings or deprecation; explicit `--config` redesign; schema or directory renames; unrelated prose that uses “Prisma config file” generically; comments and test-only paths that do not teach a user-facing default unless touching them is needed to keep their contract accurate. - -## Pre-investigated edge cases - -| Edge case | Disposition | Notes | -| --------------------------------------------------------------------------- | -------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| Both config families exist. | Select the Prisma 7 family. | The complete versioned family precedes every legacy candidate. | -| The selected Prisma 7 config is invalid while a valid legacy config exists. | Hard-fail the Prisma 7 error. | Falling through could load Prisma 8's incompatible contract. | -| No Prisma 7 config exists. | Preserve legacy behavior silently. | No new warning beyond the existing loaded-file diagnostic. | -| A config lives under `.config/`. | Support both versioned and legacy locations. | Root versioned candidates precede `.config/prisma7.*`; the complete versioned family precedes legacy discovery. | -| The user supplies `--config`. | Load only the explicit path. | Filename and family precedence do not apply. | -| Commands are invoked through `prisma` rather than `prisma7`. | Use the same Prisma 7 policy. | Both entrypoints in this branch intentionally remain identical. | - -## Slice-specific done conditions - -- [ ] A classified audit of production `prisma.config.ts` literals leaves no stale concrete Prisma 7 default-path guidance, while recording generic/domain references that intentionally remain unchanged. -- [ ] Packed or equivalent installed-command evidence proves versioned precedence, hard-failure behavior, and legacy fallback through the Prisma 7 entrypoints rather than only through loader unit tests. - -## Open Questions - -None. - -## References - -- Parent project: [`../../spec.md`](../../spec.md) -- Project plan: [`../../plan.md`](../../plan.md) -- Design notes: [`../../design-notes.md`](../../design-notes.md) -- Linear issue: N/A -- Config loader: `packages/config/src/loadConfigFromFile.ts` -- Bootstrap state: `packages/cli/src/bootstrap/project-state.ts` -- Initialization: `packages/cli/src/Init.ts` -- Completion defaults: `packages/internals/src/cli/completion-values.ts` -- Packed compatibility scenario: `packages/client/tests/e2e/prisma7-compatibility/` diff --git a/projects/prisma7-config/spec.md b/projects/prisma7-config/spec.md deleted file mode 100644 index 58bf36ec55ad..000000000000 --- a/projects/prisma7-config/spec.md +++ /dev/null @@ -1,92 +0,0 @@ -# Prisma 7 config coexistence - -## Purpose - -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. - -## At a glance - -During the migration period, each major version has its own canonical config: - -```text -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: - -```text -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. - -## Non-goals - -- Implementing, parsing, or validating Prisma 8's config format; the future Prisma 8 package owns that contract. -- Changing Prisma 8's future config discovery behavior. -- Converting, merging, or synchronizing Prisma 7 and Prisma 8 config contents. -- Removing or deprecating Prisma 7 support for `prisma.config.*`. -- Adding non-executing bootstrap support for legacy data-format configs (`.json`, `.jsonc`, `.json5`, `.yaml`, `.yml`, `.toml`); only the existing supported JavaScript/TypeScript extension family is in scope. -- Warning users when Prisma 7 falls back to `prisma.config.*`. -- Falling back after a discovered Prisma 7 config fails to load or validate. -- Changing explicit `--config` semantics; an explicit path remains authoritative regardless of its filename. -- Renaming `schema.prisma`, Prisma directories, environment variables, package names, or other Prisma domain conventions. - -## Place in the larger world - -- [`packages/config/src/loadConfigFromFile.ts`](../../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`](../../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`](../../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`](../../packages/cli/src/Init.ts) owns generated config files and initialization guidance. -- [`packages/internals/src/cli/completion-values.ts`](../../packages/internals/src/cli/completion-values.ts) owns the shared default config completion value used by CLI and migrate commands. -- The `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. - -## Cross-cutting requirements - -- **Deterministic precedence:** an explicit `--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. -- **Absence-only fallback:** legacy discovery runs only when no Prisma 7-specific candidate exists. Syntax errors, invalid exports, unsupported content, dependency/import failures, and config-shape validation errors in a selected Prisma 7 file hard-fail. -- **Complete family symmetry:** the version-specific family supports the same JavaScript and TypeScript extensions as the existing config loader in both root and `.config/` locations. -- **Backward compatibility:** a project containing only `prisma.config.*` behaves as it did before this project, including path resolution relative to the selected config and the existing loaded-file diagnostic. -- **Quiet compatibility:** legacy fallback introduces no warning, deprecation message, or other new stderr output. -- **Shared selection semantics:** loader discovery and bootstrap's non-executing project/seed inspection must agree across the supported JavaScript/TypeScript config candidates. Existing c12 behavior for unsupported legacy data formats is not expanded into bootstrap support. -- **Canonical new-project surface:** initialization writes `prisma7.config.ts`, and user-facing default-path examples and completion guidance name that file rather than `prisma.config.ts`. -- **Dual-entrypoint parity:** both CLI entry points in this branch apply the same Prisma 7 config behavior; the policy is not conditional on executable identity. - -## Transitional-shape constraints - -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. - -## Project Definition of Done - -The team-DoD floor document is absent in this checkout; the standard repository floor applies. Project-specific conditions: - -- [ ] Without `--config`, each supported `prisma7.config.*` extension is discovered at the project root and under `.config/`. -- [ ] When both config families exist, Prisma 7 selects the Prisma 7-specific family according to the documented location and extension ordering. -- [ ] An explicit `--config` path takes precedence over both automatically discovered families. -- [ ] If the selected Prisma 7-specific config cannot be loaded or validated, the command fails with that file's error and does not read a valid legacy config beside it. -- [ ] When no Prisma 7-specific config exists, existing `prisma.config.*` and `.config/prisma.*` discovery behaves unchanged and emits no new warning. -- [ ] Relative schema, migration, Typed SQL, and view paths continue resolving from the selected config file's directory. -- [ ] Bootstrap recognizes the complete Prisma 7-specific family and supported JavaScript/TypeScript legacy flat/index forms for project-state detection and seed inspection, without adding legacy JSON, JSONC, JSON5, YAML, YML, or TOML candidates. -- [ ] Both `prisma init` and `prisma7 init` generate `prisma7.config.ts` with their existing identity-appropriate config-package imports. -- [ ] Shell completion, initialization output, help examples, and concrete default-path guidance use `prisma7.config.ts`; generic references remain phrased as “Prisma config file.” -- [ ] Focused CLI or installed-artifact coverage proves that both Prisma 7 entry points use the same precedence and fallback policy. - -## Open Questions - -None. - -## References - -- Design notes: [`design-notes.md`](./design-notes.md) -- Config loader: [`packages/config/src/loadConfigFromFile.ts`](../../packages/config/src/loadConfigFromFile.ts) -- Config loader tests: [`packages/config/src/__tests__/loadConfigFromFile.test.ts`](../../packages/config/src/__tests__/loadConfigFromFile.test.ts) -- CLI config integration: [`packages/cli/src/utils/loadConfig.ts`](../../packages/cli/src/utils/loadConfig.ts) -- Initialization: [`packages/cli/src/Init.ts`](../../packages/cli/src/Init.ts) -- Bootstrap project state: [`packages/cli/src/bootstrap/project-state.ts`](../../packages/cli/src/bootstrap/project-state.ts) -- Completion defaults: [`packages/internals/src/cli/completion-values.ts`](../../packages/internals/src/cli/completion-values.ts) diff --git a/projects/prisma7-config/trace.jsonl b/projects/prisma7-config/trace.jsonl deleted file mode 100644 index cff6c8ee63e4..000000000000 --- a/projects/prisma7-config/trace.jsonl +++ /dev/null @@ -1,32 +0,0 @@ -{"event_id":"9eac6f19-a12d-469c-8477-00824c8b2b98","schema_version":"1","ts":"2026-08-13T16:05:03.127Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"project-started","project_slug":"prisma7-config","origin":"new-project","has_linear_project":false} -{"event_id":"55b185e4-9d00-4615-a022-61cf11fe9834","schema_version":"1","ts":"2026-08-13T16:07:23.998Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"spec-amended","spec_path":"projects/prisma7-config/spec.md","spec_kind":"project","byte_length":7767,"bytes_delta":7447,"edge_cases_count":null,"open_questions_count":0,"dod_items_count":10,"reason":"replan-from-discussion","sections_changed":["Purpose","At a glance","Non-goals","Place in the larger world","Cross-cutting requirements","Transitional-shape constraints","Project Definition of Done","Open Questions","References"]} -{"event_id":"322b815e-b075-4b8c-a757-9064d2b0586d","schema_version":"1","ts":"2026-08-13T16:07:39.912Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"spec-amended","spec_path":"projects/prisma7-config/spec.md","spec_kind":"project","byte_length":7773,"bytes_delta":0,"edge_cases_count":null,"open_questions_count":0,"dod_items_count":10,"reason":"operator-correction","sections_changed":[]} -{"event_id":"51bfaec8-16ca-4a87-ae57-48b16f1d6d50","schema_version":"1","ts":"2026-08-13T16:09:11.008Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"plan-amended","plan_path":"projects/prisma7-config/plan.md","plan_kind":"project","byte_length":2654,"bytes_delta":2136,"dispatch_count":null,"slice_count":1,"dispatch_size_distribution":null,"open_items_count":0,"reason":"replan-from-discussion","dispatches_added":null,"dispatches_removed":null,"dispatches_resized":null} -{"event_id":"6a4b3530-0d73-4891-a01f-7a3eaa5add2b","schema_version":"1","ts":"2026-08-13T16:10:43.877Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"health-check-fired","cadence":"opening-rollup","drift_signal_count":0,"max_drift_severity":"none","recommended_next":"Specify and plan versioned-config-coexistence, then enter the build loop."} -{"event_id":"adf85a5b-c88e-45f1-8b01-9fec5ea561a2","schema_version":"1","ts":"2026-08-13T16:11:31.385Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"spec-authored","spec_path":"projects/prisma7-config/slices/versioned-config-coexistence/spec.md","spec_kind":"slice","byte_length":5278,"edge_cases_count":6,"open_questions_count":0,"dod_items_count":2} -{"event_id":"697a700a-3549-4a9a-bc3a-40f01f1475b5","schema_version":"1","ts":"2026-08-13T16:12:25.967Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"plan-authored","plan_path":"projects/prisma7-config/slices/versioned-config-coexistence/plan.md","plan_kind":"slice","byte_length":3708,"dispatch_count":3,"slice_count":null,"dispatch_size_distribution":{"S":0,"M":3,"L":0,"XL":0},"open_items_count":0} -{"event_id":"4ce0c6b3-685c-42e7-9f52-1daedf07e8fc","schema_version":"1","ts":"2026-08-13T16:13:16.592Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"slice-started","slice_slug":"versioned-config-coexistence","slice_index":1,"linear_ref":null} -{"event_id":"32c599ca-4b1c-45d4-b84d-ef273acb5217","schema_version":"1","ts":"2026-08-13T16:13:51.558Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"dispatch-start","dispatch_id":"6153eedb-515f-45fc-ac42-832b2fc8f5d8","dispatch_name":"D1 establish versioned discovery semantics","subagent_type":"general-purpose","model":"openai-codex/gpt-5.6","parent_dispatch_id":null} -{"event_id":"b78886f1-c702-419f-83c3-92b13661ee4d","schema_version":"1","ts":"2026-08-13T16:13:52.019Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"round-start","dispatch_id":"6153eedb-515f-45fc-ac42-832b2fc8f5d8","round_id":"1e1db872-f5d5-4bab-9266-b3f262082358","round_number":1} -{"event_id":"85dda9f9-21dc-49b8-816e-1c9494f8427b","schema_version":"1","ts":"2026-08-13T16:13:52.505Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"brief-issued","dispatch_id":"6153eedb-515f-45fc-ac42-832b2fc8f5d8","round_id":"1e1db872-f5d5-4bab-9266-b3f262082358","brief_byte_length":3654,"brief_content_hash":"428dabb7a65b9440047ee6f98262cbf9185bb416bd0a5b28521c0a69e0e8431f","brief_disposition":"initial"} -{"event_id":"d7770128-a6f2-43fb-900d-78d913e6a825","schema_version":"1","ts":"2026-08-13T16:29:28.266Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"round-end","dispatch_id":"6153eedb-515f-45fc-ac42-832b2fc8f5d8","round_id":"1e1db872-f5d5-4bab-9266-b3f262082358","verdict":"another-round-needed","findings_filed":1,"wall_clock_ms":950000} -{"event_id":"fe6fe099-8381-4d84-8bb5-807e58d94e57","schema_version":"1","ts":"2026-08-13T16:29:28.734Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"round-start","dispatch_id":"6153eedb-515f-45fc-ac42-832b2fc8f5d8","round_id":"02e423b1-95af-4578-a9e3-34a0627266b7","round_number":2} -{"event_id":"bcc0fca2-11e8-458f-a193-466854ddc0dc","schema_version":"1","ts":"2026-08-13T16:29:29.204Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"brief-issued","dispatch_id":"6153eedb-515f-45fc-ac42-832b2fc8f5d8","round_id":"02e423b1-95af-4578-a9e3-34a0627266b7","brief_byte_length":2297,"brief_content_hash":"fed7299c3eaec80cf725d3fff734224879022faaa37d1730398b9c2786e2edaf","brief_disposition":"amended"} -{"event_id":"773f99b9-d0b1-47f1-b7bd-c226ed23ae61","schema_version":"1","ts":"2026-08-13T16:36:01.447Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"round-end","dispatch_id":"6153eedb-515f-45fc-ac42-832b2fc8f5d8","round_id":"02e423b1-95af-4578-a9e3-34a0627266b7","verdict":"satisfied","findings_filed":0,"wall_clock_ms":600000} -{"event_id":"e938d959-ed82-4226-a0ae-aa27e1bc26c0","schema_version":"1","ts":"2026-08-13T16:36:01.933Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"dispatch-end","dispatch_id":"6153eedb-515f-45fc-ac42-832b2fc8f5d8","result":"completed","wall_clock_ms":1510000} -{"event_id":"a0ae3a94-a12c-4ae1-8469-eb961147da3a","schema_version":"1","ts":"2026-08-13T16:36:44.424Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"dispatch-start","dispatch_id":"772b478e-78b8-4c2d-b5a2-a4454af72e23","dispatch_name":"D2 align project lifecycle and guidance","subagent_type":"general-purpose","model":"openai-codex/gpt-5.6","parent_dispatch_id":"6153eedb-515f-45fc-ac42-832b2fc8f5d8"} -{"event_id":"4a4671a4-3dc8-4e78-be42-4da9777b031f","schema_version":"1","ts":"2026-08-13T16:36:44.885Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"round-start","dispatch_id":"772b478e-78b8-4c2d-b5a2-a4454af72e23","round_id":"5173b44b-8c77-4d62-8d42-2b90179fa5e3","round_number":1} -{"event_id":"b4652cc5-7c26-4247-9c90-3b979c2bda0e","schema_version":"1","ts":"2026-08-13T16:36:45.351Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"brief-issued","dispatch_id":"772b478e-78b8-4c2d-b5a2-a4454af72e23","round_id":"5173b44b-8c77-4d62-8d42-2b90179fa5e3","brief_byte_length":4646,"brief_content_hash":"0b176b0c3184e063e6a50f2a2c5bffbc615c6d24cd1e4b0000dfaead91c0b434","brief_disposition":"initial"} -{"event_id":"5f181b3c-dc77-4b81-969a-6fde9fe9ceed","schema_version":"1","ts":"2026-08-13T17:17:00.979Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"round-end","dispatch_id":"772b478e-78b8-4c2d-b5a2-a4454af72e23","round_id":"5173b44b-8c77-4d62-8d42-2b90179fa5e3","verdict":"another-round-needed","findings_filed":1,"wall_clock_ms":2150000} -{"event_id":"e662eaa8-0ad9-47cf-a012-10afd0b5d733","schema_version":"1","ts":"2026-08-13T17:17:01.406Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"round-start","dispatch_id":"772b478e-78b8-4c2d-b5a2-a4454af72e23","round_id":"1b52045e-6fbe-4955-a9c6-d0e4f5e5d064","round_number":2} -{"event_id":"47d7cda4-8808-41cb-9f41-b0072e1cafe9","schema_version":"1","ts":"2026-08-13T17:17:01.830Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"brief-issued","dispatch_id":"772b478e-78b8-4c2d-b5a2-a4454af72e23","round_id":"1b52045e-6fbe-4955-a9c6-d0e4f5e5d064","brief_byte_length":2120,"brief_content_hash":"a6f0678ad2ae315eff8a7327088e37a3a4d4178488e38af429f0f7b51cef5400","brief_disposition":"amended"} -{"event_id":"bd27cb8f-5d23-4940-9850-606b0fdba7b9","schema_version":"1","ts":"2026-08-13T17:27:55.077Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"round-end","dispatch_id":"772b478e-78b8-4c2d-b5a2-a4454af72e23","round_id":"1b52045e-6fbe-4955-a9c6-d0e4f5e5d064","verdict":"satisfied","findings_filed":0,"wall_clock_ms":620000} -{"event_id":"6d50a01b-faba-41cb-8198-cbfaf8dd79d5","schema_version":"1","ts":"2026-08-13T17:27:55.540Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"dispatch-end","dispatch_id":"772b478e-78b8-4c2d-b5a2-a4454af72e23","result":"completed","wall_clock_ms":4100000} -{"event_id":"1230aac0-9bd6-40ca-b32a-954dd3d030ba","schema_version":"1","ts":"2026-08-13T17:28:37.719Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"dispatch-start","dispatch_id":"315345c2-82e3-4646-af0f-71a79eabb70c","dispatch_name":"D3 prove installed compatibility contract","subagent_type":"general-purpose","model":"openai-codex/gpt-5.6","parent_dispatch_id":"772b478e-78b8-4c2d-b5a2-a4454af72e23"} -{"event_id":"bc8ef45e-8820-41c4-ab05-48c0d70a1636","schema_version":"1","ts":"2026-08-13T17:28:38.186Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"round-start","dispatch_id":"315345c2-82e3-4646-af0f-71a79eabb70c","round_id":"ddc03183-4a3a-4efd-9ba2-091ef4191b3a","round_number":1} -{"event_id":"50cd99b3-12c6-47ec-a4c2-1e2aa6111d43","schema_version":"1","ts":"2026-08-13T17:28:38.662Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"brief-issued","dispatch_id":"315345c2-82e3-4646-af0f-71a79eabb70c","round_id":"ddc03183-4a3a-4efd-9ba2-091ef4191b3a","brief_byte_length":4197,"brief_content_hash":"69e2011fd41b07d3cc1303ee0f3ef0926c5f8f14538f0e2da67be0c7a5bca9e3","brief_disposition":"initial"} -{"event_id":"a684ed14-654f-4e89-9180-cac97db26bde","schema_version":"1","ts":"2026-08-13T17:44:27.462Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"round-end","dispatch_id":"315345c2-82e3-4646-af0f-71a79eabb70c","round_id":"ddc03183-4a3a-4efd-9ba2-091ef4191b3a","verdict":"satisfied","findings_filed":0,"wall_clock_ms":920000} -{"event_id":"56b10750-0611-455d-b309-14915a7e942d","schema_version":"1","ts":"2026-08-13T17:44:27.898Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"dispatch-end","dispatch_id":"315345c2-82e3-4646-af0f-71a79eabb70c","result":"completed","wall_clock_ms":930000} -{"event_id":"d8cc821b-2c22-4a8d-979a-5fde38b7e2b0","schema_version":"1","ts":"2026-08-14T12:57:17.616Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"slice-completed","slice_slug":"versioned-config-coexistence","result":"merged","pr_ref":"#30020"} -{"event_id":"d8effc19-cb0c-4998-a892-5b28aec4128e","schema_version":"1","ts":"2026-08-14T12:57:18.250Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"health-check-fired","cadence":"closing-rollup","drift_signal_count":2,"max_drift_severity":"high","recommended_next":"Run the mandatory final retro and close the merged project."} -{"event_id":"5dff8770-594e-4ea7-9d60-d7a03e7ff84a","schema_version":"1","ts":"2026-08-14T12:57:19.716Z","project_run_id":"prisma7-config","orchestrator_agent_id":"019ffbd1-1362-79a8-a14a-34069c01c5a4","event_type":"retro-landed","trigger_class":"mandatory-final","landing_surfaces":["project-context-readme"],"is_mandatory_final":true} diff --git a/projects/prisma7-config/walkthrough.md b/projects/prisma7-config/walkthrough.md deleted file mode 100644 index f7f740bfc0bf..000000000000 --- a/projects/prisma7-config/walkthrough.md +++ /dev/null @@ -1,94 +0,0 @@ -## Sources - -- Commit range: `cf2bc1f4b2...be55dae684` -- Project intent: [projects/prisma7-config/spec.md](projects/prisma7-config/spec.md) -- Review ledger: [projects/prisma7-config/reviews/code-review.md](projects/prisma7-config/reviews/code-review.md) - -## Intent - -Let Prisma 7 and Prisma 8 coexist without competing for the same automatically discovered config file. Prisma 7 gains a canonical `prisma7.config.*` namespace while preserving existing `prisma.config.*` projects as a quiet compatibility path. - -## Change map - -- **Config selection and loading**: - - [packages/config/src/loadConfigFromFile.ts](packages/config/src/loadConfigFromFile.ts) - - [packages/config/src/index.ts](packages/config/src/index.ts) -- **Bootstrap parity**: - - [packages/cli/src/bootstrap/project-state.ts](packages/cli/src/bootstrap/project-state.ts) -- **Init and guidance**: - - [packages/cli/src/Init.ts](packages/cli/src/Init.ts) - - [packages/internals/src/cli/completion-values.ts](packages/internals/src/cli/completion-values.ts) - - [packages/internals/src/cli/getSchema.ts](packages/internals/src/cli/getSchema.ts) - - [packages/migrate/src/**tests**/config-guidance.test.ts](packages/migrate/src/__tests__/config-guidance.test.ts) -- **Tests as evidence**: - - [packages/config/src/**tests**/loadConfigFromFile.test.ts](packages/config/src/__tests__/loadConfigFromFile.test.ts) - - [packages/cli/src/bootstrap/**tests**/project-state.vitest.ts](packages/cli/src/bootstrap/__tests__/project-state.vitest.ts) - - [packages/cli/src/**tests**/Init.vitest.ts](packages/cli/src/__tests__/Init.vitest.ts) - - [packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts](packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts) - -## The story - -1. Define one deterministic Prisma 7 discovery order: all root `prisma7.config.*` candidates, then all `.config/prisma7.*` candidates, then the existing c12-backed legacy search. -2. Make the selected versioned file authoritative. Only absence reaches legacy discovery; a broken versioned config reports its own path and error instead of silently loading another contract. -3. Share supported JavaScript/TypeScript selection with bootstrap without importing project code. Project detection and seed inspection cover the versioned family and supported legacy flat and `index.*` forms, without adding legacy data-format candidates. -4. Teach the new convention everywhere a user creates or is directed to a concrete default file. Both CLI identities generate `prisma7.config.ts`, while retaining their respective config-package imports. -5. Verify the contract at the installed-package boundary through both Prisma 7 entrypoints, rather than relying only on loader unit tests. - -## Behavior changes & evidence - -- **Prisma 7-specific files take precedence across the full supported family**: automatic discovery checks `prisma7.config.{js,ts,mjs,cjs,mts,cts}` at the root, then `.config/prisma7.*`, before legacy candidates. Explicit config paths still win, and paths declared inside either versioned location remain relative to the selected file. - - **Why**: Prisma 7 needs an independent namespace, but should retain the loader's existing extension and path-resolution behavior. - - **Implementation**: - - [packages/config/src/loadConfigFromFile.ts](packages/config/src/loadConfigFromFile.ts) - - **Tests**: - - [packages/config/src/**tests**/loadConfigFromFile.test.ts](packages/config/src/__tests__/loadConfigFromFile.test.ts) - -- **Fallback is absence-only and quiet**: a selected versioned file that cannot load or validate now hard-fails with that file's attribution. When no versioned candidate exists, legacy `prisma.config.*` discovery continues without a new warning; when neither family exists, the default config remains unchanged. - - **Why**: falling through after a versioned-file error could conceal a migration problem by loading a potentially different Prisma 8 contract, while warning on normal legacy use would disrupt backward-compatible automation. - - **Implementation**: - - [packages/config/src/loadConfigFromFile.ts](packages/config/src/loadConfigFromFile.ts) - - **Tests**: - - [packages/config/src/**tests**/loadConfigFromFile.test.ts](packages/config/src/__tests__/loadConfigFromFile.test.ts) - - [packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts](packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts) - -- **Bootstrap matches supported runtime selection without executing config**: project-state detection and seed inspection use the exported non-executing selector instead of checking only `prisma.config.ts`. Its legacy mirror covers supported JavaScript/TypeScript flat and `index.*` candidates in c12 order, while deliberately excluding JSON, JSONC, JSON5, YAML, YML, and TOML. `package.json` remains the first source for seed commands. - - **Why**: bootstrap must not initialize over an existing project or inspect seed metadata from a lower-precedence file, and it must not execute arbitrary project config merely to detect state. - - **Implementation**: - - [packages/config/src/loadConfigFromFile.ts](packages/config/src/loadConfigFromFile.ts) - - [packages/cli/src/bootstrap/project-state.ts](packages/cli/src/bootstrap/project-state.ts) - - **Tests**: - - [packages/config/src/**tests**/loadConfigFromFile.test.ts](packages/config/src/__tests__/loadConfigFromFile.test.ts) - - [packages/cli/src/bootstrap/**tests**/project-state.vitest.ts](packages/cli/src/bootstrap/__tests__/project-state.vitest.ts) - -- **New projects and concrete guidance use `prisma7.config.ts`**: `prisma init` and `prisma7 init` write only the versioned filename. Generated contents continue to import from `prisma/config` or `@prisma/prisma7/config` according to CLI identity, and completion, Studio/Validate examples, schema errors, migrate help, seed instructions, and initialization output point to the same filename. Generic references remain “Prisma config file.” - - **Why**: generated files and guidance must advertise the filename runtime discovery actually prefers. - - **Implementation**: - - [packages/cli/src/Init.ts](packages/cli/src/Init.ts) - - [packages/cli/src/Studio.ts](packages/cli/src/Studio.ts) - - [packages/cli/src/Validate.ts](packages/cli/src/Validate.ts) - - [packages/internals/src/cli/completion-values.ts](packages/internals/src/cli/completion-values.ts) - - [packages/internals/src/cli/getSchema.ts](packages/internals/src/cli/getSchema.ts) - - [packages/migrate/src/commands/DbSeed.ts](packages/migrate/src/commands/DbSeed.ts) - - **Tests**: - - [packages/cli/src/**tests**/Init.vitest.ts](packages/cli/src/__tests__/Init.vitest.ts) - - [packages/cli/src/completions/completion-command.test.ts](packages/cli/src/completions/completion-command.test.ts) - - [packages/migrate/src/**tests**/config-guidance.test.ts](packages/migrate/src/__tests__/config-guidance.test.ts) - -- **The packed distribution proves both entrypoints share the contract**: the compatibility E2E runs precedence, versioned-file failure, exact quiet legacy fallback, and init assertions through installed `.bin/prisma7` and the packed transitive `prisma/build/index.js` entry. It also checks each identity's generated import while preserving the existing generated-client smoke coverage. - - **Why**: source-level tests alone cannot prove package topology and both shipped entrypoints expose the same behavior. - - **Tests**: - - [packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts](packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts) - -## Compatibility / migration / risk - -- Existing projects that only contain `prisma.config.*` need no rename and receive no new fallback warning; the installed E2E locks the existing loaded-file diagnostic exactly. -- An explicit `--config` path remains authoritative regardless of filename. -- A present but invalid `prisma7.config.*` intentionally blocks legacy fallback. Fix or remove that file to resume legacy discovery. -- Bootstrap's non-executing legacy selector mirrors the supported JavaScript/TypeScript portion of c12 3.3.4 discovery; parity tests cover flat/index locations and ordering, and exclusion tests ensure data-format candidates are not added. -- The review ledger records all 12 acceptance criteria as passing with no open findings, backed by the linked loader, bootstrap, init/guidance, and packed E2E tests. - -## Non-goals / intentionally out of scope - -- Prisma 8 config parsing, validation, or discovery behavior. -- Config conversion, merging, synchronization, or deprecation warnings. -- Changes to explicit `--config` semantics or unrelated Prisma filenames and terminology.