# AI Session Start Protocol When starting a new AI coding session (Cursor, Claude Code, Windsurf, or any AI assistant), follow this protocol to ensure the AI has full project context. ## Step 1: Load Project Context from DMCall Fetch the project context from the central hub: ```bash curl "https://mssql.danmarcrm.com/dev1/dmcall/public/api/inventory/context?project=PROJECT_SLUG" \ -H "X-API-Key: YOUR_KEY" ``` This returns: - Project description and status - All access methods (web URLs, server paths, local paths, SSH) - Tech stack and databases - Related documentation - Active rules ## Step 2: Read Project Rules ```bash curl "https://mssql.danmarcrm.com/dev1/dmcall/public/api/rules" ``` Key rules to read: - `coding-standards` — PHP/JS conventions - `database-conventions` — MongoDB vs MySQL patterns - `project-init` — If creating new components ## Step 3: Check Existing Documentation Look for these files in the project directory: - `PROJECT_OVERVIEW.md` — What the project does - `CLAUDE.md` — AI-specific instructions and memory - `__databaseDescriptionAI.md` — Database schema for AI context - `README.md` — Setup and usage instructions ## Step 4: Review Recent Changes - Check git log for recent commits (if git repo) - Review the AI memory file if it exists: - Cursor: `.cursor/rules/` or `.cursorrules` - Claude: `/root/.claude/projects/*/memory/MEMORY.md` ## Step 5: Update Memory on Completion At the end of every session, update: 1. The project's memory/context file with date-stamped changes 2. DMCall inventory if new endpoints, files, or architecture changes were made ## Key Server Information - **Main server:** `mssql.danmarcrm.com` - **Web root:** `/var/www/mssql.danmarcrm.com/` - **Dev directory:** `/dev1/` (symlink to web-accessible path) - **PHP version:** 7.4 - **Node.js version:** 10.19 - **MongoDB:** Running on 127.0.0.1:27017 (no auth) - **MySQL:** Running on localhost (user: root) - **Timezone:** Europe/Bucharest