- ai-sync-protocol.md: Session start and post-change sync rules - _sync section in schema for auto-sync configuration - Updated client skill template with Forgejo fetch patterns - Client projects now self-sufficient via central repo fetch Version 1.1.0 Made-with: Cursor
4 KiB
4 KiB
| 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:
- Read
.ai-context.jsonin project root - Check
_sync.last_checktimestamp - 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/
- Brand preset:
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
# 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
# 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:
- Identify if change is client-specific or general pattern
- If general, push to
ai-ops-templateson Forgejo - Update
context/last-sync.jsonwith timestamp - 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
# 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:
- Force refresh: Set
_sync.last_checkto null in.ai-context.json - Fetch fresh preset from Forgejo
- Verify against
.../raw/main/presets/{{CLIENT_SLUG}}.json