Estimate: 30m · Depends on: 6.14.2
Implement the epic-privacy flag on work_item per 6.14.2 — the data model the whole story rides, in ONE migration.
publicChildrenHidden: Boolean @default(false) column (or the epic visibility enum, per the ADR) on work_item, with a migration. Existing rows backfill to the non-private default (no behaviour change on deploy). Add the supporting index the exclusion predicate needs (so the descended-from-private-epic check stays an indexable where, finding #57). The flag is meaningful only for epic-kind items — enforce that at the write layer (6.14.7) rather than with a DB constraint unless a cheap CHECK fits; document the choice.Stay 4-layer: the column lives in prisma/schema.prisma; any FK stays a Prisma @relation (CLAUDE.md migration rule — no raw-SQL-only FK).
work_item with its default + the supporting index; prisma migrate dev reports no drift; existing rows backfill to the non-private default (no behaviour change).prisma generate types the new field; a vitest (real Postgres) asserts the column defaults to non-private and round-trips on an epic-kind item.@relation.motir-core/prisma/schema.prisma — the work_item model the flag is added to.motir-core/CLAUDE.md § 4-layer + § migration FK-as-@relation rule.