# Edu 平台 CODEOWNERS
# 格式：路径  @owner
# 作用：GitHub/Gitea 自动为 PR 分配 reviewer
# 维护规则：
#   1. 新增服务/包时，必须同步更新本文件
#   2. owner 变更需开独立 PR，由架构组审批
#   3. 与 docs/standards/git-workflow.md §4.7 保持同步
# Team handle 占位符：@edu-platform/* 需在 Organization 中创建对应 team 后替换

# ===== 架构与规则（架构组，2 人 review）=====
/.trae/                    @edu-platform/arch
/docs/architecture/        @edu-platform/arch
/docs/standards/           @edu-platform/arch
/scripts/arch-scan/        @edu-platform/arch

# ===== 根配置（架构组，2 人 review，影响全局）=====
/.commitlintrc.js          @edu-platform/arch
/lint-staged.config.js     @edu-platform/arch
/package.json              @edu-platform/arch
/pnpm-workspace.yaml       @edu-platform/arch
/go.work                   @edu-platform/arch
/pyproject.toml            @edu-platform/arch
/tsconfig.base.json        @edu-platform/arch

# ===== 共享包（架构组，2 人 review，契约变更影响所有服务）=====
/packages/shared-proto/    @edu-platform/arch
/packages/shared-ts/       @edu-platform/arch
/packages/shared-go/       @edu-platform/arch
/packages/shared-py/       @edu-platform/arch
/packages/shared-tokens/   @edu-platform/arch

# ===== 网关层（Go）=====
/services/api-gateway/     @edu-platform/gateway
/services/push-gateway/    @edu-platform/gateway

# ===== 业务微服务 =====
# IAM（核心模块，2 人 review）
/services/iam/             @edu-platform/iam
# 教学核心
/services/core-edu/        @edu-platform/edu-core
/services/classes/         @edu-platform/edu-core
# 内容资源
/services/content/         @edu-platform/content
# 消息通知
/services/msg/             @edu-platform/messaging
# 数据分析（Python）
/services/data-ana/        @edu-platform/data
# AI 网关（Python）
/services/ai/              @edu-platform/ai

# ===== BFF 聚合层（NestJS）=====
/services/teacher-bff/     @edu-platform/edu-core
/services/student-bff/     @edu-platform/edu-core
/services/parent-bff/      @edu-platform/edu-core

# ===== 微前端（Next.js）=====
/apps/teacher-portal/      @edu-platform/frontend
/apps/student-portal/      @edu-platform/frontend
/apps/parent-portal/       @edu-platform/frontend
/apps/admin-portal/        @edu-platform/frontend

# ===== 基础设施（SRE，2 人 review，生产环境变更强制）=====
/infra/k8s/                @edu-platform/sre
/infra/backup/             @edu-platform/sre
/infra/security/           @edu-platform/sre
/infra/monitoring/         @edu-platform/sre
/infra/docker-compose*.yml @edu-platform/sre

# ===== CI/CD（SRE）=====
/.github/                  @edu-platform/sre
/.husky/                   @edu-platform/sre

# ===== 文档（架构组）=====
/docs/troubleshooting/     @edu-platform/arch
/MIGRATION_GUIDE.md        @edu-platform/arch
/README.md                 @edu-platform/arch
/CHANGELOG.md              @edu-platform/arch

# ===== 兜底（未匹配的文件由架构组 review）=====
*                          @edu-platform/arch
