# CODEOWNERS — review routing for the agent pipeline.
# Replace @YOUR-GITHUB-HANDLE with the project owner's GitHub handle.

# Global default
*                                              @YOUR-GITHUB-HANDLE

# High-risk: auth — every change here needs a maintainer review
pages/api/auth/**                              @YOUR-GITHUB-HANDLE
pages/api/auth-utils.js                        @YOUR-GITHUB-HANDLE
lib/permission-middleware.js                   @YOUR-GITHUB-HANDLE
lib/use-auth.js                                @YOUR-GITHUB-HANDLE
components/ProtectedRoute.js                   @YOUR-GITHUB-HANDLE
components/AdminProtected.js                   @YOUR-GITHUB-HANDLE

# High-risk: admin operations + DB setup
pages/api/admin/**                             @YOUR-GITHUB-HANDLE
pages/api/setup-database.js                    @YOUR-GITHUB-HANDLE
scripts/setup-neon-db.js                       @YOUR-GITHUB-HANDLE
scripts/reset-db.js                            @YOUR-GITHUB-HANDLE
scripts/promote-user-to-admin.js               @YOUR-GITHUB-HANDLE
scripts/demote-admin-to-user.js                @YOUR-GITHUB-HANDLE

# Schema changes need extra eyes (until a real migration tool is adopted)
scripts/add-*.js                               @YOUR-GITHUB-HANDLE
scripts/fix-*.js                               @YOUR-GITHUB-HANDLE
docs/SCHEMA_MAP.md                             @YOUR-GITHUB-HANDLE

# Feature flags
lib/flags/**                                   @YOUR-GITHUB-HANDLE

# CI / infra
.github/workflows/**                           @YOUR-GITHUB-HANDLE
next.config.js                                 @YOUR-GITHUB-HANDLE
vercel.json                                    @YOUR-GITHUB-HANDLE

# Agent context
.cursor/agents/**                              @YOUR-GITHUB-HANDLE
.cursor/rules/**                               @YOUR-GITHUB-HANDLE
.cursor/skills/**                              @YOUR-GITHUB-HANDLE
AGENTS.md                                      @YOUR-GITHUB-HANDLE
.agent-context-manifest.yml                    @YOUR-GITHUB-HANDLE
