agentleFS
dodoguardaidodoguardai/dodoguard/drizzle/CLAUDE.md

dodoguard / drizzle

CLAUDE.md202 starsChanged 3 months agoMITView on GitHub

What this is: Drizzle ORM migration files for SQLite database. Auto-generated SQL that applies schema changes. Schema definitions are in src/database/schema.ts, NOT in this directory. This directory only contains generated SQL migration files. Drizzle auto-generates names: NNNN_adjective_noun.sql - 0000_lush_hellion.sql - 0001_wide_calypso.sql - Sequential numbering ensures order Default: ~/.dodoguard/dodoguard.db (SQLite file) Override with DODOGUARD_CONFIG_DIR env var. Cannot drop columns - SQLite doesn't support ALTER TABLE DROP COLUMN. Workaround: Create new table, copy data, drop old table, rename new table. Cannot rename…

The file

We split this CLAUDE.md into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Default: ~/.dodoguard/dodoguard.db (SQLite file)

    line 35
  2. Distinctive:

    Always review generated SQL: before applying

    line 49
  3. Distinctive:

    Never edit applied migrations: - create new migration instead

    line 50

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Database Migrations

What this is: Drizzle ORM migration files for SQLite database. Auto-generated SQL that applies schema changes.

🚨 CRITICAL: Schema is NOT Here

Schema definitions are in src/database/schema.ts, NOT in this directory.

This directory only contains generated SQL migration files.

Migration Workflow

  1. Modify schema in src/database/schema.ts
  2. Generate migration: npm run db:generate
  3. Review SQL in new drizzle/NNNN_name.sql file
  4. Apply migration: npm run db:migrate

File Naming

Drizzle auto-generates names: NNNN_adjective_noun.sql

  • 0000_lush_hellion.sql
  • 0001_wide_calypso.sql
  • Sequential numbering ensures order

Key Commands

npm run db:generate  # Generate migration from schema changes
npm run db:migrate   # Apply pending migrations
npm run db:studio    # Open GUI at localhost:4983

Database Location

Default: ~/.dodoguard/dodoguard.db (SQLite file)

Override with DODOGUARD_CONFIG_DIR env var.

SQLite Limitations

Cannot drop columns - SQLite doesn't support ALTER TABLE DROP COLUMN.

Workaround: Create new table, copy data, drop old table, rename new table.

Cannot rename columns (older SQLite) - Same workaround as drop column.

Migration Best Practices

  1. Always review generated SQL before applying
  2. Never edit applied migrations - create new migration instead
  3. Backup before major changes: sqlite3 ~/.dodoguard/dodoguard.db ".backup backup.db"
  4. Test with in-memory DB in tests (see test/ for patterns)

What's Stored

  • Evaluation results and test configurations
  • Execution traces for debugging
  • Analytics data and telemetry
  • User settings and preferences

Tech Stack

  • Drizzle ORM - Type-safe schema and migrations
  • Better SQLite3 - Fast synchronous driver
  • SQLite - Embedded database

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.