Gap (b): Shipped Standard-Schema validator consumer in Prisma Next
Parent epic: #313 — Migrate NetScript DB layer to Prisma Next (Postgres-first pilot).
Upstream status (verified 2026-07-03, prisma/prisma-next @ v0.14.0)
NOT SHIPPED. Prisma Next has no per-model validator codegen. Standard Schema appears only as
StandardSchemaV1<P> on parameterized-codec params, plus a proposal consumer-library pattern
(@prisma-next/extension-validators, arktype reference — "ready to build", absent today). It is a
runtime createValidators(context) consumer, not a build-time codegen that emits the named
static barrel exports scaffolded services import.
Why NetScript needs it
The custom Zod generator is a hard build-dep of every scaffolded service (@database/zod CRUD
barrel → createCrudContract). It cannot be deleted until a validator consumer replaces it. The
epic's plan (spec §5) is to build our own contract.json → Zod barrel consumer (branch ii) now,
behind a delegation seam so it can hand off to this upstream consumer later.
When this lands → we can do
Switch our consumer to delegate to upstream — only when ALL hold: (1) it is a shipped, versioned
package (not a proposal); (2) it emits Standard-Schema/Zod values createCrudContract/oRPC .input()
accept (not arktype-only with no Zod bridge); (3) it exposes model IR at build time (or a thin wrapper
is cheaper than our own mapping); (4) output types are sound (no any). This is the eventual unlock
that lets the classic Zod generator (delete-list) be removed.
Re-check mechanism
Monthly / on any .llm/tools/deps/ pass: check for a published @prisma-next/extension-validators
(or equivalent) on npm + its Standard-Schema/Zod compatibility and build-time IR access. On all four
criteria met, flip this checkbox and schedule the delegation-swap slice.
Labels: area:database, area:deps, wave:defer, status:triage.
Part of #313
Gap (b): Shipped Standard-Schema validator consumer in Prisma Next
Parent epic: #313 — Migrate NetScript DB layer to Prisma Next (Postgres-first pilot).
Upstream status (verified 2026-07-03, prisma/prisma-next @ v0.14.0)
NOT SHIPPED. Prisma Next has no per-model validator codegen. Standard Schema appears only as
StandardSchemaV1<P>on parameterized-codec params, plus a proposal consumer-library pattern(
@prisma-next/extension-validators, arktype reference — "ready to build", absent today). It is aruntime
createValidators(context)consumer, not a build-time codegen that emits the namedstatic barrel exports scaffolded services import.
Why NetScript needs it
The custom Zod generator is a hard build-dep of every scaffolded service (
@database/zodCRUDbarrel →
createCrudContract). It cannot be deleted until a validator consumer replaces it. Theepic's plan (spec §5) is to build our own
contract.json → Zod barrelconsumer (branch ii) now,behind a delegation seam so it can hand off to this upstream consumer later.
When this lands → we can do
Switch our consumer to delegate to upstream — only when ALL hold: (1) it is a shipped, versioned
package (not a proposal); (2) it emits Standard-Schema/Zod values
createCrudContract/oRPC.input()accept (not arktype-only with no Zod bridge); (3) it exposes model IR at build time (or a thin wrapper
is cheaper than our own mapping); (4) output types are sound (no
any). This is the eventual unlockthat lets the classic Zod generator (delete-list) be removed.
Re-check mechanism
Monthly / on any
.llm/tools/deps/pass: check for a published@prisma-next/extension-validators(or equivalent) on npm + its Standard-Schema/Zod compatibility and build-time IR access. On all four
criteria met, flip this checkbox and schedule the delegation-swap slice.
Labels:
area:database,area:deps,wave:defer,status:triage.Part of #313