4.5 KiB
4.5 KiB
AI AGENT RULES - MANDATORY ENTRY POINT
READ THIS ENTIRE FILE BEFORE EXECUTING ANY TASK.
This is the Single Source of Truth for ALL Artificial Intelligence agents (Claude, Gemini, etc.) working on this project.
(Automatic IDE entry points like GEMINI.md and CLAUDE.md exist solely to redirect agents to this main file).
For technical architecture, data models, and stack details, refer to PROJECT_ARCHITECTURE.md.
1. Multi-AI Coordination & Memory
- MANDATORY STARTUP: Every AI session MUST first read
dev_docs/SESSION_STATE.mdto understand current context. - MANDATORY HANDOVER: At the end of every task/session, update the handover note in
dev_docs/SESSION_STATE.md. Specify: Active AI, Current Status, Technical Context, and Next Steps. - ARCHIVAL RULE: Before writing new state, move all content of the previous session handover into the top of
dev_docs/SESSION_HISTORY.mdto prevent bloat. - NO INTERACTION OVERLAP: Never modify a file if another AI session is explicitly working on it.
2. Global Operational Laws
- STRICT ENGLISH POLICY: All web interfaces, code, variables, scripts, and documentation MUST BE DIRECTLY AND ONLY IN ENGLISH. If you find Romanian text in code, translate it immediately.
- COMMUNICATION LANGUAGE: Conversation with the user will be in Romanian or English (preferably Romanian).
- GIT BINARY PATH: On this macOS environment, the system
gitis often broken. ALWAYS use the binary path stored in.git_pathat the project root for all Git operations. - COMMIT & PUSH STRICT RULE:
- Never push to remote (
git push) or use force flags (--hard,--force) unless explicitly requested. - Always update
VERSION.jsonon every commit. - Do NOT add AI co-author signatures (e.g.,
Co-Authored-By: AI...) to commit messages. - Branching:
master(stable),dev(active development),vX(archival releases).
- Never push to remote (
- PACKAGE MANAGEMENT: Any new package installed via
pip installMUST be added tobackend/requirements.txtwith version constraints (e.g.,slowapi>=0.1.9). Keep requirements.txt synchronized with installed packages. - MANDATORY LOGGING: Document coding/architecture changes in
dev_docs/ARCHIVE_LOGS.mdat the end of the task. - TRIPLE CONFIRMATION (Safe Forget): You cannot delete a physical location, item, or critical entity without explicit user permission three times.
3. UI/UX Fidelity Specifications
- Fidelity First: Never simplify the UI unless asked. Density and aesthetics must remain "Premium".
- Styling: Tailwind CSS. Font weights/spacing must be consistent (Inter/Roboto).
- Readability: NO
uppercaseortracking-wideststyles. Use standard camel/Title case. - Icons: Use Lucide Icons exclusively. NO emojis.
- Interactive Affordance: All select/dropdown boxes MUST have a
ChevronDownicon. Masked passwords should have reduced opacity (text-white/50). - Iconography Standardization:
- Categories: ALWAYS use
Layers(Color:text-primary). - Item Types: ALWAYS use
Package(Color:text-green-500).
- Categories: ALWAYS use
4. Documentation Maintenance
- SSOT INTEGRITY: Whenever a feature is added, modified, or removed, you MUST update all corresponding documentation files:
README.md(General usage & technical modes).USER_GUIDE.md(End-user instructions).PROJECT_ARCHITECTURE.md(Technical logic & data models).export_prod.sh(If new scripts or files must be included in the production bundle).
- REAL-TIME UPDATES: Documentation updates are NOT optional and must be performed within the same session as the code changes.
6. AI Command Shortcuts
save-version: When the user triggers this command, the AI MUST:- Increment the patch version in
VERSION.json. - Stage all current changes (
git add .). - Commit changes with message
Build [v.X.Y.Z]. - Create a new branch named
v.X.Y.Zfrom the current state. - Generate a production bundle ZIP (calls
./export_prod.sh). - Stay on the current branch (
dev).
- Implementation: Use
python3 scripts/save_version.pyto ensure consistency.
- Increment the patch version in
5. End of Session Protocol
- Once a phase/task from
PLAN.mdis completed and verified, move that entry intodev_docs/PLAN_HISTORY.md. - After finishing an entire job (including updating session state, architecture logs, and versioning), end your final response on a separate line exactly with:
--- ✓ Done. - Do not provide unnecessary verbatim summaries of the code.