catchlaw-reference-databaselisted
Install: claude install-skill zakariaf/CatchLaw
# CatchLaw Reference Database
CatchLaw ships two SQLite files with opposite lifecycles. `reference.db` is CONTENT — pre-seeded at build time by the content tool, opened read-only, never migrated, disposable, and replaced wholesale on update. `user.db` is the fisher's own RECORD — writable, migrated forward-only, never touched by a content update. This skill owns that split, the asset extraction contract and the first-launch budget. It does not own Drift itself.
Read the reference for the task at hand:
- `references/two-database-contract.md` — the file/table split, ownership matrix, directory and backup policy, denormalised catch columns, `user_version` refusal, the ATTACH ban.
- `references/extraction-and-first-launch.md` — the circular build-date check, sidecar asset and generated constant, temp plus atomic rename, orphan sweep, sha256 verification, progress budget, failure ladder.
Run `scripts/check_reference_db.sh` before a PR.
Drift mechanics — `@DriftDatabase` wiring, DAO shape, transactions, keyset pagination, generated `*.drift.dart` — live in `persistence-drift`; the forward-only migration ritual and `MigrationStrategy` steps live in `run-migration`; `build_runner` invocation lives in `codegen-and-toolchain`; how the content tool BUILDS `reference.db` lives in `catchlaw-content-pipeline`. This skill owns only what is unique to shipping TWO databases, one of which is content.
## Non-negotiable rules
1. **Two databases, two lifecycles, and NEVER one file.** `refer