Operant Studio
KNUCK-A037

KNUCK-A037: schema-scope gate -- fail PRs touching multiple .prisma files without wide-format label

Suggested
Justin Cooke

Body

## 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.

## 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).


---
<!-- admission-rejected -->
**Admission rejected (missing_feature_id):** ticket body is missing `feature_id: FEAT-...` frontmatter — declare which feature this ticket implements

Attachments

Loading attachments…

Comments

Loading comments…