It also happened to me with agent 3 as well, so please go ahead and read through this thread for more context,
What? ”The replit.md file is automatically managed by Replit’s system”
**
But regardless of that, the current version of my replit.md document appears like this:
bIDMIO - Flask ERP System**
STOP: DO NOT MODIFY THIS FILE. This is a stable reference document. All detailed documentation lives in
docs/. If you need to document changes, updatedocs/CHANGELOG.md,docs/GUARDRAILS.md, or the relevantdocs/components/*.mdfile instead. NEVER add feature descriptions, architecture details, recent changes tables, or external dependency lists to this file.
Full Documentation: See
docs/INDEX.mdfor complete navigation
Quick Start
# Start application
gunicorn -c gunicorn.conf.py main:app
# Start Celery worker (for notifications)
celery -A celery_app worker --loglevel=info
# Start Celery beat (for scheduled tasks)
celery -A celery_app beat --loglevel=info
Critical AI Agent Rules
MUST READ: See
docs/GUARDRAILS.mdfor complete list
Date & Time Formatting
-
NEVER use raw
.strftime()for display dates in templates -
Use
|company_date,|company_datetime, or|format_datetime_with_timefilters -
Exception: form
value=attributes and JS data attributes may use.strftime('%Y-%m-%d') -
Filters respect company timezone + date format settings (
app/filters.py)
Translation System
-
Translation values MUST have
status='active'(not ‘approved’) -
Translation keys REQUIRE
base_text_hash:md5(base_text) -
Use
_t('key', 'namespace')in templates -
Restart workflow after seeding translations (cache)
Design System
-
NEVER use hardcoded colors — use
var(--color-*) -
NEVER add inline
<style>blocks in templates -
Use
.ds-*component classes -
Check
/styleguidebefore creating components
Database
-
NEVER delete system tables:
permission_groups,permissions,languages -
All queries must be tenant-scoped (
organization_id,company_id) -
Use ORM for migrations, not raw SQL
File Storage
-
NEVER use local filesystem (
static/uploads/) — files lost on deployment -
Use Replit Object Storage via
adapters/storage/app_storage.py -
Serve files via
/storage/{object_key}(handles auth + tenant check) -
See
docs/components/STORAGE.mdfor patterns
Performance & Caching
-
NEVER cache dynamic content (project data, work logs, calendars) in browser
-
Browser caching is for static files only (CSS, JS, fonts, images)
-
FLASK_ENV=productionis set only in production environment (not shared) -
See
docs/architecture/PERFORMANCE.mdfor caching architecture
Startup Performance (CRITICAL)
-
NEVER modify
main.py,routes/blueprint_registry.py, orgunicorn.conf.pyfor optimization -
Deferred import patterns caused 3+ minute production startup — permanently excluded
-
See
docs/GUARDRAILS.md> “Production Startup Performance” for safe alternatives
Stock Count Logic
-
NEVER modify stock count calculation logic — causes stocking issues
-
See
docs/GUARDRAILS.mdfor details
User Preferences
-
Communication style: Simple, everyday language
-
Documentation: Detailed docs in
docs/folder,replit.mdstays concise
Documentation Map
| Document | Purpose |
|---|---|
docs/INDEX.md |
Complete documentation navigation |
docs/GUARDRAILS.md |
Critical rules to prevent bugs |
docs/CHANGELOG.md |
All changes with dates |
docs/architecture/PERFORMANCE.md |
Caching, Redis fallback, profiling |
docs/architecture/ARCHITECTURE_PRINCIPLES.md |
Clean code, SSOT, multi-tenancy |
docs/architecture/DATABASE.md |
Schema, indexes, migrations |
docs/architecture/CSS_ARCHITECTURE.md |
Design system, theming |
docs/components/*.md |
Per-feature documentation |
docs/guides/*.md |
Deployment, debugging, API guides |