--- name: {{CLIENT_NAME}} description: Context and operations guide for {{CLIENT_NAME}}. Fetches brand, patterns, and infrastructure from central ai-ops-templates repository. --- # {{CLIENT_NAME}} ## Session Start Protocol **CRITICAL: Before starting work, sync context from Forgejo:** 1. Read `.ai-context.json` in project root 2. Check `_sync.last_check` timestamp 3. If > 24 hours old or null, fetch fresh context: - Brand preset: `https://git.abundancepartners.app/matt/ai-ops-templates/raw/main/presets/{{CLIENT_SLUG}}.json` - Common patterns: `https://git.abundancepartners.app/matt/ai-ops-templates/raw/main/snippets/` --- ## Project Overview | Property | Value | |----------|-------| | **Client** | {{CLIENT_DISPLAY_NAME}} | | **Site URL** | {{SITE_URL}} | | **Server** | {{SERVER_NAME}} ({{SERVER_IP}}) | | **Database** | {{DATABASE_NAME}} | | **Preset URL** | `.../presets/{{CLIENT_SLUG}}.json` | --- ## Context Sources (Forgejo) All context is fetched from the central repository. Do NOT duplicate here. | Resource | Forgejo URL | |----------|-------------| | Brand Preset | `.../raw/main/presets/{{CLIENT_SLUG}}.json` | | UI Patterns | `.../raw/main/snippets/vendor-card.tsx` | | Schema Templates | `.../raw/main/templates/schema-product.json` | | SEO Rules | `.../raw/main/rules/seo-rules.md` | | Decision Guide | `.../raw/main/rules/ai-decision-guide.md` | **Base URL**: `https://git.abundancepartners.app/matt/ai-ops-templates` --- ## Infrastructure ### Server Access ```bash # SSH into server ssh root@{{SERVER_IP}} # Or use abundance CLI (if installed) abundance srv ssh {{SERVER_NAME}} ``` ### Coolify Deployment - **Dashboard**: {{COOLIFY_URL}} - **App ID**: {{COOLIFY_APP_ID}} - **Deploy via MCP**: `deploy_push({ target: "prod", app_id: "{{COOLIFY_APP_ID}}" })` ### Database ```bash # Query database abundance db query {{DATABASE_NAME}} "SELECT * FROM {{TABLE}} LIMIT 5" # Or use MCP supabase_query({ query: "SELECT * FROM {{TABLE}} LIMIT $1", params: [5] }) ``` --- ## Brand Guidelines (Fetch from Forgejo) Brand colors, fonts, and styling are defined in: ``` https://git.abundancepartners.app/matt/ai-ops-templates/raw/main/presets/{{CLIENT_SLUG}}.json ``` **Quick Reference** (verify against preset): | Color | Hex | Usage | |-------|-----|-------| | Primary | `{{PRIMARY_COLOR}}` | Buttons, links, highlights | | Secondary | `{{SECONDARY_COLOR}}` | Accents, badges | | Background | `{{BACKGROUND_COLOR}}` | Page background | --- ## Key Routes | Route | Description | Component | |-------|-------------|-----------| | {{ROUTE_1}} | {{ROUTE_1_DESC}} | `{{ROUTE_1_COMPONENT}}` | | {{ROUTE_2}} | {{ROUTE_2_DESC}} | `{{ROUTE_2_COMPONENT}}` | --- ## Common Patterns (Fetch from Forgejo) Patterns are maintained centrally. Fetch as needed: ### Vendor Card ``` GET .../raw/main/snippets/vendor-card.tsx ``` ### Breadcrumb with Schema ``` GET .../raw/main/snippets/breadcrumb.tsx ``` ### Schema Injection ``` GET .../raw/main/snippets/schema-inject.ts ``` --- ## Post-Change Sync After making changes that should be reusable: 1. Identify if change is client-specific or general pattern 2. If general, push to `ai-ops-templates` on Forgejo 3. Update `context/last-sync.json` with timestamp 4. Add entry to `context/CHANGELOG.md` --- ## Context Metadata | Field | Value | |-------|-------| | _last_updated | {{LAST_UPDATED}} | | _version | {{VERSION}} | | _sync_repo | `https://git.abundancepartners.app/matt/ai-ops-templates` | | _preset | `presets/{{CLIENT_SLUG}}.json` | --- ## Quick Commands ```bash # Check server status abundance srv status # View logs abundance docker logs {{SERVER_NAME}} {{CONTAINER}} -f --tail 100 # Deploy via MCP deploy_push({ target: "prod", app_id: "{{COOLIFY_APP_ID}}" }) # Fetch fresh context # Read .ai-context.json, then fetch preset from Forgejo ``` --- ## Self-Healing If context seems wrong: 1. Force refresh: Set `_sync.last_check` to null in `.ai-context.json` 2. Fetch fresh preset from Forgejo 3. Verify against `.../raw/main/presets/{{CLIENT_SLUG}}.json`