# MCDSL Progress ## Current State Phase 1 complete. The `db` package is implemented and tested. ## Completed ### Phase 0: Project Setup (2026-03-25) - Initialized Go module (`git.wntrmute.dev/kyle/mcdsl`) - Created `.golangci.yaml` matching platform standard (with `exported` rule enabled since this is a shared library) - Created `Makefile` with standard targets (build, test, vet, lint, all) - Created `.gitignore` - Created `doc.go` package doc - `make all` passes clean ### Phase 1: `db` — SQLite Foundation (2026-03-25) - `Open(path string) (*sql.DB, error)` — opens with WAL, FK, busy timeout 5000ms, 0600 permissions, creates parent dirs - `Migration` type with Version, Name, SQL fields - `Migrate(database *sql.DB, migrations []Migration) error` — sequential, transactional, idempotent, records name and timestamp in schema_migrations - `SchemaVersion(database *sql.DB) (int, error)` — highest applied version - `Snapshot(database *sql.DB, destPath string) error` — VACUUM INTO with 0600 permissions, creates parent dirs - 11 tests: open (pragmas, permissions, parent dir, existing DB), migrate (fresh, idempotent, incremental, records name), schema version (empty), snapshot (data integrity, permissions, parent dir) - `make all` passes clean (vet, lint 0 issues, 11/11 tests, build) ## Next Steps - Phase 2: `auth` package (MCIAS token validation with caching)