agentleFS
icoretechicoretech/airbroke/prisma/AGENTS.md

airbroke / prisma

AGENTS.md221 starsChanged 12 days agoMITView on GitHub

prisma/ owns the deployed database contract and generated client boundary. Schema, migrations, seed data, init scripts, and generated output have distinct ownership rules. - Change models in schema.prisma, add a new timestamped migration for deployed schema changes, then regenerate the client. - Treat existing migrations as immutable production history. Review data transforms, indexes, constraints, triggers/functions, ownership, and cascade behavior, not only the final schema shape. - Use DIRECT_URL for migrations or introspection when DATABASE_URL points through a pooler or proxy.…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 35,337 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository5 other files it gives its agents.

The file

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

9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Treat existing migrations as immutable production history.

    line 24
  2. Very specific:

    Use DIRECT_URL for migrations or introspection when DATABASE_URL points through a pooler or proxy.

    line 27
  3. Distinctive:

    Keep seed behavior development-only and idempotent.

    line 29
  4. Very specific:

    Run Prisma commands inside the web container.

    line 31
  5. Very specific:

    Never edit generated/; postinstall and db:generate overwrite it.

    line 36
  6. Very specific:

    Never edit migrations/migration_lock.toml manually.

    line 37
  7. Distinctive:

    Never rewrite an applied migration to match a newer desired schema.

    line 38
  8. Very specific:

    Never run migrations against the test database by borrowing the web service's development URL, or against a pooled URL when a direct URL …

    line 39
  9. Very specific:

    Do not assume pg-init-scripts/ runs in the base stack.

    line 41

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.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
AGENTS.md

PRISMA GUIDE

OVERVIEW

prisma/ owns the deployed database contract and generated client boundary. Schema, migrations, seed data, init scripts, and generated output have distinct ownership rules.

WHERE TO LOOK

TaskLocationNotes
Data modelschema.prismaHand-authored source of truth
Deployment historymigrations/*/migration.sqlForward-only SQL
Client outputgenerated/Generated and gitignored
Development seedseed.tsIdempotent upserts
Local Postgres bootstrappg-init-scripts/Not mounted by base Compose
CLI configuration../prisma.config.tsPrefers DIRECT_URL

CONVENTIONS

  • Change models in schema.prisma, add a new timestamped migration for deployed schema changes, then regenerate the client.
  • Treat existing migrations as immutable production history. Review data transforms, indexes, constraints, triggers/functions, ownership, and cascade behavior, not only the final schema shape.
  • Use DIRECT_URL for migrations or introspection when DATABASE_URL points through a pooler or proxy. Generation intentionally works without either URL.
  • Keep seed behavior development-only and idempotent. Do not turn seed data into a production migration substitute.
  • Run Prisma commands inside the web container. db:migrate uses prisma migrate deploy; it does not create development migrations.

ANTI-PATTERNS

  • Never edit generated/; postinstall and db:generate overwrite it.
  • Never edit migrations/migration_lock.toml manually.
  • Never rewrite an applied migration to match a newer desired schema.
  • Never run migrations against the test database by borrowing the web service's development URL, or against a pooled URL when a direct URL exists.
  • Do not assume pg-init-scripts/ runs in the base stack; its Compose mount is currently commented out.

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.