// AT AI division — roadmap systems catalogue + brief copy

const AT_SYSTEMS = [
  {
    slug: 'atlas',
    tag: 'OPS',
    cat: 'ops',
    name: 'Atlas',
    fullName: 'Atlas / Ops Copilot',
    sub: 'Operations copilot',
    desc: 'Conversational ops layer over ERP, CRM and documents.',
    status: 'IN DESIGN',
    stack: ['Private LLM', 'RAG', 'Postgres', 'Webhooks'],
    aims: [
      'Reclaim ops hours spent on repeat questions',
      'Unify answers across disconnected systems',
      'Surface anomalies before they become incidents',
    ],
    problem: 'Operations teams lose hours each week chasing the same answers across ERP, CRM, inboxes and shared drives. Status questions become Slack threads; exceptions get discovered late; and institutional knowledge lives in people, not systems.',
    solution: 'Atlas is a conversational ops layer that sits across your existing systems — Sage, Xero, Zoho, Freshdesk, SharePoint, whatever you already run. Staff ask questions in plain language; Atlas retrieves grounded answers, drafts reports, and flags anomalies before they become incidents.',
    users: ['Operations managers', 'Finance controllers', 'Executive assistants', 'Warehouse leads'],
    capabilities: [
      'Natural-language queries across connected business systems',
      'Grounded answers with source citations and permission-aware retrieval',
      'Scheduled anomaly scans on orders, stock, invoices and SLA breaches',
      'Draft ops reports assembled from live system data',
      'Human-in-the-loop approval before any write-back action',
    ],
    integrations: ['Sage / Xero / Zoho', 'CRM pipelines', 'Helpdesk tickets', 'Document stores'],
    delivery: 'Partner pilot engagements in Q3 2026. Scoped as a production workflow MVP with 2–4 system integrations and a private deployment.',
    engagement: 'Best fit for distributors, services firms and multi-entity groups where ops questions cross more than one system daily.',
  },
  {
    slug: 'throughline',
    tag: 'COMMERCE',
    cat: 'commerce',
    name: 'Throughline',
    fullName: 'Throughline / Quote-to-Cash',
    sub: 'Quote-to-cash automation',
    desc: 'Quoting, PO matching and reconciliation for distributors.',
    status: 'IN DESIGN',
    stack: ['Python', 'Sage / Xero', 'Vision OCR'],
    aims: [
      'Near-zero manual reconciliation',
      'Minutes, not days, on a new quote',
      'Auditable end-to-end trail',
    ],
    problem: 'Quote-to-cash is still painfully manual for many African distributors — quotes re-keyed into accounting, POs matched by hand, variances found at month-end. The cycle burns finance time and hides margin leakage.',
    solution: 'Throughline automates the distributor finance loop: quote generation, PO intake, three-way matching and reconciliation — with OCR for supplier documents and full audit trails for every exception.',
    users: ['Finance teams', 'Sales ops', 'Procurement coordinators', 'Founders at growth-stage distributors'],
    capabilities: [
      'Quote templates tied to live price lists and stock availability',
      'PO and invoice ingestion via email, portal upload or OCR',
      'Automated matching with exception queues for human review',
      'Reconciliation dashboards with variance reasons and export paths',
      'Webhook notifications into existing approval workflows',
    ],
    integrations: ['Sage', 'Xero', 'Shopify / WooCommerce', 'Supplier PDFs and email intake'],
    delivery: 'Workflow audit → automation prototype → production MVP. First builds target a single quote-to-cash path before expanding SKUs and entities.',
    engagement: 'Designed for wholesale, import/distribution and multi-channel commerce operators doing meaningful monthly reconciliation volume.',
  },
  {
    slug: 'archive',
    tag: 'KNOWLEDGE',
    cat: 'knowledge',
    name: 'Archive',
    fullName: 'Archive / Institutional Memory',
    sub: 'Institutional memory',
    desc: 'SOPs, contracts and field reports — queryable org-wide.',
    status: 'IN DESIGN',
    stack: ['Vector store', 'SSO', 'Policy engine'],
    aims: [
      'One place to ask, one place to find',
      'Policy-aware access for every tier',
      'Grounded answers with citations',
    ],
    problem: 'SOPs, contracts, safety files and field reports scatter across SharePoint, email, WhatsApp exports and desk drawers. New staff ask the same questions; seniors become human search engines; compliance audits hurt.',
    solution: 'Archive is a private knowledge system for institutional memory — ingest docs and policies, enforce role-based access, and let teams query org-wide with citations that stand up to audit.',
    users: ['Compliance officers', 'HR and L&D', 'Field supervisors', 'New hires and team leads'],
    capabilities: [
      'Ingestion pipelines for PDFs, DOCX, wikis and ticket exports',
      'Permission-aware retrieval — users only see what their role allows',
      'Citation-first answers with document version tracking',
      'SOP change alerts when source documents update',
      'Optional copilot surfaces inside existing tools (Teams, browser, mobile)',
    ],
    integrations: ['Microsoft 365 / Google Workspace', 'SSO (Entra, Google)', 'HRIS role mappings'],
    delivery: 'Starts with a bounded corpus (e.g. ops SOPs + contracts) before expanding to full org knowledge. Private deployment by default.',
    engagement: 'Strong fit for regulated industries, multi-site operators and groups with high staff turnover where onboarding cost is real.',
  },
  {
    slug: 'lineup',
    tag: 'SUPPORT',
    cat: 'support',
    name: 'Lineup',
    fullName: 'Lineup / Customer Copilot',
    sub: 'Customer copilot',
    desc: 'Grounded replies, rich escalations, product insight loop.',
    status: 'PLANNED',
    stack: ['Freshdesk / Zendesk', 'RAG', 'Eval loop'],
    aims: [
      'Faster first responses',
      'Rich, context-aware escalations',
      'Closed-loop product feedback',
    ],
    problem: 'Support teams drown in repeat tickets while product insight gets lost in handoffs. Agents copy-paste from outdated macros; escalations arrive without context; leadership only sees volume, not patterns.',
    solution: 'Lineup drafts grounded replies from your knowledge base and ticket history, packages rich escalations for tier-2, and feeds structured product signals back to the team that builds.',
    users: ['Customer support agents', 'Customer success leads', 'Product owners', 'Support managers'],
    capabilities: [
      'Draft replies grounded in KB articles, past resolutions and policy',
      'Confidence scoring with automatic escalation below threshold',
      'Escalation packets: customer history, attempted fixes, suggested next steps',
      'Weekly insight digest: emerging issues, SKU complaints, doc gaps',
      'Eval loop to measure resolution quality and reduce hallucination risk',
    ],
    integrations: ['Freshdesk', 'Zendesk', 'Intercom', 'Internal product issue trackers'],
    delivery: 'Planned for late 2026 after Atlas and Archive pilots validate retrieval and governance patterns in production.',
    engagement: 'Best for teams handling 200+ tickets/month with documented policies and a desire to shorten first-response time without losing quality.',
  },
  {
    slug: 'fieldview',
    tag: 'XR+AI',
    cat: 'xr',
    name: 'Fieldview',
    fullName: 'Fieldview / Spatial Ops',
    sub: 'Spatial ops',
    desc: 'XR + AI for inspection, training and remote guidance.',
    status: 'RESEARCH',
    stack: ['WebXR', 'Agents', 'On-device STT'],
    aims: [
      'Shorter time-to-competence for field teams',
      'Higher-throughput inspection workflows',
      'Expert-in-the-ear remote guidance',
    ],
    problem: 'Field inspection, asset walkthroughs and remote expert support still rely on phone calls, PDF checklists and memory. Training takes too long; errors get photographed and forgotten; experts cannot be everywhere.',
    solution: 'Fieldview pairs Quest-class headsets and handheld AR with AI agents for guided inspection, skills training and live remote assistance — built on African Technopreneurs’ in-house XR heritage.',
    users: ['Field technicians', 'Safety inspectors', 'Training coordinators', 'Remote subject-matter experts'],
    capabilities: [
      'Step-by-step spatial checklists with photo/video capture',
      'On-device speech for hands-free logging in noisy environments',
      'Live expert overlay with annotated guidance',
      'Training mode with competency tracking',
      'Offline-first capture with sync when connectivity returns',
    ],
    integrations: ['Asset registers', 'Maintenance systems', 'AT XR device fleet', 'Video/session recording stores'],
    delivery: 'Research phase through 2026 — event demos via GAIC and partner labs before scoped field pilots.',
    engagement: 'Ideal for utilities, logistics yards, manufacturing plants and training-heavy operators already experimenting with XR hardware.',
  },
  {
    slug: 'intake',
    tag: 'PROCUREMENT',
    cat: 'commerce',
    name: 'Intake',
    fullName: 'Intake / Procurement Intelligence',
    sub: 'Procurement intelligence',
    desc: 'Contract-aware procurement assistant with price memory.',
    status: 'PLANNED',
    stack: ['RAG', 'Price memory', 'Approval workflows'],
    aims: [
      'Stop duplicate and off-contract purchases',
      'Surface preferred suppliers automatically',
      'Compress RFQ turnaround time',
    ],
    problem: 'Procurement teams re-learn pricing every cycle. Staff buy off-contract because finding the right supplier and last-paid price takes longer than clicking “order anyway”.',
    solution: 'Intake is a procurement assistant with contract awareness and price memory — it suggests approved suppliers, flags off-contract spend and accelerates RFQ drafting from historical quotes.',
    users: ['Procurement officers', 'Department heads', 'Finance approvers', 'Operations buyers'],
    capabilities: [
      'Contract and preferred-supplier lookup at point of request',
      'Price memory from prior POs and supplier quotes',
      'RFQ draft generation with spec templates',
      'Off-contract spend alerts routed to approvers',
      'Supplier performance notes surfaced during selection',
    ],
    integrations: ['ERP purchase modules', 'Contract repositories', 'Email RFQ threads'],
    delivery: 'Planned after Throughline validates finance-system integration patterns for distributor and retail operators.',
    engagement: 'Suited to multi-department organisations with formal procurement policy but informal workarounds in practice.',
  },
  {
    slug: 'metric',
    tag: 'OPS',
    cat: 'ops',
    name: 'Metric',
    fullName: 'Metric / Automated Reporting',
    sub: 'Automated reporting',
    desc: 'Weekly ops reports assembled from your systems, on schedule.',
    status: 'PLANNED',
    stack: ['Scheduled jobs', 'Dashboard exports', 'Narrative LLM'],
    aims: [
      'Replace manual Monday-morning report assembly',
      'Consistent KPI definitions week over week',
      'Executive-ready narrative plus raw tables',
    ],
    problem: 'Leadership still waits for someone to manually pull numbers from five systems every Monday. Definitions drift; commentary is late; and the ops lead becomes a spreadsheet bridge instead of fixing problems.',
    solution: 'Metric assembles scheduled ops reports from connected systems — tables, charts and a concise narrative that explains what moved, what broke and what needs a decision.',
    users: ['COOs', 'Operations leads', 'Executive teams', 'Board reporting owners'],
    capabilities: [
      'Configurable KPI packs per department or entity',
      'Scheduled generation with email/Slack delivery',
      'Variance commentary with links to underlying records',
      'Exception callouts when thresholds breach',
      'Export to PDF, slides or live dashboard embed',
    ],
    integrations: ['ERP', 'CRM', 'Warehouse systems', 'Support platforms'],
    delivery: 'Natural extension of Atlas pilots — often shipped as the first “always-on” output before full conversational ops goes live.',
    engagement: 'Quick win for leadership teams that already agree on KPIs but lack automated assembly.',
  },
  {
    slug: 'presence',
    tag: 'XR+AI',
    cat: 'xr',
    name: 'Presence',
    fullName: 'Presence / Meeting Intelligence',
    sub: 'Meeting intelligence',
    desc: 'Multi-party meeting capture with spatial recall.',
    status: 'RESEARCH',
    stack: ['Spatial capture', 'Diarization', 'Knowledge graph'],
    aims: [
      'Decisions captured with context, not lost in notes',
      'Searchable meeting memory across projects',
      'Action items routed to the right systems',
    ],
    problem: 'Important decisions live in meeting recordings nobody re-watches. Notes are incomplete; action items stay in chat; and institutional context fragments across quarters.',
    solution: 'Presence captures multi-party meetings with speaker attribution, extracts decisions and actions, and links them into searchable spatial recall — especially valuable for hybrid and field-heavy teams.',
    users: ['Project leads', 'Executive teams', 'Client delivery managers', 'Compliance reviewers'],
    capabilities: [
      'Speaker-attributed transcripts with decision highlighting',
      'Action item extraction with owner and due-date suggestions',
      'Cross-meeting search (“what did we decide about X?”)',
      'Optional spatial replay for XR-captured sessions',
      'Push actions into task systems with human confirmation',
    ],
    integrations: ['Teams / Meet', 'Project trackers', 'Archive knowledge base'],
    delivery: 'Research track alongside Fieldview — targeting GAIC demos and executive workshop settings before production packaging.',
    engagement: 'Best for consultancy, delivery and leadership teams with high meeting load and weak centralized notes discipline.',
  },
];

const systemBySlug = (slug) => AT_SYSTEMS.find((s) => s.slug === slug);

const briefRoute = (slug) => `brief-${slug}`;

const statusColor = (status) => (
  status === 'IN DESIGN' ? 'var(--green)' : status === 'PLANNED' ? 'var(--blue)' : 'var(--fg-3)'
);

Object.assign(window, { AT_SYSTEMS, systemBySlug, briefRoute, statusColor });