KNUCK-A037b
KNUCK-A037: schema-scope gate -- fail PRs touching multiple .prisma files without wide-format label
Suggested
Justin Cooke
Body
feature_id: FEAT-studio-dependency-map-policy ## Context `prisma format` reformats every file in `prismaSchemaFolder`, not just the file the caller targeted. In PR #278 (KNUCK-A007b1a), a targeted change to `tasks.prisma` produced 350 lines of unwanted alignment churn across 9 other schema files after running `prisma format`. This inflated review surface, contributed to a stealthy test-failure cascade (see A038), and would have been caught if a scope gate had forced the agent to acknowledge the wide edit. Related to `FEAT-studio-dependency-map-policy` because the CI-guard family in that feature is where cross-file-scope gates live. ## Acceptance Criteria - CI check fails a PR when the diff touches more than one `.prisma` file under `packages/database/prisma/schema/` UNLESS the PR carries the label `schema-wide-format` - Label requires PR body to explain WHY the format-wide diff is legitimate (three examples: intentional convention change, package upgrade auto-fix, Prisma-version-upgrade formatter shift) - Diff-only fields that trigger the gate: any change to non-whitespace tokens in files not enumerated in the PR title or body - Escape hatch: `schema-wide-format` label + non-empty rationale block in PR body - Ships as required check for `Operant-Health/operant-studio` and `Operant-Health/portico` ## Non-goals - Not preventing `prisma format` from running locally - Not modifying `prisma format` behavior ## Effort Single Ledger ticket. Blockers: none. ## Filed as follow-on to PR #278 (KNUCK-A007b1a). ## Supersedes KNUCK-A037 first attempt (Task cuid `cmts6cxkh001pky04wg489p1h`), canceled after admission rejected for missing `feature_id`.
Attachments
Loading attachments…
Comments
Loading comments…