# Task ID: 39 **Title:** Add gated field to Project schema **Status:** done **Dependencies:** None **Priority:** high **Description:** Extend the Prisma schema for the Project model to include the gated boolean field (default true) that controls whether sessions go through the keyword-driven prompt retrieval flow. **Details:** 1. Update `/src/db/prisma/schema.prisma` to add to Project: - `gated Boolean @default(true)` 2. Create Prisma migration: ```bash pnpm --filter db exec prisma migrate dev --name add-project-gated ``` 3. Update project-related TypeScript types 4. Update project validation schemas to include gated field: ```typescript gated: z.boolean().default(true).optional(), ``` 5. Update project API routes to accept and return the gated field **Test Strategy:** - Unit test: Migration creates gated column with default true - Unit test: Project creation with gated=false - Unit test: Project creation uses default gated=true when not specified - Unit test: Project update can toggle gated field - Integration test: GET /api/v1/projects/:name returns gated field