feat: multi-database support with SQLite and DuckDB adapters
Refactor hatk's monolithic DuckDB data layer into a hexagonal architecture
supporting both DuckDB and SQLite via DatabasePort/SearchPort interfaces.
- Add database/ports.ts with DatabasePort, BulkInserter, SearchPort interfaces
- Add database/dialect.ts with SqlDialect configs for DuckDB and SQLite
- Add DuckDB adapter (database/adapters/duckdb.ts) preserving read/write queues
- Add SQLite adapter (database/adapters/sqlite.ts) with $1→? param translation
- Add DuckDB SearchPort using PRAGMA FTS and SQLite SearchPort using FTS5
- Add adapter factory with dynamic imports for tree-shaking
- Refactor db.ts to use DatabasePort instead of direct DuckDB API calls
- Make schema generation dialect-aware (type maps, timestamps, JSON)
- Make FTS index building dialect-aware (string_agg, json_extract)
- Add databaseEngine config option ('duckdb' | 'sqlite')
- Add --sqlite flag to hatk new scaffolding
- Add db/schema.sql auto-generation on startup
- Fix hatk schema command to work with both engines
- Update reset command to clean up SQLite WAL files
- Update all import paths to new database/ directory
- Add database/index.ts barrel export
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>