Files
tfm_ainventory/AI_RULES.md
2026-04-10 13:57:42 +03:00

3.6 KiB

AI AGENT RULES - SINGLE SOURCE OF TRUTH

This file is the single source of truth for ALL Artificial Intelligence agents working on this project (Claude, Gemini, etc.). Any AI or session MUST respect these mandatory rules.

General Rules

  • UI & Code Language: All web interfaces, functions, variables, and any text inside the application MUST BE DIRECTLY AND ONLY IN ENGLISH.
  • Communication Language: Conversation with the user will be in Romanian or English, preferably Romanian.

Multi-AI Coordination & Handover

  • MANDATORY STARTUP: Every AI session MUST first read dev_docs/SESSION_STATE.md to understand current context.
  • MANDATORY HANDOVER: At the end of every task/session, create or update a handover note in dev_docs/SESSION_STATE.md. Specify: Active AI, Current Status, Technical Context (details not in code), and Next Steps.
  • ARCHIVAL RULE: To prevent SESSION_STATE.md from bloating, incoming AI agents MUST move all content of the previous session handover into the top of dev_docs/SESSION_HISTORY.md before writing their own new state. This keeps SESSION_STATE.md focused only on the active session.
  • NO INTERACTION OVERLAP: Never modify a file if another AI session is explicitly working on it according to SESSION_STATE.md.

Implementation Completion

  • All code modifications MUST be committed in git before the task is considered finished. VERSION.json must be updated on EACH commit.
  • MANDATORY GIT RULE: Never push to remote unless explicitly requested by the user. Only commit locally with proper messages. Always assume the user will handle all git push operations. If a task requires pushing, ask for explicit permission first.
  • MANDATORY GIT RULE: NO AI is allowed to write in git commits that it is the author or co-author (e.g., DO NOT add texts like Co-Authored-By: AI...). Commits should only contain technical messages.
  • MANDATORY LOGGING: Any modification of code, architecture, or logic MUST be documented in dev_docs/ARCHIVE_LOGS.md at the end of the task. The log must include modified files, purpose of modification, and (if applicable) test results.
  • MANDATORY PLAN ARCHIVING: Once a phase or task is confirmed as completed and verified, the Architect (Gemini/AI) MUST move these entries from PLAN.md into dev_docs/PLAN_HISTORY.md. This maintains the active plan's focus and prevents document bloat.
  • After finishing an entire job, end your final response on a separate line exactly with:
    ---
    ✓ Done.
    
  • Do not provide unnecessary summaries of the code.

Triple Confirmation & Safety Limits

  • Safe Forget: You cannot delete a physical location, item, or critical entity without a triple confirmation mechanism.
  • No Force Operations: Never use destructive flags (e.g., git reset --hard, git push --force, rm -rf) without explicit user permission.

UI/UX & Documentation Rules

  • STRICT ENGLISH POLICY: ANY TEXT within the application (documentation, scripts, CLI, UI, internal comments, logs, etc.) MUST be strictly in English. NO Romanian characters (ăâîșț) or words are allowed in the repository.
  • MANDATORY TRANSLATION: Any Romanian text found during an AI session (in any file) MUST be translated to English immediately.
  • Use Bootstrap Icons (<i class="bi bi-something"></i>); never use emojis.
  • The UI must remain fully functional offline (no external CDNs).
  • MANDATORY UI FIDELITY: Any modification to UI components (headers, banners, cards, buttons) MUST comply with the specifications in dev_docs/UI_FIDELITY_SPEC.md to prevent regressions. All agents MUST read that document before modifying frontend code.