Before undertaking ANY coding, refactoring, or architectural task in the Dental CRM codebase (C:\Clinic_MVP\dental-crm), you MUST load and read the relevant documentation files.
- Documentation Index — Entry point to the workspace.
- .agents/AGENTS.md — The Constitution. Numbered mandates: zero mocks, T.A.R.S. honesty, paranoia doctrine, reconnaissance arsenal, ast-grep read/write split, HEAD-hash reporting, git and compilation doctrine. This is the law.
- AGENTS.md — Repo-root standard entry point (open AGENTS.md convention). Documentation index only; it delegates to
.agents/AGENTS.mdfor law. - System Architecture — Monorepo layout (
apps/web,apps/api,packages/shared). - Database Registry — Drizzle ORM PostgreSQL schema (
apps/api/src/db/schema.ts). - Telephony & Portal Details — UIS/Mango/Zadarma telephony webhooks & patient OTP portal.
- Commands & Tests — Compiler gates,
npm run typecheck, E2E tests. - UI Standards — Tailwind/Vanilla CSS rules &
useAppLogic.tsxconstraints. - Clinical Rules — EHR clinical rules engine.
- Billing & Finance — Payments, 54-FZ KKM receipts, family wallets.
- Documents Lifecycle — PDF rendering, NDFL certificates, EGISZ CDA export.
- Messengers — WhatsApp WABA, Telegram Bot, VK API integrations.
- FEATURES_REGISTRY.md — Canonical 63-feature matrix (IDENT, DentalPRO, iStom).
- OUR_CRM_MAP.md — Detailed capability map of our Dental CRM across all modules.
- BACKLOG.md — Implementation options, file paths, and architecture for
[НЕТ]/[ЧАСТИЧНО]features. - GAP_REPORT_2026-07-27.md — Current gap report. Replaces the old
PROGRESS.mdaudit cursor log, which no longer exists on disk. - FEATURE_SPECS/ — Detailed 13-field feature specification cards.
Canonical source is .agents/AGENTS.md. This list and the one in GEMINI.md are the same five laws —
they had silently diverged (Claude was missing "read first", Gemini was missing "zero mocks"); merged
2026-07-27. Keep them identical or delete both and point at the constitution.
- Read First: Read the target file in full before editing it. Appending a quick-fix patch to the bottom of a file you have not read is a critical compliance failure.
- Zero Mocks: Everything must be fully typed and integrated with database client queries.
- Anti-Hardcode: Use TypeScript interfaces,
.envfiles, or configurations. No ports, endpoints, credentials, or magic strings in code. - Targeted Git Adds: Never run
git add .. Only stage the exact files you edited — neighbouring agents work in this folder concurrently. - UTF-8 Encoding: Never use PowerShell here-strings or
node -eto WRITE Russian text.node -estays fine for read-only checks.
.claude/rules/*.md carry paths: frontmatter and load only when Claude opens a matching file. They are
routing pointers plus the few constraints that cause the most rework — never a second copy of the law.
.agents/AGENTS.md outranks them; a disagreement is a defect in the rule.
| Rule | Fires on |
|---|---|
dente-god-context.md |
apps/web/src/useAppLogic.tsx |
dente-database.md |
apps/api/src/db/**, apps/api/drizzle/**, apps/api/src/scripts/** |
Never add a rule file without paths: — it would load in every session.