diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..3b6c172 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,198 @@ +# AGENTS.md — Guide for AI agents working in this repo + +> If you are an AI coding agent landing in this repository, **read this file +> before doing anything else**. It will save you (and the human) a lot of +> wasted turns. + +--- + +## 1. What this repo is + +`AadhatManagementApp` — a Hindi/English wholesale-retail business app for +small-scale grain/produce traders. It runs on **Firebase Hosting + Firestore + +Auth**, is built as **vanilla ES module-style JS** (no bundler, no framework), +and is wrapped in **Capacitor** for Android distribution. + +- **Owner**: `DDancingDeath` (https://github.com/DDancingDeath/AadhatManagementApp) +- **Live URL**: `https://aadhat-management.web.app` +- **A read-only staging clone exists** at + `https://github.com/DDancingDeath/AadhatManagementApp-staging` (private). + All risky improvements are tried there first; verified fixes are + cherry-picked / PR'd back here. See section 6. + +--- + +## 2. The unbreakable rules + +1. **This repo is production.** Real users in the field are using the live + site and the Android build. Treat every change like a security patch: + small, reviewed, reversible. +2. **Never bypass `FirebaseService`.** All Firestore reads/writes must go + through the wrapper so collection prefixing (`prod_*` / `staging_*`) + stays correct. Several existing modules bypass it — those are bugs, not + patterns to copy. +3. **Don't add a build step or framework.** No webpack, no Vite, no React. + Inline `