agentleFS
neoneyeneoneye/PlanExe/database_api/AGENTS.md

PlanExe / database_api

AGENTS.md402 starsChanged 3 months agoMITView on GitHub

Scope: this package defines shared SQLAlchemy models used by multiple services (frontendmultiuser, workerplandatabase). Keep changes compatible across consumers.

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

4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

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

    Use the shared db from database_api/planexe_db_singleton.py.

    line 8
  2. Very specific:

    If a new model/column is added, update any dependent service bootstrap or migration helpers (e.g.

    line 14
  3. Very specific:

    Use UTC timestamps for defaults (datetime.now(UTC)), matching existing models.

    line 21
  4. Very specific:

    No package-level tests currently.

    line 46

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 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

database_api agent instructions

Scope: this package defines shared SQLAlchemy models used by multiple services (frontend_multi_user, worker_plan_database). Keep changes compatible across consumers.

Guidelines

  • Use the shared db from database_api/planexe_db_singleton.py; do not create new SQLAlchemy() instances or engine/session objects here.
  • Models must subclass db.Model and use db.Column/db.Enum/db.relationship to stay aligned with Flask-SQLAlchemy expectations.
  • Favor backward-compatible schema changes: new columns should be nullable and have safe defaults; avoid renames/drops unless all consumers are updated.
  • If a new model/column is added, update any dependent service bootstrap or migration helpers (e.g. worker_plan_database/app.py or frontend_multi_user/src/app.py) and related docs.
  • Allowed imports: stdlib, sqlalchemy, sqlalchemy_utils, and database_api.planexe_db_singleton.
  • Forbidden imports: worker_plan*, frontend_*, worker_plan_database (keep this package service-agnostic).
  • Use UTC timestamps for defaults (datetime.now(UTC)), matching existing models.
  • Foreign keys: current models do not define ForeignKey constraints. Confirm with the owner before adding any.
  • Migrations: there is no Alembic pipeline here. Schema changes are applied via db.create_all() at service startup plus explicit ALTER helpers in frontend_multi_user/src/app.py and worker_plan_database/app.py. Update those helpers when adding columns that need backfill/ALTER.

Example: adding a column

# correct (backward compatible)
extra_notes = db.Column(db.String(256), nullable=True, default=None)

# incorrect (breaks existing rows)
extra_notes = db.Column(db.String(256), nullable=False)

Shared helpers

  • is_machai_user.py: determines if a user_id belongs to a MachAI iframe user (non-UUID, not in UserAccount, not the admin username). Used by both frontend_multi_user and worker_plan_database — keep this as the single source of truth for MachAI user detection. Must be called inside a Flask app context.

Testing

  • No package-level tests currently. If you change models or schema helpers, add a unit test under database_api/tests that exercises model import and db.create_all() with SQLite. Run tests in a venv that includes flask-sqlalchemy (see frontend_multi_user/README.md).

Download now (ZIP)

  • Other versions1 project uses a version of this.

    Word for word · 1

    1. PlanExeOrg/PlanExe★ 402100% same

    Edited · 0

    None found.

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • 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 28,693 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 repository12 other files it gives its agents.

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.