Phase 1: Dow-customized Prisma schema + strip HP-only features
Schema changes:
- Add ClientTeam, ClientTeamMembership (visibility grouping — Brand/Events/etc)
- Add Pod, Pod.leadUser/members (capacity grouping orthogonal to ClientTeam)
- Add local-auth fields on User (passwordHash, reset tokens, mustChangePassword,
lastLoginAt, isExternal) — coexists with Entra SSO, flipped on post-MVP
- Add CLIENT_VIEWER role (read-only external Dow Jones users)
- Add ProjectStatus.PIPELINE (unaccepted brief) and ProjectStatus.CANCELED
- Add Permission.CLIENT_TEAM_MANAGE and POD_MANAGE
- Project: add clientTeamId (visibility FK) and omgJobNumber (canonical ingest key)
Removals (HP-specific approval workflow, not needed for Dow):
- Model ColorProbe (HP-CMF eyedropper)
- Model ReviewSession + ReviewSessionItem (batch approval)
- Model FeedbackItem + enum FeedbackStatus (formal OPEN→RESOLVED→VERIFIED chain)
- All cross-relations on User, Revision, Comment, Annotation, DeliverableStage
Migration: squashed HP baseline into clean 20260420000000_init with
CREATE EXTENSION IF NOT EXISTS vector; at top for non-docker deployments.
Code plumbing:
- DEFAULT_PERMISSIONS: added CLIENT_VIEWER entry (read + COMMENT_CREATE only)
- org-scope.ts: added clientTeam + pod cases, removed colorProbe/feedbackItem/reviewSession
- Deleted 29 files: review pages, review API routes, feedback/color-probe
components + services + validators + hooks
- Stripped eyedropper tool from annotation-tools.tsx, use-annotation-state.ts,
video-annotation-layer.tsx
- Removed "Reviews" nav entry from sidebar
- Deleted src/lib/utils/color.ts (CMF-only, unused after ColorProbe removal)
Verified: prisma validate ✓, npx tsc --noEmit ✓ (zero errors)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>