ENGINE ROOM

Pillar 25 — Source of Truth. Alex is the Professor.

0 Approved
30 Pending
30 Total

CONSTITUTION SYNC

Only rules with [Approve & Sync] are pushed. AI cannot sync without Alex's approval.

ACTIVE CONSTITUTION

(30 rules)
P1

WhatsApp Intake Pipeline

active
Customer Comms

All inbound WhatsApp messages must be classified by AI (intent, language, vehicle type). Deduplication by whatsapp_message_uid. No duplicate records.

v1local
P2

Customer Match Engine

active
Customer Comms

Every inbound message must be matched to an existing Customer record by phone. If no match, create a new Customer with status=Lead.

v1local
P3

AI Inbox Classifier

active
AI Agents

Classify every message for: intent (Quote/Booking/Question/Complaint), service_type, vehicle_type, risk_flag, needs_photos, should_create_quote.

v1local
P4

Quote Generator

active
Finance

Auto-generate quotes from AI classification. Use samcoPriceDatabase for pricing. Apply multipliers for complexity. Always show base_cost and final_quote.

v1local
P5

Outbound Reply System

active
Customer Comms

AI drafts replies for manual approval. Never auto-send without human review. reply_status must transition: Pending → Approved → Sent.

v1local
P6

Lesson: Workshop

pending_sync
Governance

Repeat question from garages: 'What's the turnaround for a full Mercedes Sprinter front pair retrim?' — AI confidence 0.62. Current rules define capacity hours but not specific per-vehicle turnaround commitments. Suggest adding standard turnaround SLAs to Workshop scheduling rules. our turn round is 10 days or 2 weeks and depending on how busy we are

v1alex_manual
P6

Media Processing Pipeline

active
Infrastructure

All uploaded media tagged with origin_source. Vision AI analyses images for damage detection. Reel suitability flagged automatically.

v1local
P7

Job Management System

active
Workshop

Jobs track full lifecycle: Pending → Scheduled → In Progress → Quality Check → Completed. Every job has job_number, assigned_team, production_stage.

v1local
P8

Security & Audit Trail

active
Governance

Every system action logged to Phase1BuildLog. Admin-only functions verify user.role==='admin'. All API keys in environment secrets. No hardcoded credentials.

v1local
P9

Staff Clock-In System

active
HR & Payroll

PIN-based clock-in with verification photos. Break tracking with reason codes. Auto-deduct breaks >6hrs. Waive requires admin override.

v1local
P10

Payroll Calculator

active
HR & Payroll

Weekly payroll from ClockRecords. Cash/bank rate split. Overtime at 1.5x after standard_weekly_hours. Holiday accrual from hours worked.

v1local
P11

Inventory Management

active
Workshop

Stock tracking with reorder alerts. Low stock threshold triggers notifications. Barcode scanning support. Supplier integration.

v1local
P12

Quality Control System

active
Quality

QA inspections at each production stage. Quality risk scoring. Customer feedback collection. Photo evidence for completed work.

v1local
P13

Lead Engine & CRM

active
Lead Engine

Multi-source lead intake. AI scoring (Hot/Warm/Cold). Enrichment via Hunter.io/Google Places. 6-stage pipeline: New Lead → Booked/Deposit Paid.

v1local
P14

Email Intelligence

active
Customer Comms

Gmail integration for unified inbox. AI auto-tagging and sorting. CRM linking by sender domain. Smart reply drafting.

v1local
P15

Campaign Builder

active
Lead Engine

Multi-step outreach campaigns. A/B testing support. Frequency cap: 30 days between outbound emails. do_not_contact kill switch respected.

v1local
P16

TOAST SYSTEM STANDARD

active
Infrastructure

PILLAR 16 — TOAST SYSTEM STANDARD: NEVER import toast from 'sonner' in any Samco OS component. The app uses useToast() from @/components/ui/use-toast exclusively. Any 'sonner' import will produce silent failures because there is no SonnerToaster provider mounted. All toast notifications MUST use: import { useToast } from '@/components/ui/use-toast'; then const { toast } = useToast(); then toast({ title: '...', description: '...', variant: 'destructive' | undefined }). This is IMMUTABLE SYSTEM LAW.

v1alex_manual
P16

AI Agent Ecosystem

active
AI Agents

Specialised agents: Marketer, HR, Customer Service, Operations. Each agent has defined tools and entity access. Knowledge base per agent.

v1local
P17

Capacity Planning

active
Workshop

Shop capacity based on available staff hours. Job categories have standard hours. Overbooking guard prevents scheduling beyond capacity.

v1local
P18

Evidence & Testing

active
Governance

All pillars must produce verifiable evidence. Test packs with numbered cases. E2E simulation capability. Phase1BuildLog as audit trail.

v1local
P19

Omnichannel Broadcaster

active
Social Media

Parallel dispatch: Facebook, LinkedIn, TikTok, GMB via Promise.allSettled. Missing tokens don't block other platforms. Atomic partial updates only.

v1local
P19

Lesson: Vehicle Intelligence

pending_sync
Governance

Customer asked: 'Can you retrim my Tesla Model 3 seats in Alcantara with heated seat wiring intact?' — AI confidence 0.55. No existing rule covers Tesla EV seat compatibility or heated element preservation during retrim. Recommend creating Pillar 19 sub-rule for EV-specific retrim procedures.

v1alex_manual
P20

Social Media Studio

active
Social Media

AI image generation with ukSpecImageGen (RHD enforced). Vision analysis. PR Auditor with caption loops. Brand voice from BrandProfile.

v1local
P21

Social Dominance — RHD Gate

active
Social Media

Every AI vehicle image must pass RHD steering wheel audit. 2 consecutive LHD failures = MediaLibrary.create() FORBIDDEN. Logos/graphics bypass audit.

v1local
P22

Social Dominance — Group Blitz

active
Social Media

12 curated Facebook groups for manual high-reach distribution. Every click tracked: group_name, post_id, clicked_at. Attribution analytics by business impact.

v1local
P23

LinkedIn V2 Posts API

active
Social Media

Use /rest/posts with LinkedIn-Version: 202401. Assets API for media upload. Idempotency: broadcast_request_id blocks duplicates within 60s.

v1local
P24

Metrics & Revenue Impact

active
Social Media

Live Meta Graph API metrics with permission diagnostics (connected|permissions_missing|reauth_required). Revenue Impact = Leads+Quotes within 72hrs of post.

v1local
P25

Engine Room — Source of Truth

active
Governance

The Engine Room at /EngineRoom is the central brain. All rules stored in EngineRoomLogic with logic_version and updated_at. Bi-directional Google Docs sync via batchUpdate. AI FORBIDDEN from syncing without Alex's [Approve & Sync] click.

v1local
P26

Ocean Bentley CSS Standard

active
Infrastructure

Background: #0B1E3D. Surface: #102447. Text: #FFFFFF. All touch targets 48px. Headers 32px Bold Monospace. Backdrop-blur(15px) on all modals/overlays. No borders, box-shadows, or 12px gray text.

v1local
P27

Neural Seat Library

active
AI Agents

SeatLibrary entity stores master DNA specimens. Vision AI generates Spec Sentence: IDENTIFIED: [Year] [Make] [Model] • [Seat Type] • [Material] • TARGET: [Damage]. X-Ray Scanner on all lead/gallery images. 2 consecutive LHD failures = RHD gate block.

v1local

WEEKLY STEER

Tell the AI what to focus on this week. It injects this into every caption generation prompt.

PENDING LESSONS

AI proposes. Alex defines. Only Alex's text becomes law.

No pending lessons. The AI is learning well.

SEAT LIBRARY

1
View All

Reference DNA for AI benchmarking.

2020 Ford Ford Transit Custom

Front Driver
Fabric
Perfect