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
- Very specific: line 8
Use the shared db from database_api/planexe_db_singleton.py.
- Very specific: line 14
If a new model/column is added, update any dependent service bootstrap or migration helpers (e.g.
- Very specific: line 21
Use UTC timestamps for defaults (datetime.now(UTC)), matching existing models.
- Very specific: line 46
No package-level tests currently.
≈ “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.
Files
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
dbfromdatabase_api/planexe_db_singleton.py; do not create newSQLAlchemy()instances or engine/session objects here. - Models must subclass
db.Modeland usedb.Column/db.Enum/db.relationshipto 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.pyorfrontend_multi_user/src/app.py) and related docs. - Allowed imports: stdlib,
sqlalchemy,sqlalchemy_utils, anddatabase_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
ForeignKeyconstraints. 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 infrontend_multi_user/src/app.pyandworker_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 auser_idbelongs to a MachAI iframe user (non-UUID, not inUserAccount, not the admin username). Used by bothfrontend_multi_userandworker_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/teststhat exercises model import anddb.create_all()with SQLite. Run tests in a venv that includesflask-sqlalchemy(seefrontend_multi_user/README.md).
Other versions1 project uses a version of this.
Word for word · 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.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- frontend_multi_user/AGENTS.mdAGENTS.md
- llm_config/AGENTS.mdAGENTS.md
- mcp_cloud/AGENTS.mdAGENTS.md
- public/AGENTS.mdAGENTS.md
- self_improve/AGENTS.mdAGENTS.md
- tools/AGENTS.mdAGENTS.md
- worker_plan/AGENTS.mdAGENTS.md
- worker_plan_database/AGENTS.mdAGENTS.md
- public/llms.txtllms.txt
- planexe-mcpSkill
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
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.

