# CODEOWNERS — review ownership
#
# Changes under cmd/bd/init*.go interact with init-safety invariants
# documented in engdocs/adr/0002-init-safety-invariants.md. Reviewers MUST
# confirm new flags / data sources extend CheckRemoteSafety's guard
# matrix (cmd/bd/init_safety_test.go) before approving. Silent guard
# accretion is how we ended up with 8+ paper-over commits before ADR 0002
# — the matrix + review gate is the structural hedge.

# Init-safety critical path
cmd/bd/init.go              @gastownhall/beads-maintainers
cmd/bd/init_*.go            @gastownhall/beads-maintainers
cmd/bd/init_safety*.go      @gastownhall/beads-maintainers
engdocs/adr/0002-init-safety-invariants.md  @gastownhall/beads-maintainers

# Schema-migration critical path (bd-6dnrw.15). The 2026 Apr-Jun window
# shipped a corrupting migration (PR 4039, DEFAULT (UUID()) PK, zero reviews,
# self-merged), a duplicate version number (PR 4027), and in-place edits to
# released migrations (PRs 3991/3918/3942). Migration changes get at least
# one human maintainer review; scripts/check-migration-hygiene.sh enforces
# the mechanical invariants in CI, and reviewers should treat allowlist
# additions and hygiene-script changes with the same suspicion as the
# migrations themselves. NOTE: GitHub only enforces CODEOWNERS when branch
# protection has "require review from Code Owners" enabled (bd-6dnrw.23).
internal/storage/schema/migrations/  @gastownhall/beads-maintainers
scripts/check-migration-hygiene.sh   @gastownhall/beads-maintainers
